Skip to content

Instantly share code, notes, and snippets.

@altendky
altendky / client.py
Last active April 21, 2018 20:51 — forked from riteshdroid/client output
neq_one
import requests
url='http://127.0.0.1:8090/blue'
hj=requests.post(url,{
"device":"TemperatureSensor",
"value":"20",
"timestamp":"25/01/2017 10:10:05"
})
# coding: utf-8
from datetime import datetime
from time import sleep
from psycopg2 import connect, OperationalError
connected = False
while not connected:
try:
@altendky
altendky / ex.py
Last active June 6, 2018 14:57 — forked from AlecTaylor/ex.py
epoch2stat = {
key: val
for key, val in iteritems({
k: tuple(
(lambda stats: stats)(
tuple(imap(itemgetter(1), v))
)
)
for k, v in groupby(sorted(
imap(
event is a custom object defined above
buttons = re.findall(r"text='([-\w ]*)'", event.stringify(), re.MULTILINE)
for number in buttons:
if number == " " or number == "View pokemon":
continue
last_request = functools.partial(event.click, text=number)
@altendky
altendky / aisgen.py
Last active March 20, 2019 15:38 — forked from eliotb/aisgen.py
Tools for working with Texas Instruments COFF and AIS files
#!/usr/bin/env python
'''Read fully linked TI COFF file, and generate AIS format file
Commandline parameters
enable sequential read,
pll and emifb configuration
pinmux configuration
enable checksums
'Eliot Blennerhassett' <eblennerhassett@audioscience.com>
from . import google
dispatch = {
'google': google.validate
}[platform](token)
def get_profile_for_token(client_ids, platform, token):
if platform == 'google' and platform in client_ids:
import csv
import math
import gidgethub.httpx
import httpx
import trio
import asyncclick as click
STARGAZAERS = """query StargazersCount($owner: String!, $name: String!, $after: String = null)
{