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 | |
from datetime import date, datetime, timedelta | |
from collections import defaultdict, namedtuple | |
from multiprocessing import Pool, cpu_count | |
import csv | |
from operator import itemgetter | |
from heapq import merge | |
from itertools import islice | |
from dateutil.parser import parse |
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
from collections import Counter | |
import requests | |
from pycaption.srt import SRTReader | |
import lxml.html | |
from nltk.corpus import stopwords | |
from nltk.tokenize import word_tokenize | |
from nltk.stem import WordNetLemmatizer | |
lang = 'en-US' | |
path = '' |
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 | |
from datetime import datetime | |
from collections import namedtuple | |
from itertools import groupby, takewhile | |
from statistics import median, mean | |
from matplotlib import pyplot | |
import numpy as np | |
from geopy.distance import geodesic | |
Point = namedtuple('Point', 'latitude, longitude, datetime') |
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
package wrapper | |
import ( | |
"os/exec" | |
"os" | |
"sync" | |
"github.com/kr/pty" | |
"github.com/creack/termios/raw" | |
"github.com/creack/termios/win" | |
"io" |
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
const { app, BrowserWindow, TouchBar } = require('electron'); | |
const { TouchBarLabel, TouchBarButton } = TouchBar; | |
const count = 8; | |
const interval = 500; | |
const colors = [ | |
'#ff0000', | |
'#00ff00', | |
'#0000ff', | |
'#ffff00', |
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
// android/app/src/main/java/com/YOUR_APP/webview/WebViewWrapperManager.java | |
package com.YOUR_APP.webview; | |
import android.webkit.WebView; | |
import com.facebook.react.views.webview.ReactWebViewManager; | |
import com.facebook.react.uimanager.ThemedReactContext; | |
public class WebViewWrapperManager extends ReactWebViewManager { | |
private static final String REACT_CLASS = "RCTWebViewWrapper"; |
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
from collections import Counter | |
import tweepy | |
import networkx | |
from matplotlib import cm, pyplot | |
TWITTER_CONSUMER_KEY = '' | |
TWITTER_CONSUMER_SECRET = '' | |
TWITTER_ACCESS_TOKEN = '' | |
TWITTER_ACCESS_TOKEN_SECRET = '' |
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
from abc import ABC, abstractmethod | |
from typing import List, NamedTuple, Iterable, Any, TypeVar, Generic, Callable | |
import matplotlib.pyplot as plt | |
from line_profiler import LineProfiler | |
ComplexityLogEntry = NamedTuple('ComplexityLogEntry', [('size', int), | |
('hits', int)]) | |
class BaseComplexityAssumption(ABC): |
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
from __future__ import absolute_import | |
from __future__ import division | |
from __future__ import print_function | |
def _py_backwards_merge_dicts(dicts): | |
result = {} | |
for dict_ in dicts: | |
result.update(dict_) |
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
#include <iostream> | |
#include <sstream> | |
#include <regex> | |
using namespace std; | |
class Validator { | |
public: | |
Validator(istream &in) : in_(in) {} |