Skip to content

Instantly share code, notes, and snippets.

Focusing on 1%

Andrew Katasonov akatasonov

Focusing on 1%
Block or report user

Report or block akatasonov

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
import os
import pandas as pd
from sklearn.model_selection import train_test_split, StratifiedKFold
from sklearn.metrics import classification_report, confusion_matrix, log_loss, accuracy_score, roc_auc_score
import numpy as np
from catboost import CatBoostClassifier, Pool, cv
from datetime import date, timedelta
#import shap
import matplotlib.pyplot as pl
#from imblearn.over_sampling import SMOTENC
akatasonov /
Created Oct 1, 2019
Sentinel 2A/2B band extraction and cropping using rasterio
import os
import glob
import pyproj
import shapely
import shapely.geometry
import shapely.ops
import fiona
import rasterio
import rasterio.mask
import rasterio.merge
akatasonov / config.json
Created Jul 22, 2019 — forked from lmakarov/config.json
microk8s crypto mining exploit
View config.json
"algo": "cryptonight",
"api": {
"port": 0,
"access-token": null,
"id": null,
"worker-id": null,
"ipv6": false,
"restricted": true
View gist:138d8056cc0f6d854160c4a7d5254859
Pool finds block 4300 -
Secondary scale = 529
Pool accepts minimum difficulty shares for pow each size
scale = factor = Scaling difficulty =
for primary pow (cuckatooN solution) where N>=31 = 2^(1+EDGEBITS-24)*N
for secondary pow - (cuckatoo29 solution) = variable, retargeted every block, stored as header field "secondary_scaling"
Example: Three workers contributed shares:
akatasonov /
Created Jan 19, 2019 — forked from zmts/
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication


В данной заметке рассматривается работа JWT с симметичным алгоритмом шифрования (HS256/HS384/HS512)


Аутентификация(authentication, от греч. αὐθεντικός [authentikos] – реальный, подлинный; от αὐθέντης [authentes] – автор) - это процесс проверки учётных данных пользователя (логин/пароль). Проверка подлинности пользователя путём сравнения введённого им логина/пароля с данными сохранёнными в базе данных.

Авторизация(authorization — разрешение, уполномочивание) - это проверка прав пользователя на доступ к определенным ресурсам.

akatasonov / hyper.js
Created Mar 5, 2018 — forked from TimothyCole/hyper.js
My Hyper Term config - w/ One Dark theme
View hyper.js
module.exports = {
config: {
fontSize: 13,
fontFamily: '"Fira Code", Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace, "Droid Sans Mono for Powerline"',
cursorColor: 'rgba(33, 150, 243, 0.75)',
cursorShape: 'BLOCK',
foregroundColor: '#abb2bf',
backgroundColor: '#202731',
borderColor: '#1C222B',
css: `body {
akatasonov / gist:81ddc527106ad8d5649f9f90fd0ec9c9
Created Dec 1, 2017 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
View gist:81ddc527106ad8d5649f9f90fd0ec9c9
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
akatasonov / AndroidManifest.xml
Last active Sep 24, 2015
Example of implementation of Google Cloud Messaging for Android
View AndroidManifest.xml
<uses-permission android:name="" />
android:protectionLevel="signature" />
<uses-permission android:name="com.katasonov.everporter.permission.C2D_MESSAGE" />
You can’t perform that action at this time.