Skip to content

Instantly share code, notes, and snippets.

View jinyu121's full-sized avatar
💪
Fighting!

Yu Hao jinyu121

💪
Fighting!
View GitHub Profile
@jinyu121
jinyu121 / NetAuth.py
Last active March 12, 2024 04:59
复旦大学网络自动认证脚本
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import requests
import logging
import socket
@jinyu121
jinyu121 / get_anchor.py
Last active March 5, 2024 02:36
YOLO2 Get Anchors
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import numpy as np
import os
import random
@jinyu121
jinyu121 / README.md
Created October 5, 2022 02:14
Xiaomi CR660X get SSH access

Xiaomi CR660X (CR6606/CR6608/CR6609) Get SSH Access

  1. Login to CR660X, open Wi-Fi, disable "merge 2.4G with 5G"
  2. Get another router, open 2.4G Wi-Fi, set LAN ip as 169.254.31.3, disable DHCP, connect LAN with CR660X's LAN
  3. Get a laptop, connect LAN with CR660X's LAN, connect CR660X's 5G Wi-Fi. Set wired IP as 169.254.31.1, run the python script
  4. Login to CR660X's web page, get its IP, and get stok in URL
  5. Open the html page, fill in the IP, stok, SSID, password, and get URLs. Clicks the URLs one by one.
@jinyu121
jinyu121 / README.md
Last active July 18, 2023 07:09
SimpleImageHTTPServer

SimpleImageHTTPServer

Modified from SimpleHTTPServer, this file can setup a simple image server, to view folder, image, and compare images between folders.

How to use

Start

python image_server.py --path path/to/your/image/folder
@jinyu121
jinyu121 / README.md
Created October 26, 2022 12:42
Emoji Crawler

Emoji Crawler

This script parses the emoji list given by the unicode organization, and saves them as image files

@jinyu121
jinyu121 / 01_face_dataset.py
Created June 1, 2018 02:32
OpenCV Face Recognition Demo
import cv2
cam = cv2.VideoCapture(0)
cam.set(3, 640) # set video width
cam.set(4, 480) # set video height
face_detector = cv2.CascadeClassifier('conf/haarcascade_frontalface_default.xml')
# For each person, enter one numeric face id
names_count = [x.strip() for x in open('conf/names.txt').readlines() if x.strip() != ""]
@jinyu121
jinyu121 / coco_to_voc.py
Last active April 27, 2023 02:26
Convert COCO to VOC
import json
import os
from tqdm import tqdm
from xmltodict import unparse
# BBOX_OFFSET: Switch between 0-based and 1-based bbox.
# The COCO dataset is in 0-based format, while the VOC dataset is 1-based.
# To keep 0-based, set it to 0. To convert to 1-based, set it to 1.
BBOX_OFFSET = 0
@jinyu121
jinyu121 / gammuapi.py
Last active March 18, 2023 17:03
Huawei Dongle SMS Forward
import configparser
import sqlite3
from os.path import join
from gammu import smsd
class ForwardTargetBase:
def send(self, message):
raise NotImplementedError()
@jinyu121
jinyu121 / apache_v2proxy.conf
Last active March 7, 2023 16:47
V2Ray: VMess over apache TLS
<VirtualHost *:80>
ServerName your.domain
ServerAdmin admin@your.domain
DocumentRoot /var/www/v2proxy/
ErrorLog ${APACHE_LOG_DIR}/error-v2proxy.log
CustomLog ${APACHE_LOG_DIR}/access-v2proxy.log combined
php_admin_value open_basedir "/var/www/v2proxy/:/tmp/:/proc/"
<Directory /var/www/v2proxy>
@jinyu121
jinyu121 / ShameEyesdroper.user.js
Created January 23, 2019 13:26
ShameEyesdroper.user.js
// ==UserScript==
// @name Shame Eyesdroper
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match *://*/*
// @grant none
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// @run-at document-start