Skip to content

Instantly share code, notes, and snippets.

View shadowimmage's full-sized avatar
:octocat:

Chase Sawyer shadowimmage

:octocat:
View GitHub Profile
@shadowimmage
shadowimmage / .nanorc
Last active March 21, 2020 04:55
nanorc confg - settings to make nano editor (linux/bash) use a tabstop of 4 spaces, and insert spaces insetead of a tab character.
set tabsize 4
set tabstospaces
set linenumbers
set smarthome
set numbercolor white,blue
## Include syntax highlighters from ~/.nano/ (git repo from https://github.com/serialhex/nano-highlight)
## spifftastic nano highlighting nano
include "~/.nano/nanorc.nanorc"

Keybase proof

I hereby claim:

  • I am shadowimmage on github.
  • I am shadowimmage (https://keybase.io/shadowimmage) on keybase.
  • I have a public key ASDfFATGVUJkKw5HfyszhN7ackOFfZNfXIy6jFQCOvk5kAo

To claim this, I am signing this object:

@shadowimmage
shadowimmage / advent_of_code_2017-day_02.py
Last active December 5, 2017 01:14
(partial) solution to day 2 of advent of code
""" Solution code for day 2 of the Advent of Code 2017 from http://adventofcode.com/2017
Run in python console
"""
import timeit #for tracking code runtime
puzzle_input = \
"""798 1976 1866 1862 559 1797 1129 747 85 1108 104 2000 248 131 87 95
201 419 336 65 208 57 74 433 68 360 390 412 355 209 330 135
967 84 492 1425 1502 1324 1268 1113 1259 81 310 1360 773 69 68 290
169 264 107 298 38 149 56 126 276 45 305 403 89 179 394 172
@shadowimmage
shadowimmage / advent_of_code_2017-day_01.py
Last active December 1, 2017 23:28
Solution code for 2017 Advent of Code day 1 (from: http://adventofcode.com/2017)
""" Solution code for day 1 of the Advent of Code 2017 from http://adventofcode.com/2017
Run in python console
"""
import timeit #for tracking code runtime
puzzle_input = input("puzzle promopt: ") # Given from the Advent of Code site prompt
sequence = list(map(lambda x: int(x), list(puzzle_input))) # convert pasted string to array of ints
def sum_sequence(sequence):
""" Day 1 Part 1: