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 machine import Pin, ADC | |
import machine | |
import network | |
import time | |
from api import send_humidity_values | |
######### constants | |
READ_DELAY = 60 # delay between readings every minute | |
WIFI_DELAY = 0.5 # delay between readings every minute |
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" | |
"strings" | |
) | |
type Node struct { | |
Children map[string]*Node | |
} |
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 ( | |
"regexp" | |
"strings" | |
"testing" | |
) | |
const ( | |
expected = "this-is-an-experiment" |
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
// npm i -D googleapis | |
// npm i -D js-base64 | |
/* | |
Create a oauth2 credential on https://console.developers.google.com/apis/credentials (or ask ur developers to create one) | |
Download the corresponding credentials.json file | |
The first time this file run it generates a token.json which contains the user information (sensitive). | |
*/ | |
// node gmail.js |
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 logging | |
import sys | |
import atexit | |
import traceback | |
from datetime import datetime | |
from locust.exception import InterruptTaskSet | |
import gevent |
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
const { remote } = require('webdriverio'); | |
(async () => { | |
const browser = await remote({ | |
logLevel: 'trace', capabilities: { browserName: 'chrome'} | |
}) | |
await browser.url('http://zzzscore.com/1to50/en/?ts=1592666149743') // navigate | |
result = await browser.execute(function(){ | |
for(i=1;i<26;i++){ |
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
""" | |
A script to crawl a single page using scrapy and report it to a csv file. | |
1) Install a virtual env | |
```bash | |
python3 -m venv venv | |
. venv/bin/activate | |
pip install scrapy | |
``` | |
2) Run the command with |
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
# InfluxDB + Grafana compose file. | |
# With data persistency | |
version: '3' | |
services: | |
influxdb: | |
image: influxdb:1.7 | |
container_name: influxdb | |
ports: | |
- "8086:8086" |