Skip to content

Instantly share code, notes, and snippets.

Avatar
🪀

Nick Paul nick-paul

🪀
View GitHub Profile
@xeecos
xeecos / rgbled.py
Created June 15, 2021 10:23
RGB led
View rgbled.py
###USAGE###
# pip3 install makeblock --upgrade
###########
from time import sleep
from random import random
import math
from makeblock import MegaPi,SerialPort
A6 = 60
A7 = 61
A8 = 62
@anujonthemove
anujonthemove / birds-eye-view.cpp
Created August 14, 2016 09:47
Bird's eye view perspective transformation using OpenCV
View birds-eye-view.cpp
// OpenCV imports
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
// C++ imports
#include <iostream>
// namespaces
using namespace std;
using namespace cv;
@Luthaf
Luthaf / build.jl
Last active January 3, 2023 01:21
Using pip to install python dependencies for Julia.
View build.jl
using PyCall
# Change that to whatever packages you need.
const PACKAGES = ["pyyaml"]
# Import pip
try
@pyimport pip
catch
# If it is not found, install it
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
View uri.js
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"