Blog

Beginning Natural Language Processing代码疑惑

在123页的pos-tagging with spaCy,我电脑上运行代码的结果和书上的不一致,原因未知。 运行环境 root@kali:~# ipython3 Python 3.6.6 (default, Jun 27 2018, 14:44:17) Type "copyright", "credits" or "license" for more information. IPython 5.5.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick ...

Read more

Kali_linux_安装keybase_并使用root来运行keybase

keybase 是什么? 可以参考这个页面给出的信息 https://zhuanlan.zhihu.com/p/23953972 在kali linux上安装keybase curl -O https://prerelease.keybase.io/keybase_amd64.deb dpkg -i keybase_amd64.deb 使用root来运行需要设置一些配置文件和环境变量。 修改配置文件 /usr/lib/systemd/user/keybase.service 新加入一行Environment=KEYBASE_ALLOW_ROOT=1 并且我把–log-file=%h/.cache/keybase/keyb...

Read more

一个以前写的生产者-消费者的线程代码的启示

一个以前写的生产者-消费者的线程代码的启示 今天研究了一个以前的写的生产者-消费者的线程代码,这个代码会一直hang下去. 代码如下 # two entities here that try to share a common resource, a queue import threading from threading import Thread,Event from queue import Queue import time,random import logging import sys logging.basicConfig(level=logging.DEBUG,format='%(asctime)s...

Read more

Kali_linux使用bulk_rename来rename多个文件

kali_linux使用bulk_rename来rename多个文件 最近在看豪斯医生,但是下载的文件名都不一致,有些视频后面多出了(xxxxx.com)这个字符串,我想用这个bulk rename一次搞定,所以看了看这个软件: 官方网站如下: xfce:thunar:bulk-renamer:start [Xfce Docs] 使用直接看截图: 效果不错. 11个字符(两个括号,一个dot,8个字母)刚好是从后面11-0. PS: 截图软件xfce4-screenshooter

Read more

通过命令设置笔记本kali_linux的屏幕亮度

通过命令设置笔记本kali_linux的屏幕亮度 参考资料: Backlight - ArchWiki 调整屏幕亮度第一种方法:xrandr ,优点是简单方便 缺点是:However, this is a software only modification, if your hardware has support to actually change the brightness, you will probably prefer to use xbacklight. #xrandr | grep connected | cut -f1 -d" " Use the output name found (in this case "eDP-...

Read more

看到了一个python_pipe的实现

这个实现的代码在这里: Pipes in Python 代码我在这里也照样给抄过来了 def pype(x, *fs): """ Pipe function. Takes an initial value and any number of functions/methods. Methods as strings. Additional args are supported for functions & methods by suppling a step as a tuple/list with function/method as the first element and the...

Read more

Python_data_science_第10课

Bayesian Methods to create Anti-spammer We can construct P(Spam | Word) for every (meaningful) word we encounter during training. Then multiply these together when analyzing a new mail to get the probability of it being spam. Assumes the presence of different words are independent of each other - one reason this is called “Naive Bayes” 理论就是: 不...

Read more

解决kali_linux下sublime_text_3无法输入中文的问题

我使用了这里的解决方案: Sublime Text 3 Input Method(Fcitx) Fix [Ubuntu(Debian)] 实践证明它同样适用kali_linux. cd /opt git clone https://github.com/lyfeyaj/sublime-text-imfix.git cd sublime-text-imfix/ #这是个脚本文件,可以自己看看 vim sublime-imfix ./sublime-imfix #重新login就能在sublime text 3中使用中文输入了

Read more