Skip to content

Instantly share code, notes, and snippets.

View LanHao0's full-sized avatar
🎯
Focusing

LanHao LanHao0

🎯
Focusing
View GitHub Profile
@LanHao0
LanHao0 / RSA.java
Created October 6, 2022 10:49
信息安全课上简单写的RSA加密算法
import java.math.BigInteger;
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
int p = 34;
int q = 151;
int e = 7;
int msg = 2022;
@LanHao0
LanHao0 / readme.md
Last active January 21, 2022 06:14
国内的优质远程工作平台!云队友!

作为一个学生,想找线上做兼职的活一直都挺难的。
我第一次兼职是遇到了大佬,然后直接就开始了一年的线上兼职
但是后来因为考试,我要复习,退出了。
后来再找,发现也没什么平台找。我相继搜索了一个半月,
终于找到了一个叫云队友的远程工作平台,还是真的不错,
平台挺完善的,用户量也大,也有学习的机会,像我这样的金子也能发光了。

于是给大家推荐一下!
官网链接:https://www.duiyou360.com/?utm_source=user

@LanHao0
LanHao0 / google fit data year report
Last active December 23, 2023 04:01
generate a google fit year report from google fit json data with javascript 通过google fit年度数据,生成你的年度步数信息
/*
Author: LanHao
Time: 12/31/2021 19:31:27
*/
const steps = require('./stepdata');
let arr_month = []
let arr_day = []
let arr_hour = []
@LanHao0
LanHao0 / BlenderRenderSequenceV1.py
Created July 11, 2021 06:33 — forked from brio1009/BlenderRenderSequenceV1.py
Script to render a sequence of ply files with Blender.
# Script to render a sequence of ply files with Blender. First, setup your scene
# and material for the imported meshes. Scene must be in "OBJECT"-mode.
# Fill in variables in options.
# References.
# See: http://blender.stackexchange.com/questions/24133/modify-obj-after-import-using-python
# and: http://blenderartists.org/forum/showthread.php?320309-How-to-import-ply-files-from-script
import bpy
# Options.
meshFolder = "" # Folder without ending "\\".
@LanHao0
LanHao0 / cert_cleanup.py
Last active September 10, 2020 15:42 — forked from qfdk/cert_cleanup.py
lua-resty-auto-ssl: Delete expired (or near expired) certs from redis
import redis
import json
from datetime import datetime, timedelta
from redis.exceptions import ResponseError
import subprocess
r = redis.Redis(host='localhost', port=6379, db=0, decode_responses=True)
now = datetime.now()
# 过期天数
@LanHao0
LanHao0 / water_flower.java
Created May 23, 2019 14:26
n位水仙花数,java
import java.util.ArrayList;
import java.util.Scanner;
/**
* @Author: LanHao
* @Website:https://lanhaoo.club/
* @Created_Date:8:15 PM_5/23/2019
* @Magic_Power_Of_Code!
*/
@LanHao0
LanHao0 / n位水仙花数.py
Created May 18, 2019 10:32
n位水仙花数
num_n=input("input_n:")
new_n=int(num_n)
range_left="1"
range_right="1"
a=[]
result=[]
for i in range(new_n-1):
range_left=range_left+"0"
<script>
function test() {
var rows_c =document.getElementById("table1").getElementsByTagName("tr").length;
//alert(rows_c);
var na=1;
var magic_power=[];
var money=[]
while(na < rows_c){
var rows = document.getElementsByTagName("table")[0].rows;
import glob
read_files = glob.glob("*.txt")
with open("result.txt", "wb") as outfile:
for f in read_files:
with open(f, "rb") as infile:
outfile.write(infile.read())
bad_words = ['Pixel','Uptimebot/1.0;','DotBot/1.1;',' MJ12bot/v1.4.8','GrapeshotCrawler/2.0;','115.216.108.86','Baiduspider/2.0;','YisouSpider/5.0','"Sogou','"IAS crawler','FeedFetcher-Google','"CheckMarkNetwork/1.0','GoogleImageProxy)"',' /generate_204']
with open('access.txt') as oldfile, open('newfile.txt', 'w') as newfile:
for line in oldfile:
if not any(bad_word in line for bad_word in bad_words):
newfile.write(line)