Skip to content

Instantly share code, notes, and snippets.

View comma3's full-sized avatar

Matthew Frederick comma3

  • Denver
View GitHub Profile
fd = new FormData();
fd.append("meeting.wav", audioBlob);
$.ajax({
method: 'POST',
url: _config.api.invokeUrl + '/meeting',
headers: {
Authorization: authToken
},
data: fd,
processData: false,
@comma3
comma3 / praw_gt1000results.txt
Last active January 22, 2018 20:17
Using praw (Python Reddit API Wrapper) to collect more than 1000 results from a query
# Reddit's API limits search results to 1000 for any query. If
# your query requires searching for more than 1000 results,
# you need a way to further limit the search space to find
# all of your posts. PRAW does not have an obvious solution,
# and I found few resources describing possible solutions.
# Some of the solutions on the internet are for old versions
# of praw and no longer work.
# The code below provides a solution by making a new query for each day.
# The interval can easily be shortened if there are possibly more than
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.BasicAuthentication',
)
}