## Analyzing police daily activity logs

Introduction How many? When? Introduction The Sacramento Police Department daily activity logs website was always the first I visited when I worked the early morning crime shifts at the Sacramento Bee. A public relations officer updated it every morning with a fairly well-standardized list of notable incidents the department responded to the day before, and… Continue reading Analyzing police daily activity logs

## Bias and Variance

Similar Notebooks bias and variance 8 linear regression penalized regression Copyright © Code Fetcher 2022 Code Fetcher Python Pandas Vlsi Notebooks Machine learning class support material, Universidad Nacional de Colombia, 2013 The purpose of this notebook is to illustrate the bias-variance trade-off when learning regression models from data. We will use and example based on… Continue reading Bias and Variance

## Routing, Arbitrage

Chapter 8 of Real World Algorithms. Panos Louridas Athens University of Economics and Business The Bellman-Ford(-Moore) Algorithm The Bellman-Ford(-Moore) algorithm is an alternative to Dijkstra’s algorithm for finding shortest paths in graphs. The basic idea is that we find the shortest paths from a start node to other nodes by using 1, 2, \$n\$ links,… Continue reading Routing, Arbitrage

## League of legends crawler

primary site for this project: https://tracker.gg/lol This crawler is built using selenium using the firefox webdriver In [1]: from selenium import webdriver from selenium.webdriver.firefox.service import Service as FirefoxService from webdriver_manager.firefox import GeckoDriverManager from selenium.webdriver.common.by import By In [2]: driver = webdriver.Firefox(service=FirefoxService(GeckoDriverManager().install())) driver.get(“https://tracker.gg/lol/leaderboards/stats/all/LeaguePoints?region=NA&queueType=RANKED_SOLO_5x5”) driver.implicitly_wait(3) [WDM] – Downloading: 19.0kB [00:00, 2.11MB/s] North America Leaderboard In [3]: na_leaderboard = driver.find_elements(By.TAG_NAME, ‘tr’)… Continue reading League of legends crawler

## Creating Interactive Visualizations with Bokeh

There have been many examples of useful and exciting data visualizations for a variety of topics and applications. In [1]: from IPython.display import IFrame, HTML from IPython.core.display import display display(IFrame(“http://demographics.coopercenter.org/DotMap/index.html”, ‘800px’, ‘600px’)) In [2]: display(IFrame(“http://www.nytimes.com/interactive/2014/07/31/world/africa/ebola-virus-outbreak-qa.html”, ‘800px’, ‘600px’)) Most of these invlove directly coding JavaScript. Not everyone enjoys writing JavaScript. In [53]: ar.contours(plot, title=”ISO Contours”) show() In [1]: from IPython.core.display… Continue reading Creating Interactive Visualizations with Bokeh

## word2vec visualization

using vis.py ipython notebook version: https://gist.github.com/chezou/3899461aa550f73854a1 original vis.py https://github.com/nishio/mycorpus In [1]: import visword2vec # 単語で作ったモデル vis = visword2vec.visWord2Vec(“recipe_steps.bin”) # フレーズで作ったモデル vis_phrase = visword2vec.visWord2Vec(“recipe_steps-phrase.bin”) loading loaded loading loaded In [2]: def plot_both(word): vis.plot(word) vis_phrase.plot(word) In [3]: plot_both(‘チョコ’) [ 0.21099427 0.11427726] [ 0.19734898 0.13841781] In [4]: vis_phrase.plot(‘義理_チョコ’) [ 0.16700684 0.1221358 ] In [5]: plot_both(‘義理’) [ 0.17986007 0.14094272] [ 0.248188 0.16636363] In [6]: plot_both(‘あつあつ’)… Continue reading word2vec visualization