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 add_dynamic_properties(input_dict, instance, bulkload_state_copy): | |
| for key,value in input_dict.iteritems(): | |
| if key in PROPERTIES_STOP_CONCEPTS: | |
| continue | |
| try: | |
| instance[key] = value.lower() | |
| except: | |
| pass | |
| instance.pop('rechash') | |
| instance.pop('reckey') |
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
| >>> sp = [] | |
| >>> for x in props.split('\n'): | |
| ... if x.split()[0] == 'X': | |
| ... sp.append(x.split()[1].lower()) | |
| ... | |
| >>> sp.sort() | |
| >>> sp |
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
| STOP_CONCEPTS = ['acceptednameusageid', 'accessrights', 'basisofrecord', 'collectionid', 'coordinateprecision', 'coordinateuncertaintyinmeters', 'datasetid', 'dateidentified', 'day', 'decimallatitude', 'decimallongitude', 'disposition', 'enddayofyear', 'eventdate', 'eventid', 'eventtime', 'fieldnotes', 'footprintspatialfit', 'footprintsrs', 'footprintwkt', 'geologicalcontextid', 'georeferenceremarks', 'georeferenceverificationstatus', 'highergeographyid', 'identificationid', 'individualcount', 'individualid', 'institutionid', 'language', 'locationid', 'maximumdepthinmeters', 'maximumdistanceabovesurfaceinmeters', 'maximumelevationinmeters', 'minimumdepthinmeters', 'minimumdistanceabovesurfaceinmeters', 'minimumelevationinmeters', 'modified', 'month', 'nameaccordingtoid', 'namepublishedinid', 'nomenclaturalcode', 'occurrencedetails', 'occurrenceid', 'originalnameusageid', 'parentnameusageid', 'pointradiusspatialfit', 'rights', 'rightsholder', 'scientificnameid', 'startdayofyear', 'taxonconceptid', 'taxonid', ' |
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
| STOP_WORDS = ['a', 'able', 'about', 'across', 'after', 'all', 'almost', 'also', 'am', 'among', 'an', 'and', 'any', 'are', 'as', 'at', 'be', 'because', 'been', 'but', 'by', 'can', 'cannot', 'could', 'dear', 'did', 'do', 'does', 'either', 'else', 'ever', 'every', 'for', 'from', 'get', 'got', 'had', 'has', 'have', 'he', 'her', 'hers', 'him', 'his', 'how', 'however', 'i', 'if', 'in', 'into', 'is', 'it', 'its', 'just', 'least', 'let', 'like', 'likely', 'may', 'me', 'might', 'most', 'must', 'my', 'neither', 'no', 'nor', 'not', 'of', 'off', 'often', 'on', 'only', 'or', 'other', 'our', 'own', 'rather', 'said', 'say', 'says', 'she', 'should', 'since', 'so', 'some', 'than', 'that', 'the', 'their', 'them', 'then', 'there', 'these', 'they', 'this', 'tis', 'to', 'too', 'twas', 'us', 'wants', 'was', 'we', 'were', 'what', 'when', 'where', 'which', 'while', 'who', 'whom', 'why', 'will', 'with', 'would', 'yet', 'you', 'your'] |
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
| variable,name,value | |
| tmin3,DatabaseName,WorldClim | |
| tmin3,Version,1.4 | |
| tmin3,Release,3 | |
| tmin3,Created,20060104 | |
| tmin3,Projection,GEOGRAPHIC | |
| tmin3,Datum,WGS84 | |
| tmin3,MinX,30 | |
| tmin3,MaxX,60 | |
| tmin3,MinY,-30 |
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
| function(doc) { | |
| emit(doc._id, {rev:doc._rev, coords:doc.coords, varvals:doc.vars}); | |
| } |
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
| noparent,(tuberculosus),1 | |
| noparent,55,1 | |
| noparent,?,1 | |
| noparent,[abbotti],1 | |
| noparent,aaptus,1 | |
| noparent,aardvark,1 | |
| noparent,aba roundleaf bat,1 | |
| noparent,abae,1 | |
| noparent,abaxillare,1 | |
| noparent,abbotti,2 |
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
| { | |
| "publishers":[ // List of publishers | |
| { | |
| "key_urlsafe":"asdfLKJDldglkjdgD", | |
| "collections":[ // List of publisher collections | |
| { | |
| "key_urlsafe":"asdfLKJDldglkjdgD", | |
| "records":[ // List of collection records | |
| { | |
| "key_urlsafe":"agFfckELEglQdWJsaXNoZ", |
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
| class Record(model.Model): | |
| collections = model.StringProperty('c', repeated=True) |
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
| var event = new MOL.env.events.LocationEvent({}, 'get-url'); | |
| MOL.app.getBus().addHandler( | |
| "LocationEvent", | |
| function(event){ | |
| if (event.getAction() == 'take-url') { | |
| alert(event.getLocation().url); | |
| } | |
| } | |
| ); |