Skip to content

Instantly share code, notes, and snippets.

View kashifulhaque's full-sized avatar
🤞
Infinite Void

Kashif kashifulhaque

🤞
Infinite Void
View GitHub Profile
@kirel
kirel / draft.markdown
Created July 19, 2009 12:01
Detexify explained

Preface

This is an overview over the inner workings of Detexify. Extended knowlege in pattern recognition or machine learning is not necessary as I will explain some basics but understanding of linear algebra will definitely help. I have to note that I am not an expert, either. I more or less stumbled into this because of this project. Experts in this field may safely skip the first section.

What's the problem?

@jboner
jboner / latency.txt
Last active July 4, 2024 04:27
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@schmich
schmich / git-repo-mirror.md
Created October 8, 2014 02:31
Mirroring a repo to BitBucket
  1. Create an empty repo in BitBucket
  2. git clone --bare git@github.com:user/repo.git
  3. cd repo.git
  4. git push --mirror git@bitbucket.org:user/repo.git
@Starefossen
Starefossen / image_magick.sh
Created November 11, 2014 21:38
Build ImageMagick from source
#!/bin/bash
magick_version=6.8.9-10
magick_install_dir="$HOME/image_magick"
magick_download_url="http://imagemagick.org/download/releases/ImageMagick-$magick_version.tar.gz"
rm -rf $magick_install_dir/*
mkdir -p $magick_install_dir && cd $magick_install_dir
curl -L $magick_download_url | tar -zxf-
cd ImageMagick*
@nikitakit
nikitakit / tf_beam_decoder.py
Last active January 6, 2024 08:48
Tensorflow Beam Search
"""
Beam decoder for tensorflow
Sample usage:
```
from tf_beam_decoder import beam_decoder
decoded_sparse, decoded_logprobs = beam_decoder(
cell=cell,
@jamesfreeman959
jamesfreeman959 / keepawake.ps1
Last active June 29, 2024 07:20
A very simple PowerShell script to keep a Windows PC awake and make lync think the user is active on the keyboard
# Useful references:
#
# https://superuser.com/questions/992511/emulate-a-keyboard-button-via-the-command-line
# https://ss64.com/vb/sendkeys.html
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/96b339e2-e9da-4802-a66d-be619aeb21ac/execute-function-one-time-in-every-10-mins-in-windows-powershell?forum=winserverpowershell
# https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/
#
# Future enhancements - use events rather than an infinite loop
$wsh = New-Object -ComObject WScript.Shell
while (1) {
@bmaupin
bmaupin / free-backend-hosting.md
Last active July 2, 2024 17:42
Free backend hosting
[package]
name = "snake_game"
version = "0.1.0"
authors = ["youcodethings <spyr1014@gmail.com>"]
[dependencies]
piston = "0.36.0"
piston2d-graphics = "0.26.0"
pistoncore-glutin_window = "0.45.0"
piston2d-opengl_graphics = "0.52.0"
@pvieito
pvieito / gist:ee6d2c8934a8f84b9aeb467585277b8a
Last active July 2, 2024 20:19
Consumer keys of official Twitter clients

Twitter API Keys

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for Google TV

Consumer key: iAtYJ4HpUVfIUoNnif1DA

@mcenderdragon
mcenderdragon / Primer Forge Gradle Commands for 1.13 and later.md
Last active October 12, 2020 05:24
Short command list of what is now needed to setup forge and MDK

If a command breaks, use --no-daemon as the ForgeGradle currently doesn't uses it

Setup MDK (For Modders who want to create a mod)