Skip to content

Instantly share code, notes, and snippets.

View sejas's full-sized avatar
🐋
Set of synapses weights and biases

Antonio Sejas sejas

🐋
Set of synapses weights and biases
View GitHub Profile
@sejas
sejas / imagenet1000_clsidx_to_labels.py
Created February 23, 2019 09:55 — forked from yrevar/imagenet1000_clsidx_to_labels.txt
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@sejas
sejas / vgg.py
Created February 22, 2019 23:55
This script will demonstrate how to use a pretrained model, in PyTorch, to make predictions.
"""
This script will demonstrate how to use a pretrained model, in PyTorch,
to make predictions. Specifically, we will be using VGG16 with a cat
image.
References used to make this script:
PyTorch pretrained models doc:
http://pytorch.org/docs/master/torchvision/models.html
PyTorch image transforms example:
http://pytorch.org/tutorials/beginner/data_loading_tutorial.html#transforms
@sejas
sejas / install_caffe.sh
Created January 22, 2017 01:13 — forked from doctorpangloss/install_caffe.sh
Installing Caffe on Mac 10.11.5 and later in the 10.11 series, and 10.12.1 and later in the 10.12 series
#!/bin/sh
# Install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Apple hides old versions of stuff at https://developer.apple.com/download/more/
# Install the latest XCode (8.0).
# We used to install the XCode Command Line Tools 7.3 here, but that would just upset the most recent versions of brew.
# So we're going to install all our brew dependencies first, and then downgrade the tools. You can switch back after
# you have installed caffe.
# Install CUDA toolkit 8.0 release candidate
# Register and download from https://developer.nvidia.com/cuda-release-candidate-download
@sejas
sejas / add-checkbox-to-checkout-woocommerce-functions.php
Last active April 19, 2016 15:20 — forked from thegdshop/gist:3171026
WooCommerce - Add checkbox field to the checkout
<?php
/**
* Add checkbox field to the checkout
**/
$myCheckboxKey = 'my_checkbox';
add_action('woocommerce_after_order_notes', 'my_custom_checkout_field');
function my_custom_checkout_field( $checkout ) {
@sejas
sejas / functions.php
Created February 24, 2016 11:04 — forked from WPprodigy/functions.php
Remove the password strength meter from WooCommerce checkout
function wc_ninja_remove_password_strength() {
if ( wp_script_is( 'wc-password-strength-meter', 'enqueued' ) ) {
wp_dequeue_script( 'wc-password-strength-meter' );
}
}
add_action( 'wp_print_scripts', 'wc_ninja_remove_password_strength', 100 );