Skip to content

Instantly share code, notes, and snippets.

@vladignatyev
vladignatyev / privacy.md
Created February 4, 2020 16:36
2020 Squares Puzzle: Privacy Policy

Words in short...

We take your privacy and your rights seriously.

We believe the best, while having a lawful document that describe rules we follow. In short, our apps may collect some of your personal data, but mostly technical data (ad IDs, analytics IDs) that can not be associated with you personally. You can easily remove such data from your phone by removing our apps. We don't associate this data with your personality.

Our apps may collect such information on behalf of the following third-parties:

  • Google Analytics
  • Google Firebase
@vladignatyev
vladignatyev / power_set.py
Created February 29, 2020 18:18
Combinatorics: Pure Python Power Set algorithm implementation. Generator returns power set elements (permutation), in ascending order from smaller to bigger subsets.
'''
Use `python -m doctest power_set.py` for tests.
Usage:
>>> ps = power_set([1,2,3])
>>> for ss in ps:
print(ss)
Output:
[],
[1],
@vladignatyev
vladignatyev / powerset.js
Created February 29, 2020 19:28
Combinatorics: Good Power Set implementation in ECMAScript
function *powerSet(sourceSet) {
function product(ones, sourceSet) {
let l = ones.length;
let out = new Array(l);
for (var i = 0; i < l; i++) {
out[i] = sourceSet[ones[i]]
}
return out;
}
@vladignatyev
vladignatyev / pass.py
Created March 29, 2020 08:10
Python script to generate secure passwords
L = 12; import os; voc = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()'; print(''.join([voc[int.from_bytes(os.urandom(1), "big") % len(voc)] for i in range(L)]))
@vladignatyev
vladignatyev / testdevice.js
Created May 27, 2018 13:51
Get hardware data from Browser to implement vendor and hardware lock like Google and other shit companies do
console.log("CPU/OS: " + navigator.oscpu);
console.log("Cores count: " + navigator.hardwareConcurrency);
console.log("RAM: " + navigator.deviceMemory);
console.log("Plaform: " + navigator.platform);
console.log("Browser info: " + navigator.userAgent);
console.log("Browser info: " + navigator.product + " " + navigator.productSub);
console.log("Browser info: " + navigator.appCodeName);
console.log("Browser info: " + navigator.appName);
console.log("Browser info: " + navigator.appVersion);
console.log("Vendor: " + navigator.vendor + " " + navigator.vendorSub);
@vladignatyev
vladignatyev / woof.js
Created December 15, 2019 21:15
TIC-80: Playing with peek/poke DMA, sound and graphics. UI with mouse-draggable handles!
// title: Pixel Woof
// author: Vladimir Ignatev
// desc: Music Toy
// script: js
var t=0
var x=96
var y=24
var waves = [];
@vladignatyev
vladignatyev / nasdaq_100_components.csv
Created August 27, 2021 14:28
NASDAQ 100 Components
Ticker Weight
AAPL 11.17
MSFT 10.22
AMZN 7.587
GOOG 4.173
FB 3.961
GOOGL 3.86
NVDA 3.797
TSLA 3.792
PYPL 2.219
@vladignatyev
vladignatyev / ALRS_010101_210826.csv
Last active August 29, 2021 14:35
ALRS: Alrosa OHLC data
Date Open High Low Close Volume
2011-11-29 00:00:00 35.0000000 40.6090000 35.0000000 40.6090000 19100
2011-11-30 00:00:00 48.3200000 54.6000000 42.0000000 54.6000000 76800
2011-12-01 00:00:00 67.0000000 76.4400000 65.5500000 76.4400000 11800
2011-12-02 00:00:00 100.1000000 107.0160000 45.8640000 45.8640000 1898500
2011-12-05 00:00:00 37.5500000 41.9850000 36.7000000 37.1000000 1547100
2011-12-06 00:00:00 37.0000000 37.1000000 34.7500000 34.8000000 831100
2011-12-07 00:00:00 34.7010000 36.0000000 34.5010000 35.3000000 467700
2011-12-08 00:00:00 35.3000000 35.3000000 34.7500000 34.8210000 181100
2011-12-09 00:00:00 34.9990000 35.2400000 34.2000000 34.3900000 631700
Date Open High Low Close Volume
2005-06-22 00:00:00 220.0000000 220.0000000 217.0000000 219.0000000 6400
2005-06-23 00:00:00 219.0000000 230.0000000 219.0000000 223.0000000 4300
2005-06-24 00:00:00 225.0000000 227.0000000 216.0000000 216.0000000 1800
2005-06-27 00:00:00 213.5000000 213.5000000 211.0000000 211.0000000 600
2005-06-28 00:00:00 214.0000000 216.0000000 208.0000000 208.0000000 4300
2005-06-29 00:00:00 207.0100000 210.0000000 207.0000000 209.0000000 1600
2005-06-30 00:00:00 209.2000000 217.4000000 208.0000000 208.0000000 600
2005-07-01 00:00:00 208.0000000 210.0000000 207.0000000 210.0000000 14800
2005-07-04 00:00:00 215.9000000 217.0000000 211.0100000 212.0000000 13200
Date Open High Low Close Volume
2006-01-23 00:00:00 239.0000000 239.0000000 218.4900000 218.8900000 5078252
2006-01-24 00:00:00 220.5000000 224.6800000 219.6600000 224.0000000 8971078
2006-01-25 00:00:00 225.2000000 231.0000000 225.0000000 228.3800000 15467697
2006-01-26 00:00:00 228.9000000 229.4100000 223.5100000 224.4700000 7585458
2006-01-27 00:00:00 226.2000000 231.5000000 224.0000000 228.7500000 12719299
2006-01-30 00:00:00 231.0700000 231.0700000 215.0000000 216.0000000 17240278
2006-01-31 00:00:00 218.0000000 224.2300000 215.7100000 219.0200000 11733963
2006-02-01 00:00:00 219.5000000 223.9900000 215.0000000 223.9900000 8547010
2006-02-02 00:00:00 223.9000000 224.5000000 220.0000000 221.5000000 5405728