Welcome To Snipplr
Everyone's Recent Python Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
A dictionary-like class that can be used to assign unique integer IDs to names. This class is part of the [igraph library](http://igraph.sourceforge.net), but I need it occasionally in other projects so I post it here.
1
793
posted 15 years ago by ntamas
It is necessary on occasion to execute a command in interactive shell. (I needed to to get access to some env vars... ) While there are many way to accomplish this I opted to run my cmd in interactive mode.
To do so I had to write this little wrappe...
0
1687
posted 15 years ago by adaminuwashinet
Python
URIエンコードã¨ãƒ‡ã‚³ãƒ¼ãƒ‰ã«ã¯urllibモジュールã®quote()ã¨unquote()ãŒä½¿ã¸ã‚‹
0
709
posted 15 years ago by tamuratetsuya
This function takes 2 arguments, first is the string to be encoded (or decoded) the second is optional and can be used to change the rotation amount to something other than 13.
0
593
posted 15 years ago by Valdemarick
アルゴリズムコンテストã®å‹‰å¼·ä¼šã§ç´¹ä»‹ã—ãŸGoogle App Engineã§å‹•ãpythonコードã§ã™
Djangoフレームワークをå‰æã«ã—ã¦ã„ã¾ã™ã€‚
ã‚ã¾ã‚Šã‚³ãƒ¼ãƒ‰ã¨ã—ã¦ã¯å‚考ã«ãªã‚‰ãªã„ã‹ã‚‚知れã¾ã›ã‚“ãŒã€ã“ã...
0
1698
posted 15 years ago by tamuratetsuya
Tumblr taglist generator returns your Tumblog tags under JSON format. Written in Python and utilized Google App Engine.
1
786
posted 15 years ago by doqtu84
Me trying to not be a noob in python.
Yes, I know my noob is probably showing.
0
645
posted 15 years ago by jakswa
Here's a short program to print a list of all of the documents in your Google Documents account
0
580
posted 15 years ago by hemanthhm
ã¿ãŸã„ãªã‚«ãƒ³ã‚¸ã§ã€Œä¿æŒã™ã‚‹modelåã®å°æ–‡å—+"_set"ã€ã§ã¶ã‚‰ã•ãŒã‚‹Entityã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã§ãる。ã“ã®å称ã¯ReferencePropertyã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ã®collection_name引数ã§æŒ‡å®šã™ã‚‹äº‹ã‚‚ã§ãる。
0
608
posted 15 years ago by tamuratetsuya
Python
htmlfill and Pylons integration, form validation inside controller and Mako template example with i18n
These are code snippets from different files for a Pylons project that show a working (provided the environment) htmlfill example.
1
1093
posted 16 years ago by wackysalut
This source code uses the xml file posted here(http://snipplr.com/view/4138/backup-script2--confg-file/) to know which file should be sent and mailing configuration.
0
669
posted 16 years ago by mjsmagalhaes
This simple example tests and shows off a fully working FormEncode (v1.2) example. I've had a hard time finding an example, so I now give it to you.
1
954
posted 16 years ago by wackysalut
Also works with weighted degree or any other property you might think of.
0
936
posted 16 years ago by ntamas