Skip to content

Instantly share code, notes, and snippets.

View nestarz's full-sized avatar
🏠
Working from home

Elias Rhouzlane nestarz

🏠
Working from home
View GitHub Profile
@nestarz
nestarz / VGG16_PM_PM-33L_20170512-12h12m10s_train.prototxt
Created May 12, 2017 10:17
Caffe train definition for VGG16_PM_PM-33L_20170512-12h12m10s
name: "VGG16_PM_PM-33L_20170512-12h12m10s Train"
layer {
name: "data"
type: "Data"
top: "data"
top: "label"
transform_param {
mirror: true
crop_size: 224
mean_file: "/data/data_elias/dataset/priceminister/lmdb/PM-33L/mean_bgr_3D.binaryproto"
@nestarz
nestarz / VGG16_PM+DF_SA-7L_20170504-17h37m47s_train.prototxt
Last active May 12, 2017 10:37
Caffe train definition for VGG16_PM+DF_SA-7L_20170504-17h37m47s
name: "VGG16_PM+DF_SA-7L_20170504-17h37m47s Train"
layer {
name: "data"
type: "Data"
top: "data"
top: "label"
transform_param {
mirror: true
crop_size: 224
mean_file: "/data/data_elias/dataset/deepfashion_priceminister/lmdb/SA-7L/mean_bgr_3D.binaryproto"
@nestarz
nestarz / VGG16_PM+DF_DF-50L_20170512-12h04m52s_train.prototxt
Created May 12, 2017 10:42
Caffe train definition for VGG16_PM+DF_DF-50L_20170512-12h04m52s
name: "VGG16_PM+DF_DF-50L_20170512-12h04m52s Train"
layer {
name: "data"
type: "Data"
top: "data"
top: "label"
transform_param {
mirror: true
crop_size: 224
mean_file: "/data/data_elias/dataset/deepfashion_priceminister/lmdb/DF-50L/mean_bgr_3D.binaryproto"
@nestarz
nestarz / VGGM_PM_PM-33L_trainval.prototxt
Created May 12, 2017 10:58
Caffe trainval definition for VGGM_PM_PM-33L base model
name: "SuitAppNet-Hash64"
layer {
name: "data"
type: "Data"
top: "image"
top: "label"
include {
phase: TRAIN
}
transform_param {
@nestarz
nestarz / keyframe.css
Created February 17, 2018 15:41 — forked from newtonapple/keyframe.css
CSS Keyframe Animation Syntax
/*
References:
http://css-tricks.com/snippets/css/webkit-keyframe-animation-syntax/
https://developer.mozilla.org/en/css/css_animations
Compatible with Firefox 5+, IE 10+, Chrome 6+, Safari 5+
*/
/* Declaration (add appropriate browser prefix accordinginly) */
@-webkit-keyframes animation-name {
@nestarz
nestarz / Dockerfile
Created August 26, 2018 15:18
Dockerized Ubuntu Environment with osmesa and Python bindings
FROM ubuntu:latest
MAINTAINER Elias Rhouzlane <elias.rhouzlane@gmail.com>
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata \
&& ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime \
&& dpkg-reconfigure --frontend noninteractive tzdata \
&& apt-get install -y python-tk
RUN apt-get update \
@nestarz
nestarz / osmesa.py
Created August 27, 2018 19:34
OSMesa Binding with Python
#! /usr/bin/env python
from __future__ import print_function
import os
if not os.environ.get( 'PYOPENGL_PLATFORM' ):
os.environ['PYOPENGL_PLATFORM'] = 'osmesa'
from math import pi, sin, cos
import OpenGL
OpenGL.USE_ACCELERATE = False
from OpenGL.GL import *
from OpenGL.GL.ARB.fragment_program import glGenProgramsARB
@nestarz
nestarz / gatsby-node.js
Created February 15, 2019 13:49
Populate MDX node from frontmatter MusicBrainz IDs
const {
default_musicBrainzReleaseFields,
queryMusicBrainzRelease
} = require("./src/fragments/musicbrainz");
exports.onCreateNode = async ({
node,
actions,
getNode,
createNodeId,
@nestarz
nestarz / docker_x11_gui_osx.md
Last active September 13, 2019 07:39 — forked from stonehippo/docker_x11_gui_osx.md
Getting X11 GUI applications to work on OS X with Docker

Getting X11 GUI applications to work on OS X with Docker

$ brew install socat
$ brew cask install xquartz <--- assuming you don't already have XQuartz installed some other way
$ open -a XQuarts <--- start an XQuartz session

$ socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"

If exists, list all and kill them:

@nestarz
nestarz / cross-source.js
Last active November 10, 2019 14:27
Top Level Domains Whois (November 11, 2019)
const fs = require("fs")
const missings = [];
fs.readFile('./tlds_by_tld.json', 'utf-8', (err, file1) => {
fs.readFile('./tld.json', 'utf-8', (err, file2) => {
fs.readFile('./myjsonfile.json', 'utf-8', (err, file3) => {
const tlds1 = JSON.parse(file1)
const tlds2 = JSON.parse(file2)
const tlds2_obj = tlds2.reduce((res, { Domain, ...tld }) => {
res[Domain.toUpperCase().replace('.', '')] = tld;