Skip to content

Instantly share code, notes, and snippets.

@aXe1
aXe1 / Dockerfile
Created August 24, 2020 12:42
Voila docker example
FROM jupyter/scipy-notebook
RUN set -ex ; \
pip install voila voila-material
ADD https://github.com/voila-dashboards/voila/raw/master/notebooks/basics.ipynb /
EXPOSE 8866/tcp
CMD voila --template=material --theme=dark /basics.ipynb
@aXe1
aXe1 / keybase.md
Created March 11, 2020 08:18
Keybase proof

Keybase proof

I hereby claim: * I am axe1 on github. * I am maxim_sokolovsky (https://keybase.io/maxim_sokolovsky) on keybase. * I have a public key ASC1uQe-0HFApCbLFRBmqVm2pBTWndHpX7LV6FoeFOTAuAo To claim this, I am signing this object:

{   "body": {     "key": {       "eldest_kid": "0120b5b907bed07140a426cb151066a959b6a414d69dd1e95fb2d5e85a1e14e4c0b80a",       "host": "keybase.io",       "kid": "0120b5b907bed07140a426cb151066a959b6a414d69dd1e95fb2d5e85a1e14e4c0b80a",       "uid": "83ce1c0b5b4d9ef4e024012f06b9f619",       "username": "maxim_sokolovsky"     },     "merkle_root": {       "ctime": 1583914552,       "hash": "c237e9248b2826cfa091f8c35b4491e53a573ac3c2fe8c70c7084a274503e21103f9cfbb7d99eaa0ab8889a2f8890ac5f9370ebf9566f5e46deb0c5675a0bfdc",       "hash_meta": "a24da739136119c30c526597756cd464e3d724ef06375efbbc281cffeda96c11",       "seqno": 15275520     },     "service": {       "entropy": "ZGs1UEnuHF2jRvF/4+jTBj4M",       "name": "github",       "username": "axe1"     },     "
@aXe1
aXe1 / keeagent-autofocus.au3
Created June 17, 2019 09:37
Workaround for ensuring KeeAgent popups will always have focus
While 1
Local $hwnd = WinWait("KeePass", "has requested to use the SSH key")
WinActivate($hwnd)
WEnd
@aXe1
aXe1 / html_table_to_csv.js
Last active December 19, 2018 15:11
Save any HTML table by CSS selector as CSV file from browser console
function download_data(data, filename, filetype) {
var file = new Blob([data], {type: filetype});
var downloadLink = document.createElement("a");
downloadLink.download = filename;
downloadLink.href = window.URL.createObjectURL(file);
downloadLink.style.display = "none";
document.body.appendChild(downloadLink);
downloadLink.click();
@aXe1
aXe1 / total_money_spent.js
Created December 30, 2017 20:58
Steam data mining
// Total money spent on steam. Not so smart: it just summarize "Total" column on current page.
// 1. Open in browser:
// https://store.steampowered.com/account/history/
// 2. Open browser console:
// 1. Press `F12`
// 2. Choose `Console tab`
// 3. Paste the line below and press `Enter`.
console.log("Total spent: "+[...document.querySelectorAll(".wallet_table_row>.wht_total")].map(function(x){return parseFloat(x.textContent.trim().match(/^\S+/)[0].replace(",","."))}).reduce(function(a,b){return a+b}).toFixed(2));
@aXe1
aXe1 / gist:895501
Created March 30, 2011 23:15 — forked from Levik/gist:892154
Levik's lab4
#include <iostream>
#include <math.h>
#include <conio.h>
#include <time.h>
// settings
#define N 100
#define PRECISION 3
using namespace std;