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
original_number = int(request.form['original']) | |
new_number = int(request.form['new']) | |
result = ((new_number - original_number)/int(original_number)) * 100 | |
response = "The percent change between " + str(original_number) + " and " + str(new_number) + " is " + str("%.0f%%" % result) | |
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
static/* linguist-vendored |
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
# .gitignore should include reference to config.py | |
api_key = "YOUR_KEY" | |
api_secret = "YOUR_SECRET" | |
access_token = "YOUR_ACCESS_TOKEN" | |
token_secret = "YOUR_TOKEN_SECRET" |
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 config | |
from twython import Twython, TwythonError | |
# create a Twython object by passing the necessary secret passwords | |
twitter = Twython(config.api_key, config.api_secret, config.access_token, config.token_secret) |
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
config.py | |
__pycache__ | |
.ipynb_checkpoints |
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 config | |
from twython import Twython, TwythonError | |
# create a Twython object by passing the necessary secret passwords | |
twitter = Twython(config.api_key, config.api_secret, config.access_token, config.token_secret) | |
# return tweets containing #FreeCodeCamp | |
response = twitter.search(q='"#FreeCodeCamp" -filter:retweets', result_type="recent", count=100) |
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 { LocalDate, ChronoUnit } from "js-joda"; | |
export function getToday() { | |
return LocalDate.now(); | |
} | |
export function getNextYear(date) { | |
return date.year() + 1; | |
} |
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
// @flow | |
import { LocalDate, ChronoUnit } from "js-joda"; | |
export function getToday(): LocalDate { | |
return LocalDate.now(); | |
} | |
export function getNextYear(date: LocalDate): number { | |
return date.year() + 1; |
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
protected_branch='master' | |
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
# define bash colors to display | |
yellow='\033[0;33m' | |
red='\033[0;31m' | |
green='\033[0;32m' | |
no_color='\033[0m' | |
OlderNewer