Skip to content

Instantly share code, notes, and snippets.

View thehappycheese's full-sized avatar

thehappycheese

  • Western Australia
View GitHub Profile
@Amir22010
Amir22010 / convert_voc_to_yolo.md
Created February 22, 2020 22:01 — forked from myounus96/convert_voc_to_yolo.md
convert pascal voc dataset to yolo format

Convert PascalVOC Annotations to YOLO

This script reads PascalVOC xml files, and converts them to YOLO txt files.

Note: This script was written and tested on Ubuntu. YMMV on other OS's.

Disclaimer: This code is a modified version of Joseph Redmon's voc_label.py

Instructions:

  1. Place the convert_voc_to_yolo.py file into your data folder.
@actuino
actuino / bt_speaker-raspberry_pi-zero_w.md
Last active August 23, 2024 06:57
Setting up a Bluetooth Speaker from the command line on a raspberry Pi Zero W

The setup of a bluetooth speaker on a Pi Zero W is pretty touchy.

Please get in touch via Twitter @actuino or http://www.actuino.fr/ if you've got comments or improvements to this quick draft.

First checks

  • Use a solid power source
  • check the speaker works on another hardware (android phone f.i.)
  • make sure you've updated your Raspbian, install and run rpi-update just in case.
@erikbern
erikbern / use_pfx_with_requests.py
Last active October 24, 2024 12:26
How to use a .pfx file with Python requests – also works with .p12 files
import contextlib
import OpenSSL.crypto
import os
import requests
import ssl
import tempfile
@contextlib.contextmanager
def pfx_to_pem(pfx_path, pfx_password):
''' Decrypts the .pfx file to be used with requests. '''
@Fweeb
Fweeb / lockview.py
Last active May 14, 2024 03:29
Blender add-on for exposing the 3D View's rotation locking feature
# ***** BEGIN GPL LICENSE BLOCK *****
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@hhanh00
hhanh00 / reverse-ws-proxy.js
Created June 24, 2015 15:05
Reverse Proxy for websockets using Express JS
var http = require('http'),
httpProxy = require('http-proxy'),
express = require('express');
// create a server
var app = express();
var proxy = httpProxy.createProxyServer({ target: 'http://localhost:8080', ws: true });
var server = require('http').createServer(app);
// proxy HTTP GET / POST
@fwextensions
fwextensions / gist:5385276
Created April 15, 2013 02:28
PEG.js grammar for the data in SVG paths
svg_path
= wsp* data:moveTo_drawTo_commandGroups? wsp*
{
var result = [];
function flatten(a){
for (var i=0,l=a.length;i<l;++i){
var o=a[i];
if (o.constructor==Array) flatten(o);
else if (o && o!=" ") result.push(o);
}