Skip to content

Instantly share code, notes, and snippets.

@Anwar-alhitar
Anwar-alhitar / JetBrains products Activation code until 16 February 2025
Created April 3, 2024 12:07
JetBrains products Activation code until 16 February 2025
LYUCS92YXV-eyJsaWNlbnNlSWQiOiJMWVVDUzkyWVhWIiwibGljZW5zZWVOYW1lIjoi5pyd6Zm956eR5oqA5aSn5a24IiwibGljZW5zZWVUeXBlIjoiQ0xBU1NST09NIiwiYXNzaWduZWVOYW1lIjoiVGFvYmFv77ya5p6B5a6i5LiT5LqrICAtLS0g6LCo6Ziy55uX5Y2W77yBIiwiYXNzaWduZWVFbWFpbCI6IkphbWVfQnJhaXRtYW5AaG90bWFpbC5jb20iLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDI1LTAyLTE5IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJSUzAiLCJwYWlkVXBUbyI6IjIwMjUtMDItMTkiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IkRNIiwicGFpZFVwVG8iOiIyMDI1LTAyLTE5IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAyNS0wMi0xOSIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNVIiwicGFpZFVwVG8iOiIyMDI1LTAyLTE5IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJSU0MiLCJwYWlkVXBUbyI6IjIwMjUtMDItMTkiLCJleHRlbmRlZCI6dHJ1ZX0seyJjb2RlIjoiUEMiLCJwYWlkVXBUbyI6IjIwMjUtMDItMTkiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IkRTIiwicGFpZFVwVG8iOiIyMDI1LTAyLTE5IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJSRCIsInBhaWRVcFRvIjoiMjAyNS0wMi0xOSIsI
@VoxelPrismatic
VoxelPrismatic / hexToRgba.js
Created May 6, 2024 23:25
hexToRgba, using lots of bitwise operations
function hexToRgba(st) {
if(st.startsWith("#"))
st = st.slice(1);
const len = st.length; // I don't know how JS works, I suspect this is recalculated
const has_alpha = !(len % 4);
if(len % 3 && !has_alpha)
throw new Error("invalid hex code");
var val = Number.parseInt(st, 16);
@notlin4
notlin4 / without-auth_e-book_tutorial_免登入電子書教學.md
Last active May 7, 2024 00:48 — forked from aliyaliu368/without-auth_e-book_tutorial_免登入電子書教學.md
教學用電子書與相關工具免登入教學 | 本指令碼用於繞過臺灣電子書與教學工具的前端身分驗證,達成不需要教師帳號即可使用。支援 翰林、南一、康軒、何嘉仁 四大出版社 | 請勿將本指令碼作為抄答案、侵權等惡意用途,使用本指令碼,請自行承擔所有後果與風險

教學用電子書與相關工具免登入教學

使用本指令碼即代表你同意本免責聲明

免責聲明

請勿將本指令碼作為抄答案、侵權等惡意用途,使用本指令碼,請「自行承擔」所有後果與風險。

簡介

本指令碼用於繞過臺灣電子書與教學工具的前端驗證,達成不需要教師帳號即可使用。

$files = Get-ChildItem "app*.config" -Recurse
$find = 'some-string-to-find'
$replace = 'some-string-to-replace-with'
Get-ChildItem $files -Recurse |
select -ExpandProperty fullname |
foreach {
If(Select-String -Path $_ -SimpleMatch $find -quiet){
This file has been truncated, but you can view the full file.
第一章 青衫磊落险峰行
青光闪动,一柄青钢剑倏地刺出,指向在年汉子左肩,使剑少年不等招用老,腕抖剑斜,剑锋已削向那汉子右颈。那中年汉子剑挡格,铮的一声响,双剑相击,嗡嗡作声,震声未绝,双剑剑光霍霍,已拆了三招,中年汉子长剑猛地击落,直砍少年顶门。那少年避向右侧,左手剑诀一引,青钢剑疾刺那汉子大腿。
两人剑法迅捷,全力相搏。
练武厅东坐着二人。上首是个四十左右的中年道姑,铁青着脸,嘴唇紧闭。下首是个五十余岁的老者,右手捻着长须,神情甚是得意。两人的座位相距一丈有余,身后各站着二十余名男女弟子。西边一排椅子上坐着十余位宾客。东西双方的目光都集注于场中二人的角斗。
眼见那少年与中年汉子已拆到七十余招,剑招越来越紧,兀自未分胜败。突然中年汉子一剑挥出,用力猛了,身子微微一幌,似欲摔跌。西边宾客中一个身穿青衫的年轻男子忍不住“嗤”的一声笑。他随即知道失态,忙伸手按住了口。
便在这时,场中少年左手呼一掌拍出,击向那汉子后心,那汉子向前跨出一步避开,手中长剑蓦地圈转,喝一声:“着!”那少年左腿已然中剑,腿下一个踉跄,长剑在地下一撑,站直身子待欲再斗,那中年汉子已还剑入鞘,笑道:“褚师弟,承让、承让,伤得不厉害么?”那少年脸色苍白,咬着嘴唇道:“多谢龚师兄剑下留情。”
那长须老者满脸得色,微微一笑,说道:“东宗已胜了三阵,看来这‘剑湖宫’又要让东宗再住五年了。辛师妹,咱们还须比下去么?”坐在他上首的那中年道姑强忍怒气,说道:“左师果然调教得好徒儿。但不知左师兄对‘无量玉壁’的钻研,这五年来可已大有心得么?”长须老者向她瞪了一眼,正色道:“师妹怎地忘了本派的规矩?”那道姑哼了一声,便不再说下去了。
这老者姓左,名叫子穆,是“无量剑”东宗的掌门。那道姑姓辛,道号双清,是“无量剑”西宗掌门。
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active May 7, 2024 00:47
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@aliyaliu368
aliyaliu368 / without-auth_e-book_tutorial_免登入電子書教學.md
Created November 21, 2022 14:48
教學用電子書免登入破解教學 | 本腳本用於繞過台灣主要課本/習作出版社電子書的前端身份驗證,達成不需要教師帳號即可使用電子書。支援 翰林、南一、康軒 三大出版社 | 請勿將本腳本作為抄答案、侵權等惡意用途,使用本腳本者,請自行承擔所有後果與風險

Visits_Count

教學用電子書免登入破解教學

使用前請務必閱讀 免責聲明

免責聲明

請勿將本腳本作為抄答案、侵權等惡意用途,使用本腳本者,請自行承擔所有後果與風險。

簡介

@tykurtz
tykurtz / grokking_to_leetcode.md
Last active May 7, 2024 00:45
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

Reinforcement Learning for Language Models

Yoav Goldberg, April 2023.

Why RL?

With the release of the ChatGPT model and followup large language models (LLMs), there was a lot of discussion of the importance of "RLHF training", that is, "reinforcement learning from human feedback". I was puzzled for a while as to why RL (Reinforcement Learning) is better than learning from demonstrations (a.k.a supervised learning) for training language models. Shouldn't learning from demonstrations (or, in language model terminology "instruction fine tuning", learning to immitate human written answers) be sufficient? I came up with a theoretical argument that was somewhat convincing. But I came to realize there is an additional argumment which not only supports the case of RL training, but also requires it, in particular for models like ChatGPT. This additional argument is spelled out in (the first half of) a talk by John Schulman from OpenAI. This post pretty much

@MihailCosmin
MihailCosmin / cuda_11.8_installation_on_Ubuntu_22.04
Last active May 7, 2024 00:38 — forked from primus852/cuda_11.7_installation_on_Ubuntu_22.04
Instructions for CUDA v11.8 and cuDNN 8.7 installation on Ubuntu 22.04 for PyTorch 2.0.0
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check