tsv

How to test for blank text field when using robotframework-selenium?

ⅰ亾dé卋堺 提交于 2019-12-21 04:02:26
问题 How can I specify blank/empty value for a text field when using the robotframework-seleniumlibrary with a TSV file? For example, I have the following: Textfield Value Should Be identifier=name1 Chris Textfield Value Should Be identifier=name2 I want to test that name2 is blank. I have tried leaving it blank (which returns a message about an incorrect number of arguments. I have tried "", which looks for a pair of quotes, and '' which enters a single quote, and selenium seems to look for that

d3JS: Drawing Line Segments from CSV

China☆狼群 提交于 2019-12-20 04:48:19
问题 In d3Js, How would one draw basic line segments from a tsv file? Say the file declare, in one row of data, x1,y1,x2,y2. I want to draw two line segments as in the data below: x0 y0 x1 y1 weight 0.5 0.5 0.2 0.2 2 0.25 0.35 0.7 0.8 1 I'm having trouble with the d3.tsv function here. I'm confident that the code below is fundamentally wrong, but just to show what I'm trying to do... d3.tsv("data/sampledata.tsv", function(error, data) { data.forEach(function(d) { d.x0 = +d.x0; d.y0 = +d.y0; d.x1 =

python chain a list from a tsv file

让人想犯罪 __ 提交于 2019-12-20 04:13:46
问题 i have this tsv file containing some paths of links each link is seperated by a ';' i want to use: In the example below we can se that the text in the file is seperated and i only want to read through the last column wich is a path starting with '14th' 6a3701d319fc3754 1297740409 166 14th_century;15th_century;16th_century;Pacific_Ocean;Atlantic_Ocean;Accra;Africa;Atlantic_slave_trade;African_slave_trade NULL 3824310e536af032 1344753412 88 14th_century;Europe;Africa;Atlantic_slave_trade

union of two columns of a tsv file

心不动则不痛 提交于 2019-12-11 07:45:46
问题 I've a file which stores a directed graph. Each line is represented as node1 TAB node2 TAB weight I want to find the set of nodes. Is there a better way of getting union? My current solution involves creating temporary files: cut -f1 input_graph | sort | uniq > nodes1 cut -f2 input_graph | sort | uniq > nodes2 cat nodes1 nodes2 | sort | uniq > nodes 回答1: { cut -f1 input_graph; cut -f2 input_graph; } | sort | uniq No need to sort twice. The { cmd1; cmd2; } syntax is equivalent to (cmd1; cmd2)

d3.js TSV to Javascript variable

可紊 提交于 2019-12-10 23:52:41
问题 I'm working on a graph with d3.js library. The 3d.js tsv parser creates the 'd' variable as such: TSV: day Value 01-01 50 01-02 45 01-03 60 code: d3.tsv("data.tsv", function(error, data){...} and now you use 'd.day' and 'd.Value' to build your graph - scaterplots, linegraph, etc... I won't be using a tsv file but a javascript variable instead. Which is the most correct (if possible) javascript variable representation in order to use this d.day and d.Value in 3d.js and parsing it

textscan in MATLAB: read NULL value as NaN

﹥>﹥吖頭↗ 提交于 2019-12-10 23:02:13
问题 I have a .txt file with the following data: sampleF.txt --> (tab delimited) MSFT 200 100 APPL 10 NULL AMZN 20 40 I need to read this data using textscan . I am facing a problem while reading the NULL data. Using treatasempty param, I can read it as 0. But I want to read it as NaN . Please help! Thanks! fName = '.....\sampleF.txt' [fid, message] = fopen(fName) ; if fid < 0, disp(message), else datatxt = textscan(fid, '%q %d %d', 'Delimiter', '\t','treatAsEmpty','NULL'); datatxt = [ datatxt {1}

D3 - Making stroke-width covary with second data set

ⅰ亾dé卋堺 提交于 2019-12-10 22:39:47
问题 I'm building a pretty straightforward multi-line chart measuring values over time using a .tsv dataset. I want to incorporate a second .tsv that will change the stroke-width of each line. The two datasets have the same x-value(time), but one will plot each line's y-value, and the other dataset will plot the line's stroke-width (let's call it 'z') over the x and y values. In other words: Dataset1 = x,y Dataset2 = x,z I'm using Bostock's Multi-Series Line chart as my base reference. One thought

numpy beginner: writing an array using numpy.savetxt

我们两清 提交于 2019-12-10 17:54:28
问题 I have a numpy histogram that I would like to output as a tab-delimited text file. My code is below: targethist = np.histogram(targetlist, bins=ilist) print targethist np.savetxt('ChrI_dens.txt',targethist,delimiter='\t') targetlist and ilist are long lists of integers. I get the following output: (array([0, 0, 0, ..., 0, 0, 0]), array([ 1, 10000, 20000, ..., 15060000, 15070000, 15072422])) Traceback (most recent call last): File "target_dens_np.py", line 62, in np.savetxt('ChrI_dens.txt'

Convert tsv file so i can use it for nodes and edges in python

混江龙づ霸主 提交于 2019-12-10 11:46:15
问题 I have this tsv file i would like to read and somehow count the numbers of nodes in a path This is how the parts of tsv file looks like: 6a3701d319fc3754 1297740409 166 14th_century;15th_century;16th_century;Pacific_Ocean;Atlantic_Ocean;Accra;Africa;Atlantic_slave_trade;African_slave_trade NULL 3824310e536af032 1344753412 88 14th_century;Europe;Africa;Atlantic_slave_trade;African_slave_trade 3 the paths is only the ones looking like this : 14th_century;15th_century; seperated by ';' my code

how to get data with tsv or csv to array in d3.js from a txt file?

為{幸葍}努か 提交于 2019-12-10 10:02:15
问题 I am using this to parse a csv file and create an array data as specified in d3 docs: d3.tsv("classes_h.txt", function(data) { data.forEach(function(d) { console.log(data[0]); console.log("lol"); }); console.log(data[0]); }); or d3.tsv("classes_h.txt", function(data) { console.log(data[0]); }); However I get undefined in the console when I call the data[0]. I've also tried writing out "data instead of "data[0]" which result in me getting an empty array -> []: My txt file looks like this: http