Datasets:
text stringlengths 200 200k | source stringclasses 2
values |
|---|---|
# How can I find the full path to a font from its display name on a Mac?
## Question
I am using the Photoshop's javascript API to find the fonts in a given PSD.
Given a font name returned by the API, I want to find the actual physical font file that that font name corresponds to on the disc.
This is all happening in... | stackoverflow-qa |
# How can I find the full path to a font from its display name on a Mac?
## Question
I am using the Photoshop's javascript API to find the fonts in a given PSD.
Given a font name returned by the API, I want to find the actual physical font file that that font name corresponds to on the disc.
This is all happening in... | stackoverflow-qa |
# How can I find the full path to a font from its display name on a Mac?
## Question
I am using the Photoshop's javascript API to find the fonts in a given PSD.
Given a font name returned by the API, I want to find the actual physical font file that that font name corresponds to on the disc.
This is all happening in... | stackoverflow-qa |
# How can I find the full path to a font from its display name on a Mac?
## Question
I am using the Photoshop's javascript API to find the fonts in a given PSD.
Given a font name returned by the API, I want to find the actual physical font file that that font name corresponds to on the disc.
This is all happening in... | stackoverflow-qa |
# Get a preview JPEG of a PDF on Windows?
## Question
I have a cross-platform (Python) application which needs to generate a JPEG preview of the first page of a PDF.
On the Mac I am spawning sips. Is there something similarly simple I can do on Windows?
## Answer
You can use ImageMagick's convert utility for this, ... | stackoverflow-qa |
# Get a preview JPEG of a PDF on Windows?
## Question
I have a cross-platform (Python) application which needs to generate a JPEG preview of the first page of a PDF.
On the Mac I am spawning sips. Is there something similarly simple I can do on Windows?
## Answer
Is the PC likely to have Acrobat installed? I think ... | stackoverflow-qa |
# Get a preview JPEG of a PDF on Windows?
## Question
I have a cross-platform (Python) application which needs to generate a JPEG preview of the first page of a PDF.
On the Mac I am spawning sips. Is there something similarly simple I can do on Windows?
## Answer
ImageMagick delegates the PDF->bitmap conversion to ... | stackoverflow-qa |
# Continuous Integration System for a Python Codebase
## Question
I'm starting work on a hobby project with a python codebase and would like to set up some form of continuous integration (i.e. running a battery of test-cases each time a check-in is made and sending nag e-mails to responsible persons when the tests fai... | stackoverflow-qa |
# Continuous Integration System for a Python Codebase
## Question
I'm starting work on a hobby project with a python codebase and would like to set up some form of continuous integration (i.e. running a battery of test-cases each time a check-in is made and sending nag e-mails to responsible persons when the tests fai... | stackoverflow-qa |
# Continuous Integration System for a Python Codebase
## Question
I'm starting work on a hobby project with a python codebase and would like to set up some form of continuous integration (i.e. running a battery of test-cases each time a check-in is made and sending nag e-mails to responsible persons when the tests fai... | stackoverflow-qa |
# Continuous Integration System for a Python Codebase
## Question
I'm starting work on a hobby project with a python codebase and would like to set up some form of continuous integration (i.e. running a battery of test-cases each time a check-in is made and sending nag e-mails to responsible persons when the tests fai... | stackoverflow-qa |
# Continuous Integration System for a Python Codebase
## Question
I'm starting work on a hobby project with a python codebase and would like to set up some form of continuous integration (i.e. running a battery of test-cases each time a check-in is made and sending nag e-mails to responsible persons when the tests fai... | stackoverflow-qa |
# Continuous Integration System for a Python Codebase
## Question
I'm starting work on a hobby project with a python codebase and would like to set up some form of continuous integration (i.e. running a battery of test-cases each time a check-in is made and sending nag e-mails to responsible persons when the tests fai... | stackoverflow-qa |
# Continuous Integration System for a Python Codebase
## Question
I'm starting work on a hobby project with a python codebase and would like to set up some form of continuous integration (i.e. running a battery of test-cases each time a check-in is made and sending nag e-mails to responsible persons when the tests fai... | stackoverflow-qa |
# cx_Oracle: How do I iterate over a result set?
## Question
There are several ways to iterate over a result set. What are the tradeoff of each?
## Answer
The canonical way is to use the built-in cursor iterator.
curs.execute('select * from people')
for row in curs:
print row
You can use fetchall() to get al... | stackoverflow-qa |
# cx_Oracle: How do I iterate over a result set?
## Question
There are several ways to iterate over a result set. What are the tradeoff of each?
## Answer
There's also the way psyco-pg seems to do it... From what I gather, it seems to create dictionary-like row-proxies to map key lookup into the memory block returned... | stackoverflow-qa |
# cx_Oracle: How do I iterate over a result set?
## Question
There are several ways to iterate over a result set. What are the tradeoff of each?
## Answer
My preferred way is the cursor iterator, but setting first the arraysize property of the cursor.
curs.execute('select * from people')
curs.arraysize = 256
for ro... | stackoverflow-qa |
# Using 'in' to match an attribute of Python objects in an array
## Question
I don't remember whether I was dreaming or not but I seem to recall there being a function which allowed something like,
foo in iter_attr(array of python objects, attribute name)
I've looked over the docs but this kind of thing doesn't ... | stackoverflow-qa |
# Using 'in' to match an attribute of Python objects in an array
## Question
I don't remember whether I was dreaming or not but I seem to recall there being a function which allowed something like,
foo in iter_attr(array of python objects, attribute name)
I've looked over the docs but this kind of thing doesn't ... | stackoverflow-qa |
# Using 'in' to match an attribute of Python objects in an array
## Question
I don't remember whether I was dreaming or not but I seem to recall there being a function which allowed something like,
foo in iter_attr(array of python objects, attribute name)
I've looked over the docs but this kind of thing doesn't ... | stackoverflow-qa |
# Using 'in' to match an attribute of Python objects in an array
## Question
I don't remember whether I was dreaming or not but I seem to recall there being a function which allowed something like,
foo in iter_attr(array of python objects, attribute name)
I've looked over the docs but this kind of thing doesn't ... | stackoverflow-qa |
# Using 'in' to match an attribute of Python objects in an array
## Question
I don't remember whether I was dreaming or not but I seem to recall there being a function which allowed something like,
foo in iter_attr(array of python objects, attribute name)
I've looked over the docs but this kind of thing doesn't ... | stackoverflow-qa |
# Using 'in' to match an attribute of Python objects in an array
## Question
I don't remember whether I was dreaming or not but I seem to recall there being a function which allowed something like,
foo in iter_attr(array of python objects, attribute name)
I've looked over the docs but this kind of thing doesn't ... | stackoverflow-qa |
# Using 'in' to match an attribute of Python objects in an array
## Question
I don't remember whether I was dreaming or not but I seem to recall there being a function which allowed something like,
foo in iter_attr(array of python objects, attribute name)
I've looked over the docs but this kind of thing doesn't ... | stackoverflow-qa |
# Class views in Django
## Question
Django view points to a function, which can be a problem if you want to change only a bit of functionality. Yes, I could have million keyword arguments and even more if statements in the function, but I was thinking more of an object oriented approach.
For example, I have a page ... | stackoverflow-qa |
# Class views in Django
## Question
Django view points to a function, which can be a problem if you want to change only a bit of functionality. Yes, I could have million keyword arguments and even more if statements in the function, but I was thinking more of an object oriented approach.
For example, I have a page ... | stackoverflow-qa |
# Class views in Django
## Question
Django view points to a function, which can be a problem if you want to change only a bit of functionality. Yes, I could have million keyword arguments and even more if statements in the function, but I was thinking more of an object oriented approach.
For example, I have a page ... | stackoverflow-qa |
# Class views in Django
## Question
Django view points to a function, which can be a problem if you want to change only a bit of functionality. Yes, I could have million keyword arguments and even more if statements in the function, but I was thinking more of an object oriented approach.
For example, I have a page ... | stackoverflow-qa |
# Class views in Django
## Question
Django view points to a function, which can be a problem if you want to change only a bit of functionality. Yes, I could have million keyword arguments and even more if statements in the function, but I was thinking more of an object oriented approach.
For example, I have a page ... | stackoverflow-qa |
# Python and MySQL
## Question
I can get Python to work with Postgresql but I cannot get it to work with MySQL. The main problem is that on the shared hosting account I have I do not have the ability to install things such as Django or PySQL, I generally fail when installing them on my computer so maybe it's good I ca... | stackoverflow-qa |
# Python and MySQL
## Question
I can get Python to work with Postgresql but I cannot get it to work with MySQL. The main problem is that on the shared hosting account I have I do not have the ability to install things such as Django or PySQL, I generally fail when installing them on my computer so maybe it's good I ca... | stackoverflow-qa |
# Python and MySQL
## Question
I can get Python to work with Postgresql but I cannot get it to work with MySQL. The main problem is that on the shared hosting account I have I do not have the ability to install things such as Django or PySQL, I generally fail when installing them on my computer so maybe it's good I ca... | stackoverflow-qa |
# Python and MySQL
## Question
I can get Python to work with Postgresql but I cannot get it to work with MySQL. The main problem is that on the shared hosting account I have I do not have the ability to install things such as Django or PySQL, I generally fail when installing them on my computer so maybe it's good I ca... | stackoverflow-qa |
# Python and MySQL
## Question
I can get Python to work with Postgresql but I cannot get it to work with MySQL. The main problem is that on the shared hosting account I have I do not have the ability to install things such as Django or PySQL, I generally fail when installing them on my computer so maybe it's good I ca... | stackoverflow-qa |
# Python and MySQL
## Question
I can get Python to work with Postgresql but I cannot get it to work with MySQL. The main problem is that on the shared hosting account I have I do not have the ability to install things such as Django or PySQL, I generally fail when installing them on my computer so maybe it's good I ca... | stackoverflow-qa |
# How do I use Python's itertools.groupby()?
## Question
I haven't been able to find an understandable explanation of how to actually use Python's itertools.groupby() function. What I'm trying to do is this:
Take a list - in this case, the children of an objectified lxml element
Divide it into groups based on some ... | stackoverflow-qa |
# How do I use Python's itertools.groupby()?
## Question
I haven't been able to find an understandable explanation of how to actually use Python's itertools.groupby() function. What I'm trying to do is this:
Take a list - in this case, the children of an objectified lxml element
Divide it into groups based on some ... | stackoverflow-qa |
# How do I use Python's itertools.groupby()?
## Question
I haven't been able to find an understandable explanation of how to actually use Python's itertools.groupby() function. What I'm trying to do is this:
Take a list - in this case, the children of an objectified lxml element
Divide it into groups based on some ... | stackoverflow-qa |
# How do I use Python's itertools.groupby()?
## Question
I haven't been able to find an understandable explanation of how to actually use Python's itertools.groupby() function. What I'm trying to do is this:
Take a list - in this case, the children of an objectified lxml element
Divide it into groups based on some ... | stackoverflow-qa |
# How do I use Python's itertools.groupby()?
## Question
I haven't been able to find an understandable explanation of how to actually use Python's itertools.groupby() function. What I'm trying to do is this:
Take a list - in this case, the children of an objectified lxml element
Divide it into groups based on some ... | stackoverflow-qa |
# How do I use Python's itertools.groupby()?
## Question
I haven't been able to find an understandable explanation of how to actually use Python's itertools.groupby() function. What I'm trying to do is this:
Take a list - in this case, the children of an objectified lxml element
Divide it into groups based on some ... | stackoverflow-qa |
# How do I use Python's itertools.groupby()?
## Question
I haven't been able to find an understandable explanation of how to actually use Python's itertools.groupby() function. What I'm trying to do is this:
Take a list - in this case, the children of an objectified lxml element
Divide it into groups based on some ... | stackoverflow-qa |
# How do I use Python's itertools.groupby()?
## Question
I haven't been able to find an understandable explanation of how to actually use Python's itertools.groupby() function. What I'm trying to do is this:
Take a list - in this case, the children of an objectified lxml element
Divide it into groups based on some ... | stackoverflow-qa |
# How do I use Python's itertools.groupby()?
## Question
I haven't been able to find an understandable explanation of how to actually use Python's itertools.groupby() function. What I'm trying to do is this:
Take a list - in this case, the children of an objectified lxml element
Divide it into groups based on some ... | stackoverflow-qa |
# Adding a Method to an Existing Object Instance
## Question
I've read that it is possible to add a method to an existing object (e.g. not in the class definition) in Python, I think this is called Monkey Patching (or in some cases Duck Punching). I understand that it's not always a good decision to do so. But, how mi... | stackoverflow-qa |
# Adding a Method to an Existing Object Instance
## Question
I've read that it is possible to add a method to an existing object (e.g. not in the class definition) in Python, I think this is called Monkey Patching (or in some cases Duck Punching). I understand that it's not always a good decision to do so. But, how mi... | stackoverflow-qa |
# Adding a Method to an Existing Object Instance
## Question
I've read that it is possible to add a method to an existing object (e.g. not in the class definition) in Python, I think this is called Monkey Patching (or in some cases Duck Punching). I understand that it's not always a good decision to do so. But, how mi... | stackoverflow-qa |
# Adding a Method to an Existing Object Instance
## Question
I've read that it is possible to add a method to an existing object (e.g. not in the class definition) in Python, I think this is called Monkey Patching (or in some cases Duck Punching). I understand that it's not always a good decision to do so. But, how mi... | stackoverflow-qa |
# Adding a Method to an Existing Object Instance
## Question
I've read that it is possible to add a method to an existing object (e.g. not in the class definition) in Python, I think this is called Monkey Patching (or in some cases Duck Punching). I understand that it's not always a good decision to do so. But, how mi... | stackoverflow-qa |
# Adding a Method to an Existing Object Instance
## Question
I've read that it is possible to add a method to an existing object (e.g. not in the class definition) in Python, I think this is called Monkey Patching (or in some cases Duck Punching). I understand that it's not always a good decision to do so. But, how mi... | stackoverflow-qa |
# Adding a Method to an Existing Object Instance
## Question
I've read that it is possible to add a method to an existing object (e.g. not in the class definition) in Python, I think this is called Monkey Patching (or in some cases Duck Punching). I understand that it's not always a good decision to do so. But, how mi... | stackoverflow-qa |
# Adding a Method to an Existing Object Instance
## Question
I've read that it is possible to add a method to an existing object (e.g. not in the class definition) in Python, I think this is called Monkey Patching (or in some cases Duck Punching). I understand that it's not always a good decision to do so. But, how mi... | stackoverflow-qa |
# Adding a Method to an Existing Object Instance
## Question
I've read that it is possible to add a method to an existing object (e.g. not in the class definition) in Python, I think this is called Monkey Patching (or in some cases Duck Punching). I understand that it's not always a good decision to do so. But, how mi... | stackoverflow-qa |
# Adding a Method to an Existing Object Instance
## Question
I've read that it is possible to add a method to an existing object (e.g. not in the class definition) in Python, I think this is called Monkey Patching (or in some cases Duck Punching). I understand that it's not always a good decision to do so. But, how mi... | stackoverflow-qa |
# Adding a Method to an Existing Object Instance
## Question
I've read that it is possible to add a method to an existing object (e.g. not in the class definition) in Python, I think this is called Monkey Patching (or in some cases Duck Punching). I understand that it's not always a good decision to do so. But, how mi... | stackoverflow-qa |
# Adding a Method to an Existing Object Instance
## Question
I've read that it is possible to add a method to an existing object (e.g. not in the class definition) in Python, I think this is called Monkey Patching (or in some cases Duck Punching). I understand that it's not always a good decision to do so. But, how mi... | stackoverflow-qa |
# Adding a Method to an Existing Object Instance
## Question
I've read that it is possible to add a method to an existing object (e.g. not in the class definition) in Python, I think this is called Monkey Patching (or in some cases Duck Punching). I understand that it's not always a good decision to do so. But, how mi... | stackoverflow-qa |
# Adding a Method to an Existing Object Instance
## Question
I've read that it is possible to add a method to an existing object (e.g. not in the class definition) in Python, I think this is called Monkey Patching (or in some cases Duck Punching). I understand that it's not always a good decision to do so. But, how mi... | stackoverflow-qa |
# Adding a Method to an Existing Object Instance
## Question
I've read that it is possible to add a method to an existing object (e.g. not in the class definition) in Python, I think this is called Monkey Patching (or in some cases Duck Punching). I understand that it's not always a good decision to do so. But, how mi... | stackoverflow-qa |
# How do you express binary literals in Python?
## Question
How do you express an integer as a binary number with Python literals?
I was easily able to find the answer for hex:
>>> 0x12AF
4783
>>> 0x100
256
and octal:
>>> 01267
695
>>> 0100
64
How do you use literals to express b... | stackoverflow-qa |
# How do you express binary literals in Python?
## Question
How do you express an integer as a binary number with Python literals?
I was easily able to find the answer for hex:
>>> 0x12AF
4783
>>> 0x100
256
and octal:
>>> 01267
695
>>> 0100
64
How do you use literals to express b... | stackoverflow-qa |
# How do you express binary literals in Python?
## Question
How do you express an integer as a binary number with Python literals?
I was easily able to find the answer for hex:
>>> 0x12AF
4783
>>> 0x100
256
and octal:
>>> 01267
695
>>> 0100
64
How do you use literals to express b... | stackoverflow-qa |
# Any experiences with Protocol Buffers?
## Question
I was just looking through some information about Google's protocol buffers data interchange format. Has anyone played around with the code or even created a project around it?
I'm currently using XML in a Python project for structured content created by hand in... | stackoverflow-qa |
# Any experiences with Protocol Buffers?
## Question
I was just looking through some information about Google's protocol buffers data interchange format. Has anyone played around with the code or even created a project around it?
I'm currently using XML in a Python project for structured content created by hand in... | stackoverflow-qa |
# Any experiences with Protocol Buffers?
## Question
I was just looking through some information about Google's protocol buffers data interchange format. Has anyone played around with the code or even created a project around it?
I'm currently using XML in a Python project for structured content created by hand in... | stackoverflow-qa |
# Any experiences with Protocol Buffers?
## Question
I was just looking through some information about Google's protocol buffers data interchange format. Has anyone played around with the code or even created a project around it?
I'm currently using XML in a Python project for structured content created by hand in... | stackoverflow-qa |
# How do I make a menu that does not require the user to press [enter] to make a selection?
## Question
I've got a menu in Python. That part was easy. I'm using raw_input() to get the selection from the user.
The problem is that raw_input (and input) require the user to press Enter after they make a selection. Is th... | stackoverflow-qa |
# How do I make a menu that does not require the user to press [enter] to make a selection?
## Question
I've got a menu in Python. That part was easy. I'm using raw_input() to get the selection from the user.
The problem is that raw_input (and input) require the user to press Enter after they make a selection. Is th... | stackoverflow-qa |
# How do I make a menu that does not require the user to press [enter] to make a selection?
## Question
I've got a menu in Python. That part was easy. I'm using raw_input() to get the selection from the user.
The problem is that raw_input (and input) require the user to press Enter after they make a selection. Is th... | stackoverflow-qa |
# How to check what OS am I running on in Python?
## Question
What do I need to look at to see if I'm on Windows, Unix, etc?
## Answer
>>> import os
>>> print os.name
posix
>>> import platform
>>> platform.system()
'Linux'
>>> platform.release()
'2.6.22-15-generic'
See: platform â Access to underlying platformâ... | stackoverflow-qa |
# How to check what OS am I running on in Python?
## Question
What do I need to look at to see if I'm on Windows, Unix, etc?
## Answer
Dang -- lbrandy beat me to the punch, but that doesn't mean I can't provide you with the system results for Vista!
>>> import os
>>> os.name
'nt'
>>> import platform
>>> platform.sys... | stackoverflow-qa |
# How to check what OS am I running on in Python?
## Question
What do I need to look at to see if I'm on Windows, Unix, etc?
## Answer
For the record here's the results on Mac:
>>> import os
>>> os.name
'posix'
>>> import platform
>>> platform.system()
'Darwin'
>>> platform.release()
'8.11.1'
Tags: python | stackoverflow-qa |
# How to check what OS am I running on in Python?
## Question
What do I need to look at to see if I'm on Windows, Unix, etc?
## Answer
You can also use sys.platform if you already have imported sys and you don't want to import another module
>>> import sys
>>> sys.platform
'linux2'
Tags: python | stackoverflow-qa |
# How to check what OS am I running on in Python?
## Question
What do I need to look at to see if I'm on Windows, Unix, etc?
## Answer
I do this
import sys
print sys.platform
Docs here : sys.platform.
Everything you need is probably in the sys module.
Tags: python | stackoverflow-qa |
# How to check what OS am I running on in Python?
## Question
What do I need to look at to see if I'm on Windows, Unix, etc?
## Answer
I am using the WLST tool that comes with weblogic, and it doesn't implement the platform package.
wls:/offline> import os
wls:/offline> print os.name
java
wls:/offline> import sys
... | stackoverflow-qa |
# How to check what OS am I running on in Python?
## Question
What do I need to look at to see if I'm on Windows, Unix, etc?
## Answer
in the same vein....
import platform
is_windows=(platform.system().lower().find("win") > -1)
if(is_windows): lv_dll=LV_dll("my_so_dll.dll")
else: lv_dll=LV_dll("./my_so_dl... | stackoverflow-qa |
# How to check what OS am I running on in Python?
## Question
What do I need to look at to see if I'm on Windows, Unix, etc?
## Answer
/usr/bin/python3.2
def cls():
from subprocess import call
from platform import system
os = system()
if os == 'Linux':
call('clear', shell = True)
elif os... | stackoverflow-qa |
# How to check what OS am I running on in Python?
## Question
What do I need to look at to see if I'm on Windows, Unix, etc?
## Answer
For Jython the only way to get os name I found is to check os.name Java property (tried with sys, os and platform modules for Jython 2.5.3 on WinXP):
def get_os_platform():
"""re... | stackoverflow-qa |
# How to check what OS am I running on in Python?
## Question
What do I need to look at to see if I'm on Windows, Unix, etc?
## Answer
A comparison between the different methods, and what they return on different operating systems can be found here:
OS_flavor_name_version
Methods that are compared:
import platform
... | stackoverflow-qa |
# How to check what OS am I running on in Python?
## Question
What do I need to look at to see if I'm on Windows, Unix, etc?
## Answer
Interesting results on windows 8:
>>> import os
>>> os.name
'nt'
>>> import platform
>>> platform.system()
'Windows'
>>> platform.release()
'post2008Server'
Edit: That's a bug
Tag... | stackoverflow-qa |
# How to check what OS am I running on in Python?
## Question
What do I need to look at to see if I'm on Windows, Unix, etc?
## Answer
If you not looking for the kernel version etc, but looking for the linux distribution you may want to use the following
in python2.6+
>>> import platform
>>> print platform.linux_... | stackoverflow-qa |
# How to check what OS am I running on in Python?
## Question
What do I need to look at to see if I'm on Windows, Unix, etc?
## Answer
Sample code to differentiate OS's using python:
from sys import platform as _platform
if _platform == "linux" or _platform == "linux2":
# linux
elif _platform == "darwin":
# ... | stackoverflow-qa |
# How to check what OS am I running on in Python?
## Question
What do I need to look at to see if I'm on Windows, Unix, etc?
## Answer
try this:
import os
os.uname()
and you can make it :
info=os.uname()
info[0]
info[1]
Tags: python | stackoverflow-qa |
# How to check what OS am I running on in Python?
## Question
What do I need to look at to see if I'm on Windows, Unix, etc?
## Answer
Watch out if you're on Windows with Cygwin where os.name is posix.
>>> import os, platform
>>> print os.name
posix
>>> print platform.system()
CYGWIN_NT-6.3-WOW
Tags: python | stackoverflow-qa |
# How to check what OS am I running on in Python?
## Question
What do I need to look at to see if I'm on Windows, Unix, etc?
## Answer
You can also use only platform module without importing os module to get all the information.
>>> import platform
>>> platform.os.name
'posix'
>>> platform.uname()
('Darwin', 'mainfr... | stackoverflow-qa |
# Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each?
## Question
In many places, (1,2,3) and [1,2,3] can be used interchangeably.
When should I use one or the other, and why?
## Answer
The list [1,2,3] is dynamic and flexible but that flexibility comes at a speed cost.
The tuple... | stackoverflow-qa |
# Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each?
## Question
In many places, (1,2,3) and [1,2,3] can be used interchangeably.
When should I use one or the other, and why?
## Answer
From the Python FAQ:
Lists and tuples, while similar in many respects, are generally use... | stackoverflow-qa |
# Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each?
## Question
In many places, (1,2,3) and [1,2,3] can be used interchangeably.
When should I use one or the other, and why?
## Answer
Tuples are a quick\flexible way to create composite data-types.
Lists are containers for, well... | stackoverflow-qa |
# Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each?
## Question
In many places, (1,2,3) and [1,2,3] can be used interchangeably.
When should I use one or the other, and why?
## Answer
As others have mentioned, Lists and tuples are both containers which can be used to store pytho... | stackoverflow-qa |
# Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each?
## Question
In many places, (1,2,3) and [1,2,3] can be used interchangeably.
When should I use one or the other, and why?
## Answer
If you can find a solution that works with tuples, use them, as it forces immutability which ki... | stackoverflow-qa |
# Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each?
## Question
In many places, (1,2,3) and [1,2,3] can be used interchangeably.
When should I use one or the other, and why?
## Answer
Whenever I need to pass in a collection of items to a function, if I want the function to not c... | stackoverflow-qa |
# Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each?
## Question
In many places, (1,2,3) and [1,2,3] can be used interchangeably.
When should I use one or the other, and why?
## Answer
The notion of tuples are highly expressive:
Pragmatically, they are great for packing and unp... | stackoverflow-qa |
# Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each?
## Question
In many places, (1,2,3) and [1,2,3] can be used interchangeably.
When should I use one or the other, and why?
## Answer
[1, 2, 3] is a list in which one can add or delete items.
(1, 2, 3) is a tuple in which once de... | stackoverflow-qa |
# Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each?
## Question
In many places, (1,2,3) and [1,2,3] can be used interchangeably.
When should I use one or the other, and why?
## Answer
[1,2,3] is a list.
(1,2,3) is a tuple and immutable.
Tags: python, list, tuples | stackoverflow-qa |
# Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each?
## Question
In many places, (1,2,3) and [1,2,3] can be used interchangeably.
When should I use one or the other, and why?
## Answer
open a console and run python.
Try this:
>>> list = [1, 2, 3]
>>> dir(list)
['__a... | stackoverflow-qa |
# File size differences after copying a file to a server vÃa FTP
## Question
I have created a PHP-script to update a webserver that is live inside a local directory.
I'm migrating the script into Python. It works fine for the most part, but after a PUT command the size of the file appears to change. Thus, the size of... | stackoverflow-qa |
# File size differences after copying a file to a server vÃa FTP
## Question
I have created a PHP-script to update a webserver that is live inside a local directory.
I'm migrating the script into Python. It works fine for the most part, but after a PUT command the size of the file appears to change. Thus, the size of... | stackoverflow-qa |
# How can I create a directly-executable cross-platform GUI app using Python?
## Question
Python works on multiple platforms and can be used for desktop and web applications, thus I conclude that there is some way to compile it into an executable for Mac, Windows and Linux.
The problem being I have no idea where to... | stackoverflow-qa |
# How can I create a directly-executable cross-platform GUI app using Python?
## Question
Python works on multiple platforms and can be used for desktop and web applications, thus I conclude that there is some way to compile it into an executable for Mac, Windows and Linux.
The problem being I have no idea where to... | stackoverflow-qa |
# How can I create a directly-executable cross-platform GUI app using Python?
## Question
Python works on multiple platforms and can be used for desktop and web applications, thus I conclude that there is some way to compile it into an executable for Mac, Windows and Linux.
The problem being I have no idea where to... | stackoverflow-qa |
End of preview. Expand in Data Studio
EB-Sky Python Domain (10GB)
~10GB of raw Python domain knowledge for continued pretraining: ~8GB of source code plus Stack Overflow Python Q&A. (2.49GB as stored — zstd-compressed parquet shards.)
Sources
Processing
- Size filter (200–200,000 chars per document)
- Auto-generated file removal (header heuristics)
- Hardcoded-secret regex scan, email redaction
- Exact deduplication (SHA-1)
- Q&A: HTML stripped, minimum score 1 for question and answer
Format
| Column | Description |
|---|---|
text |
the document content |
source |
github-code or stackoverflow-qa |
Load it
from datasets import load_dataset
ds = load_dataset("EB-Sky/python-domain-10gb", split="train")
- Downloads last month
- 53