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 sys | |
import requests | |
def convert_github_url_to_raw(url): | |
raw_url = url.replace("github.com", "raw.githubusercontent.com") | |
raw_url = raw_url.replace("/blob", "") | |
return raw_url | |
def download_and_save(url, filename): | |
raw_url = convert_github_url_to_raw(url) |
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
[Adblock Plus 1.1] | |
! Version: 202304011249 | |
! Title: MyEasyPrivacy | |
! Last modified: 01 Apr 2023 12:49 UTC | |
! Expires: 4 days (update frequency) | |
! *** easylist:template_header.txt *** | |
! | |
! Please report any unblocked adverts or problems | |
! in the forums (https://forums.lanik.us/) | |
! or via e-mail ([email protected]). |
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 | |
matplotlib.rcParams['font.family'] = 'Hiragino Maru Gothic Pro' | |
import matplotlib.pyplot as plt | |
import numpy as np | |
data = [{ | |
"name": "東京の殺人発生率(認知件数をもとに計算)", | |
"rate": "8.89/1000000", | |
"src": "http://grading.jpn.org/Divy2502002.html" |
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
// ==UserScript== | |
// @name Change hl Query To Japanese When Searching Japanese Letters | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.google.com/search* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=google.com | |
// @grant none | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name Change Default To "Following" Tab, Not "For You" Tab | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://twitter.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com | |
// @grant none | |
// ==/UserScript== |
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
func_wrapper_line = '@profile\ndef main():\n' | |
lines = list(open('main.py').readlines()) | |
insert_pos = 0 | |
if lines[0].startswith('#!'): | |
insert_pos = 1 | |
generated_lines = [] | |
for i, line in enumerate(lines): | |
if i == insert_pos: |
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
const debug = v => { console.log('debug', v); return v; } | |
// https://github.com/anuraghazra/github-readme-stats/blob/4e2f631f956a49efde2bc5883e5ce51891621c44/src/getStyles.js#L5 | |
const reverseProgress = (progress) => { | |
const radius = 40; | |
const c = Math.PI * (radius * 2); | |
return 100 * (progress / c) | |
} |
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
$ ln -s /usr/local/Cellar/[email protected]/3.10.1/Frameworks/Python.framework/Versions/3.10/include/python3.10/* /usr/local/include | |
$ which gj | |
gj: aliased to /usr/local/Cellar/gcc/11.2.0_3/bin/g++-11 -D GLIBCXX_DEBUG -Wl,-demangle -std=c++17 -Wall -Werror -fsanitize=undefined -O2 -g | |
$ which aa | |
aa () { | |
if [[ -z $1 ]] | |
then | |
./a.out | |
else |
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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "clang++ - Build and debug active file", | |
"type": "cppdbg", | |
"request": "launch", |
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
class Color: | |
def __init__(self, red, green, blue): | |
self.red = red | |
self.green = green | |
self.blue = blue | |
def __add__(self, other): | |
return Color( | |
self.red + other.red, | |
self.green + other.green, |
NewerOlder