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
| {"data": {"type": "dois", "attributes": {"doi": "10.80519/asencis.4302-4ae4", "prefix": "10.80519", "suffix": "asencis.4302-4ae4", "event": "publish", "creators": [{"name": "Roberts, Michael", "nameType": "Personal", "givenName": "Michael", "familyName": "Roberts", "nameIdentifiers": [{"nameIdentifier": "https://orcid.org/0000-0001-6203-1986", "nameIdentifierScheme": "ORCID"}]}], "titles": [{"title": "HadCRUT4 Land & Ocean Temperature Measurements"}], "publisher": "asencis", "container": {}, "publicationYear": 2020, "subjects": [], "contributors": [], "types": {"resourceTypeGeneral": "Dataset"}, "relatedIdentifiers": [], "sizes": [21510268], "formats": ["application/x-netcdf"], "descriptions": [{"description": "HadCRUT4 is a global temperature dataset, providing gridded temperature anomalies across the world as well as averages for the hemispheres and the globe as a whole. CRUTEM4 and HadSST3 are the land and ocean components of this overall dataset, respectively.", "descriptionType": "Abstract"}, {"descripti |
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 serialize_dataset_to_doi(dataset: DatasetStorePointer) -> Dict[str, Any]: | |
| return { | |
| "data": { | |
| "type": "dois", | |
| "attributes": { | |
| "doi": dataset.doi, | |
| "prefix": settings.DATACITE['DOI_PREFIX'], | |
| "suffix": dataset.doi_suffix, | |
| "event": "publish", | |
| "creators": dataset.creators if dataset.creators else [], |
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
| db = {} | |
| db['ENGINE'] = 'django.db.backends.postgresql' | |
| db['OPTIONS'] = {'autocommit': True} | |
| db['NAME'] = my_model_db['database'] | |
| db['PASSWORD'] = my_model_db['password'] | |
| db['USER'] = my_model_db['user'] | |
| db['HOST'] = my_model_db['host'] | |
| logger.info("Connecting to database {db} on {host}".format(db=source_db['NAME'], host=source_db['HOST'])) |
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
| const PRODUCTION = process.env.NODE_ENV === "production"; | |
| if (PRODUCTION) { | |
| Vue.config.devtools = false | |
| Vue.config.debug = false | |
| Vue.config.silent = 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
| // Source: http://stackoverflow.com/questions/16491758/remove-objects-from-array-by-object-property | |
| var arr = [ | |
| { | |
| id: 1, | |
| property: "Property", | |
| }, | |
| { | |
| id:2, | |
| property: "Property", |
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
| import six | |
| import uuid | |
| import base64 | |
| from django.conf import settings | |
| from django.core.files import File | |
| from django.core.files.base import ContentFile | |
| from rest_framework import serializers |
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
| from django.db import connection | |
| from django.core.management.base import BaseCommand | |
| from django.conf import settings | |
| class Command(BaseCommand): | |
| help = 'Displays The Currently Connected DB Settings' | |
| def handle(self, *args, **kwargs): |
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
| <template> | |
| <div> | |
| <FilePond | |
| v-bind:max-files="4" | |
| v-bind:allow-multiple="true" | |
| v-bind:accepted-file-types="allowedFiletypes" | |
| v-bind:server="server.process" | |
| v-bind:files="files" | |
| v-on:init="handleFilePondInit" |