Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View johnnychen94's full-sized avatar
🚀

Johnny Chen johnnychen94

🚀
  • East China Normal University
  • Shanghai, China
View GitHub Profile
@johnnychen94
johnnychen94 / check_bb_size.py
Last active February 21, 2023 01:39
check the artifact usage of BinaryBuilderBase
#! /usr/bin/env python
import os
import requests
import toml
from tqdm import tqdm
# BinaryBuilderBase:
# UUID: 7f725544-6523-48cd-82d1-3fa08ff4056e
@johnnychen94
johnnychen94 / hello.jl
Last active July 31, 2022 04:50
test curl julia
println("hello world")
x = parse(Float64, ARGS[1])
y = parse(Float64, ARGS[2])
println("x+y = $(x+y)")
@johnnychen94
johnnychen94 / build_monorepo.jl
Last active May 21, 2022 14:41
build the monorepo Images
# setup:
# - install git-filter-repo: https://github.com/newren/git-filter-repo/
repos = readlines("repos")
exclude_files = abspath("path_excludes")
# clone all repositories into a cache folder so that we don't need to re-clone it again
mkpath("workdir")
mkpath("cache")
for repo in repos
@johnnychen94
johnnychen94 / macos_unicode_lookup.md
Created August 24, 2021 08:27
macOS keyboard quick lookup for Julia unicode symbols

macOS keyboard quick lookup for Julia unicode symbols

Check Julia Unicode Input for complete reference.

Code point(s) Character(s) Tab completion sequence(s) macOS keyboard
U+2211 \sum Opt-w
U+00F8 ø \o Opt-o
U+03C0 π \pi Opt-p
U+00E5 å \aa (a\ocirc) Opt-a
@johnnychen94
johnnychen94 / diffwarp_simple_rotation.jl
Last active July 30, 2021 11:19
diffwarp: proof of concept on rotation
using ImageTransformations
using StaticArrays
using Interpolations
using ImageCore
using ImageShow
using TestImages
using ChainRules
using ChainRules: NoTangent, ZeroTangent, @not_implemented
using ChainRulesTestUtils
using Zygote
using Pkg
using Dates
### BEGIN Setup ###
const pkg_servers = [
"https://cn-east.pkg.julialang.org",
"https://kr.pkg.julialang.org",
"https://us-east.pkg.julialang.org",
"https://kr.storage.julialang.org",
"https://us-east.storage.julialang.org",
@johnnychen94
johnnychen94 / install_conda.sh
Created February 28, 2020 15:32
download&install anaconda
#! /bin/bash
# 设置版本及下载源
CONDA_VERSION=2019.10
CONDA_NAME=Anaconda3-${CONDA_VERSION}-Linux-x86_64.sh
CONDA_URL=https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/$CONDA_NAME
# 下载并安装anaconda
echo "Download anaconda from ${CONDA_URL}"
curl -O $CONDA_URL
@johnnychen94
johnnychen94 / brook.service
Last active September 11, 2019 03:50
brook
[Unit]
Description=Brook service
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/brook client -l 127.0.0.1:8080 -i 127.0.0.1 -s vpn.lflab.cn:8989 -p ecnumath --http >> /dev/null 2>&1
Restart=on-failure
[Install]
@johnnychen94
johnnychen94 / checkout_master.jl
Last active May 9, 2019 13:35
install master branch of julia package
using Pkg.TOML: parsefile
using Pkg
STDLIBS = Set([
"Base64",
"CRC32c",
"Dates",
"DelimitedFiles",
"Distributed",
"FileWatching",
"Future",
@johnnychen94
johnnychen94 / settings.json
Last active June 24, 2021 20:28
VSCODE configuration
{
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"editor.cursorStyle": "block",
"editor.detectIndentation": false,
"editor.formatOnPaste": true,
"editor.formatOnType": true,
"editor.fontSize": 13,
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 90,