Skip to content

Instantly share code, notes, and snippets.

@ctlllll
ctlllll / longest_chinese_tokens_gpt4o.py
Created May 13, 2024 19:53
Longest Chinese tokens in gpt4o
import tiktoken
import langdetect
T = tiktoken.get_encoding("o200k_base")
length_dict = {}
for i in range(T.n_vocab):
try:
length_dict[i] = len(T.decode([i]))
except:
@JimLiu
JimLiu / How AI Could Empower Any Business | Andrew Ng | TED.ass
Created September 11, 2023 06:53
How AI Could Empower Any Business | Andrew Ng | TED
[Script Info]
Title: How AI Could Empower Any Business | Andrew Ng | TED
ScriptType: v4.00+
WrapStyle: 0
Collisions: Reverse
PlayResX: 384
PlayResY: 288
Timer: 100.0000
ScaledBorderAndShadow: no
@jalaziz
jalaziz / 999-aws-ebs-nvme.rules
Last active May 21, 2024 01:37
CoreOS AWS EBS NVMe udev rules
# Copyright (C) 2018 Jameel Al-Aziz
# Modified for simplicification and use within CoreOS.
#
# Copyright (C) 2006-2016 Amazon.com, Inc. or its affiliates.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
@KristinaGagalova
KristinaGagalova / processgff.md
Last active May 21, 2024 01:36
Genomic coordinates tools

List of tools with relevance for genomic coordinates management and comparison, referring especially to annotated genes

List of tools

  1. Convert gtf to gff3
@programminghoch10
programminghoch10 / snapchat_data_extractor.sh
Last active May 21, 2024 01:34
Snapchat Data Extractor
#!/bin/bash
if [[ $(id -u) -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
if [ -z $(pm list packages | grep com.snapchat.android) ]; then
echo "Snapchat not found"
exit 1
fi
@oskar456
oskar456 / README.md
Last active May 21, 2024 01:34
CLAT for Linux using Jool and ipvlan PoC

CLAT for Linux using ipvlan

This proof of concept uses ipvlan feature of Linux to split up main network interface into two in order to use one in a separate namespace with jool-siit performing CLAT translation.

This way, enabling CLAT is least intrusive to the default network namespace - no need to enable forwarding or touch firewall rules.

@DerekSelander
DerekSelander / objc_description.m
Last active May 21, 2024 01:30
Dumps Objective-C class/instance info at runtime
//
// MIT License
//
// Copyright (c) 2024 Derek Selander
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@qoomon
qoomon / conventional_commit_messages.md
Last active May 21, 2024 01:30
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@flaki
flaki / docker-to-proxmox.md
Created February 7, 2023 21:36
Importing a Docker container image into Proxmox Linux Containers (LXC)

Importing a Docker container into Proxmox/LXC

Importing the container

For this we are going to be using lxc-create, which comes pre-installed on Proxmox but needs further dependencies to fetch the OCI images from Docker:

apt update && apt -y install skopeo umoci jq
@ben-mohrbacher
ben-mohrbacher / .gitmessage
Created May 20, 2024 14:47
A git commit message template
<your-ticket-prefix>
# Subject Line
# ======================================================================
#
# One line less than 72 characters in length. Generally focused on the
# "What" rather than the "Why".
#
# Format <tag>: <message>
#
# `tag`: can be either a defined list of tags like "Add", "Remove",