Skip to content

Instantly share code, notes, and snippets.

View Yevgnen's full-sized avatar
🔥

Yevgnen Yevgnen

🔥
View GitHub Profile
@fabiofl
fabiofl / gist:5873100
Created June 27, 2013 00:41
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
@luw2007
luw2007 / 词性标记.md
Last active December 30, 2024 12:48
词性标记: 包含 ICTPOS3.0词性标记集、ICTCLAS 汉语词性标注集、jieba 字典中出现的词性、simhash 中可以忽略的部分词性

词的分类

  • 实词:名词、动词、形容词、状态词、区别词、数词、量词、代词
  • 虚词:副词、介词、连词、助词、拟声词、叹词。

ICTPOS3.0词性标记集

n 名词

nr 人名

Moved

Now located at https://github.com/JeffPaine/beautiful_idiomatic_python.

Why it was moved

Github gists don't support Pull Requests or any notifications, which made it impossible for me to maintain this (surprisingly popular) gist with fixes, respond to comments and so on. In the interest of maintaining the quality of this resource for others, I've moved it to a proper repo. Cheers!

@mblondel
mblondel / kernel_kmeans.py
Last active January 4, 2024 11:45
Kernel K-means.
"""Kernel K-means"""
# Author: Mathieu Blondel <[email protected]>
# License: BSD 3 clause
import numpy as np
from sklearn.base import BaseEstimator, ClusterMixin
from sklearn.metrics.pairwise import pairwise_kernels
from sklearn.utils import check_random_state
@Superbil
Superbil / fix-font-org-mode.el
Last active August 27, 2022 08:25
fix chinese font on Emacs
;;; base on https://gist.github.com/coldnew/7398835
(defvar emacs-english-font nil
"The font name of English.")
(defvar emacs-cjk-font nil
"The font name for CJK.")
(defvar emacs-font-size-pair nil
"Default font size pair for (english . chinese)")
@chappyhome
chappyhome / gist:7615718
Created November 23, 2013 15:20
利用rsync自动同步服务器与本地代码的python脚本
利用rsync自动同步服务器与本地代码的python脚本
四 07 二月 2013
tags: Python
菜鸟表示写web时 每次修改完后把文件往VPS上丢很麻烦
用ssh sshfs scp都太慢 小东西又懒得用git
sublimetext上得sftp不支持中文 emacs干脆就只能ssh
于是用linux自带的rsync写了个同步脚本
可以手动或自动往服务器上差异性同步 不用scp一堆东西 也不用忍受ssh那个渣速度
@yong27
yong27 / apply_df_by_multiprocessing.py
Last active April 12, 2023 04:35
pandas DataFrame apply multiprocessing
import multiprocessing
import pandas as pd
import numpy as np
def _apply_df(args):
df, func, kwargs = args
return df.apply(func, **kwargs)
def apply_by_multiprocessing(df, func, **kwargs):
workers = kwargs.pop('workers')
@sangheestyle
sangheestyle / gist:8691435
Last active September 2, 2022 10:37
Removing punctuations, stop words, and stemming the contents with NLTK
import os
import json
import shutil
from subprocess import call
import cld
def read_json(file_path):
json_data = open(file_path)
data = json.load(json_data)
return data
@ShingoFukuyama
ShingoFukuyama / emacs lock buffer to window with tabbar
Created February 4, 2014 03:32
Stick/Lock buffer to window, compatible with tabbar.el. Emacs
;; http://lists.gnu.org/archive/html/help-gnu-emacs/2007-05/msg00975.html
(defvar sticky-buffer-previous-header-line-format)
(define-minor-mode sticky-buffer-mode
"Make the current window always display this buffer."
nil " sticky" nil
(if sticky-buffer-mode
(progn
(set (make-local-variable 'sticky-buffer-previous-header-line-format)
@Grayson
Grayson / reeder-opml.py
Created April 11, 2014 18:24
Import OPML into Reeder-Mac
import os
import shutil
import sqlite3
from sys import argv
from xml.dom.minidom import parse
def dom_element_to_insert(elem):
return (elem.getAttribute('xmlUrl'),elem.getAttribute('text'), elem.getAttribute('title'), elem.getAttribute('htmlUrl'))
def main(path_to_opml):