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
#!/bin/bash | |
ionice -c3 -p$$ | |
cd $(dirname $0) | |
LOGFILE=`find $1 -name "cmd_$(date +%m.%d.%y --date='(date) - 1 day').log"` | |
for file in $LOGFILE;do | |
echo $file | |
cat $file | ./stripper > $file.stripped | |
done |
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
<snippet> | |
<content><![CDATA[/** | |
* ${0:${TM_FILENAME}} | |
* This file is part of ${1:<program name>} | |
* | |
* Copyright (C) ${2:<year>} - ${3:<your name>} | |
* | |
* ${1:<program name>} is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 3 of the License, or |
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 Celery(celery.Celery): | |
def on_config_ready(self): | |
"""This method should be called manually after all configuration prepares | |
""" | |
assert DeclareDLXnDLQ not in self.steps['worker'] | |
conf = self.conf |
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
#!/bin/sh | |
# HLstatsX Community Edition - Real-time player and clan rankings and statistics | |
# Copyleft (L) 2008-20XX Nicholas Hastings ([email protected]) | |
# http://www.hlxcommunity.com | |
# | |
# HLstatsX Community Edition is a continuation of | |
# ELstatsNEO - Real-time player and clan rankings and statistics | |
# Copyleft (L) 2008-20XX Malte Bayer ([email protected]) | |
# http://ovrsized.neo-soft.org/ | |
# |
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 contextlib | |
import logging | |
import time | |
log = logging.getLogger(__name__) | |
class SessionLock: | |
def __init__(self, connection, lock_id: int): | |
""" |
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 logging | |
import time | |
from django.core.management.base import BaseCommand | |
from django.core.management.base import CommandError | |
from django.db import connections | |
from django.db.utils import OperationalError | |
logger = logging.getLogger(__name__) |
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 re | |
class ReStr: | |
""" | |
>>> ReStr(r'\d+') == '0000000' | |
True | |
>>> ReStr(r'\d.\ds remain') == '0.0s remain' | |
""" # noqa: W605 |
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 collections | |
from collections import UserDict | |
from collections import UserList | |
def maybe_hdict(value): | |
if isinstance(value, dict) and not isinstance(value, HDict): | |
return HDict(value) | |
return 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
import collections | |
import contextlib | |
import traceback | |
import jsonrpcapi | |
import pytest | |
from testing import AnyDict | |