Skip to content

Instantly share code, notes, and snippets.

View emres's full-sized avatar
💭
"The purpose of computing is insight, not numbers." -- Richard W. Hamming

Emre Sevinç emres

💭
"The purpose of computing is insight, not numbers." -- Richard W. Hamming
View GitHub Profile
@emres
emres / subset.py
Created October 23, 2010 10:05
subset.py for the last level in challenge.greplin.com
import itertools
my_set = [3, 4, 9, 14, 15, 19, 28, 37, 47, 50, 54, 56, 59, 61, 70, 73, 78, 81,
92, 95, 97, 99]
def greplin_condition(S):
max_item = max(S)
S.remove(max_item)
if sum(S) == max_item:
return True
failregex = [[]client <HOST>[]] (Digest: )?user .* (authentication failure|not found|password mismatch)
from turkish.deasciifier import Deasciifier
my_ascii_turkish_txt = "Opusmegi cagristiran catirtilar."
deasciifier = Deasciifier(my_ascii_turkish_txt.decode("utf-8"))
my_deasciified_turkish_txt = deasciifier.convert_to_turkish()
print my_deasciified_turkish_txt.encode("utf-8")
import matplotlib.pyplot as plt
word_frequencies = []
for line in open("top100.txt"): word_frequencies.append(int(line))
word_freq_ideal = []
d = 1
for x in word_frequencies:
word_freq_ideal.append(word_frequencies[0] / d)
d = d + 1
@emres
emres / renamer.py
Created December 22, 2009 15:16
A very small and yet-to-be-completed Python program for some sound file renaming.
import os
import glob
import re
file_prefix = "prompt_pronunciation_vl_"
file_extension = ".wav"
index_range = [1, 1139]
index = 1
number_of_zeroes = 4