This file contains 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
version: "3" | |
services: | |
elasticsearch: | |
image: elasticsearch:7.9.1 | |
container_name: elasticsearch | |
restart: unless-stopped | |
environment: | |
- node.name=elasticsearch | |
- discovery.seed_hosts=elasticsearch | |
- cluster.initial_master_nodes=elasticsearch |
This file contains 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
######### CREATE EXCHANGES/QUEUES | |
import pika | |
import sys | |
WORK_QUEUE = "WorkQueue" | |
WORK_EXCHANGE = "WorkExchange" # dead letter exchange | |
connection = pika.BlockingConnection( | |
pika.ConnectionParameters(host='localhost')) |
This file contains 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 boto3 | |
client = boto3.client('comprehend') | |
dataset = ["Food is good and not too expensive. Serving is just right for adult. Ambient is nice too.", | |
"Used to be good. Chicken soup was below average, bbq used to be good.", | |
"Food was good, standouts were the spicy beef soup and seafood pancake! ", | |
"Good office lunch or after work place to go to with a big group as they have a lot of private areas with large tables", | |
"As a Korean person, it was very disappointing food quality and very pricey for what you get. I won't go back there again. ", |
This file contains 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
package main | |
/** | |
With openssl command: | |
# echo -n "string to sign" | openssl rsautl -inkey private.key -sign|base64 | |
or with openssl + sha256 (if it is used SignSHA256 function) | |
# openssl dgst -sha256 -sign private.key -out sign.txt.sha256 <(echo -n "string to sign") ; cat sign.txt.sha256 | base64 | |
With sign.go |
This file contains 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 sys | |
import asyncio | |
import asyncio.streams | |
import uuid | |
from cassandra.cluster import Cluster | |
class MyServer: | |
def __init__(self, uid): | |
self.server = None # encapsulates the server sockets |
This file contains 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 time | |
import re | |
import urllib2 | |
from memcache import Client | |
servers = ["127.0.0.1:11211"] | |
mc = Client(servers, debug=False) | |
def memcached_value(func): | |
def strigify(str): |