Skip to content

Instantly share code, notes, and snippets.

View numb3r3's full-sized avatar

felix-wang numb3r3

View GitHub Profile
@numb3r3
numb3r3 / prepare_data.py
Created March 7, 2022 06:34
prepare-dataset
import json
import re
from pathlib import Path
import click
from docarray import Document, DocumentArray
BLACK_TOKENS = set(['test', 'prefab', 'background'])
@numb3r3
numb3r3 / rank.py
Created June 17, 2020 12:30
textrank++ demo
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
"""
import os
import sys
import argparse
import json
import numpy as np
from numpy import dot
@numb3r3
numb3r3 / rank.py
Created June 17, 2020 12:30
textrank++ demo
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
"""
import os
import sys
import argparse
import json
import numpy as np
from numpy import dot
@numb3r3
numb3r3 / Dockerfile
Created April 15, 2020 02:52
Dockerfile for autoflip
# Copyright 2019 The MediaPipe Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@numb3r3
numb3r3 / emacs
Created August 25, 2019 09:54
emacs config
(setq warning-minimum-level :emergency)
(setq load-prefer-newer t)
;; package --- smarry
;;; Commentary:
;; package 包管理
(require 'package)
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
("tromey" . "http://tromey.com/elpa/")
("marmalade" . "http://marmalade-repo.org/packages/")
@numb3r3
numb3r3 / tmux.conf
Created August 24, 2019 12:14
tmux config file
# No delay for escape key press
set -sg escape-time 0
# 关闭窗口后重新编号
set -g renumber-windows on
# 事件窗口信息,如有内容变动,进行提示
setw -g monitor-activity on
set -g visual-activity on
@numb3r3
numb3r3 / bench_leveldb.py
Last active August 21, 2019 05:01
benchmark for leveldb in python
import uuid
import plyvel
import pickle
import random
def setup_db(data_path):
# import plyvel
return plyvel.DB(data_path, create_if_missing=True)