This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beautifulsoup4==4.3.2 | |
requests==2.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import requests | |
from bs4 import BeautifulSoup | |
if __name__ == "__main__": | |
wiki_page = "http://streetfighter.wikia.com/wiki/List_of_moves_in_Street_Fighter_II" | |
r = requests.get(wiki_page) | |
soup = BeautifulSoup(r.content) | |
games = soup.find_all("tr") | |
while True: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Allows for colors and such | |
export TERM=xterm-256color | |
FILES="git diff --cached --name-only --diff-filter=ACM" | |
ROOT=$(git rev-parse --show-toplevel) | |
RETVAL=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beautifulsoup4==4.3.2 | |
requests==2.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getDirectionMoved: (e, collectionLength, mousePos, spacerHeight) => | |
spacerOffsetTop = @$spacer.offset().top | |
isOnTopOfSpacer = mousePos > spacerOffsetTop and mousePos < spacerOffsetTop + spacerHeight | |
isAboveSpacer = mousePos < spacerOffsetTop | |
isBelowSpacer = not isAboveSpacer and not isOnTopOfSpacer | |
spacerIsAtTop = Data.FinancialTransactions.dragCurrentIndex is 0 | |
spacerIsAtBottom = Data.FinancialTransactions.dragCurrentIndex is collectionLength |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
isFlipping: (positions) => | |
if positions.length < 4 | |
return false | |
invalidA = ['above', 'below', 'above', 'below'] | |
invalidB = ['below', 'above', 'below', 'above'] | |
lastThree = _.last(positions, 4) | |
return _.isEqual(lastThree, invalidA) or _.isEqual(lastThree, invalidB) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
handleDragEvent: (e, ui) => | |
currentMousePosition = e.clientY | |
startingIndex = Collection.indexOf(currentlyDraggingData.model) | |
dragOverIndex = Collection.indexOf(@model) | |
currentIndexOfDraggingTransaction = Collection.indexOf(Collection.dragModel) | |
transactionTop = $($('.financial-transaction-item')[currentIndexOfDraggingTransaction]).offset().top - $(window).scrollTop() | |
if Collection.dragModel isnt @model | |
Collection.dragView.$el.detach() | |
if dragOverIndex > currentIndexOfDraggingTransaction | |
@$el.after(Collection.dragView.$el) |
NewerOlder