Skip to content

Instantly share code, notes, and snippets.

View natec425's full-sized avatar
🙃
Software Developer. Educator.

Nate Clark natec425

🙃
Software Developer. Educator.
View GitHub Profile
@natec425
natec425 / Main.elm
Created June 23, 2017 17:53
Elm Filterable Stores
module Main exposing (..)
import Html exposing (Html, Attribute, beginnerProgram, select, option, table, tr, td, th, text, div)
import Html.Attributes exposing (value)
import Html.Events exposing (on, targetValue)
import Json.Decode as JD
onChange : (String -> msg) -> Attribute msg
onChange toMsg =
@natec425
natec425 / projects.js
Created February 5, 2018 21:02
React Router Project Groups
import React, { Component } from 'react';
import { BrowserRouter as Router, Link, Route } from 'react-router-dom';
const project_groups = {
python: [
{
id: 'python-hello',
title: 'Hello World',
description: 'Hello world in python.'
}
@natec425
natec425 / seq_con_par.py
Created May 24, 2018 01:14
starting point for discussing sequential vs concurrent vs parallel
from multiprocessing import pool
from timeit import timeit
def smap(func, stuff):
return list(map(func, stuff))
def cmap(func, stuff):
with pool.ThreadPool(processes=4) as p:
@natec425
natec425 / web-components-workshop.md
Created March 21, 2019 01:40
Zero Dependency Components: Introduction to Web Components

Zero Dependency Components: Introduction to Web Components

As much as I love JavaScript, it’s always the most expensive part of your site.

Come learn about Web Components with friends!

Web Components are native browser APIs that let you develop rich UI components with 0KB of added bundle size! In this workshop I want to convince you that you might not need a framework.

@natec425
natec425 / magnolia-js-2019-wc-svelte-links.md
Created April 18, 2019 15:49
Magnolia JS 2019 - Web Components & Svelte workshop links
@natec425
natec425 / populate_from_random_user.py
Created June 5, 2020 18:29
Fetching data from randomuser.me and populating a local database in Python
"""
## Overview
This script pulls random user data from randomuser.me and populates a database on my local machine.
Dependencies:
- python 3+ (I'm running 3.8)
- requests
- your required database driver (I'm using postgres so psycopg2-binary)
Useful Resources: