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 | |
import glob | |
import re | |
file_prefix = "prompt_pronunciation_vl_" | |
file_extension = ".wav" | |
index_range = [1, 1139] | |
index = 1 | |
number_of_zeroes = 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
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 |
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 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") |
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
failregex = [[]client <HOST>[]] (Digest: )?user .* (authentication failure|not found|password mismatch) |
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 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 |
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 string import ascii_lowercase as al | |
def is_pangram(s): | |
return set(al) - set(s.lower()) == set([]) |
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
;; -*- mode: emacs-lisp; coding: hebrew-iso-8bit-unix -*- | |
;; subtitles.el - work on .srt (subripper) subtitle files | |
;; Copyright (C) 2009 Ehud karni <ehud@xxxxxxxxxxxxxx> | |
;; This file is NOT part of GNU Emacs, distribution conditions below. | |
;; | |
;; EHUD KARNI ינרק דוהא | |
;; Ben Gurion st' 14 ןוירוג ןב 'חר | |
;; Kfar - Sava 44 257 אבס - רפכ | |
;; ================================== |
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 java.util.Random; | |
public final class RandomPuzzle { | |
public static void main(String[] args) { | |
for(int i = 0; i < 256; i++) { | |
System.out.println(new Random(i).nextInt(8)); | |
} | |
} | |
} |
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
/* | |
* | |
* Adaptation of the JRuby swing demo code from the Wikipedia article at | |
* http://en.wikipedia.org/wiki/JRuby#JRuby_calling_Java | |
* | |
* */ | |
var frame = new javax.swing.JFrame | |
frame.getContentPane.add(new javax.swing.JLabel("Hello, World!")) | |
frame.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE) |
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
$ time echo "why?" | |
why? | |
real 0m0.000s | |
user 0m0.000s | |
sys 0m0.000s | |
$ LC_COLLATE=C time echo "why?" | |
why? | |
0.00user 0.00system 0:00.00elapsed 0%CPU (0avgtext+0avgdata 2048maxresident)k |
OlderNewer