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
<!doctype html> | |
<html ng-app="toDoApp" ng-controller="toDoController"> | |
<head> | |
<title>Tasks App</title> | |
<script src="angular.js"></script> | |
<style> | |
body { | |
color: #444; | |
font-size: 14px; | |
font-family: "Roboto", sans-serif; |
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
#!/usr/bin/env python | |
from __future__ import print_function | |
import os | |
import signal | |
from time import sleep | |
# TODO: Install Selenium and PhantomJS | |
from selenium import webdriver |
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 | |
HEADERS = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36'} | |
LOGIN_URL = 'https://www.edline.net/InterstitialLogin.page' | |
LOGIN_POST_URL = 'https://www.edline.net/post/InterstitialLogin.page' | |
class Edline(object): |
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
#!/usr/bin/env python | |
"""calc.py: A concise prefix notation calculator.""" | |
import regex # pip install regex | |
def calc_eval(exp): | |
"""Evaluates the given prefix notation expression. | |
Raises a SyntaxError if the input is not valid. |
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
# Based on https://stats.stackexchange.com/a/57254 | |
# Before running, look at all comments starting with XXX below | |
library('car') | |
library('compute.es') | |
library('effects') | |
library('emmeans') | |
library('ggplot2') | |
library('multcomp') | |
library('pastecs') |
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 java.util.Arrays; | |
public class QuikMaths { | |
public static void multiplyBy3(int[] A) { | |
for (int x: A) { | |
x = x * 3; | |
} | |
} | |
public static void multiplyBy2(int[] A) { | |
int[] B = A; |
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
#!/usr/bin/env python | |
""" | |
Created by Allen Guo <allenguo@berkeley.edu> for CS 61A Fall 2017. | |
Dependencies: Selenium configured for Chrome (see https://goo.gl/WBXMhf). | |
Before running: | |
- Fill out the constants below. Double check all of them! | |
- Open Piazza and switch to the CS 61A Piazza. Make sure you're not on a |
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
// This program is free software: you can redistribute it and/or modify | |
// it under the terms of the GNU General Public License as published by | |
// the Free Software Foundation, either version 3 of the License, or | |
// (at your option) any later version. | |
// | |
// This program is distributed in the hope that it will be useful, | |
// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
// GNU General Public License for more details. |
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
\documentclass{article} | |
% imports and settings | |
\usepackage{fullpage} % wider margins | |
\usepackage{amsmath} % symbols | |
\usepackage{amsfonts} % more symbols | |
\usepackage{verbatim} % comment environment | |
\usepackage{float} % stop tables from moving | |
\usepackage{hyperref} % URLs, e.g., \href{url}{text} | |
\usepackage{graphicx} % graphics (see \img below) |
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
#!/usr/bin/env python | |
def change(cents, remaining): | |
if cents == 0: | |
return 1 | |
if not remaining: | |
return 0 | |
s = 0 | |
amt = cents | |
while amt >= 0: |
NewerOlder