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
[root@auth ~]# ipa-replica-manage list | |
auth.axiom: master | |
auth.axiompvd: master | |
[root@auth ~]# ipa-replica-manage list -v `hostname` | |
auth.axiom: replica | |
last init status: None | |
last init ended: None | |
last update status: 0 Replica acquired successfully: Incremental update started | |
last update ended: None |
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 os | |
import urllib | |
from thredds_crawler.crawl import Crawl | |
import logging | |
import logging.handlers | |
logger = logging.getLogger('thredds_crawler') | |
fh = logging.handlers.RotatingFileHandler('/var/log/iso_harvest/iso_harvest.log', maxBytes=1024*1024*10, backupCount=5) | |
fh.setLevel(logging.DEBUG) | |
ch = logging.StreamHandler() |
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 | |
. ~/source_ooi | |
. $HOME/.venvburrito/startup.sh | |
pushd . | |
COI_VIRTUALENV=ooi | |
UI_VIRTUALENV=ion-ux |
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 flask.ext.admin.contrib.sqla import ModelView | |
# 'location' is the GeoAlchemy2 column | |
class FeatureView(ModelView): | |
... | |
form_overrides = dict(location=WTFormsMapField) | |
form_args = dict( | |
location=dict( | |
geometry_type='Polygon', height=500, width=500, cloudmade_api="{your_api}" | |
) |
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
def set_data_array(nc, variable, data): | |
# What is 50% of the available memory | |
available_memory = psutil.virtual_memory().available * .50 | |
if data.nbytes > available_memory: | |
# Houston... | |
# Try 10 sub arrays. Should have some logic here to determine | |
# a better number of arrays to split this into | |
smallers = np.array_slice(data, 10) | |
i = 0 # track start index |
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 | |
yum install -y gcc gcc-c++ gcc-gfortran curl-devel libxml2-devel bison flex wget make libjpeg-devel expat-devel gsl-devel | |
INSTALL_PATH=/opt | |
mkdir -p $INSTALL_PATH/src | |
# ANTLR2 | |
APP=antlr-2.7.7 | |
ANTLR_PATH=$INSTALL_PATH/$APP |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<om:ObservationCollection xmlns:gml="http://www.opengis.net/gml" xmlns:om="http://www.opengis.net/om/1.0" xmlns:swe="http://www.opengis.net/swe/1.0.1" xmlns:swe2="http://www.opengis.net/swe/2.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" gml:id="SPOT5_DATA" xsi:schemaLocation="http://www.opengis.net/om/1.0 http://schemas.opengis.net/om/1.0.0/observation.xsd"> | |
<om:member> | |
<om:Observation> | |
<om:samplingTime> | |
<gml:TimePeriod> | |
<gml:beginPosition>1990-01-01T00:00:00Z</gml:beginPosition> | |
<gml:endPosition>1990-01-01T00:00:00Z</gml:endPosition> | |
</gml:TimePeriod> | |
</om:samplingTime> |
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
<!-- FMRC Aggregation --> | |
<featureCollection featureType="FMRC" name="LakeErieSST-FMRC" harvest="true" path="LakeErieSST-FMRC"> | |
<metadata inherited="true"> | |
<serviceName>agg</serviceName> | |
<documentation type="summary">Lake Erie SST</documentation> | |
</metadata> | |
<collection spec="/var/thredds/MTRI-LST/erie_current_year/converted/.*nc4$"/> | |
<!-- The protoDataset changes are not reflected in the 'Best Time Series' --> | |
<protoDataset choice="Penultimate"> | |
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"> |
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
ActiveRecord::MultiparameterAssignmentErrors (1 error(s) on assignment of multiparameter attributes): | |
/vendor/rails/activerecord/lib/active_record/base.rb:2095:in `execute_callstack_for_multiparameter_attributes' | |
/vendor/rails/activerecord/lib/active_record/base.rb:2075:in `assign_multiparameter_attributes' | |
/vendor/rails/activerecord/lib/active_record/base.rb:1676:in `attributes=' | |
/vendor/rails/activerecord/lib/active_record/base.rb:1592:in `update_attributes' | |
/usr/local/apache2/htdocs/gf_test/current/app/controllers/listing_controller.rb:472:in `update' | |
/usr/local/apache2/htdocs/gf_test/current/app/controllers/listing_controller.rb:446:in `update' |
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
def dayify(symbol,countsymbol,sumsymbol = nil) | |
# This is for calculating things like emails sent. Each time an update email is sent, | |
# one row is added to the Analytic table with the 'symbol'. Each analytic run, the past | |
# day of those symbols are rolled into one Analytic called 'countsymbol'. If there is a | |
# quantity specifed as 'newsymbol' then the values are aggregated and saved as 'newsymbol'. | |
# In the case of update emails, the number of updates is the aggregate, the number of emails | |
# is the count. | |
# Sample call for update emails: dayify(:update_email_sent,:daily_update_emails,:updates_in_daily_emails) | |
# Sample call for invite emails: dayify(:invite_email_sent,:daily_invite_emails) | |
z = Analytic.find_by_sql("select sum(value) as sum, count(value) as count, date_trunc('day',created_at) as x from analytics WHERE resource = '#{symbol.to_s}' AND created_at < date_trunc('day',now()) group by date_trunc('day',created_at)") |
NewerOlder