Skip to content

Instantly share code, notes, and snippets.

View chris-chris's full-sized avatar
🎯
Focusing

Chris Hoyean Song chris-chris

🎯
Focusing
View GitHub Profile
@chris-chris
chris-chris / prover.rs
Created September 9, 2024 08:11
prover.rs
//! This module implements prover's zk-proof primitive.
use std::time::{SystemTime, UNIX_EPOCH};
use std::io::Write;
use std::time::Instant;
use crate::{
circuits::{
argument::{Argument, ArgumentType},
constraints::zk_rows_strict_lower_bound,
expr::{self, l0_1, Constants, Environment, LookupEnvironment},
@chris-chris
chris-chris / nftbank_api.js
Created September 18, 2022 06:43
NFTBank Javascript API example
const axios = require("axios").default;
const hostUrl = "https://api.nftbank.ai";
const assetContract = "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e";
const tokenId = "2795";
const url = `${hostUrl}/v3/realtime-estimated-price/ethereum/${assetContract}/${tokenId}`;
const headers = {
"x-api-key": "<YOUR API KEY>",
};
@chris-chris
chris-chris / nftbank_api.py
Created September 18, 2022 06:33
NFTBank API example
import requests
host_url = "https://api.nftbank.ai"
asset_contract = "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e"
token_id = "2795"
url = f"{host_url}/v3/realtime-estimated-price/ethereum/{asset_contract}/{token_id}"
headers = {
"x-api-key": "YOUR API KEY"
@chris-chris
chris-chris / settings.json
Last active September 15, 2022 03:58
VS Code Chris settings.json
{
"debug.javascript.autoAttachFilter": "smart",
"files.associations": {
"*.py": "python"
},
"editor.formatOnSave": true,
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
@chris-chris
chris-chris / kpop_classifier_example.html
Last active August 26, 2020 02:59
연예인 분류기 결과물
<html>
<head>
<title>Teachable Machine Image Model with upload</title>
<!-- CSS only -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
</head>
<body style="text-align:center;">
<div>
<h3>
@chris-chris
chris-chris / share_sns.html
Created August 15, 2020 08:23
SNS에 공유 버튼 만들기
<!-- SNS버튼 시작 -->
<div style="width: 100%; text-align: center; margin-bottom: 64px;">
<!-- 페이스북 공유 버튼 --> <a href="" onclick="window.open(url_combine_fb, '', 'scrollbars=no, width=600, height=600'); return false;"><img src="https://storage.googleapis.com/storage.chris-chris.ai/images/facebook.gif" title="페이스북으로 공유하기" class="sharebtn_custom" style="width: 32px;"></a>
<!-- 트위터 공유 버튼 --> <a href="" onclick="window.open(url_combine_tw, '', 'scrollbars=no, width=600, height=600'); return false;"><img src="https://storage.googleapis.com/storage.chris-chris.ai/images/twitter.gif" title="트위터로 공유하기" class="sharebtn_custom" style="width: 32px;"></a>
<!-- 카카오 스토리 공유 버튼 --> <a href="" onclick="window.open(url_combine_ks, '', 'scrollbars=no, width=600, height=600'); return false;"><img src="https://storage.googleapis.com/storage.chris-chris.ai/images/story.gif" title="카카오스토리로 공유하기" class="sharebtn_custom" style="width: 32px;"></a>
<!-- 네이버 공유 버튼 --> <a href="" onclick="window.open(url_combine_naver, '', 'scrol
@chris-chris
chris-chris / teachable_machine_with_upload.html
Last active June 24, 2024 09:02
Teachable Machine with upload button
<html>
<head>
<title>Teachable Machine Image Model with upload</title>
</head>
<body>
<img id="imagePreview" style="height: 300px;" />
<input id="imageUpload" type="file" />
<div>Teachable Machine Image Model with upload</div>
<div id="label-container"></div>
@chris-chris
chris-chris / System Design.md
Created June 3, 2020 16:52 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@chris-chris
chris-chris / selenium-install
Created September 12, 2019 10:22 — forked from kaze/selenium-install
How to install Chrome, ChromeDriver and Selenium on CentOS. Plus a sample scraping script.
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
@chris-chris
chris-chris / hashable_cache.py
Created July 22, 2019 06:59 — forked from adah1972/hashable_cache.py
Decorator for using dicts/lists with any Python cache function (like lru_cache)
# Inspired by https://gist.github.com/harel/9ced5ed51b97a084dec71b9595565a71
from collections import namedtuple
import functools
import json
import six
Serialized = namedtuple('Serialized', 'json')