text stringlengths 226 34.5k |
|---|
ttk.Entry.select_range() works with Button, but not ttk.Button in python / tkinter?
Question: Can some one please explain why entry.select_range() works with a Button, but
not a ttk.Button?
from tkinter import *
from tkinter import ttk
root = Tk()
entry = ttk.Entry(root)
entry.p... |
Py2exe EOF error when compiling
Question: Below is a simple file rename program that runs and works great, when
launching from Python. Whenever I try compiling this program into a single
.exe it won't launch and gives this error: File "UserInputRenameReplace.py",
line 12, in EOFError: EOF when reading line.
What could... |
Python33, Flask: Lot of Errors starting Hello World
Question: I just have installed with pip flask and HTML5 on my window-sytem. When I
start the Hello World!-program with IDLE I get the text correct in a new tab
of Firefox. But also a lot of error-messages in the Python shell:
Traceback (most recent... |
Python axhline, title and axis labels
Question: I am trying to plot a horizontal line over another plot using matplotlib.
Everything works except the title and axis labels never show up. How does this
work?
*Edit-sorry, code looks sort of like this: from matplotlib import pyplot as plt n=100
plt.axhline(... |
beautifulsoup for subreddits
Question: I have been trying to learn some html parsing with BeautifulSoup and tried to
get it work for reddit. Here is my code,
!/usr/bin/python
import BeautifulSoup
from BeautifulSoup import BeautifulSoup as BSoup
import os, re, sys, math, os.path, urllib, ... |
Changing default home directory for Python to start in a different directory
Question: Every time I start iPython, the first thing I **always** immediately change
the directory from the default directory, and I would like to know of a way to
edit this default starting directory.
Currently, iPython starts in the follow... |
Error Installing JPype - Permission Denied after jni.h not found
Question: This is my first post on StackOverflow.
I'm trying to install JPype. I have looked at the tutorials and forums about
this online. However, I am not able to successfully complete the installation.
This is the error I'm getting:
In file included... |
Is it possible to print python statements that appear in the middle of the program?
Question: I have a question regarding python statements and whether or not it is
possible to print statements such that they appear in the middle. I know that
you can just punch the space bar until the word is in the middle and then
pri... |
Random Output from a list - Python
Question:
Stores = ["alpha","bravo","charlie","delta"]
KnownName = Stores.pop()
KnownName2 = Stores.pop()
KnownName3 = Stores.pop()
print KnownName+" "+Stores.pop()
print KnownName2+" "+KnownName
print KnownName3+" "+KnownName2
print KnownName3
... |
Eclipse with Python - having difficult with python version being picked up for egg file creation
Question: I am using CentOS with Python 2.6 (/usr/bin/python2.6) but I installed Python
2.7.8 (/usr/local/lib/python2.7).
The egg files (on running a script on eclipse get created
/usr/bin/python2.6/.. for the wrong versio... |
Just getting started on Google App Engine and being greeted with a blank page
Question: I'm currently in Udacity's CS253 (Web Development) course, and I'm getting
through the second homework project (the ROT13) website. I paid attention to
the lecture and I think I have a good grip on the code in the file
`naisho.py`, ... |
use pickle to save dictionary in python
Question: I have a file `hash_db.pickle` that when I created it I saved a dictionary on
it:
v = {hash_value:{"file name":file_name,"file size":file_size,"last scanned time":scanned_time}}
{123dfre345:{"file name":calc.pdf,"file size":234,"last scanned time... |
Inserting text into a stream using Python OpenCV
Question: Good day, which adds to the video stream and sends the text back into the
stream. The idea is that I want the program to listen to certain IP addresses
and port stream, using the OpenCV library, this stream divided into frames and
each frame inserted text and t... |
High precision multidimensional Newtons method with mpmath.findroot in Python
Question: I am trying to solve a system of equations numerically to high precision using
the multidimensional newtons method of mpmath.findroot. Here's an example
system:
def f(x_0, x_1, x_2, x_3, x_4, x_5, y_0, y_1, y_2, y_3, ... |
Python/bs4: Span inside div tag - text extraction
Question: I'm beating with an text extraction from div tag. The point is that there is a
tag without opening pair, inside the div tag. So if I do this: `raw =
soup.find('div', class_='inside').text` I get only text before the tag.
An example:
<div class=... |
Using pandas to read downloaded html file
Question: As title, I tried using `read_html` but give me the following error:
In [17]:temp = pd.read_html('C:/age0.html',flavor='lxml')
File "<string>", line unknown
XMLSyntaxError: htmlParseStartTag: misplaced <html> tag, line 65, column 6
What ... |
Unable to connect cassandra with python
Question: I am trying to connect to cassandra from python , I have installed `cassandra`
as `pip install pycassa`.When i am trying to connect to the `cassandra` i am
getting the following exception
from pycassa.pool import ConnectionPool
pool = ConnectionPool('... |
setup.py bdist_egg is not putting files into the egg
Question: I have a confusing issue with python packaging
I have a setup.py that looks like this:
import os
try:
from setuptools import setup
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
... |
Writing to module-wide variable
Question: Lets say I have these 3 (tiny) python files -
**a.py**
myvar = 'a'
**b.py**
import a
import c
myvar = 'b'
c.pr()
**c.py**
from a import myvar
def pr():
print myvar
Now if I execute... |
how to match file name in the file using python
Question: How to find out if two file exists with same pattern inside a file.If all
filenames have two-set of filenames ( csv.new and csv) then go ahead to next
step otherwise exit with error message.
The prefix "abc_package" will have two files one with extension "csv.n... |
python web page parsing when no HTML tags exist
Question: Got this lovely webpage with nothing but text and I need some help getting
certain lines formatted and also join multiple lines on one line
The web page is <http://www.srh.noaa.gov/data/PHI/SRFPHI>
I need the date of report and everything between these 2 lines... |
loop prints a error message multiple times
Question: i am having a little problem with python. At the this point the loop prints a
error message multiple times, -well equal to the number of errors in the users
input. i would prefer if the user only receive a single message
input_seq = "";
#raw_i... |
Python Tkinter / How to let OptionMenus share one item list?
Question: i'm trying to build multiple option menus sharing the same "base item list". A
multiple selection of one item in different menus should not be possible, so
all menus have to be updated when an item is selected in one of the available
menus.
... |
Adding Matplotlib to Panel from wxglade
Question: Hi i'm trying to add a matplotlib chart example from the link below
[Embedding a matplotlib figure inside a WxPython
panel](http://stackoverflow.com/questions/10737459/embedding-a-matplotlib-
figure-inside-a-wxpython-panel)
To panel within a wxpython frame generated u... |
Working with namespace while parsing XML using ElementTree
Question: This is follow on question for [Modify a XML using
ElementTree](http://stackoverflow.com/questions/25068629/modify-a-xml-using-
elementtree)
I am now having namespaces in my XML and tried understanding the answer at
[Parsing XML with namespace in Pyt... |
Reading a page and parsing it with minidom.parse or minidom.parseString in Python?
Question: I have either of these codes:
import urllib
from xml.dom import minidom
res = urllib.urlopen('https://www.google.com/webhp#q=apple&start=10')
dom = minidom.parse(res)
which gives me the error `x... |
multiprocessing.Pool: calling helper functions when using apply_async's callback option
Question: How does the flow of `apply_async` work between calling the iterable (?)
function and the callback function?
Setup: I am reading some lines of all the files inside a 2000 file directory,
some with millions of lines, some ... |
Parsing PubMed Central XML using Biopython Bio Entrez parse
Question: I am trying to parse PubMed Central XML files using Biopython's Bio Entrez
parse function. This is what I've tried so far:
from Bio import Entrez
for xmlfile in glob.glob ('samplepmcxml.xml'):
print xmlfile
fh = open ... |
crypt does not work in osx, returns wrong value
Question: I'm using an OSX 10.9 (last version) with the last Xcode. When I execute the
following command:
python -c 'import crypt; print crypt.crypt("test", "$6$random_salt")'
I get this as an answer:
$6asQOJRqB1i2
but if I execut... |
Put javascript code from head tag into meteor js files
Question: Okay I'm not really sure how to explain this clearly so the title might have
been slightly confusing. I have some code for using the google maps api from
w3 schools (<http://www.w3schools.com/googleAPI/google_maps_basic.asp>) which
is shown as going in th... |
Add lots of data to Google App Engine NDB (Python)
Question: I'm working on a project that requires me to import lots of data (on the scale
of tens of thousands of entities) into the Google App Engine NDB.
The data is stored in a text file, for which I wrote a parsing program that
generates a list of the entities foun... |
How to inherit matplotlib in python?
Question: When I run the program below:
import matplotlib
class abc(matplotlib):
def anything(self):
print("anything")
aa=abc()
I got the following errors:
> File "test.py", line 2, in class abc(matplotlib): TypeError: Error whe... |
Window scrolling and offest not working in Pygame
Question: I'm working on a simple 2d tile based game in Python using Pygame. I've got
the basics of a camera starting to work, it is bliting the tiles at an offset
but the actual rects of the tiles aren't moving with the blitting. Here's the
camera class, really simple ... |
How to use/install pip
Question: Noob question here on Python using pip. I've installed pip using setuptools on
a Win7 32-bit machine. I am not using virtualenv.
Now trying to install enum34 for use with dbf; I need enum34 as I have to work
in Python 2.7 for use with ArcGIS 10.2. In PowerShell, I get the following
ret... |
Python: Whoosh seems to return incorrect results
Question: This code is straight from Whoosh's [quickstart
docs](http://pythonhosted.org/Whoosh/quickstart.html):
import os.path
from whoosh.index import create_in
from whoosh.fields import Schema, STORED, ID, KEYWORD, TEXT
from whoosh.index imp... |
Parsing arguments using argparse and mpi4py
Question: I want to run a Python script in several parallel processes under MPI, and I
need to pass command-line arguments. I'm using the argparse module in Python,
but it's a little messy sometimes. If I don't specify the right arguments, all
the processes complain, so I get... |
Can I double-click a tkinter Listbox option to invoke function in Python?
Question: I have a Listbox with an associated "Select" button. I want my GUI such that a
double-click on any Listbox value invokes this button's command. My attempt
(below) works when an option is selected and the user double-clicks ANYWHERE
in t... |
error when installing package tables for python
Question: This is the problem when I try to build package tables-3.1.1 for python:
sudo python setup.py build_ext --inplace
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
* Using Python 2.... |
Django migration strategy for renaming a model and relationship fields
Question: I'm planning to rename several models in an existing Django project where
there are many other models that have foreign key relationships to the models
I would like to rename. I'm fairly certain this will require multiple
migrations, but I... |
Avoid 'MySQLConverter' object has no attribute '_timestamp_to_mysql' error with datetime64[ns] and MySQL
Question: I'm reading a CSV file like this
Date,Open,High,Low,Close,Volume,Adj Close
2000-12-29,30.88,31.31,28.69,29.06,31702200,27.57
2000-12-28,30.56,31.62,30.38,31.06,25053600,29.46
200... |
Pyramid ImportError: No module named registry
Question: I have recently upgraded pyramid to 1.5.1 from 1.2 on my machine, when try to
start the uwsgi server, now i am getting this error.
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py", line 247, in loa... |
asyncio with map&reduce flavor and without flooding the event loop
Question: I am trying to use asyncio in real applications and it doesn't go that easy, a
help of asyncio gurus is needed badly.
## Tasks that spawn other tasks without flooding event loop (Success!)
Consider a task like crawling the web starting from ... |
Import error with Python Django
Question: (Note: I have found a workaround, as stated at the bottom, but it seems like
the wrong way to go about this.)
`views.py` and `forms.py` are both in
`R:\\jeffy\\programming\\sandbox\\python\\django_files\\tutorial\\django_test\\django_test\\`
and
`R:\\jeffy\\programming\\san... |
python Qt ibus error messages
Question: Running the following python program results in 2 error messages at startup.
ubuntu:~/Desktop/testing$ python test.py
Bus::open: Can not get ibus-daemon's address.
IBusInputContext::createInputContext: no connection to ibus-daemon
The errors occur i... |
How to change color of plotted curves when using Animations in Python MatPlotLib?
Question: I have a piece of code that uses the FuncAnimation method in Python MatPlotLib
to generate 50 random Exponential Decay Curves and updating the plot showing
each one other the curves as they re generated.Each curves shows up with... |
python different result from IDLE and python script
Question: I have tried the following in Python 2.7 shell:
>>> from nltk.stem.isri import ISRIStemmer
>>> st = ISRIStemmer()
>>> string = u'\u062D\u064E\u062F\u0651\u064E\u062B\u064E\u0646\u064E\u0627'
>>> st.stem(string)
u'... |
Match a pattern only when previous pattern matches
Question: I have a situation where I have to match a pattern only when previous regex
pattern matches. Both pattern are different and matchobj in different line.
For exmaple,
Text:
blah blah blah MyHost="xxxx"
again blah blah blah MyIp= "x.x.x.x"
... |
Python - 'numpy.float64' object is not callable using minimize function for alpha optimization for Simple Exponential Smoothing
Question: I'm getting the TypeError: 'numpy.float64' object is not callable error for
the following code:
import numpy as np
from scipy.optimize import minimize
def... |
Python irc bot input
Question: ive been working on an irc bot and have run into a halt, i cant figure out how
to accept input for arguments for a function, specifically my function add(),
heres the function,
def add(x1,x2):
xtot = x1 + x2
ircsock.send("PRIVMSG "+ channel + " :Toatal = %s... |
Python: unable connect with database
Question: Python 3.4 with psycopg2
I used [this
guide](https://wiki.postgresql.org/wiki/Using_psycopg2_with_PostgreSQL) to set
up a basic `psycopg2` connection like so:
#!/usr/bin/python
import psycopg2
import sys
import pprint
def main():
... |
Iterating over dictionaries in list - Python
Question: Similar to my last question: Is there a one-liner/Pythonic (the former doesn't
necessarily imply the latter, I know) way to write the following nested for
loop?
some_list = # list of dictionaries
for i in some_list:
for j in i['some_key']... |
Python: How to escape 'lambda'
Question: `lambda` has a keyword function in Python:
f = lambda x: x**2 + 2*x - 5
What if I want to use it as a variable name? Is there an escape sequence or
another way?
You may ask why I don't use another name. This is because I'd like to use
[`argparse`](https://d... |
Setting custom headers on a python-wordpress-xmlrpc request
Question: I'm trying to connect to a Wordpress blog using XMLRPC. I'm using the latest
library, v2.3 (<http://python-wordpress-xmlrpc.readthedocs.org/en/latest/>).
I get the following exception when I try to initialize the client:
ServerConnect... |
Python 2.7: updating Tkinter Label widget content
Question: I'm trying to make my Tkinter Label widget update but, where I thought it was
straightforward, now I can't sort it out.
My code is:
import Tkinter as tk
import json, htmllib, formatter, urllib2
from http_dict import http_status_dict
... |
parallellization in python multiprocessing
Question: I need to do parallelization in Python for my existing code and I am blocking
in one for loop. I used `multiprocessing.process` but it's freezing the
computer.
import multiprocessing
def func(pos,r,h,grid):
for i in arayb:
... |
how to stop after "cordova run ios"
Question: What is the command to stop running after using `cordova run ios` in terminal?
I found one topic about this with 1 answer saying it's `quit` but that didn't
work. Right now I close terminal every time which is very time consuming.
If i press ctrl+c I get the following:
>... |
Ensuring continuously updated image file is safe to open
Question: So here's the situation: I've got two Python programs, one to control a uEye
camera module, making use of the SimpleCV library, and another to do a bit of
analysis on the image. The reason for them being separate is that SimpleCV is
2.7, while a few mod... |
How to modify Qt/PyQt install on OSX
Question: After hours of QT/PyQt compiling and tedious installation there is new
`./PyQt4/` sub-folder under `/Library/Python/2.7/site-packages/`.
Since I don't want to run the same compilation/installation process on every
mac machine I thought I just would copy/paste that '`PyQt4... |
Using scipy.stats library or another method to generate data follows a distribution in a specific boundary
Question: I want to sample with `scipy.stats` library, using an upper and a lower
boundary for the sampled data. I am interested to use `scipy.stats.lognorm`
and `scipy.stats.expon` and set a constrain `(low<=x<=u... |
Sending DHCP Discover using python scapy
Question: I am new to python and learning some network programming, I wish to send an
DHCP Packet through my tap interface to my DHCP server and expecting some
response from it. I tried with several packet building techniques such a
structs and ctypes and ended up with using sca... |
MATLAB: which language interface to use when calling external library functions offered with various interfaces?
Question: Still very new to MATLAB and to programming in general, I got stuck in
understanding how to best make profit from what is documented in the official
MATLAB documentation in the chapter Calling Exte... |
python pickle - dumping a very huge list
Question: I have two directories, each of which contains about 50,000 images, which are
mostly 240x180 sizes.
I want to pickle their pixel infos as training, validation, and test sets,
but this apparently turns out to be very, very large, and eventually cause the
computer to e... |
Make string length divisible by 6 in Python
Question: I want the program to take a users input and format its length so it is
divisible by six, by adding the characters of the string onto the end of the
string, until `len(string)%6 == 0`:
string = raw_input('Enter String')
while len(string)<=6-len(st... |
Is this an efficient way to generate the Thue-Morse sequence in Python?
Question: Is using a generator as in the code below, an efficient way to generate the
[Thue-Morse
sequence](http://en.wikipedia.org/wiki/Thue%E2%80%93Morse_sequence) in Python?
# generate the Thue-Morse sequence
def genThueMorse(... |
Doctests fail with UnicodeDecodeError on C-extension and Python3
Question: I am having difficulty getting my testing framework to work for a C-extension
module for both Python2 and Python3. I like to run my docstrings through
`doctest` to make sure that I am not feeding my users bad information, so I
want to run `docte... |
ValueError: time data '24:00' does not match format '%H:%M'
Question: I'm having serious trouble converting 24 hour time to 12 hour.
def standard_time(t):
t = datetime.strptime(t, "%H:%M")
return t
When fed in `'24:00'` we get
ValueError: time data '24:00' does n... |
Hashed passcode matching stuck python
Question: I am doing a fun little project, making a kind of secret code program with a
GUI(Tkinter) to encrypt my text(not very securely). I am trying to make a
password on this program linked to a txt file. The program has default
password 'abc', stored in a text file in sha-224. ... |
Incorrect results with genetic algorithm image evolution
Question: I'm attempting to implement a program originally created by [Roger
Alsing](http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-
mona-lisa/). I've done quite a bit of research on what other people have
implemented. I decided to write my pr... |
python - PipeMapRed.waitOutputThreads(): subprocess failed with code 1
Question: Recently, I want to parse websites and then use BeautifulSoup to filter what I
want and write in csv file in hdfs.
Now, I am at the process of filtering website code with BeautifulSoup.
I want to use mapreduce method to execute it:
... |
py-bcrypt giving different hash results than flask-bcrypt - possible?
Question: I am generating a hash in a python app using the flask-bcrypt package on top
of flask-security. For a password of test12 i got a result of
'$2a$12$ibinoz7sTc76Vh09shUhruYD8CrJyUxPpu1m.kb6LmFmzvWBbb52a'
(used a randomly generated salt, per ... |
JSON schema $ref does not work for relative path
Question: I have 3 schemas:
child schema:
{
"title": "child_schema",
"type": "object",
"properties": {
"wyx":{
"type": "number"
}
},
"additionalProperties": false,
"r... |
Parse REST API: Proper way to query class object with ACL (python)
Question: There are three classes in my Parse database. For some reason, fetching data
from the second class ContactsData always returns an empty result. Would be
great if anyone could provide insights into the problem!
**1\. The default "Users" class*... |
How to filter user' s input ( html, with PHP backend) with python?
Question: There is a web application written in PHP and HTML. What I want is to filter a
users input for a variety of cases and sanitize it. For example, I want to
compare the input from a form (string) with a list of allowed strings and
depending if it... |
How do I look up the value of a multi-level pointer inside a process in Python?
Question: I have a process, and I want to look up a value of an address inside that
process but that address is a multi-level pointer and has a few offsets
attached to it. How do I do this in Python?
Answer: I'm answering my own question ... |
How does class datetime.timedelta work?
Question: I have been writing a python script to delete files in a folder if they are
older than x months.
I am easily able to delete files older than a year old. I am also able to take
two values, x (a file) and y (a num of months), and delete x if it is older
than y months old... |
NLTK NaiveBayesClassifier input formatting
Question: I am totally stumped with this issue. I am relatively new to python and NLTK.
I am trying to make a naive Bayes classifier and I am not sure if the input
should be a list of tuples, or a dictionary or a list which is a tuple of two
lists.
The following returns an er... |
Using Mako Template in Javascript
Question: I have a dashboard I am working on, using `Python` `cherrypy` framework and
`Mako` template language.
I had an `html` file for each of dashboard pages.
There, I used `Mako` to pass some data to `html` and inline `Javascript`.
For example, to display the names of some proce... |
Find and replace in multiple files and add incrementing number
Question: I'm trying to replace a regex pattern in many `.cpp` files on my computer. I
need to add an incrementing number at the end of each substitution, so I chose
python to do this.
This is what I got already, but it doesn't work yet:
imp... |
Python pickle file strangely large
Question: I made a pickle file, storing a grayscale value of each pixel in 100,000 80x80
sized images.
(Plus an array of 100,000 integers whose values are one-digit).
My approximation for the total size of the pickle is,
4 byte x 80 x 80 x 100000 = 2.88 GB
plus... |
python source code organization and __init.py__
Question: I have a python source tree which is organised as follows:
>folder
|-> utils
|-> image.py
|-> helper.py
|-> __init__.py
|-> core
|-> vf.py
|-> __init__.py
Now in ... |
Dynamically reformat tkinter scale value python 2.7
Question: I thought what I wanted to do would be simple enough, but evidently not.
What I want to do is use a tkinter scale to control the range and value that a
user can input.
In my case I want to input a time value in seconds and display it in
_minutes:seconds_ f... |
zipline backtesting using non-US (European) intraday data
Question: I'm trying to get zipline working with non-US, intraday data, that I've loaded
into a pandas DataFrame:
BARC HSBA LLOY STAN
Date
2014-07-01 08:3... |
Classification Based Chunking - NLTK Cookbook - Evaluate() not working
Question: I've been following the NLTK cookbook for classification based chunking, and I
came to the following error when trying to evaluate my classifier.
all the code that leads up to this error is posted below the traceback
------... |
How do you wrap C++ code for IronPython access
Question: I have a simple example which I want to access from Ironpython (I am coming
from 'regular/sane' python') so I am struggling importing my C++ code into
Ironpython. Normally I just use SWIG, wrap my code, import and go on my merry
way
But with Ironpython being C# ... |
Replace CR by CR LF
Question: I'm on Windows and I have an odd text file containing mostly CR+LF line
ending. A _few_ lines end with only CR. Which tool to use to transform these
odd lines into well formatted (e.g. CR+LF terminated) lines?
I could use either GnuWin32 tools or Python to solve this.
The main problem I ... |
Getting boto.exception.S3ResponseError: S3ResponseError: 400 Bad Request exception
Question: I am trying to **download the log files that are present in S3 bucket using
boto**. The reason behind not using s3cmd and some other tools is that I don't
want my code to be dependent on some kind of software/tool so that other... |
Can rpy2 code be run in parallel?
Question: I have some Python code that passes a data frame to R via rpy2, whereupon R
processes it and I pull the resulting data.frame back to R as a PANDAS data
frame via `com.load_data`.
The thing is, the call to `com.load_data` works fine in a single Python
process but it crashes w... |
inserting path in the entry box in Python GUI
Question: I'm new to GUI programming. I made a small GUI where the user browses the file
and then do the functionalities he wants with the file.
Now i have an Entry Box in the GUI and whenever a user browses for the
required file and after he finishes browsing the path to ... |
dispersion_plot not working inspite of installing matplotlib
Question: i have installed `matplotlib` using pip in ubuntu 14.04 LTS.. but on running
`dispersion_plot` this is showing the following error ..
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/... |
Python matrix query - must be simpler way
Question: I have created a small Python program to multiply two 2 by 2 matrices but am
wondering if it could be simplified in any way (particularly the creation of
new arrays)
The python code is below:
matA=[0]*2
matB=[0]*2
matC=[0]*2
matC[0]=[0]*2
... |
Can't find "six", but it's installed
Question: I have `six` installed (even reinstalled it).
$ pip show six
---
Name: six
Version: 1.7.3
Location: /usr/lib/python2.6/site-packages
Requires:
But when I try to run `csvcut`, it can't find it.
$ csvcut -n monster.csv... |
Audible Errors - Custom non-blocking text-to-speech handler for Python's logging module
Question: I am building a screen-less Raspberry Pi-based long term art installation. A
common application of [Text-to-Speech on the Raspberry
pi](http://elinux.org/RPi_Text_to_Speech_\(Speech_Synthesis\)) is folks
configuring their ... |
Gammu how to load balance between two modems
Question: I have two GSM USB modems connected to my server, and we use gammu send SMS.
We would like to load balance between both the modems, so that if 100 messages
are send in day 50 goes from first and 50 goes from second.
We are using standard Python code as copied from... |
Creating lowpass filter in SciPy - understanding methods and units
Question: I am trying to filter a noisy heart rate signal with python. Because heart
rates should never be about 220 beats per minute i want to filter out all
noise above 220bpm. I converted 220/minute into 3.66666666 Hertz and then
converted that Hertz... |
Python Requests gives different page text than Internet Explorer
Question: Looking at my stackoverflow user profile page:
<http://stackoverflow.com/users/2683104/roberto>
The site indicates I have been a member for 316 days (screenshots at end of
post). If I `view source` in my browser (IE11), I can see this data come... |
Shortest way / Shorthand to declare variable in go
Question: We can use the following syntax for go variable declaration
var num int
var str string
but is there any shorthand in go for doing the same thing?
for example we can do so in python simply saying:
num = 13
strings =... |
Using all elements of a list as argument to a system command (netCDF operator) in a python code
Question: I've a python code performs some operator on some netCDF files. It has names
of netCDF files as a list. I want to calculate ensemble average of these
netCDF files using netCDF operator ncea (the netCDF ensemble ave... |
SWIG with preprocessor macro from boost preprocessor
Question: I'm utilizing the enum with ToString implementation that was suggested here:
[How to convert an enum type variable to a
string?](http://stackoverflow.com/questions/5093460/how-to-convert-an-enum-
type-variable-to-a-string) It utilizes and works fine as far ... |
Flask SQLAlchemy Tables exist but still get no such table error
Question: I'm having a problem with my Flask database. I have opened the db file and
found that the tables exist but when I try to create a new user in the
database I get a no such table error.
here is my config.py file for the database
CSR... |
Walk two lists (no zip)
Question: This is my implementation:
def walk_two(a, b):
for x in a:
for y in b:
yield x, y
a = xrange(2)
b = xrange(3)
for x, y in walk_two(a, b):
print x, y
With this output:
0 0
0 1
0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.