Skip to content

Instantly share code, notes, and snippets.

@xnile
xnile / curl.md
Created December 18, 2019 04:28 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@xnile
xnile / content.md
Created July 12, 2018 10:13 — forked from baymaxium/content.md
用pandas进行数据分析实战

原文:秦路

本文是《如何七周成为数据分析师》的第二十二篇教程,如果想要了解写作初衷,可以先行阅读七周指南。温馨提示:如果您已经熟悉Python,大可不必再看这篇文章,或只挑选部分。

大家学习Python,不练习怎么行?

这次依旧使用网络抓取的数据分析师的招聘薪资作为练习数据。在早期我们已经用它进行了Excel、BI可视化、SQL三方面的实战训练,想必大家已经很熟悉了,我不再赘述。

没有下载过的同学,后台发送「练习数据」获得链接。

@xnile
xnile / 词性标记.md
Created June 29, 2018 06:42 — forked from luw2007/词性标记.md
词性标记: 包含 ICTPOS3.0词性标记集、ICTCLAS 汉语词性标注集、jieba 字典中出现的词性、simhash 中可以忽略的部分词性

词的分类

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

ICTPOS3.0词性标记集

n 名词

nr 人名

-- a quick LUA access script for nginx to check IP addresses against an
-- `ip_blacklist` set in Redis, and if a match is found send a HTTP 403.
--
-- allows for a common blacklist to be shared between a bunch of nginx
-- web servers using a remote redis instance. lookups are cached for a
-- configurable period of time.
--
-- block an ip:
-- redis-cli SADD ip_blacklist 10.1.1.1
-- remove an ip:
@xnile
xnile / new_task.py
Created August 26, 2017 15:34 — forked from rlcarrca/new_task.py
Multiprocessing sample with RabbitMQ
#!/usr/bin/env python
import sys
import pika
connection = pika.BlockingConnection(pika.ConnectionParameters(
'localhost'))
channel = connection.channel()
channel.queue_declare(queue='hello', durable=True)
@xnile
xnile / client.go
Created July 2, 2017 04:24 — forked from spikebike/client.go
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)
@xnile
xnile / traffic.sh
Created June 30, 2017 06:08 — forked from radu-gheorghe/traffic.sh
bash script for checking out traffic via /proc/net/dev
#!/bin/bash
#shows traffic on the specified device
function human_readable {
VALUE=$1
BIGGIFIERS=( B K M G )
CURRENT_BIGGIFIER=0
while [ $VALUE -gt 10000 ] ;do
VALUE=$(($VALUE/1000))

Python Socket 编程详细介绍

Python 提供了两个基本的 socket 模块:

  • Socket 它提供了标准的BSD Socket API。
  • SocketServer 它提供了服务器重心,可以简化网络服务器的开发。

下面讲解下 Socket模块功能。

Socket 类型

一 实验介绍
本项目带领你学习用 C 语言实现 ping 命令。通过本项目中你可以更深入地理解 TCP/IP 协议,掌握 C 语言进行网络编程的技巧方法。
1.1 知识点
TCP/IP 协议介绍
获取系统运行时间
原始套接字
1.2 效果截图