This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"github.com/0xe2-0x9a-0x9b/Go-SDL/sdl" | |
gl "github.com/chsc/gogl/gl33" | |
"math" | |
"runtime" | |
"time" | |
"unsafe" |
This file contains hidden or 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
//============== threadlock.go | |
package threadlock | |
import "runtime" | |
// A threadlock contains a queue of functions to execute on a given OS thread. | |
type ThreadLock chan func() | |
// Blocking call that consumes the queue, executing all the functions until the channel is closed. | |
func (self ThreadLock) Lock() { |
This file contains hidden or 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
#! /usr/bin/python | |
"""Implementation of the arrow abstraction for functions. | |
Abstracting functions with Arrows has advantages. Arrows make it very easy to | |
compose functions (by simply 'multiplying' them with the `*` operator). The | |
order in which the arrows are written match the order of the computations, | |
making long pipelines easy to work with. Arrows also provide mechanisms for | |
creating and merging branches, which helps when a value needs to be consumed by | |
several functions, or when a function needs values from several sources. Arrows | |
can also support conditional application, selecting which of two functions f and |
This file contains hidden or 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
# This is the configuration file for DOSBox 0.74. (Please use the latest version of DOSBox) | |
# Lines starting with a # are comment lines and are ignored by DOSBox. | |
# They are used to (briefly) document the effect of each option. | |
[sdl] | |
# fullscreen: Start dosbox directly in fullscreen. (Press ALT-Enter to go back) | |
# fulldouble: Use double buffering in fullscreen. It can reduce screen flickering, but it can also result in a slow DOSBox. | |
# fullresolution: What resolution to use for fullscreen: original or fixed size (e.g. 1024x768). | |
# Using your monitor's native resolution with aspect=true might give the best results. | |
# If you end up with small window on a large screen, try an output different from surface. |
This file contains hidden or 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 XMonad | |
import XMonad.Config.Gnome | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageHelpers -- (isFullscreen, doFullFloat) | |
import XMonad.Hooks.SetWMName --hack to fix broken sun java | |
import XMonad.Layout.NoBorders | |
import XMonad.Util.CustomKeys | |
import Control.OldException | |
import Monad -- (when) | |
import Data.Monoid (All (All)) -- (All) |
This file contains hidden or 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
# Dunno how useful it could be. Whatever. | |
import types | |
class Monoid: | |
def __init__(self, xs): | |
self.xs = xs | |
@classmethod |
This file contains hidden or 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 datetime | |
import pickle | |
import time | |
import tkinter as tk | |
from dataclasses import dataclass | |
from enum import Enum | |
from functools import partial | |
from multiprocessing import Process | |
from multiprocessing.connection import Connection, Pipe | |
from pathlib import Path |
This file contains hidden or 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 hashlib | |
import pickle | |
import shelve | |
from decorator import decorator | |
SHELF: shelve.DbfilenameShelf | |
def _make_key(version, func, args, kwargs): |
This file contains hidden or 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
tool | |
extends Spatial | |
export var debug_run := false setget set_debug_run | |
onready var sun_light: DirectionalLight = $SunLight | |
onready var world_env: Environment = $WorldEnvironment.environment | |
func _ready(): | |
env_to_light() |
This file contains hidden or 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 <cmath> | |
#include <cassert> | |
#define DEBUG_BOUNDS 1 // 1 enabled, 0 disabled. | |
class BoundedFloat { | |
private: | |
float _value; | |
OlderNewer