Q_Id
int64
2.93k
49.7M
CreationDate
stringlengths
23
23
Users Score
int64
-10
437
Other
int64
0
1
Python Basics and Environment
int64
0
1
System Administration and DevOps
int64
0
1
DISCREPANCY
int64
0
1
Tags
stringlengths
6
90
ERRORS
int64
0
1
A_Id
int64
2.98k
72.5M
API_CHANGE
int64
0
1
AnswerCount
int64
1
42
REVIEW
int64
0
1
is_accepted
bool
2 classes
Web Development
int64
0
1
GUI and Desktop Applications
int64
0
1
Answer
stringlengths
15
5.1k
Available Count
int64
1
17
Q_Score
int64
0
3.67k
Data Science and Machine Learning
int64
0
1
DOCUMENTATION
int64
0
1
Question
stringlengths
25
6.53k
Title
stringlengths
11
148
CONCEPTUAL
int64
0
1
Score
float64
-1
1.2
API_USAGE
int64
1
1
Database and SQL
int64
0
1
Networking and APIs
int64
0
1
ViewCount
int64
15
3.72M
47,334,254
2017-11-16T16:08:00.000
0
0
0
0
1
python-2.7,pyomo,coin-or-cbc
1
47,336,205
0
2
1
false
0
0
You could try to set the bound gap tolerance such that it will accept the other answer. I'm surprised that the solver status is coming back with error if there is a feasible solution found. Could you print out the whole results object?
1
0
1
0
I am trying to solve Optimisation problem with pyomo (Pyomo 5.3 (CPython 2.7.13 on Linux 3.10.0-514.26.2.el7.x86_64)) using CBC solver (Version: 2.9.8) and specifying a time limit in solver of 60 sec. The solver is getting a feasible solution (-1415.8392) but apparently not yet optimal (-1415.84) as you can see below. After time limit ends model seemingly exits with an error code. I want to print or get values of all variables of feasible solution using CBC in specified time limit. Or is there any other way by which I can set, if Model gets 99% value of an Optimal solution, to exit and print the feasible solution. The error code is posted below. Cbc0004I Integer solution of -1415.8392 found after 357760 iterations and 29278 nodes (47.87 seconds) Cbc0010I After 30000 nodes, 6350 on tree, -1415.8392 best solution, best possible -1415.84 (48.87 seconds) Cbc0010I After 31000 nodes, 6619 on tree, -1415.8392 best solution, best possible -1415.84 (50.73 seconds) Cbc0010I After 32000 nodes, 6984 on tree, -1415.8392 best solution, best possible -1415.84 (52.49 seconds) Cbc0010I After 33000 nodes, 7384 on tree, -1415.8392 best solution, best possible -1415.84 (54.31 seconds) Cbc0010I After 34000 nodes, 7419 on tree, -1415.8392 best solution, best possible -1415.84 (55.73 seconds) Cbc0010I After 35000 nodes, 7824 on tree, -1415.8392 best solution, best possible -1415.84 (57.37 seconds) Traceback (most recent call last): File "model_final.py", line 392, in solver.solve(model, timelimit = 60*1, tee=True) File "/home/aditya/0r/lib/python2.7/site-packages/pyomo/opt/base/solvers.py", line 655, in solve default_variable_value=self._default_variable_value) File "/home/aditya/0r/lib/python2.7/site-packages/pyomo/core/base/PyomoModel.py", line 242, in load_from % str(results.solver.status)) ValueError: Cannot load a SolverResults object with bad status: error When I run the model generated by pyomo manually using the same command-line parameters as pyomo /usr/bin/cbc -sec 60 -printingOptions all -import /tmp/tmpJK1ieR.pyomo.lp -import -stat=1 -solve -solu /tmp/tmpJK1ieR.pyomo.soln it seems to exit normally and also writes the solution as shown below. Cbc0010I After 35000 nodes, 7824 on tree, -1415.8392 best solution, best possible -1415.84 (57.06 seconds) Cbc0038I Full problem 205 rows 289 columns, reduced to 30 rows 52 columns Cbc0010I After 36000 nodes, 8250 on tree, -1415.8392 best solution, best possible -1415.84 (58.73 seconds) Cbc0020I Exiting on maximum time Cbc0005I Partial search - best objective -1415.8392 (best possible -1415.84), took 464553 iterations and 36788 nodes (60.11 seconds) Cbc0032I Strong branching done 15558 times (38451 iterations), fathomed 350 nodes and fixed 2076 variables Cbc0035I Maximum depth 203, 5019 variables fixed on reduced cost Cbc0038I Probing was tried 31933 times and created 138506 cuts of which 0 were active after adding rounds of cuts (4.431 seconds) Cbc0038I Gomory was tried 30898 times and created 99534 cuts of which 0 were active after adding rounds of cuts (4.855 seconds) Cbc0038I Knapsack was tried 30898 times and created 12926 cuts of which 0 were active after adding rounds of cuts (8.271 seconds) Cbc0038I Clique was tried 100 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds) Cbc0038I MixedIntegerRounding2 was tried 30898 times and created 13413 cuts of which 0 were active after adding rounds of cuts (3.652 seconds) Cbc0038I FlowCover was tried 100 times and created 4 cuts of which 0 were active after adding rounds of cuts (0.019 seconds) Cbc0038I TwoMirCuts was tried 30898 times and created 15292 cuts of which 0 were active after adding rounds of cuts (2.415 seconds) Cbc0038I Stored from first was tried 30898 times and created 15734 cuts of which 0 were active after adding rounds of cuts (0.000 seconds) Cbc0012I Integer solution of -1411.9992 found by Reduced search after 467825 iterations and 36838 nodes (60.12 seconds) Cbc0020I Exiting on maximum time Cbc0005I Partial search - best objective -1411.9992 (best possible -1415.4522), took 467825 iterations and 36838 nodes (60.12 seconds) Cbc0032I Strong branching done 476 times (1776 iterations), fathomed 1 nodes and fixed 18 variables Cbc0035I Maximum depth 21, 39 variables fixed on reduced cost Cuts at root node changed objective from -1484.12 to -1415.45 Probing was tried 133 times and created 894 cuts of which 32 were active after adding rounds of cuts (0.060 seconds) Gomory was tried 133 times and created 1642 cuts of which 0 were active after adding rounds of cuts (0.047 seconds) Knapsack was tried 133 times and created 224 cuts of which 0 were active after adding rounds of cuts (0.083 seconds) Clique was tried 100 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.001 seconds) MixedIntegerRounding2 was tried 133 times and created 163 cuts of which 0 were active after adding rounds of cuts (0.034 seconds) FlowCover was tried 100 times and created 5 cuts of which 0 were active after adding rounds of cuts (0.026 seconds) TwoMirCuts was tried 133 times and created 472 cuts of which 0 were active after adding rounds of cuts (0.021 seconds) ImplicationCuts was tried 25 times and created 41 cuts of which 0 were active after adding rounds of cuts (0.003 seconds) Result - Stopped on time limit Objective value: -1411.99922848 Lower bound: -1415.452 Gap: 0.00 Enumerated nodes: 36838 Total iterations: 467825 Time (CPU seconds): 60.13 Time (Wallclock seconds): 60.98 Total time (CPU seconds): 60.13 (Wallclock seconds): 61.01 The top few lines of the CBC solution file are: Stopped on time - objective value -1411.99922848 0 c_e_x1454_ 0 0 1 c_e_x1455_ 0 0 2 c_e_x1456_ 0 0 3 c_e_x1457_ 0 0 4 c_e_x1458_ 0 0 5 c_e_x1459_ 0 0 6 c_e_x1460_ 0 0 7 c_e_x1461_ 0 0 8 c_e_x1462_ 0 0 Can anyone tell me how can I get these values without generating any error? Thanks in advance.
Error reported while running pyomo optimization with cbc solver and using timelimit
1
0
1
0
0
1,241
47,337,197
2017-11-16T18:57:00.000
3
0
0
0
0
python-3.x,tkinter,tkinter-canvas
0
47,337,880
0
1
0
true
0
1
You can't pause the update of the canvas without pausing the entire GUI. A simple solution would be for you to not draw to the canvas until you're ready for the update. Instead of calling canvas commands, push those commands onto a queue. When you're ready to refresh the display, iterate over the commands and run them. You could also do your own double-buffering, where you have two canvases. The one you are actively drawing would be behind the visible one. When you are ready to display the results, swap the stacking order of the canvases.
1
0
0
0
I'm writing a graphics program in Python and I would like to know how to make a Canvas update only on-demand; that is, stop a canvas from updating every run of the event loop and instead update only when I tell it to. I want to do this because in my program I have a separate thread that reads graphics data from standard input to prevent blocking the event loop (given that there's no reliable, portable way to poll standard input in Python, and polling sucks anyway), but I want the screen to be updated only at intervals of a certain amount of time, not whenever the separate thread starts reading input.
How to make tkinter Canvas update only on-demand?
0
1.2
1
0
0
467
47,340,391
2017-11-16T22:45:00.000
2
1
0
0
0
python,praw
0
47,340,599
0
1
0
true
0
0
Didn't find it in the docs, but a friend who knows a bit of raw helped me out. Use for message in r.inbox.messages() (where r is an instance of reddit) to get the messages. Use message.text to get the content, and message.subject to get the title.
1
1
0
1
I'm creating a Reddit bot with praw, and I want to have the bot do things based on private messages sent to it. I searched the documentation for a bit, but couldn't find anything on reading private messages, only sending them. I want to get both the title and the content of the message. So how can I do this?
How to read private messages with PRAW?
0
1.2
1
0
1
527
47,346,321
2017-11-17T08:33:00.000
0
1
0
0
0
python,r,logistic-regression
0
59,307,014
0
2
0
false
0
0
Try the 'VGAM' package. There is a function called vglm. example: vglm(Var2~factor(Var1),cumulative(parallel = F),data) generalized order model cumulative(parallel=T) will perform a proportional odds model. parallel=F is the default.
1
3
1
0
I would like to fit a generalized ordered logit model to some data I have. I first tried to use the ordered logit model using the MASS package from R, but it seems that the proportional odds assumption is violated by the data. Indeed, not all independent variables do exert the same effect across all categories of the dependent variable. Hence I am a bit blocked. I say that I could use the generalized ordered logit model instead, but could not find how to use it. Indeed, I can not find any package on either R or python that coud help me on that. If someone has any hints on packages I could use, it would be of great help! Thank you very much!
generalized ordered logit in R or python
0
0
1
0
0
1,939
47,351,601
2017-11-17T13:20:00.000
1
0
0
0
0
python,r,stan
0
47,353,749
0
1
0
true
0
0
As far as I know, they are not any Python libraries that do what the brms and rstanarm R packages do, i.e. come with precompiled Stan models that allow users to draw from the predictive distribution in the high-level language. There are things like prophet and survivalstan but those are for a pretty niche set of models.
1
0
1
0
I'm trying to move from using stan in R (I've mainly used the brms package) to pystan, but having trouble locating any methods in pystan that will give me predictive posterior distributions for new data. In R, I've been using brms::posterior_linpred() to do this. Does anyone know if this is possible in pystan? If not, can it be bolted on without too much problem?
how to obtain predictive posteriors in pystan?
1
1.2
1
0
0
174
47,359,677
2017-11-17T21:38:00.000
1
1
1
0
1
python,python-3.x,cx-freeze
0
47,395,605
0
1
0
false
0
0
If you are using cx_Freeze 5.1, there was a bug that resulted in this error. It has been corrected in the source so if you checkout the latest source and compile it yourself it should work for you. If not, let me know!
1
1
0
0
When I run my compiled program (cx_Freeze) it says __init__line 31. no module named codecs. I have Python 3.6, does anybody know why it says that, and how to maybe fix it? I have seen the other questions here on StackOverflow, but they don't seem to solve the problem for me and possibly other too. Thanks in advance!
Python cx_Freeze __init__ "no module named codecs"
1
0.197375
1
0
0
541
47,362,271
2017-11-18T03:44:00.000
1
0
1
0
0
python,pip
0
47,368,605
1
1
0
true
0
0
As @metatoaster suggested, python setup.py develop reflects changes immediately in the environment, and makes the new functions available. I haven't tried @Paul H's suggestion which is pip install . -e. Thank you both for your comments, problem is solved.
1
3
0
0
I created and installed a python package by doing the following: coding a bunch of functions in an init.py file and run 'python setup.py install dist' to create a tar.gz, which was installed through pip. Everything works well and I can import the package and the functions. I decided to add a new function in the init file, and redid the whole procedure described above to reinstall (or update) my package. The new function added doesn't seem to be available when importing the package, even after update. Any ideas on how to update my package?
Python: upgrade my own package
0
1.2
1
0
0
931
47,370,367
2017-11-18T19:52:00.000
1
0
1
0
0
python,django,pip,virtualenv
0
47,370,397
0
1
0
false
1
0
You can't tell pip where to install packages. There's a standard place for packages, and that's where it installs them. pip makes sure it installs utilities (such as django-admin) in the path, so when the virtual environment is activated you can run it.
1
1
0
0
I am new to python/django/pip. I created a virtualenv and I was in the bin dir when I did a pip install django. It created the django files there which is not what I wanted. So I did pip uninstall django. Then I created a folder called web in my virtualenv root and tried pip install again. This time it said loading from cache and installed django in bin folder again. So I deleted it and tried again with --no-cache-dir. This downloaded django fresh, but I am still finding the installation in bin directory! This is driving me crazy, how can I get it to install in the web directory? Any help much appreciated.
Django not installing in folder where I want
0
0.197375
1
0
0
801
47,373,656
2017-11-19T04:22:00.000
0
0
0
0
0
python,sql,django
0
47,373,721
0
3
0
false
1
0
The answer is django celery. Its for any tasks which need to be run with a condition. Look at the beats functionality for your use in celery
2
0
0
0
I'm making an elimination style voting website. People log in, vote for their least favorite participant, and at the end of the day the person with the most votes goes inactive. Almost everything works: The log in, the voting, etc. But I have no idea how to make a program that checks for the most votes and alters the database to change the status of a participant at a particular time without needing a user to enter the website. I don't even know where to put the code. And how would I make sure it's constantly running? The way I see it, views.py only works when a user goes to the URL, so if no one visited the website at the time of vote recopilation it wouldn't work, so that's a no no. I could make a script outside of the Django project that does this, and then run it with nohup &, but then I'd lose on the model notation and would have to make manual queries, plus I'm sure there's a better, more Django way to do this. Any solutions to this problem? Or maybe some direction you can point me in?
How to make a code that alters database in background Django
1
0
1
0
0
41
47,373,656
2017-11-19T04:22:00.000
1
0
0
0
0
python,sql,django
0
47,373,793
0
3
0
false
1
0
If your scenario is just to update the database based on the number of votes, you can straight away go for cron. Write a script that checks for the votes and changes the status of the user in the database. Schedule it in cron to run it once at the end of the day / poll. Place the script in a directory that is not reachable by outsiders. cron entry for a script to run once a day at 23:30 hrs: 30 23 * * * python /root/scripts/status_change_script.py
2
0
0
0
I'm making an elimination style voting website. People log in, vote for their least favorite participant, and at the end of the day the person with the most votes goes inactive. Almost everything works: The log in, the voting, etc. But I have no idea how to make a program that checks for the most votes and alters the database to change the status of a participant at a particular time without needing a user to enter the website. I don't even know where to put the code. And how would I make sure it's constantly running? The way I see it, views.py only works when a user goes to the URL, so if no one visited the website at the time of vote recopilation it wouldn't work, so that's a no no. I could make a script outside of the Django project that does this, and then run it with nohup &, but then I'd lose on the model notation and would have to make manual queries, plus I'm sure there's a better, more Django way to do this. Any solutions to this problem? Or maybe some direction you can point me in?
How to make a code that alters database in background Django
1
0.066568
1
0
0
41
47,383,691
2017-11-20T00:55:00.000
1
0
1
0
0
python,python-2.7,math
0
47,383,747
0
1
0
true
0
0
I didn't need to make my integer a symbol. The code above works.
1
2
0
0
I know you can probably do a limit of a mathematical operation, say the limit of n + 1 as n approaches infinity, but can I do the limit of a function? For instances the limit of dividing to Fibonacci numbers as their index (and value) gets greater, approaching infinity? For example lim(func, start, approach) I have looked at sympy, and it is either not possible or I don't know how to pass a symbol argument as an integer. Eg: iters = Symbol("iters") print limit(main(iters),iters,0)
Do A Limit on the Output of a Function in Python
0
1.2
1
0
0
148
47,418,025
2017-11-21T16:30:00.000
2
1
0
1
0
bash,python-3.x,raspberry-pi,raspbian
0
47,431,418
0
2
0
true
0
0
For udisks --detach the parameter should be the device, not the mounting point. For example, if the USB Disk is /dev/sdb the command would be udisks --detach /dev/sdb If the command still doesn't work you could try udiskctl power-off -b <device> which should also work.
1
2
0
0
So I'm trying to get a working code in Python that will eject/unmount all USB flash drives attached to the Pi (Running Raspbian) - so that they can be removed safely. The final code will be run from within the python program. Additionally, I'd like to eject/unmount the USB flash drive even if it's in use. I've looked around and can't see how to do this. Thanks. udisks --detach /media/pi/DOCS/ - 'Blocked device... Resource temporarily available'... udisks --detach /media/pi/ - 'Blocked device...Resource temporarily available'... udisks --detach /media/ - 'Blocked device...Resource temporarily available'... sudo udisks --detach /media/pi/DOCS/ - still blocked... sudo umount /path/to/devicename - command not found... eject /media/pi/DOCS/ - Unable to open '/dev/sda' (DOCS is the name if my USB flash drive. - though I want to eject all USB flash drives - not just my one) So I'm going to ask the user in Python to select their USB flash drive from a list, which is pretty easy (just read in the folder) - so I will have the pathway to the USB. I'm still not sure which code can safely disconnect the USB flash drive - Maybe more research is the answer. Thanks for your help so far.
Ejecting/unmounting random USB flash drive in Raspberry pi / Python
0
1.2
1
0
0
6,438
47,422,506
2017-11-21T20:52:00.000
0
0
1
1
0
python,python-3.x,file,io
0
47,422,562
0
2
0
false
0
0
One reason shell scripts do this is that a shell variable cannot contain arbitrary binary data (namely, null bytes). Python variables have no such limitations; just store the data in a variable.
1
0
0
0
I am not sure what it is called. I have seen a installer program have stored data at the end of the installer script, looked like just a mess of random text, which then got turn into a seperate file upon running the installer. There was some comand that said something like line xxx -> end | file.txt. Im so sorry if this makes no sense but if anyone knows what I am looking for id like to do the same thing in a python script. directions to a resource or an explination on how to do it here would be great thanks.
Store a file insde python file
0
0
1
0
0
41
47,449,444
2017-11-23T07:04:00.000
0
0
0
0
0
python,flask,single-sign-on,flask-login,flask-oauthlib
0
47,532,413
0
1
0
false
1
0
So, I've spent some time thinking about this (as I want to do it for my own website), and I've come up with a theoretical solution. From what I understand in my implementation of Google's OAuth API, OAuth is about sending the user on a link to the server that hosts the OAuth keys, and then returning back to the sender. So, my idea is that in the login form, you have buttons that act as links to the OAuth client. I haven't tested this, but since no one else has replied to this I figure this will give you a nice little project to implement yourself and let us know if it works.
1
1
0
0
For now, I'm trying to use flask-oauthlib with flask-login together. flask-oauthlib provides a simple way to use oauth, but I want a login manager to automatically redirect all users who are not logged in to /login. In flask-login, I can use login_required to accomplish this. But how could I achieve this by flask-oauthlib? Further, how to manage session when using flask-oauthlib? I understand how SSO works, but I'm confusing how could I know if this token is expired or not?
How to use flask-oauthlib with flask-login together?
0
0
1
0
1
504
47,454,016
2017-11-23T11:06:00.000
0
0
0
1
1
windows,python-3.x,variables,cmd,path
0
47,454,887
0
1
0
true
0
0
OK! I figured out the issue - The python36 folder was not placed in the C: location. Now I've corrected it and it's working for me! Thanks!
1
0
0
0
I'm wondering how I could run python3 by default when I type python in windows CMD? This is not a duplicated question because I've added the C:\Python36 to the path variables, so when I type py in CMD, it gives me python 3.6.2, while if I type py2, then it gives me python 2.7.11. Since now I need to run python script.py through another application, then I can't really change the command to be py script.py, so my question is how could I run python 3 if using the command python script.py? I've tried to place the python3 preceeding python2 like C:\Python36;C:\Python27 in the variables, but when I type python, CMD still shows python 2.7.11...I'm confused about why it didn't work.. Thank you very much in advance!
How to run Python 3 when I type "python" in windows CMD
0
1.2
1
0
0
100
47,454,686
2017-11-23T11:41:00.000
0
0
0
0
0
django,python-3.x,postgresql,mqtt,thingsboard
0
47,798,648
0
2
0
true
1
0
ThingsBoard has APIs which you can use. You may also customise it based on your requirements.
1
0
0
0
I am using the Python3, Django and database as Postgresql, and I wanted to use the Thingsboard dashboard in my web application. can anyone pls guide me how can I use this
I am using the python django, and i wanted to know to get use thingsboard dashboard, and database as postgresql
0
1.2
1
1
0
304
47,466,390
2017-11-24T04:30:00.000
1
0
1
0
1
python,python-3.x,jinja2
0
47,466,422
0
1
0
true
1
0
If you mean to just iterate through the string, you can explicitly make the array in python and pass it into jinja. Try to minimise logic in jinja as much as possible.
1
0
0
0
I need to convert a string acbdefrg into an array of individual letters [a,b,c,d,e,f,r,g]. I understand how it's done in python through list(your_string). Hoever this code does not work in jinja2. Is this possible, or will I have to make the array in python and pass it over to jinja?
Split string into individual charactor array in jinja2
1
1.2
1
0
0
375
47,469,591
2017-11-24T08:56:00.000
0
0
0
0
0
python,open-source
0
47,469,592
0
1
0
false
0
0
in animation tab try a right click on model and under "roving type" select "response roved".
1
0
1
0
I am asking this for mgx4: I imported a .uff file containing FRF from Experimental Modal Analysis (EMA). I generated the mesh (geometry) of the tested structure with lines and triangle surfaces. I succeed to realize the analysis and extract eigen frequencies and modal damping. What I am still unable to do is to animate the geometry according to eigen shapes as a function of eigen frequencies. When I am on the tab "Measurement" on the tab menu "ANIMATION" and I put the frequency cursor on one peak of the FRF and I click on "Play", I can just see one node moving. I would like to observe all the nodes moving in order to identify the eigen shape of the mode observed. Do you please have an idea on how to do that? Thank you for your help!
Animating modes in openmodal: roving type
0
0
1
0
0
45
47,491,757
2017-11-26T00:07:00.000
0
0
0
0
0
wxpython
0
47,568,957
0
1
0
false
0
1
You probably mean TextCtrl, don't you? You can use a validator, there is an example in the wxPython demo, which is a part of the Docs and Demo package.
1
0
0
0
I have an issue with StaticText, and I do not know how to make it accept only the following data = '0123456789.' . Of course, when you type any letter, the letter is automatically deleted. Can you help me please
wxpython make StaticText limit
0
0
1
0
0
35
47,495,285
2017-11-26T10:48:00.000
9
0
0
0
0
python,tkinter,size,pixels
0
47,622,396
0
2
0
false
0
1
Ok, I figured it out. We must call widget.update() first before calling widget.winfo_height().
1
1
0
0
If I define for example tkinter.Button widget with parameters (width=10, height=1)(in characters) and then I want to retrieve it's size in pixels, how do I do it? EDIT: I tried widget.winfo_height() and widget.geometry(), but all these functions return height defined in number of characters. I think it would be possible to create the same widget in a frame and then write frame.winfo_height() which would return size in pixels, but this is not so elegant solution.
Get tkinter widget size in pixels
1
1
1
0
0
5,427
47,510,030
2017-11-27T11:34:00.000
1
0
0
0
0
android,python,kivy,android-permissions,pyjnius
0
63,417,403
0
4
0
false
0
1
i know this answer is a little late, but to get permissions you have to specify them before the build. E.g buildozer uses a buildozer.spec. In this file you can specify the permissions you need.
2
4
0
0
I found that kivy is very nice framework to build cross platform application and I am very interested in kivy just to do android application as I think is easy and comfortable in kivy. After trying few examples, I am interested to know how should handle android run time permission for the kivy app. Actually I had searched on google, but no single working example out there. Should I go back to android / java or it possible with kivy and some other python libs.
How to handle android runtime permission with kivy
1
0.049958
1
0
0
7,102
47,510,030
2017-11-27T11:34:00.000
1
0
0
0
0
android,python,kivy,android-permissions,pyjnius
0
47,522,452
0
4
0
false
0
1
python-for-android doesn't have any code for handling runtime permissions. I expect to look at it sooner rather than later, but there's no ETA for it. You can probably add the code for it yourself if you're interested and know how. If you'd like to try it, such contributions would be very welcome.
2
4
0
0
I found that kivy is very nice framework to build cross platform application and I am very interested in kivy just to do android application as I think is easy and comfortable in kivy. After trying few examples, I am interested to know how should handle android run time permission for the kivy app. Actually I had searched on google, but no single working example out there. Should I go back to android / java or it possible with kivy and some other python libs.
How to handle android runtime permission with kivy
1
0.049958
1
0
0
7,102
47,512,599
2017-11-27T13:53:00.000
1
0
1
0
0
python,python-3.x,python-2.7,pycharm
0
47,514,912
0
2
0
false
0
0
Go to File > Settings > Project > Project Interpreter (it should take you there automatically as soon as you open Settings) and select the version you want to use from the drop-menu. If it is not there, try restarting PyCharm (if it was active whilst the Python 3 installation) - else, it probably means you didn't install Python 3 properly.
1
2
0
0
I'm a complete newbie trying to use pycharm with python but my interpretor shows a version of 2.7 when i have installed 3.6. Totally confused and need help! On pycharm I do the following steps: Preferences > Python Console > Python Interpretor I only see Python 2.7.8 (/Library/Framework/....) and beneath this I see options beginning with (/Library/Framework.... ) <-- some of these end in bin/python3.6 I am not sure how to configure Pycharm to use the new version of Python. Being a complete newbie I am really confused as to what to do? and whether changing this makes any difference. Any help would be much appreciated. Thanks!
Pycharm shows interpretor version of 2.7 but I have downloaded 3.6?
0
0.099668
1
0
0
3,512
47,525,351
2017-11-28T06:36:00.000
2
0
0
0
0
python,session,flask,flask-login
0
47,525,555
0
1
0
false
1
0
One way for ensuring this would be by generating a session id from server. You would need to generate a unique session id every time a user logs in and store it in some database against that user. Apart from this you would need to authenticate user every time an endpoint call, which requires user to be logged in, is made. And of course discard the session id on logout. This way whenever a user logs in the old session id is discarded and the previous session no more remains valid.
1
0
0
0
how to make ensure one active session per one user using python flask? Description: if one user logged in two different machines with same credentials I want mechanism to force logout earlier active sessions of that user with flask and python. Please help me out in this. I am currently using flask-login, load_user() and login_manager libraries for login mechanism.
how to make ensure one active session per one user using python flask?
0
0.379949
1
0
0
821
47,530,337
2017-11-28T11:22:00.000
1
1
0
0
0
python-pptx
0
47,537,303
0
1
0
false
0
0
The hierarchy governing the inheritance of font style is knowledge that belongs to the ill-documented black arts of PowerPoint. I don't know of a place where it's clearly described. If I needed to learn it, I would start with a Google search on "powerpoint style hierarchy" to gather candidate participants and then settle in for a long period of experimentation. The candidates I can think of are, roughly in order of precedence: formatting directly applied at the run level default run formatting applied at the paragraph level (this doesn't always take effect) formatting inherited from a placeholder, if the shape was originally a placeholder. A theme related to the slide, its slide layout, or its slide master. A table style Presentation-default formatting. I would devote a generous period to getting anything I could from Google, form a set of hypotheses, then set up experiments to prove or disprove those hypotheses. Note the challenge is made more complex by the conditions involved, such as "is in a table" and "is a placeholder", etc.
1
3
0
1
[text element].font.size returns None if the element has inherited its size from a parent text style. The documentation refers to a style hierarchy but doesn't appear to include documentation about it. Does anyone know how you traverse this hierarchy to determine the actual size of a font element if it has inherited its size from somewhere else?
python-pptx font size from hierarchy / template / master
0
0.197375
1
0
0
322
47,535,356
2017-11-28T15:36:00.000
0
0
1
0
0
python,html,json,node.js,firebase-realtime-database
0
47,537,413
0
1
0
true
1
0
You have to create some sort of communication channel between the javascript and python code. This could be anything, SOAP, HTTP, RPC, any number of and flavor of message queue. If nothing like that is in place, it's quite the long way around. A complex application might warrant you doing this, think micro services communicating across some sort of service bus. It's a sound strategy and perhaps that's why your client is asking for it. You already have Firebase, though! Firebase is a real-time database that already has many of the characteristics of a queue. The simplest and most idiomatic thing to do would be to let the python code be notified of changes by Firebase: Firebase as service bus is a nice strategy too!
1
0
0
1
I have JS running and essentially getting user entries from my HTML session storage and pushing these to a DB. I also need to use a HTTP request to pass a json object containing the entries to a python file hosted somewhere else. Does anyone have any idea of documentation I could look at, or perhaps how to get JSON objects from JS to Python. My client does not want me to grab the variables directly from the DB.
How do you pass variables using a HTTP post from a JS file/function to a separate python file/function hosted somewhere else?
0
1.2
1
0
1
37
47,572,918
2017-11-30T11:54:00.000
1
0
0
0
0
python,python-3.x,python-requests,zip
0
47,573,727
0
1
0
false
1
0
Is there a way to avoid downloading the zips and directly accessing the files inside? Generally speaking : no. A web server serves files in a file system, not in a zip archive. If I do need to download them, how can I track where the zips have been downloaded to? (So I can extract the .xlsx) If not specified, the location is the current directory, the one the script has been launched in.
1
0
0
0
I have an HTML web page with many download links in a table. I have isolated the path to my desired zips. They all contain an .xlsx file but sometimes other files. Is there a way to avoid downloading the zips and directly accessing the files inside? If I do need to download them, how can I track where the zips have been downloaded to? (So I can extract the .xlsx) I am currently looking into zipfile and requests for solutions. zipfile.extract needs the path of the zip file, but I don't know exactly where the script will download to. requests gives a response object, but how do I prompt it to download?
unzipping an html link with python
0
0.197375
1
0
1
35
47,585,666
2017-12-01T02:13:00.000
0
0
0
0
1
python,opencv,heroku,cascade-classifier
0
47,585,710
0
2
0
false
0
0
I figured it out. All I needed to do was use the os.path.abspath() method to convert the relative path to an absolute path
1
0
1
0
I am loading a cascade classifier from a file in OpenCV using python. Since the CascadeClassifier() method requires the filename to be the absolute filename, I have to load the absolute filename. However, I am deploying and using it on Heroku and I can't seem to get the absolute path of the file. I've tried using os.getcwd() + '\cascader_file.xml', but that still does not work. I would like to know how to load the classifier on the Heroku deployment
Load classifier on Heroku Python
0
0
1
0
0
174
47,590,564
2017-12-01T09:43:00.000
0
1
1
0
0
python,debugging,pycharm,pytest
0
47,594,318
0
1
0
false
0
0
A few things that might help you with debugging speed are: using Python 3.5/3.6. If you're running in linux/macos install the cython extension (you get prompted) Use the latest Pycharm, 2017.3 at this moment. Try to simplify tests. If not possible, just run those you need for the debugging process by creating a special runner in Pycharm and using the -k 'pattern' argument for pytest. Moreover, I don't understand why you're invoking pdb if you're using the Pycharm debugger.
1
0
0
0
I have a series of tests that are quite complicated. Unfortunately, the builtin Pycharm Debugger is waaay too slow to handle them. I tried making it faster, but any attempts failed, so I have to resort to using pdb. My problem is that the command line that appears if I run my tests with pycharm and come across a pdb breakpoint is quite annoying: It does not support code completion (of course I googled it, but my attempts failed). I can't even press 'up' to get the last command again Most annoyingly: When I already wrote some code in the command line and jump to the beginning of the line to edit it, the cursor automatically jumps to the end of the line. I noticed that it is not the iPython console which I get when I go into pdb debug mode when I don't use pytest. Do you have any idea on how to solve any of these issues? Ideally on how to speed up the Pycharm debugger, or how to get the iPython console also in pytest? Help is much appreciated. Thanks in advance.
Debugging pytests in Pycharm with pdb shows annoying console
0
0
1
0
0
560
47,602,151
2017-12-01T22:07:00.000
2
0
1
0
0
python,visual-studio,terminal
0
49,505,028
0
4
0
false
0
0
At the bottom of the MS Code screen is an info bar that lets you know what line, col, text encoding, etc... It also shows the python interpreter you are accessing. If you click on the text for the version of python that is running, it will open a list of available interpreters on your system. If 2.7 is in your path, you can select it.
1
6
0
0
I have installed on my system several Python interpreters, 2.x and 3.x versions. I am trying to prepare my work environment to allow easily switch between code written in both Python version. It is really important to have as much flexible setting in Visual Studio Code (VSC). The problem is that I have no idea how to set VSC terminal to run code in Python 2.x. Terminal output is needed because it allows to provide user input easily. I've tried instructions provided on VSC page, like manual interpreter's path indication in folder or workspace setting. I reinstalled Python 2.x to ensure PATH variable has been updated. When I run code with CodeRunner extension, it always run it in Python 3.x. Does anyone have similar issue and found how to change Python environment used by this integrated terminal?
How to change interpreter in Visual Studio Code?
0
0.099668
1
0
0
18,249
47,604,678
2017-12-02T04:44:00.000
1
0
0
0
0
python,pygame
0
47,604,704
0
1
0
true
0
1
In order to have the box removed you need to call a ~destructor function on it, which would remove the image of the box and so on correct? Take advantage of that and create a function that chooses which item to spawn (could be random, up to you) in the position where the box used to be. Then call this function at the end of the destructor. That's how imagine it working.
1
0
0
0
I'm making a game using Pygame where there are random obstacles on the screen (like boxes). The boxes can be removed by the player when they place a bomb next to it. I have some items that I would like to have randomly appear in place of the box if it is removed. I'm not sure how to go about this logically. Does anyone have any tips? No code is necessary (but helpful), I just want some steps logic-wise to get me started.
Making items appear from obstacles in game?
1
1.2
1
0
0
30
47,606,161
2017-12-02T08:53:00.000
0
0
0
0
1
python-3.x,tensorflow,darkflow
1
47,685,678
0
2
0
false
0
0
Problem solved. Changing batch size and image size in config file didn't seem to help as they didn't load correctly. I had to go to defaults.py file and change them up there to lower, to make it possible for my GPU to calculate the steps.
2
1
1
0
I've used YOLO detection with trained model using my GPU - Nvidia 1060 3Gb, and everything worked fine. Now I am trying to generate my own model, with param --gpu 1.0. Tensorflow can see my gpu, as I can read at start those communicates: "name: GeForce GTX 1060 major: 6 minor: 1 memoryClockRate(GHz): 1.6705" "totalMemory: 3.00GiB freeMemory: 2.43GiB" Anyway, later on, when program loads data, and is trying to start learning i got following error: "failed to allocate 832.51M (872952320 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY" I've checked if it tries to use my other gpu (Intel 630) , but it doesn't. As i run the train process without "--gpu" mode option, it works fine, but slowly. ( I've tried also --gpu 0.8, 0.4 ect.) Any idea how to fix it?
YOLO - tensorflow works on cpu but not on gpu
0
0
1
0
0
1,053
47,606,161
2017-12-02T08:53:00.000
0
0
0
0
1
python-3.x,tensorflow,darkflow
1
50,273,011
0
2
0
false
0
0
Look like your custom model use to much memory and the graphic card cannot support it. You only need to use the --batch option to control the size of memory.
2
1
1
0
I've used YOLO detection with trained model using my GPU - Nvidia 1060 3Gb, and everything worked fine. Now I am trying to generate my own model, with param --gpu 1.0. Tensorflow can see my gpu, as I can read at start those communicates: "name: GeForce GTX 1060 major: 6 minor: 1 memoryClockRate(GHz): 1.6705" "totalMemory: 3.00GiB freeMemory: 2.43GiB" Anyway, later on, when program loads data, and is trying to start learning i got following error: "failed to allocate 832.51M (872952320 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY" I've checked if it tries to use my other gpu (Intel 630) , but it doesn't. As i run the train process without "--gpu" mode option, it works fine, but slowly. ( I've tried also --gpu 0.8, 0.4 ect.) Any idea how to fix it?
YOLO - tensorflow works on cpu but not on gpu
0
0
1
0
0
1,053
47,621,228
2017-12-03T17:40:00.000
0
0
0
0
0
python,django,django-models
0
47,622,247
0
1
0
true
1
0
There's a simple difference. Model methods act on a single instance. Manager methods create queries to act on multiple instances.
1
0
0
0
when should I write methods in the model itself and when in the model manager? is it like all methods to get something should be written in manager and others in model
when should I write custom methods in model vs model manager/ queryset
0
1.2
1
0
0
120
47,631,328
2017-12-04T10:32:00.000
0
0
0
0
0
python,view,dns,bind,dnspython
0
47,667,697
0
1
0
false
1
0
Finally, this problem has been solved by changing the match-clients dynamically through ssh and then rndc reload. This make the remote server only access to the specific view in which you want to update the zone using dnspython.
1
0
0
0
Just like the title. I was struggling to work with that, but I couldn't find any way to make that work. Is there anyone know how to do that. Please help, thanks!
Is there any way to update zone in specific views using dnspython?
0
0
1
0
0
83
47,656,709
2017-12-05T15:03:00.000
0
1
0
0
0
python,email,organizer,exchangelib
0
47,670,437
0
1
0
true
0
0
The meeting organizer is available on CalendarItem objects as item.organizer.
1
1
0
0
I'm currently using the exchangelib library in python. I would like to compare the mail of the account connected to exchangelib and the mail of a meeting organizer. I can have the account mail by typing "account.primary_smtp_address" but I don't know how I could get the meeting organizer mail. For now i can only get the organizer's name by typing "item.subject" where "item" is my meeting. Conversely, is it possible to get the account's name (the complete name: "Michael JORDAN" for example) which I could compare with the meeting organizer's name. Thank you !
Exchangelib - Get meeting organizer mail
0
1.2
1
0
0
134
47,665,047
2017-12-06T00:45:00.000
0
0
1
0
0
python,configuration,visual-studio-code
0
47,665,163
0
1
0
false
0
0
Open launch.json (gear icon when on debugger tab). Find the section for the python debugger you are using. Change "stopOnEntry" from true to false. Save.
1
0
0
0
When I open a python file without a workspace and start debugging it, the debugger breaks on the first line. I would like to change this behaviour, but I don't know how to do it for files that are opened without a workspace.
How to disable stopOnEntry for files that are opened without a workspace?
0
0
1
0
0
32
47,671,023
2017-12-06T09:37:00.000
-1
0
1
0
0
python,project,executable,pyinstaller
0
53,550,927
0
3
0
false
0
0
1) Open the command prompt 2) Install pyinstaller Pip install pyinstaller 3) Test your python script first just to check python script should work with normal .py extension. Saurabh is the name of python file python saurabh.py 4) Convert the python into executable file pyinstaller --onefile Saurabh.py Notice we have passed “–onefile” as a argument which tell pyinstaller to create only one file 5) Go to directory and navigate to the dist folder. Prerequisite : Install PyQt5 to avoid error. pip install PyQt5
2
3
0
0
I have a Python project that I want to convert into an executable. I have installed Pyinstaller. I only know how to convert one single script into .exe, but I have multiple packages with multiple python scripts.
How to convert Python project into executable
0
-0.066568
1
0
0
3,628
47,671,023
2017-12-06T09:37:00.000
-1
0
1
0
0
python,project,executable,pyinstaller
0
47,671,205
0
3
0
false
0
0
Converting the main script into .exe should solve the problem, use -onefile to convert it to one exe and rest of the .py files should be included.
2
3
0
0
I have a Python project that I want to convert into an executable. I have installed Pyinstaller. I only know how to convert one single script into .exe, but I have multiple packages with multiple python scripts.
How to convert Python project into executable
0
-0.066568
1
0
0
3,628
47,709,408
2017-12-08T07:09:00.000
0
0
0
1
0
html,linux,python-3.x,web,terminal
0
47,709,772
0
1
0
false
1
0
A quick solution I would do (without any libraries or stuff): invoke your CLI program and set it up to continuously output to a file on the server. Make sure you know the file name. use Ajax calls to fetch the output to the client. OR (if you are in for hard stuff) use a webSocket to output to the client.
1
1
0
0
I am trying to create a web application using python which has a HTML form and the form data is used as a command line input to start an application. I know how to initiate the CLI tool from web app, but want a way to get the output of the CLI tool from Linux terminal real time and show it in the web application. The CLI tool will run for a day and the terminal output will change in real time. Is there a way to display the changing Linux terminal output in to the web application. Information about any web terminal or way to get and store the real-time screen output of a linux application will be helpful. When ever the screen O/P of the application running in linux changes then the web application should also be updated with the change. Any python lib or tools will be useful and easy to Integrate?
Getting a Linux terminal output of a CLI tool and displaying in Web page
0
0
1
0
0
515
47,709,687
2017-12-08T07:30:00.000
0
0
1
0
1
python,regex
1
47,709,796
0
1
0
false
0
0
You could just capture all Chinese characters between quotes, capture any comment start ´--´ indicators, and then throw away all the matches after that indicator.
1
2
0
0
I want to match any Chinese character in "", but not in the comment of Lua, i.e: after --. For example, in string Tips("中文") -- "注释",中文 should be matched, but not 注释. The regex I write is ur'(?<!--.*?)"([\u4e00-\u9fff]+)"',but Python gives an error: look-behind requires fixed-width pattern. So how to fix this?
Regex in Python. How to match a string but not in comments?
0
0
1
0
0
70
47,720,160
2017-12-08T18:23:00.000
0
1
0
1
0
php,python,linux,webserver,file-permissions
0
47,720,634
0
1
0
true
1
0
As suggested by @wpercy you have figure out which user is executing the file. Usually that user is called www-data ! To find out which user is calling the service use ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1 After you figured out the user you have to change the permission for the folder. That command schould be something like chown -R www-data:www-data /var/www/html/Projectfolder Special thanks to wpercy!
1
0
0
0
I'm currently working on a project, which will dynamically fetch some informations of my job and display them in a html page. To accomplish this i wrote a python script, which will be invoked using a PHP webservice. The script needs to edit some files in order to work. Basically PHP executes the script using $output = shell_exec('python script.py'); The problem is, that if the webservice is called, the script does not have the needed permissions to edit the files. So the webserver should call the script using something like $output = shell_exec('sudo python script.py'); I may need to change the permissions to the project folder but i don't know how. Some additional informations: I'm using a raspberry pi 3 with LAMP installation on raspian as webserver The folder structure is the following: projectfolder | - style (containing css) -script.py -script2.py -filetoedit1.txt -filetoedit2.html Any help is appreciated!
Linux editing privilege over webservice
0
1.2
1
0
0
25
47,751,125
2017-12-11T10:43:00.000
7
0
1
1
0
python,macos,terminal
0
47,751,976
0
2
0
true
0
0
Just type python3 where you would have typed python. For example open repl type python3 run app.py program with python3.6 type python3 app.py
2
2
0
0
When I run python someCode.py in my terminal, I am actually using python 2.7 I have installed python 3.6 on my Mac and would like to use it in terminal. how can I do that?
How do I use python 3 on terminal Mac
0
1.2
1
0
0
15,774
47,751,125
2017-12-11T10:43:00.000
1
0
1
1
0
python,macos,terminal
0
54,866,894
0
2
0
false
0
0
type python3 on command window/ terminal window & press enter for exit from python type quit() & press enter
2
2
0
0
When I run python someCode.py in my terminal, I am actually using python 2.7 I have installed python 3.6 on my Mac and would like to use it in terminal. how can I do that?
How do I use python 3 on terminal Mac
0
0.099668
1
0
0
15,774
47,757,753
2017-12-11T17:00:00.000
1
0
1
0
0
python,jupyter
0
49,182,635
0
1
0
true
0
0
Grammarly was the cause of this. If you use jupyter notebooks and have the grammarly extension. It will cause problems.
1
0
1
0
I don't know how this happens or why, but I'll be in a jupyter notebook grouping by things and I will very conciously type in dataframe.groupby, write some other code and hit ctrl+ enter and there will be that damn error. Every single time, I will go back and delete the 'groupyouby' and type in groupby. I doubt that anyone has run into this error,and I don't know how long it will be until someone else creates the mess of libraries that I have that resulted in this chinese water tourture like nightmare. I am here, to let you know, that you are not alone. Also if someone has a fix that would be great. I got nothing for you other than that description above.
Jupyternotebook corrects groupby to groupyouby Python
0
1.2
1
0
0
39
47,758,329
2017-12-11T17:36:00.000
1
1
0
0
0
python,automated-tests,aws-lambda
0
47,763,008
0
1
0
false
0
0
When it comes to unit testing, there's nothing special you have to do about AWS Lambda projects. You Lambda handler is a Python function. Therefore, you can import it on your tests, call it with some input, and assert the output. Just like a normal Python function.
1
1
0
0
I have implemented a lambda project which has 4 modules/project inside it. Each module/project has python(s) files which implement module functionality. I have to write the test cases for each module so that it goes through CircleCI and execute on themselves: That the module is starting and stopping a stepfunction. module is calling Rest service. It is writing/reading files from S3 Bucket. Everywhere, it is like a test driven development to write unit test, but now I have completed project implementation, how do I write automated test cases for my module ?
How do I write test cases for my AWS Python-based lambda project?
0
0.197375
1
0
0
1,070
47,764,837
2017-12-12T03:19:00.000
0
1
0
1
0
python,shell,cron,scheduled-tasks,aix
0
47,767,204
0
2
0
false
0
0
One way I can think of is to write a daemon (another script perhaps) and keep checking the file for changes. It is possible to write a script with infinite loop and the loop can contain the file check logic.
1
0
0
0
I am trying to monitor a file and if there is a change file I need to execute a script but the catch is cron job is not allowed, also this will be executed on AIX system. Can somebody help me here on how to proceed.Thank You
how to monitor changes in file without cron job in AIX
0
0
1
0
0
73
47,774,073
2017-12-12T13:39:00.000
3
0
0
1
0
java,python,grails,jenkins
0
47,774,670
0
1
0
true
0
0
Just dir no ${workspace} bat 'dir' in a pipeline script. Select a "execute batch command" option and write the commands you want to execute in there. Then check the console output of the build which was successful.
1
3
0
0
I have created a workspace and clone all files in to that. Now, I'm running my code through jenkins. Can anyone assist how to display all the files in my workspace through any command. I tried with ${workspace} dir in Jenkins but it is showing any output. Basically, if you are at any folder in your system and you open cmd and exceute dir in windows, it will display all the files in it. The same thing I want to see in Jenkins for windows. Thanks.
Jenkins command to display all file in directory?
0
1.2
1
0
0
2,946
47,787,413
2017-12-13T07:11:00.000
0
0
1
0
1
python,pycharm
0
47,787,770
0
1
0
true
0
0
On pycharm go to File > Settings > project interpreter.. Under this add your env as an interpreter.
1
0
0
0
I tried import apiai on pycharm, but it didn't work so I ran pip install apiai then freezed to the requirements.txt it still didn't work on pycharm. I went and tested my code in the prompt after i ran it in the env environment and it worked just fine. My question is how can i make it work on pycharm too ?
I am unable to import apiai on pycharm?
0
1.2
1
0
0
101
47,794,365
2017-12-13T13:37:00.000
0
0
0
0
0
python,opencv,graphics,computer-vision
0
47,808,839
0
1
0
false
0
0
If the camera motion is approximately a rotation about its optical center / lens entrance pupil (for example, pan-tilt-roll on a tripod with the subject distance much larger than the translation of the optical center), then images taken from rotated viewpoints are related by a homography. If you know the 3D rotation (pan/tilt/roll), then you can explicitly compute the homography and apply it to the image. If not, but you have two images upon which you can identify 4 corresponding points or more, then you can estimate the homography directly from those correspondences.
1
1
1
0
I am performing some perspective transforms on camera images, however in certain cases the roll and pitch of the camera are not zero. In other words, the camera is not level and I would like to be able to correct for this. I have some questions: 1) Can the transformation matrix (from M = cv2.getPerspectiveTransform(...) ) be corrected for the pitch and roll angles? 2) Should I just transform the source points and get a new transformation matrix? Roll seems like a simple enough correction since it's analogous to rotating the image, but how can I get the proper transformation for both roll and pitch?
OpenCV perspective transform with camera roll and pitch correction
0
0
1
0
0
715
47,797,170
2017-12-13T15:50:00.000
2
0
0
1
0
python,wlst
0
47,809,130
0
1
0
true
0
0
This command will print the Python version used by WLST : print (sys.version)
1
2
0
0
In Weblogic how to find WLST python version. Its known that WLST is made up by python. And Python 2 and Python 3 is different from one another Architecture wise and bit wise. Python 2 available for 64 bit considering Windows OS. Python 3 is still 32-bit as far I know. Python is well known simplest Higher Level Language that is widely used in many Industry, but classified like version 2 and 3. When I work in WLST I wonder what would be the Python version it is made up of. When Weblogic version differs does it differ. However it so, how to find out, is there a specific command or function for it while operating in WLST shell
How to find WLST python version
0
1.2
1
0
0
1,545
47,800,794
2017-12-13T19:29:00.000
-5
0
1
0
1
python,powershell,command-line,anaconda,conda
1
48,412,773
0
6
0
false
0
0
Here is a work around - start cmd shell . Run - activate . Check - conda env list . Start powershell - powershell .
4
40
0
0
I have two environments in anaconda, namely: root, 2env. When I open anaconda prompt, I can switch from root to 2env by typing: activate 2env. I also have conda in my powershell, but when I open powershell and try to run conda activate 2env it gives the following error: CommandNotFoundError: 'activate' Any suggestions on how to fix this?
How to activate different anaconda environment from powershell
0
-1
1
0
0
49,258
47,800,794
2017-12-13T19:29:00.000
8
0
1
0
1
python,powershell,command-line,anaconda,conda
1
52,237,127
0
6
0
false
0
0
I found this command while using vs code & cmd /k "activate <env> & powershell" . It is working
4
40
0
0
I have two environments in anaconda, namely: root, 2env. When I open anaconda prompt, I can switch from root to 2env by typing: activate 2env. I also have conda in my powershell, but when I open powershell and try to run conda activate 2env it gives the following error: CommandNotFoundError: 'activate' Any suggestions on how to fix this?
How to activate different anaconda environment from powershell
0
1
1
0
0
49,258
47,800,794
2017-12-13T19:29:00.000
1
0
1
0
1
python,powershell,command-line,anaconda,conda
1
51,418,747
0
6
0
false
0
0
I have been battling this issue for a while. I found a solution by using a batch script and calling call activate %env%. I hope this can help somebody.
4
40
0
0
I have two environments in anaconda, namely: root, 2env. When I open anaconda prompt, I can switch from root to 2env by typing: activate 2env. I also have conda in my powershell, but when I open powershell and try to run conda activate 2env it gives the following error: CommandNotFoundError: 'activate' Any suggestions on how to fix this?
How to activate different anaconda environment from powershell
0
0.033321
1
0
0
49,258
47,800,794
2017-12-13T19:29:00.000
0
0
1
0
1
python,powershell,command-line,anaconda,conda
1
67,298,072
0
6
0
false
0
0
Open PowerShell. Run conda init (not conda init powershell as the accepted answer suggests). Close and re-open PowerShell. Use conda normally.
4
40
0
0
I have two environments in anaconda, namely: root, 2env. When I open anaconda prompt, I can switch from root to 2env by typing: activate 2env. I also have conda in my powershell, but when I open powershell and try to run conda activate 2env it gives the following error: CommandNotFoundError: 'activate' Any suggestions on how to fix this?
How to activate different anaconda environment from powershell
0
0
1
0
0
49,258
47,827,130
2017-12-15T06:44:00.000
0
0
0
0
0
python-3.x,nlp,gensim,text-analysis
0
47,830,720
0
1
0
false
0
0
I have worked on similar lines. This approach can work till 300 such documents. But, taking it to higher scale you need to replicate the approach using spark. Here it goes: 1) Prepare TF-IDF matrix: Represent documents in terms Term Vectors. Why not LDA because you need to supply number of themes first which you don't know first. You can use other methods of representing documents if want to be more sophisticated (better than semantics) try word2Vec, GloVe, Google News Vectors etc. 2) Prepare a Latent Semantic Space from the above TF-IDF. Creation of LSA uses SVD approach (one can choose the kaiser criteria to choose the number of dimensions). Why we do 2)? a) TF-IDF is very sparse. Step 3 (tSne) which is computationally expensive. b) This LSA can be used to create a semantic search engine You can bypass 2) when your TF-IDF size is very small but i don't think given your situation that would be the case and also, you don't have other needs like having semantic search on these documents. 3) Use tSne (t-stochastic nearest embedding) to represent the documents in 3 dimensions. Prepare a spherical plot from the euclidean cordinates. 4) Apply K-means iteratively to find the optimal number of clusters. Once decided. Prepare word clouds for each categories. Have your themes.
1
0
1
1
I am trying to do textual analysis on a bunch (about 140 ) of textual documents. Each document, after preprocessing and removing unnecessary words and stopwords, has about 7000 sentences (as determined by nlkt's sentence tokenizer) and each sentence has about 17 words on average. My job is to find hidden themes in those documents. I have thought about doing topic modeling. However, I cannot decide if the data I have is enough to obtain meaningful results via LDA or is there anything else that I can do. Also, how do I divide the texts into different documents? Is 140 documents (each with roughly 7000 x 17 words) enough ? or should I consider each sentence as a document. But then each document will have only 17 words on average; much like tweets. Any suggestions would be helpful. Thanks in advance.
Suggestion on LDA
1
0
1
0
0
66
47,832,693
2017-12-15T12:44:00.000
0
0
0
0
0
python,selenium,selenium-webdriver
0
47,832,860
0
3
0
false
0
0
Reliably determining whether a page has been fully loaded can be challenging. There is no way to know if all the elements have been loaded just like that. You must define some "anchor" points in each page so that as far as you aware, if these elements has been loaded, it is fair to assume the whole page has been loaded. Usually this involves a combination of tests. So for example, you can define that if the below combination of tests passes, the page is considered loaded: JavaScript document.readyState === 'complete' "Anchor" elements All kinds of "spinners", if exist, disappeared.
1
1
0
0
I am asking for generally checking if all elements of a page has been loaded. Is there a way to check that basically? In the concrete example there is a page, I click on some button, and then I have to wait until I click on the 'next' button. However, this 'Next' button is available, selectable and clickable ALL THE TIME. So how to check with selenium that 'state'(?) of a page? As a reminder: This is a question about selenium and not the quality of the webpage in question....
Is there a way with python-selenium to wait until all elements of a page has loaded?
0
0
1
0
1
5,281
47,841,384
2017-12-16T00:14:00.000
1
0
0
0
0
python,turtle-graphics,python-turtle
0
62,399,262
0
7
0
false
0
1
You can use: turtle.right(angle) or: turtle.left(angle). Hope this helps!
1
4
0
0
How can I tell a turtle to face a direction in turtle graphics? I would like the turtle to turn and face a direction no matter its original position, how can I achieve this?
Turtle direction in turtle graphics?
0
0.028564
1
0
0
9,625
47,863,640
2017-12-18T07:11:00.000
0
0
1
0
0
python,pyinstaller
0
61,203,249
0
1
0
false
0
0
Do not mention the pickle file to pyinstaller and put the pickle file in the same folder than the bundled onefile. For me this works even if you have two files in the folder instead of one.
1
1
0
0
I'm making onefile executables with pyinstaller on windows 10. I'm including data files (pickle files) by editing the .spec file... How can I store changes made to these files during run time? My understanding is that the data files are copied to a temp directory during execution. I can read from the files using the path I get from sys._MEIPASS but the changes I write are lost after restarting the program. Is there a way to write to pickle files stored inside the exe?
how to change bundled data file pyinstaller on execute
0
0
1
0
0
590
47,878,687
2017-12-19T01:11:00.000
0
0
0
0
0
python-3.x,sms,sms-gateway,messagebird
0
68,136,708
0
1
0
false
0
0
Messagebird have a feature of forward incoming sms data through webhook(get or post method). if you set an url then Messagebird will forward every incoming sms to you(or your server). You can easily read get/post response.
1
1
0
0
I am evaluating MessageBird service. I got a Virtual Mobile Number. I am able to send message to dummy numbers (until i get approval for sending messages to real USA number) Unknown: My problem is about reading the messages received by a VMN. Details: If I as a VMN owner send a message to consumer e.g. +1(111)111-1111 and i am interested in reading the response from the consumer, how to do get it? MessageBird documentation expects me to know the ID for response message object (or my understanding is wrong). The documentation is good but i don't see a way to programmatically achieve it. Any suggestions How to achieve it? Thanks in advance!
MessageBird: How to read a response from consumer
1
0
1
0
0
146
47,914,980
2017-12-20T22:01:00.000
10
0
1
1
0
python,anaconda
0
53,872,163
0
6
0
false
0
0
I added "\Anaconda3_64\" and "\Anaconda3_64\Scripts\" to the PATH variable. Then I can use conda from powershell or command prompt.
4
49
0
0
I had to install the 64-bit version of Anaconda with python 3.5 in Windows 10. I followed the default settings (AppData/Continuum/Anaconda3). However, after installation, I am unsure how to access the Anaconda command prompt so that I can use conda to install packages. I also attempted to install Anaconda 64 bit in C:/Program Files, but several of the python script did not like the space and it failed to install. What can I do to access the Anaconda prompt?
How to access Anaconda command prompt in Windows 10 (64-bit)
0
1
1
0
0
214,781
47,914,980
2017-12-20T22:01:00.000
46
0
1
1
0
python,anaconda
0
47,915,189
0
6
0
false
0
0
Go with the mouse to the Windows Icon (lower left) and start typing "Anaconda". There should show up some matching entries. Select "Anaconda Prompt". A new command window, named "Anaconda Prompt" will open. Now, you can work from there with Python, conda and other tools.
4
49
0
0
I had to install the 64-bit version of Anaconda with python 3.5 in Windows 10. I followed the default settings (AppData/Continuum/Anaconda3). However, after installation, I am unsure how to access the Anaconda command prompt so that I can use conda to install packages. I also attempted to install Anaconda 64 bit in C:/Program Files, but several of the python script did not like the space and it failed to install. What can I do to access the Anaconda prompt?
How to access Anaconda command prompt in Windows 10 (64-bit)
0
1
1
0
0
214,781
47,914,980
2017-12-20T22:01:00.000
4
0
1
1
0
python,anaconda
0
56,891,764
0
6
0
false
0
0
If Anaconda Prompt is missing, you can create it by creating a shortcut file of Command Prompt (cmd.exe) and change its target to: %windir%\System32\cmd.exe "/K" <Anaconda Location>\anaconda3\Scripts\activate.bat Example: %windir%\system32\cmd.exe "/K" C:\Users\user_1\AppData\Local\Continuum\anaconda3\Scripts\activate.bat
4
49
0
0
I had to install the 64-bit version of Anaconda with python 3.5 in Windows 10. I followed the default settings (AppData/Continuum/Anaconda3). However, after installation, I am unsure how to access the Anaconda command prompt so that I can use conda to install packages. I also attempted to install Anaconda 64 bit in C:/Program Files, but several of the python script did not like the space and it failed to install. What can I do to access the Anaconda prompt?
How to access Anaconda command prompt in Windows 10 (64-bit)
0
0.132549
1
0
0
214,781
47,914,980
2017-12-20T22:01:00.000
16
0
1
1
0
python,anaconda
0
55,545,141
0
6
0
false
0
0
To run Anaconda Prompt using an icon, I made an icon and put: %windir%\System32\cmd.exe "/K" C:\ProgramData\Anaconda3\Scripts\activate.bat C:\ProgramData\Anaconda3 (The file location would be different in each computer.) at icon -> right click -> Property -> Shortcut -> Target I see %HOMEPATH% at icon -> right click -> Property -> Start in Test environment    OS: Windows 10    Library: Anaconda 10 (64 bit)
4
49
0
0
I had to install the 64-bit version of Anaconda with python 3.5 in Windows 10. I followed the default settings (AppData/Continuum/Anaconda3). However, after installation, I am unsure how to access the Anaconda command prompt so that I can use conda to install packages. I also attempted to install Anaconda 64 bit in C:/Program Files, but several of the python script did not like the space and it failed to install. What can I do to access the Anaconda prompt?
How to access Anaconda command prompt in Windows 10 (64-bit)
0
1
1
0
0
214,781
47,925,668
2017-12-21T13:06:00.000
3
1
0
0
0
python,rabbitmq
0
47,937,389
0
1
0
true
0
0
The best way to consume the messages is using basic_consume. basic_get is slow
1
0
0
0
I'm writing Python script cron-job, which is periodically get updates from RabbitMQ and process them. Every time I process them I need only to get current snapshot of RMQ queue. I use queue_declare to get number of messages in it. I know how to get messages one by one with basic_get. Also, I can use basic_consume/start_consuming and get messages in background, store them in some list and periodically get from that list, but what if script will fail with some error? I will lost all read messages in list. Also, I can use few consumers (pool of connections to RMQ) and get messages one by one. Maybe there is some other approach to do it? So, my question is - what is the best (i.e. secure and fast) way to get current messages from RabbiMQ queue?
The best way to read a lot of messages from RabbitMQ queue?
0
1.2
1
0
0
517
47,932,725
2017-12-21T21:08:00.000
10
0
1
0
1
python-3.x,pycharm
0
49,899,116
1
10
0
false
0
0
I ran into this issue when trying to get docker up and running with Pycharm 2018.1 and using the container's Interpreter. I would get the error below. "Cannot Save Settings please use a different SDK name" The issue I had was due to having multiple python interpreters of the same name. Under Pycharm || Preferences || Project Interpreter Click "show all" within the Project Interpreter dropdown and then delete any / all interpreters that you don't need.
6
22
0
0
I have been using Pycharm for years and have never had any problem. However, after my most recent PyCharm update I can no longer configure the interpreter. Also each time I create a new project it creates a vent directory under my project. When I go to File/Default Settings/Project Interpreter, I am provided with new options. In this window it allows you to configure a virtual environment, the conda environment, and the system interpreter. I am assuming that I should configure the system interpreter. From there I point PyCharm to the interpreter on my Mac at /usr/local/Cellar/python3/3.6.3/bin/python3 and hit OK. It then takes me back to the main window where it shows the path in the project interpreter. At this point I hit apply and get a message: Cannot Save Settings please use a different SDK name It doesn't matter which interpreter I choose, I get the same message. Has anyone else come up with the same problem and how do I fix this? Interestingly my old projects still work correctly.
Configuring interpreter in PyCharm: "please use a different SDK name"
0
1
1
0
0
16,186
47,932,725
2017-12-21T21:08:00.000
35
0
1
0
1
python-3.x,pycharm
0
48,535,675
1
10
0
false
0
0
I had the same problem while setting up the virtual environment for my project and no matter if I create a new virtual environment or select an existing one, I get the warning: "Cannot Save Settings please use a different SDK name" Finally I found the solution: Click on the project interpreter dropdown and select show all.... There you might be having multiple virtual environments with same name. Now here is the conflict you need to fix manually by renaming them so every item has the unique name.
6
22
0
0
I have been using Pycharm for years and have never had any problem. However, after my most recent PyCharm update I can no longer configure the interpreter. Also each time I create a new project it creates a vent directory under my project. When I go to File/Default Settings/Project Interpreter, I am provided with new options. In this window it allows you to configure a virtual environment, the conda environment, and the system interpreter. I am assuming that I should configure the system interpreter. From there I point PyCharm to the interpreter on my Mac at /usr/local/Cellar/python3/3.6.3/bin/python3 and hit OK. It then takes me back to the main window where it shows the path in the project interpreter. At this point I hit apply and get a message: Cannot Save Settings please use a different SDK name It doesn't matter which interpreter I choose, I get the same message. Has anyone else come up with the same problem and how do I fix this? Interestingly my old projects still work correctly.
Configuring interpreter in PyCharm: "please use a different SDK name"
0
1
1
0
0
16,186
47,932,725
2017-12-21T21:08:00.000
1
0
1
0
1
python-3.x,pycharm
0
57,827,910
1
10
0
false
0
0
Go to Project > Project Interpreter > Select the dropdown menu > "Show All". For me, there were several Python environments, two of which were red with an tag. Remove the envs that are red / have an tag, select the remaining valid one, and re-apply settings.
6
22
0
0
I have been using Pycharm for years and have never had any problem. However, after my most recent PyCharm update I can no longer configure the interpreter. Also each time I create a new project it creates a vent directory under my project. When I go to File/Default Settings/Project Interpreter, I am provided with new options. In this window it allows you to configure a virtual environment, the conda environment, and the system interpreter. I am assuming that I should configure the system interpreter. From there I point PyCharm to the interpreter on my Mac at /usr/local/Cellar/python3/3.6.3/bin/python3 and hit OK. It then takes me back to the main window where it shows the path in the project interpreter. At this point I hit apply and get a message: Cannot Save Settings please use a different SDK name It doesn't matter which interpreter I choose, I get the same message. Has anyone else come up with the same problem and how do I fix this? Interestingly my old projects still work correctly.
Configuring interpreter in PyCharm: "please use a different SDK name"
0
0.019997
1
0
0
16,186
47,932,725
2017-12-21T21:08:00.000
4
0
1
0
1
python-3.x,pycharm
0
57,171,648
1
10
0
false
0
0
How fix this in Windows 10: close Pycharm . delete this file: C:\Users\<username>\.PyCharmCE2018.3\config\options\jdk.table.xml open Pycahrm again and load all python interceptors again.
6
22
0
0
I have been using Pycharm for years and have never had any problem. However, after my most recent PyCharm update I can no longer configure the interpreter. Also each time I create a new project it creates a vent directory under my project. When I go to File/Default Settings/Project Interpreter, I am provided with new options. In this window it allows you to configure a virtual environment, the conda environment, and the system interpreter. I am assuming that I should configure the system interpreter. From there I point PyCharm to the interpreter on my Mac at /usr/local/Cellar/python3/3.6.3/bin/python3 and hit OK. It then takes me back to the main window where it shows the path in the project interpreter. At this point I hit apply and get a message: Cannot Save Settings please use a different SDK name It doesn't matter which interpreter I choose, I get the same message. Has anyone else come up with the same problem and how do I fix this? Interestingly my old projects still work correctly.
Configuring interpreter in PyCharm: "please use a different SDK name"
0
0.07983
1
0
0
16,186
47,932,725
2017-12-21T21:08:00.000
0
0
1
0
1
python-3.x,pycharm
0
55,686,153
1
10
0
false
0
0
In my case, I moved my project to a different location and PyCharm started complaining about Cannot Save Settings please use a different SDK name. At the top of the main editor, it asks me to Configure Project Interpreter. I clicked it, and then ... My solution Remove all existing interpreters that are marked as invalid in the preference. Select the interpreter in the moved venv subfolder in my project. Without doing both, I kept getting the same "SDK name" error. It seemed that the project thinks that it already has an interpreter called "python.exe", if you don't actively remove all "invalid" ones.
6
22
0
0
I have been using Pycharm for years and have never had any problem. However, after my most recent PyCharm update I can no longer configure the interpreter. Also each time I create a new project it creates a vent directory under my project. When I go to File/Default Settings/Project Interpreter, I am provided with new options. In this window it allows you to configure a virtual environment, the conda environment, and the system interpreter. I am assuming that I should configure the system interpreter. From there I point PyCharm to the interpreter on my Mac at /usr/local/Cellar/python3/3.6.3/bin/python3 and hit OK. It then takes me back to the main window where it shows the path in the project interpreter. At this point I hit apply and get a message: Cannot Save Settings please use a different SDK name It doesn't matter which interpreter I choose, I get the same message. Has anyone else come up with the same problem and how do I fix this? Interestingly my old projects still work correctly.
Configuring interpreter in PyCharm: "please use a different SDK name"
0
0
1
0
0
16,186
47,932,725
2017-12-21T21:08:00.000
1
0
1
0
1
python-3.x,pycharm
0
51,556,018
1
10
0
false
0
0
You cannot have 2 or more virtual environments with same name. Even if you have projects with same name stored at 2 different places, please give unique name to its venv. This will solve your problem. To check all the virtual environments: Go to File >> Settings >> Project: your_project_name >> Project Interpreter And rename the venv name.
6
22
0
0
I have been using Pycharm for years and have never had any problem. However, after my most recent PyCharm update I can no longer configure the interpreter. Also each time I create a new project it creates a vent directory under my project. When I go to File/Default Settings/Project Interpreter, I am provided with new options. In this window it allows you to configure a virtual environment, the conda environment, and the system interpreter. I am assuming that I should configure the system interpreter. From there I point PyCharm to the interpreter on my Mac at /usr/local/Cellar/python3/3.6.3/bin/python3 and hit OK. It then takes me back to the main window where it shows the path in the project interpreter. At this point I hit apply and get a message: Cannot Save Settings please use a different SDK name It doesn't matter which interpreter I choose, I get the same message. Has anyone else come up with the same problem and how do I fix this? Interestingly my old projects still work correctly.
Configuring interpreter in PyCharm: "please use a different SDK name"
0
0.019997
1
0
0
16,186
47,941,250
2017-12-22T12:06:00.000
0
0
1
0
1
javascript,python,image-processing,ocr,image-conversion
0
47,942,101
0
1
0
false
0
0
I don't if I am understanding your problem correctly, but I'm assuming each dictionary in your json is giving you the coordinates for a word. My approach would be to first find the difference in pixels for the space between any 2 words, and you use this value to detect the sequence of words. For example: img1 = {'coordinates': 'information'} img2 = {'coordinates': 'information'} space_value = 10 # for example if img1['Height'] == img2['Height'] and (img1['Left'] + img1['Width'] + space_value) == img2['Left']: next_word = True
1
0
1
0
I am using online library and able to fetch words from an image with their locations. Now I want to form sentences exactly like which are in image. Any idea how can I do that? Earlier i used the distance between two words and if there are pretty close then it means it is a part of a sentence but this approach is not working fine Please help This is the json I am receiving I have... "WordText": "Word 1", "Left": 106, "Top": 91, "Height": 9, "Width": 11 }, { "WordText": "Word 2", "Left": 121, "Top": 90, "Height": 13, "Width": 51 } . . . More Words
Able to fetch text with their locations from an image...How can I form sentence?
0
0
1
0
0
41
47,941,694
2017-12-22T12:37:00.000
4
0
1
0
0
python,boolean,operators
0
47,941,734
0
2
0
false
0
0
The and operator converts the first operands to boolean using __bool__, and then does a predefined action to the booleans (if first.__bool__() is True, return second, else return first). There is no way to change this behavior.
1
5
0
0
So I've been messing around with the standard operators in classes to try and see what i can make, but i haven't been able to find how to edit the boolean and operator. I can edit the bitwise &operator by defining __and__(self), but not the way that and behaves. Does anyone know how I can change the behavior of a and b where a and bare instances of the class I'm making? Thanks in advance!
Edit boolean and operator
0
0.379949
1
0
0
576
47,946,518
2017-12-22T19:34:00.000
3
0
0
0
0
python-3.x,time-series,facebook-prophet
0
51,340,436
0
2
0
false
0
0
There is a simple solution in the current version of the library. You can use from the predicted model fc. What you want for the value of yearly can be found with fc['yearly'] without using the functions in the above solution. Moreover, if you want all the other components like trend, you can use fc['trend'].
1
7
1
0
Any ideas on how to export the yearly seasonal trend using fbprophet library? The plot_components() function plots the trend, yearly, and weekly. I want to obtain the values for yearly only.
Python fbprophet - export values from plot_components() for yearly
0
0.291313
1
0
0
3,166
47,956,052
2017-12-23T21:12:00.000
0
1
0
0
0
python,cgi
0
47,956,075
0
2
0
false
1
0
Short answer is: no, this isn't possible. Sure, they can download your script and run it themselves if they have a compatible version of Python installed, but you won't be able to run it from the browser (that would be a severe security problem!) Your options are either to write it in JS, or create an API on your server, or find and use an existing API.
1
0
0
1
So, my project does a lot of mathematics for the user. It lets them enter equations and then solves them with some fairly complicated items like eigenvalues. I do some of this is javascript, but I have also written a python script utilizing numpy. I would like the user to be able to have the option of having the script on their local machine and then solving the mathematics there instead of on my server. So, the user would enter an equation and hit enter. The javascript would then call a python script running on the users local machine. The equation is solved there with my code and the result is returned to the web page. I thought that this would be possible with CGI, but I cannot seem to find clear documentation on how this would be accomplished. Is there a better way? I do not want to run third party software and I do not want to run the python code in the browser. Thanks
Call python script from web page and get results
1
0
1
0
0
399
47,956,527
2017-12-23T22:28:00.000
18
0
0
0
0
python,web-scraping,web,bots
0
47,956,652
0
1
0
true
0
0
There's a large array of techniques that internet service providers use to detect and combat bots and scrapers. At the core of all of them is to build heuristics and statistical models that can identify non-human-like behavior. Things such as: Total number of requests from a certain IP per specific time frame, for example, anything more than 50 requests per second, or 500 per minute, or 5000 per day may seem suspicious or even malicious. Counting number of requests per IP per unit of time is a very common, and arguably effective, technique. Regularity of incoming requests rate, for example, a sustained flow of 10 requests per second may seem like a robot programmed to make a request, wait a little, make the next request, and so on. HTTP Headers. Browsers send predictable User-Agent headers with each request that helps the server identify their vendor, version, and other information. In combination with other headers, a server might be able to figure out that requests are coming from an unknown or otherwise exploitative source. A stateful combination of authentication tokens, cookies, encryption keys, and other ephemeral pieces of information that require subsequent requests to be formed and submitted in a special manner. For example, the server may send down a certain key (via cookies, headers, in the response body, etc) and expect that your browser include or otherwise use that key for the subsequent request it makes to the server. If too many requests fail to satisfy that condition, it's a telltale sign they might be coming from a bot. Mouse and keyboard tracking techniques: if the server knows that a certain API can only be called when the user clicks a certain button, they can write front-end code to ensure that the proper mouse-activity is detected (i.e. the user did actually click on the button) before the API request is made. And many many more techniques. Imagine you are the person trying to detect and block bot activity. What approaches would you take to ensure that requests are coming from human users? How would you define human behavior as opposed to bot behavior, and what metrics can you use to discern the two? There's a question of practicality as well: some approaches are more costly and difficult to implement. Then the question will be: to what extent (how reliably) would you need to detect and block bot activity? Are you combatting bots trying to hack into user accounts? Or do you simply need to prevent them (perhaps in a best-effort manner) from scraping some data from otherwise publicly visible web pages? What would you do in case of false-negative and false-positive detections? These questions inform the complexity and ingenuity of the approach you might take to identify and block bot activity.
1
2
0
0
I am learning python and i am currently scraping reddit. Somehow reddit has figured out that I am a bot (which my software actually is) but how do they know that? And how we trick them into thinking that we are normal users. I found practical solution for that, but I am asking for bit more in depth theoretical understanding.
How do websites detect bots?
0
1.2
1
0
1
6,861
47,966,082
2017-12-25T05:57:00.000
0
0
0
0
0
python,django,web-applications,video-embedding
0
47,990,584
0
2
0
true
1
0
Handling video files is much more complicated than dealing with images. There are two ways you can do it: you let users embed videos uploaded to other sites (like youtube) or you let them upload photos to your website. The first option is easier: most of the video websites offer some way to copy&paste a code to embed their videos on other sites. You just need to let users paste the html code on your website and there are some security measures you should take care of. If you want them to upload the files it's getting hard.There are many video formats, files are much bigger, different compression rates etc. A video site usually accepts a wide range of video formats, converts a video to the most convenient format and different resolutions (to save space and bandwidth). It means a lot of asynchronous and CPU intensive tasks on your server. It's also more complicated to put the file on the website and let it play. There's a video tag in HTML5 that makes things much easier than before although if you want to make it really nice and easy you should find some JS player.
1
0
0
0
I have a Django site that I want to add videos. Currently users can upload their photos and I want each user to be able to add their videos as well. I am not sure how to do this, since I am a beginner programmer. Can you please direct me to right way?
Video embedding
0
1.2
1
0
0
93
47,966,943
2017-12-25T08:22:00.000
0
0
0
1
1
python,console,pycharm
1
47,967,440
0
1
0
false
0
0
Because the console uses the port 51562 and 51563. So you might didnt exit a program correctly to cause the ports are still using.
1
0
0
0
More details: Macbook Air 10.12.6 (16G1036); Python version: python3.6 IDE: Pycharm 2017.3.1 Error: Users/lrh/PycharmProjects/TensorFlowDemo/venv/bin/python /Applications/PyCharm.app/Contents/helpers/pydev/pydev_run_in_console.py 51562 51563 /Users/lrh/PycharmProjects/TensorFlowDemo/demo1.py Error starting server with host: "localhost", port: "51562", client_port: "51563" Traceback (most recent call last): File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevconsole.py", line 270, in start_console_server server = XMLRPCServer((host, port), logRequests=False, allow_none=True) File "/Users/lrh/anaconda3/lib/python3.6/xmlrpc/server.py", line 598, in init socketserver.TCPServer.init(self, addr, requestHandler, bind_and_activate) File "/Users/lrh/anaconda3/lib/python3.6/socketserver.py", line 453, in init self.server_bind() File "/Users/lrh/anaconda3/lib/python3.6/socketserver.py", line 467, in server_bind self.socket.bind(self.server_address) OSError: [Errno 49] Can't assign requested address Console server didn't start how can i fix it?
When I use pycharm to run code, the error "OSError: [Errno 49] Can't assign requested address" happended.
0
0
1
0
0
675
47,968,124
2017-12-25T11:20:00.000
0
0
1
0
0
python,pip,installation
0
47,968,167
0
1
0
false
0
0
There might be a conflict with environment variables. Try this python2.7 -m pip install
1
1
0
0
how do I go about installing for python2.7 version only? Right now when I run this : python -m pip install requests tweepy python-bittrex It's only for python 3 I'd like to install for python 2 (I have both versions installed) THanks
Python Pip Install For Specific Version
0
0
1
0
0
236
47,979,390
2017-12-26T13:36:00.000
8
0
0
0
0
python,sqlalchemy,alembic
0
47,979,603
0
1
0
true
1
0
After you run your init. Open the env.py file and update context.configure, add version_table='alembic_version_your_name as a kwarg.
1
4
0
0
I am working with alembic and it automatically creates a table called alembic_revision on your database. How, do I specify the name of this table instead of using the default name?
Alembic, how do you change the name of the revision database?
0
1.2
1
1
0
874
47,988,332
2017-12-27T07:48:00.000
0
1
0
0
0
python,imap
0
47,988,655
0
1
0
true
0
0
You must implement your proxy as a Man In The Middle attack. That means that there are two different SSL/TLS encrypted communication channels: one between the client and the proxy, one between the the proxy and the server. That means that either: the client explicitely sets the proxy as its mail server (if only few servers are to be used with one name/address per actual server) the proxy has a certificate for the real mail server that will be trusted by the client. A common way is to use a dummy CA: the proxy has a private certificate trusted by the client that can be used to sign certificates for any domains like antivirus softwares do. Once this is set up, the proxy has just to pass all commands and responses, and process the received mails on the fly. I acknowledge that this is not a full answer, but a full answer would be far beyond the scope of SO and I hope it could a path to it. Feel free to ask more precise questions here if you are later stuck in actual implementation.
1
0
0
0
I would like to implement a transparent IMAPS (SSL/TLS) proxy from zero using python (pySocks and imaplib). The user and the proxy are in the same network and the mail server is outside (example: gmail servers). All the traffic on port 993 is redirected to the proxy. The user should retrieve his emails using his favorite email application (example: thunderbird). The proxy should receive the commands and transmit it to the user/server and should be able to read the content of the retrieved emails. However, as the traffic is encrypted, I don't know how to get the account and the password of the user (without using a database) OR how to read the content of the emails without knowing the account and the password of the user. After few days looking for a solution, I still don't have any track. Maybe it is not possible ? If you have any track, I would be happy to read it. Thank you.
Transparent IMAPs proxy
0
1.2
1
0
1
221
47,988,983
2017-12-27T08:43:00.000
2
0
0
0
0
python,machine-learning,neural-network,keras,keras-layer
0
47,990,202
0
2
0
true
0
0
input_dim=3 means that your data have 3 features which will be used to determine final result eg. if you want to determine what animal data refer to you could put width, height and color as data. 100 examples of different animals widths, heights and colors combinations allow neural network to adjust its parameters (learn) what width, height and color refers to what kind of animal. Keras starts with random weights for neurons and goes one by one 100 times using provided samples to adjust network weights. Keras actually uses batches which means 100 samples are divided into smaller groups for better learning rate and general performance (less data to store in memory at once). 10 neurons are 10 'places' where network is able to store multiplications results between neuron weights and input data. You could imagine neuron as a bulb which lights a bit brighter or darker depending whether data shows some useful data feature eg. if animal is above 3 meters tall. Each neuron has its own set of weights which are changed just a bit when network examines next sample from your data. At the end you should have 10 neurons (bulbs) which react in more or less intense way depending on presence of different features in your data eg. if animal is very tall. The more neurons you have the more possible features you can track eg. if animal is tall, hairy, orange, spotted etc. But the more neurons you have there is also the higher risk that your network will be too exact and will learn features which are unique for your training example (it's called overfitting) but do not help you to recognize animal samples which were not included in your training data (it's called ability to generalize and is most important point of actually training neural network). Selecting number of neurons is then a bit of practical exercise where you search for one which works for your need. I hope it clarifies your doubts. If you would like to get deeper in this field there are a lot of good resources online explaining neural networks training process in details including features, neurons and learning.
1
0
1
0
I am using Keras for a project and I don't understand how Keras uses data input, that is to say how Keras reads our input data when creating the first layer. For example: model = Sequential() model.add(Dense(10, activation='sigmoid', input_dim=3,name='layer1')) In this model, what does it mean to have 10 neurons and an input with 3 dimensions? If the input data has 100 examples (number of lines in the matrix data), how does Keras use them? Thank you.
How does Keras read input data?
1
1.2
1
0
0
1,223
47,999,716
2017-12-27T23:15:00.000
1
1
0
0
0
python,bots,discord
0
48,163,714
0
3
0
true
0
0
you want to do this through oath2 using the url parameters
1
0
0
0
I am using discord.py to create my bot and I was wondering how to create roles/permissions specific to the bot? What that means is when the bot enters the server for the first time, it has predefined permissions and role set in place so the admin of the server doesn't need to set a role and permissions for the bot. I have been trying to look up a reference implementation of this but no luck. If someone can point me at example of how to get a simple permission/role for a bot that will be great!
How to create a role for a Discord Bot
0
1.2
1
0
1
7,000
48,008,791
2017-12-28T13:56:00.000
0
0
0
0
0
python,django
0
48,009,047
0
2
0
false
1
0
Just realised that i was importing the models instead of the views. the code above should be from reviews.views import *
1
0
0
0
So I have 2 apps for my django project. In the default mysite folder, you have the urls.py file. I cant seem to find out how to write all my urls for all the apps in just the one urls.py file. I have tried this: from reviews.models import * however that isnt working. Thanks for any help!
Django URLs from different apps in just the base one
0
0
1
0
0
29
48,016,091
2017-12-29T00:40:00.000
1
1
0
0
0
python,amazon-web-services,aws-lambda,chalice
1
50,925,535
0
6
0
false
1
0
Fisrt, install unixODBC and unixODBC-devel packages using yum install unixODBC unixODBC-devel. This step will install everything required for pyodbc module. The library you're missing is located in /usr/lib64 folder on you Amazon Linux instance. Copy the library to your python project's root folder (libodbc.so.2 is just a symbolic link, make sure you copy symbolic link and library itself as listed): libodbc.so, libodbc.so.2 and libodbc.so.2.0.0
1
3
0
0
I am trying to build a AWS Lambda function using APi Gateway which utlizes pyodbc python package. I have followed the steps as mentioned in the documentation. I keep getting the following error Unable to import module 'app': libodbc.so.2: cannot open shared object file: No such file or directory when I test run the Lambda function. Any help appreciated. I am getting the same error when I deployed my package using Chalice. It seems it could be that I need to install unixodbc-dev. Any idea how to do that through AWS Lambda?
Unable to use pyodbc with aws lambda and API Gateway
0
0.033321
1
1
0
6,014
48,016,206
2017-12-29T01:00:00.000
0
0
0
0
0
python,excel,openpyxl
0
49,428,497
0
4
0
false
0
0
Currently what I do is in my template I create a dynamic data range that gets the data from the raw data sheet and then I set that named range to the tables data source. Then in the pivot table options there is a "refresh on open" parameter and I enable that. When the excel file opens it refreshes and you can see it refresh. Currently looking for a way to do it in openpyxl but this is where im at
2
6
0
0
I have a file that has several tabs that have pivot tables that are based on one data tab. I am able to write the data to the data tab without issue, but I can't figure out how to get all of the tabs with pivot tables to refresh. If this can be accomplished with openpyxl that would be ideal.
Using openpyxl to refresh pivot tables in Excle
0
0
1
1
0
7,810
48,016,206
2017-12-29T01:00:00.000
1
0
0
0
0
python,excel,openpyxl
0
52,547,674
0
4
0
false
0
0
If the data source range is always the same, you can set each pivot table as "refresh when open". To do that, just go to the pivot table tab, click on the pivot table, under "Analyze" - > Options -> Options -> Data -> select "Refresh data when opening the file". If the data source range is dynamic, you can set a named range, and in the pivot table tab, Change Data Source to the named range. And again set "refresh when open". So the above is achieved without using any python package, alternatively you can use openpyxl to refresh. However make sure that you're using the 2.5 release or above, because otherwise the pivot table format will be lost.
2
6
0
0
I have a file that has several tabs that have pivot tables that are based on one data tab. I am able to write the data to the data tab without issue, but I can't figure out how to get all of the tabs with pivot tables to refresh. If this can be accomplished with openpyxl that would be ideal.
Using openpyxl to refresh pivot tables in Excle
0
0.049958
1
1
0
7,810
48,021,783
2017-12-29T11:18:00.000
0
0
0
0
0
python-3.x,pygtk,glade
0
48,027,204
0
1
0
false
0
1
I think that is not posible to do dinamically. As you know on Pygtk we load the glade file by this way wTree = gtk.glade.XML("localize.glade") only once time, and after that we have on scope the access to all tree of controls and componets. If you have a window loaded, you can load another window, but not pull apart a tab that belong to a window loaded already, is something that not insted on pygtk, is not supported. Each window run on a singular process, i can not figure out how to pull apart it from the root proccess. I hope its helps you out.
1
3
0
0
I made a GLADE file, a main window of type "GtkNotebook" and there are several pages in it (Window1 = Page1, Page2, Page3, Page4). a) Is it possible, like a web-browser, to take one of this page and separate it from the main windows? Example Page4 taken away with the cursor would create a Windows2 b) If not (I could not achieve it till now), I will have probably to create 2 windows which open automatically when I start my application (one will be Window1 = Page1, Page2, Page3, the second one will be Window2 with Page4). I will search how to do this after I have a feedback from here if a) could be done in any way. Thanks (this is my first post here)
GLADE & Pygtk: how to split dynamically windows?
1
0
1
0
0
96
48,031,855
2017-12-30T07:18:00.000
1
1
1
1
0
python,condor
1
61,310,906
0
1
0
false
0
0
You can simply run an interactive job (basically just a job with sleep or cat as command) and do ssh_to_job to run it. Generally you need to set-up your python environment on the compute node, it is best to have a venv and activate it inside your start script.
1
1
0
0
I am submitting a python script to condor. When condor runs it it gets an import error. Condor runs it as /var/lib/condor/execute/dir_170475/condor_exec.exe. If I manually copy the python script to the execute machine and put it in the same place and run it, it does not get an import error. I am wondering how to debug this. How can I see the command line condor uses to run it? Can the file copied to /var/lib/condor/execute/dir_170475/condor_exec.exe be retained after the failure so I can see it? Any other suggestions on how to debug this?
Debugging htcondor issue running python script
0
0.197375
1
0
0
289
48,036,741
2017-12-30T18:28:00.000
0
0
0
0
0
python,pymc3
0
48,042,507
0
3
0
false
0
0
Let step = pymc3.Metropolis() be our sampler, we can get the final acceptance-rate through "step.accepted" Just for beginners (pymc3) like myself, after each variable/obj. put a "." and hit the tab key; you will see some interesting suggestions ;)
1
0
1
0
Does anyone know how I can see the final acceptance-rate in PyMC3 (Metropolis-Hastings) ? Or in general, how can I see all the information that pymc3.sample() returns ? Thanks
Acceptance-rate in PyMC3 (Metropolis-Hastings)
0
0
1
0
0
551
48,039,657
2017-12-31T03:12:00.000
2
0
1
0
0
python
0
48,039,677
0
3
0
false
0
0
You can try newlist = filter(lambda a: a > 0, [1, 2, 3]) or None or [i for i in original_list if i > 0] or None
1
1
0
0
I am wondering how I can take only positive values in a list in Python. For example, if I have A = [1, 2, 3], it should return [1, 2, 3] If I have A = [-1, 2, 3], it should return [2, 3] if I have A = [-1, -2], it should return None Thank you very much!
How to take only positive values in a list in Python?
0
0.132549
1
0
0
20,880
48,040,573
2017-12-31T06:45:00.000
1
0
1
1
0
python,macos,pip,kernel,atom-editor
0
48,050,542
0
3
0
false
0
0
Well although I am no Mac expert I've given it a shot anyway: Yes you could but do you really want to risk it (or even do it)? Mac-OS must rely on Python to fulfill something in the OS otherwise it would not come inbuilt. This means two things: The Python installation will be minimal. By that I mean it will have things missing (any large library for a start). They will do this mainly to cut down on the OS size. Therefore you will not have the full Python library and in the long term you may end up missing out. Second if anything went wrong (IE you broke your installation or even modified it -yep I've done this in Linux and have ended up factory resetting) then you may cause something to stop working and may need to factory reset or perform some other drastic action on your OS. A separate installation would prevent your from risking this. This is very useful because there comes a time when you may decide to update certain modules with pip and find it can't or it updates something that you shouldn't be messing with. Yes it's possible you may run into compatibility problems but I think it's most widely accepted that you do not use the inbuilt one as it needs to remain unchanged if the OS is to use it correctly. Messing with it increases the chances of it breaking. Conclusion: So even though installing modules with pip (and getting pip) can be done with the inbuilt Python it comes down whether you want to risk harming your OS. I strongly suggest you get a separate installation and leave the inbuilt one as it is. Second as you mentioned you will find that the inbuilt versions are never up-to-date or are built were they are not really compatible with standard libraries (expect things like the missing runtime libraries all the time) , just another reason to stay clear of them.
1
1
0
0
I have read a bunch of posts here and on Google, but my question is far more basic than the answers: If Python(2.7) came pre-installed on my MacBook Pro (High Sierra), can I just do sudo easy_install pip (as suggested) from the command line--withOUT causing issues? I have a vague understanding of global/local installations, and my understanding is certain Python installations aren't compatible with local/global kernel installations. I hope I am getting the terminology right, but I saw several warnings about installing pip for "a homebrew based python installation", but I am not sure whether Python on my laptop is installed via homebrew (nor how to find out). My question came about because I wanted to install the Hydrogen package to use in Atom, the text editor (to help me learn Python). I finally succeeded in installing Hydrogen, but got stumped by the missing kernels (not sure which ones I need, so I am willing to install them all). But I can't seem to install the kernels without pip. So here I am. My apologies for asking such a basic question--and thanks!
How to install pip for a total newbie
0
0.066568
1
0
0
442
48,041,129
2017-12-31T08:40:00.000
0
0
0
0
0
python,django
0
48,041,312
0
1
0
true
1
0
A pure django solution would be: create a form with three integer fields (say, num1, num2 and result) in your view, populate num1 and num2 with the numbers to be added render the form in your template (num1 and num2 fields should be read only) the user enters the answer in the result field and submits the form in your view, determine whether num1 + num2 == result redirect to a success page if the answer is correct, otherwise redisplay the form
1
0
0
0
I've been thinking of this for a LONG time the past few days and can't figure out with my current toolset how to implement this in Django. What I want is something that can be implemented trivially in Java for example, but how I'd do that on the web is much more difficult The problem I want to send data to a HTML template, specific example: "What is 5 + 50?" The data must be dynamically generated, so the 5 and 50 are actually randomly generated. I think I am comfortable doing this part, as I'd simply pass a random variable to a template using the views.py This is where I do not know how to proceed I want the user to be able to enter their answer, and have them notified if it correct. To do this, I'd need to pass the variables from the template back to another view function. I am not sure how to do that, if it is possible at all. This is how I'm deciding to pursue my projecti dea, and I'm not sure if this is the most efficient way tl;dr I just wanted data to be randomly generated and calculated using Django
Coding mental block with specific Django task
1
1.2
1
0
0
131
48,041,557
2017-12-31T10:03:00.000
0
0
1
0
0
python,pyinstaller
0
48,041,611
0
2
0
false
0
0
First try running the command from a command line (terminal) so you can see what happens. Not from inside any IDE. If you created the script in a MSWindows environment, be sure your PATH includes the executable (or explicitly give the path to the script). In Linux/Unix, be sure to enable execute permission for the script. chmod +x scriptname
2
0
0
0
I'm trying to learn how to use pyinstaller to make an executable. I wrote a little script in 2.7 as a test. Print 'test" and named it test-print. When I click on the executable in the Build folder a cmd screen flashes, and that all she wrote. I tried adding a x = raw_input('input something: ') hoping that would cause the cmd screen, or some kind of screen to persist, but to no avail. I know this is basic stuff, but a voice of experience would be most helpful. F
pyinstaller -- script not found.
0
0
1
0
0
1,732
48,041,557
2017-12-31T10:03:00.000
0
0
1
0
0
python,pyinstaller
0
48,043,401
0
2
0
false
0
0
In pyinstaller the actual executable is located in the dist folder. I assume you did not use pyinstallers "--onefile" switch so once you finish compiling, navigate to dist then test-print. Afterwards look for test-print.exe in that folder. That is your executable.
2
0
0
0
I'm trying to learn how to use pyinstaller to make an executable. I wrote a little script in 2.7 as a test. Print 'test" and named it test-print. When I click on the executable in the Build folder a cmd screen flashes, and that all she wrote. I tried adding a x = raw_input('input something: ') hoping that would cause the cmd screen, or some kind of screen to persist, but to no avail. I know this is basic stuff, but a voice of experience would be most helpful. F
pyinstaller -- script not found.
0
0
1
0
0
1,732
48,041,979
2017-12-31T11:13:00.000
0
0
1
1
0
windows,python-3.x,cx-freeze
0
48,140,125
0
1
0
false
0
0
The .exe output actually depends on the installation you are using (I'm assuming x64) so if you used an x86bit or x32bit Python installation it will output the bit version your installation is (I know both will run on x64 computers) and just freeze in the normal way. Bear in mind that x32 works on x86, x64 as well so you might do best with that bit version.
1
0
0
0
and thank you for your answer in advance. I am making a python program to automate something for my friend, and converted it into a .exe file with cx_Freeze so I could give it to him. But I have a x64 machine and he has a x86 machine. Can anyone please tell me how to make a x86 .exe file on my PC. I'm using Win 10 x64 and Python 3.6
Making a x86 .exe on a x64 machine
0
0
1
0
0
181
48,043,217
2017-12-31T14:20:00.000
0
0
1
0
0
python,python-3.x,numpy,64-bit
1
48,043,323
0
3
0
false
0
0
In Windows I use always this: Rename the pip.exe to pip64.exe for example Add python folder to Sys path if not exists. You can use "pip64 install package_name"
3
0
0
0
I was having a memory error in Python with a program, I found out I had to upgrade my Python to 64 bit. I did that. I then copied all the files from the Lib/site-packages folder of the Python 32 bit and pasted it in the 64 bit folder. I did this so I wouldn't have to install the modules again for my program. I ran the program and got the following error: NameError: name 'numpy' is not defined And yes, I had import numpy in the program I think the problem is that I have to actually pip install numpy inside of the 64 bit Python (even though I copied the exact same Lib/site-packages from 32 bit to 64 bit) using cmd. If that is the problem, how do I specifically pip install inside of the 64 bit Python folder rather than the default 32 bit folder? Otherwise, any suggestions?
Using 32-bit and 64-bit Python - "NameError: global name 'numpy' etc. is not defined"
0
0
1
0
0
302
48,043,217
2017-12-31T14:20:00.000
0
0
1
0
0
python,python-3.x,numpy,64-bit
1
48,043,249
0
3
0
false
0
0
For windows Shift-Right-Click on your 64-bit installation folder that has python.exe and select Open command window here. Then type python.exe -m pip install numpy in there and press Enter. What this does is that it calls 64-bit python's pip to install numpy instead.
3
0
0
0
I was having a memory error in Python with a program, I found out I had to upgrade my Python to 64 bit. I did that. I then copied all the files from the Lib/site-packages folder of the Python 32 bit and pasted it in the 64 bit folder. I did this so I wouldn't have to install the modules again for my program. I ran the program and got the following error: NameError: name 'numpy' is not defined And yes, I had import numpy in the program I think the problem is that I have to actually pip install numpy inside of the 64 bit Python (even though I copied the exact same Lib/site-packages from 32 bit to 64 bit) using cmd. If that is the problem, how do I specifically pip install inside of the 64 bit Python folder rather than the default 32 bit folder? Otherwise, any suggestions?
Using 32-bit and 64-bit Python - "NameError: global name 'numpy' etc. is not defined"
0
0
1
0
0
302
48,043,217
2017-12-31T14:20:00.000
1
0
1
0
0
python,python-3.x,numpy,64-bit
1
48,043,267
0
3
0
false
0
0
I then copied all the files from the Scripts folder of the Python 32 bit and pasted it in the 64 bit folder. I did this so I wouldn't have to install the modules again for my program. That wasn't a good idea. There are executables in the Scripts folder that are not the same for 32-bit and 64-bit Python. You have to do pip install separately for 32-bit and 64-bit Python. Any DLL involved in the install will not be the same for both versions, in fact 64-bit Python will not even see a 32-bit DLL. Do it the long way. I know that's a drag but taking shortcuts is likely to lead to baffling errors.
3
0
0
0
I was having a memory error in Python with a program, I found out I had to upgrade my Python to 64 bit. I did that. I then copied all the files from the Lib/site-packages folder of the Python 32 bit and pasted it in the 64 bit folder. I did this so I wouldn't have to install the modules again for my program. I ran the program and got the following error: NameError: name 'numpy' is not defined And yes, I had import numpy in the program I think the problem is that I have to actually pip install numpy inside of the 64 bit Python (even though I copied the exact same Lib/site-packages from 32 bit to 64 bit) using cmd. If that is the problem, how do I specifically pip install inside of the 64 bit Python folder rather than the default 32 bit folder? Otherwise, any suggestions?
Using 32-bit and 64-bit Python - "NameError: global name 'numpy' etc. is not defined"
0
0.066568
1
0
0
302
48,085,374
2018-01-03T21:28:00.000
5
0
0
0
0
javascript,python,plotly
0
48,085,729
0
1
0
true
1
0
I found the solution.. Following code hides the rangeslider graph on the bottom of candle stick chart.. xaxis : {fixedrange: true, rangeslider: {visible: false}}
1
1
0
0
By default, candlestick and ohlc charts display a rangeslider. It seems like there's no parameter to change the setting. So I've looked at javascript code in html file but was not able to find a clue to remove it. Can someone explain how to remove the rangeslider from candlestick chart?
Plotly - How to remove the rangeslider
0
1.2
1
0
0
2,723