Skip to content

Instantly share code, notes, and snippets.

@hubutui
hubutui / amuled
Last active June 27, 2018 20:29
为 openwrt 写的启动脚本, 放在 /etc/init.d/ 目录下, /etc/init.d/ start 即可启动, 但是不知道为什么 /etc/init.d/ enable 之后还是不能够开机启动.... 不过也算能用了. 可以根据需要配合另外一个脚本 /etc/init.d/amuleweb.
#!/bin/sh /etc/rc.common
# start up for amuled
# Copyright (c) 2015
# darcy <hot123tea123@gmail.com>
# this script must be started before amuleweb
START=91
start() {
echo "amuled started"
@hubutui
hubutui / amuleweb
Created September 23, 2015 21:41
为 openwrt 写的启动脚本, 放在 /etc/init.d/ 目录下, /etc/init.d/amuleweb start 即可启动, 需要先启动 amuled 服务.
#!/bin/sh /etc/rc.common
# startup script for amuleweb
# Copyright (C) 2015
# darcy <hot123tea123@gmail.com>
# Must start after amuled
START=99
start() {
echo "amuleweb start"
@hubutui
hubutui / HandBrake-0.10-2-中文翻译笔记.txt
Last active November 1, 2015 16:00
HandBrake 中文翻译笔记
2 Pass Encoding, 二次编码
Allow HandBrake For Dummies, 为新手提供傻瓜模式, 隐藏的内容, 编辑源码目录下的 gtk/src/ghb.ui 文件, 找到 <property name="label" translatable="yes">Allow HandBrake For Dummies</property>, 添加一行 <property name="visible">True</property>, 然后再编译即可看到.
Allow Tweaks, 允许 Tweaks, 不知道 Tweaks 具体是指什么, 也是隐藏的内容, 编辑源码目录下的 gtk/src/ghb.ui 文件, 找到 <object class="GtkCheckButton" id="allow_tweaks">, 添加一行 <property name="visible">True</property>, 然后再编译即可看到.
"&amp;", 这个是转义字符 &, 原样保留不要翻译
Automatically check for updates, 自动检查更新, 在首选项->常规选项卡的第一行那里, 但是我的 0.10.2 上面没有看到, 源码上也没有写隐藏. 可能是屏幕太小没有显示出来?
Base Profile, 基本规格
Burn-In Behavior, 字幕内嵌行为, 字幕内嵌相关的几个字符串只在 Github 里的 gtk/src/ghb.ui 里, 未出现在 0.10.2.
CABAC, Context-based Adaptive Binary Arithmetic Coding 的缩写, 前文参考之适应性二元算术编码
CAVLC, Context-based Adaptive Variable-Length Coding 的缩写, 适应性变动长度编码
cel animation, 传统的手绘动画(赛璐珞动画)
@hubutui
hubutui / PKGBUILD
Last active March 15, 2018 11:47
PKGBUILD file for matlab, modified from AUR. Improvement: matlab installer output is NOT redirected to `/dev/null`, so one could see what's going on if fail to create package. And installation folder is changed to `/opt/matlab`
# Maintainer: Grey Christoforo <first name at last name dot net>
# Modified by: Darcy Hu <hot123tea123@gmail.com>
## This PKGBUILD creates an Arch Linux package for the proprietary MATLAB application. A license from The MathWorks is needed in order to both build the package and to run MATLAB once the package is installed. In order to build the package the user must supply a plain text file installation key and the software. For network installations, in addition to the file installation key, a license file needs to be used for the installation. The tar archive file can be generated from an ISO downloaded from The MathWorks, generated from the official DVD, or created by using the interactive installer to download the toolboxes (installation can be made to a temporary directory and canceled once the toolboxes are downloaded). The contents of the tar archive must include: ./archives/ ./bin/ ./etc/ ./help/ ./java/ /sys ./activate.ini ./install ./installer_input.txt
## The default installation behavior is to ins
@hubutui
hubutui / fcitx.log
Created February 19, 2019 06:56
fcixt log
# 系统信息:
1. `uname -a`:
Linux ArchLinux 4.20.10-arch1-1-ARCH #1 SMP PREEMPT Fri Feb 15 17:49:06 UTC 2019 x86_64 GNU/Linux
2. `lsb_release`:
`lsb_release` 未找到.
3. `/etc/lsb-release`:
@hubutui
hubutui / pytorch-mnist-resnet18.py
Created February 24, 2019 15:08
pytorch mnist resen18
from __future__ import print_function
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms, models
class Net(nn.Module):
@hubutui
hubutui / PKGBUILD
Created March 20, 2019 13:45
python-apex-git
# Maintainer: Butui Hu <hot123tea123@gmail.com>
pkgname=python-apex-git
pkgver=r376.bd0db55
pkgrel=1
pkgdesc="A PyTorch Extension for easy mixed precision and distributed training in PyTorch"
arch=('x86_64')
url="https://github.com/NVIDIA/apex"
license=('BSD')
depends=(cuda python-pytorch-cuda)
@hubutui
hubutui / labelme2voc-parallel.py
Created March 23, 2019 08:23
speed up labelme2voc via simple parallel
#!/usr/bin/env python
from __future__ import print_function
from multiprocessing.dummy import Pool as ThreadPool
import argparse
import glob
import json
import os
import os.path as osp
# Maintainer: Butui Hu <hot123tea123@gmail.com>
pkgname=netron
pkgver=2.9.8
pkgrel=1
pkgdesc="Visualizer for deep learning and machine learning models "
arch=('x86_64')
url='https://github.com/lutzroeder/Netron'
license=('MIT')
depends=('electron' 'python' 'nodejs')
gitlab
date,stream,content
2020-05-20 02:05:17,stdout,127.0.0.1 - - [20/May/2020:02:05:16 +0000] "GET /help HTTP/1.1" 200 84074 "" "curl/7.59.0-DEV"
2020-05-20 02:05:17,stdout,==> /var/log/gitlab/nginx/gitlab_access.log <==
2020-05-20 02:05:17,stdout,
2020-05-20 02:05:17,stdout,"{\"correlation_id\":\"WW3sD80FpI9\",\"duration_ms\":2222,\"host\":\"localhost\",\"level\":\"info\",\"method\":\"GET\",\"msg\":\"access\",\"proto\":\"HTTP/1.1\",\"referrer\":\"\",\"remote_addr\":\"127.0.0.1:0\",\"remote_ip\":\"127.0.0.1\",\"status\":200,\"system\":\"http\",\"time\":\"2020-05-20T02:05:16Z\",\"uri\":\"/help\",\"user_agent\":\"curl/7.59.0-DEV\",\"written_bytes\":83975}
"