text stringlengths 226 34.5k |
|---|
Django-ckeditor file upload doesn't work
Question: I use django-ckeditor module in my blog as WYSIWYG editor for create and edit
articles in the administration. It work pretty well but I can't upload image
to my server. When I click on the image button, the button "browse the server"
and "upload image" doesn't appear a... |
Checking if dictionary contains the date and plan
Question: So I am trying to create a function that checks whether or not the contents of
a function is true:
def command_add(date, event, calendar):
'''
Add event_details to the list at calendar[date]
Create date if it was not... |
convert ceilometer output to python dataframe
Question: I'm a little new to Python and openstack ceilometer. I'm reading ceilometer
data using the following code:
import ceilometerclient.client
cclient = ceilometerclient.client.get_client(2, os_username="Ceilometeradmin", os_password="blahblah",... |
How to loop through a tags and redirect to retrieve more a tags?
Question: For educational purposes I am trying to write a program that would prompt the
user for "url", "count" and "position". The "url" will be scraped and "a tags"
within the "url" will be retrieved and this would yield a list of "a tags".
The "positio... |
Python, matplotlib pyplot show() not blocking
Question: I'm new to matplotlib.pyplot. I'm having trouble with the show() function not
blocking. I've taken over a python application from someone that left and I
seem to remembering this worked on his (IT reclaimed) PC. Here's the code ...
import matplotlib... |
Python ConfigParser won't run from command line
Question: Python script runs successfully within IDE, but has ConfigParser error when
attempted to run via command line.
The error:
> raise NoOptionError(option, section) ConfigParser.NoOptionError: No option
> 'password' in section: 'database'
The code:
... |
Start a neuronal network project
Question: after a long term of reading the theory behind neural networks I finally want
to stark to do my own project in object recognition. However I struggle to
find a practical entry point. I want to use either C#,C++ or C however all new
tutorials seem to involve newer languages suc... |
webdriver container in circleci for testing
Question: **Problem**
I have a [CircleCI](https://circleci.com) continuous integration for my django
application. I would like to use a [standalone
chrome](https://github.com/SeleniumHQ/docker-
selenium/tree/master/StandaloneChrome) selenium node container to run my UI
tests... |
thread fails to start if wx.app.mainloop isn't called from the main module
Question: I'm hoping someone can explain this behavior to me. If I import a module that
starts a wxpython interface, threads are unable to start until after the
app.MainLoop() ends. Simplest example:
simple_app.py
import wx
f... |
Python Selenium Scrape Hidden Data
Question: I'm trying to scrape the following page (just page 1 for the purpose of this
question):
<https://www.sportstats.ca/display-results.xhtml?raceid=4886>
I can use Selinium to grab the source then parse it, but not all of the data
that I'm looking for is in the source. Some of... |
Index error on querying google datastore using gcloud
Question: I am trying to use google datastore for my non GAE application.
For that i have created kinds and ancestor related entities in datastore using
gcloud python library.
Also updated datastore index configuration for all the kinds using gcd tool
via WEB-INF/... |
Random choice function
Question: I am making a game using pygame based on the game war. I am getting an error
when running the code for splitting my deck in the main loop (it is in its own
file). The error says:
"/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ran... |
generating a full combination of values from multiple lists in python?
Question: I would like to generate a full-matrix of value combinations from multiple
lists. But I don't always know how many lists will be provided, and each one
can have a different length. I was able to get the answer by abusing
itertools.product(... |
Chaining MySQL commands, Automating database import
Question: I am currently writing a python script to automate my process for installing a
new project on my server.
I simply want to be able to achieve this:
use database_name;
source database_file.sql
In one line using the:
mys... |
How to easily display top level of data structure in python
Question: I am working with a (modestly) large complex structured data object in python.
It is something I've imported from json, so it's a hierarchical mixture of
dicts and lists. The data looks lovely in an online json-hierarchical browser.
However I have tr... |
preserving the left and right child while printing python graphs using networkx
Question: I am trying to print the binary tree using networkx library in python.
But, I am unable to preserve the left and right childs. Is there a way to tell
the Graph to print left child first and then the right child?
im... |
Python random number generator
Question: The code works fine, but I can't figure out how to completely restart the
program. I put continue in the code and I know that is not correct, because I
want it to restart completely after you guess the correct number and it
displays 'Congratulations! You guessed my number in _ g... |
Working with the elements of the "matrix" created by genfromtxt, Python3.4
Question: I import a .txt file with the command `tab = np.genfromtxt()` and it creates a
kind of matrix. I need to work with its contents. When I visualize the
elements with the command
for i in range n:
print(tab[n][:])
... |
UnicodeDecodeError: 'charmap' codec can't encode character X at position Y: character maps to undefined
Question: **To CLARIFY: this question is not a duplicate of[this
one](http://stackoverflow.com/questions/17912307/u-ufeff-in-python-string), I
have already tried all the hints there and didn't get the answer.**
I ha... |
How to check if Celery/Supervisor is running using Python
Question: How to write a script in Python that outputs if celery is running on a machine
(Ubuntu)?
My use-case. I have a simple python file with some tasks. I'm not using Django
or Flask. I use supervisor to run the task queue. For example,
**tasks.py**
... |
python: using raw socket with OSX
Question: I found this code online and found that it doesn't work on OSX. Does anyone
know the correct method without using a third party library?
import socket
import struct
import binascii
rawSocket = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.... |
Blender - Open and parse a .blend file from python script
Question: I would like to open a .blend file from a python script and parse it (get
objects, animations and materials). The documentation I have read so far about
how to do this from blender API (running the script as a blender add-on), but
I would like to run t... |
Imagetk.PhotoImage crashes on Python 3.5 + Tk/Tcl 8.6
Question: I'm trying to display an image in Tkinter using Pillow but I get a weird
error: "Process finished with exit code -1073741819 (0xC0000005)" and the
Tkinter window never appears.
Here's the code (simplified to the max):
from PIL import Image,... |
python match lists
Question: Removing supersets when sublists are compared with other sublists in a
list_of_lists
Input:
my_list = [['cat','bat'],['sat','rat','mat'],['cat','bat','hat'],['pat','mat']]
Here ['cat', 'bat'] is a subset of ['cat', 'bat', 'hat'] So I need to remove
the superset ['cat... |
Data structure of memoization in db
Question: What is the best data structure to cache (save/store/memorize) so many
function result in database. Suppose function calc_regress with flowing
definition in python:
def calc_regress(ind_key, dep_key, count=30):
independent_list = sql_select_recent_val... |
Cannot import seaborn
Question: I have a problem with importing seaborn. I recently installed "anaconda" on my
PC and tried to use seaborn pacjesge. I updated `scipy` and `numpy`. Actually
before updating `scipy` python couldn't see `seaborn`. What is problem? Please
help me
Python 2.7.10 |Anaconda 2.3.0... |
How to apply a function for each element in a matrix in Python?
Question: I have a matrix of triangles where each line has 3 verticies: elementSet:
Element Number Vertices
2 473 1159 917
3 271 1026 816
And I also have a matrix of nodes that assign... |
Intelligent replacement using given terms in sympy
Question: I'm using [sympy](http://www.sympy.org/en/index.html) to do symbolic
calculations in Python3. My problem is to enforce a substitution of a known
term a, defined as a product of x, y and z. See this minimal example:
import sympy as sp
from s... |
Decimal to binary Half-Precision IEEE 754 in Python
Question: I was only able to convert a decimal into a binary single-precision IEEE754,
using the `struct.pack` module, or do the opposite (float16 or float32) using
`numpy.frombuffer`
Is it possible to convert a decimal to a binary half precision floating point,
usin... |
reading a csv file and removing \n in Python
Question: I'm trying to read a csv file and put the elements in an array but the last
element of each row is being joined with the first element of the following
row with a \n in the middle. Here is the code:
f = open("read_file.csv", "r+")
lines = f.read(... |
what's wrong with this python code
Question: This is a code with Web crawler. I'm a beginer in learning python.So i don't
know how to solve. It seems wrong with search()
# -*- coding:utf-8 -*-
import urllib,urllib2,re
class BDTB:
def __init__(self,baseUrl,seeLZ):
self.baseUrl ... |
How to sort .csv file values by combining like strings using python3
Question: I'm still learning so please bear with me. I've been trying to figure this out
for sometime now but have not found what im looking for.
My Product.csv file looks like this.
111 ; Info1 ; Description 1 ; Remarks1
1... |
Mix APIView and FormMixin: 'function' object has no attribute 'copy'
Question: I want to make a class based view that has GET method which renders a form and
POST method which process form data and also accept JSON. So I use Django REST
Framework's APIView and Django's FormMixin like this:
from rest_fram... |
UserString subclass, 'str' object is not callable
Question: I'm kinda stuck at this code, it's supposed to create a string-like object,
which, upon using, will return internal lambda's value. I use
collections.UserString.
from collections import UserString
class instrx(UserString):
func = Non... |
Efficient repeated substring replace with Python
Question: How can I efficiently replace substrings in python, where one substring may be
part of another? For example:
>>> "||||".replace("||","|X|")
'|X||X|'
# What I want: |X|X|X|
Certainly I could keep repeating the replace and until there... |
Iterate and discard sequential duplicates
Question: I'm new to python(any kind of coding really). So i'm sorry if if gets a bit
confusing
I have a csv file like the following
A B C D E F G H
14 BP1 BP1-19119308 OR1A1 19119308 chip-chip Hs... |
xml child-value extraction with python
Question: I have trouble extracting the attribute/value of element t0, t1, t2.
this is my initial attempt. I was hoping to assign the values in t0,t1,t2 into
the variables listed below, but I had no luck with that(started learning
python yesterday!) Anyone with an idea?
... |
Python counter not recognizing dictionary
Question: I have a list and a dictionary and I want to ultimately find a sum of the
values in the two. For example, I want the code below to return :
{gold coin : 45, rope : 1, dagger : 6, ruby : 1}
First I right a function to turn the dragonLoot list into ... |
Configuring mod_wsgi for wamp server on windows
Question: I am new in Django development. I have created an Django application and
tested in development server i.e. 127.0.0.1:8080/mysite. Then I decided to run
this app on Apache server 2.4.9. As all we know the best option is configuring
mod_wsgi. My problem is Apache ... |
How could I extract the lengthy config from my controller/main code
Question: In my `controller.py` file, I have lots of actions to do.
And I also need the following config in dictionary format.
But these configs, `params_template`, `header`, .... are really distracting
me.
How could I save them in another Python fi... |
Python - making my code more economic
Question: I need some help on making this code more economical - I am sure that, there
are a lot of lines I can cut down on.
The code is about a quiz that will ask 10 questions and your score will be
outputted at the end.
import random
studentname=input("what is... |
Python code returning error 'Object is not callable'
Question: So, i have started playing around with encryption coding and have been trying
to create a unique encryption key based from time. This is my code so far :
from threading import Timer
from pyclbr import Function
import hashlib, binascii... |
OBDII data pass to wxpython staticText continues update issues(raspberry PI2)
Question: I am total beginner in programming. I already start a small project by using
raspberry PI connect to the car OBD port and reading the data to the wxpython
GUI. The OBD library I was using from <http://brendan-w.com/work/python-obd>
... |
print All the keys of a json file in python
Question: I have a folder where I have around 20000 son files.I want to find out all the
unique keys of each json and I want take an union of all the keys.But I got
stuck in the initial step only.I am able to find the keys of a single son
file.
I have wrote the following cod... |
expected two blank lines pep8 warning in python
Question: I'm using vim editor as python IDE, below is a simple python program to
calculate square root of a number:-
import cmath
def sqrt():
try:
num = int(input("Enter the number : "))
if num >= 0:
main... |
Read one specific cell of numpy matrix
Question: I wrote a function to see if a matrix is symmetric or not:
def issymmetric(mat):
if(mat.shape[0]!=mat.shape[1]):
return 0
for i in range(mat.shape[0]):
for j in range(i):
if (mat[i][j]!=mat[j][i]):
... |
Read Excel XML .xls file with pandas
Question: I'm aware of a number of previously asked questions, but none of the solutions
given work on the reproducible example that I provide below.
I am trying to read in `.xls` files from
<http://www.eia.gov/coal/data.cfm#production> \-- specifically the
**Historical detailed co... |
Extracting value data from multiple JSON strings in a single file
Question: I know I am missing the obvious here but I have the following PYTHON code in
which I am trying to-
* Take a specified JSON file containing multiple strings as an input.
* Start at the line 1 and look for the key value of "content_text"
*... |
Python Threads object append to list
Question: I am learning multi-thread in python.I often see when the program use multi
thread,it will append the thread object to one list, just as following:
# imports
import threading
import time
def worker():
print "worker...."
time.... |
AttributeError: 'module' object has no attribute 'ensure_future'
Question: Hi i am writing a n/w bound server application using python asyncio which can
accept a post request.
In post request i am accepting a symbol parameter
please tell me the best way to deal with n/w bound application.where i am
collecting the dat... |
Python pretty printer for debugging stdlib variables won't work
Question: I followed this post for debugging variables in a pretty way [The value of
strings doesn't appear in eclipse mars
CDT](http://stackoverflow.com/questions/32411117/the-value-of-strings-doesnt-
appear-in-eclipse-mars-cdt)
however I ended up having... |
GDB hangs when multi-threaded python extension is used to debug multi threaded program
Question: I'm trying to develop a GDB python extension that defines a command that
launches a new thread, in which the user can inspect an arbitrary type of
variables. The skeleton of my python extension is this:
impor... |
Can a Tornado WebSocketHandler receive messages asynchronously?
Question: On the python side, I've created a `WebSocketHandler`.
from tornado import gen
from tornado.escape import json_decode
from tornado.websocket import WebSocketHandler
class Echo(WebSocketHandler):
...
... |
Trouble incrementing variables in Python 3.4.3 Tkinter with labels and buttons
Question: So I have started making a survival game, but ran into a problem pretty fast.
I wanted to make a button that should will go and collect a certain time, (as
in shrubs), and when hit, the amount of shrub shown on the screen will
incr... |
Why can't I use true/false/null in a Python object fed to json.dumps()?
Question: * I'm tring to decode(I think that's the right word) JSON to convert true, false, null to True, False, None for python
* I know I need the `json` library
* I followed [this thread's answer](http://stackoverflow.com/a/11977844/44629... |
Get url link from the web using python
Question: So I am trying to write a script that will allow to search for a certain place
and get the coordinates. I am very limited with the packages because I'm not
allow download any packages that does not already comes with python 2.7.
import webbrowser
... |
Import function for class-wide docstring tests
Question: I am developing on a larger project which has a class with docstrings tests
for each method. Each docstring contains a few examples/tests. The docstrings
make use of a function in another module frequently and I would like to import
it once and have it available ... |
How to generate a bar chart of occurrences per year in matplotlib python?
Question: I have list of dates and I want to generate a bar chart with matplotlib in
python.
2007-05-06
2007-05-11
2007-06-01
2007-06-04
2007-06-06
2007-09-01
2007-10-06
2007-11-06
2007-11-07
…
... |
Removing curly brackets from a tuple in python
Question: I'm creating a test module to eventually import into a larger program using
python.
My test module uses tkinter widgets to display a list of numbers that
increases when a button is pressed.
import tkinter
import math
#Defining Variabl... |
How to set apache2 environment variables in wsgi file (Flask)
Question: Currently I work with Flask micro framework. How to set Environment variables
in wsgi file? I have done this in apache2 envvars file like this:
export PRODROOT=${PRODROOT:-/home/peter/Lv-164.UI/ecomap}
export PYSRCROOT=${PYSRCROO... |
Execute Python script within Jupyter notebook using a specific virtualenv
Question: I would like to execute a long running Python script from within a Jupyter
notebook so that I can hack on the data structures generated mid-run.
The script has many dependencies and command line arguments and is executed
with a specifi... |
Python - How to redirect stderr to a file?
Question: The following code I got from <http://forums.devshed.com/python-
programming-11/redirect-stdout-stderr-file-500952.html> which tells how to
redirect a stderr to a file. I tried it but the error message is not getting
saved to the file. While I am not using
... |
Cython wrapper not fast enough, how to speed it up?
Question: I have a C++ library and I want to wrap some of its functionality in python.
The function splits the given character array into 5 parts, not actual
splitting but the structure we pass a pointer to, contains the information
about the parts after the function... |
VS2015 + Python 3.4 File IO
Question: I am trying to self teach python by writing a quick script using Visual Studio
2015 and Python 3.4 to parse an Recuva output log file.
> Starting Point Promo 2013 - Compilation-HD.mp4 15020953 M:\Videos For Future
> Use\
Note the input file has multiple spaces between the filenam... |
Dice-rolling game doesn't change results
Question: Doing a dice Rolling game in python, and whenever I start my second round I
still end up getting the same dice results from the previous round.
import random
import time
#gets the dice side
def roll_dice(sides):
dice_results = li... |
Python - Remove the last character in a text file
Question: I m generating a file text as you can see below and i m trying to suppress the
last character "," of this file text after generating it but i cant...
*Nset, nset
0570, 0571, 0572, 0573, 0574, 0575, 0576, 0577, 0578, 0579, 0579
0580, 0581... |
Create and import helper functions in tests without creating packages in test directory using py.test
Question: **Question**
How can I import helper functions in test files without creating packages in
the `test` directory?
**Context**
I'd like to create a test helper function that I can import in several tests.
... |
fast way to transpose and concat csv files in python?
Question: I am trying to transpose multiple files of the same format and concatinating
them into 1 big CSV file. I wanted to use numpy for transposing as its a
really fast way of doing it but it somehow skips all my headers which i need.
These are my files:
... |
Trying to find if a line intersects with another, but it is failing even when the lines do intersect
Question: At the start of my program I draw six straight vertical line segments, and
then after I randomly draw as many line segments as the user wants. Every time
it is drawn, I check if it does intersect one of those ... |
Regular Expression String Mangling Efficiency in Python - Explanation for Slowness?
Question: I'm hoping someone can help explain why Python's re module seems to be so slow
at chopping up a very large string for me.
I have string ("content") that is very nearly 600k bytes in size. I'm trying
to hack off just the begin... |
Downloading csv file from a website using python
Question: I have the following website [yahoo
finance](https://in.finance.yahoo.com/q/hp?s=%5EBSESN&a=03&b=3&c=1997&d=10&e=4&f=2015&g=d).
I want to set a date range on that page for e.g April 3rd 1997 to 4th November
2015. Once I set the date range I get a link to downlo... |
The app returned an error when the Google Cloud Endpoints server attempted to communicate with it
Question: Hi I'm new to Google App Engine and Cloud Endpoints.
I have an app engine that serves web application.
And I want to use it with Cloud Endpoints.
So I just added source codes from here:
<https://cloud.google.c... |
How to use ctypes void ** pointer in python3
Question: I would to connect a spectrometer by its DLL, one of function is defined as
UINT UAI_SpectrometerOpen(unsigned int dev, void** handle, unsigned int VID, unsigned int PID)
from document, dev is Specify the index for the spectrometer handle is R... |
Django FSM state transition error
Question:
from datetime import datetime
from django.db import models
from django_fsm import FSMField, transition
class Network(models.Model):
name = models.CharField(max_length=100, unique=True)
prefix = models.CharField(max_length=20, def... |
Unable to create a sample VPC using boto. socket.gaierror: [Errno -2] Name or service not known
Question: I am a beginner and am trying to create a VPC using boto.
[root@localhost orchestration]# cat create-vpc.py
#!/usr/bin/python
import boto.vpc
import pdb
from boto.vpc ... |
Pass variable from .py file to .kv file
Question: I'm new to Kivy and am kind of learning on the job. I've a basic understanding
of how to utilise various widgets and nest layouts. The code is as follows
(saved as GUI.py):-
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.scre... |
Pygame - rect appears and immediately disappears
Question: I am rewriting my question [Pygame - rect disappears before I reach
it](http://stackoverflow.com/questions/33506991/pygame-rect-disappears-before-
i-reach-it) because I think I have not described it clearly.
Full code:
#! /usr/bin/python
... |
Return multiple matches of regular expression within a string in python pandas
Question: I am trying to extract all matches contained in between "><" in a string
The code below only returns the first match in the string.
In:
import pandas as pd
import re
df = pd.Series(['<option value="8... |
File txt: FileNotFoundError: [Errno 2] No such file or directory
Question: i have a txt file and if i try to open it python says:
runfile('/Users/costanzanaldi/Desktop/tesi/Tesi_Naldi/COdice _Python/untitled0.py', wdir='/Users/costanzanaldi/Desktop/tesi/Tesi_Naldi/COdice _Python')
Traceback (mos... |
Convert python string with newlines and tabs to dictionary
Question: I'm a bit stuck with this particular problem I'm having. I have a working
solution, but I don't think it's very Pythonic.
I have a raw text output like this:
Key 1
Value 1
Key 2
Value 2
Key 3
Value ... |
How to pass a python array to an oracle stored procedure?
Question: I have a problem. When I pass a Python array:
self.notPermited = [2,3]
This is my procedure
def select_ids_entre_amistades(self,cod_us,ids_not):
lista = []
try:
cursor = self.__cursor.var(... |
getting an error while using mpl_toolkits.basemap
Question: from mpl_toolkits.basemap import Basemap - is not working in ipython
Getting error as - No module named basemap
I'm using jupyter
Answer: You probably don't have basemap installed. It is a separate package. If you
are using conda, you can install it with:
... |
How to access keys from buckets with periods (.) in their names using boto3?
Question: ## Context
I am trying to get an encryption status for all of my buckets for a security
report. However, since encryption is on a key level basis, I want to iterate
through all of the keys and get a general encryption status. For ex... |
Blender Scripting - Import Collada file and save it as .blend
Question: Right now, I have a script in python that converts a collada (.dae) file into
a blender file (.blend).
In the command Line:
C:\Program Files\Blender Foundation\Blender>blender.exe --background --python c:\Users\c.diaz\Desktop\conver... |
Getting each values from a value list python
Question: Hi I have a custom Django/python resource/view. as follows
class ResourceView(JSONResponseMixin, View):
def get(self, request, *args, **kwargs):
status = 'error'
msg = "Success"
# Getting the x value from url/queryset... |
Simple database table dumping in a specific path
Question: How can I dump MySQL database table only which will store my on drive 'c:',
rather than whole database
here is my running python connect script:
cnx = mysql.connector.connect(user='test',
password ='test',host='192.1... |
How to convert string values to integer values while reading a CSV file?
Question: When opening a CSV file, the column of integers is being converted to a string
value ('1', '23', etc.). What's the best way to loop through to convert these
back to integers?
import csv
with open('C:/Python27/test... |
How can I 'hide' a tab in Spotfire depending on the current user in IronPython?
Question: I have a tab that contains a visualizations for data validation and testing.
I'd like to leave that tab in there without showing to anyone but the devs.
I can get the current user this way but can't find how to 'hide' the tab.
... |
navigate folders with python
Question: I have a folder ROOT and inside many different folders (let's assume N), that
for sake of simplicity I call F1, F2 and so on...
I need to work with the file inside these folders. If I have only one folder I
know that I can do:
os.chdir(".") #I'm workingo in ROOT
... |
How to extract the historical tweets from twitter API?
Question: We need the historical tweets for some movies. Right now, we tried the
streaming API and search API from twitter. The streaming API could not give us
a parameter to choose the time range we need and the search API could only
give us data one or two weeks ... |
How to play three different audio files through three different speaker?
Question: I have a project and I must play **3** different audio files through **3**
different speakers. The start time of files are important (I mean they must
start to play simultaneously).
My first option is using **3** networked computer, one... |
python 3d array like in C ++
Question: I'd like to make a 3 dimensional array like this one :
treedarray = [[[0, 0, 0], [0, 0, 0], [0, 0, 0]],
[[0, 0, 0], [0, 0, 0], [0, 0, 0]],
[[0, 0, 0], [0, 0, 0], [0, 0, 0]]]
in this table, every value is (easily) accessible by using :
tr... |
Reading and formatting issues in python
Question: New to the site, hopefully my question isn't missing to many details or being
too vague. Essentially i'm running a netbackup script, to create a new file:
subprocess.call('/usr/openv/netbackup/bin/goodies/available_media > /var/log/nbu/available_media' + ... |
How to generate a random arange in python?
Question: I want to generate a random arange of 10 values in Python. Here's my code. Is
there any faster way or more elegant way to generate it ? Because the x in
function **lambda** is actually never used.
>>> import numpy as np
>>> import random as rd
... |
Save and Load GUI-tkinter
Question: I want to save and load my GUI.
I have made a GUI and I want that when I click on the save button.
It should save the GUI in some blob of data and when I click on load button
then it will load the same GUI again.
My GUI has various text widgets, drop down Option Menu. I am new to ... |
Queue and ProcessPoolExecutor in Tornado
Question: I'm attempting to use the new [Tornado
queue](http://tornadokevinlee.readthedocs.org/en/latest/queues.html) object
along with
[`concurrent.futures`](https://docs.python.org/3/library/concurrent.futures.html)
to allow my webserver to pass off cpu-intensive tasks to othe... |
How to set an attribute to a vector in rpy2
Question: How to add attributes to vectors in python with rpy2. As an example how can I
reproduce this R code:
library(evir)
pot<-c(2.0,3.2,4,5,6,7)
ts<-c(1,6,7,19,20,30)
attr(pot,"times")<-ts
output<-decluster(pot,run=2)
I can't find any ... |
Validating an email format in python
Question: I'm trying to write a program that checks to see if the email is in the valid
form. A valid form would be any combination of characters of letters or
numbers followed by a `@` sign and then any combination of characters of
letters again. I'm not even trying to have a domai... |
Orange 3 - openSUSE 13.1 installation - No widgets
Question: I am having trouble installing Orange3 from github on openSUSE 13.1.
I have all requirements installed: gcc, g++, python 3-devel, pysci, pyqt4devel
etc.
I followed [these](https://github.com/biolab/orange3/wiki/Installation-on-
openSUSE-13.2) instructions, ... |
Python Error importing package in windows
Question: First off sorry about my English. Here's my question:
I'm really new to programming and I really want to learn Python. That's why
I've been reading this book: HeadFirst Python and also joined this website.
Everything was great until I've stumbled into this error I ke... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.