Skip to content

Instantly share code, notes, and snippets.

@gwincr11
gwincr11 / softmax.ipynb
Last active December 8, 2021 18:45 — forked from awjuliani/softmax.ipynb
A simple ipython notebook that walks through the creation of a softmax regression model using MNIST dataset.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gwincr11
gwincr11 / 01-Learning-Python3.md
Created July 15, 2021 13:48 — forked from kenjyco/01-Learning-Python3.md
Learn Python 3 with Jupyter Notebook
@gwincr11
gwincr11 / example.psuedo
Created August 16, 2016 19:35
timing issue curry psuedo
def curry_function(fun, execute_time):
fun.call(self, execute_time)
end
def tick(self):
execute_time = time.now
[function1, function2].each do |fun|
new_function = curry_function(fun, execute_time)
Thread.new
publisher.pub(new_func.call(self))
defmodule MyList do
def sum([], total), do: total
def sum([ head | tail], total), do: sum(tail, head+total)
end
#!/bin/bash
# Create and configure a AWS IOT
#
set -e
echo -e "What is the device name? \c"
read NAME
# Create the IOT device
aws iot create-thing --thing-name $NAME
dict = {
"sensor_unit" => {
"current_location" => {
"lat" => 39.508577,
"long" => -115.9377,
"time" => 1461608442
},
"rad_sensor_attributes" => [
{
"sensor_id" => "sensor_12",
@gwincr11
gwincr11 / gist:8dff3d22b3d66d62d25d
Created September 3, 2014 04:27
warden request issue
```ruby
[1] pry(#<Warden::Proxy>)> env
=> {"GATEWAY_INTERFACE"=>"CGI/1.1",
"PATH_INFO"=>"/admin/news/new",
"QUERY_STRING"=>"",
"REMOTE_ADDR"=>"127.0.0.1",
"REMOTE_HOST"=>"localhost",
"REQUEST_METHOD"=>"GET",
"REQUEST_URI"=>"http://127.0.0.1:60474/admin/news/new",
"SCRIPT_NAME"=>"",
jQuery(function($) {
var nl_map = function(existing) {
var zoom, default_zoom;
var is_select = false;
var field_prefix = NLGEO.field_prefix;
if (NLGEO.zoom_field != 0)
@gwincr11
gwincr11 / gist:7779775
Created December 3, 2013 23:41
Current vs. Ideal has many workflow for Active Admin
//current workflow
//Inside of callback function on file upload completion
var $container = $(".advertising_entities");
$container.find(".has_many_add").trigger("click");
//better workflow
var $container = $(".advertising_entities");
var $has_many_element = $container.find(".has_many_add");
activeAdmin.api.form.add_has_many($has_many_element);
@gwincr11
gwincr11 / gist:3982661
Created October 30, 2012 20:08
update output
info: Retrieving plugin
info: Loading facts in /var/lib/puppet/lib/facter/mysql.rb
info: Loading facts in /var/lib/puppet/lib/facter/augeasversion.rb
info: Caching catalog for dbdev.envelo.cc
info: Applying configuration version '1348777448'
notice: /Stage[main]/App/Spree::App[spree]/File[/data/spree/shared/config/database.yml]/content:
--- /data/spree/shared/config/database.yml 2012-10-30 20:05:57.000000000 +0000
+++ /tmp/puppet-file20121030-16069-126gln7-0 2012-10-30 20:06:40.000000000 +0000
@@ -2,5 +2,5 @@
adapter: mysql2