text stringlengths 226 34.5k |
|---|
Sending POST request to AJAX with Python3.4 and urllib
Question: I am trying to scrape line movements from: <http://scores.covers.com/football-
scores-matchups.aspx>
I need to iterate through each Season and Week of using the Calendar provided:
When I inspect the network to see what is getting sent, I see two POST
re... |
Is it possible to get jedi autocomplete for a C++ library binded to python?
Question: I am using vim with jedi-vim to edit some python code. However, some libraries
we use are C++ shared libraries for which we generated python bindings using
pybindgen. When using jedi-vim, I do not get signature for any of the classes
... |
how do i export PDF file attachments via python
Question: How do I extract a PDF file attachment via python? (File attached to the PDF)
I seem to not be able to find anything about this topic.
Answer: This is not a native python solution, but try to use
[pdfdetach](http://www.dsm.fordham.edu/cgi-bin/man-
cgi.pl?topi... |
PYXB - Generation of namespace groups requires generate-to-files
Question: PYXB - When generating class definitions at runtime, iam facing following
expection
import pyxb.binding.generate
path = "E:/schema/schema.xsd"
code = pyxb.binding.generate.GeneratePython(schema_location=path)
rv =... |
pip install dependency links
Question: I am using `python version 2.7` and `pip version is 1.5.6`.
I want to install extra libraries from url like a git repo on setup.py is
being installed.
I was putting extras in `install_requires` parameter in `setup.py`. This
means, my library requires extra libraries and they mus... |
Using list comprehension to search a 2d array (python)
Question: I am trying to search a 2D array of characters and return the array indices,
(x_T,y_T), of all of the letter T's in the array. I figure this could easily
done with two stacked for loops but I was curious to know if it could be done
my efficiently using li... |
Py2exe - module does not find
Question: I'm trying to make an exe file from my (2) py files. In one file is bs4
imported - `import bs4` When I try to execute this script:
setup(
console = ['gui.py'],
options = {
'py2exe': {
'packages': ["bs4"]
}
... |
Python - Files wont download
Question: Here's My code, all the urls are in a Config Parser format file. When the
button is pressed files will not download. What did go wrong? I used urllib
should I have used urllib2? Some of the functions may be there but not used
just ignore that.
import wx
import C... |
Python - Should I alias imports with underscores?
Question: This is a conceptual question rather than an actual problem, I wanted to ask
the great big Internet crowd for feedback.
We all know imported modules end up in the namespace of that module:
# Module a:
import b
__all__ = ['f']
f = la... |
Python: searching csv and return entire row
Question: I couldn´t find a better place to ask my question. I am learning Python and
trying to create a script as follows.
1) Should be able to search csv file.
2) Return entire row if match is found.
My csv:
Product,Scan,Width,Height,Capacity
LR,2999,7... |
Fit a line to a matrix in python
Question: I have a matrix of shape 256x256 to which I'm trying to find a line of best
fit. This is an image by the way, so these are simply intensity values. Let's
assume I want to find the line of best fit through all the intensities, how
would I go about doing that?
[This](http://stac... |
tkinter option menu - update options on fly
Question: I'm creating a GUI using Tkinter with Python 2.7.6.
I have a drop down menu, created and initially disabled with the following
code:
self.dropdown = Tkinter.OptionMenu(self, self.dropdownVar, "Select SED...")
self.dropdown.grid(column=0,r... |
How to convert IETF BCP 47 language identifier to ISO-639-2?
Question: I am writing a server API for an iOS application. As a part of the
initialization process, the app should send the phone interface language to
server via an API call.
The problem is that Apple uses something called [IETF BCP 47 language
identifier]... |
Python unittest: to mock.patch() or just replace method with Mock?
Question: When mocking classes or methods when writing unittests in Python, why do I
need to use
[@patch](http://www.voidspace.org.uk/python/mock/patch.html#mock.patch)
decorator? I just could replace the method with Mock object without any patch
annota... |
Structuring Plain Text to JSON
Question: I am attempting to take a collection of strings, tokenize the strings into
individual characters, and restructure them into JSON for the purpose of
building a cluster dendrogram visualization (sort of like [this word
tree](http://bl.ocks.org/emeeks/4733217), except for strings i... |
PermissionError: [WinError 5] Access is denied python using moviepy to write gif
Question: I'm using windows 8.1 64 bit
my code
import pdb
from moviepy.editor import *
clip = VideoFileClip(".\\a.mp4")
clip.write_gif('.\\aasda.gif')
the exception is at write_gif method
... |
Jasper Report Module on OpenERP 7
Question: I was trying to install Jasper Report module for OpenERP 7
I got them Syleam mdule from here <https://github.com/syleam/openerp-
jasperserver>
and download OpenERP 7 from here <http://nightly.openerp.com/7.0/nightly/src/>
I already install httplib2, pyPdf and python-dime t... |
Python class inheriting multiprocessing: mocking one of the class objects
Question: I have written a class that inherits the _multiprocessing.Process()_ class. In
the initialization I set some parameters, one of them is another class that
writes to some file on my hard drive. For the purpose of unit testing I would
lik... |
APLpy attribute error : 'module' object has no attribute 'FITSfigure'
Question: I have installed APLpy (version 0.9.12) & I have python 2.7.
I have a FITS image called "test.fits".
I gave following commands:
import aplpy
fig = aplpy.FITSfigure("test.fits")
Then I got this message:
... |
Testing Tornado app for 4xx status code
Question: Consider the following Tornado (v 4.0.2) application, which is a little bit
modified version of official [hello
world](http://www.tornadoweb.org/en/latest/#hello-world) example:
import tornado.ioloop
import tornado.web
class MainHandler(torna... |
Trouble with scraping text from site using lxml / xpath()
Question: quick one. I'm new to using lxml and have spent quite a while trying to scrape
text data from a particular site. The element structure is as shown below:
<http://tinypic.com/r/2iw7zaa/8>
What i want to do is extract the 100,100 that is shown within t... |
Avoid calling an object after it is dead
Question: I have a `threading.Thread` subclass in python and its run method is as
follows:
def run(self):
while self.caller.isAlive():
details = self.somefile.read()
if self.status() and details:
self.handler(details... |
Python - Extracting excel docs from file, need help reading data
Question: So I've been working on a project extracting .xlsx docs from a file in attempt
to compile the data into one worksheet.
So for I've managed a loop to pull the documents but now I'm stuck trying to
read the documents.
Python 2.7
As follows, my ... |
create database by load a csv files using the header as columnnames (and add a column that has the filename as a name)
Question: I have CSV files that I want to make database tables from in mysql. I've
searched all over and can't find anything on how to use the header as the
column names for the table. I suppose this m... |
Python replace/delete special characters
Question:
character = (%.,-();'0123456789-—:`’)
character.replace(" ")
character.delete()
I want to delete or replace all the special characters and numbers from my
program, I know it can be done in the one string just not sure how to space
all the special cha... |
Nested Loop lines in a file n times (Example 3) below: Python
Question: I have a file with lines which need to be repeated as many times as the
decimal/hex value mentioned in the first line.
Input Example:
Loop 3 {Line1} ##the line is within curly braces so I used regex but not printing it out right.... |
How to start redis server and config nginx to run mediacrush script on CentOS?
Question: I found a MediaCrush open source from here
> <https://github.com/MediaCrush/MediaCrush>
But stuck in last steps. I started the Redis server, use command
> $redis-cli
that received the "PONG" response.
Then used the command
> ... |
Opening tabs using Webbrowser module in Python
Question: I'm writing a Python Script using webbrowser module to automatically open the
desired webpages.
The issue I'm facing is that I'm only able to open the webpages on different
Browser windows and not on the same Browser window on different tabs.
Below is the code... |
Socket server not responding when in thread
Question: I'm trying to set up a simple socket server in a qgis plugin. The ultimate
goal is to communicate between qgis and matlab.
I found a clear example for something comparable from here:
<http://www.blog.pythonlibrary.org/2013/06/27/wxpython-how-to-communicate-
with-yo... |
Use variables python script to open file
Question: I'm not too familiar with python, can anyone tell me how I can open files
using variables in python? I want to automate this in a script to run the same
task across multiple directories
Here machine and inputfile are variables.. I tried the following code but keep
get... |
Fast 1D convolution with finite filter and sum of dirac deltas in python
Question: I need to compute the following convolution:

And K is a very simple filter, that is simply a rectangular box with finite
(!) size. My data is a list of the times t_i o... |
Python: LOAD DATA INFILE mySQL
Question: I try to import data into a mySQL database using Python, but I can't get it to
work. I don't get any errors it looks as if everything is working OK, but the
text file never gets imported.
I can import the text file just fine if I do it manually via the mysql command
line in Ter... |
Send commands to a socket with Python
Question: I am trying to connect to a socket file and send it some commands :
#!/usr/bin/env python
import socket
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.connect("/var/run/socket")
s.send('a command here')
data = s.recv(1... |
Python Pandas DataFrame how to Pivot
Question: Dear amazing hackers of the world,
I'm a newbie, and can't figure out which python/pandas function can achieve
the "transformation" I want. Showing you what I have ("original") and what
kind of result I want ("desired") is better than a lengthy description (I
think and ho... |
removing \xa0, \n, \t from python string
Question: I have a list item, that I've converted into a string:
[u'\n Door:\xa0Novum \t ']
I need to remove everything so that Im left with
Door:Novum
I have tried various methods:
strin... |
Django Sites Framework: Initial Data Migration Location
Question: Before Django 1.7, when using the [Django Sites
Framework](https://docs.djangoproject.com/en/dev/ref/contrib/sites/#module-
django.contrib.sites) one could/should define the initial data using [Initial
Fixtures](https://docs.djangoproject.com/en/1.7/howt... |
Python: installer with py2exe and project with OpenOPC module
Question: I searched for how can I produce a installer for my Python project. I found a
good alternative, that is the py2exe module. This is used on a setup.py.
But my project uses a com server with win32com module into the OpenOPC module.
For this reason, ... |
Dictionary value initialization on lookup
Question: Consider the following:
mylist = ['a','b','c','d']
mydict = {}
for val in mylist:
if val not in mydict:
mydict[val] = []
mydict[val].append(1)
Is there any way to avoid the double lookup ("`val in mydict`" and
"... |
Accessing Python Dictionary Elements
Question: I want to save raw input elements in a dictionary to a variable. Here is a
sample of what I am doing:
accounts = {}
def accountcreater():
accountname = raw_input("Account Name: ")
accountpassword = raw_input("Account Password: ")
a... |
Vincent visualizations are not displaying from the command line
Question: I'm new to Python visualizations, and have been trying out [vincent's Quick
Start examples](https://github.com/wrobstory/vincent) in iPython Notebook.
I pasted the following code in iPython Notebook and the visualization
displayed. Then I pasted... |
get the tip revision informations from mercurial API
Question: How can I get the tip revision informations of a remote mercurial repository
from a python script?
I want something like:`hg tip`. AFAIK hg commands needs a local repository.
I found another approach with mercurial API : [List remote branches in
Mercurial... |
What is the meaning of % in this python expression
Question: Can someone explain what this regular expression means? I am looking at
someone else's python code, and I just find myself curious as to what the
expression is doing. I am also not certain what the 2nd % sign means.
regexStr = '(%s)' % '|'.join... |
Request signature does not match signature provided for Amazon AWS using Python
Question: So I'm attempting to collect reviews from Amazon using their API.
Unfortunately though it seems that I might be doing something wrong at some
point in my program. It's sending back a response that many others were
apparently getti... |
How to guarantee tcp data sent using python asyncio?
Question: I have a client that connect to server and send all messages of the list, and
each message sent, it is deleted from the list.
But when I force to close the server, client still continue sending and
deleting messages from the list. I would like that if conn... |
Accessing global variables from inside a module
Question: I wrote some python code to control a number of USB (electrical relays and
temperature sensors) and RS232 (vacuum gauges) devices. From within this main
script (e.g., `myscript.py`), I would like to import a module (e.g.,
`exp_protocols.py`) where I define diffe... |
Find, split and concatenate
Question: I have to find certain supplier according number in the second line (17.
position)
For example , I have to find , split and concatenate this type of text - (The
specifier for find , split and concatenate is second line - NUMBER , which
consists from 6 numbers , so I have to find t... |
Python/Excel - Slice extracted excel data - exclude rows maintain structure
Question: So I'm attempting exclude the top three rows during a data extraction.
for col_num in xrange(sheet.ncols):
col = sheet.col_values(col_num, start_rowx=3, end_rowx=None)
writer.writerow(col) #this syntax a... |
Is there any way to run three python files sequentially as the output of each file depends on the other
Question: I have three python files `file1.py`, `file2.py`, `file3.py`. Each file will
generate a `.csv` file and will give it to the other file sequentially. To
elaborate `file1.py` will generate `file1.csv` and thi... |
Using ctypes to grab a pointer from a nullary function (segfault) x64
Question: I've reduced my problem to the following toy file and command:
// a.c --> a.out, compiled with `gcc -fPIC -shared a.c`
void* r2() {
return NULL; // <-- could be anything
}
`python -i -c "from ctypes import... |
How to open a video file in python 2.7?
Question: I am new to python, and I am trying to open a video file "This is the
file.mp4" and then read the bytes from that file. I know I should be using
open(filename, "rb"), however I am not clear about the following things:
1. * In what directory is python looking for... |
What's the difference between stdin and sys.argv in python?
Question: I was docked points in a coding challenge that specified that I needed to read
from STDIN. This was my input method:
def __init__(self, input):
self._dictionary = {}
with open(input, 'r') as f:
reader = csv.... |
Pulling ephem.next_rising(sun) for various lat/long locations around the world
Question: I'd like to set up a Python program to be able to pull sunrise/sunset from
various locations to trigger lights in the local location to symbolize the
remote sunrise as it would be -- if you were actually there. What I mean by
this,... |
Python boto ec2 - How do I wait till an image is created or failed
Question: I am writing a code to iterate through all available instances and create an
AMI for them as below:
for reservation in reservations:
......
ami_id = ec2_conn.create_image(instance.id, ami_name, description=ami_de... |
Convert structured array with various numeric data types to regular array
Question: Suppose I have a NumPy structured array with various numeric datatypes. As a
basic example,
my_data = np.array( [(17, 182.1), (19, 175.6)], dtype='i2,f4')
How can I cast this into a regular NumPy array of floats?
... |
how to execute scrapy shell "URL" with notebook
Question: i am trying to scrapy
and there is scrapy shell "URL" command, executing console ipython with a
response object from the URL.
but i want to do that thing with notebook.
is there any way to execute scrapy shell with notebook,
or how can i get the same respons... |
KeyError: 'filename' while linking python and html using karrigell
Question: I'm trying to read an uploaded file using python 2.7 and Karrigell. But it is
showing me:
Traceback (most recent call last):
File "C:\Karrigell-3.1.1\karrigell\core\HTTP.py", line 333, in process_request
File "C:\Kar... |
Python - Race Results - Issues sorting dictionay entries and printing out data in particular form
Question: FYI I am new to python and there could be a more efficient way to produce the
desired results. Please feel free to suggest an alternative method.
Problem 1 - I cannot figure out a way to add "1st Place:, 2nd Pla... |
How to use beautifulsoup when HTML element doesn't have a class name?
Question: I am using the following code (slightly modified from Nathan Yau's "Visualize
This" early example) to scrape weather data from WUnderGround's site. As you
can see, python is grabbing the numeric data from the element with class name
"wx-dat... |
python detect if any element in a dictionary changes
Question: **Rather than saving a duplicate** of the dictionary and comparing the old
with the new, alike this:
dict = { "apple":10, "pear":20 }
if ( dict_old != dict ):
do something
dict_old = dict
**How is it possible to d... |
Django, apache and mod_wsgi
Question: I am trying to deploy an Apache webserver with a Django installation.
I have installed Apache 2.2.25 (is working) and mod_wsgi 3.5.
In my error log I get
[Sun Oct 05 10:09:10 2014] [notice] Apache/2.2.25 (Win32) mod_wsgi/3.5 Python/3.4.1 configured -- resuming norm... |
python fabric perform actions from prompt on all servers
Question: I have several servers on my my fab file, and I want to have a function that
will prompt me of what to do and than perform it on all servers.
def simple():
actions = prompt('Type the actions: ')
run(actions)
now when I... |
Python: Import all variables
Question: So I have two python files. Let's call them module.py and main.py. module.py
looks like this:
name = "bob"
age = 20
def changename():
name = "tim"
and main.py looks like this:
import module
print(module.name)
module.... |
Printing in the same line in python
Question: I am quite new in python and I need your help.
I have a file like this:
>chr14_Gap_2
ACCGCGATGAAAGAGTCGGTGGTGGGCTCGTTCCGACGCGCATCCCCTGGAAGTCCTGCTCAATCAGGTGCCGGATGAAGGTGGT
GCTCCTCCAGGGGGCAGCAGCTTCTGCGCGTACAGCTGCCACAGCCCCTAGGACACCGTCTGGAAGAGCTCCGGCTCCT... |
Calculate most common string in a wxListBox
Question: I have a wxListBox that is filled with strings (Customer Names) that the user
inputs. I have to calculate the most occurring name and least occurring name
in the list. I have to use a loop.
Below is actual code mixed with pseudo code, but I am having trouble with t... |
Embedding Python in C++. Passing vector of strings receving a list of lists
Question: I have a Windows application that is written in C++. I have a vector of
strings that I need to pass to a python Script for processing. I know how to
embed python in C++ with simple type but I am looking at how to create a
python objec... |
Remove character from file in-place with native Windows tools
Question: I'd like to remove the last character off a large file. The restrictions are
that:
* the file has to be modified in-situ, without using the disk space required for a similar second file
* it's a windows machine
* I cannot copy any compiled ... |
How to install PyMongo
Question: I am currently trying to install MongoDB driver for Python on my Mac OS X
(mavericks).
But when I run
[ Dsl ~/Documents/python ] sudo easy_install pymongo
I get the following output
Searching for pymongo
Best match: pymongo 2.7
Processing py... |
When to maintain reference to key vs. reference to actual entity object after put operation.
Question: When working with datastore entities in App Engine, people have noticed odd
behavior after a put operation is performed on an entity if you choose to hold
on to a reference of that entity.
For example, see [this issu... |
Pillow OSError when loading into tkinter using Python 3.4
Question: I am loading an image from a server, and I keep getting this error when I use
[Base64](http://en.wikipedia.org/wiki/Base64) on the data.
Here's my code:
import tkinter as tk
from PIL import ImageTk
root = tk.Tk()
import urll... |
Sending byte strings to serial device
Question: I'm using Python3 running on a Raspberry. I have a serial device
(max232/PiC16F84) connected to the Raspberry via an USB to Serial adapter. I
try to send two bytes to the device (e.g 0000 0011) which then will be
interpreted as a command by the PIC. The USB - serial adapt... |
python - how register user with xmpp
Question: I'm trying to register a new user, but not work. I get the following error:
AttributeError: Client instance has no attribute 'SendAndWaitForResponse'
this is my code:
import xmpp, sys
usuario = 'test1@localhost'
password = 'mypas... |
Error in downloading pdb from protein data bank using biopython
Question: Some pdbs cannot be download from PDB using biopython, though they exist in
PDB. It generates the error. This code is used to download pdb (2j8e) It could
not download however it works for other pdbs.
Python 2.7.4 (default, May 14 ... |
How to append one csv file to another with python
Question: I have two .csv files that I need to either join into a new file or append one
to the other:
filea:
jan,feb,mar
80,50,52
74,73,56
fileb:
apr,may,jun
64,75,64
75,63,63
What I need is:
jan... |
From date-time to usable value Python
Question: I need to make a histogram of events over a period of time. My dataset gives
me the time of each event in the format ex. 2013-09-03 17:34:04, how do I
convert this into something I'm able to plot in a histogram i Python? I know
how to do it the other way around with the d... |
skimage slic: getting neighbouring segments
Question: There is a nice implementation of super resolution segment generation (SLIC)
in skimage.segmentation package in the python sklearn package.
The slic() method returns the integer sets of labels. My question is how can I
get the segments that are spatial neighbors of... |
Python does not create log file
Question: I am trying to implement some logging for recording messages. I am getting
some weird behavior so I tried to find a minimal example, which I found
[here](https://docs.python.org/2/howto/logging.html#logging-to-a-file). When I
just copy the easy example described there into my i... |
How to create a function (Iteration/Recursion) to run over a dictionary of tuples in Python?
Question: I have a Python dictionary of lists like this one:
d = {'A': [(4, 4, 3), [1, 2, 3, 4, 5]],
'B': [(2, 1, 2), [5, 4, 3, 2, 1]],
'C': [(4, 1, 1), [2, 4, 1, 2, 4]]}
I need to create ... |
Python contour plotting wrong values with plot_surface
Question: I want to plot a surface in Matplotlib consisting of zeros everywhere, except
for a rectangular region centered in (0, 0), with sides (Dx, Dy), consisting
of ones - kind of like a table, if you wil; I can do that using the
`plot_surface` command, no worri... |
Examples of Google Cloud Storage Used With Google App Engine (Python)
Question: Anybody have any code examples for using google cloud storage with google app
engine(python)?
The best I've seen so far is from an answer I received from a prior question I
posted: <https://code.google.com/p/appengine-gcs-
client/source/br... |
Python sorting a text file?
Question: So I know how to import a texfile and sort numbers such as:
1
6
4
6
9
3
5
But I don't know how to sort a data that looks like:
Merchant_9976 20122
Merchant_9977 91840
Merchant_9978 92739
Merchant_9979 97252
... |
Random selection with criteria in python
Question: I want to (pseudo)randomly select an object from a list that fits a criterion.
I have a function that does this for one criterion I need:
from random import randint
def choose(array):
return array[randint(0,len(array)-1)]
def choose_c(arr... |
django writing my first custom template tag and filter
Question: I am attempting to write a simple django [Custom template tags and
filters](https://docs.djangoproject.com/en/1.4/howto/custom-template-tags/) to
replace a html break (< b r / >) with a line space on a template.
I have followed the django docs, but I am ... |
Python - Selecting All Row Values That Meet A particular Criteria Once
Question: I have a form set up with the following fields: Date Time, ID, and Address.
This form auto assigns each entry a unique id string (U_ID) and then this data
is later output to a csv with headers and rows something like this:
D... |
python using search engine to find text in text file
Question: I have lots of text files in a directory.Then i will ask a keyword from the
user.If the user enters for eg: 'hello'
Then,it has to search the entire text file of all the directories present in
the text file and then search and return the line of the text ... |
Detecting colored objects and focused on the camera with OpenCv
Question: i need some help with a project. Its about detecting red object in a
determined green area. I have to dodge objects and reach the goal (in this
case a blue area), also back to collect the objects with a servomotor and a
clamp, all using a camera ... |
concatenate 2 readed files python
Question: I was trying to generate all the hex numbers from `0000000000` to `FFFFFFFFFF`
with all combinations on 10 length string but the file size it was very large,
so i think to divide in two lists from `00000` to `fffff` and then join that
lists through `stdout` and pipe it to air... |
How to use wxPython for Python 3?
Question: I installed `wxPython 3.0.1.1`, but I'm unable to `import wx` using `Python
3.4.1`. I am getting the following error:
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 00:54:21)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyrigh... |
Python - parse a line of text
Question: I have the following input from a text file:
Title Value Position Perturbation 1.5 0.6 8.5 9.8 0 8.5 9.6 0.5 0.6 (...)
Title Value Position Perturbation 3 1.5 6 0 0.8 9.7 5.3 9.9 0.7 0.9 (...)
I want to remove the first 4 columns and for the columns ... |
Python pptx unexpected keyword argument 'standalone'
Question: I try to run example of pptx- version 0.5.1 in Python 2.6.8. The code is
simple
from pptx import Presentation
prs = Presentation()
prs.save('test.pptx')
But I get the error "got an unexpected keyword argument 'standalone' "... |
Django 1.7 makemigrations - ValueError: Cannot serialize function: lambda
Question: I switch to Django 1.7. When I try makemigrations for my application, it
crash. The crash report is:
Migrations for 'roadmaps':
0001_initial.py:
- Create model DataQualityIssue
- Create model Monthly... |
Why does selenium wait for a long time before executing this code?
Question: I'm trying to do infinite scrolling on this page and here is my code:
from selenium import webdriver
import time
profile = webdriver.FirefoxProfile()
profile.set_preference("general.useragent.override","Mozilla/... |
Using C/C++ DLL with Python/Pyserial to communicate with Opticon barcode reader
Question: I have an opticon OPN-2001 barcode scanner that im trying to communicate with.
It officially supports C/C++ and .NET but i wanted to use it with python if
possible.
I have opened a serial connection to the device (or at least the... |
independent prototyping with java
Question: I am new to java (well I played with it a few times), and I am wondering:
=> How to do _fast_ independent prototypes ? something like one file projects.
The last few years, I worked with python. Each time I had to develop some new
functionality or algorithm, I would make a ... |
How do I execute an def in python from input
Question: For example, I have:
def function():
return
and I want to execute it via:
d = input('Enter the def name: ')
by entering the def name('function' in this case).
How would I do this?
===================EDIT==========... |
Addition going wrong in Python
Question: I am a beginner at python and am writing a basic calculator
while True:
print("PyCalc")
print()
print()
init=input("Press 1 for Basic arithmetic")
if init=="1":
input1=input("Basic Arithmetic...Only +,-,*,/ accep... |
Django: Naive datetime while time zone support is active (sqlite)
Question: I'm going around in circles on this on and need some help. I continue to get a
`naive timezone` warning. Not sure what I am doing wrong! Arg.
Here is the warning:
/django/db/models/fields/__init__.py:1222: RuntimeWarning: DateTi... |
How to encode Chinese character as 'gbk' in json, to format a url request parameter String?
Question: I want to dump a dict as a json String which contains some Chinese characters,
and format a url request parameter with that.
here is my python code:
import httplib
import simplejson as json
impo... |
Buildbot - Traceback while polling for changes issue
Question: I'm running on Windows 7 x64. I followed the install documentation on Buildbot
and did some research on the issue I'm having and haven't found a solution
yet. When I do a force build, everything works fine. I'm using GitPoller. When
it tries to poll for cha... |
Installing the same python environment on another machine
Question: I'm developing a python project on my desktop (OS X) and it's running well.
Now I need to run it on a computing cluster that is running Linux and I have
no root access. On my Home in the computing cluster I installed Anaconda
locally. Then when I run m... |
Create executable of a python application
Question: I want to create an executable of a python application which can work on
ubuntu machine.
Python setuptools has options for windows(bdist_wininst) and rmp(bdist_rpm),
but i couldn't found any option in python setuptools for ubuntu or debian.
There is one more option ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.