Skip to content

Instantly share code, notes, and snippets.

View micooke's full-sized avatar
💭
I may be slow to respond.

Mark Cooke micooke

💭
I may be slow to respond.
  • Adelaide, Australia
View GitHub Profile
@mysiar
mysiar / garmin-iq-sdk-ubuntu-18.04.md
Last active March 26, 2022 11:11
Garmin IQ SDK on Ubuntu 18.04
@innat
innat / FFmpeg | Basic Operation on Subtitles.md
Last active February 21, 2024 02:32
Remove hard subtitles from video file || Integrate subtitles into a video file || Generate .srt file from a video file.

Download FFmpeg for Windows

Steps

  • Download FFmpeg
  • Extract it and save it to C drive ( choose any location - it's optional )
  • Set environment variable - copy the location of bin folder which is inside the extracted file and set the location on system path variable.
  • Done!
#include <SPI.h>
#include <BLEPeripheral.h>
#include <nrf_sdm.h>
#include <nrf_soc.h>
#include <WInterrupts.h>
#define BAUDRATE 38400
#define BUTTON_PIN 29 // Active Low Button on my Board at this pin
@sathiyaseelan
sathiyaseelan / golang_setup.md
Last active April 1, 2024 18:51
Basics to setup a golang project repo in your local

Simple Guide to setup Golang in your Mac and clone a repo.

Setup Go and workspace

Type go in terminal, to verify the installation.

  • Create a Go workspace and set GO PATH
@f0k
f0k / cuda_check.py
Last active May 2, 2024 06:14
Simple python script to obtain CUDA device information
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Outputs some information on CUDA-enabled devices on your computer,
including current memory usage.
It's a port of https://gist.github.com/f0k/0d6431e3faa60bffc788f8b4daa029b1
from C to Python with ctypes, so it can run without compiling anything. Note
that this is a direct translation with no attempt to make the code Pythonic.
@mrocklin
mrocklin / serialize.py
Created March 16, 2015 05:30
Serialization benchmark
import pandas as pd
df = pd.DataFrame({'text': [str(i % 1000) for i in range(1000000)],
'numbers': range(1000000)})
import pickle
import cPickle
import json
from functools import partial
from time import time
@postspectacular
postspectacular / hsv2rgb.ino
Last active February 22, 2024 12:53
Super compact HSV/RGB conversions for Arduino/C
int redPin = 6;
int greenPin = 5;
int bluePin = 9;
float col[3];
float hue = 0.0;
void setup() {
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
@ExpandOcean
ExpandOcean / kivy_cv.py
Created January 7, 2015 06:48
kivy and opencv work together demo
# coding:utf-8
from kivy.app import App
from kivy.uix.image import Image
from kivy.clock import Clock
from kivy.graphics.texture import Texture
import cv2
class KivyCamera(Image):
def __init__(self, capture, fps, **kwargs):
@xhacker
xhacker / build-and-run-cpp-st3.md
Last active October 8, 2020 10:52
Build and run C++ file in Sublime Text 3

How to Install

  • Tools → Build System → New build system...
  • Paste the content below
{
    "cmd": ["g++ ${file} -o ${file_path}/${file_base_name} && echo 'Build Finished' && ${file_path}/${file_base_name}"],
    "shell" : true
}
  • Save as C++ Build and Run.sublime-build
@scls19fr
scls19fr / random_walk_pyqtgraph.py
Last active May 27, 2020 09:31
A random walk with PyQtGraph and a Numpy circular buffer / ring buffer
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This example demonstrates a random walk with pyqtgraph.
"""
from pyqtgraph.Qt import QtGui, QtCore
import numpy as np
import pyqtgraph as pg
import collections