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
def get_syllables(word): | |
syllables = [] | |
""" | |
Aşağıdaki satır gelen kelimenin ünlü harfler 1, ünsüzler 0 olacak | |
şekilde desenini çıkarır. | |
Örneğin: arabacı -> 1010101, türkiye -> 010010 | |
""" |
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 | |
import sys | |
from time import sleep | |
import mechanize | |
CHRS = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
MOZILLA_UAS = 'Mozilla/5.0 (X11; U; Linux i686; en-US) ' \ | |
'AppleWebKit/534.7 (KHTML, like Gecko) ' \ |
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
local testRunner = { | |
tests = { | |
test_foo = function() end, | |
test_bar = function() end, | |
test_zoo = function() end | |
}, | |
init = function(self) | |
self._tests = {} | |
for n, f in pairs(self.tests) do | |
table.insert(self._tests, {n, f}) |
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 hashlib import sha256 | |
from time import time | |
HARDNESS = 4 | |
VALID_BLOCK_PREFIX = "0" * HARDNESS | |
def is_valid_hash(hash_str): | |
return hash_str.startswith(VALID_BLOCK_PREFIX) | |
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 MySQLdb import connect | |
conn = connect(user="[USER]", passwd= "[PASSWORD]") | |
cur = conn.cursor() | |
cur.execute("show databases;") | |
dbs_to_update = filter( | |
lambda db: db not in ('information_schema', 'mysql', 'performance_schema'), | |
[dbname[0] for dbname in cur.fetchall()]) |
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
""" | |
Mirat Can Bayrak / 2009 | |
""" | |
from urllib import urlopen, urlretrieve | |
from datetime import date as Date | |
from datetime import timedelta | |
from xml.dom import minidom | |
from os.path import basename | |
import re |
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
brew install iterm2 git docker docker-compose btop neovim nvm pyenv pipx zsh zsh-completions wget grep curl tmux ranger |
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 re | |
import glob | |
import subprocess | |
from os.path import exists | |
from sys import exit | |
INPUT_FOLDER = 'input/' | |
OUTPUT_FOLDER = 'output/' |
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 | |
# | |
# archey [version 0.1-11] | |
# | |
# Maintained by Melik Manukyan <melik@archlinux.us> | |
# Distributed under the terms of the GNU General Public License v3. | |
# See http://www.gnu.org/licenses/gpl.txt for the full license text. | |
# | |
# System information tool for Archlinux written in python. | |
#-----------------Customized For Ubuntu---------------------------- |
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 random | |
import subprocess | |
from collections import namedtuple | |
from datetime import timedelta | |
from math import sqrt | |
import argparse | |
from os.path import join, exists | |
from os import getcwd, mkdir | |
from ffprobe import FFProbe | |
from pytube import YouTube |
NewerOlder