{{ message }}

Instantly share code, notes, and snippets.

💭
Wondering what you are supposed to put as your GitHub status

# Jake Vossen jakevossen5

💭
Wondering what you are supposed to put as your GitHub status
Created Feb 6, 2020
A one liner for a binary to decimal created to demonstrate bad code
View bin-to-dec-1-liner.py
 while (n := ((print(c[1])) if not (c := ((True, "OUTPUT error ") if -1 in (n := [(lambda t: 2**int(t[0]) if t[1] == '1' else (-1 if t[1] not in ['0', '1'] else 0))(t) for t in enumerate(input('BINARY-STR> ')[::-1])]) else (True, "OUTPUT " + str(sum(n)))) if (input('OPTION> ') == '1') else (False, "OUTPUT goodbye!"))[0] else print(c[1]) or (True if 'y' in (lower_in := input('CONTINUE> ').lower()) else print('OUTPUT goodbye!')))): continue
Created Feb 2, 2020
View remann.hs
 do_integral :: (Ord p, Num p, Fractional p) => (p -> p) -> p -> p -> p -> p do_integral f start end dx | end <= start = 0 | otherwise = (height * dx) + do_integral f (start + dx) end dx where height = f (start + (dx / 2))
Created Sep 18, 2019
View keybase.md

### Keybase proof

I hereby claim:

• I am jakevossen5 on github.
• I am jakevossen5 (https://keybase.io/jakevossen5) on keybase.
• I have a public key ASBRXkVjgNmMI7EosULK7DUUoTFo7T0-0ZqBB79ziy_9Sgo

To claim this, I am signing this object:

Last active Dec 14, 2018
View instapaper-archive.py
 import urllib.request import csv def create_articles(path): temp = [] file = open(path, 'r') for line in file: arr = line.split(',') #print(arr[0][-4:].lower()) if arr[0][-4:].lower() == '.pdf':
Created Oct 31, 2018
Seconds left bash script
View second-countdown.sh
 #!/bin/bash # This is a simple bash script displays a countdown to a specific time in the menu bar (combined with an app like bit bar) END=1683612000 CUR=\$(date +%s) num=\$(echo \$END - \$CUR | bc) echo \$num
Created Oct 31, 2018
Percent done with hour/day/month
View percent-done.py
 #!/usr/bin/env PYTHONIOENCODING=UTF-8 /usr/local/bin/python3 # To be used with bit-bar, which shows the % you are done with the current hour, day, week, and year from datetime import datetime now = datetime.now() digits = 3 seconds_since_hour = (now - now.replace(minute=0, second=0, microsecond=0)).total_seconds() print(("h" + ('{0:.2f}'.format(round((seconds_since_hour / 3600), digits)))[1:]), end= ' ') seconds_since_midnight = (now - now.replace(hour=0, minute=0, second=0, microsecond=0)).total_seconds() print("d" +('{0:.2f}'.format(round((seconds_since_midnight / 86400), digits)))[1:],end = ' ')