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 re | |
class Parser: | |
def parse(self, text): | |
tokens = self.tokenize(text) | |
return self.parse_dict(tokens) | |
def tokenize(self, text): | |
return [ x for x in re.split(r'(\s+|[()=])', text) if x.strip()] |
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
package main | |
import ( | |
"fmt" | |
hcl "github.com/hashicorp/hcl/v2" | |
"github.com/hashicorp/hcl/v2/hclsimple" | |
//"github.com/zclconf/go-cty/cty" | |
) |
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 os | |
import signal | |
from threading import Thread | |
from subprocess import Popen, PIPE, TimeoutExpired | |
def kill_proc(proc): | |
try: | |
print("waiting...") | |
proc.wait(timeout=5) | |
except TimeoutExpired: |
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
2017-10-27T07:24:03.020Z HTTP: #2190: GET /babycare-auth/_local/85a8f08fa42b380e90d6306e3bb66ded9ab64fff | |
2017-10-27T07:24:03.020Z HTTP: #2190: --> 401 Login required (1.7 ms) | |
2017-10-27T07:24:03.022Z HTTP: #2191: GET /babycare-auth/_local/0033b6c2b8f1bb565e1556531e7fd5ffdfb3582a | |
2017-10-27T07:24:03.022Z HTTP: #2191: --> 401 Login required (0.6 ms) | |
2017-10-27T07:24:03.272Z HTTP: #2192: GET /babycare-auth/_user/13266487-63e4-4108-9199-76c1baee3d12 (ADMIN) | |
2017-10-27T07:24:03.273Z HTTP: #2192: --> 404 missing (1.5 ms) | |
2017-10-27T07:24:03.274Z HTTP: #2193: GET /babycare-auth/_user/13266487-63e4-4108-9199-76c1baee3d12 (ADMIN) | |
2017-10-27T07:24:03.274Z HTTP: #2193: --> 404 missing (0.4 ms) | |
2017-10-27T07:24:03.276Z HTTP: #2194: POST /babycare-auth/_user/ (ADMIN) | |
2017-10-27T07:24:03.277Z HTTP: #2195: POST /babycare-auth/_user/ (ADMIN) |
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 time | |
import RPi.GPIO as g | |
g.setmode(g.BOARD) | |
pins = [ | |
7, # cs | |
11, # wr - clock (rising edge) | |
12, # rs - data/command | |
15, # d1 |