Skip to content

Instantly share code, notes, and snippets.

View Luolc's full-sized avatar
:octocat:
Sleeping

LoLo Luolc

:octocat:
Sleeping
View GitHub Profile
@Luolc
Luolc / generate.py
Last active November 11, 2020 02:40
import argparse
import os
import numpy as np
import math
import sys
import pdb
import torchvision.transforms as transforms
from torch.utils.data import DataLoader
#! /bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
#=================================================================#
# System Required: CentOS 6,7, Debian, Ubuntu #
# Description: One click Install ShadowsocksR Server and BBR #
# Thanks: @breakwa11 <https://twitter.com/breakwa11> #
# Thanks: @Teddysun <i@teddysun.com> #
# Thanks: @91yun https://www.91yun.org/archives/2079 #
# Improved by Suiyuanjian #

欢迎大家报名 PKU Helper 开发组招新。

在安排后续面试之前,我们还需要大家再补充一些信息。各个岗位的要求不同,大家可以根据自己的意向,查看相应的部分即可。

开发

如果你希望成为 PKU Helper 开发者,请尝试给出以下三道题目的解答。

第一题为入门水平;第二题考察工程水平;第三题是一道简单的算法题,区分一下 OI 选手。

[
{
"name": "AbbreviationAsWordInNameCheck",
"packageName": "com.puppycrawl.tools.checkstyle.checks.naming",
"parent": "TreeWalker",
"interfaces": [
"com.puppycrawl.tools.checkstyle.api.Configurable",
"com.puppycrawl.tools.checkstyle.api.Contextualizable"
],
"hierarchies": [
@Luolc
Luolc / checkstyle_modules_2a387572.json
Created August 21, 2017 08:02
checkstyle extract info: CS commit 2a387572
[
{
"name": "AbbreviationAsWordInNameCheck",
"packageName": "com.puppycrawl.tools.checkstyle.checks.naming",
"parent": "TreeWalker",
"interfaces": [
"com.puppycrawl.tools.checkstyle.api.Configurable",
"com.puppycrawl.tools.checkstyle.api.Contextualizable"
],
"hierarchies": [
@Luolc
Luolc / checkstyle_modules_cc63d4f345211ba8befee3002d6b97c3898d3264.json
Created July 11, 2017 02:24
checkstyle extract info: CS commit cc63d4f345211ba8befee3002d6b97c3898d3264
[
{
"name": "AbbreviationAsWordInNameCheck",
"packageName": "com.puppycrawl.tools.checkstyle.checks.naming",
"parent": "TreeWalker",
"interfaces": [
"com.puppycrawl.tools.checkstyle.api.Configurable",
"com.puppycrawl.tools.checkstyle.api.Contextualizable"
],
"hierarchies": [
@Luolc
Luolc / wechat-bot-add-room-members.md
Last active May 18, 2017 17:06
A ts script for adding all the members in GSoC WeChat room.

I was willing to add all the members in GSoC WeChat room today. But I thought it so clumsy after sending 10 friend requests mannually. So I wrote this simple script to help me.

bot.ts:

import {Wechaty, Room, FriendRequest} from "wechaty";

Wechaty.instance()
    .on('scan', (url, code) => {
      let loginUrl = url.replace('qrcode', 'l');
 require('qrcode-terminal').generate(loginUrl);
@Luolc
Luolc / A10.java
Created April 13, 2017 08:54
checkstyle issue#4082 A10
public class A10 {
public static int createData() {
final int random = (int) Math.random();
if (random > 0) {
throw new NullPointerException("BufferedImage cannot be null");
}
final int sData;
switch ((int) Math.random()) {
case 0:
sData = 0;
@Luolc
Luolc / A7.java
Created April 13, 2017 08:44
checkstyle issue#4082 A7
public class A7 {
void dropLocationForPoint() {
final int parent;
final int random = (int) Math.random();
switch(random) {
case 0:
case 1:
if (random > 0) {
} else {
}
@Luolc
Luolc / A4.java
Created April 13, 2017 08:36
checkstyle issue#4082 A4
public class A4 {
public String toString() {
final String ret;
final int random = (int) Math.random();
switch (random) {
case 0:
ret = "EOF";
break;
case 1:
ret = "EOL";