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 math import cos, sin, pi | |
| class Point: | |
| def __init__(self, x=0.0, y=0.0): | |
| self.x = x | |
| self.y = y | |
| def koch_pos(n, a, b): | |
| if n == 0: | |
| return |
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
| #!/usr/bin/python | |
| import smtplib | |
| from email.mime.text import MIMEText | |
| from email.header import Header | |
| from email.utils import formatdate | |
| class Gmail: | |
| """ |
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
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <style> | |
| .bar { | |
| fill: steelblue; | |
| } | |
| .bar:hover { | |
| fill: brown; |
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
| $ yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-ExtUtils-MakeMaker | |
| $ wget https://www.kernel.org/pub/software/scm/git/git-2.4.1.tar.gz | |
| $ tar -zxf git-2.4.1.tar.gz | |
| $ cd git-2.4.1 | |
| $ make prefix=/usr/local all | |
| $ make prefix=/usr/local install | |
| $ git --version |
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
| $ wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo | |
| $ yum install devtoolset-2-gcc devtoolset-2-binutils | |
| $ yum install devtoolset-2-gcc-c++ devtoolset-2-gcc-gfortran | |
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
| $ yum list | grep libpcap | |
| libpcap.x86_64 14:1.4.0-1.20130826git2dbcaa1.el6 | |
| libpcap.i686 14:1.4.0-1.20130826git2dbcaa1.el6 | |
| libpcap-devel.i686 14:1.4.0-1.20130826git2dbcaa1.el6 | |
| libpcap-devel.x86_64 14:1.4.0-1.20130826git2dbcaa1.el6 |
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
| $ yum remove mysql |
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
| $ wget https://google-glog.googlecode.com/files/glog-0.3.3.tar.gz | |
| $ tar xzvf glog-0.3.3.tar.gz | |
| $ svn checkout http://google-glog.googlecode.com/svn/trunk/ google-glog | |
| $ cd google-glog | |
| $ configure | |
| $ make | |
| $ make install |
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
| vi /etc/yum.repos.d/nginx.repo |
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
| $ git clone https://github.com/KimiNewt/pyshark.git | |
| $ cd pyshark/src | |
| $ python setup.py install |