Skip to content

Instantly share code, notes, and snippets.

View nnarain's full-sized avatar
🚀
Heya!

Natesh Narain nnarain

🚀
Heya!
View GitHub Profile
// The MIT License (MIT)
//
// Copyright (c) 2012-2013 Mikola Lysenko
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@nnarain
nnarain / OpenSimplexNoise.cs
Created December 29, 2017 04:22 — forked from digitalshadow/OpenSimplexNoise.cs
OpenSimplex Noise Refactored for C#
/* OpenSimplex Noise in C#
* Ported from https://gist.github.com/KdotJPG/b1270127455a94ac5d19
* and heavily refactored to improve performance. */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace NoiseTest
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6 python3.6-dev
wget -O - https://bootstrap.pypa.io/get-pip.py | sudo python3.6
@nnarain
nnarain / pathfinding.cpp
Created February 25, 2017 06:31
OpenCV Triangulation
#include <iostream>
#include <string>
#include <vector>
#include <array>
#include <list>
#include <cmath>
#include <opencv2/opencv.hpp>
@nnarain
nnarain / version-config.cmake
Last active October 15, 2016 16:26
Generate project metadata using cmake
# Generate version.h using data from git repository
#
# @author Natesh Narain
# @date Oct 15 2016
#
find_package(Git)
function(generate_version_info)
@nnarain
nnarain / gitcheatsheet.md
Last active October 15, 2016 18:07
Git cheatsheet

Git Cheat Sheet

Getting a remote branch without merging

git fetch origin my-branch

Aliasing Commands

@nnarain
nnarain / gitbump.py
Last active July 12, 2016 15:31
git bump script
#
# Script to bump version number in a git repo
#
# @author Natesh Narain <[email protected]>
#
import subprocess
from argparse import ArgumentParser
import os
@nnarain
nnarain / geneticalgorithm1.py
Last active July 9, 2016 23:00
Implementation of genetic algorithm to solve problem presented here: http://www.ai-junkie.com/ga/intro/gat3.html
#
# Genetic algorithm example from http://www.ai-junkie.com/ga/intro/gat1.html
#
# @author Natesh Narain
# @date July 9 2016
# Rule are encoded in the genes
# Long string of genes make up chromosomes
# Solution must have a way of being encoded into a chromosome