(draft; work in progress)
See also:
- Compilers
- Program analysis:
- Dynamic analysis - instrumentation, translation, sanitizers
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE RecordWildCards #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-| | |
Module : Main | |
Description : A Haskell code template designed for competitive programming, targeting platforms like CodeForces. | |
Presenting a Haskell code template designed for competitive programming, targeting platforms like CodeForces. | |
The template offers a modular structure to handle diverse tasks including input/output management, parsing, test case segmentation, and formatting. |
(draft; work in progress)
See also:
# LLVM requires C++11. | |
set(CMAKE_CXX_STANDARD 11) | |
# Find LLVM (this looks for LLVMConfig.cmake somewhere in the PATH or LLVM_DIR). | |
find_package(LLVM REQUIRED CONFIG) | |
# Enable us to use the LLVM CMake modules. | |
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${LLVM_CMAKE_DIR}") | |
# Enable us to use add_llvm_library. |
Hello, Rust community!
My name is Hadrien and I am a software performance engineer in a particle physics lab. My daily job is to figure out ways to make scientific software use hardware more efficiently without sacrificing its correctness, primarily by adapting old-ish codebases to the changes that occured in the software and computing landscape since the days where they were designed:
# https://gist.github.com/althonos/6914b896789d3f2078d1e6237642c35c | |
[metadata] | |
name = {name} | |
version = file: {name}/_version.txt | |
author = Martin Larralde | |
author_email = martin.larralde@embl.de | |
url = https://github.com/althonos/{name} | |
description = {description} | |
long_description = file: README.md |
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
See this issue.
Docker best practise to Control and configure Docker with systemd.
Create daemon.json
file in /etc/docker
:
{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.
In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.
This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.
#!/usr/lib/python | |
# -*- coding: utf-8 -*- | |
# | |
# This is a re-implementation of Python's timsort in Python | |
# itself. This is purely for learning purposes. :) | |
# References: [ | |
# https://en.wikipedia.org/wiki/Timsort, | |
# http://wiki.c2.com/?TimSort | |
# ] | |
# |