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
[2010-05-19 11:29:27] INFO WEBrick 1.3.1 | |
[2010-05-19 11:29:27] INFO ruby 1.9.0 (2008-06-20) [x86_64-linux] | |
[2010-05-19 11:29:47] INFO WEBrick::HTTPServer#start: pid=22716 port=9292 | |
NoMethodError - undefined method `default_internal' for Encoding:Class: | |
/usr/lib/ruby1.9/gems/1.9.0/gems/haml-3.0.4/lib/haml/engine.rb:89:in `initialize' | |
/usr/lib/ruby1.9/gems/1.9.0/gems/sinatra-1.0/lib/sinatra/tilt.rb:444:in `new' | |
/usr/lib/ruby1.9/gems/1.9.0/gems/sinatra-1.0/lib/sinatra/tilt.rb:444:in `prepare' | |
/usr/lib/ruby1.9/gems/1.9.0/gems/sinatra-1.0/lib/sinatra/tilt.rb:124:in `initialize' | |
/usr/lib/ruby1.9/gems/1.9.0/gems/sinatra-1.0/lib/sinatra/base.rb:370:in `new' | |
/usr/lib/ruby1.9/gems/1.9.0/gems/sinatra-1.0/lib/sinatra/base.rb:370:in `block in compile_template' |
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
118 else: | |
119 -> rc = None | |
120 if noqueue: | |
121 rc = runner(ci, function, parameters, user, batch) | |
122 return rc | |
123 else: | |
124 publisher = runner.get_publisher() | |
(Pdb) n | |
> /Users/anb/manny/manny_web/manny/driver/network/__init__.py(120)execute_function() | |
-> if noqueue: |
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
anb:~$python | |
Python 2.7.1 (r271:86832, Feb 11 2011, 11:47:39) | |
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> True = False | |
>>> True | |
False | |
>>> True == False | |
True | |
>>> |
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
if ci != None and ci.parent.parent: | |
network_node = ci.parent.parent.name | |
node = ci.parent.parent | |
while ci.parent.parent and node.parent.type.code == 'NODE': | |
node = node.parent | |
ubr = node.parent | |
network_headed = ubr.name | |
else: | |
network_node = '' |
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
from django.core import validators | |
if 'PHONE' in contact_type: | |
validatate_phone = validators.RegexValidator(r"[0-9]{10,15}", _("Invalid number")) | |
validatate_phone(self.cleaned_data.get('value', '')) | |
elif contact_type == 'EMAIL': | |
validators.validate_email(self.cleaned_data.get('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
Mar 16 11:08:08 whiskey http-8080-15: Debug : phonePlatform : syslogBehavior : techzone_VOIP : updateVoipLine : request : <netplusAPI> | |
<voipLineId>21086</voipLineId> | |
<listing>N</listing> | |
<advertisingBlocked>N</advertisingBlocked> | |
<address> | |
<street>Rte de la route2</street> | |
<houseNumber>10</houseNumber> | |
<postCode>396100</postCode> | |
<place>Sierre2</place> | |
<installCompanyName>Earcorp</installCompanyName> |
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
{"SWITCH_STATUS": {"SHOW_INTERFACES": [{"Operational Status": "up"}, | |
{"Last Time Link Changed": "THU APR 14 11:13:28"}, | |
{"Number of Status Change": "155"}, | |
{"Type": "Ethernet"}, | |
{"SFP/XFP": "100Base-FX"}, | |
{"MAC address": "00:e0:b1:df:ce:d2"}, | |
{"BandWidth (Megabits)": "100Duplex : Full"}, | |
{"Autonegotiation": "0[]"}, | |
{"Long Frame Size(Bytes)": "9216"}, | |
{"Rx": ""}, |
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
In [1]: import re | |
In [2]: nonascii = re.compile('[^a-zA-Z]') | |
...: formatkey = lambda s: nonascii.sub('', s.lower().strip()) | |
In [3]: test_string = "fdasafsdB324234_()324sdafasd[]$$$" | |
In [4]: formatkey(test_string) | |
Out[4]: 'fdasafsdbsdafasd' |
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
test = "fadslfasd 81.123.233.14 fadslkfjads kterstl adfs 10.10.11.10f sad" | |
ip = re.findall( r'[0-9]+(?:\.[0-9]+){3}', test ) | |
In [29]: ip | |
Out[29]: ['81.123.233.14', '10.10.11.10'] |
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
GREP_COLOR=1;32 | |
MANPATH=/opt/local/share/man:/usr/share/man:/usr/local/share/man:/usr/X11/share/man:/opt/local/share/man | |
TERM_PROGRAM=Apple_Terminal | |
TERM=xterm-color | |
SHELL=/bin/bash | |
TMPDIR=/var/folders/Sb/SbK3zRVLE5Chw6KasxgUcE+++TI/-Tmp-/ | |
GOBIN=/Users/anb/go/bin | |
Apple_PubSub_Socket_Render=/tmp/launch-zsxVGh/Render | |
TERM_PROGRAM_VERSION=273.1 | |
OLDPWD=/Users/anb/manny/manny_web/manny/statistic |
OlderNewer