This is a new theme that provides support for Apr10 UI update.
Dark | Light |
---|---|
Yoav Goldberg, April 2023.
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
This Gist provides a solution to periodically capture screenshots of your Mac, and create therefrom a searchable PDF archive so that you can always get an answer to the “what, when, and where” questions about your usages.
To use these scripts:
rewind
, then:
~/bin
(or other fixed path you prefer);#!/bin/bash | |
hash git 2>/dev/null || { echo >&2 "Required command 'git' is not installed. ( hmm... why are you using this? ) Aborting."; exit 1; } | |
hash realpath 2>/dev/null || { echo >&2 "Required command 'realpath' is not installed. Aborting."; exit 1; } | |
hash pwd 2>/dev/null || { echo >&2 "Required command 'pwd' is not installed. Aborting."; exit 1; } | |
hash cd 2>/dev/null || { echo >&2 "Required command 'cd' is not installed. Aborting."; exit 1; } | |
hash echo 2>/dev/null || { echo >&2 "Required command 'echo' is not installed. Aborting."; exit 1; } | |
hash mv 2>/dev/null || { echo >&2 "Required command 'mv' is not installed. Aborting."; exit 1; } | |
hash diff 2>/dev/null || { echo >&2 "Required command 'diff' is not installed. Aborting."; exit 1; } | |
hash diffstat 2>/dev/null || { echo >&2 "Required command 'diffstat' is not installed. Aborting."; exit 1; } |
import re | |
import datetime | |
from imap_tools import MailBox, AND | |
def parse_html(html): | |
list_day = re.findall(re.compile('120%;">2022/(.*?) 您的消费明细如下:', re.S), html) | |
# print(list_day) | |
list_time = re.findall(re.compile("""<font face="Awesome Font" style="font-size:12px;line-height:120%;">(.*?)</font>""", re.S), html) |
@import Photos; | |
[PHPhotoLibrary requestAuthorizationForAccessLevel:PHAccessLevelReadWrite handler:^(PHAuthorizationStatus status) { | |
NSLog(@"PHAuthorizationStatus: %ld", status); | |
PHFetchOptions *fetchOptions = [[PHFetchOptions alloc] init]; | |
fetchOptions.includeHiddenAssets = YES; | |
fetchOptions.includeAllBurstAssets = YES; | |
PHFetchResult<PHAsset *> *result = [PHAsset fetchAssetsWithOptions:fetchOptions]; |
/* | |
* credit to Dhrumil Shah (@wandcrafting) and Robert Haisfield (@RobertHaisfield) | |
* for the original concept which was part of their RoamGames submission | |
* and can be found at: https://www.figma.com/file/5shwLdUCHxSaPNEO7pazbe/ | |
* | |
*/ | |
/* ======= OPTIONS ======== */ | |
/* note: if you change these, reload the page to see the effect */ |
// | |
// VirtualKeyboard.swift | |
// MacBook Air M1 Zhuyin Keyboard | |
// Written with SwiftUI ~=300 LOC, < 4hrs | |
// Created by Ethan Huang on 2021/1/13. | |
// Twitter: @ethanhuang13 | |
import SwiftUI | |
struct VirtualKeyboard: View { |
const { | |
aceVimMap, | |
mapkey, | |
imap, | |
imapkey, | |
insertJS, | |
getClickableElements, | |
vmapkey, | |
map, | |
unmap, |
// an example to create a new mapping `ctrl-y` | |
mapkey('<Ctrl-y>', 'Show me the money', function() { | |
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).'); | |
}); | |
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works. | |
map('gt', 'T'); | |
// an example to remove mapkey `Ctrl-i` | |
unmap('<Ctrl-i>'); |