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 EarthEnvDEM90(lat, lon): | |
import rasterio | |
tile = 'EarthEnv-DEM90_%s%02i%s%03i' % (lat < 0 and "S" or "N", | |
abs(lat - lat % 5), | |
lon < 0 and "W" or "E", | |
abs(lon - lon % 5)) | |
# /vsitar/ allows on the fly decompression of the tiles :) | |
bil = r'/vsitar/F:\ruben\geodata\dem90\%s.tar.gz\%s.bil' % (tile, tile) | |
with rasterio.open(bil) as src: | |
r, c = src.index(lon, lat) |
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
""" http://rmolina.co/2015/10/solucion-automatica-de-crackmes.html """ | |
import sys | |
import pexpect | |
import re | |
import string | |
import collections | |
PIN = './pin-2.14-71313-gcc.4.4.7-linux/pin' |
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 twisted.internet import reactor | |
from sysfs.gpio import GPIOController as Controller | |
from sysfs.gpio import GPIOPinDirection as Direction | |
from sysfs.gpio import GPIOPinEdge as Edge | |
Controller().available_pins = [113, 175] | |
led = Controller().alloc_pin(175, Direction.OUTPUT) | |
def btn_changed(pin, state): led.value(state) | |
btn = Controller().alloc_pin(113, Direction.INPUT, btn_changed, Edge.BOTH) |
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 requests | |
import lxml | |
import sympy | |
import numpy | |
def PeopleSetDetail(PeopleSetID, PrimeObsession=False): | |
site = 'http://comics.www.collectors-society.com/' |