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
#!/home/bin/python | |
import os | |
import os.path | |
def getJpgList(aDir): | |
list = os.listdir(aDir) | |
jpg_list = [] | |
for each in list: | |
if each.count('.') == 2: |
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
cnt= raw_input("input period :") | |
n=cnt.count('.') | |
print str(n) + " phases in 1 minute : " + str(n*8) + "bpm" | |
print str(n) + " phases in 30 seconds : " + str(n*8*2) + "bpm" | |
raw_input("done") |
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
#!/bin/bash | |
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2" |
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
//suppose we have bunch of dom elements like below | |
//<span class="length">29 minutes</span> | |
//method 1 - map, filter, reduce | |
( | |
$.map($('.length'), e => parseInt($(e).text(), 10)) | |
.filter(Boolean) | |
.reduce( (a, b) => a + b) | |
) / 60; |
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
import sqlite3 | |
import string | |
import unicodedata | |
import os.path | |
import os | |
######## | |
validFilenameChars = "-_.() %s%s" % (string.ascii_letters, string.digits) | |
def removeDisallowedFilenameChars(filename): |
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 | |
#-*- coding: utf-8 -*- | |
import os | |
import os.path | |
import shutil | |
for dirpath, dirnames, filenames in os.walk('.'): | |
for filename in filenames: | |
if filename == "extract.py" or filename.startswith('.'): |
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
#!/bin/bash | |
for i in .* | |
do | |
if [ "$i" = "." ] || [ "$i" = ".." ] | |
then | |
continue | |
fi | |
j=`echo $i | sed 's/\./_/g'` | |
mv "$i" "$j" | |
done |
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: cp949 -*- | |
import os | |
import stat | |
def FindFilesByExt(ext, path): | |
if path[-1] != os.sep: | |
path += os.sep | |
ext = ext.lower() |
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
import os | |
max = raw_input("how many?") | |
if max == None: | |
max=21 | |
for i in range(1,int(max)+1): | |
os.mkdir("%02d"%i) | |
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
"%APPDATA%\RapidGet\RPGUnist.exe" | |
"%PROGRAMFILES%\1410002\unins000.exe" | |
"%PROGRAMFILES%\365boan\uninst_365boan.exe" | |
"%PROGRAMFILES%\4shared.com\UNWISE.exe" | |
"%PROGRAMFILES%\4shared Desktop\uninstall.exe" | |
"%PROGRAMFILES%\µ¿Å°È£Å×\uninstall.exe" | |
"%PROGRAMFILES%\µðÆË¸Å´ÏÀúV3\unins000.exe" | |
"%PROGRAMFILES%\»çÀÌÆ® ¹Ù·Î°¡±â\uninst.exe" | |
"%PROGRAMFILES%\½º¸¶Æ®Æª\uninst.exe" | |
"%PROGRAMFILES%\11STshoppingIcon\uninstall.exe" |