Skip to content

Instantly share code, notes, and snippets.

View mukulkhanna's full-sized avatar

Mukul Khanna mukulkhanna

View GitHub Profile
@tylerlum
tylerlum / 00_0_Tyler_Lum_GSoC_2019.md
Last active September 24, 2023 09:33
Tyler Lum Google Summer of Code 2019 with Open Robotics

Google Summer of Code 2019 with Open Robotics

Author: Tyler Lum

Overview

This GitHub Gist outlines the open-source software work that I have done with Open Robotics through the Google Summer of Code program. This includes:

  • a high-level description of the work that I have done
@jtdaad
jtdaad / Ghost blog local template development setup.md
Last active June 30, 2020 15:57
Ghost blog templates local development setup

GHOST local development

ghost-blogs

For local development of templates for ghost blogs

getting setup the first time

  1. Use the Terminal to navigate to the directory you want to run your development in (I call mine "repos" and will use that name in these instructions)
  2. Create a directory in "repos" for your ghost templates, I recommend creating a Git repo for them
  3. Create a directory in "repos" called "ghost-server"
  4. run cd ghost-server
  5. run npm install ghost-cli@latest -g
@loilo
loilo / split-pull-requests.md
Last active November 14, 2024 13:38
Split a large pull request into two
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active February 20, 2025 02:47
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hi2p-perim
hi2p-perim / loadhdr.py
Created March 4, 2014 12:48
Load Radiance HDR file (.hdr) with python. Used : smc.freeimage, Pillow, OpenCV
import array
import smc.freeimage as fi
from PIL import Image
import numpy as np
import cv2
def gamma_correction(a, gamma):
return np.power(a, 1/gamma)
def load_hdr(file):
@edouardp
edouardp / radiance_writer.py
Created July 11, 2012 10:47
Numpy based writer for Radiance HDR files
# Assumes you have a np.array((height,width,3), dtype=float) as your HDR image
import numpy as np
f = open("xxx.hdr", "wb")
f.write("#?RADIANCE\n# Made with Python & Numpy\nFORMAT=32-bit_rle_rgbe\n\n")
f.write("-Y {0} +X {1}\n".format(image.shape[0], image.shape[1]))
brightest = np.maximum(np.maximum(image[...,0], image[...,1]), image[...,2])
mantissa = np.zeros_like(brightest)
@nicolas-grekas
nicolas-grekas / Dumper.php
Created July 7, 2011 16:58
Advanced error handling in PHP
<?php /****************** vi: set fenc=utf-8 ts=4 sw=4 et: *****************
*
* Copyright : (C) 2011 Nicolas Grekas. All rights reserved.
* Email : [email protected]
* License : http://www.gnu.org/licenses/lgpl.txt GNU/LGPL
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.