This file contains hidden or 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
// Homespan firmware for ESP32 rgb led strip of NEOPIXEL/WS2812B | |
#if defined(CONFIG_IDF_TARGET_ESP32) | |
#define NEOPIXEL_RGB_PIN 32 | |
#endif | |
#include "HomeSpan.h" | |
#include "extras/Pixel.h" // include the HomeSpan Pixel class | |
/////////////////////////////// |
This file contains hidden or 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
# Print with colors exmaple | |
class color: | |
HEADER = '\033[95m' | |
OKBLUE = '\033[94m' | |
OKCYAN = '\033[96m' | |
OKGREEN = '\033[92m' | |
WARNING = '\033[93m' | |
FAIL = '\033[91m' | |
ENDC = '\033[0m' |
This file contains hidden or 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
.es( | |
index=name_of_index, | |
timefield='name_of_timefield', | |
metric='avg:name_of_metric' | |
).yaxis( | |
label="Y-Axis_label", | |
min=75, | |
max=85 | |
).title("Title of average metric vs. Time"), | |
.es( |
This file contains hidden or 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
ffmpeg -f mp3 -i https://22203.live.streamtheworld.com/WNPRFM.mp3 -acodec pcm_s16le -ar 8000 -ac 1 -f wav npr.wav |
This file contains hidden or 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 requests | |
import json | |
url = "https://outlook.office.com/webhook/<webhookuuid>/IncomingWebhook/<webhookuuid>" | |
payload = json.dumps( | |
{"text":"Hello world!"} | |
) | |
headers = {'Content-Type': 'application/json'} |
This file contains hidden or 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 time | |
import re | |
from bs4 import BeautifulSoup | |
import csv | |
from prettytable import PrettyTable | |
import threading | |
import queue | |
run = True |
This file contains hidden or 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 math | |
def pi_chudnovsky(one=1000000): | |
""" | |
Calculate pi using Chudnovsky's series | |
This calculates it in fixed point, using the value for one passed in | |
""" | |
k = 1 | |
a_k = one |
This file contains hidden or 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
declare -a ACTIONS=( | |
"createIncomingHook" | |
"getIncomingHooks" | |
"deleteIncomingHook" | |
"updateIncomingHook" | |
"createOutgoingHook" | |
"getOutgoingHooks" | |
"deleteOutgoingHook" | |
"updateOutgoingHook" | |
"getCommands" |
This file contains hidden or 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
#!/bin/bash | |
ffmpeg -f x11grab -framerate 30 -video_size 1680x1050 -i :1.0 -vcodec libx264 -pix_fmt yuv420p -threads 0 -vf "scale=1280:720" output.mp4 |
This file contains hidden or 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
stages: | |
- build | |
python3:win64: | |
stage: build | |
tags: ["windows", "64bit", "python3"] | |
script: | |
- py -3-64 -V -V | |
- py -3-64 setup.py bdist_wheel | |
artifacts: |