I have some markdown in a README.md that looks like this:
# Tool
## General Info
This is a python tool that provides an interface to Kirby flash memories.
Tool functionality includes:
* Item 1
* Item 2
* Item 3
* Item 3a
* Item 3b
* Item 3c
But the result in my Bitbucket repo looks like this:
What am I doing wrong?
Add empty line after Tool functionality includes: so that it would be
# Tool
## General Info
This is a python tool that provides an interface to Kirby flash memories.
Tool functionality includes:
* Item 1
* Item 2
* Item 3
* Item 3a
* Item 3b
* Item 3c
Related
As im so new to this field and im trying to explore the data for a time series, and find the missing values and count them and study a distribution of their length and fill in these gaps, the thing is i have, let's say 10 file.txt and for each file i have 2 columns as follows:
C1 C2
944 0
920 1
920 2
928 3
912 7
920 8
920 9
880 10
888 11
920 12
944 13
and so on... lets say till 100 and not necessarily the 10 files have the same number of observations.
so here for example the missing values and not necessarily appears in all files that i have, missing value are: 4,5 and 6 in C2 and the corresponding 1st column C1(measured in milliseconds, so the value of 928ms is not a time neighbor of 912ms). So i want to find those gaps(the total missing values in all 10 files) and show a histogram of their lengths.
i wrote a piece of code in R, but the problem is that i don't get the exact total number that i should have for the missing values.
path = "files path"
out.file<-data.frame(TS = 0, Index = 0, File = '')
file.names <- dir(path, pattern =".txt")
for(i in 1:length(file.names)){
file <- cbind(read.table(file.names[i],
header=F,
sep ="\t",
stringsAsFactors=FALSE),
file.names[i])
colnames(file) <- c('TS', 'Index', 'File')
out.file <- rbind(out.file, file)
}
d = dim(out.file)[1]
misDa = 0
for(i in 2:(d-1)){
if(abs(out.file$Index[i]-out.file$Index[i+1]) > 1)
misDa = misDa+1
}
Hard to give specific hints without having a more extensive example of your data that contains some of the actual NAs.
If you are using R (like it seems) the naniar and the imputeTS packages offer nice functions for missing data visualizations.
Some examples from the naniar package, which is especially good for multivariate data (more plot examples):
Some examples from the imputeTS package, which is especially good for time series data (additional plot examples):
I am trying to run Jenkins job everyday at 10 AM and 10 PM . How do i do that?
Currently i use the below to run at 12 AM and 12 PM . Am not aware how to change it.
0 0-23/12 * * *
Its difficult to acheive it with just a single crontab entry, what you can do is to have a 2 crontab entry like below :-
for job which you want to run daily at 10 AM :-
0 10 * * *
And for 10 PM job 0 22 * * *.
Here first entry denotes the minute, second denotes the hour and then day,month and week.
Just click the "?" icon to the right of the "Schedule" field, and you'll see a detailed explanation of the syntax available there.
If you want it to run at 12am and 12pm, I would guess you would just do this:
0 0,12 * * *
Suppose you want to run a jenkins job at 4:30 AM , monday to saturday, then you can use below script under your jenkins build trigger:
30 04 * * 1-6
1-6 denotes monday to saturday
Coming back to your question, you can configure 2 entries under your build trigger to run Jenkins job everyday at 10 AM and 10 PM in jenkins as shown below:
00 10 * * 1-7
00 22 * * 1-7
The powerball schema and separators are not consistent which makes it an unusual file to read. (http://www.powerball.com/powerball/winnums-text.txt)
Sample:
Draw Date WB1 WB2 WB3 WB4 WB5 PB PP
09/24/2016 15 07 29 41 20 22 2
09/21/2016 63 67 01 69 28 17 4
09/17/2016 51 19 09 62 55 14 4
Any suggestions?
This looks like a "fixed column width" file rather than an ordinary CSV (meaning that the columns are not separated by any single character, but instead have fixed number of characters, with padding spaces).
There is some early work on supporting this in F# Data in the pull request here. We'd welcome any help getting this tested - but you'd need to get the soruce code and build F# Data from source (which is just a matter of running the build script though!)
Alternatively, you could probably do some simple pre-processing on the file before reading it as an ordinary CSV file. Looking at the sample file, using a regular expression to replace 1 or more spaces with a comma would produce regular CSV that the CSV provider can consume.
I would like to create the last column.Thank you in advance!
You could try something like this:
/*************************************/.
DATA LIST FREE /v1 v2 v3 v4 v5.
BEGIN DATA
1 2 99 4 5
99 2 3 99 5
1 99 3 4 5
1 2 99 99 5
1 99 99 99 5
99 2 99 99 99
END DATA.
DATASET NAME DS1.
/*************************************/.
/* Solution1: Assumes v1 to v5 can hold any value from 1 to 5 */.
recode v1 to v5 (99,sysmis=sysmis) (else=copy).
do repeat v=v1 to v5.
if (any(v,1,4,5)) Target1=1.
if (any(v,2,3)) Target2=2.
end repeat.
compute TargetA=sum(Target1,Target2).
/* Solution2: Alternative solution which assumes v1 holds values 1 only v2 values 2 only ect... */.
recode v1 to v5 (99,sysmis=sysmis) (else=1).
compute TargetB=sum(any(1,v1,v4,v5)*1, any(1,v2,v3)*2).
exe.
If I understand you correctly:
Your input file contains 5 columns, 1 per channel
Each channel-specific column is filled with channel-specific identifier (1-5)
When the column is empty, that channel is not used / not relevant for that observation
You want to summarize the mix of channels used in new field (NewVar)
You want to use the IF statement in the SPSS syntax
The answer above by JigneshSutar does not seem to do this. Also, you do not need the do-repeat-loops but can do this in 3 lines (+EXECUTE.) of syntax (using the data generator in the answer by JigneshSutar):
IF (V1 = 1 & V4 = 4 & V5 = 5) NewVar = 1.
IF (V2 = 2 & V3 = 3) NewVar = 2.
IF (V1 = 1 & V2 = 2 & V3 = 3 & V4 = 4 & V5 = 5) NewVar = 3.
EXECUTE.
This syntax can easily be adjusted when the channel columns are filled with other values than the channel identifiers [1-5], for instance by using the missing function:
IF (MISSING(V1)=0 & MISSING(V4)=0 & MISSING(V5)=0) NewVar = 1.
IF (MISSING(V2)=0 & MISSING(V3)=0) NewVar = 2.
IF (MISSING(V1)=0 & MISSING(V2)=0 & MISSING(V3)=0& MISSING(V4)=0 & MISSING(V5)=0) NewVar = 3.
EXECUTE.
I have a large text file as below imported in MATLAB:
Run Lat Long Time
1 32 32 34
1 23 22 21
2 23 12 11
2 11 11 11
2 33 11 12
up to 10 runs etc.
So I'm trying to break up each section in the file: section 1, section 2, etc and write it to 10 different text files. File 1 will have data from Run 1. File 2 will have data from Run 2.
What you're looking for is Matlab's textread function. I'll give you the pieces you need and frame out the logic, but you'll need to connect the pieces yourself :)
Your read would look something like this
[head1, head2, head3, head4] = textread(file_name,'%s %s %s %s',1);
[run, lat, long, time] = textread(file_name,'%u %u %u %u');
and your write method would use a loop to iterate over the values in
unique(run)
creating a file with
fout = fopen([base_file_name_out num2str(run_number)]);
and writing to it the values contained in
lat_this_run=Lat(run==run_number);
using the method
fprintf(fout,'%u %u %u\n', lat_this_run, long_this_run, time_this_run)
If your data is already loaded into matlab and named A, you could do:
>> a = max(A(:,1));
>> AA={};
>> for i = 1:a
AA{i}=A(find(A(:,1)==i),:)
name=sprintf('%d.txt',i);
dlmwrite(name,AA{i},'\t');
end
The output will be .txt files containing tab-delimited data.