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 telethon import TelegramClient | |
from telethon.tl.functions.messages import GetHistoryRequest | |
from datetime import datetime, timedelta, timezone | |
import asyncio | |
# Replace with your own API_ID and API_HASH | |
API_ID = '****' | |
API_HASH = '****' | |
CHANNEL_USERNAME = '****' # Example: '@channel_name' |
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
// see this https://maxistar.ru/blog/%D0%90%D0%BD%D1%82%D1%80%D0%B5%D1%81%D0%BE%D0%BB%D1%8C%D0%BA%D0%B0/ | |
plate_thickness_16 = 1.6; | |
plate_thickness_19 = 1.9; | |
plate_minimal_width = 20; | |
// Hallway dimensions | |
hallway_width = 93; // cm |
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
/* | |
The TFT_eSPI library incorporates an Adafruit_GFX compatible | |
button handling class, this sketch is based on the Arduin-o-phone | |
example. | |
This example diplays a keypad where numbers can be entered and | |
send to the Serial Monitor window. | |
The sketch has been tested on the ESP8266 (which supports SPIFFS) |
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
// INA219 Current Sensor with OLED Display for Arduino Uno | |
// | |
// This sketch was modified from the Adafruit INA219 library example | |
// | |
// Gadget Reboot | |
// | |
// Required Libraries | |
// https://github.com/adafruit/Adafruit_INA219 | |
// https://github.com/adafruit/Adafruit_SSD1306 |
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 script to send data to RequesBin | |
http://maxistar.ru/blog/%D0%9F%D0%BE%D1%81%D1%8B%D0%BB%D0%B0%D0%B5%D0%BC-%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D0%B5-%D0%B2-%D0%BE%D0%B1%D0%BB%D0%B0%D0%BA%D0%BE/ | |
The original script was found at https://RandomNerdTutorials.com/esp32-sim800l-publish-data-to-cloud/ | |
Modified by Max Starikov | |
*/ | |
// Your GPRS credentials (leave empty, if not needed) |
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
#include <Wire.h> | |
#include <Adafruit_INA219.h> // You will need to download this library | |
Adafruit_INA219 sensor219; // Declare and instance of INA219 | |
void setup(void) | |
{ | |
Wire.begin(13, 15); //define which pins used for i2c | |
Serial.begin(9600); |
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
/** | |
* Returns of max profit for the given market values | |
* it there are not possible to compleat the deal it will return 0 | |
* | |
* @param $marketValues the array wit market values, should contain at least one value | |
* @return int | |
*/ | |
function getMaxProfit($marketValues) : int | |
{ | |
$minValue = $marketValues[array_keys($marketValues)[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
var UI = require('ui'); | |
// Make a list of menu items | |
var fruits = [ | |
{ | |
title: "Turn off", | |
subtitle: "home", | |
link: "http://192.168.1.101/shutdown.php" | |
}, | |
{ |
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
#define DEBOUNCE 10 // button debouncer, how many ms to debounce, 5+ ms is usually plenty | |
#define ANIMATION_STEP 10 | |
#define LONG_PRESS 2000 //how long to go into setup mode | |
// here is where we define the buttons that we'll use. button "1" is the first, button "6" is the 6th, etc | |
int light1_button = 14; | |
int light1_led = 6; | |
int light1_on = 0; | |
int light1_max = 255; | |
int light1_state = 0; //0 ready | |
int light1_step = 0; //step to go |
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
ffmpeg -i MVI_7870.MOV -vcodec mpeg4 -s 960x540 -b 1400K -acodec libmp3lame small/MVI_7870.mp4 |
NewerOlder