Skip to content

Instantly share code, notes, and snippets.

:octocat:
NullPointerException.

Eana Hufwe blueset

:octocat:
NullPointerException.
Block or report user

Report or block blueset

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@blueset
blueset / LRC translation combiner
Last active Aug 29, 2015
An LRC translation combiner. Helping LRC makers combining their lyrics translations easier. Available in English and Chinese at http://1a23.com/lyrictool/ .
View LRC translation combiner
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,300' rel='stylesheet' type='text/css'>
<title>LRC_translation_conbiner. by Eana Hufwe</title>
</head>
<body>
<style>
body{
@blueset
blueset / script.js
Created May 2, 2015
Netease LRC Translate Extractor 网易云音乐翻译提取脚本
View script.js
/*
使用方法:
在浏览器中打开JS终端,作用范围定位到contentFrame。
将divider改成区分翻译的符号。
然后将以下代码粘贴执行。
协议:MIT
*/
var divider = " / ";
@blueset
blueset / README.md
Last active Aug 29, 2015
AJINC Attendance checker
View README.md

AJINC Attendance checker

This is an attendance checker dedicated to AJINC. When running it, it sends a notice to your Pushbullet account with your attendance status of the day.

Recommended usage

It is recommended to run this script as a corn job every work day at around 0930, as your attendance is most likely confirmed by then.

Suggested cronjob line:

30 9 * * 1-5 python3 /path/to/script/ajinc_attendance.py
@blueset
blueset / remove_netease_tags.py
Created May 15, 2015
Remove Netease Music Tags
View remove_netease_tags.py
'''
删除网易云音乐嵌在音乐里面的参数。使其将音乐文件识别为外部文件。
(目前只是直接删除COMM标签。)
Requirements:
Mutagen
License: MIT
'''
View 20150615 V2EX 01 t_198719.sql
SELECT title, content, category, pub_time
FROM news
WHERE (
SELECT count(*) FROM news AS f
WHERE f.category = news.category AND f.pub_time <= news.pub_time
) <= 2;
# Via http://www.xaprb.com/blog/2006/12/07/how-to-select-the-firstleastmax-row-per-group-in-sql/
View 0sum.py
# Translation of https://gist.github.com/MHeasell/bb9f7253da45b5140a83
def vadd (s, o):
return {'x': s['x']+o['x'], 'y': s['y']+o['y']}
def vsub (s, o):
return {'x': s['x']-o['x'], 'y': s['y']-o['y']}
def vmul (s, o):
return {'x': s['x']*o, 'y': s['y']*o}
def vlen (s):
return (s['x']**2+s['y']**2)**0.5
@blueset
blueset / lrc_utf-8.py
Created Nov 11, 2015
Convert all *.lrc files in current directory to UTF-8 encoding.
View lrc_utf-8.py
#!/usr/local/bin/python3
# Convert all *.lrc files in current directory to UTF-8 encoding.
__author__ = 'Eana Hufwe <ilove@1a23.com>'
import glob
from chardet.universaldetector import UniversalDetector
detector = UniversalDetector()
import shutil
View comic-translations.md

Superman and Facebook

Android and Motorola

La Chine

Author: the Joy of Tech by Nitrozac and Snaggy

@blueset
blueset / orders.py
Created Dec 23, 2015
To Bryan 201512230001
View orders.py
orders = []
for i in range(10):
purpose = raw_input("Would you like to buy or sell?")
if purpose not in ['buy', 'sell']:
print("You don't anyhow ah.")
exit()
try:
price = float(raw_input("At what price would you like to buy/sell?"))
quantity = float(raw_input("What is the quantity you would like to buy/sell?"))
View keybase.md

Keybase proof

I hereby claim:

  • I am blueset on github.
  • I am blueset (https://keybase.io/blueset) on keybase.
  • I have a public key ASDlmdWfmOfm5sOK2jEMR2S8dCjDaVdgBbiIxQovia_apwo

To claim this, I am signing this object:

You can’t perform that action at this time.