This file contains 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
import glob | |
def get_ordered_files(path): | |
f = [] | |
for ifile in glob.glob( os.path.join(path,"requirements", '*.txt') ): | |
if ifile.find("local")>-1: | |
f.append((0,ifile)) | |
elif ifile.find("required")>-1: |
This file contains 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
--- Event Type | |
|----Metric | |
|---- Graph Hourly | |
For example: | |
--- VO EVENT | |
|---- Value Graph | |
|----- Hourly trend + previous 3 days | |
|---- Events Graph |
This file contains 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
print "Hello World" | |
print "Welcome to Our Blog" |
This file contains 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
sub soundex | |
{ | |
local (@s, $f, $fc, $_) = @_; | |
push @s, '' unless @s; # handle no args as a single empty string | |
foreach (@s) | |
{ | |
tr/a-z/A-Z/; | |
tr/A-Z//cd; |
This file contains 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 | |
# encoding: utf-8 | |
""" | |
fbsearch.py | |
ismail@zyelabs.net | |
""" | |
import facepy | |
import csv | |
fieldnames = [u'category', u'name', u'id'] |
This file contains 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
import os | |
from PIL import Image | |
from glob import glob | |
pwd = os.path.dirname(os.path.abspath(__file__)) | |
ext = '.png' | |
ext_new = '.jpg' | |
fpath = os.path.join(pwd,'*'+ext) | |
img_list = glob(fpath) | |
left = 450 |
This file contains 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
from django import template | |
from django.db.models import get_model | |
register = template.Library() | |
class ProductContentNode(template.Node): | |
def __init__(self, num, varname): | |
model = 'shop.Product' | |
self.num = int(num) | |
self.num_check = num*4 |
This file contains 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 | |
""" | |
Testing | |
""" | |
from libmproxy import controller, proxy | |
import os | |
class ModifyMaster(controller.Master): | |
def __init__(self, server): | |
controller.Master.__init__(self, server) |
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 29 columns, instead of 7. in line 7.
This file contains 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
SERIAL,TIMESTAMP,CUSTOMER_ID,RESERVED01,PRODUCT_ID,CUSTOMER_TYPE,CUSTOMER_STATE,ChargeAmount_OF_UNITS,ChargeAmount_OF_FUND,ChargeAmount_FROM_ACCOUNT1,ACCOUNT1_BALANCE,ChargeAmount_FROM_ACCOUNT2,ACCOUNT2_BALANCE,WalletType1,UnitType1 ,ChargeAmount1 ,WalletBalance1 ,WalletType2,UnitType2 ,ChargeAmount2 ,WalletBalance2 ,WalletType3,UnitType3 ,ChargeAmount3 ,WalletBalance3 ,Bonus1 ,Bonus2 ,Bonus3 ,AddtionaInfo | |
379120186,20120701235122,1345567,0,555,0,1000000,0,0,5,664,0,0,200,1,5,664,0,0,0,0,0,0,0,0,,,,1234 | |
379120190,20120701235124,1345568,0,1,0,1000000,0,0,4,108,0,0,200,1,4,108,0,0,0,0,0,0,0,0,,,, | |
379120197,20120701235132,1345569,0,4,0,1000000,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,,,, | |
379120203,20120701235136,1345570,0,1,0,1000000,0,0,0,346,0,0,0,0,0,0,0,0,0,0,0,0,0,0,,,,XXX | |
379120207,20120701235138,1345571,0,10,0,1000000,0,0,0,0,3,100,200,1,3,100,500,2,10,0,610,2,20,80,10,,, | |
379120208,20120701235138,1345571,0,1,0,1000000,0,0,3,306,0,0,200,1,3,306,0,0,0,0,0,0,0,0,,,, | |
379120211,20120701235141,1345573,0,1,0,1000000 |
OlderNewer