Skip to content

Instantly share code, notes, and snippets.

View veeenu's full-sized avatar

Andrea Venuta veeenu

View GitHub Profile
@veeenu
veeenu / index.html
Last active October 10, 2015 11:49
Particle System - I
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' href='style.css'/>
</head>
<body>
<script type='application/x-shader' id='vertex'>
attribute vec3 Position;
attribute float Size, Life;
@veeenu
veeenu / build.js
Created January 26, 2016 16:58
Minimal node.js parallel task runner
const exec = require('child_process').exec;
const conf = require('./package.json').buildjs || {};
const C0 = '\033[0m',
C1 = '\033[1;34m',
C2 = '\033[1;32m',
C3 = '\033[1;31m';
const runCmd = (function() {
@veeenu
veeenu / xorNeuralNetwork.m
Created July 22, 2016 16:11
Neural network learning XOR function
clear;
clc;
sigmoid = @(x) 1 ./ (1 + exp(-x));
tset = [
0, 0, 0 ; % 0 xor 0 = 0
0, 1, 1 ; % 0 xor 1 = 1
1, 0, 1 ; % 1 xor 0 = 1
1, 1, 0 % 1 xor 1 = 1
@veeenu
veeenu / FsWatcher.java
Created July 5, 2017 07:59
Simple Java file watcher
import java.io.*;
import java.nio.file.*;
import java.awt.event.*;
import java.util.*;
import java.util.function.*;
public class FsWatcher {
private Thread t;
private File file;
@veeenu
veeenu / gdax-watcher-console.py
Last active December 7, 2017 19:35
Watch GDAX BTC/EUR price and notify if above or below a threshold
import time
import requests
import win10toast
import threading
import datetime
from colorama import *
class GdaxWatcher:
def __init__(self, notifBelow, notifAbove):
self.toaster = win10toast.ToastNotifier()
@veeenu
veeenu / risen.asl
Created January 21, 2018 22:49
Risen LiveSplit IGT plugin
state("Risen") {
float igt : "Game.dll", 0x00FA63A0, 0x48, 0x24
}
init {
vars.igt = 0.0f;
}
startup {
}
import sys
import time
import tqdm
import cbpro
import pandas as pd
if __name__ == '__main__':
if len(sys.argv) < 3:
print(f'Usage: {sys.argv[0]} start_date end_date')
exit()
@veeenu
veeenu / csv_reader_test.py
Last active October 24, 2018 10:04
Pandas `read_csv` C engine exception
import pandas as pd
pd.read_csv('ok.csv', header=[0, 1], index_col=0)
pd.read_csv('not_ok.csv', header=[0, 1], index_col=0)
@veeenu
veeenu / iv_shadow.ipynb
Created July 24, 2019 12:47
Lucky trading shadow Pokémon
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@veeenu
veeenu / vtable_lookup.cpp
Created August 19, 2019 18:19
DXGI vtable lookup
LPVOID swapchain_present_vtable_lookup() {
// Credits: https://www.unknowncheats.me/forum/d3d-tutorials-and-source/88369-universal-d3d11-hook.html
D3D_FEATURE_LEVEL featureLevel = D3D_FEATURE_LEVEL_11_0;
ID3D11Device *pDevice = nullptr;
ID3D11DeviceContext *pContext = nullptr;
IDXGISwapChain* pSwapChain = nullptr;
DXGI_SWAP_CHAIN_DESC swapChainDesc;
ZeroMemory(&swapChainDesc, sizeof(swapChainDesc));
swapChainDesc.BufferCount = 1;