Skip to content

Instantly share code, notes, and snippets.

Mehdi Cherti mehdidc

Block or report user

Report or block mehdidc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mehdidc /
Created Dec 24, 2018 — forked from karpathy/
Natural Evolution Strategies (NES) toy example that optimizes a quadratic function
A bare bones examples of optimizing a black-box function (f) using
Natural Evolution Strategies (NES), where the parameter distribution is a
gaussian of fixed standard deviation.
import numpy as np
# the function we want to optimize
View Using Github Deploy

What / Why

Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.

As the name says, its primary function is to be used in the deploy process, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.

How to

  1. Generate a ssh key
mehdidc /
Created Jun 8, 2018 — forked from omoindrot/
Example TensorFlow script for fine-tuning a VGG model (uses
Example TensorFlow script for finetuning a VGG model on your own data.
Uses module which is in release v1.2
Based on PyTorch example from Justin Johnson
Required packages: tensorflow (v1.2)
Download the weights trained on ImageNet for VGG:
View projector_config.json
"embeddings": [
"tensorName": "WIPO",
"tensorShape": [
"tensorPath": "",
"metadataPath": ""
View labels.tsv
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
portable bath bench/seat
bath for invalid
a multi-purpose shower device
children's bath
a foot care device
a showering appliance
knockdown bath bench
safety devices
a shower-bath booth structure
View .vimrc
"FIRST do : curl -fLo ~/.vim/autoload/plug.vim --create-dirs
set autoindent
set nocindent
set nosmartindent
set autoindent
set indentexpr=
set tabstop=8
set expandtab
set shiftwidth=4
set softtabstop=4
wget --output-document=$HOME/.rclone.conf
mkdir -p data
git clone
curl -OL
rm -fr protoc && unzip -d protoc
cd models/research/ && ../../protoc/bin/protoc object_detection/protos/*.proto --python_out=.
pip install contextlib2
cp models/research/object_detection/dataset_tools/ .
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,


Cython has two major benefits:

  1. Making python code faster, particularly things that can't be done in scipy/numpy
  2. Wrapping/interfacing with C/C++ code

Cython gains most of it's benefit from statically typing arguments. However, statically typing is not required, in fact, regular python code is valid cython (but don't expect much of a speed up). By incrementally adding more type information, the code can speed up by several factors. This gist just provides a very basic usage of cython.

mehdidc / Ubuntu1604py36Dockerfile
Created Apr 11, 2018 — forked from monkut/Ubuntu1604py36Dockerfile
Base Docker image for ubuntu-16.04 & Python3.6
View Ubuntu1604py36Dockerfile
# docker build -t ubuntu1604py36
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -y software-properties-common vim
RUN add-apt-repository ppa:jonathonf/python-3.6
RUN apt-get update
RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv
RUN apt-get install -y git
You can’t perform that action at this time.