Skip to content

Instantly share code, notes, and snippets.

Ready for the next challenge

Jolyon jolyon129

Ready for the next challenge
View GitHub Profile
jolyon129 /
Last active Aug 10, 2020 — forked from int128/
Spring Web filter for logging request and response
import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.filter.OncePerRequestFilter;
import org.springframework.web.util.ContentCachingRequestWrapper;
import org.springframework.web.util.ContentCachingResponseWrapper;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
jolyon129 /
Created Apr 8, 2020 — forked from dergachev/
VIM snippet to show diff of unsaved changes.

Let's say you're editing a file in VIM, and want to see a diff between your current unsaved version and what's on the hard disk. Turns out you can just type this:

:w !git diff --no-index % -

What this does it pipes the whole contents of the current file to the command git diff --no-index % - The % symbol is substituted by vim to be the path to the saved file. The - tells git diff to read from STDIN.

jolyon129 / center.css
Created Apr 1, 2020
The Ultimate Centering in CSS
View center.css
text-align: center;
align-items: center;
align-content: center;
justify-content: center;
justify-self: center;
justify-items: center;
jolyon129 /
Created Mar 27, 2020 — forked from kevin-smets/
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)





jolyon129 / bulk-delete-weibo.js
Last active Mar 7, 2020
Automate bulk delete weibo though web weibo. 批量删除微博
View bulk-delete-weibo.js
Sign in to weibo webside.
Click on your home page.
Paste the following code into the console and enter.
'use strict';
var s = document.createElement('script');
jolyon129 /
Created Feb 28, 2020
Draw k-fold roc curves for multiple classifiers and plot them in the same figure
import matplotlib.pyplot as plt
import numpy as np
from numpy import interp
from sklearn import metrics
from sklearn.metrics import precision_recall_fscore_support
from sklearn.model_selection import KFold
def k_fold_roc_plot(cls, Xs, y, verbose=False):
""" Plot 10-fold Mean ROC
jolyon129 /
Created Jan 31, 2019 — forked from sariabod/
Break up training set into train/valid splits.
import pandas as pd
import pathlib
import sys
import uuid
import shutil
df = pd.read_csv('data/train.csv')
f = open("data/labels.csv","a")
jolyon129 / dabblet.css
Last active Aug 29, 2015 — forked from LeaVerou/dabblet.css
Move in a circle without wrapper elements
View dabblet.css
* Move in a circle without wrapper elements
* Idea by Aryeh Gregor, simplified by Lea Verou
@keyframes rot {
from {
transform: rotate(0deg)