- Links:
- Live version:http://beta.baderlab.org
- Source code:https://github.com/ankanch/GSoC2017-projects
- GSoC project profile:https://summerofcode.withgoogle.com/archive/2017/projects/4664231135805440/
- Student: Long Zhang
- Mentors: Mohamed Helmy,Shobhit Jain,Gary Bader
- Organization: NRNB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 适用于飞书外部群的ChatGPT 机器人 | |
* 对于飞书内部群,可以直接通过开发飞书机器人实现内部群的消息监听和回复。 | |
* 但对于飞书外部群,无法添加内部机器人程序, 只能添加非常简单的基于Webhook 的机器人 (参考:https://open.feishu.cn/document/client-docs/bot-v3/add-custom-bot) | |
* 机器人无法直接获得外部群的消息。 | |
* | |
* 本脚本实现,监听飞书网页版外部群消息(HTML元素变化),并将群消息发送给 ChatGPT 处理。 | |
* 使用方法: | |
* 1. 打开飞书网页版 | |
* 2. 等待网页版加载完成 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// step 1. writing a class like below: | |
import org.jivesoftware.smack.StanzaListener; | |
import org.jivesoftware.smack.packet.Presence; | |
import org.jivesoftware.smack.packet.Stanza; | |
public class PrintStanzaHandler implements StanzaListener { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# USED FOR SHORT URL SERVICE | |
# 10 base number and 62 based number convertion | |
# used for 62 based code convert to primary key in database | |
# only number large than and equal to 0 works | |
# | |
# by Kanch -> kanch is me @ gmail . com | |
# http://akakanch.com | |
# | |
from math import pow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hmmc(){ | |
// ==UserScript== | |
// @name HMMC - How much money have I spent on steam | |
// @namespace https://akakanch.com/hmmc/ | |
// @version 0.4 | |
// @description just buy games,steam sales are great deals. why this script? | |
// @author Kanch | |
// @match https://store.steampowered.com/account/history/ | |
// @grant none | |
// @name:zh-CN HMMC - 我在Steam上花了多少钱了 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
) | |
func main() { | |
url := "https://api.ipify.org?format=text" // we are using a pulib IP API, we're using ipify here, below are some others | |
// https://www.ipify.org | |
// http://myexternalip.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from theano import function, config, shared, tensor | |
import numpy | |
import time | |
vlen = 10 * 30 * 768 # 10 x #cores x # threads per core | |
iters = 1000 | |
rng = numpy.random.RandomState(22) | |
x = shared(numpy.asarray(rng.rand(vlen), config.floatX)) | |
f = function([], tensor.exp(x)) |