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
/** | |
* Move in a circle without wrapper elements | |
* Idea by Aryeh Gregor, simplified by Lea Verou | |
*/ | |
@keyframes rot { | |
from { | |
transform: rotate(0deg) | |
translate(-150px) | |
rotate(0deg); |
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 pandas as pd | |
import pathlib | |
import sys | |
import uuid | |
import shutil | |
df = pd.read_csv('data/train.csv') | |
f = open("data/labels.csv","a") | |
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.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 |
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
/* | |
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'); |
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
/* | |
https://twitter.com/jacobmparis/status/1245193222181326848?s=21 | |
*/ | |
.center{ | |
text-align: center; | |
align-items: center; | |
align-content: center; | |
justify-content: center; | |
justify-self: center; | |
justify-items: center; |
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.
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 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; |