Skip to content

Instantly share code, notes, and snippets.

View fish2000's full-sized avatar
👉
My Python work is on the Mars helicopter, and ubiquitous on earth, and more!!!!

Alexander Böhn fish2000

👉
My Python work is on the Mars helicopter, and ubiquitous on earth, and more!!!!
  • Objects in Space and Time, LLC
  • Baltimore, MD
  • 14:10 (UTC -04:00)
  • X @fish2000
View GitHub Profile
@sobotka
sobotka / config.ocio
Last active November 21, 2018 04:14
VRay Config
# Filmlike Dynamic Range LUT configuration for
# Blender. Crafted by Troy James Sobotka with
# special thanks and feedback from Guillermo
# Espertino, Claudio Rocha, Bassam Kurdali, Eugenio
# Pignataro, Henri Hebeisen, Jason Clarke,
# Haarm-Peter Duiker, Thomas Mansencal, and Timothy
# Lottes.
ocio_profile_version: 1
@mooz
mooz / extract_slide.py
Last active October 5, 2023 16:00
Extract a slide image from a photo
# -*- coding: utf-8 -*-
# ============================================================ #
# 写真からスライド領域を切り出して保存。透視変換もおこなう
#
# Usage: python extract_slide.py YOUR_PHOTO
#
# ============================================================ #
import cv2
@ssfang
ssfang / TypeSignature.java
Last active April 17, 2025 20:42
Java VM Type Signatures
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
/**
* <h2>Type Signatures</h2><br/>
* The JNI uses the Java VM’s representation of type signatures. Table 3-2 shows
* these type signatures.
* <p/>
* Table 3-2 Java VM Type Signatures
*
@sorbits
sorbits / clang.mm
Created January 16, 2016 10:34
Extract most C/Cocoa symbols via libclang
#import <clang-c/Index.h>
#import <Foundation/Foundation.h>
#import <regex>
#import <stdio.h>
#import <map>
#import <string>
#import <set>
template <typename _InputIter>
std::string strings_to_regexp (_InputIter first, _InputIter last)
@VictorLaskin
VictorLaskin / NamedTuple.h
Last active April 14, 2023 18:56
Named tuple for C++
// Named tuple for C++
// Example code from http://vitiy.info/
// Written by Victor Laskin ([email protected])
// Parts of code were taken from: https://gist.github.com/Manu343726/081512c43814d098fe4b
namespace foonathan {
namespace string_id {
namespace detail
{
@graphitemaster
graphitemaster / WORKING_AROUND_OFFSETOF_LIMITATIONS.MD
Last active March 8, 2025 07:35
Working around offsetof limitations in C++

Working around offsetof limitations in C++:

There is sometimes a situation in which one needs to get the relative offset of a structure field, common examples of this include serialization frameworks which aid to serialize objects, vertex attributes for rendering (D3D, GL.), etc.

The most common technique for getting this information is through the offsetof macro defined in stddef.h. Unfortunately using the macro in C++ comes with a new set of restrictions that prevent some (subjectively valid) uses of it.

@vampjaz
vampjaz / findfiles.py
Last active December 19, 2017 07:39
Python files used to extract some data from iPhone backups
import sqlite3
import subprocess
import os
import pprint
import shutil
## required the directory 'data' to exist locally
## put in full file type to scan for (find it with typecount.py) and optional suffix to add
SCAN = 'gzip compressed data'
@justvanrossum
justvanrossum / circlewavegrid.py
Last active June 21, 2016 21:22
Create a wavy animaton with DrawBot
# Physics stolen from:
# http://giphy.com/gifs/wave-circle-point-13ePqdDflwat9e
def blobPos(pt, r, a):
x, y = pt
x += cos(a) * r
y += sin(a) * r
return (x, y)
def drawGrid(cells):
#include <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
function push() {
if [ -z "${1}" ]; then
echo "Usage: push <remote-name>"
return 1
fi;
GIT_DIR_="$(git rev-parse --git-dir)"
BRANCH="$(git rev-parse --symbolic --abbrev-ref $(git symbolic-ref HEAD))"