okuoub

0

votes
0

answer
7

views

Python wordcloud can't present Hebrew

I am trying to create wordcloud to a text in Hebrew. The text is: את הסיפור שלנו סיפרנו לעצמנו כל הזמן. בכפייתיות. בעל פה. לפעמים התעייפנו עוד לפני שהתחלנו ובכל זאת סיפרנו במשך שעות. הקשבנו רוב קש...
okuoub
1

votes
1

answer
59

views

Psychopy unexpected keyword argument 'languageStyle'

I saw that psychopy now has support for RTL language: http://www.psychopy.org/api/visual/textstim.html https://discourse.psychopy.org/t/reshaping-english-text-to-arabic/4235/16 I used this manual to install the latest version using conda: http://psychopy.org/installation.html My version is: 1.90.2...
okuoub
1

votes
1

answer
19

views

Get the probabity of a specific word in Keras LSTM model

I trained a w2v model and a keras LSTM model on top of it: pretrained_weights = w2v_model.wv.syn0 vocab_size, emdedding_size = pretrained_weights.shape keras_lstm_model = Sequential() keras_lstm_model.add(Embedding(input_dim = vocab_size, output_dim = emdedding_size, weights = [pretrained_weights]))...
okuoub
1

votes
0

answer
89

views

Can't install deSolve pacakge in R, Library not loaded: libgcc_s.1.dylib

I am using MacOSX sierra, I installed fortrun using brew: brew install gcc brew update && brew reinstall r brew link --overwrite r Now I need to install deSolve but I can't: > install.packages('deSolve') Installing package into '/usr/local/lib/R/site-library' (as 'lib' is unspecified) trying URL 'ht...
okuoub
1

votes
0

answer
162

views

Increase pycharm speed

I want to increase the speed of my pyCharm, in particular the speed of the debugger (when I am using debugger it is VERY slow). my pycharm.vmoptions are : -Xms1024m #changed from 128 -Xmx2048m #changed from 1000 -XX:MaxPermSize=500m -XX:ReservedCodeCacheSize=360m -XX:+UseCompressedOops What should I...
okuoub
1

votes
1

answer
184

views

can't run r script from pycharm

I am using pycharm with MAC, I am trying to execute R script even-though I have R compatibility: #!/usr/bin/env Rscript lambda = 1.5 T=4 nsamp = 8 And I get the error: lambda = 1.5 ^ SyntaxError: invalid syntax How to fix it?
okuoub
1

votes
2

answer
412

views

Can't install Psychopy module on python 3 (MAC)

I’m trying to install psychopy on Python 3 on a Mac but I get an error: pip3 install psychopy Collecting psychopy Using cached PsychoPy-1.84.2.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File “”, line 1, in File “/private/var/folders/39/8...
okuoub
1

votes
1

answer
378

views

Python 3.2 in anaconda

I'm trying to create an anaconda environment with Python3.2 but it seems that anaconda only supports 3.4+. Is it possible to use Python3.2 with anaconda environment? How? [email protected]>> conda create -n myenv python=3.2 Solving environment: failed PackagesNotFoundError: The following packages are not...
okuoub
1

votes
1

answer
86

views

How to save lmplot in pandas

For reg plot, this is working: sns_reg_plot = sns.regplot(x='X', y='y', data=df) sns_reg_fig = sns_reg_plot.get_figure() sns_reg_fig.savefig(path) But for lm plot I get an error: sns_lm_plot = sns.lmplot(x='X', y='y', hue='hue', data=df) .. sns_lm_fig = sns_lm_plot.get_figure() AttributeError: 'Face...
okuoub
1

votes
2

answer
33

views

nltk how to give multiple separated sentences

I have list of sentences (each sentence is a list) in English and I would like to fetch ngrams. For example: sentences = [['this', 'is', 'sentence', 'one'], ['hello','again']] In order to run nltk.utils.ngram I need to flat the list to: sentences = ['this','is','sentence','one','hello','again'] But...
okuoub
1

votes
2

answer
0

views

pandas dataframe get the value with most occurence per row (Python2)

I have the dataframe df =A B B A B B B B B A A A A B B A A B A A And I want to get a vector with the element the appeared the most, per row. So here I will get [B,B,A,A] What is the best way to do it? In Python2
okuoub
1

votes
1

answer
925

views

placeholders definition for nd-array input in tensorflow

I'm trying to build LSTM RNN based on this guide: http://monik.in/a-noobs-guide-to-implementing-rnn-lstm-using-tensorflow/ My input is ndarray with the size of 89102*39 (89102 rows, 39 features). There are 3 labels for the data - 0,1,2 It seems like I'm having a problem with the placeholders definit...
okuoub
1

votes
1

answer
121

views

dataframe.apply() while keeping columns names

I want to apply a function on every row in the dataframe. I am using apply() but then it passes a Series object, therefore the columns names are not passed. Is there a way to use .apply() and keep columns names?
okuoub
1

votes
1

answer
38

views

Pandas dataframe fill values between indexes

I have list of indexes on a dataframe with 5 columns. indexes = [5,9,44] I want to create a pd.Series with the value of a certain columns between the indexes. So, if the row#5 = ['a','b','c','d','e'] row#9 = ['q','w','e','r','t'] row#44= ['z','x','c','v','b'] and the columns_idx is 3, I want a vect...
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
54

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
49

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
1.1k

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