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
S (Consistently Good) | |
- Guru the Caterer | |
- Godavri | |
- Ritu Ki Rasoi | |
A (Good) | |
- Dosa And Curry | |
- Himalayan Kitchen |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
## Lights | |
import machine | |
import neopixel | |
np0 = neopixel.NeoPixel(machine.Pin(5), 200) | |
np1 = neopixel.NeoPixel(machine.Pin(19), 200) | |
for i in range(0,200): | |
np0[i] = (101,51, 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
version: "2" | |
settings: | |
# The deployment_output_path is mounted to the Conductor container, so | |
# that the `run` and `deployment` commands can write generated Ansible | |
# playbooks to it. | |
# deployment_output_path: ~/ansible-deployment | |
# The Conductor container does the heavy lifting, and provides a portable | |
# Python runtime for building your target containers. It should be derived | |
# from the same distribution as you're building your target containers with. | |
conductor_base: centos:7 |
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 twisted.web.server import Site | |
from twisted.web.resource import Resource | |
import json, hmac | |
from hashlib import sha1 | |
from blinker import signal | |
class WebhookServer(Resource): |
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 network | |
sta_if = network.WLAN(network.STA_IF) | |
ap_if = network.WLAN(network.AP_IF) | |
if not sta_if.isconnected(): | |
sta_if.active(True) | |
sta_if.connect('YYY', '') | |
ap_if.active(False) | |
while not sta_if.isconnected(): | |
pass |
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
""" | |
Two things are wrong with Django's default `SECRET_KEY` system: | |
1. It is not random but pseudo-random | |
2. It saves and displays the SECRET_KEY in `settings.py` | |
This snippet | |
1. uses `SystemRandom()` instead to generate a random key | |
2. saves a local `secret.txt` |
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/python | |
# rtorrent_xmlrpc | |
# (c) 2011 Roger Que <alerante@bellsouth.net> | |
# | |
# Python module for interacting with rtorrent's XML-RPC interface | |
# directly over SCGI, instead of through an HTTP server intermediary. | |
# Inspired by Glenn Washburn's xmlrpc2scgi.py [1], but subclasses the | |
# built-in xmlrpclib classes so that it is compatible with features | |
# such as MultiCall objects. |
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 | |
import os, sys | |
def get_state(): | |
val = os.popen("adb shell dumpsys battery | grep level").read() | |
if val: | |
output = val.strip().rsplit("level: ")[1] | |
output = "%s%% \n" % output | |
else: | |
output = "Phone Disconnected \n" |
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
""" | |
Simple xml serializer. | |
@author Reimund Trost 2013 | |
Example: | |
mydict = { | |
'name': 'The Andersson\'s', | |
'size': 4, |
NewerOlder