Skip to content

Instantly share code, notes, and snippets.

Ivan Bessarabov bessarabov

Block or report user

Report or block bessarabov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:51346e8bfa0946b04451d3df3967a35a
# sample from https://www.home-assistant.io/integrations/rest/
sensor:
- platform: rest
name: OWM_report
json_attributes:
- main
- weather
value_template: '{{ value_json["weather"][0]["description"].title() }}'
resource: https://api.openweathermap.org/data/2.5/weather?zip=80302,us&APPID=VERYSECRETAPIKEY
View gist:cdfcf6119e7f762d99311fa98c25f274
perl -MJSON::PP -E 'foreach ("001".."031") {$c = `curl -s "https://perlweeklychallenge.org/chart/pwc-challenge-$_.json"`; $d = decode_json $c; say scalar @{$d->{series}->[0]->{data}}; }' | perl -nalE 'push @d, $_ }{ say sprintf "https://quickchart.io/chart?width=500&height=300&c={type:\"bar\",data:{labels:[%s],datasets:[{label:\"Perl Weekly Challenge users by week\",data:[%s]}]}}", join(",", 1..scalar(@d)), join(",", @d)'
@bessarabov
bessarabov / Dockerfile
Created Oct 28, 2019
Dockerfile for jupyter
View Dockerfile
FROM python:3.7.2
RUN pip install jupyter
RUN pip install pandas
RUN pip install matplotlib
RUN pip install seaborn
EXPOSE 8888
RUN mkdir /data_jupyter/
View gist:a5cffce3d8452450097716ea509cdf54
#include <DHT.h>
#include <ESP8266HTTPClient.h>
#include <ESP8266WiFi.h>
#define WIFI_NAME "my_wifi_name"
#define WIFI_PASSWORD "my_wifi_password"
#define SERVER_ENDPOINT "http://example.com/endpoint"
#define DELAY_SECONDS 30
View gist:49bad13db327fb76f18bc44263919403
#include <DHT.h>
#include <ESP8266HTTPClient.h>
#include <ESP8266WiFi.h>
#define WIFI_NAME "%wifi%"
#define WIFI_PASSWORD "%password%"
#define SERVER_ENDPOINT "http://site/api/dot"
#define DELAY_SECONDS 30
View obc-check-system.pl
#!/usr/bin/perl
use strict;
use warnings;
use feature qw(say);
use Hash::Util qw(lock_keys);
my %DISTRIBUTION_ID2SITE = (
Debian => 'https://www.debian.org',
View gist:fbfa71283ae08cd697603d62db744623
00 - 3 **
01 - 7 ****
02 - 3 **
03 - 0
04 - 0
05 - 0
06 - 0
07 - 16 **********
08 - 15 **********
09 - 65 ********************************************
View gist:4025b26049d7eb4eed0416b36d8afc98
00 - 17
01 - 13
02 - 14
03 - 13
04 - 27
05 - 114 **
06 - 248 ******
07 - 419 **********
08 - 976 ***********************
09 - 1680 *****************************************
View gist:34b240951c5b7813e0d20542b5f00e45
bessarabov@server:/tmp/linux$ git show|head -1; git log --author="Linus Torvalds" --format="%ae" | sort | uniq -c
commit fec88ab0af9706b2201e5daf377c5031c62d11f7
32 torvalds@evo.osdl.org
1522 torvalds@g5.osdl.org
24203 torvalds@linux-foundation.org
7 torvalds@macmini.osdl.org
2 torvalds@merom.osdl.org
8 torvalds@osdl.org
166 torvalds@ppc970.osdl.org
4 torvalds@ppc970.osdl.org.(none)
You can’t perform that action at this time.