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 | |
# Regular Expression: | |
# (0|1[0-9]{0,2}|[2-9][0-9]?|2[0-4]?[0-9]|25[0-5]) | |
# .(0|1[0-9]{0,2}|[2-9][0-9]?|2[0-4]?[0-9]|25[0-5]) | |
# .(0|1[0-9]{0,2}|[2-9][0-9]?|2[0-4]?[0-9]|25[0-5]) | |
# .(0|1[0-9]{0,2}|[2-9][0-9]?|2[0-4]?[0-9]|25[0-5]) | |
import sys |
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 node | |
function println() { | |
print(...arguments); | |
process.stdout.write("\n"); | |
} | |
function print() { | |
for (d of arguments) { | |
process.stdout.write(d.toString()); |
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
const MAX_PRIORITY = 10; | |
const MAX_CHANNELS = 1000; | |
const MAX_EVENTS = 1000; | |
let task_queues = []; | |
let event_queue = []; | |
let event_waiting_tasks = []; | |
let channels = []; | |
let step_delay=50; |
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
package main | |
import ( | |
"fmt" | |
"time" | |
"math/rand" | |
) | |
var msg = &struct{}{} |
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 -S jruby -I . | |
require 'echowand.jar' | |
java_import 'echowand.service.Core' | |
java_import 'echowand.service.Service' | |
java_import 'echowand.net.InetNodeInfo' | |
java_import 'echowand.common.EOJ' | |
java_import 'echowand.common.EPC' |
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 <stdio.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <stdint.h> | |
#include <linux/i2c-dev.h> | |
#define I2C_FILE "/dev/i2c-1" | |
#define BMP180_I2C_ADDR 0x77 |
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
# | |
# Usage: glpsol -m sudoku.mod -o sudoku.sol | |
# | |
set Number := 1..9; | |
set GNumber := 0..2; | |
set Group{i in GNumber} := i*3+1..i*3+3; | |
var cell{Number, Number, 0..9} binary; | |
var answer_cell{Number, Number} integer; |
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
#define NODES 5 | |
#define LINKS 25 | |
#define INVALID 255 | |
#define INFINITY 16 | |
#define _(from, to) ((from) * NODES + (to)) | |
mtype = {msg}; |
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 ruby -Ku -w | |
def resize(a, blank, s) | |
num = s - a.size | |
return a if num==0 | |
if num > 0 | |
num.times { a.push(blank) } | |
else |
NewerOlder