Skip to content

Instantly share code, notes, and snippets.

View coronin's full-sized avatar
💭
Find me @the_paper_link

Liang Cai coronin

💭
Find me @the_paper_link
View GitHub Profile
<!DOCTYPE html>
<html lang="zh">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="robots" content="noindex, nofollow">
<title>bio-elite.fudan | mattermost</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="bio-elite.fudan | mattermost">
<!DOCTYPE html>
<html lang="en-US">
<!-- 2022-7-15
https://tsi.fudan.edu.cn/
https://tsi.actin.cn/
https://tsg2011.applinzi.com/
https://tsg2011.sinaapp.com/
-->
<head>
<meta charset="utf-8">
<!DOCTYPE html>
<html lang="zh">
<head>
<title>复旦大学生命科学学院本科生自主科研项目历年开题情况</title>
<link rel="stylesheet" href="https://tsg2011-byduck.stor.sinaapp.com/simple.css">
</head>
<body>
<h1>复旦大学生命科学学院</h1>
<p>本院的本科生自主科研项目采用“评审立项、中期汇报、结项验收”的方式进行管理。<br>
现在 <a href="https://tsi.fudan.edu.cn/fdurop/" target="_self">https://tsi.fudan.edu.cn/fdurop/</a> 公布历年通过立项评审的项目。<br><br>
@coronin
coronin / srtTranslate.py
Last active June 24, 2019 16:38
I used the following to generate **Three.Seconds.zh-en.srt**
## Liang Cai, 2019-6-22
import time
import translation
def translate_line(a):
time.sleep(1)
try:
b = translation.iciba(a, dst = 'zh') # @@@@
@coronin
coronin / osx_install.sh
Last active June 28, 2016 13:58 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew tap homebrew/science
brew install wget
@coronin
coronin / tmux-cheatsheet.markdown
Created April 14, 2016 23:03 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@coronin
coronin / auto_crispr_scanner.js
Created October 22, 2015 00:10
run via phantomjs (bug: the bar display)
var page = require('webpage').create();
page.viewportSize = { width: 1024, height: 768 };
// console.log('Request cripspr scanner as ' + page.settings.userAgent);
var sp = 'human', // only allow: human mouse dog
seq = 'ggaggaagggcctgagtccgagcagaagaagaagggctcccatcacatcaaccggtggcgcattgccacgaagcaggccaatggggaggacatcgatgtcacctccaatgactagggtgggc';
page.open('http://xx.cail.cn/crispr.html?sp='+sp+'&seq='+seq, function() {
var data = page.evaluate(function () {
return document.querySelector('span#server_status').innerText;
@coronin
coronin / excel2wiki.php
Created October 4, 2014 07:58
from Internet, excel to wiki
<!--
Copyright (c) 2010 Shawn M. Douglas (shawndouglas.com)
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
@coronin
coronin / table2col.php
Last active August 29, 2015 14:07
copy cells from Excel to get them in a column
<!--
Copyright (c) 2014 Liang Cai (cailiang.net)
Inspired by 2010 Shawn M. Douglas (shawndouglas.com)
-->
<?php
echo "<html>
<head><title>table2col | Excel xls, table to column copy and paste converter</title></head>
<body><h1>Copy &amp; Paste Table-to-Column Converter</h1>
<form action='table2col.php' method='post'>
@coronin
coronin / ots_server.patch
Last active August 29, 2015 14:06
patch to htgt/CRISPR-Analyser
diff --git a/src/crisprutil.cpp b/src/crisprutil.cpp
index 91d9b4c..0480e27 100644
--- a/src/crisprutil.cpp
+++ b/src/crisprutil.cpp
@@ -44,6 +44,10 @@ void CrisprUtil::_populate_cmap() {
string CrisprUtil::get_crispr(uint64_t id) {
return util::bits_to_string( get_crispr_int(id), crispr_data.seq_length );
}
+// 2014-9-9 : id with offset need to be correct
+string CrisprUtil::get_offset_crispr(uint64_t id) {