-
uname -sr
-
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum --disablerepo="" --enablerepo="elrepo-kernel" list available yum --enablerepo=elrepo-kernel install kernel-ml sed -i 's/GRUB_DEFAULT=(.)/GRUB_DEFAULT=0/' /etc/default/grub grub2-mkconfig -o /boot/grub2/grub.cfg reboot
-
uname -sr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import print_function | |
| from bs4 import BeautifulSoup as bs | |
| import requests | |
| import logging | |
| from itertools import count | |
| import time | |
| from blinker import signal | |
| from lxml.html.clean import Cleaner | |
| from lxml.html import tostring, fromstring, iterlinks | |
| from selenium import webdriver |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| def tri_prime(n): | |
| primes = [2] | |
| def is_prime(number): | |
| if number % 2 == 0: return False | |
| for i in range(3, math.floor(number / 2) + 1): | |
| if number % i == 0: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| class UrlParser(object): | |
| def __init__(self, url): | |
| self.url = url | |
| self.schem = self.zone = self.domain = self.port = self.path = self.query = self.params = None | |
| def parse(self): | |
| match = re.match(r"((\w*)://)?([^:/\?]*):?(\d+)?(.*)?", self.url) | |
| if match: | |
| self.schem = match.group(2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse | |
| """ | |
| usage: | |
| python compare_files_lines.py -a inter <file1> <file2> == comm -12 <file1> <file2> | |
| python compare_files_lines.py -a union <file1> <file2> == comm <file1> <file2> | sed 's/[\t ]*//g' | |
| python compare_files_lines.py -a diff <file1> <file2> == comm -23 <file1> <file2> | |
| python compare_files_lines.py -a rdiff <file1> <file2> == comm -13 <file1> <file2> | |
| python compare_files_lines.py -a sydiff <file1> <file2> == comm -3 <file1> <file2> | sed 's/[\t ]*//g' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse | |
| if __name__ == '__main__': | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("-a", "--action", dest="action", required=True, | |
| choices=["inter", "union", "diff", "sydiff", "rdiff"]) | |
| parser.add_argument( | |
| "A", type=argparse.FileType("r"), help="the base file") | |
| parser.add_argument( | |
| "B", type=argparse.FileType("r") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse | |
| if __name__ == '__main__': | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("-a", "--action", dest="action", required=True, | |
| choices=["inter", "union", "diff", "sydiff", "rdiff"]) | |
| parser.add_argument( | |
| "A", type=argparse.FileType("r"), help="the base file") | |
| parser.add_argument( | |
| "B", type=argparse.FileType("r") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pycurl | |
| import select | |
| URLS = ["https://www.douban.com/", "http://mail.163.com", "http://www.sina.com.cn", "http://google.com"] | |
| SOCKETS = set() | |
| TIMEOUT = 10 | |
| epoll = select.epoll() | |
| def start_timeout(msecs): |
-
uname -sr
-
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum --disablerepo="" --enablerepo="elrepo-kernel" list available yum --enablerepo=elrepo-kernel install kernel-ml sed -i 's/GRUB_DEFAULT=(.)/GRUB_DEFAULT=0/' /etc/default/grub grub2-mkconfig -o /boot/grub2/grub.cfg reboot
-
uname -sr
-
uname -sr
-
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum --disablerepo="" --enablerepo="elrepo-kernel" list available yum --enablerepo=elrepo-kernel install kernel-ml sed -i 's/GRUB_DEFAULT=(.)/GRUB_DEFAULT=0/' /etc/default/grub grub2-mkconfig -o /boot/grub2/grub.cfg reboot
-
uname -sr