Skip to content

Instantly share code, notes, and snippets.

View rains31's full-sized avatar
🎯
Focusing

阿澈 rains31

🎯
Focusing
View GitHub Profile
@rains31
rains31 / neo4j_cypher_cheatsheet.md
Created October 15, 2018 07:28 — forked from DaniSancas/neo4j_cypher_cheatsheet.md
Neo4j's Cypher queries cheatsheet

Neo4j Tutorial

Fundamentals

Store any kind of data using the following graph concepts:

  • Node: Graph data records
  • Relationship: Connect nodes (has direction and a type)
  • Property: Stores data in key-value pair in nodes and relationships
  • Label: Groups nodes and relationships (optional)
#!/usr/bin/python2
#coding: utf-8
#这个函数是从网上摘的
def is_zh (c):
try:
x = ord (c)
except:
return False
# Punct & Radicals
@rains31
rains31 / gist:686c6f195985f08e4809
Created August 25, 2014 06:50
ip地址和数字形式互转
#IP地址之间的转换
import socket
import struct
def ip2long (ip):
return struct.unpack("!I", socket.inet_aton(ip))[0]
def long2ip (lint):
return socket.inet_ntoa(struct.pack("!I", lint))