Install dependencies: npm install playwright cheerio node-html-markdown
Install firefox browser: npx playwright install firefox
Run the script: tsx html-to-md.ts https://mistral.ai/fr/news/mixtral-8x22b/
// WARNING:此脚本仅做学习和演示用途,在不了解其用途前不建议使用 | |
// 本脚本的用途是将输入内容分页,每次提取一页内容,编辑第二条消息,发送,然后收集结果 | |
// 使用前,需要有两条消息,参考模板 https://chat.openai.com/share/17195108-30c2-4c62-8d59-980ca645f111 | |
// 演示视频: https://www.bilibili.com/video/BV1tp4y1c7ME/?vd_source=e71f65cbc40a72fce570b20ffcb28b22 | |
// | |
(function (fullText) { | |
const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); | |
const groupSentences = (fullText, maxCharecters = 2800) => { | |
const sentences = fullText.split("\n").filter((line) => line.trim().length > 0); |
from openai_function_call import openai_function | |
import guidance | |
@openai_function | |
def get_weather(location: str, unit: str = 'fahrenheit', date: str = 'today'): | |
""" Get the current weather in a given location and date.""" | |
weather_info = { | |
'location': location, | |
'unit': unit, | |
'temperature': '60' if unit == 'fahrenheit' else '15', |
#!/usr/bin/env bash | |
# https://github.com/shadowsocks/shadowsocks-rust/releases | |
export SSVERSION=v1.23.0 | |
export SSPORT=443 | |
export SSPASSWORD="CHANGEME" | |
export SSARCHIVE="shadowsocks-${SSVERSION}.x86_64-unknown-linux-gnu.tar.xz" | |
#export SSARCHIVE="shadowsocks-${SSVERSION}.aarch64-unknown-linux-gnu.tar.xz" | |
export PREFIX=/usr/local/bin |
# Changes: | |
# * bind 9 key to 9 workspace | |
# * prntscrn copy to clipboard | |
# * use py3status | |
# * move window across monitors | |
# | |
# i3 config file (v4) | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! | |
# Set mod key (Mod1=<Alt>, Mod4=<Super>) |
function bind_enter | |
set -l lastline $history[1] | |
set -l cmdline (commandline) | |
if test -z (string trim "$cmdline") | |
commandline -r $lastline | |
commandline -f execute | |
else | |
commandline -f execute | |
end | |
end |
//The global script scope | |
def ctx = context(scope: scriptScope()) | |
//What things can be on the script scope | |
contributor(ctx) { | |
method(name: 'pipeline', type: 'Object', params: [body: Closure]) | |
method(name: 'build', type: 'Object', params: [job: 'java.lang.String'], doc: 'Build a job') | |
method(name: 'build', type: 'Object', namedParams: [parameter(name: 'job', type: 'java.lang.String'), parameter(name: 'parameters', type: 'Map'), parameter(name: 'propagate', type: 'boolean'), parameter(name: 'quietPeriod', type: 'java.lang.Integer'), parameter(name: 'wait', type: 'boolean'),], doc: 'Build a job') | |
method(name: 'echo', type: 'Object', params: [message: 'java.lang.String'], doc: 'Print Message') | |
method(name: 'emailextrecipients', type: 'Object', params: [recipientProviders: 'Map'], doc: 'Extended Email Recipients') |
# -*- mode: sh -*- | |
# Loaded by every zsh shell | |
# Do not put environement variables in it, use | |
# .profile for it. | |
if [ "$TMUX" = "" ]; then tmux; fi | |
# * zplug | |
export ZPLUG_HOME=${HOME}/.zplug | |
if [[ ! -d ${ZPLUG_HOME} ]]; then | |
git clone https://github.com/zplug/zplug $ZPLUG_HOME |
~/.w3m/keymap | |
keymap C-o NEXT_PAGE | |
default keymaps https://github.com/tokuhirom/w3m/blob/master/doc-jp/keymap.default | |
functions https://github.com/tats/w3m/blob/master/doc/README.func | |
Usefull functions: | |
SUBMIT - to submit the form (bind to C-o) |
for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.
Terminal
, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
BCompare
to BCompare.bak
: mv BCompare BCompare.bak
BCompare
, and chmod a+ux BCompare
: touch BCompare && chmod a+ux BCompare
BCompare
with text editor, insert the script :#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@