This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| letters = ['A', 'B', 'C'] | |
| nb_letters = len(letters) | |
| total = 100 | |
| step = total / nb_letters | |
| index = 0 | |
| results = [] | |
| for i in range(1, total + 1): | |
| if index == nb_letters: | |
| index -= 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| import os | |
| import re | |
| import datetime | |
| from ftplib import FTP | |
| from BeautifulSoup import BeautifulSoup | |
| _multilines_re = re.compile(r'<([a-z0-9\-]+)\s+(.*?)\s+</\1>', re.S | re.M) | |
| _singleline_re = re.compile(r'<(product|version)>\s+(.+)$', re.M) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys | |
| import os | |
| if __name__ == '__main__': | |
| module = __import__(sys.argv[1]) | |
| path = module.__file__.replace('.pyc', '.py') | |
| if os.path.basename(path) == '__init__.py': | |
| path = os.path.dirname(path) | |
| print 'Opening "%s"' % path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var mongoose = require('mongoose') | |
| , Schema = mongoose.Schema | |
| mongoose.connect('localhost', 'testing_tojsonWithVirtuals'); | |
| var PersonSchema = new Schema({ | |
| name : String | |
| , age : Number | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var mongoose = require('mongoose'); | |
| var TestSchema = new mongoose.Schema({ | |
| a : Array, | |
| s : String, | |
| n : Number | |
| }); | |
| var Test = mongoose.model('Test', TestSchema); | |
| mongoose.connection.once('open', function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import gevent.monkey | |
| gevent.monkey.patch_all() | |
| import sys | |
| import optparse | |
| import gevent | |
| from boto.s3.connection import S3Connection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Include the Dropbox SDK libraries | |
| import httplib | |
| from dropbox import client, rest, session | |
| # Proxy settings | |
| HTTP_PROXY_HOST = '127.0.0.1' | |
| HTTP_PROXY_PORT = 8888 | |
| # Get your app key and secret from the Dropbox developer website | |
| APP_KEY = 'XXXXX' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo find /var/log -type f -exec sh -c 'echo -n "" > "{}"' \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DDR Version 1.00 20120529 | |
| In | |
| DDR3 | |
| freq | |
| 300MHz | |
| config state | |
| pctl | |
| phy | |
| mem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/system/bin/sh | |
| chown system.wifi /data/misc/wifi/wpa_supplicant.conf |
OlderNewer