Skip to content

Instantly share code, notes, and snippets.

@eadmaster
eadmaster / pythonic.hpp
Created September 11, 2023 13:17
python stdlib ported to cpp
/* usage examples:
*
#include <bits/stdc++.h>
using namespace std;
#include "pythonic.hpp"
auto x = 4;
auto y = 3.37;
@eadmaster
eadmaster / ftpfind.py
Last active January 21, 2020 14:33 — forked from flibbertigibbet/recurse_ftp.py
Recursively fetch files from an FTP server directory. Here, it's downloading all the zip files found in or beneath the parent directory.
#!/usr/bin/env python
# code derived from https://gist.githubusercontent.com/flibbertigibbet/8165881/raw/7f580b6735ad1f03c6e6060cd1c8571048afad6a/recurse_ftp.py
from ftplib import FTP
from time import sleep
import os
import sys
my_dirs = [] # global
void main_vertex( float4 position : POSITION,
out float4 oPosition : POSITION,
float2 texCoord : TEXCOORD0,
out float2 oTexCoord : TEXCOORD0,
uniform float4x4 modelViewProj )
{
oPosition = mul(modelViewProj, position);
oTexCoord = texCoord;
}
@eadmaster
eadmaster / Motionblur.cg
Created November 18, 2012 23:29
Motionblur shader
/* derived from https://github.com/libretro/common-shaders/blob/master/Motionblur/Motionblur-blue.cg
to increase the effect, uncomment more PREVX lines in each color channel
*/
struct previous
{
uniform sampler2D texture;
float2 tex_coord;
};