text
stringlengths
226
34.5k
Python Numba jit NotImplementedError list comprehension Question: I want to speed up the calculation of a formula executing a list comprehension with Numba. from numba import jit # General function to generate overlapping windows from a dataframe @jit def overlapping_windows(index, wl=25...
ReactorNotRestartable error Question: I have a tool, where i am implementing upnp discovery of devices connected in network. For that i have written a script and used datagram class in it. Implementation: whenever scan button is pressed on tool, it will run that upnp script and will list the devices in the box create...
Python: Replacing a newline with a space between multiline comments Question: I am relatively new to python and i need to print the multiline comments used in the C program. I have a test.c file which is as below: /* print multiline comments */ I tried the following python code to parse...
A local or global name can not be found error Question: I'm trying to make a simple rock paper scissors game, and I get an error with in the line, guess = input. It says I need to define the function or variable before I use it in this way and I am unsure of how I can do that. This is using Python/JES programming ...
Specify the developement version of a python module Question: I want to add a new class to [PICOS, a python module](http://picos.zib.de/v100/intro.html). I installed it the normal way a long time ago. But now I have downloaded the source and I a am trying to make some changes. The problem is that I cannot manage to as...
python graph-tool library with graph database Question: I would like to use some of the [graph-tool](http://graph-tool.skewed.de/) functionality with data in a graph database (say neo4j, but any Blueprints enabled graph DB would be good, see [Tinkerpop](http://www.tinkerpop.com/) project). I'm aware of (and have dabbl...
list index out of range when trying to access a specific list item Question: I'm very new to Python and can't figure out why this simple code doesn't work: I have a string (a message like `handposition/506.83047/388.1101/703.2166` from my websocket client) with `/` as separator and want to split it into a list: ...
how to find classpath in project written in netbeans to use in jpype Question: I have a public class Stm: package stm; import zemberek.morphology.apps.TurkishMorphParser; import zemberek.morphology.parser.MorphParse; import java.io.IOException; import java.ut...
Closing 2nd window in wxpython Question: I am using the below full script to process quicktime files. While the file is processing I am opening a 2nd window, which stays on top of all other windows, which informs the user "Processing files. Please wait" (Settings Class at the bottom of code), until the processing is fi...
Return list python Question: well I have this code returns me a list: from pysnmp.entity import engine, config from pysnmp import debug from pysnmp.entity.rfc3413 import cmdrsp, context, ntforg from pysnmp.carrier.asynsock.dgram import udp from pysnmp.smi import builder import th...
String Matching: Only first iteration match is caught Question: I am attempting to create a small iterative string match function in Python. I am getting stumped as the first set of matching strings is caught, but the second set of matching strings is not. I added a string conversion to ensure the objects were strings....
Using exceptions to return exceptional values: is this good practice? Question: Is it good Python practice to have a function return None most of the time, while _exceptionally_ returning useful _values_ by _raising an exception where the values are stored_? I am a little uneasy with this because exceptions are most o...
Error importing/installing PyQt Question: I am having a ton of trouble with PyQt. I downloaded the binary installer, made sure it was the right version, (4.15.5, 64-bit) and thought I was done. Now, I have two problems, which totally stop me from using it with Python. First of all, when I enter 'from pyqt4 import qtcor...
Python, A MySQL statement works when I put in actual value of variable, but not when using variable? Question: Have the following code, it is part of a script used to read stdin, and process logs. jobId = loglist[19] deliveryCount += 1 dbcur.execute('UPDATE campaign_stat_delivered SET pmta_delive...
Using cx_freeze with PyQT5 and Python 3 on MacOSX Question: I'm trying to use cx_freeze 4.3.3 on a MacOS running 10.9.2 on a very simple PyQt5 script with Python 3.3. No errors are returned and the .app is output. However when running the .app from terminal I obtain the error: LSOpenURLsWithRole() faile...
Downloading Requests for python error on ubuntu Question: I'm running ubuntu on my computer and I'm trying to download [requests](http://docs.python-requests.org/en/latest/). However, when I do `pip install requests` it gives me an error: writing manifest file 'requests.egg-info/SOURCES.txt' ru...
Cannot set an array element with a sequence Question: I'm using the `NumPy` python library to run large-scale edits on a `.csv` file. I'm using this python code: import numpy as np def main(): try: e,a,ad,c,s,z,ca,fn,ln,p,p2,g,ssn,cn,com,dob,doh,em = np.loadtxt('c:\wamp\www\_...
Google App Engine + Flask + Stripe: Attribute Error: AttributeError: 'function' object has no attribute 'Customer' Question: I'm starting a mini blog for my honeymoon with Google App Engine, Flask and Stripe that we can send to family and friends. Everythings working great, except for Stripe. Error Received: ...
what is python runpy module? Question: I was wondering the purpose of `runpy` module in Python and how does it help in day to day development of the Python user community? Can someone please explain the necessity, usage and advantages of `runpy` module in python? Answer: The docs say: > The runpy module is used to ...
Suggestions on ways to store file information using python Question: I've been looking around online for ways to store information in python and i came across a variety of ways to do this. I wanted to come to stackoverflow and see what you guys 'who are more experienced with python' would suggest in this scenario. I'm...
MySQLdb is caching SELECT results? Question: i'm running a SELECT query in a loop. Once in a while, the database table is updated (by another program). The first SELECT retrieves the correct data, but **further calls in the loop return the first values**. How can I retrieve up-to-date data? The only workaround I fo...
How do I access Windows Azure account token using Python 3.3 Question: I am new to programming and I am looking to access Windows translate token using Python 3.3. MS have guidelines [here](http://msdn.microsoft.com/en- us/library/ff512433.aspx) for C# and PHP but I don't seem to be able to replicate their success in P...
python - variable not clearing inbetween function calls Question: This program basically flattens an xml file and writes it to csv. My issue is that the ‘row’ variable in ‘values_loop’ isn’t resetting between calls. Every time I call it the new values are appended to the old ones. Basically I’m getting this: ...
Python if any() does not work Question: I want to check if any string elements in a list `phrases` contains certain keywords in a set `phd_words`. I want to use `any` but it doesn't work. In[19]: import pandas as pd import psycopg2 as pg def test(): phd_words = set(['...
Project a 2D Point to 3D using a depth value. Maya Python API Question: I'm trying to figure out how to project a 3D point from a 2D Point. I'd like to be able to give it a depth value to project to. Anyone have any examples for maya? Thanks! Here's the best I've been able to do: def screenToWorld(poin...
Pickling weakref in Python Question: I am still pretty new to Python and even newer to pickling. I have a class `Vertex(ScatterLayout)` with a [`__getnewargs__()`](https://docs.python.org/2/library/pickle.html#object.__getnewargs__): def __getnewargs__(self): return (self.pos, self.size, self.ide...
pySDL2 Display without End Loop Question: In every pySLD2 example I've found, I've seen a loop at the end of the code to keep the window open until closure. For example: #!/usr/bin/env python """ The code is placed into public domain by anatoly techtonik <techtonik@gmail.com> """ impo...
How get line from web site with Python Question: I want to print only line containing --> REQUIRES="berusky-data" I try this but not work : import urllib2 import re f = urllib2.urlopen('http://slackbuilds.org/slackbuilds/14.1/games/berusk/berusky.info') r = f.read() for li...
How can I run python script on Windows 7, with ability to enable/disable apperance of window and on taskbar? Question: I found only [How to start a python script in the background once it's run?](http://stackoverflow.com/questions/6345298/how-to-start-a-python-script- in-the-background-once-its-run) and [how to run a p...
Python surface real position coordinates of pygame.mouse.get_pos and Rect.collidepoint Question: In my python prog i have 2 surfaces : * `ScreenSurface` : the screen * `FootSurface` : another surface blited on `ScreenSurface`. I put some rect blitted on the `FootSurface`, the problem is that `Rect.collidepoint()`...
Split string with regex not working Question: I'm trying to split big file with some regex. Problem is that I want to keep delimiter in text after split, and I tried to add ?= on the beggining of regex, but then it doesn't split. I tried modified regex in Sublime, and it's working there. Text is like this: Aug 07...
Using Python CGI for a big HTML file Question: I have a big html file named exercise.html, I need generate to one som stuff by Python CGI. I want to ask you what is the best way to print this HTML. I know that it is possible by print method with using format methods %s, %i etc.: print '''<html> <hea...
Output missing when exe built with py2exe is run from Win CLI Question: I have a script, `my_script.py` that includes these functions. def output_results(scrub_count, insert_count): print "Scrubbing Complete" print "Valid requests: "+ str(scrub_count["Success"]) if scrub_count["E...
Variance inflation factor in ridge regression in python Question: I'm running a ridge regression on somewhat collinear data. One of the methods used to identify a stable fit is a ridge trace and thanks to the great example on [scikit-learn](http://scikit- learn.org/stable/auto_examples/linear_model/plot_ridge_path.html...
Pass keyboard input to a windows executable Question: I am creating a Python batch script for a piece of software that must run as a windows executable in C:\ The pipeline is almost set up. But the executable requires some keyboard entry before it starts. Before trying to pass keyboard entry it worked with `subprocess....
Python: os.system(ping) argument not working? Question: I am trying to make a def statement that uses os.system(ping) with a variable, and it does not want to take the variable: import os def myping(myip): print(myip) ip1 = os.system("ping -c 1 myip") print(ip1) mypin...
How can I print the contents of a ConfigParser to my log? Question: How can I print the contents of a Python 2.7 `ConfigParser` to `logging`? The only solution I can find is to write to a temporary file and read that file back in. Another idea I had was to get a fake "file handle" from the logging utility and pass tha...
is there a module that enables property editing for general windows files Question: so recently, a technologically clever fellow hid all the files in my school's most frequently accessed and most important public networked mounted drives. now, as the problem hasn't yet been fixed, i see it as an opportunity to expand ...
setting up Django Virtual Env error "The executable /var/bin/python (from --python=/var/bin/python) does not exist" Question: I was given a project to work on and am now trying to run that project in a virtual environment. I am new to python, but in the past, I was comfortable with the "manage.py runserver" concept. I'...
Intercept C function call from Python Question: Is there a way to intercept a C function call on a binary (e.g: write to a file) in Python? I need to execute the binary on Linux from python and capture the output that it writes to the log file. The log file name is unpredictable. Answer: The way to go is to create a...
Possible Import loop? Question: I made some changes to my code, adding a model, and added to some imports and now all of a sudden when I try to run a few management style commands I've scripted they fail with the following traceback: Traceback (most recent call last): File "./manage.py", line 10, i...
cx_freeze and pycrypto is missing modules? Question: Here is my setup.py file for Python 3.3: #/usr/bin/env python3 import sys from cx_Freeze import setup, Executable # Dependencies are automatically detected, but it might need fine tuning. build_exe_options = { "packages": [...
How do I compare values in dictionaries Question: Currently I'm working on a little project and I keep running into trouble with this code. import xmlrpclib import glob import os from SimpleXMLRPCServer import SimpleXMLRPCServer # keep track of all files in directory fileList = {...
copying or referencing objects in python Question: I was doing some problems in python specifically this one: > Implement an algorithm to delete a node in the middle of a singly linked > list, given only access to that node The solution is this: def deleteNode(linkedlist, node): if node.next !=...
integer division gives different result in CPython 2.7 and Spyder Question: I have encountered a quite weird case in Python. In Spyder: >>> 274/365 0.7506849315068493 >>> sys.version '2.7.6 (default, Dec 20 2013, 14:08:04) [MSC v.1700 64 bit (AMD64)]' >>> However in command line i...
Python reports different "java -version" from Windows shell Question: When I run "java -version" from the windows command line it says: > java -version java version "1.7.0_45" Java(TM) SE Runtime Environment (build 1.7.0_45-b18) Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode) ...
python + wsgi on a multi-threaded web-server: is this a race condition? Question: Suppose that I've written a wsgi `application`. I run this application on `Apache2` on `Linux` with multi-threaded `mod-wsgi` configuration, so that my application is run in many threads per single process: WSGIDaemonProces...
unable to login into admin in Django unit tests but can login in dev server? Question: I am facing a strange problem. I am able to login to admin by running `python manage.py runserver` and giving the correct credentials but my test fails, if I give the exact same credentials that I used in development server. I am fo...
Why are my locals not being updated outside rof? Question: After experimenting with trying to implement C-for loops in Python, the following function was developed: import sys def rof(init, cond, post): init, cond, post, context = compile(init, '<rof>', 'exec'), \ ...
Printing a file and configure printer settings Question: I'm trying to code a printer automation using Python on Windows, but can't get it done. I'm not really understanding the topic and i'm a little surprised - a "simple" way to get this done doesn't seem to exist..? There are so many APIs that allow to access commo...
win32com in Python Spyder console results in an error Question: I'm just running the following code, straight from [this documentation/tutorial](http://pythonexcels.com/python-excel-mini-cookbook/). import win32com.client as win32 excel = win32.gencache.EnsureDispatch('Excel.Application') wb = ex...
Countdown in Python using permutations and lambda Question: I am trying to make a program that solves the following with `permutations` and `lambda`: You pick 5 numbers and a random number is generated, the aim is to use those 5 numbers to reach the target number. You are allowed to use each number once with as many o...
Python pygame mac import Question: I installed pygame from `pygame-1.9.1release-python.org-32bit- py2.7-macosx10.3.dmg`. I have Python 2.7.6 and OSX 10.9.2. For some reason, when I do the following I get an `ImportError`: >>> import pygame Traceback (most recent call last): File "<pyshell#...
Defining a variable after calling it? Question: I've run into a problem in terms of assigning objects. I want to be able to assign the object via a function, but because the variable `name` is not defined until during the function, when I first call the function (with name = john) it says: `NameError: name 'john' is no...
How to read dynamic values on a site? Question: What's the best way to scrape dynamic data from a site? I want to read the ticker value on the top of this page: [https://www.google.com/finance?q=INDEXBOM%3ASENSEX&ei=M1B1U_iEG8OPkAWhuYGIDA](https://www.google.com/finance?q=INDEXBOM%3ASENSEX&ei=M1B1U_iEG8OPkAWhuYGIDA) ...
urllib2 returning nothing in python Question: I am confused !!! can anybody tell me where the problem is??? this code used to work properly but it started returning nothing since yesterday !! I did not make any changes on it !!! does anybody have any idea??? import re from re import sub import ti...
regex to match a word and everything after it? Question: I need to dump some http data as a string from the http packet which i have in string format am trying to use the regular expression below to match 'data:'and everything after it,Its not working . I am new to regex and python >>>import re >>>pa...
pygame window does not remain fullscreen Question: I am making a game with the pygame module and now I got a problem. The program itself works fantastic, but the fullscreen mode which I wanted to enable does not work. I made a test program for fullscreen mode which works perfect, but when I tried to make the game fulls...
TemplateDoesNotExist at /polls/ - in Django Tutorial Question: I have been trying out Django tutorial(documentation) and is stuck with this error for 2 days now. I will paste my views.py, settings.py and my directory structure below. Views.Py from django.shortcuts import render from django.http impor...
Pass existing Webdriver object to custom Python library for Robot Framework Question: I am trying to create a custom Python library for Robot Framework, but I'm new to Python and Robot and I'm not sure how to accomplish what I'm trying to do. I want to pass the Webdriver object that Robot creates using Selenium2Library...
Is it possible to compare day + month(not year) against current day + month in python? Question: I'm getting data in the format of 'May 10' and I am trying to figure out if its for this year or next. The date is for only a year so May 10 would mean May 10 2015 while May 20 would be May 20 2014. To do this, I wanted to...
How do I make make spiral in python? Question: I want to make a function that I give it a number and the function returns a spiral from 1 to that number(in 2 dimensional array). For example if I give the number 25 to the function it will return something like this: ![enter image description here](http://i.stack.imgur...
Previous error being masked by current exception context Question: The following is an example I found at the website for Doug Hellman in a file named "masking_exceptions_catch.py". I can't locate the link at the moment. The exception raised in throws() is discarded while that raised by cleanup() is reported. In his a...
correct way to setup teardown login logout in django Question: To test a polling app that I made using django, the pre-requisite for voting/viewing_results is that the user should be logged in. I wanted to create a testsuite where setup involves creating testuser, logging him in and teardown involves logging out the us...
settings up logging in console script Question: I have a python console script, which source I don't want to modify. But I want to modify the logging which is done by the script and its libraries. Examples: * I want messages at level ERROR to be mailed to foo@example.com * I want INFO messages of file foo.py to ...
How to subtract two 2D lists in python? Question: **I need to subract two 2D lists like this** : list1= [['some',2],['other',1],['thing',5]] list2= [['some',1],['thing',5]] **result should be like this** : result= [['some',1],['other',1],['thing',0]] **or** ...
Python / Dictionary / List / Mongo insert issues - beginner Question: Sorry, trying to understand and get used to dictionary and list objects. I'm calling eBay's API through their ebaysdk, and want to store the items from it to a collection as documents in Mongo. Simple. Here's a sample of the schema that will be ret...
file i/o and the the meaning of binary modes Question: so I want to save some arbitrary piece of data in redis with python. Since redis supports this by just storing it as a string I thought I could read the date with python again and write it to a file. At first this didn`t work because I used the standard 'r' and 'w'...
Image file to vector of pixels with CImg? Question: I have this in python: import Image import numpy as np import random img = Image.open('img.jpg') #turn img to list of rgb tuples and scramble pixels = list(img.getdata()) pixels.reverse() random.shuffle(pixels) ...
Python multiprocessing: where should join() be called, if process' children have grandchildren? Question: Here is a toy problem I am working with: import multiprocessing as mp def task2(): print "I am doing something important." def task1(): listOfProcesses = [] ...
Getting a MemoryError because list/array is too large Question: ## Problem I have to download `object_x`. For simplicity's sake, `object_x` comprises a series of `integers` adding up to `1000`. The download is irregular. I receive groups or `chunks` of integers in seemingly random order, and I need to keep track of th...
emulate file-like behavior in python Question: I'm writing a script, where I have to dump some columns of tables from an SQL database into a file, and transfer it via FTP. Because dumps can get really big, my Idea was to write a FakeFile which querys row by row from a cursor in its `readline` method and pass it to `ft...
python regex invalid syntax Question: I am testing a code from a current 2600 magazine for a wordlist generator based off a bunch of searches in google. I get an invalid syntax from this line: results.extend(re.findall("<a href="/%201D([^/%201D]*)/%201D">class=(?:1|s)",data.read())) I am new to...
python CGI : upload error Question: I use Python version 3.4 and this is server source code in python import io from socket import * import threading import cgi serverPort = 8181 serverSocket = socket(AF_INET, SOCK_STREAM) serverSocket.bind(('', serverPort)) serverSocket...
Start new subprocess with 'default' environment variables Question: I'm writing a build script to resolve dependent shared libraries (and their shared libraries, etc.). These shared libraries do not exist in the normal `PATH` environment variable. For the build process to work (for the compiler to find these libraries...
Deepcopy list of lists (speed issue) Question: Due to unclear formulation I decided to rewrite my question: My code looks sth like this (org is supposed to be a list of a list and two integers): def my_copy(org): temp = (tuple(org[0]), org[1], org[2]) temp2 = [] temp2.append(list(...
Postgresql Database Backup Using Python Question: I would like to backup database using Python code. I want to backup some tables of related data. How to backup and how to choose desired tables using "SELECT" statement? e.g. I want to get data from 2014-05-01 to 2014-05-10 of some tables and output this result as .sq...
Google App Engine Go SDK: Request to '/' failed Question: i'm just getting started using GAE, i have following guide in here <https://developers.google.com/appengine/docs/go/gettingstarted/devenvironment> and some hello word tutorial here <https://developers.google.com/appengine/docs/go/gettingstarted/helloworld> . my...
Login and get HTML file using python Question: Hey I'm trying to login to a website and get the html of the webpage after the login. And can't figure out how to do it with python. Using python 2.7. Need to fill out the html forms on this website: 'user'= 'magaleast' and 'password' = '1181' (real login details that are...
Python unicode dictornary to string from twitch stream Question: I'm trying to decode a twitch api answer in python. import urllib2 import json url = 'http://api.justin.tv/api/stream/list.json?channel=kungentv' result =json.loads(urllib2.urlopen(url, timeout = 100).read().deco...
locale.getpreferredencoding() - why does this reset string.letters? Question: >>> import string >>> import locale >>> string.letters 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' >>> locale.getpreferredencoding() 'UTF-8' >>> string.letters 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijk...
python cookiejar: CookieJar instance has no attribute 'load' Question: I am quite new to python and I am trying to set a cookie using the `cookielib` library of python, like so: >>> import cookielib >>> cj = cookielib.CookieJar() >>> cj.load('cookies.txt') and I get thrown this error: ...
Understanding python import of gevent Question: This fails for me: import gevent gevent.monkey.patch_all() This works: from gevent import monkey monkey.patch_all() Is there anything wrong I am trying to do by accessing gevent.monkey Also, I am confused on this snippet:...
reading of csv into dictionary, first line becomes the name Question: in python I have a csv file, which has lots of parameters in it like: Name, Surname, Address1, Address2, email, etc Adam1,Smith1,12 Connaugh Rd.,,adamsmith@gmail.com, etc... Adam2,Smith2,12 Connaugh Rd.,,adamsmith@gmail.com, et...
PyYAML path at serialization time vs deserialization time Question: I am working on a game engine which includes a simple GUI development tool. The GUI tool allows a user to define various entities and components, which can then be saved in a configuration file. When the game engine runtime loads the configuration file...
NoReverseMatch error using get_absolute_url() Question: I am trying to use get_absolute_url to follow DRY rules. If I code the class to build the href directly from the slug it all works fine. Ugly, messy but working... So I am trying to get this done right using get_absolute_url() and I am getting stuck with a NoReve...
The first argument for python Tkinter Question: I am using Tkinter with python 2.7 and am curious about why the following code snippet would work: import Tkinter as tk import ttk class Application(ttk.Frame): def __init__(self, master=None): ttk.Frame.__init__(self, ...
Reading a csv (text) file with pkgutil.get_data Question: so I'm writing some code which needs to pull configuration / data from CSV files, which are packaged with the application. From what I understand using `pkgutil` is the 'right' way to do this. So what I'm trying to do is: import pkgutil MatFil...
python modifying the elements in a dictionary Question: So I have a python dictionary called "p", where import nltk, json, cPickle, itertools import numpy as np p = {key1: nan, key2: 0.1, key3: nan} nan is np.nan. I want to write a piece of code that if a value in the dictionary is equal t...
Is there a way to get the python program to "refresh the sd drive connection" Question: My daughters SD card has gone corrupt, and I'm trying to recover the photos/files. I have tried various recover software but to no avail. However I have found that if I use MSDOS, I can copy various photos, however intermittently t...
Iterate over all but d-th dimension of any boost::multi_array Question: Quite often one wants to apply operation `f()` along dimension `d` of an `N`-dimensional array `A`. This implies looping over all remaining dimensions of `A`. I tried to figure out if `boost::multi_array` was capable of this. Function `f(A)` should...
AppEngine application using Django fails to load Question: Django is constantly causing our application to crash. After deployment the application is running fine, but once the initial instance is restarted/shutdown it often fails to start with an error similar to the following: Traceback (most recent ca...
Processing Large Files in Python [ 1000 GB or More] Question: Lets say i have a text file of 1000 GB. I need to find how much times a phrase occurs in the text. Is there any faster way to do this that the one i am using bellow? How much would it take to complete the task. phrase = "how fast it is" c...
Appending to HDFStore fails with "cannot match existing table structure" Question: The final solution was to use the "converters" parameter of read_csv and check every value before adding it to the DataFrame. In the end there were only 2 broken values in over 80GB of raw data. The parameter looks like this: ...
Using datetime to get CSV dates in Python Question: I am trying to get dates from a csv file to chart a graph, and am having difficulty getting a method with which to compare the data. The dates are in the format MM/DD/YYYY HH:MM:SS . I have struggled with finding a method to perform this task for several days, but my ...
virtualenvwrapper - IOError: [Errno 13] Permission denied Question: I'm trying to install `virtualenvwrapper` on a fresh Ubuntu 14.04 installation. I followed the steps [here](http://virtualenvwrapper.readthedocs.org/en/latest/install.html) and added these lines to my .bashrc: export WORKON_HOME=$HOME/.v...
How to apply relative directory in python when imported from different module? Question: Here's the problem: In package `main.A`, there's a module `AM` and a `config.ini` file. In `AM`, I'm using **./config.ini** to refer to this file. This just works fine. Whereas in package `main.B`, there's another module named `B...
How does the python interpreter know when to compile and update a .pyc file? Question: I knew that a `.pyc` file is generated by the python interpreter and contains the byte code as this [question](http://stackoverflow.com/questions/2998215/if-python-is- interpreted-what-are-pyc-files) said. I thought python interpret...
How to generate signature using SHA-1 HMAC for google map in ruby Question: I am trying to generate signature using SHA-1 HMAC in ruby for google maps calls. I have got a python's code from the internet which I am trying to copy into ruby. Following is phython's code import urllib.parse import base64...
Python fnmatch negative match does not behave as expected Question: trying to match the strings that does not containt "foo" or "bar". After many reserch I came up with something that works with in linux `kiki` (which is ironically written in python) but does not work when I use it in python: Python 3.3...