Skip to content

Instantly share code, notes, and snippets.

View cuter44's full-sized avatar

Galin Wu cuter44

  • Guangzhou, China
View GitHub Profile
using SoC from SYDTEK, likely 8801-8811 series, not known precisely.
featured an abnormal service discovery, so can't be parsed in bluez, not operatable via dbus.
featured UART on GATT FFE0 service, characteristic FFE1 as input, FFE2 as output.
- input data 0x55030300[x1][x2] feature viberate; x1 as pattern mode, ranges 0x00:0x0b; x2 as intense, ranges 0x00:0x0a
- input data 0x5504030000[x1] feature quiver; x1 as intense, ranges 0x00:0x0a
- input data 0x5506010000[x1] feature electrify; x1 as intense, ranges 0x00:0x05
featured OTA on GATT FF00 service.
@cuter44
cuter44 / txt_to_cformat.py
Created June 7, 2021 13:20
Embedding conversion for NNQLM
#! python3
"""
USAGE
%0 n_voc n_dim INPUT_FILE OUTPUT_FILE
convert embedding from text format to google c format, as this program needed
for input.
n_voc, n_dim : Dimension of embedding table, neglected if these two values
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
int d0[18];
int d1[6];
int t;
for (int i=0; i<18; i++)
const fl = [
'./src/main/resources/acl.json',
'./src/main/resources/gru.json',
'./tmp/acl.json',
'./tmp/acl-live.json'
// append file to check here
];
const fs = require('fs');
const color = require('cli-color');
const jsonlint = require('jsonlint');
徒手起八
1. 参与比赛的 agents 分组
2. 选定 比赛用 portals
3. 将前二项填入记录下来, 并完成表格
4. 双方确认规则
5. 将目标 portal 炸白
6. 参赛者的 RES, MODS, WEAPONS, 比赛用portal的keys 装桶
7. 开始比赛
8. 双方通过操作比赛约定之范围内 portal , 仅使用上述 portal 产出之物资(Power Cube 除外, 可以自由使用)进行操作.
@cuter44
cuter44 / se-spec.md
Created October 24, 2014 04:16
935软件工程规范

需求

前后端需求都必须在prd上画龟

美工

美工需要根据功能设计

  1. 美工负责基本切图 例如LOGO ,gif

研发 对于独立模块以上级别的,需要撰写使用教程,至少包含以下部分:

@cuter44
cuter44 / HttpProxy.java
Created July 11, 2014 06:43
轻量级Http代理服务器, 主治跨域禁止!! (╯‵д′)╯︵┻━┻
package com.github.cuter44.util.http;
import java.util.Enumeration;
import java.net.*;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.http.*;
import org.apache.http.client.fluent.*;
@cuter44
cuter44 / ISBN13Parser.js
Last active August 29, 2015 14:03
Parse ISBN-13 from image taken by camera, with pure js.
/** ISBN-13 decoder
* author by galin<cuter44@foxmail.com>
* free to use if reserve the author info.
*/
function ISBN13Parser(){
this.sResult = null;
this.iaResult = null;
this.baResult = null;
this.thresold = 80;
@cuter44
cuter44 / PhotoMerge.java
Created May 28, 2014 07:58
for 倩怡, 能纵向拼合图片的东东
package com.github.cuter44.photomerge;
import java.io.*;
import java.awt.*;
import java.awt.image.*;
import javax.imageio.*;
import java.util.logging.*;
public class PhotoMerge
{
@cuter44
cuter44 / zfbot.js
Last active July 9, 2018 03:06
正方抢课脚本
var zfbot = {
interval:5000,
data:null,
count:null,
started:false,
load_jq:function()
{
var jq = document.createElement("script");
jq.type = "text/javascript";
jq.src = "http://libs.baidu.com/jquery/1.10.2/jquery.min.js";