OpenWRT 的一套配置,用于在教育网宿舍里的路由器上部署,使得子网内的设备可以获取到全球路由的 IPv6 地址。
上海交通大学闵行校区大部分宿舍。宿舍网络通过 DHCPv6 下发 IPv6 地址(不支持 PD),因而路由器得到的是 /128 地址,无法再次分配给子网内设备。
#!/usr/bin/env bash | |
docker run -it --privileged --network pub_net skyzh/iptables-playground bash |
const {Builder, By, Key, until} = require('selenium-webdriver'); | |
let processed_text = {}; | |
(async function do_fetch() { | |
let driver = await new Builder().forBrowser('chrome').build(); | |
try { | |
await driver.get('http://web2.qq.com'); | |
while(true) { | |
await driver.wait(until.elementLocated(By.id("panelTitle-5"))); |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
const int N = 12; | |
int queen_status[N]; | |
/* | |
* AAAA |
#include <iostream> | |
#include <algorithm> | |
#include <queue> | |
#include <vector> | |
using namespace std; | |
struct queue_item { | |
int x, y; | |
int step; |
const data = require('./data.json'); | |
const reg = { | |
time: /星期(.*?)[ ]+第(.*?)节--第(.*?)节/, | |
header: /行课安排为第(.*?)-(.*?)周?,其中:/, | |
loc: /(.*?)\((.*?)-(.*?)周\)[ ]+(.*?)\((.*?)-(.*?)周\)/, | |
loc_unknown: /[ ]*(.*?)[ ]+(.*?)\((.*?)-(.*?)周\)/, | |
bi_week: /(单|双)周/ | |
}; | |
const fetch_data = { | |
header: ["week_start", "week_end"], |
const data = require('./data'); | |
const _ = require('lodash'); | |
const moment = require('moment'); | |
const ics = require('ics'); | |
const fs = require('fs'); | |
const timePeriod = (date, from, to) => { | |
const _from = moment(`${date} ${data.timetable.data[from - 1]}:00`); | |
const _end = moment(`${date} ${data.timetable.data[to - 1]}:00`).add(data.timetable.length, 'minute'); | |
return [_from, _end]; |
/****************************************************************************** | |
/// @brief | |
/// @copyright Copyright (c) 2017 <dji-innovations, Corp. RM Dept.> | |
/// @license MIT License | |
/// Permission is hereby granted, free of charge, to any person obtaining a copy | |
/// of this software and associated documentation files (the "Software"), to deal | |
/// in the Software without restriction,including without limitation the rights | |
/// to use, copy, modify, merge, publish, distribute, sublicense,and/or sell | |
/// copies of the Software, and to permit persons to whom the Software is furnished | |
/// to do so,subject to the following conditions: |
import matplotlib.pyplot as plt | |
from matplotlib import animation | |
from numpy import random | |
LINE_NUM = 6 | |
DATA_NUM = 100 | |
LABEL=["ax","ay","az","gx","gy","gz"] | |
fig = plt.figure() | |
ax = plt.axes(xlim=(0, DATA_NUM), ylim=(-5000, 5000)) |
import numpy as np | |
import cv2 | |
import pyzbar.pyzbar as pyzbar | |
cap = cv2.VideoCapture(0) | |
def decode(im) : | |
# Find barcodes and QR codes | |
decodedObjects = pyzbar.decode(im) | |