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 view (self, data) : | |
index, filteredIndex = self.dataIndex (data) | |
indexData = ArrayDataSource (filteredIndex, sort_order = "ascending") | |
indexMapper = LinearMapper (range = DataRange1D (indexData)) | |
grid = ChacoGridContainer (padding = 35, | |
padding_bottom = 65, | |
fill_padding = True, | |
use_backbuffer = True, | |
shape = gridShape (len (self._grid)), | |
spacing = (0, 0)) |
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
// Create your own "my_build.sublime-build", mark it as active | |
// Open Preferences - Key bindings - User | |
// And add : | |
{ | |
// ... | |
"keys": ["f8"], "command": "show_overlay", "args": {"overlay": "command_palette", "text": "Build: "}. | |
// ... | |
} |
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
(* | |
Func 1: | |
Write a function is_older that takes two dates and evaluates to true or false. It evaluates to true if | |
the First argument is a date that comes before the second argument. (If the two dates are the same, | |
the result is false.) | |
*) | |
fun is_equal (date1 : int * int * int, date2 : int * int * int) = | |
(#1 date1 = #1 date2) andalso (#2 date1 = #2 date2) andalso (#3 date1 = #3 date2) | |
fun is_older (date1 : int * int * int, date2 : int * int * int) = |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<scheme name="Eversong" version="1" parent_scheme="Default"> | |
<option name="LINE_SPACING" value="1.0" /> | |
<option name="EDITOR_FONT_SIZE" value="14" /> | |
<option name="CONSOLE_FONT_NAME" value="Ubuntu Mono" /> | |
<option name="CONSOLE_FONT_SIZE" value="16" /> | |
<option name="EDITOR_FONT_NAME" value="Terminus (TTF)" /> | |
<colors> | |
<option name="CARET_COLOR" value="f8f8f0" /> | |
<option name="CARET_ROW_COLOR" value="1822" /> |
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
# -*- coding: utf-8 -*- | |
from pytz import timezone | |
from datetime import datetime, timedelta | |
tz1 = timezone("Asia/Yekaterinburg") | |
tz2 = timezone("America/New_York") | |
dst1 = datetime(2013, 3, 9, tzinfo=tz2) | |
dst2 = datetime(2013, 3, 10, tzinfo=tz2) | |
dst3 = datetime(2013, 3, 11, tzinfo=tz2) |
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
/* | |
The circuit: | |
* LCD RS pin to digital pin 8 | |
* LCD Enable pin to digital pin 9 | |
* LCD D4 pin to digital pin 4 | |
* LCD D5 pin to digital pin 5 | |
* LCD D6 pin to digital pin 6 | |
* LCD D7 pin to digital pin 7 | |
* LCD BL pin to digital pin 10 | |
* KEY pin to analogl pin 0 |
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
# Since I ask this of people before using their code samples, anyone can | |
# use this under BSD. | |
import os | |
import M2Crypto | |
def empty_callback(): | |
return | |
# Seed the random number generator with 1024 random bytes (8192 bits) |
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
# -*- coding: utf-8 -*- | |
__author__ = 'Rustam Safin' | |
import base64 | |
from M2Crypto.RSA import (load_key, pkcs1_padding, gen_key) | |
from Crypto.Cipher import AES | |
from Crypto import Random | |
from sys import getfilesystemencoding | |
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
# -*- coding: utf-8 -*- | |
import logging | |
import sys | |
logging.basicConfig(level=logging.DEBUG, stream=sys.stdout) | |
logger = logging.getLogger("TestModel") | |
import sip | |
sip.setapi("QString", 2) | |
sip.setapi("QVariant", 2) |
OlderNewer