Skip to content

Instantly share code, notes, and snippets.

Avatar

Ibraheem Alhashim ialhashim

View GitHub Profile
@gullyn
gullyn / flappy.html
Last active Apr 9, 2021
Flappy bird in 205 bytes (improved!)
View flappy.html
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@ialhashim
ialhashim / azure_kinect_capture.cpp
Last active Aug 26, 2020
Azure Kinect basic capturing and visualization on Windows
View azure_kinect_capture.cpp
/*
The most basic example to capture matching RGB and Depth images from an Azure Kinect DK device.
CImg is used to visualize the matching RGB and Depth.
*/
#pragma comment(lib, "gdi32.lib")
#pragma comment(lib, "user32.lib")
#pragma comment(lib, "shell32.lib")
View align_face.py
"""
brief: face alignment with FFHQ method (https://github.com/NVlabs/ffhq-dataset)
author: lzhbrian (https://lzhbrian.me)
date: 2020.1.5
note: code is heavily borrowed from
https://github.com/NVlabs/ffhq-dataset
http://dlib.net/face_landmark_detection.py.html
requirements:
apt install cmake
@duhaime
duhaime / measure_img_similarity.py
Last active Mar 22, 2021
Compare image similarity in Python using Structural Similarity, Pixel Comparisons, Wasserstein Distance (Earth Mover's Distance), and SIFT
View measure_img_similarity.py
import warnings
from skimage.measure import compare_ssim
from skimage.transform import resize
from scipy.stats import wasserstein_distance
from scipy.misc import imsave
from scipy.ndimage import imread
import numpy as np
import cv2
##
@ctmakro
ctmakro / ddpg.py
Created Jan 14, 2017
Deep Deterministic Policy Gradient
View ddpg.py
from __future__ import print_function
# Deep Deterministic Policy Gradient Method
# David Silver et al.
# implemented in plain Keras, by Qin Yongliang
# 2017 01 13
'''
summary
@seltzered
seltzered / IllustratorSaveAsSVGs.jsx
Last active Apr 12, 2021
Quick little script to batch-convert Illustrator .ai's to .svg's, based on Adobe's sample 'save to pdf's' script. Save it to a jsx, and load it under illustrator. Intended for Illustrator CS6.
View IllustratorSaveAsSVGs.jsx
/**********************************************************
ADOBE SYSTEMS INCORPORATED
Copyright 2005-2010 Adobe Systems Incorporated
All Rights Reserved
NOTICE: Adobe permits you to use, modify, and
distribute this file in accordance with the terms
of the Adobe license agreement accompanying it.
If you have received this file from a source