Skip to content

Instantly share code, notes, and snippets.

View jordanhudgens's full-sized avatar

Jordan Hudgens jordanhudgens

View GitHub Profile
class InfiniteLineup:
def __init__(self, players):
self.players = players
def lineup(self):
lineup_max = len(self.players)
idx = 0
while True:
if idx < lineup_max:
class Lineup:
def __init__(self, players):
self.players = players
def __iter__(self):
self.n = 0
return self
def __next__(self):
class Invoice:
def __init__(self, client, total):
self.client = client
self.total = total
def __str__(self):
return f"Invoice from {self.client} for {self.total}"
def __repr__(self):
return f"Invoice({self.client}, {self.total})"
class Invoice:
def __str__(self):
return "This is the invoice class!"
inv = Invoice()
print(str(inv))
class Invoice:
def __init__(self, client, total):
# [0, 1, 2, 3, 4]
# [1, 2, 3, 4, 5]
# [2, 3, 4, 5, 6]
# [3, 4, 5, 6, 7]
# [4, 5, 6, 7, 8]
def manual_incrementing_matrix(n):
matrix = [ [ None for y in range( n ) ] for x in range( n ) ]
"""
class Invoice:
def __init__(self, client, total):
self.client = client
self.total = total
def formatter(self):
return f'{self.client} owes: ${self.total}'
heroku buildpacks:clear
heroku buildpacks:set heroku/nodejs
heroku buildpacks:add heroku/ruby --index 2
ready = ->
$('#toggle-btn').click ->
$('.container').fadeOut()
return
$(document).ready ready
$(document).on 'turbolinks:load', ready
<div class="container">
Maecenas sed diam eget risus varius blandit sit amet non magna. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sed odio dui. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Vestibulum id ligula porta felis euismod semper. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula ut id elit.
</div>
<button id="toggle-btn">Hide Content</button>
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .