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 | |
| bytes=`cat $1* | grep -i 'to drive' | cut -d ' ' -f 8 | paste -s -d + | bc` | |
| rows=`cat $1* | grep -i 'fetched' | cut -d ' ' -f 7 | paste -s -d + | bc` | |
| start=`cat $1* | grep -i 'started' | head -n 1 | cut -d ' ' -f 1,2` | |
| end=`cat $1* | grep -i 'finished' | tail -n 1 | cut -d ' ' -f 1,2` | |
| echo "$start - $end; $rows rows; $bytes bytes" | |
| seconds=`python -c "from dateutil.parser import parse; import sys; print (parse(sys.argv[2])-parse(sys.argv[1])).seconds" "$start" "$end"` | |
| rs=`bc <<< "scale=2;$rows/$seconds"` | |
| bs=`bc <<< "scale=2;$bytes/$seconds"` |
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/python | |
| import sys | |
| from subprocess import call | |
| def main(): | |
| if len(sys.argv) == 3 and sys.argv[1] == "-c": | |
| filename = sys.argv[2] | |
| (all, dos, nix) = doWork(filename) | |
| cmd = "unix2dos" if dos > nix else "dos2unix" | |
| call([cmd, "-q", "-k", 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
| import os | |
| import fnmatch | |
| import bencode | |
| from bencode import BTL | |
| from pprint import pprint | |
| def findTorrents(*searchDirs): | |
| for searchDir in searchDirs: | |
| for root, dirnames, filenames in os.walk(searchDir): | |
| for filename in fnmatch.filter(filenames, '*.torrent'): |
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
| # Open file, generate voice and silence parts index, save | |
| Read from file: "c:\Videolectures\a.mp3" | |
| # set parameters for intensity analysis | |
| min_pitch = 100 ; (Hz) | |
| time_step = 0.0 ; (sec) 0 is auto | |
| # set parameters for silent intervals detaction | |
| silence_threshold = -27.0 ; (dB) | |
| min_silent_interval = 0.5 ; (sec) |
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
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> | |
| <script type="text/javascript" src="printThis.js"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function () { | |
| //printThis.js is a jQuery plugin, get it here: |
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
| ололо! | |
| http://treeice.ru/stat/ | |
| сводная таблица | |
| https://docs.google.com/spreadsheet/ccc?key=0AvOjE9_eerOJdGNoMmhIUjZnZWxqS01SdThIWU5Uc1E&usp=sharing#gid=0 | |
| матстат 2013 кб | |
| https://docs.google.com/document/d/1HInPfEYKWq2-2a7Um-wMxSTDxmQPRWpdaUYnnRXJ2zI/edit | |
| матстат 2014 |
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
| $('div[class=b-container-content-item-col]').each(function(i,e){ | |
| var t = e.textContent; | |
| var tmp = t.split('\n'); | |
| var weight = parseInt(tmp[1]); | |
| var price = parseInt(tmp[2]); | |
| var k = price/weight; | |
| var lol = $("<div><br /><h2>"+k+"<br />$"+(80+price*0.4)+"</h2></div>"); | |
| $(e).append(lol); | |
| }) |
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
| //load jQuery because Vk has no $'s :) | |
| var jq = document.createElement('script'); | |
| jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
| document.getElementsByTagName('head')[0].appendChild(jq); | |
| // ... give time for script to load, then type. | |
| jQuery.noConflict(); | |
| //drop other's posts |
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
| function isValidXML(xmlString) { | |
| var parser = new DOMParser(); | |
| var parsererrorNS = parser.parseFromString('INVALID', 'text/xml').getElementsByTagName("parsererror")[0].namespaceURI; | |
| var dom = parser.parseFromString(xmlString, 'text/xml'); | |
| if(dom.getElementsByTagNameNS(parsererrorNS, 'parsererror').length > 0) { | |
| return false | |
| } | |
| return true; | |
| } |
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
| $ pip-2.7 show wxPython | |
| --- | |
| Name: wxPython | |
| Version: 2.8.12.1 | |
| Location: /usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode | |
| Requires: | |
| $ pip-2.7 install wxPython --upgrade -v --pre | |
| Installed version (2.8.12.1) is most up-to-date (past versions: src-2.9.5.0, src-2.8.12.1, docs-2.9.5.0, docs-2.8.12.1, demo-2.9.5.0, demo-2.8.12.1) | |
| Requirement already up-to-date: wxPython in /usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode |