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
## | |
## tinyproxy.conf -- tinyproxy daemon configuration file | |
## | |
## This example tinyproxy.conf file contains example settings | |
## with explanations in comments. For decriptions of all | |
## parameters, see the tinproxy.conf(5) manual page. | |
## | |
# | |
# User/Group: This allows you to set the user and group that will be |
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
# -*- coding:utf-8 -*- | |
# | |
# Copyright (c) 2021 623 MIT | |
# | |
from urllib import parse | |
import logging | |
import os | |
import time |
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
# -*- coding: utf-8 -*- | |
# | |
# Copyright (c) 2021 六二三 | |
# Licensed under the MIT License. | |
# All rights reserved. | |
# | |
# Deps: | |
# pip3 install kafka-python==2.0.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
# -*- coding:utf-8 -*- | |
# | |
# Copyright (c) 2021 六二三 | |
# Licensed under the MIT License. | |
# All rights reserved. | |
# | |
#---------------------------------+ | |
# * PyEnv: Python3 | |
# * Things to do before starting: | |
# 1.add action secrect `DINGTALK_ACCESS_TOKEN` & `DINGTALK_SECRET`. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
RESOURCE="/${OSS_BUCKET_NAME}/${OBJECT_NAME}" | |
CONTENT_MD5=$(openssl dgst -md5 -binary "${FILEPATH}" | openssl enc -base64) | |
CONTENT_TYPE=$(file -ib "${FILEPATH}" |awk -F ";" '{print $1}') | |
DATE_VALUE="`TZ=GMT date +'%a, %d %b %Y %H:%M:%S GMT'`" | |
STRING_TO_SIGN="PUT\n${CONTENT_MD5}\n${CONTENT_TYPE}\n${DATE_VALUE}\n${RESOURCE}" | |
SIGNATURE=$(echo -e -n $STRING_TO_SIGN | openssl dgst -sha1 -binary -hmac $OSS_ACCESS_KEY_SECRET | openssl enc -base64) | |
URL="http://${OSS_BUCKET_NAME}.${OSS_REGION}.aliyuncs.com/${OBJECT_NAME}" | |
curl -i -q -X PUT -T "${FILEPATH}" \ | |
-H "Host: ${OSS_BUCKET_NAME}.${OSS_REGION}.aliyuncs.com" \ | |
-H "Date: ${DATE_VALUE}" \ |
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
## Install Consul | |
1. download consul | |
``` | |
wget https://releases.hashicorp.com/consul/1.7.3/consul_1.7.3_linux_amd64.zip | |
``` | |
2. unzip to `/usr/bin` | |
``` | |
sudo unzip consul_1.7.3_linux_amd64.zip -d /usr/bin |
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 os | |
import signal | |
import subprocess | |
# Making sure to use virtual environment libraries | |
activate_this = "/home/ubuntu/tensorflow/bin/activate_this.py" | |
exec(open(activate_this).read(), dict(__file__=activate_this)) | |
# Change directory to where your Flask's app.py is present | |
os.chdir("/home/ubuntu/Desktop/Medium/keras-and-tensorflow-serving/flask_server") |
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
log_format json_http_combined escape=json | |
'{ "@timestamp":"$time_iso8601",' | |
'"server_name":"$server_name",' | |
'"status":$status,' | |
'"bytes_sent":$bytes_sent,' | |
'"body_bytes_sent":$body_bytes_sent,' | |
'"remote_addr":"$remote_addr",' | |
'"request_time":$request_time,' | |
'"request_id":"$request_id",' |
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
DROP TABLE IF EXISTS location; | |
CREATE TABLE IF NOT EXISTS `location` ( | |
`locId` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`country` varchar(2) DEFAULT NULL, | |
`region` varchar(2) DEFAULT NULL, | |
`city` varchar(1000) DEFAULT NULL, | |
`postalCode` varchar(10) DEFAULT NULL, | |
`latitude` float DEFAULT NULL, | |
`longitude` float DEFAULT NULL, |