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 <stdbool.h> | |
#include <stddef.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
#include <stdio.h> | |
#include <signal.h> | |
#include <unistd.h> | |
#define NUM_WORKERS 8 | |
#define NUM_JOBS 400 |
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 <cuda.h> | |
#include <stdexcept> | |
#include <string> | |
#include <vector> | |
#include <memory> | |
#include <cstdint> | |
#include <cstdio> | |
#include <unistd.h> | |
using error = std::runtime_error; |
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
eq = $(filter $1,$2) | |
# List operations | |
slice = $(wordlist 2,$(words $1),$1) | |
map = $(if $2,$(call map,$1,$(call slice,$2),$3,$4 $(call $1,$(firstword $2),$3,$4)),$4) | |
rotate = $(call slice,$1) $(firstword $1) | |
zip = $(if $2,$(call zip,$1,$(call slice,$2),$(call rotate,$3),$4 $(call $1,$(firstword $2),$(firstword $3))),$4) | |
fold = $(if $2,$(call fold,$1,$(call slice,$2),$(call $1,$3,$(firstword $2),$2)),$3) | |
explode = $(if $(call eq,$(words $4),$1),$3,$(call explode,$1,$2,$3 $2,$(words $4) $4)) |
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 java.util.List; | |
import java.util.ArrayList; | |
import java.util.LinkedList; | |
import java.util.stream.Collectors; | |
import java.util.stream.LongStream; | |
import java.util.function.Function; | |
import java.util.Arrays; | |
class Stream | |
{ |
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 <stddef.h> | |
#include <stdio.h> | |
#include <signal.h> | |
#include <setjmp.h> | |
#include <stdlib.h> | |
static jmp_buf env; | |
static const char* shc = | |
"\x55\x48\x89\xe5\x48\x89\x7d\xe8\x48\x8b\x45\xe8" |
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
### List operators | |
slice = $(wordlist 2,$(words $1),$1) | |
replicate = $(if $(call eq,$(words $4),$1),$3,$(call replicate,$1,$2,$3 $2,$(words $4) $4)) | |
rotate = $(call slice,$1) $(firstword $1) | |
map = $(if $2,$(call map,$1,$(call slice,$2),$3,$4 $(call $1,$3,$(firstword $2),$4)),$4) | |
fold = $(if $2,$(call fold,$1,$(call slice,$2),$(call $1,$3,$(firstword $2))),$3) | |
zip = $(if $2,$(call zip,$1,$(call slice,$2),$(call rotate,$3),$4 $(call $1,$(firstword $2),$(firstword $3))),$4) | |
### Arithmetic operators | |
inc = $(words $(call replicate,$1,_) _) |
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 <cuda.h> | |
#include <stdexcept> | |
#include <string> | |
#include <vector> | |
#include <memory> | |
#include <cstdint> | |
#include <cstdio> | |
#include <unistd.h> | |
using error = std::runtime_error; |
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 <type_traits> | |
template <typename T, typename = std::enable_if_t<std::is_compound_v<T>>> | |
constexpr T sum(const T& v) noexcept | |
{ | |
return v; | |
} | |
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
Array.prototype.append = function (element) { | |
this.push(element); | |
return this; | |
}; | |
range = (length) => { | |
return (function range() { | |
if (this.length < length) { | |
this.push(this.length); |
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 <stddef.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
struct __attribute__((packed)) class_object | |
{ | |
// TODO* handle | |
void *super; | |
void (*destructor)(void*, void*); |
NewerOlder