Skip to content

Instantly share code, notes, and snippets.

View kalle78's full-sized avatar

Kalle kalle78

  • RepairPal
  • San Francisco
View GitHub Profile
@pknowledge
pknowledge / opencv_python_object_detection.py
Created March 31, 2019 22:48
OpenCV Python Tutorial For Beginners - Object Detection and Object Tracking Using HSV Color Space
import cv2
import numpy as np
def nothing(x):
pass
cv2.namedWindow("Tracking")
cv2.createTrackbar("LH", "Tracking", 0, 255, nothing)
cv2.createTrackbar("LS", "Tracking", 0, 255, nothing)
cv2.createTrackbar("LV", "Tracking", 0, 255, nothing)
@ivanvermeyen
ivanvermeyen / HOWTO.md
Last active June 8, 2025 14:55
Multiple MySQL versions on MacOS with Homebrew

Update - 4 september 2020

Making multiple MySQL versions work with Homebrew was tricky to say the least. Fortunately there are 2 new easy ways that I learned of to achieve this.

DBngin app

As @4unkur and @henrytirla commented below, there is this extremely easy to use app called DBngin, which lets you setup multiple databases (not only MySQL) simultaneously using different ports:

https://dbngin.com/

@blfpd
blfpd / django-docs-dark.css
Last active February 2, 2022 20:47
Dark theme for Django framework website djangoproject.com
@-moz-document domain("djangoproject.com") {
/* Fork or comment on: https://gist.github.com/batisteo/4f4c1552ba18ffa51a4b8bfb527c9673 */
/* License: http://www.wtfpl.net/txt/copying */
body,
[role="main"],
.mdzr-boxshadow.container.sidebar-right {
background: #222 !important;
}
@vsefer
vsefer / ws2812-arduino-serial.ino
Created August 21, 2017 23:32
Control WS2812 RGB strip with Arduino via serial port and change the color of the whole strip at the same time.
#include <Adafruit_NeoPixel.h>
// Which pin on the Arduino is connected to the NeoPixels?
#define PIN 6
// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 30
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
@francoisromain
francoisromain / project-create.sh
Last active June 14, 2024 09:55
A bash script to create a Git post-receive hook to deploy after a Git push
#!/bin/bash
# source: https://gist.github.com/francoisromain/58cabf43c2977e48ef0804848dee46c3
# and another script to delete the directories created by this script
# project-delete.sh: https://gist.github.com/francoisromain/e28069c18ebe8f3244f8e4bf2af6b2cb
# Call this file with `bash ./project-create.sh project-name`
# - project-name is mandatory
# This will creates 4 directories and a git `post-receive` hook.
@ronrest
ronrest / kitti_lidar.py
Last active February 26, 2025 01:37
Visualize Lidar Data in Kitti Data
"""
VISUALISE THE LIDAR DATA FROM THE KITTI DATASET
Based on the sample code from
https://github.com/utiasSTARS/pykitti/blob/master/demos/demo_raw.py
And:
http://stackoverflow.com/a/37863912
Contains two methods of visualizing lidar data interactively.
- Matplotlib - very slow, and likely to crash, so only 1 out of every 100
@geoffreydhuyvetters
geoffreydhuyvetters / react_fiber.md
Last active August 15, 2024 15:17
What is React Fiber? And how can I try it out today?
@simonrw
simonrw / python_pymysql_notes.md
Created September 18, 2015 19:01
Notes about pymysql connections

Database transactions

pymysql

  • Defaults to autocommit=False
connection = pymysql.connect(user='user', db='test')
cursor = connection.cursor()
cursor.execute('insert into test (value) values (10)')