This file contains hidden or 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 multiprocessing | |
import time | |
import sys | |
process_identifier = 'main' | |
class Collectible: | |
def __init__(self, identifier): | |
self.identifier = identifier |
This file contains hidden or 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
def switch(on): | |
def switch_decorator(cls): | |
for try_case in cls.__dict__.values(): | |
try: | |
switch_case = try_case.__switch_case__ | |
except AttributeError: | |
pass | |
else: | |
print(switch_case, '?') | |
if on == switch_case: |
This file contains hidden or 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 select | |
import socket | |
class AsyncSleep: | |
"""Event and action to sleep ``until`` a point in time""" | |
def __init__(self, until): | |
self.until = until |
This file contains hidden or 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/python3 | |
""" | |
Draft for a relative ``map`` based on abstract operations | |
.. function:: map(function, iterable, ...) | |
.. function:: reify(operation, iterable) | |
Apply the relative ``operation`` to every element of ``iterable``. | |
For example, ``reify(relative[0], [(1, 2, 3), range(5), "foobar"])`` returns ``[1, 0, 'f']``. |
This file contains hidden or 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 os | |
import chainlet | |
import subprocess | |
import hashlib | |
import sys | |
import collections | |
from chainlet.protolink import iterlet | |
This file contains hidden or 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/local/bin/python3 | |
import os | |
import argparse | |
import pickle | |
import time | |
from typing import Set, Iterable | |
import chainlet | |
from chainlet.concurrency import threads |
This file contains hidden or 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/python | |
import sys | |
import json | |
import random | |
import time | |
import argparse | |
import hashlib | |
def load_data(source): |
This file contains hidden or 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/local/bin/python3 | |
import argparse | |
import chainlet | |
from chainlet.concurrency import threads | |
import pickle | |
import os | |
import time | |
import datetime | |
CLI = argparse.ArgumentParser("Transform an ALICE catalogue dump to a hierarchy of whitelists") |
This file contains hidden or 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
NAMESPACE=${NAMESPACE:-"/export/xrootd/"} | |
RSYNC_ADDR=${RSYNC_ADDR:-"rsync://f01-120-179/alice-xrootd/"} | |
NS_START=${NS_START:-"00"} | |
NS_STOP=${NS_STOP:-"15"} | |
#!/bin/bash | |
if [[ "$*" =~ " -h" ]] || [[ "$*" =~ ^-h ]] || [[ "$*" =~ "--help" ]] | |
then | |
echo "usage:" >&2 | |
echo " <script> [NAMESPACE [RSYNC_ADDR [NS_START NS_STOP]]]" >&2 | |
echo "" >&2 |
This file contains hidden or 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
from __future__ import print_function | |
import subprocess | |
import os | |
import argparse | |
import ast | |
import multiprocessing | |
import sys | |
import threading | |
import errno |