Skip to content

Instantly share code, notes, and snippets.

View DocSavage's full-sized avatar

Bill Katz DocSavage

View GitHub Profile
@mythz
mythz / RpcVsMessages.md
Created November 22, 2011 18:02
Difference between an RPC-chatty and message-based API

Difference between an RPC-chatty and message-based API

	public interface IService
	{
	  Customer GetCustomerById(int id);
	  Customer[] GetCustomerByIds(int[] id);
	  Customer GetCustomerByUserName(string userName);
	  Customer[] GetCustomerByUserNames(string[] userNames);
 Customer GetCustomerByEmail(string email);
@moklett
moklett / openconnect.md
Created July 24, 2012 15:21
OpenConnect VPN on Mac OS X

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
    

brew install openconnect

@betolink
betolink / TrackBallControl.js
Created July 24, 2013 15:56
Modified version of TrackBallControls.js from THREE.js the regular trackball has issues when the canvas is bigger or smaller than the DOM.
/*
2013-07-23 @betolink
Modified from TrackBallControls to handle Three.js r59 API and not whole DOM attachment.
Licensed under WTFPL
http://www.wtfpl.net/txt/copying/
*/
THREE.TrackballControl = function ( object, domElement ) {
@justinfx
justinfx / errors.out
Last active December 29, 2015 18:49
Broken cgo / C++ test for Go, trying to wrap OpenColorIO
$ go build -x -v .
# swigtest/ocio
ocio/ocio.cpp:24:16: error: no viable conversion from 'OCIO::ConstConfigRcPtr' (aka 'shared_ptr<const OpenColorIO::v1::Config>') to 'Config *' (aka 'void *')
/usr/include/c++/4.2.1/tr1/boost_shared_ptr.h:678:7: note: candidate function

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@0xjac
0xjac / private_fork.md
Last active July 24, 2024 23:13
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active July 24, 2024 17:10
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.

Total missed: 2

Total guesses: 6158

First guess: spend

aback

  • ⬜⬜🟩🟩🟩: quack

abate

@nmwsharp
nmwsharp / printarr
Last active October 24, 2023 08:06
Pretty print tables summarizing properties of tensor arrays in numpy, pytorch, jax, etc. --- now on pip: `pip install arrgh`
Pretty print tables summarizing properties of tensor arrays in numpy, pytorch, jax, etc.
Now on pip! `pip install arrgh` https://github.com/nmwsharp/arrgh

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