Skip to content

Instantly share code, notes, and snippets.

View regexident's full-sized avatar

Vincent Esche regexident

View GitHub Profile
@fredo-dedup
fredo-dedup / wifi-field
Last active January 27, 2022 16:19
Calculating WIFI propagation with IJulia
{
"metadata": {
"language": "Julia",
"name": "WIFI simulation"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@cmdelatorre
cmdelatorre / id3.py
Last active February 22, 2018 16:03
Desicion tree classifier (ID3) algortihm
"""
http://en.wikipedia.org/wiki/ID3_algorithm
http://www.cise.ufl.edu/~ddd/cap6635/Fall-97/Short-papers/2.htm
"""
from collections import namedtuple, Counter, defaultdict
from math import log2
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active June 8, 2024 06:11
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
// Playground - noun: a place where people can play
import Cocoa
struct Regex {
let pattern: String
let expressionOptions: NSRegularExpressionOptions
let matchingOptions: NSMatchingOptions
init(pattern: String, expressionOptions: NSRegularExpressionOptions, matchingOptions: NSMatchingOptions) {

Or what the hell do #![no_start], #![no_main], #[lang = "start"], #[start], and #[main] do?

Crate Attributes:

#![no_start]

Disable automatically linking in the native crate and thus the default start lang item.

Which means you'll probably need one of: #![no_main], #![lang = “start”] or #[start] instead

@anikalindtner
anikalindtner / gist:9524950
Last active March 1, 2023 11:52
Workshops/Mailinglists/Lists
@chrismiles
chrismiles / reveal.py
Last active September 2, 2021 00:26
Lazy script to wrap Reveal lib load/start commands in one LLDB command.
""" File: reveal.py
Add to ~/.lldbinit:
command script import ~/.lldb-scripts/reveal.py
Q: Want to automatically load the Reveal lib on launch while debugging from Xcode?
A: In Xcode:
Add a Symbolic Breakpoint
Symbol: "UIApplicationMain"
Action: Debugger Command with value "reveal"
@odrobnik
odrobnik / gist:5405993
Created April 17, 2013 17:01
highlight string inside attributed string
- (NSAttributedString *)attributedStringWithString:(NSString *)string highlightedwithOccurencesOfString:(NSString *)stringToHighlight inColor:(DTColor *)color
{
// build an attributed string to start with
// font
DTCoreTextFontDescriptor *fontDesc = [[DTCoreTextFontDescriptor alloc] init];
fontDesc.fontFamily = @"Helvetica";
fontDesc.pointSize = 20;
// paragraph style
@pbailis
pbailis / list.md
Last active April 15, 2018 08:54
Quick and dirty (incomplete) list of interesting, mostly recent data warehousing/"big data" papers

A friend asked me for a few pointers to interesting, mostly recent papers on data warehousing and "big data" database systems, with an eye towards real-world deployments. I figured I'd share the list. It's biased and rather incomplete but maybe of interest to someone. While many are obvious choices (I've omitted several, like MapReduce), I think there are a few underappreciated gems.

###Dataflow Engines:

Dryad--general-purpose distributed parallel dataflow engine
http://research.microsoft.com/en-us/projects/dryad/eurosys07.pdf

Spark--in memory dataflow
http://www.cs.berkeley.edu/~matei/papers/2012/nsdi_spark.pdf

// Created by Alex Gordon on 11/02/2013.
#import <Foundation/Foundation.h>
#pragma mark Objects
static BOOL respondsTo(id x, SEL s) {
if (!x || !s)
return NO;
return [x respondsToSelector:s];