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 / simple_gradient_descent.py
Last active November 14, 2021 04:25
simple 1-step gradient descent
# From udacity Machine Learning Nanodegree course
import numpy as np
# Define sigmoid function
def sigmoid(x):
return 1/(1+np.exp(-x))
# Derivative of the sigmoid function
def sigmoid_derivative(x):
@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 / 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 / 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 / teachable_machine_with_upload.html
Last active November 7, 2023 18:34
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>