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 json | |
from pathlib import Path | |
from datetime import datetime | |
import frontmatter | |
import re, os | |
import string | |
from urllib.parse import urlparse, parse_qs, urldefrag | |
from urllib.error import HTTPError | |
import urllib.request | |
from bs4 import BeautifulSoup |
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 json | |
from pathlib import Path | |
from datetime import datetime | |
import frontmatter | |
import re, os | |
import string | |
from urllib.parse import urlparse, parse_qs, urldefrag | |
from urllib.error import HTTPError | |
import urllib.request | |
from bs4 import BeautifulSoup |
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
def twitter_get(url): | |
resp = twitter.get(url) | |
if resp.status_code == 429: | |
# twitter rate limit was hit | |
print("Rate limit hit when calling %s" % (url)) | |
raise CustomException("Rate limit exceeded! You are using the API too often. Try again after 15 minutes or so.") | |
return resp |
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
from django.test import TestCase | |
from trivia.check_answers import check | |
import itertools | |
# Create your tests here. | |
import unittest | |
class TestStringMethods(unittest.TestCase): | |
def test_caseinsensitive(self): |
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
0x3b829cfcc24a11d2c68f146f71b888b451b031f8 |