Skip to content

Instantly share code, notes, and snippets.

View kelby's full-sized avatar
💭
lalala...

kelby

💭
lalala...
View GitHub Profile
@kelby
kelby / 4.md
Last active September 6, 2022 08:28
space-id no one numbers

---- 乘法:备选 ----

1303
1404
1505
1606
2204
2306
2408
2510

@kelby
kelby / test.md
Created February 13, 2019 05:29
测试 google 图片能否长久使用

测试 google 图片能否长久使用

测试图片

测试图片2

图片集1

图片集2

@kelby
kelby / fmz-strategies-square.rb
Created January 23, 2019 03:05
发明者-策略广场数据列表
require 'headless'
require 'watir'
require 'csv'
require 'nokogiri'
browser ||= Watir::Browser.new :chrome, headless: true
CSV.open("fmz-strategies-square.csv", "wb") do |csv|
11.times do |page_number|
page_url = "https://www.fmz.com/square/-1/#{page_number + 1}?lang=zh_CN"
@kelby
kelby / config.js
Last active December 8, 2018 05:53
nodejs 代码抓取 dota2 实时数据
// Configure and rename to "config.js"
// Create an empty file called "sentry" in same directory
// Have steamguard code = "" to start
// Fill in the steamguard code after receiving it
// After successfully logging in, return steamguard code to ""
var config = {};
config.steam_name = ""; // KelbyLee
config.steam_user = ""; // KelbyLee
config.steam_pass = ""; // ...
@kelby
kelby / dota2.py
Last active November 5, 2023 09:53
Python 实现:连接 Steam 客户端,登录账号,启动 Dota2 客户端,抓取实时比赛数据。
from steam import SteamClient
from dota2 import Dota2Client
client = SteamClient()
dota = Dota2Client(client)
LOGON_DETAILS = {
'username': "your-steam-username",
'password': "your-steam-password",
@kelby
kelby / google_plus.go
Created October 26, 2018 01:38
Crawl google plus activities.
require 'google_plus'
api_key = "your api key"
user_id = "google plus user id"
GooglePlus.api_key = api_key
person = GooglePlus::Person.get(user_id, :key => api_key)
cursor = person.list_activities
@kelby
kelby / Bulletproofs.go
Created October 22, 2018 16:46
This project implements Bulletproofs in Go.
package bp
import (
"crypto/elliptic"
"crypto/rand"
"crypto/sha256"
"encoding/binary"
"math/big"
"fmt"
@kelby
kelby / binary-search-tree.go
Last active October 10, 2018 00:31
Go 实现常见数据结构
// Package binarysearchtree creates a ItemBinarySearchTree data structure for the Item type
package binarysearchtree
import (
"fmt"
"sync"
"github.com/cheekybits/genny/generic"
)
@kelby
kelby / timeout.go
Created October 7, 2018 00:32
Golang 让 for 循环运行一段时间超时自动退出
package main
import (
"fmt"
"time"
)
func main() {
timeout := time.After(time.Second * 10)
finish := make(chan bool)
@kelby
kelby / goroutine_channel.go
Created October 7, 2018 00:28
Go 模拟生产者消费者
package main
import (
"fmt"
"math/rand"
"time"
)
type producer struct {
id int