Hi there,
I developed a system that consists of software and hardware interaction. Basically its a transaction system where the transaction details are encrypted on a PCI device then returned back to my web based system where it is stored in a DB then displayed using javascript/extjs in the browser. How I do this now is the following:
...
I'm wondering if there is some functionality to split table row on 2 and more pages. Cause some information in row can be too long for one page. And if one row longer then page size then it's cause an exception.
...
Hi, I'm a newb to this. I've seen the code snippet at the official site (pasted below).
The problem is how do I deploy this to the server ? Where do I set the username and password credentials ? In the httpd.conf file for Apache ?
from django.conf.urls.defaults import *
from piston.resource import Resource
from piston.authentication ...
In the code below is using 'getLevel()'. where I can find it (it is about sound, and it run with pyaudio library)
# this is the threshold that determines whether or not sound is detected
THRESHOLD = 0
#open your audio stream
# wait until the sound data breaks some level threshold
while True:
data = stream.read(chunk)
# che...
Hi there,
I have a problem with creating parallel program using multiprocessing. AFAIK when I start a new process using this module (multiprocessing) I should do "os.wait()" or "childProcess.join()" to get its' exit status. But placing above functions in my program can occur in stopping main process if something happens to child process...
What is wrong with the following code for file uploading.The request.FILES['file'] looks empty
Models:
from django.db import models
from django import forms
class UploadFileForm(forms.Form):
title = forms.CharField(max_length=50)
file = forms.FileField(label="Your file")
Views:
def index(request):
if request.m...
I have been programming using Python for slightly more than half an year now and I am more interested in Python internals rather than using Python to develop applications. Currently I am working on porting a few libraries from Python2 to Python3. However, I have a rather abstract view on how to make port stuff over from Python2 to Python...
Possible Duplicate:
Sort by key of dictionary inside a dictionary in Python
I have a dictionary:
d={'abc.py':{'map':'someMap','distance':11},
'x.jpg':{'map':'aMap','distance':2},....}
Now what I need is: I need to sort d according to their distances?
I tried sorted(d.items(),key=itemgetter(1,2), but it's not working.
H...
Hi !
I am interested in writing a script in Python that is able to scan and show a list of nearby Wi-Fi networks. How could one do this? If possible.
Thanks.
Jake.
...
Did you ever submit a link in your Facebook status? When you do, they do something very nice: They get a title, summary, and bunch of relevant images from that page, and you can choose one of them as thumbnail.
I need something like that right now. Is there any open-source piece of code that does this? (It needs to be in Python because ...
Hello all, I need to be able to convert time on an time object I recieve from a sql database into python. Here is the current python code I am using without any conversions. I need to add 2 and 1/2 hours to the time.
def getLastReport(self, sql):
self.connectDB()
cursor.execute(sql)
lastReport = cursor.fetchall()
dat...
I'm confronted with the task of making a C++ app scriptable by users. The app has been in development for several years with no one wasting a thought on this before. It contains all sorts of niceties like multithreading, template wizardry and multiple inheritance. As the scripting language, Python is preferred, but Lua might be accepted ...
Hey, I was trying to delete an item form a list (without using set):
list1 = []
for i in range(2,101):
for j in range(2,101):
list1.append(i ** j)
list1.sort()
for k in range(1,len(list1) - 1):
if (list1[k] == list1[k - 1]):
list1.remove(list1[k])
print "length = " + str(len(list1))
The set function works fine,...
I'm writing a program that will parse an Apache log file periodically to log it's visitors, bandwidth usage, etc..
The problem is, I don't want to open the log and parse data I've already parsed. For example:
line1
line2
line3
If I parse that file, I'll save all the lines then save that offset. That way, when I parse it again, I get:...
Hey all, I'm trying to understand the python compiler/interpreter process more clearly. Unfortunately, I have not taken a class in interpreters nor have I read much about them.
Basically, what I understand right now is that Python code from .py files is first compiled into python bytecode (which i assume are the .pyc files i see occasio...
Hi,
I would like to build a language model for a text corpus. Are there good out-of-the-box toolkits which will alleviate my task? The only toolkit I know off is the Statistical Language Modelling(SLM) Toolkit by CMU.
Regards,
...
Hi all.
For a college project, I need to implement a GUI for a console app I wrote. For this I decided to use PyQt. I need only basic functionalities, such as designing a simple form with basic elements and displaying some texts on it.
Can anyone point me to a nice tutorial for learning PyQt? I really don't want to get into the details...
Hi guys, weird issue here:
I have a reflected SQL alchemy class that looks like this:
class Install(Base):
__tablename__ = 'install'
id = Column(Integer, primary_key=True)
ip_address = Column(Integer)
I convert the string representation ("1.2.3.4") to int using:
struct.unpack('!L', socket.inet_aton(ip_address))[0]
This...
Hi
So far I was familiar with c and c++ only, and I have programmed in these languages only. I have some experience working on some projects in c or c++.
Some good projects or applications I've made till now:
Duplicate file finder and remover
Process monitor on Linux
Basic http proxy server
I have made one small flex application ...
db = sqlite.connect("test.sqlite")
res = db.execute("select * from table")
With iteration I get lists coresponding to the rows.
for row in res:
print row
I can get name of the columns
col_name_list = [tuple[0] for tuple in res.description]
But is there some function or setting to get distionaries instead of list?
{'col1': 'v...