Skip to content

Instantly share code, notes, and snippets.

View j10sanders's full-sized avatar
😤

Jonathan Sanders j10sanders

😤
View GitHub Profile
const cycle = (input) => {
const arrInput = input.split('');
const firstLetters = [];
const lastLetters = [];
for (let i = 0; i < arrInput.length; i += 1) {
if (arrInput[i - 1] === ' ' || i === 0) {
firstLetters.push(arrInput[i]);
}
}
for (let i = arrInput.length - 1; i > 0; i -= 1) {
const cycle = (input) => {
const arrInput = input.split('');
const firstLetters = [];
const lastLetters = [];
for (let i = 0; i < arrInput.length; i += 1) {
if (arrInput[i - 1] === ' ' || i === 0) {
firstLetters.push(arrInput[i]);
}
}
// return firstLetters;
@j10sanders
j10sanders / auth.js
Created May 12, 2018 14:04
auth actual usage
import auth0 from 'auth0-js';
import history from '../history';
export default class Auth {
userProfile;
tokenRenewalTimeout;
auth0 = new auth0.WebAuth({
domain: `${process.env.REACT_APP_AUTH0_DOMAIN}`,
clientID: `${process.env.REACT_APP_AUTH0_clientID}`,
pragma solidity ^0.4.13;
contract Escrow {
address public owner;
uint public fee;
//Balances temporarily made public for testing; to be removed
mapping (address => mapping (address => uint)) public balances;
function Escrow() public {

Keybase proof

I hereby claim:

  • I am j10sanders on github.
  • I am dimpull (https://keybase.io/dimpull) on keybase.
  • I have a public key ASBZGrKot6eTBHLAgevORCFJCPhQc2CFqkSaJyPzVB7kPAo

To claim this, I am signing this object:

@j10sanders
j10sanders / the_band
Created December 19, 2016 22:13
old thinkful project
class Musician(object):
def __init__(self, sounds):
self.sounds = sounds
def solo(self, length):
for i in range(length):
print(self.sounds[i % len(self.sounds)], end=" ")
print()
class Bassist(Musician): # The Musician class is the parent of the Bassist class
scores = {"a": 1, "e": 1, "i": 1, "l": 1, "n": 1, "o": 1, "r": 1, "s": 1, "t":
1, "u": 1, "d": 2, "g": 2, "b": 3, "c": 3, "m": 3, "p": 3, "f": 4,
"h": 4, "v": 4, "w": 4, "y": 4, "k": 5, "j": 8, "x": 8, "q": 10, "z": 10}
def scrabble(x, n, cases):
words = []
wordscores = []
scrabble_ladder_l = []
scrabble_ladder_r = []
def bb(n):
prevstring = ""
while n != prevstring:
prevstring = n
n = n.replace("()", "").replace("[]", "").replace("{}", "")
return "YES" if n == "" else "NO"
t = int(input().strip())
for a0 in range(t):
@j10sanders
j10sanders / project_euler_25.py
Created October 12, 2016 15:56
My answer to project euler 25
#https://projecteuler.net/problem=25
def fib(digits):
f = i = 1
e = j = 0
while digits > len(str(f)):
e = j
j = f
f = e + j
i += 1
return f, i
@j10sanders
j10sanders / DepthFirstTree.py
Last active July 12, 2016 00:47
Depth-First searcher for RC
tree = {'a': ['b', 'c'],
'b': ['d', 'e', 'f'],
'c': ['g'],
'd': [],
'e': [],
'f': [],
'g': ['h'],
'h': []
}