imdbpy

Error returned when running imdbpy2sql.py with MySQL database

♀尐吖头ヾ 提交于 2019-12-11 05:12:16
问题 I am working on getting IMDbPY installed and working and I have come to a point where I am working on pulling in all of the data from the flat (text) files in to a (MySQL) database. When I run the appropriate command: imdbpy2sql.py -d /tmp/IMDB/ -u 'mysql://user:password@host/database' I recieve the following error: Traceback (most recent call last): File "/usr/local/bin/imdbpy2sql.py", line 4, in <module> import pkg_resources File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line

Keras Error when checking : expected embedding_1_input to have shape (None, 100) but got array with shape (1, 3)

允我心安 提交于 2019-12-05 12:50:38
I created LSTM model using imdb example and tried to predict sentiment in my own string max_features = 20000 # cut texts after this number of words # (among top max_features most common words) maxlen = 100 batch_size = 32 wordsA = "I like this review" wordIndexes = imdb.get_word_index() wordArray = wordsA.split() intArray = [] for word in wordArray: if word in wordIndexes: intArray.append(wordIndexes[word]) testArray = np.array([intArray]) print('Shape: '+str(testArray.shape)) model = load_model('my_model2.h5') print(str(testArray)) prediction = model.predict(testArray) print(prediction) But

IMDB suggestions

懵懂的女人 提交于 2019-12-04 21:23:56
I'd like to make a kind of homemade algorithm, which from a list of all the movies I have, will return accurate suggestions of movies I haven't seen and I could like. But for that I need to know if IMDBpy can return the "suggestions" part. Indeed, when you search for a movie on the web site, you are given a list of movies matching the kind a movie you searched for. But I can't find an answer on the doc of IMDBpy. Is there a way to get the suggestions with it ? Since get_movie_recommendations doesn't really work as you wish (e.g. it doesn't return anything for 12 Years a Slave), you could

How can I pass command-line arguments in IronPython?

北战南征 提交于 2019-11-27 08:35:05
问题 I am working with IronPython and have got it working somehow. Though, there seems to be no resource on passing command-line arguments to Iron Python. How can I pass command-line arguments to a python program from my C# code? setup = new ScriptRuntimeSetup(); setup.LanguageSetups.Add(IronPython.Hosting.Python.CreateLanguageSetup(null)); runtime = new ScriptRuntime(setup); runtime.IO.RedirectToConsole(); m_engine = runtime.GetEngine("IronPython"); m_scope = m_engine.CreateScope(); source = m