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
| <div id="marquee_text" class="col-xs-8 col-xs-offset-4 col-sm-6 col-sm-offset-4 col-md-5 col-md-offset-2"> | |
| <h1>Introducing</br>HBO NOW<sup>SM</sup><span id="nowMDash">—</span><br />all you need</br>is the Internet.</h1> | |
| <h5>Stream the standalone service, <br />free* for 30 days.</h5> | |
| <button type="button" class="btn btn-default">Start your trial | |
| <span><span class="arrow-btn"></span></span> | |
| </button> | |
| </div> |
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 sys, os | |
| from twisted.application import internet, service | |
| from twisted.web import server, resource, wsgi, static | |
| from twisted.python import threadpool | |
| from twisted.internet import reactor, protocol | |
| from twisted.internet import defer | |
| from twisted.web.resource import Resource | |
| class TwistedDjangoException(Exception): |
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
| """@datascientist: mnest""" | |
| import os | |
| import time | |
| import logging | |
| import numpy as np | |
| import pandas as pd | |
| from sklearn.ensemble import RandomForestClassifier | |
| from sklearn.externals import joblib |
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
| <html> | |
| <head> | |
| <link rel="stylesheet" href="https://storage.googleapis.com/code.getmdl.io/1.0.2/material.blue_grey-red.min.css" /> | |
| <script src="https://storage.googleapis.com/code.getmdl.io/1.0.0/material.min.js"></script> | |
| <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> | |
| <style> | |
| body { | |
| display: flex; | |
| } |
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 string | |
| def scrabble_dist(a,b,tol): | |
| lettersandnumbers = string.ascii_uppercase + " " + ''.join(map(str, range(10))) | |
| letterValues = dict(zip(lettersandnumbers, [1,3,3,2,1,4,2,4,1,8,5,1,3,1,1,3,10,1,1,1,1,4,4,8,4,10,1,1,1,1,1,1,1,1,1,1,1])) | |
| a_set = set(a.upper()) | |
| b_set = set(b.upper()) | |
| diff_set = a_set.union(b_set) - a_set.intersection(b_set) | |
| def get_sum(letters): | |
| """ | |
| Return the sum of each value in a string of letters. |
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
| from datetime import datetime | |
| import time | |
| import logging | |
| import requests | |
| logger = logging.getLogger(__name__) | |
| class Etsy(object): | |
| """Python Etsy API wrapper mainly used for analytics""" |
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
| from django.db import models | |
| class Listing(models.Model): | |
| listing_id = models.CharField(max_length=20) | |
| user_id = models.CharField(max_length=20) | |
| shop_section_id = models.CharField(max_length=20, null=True) | |
| price = models.IntegerField(null=True) | |
| quantity = models.IntegerField() |
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 java.util.regex.Pattern; | |
| import java.util.regex.Matcher; | |
| public class LittleRegex { | |
| public static void printMatches(String text, String regex) { | |
| Pattern pattern = Pattern.compile(regex); | |
| Matcher matcher = pattern.matcher(text); | |
| // Check all occurrences | |
| while (matcher.find()) { |
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
| """Performs analytics on personal google search history. | |
| Installation: | |
| 1) Get your search history: https://takeout.google.com/settings/takeout | |
| 2) Put this file in the Searches directory | |
| 3) python analyze_google_search_history.py | |
| """ | |
| import glob | |
| import os | |
| import json |
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 re | |
| class MatchDate(object): | |
| """A date object matched from a syllabus.""" | |
| day = 0 | |
| month = 0 | |
| year = 0 | |
| value_words = ["exam","project","assignment","homework","presentation"] |
OlderNewer