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
import { saveAs } from 'file-saver' | |
const base64Data = '' | |
const imgBuff = Buffer.from(base64Data.replace(/^data:image\/\w+;base64,/, ''), 'base64') | |
const blob = new Blob([new Uint8Array(imgBuff).buffer]) | |
saveAs(blob) |
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
const child = require('child_process') | |
const { cpus } = require('os') | |
const transform = require('stream-transform') | |
class Pool { | |
constructor (file, maxPool, done) { | |
this.pool = [] | |
this.active = [] | |
this.waiting = [] | |
this.maxPool = maxPool |
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
const { join } = require('path') | |
const { writeFile, unlink } = require('fs') | |
const functions = [ | |
{ p: join(__dirname, 'handlers', 'user', 'confirm', 'index.js'), o: join(__dirname, 'build', 'userConfirm.js') }, | |
{ p: join(__dirname, 'handlers', 'user', 'delete', 'index.js'), o: join(__dirname, 'build', 'userDelete.js') }, | |
{ p: join(__dirname, 'handlers', 'user', 'edit', 'index.js'), o: join(__dirname, 'build', 'userEdit.js') }, | |
{ p: join(__dirname, 'handlers', 'user', 'get', 'index.js'), o: join(__dirname, 'build', 'userGet.js') }, | |
{ p: join(__dirname, 'handlers', 'user', 'signin', 'index.js'), o: join(__dirname, 'build', 'signin.js') }, | |
{ p: join(__dirname, 'handlers', 'user', 'signup', 'index.js'), o: join(__dirname, 'build', 'signup.js') }, |
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
Industry | Number | % of total | |
---|---|---|---|
Finance and Investments | 310 | 14% | |
Fashion and Retail | 235 | 11% | |
Real Estate | 220 | 10% | |
Manufacturing | 207 | 9% | |
Technology | 205 | 9% | |
Diversified | 194 | 9% | |
Food and Beverage | 165 | 7% | |
Healthcare | 134 | 6% | |
Energy | 94 | 4% |
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
""" | |
This idea first used for bitcoin. Data file format is MT4's. | |
Similar strategy(-ies) is used by market makers. | |
It's definitely betetr than any moving average based strategy. | |
ETH donations accepted: 0x007F11363140F2edE5f6d4F1a19A352861e013e0 | |
""" | |
from os.path import join | |
from pandas import read_csv, to_datetime, DataFrame, read_pickle |
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
""" | |
Recycle bin sniffer for Windows. | |
Tested on Python 3.6, Windows 8.1. | |
""" | |
from os import listdir | |
from os.path import isdir | |
import optparse | |
from winreg import (OpenKey, QueryValueEx) | |
from shutil import move |
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
from os.path import dirname, join | |
from numpy import where, shape | |
from pandas import read_csv | |
from sklearn.metrics import accuracy_score | |
from sklearn.cluster import DBSCAN, MiniBatchKMeans, SpectralClustering, KMeans | |
from sklearn.decomposition import FastICA, PCA, NMF | |
from sklearn.linear_model import LogisticRegression, RidgeClassifier | |
from sklearn.ensemble import GradientBoostingClassifier, BaggingClassifier, RandomForestClassifier, VotingClassifier, AdaBoostClassifier | |
from sklearn.preprocessing import PolynomialFeatures, scale |