View prelims.diff
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
diff --git a/prelims/handler.py b/prelims/handler.py | |
index d4d416d..014bc7d 100644 | |
--- a/prelims/handler.py | |
+++ b/prelims/handler.py | |
@@ -1,16 +1,18 @@ | |
from .post import Post | |
import os | |
- | |
+from pathlib import Path |
View code-server.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View ex2-3_plot_saled_prediction.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View pytd_simple.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View github_vulns.py
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 requests | |
class GitHubClient: | |
def __init__(self, apikey, session=None): | |
self.headers = {"Authorization": f"Bearer {apikey}"} | |
if not session: | |
self.sess = requests.Session() | |
else: | |
self.sess = session |
View plot_prophet_with_mpl.py
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 matplotlib as mlp | |
import pandas as pd | |
mlp.use("agg") | |
from matplotlib import pyplot as plt | |
from matplotlib.dates import ( | |
MonthLocator, | |
num2date, | |
AutoDateLocator, | |
AutoDateFormatter, |
View mt2md.rb
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
#!/usr/bin/env ruby | |
# Forked from: http://hamasyou.com/blog/2014/02/13/movable-type-to-octopress/ | |
require 'date' | |
require 'mustache' | |
require 'stringex' | |
require 'cgi' | |
require 'reverse_markdown' |
View as_msgpack_stream.R
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
devtools::install_github("crowding/msgpack-r") | |
library(msgpack) | |
x <- data.frame(a=1:3, b=4:6) | |
conn <- gzfile("test.msgpack.gz", open="w+b") | |
apply(x, 1, function(x) {writeMsg(c(x, time=as.integer(Sys.time())), conn)}) | |
flush(conn) | |
close(conn) |
View rand.dig
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
+t1_1: | |
py>: rand.rand_params | |
docker: | |
image: 'digdag/digdag-python:3.6.8-stretch' | |
n_iter: 5 | |
+t1_2: | |
echo>: ${param_list} | |
+t1_3: |
View calc_multiclass_precision_recall.sql
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
with agg as ( | |
select | |
p.label, p.probability, t.survived | |
from | |
prediction_rf p | |
join | |
test t on (p.rowid = t.rowid) | |
order by | |
probability desc | |
), |
NewerOlder