Skip to content

Instantly share code, notes, and snippets.

View EricSeokgon's full-sized avatar
๐ŸŽฏ
Focusing

Eric EricSeokgon

๐ŸŽฏ
Focusing
View GitHub Profile
@EricSeokgon
EricSeokgon / MaprThroughputParameterizedByMessageSize.sh
Created December 1, 2022 00:26 — forked from iandow/MaprThroughputParameterizedByMessageSize.sh
MapR Streams Throughput Parameterized By Message Size
# DESCRIPTION: Perf test streams with a producer sending 1 million messages with
# record sizes between 10, 100, 500, 1000, 2000, 5000, 10000 to 1 topic with 1
# partition.
maprcli stream delete -path /user/mapr/iantest
maprcli stream create -path /user/mapr/iantest -produceperm p -consumeperm p -topicperm p -compression off
THREADCOUNT=1
TOPICS=1
PARTITIONS=1
MESSAGES=1000000
# print csv header
####################################################################################
# DESCRIPTION: Kafka performance test. One producer sending 1 million messages with
# record sizes between 10, 100, 500, 1000, 2000, 5000, 10000 to 1 topic with 1
# partition.
# PRECONDITIONS: Kafka and Zookeeper services must be running.
####################################################################################
THREADCOUNT=1
TOPICS=1
PARTITIONS=1
@EricSeokgon
EricSeokgon / BalsamiqForever.py
Created June 29, 2022 16:08
Extend your trial period for Balsamiq Wireframes on Windows and macOS Forever!
import json
import os
import time
import webbrowser
import sys
import re
def handleWindows(extra_seconds):
print("OS : Windows")
@EricSeokgon
EricSeokgon / ECDSA-secp256k1-example.java
Created October 4, 2019 01:15 — forked from nakov/ECDSA-secp256k1-example.java
ECDSA with secp256k1 in Java: generate ECC keys, sign, verify
import org.bouncycastle.util.encoders.Hex;
import org.web3j.crypto.*;
import java.math.BigInteger;
public class ECCExample {
public static String compressPubKey(BigInteger pubKey) {
String pubKeyYPrefix = pubKey.testBit(0) ? "03" : "02";
String pubKeyHex = pubKey.toString(16);
String pubKeyX = pubKeyHex.substring(0, 64);
// The following code is from http://www.academicpub.org/PaperInfo.aspx?PaperID=14496 .
import java.math.BigInteger;
import java.security.*;
import java.security.spec.*;
import javax.crypto.KeyAgreement;
public class ECCKeyAgreement {
public static void main(String[] args) throws Exception {
KeyPairGenerator kpg;
kpg = KeyPairGenerator.getInstance("EC","SunEC");
@EricSeokgon
EricSeokgon / springboot-introduction.md
Created August 27, 2019 00:45 — forked from ihoneymon/springboot-introduction.md
์Šคํ”„๋ง๋ถ€ํŠธ ์†Œ๊ฐœ

์Šคํ”„๋ง๋ถ€ํŠธ ์†Œ๊ฐœ

0. ์Šคํ”„๋ง๋ถ€ํŠธSpringBoot๋ž€?

Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.

  • ์Šคํ”„๋ง๋ถ€ํŠธ๋Š” ๋‹จ๋…์‹คํ–‰๋˜๋Š”, ์‹คํ–‰ํ•˜๊ธฐ๋งŒ ํ•˜๋ฉด ๋˜๋Š” ์ƒ์šฉํ™” ๊ฐ€๋Šฅํ•œ ์ˆ˜์ค€์˜, ์Šคํ”„๋ง ๊ธฐ๋ฐ˜ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์‰ฝ๊ฒŒ ๋งŒ๋“ค์–ด๋‚ผ ์ˆ˜ ์žˆ๋‹ค.
  • ์ตœ์†Œํ•œ์˜ ์„ค์ •์œผ๋กœ ์Šคํ”„๋ง ํ”Œ๋žซํผ๊ณผ ์„œ๋“œํŒŒํ‹ฐ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•˜๊ณ  ์žˆ๋‹ค.
@EricSeokgon
EricSeokgon / migrate-django.md
Created June 27, 2019 08:49 — forked from sirodoht/migrate-django.md
How to migrate Django from SQLite to PostgreSQL

How to migrate Django from SQLite to PostgreSQL

Dump existing data:

python3 manage.py dumpdata > datadump.json

Change settings.py to Postgres backend.

Make sure you can connect on PostgreSQL. Then:

@EricSeokgon
EricSeokgon / week1-1.md
Created January 10, 2019 05:09 — forked from wongsyrone/week1-1.md
Interview Questions: Unionโ€“Find (ungraded)

Interview Questions: Analysis of Algorithms

3-SUM in quadratic time. Design an algorithm for the 3-SUM problem that takes time proportional to n2 in the worst case. You may assume that you can sort the n integers in time proportional to n2 or better.

Note: these interview questions are ungraded and purely for your own enrichment. To get a hint, submit a solution.

Hint: given an integer x and a sorted array a[] of n distinct integers, design a linear-time algorithm to determine if there exists two distinct indices i and j such that a[i]+a[j]==x.

@EricSeokgon
EricSeokgon / gol.py
Created November 12, 2017 17:39 — forked from alvesjnr/gol.py
Yesterday I was showing my wife how does a computer program works, so I end up with this code
#coding: utf-8
"""
Conway's Game of Life implementation with console interface
Author: Antonio Ribeiro - alvesjunior.antonio@gmail.com
license: Do What You Want to
"""
from time import sleep
from random import randint