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
/* | |
Buffer visualisation thread. | |
*/ | |
static WORKING_AREA(visual_wa, 128); | |
static msg_t visual(void *arg) { | |
(void) arg; | |
uint8_t col = 0; | |
chRegSetThreadName("display_refresh"); | |
palWriteGroup(GPIOA, 0b11111111, 0, 0b00000000); |
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
// Hobbed Bolt Support | |
// Authors: Alexander, http://vk.com/linuxbashev | |
// Ruslan Popov, http://vk.com/id19523249 | |
// Original: http://www.thingiverse.com/thing:151669 | |
// Requires: http://curriculum.makerbot.com/daily_lessons/february/openscad_write.html | |
// Usage: | |
// * to generate all on one model: | |
// openscad -o all-in-one.stl hobbed_support.scad | |
// * to generate a particular model use 0, 1, or 2 as N: | |
// openscad -D only=N -o hobbed_N.stl hobbed_support.scad |
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) |
OlderNewer