Skip to content

Instantly share code, notes, and snippets.

View yellowbean's full-sized avatar
🥭
Stay cool

Shawn Zhang yellowbean

🥭
Stay cool
View GitHub Profile
@yogthos
yogthos / clojure-beginner.md
Last active July 4, 2024 16:26
Clojure beginner resources

Introductory resources

@wmp3
wmp3 / dash_datatable_diff.py
Created August 22, 2019 13:44
Plotly Dash DataTable Diff
import dash # 1.1.1
from dash.dependencies import Input, Output, State
import dash_table # 4.1.0
import dash_core_components as dcc # 1.1.1
import dash_html_components as html
from dash.exceptions import PreventUpdate
import numpy as np # 1.17.0
import pandas as pd # 0.25.0
@elnygren
elnygren / expression_problem.clj
Last active December 3, 2022 16:33
Solving the Expression Problem with Clojure
; The Expression Problem and my sources:
; http://stackoverflow.com/questions/3596366/what-is-the-expression-problem
; http://blog.ontoillogical.com/blog/2014/10/18/solving-the-expression-problem-in-clojure/
; http://eli.thegreenplace.net/2016/the-expression-problem-and-its-solutions/
; http://www.ibm.com/developerworks/library/j-clojure-protocols/
; To begin demonstrating the problem, we first need some
; "legacy code" with datastructures and functionality:
@jasongilman
jasongilman / atom_clojure_setup.md
Last active May 11, 2024 02:25
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

@john2x
john2x / 00_destructuring.md
Last active June 6, 2024 13:40
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences