Skip to content

Instantly share code, notes, and snippets.

View SomeoneSerge's full-sized avatar
💭
Completely swamped again

Someone SomeoneSerge

💭
Completely swamped again
View GitHub Profile
@twiecki
twiecki / GLM-hierarchical-jax.ipynb
Last active September 7, 2022 23:21
notebooks/GLM-hierarchical.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrepg
andrepg / emojis.md
Created September 26, 2020 21:23
Markdown GitHub Emojis

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@SomeoneSerge
SomeoneSerge / inverse-transform.ipynb
Last active October 5, 2020 19:42
Fair inverse transform implementation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bratorange
bratorange / nix_env_unstable_guide.md
Last active July 8, 2024 13:49
Adding the nix unstable channel

Using the nipkgs unstable channel

Motivation

There a times when you need to build something from the nix unstable channel. For example the master contains a new package you need, but the next nixpkgs release is somewhere in the future, and you need this package now. In this guide I want to show how to install packages from unstable by using nix-env. Furthermore I hope to give a basic understanding of the channels concept.

What are nix channels?

A channel is a set of expressions which includes severall build, installation and configuration instructions for packages, services and the system itself. The repository normaly used here is nixpkgs. It is developed at https://github.com/NixOS/nixpkgs.

What is the nix unstable channel?

The unstable channel is a copy of the NixOS/nixpkgs master. It is pulled from github once in a while and will be available from a mirror under https://nixos.org/channels/nixpkgs-unstable. Since NixOS uses half-anual released stable channels, some changes (especially new f

@pfmoore
pfmoore / metadata.py
Created June 22, 2020 14:56
Python packaging metadata parser
import re
import json
from email.message import EmailMessage
from email import message_from_string
class InvalidMetadata(Exception):
pass
SINGLE_USE = [
"Metadata-Version",
@Nekrolm
Nekrolm / cdfs.cpp
Created February 22, 2020 12:14
compile-time dfs
#include <iostream>
#include <cstring>
#include <type_traits>
#include <utility>
#include <tuple>
// graph descriptions
template <int... Next>
using AdjacentList = std::integer_sequence<int, Next...>;
@Nekrolm
Nekrolm / cpp20_concepts.cpp
Created January 11, 2020 15:12
c++20 concepts example
#include <type_traits>
template <class From, class To>
concept is_convertible = requires(From f){
{ static_cast<To>(f) } -> To;
};
template <typename Fst>
concept BaseFst = requires {
@Nekrolm
Nekrolm / cfft.cpp
Created April 21, 2019 17:38
compile-time fast fourier transform
#include <iostream>
#include <complex>
#include <cmath>
#include <utility>
#include <chrono>
#include <array>
// std::complex<T>::operators -- not constexpr in C++17
template <class T>
@edolstra
edolstra / nix-lang.md
Last active March 27, 2025 11:36
Nix language changes

This document contains some ideas for additions to the Nix language.

Motivation

The Nix package manager, Nixpkgs and NixOS currently have several problems:

  • Poor discoverability of package options. Package functions have function arguments like enableFoo, but there is no way for the Nix UI to discover them, let alone to provide programmatic ways to
@evancz
evancz / data-interchange.md
Last active December 31, 2024 01:04
Why do I have to write JSON decoders in Elm?

A vision for data interchange in Elm

How do you send information between clients and servers? What format should that information be in? What happens when the server changes the format, but the client has not been updated yet? What happens when the server changes the format, but the database cannot be updated?

These are difficult questions. It is not just about picking a format, but rather picking a format that can evolve as your application evolves.

Literature Review

By now there are many approaches to communicating between client and server. These approaches tend to be known within specific companies and language communities, but the techniques do not cross borders. I will outline JSON, ProtoBuf, and GraphQL here so we can learn from them all.