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
System.NullReferenceException | |
Object reference not set to an instance of an object. | |
Stack Trace: | |
at Quest.Toad.CodeInsight.LanguageDialect.CompareObject(BaseObject obj, String schema, String owner, String name) | |
at Quest.Toad.CodeInsight.BaseDialect.GenerateInsight(IConnection connection, String defaultSchema, Boolean filtering, Insight insight, Boolean secondary, Boolean& hasSecondary, List`1 ownerList) | |
at Quest.Toad.CodeInsight.BaseDialect.GetInsight(IConnection connection, IParserChunk chunk, Int32 offset, String defaultSchema, Int32& startOffset, Boolean& hasSecondary, Boolean filtering, Boolean secondary, HotTokenInsight hotToken) | |
at Quest.Toad.Editor.Commands.InvokeMemberListCommand.FetchMemberListItems(Object editorText) |
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
<table width="514" cellpadding="3" cellspacing="0" class="pollentable"> | |
<tbody> | |
<tr> | |
<td width="100"></td> | |
<td width="400"><img src="images/polen_graph.png" alt="" width="399" height="43" border="0"></td> | |
</tr> | |
<!--START--> | |
<tr> | |
<td><strong>Cedar</strong></td> | |
<td align="left"><img src="http://www.intermountainallergy.com/images/gl.jpg" width="400" height="10" alt="bar in graph"></td> |
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
Goal: To summarize these 16 values and rate it on my scale. My first inclination is to use the median value(80). I didn't think the average is accurate because sometimes the data can be highly skewed. | |
scale: {40: 'extra low', 80: 'low', 160: 'moderate', 240: 'high-moderate', 320: 'high', 400 : 'extra high'} | |
>>> pd.values() | |
[160, 80, 80, 120, 240, 400, 80, 80, 400, 240, 80, 80, 160, 80, 80, 80] | |
>>> numpy.std(pd.values()) | |
107.9062092745362 |
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
hadoop4:utahpollen nkodner$ python pollen.py | |
Cedar 160 | |
Ash 160 | |
Box Elder/ Maple 80 | |
Sycamore 80 | |
Birch 80 | |
Cottonwood 80 | |
Willow 40 | |
Oak 40 | |
Russian Olive 40 |
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 get_database_parameters(db_name): | |
""" given a database name (db_name), returns a dict with | |
host, database, username, password """ | |
keys = ['hostname', 'database', 'username', 'password'] | |
values = [dbconfig.get(db_name, x) for x in keys] | |
db_params = dict(zip(keys, values)) | |
return db_params |
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
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) | |
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import datetime | |
>>> month_begin_date = '201104' | |
>>> friendly_date = datetime.datetime.strptime(month_begin_date,'%Y%m').strftime('%B, %Y') | |
>>> print friendly_date | |
April, 2011 | |
>>> |
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
mike korir 950 BROWARD COUNTY PUBLIC SCHOOLS 15.83 | |
evan dehart 983 MOSS & ASSOCIATES 16.38 | |
ronnie holassie 994 INDIVIDUAL 16.57 | |
trey andrews 998 RUNNER'S EDGE, THE 16.63 | |
michael stone 1028 RUNNER'S EDGE, THE 17.13 | |
matthew kelly 1067 CLUB MED 17.78 | |
joel cardosa 1101 BROWARD COUNTY PUBLIC SCHOOLS 18.35 | |
alan beach 1103 SHELTAIR AVIATION 18.38 | |
robert leaf 1108 BROWARD COUNTY PUBLIC SCHOOLS 18.47 | |
joe monks 1114 BROWARD COUNTY PUBLIC SCHOOLS 18.57 |
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
#!/bin/python | |
f=open('5k.txt') | |
# column headers | |
print ','.join(['runner_name','seconds','team','minutes']) | |
for line in f: | |
data = line.strip() | |
(bib,name,time,gender,team) = data.split('\t') | |
# split the time on :. If it has 2 components then it's MM:SS. | |
# if 3 components then HH:MM:SS |
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
set linesize 200 | |
select b.username | |
, count(*) "sessions" | |
, round(sum(a.pga_alloc_mem)/1024/1024) "all sessions mb" | |
, round(avg(b.last_call_et/60)) "avg idle time" | |
, round(avg(a.pga_alloc_mem)/1024/1024) "avg mb" | |
, sum(case when b.last_call_et >=600 then 1 else 0 end) "idle 10" | |
, round(sum(case when b.last_call_et >=600 then a.pga_alloc_mem else 0 end)/1024/1024) "idle 10 MB" | |
, sum(case when b.last_call_et >=900 then 1 else 0 end) "idle 15" | |
, round(sum(case when b.last_call_et >=900 then a.pga_alloc_mem else 0 end)/1024/1024) "idle 15 MB" |