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
48,088,137
2018-01-04T03:10:00.000
0
0
0
0
0
python,excel,pivot-table,openpyxl
0
52,813,212
0
3
0
false
0
0
Worksheets("SheetName").PivotTables("PivotTableName").PivotCache().Refresh()
1
0
0
0
I have a workbook that has several tabs with pivot tables. I can put data on the tab that holds the data for each pivot. My problem is that I don't know how to refresh the pivot tables. I would assume that I would need to cycle through each sheet, check to see if there is a pivot table, and refresh it. I just can't...
Refresh Excel Pivot Tables
0
0
1
1
0
3,004
48,092,110
2018-01-04T09:20:00.000
1
0
1
0
0
python,python-3.x,exe,executable
0
48,123,001
0
1
0
false
0
1
They should all work. Py2exe and Py2app are the ones that don't. If they don't work they you haven't used them properly. Particularly cx_Freeze that requires you to "tune things manually". Here are some debug steps that will help you resolve your error: When freezing for the first time don't hide the console. This...
1
1
0
0
I am kind a stuck. I have tried to make Tetris game with music to .exe, but I really don't know how to do it. Can someone give some tips, how to make .py to .exe? I have tried Pyinstaller, cx_Freeze and none of them work.
Converting Python 3.6.1 Tetris game with music, to exe
0
0.197375
1
0
0
88
48,092,543
2018-01-04T09:45:00.000
1
0
0
0
0
python,html,python-2.7,gtk,webkitgtk
0
48,123,502
0
1
0
true
0
1
Done. I've used Flask, Socket.io and gtk to make an app, showing a html file in full screen, with python variables in it.
1
0
0
0
for a project i have to make a GUI for python. It should show some variables (temp etc). But I don't know how I can pass variables trough GTK to the window. Any answers appreciated :) some info: I am using a RPi3, but that's nothing which is important, or is it? I have a 7" display attached, on which the program should...
Give python variables to GTK+ with an html file
0
1.2
1
0
0
104
48,093,726
2018-01-04T10:55:00.000
1
0
1
1
1
python,cygwin
1
48,096,083
0
1
0
true
0
0
just make sure you are in admin mode. i.e. right click on Cygwin, select running as administrator. then install your package specifically using pip3, for python3. i.e. pip3 install your_package with updated version, do pip3 install --upgrade your_package
1
1
0
0
I'm working on a windows 7 and using Cygwin for unix-like functionality. I can write and run Python scripts fine from the Cygwin console, and the installation of Python packages using pip installis successful and the installed package appears under pip list. However, if I try to run a script that imports these packages...
permission denied when installing python packages through cygwin
0
1.2
1
0
0
3,417
48,122,283
2018-01-05T22:38:00.000
1
0
0
0
0
python,apache,flask,virtualhost
0
48,142,441
0
2
0
false
1
0
It seems that having SERVER_NAME set in the os environment was causing this problem in conjunction with subdomains in blueprint registration. I removed SERVER_NAME from /etc/apache2/envvars and the subdomain logic and it worked.
1
2
0
0
I have a Flask app and want it to work for www.domain-a.net and www.domain-b.net behind Apache + WSGI. I can get it to work for one or the other, but can't find a way to get it to work for both. It seems that the domain which registers first is the only one that works. Preferably this would work by having two Apache Vi...
how do I get Flask blueprints to work with multiple domains?
0
0.099668
1
0
0
392
48,126,838
2018-01-06T11:25:00.000
-2
0
0
0
0
python,computational-geometry,intersection,plane
0
48,129,094
0
3
0
false
0
0
This is solved by elementary vector computation and is not substantial/useful enough to deserve a library implementation. Work out the math with Numpy. The line direction is given by the cross product of the two normal vectors (A, B, C), and it suffices to find a single point, say the intersection of the two given plan...
1
8
1
0
I need to calculate intersection of two planes in form of AX+BY+CZ+D=0 and get a line in form of two (x,y,z) points. I know how to do the math, but I want to avoid inventing a bicycle and use something effective and tested. Is there any library which already implements this? Tried to search opencv and google, but with ...
Plane-plane intersection in python
0
-0.132549
1
0
0
8,472
48,140,731
2018-01-07T19:23:00.000
0
0
1
0
0
python,conda,gurobi
0
48,141,155
1
1
0
false
0
0
I suggest the following: conda list to see what's in the environment, and how it was installed. If gurobi was installed as a conda package then use conda uninstall gurobi, if using pip then use pip uninstall gurobi.
1
0
0
0
I am using gurobi with anaconda and python, and recently downloaded an updated version (7.5.2) to update the already installed 7.0.2 version that is on my computer. I can find the conda command line prompts to remove the conda installed package, but cannot find any code anywhere to remove the 7.0.2 version from my comp...
How to remove old version of gurobi in Windows
0
0
1
0
0
1,726
48,162,075
2018-01-09T05:44:00.000
1
0
0
0
0
python,amazon-rds,apache-nifi
0
48,170,299
0
2
0
true
0
0
Question might not have been clear based on the feedback, but here is the answer to get a NiFi (running on an AWS EC2 instance) communicating with an Amazon RDS instance: On the EC2 instance, download the latest JDBC driver (wget "https://driver.jar") (If needed) Move the JDBC driver into a safe folder. Create the DBC...
1
0
0
0
I have a FlowFile and I want to insert the attributes into RDS. If this was a local machine, I'd create a DBCPConnectionPool, reference a JDBC driver, etc. With RDS, what am I supposed to do? Something similar (how would I do this on AWS)? Or am I stuck using ExecuteScript? If it's the later, is there a Python exam...
How best to interact with AWS RDS Postgres via NiFi
0
1.2
1
1
0
1,019
48,189,504
2018-01-10T14:22:00.000
0
0
0
0
0
python,turtle-graphics
0
48,210,844
0
1
0
false
0
1
OK, I have solved the situation by using: speed(0); turtle.tracer(False); turtle.bye(). The graphics window is intialized but suddenly closed.
1
0
0
0
everyone! I want to implement the Turtle into my application just for the purpose of coordinate generation. The problem is that I need to get the coordinates of turtle move (etc.) without any "pop-up window" containing the graphics or even worse animation. Is it possible somehow to disable initialization of turtle grap...
How to disable initializing of graphics window of Python Turtle
1
0
1
0
0
60
48,206,010
2018-01-11T11:29:00.000
1
0
0
1
0
python,logging,flask,uwsgi
0
48,211,175
0
1
0
false
1
0
There is no "stop" event in WSGI, so there is no way to detect when the application stops, only when the server / worker stops.
1
0
0
0
I have a Flask app that I run with uWSGI. I have configured logging to file in the Python/Flask application, so on service start it logs that the application has been started. I want to be able to do this when the service stops as well, but I don't know how to implement it. For example, if I run the uwsgi app in consol...
Logging uWSGI application stop in Python
0
0.197375
1
0
0
183
48,209,706
2018-01-11T14:43:00.000
0
0
1
0
0
python,regex
0
48,210,007
0
3
0
false
0
0
Ok, thanks. I find another solution. lista = re.findall(("PROGRAM S\d\d\S+") To find any character after the digit as repetition.
1
0
0
0
My code is as follow: list = re.findall(("PROGRAM S\d\d"), contents If I print the list I just print S51 but I want to take everything. I want to findall everything like that "PROGRAM S51_Mix_Station". I know how to put the digits to find them but I don´t know how to find everything until the next space because usually...
Regular expression help to find space after a long string
0
0
1
0
0
50
48,211,634
2018-01-11T16:21:00.000
0
0
1
1
0
python-3.x
0
51,157,311
0
1
0
false
0
0
Most of the external packages are still not supporting 3.6. Try with cx_Freeze in 3.6 else go with pyinstaller but python version should be 3.5(this works fine for me)
1
1
0
0
I need to convert my .py files into .exe files for Python 3.6.4. I have tried almost everything on Google and YouTube and none of it seems to work for me. It seems as though a lot of the explanations either gloss over the most technical aspects of installing any modules that convert .py files into .exe files or they ...
How to convert a .py file into a .exe file for Python 3.6.4
0
0
1
0
0
133
48,219,121
2018-01-12T03:24:00.000
8
0
0
0
0
python,tensorflow,neural-network,conv-neural-network
0
48,223,162
0
1
0
true
0
0
tf.layers.conv1d is used when you slide your convolution kernels along 1 dimensions (i.e. you reuse the same weights, sliding them along 1 dimensions), whereas tf.layers.conv2d is used when you slide your convolution kernels along 2 dimensions (i.e. you reuse the same weights, sliding them along 2 dimensions). So the t...
1
2
1
0
What is the difference in the functionalities of tf.layers.conv1d and tf.layers.conv2d in tensorflow and how to decide which one to choose?
Difference between tf.layers.conv1d vs tf.layers.conv2d
0
1.2
1
0
0
4,923
48,237,510
2018-01-13T06:37:00.000
0
0
0
0
0
java,android,python
0
48,238,627
0
1
0
false
1
0
If you have access to python from java android app. You can write python output in file, then in java code read that file. Or if python output is in web, you will need some web service that provides json/xml output, and then in java code you should call that web service.
1
0
0
0
I have to develop an Android application which makes use of machine learning algorithms at the back end. Now, for developing the Android app, I use Java and for implementing the machine learning algorithms I use Python. My question is how to link the Python code to an Android app written in Java. That is supposed my Py...
How to link python code to android application developed in java?
0
0
1
0
0
347
48,265,821
2018-01-15T15:18:00.000
0
1
0
0
0
python,c,popen
0
48,266,333
0
1
0
false
0
0
Probably not a full answer, but I expect it gives some hints and it is far too long for a comment. You should think twice about your requirements, because it will probably not be that easy depending on your proficiency in C and what OS you are using. If I have correctly understood, you have a sensor that sends data (w...
1
0
0
0
I have a flow sensor that I have to read with c because python isn't fast enough but the rest of my code is python. What I want to do is have the c code running in the background and just have the python request a value from it every now and then. I know that popen is probably the easiest way to do this but I don't ful...
How to read a sensor in c but then use that input in python
0
0
1
0
0
215
48,272,093
2018-01-15T23:26:00.000
1
0
0
0
0
python,amazon-redshift,etl,emr,amazon-emr
0
48,276,498
0
1
0
false
0
0
I suppose your additional columns are measures, not dimensions. So you can keep the dimensions in the individual columns and include them into sort key, and store measures in JSON, accessing them whenever you need. Also if you can distinguish between frequently used measures vs. occasional you can store the frequently ...
1
0
0
0
Scenario: I have a Source which maintains the transactions data. They have around 900 columns and based on the requirements of the new business, they add additional columns. We are a BI team and we only extract around 200 columns which are required for our reporting. But when new business is launched / new analysis is ...
ETL for a frequently changing Table structure
1
0.197375
1
1
0
131
48,273,001
2018-01-16T01:45:00.000
0
0
0
1
0
python,parallel-processing,fabric
0
48,341,150
0
1
0
true
0
0
The task1 did not run at all because running a command with & in Fabric does not work. It is because, in linux when you log out of a session all the processes associated with it are terminated. So if you want to make sure a command keeps running even after you log out of the session you need to run it like this: run('n...
1
0
0
0
For my automation purposes, I'm using Fabric. But I could not run 2 tasks at the same time? For example, I want to run task 1 to collect data in the tmp folder. I want to run task 2 which will generate data and put in tmp. Tas1 2 will be running a bit before task 2. Here is my sudo code: output1 = run("./task1_data_log...
Running 2 tasks at the same time using Fabric
0
1.2
1
0
0
114
48,273,710
2018-01-16T03:33:00.000
0
0
1
0
0
python,compare,difflib
0
48,273,885
0
2
0
false
0
0
You may use below set(str1).intersection(set(str2)) which will give you the difference of the two list.
1
0
0
0
I'm relatively new to python and I am using difflib to compare two files and I want to find all the lines that don't match. The first file is just one line so it is essentially comparing against all the lines of the second file. When using difflib, the results show the '-' sign in front of the lines that don't match an...
difflib and removing lines even without + in front of them python
0
0
1
0
0
252
48,302,876
2018-01-17T13:57:00.000
1
0
0
0
1
python,pandas
0
48,303,455
0
1
0
false
0
0
I think the problem is related to the fact that I was trying to assign a None to a bool Series, then it just tries to convert to a different type (why not object?) Fixed changing the dtype to object first: dataframe.foo = dataframe.foo.astype(object). Works like a charm now.
1
0
1
0
I'm facing a weird issue on Pandas now, not sure if a pandas pitfall or just something I'm missing... My pd.Series is just foo False False False > a.foo.dtype dtype('bool') When I use a dataframe.set_value(index, col, None), my whole Series is converted to dtype('float64') (same thing applies to a.at[index, col] = No...
dtype changes after set_value/at
0
0.197375
1
0
0
37
48,309,776
2018-01-17T20:50:00.000
0
1
0
0
0
python,selenium,automated-tests,modular
0
48,311,473
0
1
0
false
0
0
You don't really want your tests to be sequential. That breaks one of the core rules of unit tests where they should be able to be run in any order. You haven't posted any code so it's hard to know what to suggest but if you aren't using the page object model, I would suggest that you start. There are a lot of resource...
1
0
0
0
Edited Question: I guess I worded my previous question improperly, I actually want to get away from "unit tests" and create automated, modular system tests that build off of each other to test the application as whole. Many parts are dependent upon the previous pages and subsequent pages cannot be reached without firs...
Is it possible to make sequential tests in Python-Selenium tests?
1
0
1
0
1
150
48,323,434
2018-01-18T14:20:00.000
2
0
1
0
0
javascript,python,regex,regex-negation,regex-group
0
48,323,646
0
2
0
false
0
0
(^|\s)(\w*(\.))+ - this may satisfy the sample text you've posted. You can find all '.' in third group UPDATE: if in your text you have words, started with any other symbol, for instance, #asd.qwe.zxc, you can improve your reg exp: (^|\s)[^@]?(\w*(\.))+
1
1
0
0
assuming the following sentence: this is @sys.any and. here @names hello. and good.bye how would I find all the '.' besides the ones appearing in words that start with @? disclaimer, been playing at regex101 for over 2 hours now after reading a few answers on SO and other forums.
Regex find char '.' except for words starting with @
0
0.197375
1
0
0
98
48,330,515
2018-01-18T21:21:00.000
1
0
0
0
1
python,flask
0
48,330,614
0
3
0
false
1
0
to make an application works with public host you have to make sure enabling port forwarding in your modem device, you can etablish a cnx with the nginx server
2
0
0
0
So I've currently got a flask app that I'm using to run a testing app, (this works on local host) but I cant work out how to launch it so I can test the connectivity from other devices (public). can someone explain how I can go about launching it, or at least point me in the right direction to some documentation about ...
Launching a flask app/website so other networks can connect
0
0.066568
1
0
0
243
48,330,515
2018-01-18T21:21:00.000
0
0
0
0
1
python,flask
0
48,330,687
0
3
0
false
1
0
If you change the ip address of the flask server from the default 0.0.0.0 to your the ip address of your computer (eg 192.168.1.2) the other clients on your local network can connect. If you want to expose your app the whole of the internet you should get a host that (eg try heroku.com) that has a fixed ip assigned and...
2
0
0
0
So I've currently got a flask app that I'm using to run a testing app, (this works on local host) but I cant work out how to launch it so I can test the connectivity from other devices (public). can someone explain how I can go about launching it, or at least point me in the right direction to some documentation about ...
Launching a flask app/website so other networks can connect
0
0
1
0
0
243
48,344,081
2018-01-19T15:09:00.000
0
0
0
0
1
python,minimization,simulated-annealing
0
48,346,637
0
1
0
false
0
0
Gonna answer my own question here. I climbed into the actual .cpp code and found the answers. In Corana's method, you select how many total iterations N of annealing you want. Then the minimization is a nested series of loops where you vary the step sizes, number of step-size adjustments, and temperature values at user...
1
0
1
0
I'm using the PYGMO package to solve some nasty non-linear minimization problems, and am very interested in using their simulated_annealing algorithm, however it has a lot of hyper-parameters for which I don't really have any good intuition. These include: Ts (float) – starting temperature Tf (float) – final temperatu...
PAGMO/PYGMO: Anyone understand the options for Corana’s Simulated Annealing?
0
0
1
0
0
175
48,349,091
2018-01-19T20:32:00.000
0
0
1
0
0
python,c,gcc
0
48,350,932
0
1
0
false
0
0
Well assuming you want to handle all type of projects and their dependencies (which is not easy) the best way is to have a module that generates a Makefile for the project and use it to compile and solve all dependencies
1
0
0
0
I'm trying to build a simple IDE that is web based in Python. For now, this IDE will support C only. I know it is possible to call the gcc with Python to compile and run a single C file. But what if I would like to compile and run multiple C files from a single project (i.e. linking .h files and .c files), is this poss...
Calling gcc to compile multiple files with Python
1
0
1
0
0
330
48,353,544
2018-01-20T07:00:00.000
0
0
0
0
0
python,python-3.x,amazon-redshift,aws-glue
0
54,622,059
0
3
0
false
0
0
AWS Glue should be able to process all the files in a folder irrespective of the name in a single job. If you don’t want the old file to be processed again move it using boto3 api for s3 to another location after each run.
1
1
1
0
Within AWS Glue how do I deal with files from S3 that will change every week. Example: Week 1: “filename01072018.csv” Week 2: “filename01142018.csv” These files are setup in the same format but I need Glue to be able to change per week to load this data into Redshift from S3. The code for Glue uses native Python as the...
Aws Glue - S3 - Native Python
0
0
1
0
0
292
48,370,499
2018-01-21T18:54:00.000
0
1
0
0
0
python,django,django-apps
0
48,372,180
0
2
1
false
1
0
as a simple idea the inserting of new msg in database should be with a condition to limit their numbers (the count of the previous msg isn't > max ) another method : you will show the input of the msg jsut when (selet * form table where userid=sesion and count(usermsg)< max )
1
3
0
0
I have been using Django Postman for a few weeks now, and in order to limit the number of messages sent by each user, I have been wondering what would be the best way to limit the number of messages a user can send a day, a week... using Django-postman? I have been browsing dedicated documentation for weeks too in ord...
Is it possible to limit the number of messages a user can send a day with Django postman?
1
0
1
0
0
427
48,386,293
2018-01-22T16:37:00.000
3
0
0
0
0
python,arrays,algorithm
0
48,389,275
0
1
0
false
0
0
Here is my approach that I managed to come up with. First of all we know that the resulting array will contain N+M elements, meaning that the left part will contain (N+M)/2 elements, and the right part will contain (N+M)/2 elements as well. Let's denote the resulting array as Ans, and denote the size of one of its part...
1
1
1
0
I'm working on a competitive programming problem where we're trying to find the median of two sorted arrays. The optimal algorithm is to perform a binary search and identify splitting points, i and j, between the two arrays. I'm having trouble deriving the solution myself. I don't understand the initial logic. I will ...
How to find the median between two sorted arrays?
0
0.53705
1
0
0
711
48,408,263
2018-01-23T18:13:00.000
2
0
1
0
0
python,python-3.x,list,loops
1
48,408,389
0
1
0
false
0
0
You only need to remember the sum and the number of inputs in two variables that are updated when the user writes a number. When the user enters 'done', compute the mean (sum / number_of_inputs).
1
0
0
0
I'm a beginner and my textbook just covered iterations and loops in Python. Lists have only been given cursory coverage at this point. The exercise I'm struggling with is this: Write a program which repeatedly reads numbers until the user enters "done". Once "done" is entered print out the total, count and average of...
Possible to write a loop in Python that stores user input for future manipulation without using append?
0
0.379949
1
0
0
89
48,435,165
2018-01-25T03:29:00.000
3
0
1
0
0
python,generator,yield
0
48,435,262
0
2
0
true
0
0
Simply put, yield delays the execution but remembers where it left off. However, more specifically, when yield is called, the variables in the state of the generator function are saved in a "frozen" state. When yield is called again, the built in next function sends back the data in line to be transmitted. If there is ...
1
3
0
0
I understand generator generates value once at a time, which could save a lot memory and not like list which stores all value in memory. I want to know in python, how yield knows which value should be returned during the iteration without storing all data at once in memory? In my understanding, if i want to print 1 to...
where does the yield store value in python
1
1.2
1
0
0
1,899
48,453,620
2018-01-25T23:32:00.000
1
0
0
0
0
java,python,arrays,jython
0
48,453,704
0
3
0
false
1
0
If you want a simple solution then I suggest that you write and read the integers to a file. Perhaps not the most elegant way but it would only take a couple of minutes to implement.
3
0
0
1
I have a java program and I need it to get some data calculated by a python script. I've already got java to send an integer to python via jython's PythonInterpreter and displayed it, but I can't recover it to make other operations. Also, it would be great to send a full integer array rather than a single integer but ...
How can I send a data array back and forth between java and python?
0
0.066568
1
0
0
298
48,453,620
2018-01-25T23:32:00.000
0
0
0
0
0
java,python,arrays,jython
0
48,453,799
0
3
0
false
1
0
If the solution of writing/reading the numbers to a file somehow is not sufficient, you can try the following: Instead of using Jython, you can use Pyro4 (and the Pyrolite client library for your java code) to call a running Python program from your java code. This allows you to run your python code in a 'normal' pytho...
3
0
0
1
I have a java program and I need it to get some data calculated by a python script. I've already got java to send an integer to python via jython's PythonInterpreter and displayed it, but I can't recover it to make other operations. Also, it would be great to send a full integer array rather than a single integer but ...
How can I send a data array back and forth between java and python?
0
0
1
0
0
298
48,453,620
2018-01-25T23:32:00.000
1
0
0
0
0
java,python,arrays,jython
0
48,454,007
0
3
0
false
1
0
I've worked on similar project. Here's brief outline of what Java and Python was doing respectively. Java We used Java as a main server for receiving requests from clients and sending back responses after some data manipulation. Python Python was in charge of data manipulation or calculation. Data was sent from Java v...
3
0
0
1
I have a java program and I need it to get some data calculated by a python script. I've already got java to send an integer to python via jython's PythonInterpreter and displayed it, but I can't recover it to make other operations. Also, it would be great to send a full integer array rather than a single integer but ...
How can I send a data array back and forth between java and python?
0
0.066568
1
0
0
298
48,466,626
2018-01-26T17:34:00.000
0
0
0
1
1
python,linux,server,nohup,foreground
0
48,466,757
0
1
0
false
0
0
If you nohup a process, when you log out the parent of the process switches to being init (1) and you can't get control of it again. The best approach is to have the program open a socket and then use that for ipc. You probably want to split your code in to 2 pieces - a daemon that runs in the background and keeps a so...
1
1
0
0
I am working on a chat program with Python. I would like to use nohup because users always can access server when I am logout. I could run nohup very well. It was great.But I am a admin and I can write messages,and can see online users as using python. after I worked nohup, and logout, when I login I can't access the ...
Access a progress that work background with nohup (LINUX) -get foreground
0
0
1
0
0
122
48,478,792
2018-01-27T17:57:00.000
1
0
0
0
1
python-3.x,video,pyqt5
0
49,198,231
0
1
0
false
0
1
Okay, so I couldn't find anything on "MP4 and green line" so I looked at how to modify the PyQt5 interface as a way of hiding the issue. The option I chose was QGroupBox and changing the padding in the stylesheet to -9 (in my particular case - you may find another value works better but it depends on the UI). I did att...
1
0
0
0
I've made a desktop app using Python 3 and PyQt 5 and it works except for the playback of the MP4 video files (compiled by pyrcc5). They are visible and play on the video widget but there is a green line down the right side. I tried to put a green frame (using a Style Sheet) around the QVideoWidget but with no success....
Python 3, PyQt 5 - MP4 as resource file issue
0
0.197375
1
0
0
273
48,480,183
2018-01-27T20:24:00.000
0
0
0
0
0
python,python-3.x,postgresql,psycopg2,tor
0
48,602,297
0
1
0
false
0
0
This would be easy enough if I simply opened the database VPS to accept connections from anywhere Here lies your issue. Just simply lock down your VPS using fail2ban and ufw. Create a ufw role to only allow connection to your Postgres port from the IP address you want to give access from to that VPS ip address. This ...
1
0
0
0
I'm creating a Python 3 spider that scrapes Tor hidden services for useful data. I'm storing this data in a PostgreSQL database using the psycopg2 library. Currently, the spider script and the database are hosted on the same network, so they have no trouble communicating. However, I plan to migrate the database to a re...
Connect to remote PostgreSQL server over Tor? [python] [Tor]
0
0
1
1
0
367
48,481,203
2018-01-27T22:28:00.000
0
1
1
1
0
python,atom-editor
0
48,512,683
0
1
0
true
0
0
Only way I can change Atom python is to run it from a directory that has a different default python version. if I type python from a terminal window, whichever version of python that opens is the version Atom uses. I use virtual environments so I can run python 2.7.13 or python 3.6. If I want Atom to run python 3, I ac...
1
0
0
0
I have downloaded Anaconda on my computer however Anaconda is installed for all users on my mac therefore when I try and access python2.7 by typing in the path: /anaconda3/envs/py27/bin:/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin Even if I open from terminal the path above is not in the current director...
Atom script configure script run python 2.7
0
1.2
1
0
0
423
48,481,801
2018-01-27T23:59:00.000
1
0
1
0
0
python,encoding
0
48,481,828
0
2
0
false
0
0
Found the solution. repr() will do.
1
1
0
0
I am encoding Chinese characters using gb18030 in python. I want to access part of the encoded string. For example, the string for 李 is: '\xc0\xee'. I want to extract 'c0' and 'ee' out of this. However, python is not treating '\xc0\xee' as a 8 character string, but as a 2 character string. How I do turn it into a 8 cha...
how to access part of a encoded (gb18020) string in python
0
0.099668
1
0
0
16
48,494,296
2018-01-29T04:13:00.000
-1
0
1
0
0
python,loops,binary
0
48,494,319
0
4
0
false
0
0
A binary string has been defined as a string that only contains "0" or "1". So, how about checking each 'character' in the string, and if it's not a "0" or "1" you will know that the string is not a binary string.
1
0
0
0
The question on my assignment is as follows: Write a function that takes, as an argument, a string, identified by the variable aString. If the string only contains digits 0 and 1, return the string formed by concatenating the argument with the string "is a binary string." Otherwise, return a string indicating the leng...
Python Binary String Loop
0
-0.049958
1
0
0
2,689
48,501,645
2018-01-29T12:47:00.000
0
0
0
0
0
windows,python-3.x,powershell,winrm,wsman
0
64,877,092
0
1
0
false
0
0
Actually, I had a quick look at the code of wirm (as of 20201117) and the "Session" is not an actual session in the traditional sense, but only an object holding the creds to authenticate. Each time run_cmd or run_ps is invoked, a session in opened on the target and closed on completion of the task. So there's nothing ...
1
3
0
0
hello I'm using PyWinRM to poll a remote windows server. s = winrm.Session('10.10.10.10', auth=('administrator', 'password')) As there is no s.close() function available, I am worried about leaking file descriptors. I've checked by using lsof -p <myprocess> | wc -l and my fd count is stable but my google searches sh...
how do you close a Pywinrm session?
0
0
1
0
0
987
48,503,540
2018-01-29T14:27:00.000
0
0
0
0
0
python,graph,networkx
0
48,504,499
0
2
0
false
0
0
I guess you can use a directed graph and store the direction as an attribute if you don't need to represent that directed graph.
2
0
0
0
I'm looking for a way to implement a partially undirect graph. This is, graphs where edges can be directed (or not) and with different type of arrow (>, *, #, etc.). My problem is that when I try to use undirect grpah from Networkx and stored arrow type as an attribute, I don't find an efficient way to tell networkx ...
Partially undirect graphs in Networkx
0
0
1
0
1
215
48,503,540
2018-01-29T14:27:00.000
0
0
0
0
0
python,graph,networkx
0
48,583,218
0
2
0
true
0
0
After search it in a lot of different sources, the only way to do a partial undirect graph I've found it is this is through adjacent matrices. Networkx has a good tools to move between graph and adjacent matrix (in pandas and numpy array format). The disadvantage is if you need networkx functions you have to program ...
2
0
0
0
I'm looking for a way to implement a partially undirect graph. This is, graphs where edges can be directed (or not) and with different type of arrow (>, *, #, etc.). My problem is that when I try to use undirect grpah from Networkx and stored arrow type as an attribute, I don't find an efficient way to tell networkx ...
Partially undirect graphs in Networkx
0
1.2
1
0
1
215
48,525,733
2018-01-30T16:03:00.000
0
0
0
0
0
python,tensorflow,amazon-s3,amazon-sagemaker
0
48,531,968
0
1
0
false
1
0
Create an object in S3 and enable versioning to the bucket. Everytime you change the model and save it to S3, it will be automatically versioned and stored in the bucket. Hope it helps.
1
0
1
0
I am executing a Python-Tensorflow script on Amazon Sagemaker. I need to checkpoint my model to the S3 instance I am using, but I can't find out how to do this without using the Sagemake Tensorflow version. How does one checkpoint to an S3 instance without using the Sagemaker TF version?
TensorFlow Checkpoints to S3
0
0
1
0
0
895
48,528,477
2018-01-30T18:46:00.000
0
0
1
0
0
python,anaconda,packages,python-idle
0
48,535,641
0
2
0
false
0
0
The IDLE that comes with python 3.5.2 can only be run by python 3.5.2. Code you submit to python 3.5.2 through that IDLE can normally only access packages installed for 3.5.2, plus your own code. I believe Anaconda 3.6.3 comes with Python 3.6.3 and the 3.6.3 standard library, including the 3.6.3 version of idlelib. I...
1
1
0
0
The title says it all i want to be able to use the packages that are installed with anaconda with idle so are there any ways of making this work? When i try to import packages with idle that i installed using anaconda it says package not found. I need some help please and thank you in advance.
how can i get IDLE (Python) to use packages installed by anaconda (windows 7 32bit)?
1
0
1
0
0
3,178
48,532,069
2018-01-30T23:20:00.000
1
0
0
0
1
python-3.x,machine-learning,deep-learning,computer-vision,imblearn
0
48,550,016
0
2
0
false
0
0
Thanks for the clarification. In general, you don't oversample with Python. Rather, you pre-process your data base, duplicating the short-handed classes. In the case you cite, you might duplicate everything in class B, and make 5 copies of everything in class C. This gives you a new balance of 1000:600:500, likely ...
1
3
1
0
I am working on a multiclass classification problem with an unbalanced dataset of images(different class). I tried imblearn library, but it is not working on the image dataset. I have a dataset of images belonging to 3 class namely A,B,C. A has 1000 data, B has 300 and C has 100. I want to oversample class B and C, so ...
How to oversample image dataset using Python?
0
0.099668
1
0
0
2,828
48,545,255
2018-01-31T15:03:00.000
3
0
1
0
0
python,visual-studio-2015,static-libraries,libcmtd
1
49,984,841
0
1
0
true
0
0
This is what I needed to do to build and use python statically embedded in another application. To build the static python library (e.g., python36_d.lib, python36.lib) Convert ALL projects in the python solution (pcbuild.sln) to static. This is about 40 projects, so it may take awhile. This includes setting library...
1
2
0
0
I am working with the 3.6.4 source release of Python. I have no trouble building it with Visual Studio as a dynamic library (/MDd) I can link the Python .dll to my own code and verify its operation. But when I build it (and my code) with (/MTd) it soon runs off the rails when I try to open a file with a Python program....
I cannot build python.dll as a static library (/MTd) using Visual Studio
0
1.2
1
0
0
1,688
48,558,151
2018-02-01T08:18:00.000
7
0
0
0
0
user-interface,automation,sl4a,pyautogui,qpython3
0
48,928,935
0
2
0
false
0
1
Something like PyAutoGui for Android is AutoInput. It's a part of the main app Tasker. If you've heard about Tasker, then you know what I'm taking about. If not, them Tasker is an app built to automate your Android Device. If you need specific taps and scrolls, then you can install the plug-in Auto Input for Tasker. I...
2
3
0
0
I'm currently using Qpython and Sl4A to run python scripts on my Droid device. Does anybody know of a way to use something like PyAutoGUI on mobile to automate tapping sequences (which would be mouse clicks on a desktop or laptop)? I feel like it wouldn't be too hard, but I'm not quite sure how to get the coordinates f...
Way to use something like PyAutoGUI on Mobile?
1
1
1
0
0
8,687
48,558,151
2018-02-01T08:18:00.000
2
0
0
0
0
user-interface,automation,sl4a,pyautogui,qpython3
0
66,658,332
0
2
0
false
0
1
Unfortunately no. PyAutoGUI only runs on Windows, macOS, and Linux
2
3
0
0
I'm currently using Qpython and Sl4A to run python scripts on my Droid device. Does anybody know of a way to use something like PyAutoGUI on mobile to automate tapping sequences (which would be mouse clicks on a desktop or laptop)? I feel like it wouldn't be too hard, but I'm not quite sure how to get the coordinates f...
Way to use something like PyAutoGUI on Mobile?
1
0.197375
1
0
0
8,687
48,567,012
2018-02-01T16:05:00.000
5
0
0
0
0
python,machine-learning,scikit-learn,keras
0
48,573,176
0
2
0
true
0
0
Metrics in Keras and in Sklearn mean different things. In Keras metrics are almost same as loss. They get called during training at the end of each batch and each epoch for reporting and logging purposes. Example use is having the loss 'mse' but you still would like to see 'mae'. In this case you can add 'mae' as a m...
1
2
1
0
Tried googling up, but could not find how to implement Sklearn metrics like cohen kappa, roc, f1score in keras as a metric for imbalanced data. How to implement Sklearn Metric in Keras as Metric?
How to implement Sklearn Metric in Keras as Metric?
0
1.2
1
0
0
2,808
48,572,258
2018-02-01T21:46:00.000
0
0
1
0
0
python,mongodb,ssl,eve
0
48,727,022
0
1
0
true
0
0
Resolved by passing required parameters (ssl, ssl_ca_certs, etc) to MongoClient via MONGO_OPTIONS setting.
1
0
0
1
MongoDB uses self-signed certificate. I want to setup service on EVE to work with it. I searched documentation and SO but found only information how to use self-signed cert to access EVE itself. What should I do to connect to MongoDB from EVE with self-signed certificate?
Connect to MongoDB with self-signed certificate from EVE
0
1.2
1
1
0
228
48,573,443
2018-02-01T23:30:00.000
-1
0
0
1
0
python,bash,pycharm,sh
0
48,573,531
0
1
0
false
0
0
You should be able to go to Run->Edit Configurations and then add configurations, including an Interpreter path where you can set the path to your virtualenv bash executable
1
0
0
0
So I'm not sure how to word this correctly but I have a .sh file that I use to turn on my python app and it runs fine when I run this command ./start_dev.sh in my terminal. But I am having trouble trying to have it run in pycharm because my app is run in Ubuntu and I don't know how to direct the interpreter path to my ...
Unable to get pycharm to run my .sh file
0
-0.197375
1
0
0
1,297
48,573,989
2018-02-02T00:32:00.000
1
0
1
0
1
python,python-2.7,jupyter-notebook,exe
0
48,626,144
0
1
0
false
0
0
Try exporting your .ipynb file to a normal .py file and running pyinstaller on the .py file instead. You can export as .py by going to File > Download As > Python (.py) in the Jupyter Notebook interface
1
0
0
0
I am using jupyter notebook for coding, hence my file format is ipynb. I would like to turn this piece of code into an executable file .exe for later uses. So far I have managed to get the exe file by going to anaconda prompt, executed the following command ---> pyinstaller --name ‘name of the exe’ python_code.ipynb Th...
ipynb python file to executable exe file
1
0.197375
1
0
0
7,843
48,584,712
2018-02-02T14:23:00.000
0
0
0
1
0
python,multithreading,asynchronous
0
48,588,092
0
2
0
false
1
0
Celery will be your best bet - it's exactly what it's for. If you have a need to introduce dependencies, it's not a bad thing to have dependencies. Just as long as you don't have unneeded dependencies. Depending on your architecture, though, more advanced and locked-in solutions might be available. You could, if you'...
1
0
0
0
I have seen a few variants of my question but not quite exactly what I am looking for, hence opening a new question. I have a Flask/Gunicorn app that for each request inserts some data in a store and, consequently, kicks off an indexing job. The indexing is 2-4 times longer than the main data write and I would like to...
Flask: spawning a single async sub-task within a request
1
0
1
0
0
500
48,595,683
2018-02-03T09:01:00.000
0
0
1
0
0
python,sql,sql-server
0
48,687,137
0
2
1
false
0
0
First install the MySQL connector for python from the MySQL website and then import the mysql.connector module and initialize a variable to a mysql.connector.connect object and use cursors to modify and query data. Look at the documentation for more help. If you don't have problem with no networking capabilities and le...
1
1
0
0
I have some experience with SQL and python. In one of my SQL stored procedures I want to use some python code block and some functions of python numpy. What is the best way to do it.SQL server version is 2014.
how to use python inside SQL server 2014
0
0
1
1
0
662
48,600,583
2018-02-03T18:27:00.000
0
0
1
0
1
python,node.js,rest,api,web-services
0
48,600,936
0
1
0
false
1
0
In terms of thoughts: 1) You can build a REST interface to your python code using Flask. Make REST calls from your nodejs. 2) You have to decide if your client will wait synchronously for the result. If it takes a relatively long time you can use a web hook as a callback for the result.
1
0
0
0
I have the bulk of my web application in React (front-end) and Node (server), and am trying to use Python for certain computations. My intent is to send data from my Node application to a Python web service in JSON format, do the calculations in my Python web service, and send the data back to my Node application. Fla...
Python web service with React/Node Application
0
0
1
0
1
415
48,611,425
2018-02-04T18:10:00.000
5
0
0
0
0
python,socket.io,webserver,flask-socketio,eventlet
0
48,616,158
0
2
0
true
1
0
The eventlet web server supports concurrency through greenlets, same as gevent. No need for you to do anything, concurrency is always enabled.
1
2
0
0
I’ve started working a lot with Flask SocketIO in Python with Eventlet and are looking for a solution to handle concurrent requests/threading. I’ve seen that it is possible with gevent, but how can I do it if I use eventlet?
Handle concurrent requests or threading Flask SocketIO with eventlet
1
1.2
1
0
1
2,111
48,649,927
2018-02-06T18:49:00.000
0
0
0
1
0
eclipse,python-3.x,pandas,pydev
0
71,702,890
0
2
0
false
0
0
I faced same problem when working with eclipse pydev project. here are steps that helped me resolve the issue In eclipse open the workspace, click on Windows->Preferences->pydev-> interpreters-> python interpreter -> Click on Manage with PIP In Command to execute , enter install pandas. Problem solved
1
1
0
0
I have installed python 3.6.4 on my MAC OS and have Eclipse neon 2.0 running. I have added pydev plugin to work on python projects. I need to import pandas library, but there is no such option as windows -> preferences -> libraries Can someone help me with any other way to install python libraries in neon 2. And also ...
installing pandas in pydev eclipse neon 2
0
0
1
0
0
1,889
48,656,958
2018-02-07T06:00:00.000
0
1
0
0
0
python,probability,blockchain
0
48,712,283
0
1
0
false
0
0
I figured this out, the solution is below: int(hashlib.sha256(block_header + userID).hexdigest(), 16) / float(2**256) You conver the hash into an integer, then divide that integer by 2**256. This gives you a decimal from 0 to 1 that can be compared to a random.random() to get the prize.
1
0
0
0
I'm building a project that does a giveaway every Monday. There are three prizes, the basic prize, the "lucky" prize, and the jackpot prize. The basic prize is given out 70% of the time, the lucky prize gets given out 25% of the time and the jackpot prize gets rewarded the final 5% of the time. There are multiple peopl...
Assigning giveaways based on cryptocurrency block header
0
0
1
0
0
27
48,675,264
2018-02-07T23:51:00.000
0
0
0
0
0
python,ftp,ftplib
0
48,761,226
0
1
0
false
0
0
No. Using FTP.retrlines('LIST') is the only solution with FTP protocol. If you need a faster approach, you would have to use another interface. Like shell, some web API, etc.
1
0
0
0
I was wondering if there was an effective way to recursively search for a given filename using ftplib. I know that I could use FTP.cwd() and FTP.retrlines('LIST), but I think that it would be rather repetitive and inefficient. Is there something that lets me find files on an FTP server in Python, such as how os can do ...
Finding a file in an FTP server using ftplib
0
0
1
0
0
198
48,677,643
2018-02-08T04:38:00.000
0
0
0
0
0
python,django
0
48,680,841
0
1
0
false
1
0
Load balancing is not anything to do with Django. It is something you implement at a much higher layer, via servers that sit in front of the machines that Django is running on. However, if you've just started creating your site, it is much too early to start thinking about this.
1
2
0
0
I have a Django server which responds to a call like this 127.0.0.1:8000/ao/. Before adding further applications to the server, I would like to experiment the load balancing which are supported by Django. Can anyone please explain how to implement load balancing. I spent sometime in understanding the architecture but w...
load balancing in django
0
0
1
0
0
2,681
48,698,110
2018-02-09T03:04:00.000
2
0
0
0
0
python,rest,http,react-native,server
0
48,718,794
0
2
0
false
0
0
You have to create a flask proxy, generate JSON endpoints then use fetch or axios to display this data in your react native app. You also have to be more specific next time.
1
2
0
0
I'm learning about basic back-end and server mechanics and how to connect it with the front end of an app. More specifically, I want to create a React Native app and connect it to a database using Python(simply because Python is easy to write and fast). From my research I've determined I'll need to make an API that com...
How to create a Python API and use it with React Native?
0
0.197375
1
0
1
6,331
48,699,357
2018-02-09T05:38:00.000
0
0
0
0
0
python,lmfit
0
48,707,014
0
1
0
true
0
0
More detail about what you are actually doing would be helpful. That is, vague questions can really only get vague answers. Assuming you are doing curve fitting with lmfit's Model class, then once you have your Model and a set of Parameters (say, after a fit has refined them to best match some data), then you can use ...
1
0
1
0
I have fitted a curve using lmfit but the trendline/curve is short. Please how do I extend the trendline/curve in both directions because the trendline/curve is hanging. Sample codes are warmly welcome my senior programmers. Thanks.
Extending a trendline in a lmfit plot
0
1.2
1
0
0
213
48,700,554
2018-02-09T07:15:00.000
14
0
0
0
0
python,rasa-nlu,rasa-core
0
49,782,296
0
1
1
true
0
0
RASA NLU is the natural language understanding piece, which is used for taking examples of natural language and translating them into "intents." For example: "yes", "yeah", "yep" and "for sure" would all be translated into the "yes" intent. RASA CORE on the other hand is the engine that processes the flow of conversat...
1
2
1
0
I am new to chatbot application and RASA as well, can anyone please help me to understand how should i use RASA NLU with RASA CORE.
How to use RASA NLU with RASA CORE
0
1.2
1
0
0
1,115
48,702,629
2018-02-09T09:28:00.000
0
0
1
0
0
python,queue,priority-queue
0
48,710,792
0
1
0
false
0
0
Since all items are arranged in a prioritised manner, just extract them in the way they come out...as it is a queue. Or you could apply more conditions on how you would like to arrange the items with same priorities among themselves.
1
0
0
0
Basically, no counter is allowed. No iterables (arrays, dictionaries, etc.) allowed either to store insertion. There are two linked lists: one storing odd insertions and even insertions. Each node has the priority, and the object. Is there any pattern you can find? Or is this impossible? Edit: sorry for not mentioning...
Priority Queue: If two objects have same priority, how do I determine which to extract?
0
0
1
0
0
240
48,715,867
2018-02-10T00:08:00.000
0
0
0
0
0
python,scikit-learn,time-series,svm
0
48,715,905
0
2
0
false
0
0
given multi-variable regression, y = Regression is a multi-dimensional separation which can be hard to visualize in ones head since it is not 3D. The better question might be, which are consequential to the output value `y'. Since you have the code to the loadavg in the kernel source, you can use the input parameters...
1
0
1
0
I have a dataset of peak load for a year. Its a simple two column dataset with the date and load(kWh). I want to train it on the first 9 months and then let it predict the next three months . I can't get my head around how to implement SVR. I understand my 'y' would be predicted value in kWh but what about my X value...
support vector regression time series forecasting - python
0
0
1
0
0
2,181
48,730,694
2018-02-11T10:49:00.000
0
0
0
0
1
python,jquery,django,django-rest-framework
0
48,730,768
0
2
0
false
1
0
as per my experience and knowledge, you are almost going towards correct direction. my recommendation is for making backend rest api Django and django rest framework is the best option however for consuming those api you can look for the angular or react both works very well in terms of consuming API.
1
0
0
0
I am currently developing my first more complex Web Application and want to ask for directions from more experienced Developers. First I want to explain the most important requirements. I want to develop a Web App (no mobile apps or desktop apps) and want to use as much django as possible. Because I am comfortable with...
Design Decision Django Rest Framework - Django as Frontend
1
0
1
0
0
548
48,738,338
2018-02-12T01:22:00.000
0
0
0
0
0
python,artificial-intelligence
0
51,712,117
0
1
0
false
0
0
You can just measure the loudness of the voice command spoken in mDb. You can then process these numbers to change the UI. Like , higher the loudness makes the bar longer. Let me know which speech to text engine are you using so that I can provide further help.
1
0
0
0
So basically I have created an A.I assistant and was wondering if anyone had suggestions on how to make visuals that react with the sound?
Making my Artificial Intelligence visuals that react with sound change
0
0
1
0
0
41
48,738,650
2018-02-12T02:10:00.000
2
1
1
0
0
python,algorithm,pow,modular-arithmetic,cryptanalysis
0
48,738,710
1
2
0
false
0
0
It sounds like you are trying to evaluate pow(a, b) % c. You should be using the 3-argument form, pow(a, b, c), which takes advantage of the fact that a * b mod c == a mod c * b mod c, which means you can reduce subproducts as they are computed while computing a ^ b, rather than having to do all the multiplications fir...
1
1
0
0
I am trying to calculate something like this: a^b mod c, where all three numbers are large. Things I've tried: Python's pow() function is taking hours and has yet to produce a result. (if someone could tell me how it's implemented that would be very helpful!) A right-to-left binary method that I implemented, with O(lo...
How to implement modular exponentiation?
0
0.197375
1
0
0
1,213
48,753,128
2018-02-12T18:28:00.000
0
0
0
0
0
python,rstudio,r-markdown,python-import
0
49,017,753
0
1
0
false
0
0
First I had to make a setup.py file for my project. activate the virtual environment corresponding to my project source activate, then run python setup.py develop Now, I can import my own python library from R as I installed it in my environment.
1
0
1
0
I have developed few modules in python and I want to import them to rstudio RMarkdown file. However, I am not sure how I can do it. For example, I can't do from code.extract_feat.cluster_blast import fill_df_by_blast as fill_df as I am used to do it in pycharm. Any hint? Thanks.
Import my python module to rstudio
0
0
1
0
0
378
48,757,970
2018-02-13T00:58:00.000
0
0
1
0
1
tensorflow,ipython
1
48,777,636
0
1
0
false
0
0
I think I figured out the problem. pip was pointing to /Library/Frameworks/Python.framework/Versions/3.4/bin/pip My ipython was pointing to /opt/local/bin/ipython I re-installed tensorflow within my virtual environment by calling /opt/local/bin/pip-2.7 install --upgrade tensorflow Now I can use tensorflow within ipytho...
1
0
1
0
tensorflow works using python in a virtualenv I created, but tensorflow doesn't work in the same virtualenv with ipython. This is the error I get: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the pac...
Running tensorflow in ipython
0
0
1
0
0
213
48,759,535
2018-02-13T04:35:00.000
0
0
0
0
0
python,tensorflow,computer-vision
0
48,761,331
0
1
0
true
0
0
The scores argument decides the sorting order. The method tf.image.non_max_suppression goes through (greedily, so all input entries are covered) input bounding boxes in order decided by this scores argument, selects only those bounding boxes from them which are not overlapping (more than iou_threshold) with boxes alrea...
1
1
1
0
I read the document about the function and I understood how NMS works. What I'm not clear is scores argument to this function. I think NMS first look at bottom right coordinate and sort according to it and calculate IoU then discard some boxes which have IoU greater than the threshold that you set. In this theory score...
What does tensorflow nonmaximum suppression function's argument "score" do to this function?
0
1.2
1
0
0
537
48,772,583
2018-02-13T17:39:00.000
1
0
1
0
0
python,google-cloud-platform,google-cloud-functions
0
50,966,006
0
4
0
false
0
0
You can use AWS lambda as well if you want to work around and still use Python as your main language. Some modules/packages will need to be imported via zip file with AWS Lambda but it has a broader range of usable languages than GCF
1
10
0
0
Can Google Cloud Functions handle python with packages like sklearn, pandas, etc? If so, can someone point me in the direction of resources on how to do so. I've been searching a while and it seems like this is impossible, all I've found are resources to deploy the base python language to google cloud.
Python in Google Cloud Functions
0
0.049958
1
0
0
12,755
48,779,478
2018-02-14T04:04:00.000
0
0
0
0
0
python-3.x,wxwidgets
0
48,779,658
0
2
0
false
0
1
Try this: self.YourCheckboxObject.SetToolTip(wx.ToolTip("Paste your tooltip text here"))
1
0
0
0
And if so, how would one add a tooltip to a checkbox object? It appears that the control inherits from wxWindow which has tooltips, so can it be added to a wxCheckBox? Thanks!
Python - can you add a tooltip on a wx.CheckBox object?
0
0
1
0
0
438
48,780,634
2018-02-14T06:04:00.000
5
0
0
0
1
python-3.x
1
52,187,177
0
1
0
false
0
0
Use below code, this worked for me: pip3 install --upgrade oauth2client
1
2
0
0
I got this error in in Python3.6 ModuleNotFoundError: No module named 'oauth2client.client',i tried pip3.6 install --upgrade google-api-python-client,But I don't know how to fix Please tell me how to fix, Thanks
ModuleNotFoundError: No module named 'oauth2client.client'
0
0.761594
1
0
1
7,084
48,806,894
2018-02-15T12:06:00.000
0
0
0
0
0
python
0
49,682,887
0
2
0
false
1
0
I tried robot.step() and it works thank you. I use small increments of time so that the code is not continuously blocing and there is time for my sensors to do the reading.
1
0
0
0
I am using webots for my project at university. I want my robot to do a specific action for a certain amount of time, but I cannot find a way to do it without blocking the code and the sensors and consequently the whole simulation. I tried both the commands robot.step() and time.sleep() but they both blocck the code an...
Webots programming with Python - blocking code
0
0
1
0
0
529
48,832,344
2018-02-16T17:51:00.000
0
0
1
0
0
python,uninstallation
0
50,609,180
0
1
0
true
0
0
This depends on the OS and how Python was installed. For windows, look under %USERPROFILE%\AppData\Local\Programs\Python - or just run the installer again, it should have an option to fix or remove the current install.
1
0
0
0
I have accidentally removed several parts of python and now am trying to start again... The installer says that 57 files are still on my PC and I cannot find them. Does anyone know how to get a copy of the uninstaller? As it should find the remaining files.
How to remove the remains of python 3.7?
0
1.2
1
0
0
3,423
48,876,711
2018-02-20T01:44:00.000
0
0
0
0
0
python,flask,virtualenv
0
48,877,242
0
4
0
false
1
0
You may want to look at using a requirements.txt file in Python. Using $ pip freeze > requirements.txt can build that file with what pip has installed in your virtualenv.
1
0
0
0
I developed a flask app running on virtualenv, how do I deploy it into production? I have a Red Hat Enterprise Linux Server release 5.6, cannot use docker. The server has cgi and wsgi setup. Python 2.7. I know using the pip install -r requirements.txt, but how do I get the virtualenv to persist on production once my se...
How to deploy flask virtualenv into production
0
0
1
0
0
2,680
48,879,495
2018-02-20T06:56:00.000
2
0
1
0
0
python,recursion,data-structures,intel,google-colaboratory
0
48,922,199
0
4
0
false
0
0
There is no way to request more CPU/RAM from Google Colaboratory at this point, sorry.
1
1
0
0
I use GoogleColab to test data stuctures like chain-hashmap,probe-hashmap,AVL-tree,red-black-tree,splay-tree(written in Python),and I store very large dataset(key-value pairs) with these data stuctures to test some operation running time,its scale just like a small wikipedia,so run these python script will use very muc...
How to apply GoogleColab stronger CPU and more RAM?
0
0.099668
1
0
0
13,142
48,880,273
2018-02-20T07:57:00.000
2
0
0
0
1
python,tensorflow,neural-network,keras,multilabel-classification
0
49,065,611
0
2
0
false
0
0
You're on the right track. Usually, you would either balance your data set before training, i.e. reducing the over-represented class or generate artificial (augmented) data for the under-represented class to boost its occurrence. Reduce over-represented class This one is simpler, you would just randomly pick as many s...
1
8
1
0
I'm trying to build a multilabel-classifier to predict the probabilities of some input data being either 0 or 1. I'm using a neural network and Tensorflow + Keras (maybe a CNN later). The problem is the following: The data is highly skewed. There are a lot more negative examples than positive maybe 90:10. So my neural...
Classification: skewed data within a class
0
0.197375
1
0
0
1,027
48,899,234
2018-02-21T06:13:00.000
1
0
0
0
0
python,tensorflow,recurrent-neural-network,sequence-to-sequence,encoder-decoder
0
48,899,306
0
1
0
true
0
0
If for example, you are using Tensorflow's attention_decoder method, pass a parameter "loop_function" to your decoder. Google search for "extract_argmax_and_embed", that is your loop function.
1
1
1
0
I know how to build an encoder using dynamic rnn in Tensorflow, but my question is how can we use it for decoder? Because in decoder at each time step we should feed the prediction of previous time step. Thanks in advance!
How to build a decoder using dynamic rnn in Tensorflow?
1
1.2
1
0
0
342
48,904,701
2018-02-21T11:26:00.000
1
0
1
0
0
python,python-2.7,pycharm
1
59,266,936
0
1
0
true
0
0
On the command line, go to the location where you had installed your setup and use this command to install the missing package: pip install pcap
1
0
0
0
I try install pcap package in pycharam tools but did not install and show blow error : Collecting pcap Could not find a version that satisfies the requirement pcap (from versions: ) No matching distribution found for pcap how can i fix installing package?
Can't install pcap in pycharm?
0
1.2
1
0
0
717
48,911,436
2018-02-21T16:58:00.000
0
0
0
0
0
python,pygame,blender,pyopengl
0
48,952,393
0
1
0
true
0
1
Ok I think i have found what you should do just for the people that have trouble with this like I did this is the way you should do it: to rotate around a cube with the camera in opengl: your x mouse value has to be added to the z rotator of your scene and the cosinus of your y mouse value has to be added to the x rota...
1
0
1
0
I am trying to create a simple scene in 3d (in python) where you have a cube in front of you, and you are able to rotate it around with the mouse. I understand that you should rotate the complete scene to mimic camera movement but i can't figure out how you should do this. Just to clarify I want the camera (or scene) ...
PyOpenGL how to rotate a scene with the mouse
0
1.2
1
0
0
553
48,914,074
2018-02-21T19:35:00.000
0
0
0
0
0
postgresql,python-3.6
1
53,563,271
0
1
0
false
0
0
You can try using f-Strings and separating out the statement from the execution: statement = f"INSERT INTO name VALUES({VARIABLE_NAME},'string',int,'string')" cur.execute(statement) You might also want to try with '' around {VARIABLE_NAME}: '{VARIABLE_NAME}' In f-strings, the expressions in {} get evaluated and their ...
1
0
0
0
I got something like this: cur.execute("INSERT INTO name VALUES(HERE_IS_VARIABLE,'string',int,'string')") Stuff with %s (like in python 2.*) not working. I got errors, which tells me that im trying to use "column name" in place where i put my variable.
Python3.6 + Postgresql how to put VARIABLES to SQL query?
1
0
1
1
0
376
48,921,619
2018-02-22T07:16:00.000
0
0
0
0
0
python,django,django-sessions
0
48,923,389
0
1
0
false
1
0
You can run a javascript setTimeout in the background which will check if user is logged in and after three minutes the browser window will refresh. OR (better) You can run this timer server-side and when the client would try to change something, firstly look at the timer or the value where is the time until when is t...
1
0
0
0
I have created a login page for my application and set the session out for 3 minutes and it is working fine, but the problem is when session out happened the user is still able to do many activities on the current page i.e the logout page do not show until unless user do a page refresh or redirect to the other page. So...
Django: detect the mouse click if session out
0
0
1
0
0
231
48,924,787
2018-02-22T10:14:00.000
1
0
1
0
1
python,windows,pycharm,anaconda
0
64,291,969
0
13
1
false
0
0
Found a solution. Problem is we have been creating conda environments from within Pycharm while starting a new project. This is created at the location /Users/<username>/.conda/envs/<env-name>. e.g. /Users/taponidhi/.conda/envs/py38. Instead create environments from terminal using conda create --name py38. This will cr...
3
30
0
0
I have a conda environment at the default location for windows, which is C:\ProgramData\Anaconda2\envs\myenv. Also, as recommended, the conda scripts and executables are not in the %PATH% environment variable. I opened a project in pycharm and pointed the python interpreter to C:\ProgramData\Anaconda2\envs\myenv\pytho...
PyCharm terminal doesn't activate conda environment
0
0.015383
1
0
0
19,602
48,924,787
2018-02-22T10:14:00.000
4
0
1
0
1
python,windows,pycharm,anaconda
0
69,735,670
0
13
1
false
0
0
Solution for Windows Go to Settings -> Tools -> Terminal set Shell path to: For powershell (I recommend this): powershell.exe -ExecutionPolicy ByPass -NoExit -Command "& 'C:\tools\miniconda3\shell\condabin\conda-hook.ps1' For cmd.exe: cmd.exe "C:\tools\miniconda3\Scripts\activate.bat" PyCharm will change environment ...
3
30
0
0
I have a conda environment at the default location for windows, which is C:\ProgramData\Anaconda2\envs\myenv. Also, as recommended, the conda scripts and executables are not in the %PATH% environment variable. I opened a project in pycharm and pointed the python interpreter to C:\ProgramData\Anaconda2\envs\myenv\pytho...
PyCharm terminal doesn't activate conda environment
0
0.061461
1
0
0
19,602
48,924,787
2018-02-22T10:14:00.000
0
0
1
0
1
python,windows,pycharm,anaconda
0
64,384,425
0
13
1
false
0
0
I am using OSX and zshell has become the default shell in 2020. I faced the same problem: my conda environment was not working inside pycharm's terminal. File -> Settings -> Tools -> Terminal. the default shell path was configured as /bin/zsh --login I tested on a separate OSX terminal that /bin/zsh --login somehow mes...
3
30
0
0
I have a conda environment at the default location for windows, which is C:\ProgramData\Anaconda2\envs\myenv. Also, as recommended, the conda scripts and executables are not in the %PATH% environment variable. I opened a project in pycharm and pointed the python interpreter to C:\ProgramData\Anaconda2\envs\myenv\pytho...
PyCharm terminal doesn't activate conda environment
0
0
1
0
0
19,602
48,925,086
2018-02-22T10:29:00.000
0
0
0
0
0
python,algorithm,computational-geometry,dimensionality-reduction,multi-dimensional-scaling
0
60,953,415
0
4
0
false
0
0
Find the maximum extent of all points. Split into 7x7x7 voxels. For all points in a voxel find the point closest to its centre. Return these 7x7x7 points. Some voxels may contain no points, hopefully not too many.
2
13
1
0
Imagine you are given set S of n points in 3 dimensions. Distance between any 2 points is simple Euclidean distance. You want to chose subset Q of k points from this set such that they are farthest from each other. In other words there is no other subset Q’ of k points exists such that min of all pair wise distances in...
Choosing subset of farthest points in given set of points
0
0
1
0
0
3,420
48,925,086
2018-02-22T10:29:00.000
1
0
0
0
0
python,algorithm,computational-geometry,dimensionality-reduction,multi-dimensional-scaling
0
48,925,457
0
4
0
false
0
0
If you can afford to do ~ k*n distance calculations then you could Find the center of the distribution of points. Select the point furthest from the center. (and remove it from the set of un-selected points). Find the point furthest from all the currently selected points and select it. Repeat 3. until you end with k p...
2
13
1
0
Imagine you are given set S of n points in 3 dimensions. Distance between any 2 points is simple Euclidean distance. You want to chose subset Q of k points from this set such that they are farthest from each other. In other words there is no other subset Q’ of k points exists such that min of all pair wise distances in...
Choosing subset of farthest points in given set of points
0
0.049958
1
0
0
3,420
48,936,542
2018-02-22T20:22:00.000
1
0
0
0
0
python,scikit-learn
0
48,936,596
0
3
0
false
0
0
Use the feature_importances_ property. Very easy.
1
1
1
0
Is there a way in python by which I can get contribution of each feature in probability predicted by my gradient boosting classification model for each test observation. Can anyone give actual mathematics behind probability prediction in gradient boosting classification model and how can it be implemented in Python.
gradient boosting- features contribution
0
0.066568
1
0
0
1,153
48,940,807
2018-02-23T03:48:00.000
0
0
0
0
0
python,post,cookies,request
0
48,940,818
0
1
0
true
0
0
First create a session then use GET and use session.cookies.get_dict() it will return a dict and it should have appropriate values you need
1
0
0
0
I am basically running my personal project,but i'm stuck in some point.I am trying to make a login request to hulu.com using Python's request module but the problem is hulu needs a cookie and a CSRF token.When I inspected the request with HTTP Debugger it shows me the action URL and some request headers.But the cookie ...
How to get cookies before making request in Python
0
1.2
1
0
1
882
48,969,107
2018-02-25T00:38:00.000
0
0
0
0
0
python,grpc
0
49,018,750
0
1
0
false
0
0
Short answer: you can't gRPC is a request-response framework based on HTTP2. Just as you cannot make a website that initiates a connection to a browser, you cannot make a gRPC service initiating a connection to the client. How would the service even know who to talk to? A solution could be to open a gRPC server on the ...
1
0
0
0
Hi i am new to GRPC and i want to send one message from server to client first. I understood how to implement client sending a message and getting response from server. But i wanna try how server could initiate a message to connected clients. How could i do that?
How to let server send the message first in GRPC using python
0
0
1
0
1
325
48,970,752
2018-02-25T06:10:00.000
0
0
1
0
0
python,dictionary
0
48,970,792
0
4
0
false
0
0
Use the enumerate function that will count all the words like looping it as for index, value in enumerate(dic):
1
2
0
0
A simple program about storing rivers and their respective locations in a dictionary. I was wondering how I would go about looping through a dictionary key and looking if the dictionary key (or value) contains a certain word, if the word is present in the key, remove it. EX: rivers_dict = {'mississippi river': 'mississ...
If a dictionary key contains a certain word, how would I remove it?
0
0
1
0
0
899
48,977,688
2018-02-25T19:43:00.000
1
1
0
0
0
python,server,putty
0
48,977,787
0
1
0
true
0
0
There are many ways you can run a python program after you disconnect from an SSH session. 1) Tmux or Screen Tmux is a "terminal multiplexer" which enables a number of terminals to be accessed by a single one. You start by sshing as you do, run it by typing tmux and executing it. Once you are done you can disconnect fr...
1
0
0
0
I've created a script for my school project that works with data. I'm quite new to working remotely on a server, so this might seem like a dumb question, but how do I execute my script named stats.py so that it continues executing even after I log off PuTTy? The script file is located on the server. It has to work w...
How to run a python script on a remote server that it doesn't quit after I log off?
0
1.2
1
0
0
1,277
48,985,145
2018-02-26T09:27:00.000
0
0
0
0
1
python,django,email,user-registration
0
48,985,464
0
1
0
false
1
0
I would change it to lowercase and then save it because it looks like the least number of operations to be done. Also it should make the shortest code. If you'll decide to check if it's unique in lowercase in DB and then save it you may end up checking DB two times (one when first check, 2nd when saving) if you'll impl...
1
0
0
0
As I know, standard new user process registration (Django 2.x) is validate email field only for exists and equals for E-mail Schemas. But users may be write e-mail address like this: JOHN_DOE@MAIL.COM (via Caps Lock) and save it to DB. It's would be dangerous, because other user can register account for these e-mail, ...
Clean email field when new user is registering in Django?
0
0
1
0
0
122
49,011,180
2018-02-27T14:36:00.000
1
0
0
0
0
android,python,ios,node.js,lyft-api
0
52,992,307
0
1
0
false
0
0
The Mystro app does not have any affiliation with either Uber or Lyft nor do they use their APIs to interact with a driver (as neither Uber or Lyft have a publicly accessible driver API like this). They use an Android Accessibility "feature" that let's the phone look into and interact with other apps you have running....
1
0
0
0
I want to use Lyft Driver api like in the Mystro android app however iv searched everywhere and all I could find is lyft api. To elaborate more on what I'm trying to achieve, I want api that will allow me to intergrate with the lyft driver app and not the lyft rider app, I want to be able to for example view nearby rid...
How do I use Lyft driver API like Mystro android app?
0
0.197375
1
0
1
249
49,027,447
2018-02-28T10:35:00.000
1
0
0
1
0
python,bash,concurrency,background-process
0
49,088,871
0
1
0
false
1
0
Here's how it might look like (hosting-agnostic): A user uploads a file on the web server The file is saved in a storage that can be accessed later by the background jobs Some metadata (location in the storage, user's email etc) about the file is saved in a DB/message broker Background jobs tracking the DB/message bro...
1
2
0
0
I want to create a minimal webpage where concurrent users can upload a file and I can process the file (which is expected to take some hours) and email back to the user later on. Since I am hosting this on AWS, I was thinking of invoking some background process once I receive the file so that even if the user closes th...
Concurrent file upload/download and running background processes
0
0.197375
1
0
0
912
49,031,954
2018-02-28T14:31:00.000
6
0
0
0
1
python,django,django-rest-framework,django-registration,django-oauth
0
49,129,766
0
4
0
false
1
0
You have to create the user using normal Django mechanism (For example, you can add new users from admin or from django shell). However, to get access token, OAuth consumer should send a request to OAuth server where user will authorize it, once the server validates the authorization, it will return the access token.
2
11
0
0
I've gone through the docs of Provider and Resource of Django OAuth Toolkit, but all I'm able to find is how to 'authenticate' a user, not how to register a user. I'm able to set up everything on my machine, but not sure how to register a user using username & password. I know I'm missing something very subtle. How do ...
Django OAuth Toolkit - Register a user
0
1
1
0
0
6,515
49,031,954
2018-02-28T14:31:00.000
1
0
0
0
1
python,django,django-rest-framework,django-registration,django-oauth
0
59,511,833
0
4
0
false
1
0
I'm registering user with regular django mechanism combined with django-oauth-toolkit's application client details (client id and client secret key). I have separate UserRegisterApiView which is not restricted with token authentication but it checks for client id and client secret key while making post request to regis...
2
11
0
0
I've gone through the docs of Provider and Resource of Django OAuth Toolkit, but all I'm able to find is how to 'authenticate' a user, not how to register a user. I'm able to set up everything on my machine, but not sure how to register a user using username & password. I know I'm missing something very subtle. How do ...
Django OAuth Toolkit - Register a user
0
0.049958
1
0
0
6,515
49,046,224
2018-03-01T09:10:00.000
0
0
0
0
0
python-2.7,odoo-8,odoo
0
49,046,718
0
1
0
false
1
0
I solved it myself. I just added _order = 'finished asc' to the class. finished is a record of type Boolean and tells me if the Task is finished or not.
1
0
0
0
At the moment i am working on an odoo project and i have a kanban view. My question is how do i put a kanban element to the bottom via xml or python. Is there an index for the elements or something like that?
Is there a way to put a kanban element to the bottom in odoo
0
0
1
0
1
63