Skip to content

Instantly share code, notes, and snippets.

View ekratskih's full-sized avatar

Edil Kratskih ekratskih

  • Kyrgyzstan, Bishkek
View GitHub Profile
@ekratskih
ekratskih / android.py
Last active March 14, 2017 01:10
Export AI assets format for android format
""" Export AI format for android format """
import os
import re
import shutil
import argparse
def copy_assets(source_dir='.', destination_dir='.', override=False, is_clean=False):
""" Copy assets from source to destination """
for item in os.listdir(source_dir):
@ekratskih
ekratskih / str_to_float.py
Created January 7, 2013 16:06
Quick formating str to float
map(float, ["1", "2", "3"]) # output: [1.0, 2.0, 3.0]
@ekratskih
ekratskih / track.py
Created August 21, 2012 05:02
Tracking thread
#!/usr/bin/env python
import threading
import time
class TrackingThread(threading.Thread):
def __init__(self, *args, **kwargs):
super(TrackingThread, self).__init__(*args, **kwargs)
self._stop = threading.Event()
@ekratskih
ekratskih / convert.rb
Created October 1, 2011 07:15
Convert flac files in current directory to mp3
ALBUMS_DIR = '/home/edil/Downloads/Muse Japan CD'
def convert_files(dir)
puts '--' + dir + '--'
Dir.entries(dir).each do |track|
if track == '.' or track == '..'
next
end
@ekratskih
ekratskih / convert.py
Created April 27, 2011 13:20
Convert mpc files in current directory to mp3 files
#!/usr/bin/python
# You should install "mpcdec" for converting mpc files
# Ubuntu: apt-get install musepack-tools
import os
import subprocess
for file_mpc in os.listdir("."):
file_info = os.path.splitext(file_mpc)