Skip to content

Instantly share code, notes, and snippets.

View alshakero's full-sized avatar

Omar Alshaker alshakero

View GitHub Profile
import os
import face_recognition
import json
images = os.listdir('./portraits-resized/portraits/')
imagesData = []
for idx, imageFile in enumerate(images):
try:
image = face_recognition.load_image_file("./portraits-resized/portraits/" + imageFile)
face_landmarks_list = face_recognition.face_landmarks(image)
@alshakero
alshakero / Processing.java
Created July 24, 2023 19:37
Faces from the world
import processing.sound.*;
String path = "/Users/omaralshaker/Work.nosync/Personal/processingart/faces/";
String facesPath = "/Users/omaralshaker/Work.nosync/Personal/midi/portraits-resized/portraits/";
String facesDataFilePath = "/Users/omaralshaker/Work.nosync/Personal/midi/faces-results/full.json";
Face[] faces = new Face[400];
SoundFile sound;
class Face {
@alshakero
alshakero / tampermonkey-copy-text-fragment-url.user.js
Created May 27, 2020 15:02
Adds a context menu option to copy the text fragment URL
// ==UserScript==
// @name Copy text fragment URL
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Copies the text fragment URL for you
// @author Omar Alshaker (@alshakero)
// @include *
// @grant GM.setClipboard
// @run-at context-menu
// ==/UserScript==
<!-- steps to see this
1. Run BlendingEditor
2. Run KitchenSink, you should see a blue top bar blended within KitchenSink.
3. Press CTRL + E to open the editor.
4. Double click on the top field to select a partial, select the first one [partial-id="/blendingprovider/surface/Nm/html"].
5. Remove the HTML there and paste this one instead.
6. Click Save and refresh the page.
7. Now run KitchenSink again to simulate a connection error.
-->
exports["Puppet"] =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
<?php
header('Access-Control-Allow-Origin: http://www.alhazen.co', false);
if(!(strpos($_SERVER["HTTP_REFERER"], "http://www.alhazen.co") !== false))
{
echo "Why so curious?";
exit;
}
sleep(2);
$id = $_POST['id'];