Skip to content

Instantly share code, notes, and snippets.

View techbless's full-sized avatar
🏠
Working from home

Yunbin Chang techbless

🏠
Working from home
View GitHub Profile
@techbless
techbless / tsne_mnist.py
Created October 11, 2023 06:28
T-SNE mnist code
import keras
from keras.datasets import mnist
from sklearn import preprocessing
import numpy as np
(train_xs, train_ys), (test_xs, test_ys) = mnist.load_data()
dim_x = train_xs.shape[1] * train_xs.shape[2]
dim_y = 10
train_xs = train_xs.reshape(train_xs.shape[0], dim_x).astype(np.float32)
@techbless
techbless / filter-query-builder.js
Last active June 22, 2022 09:30
Filtering Query Builder for Sequelize in Express
import { Op } from "sequelize";
/*
SEQUELIZE FILTERING QUERY BUILDER
SAMPLE URI
/api/v1/ubello-products?page=1&n_product=20&PRICE_RETAIL[lte]=90000&PRICE_RETAIL[gte]=10&PRICE_SUPPLY[gte]=20000&PRICE_SUPPLY[lte]=50000&sort=PRICE_RETAIL&PRODUCT_NAME=%GIFT%
SAMPLE req.query from express
{
🌞 Morning 56 commits █░░░░░░░░░░░░░░░░░░░░ 4.9%
🌆 Daytime 258 commits ████▋░░░░░░░░░░░░░░░░ 22.4%
🌃 Evening 475 commits ████████▋░░░░░░░░░░░░ 41.2%
🌙 Night 363 commits ██████▌░░░░░░░░░░░░░░ 31.5%
@techbless
techbless / for my own pi-hole
Last active June 4, 2020 07:03
ad_lists.txt
# block address
# adult
127.0.0.1 kkdate.com
127.0.0.1 www.qmov.net
127.0.0.1 kordating.com
127.0.0.1 hottoy.co.kr
127.0.0.1 hangukdate.com
127.0.0.1 porngames.adult
127.0.0.1 free3dadultgames.com
package Client;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.Socket;
public class fileReciever {
public static void main(String[] args) {
@techbless
techbless / passwordGenerator.scala
Last active February 22, 2017 05:28
this makes a password that length is 14
import scala.util.Random
object MakePassword extends App{
var list = List( 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D',
'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '~', '!', '@',
'#', '$', '%', '^', '&', '*', '(', ')', '-', '_', '=', '+', '[', ']', '{',
'}', '?', '<', '>', '.', '/' );