text stringlengths 226 34.5k |
|---|
Adding libraries to django nonrel
Question: I've a project in Django which I'm trying to port to Django-nonrel so that I
can upload it to Google app Engine. I've installed django-nonrel and other
required libraries by going through the
<http://djangoappengine.readthedocs.org/en/latest/installation.html>
namely: django... |
Assertion failed (type == CV_32FC1 || type == CV_64FC1) in dct
Question: I am trying to take dct of an image. At first I was getting error
> The function/feature is not implemented (Odd-size DCT's are not implemented)
> in dct
So I pad the image with zeros to make it even sized
But now I get error:
> Assertion fail... |
python: bandpass filter of an image
Question: I have a data image with an imaging artifact that comes out as a sinusoidal
background, which I want to remove. Since it is a single frequency sine wave,
it seems natural to Fourier transform and either bandpass filter or "notch
filter" (where I think I'd use a gaussian fil... |
python3 for ubuntu can't find scapy?
Question: I'm trying to run a python script using scapy in Ubuntu 14.04. I downloaded
python3 with
sudo apt-get install python3
and I'm running the file I have with
sudo python3 <my filename>.py
As for importing scapy into my python file, I'... |
Random numbers within Array in Python
Question: I'm new to Python. While reading, please mention any other suggestions
regarding ways to improve my Python code.
**Question:** How do I generate a 8xN dimensional array in Python containing
random numbers? **_The constraint is that each column of this array must
contain ... |
Python virtualbox api cannot add disk to SATA controller
Question: I'm having a hard time to ass a disk to a SATA controller with virtualbox API
when using a SAS controller everything works great but here I have a huge
traceback that I do not understand. Do I have to do something special with the
SATA controller? Thank... |
python + from <module> + how from - import know the PATH
Question: How the from in python know the PATH of the directory that all module are
exists?
For example
Under
/data_py/Python/modulespy
I have all the modules as:
Df.py
Tr.py
Sw.py
So how the following **from... |
mod-wsgi get an error when trying to convert string params to json
Question: I get the following error:
File "C:\\Python34\\Lib\\json\\decoder.py", line 361, in raw_decode\r
raise ValueError(errmsg("Expecting value", s, err.value)) from None\r
ValueError: Expecting value: line 1 column 1 (char 0)... |
Python 3.4, TypeError for socket issues
Question: I don't quite understand the encode/decode in python. I've tried alsorts and
looked here to find similar but I cannot find some. This is the code in
question:
import sys
import socket
import threading
import time
QUIT = False
... |
Authenticate Windows Security with Request library
Question: How can I authenticate in his Windows Security pop-up?
<http://imgur.com/1FSkbUF>
using requests and python?
from requests import session
with session() as c:
response = c.get('url', auth=('username', 'pass'),)
prin... |
Replace same line of pixels in dynamic images with Pillow in python
Question: I'm tring to work out an algorithm that does the following, input is left
image, output is right image:
IMPORTANT: Images are dynamically generated and the horizontal lines i need to
remove are always in the same position.
[![enter image de... |
How to quit selenium driver when spider is closed
Question: I have a spider where I have to use Selenium to scrape dynamic data on page.
Here's what it looks like:
class MySpider(
name = 'myspider'
start_urls = ['http://example.org']
def __init__(self, *args, **kwargs):
... |
Getting author's articles from Scopus using Scopus API (AUTHENTICATION_ERROR)
Question: I've registered at <http://www.developers.elsevier.com/action/devprojects>. I
created a project and got my scopus key:
[](http://i.stack.imgur.com/8wvbE.png)
Now, ... |
non-NDFFrame object error using pandas.SparseSeries.from_coo() function
Question: I am trying to convert a COO type sparse matrix (from Scipy.Sparse) to a
Pandas sparse series. From the documentation(<http://pandas.pydata.org/pandas-
docs/stable/sparse.html>) it says to use the command
`SparseSeries.from_coo(A)`. This ... |
PicklingError: Can't pickle <type 'function'> with python process pool executor
Question: **util.py**
def exec_multiprocessing(self, method, args):
with concurrent.futures.ProcessPoolExecutor() as executor:
results = pool.map(method, args)
return results
**clone.py**... |
What is the correct way to format long lines of code in python?
Question: I've got some lines of code that return and assign multiple values from a
function, like below. This of course makes it one very long line. What's the
correct way to style/format a line of code like this? I've included a couple
of possibilities t... |
Python 2.7 read exported variables from bash
Question: I have a python2.7 script which is calling a bash script, inside the bash
script i'm exporting 2 variable i've tried with `declare -x` and with
`export`, then i'm trying to read this variables in the python script using
`os.getenv` and i also tried using `os.enviro... |
Fire and forget task in asyncio
Question: When using Python's `asyncio` library, how can I fire off a task and then not
care about its completion?
## Example
@asyncio.coroutine
def f():
yield From(asyncio.sleep(1))
print("world!")
@asyncio.coroutine
def g():
desi... |
Django-nonrel with django app engine cannot access the admin interface
Question: I have a Django app which I am trying to get to Django-nonrel so that I can
get it on GAE. The problem though is that numerous times have I tried creating
superuser for the admin interface still when I do **syncdb** , it shows me:
> You j... |
using xlwt writing data into the excel but in this code not properly inserting into the column
Question:
import xlwt
wbk = xlwt.Workbook()
sheet = wbk.add_sheet('python')
row = 0
f = open('newfile.txt')
for line in f:
L = line.strip().split()
for i,c in enumerate(L):
sheet.write... |
Tkinter ttk Combobox Default Value
Question: I'm building a Tkinter application and I came across an issue with setting a
default value to a combobox. I managed to fix the problem, but I am curious to
know why it worked and I would like to know if there is a better way to do it.
I have a `tk.Toplevel()` window pop up ... |
Program is not executing in python
Question: I am using a book for learning python :
There is a file recommendations.py in which I have all this code
When I execute command on command line
reload(recommendations)
>>> recommendations.sim_distance(recommendations.critics,
... 'Lisa Rose','Gene Se... |
Installing issues in networkx
Question: I have run the following command
sudo apt-get install python-setuptools
I get `python-setuptools is already the newest version.
Now when I run `import networkx`
I get `ImportError: No module named networkx`
Please help.
Answer: You definitely should use ... |
Server(Python) - Client(Java) communication using sockets
Question: I try to send a message from server to a client, after client receives the
message, it sends back a message to the server and so on. The problem is with
receiving the message in python. The loop it's stuck there.
import socket
H... |
Getting error for datetime in python
Question: I have a file named global.py and a function to create report :
import datetime
class customFail(Exception):pass
def createReport(myModule,iOSDevice,iOSVersion):
now=datetime.datetime.now()
resultPath="../Results"
re... |
python stemming words for local languages
Question: I've some problem to stem words in my local language using rule based
algorithm. so any body who are python literate can help me.
In my language some words are pluralized by repeating the first 2 or 3
characters(sounds).
For example
Diimaa (root word)... |
Python handling .net exceptions makes PyQt unable to use OLE
Question: I have a large PyQt4 based Python program. In some places it needs to be able
to control a piece of hardware for which the manufacturer provides a .net
interface. I need to be able to load the relevant library if it's available,
and ignore it otherw... |
Python Socket Timing out
Question: I am attempting to open a socket to google on port 80 but for the life of me I
can't figure out why this is timing out. If I don't set a timeout it just
hangs indefinitely.
I don't think my companies firewall is blocking this request. I can navigate
to google.com in the browser so th... |
In Python, how can a function of a script be called from within a module that is imported by that script?
Question: I have a set of scripts that each have their own specialized termination
functions. Many of these scripts call a module of general functions. Some of
these module functions should direct the script to ter... |
Python error for request.get
Question: I am trying to write a Python script which enables me to acces a webpage and
download a file from that page. My first attempt was to simply get to that
page and i tried the following code:
import requests
url = 'https://www.google.com/?gws_rd=ssl' #using go... |
Python: Parse String as Date with Formatting
Question: A user can input a string and the string contains a date in the following
formats `MM/DD/YY` or `MM/DD/YYYY`. Is there an efficient way to pull the date
from the string? I was thinking of using RegEx for `\d+\/\d+\/\d+`. I also
want the ability to be able to sort t... |
Python vs Jython - MuleSoft
Question: I have a Python script that converts JSON to CSV successfully when run in
PyCharm. When I move that Python script into a Python Transformer in MuleSoft,
the script fails with the error:
> TypeError: unicode indices must be integers in at line number 10
> (javax.script.ScriptExcept... |
Django 1.8 template's URL tag TypeError
Question: I am trying to learn how to use the Django template's URL tag to make my code
more generic, but I am having some exception being raised.
Exception Type: TypeError
Exception Value: argument to reversed() must be a sequence
Here is my globa... |
python mock default init argument of class
Question: I want to mock the default argument in a class constructor:
class A (object):
def __init__(self, connection=DefaultConnection()):
self.connection = connection
I want to mock `DefaultConnection` in my unittests, but it doesn't ... |
Python sqrt() doubles runtime?
Question: I've recently started learning Python. My apologies if this is really obvious.
I am following along with the 2008 MIT open course on Computer Science and am
working on the problem of calculating the 1000th prime integer. Python 2.7.3,
Win7 lappy (cough, cough...)
Here's the co... |
How to connect Twilio python program to local server?
Question: So I saw this amazing hackathon project, and I would like to test it out.
Here is the link for your reference: <https://github.com/ionambrinoc/oxhack>
I know how to run android apps. Just run it on Android Eclipse, and it works
as I expected. It sends th... |
Unable to download binascii
Question: Hi i am a newbie in python. I have installed python 2.7.10 in windows(64 bit).
I tried installing certain packages like binascii and zlib for my program but
it is throwing the following error: Could not find a version that satisfies
the requirement binascii (from versions: ) No mat... |
speech recognition python code not working
Question: I am running the following code in Python 2.7 with pyAudio installed.
import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source: # use the default microphone as the audio source
audio = r.listen(s... |
Plotting bar chart -colors python
Question: I have a pandas dataframe that I want to plot as a barchart the data has the
following form;
Year ISO Value Color
2007 GBR 500 0.303
DEU 444 0.875
FRA 987 0.777
2008 GBR 658 0.303
USA 432... |
Python 3.4 - 'module' has no attribute 'send_sms'
Question: For some reason I cannot execute the function of another script even though i
imported that module.
The relevant code for 'master_module.py' goes like this:
import sms_values
class ClientThread(threading.Thread): # Class that implemen... |
Python not recalling variable (pycharm)
Question: Does Anyone Know whats wrong with calling the input at the beginning of the
code where i ask someone to input the number they wish to proceed to for some
reason it doesn't want to do it
__author__ = 'kowalczk'
print ("Welcome to my Program")
print... |
py2neo Can't run GraphServer
Question: I've problems using the server from the py2neo package.
Here is what I try:
from py2neo.server import GraphServer
server = GraphServer()
This leads to the following exception:
FileNotFoundError: [Errno 2] No such file or directory: '.\\conf... |
Python Read selected Excel columns into arrays
Question: I have an excel spreadsheet that I need to read the values into arrays as
follows
A[0] to A[24] needs to have the values of E4 to E28
B[0] to B[24] needs to have the values of H4 to H28
C[0] to C[24] needs to have the values of K4 to K28
and so on where I am ... |
How to delete a particular key(for current session) from Flask-KVSession?
Question: I am using Flask kvsession to avoid replay attacks, as the client side cookie
based session used by Flask-login are prone to it. Eg: If on /index page your
cookie in the header is set for your app header like myapp_session : 'value1'
an... |
python xlwt - search for a specific value
Question: I made a script using xlrd to extract multiple data from multiple cells in
multiple excel files, and used xlwt to write these data to a new excel file.
In the new excel file I added two additional rows with Formulas that will
compute the average and the ttest. Now I'm... |
python - complex sorting of nested data
Question: I am retrieving data from postgres (jsonb type) and I need to return an
OrderedDict that has a predictable order for human and machine consumption.
There are some common(ish) keys that should be used to direct precedence of
values of common types (based on a predefined ... |
Pygments import Lex error
Question: I tried to import lex using this code:
from pygments import lex
but it only returned an error:
Traceback (most recent call last):
File "D:\samp.py", line 1, in <module>
from pygments import lex
File "C:\Python32\lib\site-package... |
How to get POST parameters with Python?
Question: I would like to call my Python script from different location ( FIY: I will
call it later from my paypal registration process).
My configuration: I am running my website on AmazonWebServices. IIS8. Python3
I am calling to my python with this simple HTML file:
... |
How to fix: "RuntimeWarning: Model <my_model> was already registered."
Question: Since upgrading Django, I've been getting this error in iPython when I do
imports:
> RuntimeWarning: Model 'docket.search' was already registered. Reloading
> models is not advised as it can lead to inconsistencies, most notably with
> re... |
Python Beautiful Soup Error : list index out of range
Question: I am getting the following error with the script, i want to do is,
if i get a correct URL, i want it to check with BeautifulSoup if there is a
form with value button "Send"
Traceback (most recent call last): File "tester.py", line 27, in if
viewstate[0][... |
How to use Values in a multiprocessing pool with Python
Question: I want to be able to use the Values module from the multiprocessing library to
be able to keep track of data. As far as I know, when it comes to
multiprocessing in Python, each process has it's own copy, so I can't edit
global variables. I want to be abl... |
cannot write file with full path in Python
Question: I am using Pandas on Mac, to read and write a CSV file, and the weird thing is
when using full path, it has error and when using just a file name, it works.
I post my code which works and which not works in my comments below, and also
detailed error messages. Anyone ... |
mysql file import with multiple lines of string
Question: I have 3 sql files migrated from sqlite3 dump. Unfortunately they have string
values of multiple lines. So when I `mysql -p dbname <- dbname.sql` it returns
syntax errors at specific lines:
ERROR 1064 (42000) at line 87194: You have an error in yo... |
PUT json data to Elasticsearch cluster Python
Question: I'm trying to PUT data to an Elasticsearch server. I can manually PUT the
data, but I can't seem to automate it.
jsonValue = json.dumps(data).encode('utf8')
req = urllib2.Request("http://[Elastic IP Address]/cities", jsonValue, {'Content-Ty... |
Creating a watermark in Python
Question: I'm trying to figure out how to create this kind of watermark, **especially
the one that's in the center** (it's not an ad, it's just a perfect example of
what I want to accomplish):
[](http://i.stack.imgur.com/... |
How to add a tally?
Question: I need some help in creating a tally for the following code:
import random
def number_to_name(selection):
# convert number to a name using if/elif/else
if selection == 0: return "rock"
elif selection == 1: return "Spock"
elif select... |
Tornado crashed with assert error
Question: According to official doc <http://tornado.readthedocs.org/en/latest/gen.html>,
I'm using async feature of tornado like this:
@tornado.web.asynchronous
@tornado.gen.coroutine
def get(self):
...
response = yield calendar.events()
s... |
How to encode UTF-8 strings with only "A-Z","a-z","0-9", and "_" in Python
Question: I need to build a python encoder so that I can reformat strings like this:
import codecs
codecs.encode("Random UTF-8 String ☑⚠⚡", 'name_of_my_encoder')
The reason this is even something I'm asking stack overfl... |
Python 3.4 import gcm raise a SystemError: Parent module '' not loaded, cannot perform relative import
Question: I'm trying to import gcm as following:
from . import gcm
And i get:
SystemError: Parent module '' not loaded, cannot perform relative import
I tried also called:
... |
Mastermind Game in Python
Question: I have already looked at this thread [Python Mastermind Game
Troubles](http://stackoverflow.com/questions/15648407/python-mastermind-game-
troubles) on your website but the question I am asking is slightly different
as I have been given a different task.
This is the question:
**Gen... |
Starting Another Activity - Activity not showing my message
Question: I'm new to android developing but have experience with python and java, so I
decided I want to make apps, thus i began the tutorial from
developer.android.com.
I'm in the Build your first app > Starting Another Activity section.
I made it to the fi... |
Create base docker centos image with python 2.7.8
Question: I've found [this](http://drewcdecker.me/2014/10/creating-a-centos-65-base-
docker-image/) which walks you through creating a base bare-metal centos
image. I want to however install some additional yum packages, download Python
2.7.8 and build it.
I had this i... |
Nose/Unittest different tests dependent on Python version
Question: I am writing [a nose test](https://travis-ci.org/pydata/pandas/jobs/75838430)
for an API addition to pandas I'm writing. They use Travis CI to run their
test suites.
In the version of Python I'm using (Python 2.7.6, numpy 1.9.2) the following
raises a... |
python web crawler with ticket authentication
Question: The website I'm trying to crawl have an login page like:
<form method="post" action="/login" enctype="multipart/form-data">
<table><tbody><tr><td>Name</td>
<td><input type="text" name="user"></td>
... |
Issue in Writing the contents of a variable to a file
Question: I'm trying to get the `SPF records` of a `domains` and the domains are read
from a file.When i am trying to get the spf contents and write it to a file
and the code gives me the results of last domain got from input file.
Example `Input_Doma... |
How do you format a string in python to given precision?
Question: I need to return a string in a program, which is finding value of e to nth
precision. I tried doing `'%f' % (n,e)`. Please suggest the right syntax.
Answer: You can manually set the precision by importing `decimal` module.
Here's the code:
... |
Run scrapy from Flask application
Question: I have a crawler which I want to run everytime a person goes to the link.
Since all the other modules are in Flask, I was told to build this in Flask
also. I have installed scrapy and selenium both in the virtual environment and
globally on the machine with root.
When I run ... |
Running a continous while loop in python along with Flask app
Question: I am working on writing a code in raspberry pi using python where i want the
user to input the set temperature and fan mode via web page i'm using flask
for that and the values are returned successfully but i also want to run a
infinite while loop ... |
Python script erroneously erases created chart in .xlsx file
Question: I tried to write a script using Python which takes some specific values from
all the .csv files stored in a hierarchy of folders. These values are copied
at some specific cells in a destination file (.xlsx) which has already been
created. The destin... |
Eclipse/CDT Pretty Printing With Remote Debugging
Question: I'm trying to add pretty printing for STL objects in my Eclipse/CDT (Mars
release) to remote debug application running in an ARM board.
I can succesfully debug my application using Eclipse and gdbserver. For this
purpose I use the following gdbinit file:
... |
How can I see name of failed tests if setUpClass is failed?
Question: please help me. How to see name of failed tests if setUpClass is failed?
EXAMPLE:
import unittest
import nose
class Test(unittest.TestCase):
@classmethod
def setUpClass(cls):
print "Execut... |
Connect two source files in python?
Question: I was trying to split
[this](http://www.roguebasin.com/index.php?title=Complete_Roguelike_Tutorial,_using_python%2Blibtcod,_part_13_code)
into some smaller files, but its really hard for me becouse of complicated
class-global_variable-function relations. Is there any way to... |
How to edit the style of a heading in Treeview (Python ttk)
Question: I am trying to use ttk.Treeview to make a sortable table (as per [Does tkinter
have a table widget?](http://stackoverflow.com/questions/9348264/does-tkinter-
have-a-table-widget) and <https://www.daniweb.com/software-
development/python/threads/35026... |
parsing a dns configuration file with python
Question: Not sure this question has it's place, but i'll give it a shot anyway.
Basically what I need is to parse a conf file.
It would look like this :
1. #local-data: "some.dns.url IN MX 192.168.80.45"
2. local-data: "some.other.dns.url IN A 192.168.... |
ARIMA seasonal prediction with Python: x12a and x13as not found on path
Question: I am using Statsmodels to implement seasonal ARIMA prediction for time series.
Here is my code :
import statsmodels.api as sm
from statsmodels.tsa.x13 import x13_arima_select_order, _find_x12
import pandas
impo... |
HTTPSHandler error while installing pip with python 2.7.9
Question: Hi I am trying to install pip with python 2.7.9 but keep getting following
error. I want to create python virtual env.
python get-pip.py
Traceback (most recent call last):
File "get-pip.py", line 17767, in... |
Pull comments from Facebook API (Python, JSON)
Question: I want to pull all comments from all posts the last 24 hours using the
Facebook API. Currently, I can only pull from a certain data range of posts as
the Facebook API only allows "since" and "until" to be used under posts. I
can't seem to use those parameters for... |
import urllib.parse returns "ImportError:No module named parse" for jython 2.7.0
Question: I am using jython 2.7.0 with Java 1.7.0_45 on Windows 7. I call my module with
the following Java code
try{
python.exec("import sys");
python.exec("sys.path.append('c:/Python')");
... |
How to get relevant month and date by inputting only the day of year in python
Question: I'm developing a phonebook application from python as a mini project in which
I'm having the requirement to store the NIC number of a person and then
display his/her gender, DOB and age. I have to derive these 3 information and
I'm... |
How to have WebDriverWait return element instead of boolean in Python using Selenium
Question: Right now, I have a method that will wait until an element is visible using:
WebDriverWait(self.driver, seconds).until(lambda s: s.find_element_by_xpath(path).is_displayed())
This works properly; however,... |
Python Flask - making ALL file uploads go to tmp directory
Question: According to the
[docs](http://flask.pocoo.org/docs/0.10/patterns/fileuploads/#improving-
uploads), Flask stores the uploaded file in-memory if the file is 'reasonably
small' (no upper limit mentioned) and otherwise in temporary location as
returned b... |
ipython startup config for spyder IDE
Question: Trying to add a few imports to my IPython profile so that when I open a kernel
in the Spyder IDE they're always loaded. Spyder has a Qt interface (I
think??), so I (a) checked to make sure I was in the right directory for the
profile using the `ipython locate` command in ... |
Line numbers and Syntax Highlighting don't work on different tabs
Question: I am trying to resolve the issue in which `line numbers` don't work properly
in `multiple tabs`. The issue is that when I create a new tab, the `line
numbers` for the other tabs don't work, but the `line numbers for the current
tab` does. Same ... |
cross-platform method for determining file owner in Python
Question: I need to find the owner of files in a script running on Windows, Linux and
Mac. `os.stat` returns the owner id, but on windows I can't use `getpwuid` to
find the actual name of the owner. I need the name as a string.
Answer: It seems like you won't... |
Python 3.4: href with XPATH
Question: Using `lxml` and `requests` I am passing a `XPATH` to retrieve `href`
attributes of `a` tags. Every time I use the simple code below I get an
`AttributeError` as exemplified below.
import requests
from lxml import html
import csv
url =... |
How to trace back the cause of an exception raised within a function?
Question: (This is a follow-up question to the post [Python try/except: Showing the
cause of the error after displaying my
variables](http://stackoverflow.com/questions/4560288/python-try-except-
showing-the-cause-of-the-error-after-displaying-my-var... |
imdbpy rating data missing
Question:
i have a question about the [imdbpy](http://imdbpy.sourceforge.net/index.html)
module for python, for some reason i can't retrieve some data about tv shows
even though they exist on the imdb.com website.
for example if i use this code:
from imdb import IMDb
i... |
Regex python wont work as I want it
Question: I'm trying to filter street names and get the parts that I want. The names
come in several formats. Here are some examples and what I want from them.
Car Cycle 5 B Ap 1233 < what I have
Car Cycle 5 B < what I want
Potato stree... |
Why can't I crawl this link in Python?
Question: I am trying to crawl the contents of a webpage but I don't understand why I am
getting this error : `http.client.IncompleteRead: IncompleteRead(2268 bytes
read, 612 more expected)`
**here is th link I am trying to crawl :**
[www.rc2.vd.ch](http://www.rc2.vd.ch/registres... |
Python: how to create a class name on the fly
Question: I am looking for a way to "identify" the class name on the fly based on an
incoming parameter and create its object. The code which I attempted gives
error "TypeError: 'str' object is not callable". Any suggestions on how to
achieve this?
class inte... |
Combine multidimensional array by group python
Question:
[['test', '172.18.74.146', '13:05:43.834', '2015_08_07'],
['test', '172.18.74.148', '12:27:39.016', '2015_08_07'],
['blah', '172.18.74.149', '11:18:33.846', '2015_08_12'],
['blah', '172.18.74.146', '12:27:38.985', '2015_08_12']]
I w... |
Using the file descriptor returned from C extension to read the files in python
Question: Bare with me, am new to python.
When I try reading a file in python, it blocks other processes from editing
that file. Even though the file is opened in read mode.
I couldn't find and option which would enable me to achieve this... |
Making a list based off of list of months in Python
Question: I am using Python to make lists. Should be easy! I don't know why I'm
struggling so much with this.
I have some data that I am counting up by date. There is a date column like
this:
Created on
5/1/2015
5/1/2015
6/1/2015
6/1/20... |
Python set environment variables for docker-machine on Mac OS X
Question: As I'm continuing to work in docker-machine and Django, I'm trying to make a
setup script for my project that auto-detects platform and decides how to set
up Docker and the required containers. Auto-detection works fine. One thing I
can't figure ... |
Time Zones in python for program
Question: This program is used to find the current time of location of a countries
time and then get the time of a location of your choosing.I need to know how
to get the time from other countries such as China or the ones in the code.
#Eric's Amazing Trip around the... |
What's the fastest method of outputting text to console in python3
Question: I'm creating a game that is supposed to run on the command line. The game uses
text as a the canvas ( the software prints text in a shape of a rectangle, and
when the text changes, the image changes). I've created a little scrip to test
how th... |
Scraping and parsing data table using beautiful soup and python
Question: Hi everyone so I am trying to scrape table from CIA website that shows data on
roads of different countries based on unpaved and paved roads. I wrote this
script to extract. Secondly I am trying to parse out information from the
second column int... |
I want to embellish a class from a python module. How do I do this?
Question: I am using a class from a module that I import. I want to extend this class:
add some more attributes/methods. However, I want to retain all the
functionality, including all possible constructors, of the original class.
Here is one way I can... |
How do I check a 3rd party Python utility library for malware?
Question: I'm very new to programming and I'm trying to find a program or method to pull
out all file names, sheet names, and count the rows of data per sheet from all
the Excel files in a single folder. Thus far, I've entertained mostly Excel
approaches, b... |
_winreg.EnumKey(key, i) does not workng?
Question: Hy, I trying to reconstruate a script. And in python 3 I used _winreg and the
script was working, but I need it in python 2 and now I get this erorr:
File "discoverNetworks.py", line 14, in printNets
guid = _winreg.EnumKey(key, i)
WindowsError: [... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.