- Does this cover any code you've personally worked on in the past 6 months? -- If so, you'll want to do a more thorough review to ensure it doesn't cause you any later headaches
- Will you have to work on this code or area of the codebase in the future? -- Also a good reason to do a more thorough review of the code base.
- Is the code cleanly formatted? (whitespace, code organization, commenting, etc)
- Do the tests pass?
- Is there commented code that can be removed?
- If function calls are removed, do those functions get called anywhere else? and if not can the function itself be removed?
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
pub fn int_from_bytes(x: &[u8]) -> i64 { | |
from_utf8(x).unwrap().parse::<i64>().unwrap() | |
} | |
pub fn float_from_bytes(x: &[u8]) -> f64 { | |
from_utf8(x).unwrap().parse::<f64>().unwrap() | |
} | |
named!(pub number<&[u8], i64>, | |
do_parse!(opt!(multispace) >> |
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 | |
import urllib.error | |
import urllib.parse | |
import urllib.request | |
from social.backends.oauth import BaseOAuth2 | |
class AsanaOAuth2(BaseOAuth2): | |
"""Asana OAuth authentication backend""" |
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 | |
import random | |
import string | |
import numpy as np | |
import pandas as pd | |
from faker import Faker | |
from tqdm import tqdm |
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
#!python | |
#cython: boundscheck=False | |
#cython: wraparound=False | |
#cython: cdivision=True | |
cimport cython | |
import sys | |
from collections import namedtuple | |
import numpy as np |
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 offensive_score(player): | |
score = 0 | |
score += player['passing_yds']*0.04 | |
score += player['passing_tds']*4 | |
score += player['passing_int']*-1 | |
score += player['rushing_yds']*0.1 | |
score += player['rushing_tds']*6 | |
score += player['receiving_rec']*0.5 | |
score += player['receiving_yds']*0.1 | |
score += player['receiving_tds']*6 |
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
macro_rules! caseless_tag ( | |
($i:expr, $inp: expr) => ( | |
{ | |
#[inline(always)] | |
fn as_lower(b: &str) -> String { | |
let s = b.to_string(); | |
s.to_lowercase() | |
} | |
let expected = $inp; |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 8.
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
date,hosted_by,dl,ul,results_img | |
2016-02-08 11:03:14,"Hosted by Utah Education Network (Salt Lake City, UT) [8.73 km]: 25.578 ms",662.45,110.55,http://www.speedtest.net/result/5069169190.png | |
2016-02-08 11:03:14,"Hosted by Utah Education Network (Salt Lake City, UT) [8.73 km]: 25.578 ms",662.45,110.55,http://www.speedtest.net/result/5069169190.png | |
2016-02-07 08:03:21,"Hosted by Utah Education Network (Salt Lake City, UT) [8.26 km]: 26.077 ms",136.70,108.52,http://www.speedtest.net/result/5066107780.png | |
2016-01-27 05:03:10,"Hosted by Utah Education Network (Salt Lake City, UT) [9.41 km]: 29.196 ms",374.00,117.15,http://www.speedtest.net/result/5033314995.png | |
2016-01-27 02:03:17,"Hosted by Utah Education Network (Salt Lake City, UT) [9.41 km]: 25.664 ms",230.01,103.32,http://www.speedtest.net/result/5032918852.png | |
2016-01-26 23:03:22,"Hosted by Utah Education Network (Salt Lake City, UT) [9.41 km]: 25.882 ms",171.36,116.52,http://www.speedtest.net/result/5032590592.png | |
2016-01-26 20:03:15,"Hosted by Utah Educati |
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 bash | |
# Place this script in a directory that preceeds the location of | |
# the real ansible-playbook script in your PATH. When run, it | |
# will add passwords found in the .ansible-vars file, then call | |
# the real ansible-playbook script. | |
set -e | |
#set -x |
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
unbind C-b | |
set -g prefix C-Space | |
set -g mode-keys vi | |
# Set XTerm key bindings | |
setw -g xterm-keys on | |
# Set XTerm overrides | |
set -g terminal-overrides "xterm*:XT:smcup@:rmcup@" |