Skip to content

Instantly share code, notes, and snippets.

View JackHowa's full-sized avatar

Jack Howard JackHowa

View GitHub Profile
@JackHowa
JackHowa / css-reset.css
Created November 24, 2021 01:27
from Josh W Comeau
/*
1. Use a more-intuitive box-sizing model.
via https://www.joshwcomeau.com/css/custom-css-reset/
*/
*, *::before, *::after {
box-sizing: border-box;
}
/*
2. Remove default margin
*/
@JackHowa
JackHowa / tfidf.py
Created May 1, 2021 15:46
Exercise 18: TF-IDF
# DATA BLOCK
text = '''he really really loves coffee
my sister dislikes coffee
my sister loves tea'''
import math
def main(text):
# split the text first into lines and then into lists of words
@JackHowa
JackHowa / coin-flip-next.py
Created February 15, 2021 17:49
Write a program that counts the number of occurrences of "11" in an input sequence of zeros and ones. The input of the program is just the sequence and it should return a single number, which is the number of occurrences of "11".
def count11(seq):
# define this function and return the number of occurrences as a number
# define int for occurences of num
occurences = 0
# loop through each element
# get length of seq
seq_length = len(seq)
@JackHowa
JackHowa / settings.json
Created December 3, 2020 15:46
vs code settings
{
"eslint.alwaysShowStatus": true,
"eslint.format.enable": true,
"eslint.lintTask.enable": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"[scss]": {
"editor.codeActionsOnSave": {
@JackHowa
JackHowa / formatDate.js
Created November 27, 2020 16:09
format date
const MONTH_NAMES = [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
def main():
portnames = ["PAN", "AMS", "CAS", "NYC", "HEL"]
# generate list of 1, 2, 3, 4
check = range(1,5)
port1 = 0
for port2 in range(1, 5):
for port3 in range(1, 5):
for port4 in range(1, 5):
for port5 in range(1, 5):

Keybase proof

I hereby claim:

  • I am jackhowa on github.
  • I am jackhowa (https://keybase.io/jackhowa) on keybase.
  • I have a public key ASCUXVHzVA6AAyNB0dM69_Olu_PS8QZH-JkKOtnRDseuEgo

To claim this, I am signing this object:

@JackHowa
JackHowa / oh-damn-git-deps.md
Last active March 17, 2020 21:16
internal helpers

Dependency issues

Finding Your Bearings

Check you're in top-level directory

pwd -> /Users/howardj/sites/fusion-news-theme-blocks

Ensure you have latest version

git branch

@JackHowa
JackHowa / StorybookNotes-fem.md
Created March 15, 2020 21:44
from Frontend Masters Storybook course ideas

Design system

Pillars

  • style guide
  • foundation
  • ui kit
    • buttons
    • text fields
@JackHowa
JackHowa / gist:35a665ed14d8ec6efa8164fd5d80f3f7
Created January 22, 2020 19:58
troubleshooting victory domain padding with groups and bars

Working on adding left domainPadding to a group of many bars. I'm having success with pushing other graphs over. But, when there's 24 groups, the spacing doesn't seem to be working. Oddly, padding can be applied on the right.

Screen Shot 2020-01-22 at 12.45.25 PM.png

I've tried adding domain padding to the children as well. But, as far as I understand, domainPadding is best applied to the parent. I've also looked into styling the victory groups differently, with padding. But that hasn't affected the left domain padding.

export default function GroupedBarChart(props) {
  const { groups, barWidth } = props;