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 generate_id( | |
first_name, | |
father_name, | |
last_name, | |
mother_full_name, | |
gender, | |
birthday_day, | |
birthday_month, | |
birthday_year |
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
from import_export.formats.base_formats import Format | |
from shapely.geometry import Point, mapping | |
from fiona import collection | |
class SHPFormat(Format): | |
def get_title(self): | |
return 'shp' |
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
number = '07045656789' | |
def hash_to_digits(num, length=10): | |
return abs(hash(num)) % (10 ** length) | |
hash = hash_to_digits(number) |
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
from fabric.api import * | |
def create_local_vm(name=None, image="lucid32"): | |
if not name: | |
name = env.project + "_VM" | |
local("vagrant box add {0} http://files.vagrantup.com/{1}.box".format(name,image)) | |
local("vagrant init {0}".format(name)) |
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
// Detect which type of boot loader is present, using a fixed built-in table | |
// 2012-03-06 <[email protected]> http://opensource.org/licenses/mit-license.php | |
#include <avr/pgmspace.h> | |
#include <util/crc16.h> | |
#define VERSION "2" | |
// list of all known boot loaders with their unique signatures | |
struct { word crc; const char* desc; } signatures[] = { |
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
/* JeeNode / JeeNode USB / JeeSMD | |
-------|-----------------------|----|-----------------------|---- | |
| |D3 A1 [Port2] D5 | |D3 A0 [port1] D4 | | | |
|-------|IRQ AIO +3V GND DIO PWR| |IRQ AIO +3V GND DIO PWR| | | |
| D1|TXD| ---- ---- | | |
| A5|SCL| D12|MISO|+3v | | | |
| A4|SDA| Atmel Atmega 328 D13|SCK |MOSI|D11 | | |
| |PWR| JeeNode / JeeNode USB / JeeSMD |RST |GND | | | |
| |GND| D8 |BO |B1 |D9 | | |
| D0|RXD| ---- ---- | |