Skip to content

Instantly share code, notes, and snippets.

Working from home

Aki Atoji akiatoji

Working from home
Block or report user

Report or block akiatoji

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
smitshilu /
Last active Jul 24, 2019
Tensorflow 1.4 Mac OS High Sierra 10.13 GPU Support


System information

  • OS - High Sierra 10.13
  • Tensorflow - 1.4
  • Xcode command line tools - 8.2 (Download from here: Xcode - Support - Apple Developer & Switch to different clang version: sudo xcode-select --switch/Library/Developer/CommandLineTools & check version: clang -v)
  • Cmake - 3.7
  • Bazel - 0.7.0
derwiki /
Last active May 14, 2018
Ruby module that you can use in a `before_action` on sensitive controllers for which you'd like a usage audit trail

Adding an audit log to your Rails app

If you have any sort of administrative interface on your web site, you can easily imagine an intruder gaining access and mucking about. How do you know the extent of the damage? Adding an audit log to your app is one quick solution. An audit log should record a few things:

  • controller entry points with parameter values
  • permanent information about the user, like user_id
  • transient information about the user, like IP and user_agent

Using the Rails framework, this is as simple as adding a before_action to your admin controllers. Here’s a basic version that I’m using in production.

leetreveil /
Last active Nov 5, 2019
Shell scripts to create a mongodb replica set and sharded cluster locally
# shell script to create a simple mongodb replica set (tested on osx)
set -e
red=$(tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput setaf 3)
default=$(tput sgr0)
granturing /
Last active Sep 28, 2016
HCatalog InputFormat wrapper to use with Spark (FYI for those finding this now, this was originally written pre-SparkSQL)
public class HCatInputFormat extends InputFormat<SerializableWritable<Writable>, HCatRecord> {
private final org.apache.hcatalog.mapreduce.HCatInputFormat input;
public HCatInputFormat() {
input = new org.apache.hcatalog.mapreduce.HCatInputFormat();
public RecordReader<SerializableWritable<Writable>, HCatRecord> createRecordReader(
wch / examples.r
Created Mar 6, 2013
Examples for O'Reilly Webinar on Data Visualization with R and ggplot2
View examples.r
Getting started
# Make sure you have ggplot2 installed
Basic examples
You can’t perform that action at this time.