- Install GNU Make if
gmake
is not available:brew install make
- Clone the repository:
git clone https://github.com/codedellemc/rexray
import africa | |
from time import sleep | |
from weather import rain | |
is_dragged = False | |
while africa: | |
if rain in africa: |
{ | |
"compilerOptions": { | |
"allowJs": true, | |
"alwaysStrict": true, | |
"checkJs": true, | |
"downlevelIteration": true, | |
"emitDecoratorMetadata": true, | |
"esModuleInterop": true, | |
"experimentalDecorators": true, | |
"lib": [ "es2017" ], |
const readline = require('readline') | |
/** | |
* Create an active bound readline interface using `stdin` and `stdout`. | |
* | |
* @param {function(string): void} callback handler for each inputed line | |
* @returns {readline.ReadLine} the active configured interface | |
*/ | |
function createReadlineInterface(callback) { | |
const rl = readline.createInterface({ |
import os | |
import sys | |
def notify(text, title=None, subtitle=None, sound_name=None): | |
""" | |
Displays a notification on macOS systems using AppleScript. | |
""" | |
if sys.platform.startswith('darwin'): | |
cmd = "osascript -e 'display notification \"{}\"".format(text) |
import java.util.List; | |
import java.util.Random; | |
import java.util.stream.Collectors; | |
import java.util.stream.Stream; | |
import java.util.Arrays; | |
public class RandomSubset { | |
// Returns a random subset of a given stream. | |
static <E> List<E> getRandomSubset(Stream<E> stream) { |
#include <string.h> | |
// In-place reverse a null-terminated string. | |
// Note: The behavior is undefined if str is not null-terminated. | |
void strrev(char* str) { | |
size_t n = strlen(str); | |
char *end = &str[n-1]; | |
char tmp; | |
while (str < end) { |
#include <stdlib.h> | |
// Allocates a 2D array that can be accessed in the form arr[r][c]. | |
// The caller is responsible for calling free() when done. | |
void** malloc2d(size_t rows, size_t cols, size_t element_size) { | |
size_t header = rows * sizeof(void*); | |
size_t body = rows * cols * element_size; | |
size_t needed = header + body; | |
void** mem = malloc(needed); |
#!/usr/local/bin/python3 | |
# pylint: disable=C0103, C0111 | |
def english_phrase(num): | |
"""Returns an English phrase string for an integer n.""" | |
n = int(num) | |
negative_name = "negative" | |
names = { |
#define INT_MIN 1 << (sizeof(int)*8 - 1) | |
int max(int a, int b) { | |
unsigned int ua = (unsigned int) a - INT_MIN; | |
unsigned int ub = (unsigned int) b - INT_MIN; | |
int k = ((ub-ua) >> (sizeof(int)*8 - 1)) & (0x1); | |
return k*a + (1-k)*b; | |
} |