If you haven't installed Nginx already, do so with:
sudo apt update
sudo apt install nginx
wget https://packages.klaytn.net/klaytn/v1.8.4/ken-v1.8.4-0-linux-amd64.tar.gz | |
tar zxf ken-v1.8.4-0-linux-amd64.tar.gz | |
export PATH=$PATH:/home/ec2-user/ken-linux-amd64/bin/ | |
mkdir /home/ec2-user/ken-linux-amd64/data | |
sed -i.bak 's/^\(DATA_DIR=\).*/\1\/home\/ec2-user\/ken-linux-amd64\/data/' ken-linux-amd64/conf/kend.conf | |
cd /home/ec2-user/ken-linux-amd64 | |
wget https://s3.ap-northeast-2.amazonaws.com/klaytn-chaindata/cypress/klaytn-cypress-chaindata-20220713010714.tar.gz | |
tar -C data/ -xf klaytn-cypress-chaindata-20220713010714.tar.gz | |
kend start |
[MASTER] | |
# A comma-separated list of package or module names from where C extensions may | |
# be loaded. Extensions are loading into the active Python interpreter and may | |
# run arbitrary code. | |
extension-pkg-whitelist= | |
# Add files or directories to the blacklist. They should be base names, not | |
# paths. | |
ignore=CVS |
from kafka import KafkaConsumer | |
from json import loads | |
# Create a consumer to read data from kafka | |
consumer = KafkaConsumer( | |
'numtest', | |
bootstrap_servers=['localhost:9092'], | |
# Read from the start of the topic; Default is latest | |
auto_offset_reset='earliest' | |
) |
from time import sleep | |
from json import dumps | |
from kafka import KafkaProducer | |
# Create a producer to write data to kafka | |
producer = KafkaProducer(bootstrap_servers=['localhost:9092'], | |
value_serializer=lambda x: dumps(x).encode('utf-8')) | |
# Write data via the producer | |
for e in range(10): |
type CreateSurveyResponseInput { | |
survey_id: String!, | |
customer_id: String!, | |
responses: [SurveyQuestionResponseInput]!, | |
order_id: String | |
} |
import os | |
from tempfile import mkstemp | |
from shutil import move | |
from os import fdopen, remove | |
import re | |
return_pattern = re.compile(r'return json\.dumps.*') | |
import_pattern = re.compile(r'from flask import.*') |
import seccure | |
# Using ECC Encryption Decrpytion | |
private_key = '123tadfg1wt1qdg123512er2'.encode('utf-8') | |
public_key = 'BCGB&[gT#hf6?b*63nSaX+L-0'.encode('utf-8') | |
message = 'This is a secret message'.encode('utf-8') | |
print(str(message), '\n') |
from django.http import JsonResponse | |
from jose import jwt | |
AUTH0_DOMAIN = {YOUR_AUTH0_DOMAIN} | |
API_AUDIENCE = {YOUR_API_AUDIENCE} | |
ALGORITHMS = ["RS256"] | |
""" | |
Cache the key available at https://{AUTH0_DOMAIN}/.well-known/jwks.json as a python dict |