Skip to content

Instantly share code, notes, and snippets.

View coderfi's full-sized avatar

Fairiz 'Fi' Azizi coderfi

View GitHub Profile
@coderfi
coderfi / create-mint-sh
Created June 27, 2018 22:35 — forked from gildas/create-mint-sh
Create Linux Mint USB on Mac OS/X
#! /usr/bin/env bash
# Insert a USB key.
# if needed initialize it with MS/DOS FAT and MBR
# Download the Mint ISO image
# Convert the ISO -> IMG
hdiutil convert -format UDRW -o linuxmint-17.3-cinnamon-64bit linuxmint-17.3-cinnamon-64bit.iso
# Run a diskutil list to know the device for the USB key, e.g.: /dev/disk3
#! /usr/bin/env bash
#sudo apt-get install --yes autoconf
WORKING_DIR=`pwd`
LIBLBFGS_GIT=https://github.com/chokkan/liblbfgs.git
LIBLBFGS_SRC_DIR=./liblbfgs/
LIBLBFGS_INSTALL_DIR=$WORKING_DIR/local/lbfgs/
CRFSUITE_GIT=https://github.com/chokkan/crfsuite.git
CRFSUITE_SRC_DIR=./crfsuite/
@coderfi
coderfi / automobile.ipynb
Created June 4, 2017 21:11 — forked from martinwicke/automobile.ipynb
Estimator demo using Automobile dataset
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@coderfi
coderfi / min-char-rnn.py
Created March 7, 2017 08:37 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@coderfi
coderfi / git-selective-merge.md
Last active November 27, 2015 19:02 — forked from katylava/git-selective-merge.md
git selective merge

Example: You have a branch refactor that is quite different from master. You can't merge all of the commits, or even every hunk in any single commit or master will break, but you have made a lot of improvements there that you would like to bring over to master.

Note: This will not preserve the original change authors. Only use if necessary, or if you don't mind losing that information, or if you are only merging your own work.

On master:

> git checkout -b temp
@coderfi
coderfi / mysqldb.py
Created October 23, 2015 22:17 — forked from dstolfo/mysqldb.py
luigi.mysqldb.py Luigi module for tracking and writing data to mysql tables.
import luigi
import tempfile
import datetime
from luigi.contrib import rdbms
from lib.luigi import logger
from luigi.postgres import MultiReplacer
try:
import MySQLdb
<!doctype html>
<html>
<head>
<title>Angular Test </title>
</head>
<body ng-app="d3AngularApp">
<div ng-controller='MainCtrl'>
<div d3-bars bar-height="20" bar-padding="5" data='data'></div>
</div>
{
"metadata": {
"name": "",
"signature": "sha256:5ad7f762e65176fc4319940032d1c0eb966cfa2b28c2b8cd558ad72236fbcdd8"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
"""
- sequence read
- sequence write
"""
import os
import sys
import time
import errno
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.