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
import wandb | |
import torch.multiprocessing as mp | |
wandb.init(project="test", entity="leoleoasd", group="123") | |
def train(group): | |
wandb.init(project="test", entity="leoleoasd", group=group) | |
wandb.log({ | |
'loss': 1 | |
}) |
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
\ProvidesPackage{psql} | |
\RequirePackage{minted} | |
\RequirePackage{fancyvrb} | |
\RequirePackage{tcolorbox} | |
\def\run{\FV@Environment{}{run}} | |
\def\FVB@run{% | |
\@bsphack | |
\begingroup | |
\FV@UseKeyValues | |
\FV@DefineWhiteSpace |
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
#!/usr/bin/env python3 | |
import os | |
import json | |
import sys | |
import argparse | |
import requests | |
import re | |
from os.path import expanduser | |
def main(): |
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
#cloud-config | |
autoinstall: | |
apt: | |
geoip: true | |
preserve_sources_list: false | |
primary: | |
- arches: [amd64, i386] | |
uri: http://mirrors.tuna.tsinghua.edu.cn/ubuntu | |
- arches: [default] | |
uri: http://ports.ubuntu.com/ubuntu-ports |
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
for(let i of $("div.TiMu").toArray()){ | |
question = i.querySelector("p").innerText; | |
answers = Array.from(i.querySelectorAll("li")).map(v => v.innerText.replace("\n\n", "")); | |
correct = i.querySelector(".Py_answer span").innerText; | |
q.push({question, answers, correct}) | |
} |
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
# Heavily depends on: | |
# libqrencode (fukuchi.org/works/qrencode/) | |
# paperkey (jabberwocky.com/software/paperkey/) | |
# zbar (zbar.sourceforge.net) | |
# Producing the QR codes: | |
# Split over 4 codes to ensure the data per image is not too large. | |
gpg --export-secret-key KEYIDGOESHERE | paperkey --output-type raw | base64 > temp | |
split temp -n 4 IMG | |
for f in IMG*; do cat $f | qrencode -o $f.png; done |
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 新版正方教务系统导出课程表 | |
// @namespace http://tampermonkey.net/ | |
// @version 4.0 | |
// @description 通过对新版正方教务系统的课表页面的解析,实现导出一个适用于大部分ics日历的文件 | |
// @author 31415926535x | |
// @modified_by leoleoasd | |
// @compatible chrome | |
// @compatible firefox | |
// @license MIT |
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
# use pinyin-comp to perform completion based upon pinyin acronym | |
function _pinyin_comp() | |
{ | |
# chsdir print one candidate per line | |
# this looks weird, bug IFS='\n' does not work in interactive shell | |
local IFS=$'\n' | |
reply = ($(~/.oh-my-zsh/pinyin-test 0 $*)) | |
echo reply | |
# reply=($(pinyin-comp 0 $*)) |
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
start_time = 0 | |
end_time = 60 | |
from manimlib.imports import * | |
from manimlib import constants | |
from numpy import sin, cos | |
import numpy as np | |
import scipy.integrate as integrate | |
# Stolen from https://matplotlib.org/3.1.1/gallery/animation/double_pendulum_sgskip.html |
NewerOlder