Skip to content

Instantly share code, notes, and snippets.

case_when is a code smell and across is a code smell too

I've written before about the risks of using dplyr without knowing base R. I now feel I can be more specific:

  • dplyr::case_when() is a code smell.
  • So is dplyr::across().

Evidence

@moyix
moyix / CodeGen_GPTJ_Conversion.md
Last active December 27, 2025 06:03
How to convert the SalesForce CodeGen models to GPT-J

Using Linear Algebra to Convert a Large Code Model

Background

The SalesForce CodeGen models are a family of large language models trained on a large amount of natural language data and then fine-tuned on specialized datasets of code. Models of size 350M, 2B, 6B, and 16B parameters are provided in three flavors:

  • nl, the base model trained on The Pile, a large natural language dataset compiled by EleutherAI
  • multi, which is fine-tuned from the nl model on a dataset of code in multiple languages, scraped from GitHub, and
  • mono, which is fine-tuned from the multi model on Python code only.
@reidjs
reidjs / note_organization_structure.md
Last active December 27, 2025 06:03
A five point strategy to keep your notes organized and easily searchable

A five point strategy to keep your notes organized and easily searchable

Why structure your notes?

There isn't a correct way to take notes, but I have found that having a system, any system, is extremely beneficial when you are working on large projects. Conventions allow you to stop thinking about the style of your notes and focus on quality and content. This isn't a list of rules that must be followed at all times, it's a recurring process that leads to a more useful collection of notes over time.

My system

  1. Keep all your structured notes in a single root folder and make sure it's safely backed up. I keep my notes in iCloud.
  2. Minimize directory depth. For example, you may have a music folder, but you should not have ANY folders within it, if possible. If you start accumulating a lot of guitar specific notes, you should make a new folder at the root directory named guitar.

Example file structure

@Sieboldianus
Sieboldianus / README.md
Last active December 27, 2025 06:03
An opinionated nextcloud ignore list for developers (sync-exclude.lst)

An opinionated nextcloud ignore list for developers (sync-exclude.lst)

The latest nextcloud server versions will have ransomware detection automatically enabled, meaning that syncing common developer file types (e.g. .lock) will return errors.

Fatal webdav OCA\DAV\Connector\Sabre\Exception\Forbidden: Ransomware file detected. Prevented upload of ..py/bokeh/secrets.tar.enc because it matches extension pattern ".enc"

If you are syncing complex, nested work directories as a developer, the following

@ctsrc
ctsrc / README.md
Last active December 27, 2025 06:03 — forked from niw/README.en.md
Guide: Run FreeBSD 13.1-RELEASE for ARM64 in QEMU on Apple Silicon Mac (MacBook Pro M1, etc) with HVF acceleration (Hypervisor.framework)
@nikvdp
nikvdp / gitlab-backup.md
Last active December 27, 2025 06:03
Back up GitLab to GitHub

Backup your GitLab repos to GitHub

GitLab recently decided to silently delete any repositories that hadn't been accessed in the last year. The announcement didn't go over well and they soon caved to public pressure and decided to instead back up inactive repos to object storage instead of unilaterally deleting them. I'm glad they reconsidered, but the experience left me with a bad taste in my mouth, so I decided to look into (relatively) low

GitHub changed the world of open-source.
In the beginning it brought together the disconnected programmers who always wanted to work on something with other like-minded people.
In the present it's no longer the foreground. Businesses and professionals connect and the profiles become a bragging ground.
The GH PR system is stretched to its limits. During the early days this was ok: PRs were few and far between. It worked.
I've changed, and so has GitHub. As I grow older I care more about my impact and personal data responsibility. I care about FOSS work being used for profit.

Anysphere Show HN Open Testing

We have deployed a small server for Hacker News users to test out Anysphere. The deployment is free, open to everyone, and will be up for at least a month. If you are interested in using the real Anysphere, apply here.

The Anysphere client is fully open source here: anysphere/client.

Mac

First download Anysphere: anysphere.co/download.

@hirrolot
hirrolot / CoC.ml
Last active December 27, 2025 06:03
Barebones lambda cube in OCaml
(* The syntax of our calculus. Notice that types are represented in the same way
as terms, which is the essence of CoC. *)
type term =
| Var of string
| Appl of term * term
| Binder of binder * string * term * term
| Star
| Box
and binder = Lam | Pi