Skip to content

Instantly share code, notes, and snippets.

View sunsided's full-sized avatar
🇺🇦
#StandWithUkraine

Markus Mayer sunsided

🇺🇦
#StandWithUkraine
View GitHub Profile
@r1pper
r1pper / FastLog
Last active October 31, 2023 15:34
Fast float Logarithm in C# using lookup Table
using System;
using System.Runtime.InteropServices;
namespace Test2
{
public static class FastLog
{
[StructLayout(LayoutKind.Explicit)]
private struct Ieee754
{
@davidfowl
davidfowl / dotnetlayout.md
Last active April 14, 2025 07:13
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@jakevdp
jakevdp / CategoricalCMAP.ipynb
Last active February 14, 2024 18:00
Example of a categorical color map in matplotlib
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wdullaer
wdullaer / install.sh
Last active April 3, 2025 19:08
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active April 19, 2025 04:59
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);
@richardkundl
richardkundl / BloomFilter.cs
Created January 7, 2014 14:29
Bloom filter implementation in c#.
namespace BloomFilter
{
using System;
using System.Collections;
/// <summary>
/// Bloom filter.
/// </summary>
/// <typeparam name="T">Item type </typeparam>
public class Filter<T>
@noctarius
noctarius / gist:7784770
Created December 4, 2013 09:29
Hazelcast MapReduce Avg Example
package com.hazelcast.mapred.test;
import com.hazelcast.core.CompletableFuture;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.IMap;
import com.hazelcast.mapred.*;
import java.util.List;
import java.util.Map;
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active March 21, 2025 15:01
Backend Architectures Keywords and References
@hideo55
hideo55 / FindSSE.cmake
Created May 24, 2013 11:35
CMake module that detect SSE support
# Check if SSE instructions are available on the machine where
# the project is compiled.
MACRO (FindSSE)
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
EXEC_PROGRAM(cat ARGS "/proc/cpuinfo" OUTPUT_VARIABLE CPUINFO)
STRING(REGEX REPLACE "^.*(sse2).*$" "¥¥1" SSE_THERE ${CPUINFO})
STRING(COMPARE EQUAL "sse2" "${SSE_THERE}" SSE2_TRUE)
@darkiri
darkiri / MigratableObject.cs
Created April 30, 2013 06:44
Some ideas for MongoDB schema migrations using ISupportInitialize (based on https://github.com/darkiri/mongo-csharp-migrations)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Linq.Expressions;
namespace MongoDB.Migrations
{
public class MigratableObject : ISupportInitialize
{