Skip to content

Instantly share code, notes, and snippets.

View RiseInRose's full-sized avatar
🎯
Focusing

Ori RiseInRose

🎯
Focusing
View GitHub Profile
@RiseInRose
RiseInRose / scan_isp_blocklist.sh
Created December 3, 2020 14:17 — forked from vfreex/scan_isp_blocklist.sh
Test which TCP ports are blocked by my ISP
#!/bin/bash
for port in {1..9999}; do
echo -n "TCP $port: "
result=$(nc "$1" "$port" -w 1 2>&1 < /dev/null)
if [ "$?" -eq 0 ]; then
echo "Open"
continue
fi
if [[ "$result" == *refused* ]]; then
@RiseInRose
RiseInRose / flask.py
Created March 20, 2020 10:57 — forked from kageurufu/flask.py
Flask-WTF FieldLists with Dynamic Entries
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.wtf import Form
from flask.ext.babel import gettext
from wtforms import SelectField, TelField, TextField, FormField, Fieldlist, SubmitField
from wtforms.validators import Optional, Required
app = Flask(__name__)
db = SQLAlchemy(app)
@RiseInRose
RiseInRose / python 效率测试
Created October 23, 2018 05:59
这个主要测试python在各种环境下的效率问题。
# author caturbhujadas_pc
# date 2018/10/23 13:31
# wechat chending2012
from time import time
from numba import autojit
i = range(10000000)
# @autojit()
def do(each):
# str(each)