I hereby claim:
- I am leesharma on github.
- I am leesharma (https://keybase.io/leesharma) on keybase.
- I have a public key ASD0mqONaqZvg_k6vXe6qJ1U332z-LwpBaU9-UBJhF8ngAo
To claim this, I am signing this object:
import Pkg; Pkg.add("Flux") | |
using Flux: gradient, Chain, Dense, σ, softmax | |
# Partial derivatives of a basic function | |
# | |
# docs: https://fluxml.ai/Zygote.jl/dev/#Taking-Gradients-1 | |
# | |
f(x,y) = 3x^2 + x*y + 5y | |
f_x(x,y) = gradient(f, x, y)[1] # f_x = 6x + y |
// This file is part of www.nand2tetris.org | |
// and the book "The Elements of Computing Systems" | |
// by Nisan and Schocken, MIT Press. | |
// File name: projects/03/a/Bit.hdl | |
/** | |
* 1-bit register: | |
* If load[t] == 1 then out[t+1] = in[t] | |
* else out does not change (out[t+1] = out[t]) | |
*/ |
/** | |
* The ALU (Arithmetic Logic Unit). | |
* Computes one of the following functions: | |
* x+y, x-y, y-x, 0, 1, -1, x, y, -x, -y, !x, !y, | |
* x+1, y+1, x-1, y-1, x&y, x|y on two 16-bit inputs, | |
* according to 6 input bits denoted zx,nx,zy,ny,f,no. | |
* In addition, the ALU computes two 1-bit outputs: | |
* if the ALU output == 0, zr is set to 1; otherwise zr is set to 0; | |
* if the ALU output < 0, ng is set to 1; otherwise ng is set to 0. | |
*/ |
/** | |
* And gate: | |
* out = 1 if (a == 1 and b == 1) | |
* 0 otherwise | |
*/ | |
CHIP And { | |
IN a, b; | |
OUT out; |
;Symbolic Differentiation | |
; | |
; note: all arithmetic terms must have two operands! | |
; e.g. `(+ a b c) becomes `(+ a (+ b c))) | |
; | |
(define (deriv exp var) | |
(cond ((constant? exp var) 0) | |
((same-var? exp var) 1) | |
((sum? exp) | |
(make-sum (deriv (a1 exp) var) |
I hereby claim:
To claim this, I am signing this object:
Here is a calendar, written in HTML + GitHub-Flavored Markdown. The code is pretty messy, but it's functional.
Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday |
---|---|---|---|---|---|---|
1 [C][20170401] |
2 [C][20170402] |
|||||
3 [tmux][20170403] |
4 [vim][20170404] |
5 [elixir][20170405] |
6 [elixir][20170406] |
7 [elixir][20170407] |
8 [git][20170408] |
9 [erlang][20170409] |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
ExUnit.start | |
defmodule DateParser do | |
defmodule Timezone, do: defstruct [:full_name, :source] | |
@doc """ | |
`timezone/2` takes a date/datetime string and a global time zone and returns | |
a time zone for the specific string. Timezones specified inline should take | |
priority over the passed-in global timezone. | |
""" |
What was the last paper within the realm of computing you read and loved? What did it inspire you to build or tinker with? Come share the ideas in an awesome academic/research paper with fellow engineers, programmers, and paper-readers. Lead a session and show off code that you wrote that implements these ideas or just give us the lowdown about the paper. Otherwise, just come, listen, and discuss.
# This is a programming chellenge from David Bock's series | |
# "What Computer Scientists Know". This is a problem that can | |
# be used to discuss a bunch of computer science topics, but | |
# as I'm providing most of the skeleton of the solution, the | |
# point of this exercise is to demonstrate 'recursive backtracking'. | |
# http://en.wikipedia.org/wiki/Backtracking | |
# this problem is based on the classic 'triange peg game', a common | |
# sight in roadside diners in America, in particular, Cracker |