Skip to content

Instantly share code, notes, and snippets.

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

N. YC. Kim nyck33

🏠
Working from home
View GitHub Profile
@nyck33
nyck33 / llvm_error.md
Created April 5, 2024 08:38
llvm issue for mlir
(mlir-py39cuda12) nyck33@lenovo-gtx1650:/mnt/d/LLVM/NewPolygeistDir/llvm-project/mlir/test/INtegration/GPU/Cuda/TensorCore$ mlir-opt wmma-matmul-f16.mlir | mlir-opt -test-lower-to-nvvm="cubin-chip=sm_75 cubin-format=cubin" | mlir-cpu-runner --shared-libs=$MLIR_CUDA_RUNTIME --shared-libs=$MLIR_RUNNER_UTILS --entry-point-result=void
<stdin>:1:1: error: Invalid format specified.
module {
^
<stdin>:1:1: note: see current operation: 
"builtin.module"() ({
  "llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<ptr (i64)>, linkage = #llvm.linkage<external>, sym_name = "malloc", visibility_ = 0 : i64}> ({
  }) : () -> ()
  "llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<void ()>, linkage = #llvm.linkage<external>, sym_name = "main", visibility_ = 0 : i64}> ({
@nyck33
nyck33 / catMovesInSquareMeowsAtCorners.json
Created February 25, 2024 15:18
catMovesInSquareMeowsAtCorners.json
{
"targets": [
{
"isStage": true,
"name": "Stage",
"variables": {
"`jEk@4|i[#Fk?(8x)AV.-my variable": [
"my variable",
0
]
@nyck33
nyck33 / gist:0f4d93fe47a652c3c001dc1308c81234
Created January 12, 2024 12:37
Langchain querying vector database of Korean textbook, not working, code works for English text
#%%
from langchain.document_loaders import TextLoader
from langchain_google_genai import ChatGoogleGenerativeAI, GoogleGenerativeAIEmbeddings
from langchain.prompts import PromptTemplate
from langchain.vectorstores import FAISS
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain.chains import LLMChain
from dotenv import load_dotenv
import os
@nyck33
nyck33 / error.md
Created November 30, 2023 11:06
Snowflake Data Engineering Stored Procedure error
(snowflake-demo) @nyck33 ➜ /workspaces/sfguide-data-engineering-with-snowpark-python/steps/05_fahrenheit_to_celsius_udf (main) $ snow procedure execute -p "orders_update_sp()"
Error executing sql:
use role HOL_ROLE;
use warehouse HOL_WH;
use database HOL_DB;
use schema ANALYTICS;
call orders_update_sp();
002140 (42601): SQL compilation error:
@nyck33
nyck33 / log_monitor.py
Created November 17, 2023 01:30
Monitor Ubuntu logs for errors
import re
import subprocess
from time import sleep
log_file_path = '/var/log/syslog'
check_interval = 60 # in seconds
def notify(message):
subprocess.Popen(['notify-send', message])
@nyck33
nyck33 / sqliteToPostgres.md
Created November 4, 2023 02:33
sqlite dump file for OWASP Juice Shop with errors following when I try to
-- PRAGMA foreign_keys=OFF; (Commented out for PostgreSQL)
BEGIN TRANSACTION;
CREATE TABLE "Users" ("id" SERIAL PRIMARY KEY, "username" VARCHAR(255) DEFAULT '', "email" VARCHAR(255), "password" VARCHAR(255), "role" VARCHAR(255) DEFAULT 'customer', "deluxeToken" VARCHAR(255) DEFAULT '', "lastLoginIp" VARCHAR(255) DEFAULT '0.0.0.0', "profileImage" VARCHAR(255) DEFAULT '/assets/public/images/uploads/default.svg', "totpSecret" VARCHAR(255) DEFAULT '', "isActive" BOOLEAN DEFAULT TRUE, "createdAt" TIMESTAMP NOT NULL, "updatedAt" TIMESTAMP NOT NULL, "deletedAt" TIMESTAMP);
INSERT INTO Users VALUES(1,'','admin@juice-sh.op','0192023a7bbd73250516f069df18b500','admin','','','assets/public/images/uploads/defaultAdmin.png','',1,'2023-10-29 08:53:20.984 +00:00','2023-10-29 08:53:20.984 +00:00',NULL);
INSERT INTO Users VALUES(2,'','jim@juice-sh.op','e541ca7ecf72b8d1286474fc613e5e45','customer','','','assets/public/images/uploads/default.svg','',1,'2023-10-29 08:53:20.984 +00:00','2023-10-29 08:53:20.984 +00:00',NULL)
@nyck33
nyck33 / gist:18fc5362ea88731d98ef4db232ccdf08
Created September 27, 2023 07:49
autopsy install error messages.log
-------------------------------------------------------------------------------
>Log Session: Wednesday, September 27, 2023 at 4:45:21 PM Korean Standard Time
>System Info:
Product Version = Autopsy 4.21.0
Operating System = Linux version 6.2.0-33-generic running on amd64
Java; VM; Vendor = 17.0.8.1; OpenJDK 64-Bit Server VM 17.0.8.1+1-Ubuntu-0ubuntu123.04; Private Build
Runtime = OpenJDK Runtime Environment 17.0.8.1+1-Ubuntu-0ubuntu123.04
Java Home = /usr/lib/jvm/java-17-openjdk-amd64
System Locale; Encoding = en_US (autopsy); UTF-8
Home Directory = /home/nyck33
@nyck33
nyck33 / detections.jsonlines
Created September 21, 2023 01:26
2_real_world_phishing output called detections.jsonlines
{"Message":"Squeeeeeze!! This is christmas hug.. If u lik my frndshp den hug me back.. If u get 3 u r cute:) 6 u r luvd:* 9 u r so lucky;) None? People hate u:","To":"davina-witters@vice-producer.edu, kerryupchurch@Brooklyn.org, FERNANDO_DIAZ@whiteboard.org, Morgan_Janek@whiteboard.com, George-Ryant@productize.org","BCC":"WILLIAM_BRENNAN@principal.com, meagan-heath@global-orchestrator.net","CC":"alberta_bellew@whiteboard.edu","From":"raymond_shephard@marinate-investor.edu","to_count":5,"bcc_count":2,"cc_count":1,"total_recipients":8,"data":"5[SEP]2[SEP]1[SEP]8[SEP]Squeeeeeze!! This is christmas hug.. If u lik my frndshp den hug me back.. If u get 3 u r cute:) 6 u r luvd:* 9 u r so lucky;) None? People hate u:"}
{"Message":"Mmm thats better now i got a roast down me! i����d b better if i had a few drinks down me 2! Good indian?","To":"AnneSharkey@chief-McSweeney's.org","BCC":"Julia.Girgenti@lomo.edu, GLADYS-GARDNER@instructor-regional-vector.org","CC":"Charla_Cato@national.net, Daniel.Roscoe@learning-triangula
@nyck33
nyck33 / gist:9fc952340a1f97d21f33b6ef042a367f
Created September 20, 2023 12:43
morpheus simple Python and abp_nvsmi same problem
```
(base) nyck33@nyck33-ubuntu2304:~/Documents/morpheus$ docker exec -it morpheus_container /bin/bash
(morpheus) root@72c4e3958688:/workspace# ls
CHANGELOG.md CONTRIBUTING.md LICENSE README.md docker docs examples models morpheus scripts
(morpheus) root@72c4e3958688:/workspace# cd morpheus
(morpheus) root@72c4e3958688:/workspace/morpheus# export MORPHEUS_ROOT=$(pwd)
# Launch Morpheus printing debug messages
morpheus --log_level=DEBUG \
`# Run a pipeline with 8 threads and a model batch size of 32 (Must be equal or less than Triton config)` \
run --num_threads=8 --pipeline_batch_size=1024 --model_max_batch_size=1024 \