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
static vlong | |
promptline(char const *prompt, char *buf, vlong size); | |
#include "example-keys.h" | |
static int | |
mcrypt_server_handler(vlong s1, vlong) | |
{ | |
int s2 = len32_start(s1); | |
if (s2 < 0) |
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
#pragma omp parallel for | |
for (int j = 0; j < num_instances; j++) { | |
mat4 mmodel = GLM_MAT4_IDENTITY_INIT; | |
#if 1 | |
int i_x = j % instances_width; | |
int i_y = j / instances_width; | |
int x = 7.0f * ((f32)i_x - (f32)instances_width / 2.0f); | |
int y = 7.0f * ((f32)i_y - (f32)instances_width / 2.0f); | |
x += 2.0f * (2.0f * timeoffset[j][3] - 1.0f); | |
y += 2.0f * (2.0f * timeoffset[j][4] - 1.0f); |
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
mbsync_std_account() { | |
local IFS=$' \t\n' | |
local id=$1 | |
local host=$2 | |
local addr=$3 | |
local user=$addr | |
local -a mailboxes=( "${@:4}" ) | |
if [[ "$id" == "@" ]]; then | |
id="${3//[@\.]/-}" |
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 object_type { INT, CSTR }; | |
struct object { | |
int type; | |
union { | |
int intvalue; | |
const char *cstrvalue; | |
}; | |
}; | |
int | |
object_equal(struct object *l, struct object *r) |
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
File "./beetle.py", line 157, in process_phases | |
return pipeline.execute() | |
File "./beetle.py", line 238, in execute | |
result = getattr(self, phase.lower())(result) | |
File "./beetle.py", line 259, in imports | |
ast = self.import_handler.process(ast, **kwds) | |
File "/home/miles/programming/beetle/importer.py", line 52, in process | |
return self.expand(ast) | |
File "/home/miles/programming/beetle/importer.py", line 74, in imexpand_ImportStatement | |
modules.append(self.handler.load_module(name.name, ast.pos)) |
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
r n . . k b n r | |
a . q . a a . a | |
B a . . . . . . | |
. . a . A . a . | |
. . A . . A . . | |
. . . . . . . . | |
A A . . . . A A | |
R N B Q K . N R | |
Choose a move: Bb5 |
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
template <typename, typename> struct is_less_than; | |
template <int X, int Y> struct is_less_than<Int<X>, Int<Y>> : std::bool_constant<(X < Y)> {}; | |
template <typename A, typename B> static constexpr bool is_less_than_v = is_less_than<A, B>::value; | |
template <typename, typename, typename=void> struct do_merge; | |
template <typename As, typename Bs> using merge = typename do_merge<As, Bs>::type; | |
// Need this because specialisations are chosen by specificity and | |
// ties are broken not by order but by compiler error. | |
template <> |
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
#! /usr/bin/env python3 | |
""" | |
List all Firefox tabs with title and URL | |
Supported input: json or jsonlz4 recovery files | |
Default output: title (URL) | |
Output format can be specified as argument | |
""" |
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
struct wlr_surface *wlr_surface_surface_at(struct wlr_surface *surface, | |
double sx, double sy, double *sub_x, double *sub_y) { | |
// Do stuff | |
} |
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
"""Investigating and implementing MCTS without the complications of the MTG simulator.""" | |
from collections import Counter | |
from copy import deepcopy | |
import math | |
import random | |
import cProfile | |
compose = lambda f: lambda g: lambda *args, **kwds: f(g(*args, **kwds)) |
NewerOlder