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 itertools | |
import os | |
# =============================================================================================== # | |
class LameDhcp(object): | |
"""A cooperative filesystem-based IP reservation mechanism | |
""" | |
#--- CONFIGURATION ---------------------------------------------------------------------------# |
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 time | |
import multiprocessing as mp | |
def main(): | |
# how many processes should we spawn? | |
num_parallel_procs = 12 | |
# queue that will pass work to each worker | |
q = mp.Queue(num_parallel_procs) |
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 | |
### Furcadia Login / Connection Example | |
# | |
# Last Updated: 2022-02-14 | |
# Author: Artex <icedragon@quickfox.org> | |
# | |
import errno | |
import re |
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 <string> | |
#include <sstream> | |
#include <unistd.h> | |
#include "mq.h" | |
#define MQ_NAME "/ice.test" | |
void printSyntax(const char* exe) | |
{ |
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
class MyNumber: | |
def __init__(self, n: int): | |
self.__n = n | |
def __repr__(self) -> str: | |
return f"{self.__class__.__name__}({self.value})" | |
def __str__(self) -> str: | |
return str(self.value) |
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 | |
# Run: python3 mynumber.py | |
# Test: python3 -m unittest mynumber.py | |
import unittest | |
class MyNumber: | |
def __init__(self, n: int): | |
self.__n = n |
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
""" | |
IceDragon's Split & Merge (IDSM) Script | |
""" | |
from __future__ import annotations | |
import os | |
import sys | |
import struct | |
import hashlib |
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 once | |
#include <exception> | |
#include <fstream> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include "DiffBlock.hpp" |
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 once | |
#include <mutex> | |
#include <condition_variable> | |
#include "circular_queue.hpp" | |
template <typename T, size_t N> | |
class bqueue |
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 <cstdio> | |
template<typename T> | |
class smartptr { | |
public: | |
smartptr(T* v) : _data(new data(v)) { | |
printf(" * smartptr: obtained value %d\n", *_data->value); | |
} | |
smartptr(const smartptr &other) : _data(other._data) { |
NewerOlder