Skip to content

Instantly share code, notes, and snippets.

View keon's full-sized avatar

Keon keon

View GitHub Profile
You are an AI assistant tasked with analyzing chat messages from a B2B company's group chat to identify and categorize customer issues. Your goal is to extract meaningful insights from these conversations and present them in a structured format.
Here are the chat messages you need to analyze:
<chat_messages>
{{CHAT_MESSAGES}}
</chat_messages>
Please follow these steps to analyze the chat messages and identify issues:
@keon
keon / industry-insider-tone-prompt.md
Created November 7, 2024 17:55
industry insider tone - short version

Industry Insider Writing Guide

Write as an experienced operator sharing real insights. Assume your reader is smart, busy, and wants substance.

Core Approach

  • Open with your key insight or pattern recognition
  • Lead with specifics, not general trends
  • Connect to historical precedents

Language

0xpass/passport-devops/
├── 20240711134730_mainnet_keon-encrypted-aes-shard.bin
├── README.md
├── TODO.md
├── ansible
│   ├── ansible.cfg
│   ├── env
│   │   ├── devnet
│   │   │   ├── group_vars
│   │   │   │   ├── all.yml
"use client";
import { useGoogleLogin } from "@react-oauth/google";
import { Passport } from "@0xpass/passport";
import { useCallback, useState } from "react";
import OTPInput from "./components/OTPInput";
export default function Home() {
const [email, setEmail] = useState("");
const [otp, setOtp] = useState("");
const passport = new Passport();
"use client";
import { useGoogleLogin } from "@react-oauth/google";
import { Passport } from "@0xpass/passport";
import { useCallback, useState } from "react";
import OTPInput from "./components/OTPInput";
export default function Home() {
const [email, setEmail] = useState("");
const [otp, setOtp] = useState("");
const passport = new Passport();
@keon
keon / gist:02d73c6e3b0b1efa46f37ec50e974535
Last active July 28, 2023 09:51
custom connect button
import { ChevronDown, Loader2 } from "lucide-react";
import { useEffect, useState } from "react";
import { useConnectionStatus } from "../../hooks/use-connection-status";
import { useEmojiAvatar } from "../../utils/avatars";
import { AsyncImage } from "../common/async-image";
import { PassComponent } from "../common/pass-component";
import { Button } from "../primitives/button";
import { useChains } from "../providers/chain-context";
import { ConnectButtonRenderer } from "./renderer";
@keon
keon / json
Created May 8, 2023 14:57
wordle-data
{
"letters": [
{
"key": "q"
},
{
"key": "w"
},
{
"key": "e"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def get_layer_output(model, layer, x):
layer_output = None
def layer_output_hook(m, i, o):
layer_output = o.clone()
hook = layer.register_forward_hook(layer_output_hook)
_ = model(x) # call forward hook
hook.remove()
return layer_output
@keon
keon / unsort_pytorch.py
Created January 4, 2018 09:02
unsort pytorch
x = torch.randn(10)
print(x)
y, ind = torch.sort(x, 0)
print("y", y)
print("ind", ind)
unsorted = y.new(*y.size())
unsorted.scatter_(0, ind, y)
print("unsorted:", unsorted)
print((x - unsorted).abs().max())