Follow this tutorial: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
Your git config is similar to this:
Follow this tutorial: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
Your git config is similar to this:
# install by command
rpm -ivh jdk-8u151-linux-x64.rpm
# Check java version
java -version
I have a service that listen on http://127.0.0.1:1017. This service is a binary file which can not change IP/port when turn it on.
socat TCP-LISTEN:8080,fork,reuseaddr TCP:127.0.0.1:1017
from flask import Flask | |
from flask import json, Response | |
""" | |
From: https://youtu.be/1ByQhAM5c1I | |
Refer to another repos: | |
- https://github.com/pallets/flask/tree/master/examples/flaskr | |
- https://github.com/wgwz/flask-for-fun-and-profit | |
""" |
import socket | |
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): | |
hostname = socket.gethostname() | |
ipaddr = socket.gethostbyname(hostname) | |
return """ |
# Time | |
yum -y install ntp | |
ntpdate time.apple.com | |
# remove old kernel | |
yum install yum-utils | |
package-cleanup --oldkernels --count=2 | |
# disable ipv6 | |
# append in file `/etc/sysctl.conf` |
import ipaddress | |
from voluptuous.schema_builder import message | |
from voluptuous import All, Invalid, Required, Schema | |
from voluptuous.error import Invalid | |
class IPInvalid(Invalid): | |
"""The value is not valid IP.""" | |
@message('expected an IP address', cls=IPInvalid) |
Group by and count transaction within a period
Source: https://stackoverflow.com/questions/47362530/python-pandas-group-datetimes-by-hour-and-count-row
df.date=pd.to_datetime(df.date)
df.groupby([pd.Grouper(key='date',freq='H'),df.station]).size().reset_index(name='count')
Out[235]:
date station count
0 2017-10-30 15:00:00 A 2