This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <map> | |
#include <algorithm> | |
#include <limits> | |
using std::string; | |
using std::vector; | |
using std::map; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HG changeset patch | |
# User Daniel Jour <[email protected]> | |
# Date 1472150146 -7200 | |
# Thu Aug 25 20:35:46 2016 +0200 | |
# Node ID 62249532accb9fb9f7df2687cb86532193d953e0 | |
# Parent f51a5bd170dcff8977bfb55af7f1e39a6d5a3d2f | |
WIP: autotoolizing the build system and configuration | |
diff -r f51a5bd170dc -r 62249532accb Makefile.am | |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#CLISP_LINKKIT = $$($(CLISP) -b)/linkkit | |
srcdir = . | |
CC = gcc | |
CPPFLAGS = | |
CFLAGS = -Wall -O2 | |
CLISP = clisp -q -norc | |
CLISP_LINKKIT = $(shell $(CLISP) -b)/linkkit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; enum-class-indent.el --- Fixing enum class indentation -*- lexical-binding: t; -*- | |
;; Keywords: c++ | |
;; Version: 0.0.1 | |
;;; Commentary: | |
;; This hack fixes indentation for C++11's "enum class" in Emacs. | |
;; http://stackoverflow.com/questions/6497374/emacs-cc-mode-indentation-problem-with-c0x-enum-class/6550361#6550361 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
uint32_t a = (...); | |
uint32_t b = a << 31; | |
When uint32_t is defined as a short type, then both operands of the | |
shift will get promoted to int. Thus above code is then equivalent to: | |
unsigned short a = (...); | |
unsigned short b = (unsigned short)((int)a << 31); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2017 Daniel Jour <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person | |
# obtaining a copy of this software and associated documentation files | |
# (the "Software"), to deal in the Software without restriction, | |
# including without limitation the rights to use, copy, modify, merge, | |
# publish, distribute, sublicense, and/or sell copies of the Software, | |
# and to permit persons to whom the Software is furnished to do so, | |
# subject to the following conditions: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to build on an x86-64 linux system: | |
nasm -f elf64 hal.s | |
gcc -Wall -Wextra -c coop-sched.c | |
gcc -o tryit *.o | |
./tryit | |
There's still one bug, more in the comments of the source file(s)! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import lzf | |
import os | |
import struct | |
def decompress(lzf_file, out_file): | |
chunk_number=1 | |
while True: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import PySimpleGUI as sg | |
loop = asyncio.new_event_loop() | |
asyncio.set_event_loop(loop) | |
form = sg.FlexForm( | |
"Everything bagel", auto_size_text=True, default_element_size=(40, 1) | |
) |