name
: name of the function you want to executeargs
: arguments of the functionkwargs
: keyword arguments of the function
example
object Main extends App { | |
AvoidLosingGenericType.run() | |
AvoidMatchingOnGenericTypeParams.run() | |
TypeableExample.run() | |
TypeTagExample.run() | |
} | |
class Funky[A, B](val foo: A, val bar: B) { | |
override def toString: String = s"Funky($foo, $bar)" | |
} |
LOCAL TEST: MacOS MBP 2019: 2.4 GHz, 16 GB | |
APPLICATIONS: GHZ (LOCAL) -> NGINX (DOCKER) -> (2 GRPC SERVERS LOCAL) | |
ARGS: -c 10 -n 10000 --rps 40 | |
WORKERS : 2 | |
PDF SIZE: : 86KB | |
SSL to NGINX : ON | |
SSL to GRPC SERVER : ON | |
TargetRPS : 40 | |
------------------------------------------------------------------------ |
# Generate CA key: | |
openssl genrsa -des3 -out ca.key 4096 | |
# Generate CA certificate: | |
openssl req -new -x509 -days 365 -key ca.key -out ca.crt | |
# Generate server key: | |
openssl genrsa -des3 -out server.key 4096 | |
# Generate server signing request: |
version: "3.7" | |
services: | |
forticlient: | |
image: c0d1um/docker-forticlient | |
environment: | |
- VPNADDR=$VPNADDR | |
- VPNUSER=$VPNUSER | |
- VPNPASS=$VPNPASS | |
- VPNTIMEOUT=$VPNTIMEOUT |
set -e | |
brew install softhsm opensc # install softhsm2 | |
# clear all tokens | |
rm -rf /usr/local/var/lib/softhsm/tokens/* | |
cat > private.pem <<EOL | |
Bag Attributes | |
localKeyID: A0 14 BC 15 70 06 95 7D CD A0 48 F8 3B EC CC D3 C6 42 DE FC | |
Key Attributes: <No Attributes> |
import csv | |
import datetime | |
import os | |
import pathlib | |
import xmltodict | |
xml_path = "xml_file_uploads/2021/" | |
pdf_path = "pdf_file_uploads/2021/" | |
output_path = "map.csv" |
# from https://web.facebook.com/groups/ThaiPGAssociateSociety/permalink/1683383838539545/ | |
def binarySearch (A, l, r): | |
if r >= l: | |
k = l + (r - l) // 2 | |
if k + 1 == A[k]: | |
return k | |
elif k + 1 > A[k] : |
https://www.facebook.com/groups/ThaiPGAssociateSociety/permalink/1675605072650755/
CREATE TABLE mb_master_barcode (
id int NOT NULL AUTO_INCREMENT,
barcode_prefix int,
barcode_code int,