Skip to content

Instantly share code, notes, and snippets.

View NKUCodingCat's full-sized avatar
🐱
我们一起学猫叫一起喵喵喵喵喵

JingTao Chen NKUCodingCat

🐱
我们一起学猫叫一起喵喵喵喵喵
View GitHub Profile
@NKUCodingCat
NKUCodingCat / Dockerfile.xsm_lvliang_env_CentOS_6.6
Created April 10, 2019 03:21
Dockerfile.xsm_lvliang_env_CentOS_6.6
FROM centos:6.6
RUN yum -y install yum install centos-release-scl
RUN yum -y install nano gcc devtoolset-7-gcc-c++ gcc-gfortran cmake glibc-static libstdc++-static
RUN echo -e "\nsource scl_source enable devtoolset-7 \n" >> /root/.bashrc
set -xe
function update_package_lists() {
printf "Updating package lists"
apt-get update -y 2> /dev/null > /dev/null
if [ $? -eq 0 ]; then
printf " => Done\n"
return 0
else
printf " => ERROR\n"
return 1
# This script may use ~8 MiB Memory, it is fast and safe
def find_IP(dns_ser, domain, timeout = 2):
import dns.resolver, sys
try:
T = dns.resolver.Resolver(); T.nameservers = [dns_ser, ]; T.timeout = T.lifetime = timeout
answers = T.query(domain, raise_on_no_answer=False)
return [rdata for rdata in answers]
except Exception as e:
if e.__class__.__base__ == dns.exception.DNSException:
@NKUCodingCat
NKUCodingCat / hosts
Created October 12, 2016 17:19
host file to unlock netease music in USA
158.69.209.100 music.163.com
150.138.169.43 m1.music.126.net
150.138.169.43 m2.music.126.net
150.138.169.43 m3.music.126.net
150.138.169.43 m4.music.126.net
150.138.169.43 m5.music.126.net
150.138.169.43 m6.music.126.net
150.138.169.43 m7.music.126.net
150.138.169.43 m8.music.126.net
150.138.169.43 m9.music.126.net
import cPickle as pickle
import numpy
import PyDeepCL
import re
# Warning: this module is just an approximate seriallize to the net
# It does not cover each property of NeuralNet
# Use it carefully
# Working in Python 2.7, PyDeepCL 10.3.0a3 / DeepCL 10.1.0
#coding=utf-8
import socket
import ssl
import os
import platform
import random
import re
import IPy