- 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 hidden or 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 org.apache.spark.ml.Transformer | |
| import org.apache.spark.ml.param.{ ParamMap, Param } | |
| import org.apache.spark.ml.util.{ Identifiable, DefaultParamsWritable, DefaultParamsReadable } | |
| import org.apache.spark.sql.functions.{ udf, col } | |
| import org.apache.spark.sql.types.{ StructType, StructField, DoubleType } | |
| import org.apache.spark.sql.{ Dataset, DataFrame } | |
| object EditDistance extends DefaultParamsReadable[EditDistance] { | |
| override def load(path: String): EditDistance = super.load(path) |
This file contains hidden or 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/local/bin/python | |
| # !/usr/bin/env python | |
| from __future__ import division, print_function | |
| import random | |
| import sys | |
| from datetime import datetime | |
| import numpy as np | |
| import slackweb |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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; |