Skip to content

Instantly share code, notes, and snippets.

@deltafoxin
deltafoxin / LLMs.md
Created February 14, 2023 22:17 — forked from yoavg/LLMs.md

Some remarks on Large Language Models

Yoav Goldberg, January 2023

Audience: I assume you heard of chatGPT, maybe played with it a little, and was imressed by it (or tried very hard not to be). And that you also heard that it is "a large language model". And maybe that it "solved natural language understanding". Here is a short personal perspective of my thoughts of this (and similar) models, and where we stand with respect to language understanding.

Intro

Around 2014-2017, right within the rise of neural-network based methods for NLP, I was giving a semi-academic-semi-popsci lecture, revolving around the story that achieving perfect language modeling is equivalent to being as intelligent as a human. Somewhere around the same time I was also asked in an academic panel "what would you do if you were given infinite compute and no need to worry about labour costs" to which I cockily responded "I would train a really huge language model, just to show that it doesn't solve everything!". We

@deltafoxin
deltafoxin / ecb.go
Created February 12, 2023 05:10 — forked from DeanThompson/ecb.go
Golang AES ecb mode
package utils
import "crypto/cipher"
type ecb struct {
b cipher.Block
blockSize int
}
func newECB(b cipher.Block) *ecb {
@deltafoxin
deltafoxin / waitress_server.py
Created July 31, 2022 21:05 — forked from ddelpero/waitress_server.py
Python waitress windows service
# Example class to start a Waitress server as a windows service
# the specific use case is running Waitress as a windows server using pywin32
# The Waitress docs only show how to use waitress-serve, but since waitress-serve is blocking
# you don't get a return value, which makes it impossible to gracefully stop the Waitress server
# from a windows service
# However, looking at the waitress-serve code, it's easy to write a custom class
# example pywin32 windows service: https://gist.github.com/drmalex07/10554232
from waitress.server import create_server
@deltafoxin
deltafoxin / DwmSnapshotHelper.cs
Created July 12, 2022 03:04 — forked from abodalevsky/DwmSnapshotHelper.cs
Uses DWM to create projection of Window to another window. Clip projection from desktop to memory stream.
// Creates projection of window (specified by HWND) to another window
// Takses snapshot of desktop and clip area where projection is resides
using System;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Draw = System.Drawing;
@deltafoxin
deltafoxin / cmake-vcpkg-qtcreator.md
Created March 26, 2022 17:52 — forked from hongyue/cmake-vcpkg-qtcreator.md
cmake, vcpkg and qt creator integration related stuff

VS Code's CMake Tools integration with vcpkg

Add the "cmake.configureSettings" section to vs code's settings.json.

For remote development, using 'open remote settings' to open settings.json.

{
    "cmake.configureSettings": {
        "CMAKE_TOOLCHAIN_FILE": "<vcpkg root folder>/scripts/buildsystems/vcpkg.cmake"
    }
}
@deltafoxin
deltafoxin / .zshrc
Created February 16, 2022 19:43 — forked from nobk/.zshrc
My light weight zshrc for WSL2 and Gentoo and MSYS2 and OpenWRT zsh shell
# z's config for the zsh
TERM=xterm-256color
# Load user rc script
[ -f "$HOME/.zsh_user.zsh" ] && source "$HOME/.zsh_user.zsh"
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
if [ -z "$HISTFILE" ]; then
@deltafoxin
deltafoxin / vagrant-cheat-sheet.md
Created January 21, 2022 20:06 — forked from wpscholar/vagrant-cheat-sheet.md
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
SQL Server 2017
----------------
Enterprise Core - 6GPYM-VHN83-PHDM2-Q9T2R-KBV83
Developer - 22222-00000-00000-00000-00000
Enterprise - TDKQD-PKV44-PJT4N-TCJG2-3YJ6B
Standard - PHDV4-3VJWD-N7JVP-FGPKY-XBV89
Web - WV79P-7K6YG-T7QFN-M3WHF-37BXC
https://www.teamos-hkrg.com/index.php?threads/microsoft-sql-server-english-2017-rtm-teamos.42103/
@deltafoxin
deltafoxin / offline_mdn_docs.md
Created May 11, 2021 12:26 — forked from zed-dz/offline_mdn_docs.md
Offline MDN Docs
  1. 慎看官网教程的[这个教程 -> Building Qt Desktop for Windows with MinGW][1],有点坑爹,避重就轻的,浪费我好多时间,正在看的最好赶紧关掉,忘掉。

  2. 需要 MinGW,貌似需要 Python 和 Perl,我之前就有,所以不知道到底用到没

  3. 去 [Qt官网][2] 下载 [qt-everywhere-opensource-src-4.8.6.zip][3],带文件夹解压到C:\Qt,并在该位置打开 cmd

  4. 修改C:\Qt\Qt_everywhere-src_4.8.6\mkspecs\win32-g++\qmake.conf的 line 63 QMAKE_LFLAGS = -> QMAKE_LFLAGS = -static line 70 QMAKE_LFLAGS_DLL = -shared -> QMAKE_LFLAGS_DLL = -static >为的是避免出现缺失 libstdc++-6.dll 等的情况