This file contains hidden or 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
from zzz_pull_sim import prob_survive as p1, PullBatch as R1, PullType | |
from zzz_pull_sim_conv import prob_survive as p2, PullBatch as R2 | |
import time | |
def assert_close(a, b, eps=1e-9): | |
assert abs(a - b) < eps, f"{a} is not close to {b}" | |
This file contains hidden or 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
from GGanalysis.games import zenless_zone_zero as zzz | |
from GGanalysis import FiniteDist | |
from typing import List | |
from dataclasses import dataclass, field | |
@dataclass | |
class PullBatch: | |
pull_num: int |
This file contains hidden or 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
from GGanalysis.games import zenless_zone_zero as zzz | |
from GGanalysis import FiniteDist | |
from typing import List | |
from dataclasses import dataclass, field | |
from enum import Enum | |
from functools import cache | |
class PullType(Enum): |
This file contains hidden or 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 Disable full screen api in Youtube | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0 | |
// @description When wathcing Youtube, double click won't enable fullscreen mode. | |
// @author luanjunyi@gmail.com | |
// @match https://www.youtube.com/watch* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=hibbard.eu | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or 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 aiohttp | |
import asyncio | |
import sys | |
import random | |
async def fetch(session, url, task_id): | |
user_agent = 'MAGA 2020, American First Observer %d' % random.randint(1, 111000) | |
headers = { | |
'User-Agent': user_agent | |
} |
This file contains hidden or 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
#! /bin/bash | |
name=$1 | |
if [[ "$name" =~ [A-Z] ]]; then | |
# convert camel case to snake case | |
echo $name | sed -r 's/([A-Z])/_\L\1/g' | sed 's/^_//g' | |
else | |
# convert snake case to camel case | |
echo $name | sed -r 's|_([a-z])|\U\1|g' | |
echo $name | sed -r 's|_([a-z])|\U\1|g' | sed 's|^\([a-z]\)|\u\1|' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
# Configuration file for ipython. | |
c = get_config() | |
#------------------------------------------------------------------------------ | |
# InteractiveShellApp configuration | |
#------------------------------------------------------------------------------ | |
# A Mixin for applications that start InteractiveShell instances. | |
# |
This file contains hidden or 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
.sanguosha.com | |
.07073.com | |
.10010.com | |
.114la.com | |
.115.com | |
.123cha.com | |
.126.net | |
.127.net | |
.13580.com | |
.159.com |
This file contains hidden or 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
[user] | |
name = Jerry Luan | |
email = luanjunyi@gmail.com | |
[credential] | |
helper = osxkeychain | |
[alias] | |
ci = commit | |
co = checkout | |
br = branch | |
st = status |