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
''' | |
A scholar metadata provider for calibre-web, based on the Cross Ref API(https://github.com/fabiobatalha/crossrefapi) | |
Author: Terence Lau | |
LICENSE: MIT | |
''' | |
import itertools | |
from typing import Dict, List, Optional | |
from urllib.parse import quote, unquote |
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
version: '3' | |
services: | |
derper: | |
container_name: derper | |
image: <domain-name>/fredliang/derper:latest | |
ports: | |
- '<port-for-derp>:<port-for-derp>' | |
- '3478:3478/udp' | |
environment: | |
- DERP_DOMAIN=derp.rho.ac.cn |
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 torch | |
import torch.nn as nn | |
import torchvision | |
import numpy as np | |
## U-Net ## | |
class DualConv(nn.Module): | |
def __init__(self, in_channel, out_channel): | |
super(DualConv, self).__init__() |
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
rules: | |
## Acadamic | |
- DOMAIN-SUFFIX,acm.org,DIRECT | |
- DOMAIN-SUFFIX,acs.org,DIRECT | |
- DOMAIN-SUFFIX,aip.org,DIRECT | |
- DOMAIN-SUFFIX,ams.org,DIRECT | |
- DOMAIN-SUFFIX,annualreviews.org,DIRECT | |
- DOMAIN-SUFFIX,aps.org,DIRECT | |
- DOMAIN-SUFFIX,ascelibrary.org,DIRECT | |
- DOMAIN-SUFFIX,asm.org,DIRECT |
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
sudo modprobe overlay && sudo modprobe br_netfilter | |
cat <<EOF | sudo tee /etc/modules-load.d/containerd.conf | |
overlay | |
br_netfilter | |
EOF | |
cat <<EOF | sudo tee /etc/sysctl.d/99-kubernetes-cri.conf | |
net.bridge.bridge-nf-call-iptables = 1 | |
net.ipv4.ip_forward = 1 | |
net.bridge.bridge-nf-call-ip6tables = 1 |
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
version: "3" | |
services: | |
outline: | |
image: outlinewiki/outline | |
env_file: ./docker.env | |
command: sh -c "yarn sequelize:migrate --env production-ssl-disabled && yarn start" | |
ports: | |
- "3000:3000" | |
depends_on: |
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
from torch import nn | |
def CausalConv1d(in_channels, out_channels, kernel_size, dilation=1, **kwargs): | |
pad = (kernel_size - 1) * dilation + 1 | |
return nn.Conv1d(in_channels, out_channels, kernel_size, padding = pad, dilation = dilation, **kwargs) | |
def CasalConv2d(in_channels, out_channels, kernel_size, dilation=1, **kwargs): | |
pad = (kernel_size - 1) * dilation + 1 | |
return nn.Conv2d(in_channels, out_channels, kernel_size, padding = pad, dilation = dilation, **kwargs) |
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
#### AUTOMATIC TUNNEL WITH CLOUDFLARE SCRIPT #### | |
jupyterhub & cloudflared tunnel --url http://localhost:8000 | |
code-server --auth=none -p 8001 & cloudflared tunnel --url http://localhost:8001 |
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
#!/bin/bash | |
function loadFile(){ | |
mysql -u"[USERNAME]" -p"[USERNAME]" --local-infile=1 [DATABASE_NAME] << EOF | |
SET GLOBAL local_infile = 'ON'; | |
LOAD DATA LOCAL INFILE "$1" INTO TABLE $2 | |
COLUMNS TERMINATED BY ',' | |
OPTIONALLY ENCLOSED BY '"' | |
ESCAPED BY '"' | |
LINES TERMINATED BY '\n' |
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
from __future__ import print_function | |
from __future__ import unicode_literals | |
import os | |
import io | |
import time | |
import requests | |
import argparse | |
import zipfile | |
__author__ = 'John Beieler, johnbeieler.org' |
NewerOlder