Skip to content

Instantly share code, notes, and snippets.

View aimerneige's full-sized avatar
🎯
Keep Coding

Aimer Neige aimerneige

🎯
Keep Coding
View GitHub Profile
@aimerneige
aimerneige / dog.go
Created May 26, 2022 18:59
go cron task register
// ./task/dog.go
package task
import (
"fmt"
"time"
"github.com/go-co-op/gocron"
)
@aimerneige
aimerneige / chess.go
Last active June 6, 2022 15:01
chess with stockfish on terminal
package main
import (
"fmt"
"time"
"github.com/notnil/chess"
"github.com/notnil/chess/uci"
)
@aimerneige
aimerneige / pdf2images.py
Last active May 14, 2022 09:24
pdf to images
# coding: utf-8
# pip install pdf2imag
# https://stackoverflow.com/questions/53481088/poppler-in-path-for-pdf2image
import os
from pdf2image import convert_from_path
file_name = 'test'
@aimerneige
aimerneige / main.py
Created May 13, 2022 15:31
opencv camera
# -*- coding: utf-8 -*-
import cv2
cap = cv2.VideoCapture(0)
while True:
ret, frame = cap.read()
if ret:
frame = cv2.resize(frame, (0, 0), fx=0.5, fy=0.5)
cv2.imshow('camera', frame)
else:
@aimerneige
aimerneige / main.py
Last active May 13, 2022 15:18
模板匹配
# -*- coding: utf-8 -*-
import cv2
import numpy as np
# 读入图片
img = cv2.imread("./img.jpg")
roi = cv2.imread('./roi.jpg', 0)
# 转化为灰度图
@aimerneige
aimerneige / main.py
Last active April 28, 2022 18:34
利用拉普拉斯金字塔实现融合
# -*- coding: utf-8 -*-
import cv2 as cv
import numpy as np
def gaussian_pyramid(image, level):
"""
高斯金字塔
"""
temp = image.copy()
@aimerneige
aimerneige / service_genrator.py
Last active March 29, 2022 09:45
Generate and install a simple service file for backend.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Author: Aimer Neige
# Email: [email protected]
import os
import sys
service_template = '''[Unit]
Description={}
@aimerneige
aimerneige / generate_html.sh
Created January 2, 2022 08:42
RAML GENERATE SCRIPT
#!/bin/bash
# Copyright (c) 2021 AimerNeige
# [email protected]
# All rights reserved.
PS3='Please enter your choice: '
options=("raml2html-default-theme" "raml2html-plain-theme" "raml2html-slate-theme" "raml2html-kaa-theme" "raml2html-full-markdown-theme" "Quit")
select opt in "${options[@]}"
do
case $opt in
@aimerneige
aimerneige / main.xml
Last active September 6, 2021 13:57
QNotified/app/src/main/res/layout/main_v2.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
一.引言
1. 编写目的(阐明编写详细设计说明书的目的,指明读者对象。)
2. 项目背景(应包括项目的来源和主管部门等。)
3. 定义(列出文档中用到的专门术语定义和缩写词的原意。)
4. 参考资料(列出这些资料的作者、标题、编号、发表日期、出版单位或资料来源,可包括:
(1)项目的计划任务书,合同或批文;
(2)项目开发计划;
(3)需求规格说明书;
(3)概要设计说明书;