Skip to content

Instantly share code, notes, and snippets.

View paxbun's full-sized avatar

Chanjung Kim paxbun

  • Seoul, Republic of Korea
  • 15:45 (UTC +09:00)
  • LinkedIn in/paxbun
View GitHub Profile
@paxbun
paxbun / default.md
Created June 22, 2025 17:54 — forked from cablej/default.md
Cluely System prompt

<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>

<general_guidelines>

  • NEVER use meta-phrases (e.g., "let me help you", "I can see that").
  • NEVER summarize unless explicitly requested.
  • NEVER provide unsolicited advice.
  • NEVER refer to "screenshot" or "image" - refer to it as "the screen" if needed.
  • ALWAYS be specific, detailed, and accurate.
@paxbun
paxbun / CGFontToFontData.m
Created June 26, 2023 05:50 — forked from Bokugene/CGFontToFontData.m
Read Table Data from a CGFont, then wrap them into a OTF/TTF font.
typedef struct FontHeader {
int32_t fVersion;
uint16_t fNumTables;
uint16_t fSearchRange;
uint16_t fEntrySelector;
uint16_t fRangeShift;
}FontHeader;
typedef struct TableEntry {
uint32_t fTag;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
// ==== Foo ====
// Foo.Nullable: Nullable
// Foo.NonNullable: NotNull
PrintNullabilityState(typeof(Foo));
// ==== DynamicFoo ====
@paxbun
paxbun / main.swift
Last active August 7, 2022 11:54
CoreML crashes with TensorFlow 2 models with multiple Conv1D and LayerNorm layers
import CoreML
let model = try! MyModel()
let inputData = [Float](repeating: 0.1, count: 4096 * 2)
let inputArray = MLShapedArray(scalars: inputData, shape: [1, 4096, 2])
let input = MyModelInput(input_1: inputArray)
let output = try! model.prediction(input: input)
print("\(output.IdentityShapedArray.shape)")
@paxbun
paxbun / fromdict.py
Created July 22, 2022 06:37
Python dataclass inverse of asdict
from dataclasses import is_dataclass, fields
from typing import TypeVar
T = TypeVar("T")
def fromdict(d: dict, ty: type[T]) -> T:
assert is_dataclass(ty)
for field in fields(ty):
if field.name in d:
using System.Collections.Concurrent;
using System.Text.RegularExpressions;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.Services.AddCors(options =>
{
options.AddDefaultPolicy(policy =>
{
policy.AllowAnyHeader();
policy.AllowAnyMethod();
using System.Collections.Concurrent;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using System.Text.RegularExpressions;
using Microsoft.Azure.Management.Media.Models;
using Microsoft.IdentityModel.Tokens;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.Services.AddCors(options =>
{
@paxbun
paxbun / README.md
Created February 17, 2022 10:01
Share your GitHub contributions in Wordle style

Execute the JS code and you will get this:

image

@paxbun
paxbun / Program.cs
Created August 9, 2021 08:41
C# arbitrary type to dictionary
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
public class Foo
{
public string BarBar { get; set; }
public int BazBazBaz { get; set; }
}
module float32_add_4
(
input [31:0] args [3:0],
output [31:0] res
);
wire [31:0] add1_res, add2_res;
float32_add adder1 (.lhs(args[0]), .rhs(args[1]), .res(add1_res));
float32_add adder2 (.lhs(args[2]), .rhs(args[3]), .res(add2_res));
float32_add adder3 (.lhs(add1_res), .rhs(add2_res), .res(res));
endmodule