Skip to content

Instantly share code, notes, and snippets.

Avatar

Vladimir Iakovlev nvbn

View GitHub Profile
@nvbn
nvbn / generate.py
Created Aug 29, 2018
Bob's Burgers to The Simpsons with TensorFlow
View generate.py
from pathlib import Path
from typing import NamedTuple
from collections import defaultdict
from datetime import timedelta
from subprocess import call
from pycaption.srt import SRTReader
import lxml.html
import tensorflow as tf
import tensorflow_hub as hub
import numpy as np
@nvbn
nvbn / app.py
Last active Jul 21, 2020
Sound lights with spotify, esp8266 and neopixel strip
View app.py
from __future__ import annotations
import array
import asyncio
from bisect import bisect_left
from dataclasses import dataclass
import logging
import os
import socket
import time
@nvbn
nvbn / App.js
Last active Mar 10, 2020
Hooks with classes
View App.js
import React from "react";
import Counter from "./Counter";
const App = () => {
return (
<div className="App">
<Counter initialCount={100} />
</div>
);
};
View commute.py
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')
View lines
test.v2 0 1580115600
test.v2 0 1580115660
test.v2 1 1580115720
test.v2 3 1580115780
test.v2 2 1580115840
test.v2 2 1580115900
test.v2 10 1580115960
test.v2 10 1580116020
test.v2 12 1580116080
test.v2 0 1580116140
@nvbn
nvbn / playlist.ipynb
Last active Oct 18, 2019
Playlist analysis
View playlist.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Summer trip adventure.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View community_opinion.pm
from datetime import datetime
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter
from nltk.sentiment.vader import SentimentIntensityAnalyzer
import praw
options = dict(client_id='',
client_secret='',
user_agent='')
@nvbn
nvbn / find.py
Created Jul 9, 2018
trip planner
View find.py
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
@nvbn
nvbn / add_ngrams.py
Last active Jan 8, 2019
Extracting popular topics from subreddits
View add_ngrams.py
from datetime import datetime
import json
from functools import lru_cache
from multiprocessing import Pool
import sys
from nltk.tokenize import word_tokenize, sent_tokenize
from nltk.corpus import stopwords
from nltk.util import ngrams
from nltk import WordNetLemmatizer, pos_tag
You can’t perform that action at this time.