Skip to content

Instantly share code, notes, and snippets.

View ialhashim's full-sized avatar

Ibraheem Alhashim ialhashim

View GitHub Profile
@gullyn
gullyn / flappy.html
Last active November 28, 2023 18:23
Flappy bird in 205 bytes (improved!)
<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 August 26, 2020 11:00
Azure Kinect basic capturing and visualization on Windows
/*
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")
@lzhbrian
lzhbrian / align_face.py
Last active February 6, 2024 03:20
face alignment with FFHQ method (https://github.com/NVlabs/ffhq-dataset)
"""
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 March 1, 2023 08:41
Compare image similarity in Python using Structural Similarity, Pixel Comparisons, Wasserstein Distance (Earth Mover's Distance), and SIFT
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 January 14, 2017 08:03
Deep Deterministic Policy Gradient
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 August 1, 2023 17:56
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.
/**********************************************************
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