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
library(XML) | |
library(dplyr) | |
library(lubridate) | |
library(reshape2) | |
library(ggplot2) | |
fitbit <- xmlToDataFrame(getNodeSet(xmlParse("fitbit.tcx"), "//ns:Trackpoint", "ns"), | |
stringsAsFactors = FALSE) | |
strava <- xmlToDataFrame(getNodeSet(xmlParse("strava.tcx"), "//ns:Trackpoint", "ns"), |
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 requests | |
def getTeam(team): | |
request = requests.get('https://nba-players.herokuapp.com/players-stats-teams/' + team) | |
if request.status_code == 200: | |
return request.json() | |
else: | |
raise Exception("Query failed to run by returning code of {}. {}".format(request.status_code)) | |
def getImageName(playerName): |
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
Moved to https://github.com/z1lc/core/tree/master/src/main/python/productivity |
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 math | |
from aqt import mw | |
from aqt.qt import * | |
DECK_EXACT_NAME = "z" | |
TOTAL_MINUTES = 50 | |
# TODO: I can get this stuff from existing information in DB | |
CARDS_PER_MINUTE = 11.5 | |
REPS_PER_NEW_CARD = 2.5 |
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
<+q::SoundPlay *-1 | |
<+w::SoundPlay *-1 | |
<+e::SoundPlay *-1 | |
<+r::SoundPlay *-1 | |
<+t::SoundPlay *-1 | |
<+a::SoundPlay *-1 | |
<+s::SoundPlay *-1 | |
<+d::SoundPlay *-1 | |
<+f::SoundPlay *-1 | |
<+g::SoundPlay *-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
import random | |
from datetime import date, timedelta | |
from aqt import mw | |
from aqt.qt import * | |
from anki.hooks import addHook | |
from anki.utils import intTime | |
#card.queue: 0=new, -1=suspended |
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 re | |
from aqt import mw | |
from aqt.deckbrowser import DeckBrowser | |
from aqt.qt import * | |
import aqt.forms | |
from aqt.utils import showInfo | |
PREFIX = 'zAQ:' |
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 genanki | |
# models/notes based on genanki README | |
templates = [ | |
{ | |
'name': 'Card 1', | |
'qfmt': '{{Question}}', | |
'afmt': '{{FrontSide}}<hr id="answer">{{Answer}}', |
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
for i in range(1, 100): | |
toPrint = "" | |
if i % 3 == 0: | |
toPrint += "Crackle" | |
if i % 5 == 0: | |
toPrint += "Pop" | |
if toPrint == "": | |
toPrint += str(i) | |
print(toPrint) |
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 os | |
import re | |
from datetime import datetime, timedelta | |
from typing import Optional, List | |
import pytz | |
import requests | |
import sendgrid | |
from bs4 import BeautifulSoup | |
import json |