okuoub

-3

votes
1

answer
28

views

Python put add sentence as image in matplotlib

I have a text: "Hello world" and a heat map as a 2d-array. I want to draw the text as a graph in order to put the heatmap on top of it. So, my question is how to convert the string "Hello world" to an image in order to plot it? For example, I want to create this .png:
okuoub
1

votes
2

answer
45

views

Pandas dataframe use columns as rows [duplicate]

This question already has an answer here: pandas convert some columns into rows 3 answers I have a dataframe with a columns for group and columns of answers of question: Group Q1 Q2 Q3 Q4 0 1 A B C 6 1 1 B C A A 2 1 E F V A 3 2 R T Y O 4 2 M Z D F And I...
okuoub
2

votes
2

answer
45

views

Set my jupyter notebook to use python version of an enviroment

I opened a jupyter notebook from an anaconda enviiroment but the kernel uses a default version of python instead of the python defined in this enviroment (That has all pthe packages i installed). How can I change it? (myEnv) [email protected]:~/Desktop$jupyter notebook [I 13:35:46.644 NotebookApp] The po...
okuoub
1

votes
1

answer
45

views

Set (0,0) location in psychopy to be left

Im trying to present stimuli on screen in psychopy. Is there a way to set (0,0) to be top/bottom left instead of center?
okuoub
4

votes
3

answer
2.5k

views

reading a WAV file from TIMIT database in python

I'm trying to read a wav file from the TIMIT database in python but I get an error: When I'm using wave: wave.Error: file does not start with RIFF id When I'm using scipy: ValueError: File format b'NIST'... not understood. and when I'm using librosa, the program got stuck. I tried to convert it to w...
okuoub
2

votes
1

answer
21

views

Words hiererchical semantic distance

I need a labeled data (human judgment) for the structural/hierarchical semantic distance between many couples (at least hundreds) of word. For example, d(computer, television) < d(radio, television) < d(dish washer, television). If we organize all words in a dendogram or a tree, where each node is a...
okuoub
2

votes
1

answer
42

views

Can't use collections.defaultdict() in google-app-engine

Trying to use collections.defaultdict() to create an histogram in google-app-engine : class myDS(ndb.Model): values = ndb.PickleProperty() hist = ndb.PickleProperty() class Handler: my_ds = myDS() my_ds.values = {} my_ds.hist = defaultdict(lambda : 0) And got the error (from log) File "/base/all...
okuoub
2

votes
2

answer
829

views

psutil.AccessDenied Error while trying to load StanfordCoreNLP

I'm trying to load the package StanfordCoreNLP to get the correct parsing for the movie reviews presented in their page (https://nlp.stanford.edu/sentiment/treebank.html): (I'm using MAC) nlp = StanfordCoreNLP("/Users//NLP_models/stanford-corenlp-full-2018-01-31") But get the error: Traceback (most...
okuoub
3

votes
1

answer
387

views

Installing pygame for python3 in mac using anaconda

I am trying to install pygame for python 3 and get the error: conda install -c cogsci pygame Solving environment: failed UnsatisfiableError: The following specifications were found to be in conflict: - pygame - xlwt Use "conda info " to see the dependencies for each package. Tried to install xlwt a...
okuoub
1

votes
1

answer
751

views

convert eye-tracking .edf file to ASC/CSV format

I have a recording of tracking data in .edf format (SR-RESEARCH eyelink). I want to convert it to ASC/CSV format in python. I have the GUI application but I want to do it programmatically (in Python). I found the package pyEDFlib but couldn't find an example to how convert the eye-tracking .edf file...
okuoub
2

votes
1

answer
23

views

Pandas dataframe group by order [duplicate]

This question already has an answer here: Pandas DataFrame: How to groupby consecutive values 2 answers I have the input dataframe: df1 = pandas.DataFrame( { "Name" : ["Alice", "Bob", "Mallory", "Mallory","Mallory", "Bob" ,"Bob", "Mallory", "Alice"] , "City" : ["Seattle", "Seattle", "Portland", "...
okuoub