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 | |
# -*- coding: utf-8 -*- | |
import argparse | |
import os | |
import platform | |
import re | |
import subprocess | |
import sys | |
import tempfile |
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 | |
# -*- coding: utf-8 -*- | |
a = ['a', 'b', 'c'] | |
b = [1, 2, 3] | |
c = ['a', 'b'] | |
d = [1 , 2] | |
def myzip(keys, values): | |
d = {} |
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 | |
# -*- coding: utf-8 -*- | |
a = 'a' | |
b = 'a12-4b' | |
c = '1234vvv' | |
d = 'afdf23-' | |
e = 'asd1_2a' | |
f = 'abcdeffwcflszsafdibcawerxbweiowberqwrrwrxe' |
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
[22244.117869] ata5.00: exception Emask 0x0 SAct 0xf SErr 0x0 action 0x0 | |
[22244.117876] ata5.00: irq_stat 0x40000008 | |
[22244.117881] ata5.00: failed command: READ FPDMA QUEUED | |
[22244.117890] ata5.00: cmd 60/00:00:b2:0d:70/04:00:db:00:00/40 tag 0 ncq 524288 in | |
[22244.117890] res 41/40:00:40:11:70/00:00:db:00:00/40 Emask 0x409 (media error) <F> | |
[22244.117894] ata5.00: status: { DRDY ERR } | |
[22244.117897] ata5.00: error: { UNC } | |
[22244.124956] ata5.00: configured for UDMA/133 | |
[22244.124990] sd 4:0:0:0: [sda] Unhandled sense code | |
[22244.124994] sd 4:0:0:0: [sda] |
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 | |
# -*- coding: utf-8 -*- | |
from wavebender import * | |
from itertools import * | |
formanta = [0, 10, 19, 28, 36, 44, 50, 55, 60, 62, 64, 64, 62, 60, 55, 50, 44, | |
36, 28, 19, 10, 0, -10, -19, -28, -36, -44, -50, -55, -60, -62, | |
-64, -64, -62, -60, -55, -50, -44, -36, -28, -19, -10] |
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
(defun nuke-all-buffers () | |
"kill all buffers, leaving only limited set of buffers" | |
(interactive) | |
(let* ((keep-them-alive '("*scratch*" "*Messages*" "*Pymacs*"))) | |
(mapcar (lambda (x) | |
(unless (member (buffer-name x) keep-them-alive) | |
(kill-buffer x))) | |
(buffer-list)))) |
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
--- sliceEngine.py 2015-03-23 21:36:07.000000000 +0300 | |
+++ sliceEngine.p 2015-03-28 23:33:43.000000000 +0300 | |
@@ -89,16 +89,22 @@ | |
def getPrintTime(self): | |
if self._printTimeSeconds is None: | |
return '' | |
- if int(self._printTimeSeconds / 60 / 60) < 1: | |
- return _('%d minutes') % (int(self._printTimeSeconds / 60) % 60) | |
- if int(self._printTimeSeconds / 60 / 60) == 1: | |
- return _('%d hour %d minutes') % (int(self._printTimeSeconds / 60 / 60), int(self._printTimeSeconds / 60) % 60) |
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 argparse | |
import time | |
import sys | |
def read_by_line(input, delay, is_recourse): | |
while True: | |
input.seek(0) | |
for line in input: | |
sys.stdout.write(line) |
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
[gui] | |
encoding = utf-8 | |
[alias] | |
#visual = gitk | |
last = log -1 HEAD | |
st = status | |
shorty = status --short --branch | |
# git unstage - убрать всё из индекса (чтобы например добавить/закоммитить сначала что-то другое) | |
unstage = reset HEAD -- | |
up = !(git add . && git stash && git pull --rebase >&2) | grep -v \"No local changes to save\" && git stash pop |
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
#usage "<b>Generate name layers to panelize board</b>\n" | |
"<p>" | |
"Generates a command sequence which copies the name texts (support spin-flag) " | |
"of all elements of your layout into newly generated layers (125 and 126). " | |
"After running the ULP you can GROUP, CUT and PASTE your layout " | |
"to get an array of several boards. Make sure all layers are displayed before." | |
"<p>" | |
"The duplicated name texts in the new layers will not be changed. " | |
"Please notice that you have to deactivate layers 25 and 26 if you use " | |
"the CAM processor e.g. for generating gerber data. Instead, you have to activate " |