text stringlengths 200 200k | source stringclasses 2
values |
|---|---|
# What is best way to remove duplicate lines matching regex from string using Python?
## Question
This is a pretty straight forward attempt. I haven't been using python for too long. Seems to work but I am sure I have much to learn. Someone let me know if I am way off here. Needs to find patterns, write the first line... | stackoverflow-qa |
# Naming conventions in a Python library
## Question
I'm implementing a search algorithm (let's call it MyAlg) in a python package. Since the algorithm is super-duper complicated, the package has to contain an auxiliary class for algorithm options. Currently I'm developing the entire package by myself (and I'm not a p... | stackoverflow-qa |
# Naming conventions in a Python library
## Question
I'm implementing a search algorithm (let's call it MyAlg) in a python package. Since the algorithm is super-duper complicated, the package has to contain an auxiliary class for algorithm options. Currently I'm developing the entire package by myself (and I'm not a p... | stackoverflow-qa |
# Naming conventions in a Python library
## Question
I'm implementing a search algorithm (let's call it MyAlg) in a python package. Since the algorithm is super-duper complicated, the package has to contain an auxiliary class for algorithm options. Currently I'm developing the entire package by myself (and I'm not a p... | stackoverflow-qa |
# Django: How do I create a generic url routing to views?
## Question
I have a pretty standard django app, and am wondering how to set the url routing so that I don't have to explicitly map each url to a view.
For example, let's say that I have the following views: Project, Links, Profile, Contact. I'd rather not ha... | stackoverflow-qa |
# Django: How do I create a generic url routing to views?
## Question
I have a pretty standard django app, and am wondering how to set the url routing so that I don't have to explicitly map each url to a view.
For example, let's say that I have the following views: Project, Links, Profile, Contact. I'd rather not ha... | stackoverflow-qa |
# Django: How do I create a generic url routing to views?
## Question
I have a pretty standard django app, and am wondering how to set the url routing so that I don't have to explicitly map each url to a view.
For example, let's say that I have the following views: Project, Links, Profile, Contact. I'd rather not ha... | stackoverflow-qa |
# Initializing cherrypy.session early
## Question
I love CherryPy's API for sessions, except for one detail. Instead of saying cherrypy.session["spam"] I'd like to be able to just say session["spam"].
Unfortunately, I can't simply have a global from cherrypy import session in one of my modules, because the cherrypy.... | stackoverflow-qa |
# How do I build and install P4Python for Mac OS X?
## Question
I've been unable to build P4Python for an Intel Mac OS X 10.5.5.
These are my steps:
I downloaded p4python.tgz (from
http://filehost.perforce.com/perforce/r07.3/tools/) and expanded
it into "P4Python-2007.3".
I downloaded p4api.tar (from
http://filehos... | stackoverflow-qa |
# How do I build and install P4Python for Mac OS X?
## Question
I've been unable to build P4Python for an Intel Mac OS X 10.5.5.
These are my steps:
I downloaded p4python.tgz (from
http://filehost.perforce.com/perforce/r07.3/tools/) and expanded
it into "P4Python-2007.3".
I downloaded p4api.tar (from
http://filehos... | stackoverflow-qa |
# How do you get a directory listing sorted by creation date in python?
## Question
What is the best way to get a list of all files in a directory, sorted by date [created | modified], using python, on a windows machine?
## Answer
I've done this in the past for a Python script to determine the last updated files in a... | stackoverflow-qa |
# How do you get a directory listing sorted by creation date in python?
## Question
What is the best way to get a list of all files in a directory, sorted by date [created | modified], using python, on a windows machine?
## Answer
Here's a one-liner:
import os
import time
from pprint import pprint
pprint([(x[0], ti... | stackoverflow-qa |
# How do you get a directory listing sorted by creation date in python?
## Question
What is the best way to get a list of all files in a directory, sorted by date [created | modified], using python, on a windows machine?
## Answer
Here's my version:
def getfiles(dirpath):
a = [s for s in os.listdir(dirpath)
... | stackoverflow-qa |
# How do you get a directory listing sorted by creation date in python?
## Question
What is the best way to get a list of all files in a directory, sorted by date [created | modified], using python, on a windows machine?
## Answer
sorted(filter(os.path.isfile, os.listdir('.')),
key=lambda p: os.stat(p).st_mtime)... | stackoverflow-qa |
# How do you get a directory listing sorted by creation date in python?
## Question
What is the best way to get a list of all files in a directory, sorted by date [created | modified], using python, on a windows machine?
## Answer
Here's a more verbose version of @Greg Hewgill's answer. It is the most conforming to t... | stackoverflow-qa |
# How do you get a directory listing sorted by creation date in python?
## Question
What is the best way to get a list of all files in a directory, sorted by date [created | modified], using python, on a windows machine?
## Answer
There is an os.path.getmtime function that gives the number of seconds since the epoch
... | stackoverflow-qa |
# How do you get a directory listing sorted by creation date in python?
## Question
What is the best way to get a list of all files in a directory, sorted by date [created | modified], using python, on a windows machine?
## Answer
Here's my answer using glob without filter if you want to read files with a certain ext... | stackoverflow-qa |
# How do you get a directory listing sorted by creation date in python?
## Question
What is the best way to get a list of all files in a directory, sorted by date [created | modified], using python, on a windows machine?
## Answer
Without changing directory:
import os
path = '/path/to/files/'
name_list = os.lis... | stackoverflow-qa |
# Python - How do I convert "an OS-level handle to an open file" to a file object?
## Question
tempfile.mkstemp() returns:
a tuple containing an OS-level handle to an open file (as would be returned by os.open()) and the absolute pathname of that file, in that order.
How do I convert that OS-level handle to a fi... | stackoverflow-qa |
# Python - How do I convert "an OS-level handle to an open file" to a file object?
## Question
tempfile.mkstemp() returns:
a tuple containing an OS-level handle to an open file (as would be returned by os.open()) and the absolute pathname of that file, in that order.
How do I convert that OS-level handle to a fi... | stackoverflow-qa |
# Python - How do I convert "an OS-level handle to an open file" to a file object?
## Question
tempfile.mkstemp() returns:
a tuple containing an OS-level handle to an open file (as would be returned by os.open()) and the absolute pathname of that file, in that order.
How do I convert that OS-level handle to a fi... | stackoverflow-qa |
# Python - How do I convert "an OS-level handle to an open file" to a file object?
## Question
tempfile.mkstemp() returns:
a tuple containing an OS-level handle to an open file (as would be returned by os.open()) and the absolute pathname of that file, in that order.
How do I convert that OS-level handle to a fi... | stackoverflow-qa |
# Python - How do I convert "an OS-level handle to an open file" to a file object?
## Question
tempfile.mkstemp() returns:
a tuple containing an OS-level handle to an open file (as would be returned by os.open()) and the absolute pathname of that file, in that order.
How do I convert that OS-level handle to a fi... | stackoverflow-qa |
# Now that Python 2.6 is out, what modules currently in the language should every programmer know about?
## Question
A lot of useful features in Python are somewhat "hidden" inside modules. Named tuples (new in Python 2.6), for instance, are found in the collections module.
The Library Documentation page will give y... | stackoverflow-qa |
# Now that Python 2.6 is out, what modules currently in the language should every programmer know about?
## Question
A lot of useful features in Python are somewhat "hidden" inside modules. Named tuples (new in Python 2.6), for instance, are found in the collections module.
The Library Documentation page will give y... | stackoverflow-qa |
# Now that Python 2.6 is out, what modules currently in the language should every programmer know about?
## Question
A lot of useful features in Python are somewhat "hidden" inside modules. Named tuples (new in Python 2.6), for instance, are found in the collections module.
The Library Documentation page will give y... | stackoverflow-qa |
# Now that Python 2.6 is out, what modules currently in the language should every programmer know about?
## Question
A lot of useful features in Python are somewhat "hidden" inside modules. Named tuples (new in Python 2.6), for instance, are found in the collections module.
The Library Documentation page will give y... | stackoverflow-qa |
# Python - How do I write a decorator that restores the cwd?
## Question
How do I write a decorator that restores the current working directory to what it was before the decorated function was called? In other words, if I use the decorator on a function that does an os.chdir(), the cwd will not be changed after the f... | stackoverflow-qa |
# Python - How do I write a decorator that restores the cwd?
## Question
How do I write a decorator that restores the current working directory to what it was before the decorated function was called? In other words, if I use the decorator on a function that does an os.chdir(), the cwd will not be changed after the f... | stackoverflow-qa |
# Python - How do I write a decorator that restores the cwd?
## Question
How do I write a decorator that restores the current working directory to what it was before the decorated function was called? In other words, if I use the decorator on a function that does an os.chdir(), the cwd will not be changed after the f... | stackoverflow-qa |
# Python - How do I write a decorator that restores the cwd?
## Question
How do I write a decorator that restores the current working directory to what it was before the decorated function was called? In other words, if I use the decorator on a function that does an os.chdir(), the cwd will not be changed after the f... | stackoverflow-qa |
# How can I compress a folder and email the compressed file in Python?
## Question
I would like to compress a folder and all its sub-folders/files, and email the zip file as an attachment. What would be the best way to achieve this with Python?
## Answer
Look at zipfile for compressing a folder and it's subfolders.
... | stackoverflow-qa |
# How can I compress a folder and email the compressed file in Python?
## Question
I would like to compress a folder and all its sub-folders/files, and email the zip file as an attachment. What would be the best way to achieve this with Python?
## Answer
You can use the zipfile module to compress the file using the z... | stackoverflow-qa |
# 2D animation in Python
## Question
I'm writing a simulator in Python, and am curious about options and opinions regarding basic 2D animations. By animation, I'm referring to rendering on the fly, not displaying prerendered images.
I'm currently using matplotlib (Wxagg backend), and it's possible that I'll be able t... | stackoverflow-qa |
# 2D animation in Python
## Question
I'm writing a simulator in Python, and am curious about options and opinions regarding basic 2D animations. By animation, I'm referring to rendering on the fly, not displaying prerendered images.
I'm currently using matplotlib (Wxagg backend), and it's possible that I'll be able t... | stackoverflow-qa |
# How to package Twisted program with py2exe?
## Question
I tried to package a Twisted program with py2exe, but once I run the exe file I built, I got a "No module named resource" error.
And I found the py2exe said:
The following modules appear to be missing ['FCNTL', 'OpenSSL', 'email.Generator', 'email.Iterato... | stackoverflow-qa |
# USB Driver Development on a Mac using Python
## Question
I would like to write a driver to talk to my Suunto t3 watch in Python on a Mac. My day job is doing basic web work in C# so my familiarity with Python and developing on a Mac is limited.
Can you suggest how one would start doing driver development in general... | stackoverflow-qa |
# USB Driver Development on a Mac using Python
## Question
I would like to write a driver to talk to my Suunto t3 watch in Python on a Mac. My day job is doing basic web work in C# so my familiarity with Python and developing on a Mac is limited.
Can you suggest how one would start doing driver development in general... | stackoverflow-qa |
# Django signals vs. overriding save method
## Question
I'm having trouble wrapping my head around this. Right now I have some models that looks kind of like this:
def Review(models.Model)
...fields...
overall_score = models.FloatField(blank=True)
def Score(models.Model)
review = models.ForeignKey(Revi... | stackoverflow-qa |
# Django signals vs. overriding save method
## Question
I'm having trouble wrapping my head around this. Right now I have some models that looks kind of like this:
def Review(models.Model)
...fields...
overall_score = models.FloatField(blank=True)
def Score(models.Model)
review = models.ForeignKey(Revi... | stackoverflow-qa |
# Django signals vs. overriding save method
## Question
I'm having trouble wrapping my head around this. Right now I have some models that looks kind of like this:
def Review(models.Model)
...fields...
overall_score = models.FloatField(blank=True)
def Score(models.Model)
review = models.ForeignKey(Revi... | stackoverflow-qa |
# Django signals vs. overriding save method
## Question
I'm having trouble wrapping my head around this. Right now I have some models that looks kind of like this:
def Review(models.Model)
...fields...
overall_score = models.FloatField(blank=True)
def Score(models.Model)
review = models.ForeignKey(Revi... | stackoverflow-qa |
# How do I write to a log from mod_python under apache?
## Question
I seem to only be able to write to the Apache error log via stderr. Anyone know of a more structured logging architecture that I could use from my python web project, like commons?
## Answer
I've used the builtin Python logging module in (non-web) p... | stackoverflow-qa |
# How do I write to a log from mod_python under apache?
## Question
I seem to only be able to write to the Apache error log via stderr. Anyone know of a more structured logging architecture that I could use from my python web project, like commons?
## Answer
There isn't any built in support for mod_python logging to... | stackoverflow-qa |
# How do I write to a log from mod_python under apache?
## Question
I seem to only be able to write to the Apache error log via stderr. Anyone know of a more structured logging architecture that I could use from my python web project, like commons?
## Answer
This must have changed in the past four years. If you come... | stackoverflow-qa |
# UNIX shell written in a reasonable language?
## Question
Has anyone ever heard of a UNIX shell written in a reasonable language, like Python?
## Answer
Well, there's emacs, which is arguably a shell written in lisp :)
Seriously though, are you looking for a reimplementation of an existing shell design in a differe... | stackoverflow-qa |
# UNIX shell written in a reasonable language?
## Question
Has anyone ever heard of a UNIX shell written in a reasonable language, like Python?
## Answer
iPython (Python) and Rush (Ruby) are shells that are designed for more advanced languages. There's also Hotwire, which is sort of a weird integrated shell/terminal ... | stackoverflow-qa |
# UNIX shell written in a reasonable language?
## Question
Has anyone ever heard of a UNIX shell written in a reasonable language, like Python?
## Answer
Tclsh is pretty nice (assuming you like Tcl, of course).
Tags: python, unix, shell | stackoverflow-qa |
# UNIX shell written in a reasonable language?
## Question
Has anyone ever heard of a UNIX shell written in a reasonable language, like Python?
## Answer
Eshell is a Bash-like shell in Emacs Lisp.
IPython can be used as a system shell, though the syntax is a bit weird (supporting all of Python plus basic sh construct... | stackoverflow-qa |
# UNIX shell written in a reasonable language?
## Question
Has anyone ever heard of a UNIX shell written in a reasonable language, like Python?
## Answer
From all appearances, Python IS a shell. It runs with #! and it can run interactively. Between the os and shutil packages you have all of the features of standard... | stackoverflow-qa |
# Sorting music
## Question
So over the years, I've bought music off iTunes, Urge, and Rhapsody and all these files are lying mixed with my non-DRM'd MP3 files that I've ripped off my CDs. Now some of these files have licenses that have expired, and some of them have valid licenses.
I want to sort my music by various... | stackoverflow-qa |
# Sorting music
## Question
So over the years, I've bought music off iTunes, Urge, and Rhapsody and all these files are lying mixed with my non-DRM'd MP3 files that I've ripped off my CDs. Now some of these files have licenses that have expired, and some of them have valid licenses.
I want to sort my music by various... | stackoverflow-qa |
# Sorting music
## Question
So over the years, I've bought music off iTunes, Urge, and Rhapsody and all these files are lying mixed with my non-DRM'd MP3 files that I've ripped off my CDs. Now some of these files have licenses that have expired, and some of them have valid licenses.
I want to sort my music by various... | stackoverflow-qa |
# How would I implement a Python bit map?
## Question
I wish to implement a 2d bit map class in Python. The class would have the following requirements:
Allow the creating of arbitrarily sized 2d bitmaps. i.e. to create an 8 x 8 bitmap (8 bytes), something like:
bitmap = Bitmap(8,8)
provide an API to access the bi... | stackoverflow-qa |
# How would I implement a Python bit map?
## Question
I wish to implement a 2d bit map class in Python. The class would have the following requirements:
Allow the creating of arbitrarily sized 2d bitmaps. i.e. to create an 8 x 8 bitmap (8 bytes), something like:
bitmap = Bitmap(8,8)
provide an API to access the bi... | stackoverflow-qa |
# Formatting a list of text into columns
## Question
I'm trying to output a list of string values into a 2 column format. The standard way of making a list of strings into "normal text" is by using the string.join method. However, it only takes 2 arguments so I can only make a single column using "\n". I thought tryin... | stackoverflow-qa |
# Formatting a list of text into columns
## Question
I'm trying to output a list of string values into a 2 column format. The standard way of making a list of strings into "normal text" is by using the string.join method. However, it only takes 2 arguments so I can only make a single column using "\n". I thought tryin... | stackoverflow-qa |
# Formatting a list of text into columns
## Question
I'm trying to output a list of string values into a 2 column format. The standard way of making a list of strings into "normal text" is by using the string.join method. However, it only takes 2 arguments so I can only make a single column using "\n". I thought tryin... | stackoverflow-qa |
# Formatting a list of text into columns
## Question
I'm trying to output a list of string values into a 2 column format. The standard way of making a list of strings into "normal text" is by using the string.join method. However, it only takes 2 arguments so I can only make a single column using "\n". I thought tryin... | stackoverflow-qa |
# Applying a common font scheme to multiple objects in wxPython
## Question
Many times I will use the same font scheme for static text in a wxPython application. Currently I am making a SetFont() call for each static text object but that seems like a lot of unnecessary work. However, the wxPython demo and wxPython In ... | stackoverflow-qa |
# Applying a common font scheme to multiple objects in wxPython
## Question
Many times I will use the same font scheme for static text in a wxPython application. Currently I am making a SetFont() call for each static text object but that seems like a lot of unnecessary work. However, the wxPython demo and wxPython In ... | stackoverflow-qa |
# What is the best way to get all the divisors of a number?
## Question
Here's the very dumb way:
def divisorGenerator(n):
for i in xrange(1,n/2+1):
if n%i == 0: yield i
yield n
The result I'd like to get is similar to this one, but I'd like a smarter algorithm (this one it's too much slow and dumb ... | stackoverflow-qa |
# What is the best way to get all the divisors of a number?
## Question
Here's the very dumb way:
def divisorGenerator(n):
for i in xrange(1,n/2+1):
if n%i == 0: yield i
yield n
The result I'd like to get is similar to this one, but I'd like a smarter algorithm (this one it's too much slow and dumb ... | stackoverflow-qa |
# What is the best way to get all the divisors of a number?
## Question
Here's the very dumb way:
def divisorGenerator(n):
for i in xrange(1,n/2+1):
if n%i == 0: yield i
yield n
The result I'd like to get is similar to this one, but I'd like a smarter algorithm (this one it's too much slow and dumb ... | stackoverflow-qa |
# What is the best way to get all the divisors of a number?
## Question
Here's the very dumb way:
def divisorGenerator(n):
for i in xrange(1,n/2+1):
if n%i == 0: yield i
yield n
The result I'd like to get is similar to this one, but I'd like a smarter algorithm (this one it's too much slow and dumb ... | stackoverflow-qa |
# What is the best way to get all the divisors of a number?
## Question
Here's the very dumb way:
def divisorGenerator(n):
for i in xrange(1,n/2+1):
if n%i == 0: yield i
yield n
The result I'd like to get is similar to this one, but I'd like a smarter algorithm (this one it's too much slow and dumb ... | stackoverflow-qa |
# How do you develop against OpenID locally
## Question
I'm developing a website (in Django) that uses OpenID to authenticate users. As I'm currently only running on my local machine I can't authenticate using one of the OpenID providers on the web. So I figure I need to run a local OpenID server that simply lets me t... | stackoverflow-qa |
# How do you develop against OpenID locally
## Question
I'm developing a website (in Django) that uses OpenID to authenticate users. As I'm currently only running on my local machine I can't authenticate using one of the OpenID providers on the web. So I figure I need to run a local OpenID server that simply lets me t... | stackoverflow-qa |
# How do you develop against OpenID locally
## Question
I'm developing a website (in Django) that uses OpenID to authenticate users. As I'm currently only running on my local machine I can't authenticate using one of the OpenID providers on the web. So I figure I need to run a local OpenID server that simply lets me t... | stackoverflow-qa |
# How do you develop against OpenID locally
## Question
I'm developing a website (in Django) that uses OpenID to authenticate users. As I'm currently only running on my local machine I can't authenticate using one of the OpenID providers on the web. So I figure I need to run a local OpenID server that simply lets me t... | stackoverflow-qa |
# How do you develop against OpenID locally
## Question
I'm developing a website (in Django) that uses OpenID to authenticate users. As I'm currently only running on my local machine I can't authenticate using one of the OpenID providers on the web. So I figure I need to run a local OpenID server that simply lets me t... | stackoverflow-qa |
# How do you develop against OpenID locally
## Question
I'm developing a website (in Django) that uses OpenID to authenticate users. As I'm currently only running on my local machine I can't authenticate using one of the OpenID providers on the web. So I figure I need to run a local OpenID server that simply lets me t... | stackoverflow-qa |
# How do you develop against OpenID locally
## Question
I'm developing a website (in Django) that uses OpenID to authenticate users. As I'm currently only running on my local machine I can't authenticate using one of the OpenID providers on the web. So I figure I need to run a local OpenID server that simply lets me t... | stackoverflow-qa |
# Django UserProfile... without a password
## Question
I'd like to create a subset of Users that don't have a login... basically as a way to add a photographer field to photos without having a full blown account associated with that person (since in many cases, they'll never actually log in to the site). A caveat is t... | stackoverflow-qa |
# Django UserProfile... without a password
## Question
I'd like to create a subset of Users that don't have a login... basically as a way to add a photographer field to photos without having a full blown account associated with that person (since in many cases, they'll never actually log in to the site). A caveat is t... | stackoverflow-qa |
# Django UserProfile... without a password
## Question
I'd like to create a subset of Users that don't have a login... basically as a way to add a photographer field to photos without having a full blown account associated with that person (since in many cases, they'll never actually log in to the site). A caveat is t... | stackoverflow-qa |
# How are you planning on handling the migration to Python 3?
## Question
I'm sure this is a subject that's on most python developers' minds considering that Python 3 is coming out soon. Some questions to get us going in the right direction:
Will you have a python 2 and python 3 version to be maintained concurrentl... | stackoverflow-qa |
# How are you planning on handling the migration to Python 3?
## Question
I'm sure this is a subject that's on most python developers' minds considering that Python 3 is coming out soon. Some questions to get us going in the right direction:
Will you have a python 2 and python 3 version to be maintained concurrentl... | stackoverflow-qa |
# How are you planning on handling the migration to Python 3?
## Question
I'm sure this is a subject that's on most python developers' minds considering that Python 3 is coming out soon. Some questions to get us going in the right direction:
Will you have a python 2 and python 3 version to be maintained concurrentl... | stackoverflow-qa |
# How are you planning on handling the migration to Python 3?
## Question
I'm sure this is a subject that's on most python developers' minds considering that Python 3 is coming out soon. Some questions to get us going in the right direction:
Will you have a python 2 and python 3 version to be maintained concurrentl... | stackoverflow-qa |
# How are you planning on handling the migration to Python 3?
## Question
I'm sure this is a subject that's on most python developers' minds considering that Python 3 is coming out soon. Some questions to get us going in the right direction:
Will you have a python 2 and python 3 version to be maintained concurrentl... | stackoverflow-qa |
# How are you planning on handling the migration to Python 3?
## Question
I'm sure this is a subject that's on most python developers' minds considering that Python 3 is coming out soon. Some questions to get us going in the right direction:
Will you have a python 2 and python 3 version to be maintained concurrentl... | stackoverflow-qa |
# What symmetric cypher to use for encrypting messages?
## Question
I haven't a clue about encryption at all. But I need it. How?
Say you have a system of nodes communicating with each other on a network via asynchronous messages. The nodes do not maintain session information about other nodes (this is a design restr... | stackoverflow-qa |
# What symmetric cypher to use for encrypting messages?
## Question
I haven't a clue about encryption at all. But I need it. How?
Say you have a system of nodes communicating with each other on a network via asynchronous messages. The nodes do not maintain session information about other nodes (this is a design restr... | stackoverflow-qa |
# What symmetric cypher to use for encrypting messages?
## Question
I haven't a clue about encryption at all. But I need it. How?
Say you have a system of nodes communicating with each other on a network via asynchronous messages. The nodes do not maintain session information about other nodes (this is a design restr... | stackoverflow-qa |
# What symmetric cypher to use for encrypting messages?
## Question
I haven't a clue about encryption at all. But I need it. How?
Say you have a system of nodes communicating with each other on a network via asynchronous messages. The nodes do not maintain session information about other nodes (this is a design restr... | stackoverflow-qa |
# What symmetric cypher to use for encrypting messages?
## Question
I haven't a clue about encryption at all. But I need it. How?
Say you have a system of nodes communicating with each other on a network via asynchronous messages. The nodes do not maintain session information about other nodes (this is a design restr... | stackoverflow-qa |
# What symmetric cypher to use for encrypting messages?
## Question
I haven't a clue about encryption at all. But I need it. How?
Say you have a system of nodes communicating with each other on a network via asynchronous messages. The nodes do not maintain session information about other nodes (this is a design restr... | stackoverflow-qa |
# What symmetric cypher to use for encrypting messages?
## Question
I haven't a clue about encryption at all. But I need it. How?
Say you have a system of nodes communicating with each other on a network via asynchronous messages. The nodes do not maintain session information about other nodes (this is a design restr... | stackoverflow-qa |
# How do I split a multi-line string into multiple lines?
## Question
I have a multi-line string literal that I want to do an operation on each line, like so:
inputString = """Line 1
Line 2
Line 3"""
I want to do something like the following:
for line in inputString:
doStuff()
## Answer
inputString.splitlines... | stackoverflow-qa |
# How do I split a multi-line string into multiple lines?
## Question
I have a multi-line string literal that I want to do an operation on each line, like so:
inputString = """Line 1
Line 2
Line 3"""
I want to do something like the following:
for line in inputString:
doStuff()
## Answer
Like the others said:
... | stackoverflow-qa |
# How do I split a multi-line string into multiple lines?
## Question
I have a multi-line string literal that I want to do an operation on each line, like so:
inputString = """Line 1
Line 2
Line 3"""
I want to do something like the following:
for line in inputString:
doStuff()
## Answer
Might be overkill in t... | stackoverflow-qa |
# How do I split a multi-line string into multiple lines?
## Question
I have a multi-line string literal that I want to do an operation on each line, like so:
inputString = """Line 1
Line 2
Line 3"""
I want to do something like the following:
for line in inputString:
doStuff()
## Answer
The best way to do thi... | stackoverflow-qa |
# How do I split a multi-line string into multiple lines?
## Question
I have a multi-line string literal that I want to do an operation on each line, like so:
inputString = """Line 1
Line 2
Line 3"""
I want to do something like the following:
for line in inputString:
doStuff()
## Answer
I wish comments had pr... | stackoverflow-qa |
# Speeding Up Python
## Question
This is really two questions, but they are so similar, and to keep it simple, I figured I'd just roll them together:
Firstly: Given an established python project, what are some decent ways to speed it up beyond just plain in-code optimization?
Secondly: When writing a program from s... | stackoverflow-qa |
# Speeding Up Python
## Question
This is really two questions, but they are so similar, and to keep it simple, I figured I'd just roll them together:
Firstly: Given an established python project, what are some decent ways to speed it up beyond just plain in-code optimization?
Secondly: When writing a program from s... | stackoverflow-qa |
# Speeding Up Python
## Question
This is really two questions, but they are so similar, and to keep it simple, I figured I'd just roll them together:
Firstly: Given an established python project, what are some decent ways to speed it up beyond just plain in-code optimization?
Secondly: When writing a program from s... | stackoverflow-qa |
# Speeding Up Python
## Question
This is really two questions, but they are so similar, and to keep it simple, I figured I'd just roll them together:
Firstly: Given an established python project, what are some decent ways to speed it up beyond just plain in-code optimization?
Secondly: When writing a program from s... | stackoverflow-qa |
# Speeding Up Python
## Question
This is really two questions, but they are so similar, and to keep it simple, I figured I'd just roll them together:
Firstly: Given an established python project, what are some decent ways to speed it up beyond just plain in-code optimization?
Secondly: When writing a program from s... | stackoverflow-qa |
# Speeding Up Python
## Question
This is really two questions, but they are so similar, and to keep it simple, I figured I'd just roll them together:
Firstly: Given an established python project, what are some decent ways to speed it up beyond just plain in-code optimization?
Secondly: When writing a program from s... | stackoverflow-qa |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.