Skip to content

Instantly share code, notes, and snippets.

while (
$response_body =~ m/.*${station}full_480p.*(start|stop) recording.*/g )
{
switch ($1) {
case "start" {
$status = 0;
}
case "stop" {
$status = 1;
last;
def stopRecording(callsign, daypart, url, user, password):
"""Ceases recording a stream"""
payload = {
'action': 'stopRecording',
'appName': 'livefull/_definst_',
'streamname': callsign + 'full_480p'
}
r = requests.post(
url,
auth=HTTPDigestAuth(user, password),
Dynamic section at offset 0xb3550 contains 26 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libreadline.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libhistory.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libncursesw.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]

0x000000000000001d (RUNPATH) Library runpath: [/var/system/pkg/bash-4.0.1-1/lib]

]# puppet agent --test --verbose
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 403 on SERVER: Forbidden request: localhost(127.0.0.1) access to /node/hq-puppet.sbgnet.com [find] at :131
Info: Retrieving plugin
Error: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate: Error 403 on SERVER: Forbidden request: localhost(127.0.0.1) access to /file_metadata/plugins [search] at :131
Error: /File[/var/lib/puppet/lib]: Could not evaluate: Error 403 on SERVER: Forbidden request: localhost(127.0.0.1) access to /file_metadata/plugins [find] at :131 Could not retrieve file metadata for puppet://hq-puppet.sbgnet.com/plugins: Error 403 on SERVER: Forbidden request: localhost(127.0.0.1) access to /file_metadata/plugins [find] at :131
Info: Loading facts in /etc/puppet/modules/percona/lib/facter/mysql_facts.rb
Info: Loading facts in /etc/puppet/modules/percona/lib/facter/meminbytes.rb
Info: Loading facts in /etc/puppet/modules/epel/lib/facte
class UnsupportedPackageVersionError(Exception):
def __init__(self):
pass
#!/bin/env python
import cherrypy
import urlparse
import random
import re
class Balancer(object):
http_url = re.compile(r"""^(?P<subdomain>[-\w]+)\.(?P<domain>[-\w]+\.\w+)$""")
def __init__(self):
@jrmoserbaltimore
jrmoserbaltimore / python.md
Last active December 15, 2015 11:09
Fixing the python docs

Packages are a way of structuring Python’s module namespace by using “dotted module names”. For example, the module name A.B designates a submodule named B in a package named A. Just like the use of modules saves the authors of different modules from having to worry about each other’s global variable names, the use of dotted module names saves the authors of multi-module packages like NumPy or the Python Imaging Library from having to worry about each other’s module names.

Suppose you want to design a collection of modules (a “package”) for the uniform handling of sound files and sound data. There are many different sound file formats (usually recognized by their extension, for example: .wav, .aiff, .au), so you may need to create and maintain a growing collection of modules for the conversion between the various file formats. There are also many different operations you might want to perform on sound data (such as mixing, adding echo, applying an equalizer function, creating an artificial stereo effect), so

httpd -fstype=nfs,soft,tcp,vers=3,fsc,intr,nolock web-storage:/web/httpd
#!/bin/env python
import pyawk
pa = pyawk.Awk(fs='\w+')
def cpu_num(pa):
pa.global[numprocs] = int(pa.field[3])
def cpu_end(pa):
if date <= x.lastplay:
if verbose:
print 'Current date is not newer than logged!'
if force:
print 'Forcing anyway.'
else
print 'Skipping entry.'
if not force:
session.rollback()
continue