I have run into a slight problem with GNU Radio. I inserted a “File Sink” block into GNU Radio companion. I was receiving data last week, but coming back to the classroom today, I am not able to execute the file anymore. Do you have any idea what is wrong?
Basically, what I am trying to do, is export data created from GRC file using a file sink block to export the data to a file. That file, using python to parse through the data, will then be uploaded to a database. My problem is now that I cannot execute the file to export the data.
Below is some data from the Python script associated with the File Sink
audiodata = gr.file_sink(gr.sizeof_float, "audio.dat")
self.connect(src0, audio)
audiodata = gr.file_sink(gr.sink(gr.sizeof_complex, "audio.dat")
Below is a link of my GRC File.
http://i58.tinypic.com/10wv78z.png
If anyone has a better way to export the data from GRC, please let me know.
The second line of python looks broken. Where did you get it from? I haven't seen a bug in GRC's python code generation yet, so this is surprising.
Regarding the red arrow: This most probably indicates that something is wrong with the data type of the file sink. You should set the type to float, set it back to complex, and see if that solved the problem. If it did not, then your GRC file is broken, and you'll either need to manually look at the XML or re-build it from scratch, sorry :(
I have not seen XML corruption in GRC, either, so please make sure your data storage is not corrupted.
I think the second line should be
self.connect(src0, audiodata)
The lines looks similar to Capturing Signals in GNU Radio.pdf available in internet
Related
Situation:
I want to train and simple configure the retrieve and rank service.
I just uploaded some PDFs and now I want to upload some questions.
In the documentation I do not find a simple information how the csv file must be structured and which are the must fields and which are not must files.
Something like: "[YOUR QUESTION (MUST)]",[DOCUMENT ID (MUST)], [RANKING (OPTIONAL)]
The document ID you will find in xyz in section xyz.
Inside the help I can not find such kind of help.
https://www.ibm.com/watson/developercloud/doc/retrieve-rank/training_data.shtml#script
Impact:
There is no chance to get a "real" documentation of the configuration outside the tutorial.
Possible Solution:
Provide additional documenation.
Maybe I was not able to find it and someone can guide me to the right place?
Ok, I found the solution for me, by try and error. Following steps do work for me:
1) You need a plain text file and the ending should be *.txt
2) Inside the file you have to write your questions like this:
What is the best place to be?
Why should I travel to the USA?
-> Don't do it like
"What is the best place to be?"
For me the help was missleading, because saying something about CSV files.
You can take a look also in the comment of #dalelane he is right, and highlight the entry text for the upload of the file.
I have values in file:
en-us, de-de, es-es, cs-cz, fr-fr, it-it, ja-jp, ko-kr, pl-pl, pt-br, ru-ru, tr-tr, zh-cn, zh-tw.
how can I get this values for one request?
I want to create a query that takes the value of these in turn and writes the variable
This scenario can be achieved using Jmeter component "CSV Data Set Config"
Please refer to below mentioned link:
Jmeter CSV Data Set Config
Hope this will help
Can't comment, not enough karma. In response to above questions your path is probably wrong. If you use a debug sampler to show what path the CSV reader is taking I think you will find it is looking at something like C:/Jmeter/C:/path/to/CSV/file.
Another option for completing this is to use inline CSVRead. In your HTTP request use code like this -
${__CSVRead(etc/filters.csv,0)}${__CSVRead(etc/filters.csv,next)}
etc/filters is the RELATIVE path from Jmeters active running directory. In my case this evaluates to
C:/git/JmeterScripts/etc/filters.csv
In either case, I am sure your problem is that Jmeters active running directory is not what you think it is. I have had this problem several times with the same error.
I am using the Drupal 7 Migrate module to create a series of nodes from JPG and EPS files. I can get them to import just fine. But I notice that when I am done importing them if I look at the nodes it creates, none of the attached filefield and thumbnail files contain filename information.
Upon inspecting the file_managed table I see that both the filename and filemime fields are empty for ONLY the files that I attached via the migrate module. This also creates an issue with downloading the files.
Now I think the problem has to do with the fact that I am using "file_link" instead of "file_copy" as the file operation I specify. The problem is I am importing around 2TB (thats Terabytes) of image files. We had to put in a special request with Rackspace just to get access to that much disk space on our server. So I can't go around copying from one directory to the next because of space issues. So "file_link" seems like the obvious choice.
Now you probably want to see how I am doing this exactly, so here is the code snippet:
$jpg_arguments = MigrateFileFieldHandler::arguments(NULL,
'file_link', FILE_EXISTS_RENAME, 'en', array('source_field' => 'jpg_name'),
array('source_field' => 'jpg_filename'), array('source_field' => 'jpg_filename'));
$this->addFieldMapping('field_image', 'jpg_uri')
->arguments($jpg_arguments);
As you can see I am specifying no base path (just like the beer.inc example file does). I have set file_link, the language, and the source fields for the description, title, and alt.
It is able to generate thumbnails from the JPGs. But still missing those columns of data in the db table. I traced through the functions the best I could but I don't see what is causing this. I tried running the uri in the table through the functions that generate the filename and the filemime and they output just fine. It is like something is removing just those segments of data.
Does anyone have any idea what this could be? I am using the Drupal 7 Migrate module version 2.2. It is running on Drupal 7.8.
Thanks,
Patrick
Ok, so I have found the answer to yet another question of mine. This is actually an issue with the migrate module itself. The issue is documented here. I will be repealing this bounty (as soon as I figure out how).
I need to write a small R script for people who never used R before that imports a file and does some things with it. I would like to minimize user input as much as possible, and since assigning the file-path is basically all the user input required I was wondering, is it possible to get a popup screen (basically your usual "open file" screen) allowing someone to select a file (import the name as string in R or something)?
The file.choose function performs this, eg:
fname <- file.choose()
source(file.choose())
You may also want to look at choose.files (for multiple files) and choose.dir (for just selecting a directory path).
The tcltk package gives you tk_choose.files.
If you want to go beyond file choosers then you can use the package to build user interfaces.
It's worth mentioning rChoiceDialogs::rchoose.files. I'm not completely sold yet, but they advertise it as being completely cross platform and fixing the annoying problem common to choose.files and tk_choose.files of popping up behind other windows. See their vignette here.
Am attempting to use SSIS flat file source to read a log file being actively written to. Looping and waiting for the file to be released is not practical as this is an active log file held by a service.
Ideally, I'm looking for a setting upon the flat file source, similar to the C# code below. If not that, what route can I take to read the flat file? I'm attempting to stay within SSIS as I sincerely can't believe this can't be done with stock parts and assume I'm just missing something.
Using C#, I can successfully open the exact file upon which the flat file source errors
System.IO.FileStream file
= new System.IO.FileStream
(
file_to_hash.FullName
, System.IO.FileMode.Open
, System.IO.FileAccess.Read
, System.IO.FileShare.ReadWrite
);
This is the error message experienced in SSIS:
Warning: 0x80070020 at Data Flow Task, Flat File Source [1]: The process cannot access the file because it is being used by another process.
Error: 0xC020200E at Data Flow Task, Flat File Source [1]: Cannot open the datafile "XXX".
both ideas by tim and cade would work. I chose Tim's approach - copying the file b/c I already had the code ( both the copy and the data tranformation ), and changing the name/path of the file going into the data transformation was a configuration setting of the app being built. Wish I could mark it answered, but asked the question as an unregistered user.
You probably need to write a custom data source - possibly as simple as a script task.