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 requests | |
import sys | |
import os | |
import datetime | |
import shutil | |
hours = ('09', '10', '11', '12', '13', '14', '15', '16', '17', '18') | |
days = ('6', '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
#!/usr/bin/env python | |
import RPi.GPIO as GPIO | |
from time import sleep | |
pir_sensor = 18 | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(pir_sensor, GPIO.IN) |
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 Adafruit_DHT | |
import psycopg2 | |
from time import strftime | |
DHT_MODEL = 11 | |
GPIO = 4 | |
humidity, temperature = Adafruit_DHT.read_retry(DHT_MODEL, GPIO) |
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 RPi.GPIO as GPIO | |
import sys | |
PIN = 4 | |
GPIO.setwarnings(False) | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(PIN, GPIO.OUT) |
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 | |
from time import strftime, sleep | |
import RPi.GPIO as GPIO | |
pwm_pin = 18 | |
GPIO.setwarnings(False) | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(pwm_pin, GPIO.OUT) |
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 ruby | |
require 'dht-sensor-ffi' | |
require 'rpi_gpio' | |
PIN = 7 | |
DHT_MODEL = 11 # 11 or 22 | |
RPi::GPIO.set_numbering :board | |
RPi::GPIO.set_warnings(false) |
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 RPi.GPIO as GPIO | |
from time import sleep, time | |
BEEP_PIN = 16 | |
TRIG_X = 18 | |
ECHO_X = 22 | |
TRIG_Y = 17 |
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
#!/bin/bash | |
DAY=`date +%Y-%m-%d` | |
DIR=/home/zabbix/backup/Zabbix_$DAY | |
set_date() | |
{ | |
DT=`date "+%y-%m-%d %H:%M:%S"` | |
} |
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 | |
# -*- coding: utf-8 -*- | |
import Adafruit_CharLCD as LCD | |
import psycopg2 | |
from pyowm import OWM | |
from time import sleep | |
# В ПОМЕЩЕНИИ | |
msg_in_room = ('\x42 \xA8\x4F\x4D\x45\xE2\x45\x48\xA5\xA5') |
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 python3 | |
# -*- coding: utf-8 -*- | |
from requests import get | |
from sys import argv | |
ip = argv[1] | |
r = get('https://ip.pentestit.ru/json.php?ip=' + ip) | |
data = r.json() |
OlderNewer