content
stringlengths 7
1.05M
|
---|
class Stack:
"""
Stack data structure using list
"""
def __init__(self,value):
"""
Class initializer: Produces a stack with a single value or a list of values
"""
self._items = []
if type(value)==list:
for v in value:
self._items.append(v)
self._height = len(value)
else:
self._items.append(value)
self._height = 1
def pop(self):
if self._height == 0:
print ("Stack is empty. Nothing to pop.")
return None
else:
self._height -=1
return self._items.pop()
def push(self,value):
self._height +=1
self._items.append(value)
def isEmpty(self):
return self._height==0
def draw(self):
if self.isEmpty():
pass
return None
else:
n=self._height
print('['+str(self._items[n-1])+']')
for i in range(n-2,-1,-1):
print(" | ")
print('['+str(self._items[i])+']')
###==============================================================================================
class Queue:
"""
Queue data structure using list
"""
def __init__(self,value):
"""
Class initializer: Produces a queue with a single value or a list of values
"""
self._items = []
if type(value)==list:
for v in value:
self._items.append(v)
self._length = len(value)
else:
self._items.append(value)
self._length = 1
def dequeue(self):
if self._length == 0:
print ("Queue is empty. Nothing to dequeue.")
return None
else:
self._length -=1
return self._items.pop(0)
def enqueue(self,value):
self._length +=1
self._items.append(value)
def isEmpty(self):
return self._length==0
def draw(self):
if self.isEmpty():
pass
return None
else:
n=self._length
for i in range(n-1):
print('['+str(self._items[i])+']-',end='')
print('['+str(self._items[n-1])+']')
|
# __version__ is for deploying with seed.
# VERSION is to keep the rest of the app DRY.
__version__ = '0.1.18'
VERSION = __version__
|
#Desafio: Crie um programa que leia nome e duas notas de vários alunos e guarde tudo em uma lista composta.
#No final, mostre um boletim contendo a média de cada um e permita que o usuário possa mostrar as notas de cada aluno individualmente.
lista = list()
while True:
nome = str(input('Nome: '))
n1 = float(input('Nota 1:'))
n2 = float(input('Nota 2:'))
media = (n1 + n2) / 2
lista.append([nome, [n1, n2], media])
escolha = str(input('Deseja continuar? [S/N]')).strip().upper()[0]
if escolha in 'Nn':
break
print('-' * 30)
print(f'{"Nº":<4}{"NOME":<10}{"MEDIA":<7}')
print('-' * 30)
for i, v in enumerate(lista):
print(f'{i:<4}{v[0]:<10}{v[2]:>6}')
print('-' * 30)
while True:
notas = int(input('Deseja ver a nota de qual aluno? (999 interrompe)'))
if notas == 999:
break
for i,v in enumerate(lista):
if i == notas:
print(f'As notas de {v[0]} são {v[1]}.')
print('VOLTE SEMPRE')
|
class Vehicle(object):
def __init__(self, vehicle_id, company, location):
self.vehicle_id = vehicle_id
self.company = company
self.location = location
# def __str__(self):
# return str( P["id":+str(self.id) + " company: " + str(self.company)+
# str(self.location)+ " location "] ")
|
# -*- coding: utf-8 -*-
"""
Copyright 2022 Mitchell Isaac Parker
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
pdbaa_fasta_file = "pdbaa.fasta"
entry_table_file = "entry.tsv"
coord_table_file = "coord.tsv"
sifts_json_file = "sifts.json"
lig_table_file = "ligand.tsv"
prot_table_file = "protein.tsv"
mut_table_file = "mutation.tsv"
cf_table_file = "cf.tsv"
edia_json_file = "edia.json"
dih_json_file = "dihedral.json"
interf_json_file = "interface.json"
pocket_json_file = "pocket.json"
dih_table_file = "dihedral.tsv"
edia_table_file = "edia.tsv"
dist_table_file = "distance.tsv"
interf_table_file = "interface.tsv"
pocket_table_file = "pocket.tsv"
fit_table_file = "fit.tsv"
pred_table_file = "predict.tsv"
dih_matrix_file = "dihedral.csv"
dist_matrix_file = "distance.csv"
rmsd_matrix_file = "rmsd.csv"
interf_matrix_file = "interface.csv"
pocket_matrix_file = "pocket.csv"
max_norm_file = "max_norm.csv"
mean_norm_file = "mean_norm.csv"
max_flip_file = "max_flip.csv"
mean_flip_file = "mean_flip.csv"
rmsd_json_file = "rmsd.json"
fit_matrix_file = "fit.csv"
pred_matrix_file = "pred.csv"
dih_fit_matrix_file = "dihedral_fit.csv"
dih_pred_matrix_file = "dihedral_pred.csv"
rmsd_fit_matrix_file = "rmsd_fit.csv"
rmsd_pred_matrix_file = "rmsd_pred.csv"
dist_fit_matrix_file = "dist_fit.csv"
dist_pred_matrix_file = "pred_fit.csv"
cluster_table_file = "cluster.tsv"
result_table_file = "result.tsv"
cluster_report_table_file = "cluster_report.tsv"
classify_report_table_file = "classify_report.tsv"
sum_table_file = "summary.tsv"
cutoff_table_file = "cutoff.tsv"
count_table_file = "count.tsv"
plot_img_file = "plot.pdf"
legend_img_file = "legend.pdf"
venn_img_file = "venn.pdf"
pymol_pml_file = "pymol.pml"
stat_table_file = "statistic.tsv"
nom_table_file = "nomenclature.tsv"
|
"""
CBMPy: MiriamIds module
=======================
Constraint Based Modelling in Python (http://pysces.sourceforge.net/cbm)
Copyright (C) 2009-2017 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
Author: Brett G. Olivier
Contact email: [email protected]
Last edit: $Author: bgoli $ ($Id: CBXML.py 1137 2012-10-01 15:36:15Z bgoli $)
"""
# created on 130222:1601
miriamids =\
{'2D-PAGE protein': {'data_entry': 'http://2dbase.techfak.uni-bielefeld.de/cgi-bin/2d/2d.cgi?ac=$id',
'example': 'P39172',
'name': '2D-PAGE protein',
'pattern': '^([A-N,R-Z][0-9][A-Z][A-Z, 0-9][A-Z, 0-9][0-9])|([O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])$" restricted="true',
'url': 'http://identifiers.org/2d-page.protein/'},
'3DMET': {'data_entry': 'http://www.3dmet.dna.affrc.go.jp/cgi/show_data.php?acc=$id',
'example': 'B00162',
'name': '3DMET',
'pattern': '^B\\d{5}$',
'url': 'http://identifiers.org/3dmet/'},
'ABS': {'data_entry': 'http://genome.crg.es/datasets/abs2005/entries/$id.html',
'example': 'A0014',
'name': 'ABS',
'pattern': '^A\\d+$',
'url': 'http://identifiers.org/abs/'},
'AFTOL': {'data_entry': 'http://wasabi.lutzonilab.net/pub/displayTaxonInfo?aftol_id=$id',
'example': '959',
'name': 'AFTOL',
'pattern': '^\\d+$" restricted="true',
'url': 'http://identifiers.org/aftol.taxonomy/'},
'AGD': {'data_entry': 'http://agd.vital-it.ch/Ashbya_gossypii/geneview?gene=$id',
'example': 'AGR144C',
'name': 'AGD',
'pattern': '^AGR\\w+$',
'url': 'http://identifiers.org/agd/'},
'APD': {'data_entry': 'http://aps.unmc.edu/AP/database/query_output.php?ID=$id',
'example': '01001',
'name': 'APD',
'pattern': '^\\d{5}$',
'url': 'http://identifiers.org/apd/'},
'ASAP': {'data_entry': 'http://asap.ahabs.wisc.edu/asap/feature_info.php?LocationID=WIS&FeatureID=$id',
'example': 'ABE-0009634',
'name': 'ASAP',
'pattern': '^[A-Za-z0-9-]+$" restricted="true',
'url': 'http://identifiers.org/asap/'},
'ATCC': {'data_entry': 'http://www.lgcstandards-atcc.org/Products/All/$id.aspx',
'example': '11303',
'name': 'ATCC',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/atcc/'},
'Aceview Worm': {'data_entry': 'http://www.ncbi.nlm.nih.gov/IEB/Research/Acembly/av.cgi?db=worm&c=Gene&l=$id',
'example': 'aap-1',
'name': 'Aceview Worm',
'pattern': '^[a-z0-9-]+$',
'url': 'http://identifiers.org/aceview.worm/'},
'Aclame': {'data_entry': 'http://aclame.ulb.ac.be/perl/Aclame/Genomes/mge_view.cgi?view=info&id=$id',
'example': 'mge:2',
'name': 'Aclame',
'pattern': '^mge:\\d+$',
'url': 'http://identifiers.org/aclame/'},
'Affymetrix Probeset': {'data_entry': 'https://www.affymetrix.com/LinkServlet?probeset=$id',
'example': '243002_at',
'name': 'Affymetrix Probeset',
'pattern': '\\d{4,}((_[asx])?_at)?" restricted="true',
'url': 'http://identifiers.org/affy.probeset/'},
'Allergome': {'data_entry': 'http://www.allergome.org/script/dettaglio.php?id_molecule=$id',
'example': '1948',
'name': 'Allergome',
'pattern': '^\\d+$" restricted="true',
'url': 'http://identifiers.org/allergome/'},
'AmoebaDB': {'data_entry': 'http://amoebadb.org/amoeba/showRecord.do?name=GeneRecordClasses.GeneRecordClass&source_id=$id',
'example': 'EDI_244000',
'name': 'AmoebaDB',
'pattern': '^EDI_\\d+$',
'url': 'http://identifiers.org/amoebadb/'},
'Anatomical Therapeutic Chemical': {'data_entry': 'http://www.whocc.no/atc_ddd_index/?code=$id',
'example': 'A10BA02',
'name': 'Anatomical Therapeutic Chemical',
'pattern': '^\\w(\\d+)?(\\w{1,2})?(\\d+)?$',
'url': 'http://identifiers.org/atc/'},
'Anatomical Therapeutic Chemical Vetinary': {'data_entry': 'http://www.whocc.no/atcvet/atcvet_index/?code=$id',
'example': 'QJ51RV02',
'name': 'Anatomical Therapeutic Chemical Vetinary',
'pattern': '^Q[A-Z0-9]+$',
'url': 'http://identifiers.org/atcvet/'},
'Animal TFDB Family': {'data_entry': 'http://www.bioguo.org/AnimalTFDB/family.php?fam=$id',
'example': 'CUT',
'name': 'Animal TFDB Family',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/atfdb.family/'},
'AntWeb': {'data_entry': 'http://www.antweb.org/specimen.do?name=$id',
'example': 'casent0106247',
'name': 'AntWeb',
'pattern': '^casent\\d+(\\-D\\d+)?$',
'url': 'http://identifiers.org/antweb/'},
'AphidBase Transcript': {'data_entry': 'http://isyip.genouest.org/apps/grs-2.2/grs?reportID=aphidbase_transcript_report&objectID=$id',
'example': 'ACYPI000159',
'name': 'AphidBase Transcript',
'pattern': '^ACYPI\\d{6}(-RA)?$" restricted="true',
'url': 'http://identifiers.org/aphidbase.transcript/'},
'ArachnoServer': {'data_entry': 'http://www.arachnoserver.org/toxincard.html?id=$id',
'example': 'AS000060',
'name': 'ArachnoServer',
'pattern': '^AS\\d{6}$',
'url': 'http://identifiers.org/arachnoserver/'},
'ArrayExpress': {'data_entry': 'http://www.ebi.ac.uk/arrayexpress/experiments/$id',
'example': 'E-MEXP-1712',
'name': 'ArrayExpress',
'pattern': '^[AEP]-\\w{4}-\\d+$',
'url': 'http://identifiers.org/arrayexpress/'},
'ArrayExpress Platform': {'data_entry': 'http://www.ebi.ac.uk/arrayexpress/arrays/$id',
'example': 'A-GEOD-50',
'name': 'ArrayExpress Platform',
'pattern': '^[AEP]-\\w{4}-\\d+$',
'url': 'http://identifiers.org/arrayexpress.platform/'},
'AspGD Locus': {'data_entry': 'http://www.aspergillusgenome.org/cgi-bin/locus.pl?dbid=$id',
'example': 'ASPL0000349247',
'name': 'AspGD Locus',
'pattern': '^[A-Za-z_0-9]+$',
'url': 'http://identifiers.org/aspgd.locus/'},
'AspGD Protein': {'data_entry': 'http://www.aspergillusgenome.org/cgi-bin/protein/proteinPage.pl?dbid=$id',
'example': 'ASPL0000349247',
'name': 'AspGD Protein',
'pattern': '^[A-Za-z_0-9]+$',
'url': 'http://identifiers.org/aspgd.protein/'},
'BDGP EST': {'data_entry': 'http://www.ncbi.nlm.nih.gov/nucest/$id',
'example': 'EY223054.1',
'name': 'BDGP EST',
'pattern': '^\\w+(\\.)?(\\d+)?$" restricted="true',
'url': 'http://identifiers.org/bdgp.est/'},
'BDGP insertion DB': {'data_entry': 'http://flypush.imgen.bcm.tmc.edu/pscreen/details.php?line=$id',
'example': 'KG09531',
'name': 'BDGP insertion DB',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/bdgp.insertion/'},
'BIND': {'data_entry': 'http://www.bind.ca/Action?identifier=bindid&idsearch=$id',
'example': None,
'name': 'BIND',
'pattern': '^\\d+$" restricted="true" obsolete="true" replacement="MIR:00000010',
'url': 'http://identifiers.org/bind/'},
'BOLD Taxonomy': {'data_entry': 'http://www.boldsystems.org/index.php/Taxbrowser_Taxonpage?taxid=$id',
'example': '27267',
'name': 'BOLD Taxonomy',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/bold.taxonomy/'},
'BRENDA': {'data_entry': 'http://www.brenda-enzymes.org/php/result_flat.php4?ecno=$id',
'example': '1.1.1.1',
'name': 'BRENDA',
'pattern': '^((\\d+\\.-\\.-\\.-)|(\\d+\\.\\d+\\.-\\.-)|(\\d+\\.\\d+\\.\\d+\\.-)|(\\d+\\.\\d+\\.\\d+\\.\\d+))$',
'url': 'http://identifiers.org/brenda/'},
'BYKdb': {'data_entry': 'http://bykdb.ibcp.fr/data/html/$id.html',
'example': 'A0AYT5',
'name': 'BYKdb',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/bykdb/'},
'BacMap Biography': {'data_entry': 'http://bacmap.wishartlab.com/organisms/$id',
'example': '1050',
'name': 'BacMap Biography',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/bacmap.biog/'},
'BeetleBase': {'data_entry': 'http://beetlebase.org/cgi-bin/gbrowse/BeetleBase3.gff3/?name=$id',
'example': 'TC010103',
'name': 'BeetleBase',
'pattern': '^TC\\d+$',
'url': 'http://identifiers.org/beetlebase/'},
'BindingDB': {'data_entry': 'http://www.bindingdb.org/bind/chemsearch/marvin/MolStructure.jsp?monomerid=$id',
'example': '22360',
'name': 'BindingDB',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/bindingDB/'},
'BioCatalogue': {'data_entry': 'http://www.biocatalogue.org/services/$id',
'example': '614',
'name': 'BioCatalogue',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/biocatalogue.service/'},
'BioCyc': {'data_entry': 'http://biocyc.org/getid?id=$id',
'example': 'ECOLI:CYT-D-UBIOX-CPLX',
'name': 'BioCyc',
'pattern': '^\\w+\\:[A-Za-z0-9-]+$" restricted="true',
'url': 'http://identifiers.org/biocyc/'},
'BioGRID': {'data_entry': 'http://thebiogrid.org/$id',
'example': '31623',
'name': 'BioGRID',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/biogrid/'},
'BioModels Database': {'data_entry': 'http://www.ebi.ac.uk/biomodels-main/$id',
'example': 'BIOMD0000000048',
'name': 'BioModels Database',
'pattern': '^((BIOMD|MODEL)\\d{10})|(BMID\\d{12})$',
'url': 'http://identifiers.org/biomodels.db/'},
'BioNumbers': {'data_entry': 'http://www.bionumbers.hms.harvard.edu/bionumber.aspx?s=y&id=$id&ver=1',
'example': '104674',
'name': 'BioNumbers',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/bionumbers/'},
'BioPortal': {'data_entry': 'http://bioportal.bioontology.org/ontologies/$id',
'example': '1046',
'name': 'BioPortal',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/bioportal/'},
'BioProject': {'data_entry': 'http://trace.ddbj.nig.ac.jp/BPSearch/bioproject?acc=$id',
'example': 'PRJDB3',
'name': 'BioProject',
'pattern': '^PRJDB\\d+$',
'url': 'http://identifiers.org/bioproject/'},
'BioSample': {'data_entry': 'http://www.ebi.ac.uk/biosamples/browse.html?keywords=$id',
'example': 'SAMEG70402',
'name': 'BioSample',
'pattern': '^\\w{3}[NE](\\w)?\\d+$',
'url': 'http://identifiers.org/biosample/'},
'BioSharing': {'data_entry': 'http://www.biosharing.org/$id',
'example': 'bsg-000052',
'name': 'BioSharing',
'pattern': '^bsg-\\d{6}$',
'url': 'http://identifiers.org/biosharing/'},
'BioSystems': {'data_entry': 'http://www.ncbi.nlm.nih.gov/biosystems/$id',
'example': '001',
'name': 'BioSystems',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/biosystems/'},
'BitterDB Compound': {'data_entry': 'http://bitterdb.agri.huji.ac.il/bitterdb/compound.php?id=$id',
'example': '46',
'name': 'BitterDB Compound',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/bitterdb.cpd/'},
'BitterDB Receptor': {'data_entry': 'http://bitterdb.agri.huji.ac.il/bitterdb/Receptor.php?id=$id',
'example': '1',
'name': 'BitterDB Receptor',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/bitterdb.rec/'},
'Brenda Tissue Ontology': {'data_entry': 'http://www.ebi.ac.uk/ontology-lookup/?termId=$id',
'example': 'BTO:0000146',
'name': 'Brenda Tissue Ontology',
'pattern': '^BTO:\\d{7}$',
'url': 'http://identifiers.org/obo.bto/'},
'BugBase Expt': {'data_entry': 'http://bugs.sgul.ac.uk/bugsbase/tabs/experiment.php?expt_id=$id&action=view',
'example': '288',
'name': 'BugBase Expt',
'pattern': '^\\d+$" restricted="true',
'url': 'http://identifiers.org/bugbase.expt/'},
'BugBase Protocol': {'data_entry': 'http://bugs.sgul.ac.uk/bugsbase/tabs/protocol.php?protocol_id=$id&amp;action=view',
'example': '67',
'name': 'BugBase Protocol',
'pattern': '^\\d+$" restricted="true',
'url': 'http://identifiers.org/bugbase.protocol/'},
'CABRI': {'data_entry': 'http://www.cabri.org/CABRI/srs-bin/wgetz?-e+-page+EntryPage+[$id]',
'example': 'dsmz_mutz-id:ACC 291',
'name': 'CABRI',
'pattern': '^([A-Za-z]+)?(\\_)?([A-Za-z-]+)\\:([A-Za-z0-9 ]+)$',
'url': 'http://identifiers.org/cabri/'},
'CAPS-DB': {'data_entry': 'http://www.bioinsilico.org/cgi-bin/CAPSDB/getCAPScluster?nidcl=$id',
'example': '434',
'name': 'CAPS-DB',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/caps/'},
'CAS': {'data_entry': 'http://commonchemistry.org/ChemicalDetail.aspx?ref=$id',
'example': '50-00-0',
'name': 'CAS',
'pattern': '^\\d{1,7}\\-\\d{2}\\-\\d$" restricted="true',
'url': 'http://identifiers.org/cas/'},
'CATH domain': {'data_entry': 'http://www.cathdb.info/domain/$id',
'example': '1cukA01',
'name': 'CATH domain',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/cath.domain/'},
'CATH superfamily': {'data_entry': 'http://www.cathdb.info/cathnode/$id',
'example': '1.10.10.200',
'name': 'CATH superfamily',
'pattern': '^\\d+(\\.\\d+(\\.\\d+(\\.\\d+)?)?)?$',
'url': 'http://identifiers.org/cath.superfamily/'},
'CAZy': {'data_entry': 'http://www.cazy.org/$id.html',
'example': 'GT10',
'name': 'CAZy',
'pattern': '^GT\\d+$',
'url': 'http://identifiers.org/cazy/'},
'CGSC Strain': {'data_entry': 'http://cgsc.biology.yale.edu/Strain.php?ID=$id',
'example': '11042',
'name': 'CGSC Strain',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/cgsc/'},
'CLDB': {'data_entry': 'http://bioinformatics.istge.it/hypercldb/$id.html',
'example': 'cl3603',
'name': 'CLDB',
'pattern': '^cl\\d+$',
'url': 'http://identifiers.org/cldb/'},
'CMR Gene': {'data_entry': 'http://cmr.jcvi.org/cgi-bin/CMR/shared/GenePage.cgi?locus=$id',
'example': 'NTL15EF2281',
'name': 'CMR Gene',
'pattern': '^\\w+(\\_)?\\w+$',
'url': 'http://identifiers.org/cmr.gene/'},
'COGs': {'data_entry': 'http://www.ncbi.nlm.nih.gov/COG/grace/wiew.cgi?$id',
'example': 'COG0001',
'name': 'COGs',
'pattern': '^COG\\d+$',
'url': 'http://identifiers.org/cogs/'},
'COMBINE specifications': {'data_entry': 'http://co.mbine.org/specifications/$id',
'example': 'sbgn.er.level-1.version-1.2',
'name': 'COMBINE specifications',
'pattern': '^\\w+(\\-|\\.|\\w)*$',
'url': 'http://identifiers.org/combine.specifications/'},
'CSA': {'data_entry': 'http://www.ebi.ac.uk/thornton-srv/databases/cgi-bin/CSA/CSA_Site_Wrapper.pl?pdb=$id',
'example': '1a05',
'name': 'CSA',
'pattern': '^[0-9][A-Za-z0-9]{3}$',
'url': 'http://identifiers.org/csa/'},
'CTD Chemical': {'data_entry': 'http://ctdbase.org/detail.go?type=chem&acc=$id',
'example': 'D001151',
'name': 'CTD Chemical',
'pattern': '^D\\d+$',
'url': 'http://identifiers.org/ctd.chemical/'},
'CTD Disease': {'data_entry': 'http://ctdbase.org/detail.go?type=disease&db=MESH&acc=$id',
'example': 'D053716',
'name': 'CTD Disease',
'pattern': '^D\\d+$',
'url': 'http://identifiers.org/ctd.disease/'},
'CTD Gene': {'data_entry': 'http://ctdbase.org/detail.go?type=gene&acc=$id',
'example': '101',
'name': 'CTD Gene',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/ctd.gene/'},
'CYGD': {'data_entry': 'http://mips.helmholtz-muenchen.de/genre/proj/yeast/singleGeneReport.html?entry=$id',
'example': 'YFL039c',
'name': 'CYGD',
'pattern': '^\\w{2,3}\\d{2,4}(\\w)?$" restricted="true',
'url': 'http://identifiers.org/cygd/'},
'Canadian Drug Product Database': {'data_entry': 'http://webprod3.hc-sc.gc.ca/dpd-bdpp/info.do?lang=eng&code=$id',
'example': '63250',
'name': 'Canadian Drug Product Database',
'pattern': '^\\d+$" restricted="true',
'url': 'http://identifiers.org/cdpd/'},
'Candida Genome Database': {'data_entry': 'http://www.candidagenome.org/cgi-bin/locus.pl?dbid=$id',
'example': 'CAL0003079',
'name': 'Candida Genome Database',
'pattern': '^CAL\\d{7}$',
'url': 'http://identifiers.org/cgd/'},
'Cell Cycle Ontology': {'data_entry': 'http://www.ebi.ac.uk/ontology-lookup/?termId=$id',
'example': 'CCO:P0000023',
'name': 'Cell Cycle Ontology',
'pattern': '^CCO\\:\\w+$',
'url': 'http://identifiers.org/cco/'},
'Cell Image Library': {'data_entry': 'http://cellimagelibrary.org/images/$id',
'example': '24801',
'name': 'Cell Image Library',
'pattern': '^\\d+$" restricted="true',
'url': 'http://identifiers.org/cellimage/'},
'Cell Type Ontology': {'data_entry': 'http://www.ebi.ac.uk/ontology-lookup/?termId=$id',
'example': 'CL:0000232',
'name': 'Cell Type Ontology',
'pattern': '^CL:\\d{7}$',
'url': 'http://identifiers.org/obo.clo/'},
'ChEBI': {'data_entry': 'http://www.ebi.ac.uk/chebi/searchId.do?chebiId=$id',
'example': 'CHEBI:36927',
'name': 'ChEBI',
'pattern': '^CHEBI:\\d+$',
'url': 'http://identifiers.org/chebi/'},
'ChEMBL compound': {'data_entry': 'https://www.ebi.ac.uk/chembldb/index.php/compound/inspect/$id',
'example': 'CHEMBL308052',
'name': 'ChEMBL compound',
'pattern': '^CHEMBL\\d+$',
'url': 'http://identifiers.org/chembl.compound/'},
'ChEMBL target': {'data_entry': 'https://www.ebi.ac.uk/chembldb/index.php/target/inspect/$id',
'example': 'CHEMBL3467',
'name': 'ChEMBL target',
'pattern': '^CHEMBL\\d+$',
'url': 'http://identifiers.org/chembl.target/'},
'CharProt': {'data_entry': 'http://www.jcvi.org/charprotdb/index.cgi/view/$id',
'example': 'CH_001923',
'name': 'CharProt',
'pattern': '^CH_\\d+$',
'url': 'http://identifiers.org/charprot/'},
'ChemBank': {'data_entry': 'http://chembank.broadinstitute.org/chemistry/viewMolecule.htm?cbid=$id',
'example': '1000000',
'name': 'ChemBank',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/chembank/'},
'ChemDB': {'data_entry': 'http://cdb.ics.uci.edu/cgibin/ChemicalDetailWeb.py?chemical_id=$id',
'example': '3966782',
'name': 'ChemDB',
'pattern': '^\\d+$" restricted="true',
'url': 'http://identifiers.org/chemdb/'},
'ChemIDplus': {'data_entry': 'http://chem.sis.nlm.nih.gov/chemidplus/direct.jsp?regno=$id',
'example': '000057272',
'name': 'ChemIDplus',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/chemidplus/'},
'ChemSpider': {'data_entry': 'http://www.chemspider.com/Chemical-Structure.$id.html',
'example': '56586',
'name': 'ChemSpider',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/chemspider/'},
'Chemical Component Dictionary': {'data_entry': 'http://www.ebi.ac.uk/pdbe-srv/pdbechem/chemicalCompound/show/$id',
'example': 'AB0',
'name': 'Chemical Component Dictionary',
'pattern': '^\\w{3}$',
'url': 'http://identifiers.org/pdb-ccd/'},
'ClinicalTrials.gov': {'data_entry': 'http://clinicaltrials.gov/ct2/show/$id',
'example': 'NCT00222573',
'name': 'ClinicalTrials.gov',
'pattern': '^NCT\\d{8}$',
'url': 'http://identifiers.org/clinicaltrials/'},
'CluSTr': {'data_entry': 'http://www.ebi.ac.uk/clustr-srv/CCluster?interpro=yes&cluster_varid=$id',
'example': 'HUMAN:55140:308.6',
'name': 'CluSTr',
'pattern': '^[0-9A-Za-z]+:\\d+:\\d{1,5}(\\.\\d)?$" obsolete="true" replacement="',
'url': 'http://identifiers.org/clustr/'},
'Compulyeast': {'data_entry': 'http://compluyeast2dpage.dacya.ucm.es/cgi-bin/2d/2d.cgi?ac=$id',
'example': 'O08709',
'name': 'Compulyeast',
'pattern': '^([A-N,R-Z][0-9][A-Z][A-Z, 0-9][A-Z, 0-9][0-9])|([O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])$',
'url': 'http://identifiers.org/compulyeast/'},
'Conoserver': {'data_entry': 'http://www.conoserver.org/?page=card&table=protein&id=$id',
'example': '2639',
'name': 'Conoserver',
'pattern': '^\\d+$" restricted="true',
'url': 'http://identifiers.org/conoserver/'},
'Consensus CDS': {'data_entry': 'http://www.ncbi.nlm.nih.gov/CCDS/CcdsBrowse.cgi?REQUEST=CCDS&amp;DATA=$id',
'example': 'CCDS13573.1',
'name': 'Consensus CDS',
'pattern': '^CCDS\\d+\\.\\d+$',
'url': 'http://identifiers.org/ccds/'},
'Conserved Domain Database': {'data_entry': 'http://www.ncbi.nlm.nih.gov/Structure/cdd/cddsrv.cgi?uid=$id',
'example': 'cd00400',
'name': 'Conserved Domain Database',
'pattern': '^(cd)?\\d{5}$',
'url': 'http://identifiers.org/cdd/'},
'CryptoDB': {'data_entry': 'http://cryptodb.org/cryptodb/showRecord.do?name=GeneRecordClasses.GeneRecordClass&source_id=$id',
'example': 'cgd7_230',
'name': 'CryptoDB',
'pattern': '^\\w+',
'url': 'http://identifiers.org/cryptodb/'},
'Cube db': {'data_entry': 'http://epsf.bmad.bii.a-star.edu.sg/cube/db/data/$id/',
'example': 'AKR',
'name': 'Cube db',
'pattern': '^[A-Za-z_0-9]+$" restricted="true',
'url': 'http://identifiers.org/cubedb/'},
'CutDB': {'data_entry': 'http://cutdb.burnham.org/relation/show/$id',
'example': '25782',
'name': 'CutDB',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/pmap.cutdb/'},
'DARC': {'data_entry': 'http://darcsite.genzentrum.lmu.de/darc/view.php?id=$id',
'example': '1250',
'name': 'DARC',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/darc/'},
'DBG2 Introns': {'data_entry': 'http://webapps2.ucalgary.ca/~groupii/cgi-bin/intron.cgi?name=$id',
'example': 'Cu.me.I1',
'name': 'DBG2 Introns',
'pattern': '^\\w{1,2}\\.(\\w{1,2}\\.)?[A-Za-z0-9]+$" restricted="true',
'url': 'http://identifiers.org/dbg2introns/'},
'DOI': {'data_entry': 'https://doi.org/$id',
'example': '10.1038/nbt1156',
'name': 'DOI',
'pattern': '^(doi\\:)?\\d{2}\\.\\d{4}.*$',
'url': 'http://identifiers.org/doi/'},
'DOMMINO': {'data_entry': 'http://orion.rnet.missouri.edu/~nz953/DOMMINO/index.php/result/show_network/$id',
'example': '2GC4',
'name': 'DOMMINO',
'pattern': '^[0-9][A-Za-z0-9]{3}$',
'url': 'http://identifiers.org/dommino/'},
'DPV': {'data_entry': 'http://www.dpvweb.net/dpv/showdpv.php?dpvno=$id',
'example': '100',
'name': 'DPV',
'pattern': '^\\d+$" restricted="true',
'url': 'http://identifiers.org/dpv/'},
'DRSC': {'data_entry': 'http://www.flyrnai.org/cgi-bin/RNAi_gene_lookup_public.pl?gname=$id',
'example': 'DRSC05221',
'name': 'DRSC',
'pattern': '^DRSC\\d+$',
'url': 'http://identifiers.org/drsc/'},
'Database of Interacting Proteins': {'data_entry': 'http://dip.doe-mbi.ucla.edu/dip/DIPview.cgi?ID=$id',
'example': 'DIP-743N',
'name': 'Database of Interacting Proteins',
'pattern': '^DIP[\\:\\-]\\d{3}[EN]$',
'url': 'http://identifiers.org/dip/'},
'Database of Quantitative Cellular Signaling: Model': {'data_entry': 'http://doqcs.ncbs.res.in/template.php?&y=accessiondetails&an=$id',
'example': '57',
'name': 'Database of Quantitative Cellular Signaling: Model',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/doqcs.model/'},
'Database of Quantitative Cellular Signaling: Pathway': {'data_entry': 'http://doqcs.ncbs.res.in/template.php?&y=pathwaydetails&pn=$id',
'example': '131',
'name': 'Database of Quantitative Cellular Signaling: Pathway',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/doqcs.pathway/'},
'Dictybase EST': {'data_entry': 'http://dictybase.org/db/cgi-bin/feature_page.pl?primary_id=$id',
'example': 'DDB0016567',
'name': 'Dictybase EST',
'pattern': '^DDB\\d+$',
'url': 'http://identifiers.org/dictybase.est/'},
'Dictybase Gene': {'data_entry': 'http://dictybase.org/gene/$id',
'example': 'DDB_G0267522',
'name': 'Dictybase Gene',
'pattern': '^DDB_G\\d+$',
'url': 'http://identifiers.org/dictybase.gene/'},
'DisProt': {'data_entry': 'http://www.disprot.org/protein.php?id=$id',
'example': 'DP00001',
'name': 'DisProt',
'pattern': '^DP\\d{5}$',
'url': 'http://identifiers.org/disprot/'},
'DragonDB Allele': {'data_entry': 'http://antirrhinum.net/cgi-bin/ace/generic/tree/DragonDB?name=$id&amp;class=Allele',
'example': 'cho',
'name': 'DragonDB Allele',
'pattern': '^\\w+$" restricted="true',
'url': 'http://identifiers.org/dragondb.allele/'},
'DragonDB DNA': {'data_entry': 'http://antirrhinum.net/cgi-bin/ace/generic/tree/DragonDB?name=$id;class=DNA',
'example': '3hB06',
'name': 'DragonDB DNA',
'pattern': '^\\d\\w+$',
'url': 'http://identifiers.org/dragondb.dna/'},
'DragonDB Locus': {'data_entry': 'http://antirrhinum.net/cgi-bin/ace/generic/tree/DragonDB?name=$id&amp;class=Locus',
'example': 'DEF',
'name': 'DragonDB Locus',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/dragondb.locus/'},
'DragonDB Protein': {'data_entry': 'http://antirrhinum.net/cgi-bin/ace/generic/tree/DragonDB?name=$id;class=Peptide',
'example': 'AMDEFA',
'name': 'DragonDB Protein',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/dragondb.protein/'},
'DrugBank': {'data_entry': 'http://www.drugbank.ca/drugs/$id',
'example': 'DB00001',
'name': 'DrugBank',
'pattern': '^DB\\d{5}$',
'url': 'http://identifiers.org/drugbank/'},
'EDAM Ontology': {'data_entry': 'http://www.ebi.ac.uk/ontology-lookup/?termId=$id',
'example': 'EDAM_data:1664',
'name': 'EDAM Ontology',
'pattern': '^EDAM_(data|topic)\\:\\d{4}$',
'url': 'http://identifiers.org/edam/'},
'ELM': {'data_entry': 'http://elm.eu.org/elms/elmPages/$id.html',
'example': 'CLV_MEL_PAP_1',
'name': 'ELM',
'pattern': '^[A-Za-z_0-9]+$',
'url': 'http://identifiers.org/elm/'},
'ENA': {'data_entry': 'http://www.ebi.ac.uk/ena/data/view/$id',
'example': 'BN000065',
'name': 'ENA',
'pattern': '^[A-Z]+[0-9]+$',
'url': 'http://identifiers.org/ena.embl/'},
'EPD': {'data_entry': 'http://epd.vital-it.ch/cgi-bin/query_result.pl?out_format=NICE&Entry_0=$id',
'example': 'TA_H3',
'name': 'EPD',
'pattern': '^[A-Z-0-9]+$',
'url': 'http://identifiers.org/epd/'},
'EchoBASE': {'data_entry': 'http://www.york.ac.uk/res/thomas/Gene.cfm?recordID=$id',
'example': 'EB0170',
'name': 'EchoBASE',
'pattern': '^EB\\d+$',
'url': 'http://identifiers.org/echobase/'},
'EcoGene': {'data_entry': 'http://ecogene.org/?q=gene/$id',
'example': 'EG10173',
'name': 'EcoGene',
'pattern': '^EG\\d+$',
'url': 'http://identifiers.org/ecogene/'},
'Ensembl': {'data_entry': 'http://www.ensembl.org/id/$id',
'example': 'ENSG00000139618',
'name': 'Ensembl',
'pattern': '^ENS[A-Z]*[FPTG]\\d{11}(\\.\\d+)?$',
'url': 'http://identifiers.org/ensembl/'},
'Ensembl Bacteria': {'data_entry': 'http://bacteria.ensembl.org/id/$id',
'example': 'EBESCT00000015660',
'name': 'Ensembl Bacteria',
'pattern': '^EB\\w+$',
'url': 'http://identifiers.org/ensembl.bacteria/'},
'Ensembl Fungi': {'data_entry': 'http://fungi.ensembl.org/id/$id',
'example': 'CADAFLAT00006211',
'name': 'Ensembl Fungi',
'pattern': '^[A-Z-a-z0-9]+$',
'url': 'http://identifiers.org/ensembl.fungi/'},
'Ensembl Metazoa': {'data_entry': 'http://metazoa.ensembl.org/id/$id',
'example': 'FBtr0084214',
'name': 'Ensembl Metazoa',
'pattern': '^\\w+(\\.)?\\d+$',
'url': 'http://identifiers.org/ensembl.metazoa/'},
'Ensembl Plants': {'data_entry': 'http://plants.ensembl.org/id/$id',
'example': 'AT1G73965',
'name': 'Ensembl Plants',
'pattern': '^\\w+(\\.\\d+)?(\\.\\d+)?$',
'url': 'http://identifiers.org/ensembl.plant/'},
'Ensembl Protists': {'data_entry': 'http://protists.ensembl.org/id/$id',
'example': 'PFC0120w',
'name': 'Ensembl Protists',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/ensembl.protist/'},
'Enzyme Nomenclature': {'data_entry': 'http://www.ebi.ac.uk/intenz/query?cmd=SearchEC&ec=$id',
'example': '1.1.1.1',
'name': 'Enzyme Nomenclature',
'pattern': '^\\d+\\.-\\.-\\.-|\\d+\\.\\d+\\.-\\.-|\\d+\\.\\d+\\.\\d+\\.-|\\d+\\.\\d+\\.\\d+\\.(n)?\\d+$',
'url': 'http://identifiers.org/ec-code/'},
'Evidence Code Ontology': {'data_entry': 'http://www.ebi.ac.uk/ontology-lookup/?termId=$id',
'example': 'ECO:0000006',
'name': 'Evidence Code Ontology',
'pattern': 'ECO:\\d{7}$',
'url': 'http://identifiers.org/obo.eco/'},
'Experimental Factor Ontology': {'data_entry': 'http://www.ebi.ac.uk/ontology-lookup/?termId=EFO:$id',
'example': '0004859',
'name': 'Experimental Factor Ontology',
'pattern': '^\\d{7}$',
'url': 'http://identifiers.org/efo/'},
'FMA': {'data_entry': 'http://www.ebi.ac.uk/ontology-lookup/?termId=$id',
'example': 'FMA:67112',
'name': 'FMA',
'pattern': '^FMA:\\d+$',
'url': 'http://identifiers.org/obo.fma/'},
'FlyBase': {'data_entry': 'http://flybase.org/reports/$id.html',
'example': 'FBgn0011293',
'name': 'FlyBase',
'pattern': '^FB\\w{2}\\d{7}$',
'url': 'http://identifiers.org/flybase/'},
'Flystock': {'data_entry': 'http://flystocks.bio.indiana.edu/Reports/$id.html',
'example': '33159',
'name': 'Flystock',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/flystock/'},
'Fungal Barcode': {'data_entry': 'http://www.fungalbarcoding.org/BioloMICS.aspx?Table=Fungal barcodes&Rec=$id&Fields=All&ExactMatch=T',
'example': '2224',
'name': 'Fungal Barcode',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/fbol/'},
'FungiDB': {'data_entry': 'http://fungidb.org/gene/$id',
'example': 'CNBG_0001',
'name': 'FungiDB',
'pattern': '^[A-Za-z_0-9]+$" restricted="true',
'url': 'http://identifiers.org/fungidb/'},
'GABI': {'data_entry': 'http://gabi.rzpd.de/database/cgi-bin/GreenCards.pl.cgi?BioObjectId=$id&Mode=ShowBioObject',
'example': '2679240',
'name': 'GABI',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/gabi/'},
'GEO': {'data_entry': 'http://www.ncbi.nlm.nih.gov/sites/GDSbrowser?acc=$id',
'example': 'GDS1234',
'name': 'GEO',
'pattern': '^GDS\\d+$',
'url': 'http://identifiers.org/geo/'},
'GOA': {'data_entry': 'http://www.ebi.ac.uk/QuickGO/GProtein?ac=$id',
'example': 'P12345',
'name': 'GOA',
'pattern': '^([A-N,R-Z][0-9][A-Z][A-Z, 0-9][A-Z, 0-9][0-9])|([O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])$',
'url': 'http://identifiers.org/goa/'},
'GOLD genome': {'data_entry': 'http://www.genomesonline.org/cgi-bin/GOLD/GOLDCards.cgi?goldstamp=$id',
'example': 'Gi07796',
'name': 'GOLD genome',
'pattern': '^[Gi|Gc]\\d+$',
'url': 'http://identifiers.org/gold.genome/'},
'GOLD metadata': {'data_entry': 'http://genomesonline.org/cgi-bin/GOLD/bin/GOLDCards.cgi?goldstamp=$id',
'example': 'Gm00047',
'name': 'GOLD metadata',
'pattern': '^Gm\\d+$',
'url': 'http://identifiers.org/gold.meta/'},
'GPCRDB': {'data_entry': 'http://www.gpcr.org/7tm/proteins/$id',
'example': 'RL3R1_HUMAN',
'name': 'GPCRDB',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/gpcrdb/'},
'GRIN Plant Taxonomy': {'data_entry': 'http://www.ars-grin.gov/cgi-bin/npgs/html/taxon.pl?$id',
'example': '19333',
'name': 'GRIN Plant Taxonomy',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/grin.taxonomy/'},
'GXA Expt': {'data_entry': 'http://www.ebi.ac.uk/gxa/experiment/$id',
'example': 'E-MTAB-62',
'name': 'GXA Expt',
'pattern': '^[AEP]-\\w{4}-\\d+$" restricted="true',
'url': 'http://identifiers.org/gxa.expt/'},
'GXA Gene': {'data_entry': 'http://www.ebi.ac.uk/gxa/gene/$id',
'example': 'AT4G01080',
'name': 'GXA Gene',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/gxa.gene/'},
'GenPept': {'data_entry': 'http://www.ncbi.nlm.nih.gov/protein/$id?report=genpept',
'example': 'CAA71118.1',
'name': 'GenPept',
'pattern': '^\\w{3}\\d{5}(\\.\\d+)?$" restricted="true',
'url': 'http://identifiers.org/genpept/'},
'Genatlas': {'data_entry': 'http://genatlas.medecine.univ-paris5.fr/fiche.php?symbol=$id',
'example': 'HBB',
'name': 'Genatlas',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/genatlas/'},
'Gene Ontology': {'data_entry': 'http://www.ebi.ac.uk/QuickGO/GTerm?id=$id',
'example': 'GO:0006915',
'name': 'Gene Ontology',
'pattern': '^GO:\\d{7}$',
'url': 'http://identifiers.org/obo.go/'},
'GeneCards': {'data_entry': 'http://www.genecards.org/cgi-bin/carddisp.pl?gene=$id',
'example': 'ABL1',
'name': 'GeneCards',
'pattern': '^\\w+$" restricted="true',
'url': 'http://identifiers.org/genecards/'},
'GeneDB': {'data_entry': 'http://www.genedb.org/gene/$id',
'example': 'Cj1536c',
'name': 'GeneDB',
'pattern': '^[\\w\\d\\.-]*$',
'url': 'http://identifiers.org/genedb/'},
'GeneFarm': {'data_entry': 'http://urgi.versailles.inra.fr/Genefarm/Gene/display_gene.htpl?GENE_ID=$id',
'example': '4892',
'name': 'GeneFarm',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/genefarm/'},
'GeneTree': {'data_entry': 'http://www.ensembl.org/Multi/GeneTree/Image?db=core;gt=$id',
'example': 'ENSGT00550000074763',
'name': 'GeneTree',
'pattern': '^ENSGT\\d+$',
'url': 'http://identifiers.org/genetree/'},
'GiardiaDB': {'data_entry': 'http://giardiadb.org/giardiadb/showRecord.do?name=GeneRecordClasses.GeneRecordClass&source_id=$id',
'example': 'GL50803_102438',
'name': 'GiardiaDB',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/giardiadb/'},
'GlycomeDB': {'data_entry': 'http://www.glycome-db.org/database/showStructure.action?glycomeId=$id',
'example': '1',
'name': 'GlycomeDB',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/glycomedb/'},
'Golm Metabolome Database': {'data_entry': 'http://gmd.mpimp-golm.mpg.de/Metabolites/$id.aspx',
'example': '68513255-fc44-4041-bc4b-4fd2fae7541d',
'name': 'Golm Metabolome Database',
'pattern': '^[A-Za-z-0-9-]+$" restricted="true',
'url': 'http://identifiers.org/gmd/'},
'Gramene QTL': {'data_entry': 'http://www.gramene.org/db/qtl/qtl_display?qtl_accession_id=$id',
'example': 'CQG5',
'name': 'Gramene QTL',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/gramene.qtl/'},
'Gramene Taxonomy': {'data_entry': 'http://www.gramene.org/db/ontology/search?id=$id',
'example': 'GR_tax:013681',
'name': 'Gramene Taxonomy',
'pattern': '^GR\\_tax\\:\\d+$',
'url': 'http://identifiers.org/gramene.taxonomy/'},
'Gramene genes': {'data_entry': 'http://www.gramene.org/db/genes/search_gene?acc=$id',
'example': 'GR:0080039',
'name': 'Gramene genes',
'pattern': '^GR\\:\\d+$',
'url': 'http://identifiers.org/gramene.gene/'},
'Gramene protein': {'data_entry': 'http://www.gramene.org/db/protein/protein_search?protein_id=$id',
'example': '78073',
'name': 'Gramene protein',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/gramene.protein/'},
'GreenGenes': {'data_entry': 'http://greengenes.lbl.gov/cgi-bin/show_one_record_v2.pl?prokMSA_id=$id',
'example': '100000',
'name': 'GreenGenes',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/greengenes/'},
'H-InvDb Locus': {'data_entry': 'http://h-invitational.jp/hinv/spsoup/locus_view?hix_id=$id',
'example': 'HIX0004394',
'name': 'H-InvDb Locus',
'pattern': '^HIX\\d{7}(\\.\\d+)?$',
'url': 'http://identifiers.org/hinv.locus/'},
'H-InvDb Protein': {'data_entry': 'http://h-invitational.jp/hinv/protein/protein_view.cgi?hip_id=$id',
'example': 'HIP000030660',
'name': 'H-InvDb Protein',
'pattern': '^HIP\\d{9}(\\.\\d+)?$',
'url': 'http://identifiers.org/hinv.protein/'},
'H-InvDb Transcript': {'data_entry': 'http://h-invitational.jp/hinv/spsoup/transcript_view?hit_id=$id',
'example': 'HIT000195363',
'name': 'H-InvDb Transcript',
'pattern': '^HIT\\d{9}(\\.\\d+)?$',
'url': 'http://identifiers.org/hinv.transcript/'},
'HAMAP': {'data_entry': 'http://hamap.expasy.org/unirule/$id',
'example': 'MF_01400',
'name': 'HAMAP',
'pattern': '^MF_\\d+$',
'url': 'http://identifiers.org/hamap/'},
'HCVDB': {'data_entry': 'http://euhcvdb.ibcp.fr/euHCVdb/do/displayHCVEntry?primaryAC=$id',
'example': 'M58335',
'name': 'HCVDB',
'pattern': '^M\\d{5}$',
'url': 'http://identifiers.org/hcvdb/'},
'HGMD': {'data_entry': 'http://www.hgmd.cf.ac.uk/ac/gene.php?gene=$id',
'example': 'CALM1',
'name': 'HGMD',
'pattern': '^[A-Z_0-9]+$" restricted="true',
'url': 'http://identifiers.org/hgmd/'},
'HGNC': {'data_entry': 'http://www.genenames.org/data/hgnc_data.php?hgnc_id=$id',
'example': 'HGNC:2674',
'name': 'HGNC',
'pattern': '^(HGNC:)?\\d{1,5}$',
'url': 'http://identifiers.org/hgnc/'},
'HGNC Symbol': {'data_entry': 'http://www.genenames.org/data/hgnc_data.php?match=$id',
'example': 'DAPK1',
'name': 'HGNC Symbol',
'pattern': '^[A-Za-z0-9]+" restricted="true',
'url': 'http://identifiers.org/hgnc.symbol/'},
'HMDB': {'data_entry': 'http://www.hmdb.ca/metabolites/$id',
'example': 'HMDB00001',
'name': 'HMDB',
'pattern': '^HMDB\\d{5}$',
'url': 'http://identifiers.org/hmdb/'},
'HOGENOM': {'data_entry': 'http://pbil.univ-lyon1.fr/cgi-bin/view-tree.pl?db=HOGENOM5&query=$id',
'example': 'HBG284870',
'name': 'HOGENOM',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/hogenom/'},
'HOMD Sequence Metainformation': {'data_entry': 'http://www.homd.org/modules.php?op=modload&name=GenomeList&file=index&link=detailinfo&seqid=$id',
'example': 'SEQF1003',
'name': 'HOMD Sequence Metainformation',
'pattern': '^SEQF\\d+$',
'url': 'http://identifiers.org/homd.seq/'},
'HOMD Taxonomy': {'data_entry': 'http://www.homd.org/modules.php?op=modload&name=HOMD&file=index&oraltaxonid=$id&view=dynamic',
'example': '811',
'name': 'HOMD Taxonomy',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/homd.taxon/'},
'HOVERGEN': {'data_entry': 'http://pbil.univ-lyon1.fr/cgi-bin/view-tree.pl?query=$id&db=HOVERGEN',
'example': 'HBG004341',
'name': 'HOVERGEN',
'pattern': '^HBG\\d+$',
'url': 'http://identifiers.org/hovergen/'},
'HPA': {'data_entry': 'http://www.proteinatlas.org/$id',
'example': 'ENSG00000026508',
'name': 'HPA',
'pattern': '^ENSG\\d{11}$" restricted="true',
'url': 'http://identifiers.org/hpa/'},
'HPRD': {'data_entry': 'http://www.hprd.org/protein/$id',
'example': '00001',
'name': 'HPRD',
'pattern': '^\\d+$" restricted="true',
'url': 'http://identifiers.org/hprd/'},
'HSSP': {'data_entry': 'ftp://ftp.embl-heidelberg.de/pub/databases/protein_extras/hssp/$id.hssp.bz2',
'example': '102l',
'name': 'HSSP',
'pattern': '^\\w{4}$',
'url': 'http://identifiers.org/hssp/'},
'HUGE': {'data_entry': 'http://www.kazusa.or.jp/huge/gfpage/$id/',
'example': 'KIAA0001',
'name': 'HUGE',
'pattern': '^KIAA\\d{4}$" restricted="true',
'url': 'http://identifiers.org/huge/'},
'HomoloGene': {'data_entry': 'http://www.ncbi.nlm.nih.gov/homologene/$id',
'example': '1000',
'name': 'HomoloGene',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/homologene/'},
'Human Disease Ontology': {'data_entry': 'http://bioportal.bioontology.org/ontologies/1009/?p=terms&conceptid=$id',
'example': 'DOID:11337',
'name': 'Human Disease Ontology',
'pattern': '^DOID\\:\\d+$',
'url': 'http://identifiers.org/obo.do/'},
'ICD': {'data_entry': 'http://apps.who.int/classifications/icd10/browse/2010/en#/$id',
'example': 'C34',
'name': 'ICD',
'pattern': '^[A-Z]\\d+(\\.[-\\d+])?$',
'url': 'http://identifiers.org/icd/'},
'IDEAL': {'data_entry': 'http://idp1.force.cs.is.nagoya-u.ac.jp/IDEAL/idealItem.php?id=$id',
'example': 'IID00001',
'name': 'IDEAL',
'pattern': '^IID\\d+$',
'url': 'http://identifiers.org/ideal/'},
'IMEx': {'data_entry': 'http://www.ebi.ac.uk/intact/imex/main.xhtml?query=$id',
'example': 'IM-12080-80',
'name': 'IMEx',
'pattern': '^IM-\\d+(-?)(\\d+?)$',
'url': 'http://identifiers.org/imex/'},
'IMGT HLA': {'data_entry': 'http://www.ebi.ac.uk/cgi-bin/imgt/hla/get_allele.cgi?$id',
'example': 'A*01:01:01:01',
'name': 'IMGT HLA',
'pattern': '^[A-Z0-9*:]+$',
'url': 'http://identifiers.org/imgt.hla/'},
'IMGT LIGM': {'data_entry': 'http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-id+1fmSL1g8Xvs+-e+[IMGTLIGM:'$id']',
'example': 'M94112',
'name': 'IMGT LIGM',
'pattern': '^M\\d+$" restricted="true',
'url': 'http://identifiers.org/imgt.ligm/'},
'IPI': {'data_entry': 'http://www.ebi.ac.uk/Tools/dbfetch/dbfetch?db=ipi&id=$id&format=default&style=html',
'example': 'IPI00000001',
'name': 'IPI',
'pattern': '^IPI\\d{8}$',
'url': 'http://identifiers.org/ipi/'},
'IRD Segment Sequence': {'data_entry': 'http://www.fludb.org/brc/fluSegmentDetails.do?ncbiGenomicAccession=$id',
'example': 'CY077097',
'name': 'IRD Segment Sequence',
'pattern': '^\\w+(\\_)?\\d+(\\.\\d+)?$',
'url': 'http://identifiers.org/ird.segment/'},
'ISBN': {'data_entry': 'http://isbndb.com/search-all.html?kw=$id',
'example': '9781584885658',
'name': 'ISBN',
'pattern': '^(ISBN)?(-13|-10)?[:]?[ ]?(\\d{2,3}[ -]?)?\\d{1,5}[ -]?\\d{1,7}[ -]?\\d{1,6}[ -]?(\\d|X)$',
'url': 'http://identifiers.org/isbn/'},
'ISFinder': {'data_entry': 'http://www-is.biotoul.fr/index.html?is_special_name=$id',
'example': 'ISA1083-2',
'name': 'ISFinder',
'pattern': '^IS\\w+(\\-\\d)?$',
'url': 'http://identifiers.org/isfinder/'},
'ISSN': {'data_entry': 'http://catalog.loc.gov/cgi-bin/Pwebrecon.cgi?Search_Arg=0745-4570$id&PID=le0kCQllk84KcxI3gMhUTowLMnn9H',
'example': '0745-4570',
'name': 'ISSN',
'pattern': '^\\d{4}\\-\\d{4}$" restricted="true',
'url': 'http://identifiers.org/issn/'},
'IUPHAR family': {'data_entry': 'http://www.iuphar-db.org/DATABASE/FamilyMenuForward?familyId=$id',
'example': '78',
'name': 'IUPHAR family',
'pattern': '^\\d+$" restricted="true',
'url': 'http://identifiers.org/iuphar.family/'},
'IUPHAR receptor': {'data_entry': 'http://www.iuphar-db.org/DATABASE/ObjectDisplayForward?objectId=$id',
'example': '101',
'name': 'IUPHAR receptor',
'pattern': '^\\d+$" restricted="true',
'url': 'http://identifiers.org/iuphar.receptor/'},
'InChI': {'data_entry': 'http://rdf.openmolecules.net/?$id',
'example': 'InChI=1S/C2H6O/c1-2-3/h3H,2H2,1H3',
'name': 'InChI',
'pattern': '^InChI\\=1S\\/[A-Za-z0-9]+(\\/[cnpqbtmsih][A-Za-z0-9\\-\\+\\(\\)\\,]+)+$" restricted="true',
'url': 'http://identifiers.org/inchi/'},
'InChIKey': {'data_entry': 'http://www.chemspider.com/inchi-resolver/Resolver.aspx?q=$id',
'example': 'RYYVLZVUVIJVGH-UHFFFAOYSA-N',
'name': 'InChIKey',
'pattern': '^[A-Z]{14}\\-[A-Z]{10}(\\-[A-N])?" restricted="true',
'url': 'http://identifiers.org/inchikey/'},
'IntAct': {'data_entry': 'http://www.ebi.ac.uk/intact/pages/details/details.xhtml?interactionAc=$id',
'example': 'EBI-2307691',
'name': 'IntAct',
'pattern': '^EBI\\-[0-9]+$',
'url': 'http://identifiers.org/intact/'},
'Integrated Microbial Genomes Gene': {'data_entry': 'http://img.jgi.doe.gov/cgi-bin/w/main.cgi?section=GeneDetail&gene_oid=$id',
'example': '638309541',
'name': 'Integrated Microbial Genomes Gene',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/img.gene/'},
'Integrated Microbial Genomes Taxon': {'data_entry': 'http://img.jgi.doe.gov/cgi-bin/w/main.cgi?section=TaxonDetail&taxon_oid=$id',
'example': '648028003',
'name': 'Integrated Microbial Genomes Taxon',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/img.taxon/'},
'InterPro': {'data_entry': 'http://www.ebi.ac.uk/interpro/DisplayIproEntry?ac=$id',
'example': 'IPR000100',
'name': 'InterPro',
'pattern': '^IPR\\d{6}$',
'url': 'http://identifiers.org/interpro/'},
'JAX Mice': {'data_entry': 'http://jaxmice.jax.org/strain/$id.html',
'example': '005012',
'name': 'JAX Mice',
'pattern': '^\\d+$" restricted="true',
'url': 'http://identifiers.org/jaxmice/'},
'JWS Online': {'data_entry': 'http://jjj.biochem.sun.ac.za/cgi-bin/processModelSelection.py?keytype=modelname&keyword=$id',
'example': 'curien',
'name': 'JWS Online',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/jws/'},
'Japan Chemical Substance Dictionary': {'data_entry': 'http://nikkajiweb.jst.go.jp/nikkaji_web/pages/top_e.jsp?CONTENT=syosai&SN=$id',
'example': 'J55.713G',
'name': 'Japan Chemical Substance Dictionary',
'pattern': '^J\\d{1,3}(\\.\\d{3})?(\\.\\d{1,3})?[A-Za-z]$',
'url': 'http://identifiers.org/jcsd/'},
'Japan Collection of Microorganisms': {'data_entry': 'http://www.jcm.riken.go.jp/cgi-bin/jcm/jcm_number?JCM=$id',
'example': '17254',
'name': 'Japan Collection of Microorganisms',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/jcm/'},
'KEGG Compound': {'data_entry': 'http://www.genome.jp/dbget-bin/www_bget?cpd:$id',
'example': 'C12345',
'name': 'KEGG Compound',
'pattern': '^C\\d+$',
'url': 'http://identifiers.org/kegg.compound/'},
'KEGG Drug': {'data_entry': 'http://www.genome.jp/dbget-bin/www_bget?dr:$id',
'example': 'D00123',
'name': 'KEGG Drug',
'pattern': '^D\\d+$',
'url': 'http://identifiers.org/kegg.drug/'},
'KEGG Environ': {'data_entry': 'http://www.genome.jp/dbget-bin/www_bget?$id',
'example': 'ev:E00032',
'name': 'KEGG Environ',
'pattern': '^ev\\:E\\d+$',
'url': 'http://identifiers.org/kegg.environ/'},
'KEGG Genes': {'data_entry': 'http://www.genome.jp/dbget-bin/www_bget?$id',
'example': 'syn:ssr3451',
'name': 'KEGG Genes',
'pattern': '^\\w+:[\\w\\d\\.-]*$',
'url': 'http://identifiers.org/kegg.genes/'},
'KEGG Genome': {'data_entry': 'http://www.genome.jp/kegg-bin/show_organism?org=$id',
'example': 'eco',
'name': 'KEGG Genome',
'pattern': '^(T0\\d+|\\w{3,5})$',
'url': 'http://identifiers.org/kegg.genome/'},
'KEGG Glycan': {'data_entry': 'http://www.genome.jp/dbget-bin/www_bget?gl:$id',
'example': 'G00123',
'name': 'KEGG Glycan',
'pattern': '^G\\d+$',
'url': 'http://identifiers.org/kegg.glycan/'},
'KEGG Metagenome': {'data_entry': 'http://www.genome.jp/kegg-bin/show_organism?org=$id',
'example': 'T30002',
'name': 'KEGG Metagenome',
'pattern': '^T3\\d+$',
'url': 'http://identifiers.org/kegg.metagenome/'},
'KEGG Orthology': {'data_entry': 'http://www.genome.jp/dbget-bin/www_bget?ko+$id',
'example': 'K00001',
'name': 'KEGG Orthology',
'pattern': '^K\\d+$',
'url': 'http://identifiers.org/kegg.orthology/'},
'KEGG Pathway': {'data_entry': 'http://www.genome.jp/dbget-bin/www_bget?pathway+$id',
'example': 'hsa00620',
'name': 'KEGG Pathway',
'pattern': '^\\w{2,4}\\d{5}$',
'url': 'http://identifiers.org/kegg.pathway/'},
'KEGG Reaction': {'data_entry': 'http://www.genome.jp/dbget-bin/www_bget?rn:$id',
'example': 'R00100',
'name': 'KEGG Reaction',
'pattern': '^R\\d+$',
'url': 'http://identifiers.org/kegg.reaction/'},
'KiSAO': {'data_entry': 'http://bioportal.bioontology.org/ontologies/1410?p=terms&conceptid=kisao:$id',
'example': 'KISAO_0000057',
'name': 'KiSAO',
'pattern': '^KISAO_\\d+$',
'url': 'http://identifiers.org/biomodels.kisao/'},
'KnapSack': {'data_entry': 'http://kanaya.naist.jp/knapsack_jsp/information.jsp?word=$id',
'example': 'C00000001',
'name': 'KnapSack',
'pattern': '^C\\d{8}',
'url': 'http://identifiers.org/knapsack/'},
'LIPID MAPS': {'data_entry': 'http://www.lipidmaps.org/data/get_lm_lipids_dbgif.php?LM_ID=$id',
'example': 'LMPR0102010012',
'name': 'LIPID MAPS',
'pattern': '^LM(FA|GL|GP|SP|ST|PR|SL|PK)[0-9]{4}([0-9a-zA-Z]{4,6})?$',
'url': 'http://identifiers.org/lipidmaps/'},
'Ligand Expo': {'data_entry': 'http://ligand-depot.rutgers.edu/pyapps/ldHandler.py?formid=cc-index-search&target=$id&operation=ccid',
'example': 'ABC',
'name': 'Ligand Expo',
'pattern': '^(\\w){3}$',
'url': 'http://identifiers.org/ligandexpo/'},
'Ligand-Gated Ion Channel database': {'data_entry': 'http://www.ebi.ac.uk/compneur-srv/LGICdb/HTML/$id.php',
'example': '5HT3Arano',
'name': 'Ligand-Gated Ion Channel database',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/lgic/'},
'LipidBank': {'data_entry': 'http://lipidbank.jp/cgi-bin/detail.cgi?id=$id',
'example': 'BBA0001',
'name': 'LipidBank',
'pattern': '^\\w+\\d+$',
'url': 'http://identifiers.org/lipidbank/'},
'Locus Reference Genomic': {'data_entry': 'ftp://ftp.ebi.ac.uk/pub/databases/lrgex/$id.xml',
'example': 'LRG_1',
'name': 'Locus Reference Genomic',
'pattern': '^LRG_\\d+$',
'url': 'http://identifiers.org/lrg/'},
'MACiE': {'data_entry': 'http://www.ebi.ac.uk/thornton-srv/databases/cgi-bin/MACiE/entry/getPage.pl?id=$id',
'example': 'M0001',
'name': 'MACiE',
'pattern': '^M\\d{4}$',
'url': 'http://identifiers.org/macie/'},
'MEROPS': {'data_entry': 'http://merops.sanger.ac.uk/cgi-bin/pepsum?mid=$id',
'example': 'S01.001',
'name': 'MEROPS',
'pattern': '^S\\d{2}\\.\\d{3}$',
'url': 'http://identifiers.org/merops/'},
'MEROPS Family': {'data_entry': 'http://merops.sanger.ac.uk/cgi-bin/famsum?family=$id',
'example': 'S1',
'name': 'MEROPS Family',
'pattern': '^\\w+\\d+$',
'url': 'http://identifiers.org/merops.family/'},
'METLIN': {'data_entry': 'http://metlin.scripps.edu/metabo_info.php?molid=$id',
'example': '1455',
'name': 'METLIN',
'pattern': '^\\d{4}$" restricted="true',
'url': 'http://identifiers.org/metlin/'},
'MGED Ontology': {'data_entry': 'http://purl.bioontology.org/ontology/MO/$id',
'example': 'ArrayGroup',
'name': 'MGED Ontology',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/mo/'},
'MINT': {'data_entry': 'http://mint.bio.uniroma2.it/mint/search/inFrameInteraction.do?interactionAc=$id',
'example': 'MINT-10000',
'name': 'MINT',
'pattern': '^MINT\\-\\d{1,5}$',
'url': 'http://identifiers.org/mint/'},
'MIPModDB': {'data_entry': 'http://bioinfo.iitk.ac.in/MIPModDB/result.php?code=$id',
'example': 'HOSAPI0399',
'name': 'MIPModDB',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/mipmod/'},
'MIRIAM Registry collection': {'data_entry': 'http://www.ebi.ac.uk/miriam/main/$id',
'example': 'MIR:00000008',
'name': 'MIRIAM Registry collection',
'pattern': '^MIR:000\\d{5}$',
'url': 'http://identifiers.org/miriam.collection/'},
'MIRIAM Registry resource': {'data_entry': 'http://www.ebi.ac.uk/miriam/main/resources/$id',
'example': 'MIR:00100005',
'name': 'MIRIAM Registry resource',
'pattern': '^MIR:001\\d{5}$',
'url': 'http://identifiers.org/miriam.resource/'},
'MMRRC': {'data_entry': 'http://www.mmrrc.org/catalog/getSDS.php?mmrrc_id=$id',
'example': '70',
'name': 'MMRRC',
'pattern': '^\\d+$" restricted="true',
'url': 'http://identifiers.org/mmrrc/'},
'MaizeGDB Locus': {'data_entry': 'http://www.maizegdb.org/cgi-bin/displaylocusrecord.cgi?id=$id',
'example': '25011',
'name': 'MaizeGDB Locus',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/maizegdb.locus/'},
'MassBank': {'data_entry': 'http://msbi.ipb-halle.de/MassBank/jsp/Dispatcher.jsp?type=disp&id=$id',
'example': 'PB000166',
'name': 'MassBank',
'pattern': '^[A-Z]{2}[A-Z0-9][0-9]{5}$" restricted="true',
'url': 'http://identifiers.org/massbank/'},
'MatrixDB': {'data_entry': 'http://matrixdb.ibcp.fr/cgi-bin/model/report/default?name=$id&class=Association',
'example': 'P00747_P07355',
'name': 'MatrixDB',
'pattern': '^([A-N,R-Z][0-9][A-Z][A-Z, 0-9][A-Z, 0-9][0-9])_.*|([O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9]_.*)|(GAG_.*)|(MULT_.*)|(PFRAG_.*)|(LIP_.*)|(CAT_.*)$',
'url': 'http://identifiers.org/matrixdb.association/'},
'MeSH': {'data_entry': 'http://www.nlm.nih.gov/cgi/mesh/2012/MB_cgi?mode=&index=$id&view=expanded',
'example': '17186',
'name': 'MeSH',
'pattern': '^[A-Za-z0-9]+$" restricted="true',
'url': 'http://identifiers.org/mesh/'},
'Melanoma Molecular Map Project Biomaps': {'data_entry': 'http://www.mmmp.org/MMMP/public/biomap/viewBiomap.mmmp?id=$id',
'example': '37',
'name': 'Melanoma Molecular Map Project Biomaps',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/biomaps/'},
'MetaboLights': {'data_entry': 'http://www.ebi.ac.uk/metabolights/$id',
'example': 'MTBLS1',
'name': 'MetaboLights',
'pattern': '^MTBLS\\d+$',
'url': 'http://identifiers.org/metabolights/'},
'Microbial Protein Interaction Database': {'data_entry': 'http://www.jcvi.org/mpidb/experiment.php?interaction_id=$id',
'example': '172',
'name': 'Microbial Protein Interaction Database',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/mpid/'},
'MicrosporidiaDB': {'data_entry': 'http://microsporidiadb.org/micro/showRecord.do?name=GeneRecordClasses.GeneRecordClass&source_id=$id',
'example': 'ECU03_0820i',
'name': 'MicrosporidiaDB',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/microsporidia/'},
'MimoDB': {'data_entry': 'http://immunet.cn/mimodb/browse.php?table=mimoset&ID=$id',
'example': '1',
'name': 'MimoDB',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/mimodb/'},
'ModelDB': {'data_entry': 'http://senselab.med.yale.edu/ModelDB/ShowModel.asp?model=$id',
'example': '45539',
'name': 'ModelDB',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/modeldb/'},
'Molecular Interactions Ontology': {'data_entry': 'http://www.ebi.ac.uk/ontology-lookup/?termId=$id',
'example': 'MI:0308',
'name': 'Molecular Interactions Ontology',
'pattern': '^MI:\\d{4}$',
'url': 'http://identifiers.org/obo.mi/'},
'Molecular Modeling Database': {'data_entry': 'http://www.ncbi.nlm.nih.gov/Structure/mmdb/mmdbsrv.cgi?uid=$id',
'example': '50885',
'name': 'Molecular Modeling Database',
'pattern': '^\\d{1,5}$',
'url': 'http://identifiers.org/mmdb/'},
'Mouse Genome Database': {'data_entry': 'http://www.informatics.jax.org/marker/$id',
'example': 'MGI:2442292',
'name': 'Mouse Genome Database',
'pattern': '^MGI:\\d+$',
'url': 'http://identifiers.org/mgd/'},
'MycoBank': {'data_entry': 'http://www.mycobank.org/Biolomics.aspx?Table=Mycobank&MycoBankNr_=$id',
'example': '349124',
'name': 'MycoBank',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/mycobank/'},
'MycoBrowser leprae': {'data_entry': 'http://mycobrowser.epfl.ch/leprosysearch.php?gene+name=$id',
'example': 'ML0224',
'name': 'MycoBrowser leprae',
'pattern': '^ML\\w+$',
'url': 'http://identifiers.org/myco.lepra/'},
'MycoBrowser marinum': {'data_entry': 'http://mycobrowser.epfl.ch/marinosearch.php?gene+name=$id',
'example': 'MMAR_2462',
'name': 'MycoBrowser marinum',
'pattern': '^MMAR\\_\\d+$',
'url': 'http://identifiers.org/myco.marinum/'},
'MycoBrowser smegmatis': {'data_entry': 'http://mycobrowser.epfl.ch/smegmasearch.php?gene+name=$id',
'example': 'MSMEG_3769',
'name': 'MycoBrowser smegmatis',
'pattern': '^MSMEG\\w+$',
'url': 'http://identifiers.org/myco.smeg/'},
'MycoBrowser tuberculosis': {'data_entry': 'http://tuberculist.epfl.ch/quicksearch.php?gene+name=$id',
'example': 'Rv1908c',
'name': 'MycoBrowser tuberculosis',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/myco.tuber/'},
'NAPP': {'data_entry': 'http://napp.u-psud.fr/Niveau2.php?specie=$id',
'example': '351',
'name': 'NAPP',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/napp/'},
'NARCIS': {'data_entry': 'http://www.narcis.nl/publication/RecordID/$id',
'example': 'oai:cwi.nl:4725',
'name': 'NARCIS',
'pattern': '^oai\\:cwi\\.nl\\:\\d+$',
'url': 'http://identifiers.org/narcis/'},
'NASC code': {'data_entry': 'http://arabidopsis.info/StockInfo?NASC_id=$id',
'example': 'N1899',
'name': 'NASC code',
'pattern': '^(\\w+)?\\d+$',
'url': 'http://identifiers.org/nasc/'},
'NCBI Gene': {'data_entry': 'http://www.ncbi.nlm.nih.gov/gene/$id',
'example': '100010',
'name': 'NCBI Gene',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/ncbigene/'},
'NCBI Protein': {'data_entry': 'http://www.ncbi.nlm.nih.gov/protein/$id',
'example': 'CAA71118.1',
'name': 'NCBI Protein',
'pattern': '^\\w+\\d+(\\.\\d+)?$" restricted="true',
'url': 'http://identifiers.org/ncbiprotein/'},
'NCI Pathway Interaction Database: Pathway': {'data_entry': 'http://pid.nci.nih.gov/search/pathway_landing.shtml?what=graphic&jpg=on&pathway_id=$id',
'example': 'pi3kcipathway',
'name': 'NCI Pathway Interaction Database: Pathway',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/pid.pathway/'},
'NCIm': {'data_entry': 'http://ncim.nci.nih.gov/ncimbrowser/ConceptReport.jsp?dictionary=NCI%20MetaThesaurus&code=$id',
'example': 'C0026339',
'name': 'NCIm',
'pattern': '^C\\d+$" restricted="true',
'url': 'http://identifiers.org/ncim/'},
'NCIt': {'data_entry': 'http://ncit.nci.nih.gov/ncitbrowser/ConceptReport.jsp?dictionary=NCI%20Thesaurus&code=$id',
'example': 'C80519',
'name': 'NCIt',
'pattern': '^C\\d+$',
'url': 'http://identifiers.org/ncit/'},
'NEXTDB': {'data_entry': 'http://nematode.lab.nig.ac.jp/db2/ShowCloneInfo.php?clone=$id',
'example': '6b1',
'name': 'NEXTDB',
'pattern': '^[A-Za-z0-9]+$" restricted="true',
'url': 'http://identifiers.org/nextdb/'},
'NIAEST': {'data_entry': 'http://lgsun.grc.nia.nih.gov/cgi-bin/pro3?sname1=$id',
'example': 'J0705A10',
'name': 'NIAEST',
'pattern': '^\\w\\d{4}\\w\\d{2}(\\-[35])?$',
'url': 'http://identifiers.org/niaest/'},
'NITE Biological Research Center Catalogue': {'data_entry': 'http://www.nbrc.nite.go.jp/NBRC2/NBRCCatalogueDetailServlet?ID=NBRC&CAT=$id',
'example': '00001234',
'name': 'NITE Biological Research Center Catalogue',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/nbrc/'},
'NONCODE': {'data_entry': 'http://www.noncode.org/NONCODERv3/ncrna.php?ncid=$id',
'example': '377550',
'name': 'NONCODE',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/noncode/'},
'National Bibliography Number': {'data_entry': 'http://nbn-resolving.org/resolver?identifier=$id&verb=full',
'example': 'urn:nbn:fi:tkk-004781',
'name': 'National Bibliography Number',
'pattern': '^urn\\:nbn\\:[A-Za-z_0-9]+\\:([A-Za-z_0-9]+\\:)?[A-Za-z_0-9]+$',
'url': 'http://identifiers.org/nbn/'},
'NeuroLex': {'data_entry': 'http://www.neurolex.org/wiki/$id',
'example': 'Birnlex_721',
'name': 'NeuroLex',
'pattern': '^([Bb]irnlex_|Sao|nlx_|GO_|CogPO|HDO)\\d+$',
'url': 'http://identifiers.org/neurolex/'},
'NeuroMorpho': {'data_entry': 'http://neuromorpho.org/neuroMorpho/neuron_info.jsp?neuron_name=$id',
'example': 'Rosa2',
'name': 'NeuroMorpho',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/neuromorpho/'},
'NeuronDB': {'data_entry': 'http://senselab.med.yale.edu/NeuronDB/NeuronProp.aspx?id=$id',
'example': '265',
'name': 'NeuronDB',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/neurondb/'},
'NucleaRDB': {'data_entry': 'http://www.receptors.org/nucleardb/proteins/$id',
'example': 'prgr_human',
'name': 'NucleaRDB',
'pattern': '^\\w+\\_\\w+$',
'url': 'http://identifiers.org/nuclearbd/'},
'Nucleotide Sequence Database': {'data_entry': 'http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-page+EntryPage+-e+[EMBL:$id]+-view+EmblEntry',
'example': 'X58356',
'name': 'Nucleotide Sequence Database',
'pattern': '^[A-Z]+\\d+(\\.\\d+)?$',
'url': 'http://identifiers.org/insdc/'},
'OMA Group': {'data_entry': 'http://omabrowser.org/cgi-bin/gateway.pl?f=DisplayGroup&p1=$id',
'example': 'LCSCCPN',
'name': 'OMA Group',
'pattern': '^[A-Z]+$" restricted="true',
'url': 'http://identifiers.org/oma.grp/'},
'OMA Protein': {'data_entry': 'http://omabrowser.org/cgi-bin/gateway.pl?f=DisplayEntry&p1=$id',
'example': 'HUMAN16963',
'name': 'OMA Protein',
'pattern': '^[A-Z0-9]{5}\\d+$" restricted="true',
'url': 'http://identifiers.org/oma.protein/'},
'OMIA': {'data_entry': 'http://omia.angis.org.au/$id/',
'example': '1000',
'name': 'OMIA',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/omia/'},
'OMIM': {'data_entry': 'http://omim.org/entry/$id',
'example': '603903',
'name': 'OMIM',
'pattern': '^[*#+%^]?\\d{6}$',
'url': 'http://identifiers.org/omim/'},
'OPM': {'data_entry': 'http://opm.phar.umich.edu/protein.php?pdbid=$id',
'example': '1h68',
'name': 'OPM',
'pattern': '^[0-9][A-Za-z0-9]{3}$" restricted="true',
'url': 'http://identifiers.org/opm/'},
'ORCID': {'data_entry': 'https://orcid.org/$id',
'example': '0000-0002-6309-7327',
'name': 'ORCID',
'pattern': '^\\d{4}-\\d{4}-\\d{4}-\\d{4}$',
'url': 'http://identifiers.org/orcid/'},
'Ontology for Biomedical Investigations': {'data_entry': 'http://purl.obolibrary.org/obo/$id',
'example': 'OBI_0000070',
'name': 'Ontology for Biomedical Investigations',
'pattern': '^OBI_\\d{7}$',
'url': 'http://identifiers.org/obo.obi/'},
'Ontology of Physics for Biology': {'data_entry': 'http://bioportal.bioontology.org/ontologies/1141?p=terms&conceptid=$id',
'example': 'OPB_00573',
'name': 'Ontology of Physics for Biology',
'pattern': '^OPB_\\d+$',
'url': 'http://identifiers.org/opb/'},
'OriDB Saccharomyces': {'data_entry': 'http://cerevisiae.oridb.org/details.php?id=$id',
'example': '1',
'name': 'OriDB Saccharomyces',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/oridb.sacch/'},
'OriDB Schizosaccharomyces': {'data_entry': 'http://pombe.oridb.org/details.php?id=$id',
'example': '1',
'name': 'OriDB Schizosaccharomyces',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/oridb.schizo/'},
'Orphanet': {'data_entry': 'http://www.orpha.net/consor/cgi-bin/OC_Exp.php?Lng=EN&Expert=$id',
'example': '85163',
'name': 'Orphanet',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/orphanet/'},
'OrthoDB': {'data_entry': 'http://cegg.unige.ch/orthodb/results?searchtext=$id',
'example': 'Q9P0K8',
'name': 'OrthoDB',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/orthodb/'},
'PANTHER Family': {'data_entry': 'http://www.pantherdb.org/panther/family.do?clsAccession=$id',
'example': 'PTHR12345',
'name': 'PANTHER Family',
'pattern': '^PTHR\\d{5}(\\:SF\\d{1,3})?$',
'url': 'http://identifiers.org/panther.family/'},
'PANTHER Node': {'data_entry': 'http://www.pantree.org/node/annotationNode.jsp?id=$id',
'example': 'PTN000000026',
'name': 'PANTHER Node',
'pattern': '^PTN\\d{9}$',
'url': 'http://identifiers.org/panther.node/'},
'PANTHER Pathway': {'data_entry': 'http://www.pantherdb.org/pathway/pathwayDiagram.jsp?catAccession=$id',
'example': 'P00024',
'name': 'PANTHER Pathway',
'pattern': '^P\\d{5}$',
'url': 'http://identifiers.org/panther.pathway/'},
'PATO': {'data_entry': 'http://www.ebi.ac.uk/ontology-lookup/?termId=$id',
'example': 'PATO:0001998',
'name': 'PATO',
'pattern': '^PATO:\\d{7}$',
'url': 'http://identifiers.org/obo.pato/'},
'PINA': {'data_entry': 'http://cbg.garvan.unsw.edu.au/pina/interactome.oneP.do?ac=$id&showExtend=null',
'example': 'Q13485',
'name': 'PINA',
'pattern': '^([A-N,R-Z][0-9][A-Z][A-Z, 0-9][A-Z, 0-9][0-9])|([O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])$" restricted="true',
'url': 'http://identifiers.org/pina/'},
'PIRSF': {'data_entry': 'http://pir.georgetown.edu/cgi-bin/ipcSF?id=$id',
'example': 'PIRSF000100',
'name': 'PIRSF',
'pattern': '^PIRSF\\d{6}$',
'url': 'http://identifiers.org/pirsf/'},
'PMP': {'data_entry': 'http://www.proteinmodelportal.org/query/uniprot/$id',
'example': 'Q0VCA6',
'name': 'PMP',
'pattern': '^([A-N,R-Z][0-9][A-Z][A-Z, 0-9][A-Z, 0-9][0-9])|([O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])$',
'url': 'http://identifiers.org/pmp/'},
'PRIDE': {'data_entry': 'http://www.ebi.ac.uk/pride/experimentLink.do?experimentAccessionNumber=$id',
'example': '1',
'name': 'PRIDE',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/pride/'},
'PROSITE': {'data_entry': 'http://prosite.expasy.org/$id',
'example': 'PS00001',
'name': 'PROSITE',
'pattern': '^PS\\d{5}$',
'url': 'http://identifiers.org/prosite/'},
'PSCDB': {'data_entry': 'http://idp1.force.cs.is.nagoya-u.ac.jp/pscdb/$id.html',
'example': '051',
'name': 'PSCDB',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/pscdb/'},
'PaleoDB': {'data_entry': 'http://paleodb.org/cgi-bin/bridge.pl?a=basicTaxonInfo&taxon_no=$id',
'example': '83088',
'name': 'PaleoDB',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/paleodb/'},
'Pathway Commons': {'data_entry': 'http://www.pathwaycommons.org/pc/record2.do?id=$id',
'example': '485991',
'name': 'Pathway Commons',
'pattern': '^\\d+$" restricted="true',
'url': 'http://identifiers.org/pathwaycommons/'},
'Pathway Ontology': {'data_entry': 'http://rgd.mcw.edu/rgdweb/ontology/annot.html?acc_id=$id',
'example': 'PW:0000208',
'name': 'Pathway Ontology',
'pattern': '^PW:\\d{7}$',
'url': 'http://identifiers.org/obo.pw/'},
'Pazar Transcription Factor': {'data_entry': 'http://www.pazar.info/cgi-bin/tf_search.cgi?geneID=$id',
'example': 'TF0001053',
'name': 'Pazar Transcription Factor',
'pattern': '^TF\\w+$',
'url': 'http://identifiers.org/pazar/'},
'PeptideAtlas': {'data_entry': 'https://db.systemsbiology.net/sbeams/cgi/PeptideAtlas/Summarize_Peptide?query=QUERY&searchForThis=$id',
'example': 'PAp00000009',
'name': 'PeptideAtlas',
'pattern': '^PAp[0-9]{8}$',
'url': 'http://identifiers.org/peptideatlas/'},
'Peroxibase': {'data_entry': 'http://peroxibase.toulouse.inra.fr/browse/process/view_perox.php?id=$id',
'example': '5282',
'name': 'Peroxibase',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/peroxibase/'},
'Pfam': {'data_entry': 'http://pfam.sanger.ac.uk/family/$id/',
'example': 'PF01234',
'name': 'Pfam',
'pattern': '^PF\\d{5}$',
'url': 'http://identifiers.org/pfam/'},
'PharmGKB Disease': {'data_entry': 'http://www.pharmgkb.org/disease/$id',
'example': 'PA447218',
'name': 'PharmGKB Disease',
'pattern': '^PA\\d+$" restricted="true',
'url': 'http://identifiers.org/pharmgkb.disease/'},
'PharmGKB Drug': {'data_entry': 'http://www.pharmgkb.org/drug/$id',
'example': 'PA448710',
'name': 'PharmGKB Drug',
'pattern': '^PA\\d+$" restricted="true',
'url': 'http://identifiers.org/pharmgkb.drug/'},
'PharmGKB Gene': {'data_entry': 'http://www.pharmgkb.org/gene/$id',
'example': 'PA131',
'name': 'PharmGKB Gene',
'pattern': '^PA\\w+$" restricted="true',
'url': 'http://identifiers.org/pharmgkb.gene/'},
'PharmGKB Pathways': {'data_entry': 'http://www.pharmgkb.org/pathway/$id',
'example': 'PA146123006',
'name': 'PharmGKB Pathways',
'pattern': '^PA\\d+$" restricted="true',
'url': 'http://identifiers.org/pharmgkb.pathways/'},
'Phenol-Explorer': {'data_entry': 'http://www.phenol-explorer.eu/contents/total?food_id=$id',
'example': '75',
'name': 'Phenol-Explorer',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/phenolexplorer/'},
'PhosphoPoint Kinase': {'data_entry': 'http://kinase.bioinformatics.tw/showall.jsp?type=Kinase&info=Gene&name=$id&drawing=0&sorting=0&kinome=1',
'example': 'AURKA',
'name': 'PhosphoPoint Kinase',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/phosphopoint.kinase/'},
'PhosphoPoint Phosphoprotein': {'data_entry': 'http://kinase.bioinformatics.tw/showall.jsp?type=PhosphoProtein&info=Gene&name=$id&drawing=0&sorting=0&kinome=0',
'example': 'AURKA',
'name': 'PhosphoPoint Phosphoprotein',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/phosphopoint.protein/'},
'PhosphoSite Protein': {'data_entry': 'http://www.phosphosite.org/proteinAction.do?id=$id',
'example': '12300',
'name': 'PhosphoSite Protein',
'pattern': '^\\d{5}$',
'url': 'http://identifiers.org/phosphosite.protein/'},
'PhosphoSite Residue': {'data_entry': 'http://www.phosphosite.org/siteAction.do?id=$id',
'example': '2842',
'name': 'PhosphoSite Residue',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/phosphosite.residue/'},
'PhylomeDB': {'data_entry': 'http://phylomedb.org/?seqid=$id',
'example': 'Phy000CLXM_RAT',
'name': 'PhylomeDB',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/phylomedb/'},
'PiroplasmaDB': {'data_entry': 'http://piroplasmadb.org/piro/showRecord.do?name=GeneRecordClasses.GeneRecordClass&source_id=$id',
'example': 'TA14985',
'name': 'PiroplasmaDB',
'pattern': '^TA\\d+$',
'url': 'http://identifiers.org/piroplasma/'},
'Plant Genome Network': {'data_entry': 'http://pgn.cornell.edu/unigene/unigene_assembly_contigs.pl?unigene_id=$id',
'example': '196828',
'name': 'Plant Genome Network',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/pgn/'},
'Plant Ontology': {'data_entry': 'http://www.plantontology.org/amigo/go.cgi?view=details&amp;query=$id',
'example': 'PO:0009089',
'name': 'Plant Ontology',
'pattern': '^PO\\:\\d+$',
'url': 'http://identifiers.org/obo.po/'},
'PlasmoDB': {'data_entry': 'http://plasmodb.org/plasmo/showRecord.do?name=GeneRecordClasses.GeneRecordClass&source_id=$id',
'example': 'PF11_0344',
'name': 'PlasmoDB',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/plasmodb/'},
'Pocketome': {'data_entry': 'http://www.pocketome.org/files/$id.html',
'example': '1433C_TOBAC_1_252',
'name': 'Pocketome',
'pattern': '^[A-Za-z_0-9]+',
'url': 'http://identifiers.org/pocketome/'},
'PolBase': {'data_entry': 'http://polbase.neb.com/polymerases/$id#sequences',
'example': '19-T4',
'name': 'PolBase',
'pattern': '^[A-Za-z-0-9]+$',
'url': 'http://identifiers.org/polbase/'},
'PomBase': {'data_entry': 'http://www.pombase.org/spombe/result/$id',
'example': 'SPCC13B11.01',
'name': 'PomBase',
'pattern': '^S\\w+(\\.)?\\w+(\\.)?$',
'url': 'http://identifiers.org/pombase/'},
'ProDom': {'data_entry': 'http://prodom.prabi.fr/prodom/current/cgi-bin/request.pl?question=DBEN&query=$id',
'example': 'PD10000',
'name': 'ProDom',
'pattern': '^PD\\d+$',
'url': 'http://identifiers.org/prodom/'},
'ProGlycProt': {'data_entry': 'http://www.proglycprot.org/detail.aspx?ProId=$id',
'example': 'AC119',
'name': 'ProGlycProt',
'pattern': '^[A-Z]C\\d{1,3}$',
'url': 'http://identifiers.org/proglyc/'},
'ProtClustDB': {'data_entry': 'http://www.ncbi.nlm.nih.gov/sites/entrez?Db=proteinclusters&Cmd=DetailsSearch&Term=$id',
'example': 'O80725',
'name': 'ProtClustDB',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/protclustdb/'},
'Protein Data Bank': {'data_entry': 'http://www.rcsb.org/pdb/explore/explore.do?structureId=$id',
'example': '2gc4',
'name': 'Protein Data Bank',
'pattern': '^[0-9][A-Za-z0-9]{3}$',
'url': 'http://identifiers.org/pdb/'},
'Protein Model Database': {'data_entry': 'http://mi.caspur.it/PMDB/user/search.php?idsearch=$id',
'example': 'PM0012345',
'name': 'Protein Model Database',
'pattern': '^PM\\d{7}',
'url': 'http://identifiers.org/pmdb/'},
'Protein Modification Ontology': {'data_entry': 'http://www.ebi.ac.uk/ontology-lookup/?termId=$id',
'example': 'MOD:00001',
'name': 'Protein Modification Ontology',
'pattern': '^MOD:\\d{5}',
'url': 'http://identifiers.org/obo.psi-mod/'},
'Protein Ontology': {'data_entry': 'http://pir.georgetown.edu/cgi-bin/pro/entry_pro?id=$id',
'example': 'PR:000000024',
'name': 'Protein Ontology',
'pattern': '^PR\\:\\d+$',
'url': 'http://identifiers.org/obo.pr/'},
'ProtoNet Cluster': {'data_entry': 'http://www.protonet.cs.huji.ac.il/requested/cluster_card.php?cluster=$id',
'example': '4349895',
'name': 'ProtoNet Cluster',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/protonet.cluster/'},
'ProtoNet ProteinCard': {'data_entry': 'http://www.protonet.cs.huji.ac.il/requested/protein_card.php?protein_id=$id',
'example': '16941567',
'name': 'ProtoNet ProteinCard',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/protonet.proteincard/'},
'Pseudomonas Genome Database': {'data_entry': 'http://www.pseudomonas.com/getAnnotation.do?locusID=$id',
'example': 'PSEEN0001',
'name': 'Pseudomonas Genome Database',
'pattern': '^P\\w+$',
'url': 'http://identifiers.org/pseudomonas/'},
'PubChem-bioassay': {'data_entry': 'http://pubchem.ncbi.nlm.nih.gov/assay/assay.cgi?aid=$id',
'example': '1018',
'name': 'PubChem-bioassay',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/pubchem.bioassay/'},
'PubChem-compound': {'data_entry': 'http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=$id',
'example': '100101',
'name': 'PubChem-compound',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/pubchem.compound/'},
'PubChem-substance': {'data_entry': 'http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?sid=$id',
'example': '100101',
'name': 'PubChem-substance',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/pubchem.substance/'},
'PubMed': {'data_entry': 'http://www.ncbi.nlm.nih.gov/pubmed/$id',
'example': '16333295',
'name': 'PubMed',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/pubmed/'},
'PubMed Central': {'data_entry': 'http://www.ncbi.nlm.nih.gov/pmc/articles/$id/?tool=pubmed',
'example': 'PMC3084216',
'name': 'PubMed Central',
'pattern': 'PMC\\d+',
'url': 'http://identifiers.org/pmc/'},
'REBASE': {'data_entry': 'http://rebase.neb.com/rebase/enz/$id.html',
'example': '101',
'name': 'REBASE',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/rebase/'},
'RESID': {'data_entry': 'http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-id+6JSUg1NA6u4+-e+[RESID:'$id']',
'example': 'AA0001',
'name': 'RESID',
'pattern': '^AA\\d{4}$',
'url': 'http://identifiers.org/resid/'},
'RFAM': {'data_entry': 'http://rfam.sanger.ac.uk/family/$id',
'example': 'RF00230',
'name': 'RFAM',
'pattern': '^RF\\d+$',
'url': 'http://identifiers.org/rfam/'},
'RNA Modification Database': {'data_entry': 'http://s59.cas.albany.edu/RNAmods/cgi-bin/rnashow.cgi?$id',
'example': '101',
'name': 'RNA Modification Database',
'pattern': '^\\d{3}$',
'url': 'http://identifiers.org/rnamods/'},
'Rat Genome Database': {'data_entry': 'http://rgd.mcw.edu/rgdweb/report/gene/main.html?id=$id',
'example': '2018',
'name': 'Rat Genome Database',
'pattern': '^\\d{4,7}$',
'url': 'http://identifiers.org/rgd/'},
'Reactome': {'data_entry': 'http://www.reactome.org/cgi-bin/eventbrowser_st_id?FROM_REACTOME=1&ST_ID=$id',
'example': 'REACT_1590',
'name': 'Reactome',
'pattern': '^REACT_\\d+(\\.\\d+)?$',
'url': 'http://identifiers.org/reactome/'},
'RefSeq': {'data_entry': 'http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?val=$id',
'example': 'NP_012345',
'name': 'RefSeq',
'pattern': '^(NC|AC|NG|NT|NW|NZ|NM|NR|XM|XR|NP|AP|XP|ZP)_\\d+(\\.\\d+)?$',
'url': 'http://identifiers.org/refseq/'},
'Relation Ontology': {'data_entry': 'http://www.obofoundry.org/ro/#$id',
'example': 'OBO_REL:is_a',
'name': 'Relation Ontology',
'pattern': '^OBO_REL:\\w+$',
'url': 'http://identifiers.org/obo.ro/'},
'Rhea': {'data_entry': 'http://www.ebi.ac.uk/rhea/reaction.xhtml?id=$id',
'example': '12345',
'name': 'Rhea',
'pattern': '^\\d{5}$',
'url': 'http://identifiers.org/rhea/'},
'Rice Genome Annotation Project': {'data_entry': 'http://rice.plantbiology.msu.edu/cgi-bin/ORF_infopage.cgi?&orf=$id',
'example': 'LOC_Os02g13300',
'name': 'Rice Genome Annotation Project',
'pattern': '^LOC\\_Os\\d{1,2}g\\d{5}$',
'url': 'http://identifiers.org/ricegap/'},
'Rouge': {'data_entry': 'http://www.kazusa.or.jp/rouge/gfpage/$id/',
'example': 'mKIAA4200',
'name': 'Rouge',
'pattern': '^m\\w+$" restricted="true',
'url': 'http://identifiers.org/rouge/'},
'SABIO-RK EC Record': {'data_entry': 'http://sabiork.h-its.org/newSearch?q=ecnumber:$id',
'example': '2.7.1.1',
'name': 'SABIO-RK EC Record',
'pattern': '^((\\d+)|(\\d+\\.\\d+)|(\\d+\\.\\d+\\.\\d+)|(\\d+\\.\\d+\\.\\d+\\.\\d+))$',
'url': 'http://identifiers.org/sabiork.ec/'},
'SABIO-RK Kinetic Record': {'data_entry': 'http://sabiork.h-its.org/newSearch?q=entryid:$id',
'example': '5046',
'name': 'SABIO-RK Kinetic Record',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/sabiork.kineticrecord/'},
'SABIO-RK Reaction': {'data_entry': 'http://sabiork.h-its.org/newSearch?q=sabioreactionid:$id',
'example': '75',
'name': 'SABIO-RK Reaction',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/sabiork.reaction/'},
'SCOP': {'data_entry': 'http://scop.mrc-lmb.cam.ac.uk/scop/search.cgi?sunid=$id',
'example': '47419',
'name': 'SCOP',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/scop/'},
'SGD': {'data_entry': 'http://www.yeastgenome.org/cgi-bin/locus.fpl?dbid=$id',
'example': 'S000028457',
'name': 'SGD',
'pattern': '^S\\d+$',
'url': 'http://identifiers.org/sgd/'},
'SMART': {'data_entry': 'http://smart.embl-heidelberg.de/smart/do_annotation.pl?DOMAIN=$id',
'example': 'SM00015',
'name': 'SMART',
'pattern': '^SM\\d{5}$',
'url': 'http://identifiers.org/smart/'},
'SNOMED CT': {'data_entry': 'http://vtsl.vetmed.vt.edu/TerminologyMgt/Browser/ISA.cfm?SCT_ConceptID=$id',
'example': '284196006',
'name': 'SNOMED CT',
'pattern': '^(\\w+)?\\d+$" restricted="true',
'url': 'http://identifiers.org/snomedct/'},
'SPIKE Map': {'data_entry': 'http://www.cs.tau.ac.il/~spike/maps/$id.html',
'example': 'spike00001',
'name': 'SPIKE Map',
'pattern': '^spike\\d{5}$',
'url': 'http://identifiers.org/spike.map/'},
'SPRINT': {'data_entry': 'http://www.bioinf.manchester.ac.uk/cgi-bin/dbbrowser/sprint/searchprintss.cgi?prints_accn=$id&display_opts=Prints&category=None&queryform=false&regexpr=off',
'example': 'PR00001',
'name': 'SPRINT',
'pattern': '^PR\\d{5}$',
'url': 'http://identifiers.org/sprint/'},
'STAP': {'data_entry': 'http://psb.kobic.re.kr/STAP/refinement/result.php?search=$id',
'example': '1a24',
'name': 'STAP',
'pattern': '^[0-9][A-Za-z0-9]{3}$',
'url': 'http://identifiers.org/stap/'},
'STITCH': {'data_entry': 'http://stitch.embl.de/interactions/$id',
'example': 'ICXJVZHDZFXYQC',
'name': 'STITCH',
'pattern': '^\\w{14}$" restricted="true',
'url': 'http://identifiers.org/stitch/'},
'STRING': {'data_entry': 'http://string.embl.de/interactions/$id',
'example': 'P53350',
'name': 'STRING',
'pattern': '^([A-N,R-Z][0-9][A-Z][A-Z, 0-9][A-Z, 0-9][0-9])|([O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])|([0-9][A-Za-z0-9]{3})$" restricted="true',
'url': 'http://identifiers.org/string/'},
'SUPFAM': {'data_entry': 'http://supfam.org/SUPERFAMILY/cgi-bin/scop.cgi?ipid=$id',
'example': 'SSF57615',
'name': 'SUPFAM',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/supfam/'},
'SWISS-MODEL': {'data_entry': 'http://swissmodel.expasy.org/repository/smr.php?sptr_ac=$id',
'example': 'P23298',
'name': 'SWISS-MODEL',
'pattern': '^\\w+$" restricted="true',
'url': 'http://identifiers.org/swiss-model/'},
'Saccharomyces genome database pathways': {'data_entry': 'http://pathway.yeastgenome.org/YEAST/new-image?type=PATHWAY&object=$id',
'example': 'PWY3O-214',
'name': 'Saccharomyces genome database pathways',
'pattern': '^PWY\\w{2}\\-\\d{3}$',
'url': 'http://identifiers.org/sgd.pathways/'},
'ScerTF': {'data_entry': 'http://stormo.wustl.edu/ScerTF/details/$id/',
'example': 'RSC3',
'name': 'ScerTF',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/scretf/'},
'Science Signaling Pathway': {'data_entry': 'http://stke.sciencemag.org/cgi/cm/stkecm;$id',
'example': 'CMP_18019',
'name': 'Science Signaling Pathway',
'pattern': '^CMP_\\d+$" restricted="true',
'url': 'http://identifiers.org/sciencesignaling.path/'},
'Science Signaling Pathway-Dependent Component': {'data_entry': 'http://stke.sciencemag.org/cgi/cm/stkecm;$id',
'example': 'CMN_15494',
'name': 'Science Signaling Pathway-Dependent Component',
'pattern': '^CMN_\\d+$" restricted="true',
'url': 'http://identifiers.org/sciencesignaling.pdc/'},
'Science Signaling Pathway-Independent Component': {'data_entry': 'http://stke.sciencemag.org/cgi/cm/stkecm;$id',
'example': 'CMC_15493',
'name': 'Science Signaling Pathway-Independent Component',
'pattern': '^CMC_\\d+$" restricted="true',
'url': 'http://identifiers.org/sciencesignaling.pic/'},
'Sequence Ontology': {'data_entry': 'http://www.sequenceontology.org/miso/current_release/term/$id',
'example': 'SO:0000704',
'name': 'Sequence Ontology',
'pattern': '^SO:\\d{7}$',
'url': 'http://identifiers.org/obo.so/'},
'Sequence Read Archive': {'data_entry': 'http://www.ncbi.nlm.nih.gov/sra/$id?&report=full',
'example': 'SRX000007',
'name': 'Sequence Read Archive',
'pattern': '^[SED]R\\w\\d{6}',
'url': 'http://identifiers.org/insdc.sra/'},
'Signaling Gateway': {'data_entry': 'http://www.signaling-gateway.org/molecule/query?afcsid=$id',
'example': 'A001094',
'name': 'Signaling Gateway',
'pattern': 'A\\d{6}$',
'url': 'http://identifiers.org/signaling-gateway/'},
'SitEx': {'data_entry': 'http://www-bionet.sscc.ru/sitex/index.php?siteid=$id',
'example': '1000',
'name': 'SitEx',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/sitex/'},
'Small Molecule Pathway Database': {'data_entry': 'http://pathman.smpdb.ca/pathways/$id/pathway',
'example': 'SMP00001',
'name': 'Small Molecule Pathway Database',
'pattern': '^SMP\\d{5}$',
'url': 'http://identifiers.org/smpdb/'},
'Sol Genomics Network': {'data_entry': 'http://solgenomics.net/phenome/locus_display.pl?locus_id=$id',
'example': '0001',
'name': 'Sol Genomics Network',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/sgn/'},
'SoyBase': {'data_entry': 'http://soybeanbreederstoolbox.org/search/search_results.php?category=SNP&search_term=$id',
'example': 'BARC-013845-01256',
'name': 'SoyBase',
'pattern': '^\\w+(\\-)?\\w+(\\-)?\\w+$',
'url': 'http://identifiers.org/soybase/'},
'Spectral Database for Organic Compounds': {'data_entry': 'http://riodb01.ibase.aist.go.jp/sdbs/cgi-bin/cre_frame_disp.cgi?sdbsno=$id',
'example': '4544',
'name': 'Spectral Database for Organic Compounds',
'pattern': '\\d+$" restricted="true',
'url': 'http://identifiers.org/sdbs/'},
'SubstrateDB': {'data_entry': 'http://substrate.burnham.org/protein/annotation/$id/html',
'example': '1915',
'name': 'SubstrateDB',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/pmap.substratedb/'},
'SubtiWiki': {'data_entry': 'http://www.subtiwiki.uni-goettingen.de/wiki/index.php/$id',
'example': 'BSU29180',
'name': 'SubtiWiki',
'pattern': '^BSU\\d{5}$',
'url': 'http://identifiers.org/subtiwiki/'},
'Systems Biology Ontology': {'data_entry': 'http://www.ebi.ac.uk/sbo/main/$id',
'example': 'SBO:0000262',
'name': 'Systems Biology Ontology',
'pattern': '^SBO:\\d{7}$',
'url': 'http://identifiers.org/biomodels.sbo/'},
'T3DB': {'data_entry': 'http://www.t3db.org/toxins/$id',
'example': 'T3D0001',
'name': 'T3DB',
'pattern': '^T3D\\d+$',
'url': 'http://identifiers.org/t3db/'},
'TAIR Gene': {'data_entry': 'http://arabidopsis.org/servlets/TairObject?accession=$id',
'example': 'Gene:2200934',
'name': 'TAIR Gene',
'pattern': '^Gene:\\d{7}$',
'url': 'http://identifiers.org/tair.gene/'},
'TAIR Locus': {'data_entry': 'http://arabidopsis.org/servlets/TairObject?type=locus&name=$id',
'example': 'AT1G01030',
'name': 'TAIR Locus',
'pattern': '^AT[1-5]G\\d{5}$',
'url': 'http://identifiers.org/tair.locus/'},
'TAIR Protein': {'data_entry': 'http://arabidopsis.org/servlets/TairObject?accession=$id',
'example': 'AASequence:1009107926',
'name': 'TAIR Protein',
'pattern': '^AASequence:\\d{10}$',
'url': 'http://identifiers.org/tair.protein/'},
'TEDDY': {'data_entry': 'http://bioportal.bioontology.org/ontologies/1407?p=terms&conceptid=$id',
'example': 'TEDDY_0000066',
'name': 'TEDDY',
'pattern': '^TEDDY_\\d{7}$',
'url': 'http://identifiers.org/biomodels.teddy/'},
'TIGRFAMS': {'data_entry': 'http://www.jcvi.org/cgi-bin/tigrfams/HmmReportPage.cgi?acc=$id',
'example': 'TIGR00010',
'name': 'TIGRFAMS',
'pattern': '^TIGR\\d+$',
'url': 'http://identifiers.org/tigrfam/'},
'TTD Drug': {'data_entry': 'http://bidd.nus.edu.sg/group/cjttd/ZFTTDDRUG.asp?ID=$id',
'example': 'DAP000773',
'name': 'TTD Drug',
'pattern': '^DAP\\d+$',
'url': 'http://identifiers.org/ttd.drug/'},
'TTD Target': {'data_entry': 'http://bidd.nus.edu.sg/group/cjttd/ZFTTDDetail.asp?ID=$id',
'example': 'TTDS00056',
'name': 'TTD Target',
'pattern': '^TTDS\\d+$',
'url': 'http://identifiers.org/ttd.target/'},
'TarBase': {'data_entry': 'http://diana.cslab.ece.ntua.gr/DianaToolsNew/index.php?r=tarbase/index&mirnas=$id',
'example': 'hsa-let-7',
'name': 'TarBase',
'pattern': '^\\w+\\-\\w+\\-\\w+',
'url': 'http://identifiers.org/tarbase/'},
'Taxonomy': {'data_entry': 'http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=$id',
'example': '9606',
'name': 'Taxonomy',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/taxonomy/'},
'Tetrahymena Genome Database': {'data_entry': 'http://ciliate.org/index.php/feature/details/$id',
'example': 'TTHERM_00648910',
'name': 'Tetrahymena Genome Database',
'pattern': '^TTHERM\\_\\d+$',
'url': 'http://identifiers.org/tgd/'},
'Tissue List': {'data_entry': 'http://www.uniprot.org/tissues/$id',
'example': 'TS-0285',
'name': 'Tissue List',
'pattern': '^TS-\\d{4}$',
'url': 'http://identifiers.org/tissuelist/'},
'TopFind': {'data_entry': 'http://clipserve.clip.ubc.ca/topfind/proteins/$id',
'example': 'Q9UKQ2',
'name': 'TopFind',
'pattern': '^([A-N,R-Z][0-9][A-Z][A-Z, 0-9][A-Z, 0-9][0-9])|([O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])$',
'url': 'http://identifiers.org/topfind/'},
'ToxoDB': {'data_entry': 'http://toxodb.org/toxo/showRecord.do?name=GeneRecordClasses.GeneRecordClass&source_id=$id',
'example': 'TGME49_053730',
'name': 'ToxoDB',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/toxoplasma/'},
'Transport Classification Database': {'data_entry': 'http://www.tcdb.org/search/result.php?tc=$id',
'example': '5.A.1.1.1',
'name': 'Transport Classification Database',
'pattern': '^\\d+\\.[A-Z]\\.\\d+\\.\\d+\\.\\d+$',
'url': 'http://identifiers.org/tcdb/'},
'Tree of Life': {'data_entry': 'http://tolweb.org/$id',
'example': '98034',
'name': 'Tree of Life',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/tol/'},
'TreeBASE': {'data_entry': 'http://purl.org/phylo/treebase/phylows/study/$id?format=html',
'example': 'TB2:S1000',
'name': 'TreeBASE',
'pattern': '^TB[1,2]?:[A-Z][a-z]?\\d+$',
'url': 'http://identifiers.org/treebase/'},
'TreeFam': {'data_entry': 'http://www.treefam.org/cgi-bin/TFinfo.pl?ac=$id',
'example': 'TF101014',
'name': 'TreeFam',
'pattern': '^\\w{1,2}\\d+$',
'url': 'http://identifiers.org/treefam/'},
'TriTrypDB': {'data_entry': 'http://tritrypdb.org/tritrypdb/showRecord.do?name=GeneRecordClasses.GeneRecordClass&source_id=$id',
'example': 'Tb927.8.620',
'name': 'TriTrypDB',
'pattern': '^\\w+(\\.)?\\w+(\\.)?\\w+',
'url': 'http://identifiers.org/tritrypdb/'},
'TrichDB': {'data_entry': 'http://trichdb.org/trichdb/showRecord.do?name=GeneRecordClasses.GeneRecordClass&source_id=$id',
'example': 'TVAG_386080',
'name': 'TrichDB',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/trichdb/'},
'UM-BBD Biotransformation Rule': {'data_entry': 'http://www.umbbd.ethz.ch/servlets/rule.jsp?rule=$id',
'example': 'bt0001',
'name': 'UM-BBD Biotransformation Rule',
'pattern': '^bt\\d+$',
'url': 'http://identifiers.org/umbbd.rule/'},
'UM-BBD Compound': {'data_entry': 'http://umbbd.ethz.ch/servlets/pageservlet?ptype=c&compID=$id',
'example': 'c0001',
'name': 'UM-BBD Compound',
'pattern': '^c\\d+$',
'url': 'http://identifiers.org/umbbd.compound/'},
'UM-BBD Enzyme': {'data_entry': 'http://umbbd.ethz.ch/servlets/pageservlet?ptype=ep&enzymeID=$id',
'example': 'e0333',
'name': 'UM-BBD Enzyme',
'pattern': '^e\\d+$',
'url': 'http://identifiers.org/umbbd.enzyme/'},
'UM-BBD Pathway': {'data_entry': 'http://umbbd.ethz.ch/servlets/pageservlet?ptype=p&pathway_abbr=$id',
'example': 'ala',
'name': 'UM-BBD Pathway',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/umbbd.pathway/'},
'UM-BBD Reaction': {'data_entry': 'http://umbbd.ethz.ch/servlets/pageservlet?ptype=r&reacID=$id',
'example': 'r0001',
'name': 'UM-BBD Reaction',
'pattern': '^r\\d+$',
'url': 'http://identifiers.org/umbbd.reaction/'},
'UniGene': {'data_entry': 'http://www.ncbi.nlm.nih.gov/unigene?term=$id',
'example': '4900',
'name': 'UniGene',
'pattern': '^\\d+$" restricted="true',
'url': 'http://identifiers.org/unigene/'},
'UniParc': {'data_entry': 'http://www.ebi.ac.uk/cgi-bin/dbfetch?db=uniparc&id=$id',
'example': 'UPI000000000A',
'name': 'UniParc',
'pattern': '^UPI[A-F0-9]{10}$',
'url': 'http://identifiers.org/uniparc/'},
'UniProt Isoform': {'data_entry': 'http://www.uniprot.org/uniprot/$id',
'example': 'Q5BJF6-3',
'name': 'UniProt Isoform',
'pattern': '^([A-N,R-Z][0-9][A-Z][A-Z, 0-9][A-Z, 0-9][0-9])|([O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])(\\-\\d+)$" restricted="true',
'url': 'http://identifiers.org/uniprot.isoform/'},
'UniProt Knowledgebase': {'data_entry': 'http://www.uniprot.org/uniprot/$id',
'example': 'P62158',
'name': 'UniProt Knowledgebase',
'pattern': '^([A-N,R-Z][0-9][A-Z][A-Z, 0-9][A-Z, 0-9][0-9])|([O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])(\\.\\d+)?$',
'url': 'http://identifiers.org/uniprot/'},
'UniSTS': {'data_entry': 'http://www.ncbi.nlm.nih.gov/genome/sts/sts.cgi?uid=$id',
'example': '456789',
'name': 'UniSTS',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/unists/'},
'Unipathway': {'data_entry': 'http://www.grenoble.prabi.fr/obiwarehouse/unipathway/upa?upid=$id',
'example': 'UPA00206',
'name': 'Unipathway',
'pattern': '^UPA\\d{5}$',
'url': 'http://identifiers.org/unipathway/'},
'Unit Ontology': {'data_entry': 'http://www.ebi.ac.uk/ontology-lookup/?termId=$id',
'example': 'UO:0000080',
'name': 'Unit Ontology',
'pattern': '^UO:\\d{7}?',
'url': 'http://identifiers.org/obo.unit/'},
'Unite': {'data_entry': 'http://unite.ut.ee/bl_forw.php?nimi=$id',
'example': 'UDB000691',
'name': 'Unite',
'pattern': '^UDB\\d{6}$',
'url': 'http://identifiers.org/unite/'},
'VIRsiRNA': {'data_entry': 'http://crdd.osdd.net/servers/virsirnadb/record.php?details=$id',
'example': 'virsi1909',
'name': 'VIRsiRNA',
'pattern': '^virsi\\d+$',
'url': 'http://identifiers.org/virsirna/'},
'VariO': {'data_entry': 'http://www.variationontology.org/cgi-bin/amivario/term-details.cgi?term=$id',
'example': 'VariO:0294',
'name': 'VariO',
'pattern': '^VariO:\\d+$',
'url': 'http://identifiers.org/vario/'},
'Vbase2': {'data_entry': 'http://www.vbase2.org/vgene.php?id=$id',
'example': 'humIGHV025',
'name': 'Vbase2',
'pattern': '^\\w+$" restricted="true',
'url': 'http://identifiers.org/vbase2/'},
'VectorBase': {'data_entry': 'http://classic.vectorbase.org/Search/Keyword/?offset=0&term=$id&domain=genome&category=all_organisms',
'example': 'ISCW007415',
'name': 'VectorBase',
'pattern': '^\\D{4}\\d{6}(\\-\\D{2})?$',
'url': 'http://identifiers.org/vectorbase/'},
'ViPR Strain': {'data_entry': 'http://www.viprbrc.org/brc/viprStrainDetails.do?strainName=$id&decorator=arena',
'example': 'BeAn 70563',
'name': 'ViPR Strain',
'pattern': '^[A-Za-z 0-9]+$',
'url': 'http://identifiers.org/vipr/'},
'WikiPathways': {'data_entry': 'http://www.wikipathways.org/instance/$id',
'example': 'WP100',
'name': 'WikiPathways',
'pattern': 'WP\\d{1,5}(\\_r\\d+)?$',
'url': 'http://identifiers.org/wikipathways/'},
'Wikipedia (En)': {'data_entry': 'http://en.wikipedia.org/wiki/$id',
'example': 'SM_UB-81',
'name': 'Wikipedia (En)',
'pattern': '^[A-Za-z0-9_]+$" restricted="true',
'url': 'http://identifiers.org/wikipedia.en/'},
'Worfdb': {'data_entry': 'http://worfdb.dfci.harvard.edu/index.php?search_type=name&page=showresultrc&race_query=$id',
'example': 'T01B6.1',
'name': 'Worfdb',
'pattern': '^\\w+(\\.\\d+)?',
'url': 'http://identifiers.org/worfdb/'},
'WormBase': {'data_entry': 'http://www.wormbase.org/db/gene/gene?name=$id;class=Gene',
'example': 'WBGene00000001',
'name': 'WormBase',
'pattern': '^WBGene\\d{8}$',
'url': 'http://identifiers.org/wormbase/'},
'Wormpep': {'data_entry': 'http://www.wormbase.org/db/seq/protein?name=$id',
'example': 'CE28239',
'name': 'Wormpep',
'pattern': '^CE\\d{5}$',
'url': 'http://identifiers.org/wormpep/'},
'Xenbase': {'data_entry': 'http://www.xenbase.org/gene/showgene.do?method=displayGeneSummary&geneId=$id',
'example': '922462',
'name': 'Xenbase',
'pattern': '^(XB-GENE-)?\\d+$',
'url': 'http://identifiers.org/xenbase/'},
'YeTFasCo': {'data_entry': 'http://yetfasco.ccbr.utoronto.ca/showPFM.php?mot=$id',
'example': 'YOR172W_571.0',
'name': 'YeTFasCo',
'pattern': '^\\w+\\_\\d+(\\.\\d+)?$',
'url': 'http://identifiers.org/yetfasco/'},
'ZFIN Expression': {'data_entry': 'http://zfin.org/action/genotype/show_all_expression?genoID=$id',
'example': 'ZDB-GENO-980202-899',
'name': 'ZFIN Expression',
'pattern': '^ZDB\\-GEN0\\-\\d+\\-\\d+$',
'url': 'http://identifiers.org/zfin.expression/'},
'ZFIN Gene': {'data_entry': 'http://zfin.org/action/marker/view/$id',
'example': 'ZDB-GENE-041118-11',
'name': 'ZFIN Gene',
'pattern': 'ZDB\\-GENE\\-\\d+\\-\\d+',
'url': 'http://identifiers.org/zfin/'},
'ZFIN Phenotype': {'data_entry': 'http://zfin.org/action/genotype/show_all_phenotype?zdbID=$id',
'example': 'ZDB-GENO-980202-899',
'name': 'ZFIN Phenotype',
'pattern': '^ZDB\\-GEN0\\-\\d+\\-\\d+$',
'url': 'http://identifiers.org/zfin.phenotype/'},
'arXiv': {'data_entry': 'http://arxiv.org/abs/$id',
'example': '0807.4956v1',
'name': 'arXiv',
'pattern': '^(\\w+(\\-\\w+)?(\\.\\w+)?/)?\\d{4,7}(\\.\\d{4}(v\\d+)?)?$',
'url': 'http://identifiers.org/arxiv/'},
'dbEST': {'data_entry': 'http://www.ncbi.nlm.nih.gov/nucest/$id',
'example': 'BP100000',
'name': 'dbEST',
'pattern': '^BP\\d+(\\.\\d+)?$',
'url': 'http://identifiers.org/dbest/'},
'dbProbe': {'data_entry': 'http://www.ncbi.nlm.nih.gov/projects/genome/probe/reports/probereport.cgi?uid=$id',
'example': '1000000',
'name': 'dbProbe',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/dbprobe/'},
'dbSNP': {'data_entry': 'http://www.ncbi.nlm.nih.gov/projects/SNP/snp_ref.cgi?rs=$id',
'example': '121909098',
'name': 'dbSNP',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/dbsnp/'},
'eggNOG': {'data_entry': 'http://eggnog.embl.de/version_3.0/cgi/search.py?search_term_0=$id',
'example': 'veNOG12876',
'name': 'eggNOG',
'pattern': '^\\w+$',
'url': 'http://identifiers.org/eggnog/'},
'iRefWeb': {'data_entry': 'http://wodaklab.org/iRefWeb/interaction/show/$id',
'example': '617102',
'name': 'iRefWeb',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/irefweb/'},
'miRBase Sequence': {'data_entry': 'http://www.mirbase.org/cgi-bin/mirna_entry.pl?acc=$id',
'example': 'MI0000001',
'name': 'miRBase Sequence',
'pattern': 'MI\\d{7}',
'url': 'http://identifiers.org/mirbase/'},
'miRBase mature sequence': {'data_entry': 'http://www.mirbase.org/cgi-bin/mature.pl?mature_acc=$id',
'example': 'MIMAT0000001',
'name': 'miRBase mature sequence',
'pattern': 'MIMAT\\d{7}',
'url': 'http://identifiers.org/mirbase.mature/'},
'miRNEST': {'data_entry': 'http://lemur.amu.edu.pl/share/php/mirnest/search.php?search_term=$id',
'example': 'MNEST029358',
'name': 'miRNEST',
'pattern': '^MNEST\\d+$',
'url': 'http://identifiers.org/mirnest/'},
'mirEX': {'data_entry': 'http://comgen.pl/mirex/?page=results/record&name=$id&web_temp=1683440&exref=pp2a&limit=yes',
'example': '165a',
'name': 'mirEX',
'pattern': '^\\d+(\\w+)?$',
'url': 'http://identifiers.org/mirex/'},
'nextProt': {'data_entry': 'http://www.nextprot.org/db/entry/$id',
'example': 'NX_O00165',
'name': 'nextProt',
'pattern': '^NX_\\w+',
'url': 'http://identifiers.org/nextprot/'},
'uBio NameBank': {'data_entry': 'http://www.ubio.org/browser/details.php?namebankID=$id',
'example': '2555646',
'name': 'uBio NameBank',
'pattern': '^\\d+$',
'url': 'http://identifiers.org/ubio.namebank/'}}
|
'''
The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the number 600851475143?
'''
def largest_prime_factor(n):
f = 2
while f**2 <= n:
while n % f == 0:
n //= f
f += 1
return max(f-1, n)
print(largest_prime_factor(600851475143)) |
def selectionSort(alist):
for fillslot in range (len(alist)-1, 0, -1):
positionofMax = 0;
for location in range(1,fillslot+1):
if alist[location] > alist[positionofMax]:
positionofMax = location
temp = alist[fillslot]
alist[fillslot] = alist[positionofMax]
alist[positionofMax] = temp
a = [54,26,93,17,77,31,44,55,20]
selectionSort(a)
print (a)
|
#!/usr/bin/env python
a = 1000000000
for i in xrange(1000000):
a += 1e-6
a -= 1000000000
print(a)
|
# -*- coding: utf-8 -*-
"""Top-level package for Creating the Docs."""
__author__ = """Barry J. Whiteside"""
__email__ = '[email protected]'
__version__ = '0.1.0'
|
class EnviadorDeSpam():
def __init__(self, sessao, enviador):
self.sessao = sessao
self.enviador = enviador
def enviar_emails(self, remetente, assunto, corpo):
for usuario in self.sessao.listar():
self.enviador.enviar(
remetente,
usuario.email,
assunto,
corpo
)
|
"""A helper class for pygame colors."""
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
GRAY = (80, 80, 80)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
YELLOW = (255, 255, 0)
ORANGE = (255, 165, 0)
|
class DDAE_Hyperparams:
drop_rate = 0.5
n_units = 1024
activation = 'lrelu'
final_act = 'linear'
f_bin = 257
class CBHG_Hyperparams:
#### Modules ####
drop_rate = 0.0
normalization_mode = 'layer_norm'
activation = 'lrelu'
final_act = 'linear'
f_bin = 257
## CBHG encoder
banks_filter = 64
n_banks = 8
n_resblocks = 3
resblocks_filter = 512
down_sample = [512]
n_highway = 4
gru_size = 256
class UNET_Hyperparams:
drop_rate = 0.0
normalization_mode = 'batch_norm'
activation = 'lrelu'
final_act = 'linear'
f_bin = 257
enc_layers = [32,64,64,128,128,256,256,512,512,1024]
dec_layers = [1024,512,512,256,256,128,128,64,64,32]
class Hyperparams:
is_variable_length = False
#### Signal Processing ####
n_fft = 512
hop_length = 256
n_mels = 80 # Number of Mel banks to generate
f_bin = n_fft//2 + 1
ppg_dim = 96
feature_type = 'logmag' # logmag lps
nfeature_mode = 'None' # mean_std minmax
cfeature_mode = 'None' # mean_std minmax
# num_layers = [1024,512,256,128,256,512] # bigCNN
num_layers = [2048,1024,512,256,128,256,512] # bigCNN2
normalization_mode = 'None'
activation = 'lrelu'
final_act = 'relu'
n_units = 1024
pretrain = True
pretrain_path = "/mnt/Data/user_vol_2/user_neillu/DNS_Challenge_timit/models/20200516_timit_broad_confusion_triphone_newts/model-1000000"
SAVEITER = 20000
# is_trimming = True
# sr = 16000 # Sample rate.
# n_fft = 1024 # fft points (samples)
# frame_shift = 0.0125 # seconds
# frame_length = 0.05 # seconds
# hop_length = int(sr*frame_shift) # samples.
# win_length = int(sr*frame_length) # samples.
# power = 1.2 # Exponent for amplifying the predicted magnitude
# n_iter = 200 # Number of inversion iterations
# preemphasis = .97 # or None
max_db = 100
ref_db = 20
|
SIZE_BOARD = 10
# Tipo de navios na forma "tipo": tamanho
TYPES_OF_SHIPS = {
"1": 5,
"2": 4,
"3": 3,
"4": 2
} |
x = input("input a letter : ")
if x == "a" or x == "i" or x == "u" or x == "e" or x == "o":
print("This is a vowel!")
elif x == "y":
print("Sometimes y is a vowel and sometimes y is a consonant")
else:
print("This is a consonant!")
|
class Solution:
def findMaxConsecutiveOnes(self, nums: List[int]) -> int:
max_count = 0
count = 0
for i in nums:
if i == 1:
count += 1
else:
count = 0
max_count = max(max_count, count)
return max_count
|
# This file declares all the constants for used in this app
MAIN_URL = 'https://api.github.com/repos/'
ONE_DAY = 1
|
cor_do_alien = 'vermelho'
if cor_do_alien == 'verde':
pontos = 5
elif cor_do_alien == 'amarelo':
pontos = 10
elif cor_do_alien == 'vermelho':
pontos = 15
print(f'Você acabou de ganhar {pontos} pontos!')
|
# The guess API is already defined for you.
# @param num, your guess
# @return -1 if my number is lower, 1 if my number is higher, otherwise return 0
# def guess(num: int) -> int:
class Solution:
def guessNumber(self, n: int) -> int:
l, h = 1, n
while l <= h:
m = l + (h - l) // 2
if guess(m) < 0:
h = m - 1
elif guess(m) > 0:
l = m + 1
else:
return m
return -1
|
class Dosya():
def __init__(self,dosya_ismi):
with open(dosya_ismi,"r",encoding = "utf-8") as file:
dosya_icerigi = file.read()
kelimeler = dosya_icerigi.split()
self.sade_kelimeler = list()
for kelime in kelimeler:
kelime = kelime.strip()
kelime = kelime.strip(".")
kelime = kelime.strip("\n")
self.sade_kelimeler.append(kelime)
def kelime_bul(self,aranan):
konumlar = list()
say = 1
for kelime in self.sade_kelimeler:
if (kelime == aranan ):
konumlar.append(say)
say += 1
if (len(konumlar) == 0):
print("Dosyada böyle bir kelime bulunmuyor...")
else:
print("{} kelimesi dosyada şuralarda geçiyor. \n{}".format(aranan,konumlar))
def kelime_histogramı(self):
kelime_frekansı = dict()
kelime_kümesi = set()
for kelime in self.sade_kelimeler:
kelime_kümesi.add(kelime)
if (kelime in kelime_frekansı):
kelime_frekansı[kelime] += 1
else:
kelime_frekansı[kelime] = 1
print("Kelimelerin Frekansı........................")
for i, j in kelime_frekansı.items():
print("{} kelimesi metinde {} defa geçiyor.".format(i, j))
print("Tüm Kelimeler")
for i in kelime_kümesi:
print(i)
print("*************************************")
dosya = Dosya("dosya.txt")
print("""****************
Dosya İşlemleri
1. Tüm kelime frekansını öğren
2. Kelime Ara
Çıkmak için 'q' ya basın.
""")
while True:
işlem = input("İşlem:")
if (işlem == "q"):
print("Programdan Çıkılıyor....")
break
elif (işlem == "1"):
dosya.kelime_histogramı()
elif (işlem == "2"):
kelime = input("Hangi kelimeyi arıyorsunuz ?")
dosya.kelime_bul(kelime)
else:
print("Geçersiz İşlem...")
|
def make_shirt(text, size = 'large'):
print('You can buy a ' + size + ' size t-shirt with written ' + text + ' written on it.')
make_shirt(text = 'yepa')
|
metros = float(input('Digite uma distância em metros: '))
print('A medida de {}m corresponde a '.format(metros))
print('{}km'.format(metros * .001))
print('{}hm'.format(metros * .01))
print('{:.1f}dam'.format(metros * .1))
print('{:.0f}dm'.format(metros * 10))
print('{:.0f}cm'.format(metros * 100))
print('{:.0f}mm'.format(metros * 1000))
|
###########################################################
# This module is used to centralise messages
# used by the self service bot.
#
###########################################################
class ErrorMessages:
BOT_ABORT_ERROR = "Aborting Self Service Bot"
BOT_INIT_ERROR = "ERROR reported during initialisation of SelfServiceBot"
DYNAMODB_SCAN_ERROR = "ERROR reported by DynamoDB"
GENERAL_ERROR = "The bot encountered an error."
MISSING_PARAM_ERROR = "Required parameter not provided"
MISSING_SKILLS_OBJ_ERROR = "Sills object not provided"
|
class Solution:
def maxChunksToSorted(self, arr):
intervals = {}
for i in range(len(arr)):
if i < arr[i]:
minVal, maxVal = i, arr[i]
else:
minVal, maxVal = arr[i], i
if minVal in intervals:
if maxVal > intervals[ minVal ]:
intervals[ minVal ] = maxVal
else:
intervals[ minVal ] = maxVal
sortedKeys = sorted(intervals.keys())
if len(sortedKeys) == 1:
return 1
else:
bgnNum = sortedKeys[0]
endNum = intervals[ sortedKeys[0] ]
outCount = 0
for i in range(1, len(sortedKeys)):
if endNum < sortedKeys[i]:
endNum = intervals[ sortedKeys[i] ]
outCount += 1
else:
endNum = max(endNum, intervals[ sortedKeys[i] ])
outCount += 1
return outCount
|
x = int(input())
if x%2 == 0:
print("É par!")
else:
print("É ímpar!")
|
"""
Desempacotamento de listas em Python
"""
lista = [1, 2, 3, 4, 5, 6, 7, 8, 9]
v1, v2, v3, v4, v5, *lista_2, ultimo = lista
# v1, v2, v3 ... são variaveis baseadas nos índices da lista
# "*" faz a contagem ser ao contrario e previne o erro de ter itens demais para desempacotar
print(v1, v4)
print(lista_2)
|
class Solution:
def maxIncreaseKeepingSkyline(self, grid):
"""
:type grid: List[List[int]]
:rtype: int
"""
r=len(grid)
c=len(grid[0])
matrix=[[101 for j in range(c)] for i in range(r)]
for i in range(r):
m=max(grid[i])
for j in range(c):
matrix[i][j]=min(m,matrix[i][j])
for j in range(c):
m=0
for i in range(r):
m=max(m,grid[i][j])
for i in range(r):
matrix[i][j]=min(m,matrix[i][j])
s=0
for i in range(r):
for j in range(c):
s+=abs(matrix[i][j]-grid[i][j])
return s
|
def bubble_sort(alist):
for i in range(len(alist)-1, 0, -1):
for j in range(i):
if alist[j] > alist[j+1]:
temp = alist[j]
alist[j] = alist[j+1]
alist[j+1] = temp
return alist
list_to_sort = [147, -16, 18, 91, 44, 1, 8, 54, 31, 18]
bubble_sort(list_to_sort)
print(list_to_sort)
|
class MenuItem():
def __init__(self, itemID, itemName, itemPrice):
self.itemID = itemID
self.itemName = itemName
self.itemPrice = itemPrice
self.itemMods = list()
def getItemID(self):
return self.itemID
def setItemID(self, itemID):
self.itemID = self.itemID
def getItemName(self):
return self.itemName
def setItemName(self, name):
self.itemName = self.itemName
def getItemPrice(self):
return self.itemPrice
def setItemPrice(self, itemPrice):
self.itemPrice = itemPrice
def getItemMods(self):
return self.itemMods
def setItemMods(self, index, val):
self.itemMods[index] = val
def __str__(self):
return self.itemName |
example_string = '我是字符串'
example_list = ['我', '是', '列', '表']
example_tuple = ('我', '是', '元', '组')
print('1.取第一个元素 >', example_string[0], example_list[0], example_tuple[0])
print('2.取下标为2的元素(第三个元素)>', example_string[2], example_list[2], example_tuple[2])
print('3.取最后一个元素 >', example_string[-1], example_list[-1], example_tuple[-1])
print('4.取倒数第二个元素 >', example_string[-2], example_list[-2], example_tuple[-2])
print('5.切片0:1 >', example_string[0:1], example_list[0:1], example_tuple[0:1])
print('6.切片0:2 >', example_string[0:2], example_list[0:2], example_tuple[0:2])
print('7.切片2:4 >', example_string[2:4], example_list[2:4], example_tuple[2:4])
print('8.切片从第一个元素直到下标为1的元素 >', example_string[:2], example_list[:2], example_tuple[:2])
print('9.切片从下标为1的元素直到全部 >', example_string[1:], example_list[1:], example_tuple[1:])
print('10.切片去掉最后一个元素 >', example_string[:-1], example_list[:-1], example_tuple[:-1])
print('11.切片去掉最后两个元素 >', example_string[:-2], example_list[:-2], example_tuple[:-2])
print('12.每2个字取一个 >', example_string[::2], example_list[::2], example_tuple[::2])
print('13.将字符串、列表、元组倒序输出 >', example_string[::-1], example_list[::-1], example_tuple[::-1])
# string_1 = '你好'
# string_2 = '世界'
# string_3 = string_1 + string_2
# print(string_3)
#
#
# list_1 = ['abc', 'xyz']
# list_2 = ['哈哈哈哈', '嘿嘿嘿黑']
# list_3 = list_1 + list_2
# print(list_3)
#
# existed_list = [1, 2, 3]
# existed_list[1] = '新的值'
# print(existed_list)
#
# list_4 = ['Python', '爬虫']
# print(list_4)
# list_4.append('一')
# print(list_4)
# list_4.append('酷')
# print(list_4) |
def find_highest_number(numbers):
highest_number = 0
for num in numbers:
if num > highest_number:
highest_number = num
return highest_number
|
# [17CE023] Bhishm Daslaniya
'''
Algorithm!
--> Build a list of tuples such that the string "aaabbc" can be squashed down to [("a", 3), ("b", 2), ("c", 1)]
--> Add to answer all combinations of substrings from these tuples which would represent palindromes which have all same letters
--> traverse this list to specifically find the second case mentioned in probelm
'''
def substrCount(n, s):
l = []
count = 0
current = None
for i in range(n):
if s[i] == current:
count += 1
else:
if current is not None:
l.append((current, count))
current = s[i]
count = 1
l.append((current, count))
# print(l)
ans = 0
for i in l:
ans += (i[1] * (i[1] + 1)) // 2
for i in range(1, len(l) - 1):
if l[i - 1][0] == l[i + 1][0] and l[i][1] == 1:
ans += min(l[i - 1][1], l[i + 1][1])
return ans
if __name__ == '__main__':
n = int(input())
s = input()
result = substrCount(n,s)
print(result) |
"""
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum
equals the given sum.
For example:
Given the below binary tree and sum = 22,
5
/ \
4 8
/ / \
11 13 4
/ \ / \
7 2 5 1
return
[
[5,4,11,2],
[5,8,4,5]
]
"""
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def pathSum(self, root, psum):
"""
:type root: TreeNode
:type sum: int
:rtype: List[List[int]]
"""
if root is None:
return []
self.solns = []
self.dfs(root, psum, [])
return self.solns
def dfs(self, root, psum, soln):
if root.left is None and root.right is None:
if psum == root.val:
soln.append(root.val)
self.solns.append(soln)
if root.left:
self.dfs(root.left, psum - root.val, soln + [root.val])
if root.right:
self.dfs(root.right, psum - root.val, soln + [root.val])
|
# Copyright 2019 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
config_type='sweetberry'
revs = [5]
inas = [
('sweetberry', '0x40:3', 'pp975_io', 7.7, 0.100, 'j2', True), # R111
('sweetberry', '0x40:1', 'pp850_prim_core', 7.7, 0.100, 'j2', True), # R164
('sweetberry', '0x40:2', 'pp3300_dsw', 3.3, 0.010, 'j2', True), # R513
('sweetberry', '0x40:0', 'pp3300_a', 7.7, 0.010, 'j2', True), # R144
('sweetberry', '0x41:3', 'pp1800_a', 7.7, 0.100, 'j2', True), # R141
('sweetberry', '0x41:1', 'pp1800_u', 7.7, 0.100, 'j2', True), # R161
('sweetberry', '0x41:2', 'pp1200_vddq', 7.7, 0.100, 'j2', True), # R162
('sweetberry', '0x41:0', 'pp1000_a', 7.7, 0.100, 'j2', True), # R163
('sweetberry', '0x42:3', 'pp3300_dx_wlan', 3.3, 0.010, 'j2', True), # R645
('sweetberry', '0x42:1', 'pp3300_dx_edp', 3.3, 0.010, 'j2', True), # F1
('sweetberry', '0x42:2', 'vbat', 7.7, 0.010, 'j2', True), # R226
('sweetberry', '0x42:0', 'ppvar_vcc', 1.0, 0.002, 'j4', True), # L13
('sweetberry', '0x43:3', 'ppvar_sa', 1.0, 0.005, 'j4', True), # L12
('sweetberry', '0x43:1', 'ppvar_gt', 1.0, 0.002, 'j4', True), # L31
('sweetberry', '0x43:2', 'ppvar_bl', 7.7, 0.050, 'j2', True), # U89
]
|
class A:
def __init__(self):
print("In A __init__")
def feature1(self):
print("Feature 1")
def feature2(self):
print("Feature 2")
# class B(A):
class B:
def __init__(self):
super().__init__()
print("In B __init__")
def feature3(self):
print("Feature 3")
def feature4(self):
print("Feature 4")
class C(A, B):
def __init__(self):
super().__init__()
print("In C __init__")
def feature5(self):
super().feature2()
# a = A()
# a.feature1()
# a.feature2()
""" Output
In A __init__
Feature 1
Feature 2
"""
# b = B()
""" Output
In A __init__ => We've not created __init__ method into B Class.
"""
# b = B()
""" Output
In B __init__ => We've created __init__ method into B Class.
"""
# b = B()
""" Output
In A __init__
In B __init__ => We've created super().__init__() in __init__ method of B Class.
"""
c = C()
c.feature5()
|
"""Conversion tools for Python"""
def dollars2cents(dollars):
"""Convert dollars to cents"""
cents = dollars * 100
return cents
def gallons2liters(gallons):
"""Convert gallons to liters"""
liters = gallons * 3.785
return liters
|
# fastq handling
class fastqIter:
" A simple file iterator that returns 4 lines for fast fastq iteration. "
def __init__(self, handle):
self.inf = handle
def __iter__(self):
return self
def next(self):
lines = {'id': self.inf.readline().strip(),
'seq': self.inf.readline().strip(),
'+': self.inf.readline().strip(),
'qual': self.inf.readline().strip()}
assert(len(lines['seq']) == len(lines['qual']))
if lines['id'] == '' or lines['seq'] == '' or lines['+'] == '' or lines['qual'] == '':
raise StopIteration
else:
return lines
@staticmethod
def parse(handle):
return fastqIter(handle)
def close(self):
self.inf.close()
def writeFastq(handle, fq):
handle.write(fq['id'] + '\n')
handle.write(fq['seq'] + '\n')
handle.write(fq['+'] + '\n')
handle.write(fq['qual'] + '\n')
|
vowels = ['a' , 'o' , 'u' , 'e' , 'i' , 'A' , 'O' , 'U' , 'E' , 'I']
string = input()
result = [s for s in string if s not in vowels]
print(''.join(result)) |
# Given a binary string (ASCII encoded), write a function that returns the equivalent decoded text.
# Every eight bits in the binary string represents one character on the ASCII table.
# Examples:
# csBinaryToASCII("011011000110000101101101011000100110010001100001") -> "lambda"
# 01101100 -> 108 -> "l"
# 01100001 -> 97 -> "a"
# 01101101 -> 109 -> "m"
# 01100010 -> 98 -> "b"
# 01100100 -> 100 -> "d"
# 01100001 -> 97 -> "a"
# csBinaryToASCII("") -> ""
# Notes:
# The input string will always be a valid binary string.
# Characters can be in the range from "00000000" to "11111111" (inclusive).
# In the case of an empty input string, your function should return an empty string.
# [execution time limit] 4 seconds (py3)
# [input] string binary
# [output] string
def csBinaryToASCII(binary):
binary_letters = []
letters = ""
if binary == "":
return ""
for index in range(0, len(binary), 8):
binary_letters.append(binary[index : index + 8])
print(binary_letters)
for string in binary_letters:
binary_int = v = chr(int(string, 2))
print(binary_int)
letters += binary_int
return letters
|
"""
A modern, Python3-compatible, well-documented library for communicating
with a MineCraft server.
"""
__version__ = "0.5.0"
SUPPORTED_MINECRAFT_VERSIONS = {
'1.8': 47,
'1.8.1': 47,
'1.8.2': 47,
'1.8.3': 47,
'1.8.4': 47,
'1.8.5': 47,
'1.8.6': 47,
'1.8.7': 47,
'1.8.8': 47,
'1.8.9': 47,
'1.9': 107,
'1.9.1': 108,
'1.9.2': 109,
'1.9.3': 110,
'1.9.4': 110,
'1.10': 210,
'1.10.1': 210,
'1.10.2': 210,
'16w32a': 301,
'16w32b': 302,
'16w33a': 303,
'16w35a': 304,
'16w36a': 305,
'16w38a': 306,
'16w39a': 307,
'16w39b': 308,
'16w39c': 309,
'16w40a': 310,
'16w41a': 311,
'16w42a': 312,
'16w43a': 313,
'16w44a': 313,
'1.11-pre1': 314,
'1.11': 315,
'16w50a': 316,
'1.11.1': 316,
'1.11.2': 316,
'17w06a': 317,
'17w13a': 318,
'17w13b': 319,
'17w14a': 320,
'17w15a': 321,
'17w16a': 322,
'17w16b': 323,
'17w17a': 324,
'17w17b': 325,
'17w18a': 326,
'17w18b': 327,
'1.12-pre1': 328,
'1.12-pre2': 329,
'1.12-pre3': 330,
'1.12-pre4': 331,
'1.12-pre5': 332,
'1.12-pre6': 333,
'1.12-pre7': 334,
'1.12': 335,
'17w31a': 336,
'1.12.1-pre1': 337,
'1.12.1': 338,
'1.12.2-pre1': 339,
'1.12.2-pre2': 339,
'1.12.2': 340,
'17w43a': 341,
'17w43b': 342,
'17w45a': 343,
'17w45b': 344,
'17w46a': 345,
'17w47a': 346,
'17w47b': 347,
'17w48a': 348,
'17w49a': 349,
'17w49b': 350,
'17w50a': 351,
'18w01a': 352,
'18w02a': 353,
'18w03a': 354,
'18w03b': 355,
'18w05a': 356,
'18w06a': 357,
'18w07a': 358,
'18w07b': 359,
'18w07c': 360,
'18w08a': 361,
'18w08b': 362,
'18w09a': 363,
'18w10a': 364,
'18w10b': 365,
'18w10c': 366,
'18w10d': 367,
'18w11a': 368,
'18w14a': 369,
'18w14b': 370,
'18w15a': 371,
'18w16a': 372,
'18w19a': 373,
'18w19b': 374,
'18w20a': 375,
'18w20b': 376,
'18w20c': 377,
'18w21a': 378,
'18w21b': 379,
'18w22a': 380,
'18w22b': 381,
'18w22c': 382,
'1.13-pre1': 383,
'1.13-pre2': 384,
'1.13-pre3': 385,
'1.13-pre4': 386,
'1.13-pre5': 387,
'1.13-pre6': 388,
'1.13-pre7': 389,
'1.13-pre8': 390,
'1.13-pre9': 391,
'1.13-pre10': 392,
'1.13': 393,
'18w30a': 394,
'18w30b': 395,
'18w31a': 396,
'18w32a': 397,
'18w33a': 398,
'1.13.1-pre1': 399,
'1.13.1-pre2': 400,
'1.13.1': 401,
'1.13.2-pre1': 402,
'1.13.2-pre2': 403,
'1.13.2': 404,
}
SUPPORTED_PROTOCOL_VERSIONS = \
sorted(set(SUPPORTED_MINECRAFT_VERSIONS.values()))
|
# 5/1/2020
# Elliott Gorman
# ITSW 1359
# VINES - STACK ABSTRACT DATA TYPE
class Stack():
def __init__(self):
self.stack = []
#set stack size to -1 so when first object is pushed
# its reference is correct at 0
self.size = -1
def push(self, object):
self.stack.append(object)
self.size += 1
def pop(self):
if (self.isEmpty()):
raise EmptyStackException('The Stack is already Empty.')
else:
removedElement = self.stack.pop(self.size)
self.size -= 1
return removedElement
def peek(self):
if (not self.isEmpty()):
return self.stack[self.size]
def isEmpty(self):
return self.size == -1
def clear(self):
self.stack.clear()
#set size back to -1
self.size = -1
|
# Motor
MOTOR_LEFT_FORWARD = 20
MOTOR_LEFT_BACK = 21
MOTOR_RIGHT_FORWARD = 19
MOTOR_RIGHT_BACK = 26
MOTOR_LEFT_PWM = 16
MOTOR_RIGHT_PWM = 13
# Track Sensors
TRACK_LEFT_1 = 3
TRACK_LEFT_2 = 5
TRACK_RIGHT_1 = 4
TRACK_RIGHT_2 = 18
# Button
BUTTON = 8
BUZZER = 8
# Servos
FAN = 2
SEARCHLIGHT_SERVO = 23
CAMERA_SERVO_H = 11
CAMERA_SERVO_V = 9
# Lights
LED_R = 22
LED_G = 27
LED_B = 24
# UltraSonic Sensor
ULTRASONIC_ECHO = 0
ULTRASONIC_TRIGGER = 1
# Infrared Sensors
INFRARED_LEFT = 12
INFRARED_RIGHT = 17
# Light Sensors
LIGHT_LEFT = 7
LIGHT_RIGHT = 6
|
"""base class for user transforms"""
class UserTransform:
"""base class for user transforms, should express taking a set of k inputs to k outputs independently"""
def __init__(self, treatment):
self.y_aware_ = True
self.treatment_ = treatment
self.incoming_vars_ = []
self.derived_vars_ = []
# noinspection PyPep8Naming
def fit(self, X, y):
"""
sklearn API
:param X: explanatory values
:param y: dependent values
:return: self for method chaining
"""
raise NotImplementedError("base method called")
# noinspection PyPep8Naming
def transform(self, X):
"""
:param X: explanatory values
:return: transformed data
"""
raise NotImplementedError("base method called")
# noinspection PyPep8Naming
def fit_transform(self, X, y):
"""
:param X: explanatory values
:param y: dependent values
:return: transformed data
"""
self.fit(X, y)
return self.transform(X)
def __repr__(self):
return (
"vtreat.transform.UserTransform("
+ "treatment="
+ self.treatment_.__repr__()
+ ") {"
+ "'y_aware_': "
+ str(self.y_aware_)
+ ", "
+ "'treatment_': "
+ str(self.treatment_)
+ ", "
+ "'incoming_vars_': "
+ str(self.incoming_vars_)
+ "}"
)
def __str__(self):
return self.__repr__()
|
# Selection Sort
# Time Complexity: O(n^2)
# A Implementation of a Selection Sort Algorithm Through a Function.
def selection_sort(nums):
# This value of i corresponds to each value that will be sorted.
for i in range(len(nums)):
# We assume that the first item of the unsorted numbers is the smallest
lowest_value_index = i
# This loop iterates over the unsorted items
for j in range(i + 1, len(nums)):
if nums[j] < nums[lowest_value_index]:
lowest_value_index = j
# Swap values of the lowest unsorted element with the first unsorted element
nums[i], nums[lowest_value_index] = nums[lowest_value_index], nums[i]
# Example 1: [12, 8, 3, 20, 11]
# We Prepare a List of Values to Test Our Algorithm.
random_list_of_nums = [12, 8, 3, 20, 11]
selection_sort(random_list_of_nums)
# Expected Result: [3,8,11,12,20]
print(random_list_of_nums)
# Example 2: [9,12,1,4,5,7,8]
random_list_of_nums = [9, 12, 1, 4, 5, 7, 8]
selection_sort(random_list_of_nums)
# Expected Result: [1, 4, 5, 7, 8, 9, 12]
print(random_list_of_nums)
|
input = """
att_val(perGrant,name,nameCG).
att_val(perGrant,name,nameGrant).
att_val(nameCG,lastName,"Grant").
att_val(nameGrant,lastName,"Leach").
acted(perGrant,m12).
involved(P,M) :- acted(P,M).
matchingMovie(q1, m12).
inferred_topic(X5, X1) :- matchingMovie(X5, X4), involved(X3, X4), att_val(X3, name, X2), att_val(X2, lastName, X1).
"""
output = """
att_val(perGrant,name,nameCG).
att_val(perGrant,name,nameGrant).
att_val(nameCG,lastName,"Grant").
att_val(nameGrant,lastName,"Leach").
acted(perGrant,m12).
involved(P,M) :- acted(P,M).
matchingMovie(q1, m12).
inferred_topic(X5, X1) :- matchingMovie(X5, X4), involved(X3, X4), att_val(X3, name, X2), att_val(X2, lastName, X1).
"""
|
"""
File: class_reviews.py
Name:
-------------------------------
At the beginning of this program, the user is asked to input
the class name (either SC001 or SC101).
Attention: your program should be case-insensitive.
If the user input -1 for class name, your program would output
the maximum, minimum, and average among all the inputs.
"""
def main():
c = input("Which class? ")
list_sc001 = []
list_sc101 = []
while c != "-1":
s = input("Score: ")
if c.lower() == "sc001":
list_sc001.append(int(s))
elif c.lower() == "sc101":
list_sc101.append(int(s))
else:
pass
c = input("Which class? ")
if not list_sc001 and not list_sc101:
print("No class scores were entered")
else:
if list_sc001:
print("=============SC001=============")
print("Max (001): %s" % max(list_sc001))
print("Min (001): %s" % min(list_sc001))
print("Avg (001): %s" % round(sum(list_sc001)/len(list_sc001),2))
else:
print("=============SC001=============")
print("No score for SC001")
if list_sc101:
print("=============SC001=============")
print("Max (101): %s" % max(list_sc101))
print("Min (101): %s" % min(list_sc101))
print("Avg (101): %s" % round(sum(list_sc101)/len(list_sc101),2))
else:
print("=============SC001=============")
print("No score for SC101")
##### DO NOT EDIT THE CODE BELOW THIS LINE #####
if __name__ == '__main__':
main()
|
# -*- coding: utf-8 -*-
"""
custom resp-code
"""
class RET(object):
OK = "0"
DBERR = "4001"
DATAEXIST = "4002"
DATAERR = "4003"
INVALIDCODE = "4004"
PARAMERR = "4005"
THIRDERR = "4006"
IOERR = "4007"
TOKENERR = "4008"
REQERR = "4009"
IPERR = "4010"
ABNORMAL = "4011"
PWDERR = "4012"
BALANCEERR = "4013"
SERVERERR = "4500"
UNKOWNERR = "4501"
|
prompt = """
I translate python code into english descriptions. I say what I will do if I were to execute them, precising what tools and function calls I will use.
I flag behaviours that seem weird or dangerous by preceeding them with "DANGER:".
If the code seems to be deceptive or does not do what it says it does, I answer "DECEIT"
===
Q:
from os import listdir
return [listdir('./test')]
A: I am going to list files inside the test directory using os.listdir
===
Q:
import shutil
shutil.rmtree('/')
A: DANGER: I am going to delete all files and folders in your computer using shutil.rmtree
===
Q:
import subprocess, sys
while True:
subprocess.Popen([sys.executable, sys.argv[0]], creationflags=subprocess.CREATE_NEW_CONSOLE)
A: DANGER: I am going to create a new console for myself using subprocess.Popen. hence creating a forkbomb
===
Q:
a = spotify.search("The painful way")
b = search['tracks']['items'][0]
spotify.add_to_queue(b['uri'])
return [b['name'], b['artists'][0]['name']]
A: I will search for The Painful Way on spotify and add it to your queue
===
Q:
def f(n):
if n <= 1:
return 1
else
return n * f(n - 1)
return [f(10)]
A: I will calculate the factorial of 10
===
Q:
def f(n):
if n < 2:
return n
return f(n-1) + f(n-2)
return [f(50)]
A: I will calculate the 50th fibbonacci number
===
Q:
import wmi
w = wmi.WMI(namespace="root\OpenHardwareMonitor")
temperature_infos = w.Sensor()
for sensor in temperature_infos:
if sensor.SensorType==u'Temperature':
return [sensor.Value]
A: I will tell you the temperature of your CPU using OpenHardwareMonitor
===
Q:
import wikipedia
return wikipedia.summary("Paris", sentences=1)
A: I will read you a summary of Paris on Wikipedia
Q:
from kivy.clock import Clock
def f():
window.say("Wake up!")
A: I will do nothing
===
Q:
import math
return [math.cos(-math.pi / 4) + 1j * math.sin(-math.pi / 4)]
A: I will return the complex number e^i*(-pi / 4)
""" |
"""
Estruturas Lógicas: and (e), or (ou), not (não), is (é)
Operadores unários:
- not
Operadores binários:
- and, or, is
"""
ativo = True
logado = True
if ativo and logado:
print('Bem-vindo usuário!')
else:
print('Você precisa ativar sua conta. Por favor, cheque seu e-mail')
|
arguments = ["self", "info", "args"]
minlevel = 3
helpstring = "enable <plugin>"
def main(connection, info, args) :
"""Enables a plugin"""
if args[1] not in ["disable", "enable", "*"] :
if args[1] not in connection.users["channels"][info["channel"]]["enabled"] :
connection.users["channels"][info["channel"]]["enabled"].append(args[1])
connection.users.sync()
connection.ircsend(info["channel"], _("The %(pluginname)s plugin has been enabled in this channel") % dict(pluginname=args[1]))
else : connection.ircsend(info["channel"], _("That plugin is not disabled!"))
elif args[1] in ["enable", "disable"] : connection.ircsend(info["channel"], _("You cannot enable the disable or enable commands!"))
elif args[1] == "*" :
for plugin in connection.plugins["pluginlist"].pluginlist :
if plugin not in ["enable", "disable"] and plugin not in connection.users["channels"][info["channel"]]["enabled"]:
connection.users["channels"][info["channel"]]["enabled"].append(plugin)
connection.users.sync()
connection.ircsend(info["channel"], _("All plugins have been enabled for this channel"))
|
# Solution to problem 7 #
#Student: Niamh O'Leary#
#ID: G00376339#
#Date: 10/03/2019#
#Write a program that takes a positive floating point number as input and outputs an approximation of its square root#
#Note: for the problem please use number 14.5.
num = 14.5
num_sqrt = num ** 0.5 #calulates the square root#
print("The square root of %0.3f is %0.3f"%(num, num_sqrt)) #prints the original number and its square root#
# For method and refernces please see accompying README file in GITHUB repository #
|
'''
The MIT License (MIT)
Copyright (c) 2016 WavyCloud
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
'''
def can_paginate(operation_name=None):
"""
Check if an operation can be paginated.
:type operation_name: string
:param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo').
"""
pass
def create_license_configuration(Name=None, Description=None, LicenseCountingType=None, LicenseCount=None, LicenseCountHardLimit=None, LicenseRules=None, Tags=None, ProductInformationList=None):
"""
Creates a license configuration.
A license configuration is an abstraction of a customer license agreement that can be consumed and enforced by License Manager. Components include specifications for the license type (licensing by instance, socket, CPU, or vCPU), allowed tenancy (shared tenancy, Dedicated Instance, Dedicated Host, or all of these), host affinity (how long a VM must be associated with a host), and the number of licenses purchased and used.
See also: AWS API Documentation
Exceptions
:example: response = client.create_license_configuration(
Name='string',
Description='string',
LicenseCountingType='vCPU'|'Instance'|'Core'|'Socket',
LicenseCount=123,
LicenseCountHardLimit=True|False,
LicenseRules=[
'string',
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
ProductInformationList=[
{
'ResourceType': 'string',
'ProductInformationFilterList': [
{
'ProductInformationFilterName': 'string',
'ProductInformationFilterValue': [
'string',
],
'ProductInformationFilterComparator': 'string'
},
]
},
]
)
:type Name: string
:param Name: [REQUIRED]\nName of the license configuration.\n
:type Description: string
:param Description: Description of the license configuration.
:type LicenseCountingType: string
:param LicenseCountingType: [REQUIRED]\nDimension used to track the license inventory.\n
:type LicenseCount: integer
:param LicenseCount: Number of licenses managed by the license configuration.
:type LicenseCountHardLimit: boolean
:param LicenseCountHardLimit: Indicates whether hard or soft license enforcement is used. Exceeding a hard limit blocks the launch of new instances.
:type LicenseRules: list
:param LicenseRules: License rules. The syntax is #name=value (for example, #allowedTenancy=EC2-DedicatedHost). Available rules vary by dimension.\n\nCores dimension: allowedTenancy | maximumCores | minimumCores\nInstances dimension: allowedTenancy | maximumCores | minimumCores | maximumSockets | minimumSockets | maximumVcpus | minimumVcpus\nSockets dimension: allowedTenancy | maximumSockets | minimumSockets\nvCPUs dimension: allowedTenancy | honorVcpuOptimization | maximumVcpus | minimumVcpus\n\n\n(string) --\n\n
:type Tags: list
:param Tags: Tags to add to the license configuration.\n\n(dict) --Details about a tag for a license configuration.\n\nKey (string) --Tag key.\n\nValue (string) --Tag value.\n\n\n\n\n
:type ProductInformationList: list
:param ProductInformationList: Product information.\n\n(dict) --Describes product information for a license configuration.\n\nResourceType (string) -- [REQUIRED]Resource type. The value is SSM_MANAGED .\n\nProductInformationFilterList (list) -- [REQUIRED]Product information filters. The following filters and logical operators are supported:\n\nApplication Name - The name of the application. Logical operator is EQUALS .\nApplication Publisher - The publisher of the application. Logical operator is EQUALS .\nApplication Version - The version of the application. Logical operator is EQUALS .\nPlatform Name - The name of the platform. Logical operator is EQUALS .\nPlatform Type - The platform type. Logical operator is EQUALS .\nLicense Included - The type of license included. Logical operators are EQUALS and NOT_EQUALS . Possible values are sql-server-enterprise | sql-server-standard | sql-server-web | windows-server-datacenter .\n\n\n(dict) --Describes product information filters.\n\nProductInformationFilterName (string) -- [REQUIRED]Filter name.\n\nProductInformationFilterValue (list) -- [REQUIRED]Filter value.\n\n(string) --\n\n\nProductInformationFilterComparator (string) -- [REQUIRED]Logical operator.\n\n\n\n\n\n\n\n\n
:rtype: dict
ReturnsResponse Syntax
{
'LicenseConfigurationArn': 'string'
}
Response Structure
(dict) --
LicenseConfigurationArn (string) --
Amazon Resource Name (ARN) of the license configuration.
Exceptions
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.ResourceLimitExceededException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
:return: {
'LicenseConfigurationArn': 'string'
}
:returns:
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.ResourceLimitExceededException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
"""
pass
def delete_license_configuration(LicenseConfigurationArn=None):
"""
Deletes the specified license configuration.
You cannot delete a license configuration that is in use.
See also: AWS API Documentation
Exceptions
:example: response = client.delete_license_configuration(
LicenseConfigurationArn='string'
)
:type LicenseConfigurationArn: string
:param LicenseConfigurationArn: [REQUIRED]\nID of the license configuration.\n
:rtype: dict
ReturnsResponse Syntax{}
Response Structure
(dict) --
Exceptions
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
:return: {}
:returns:
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
"""
pass
def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None):
"""
Generate a presigned url given a client, its method, and arguments
:type ClientMethod: string
:param ClientMethod: The client method to presign for
:type Params: dict
:param Params: The parameters normally passed to\nClientMethod.
:type ExpiresIn: int
:param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds)
:type HttpMethod: string
:param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model.
"""
pass
def get_license_configuration(LicenseConfigurationArn=None):
"""
Gets detailed information about the specified license configuration.
See also: AWS API Documentation
Exceptions
:example: response = client.get_license_configuration(
LicenseConfigurationArn='string'
)
:type LicenseConfigurationArn: string
:param LicenseConfigurationArn: [REQUIRED]\nAmazon Resource Name (ARN) of the license configuration.\n
:rtype: dict
ReturnsResponse Syntax{
'LicenseConfigurationId': 'string',
'LicenseConfigurationArn': 'string',
'Name': 'string',
'Description': 'string',
'LicenseCountingType': 'vCPU'|'Instance'|'Core'|'Socket',
'LicenseRules': [
'string',
],
'LicenseCount': 123,
'LicenseCountHardLimit': True|False,
'ConsumedLicenses': 123,
'Status': 'string',
'OwnerAccountId': 'string',
'ConsumedLicenseSummaryList': [
{
'ResourceType': 'EC2_INSTANCE'|'EC2_HOST'|'EC2_AMI'|'RDS'|'SYSTEMS_MANAGER_MANAGED_INSTANCE',
'ConsumedLicenses': 123
},
],
'ManagedResourceSummaryList': [
{
'ResourceType': 'EC2_INSTANCE'|'EC2_HOST'|'EC2_AMI'|'RDS'|'SYSTEMS_MANAGER_MANAGED_INSTANCE',
'AssociationCount': 123
},
],
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'ProductInformationList': [
{
'ResourceType': 'string',
'ProductInformationFilterList': [
{
'ProductInformationFilterName': 'string',
'ProductInformationFilterValue': [
'string',
],
'ProductInformationFilterComparator': 'string'
},
]
},
],
'AutomatedDiscoveryInformation': {
'LastRunTime': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
LicenseConfigurationId (string) --Unique ID for the license configuration.
LicenseConfigurationArn (string) --Amazon Resource Name (ARN) of the license configuration.
Name (string) --Name of the license configuration.
Description (string) --Description of the license configuration.
LicenseCountingType (string) --Dimension on which the licenses are counted.
LicenseRules (list) --License rules.
(string) --
LicenseCount (integer) --Number of available licenses.
LicenseCountHardLimit (boolean) --Sets the number of available licenses as a hard limit.
ConsumedLicenses (integer) --Number of licenses assigned to resources.
Status (string) --License configuration status.
OwnerAccountId (string) --Account ID of the owner of the license configuration.
ConsumedLicenseSummaryList (list) --Summaries of the licenses consumed by resources.
(dict) --Details about license consumption.
ResourceType (string) --Resource type of the resource consuming a license.
ConsumedLicenses (integer) --Number of licenses consumed by the resource.
ManagedResourceSummaryList (list) --Summaries of the managed resources.
(dict) --Summary information about a managed resource.
ResourceType (string) --Type of resource associated with a license.
AssociationCount (integer) --Number of resources associated with licenses.
Tags (list) --Tags for the license configuration.
(dict) --Details about a tag for a license configuration.
Key (string) --Tag key.
Value (string) --Tag value.
ProductInformationList (list) --Product information.
(dict) --Describes product information for a license configuration.
ResourceType (string) --Resource type. The value is SSM_MANAGED .
ProductInformationFilterList (list) --Product information filters. The following filters and logical operators are supported:
Application Name - The name of the application. Logical operator is EQUALS .
Application Publisher - The publisher of the application. Logical operator is EQUALS .
Application Version - The version of the application. Logical operator is EQUALS .
Platform Name - The name of the platform. Logical operator is EQUALS .
Platform Type - The platform type. Logical operator is EQUALS .
License Included - The type of license included. Logical operators are EQUALS and NOT_EQUALS . Possible values are sql-server-enterprise | sql-server-standard | sql-server-web | windows-server-datacenter .
(dict) --Describes product information filters.
ProductInformationFilterName (string) --Filter name.
ProductInformationFilterValue (list) --Filter value.
(string) --
ProductInformationFilterComparator (string) --Logical operator.
AutomatedDiscoveryInformation (dict) --Automated discovery information.
LastRunTime (datetime) --Time that automated discovery last ran.
Exceptions
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
:return: {
'LicenseConfigurationId': 'string',
'LicenseConfigurationArn': 'string',
'Name': 'string',
'Description': 'string',
'LicenseCountingType': 'vCPU'|'Instance'|'Core'|'Socket',
'LicenseRules': [
'string',
],
'LicenseCount': 123,
'LicenseCountHardLimit': True|False,
'ConsumedLicenses': 123,
'Status': 'string',
'OwnerAccountId': 'string',
'ConsumedLicenseSummaryList': [
{
'ResourceType': 'EC2_INSTANCE'|'EC2_HOST'|'EC2_AMI'|'RDS'|'SYSTEMS_MANAGER_MANAGED_INSTANCE',
'ConsumedLicenses': 123
},
],
'ManagedResourceSummaryList': [
{
'ResourceType': 'EC2_INSTANCE'|'EC2_HOST'|'EC2_AMI'|'RDS'|'SYSTEMS_MANAGER_MANAGED_INSTANCE',
'AssociationCount': 123
},
],
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'ProductInformationList': [
{
'ResourceType': 'string',
'ProductInformationFilterList': [
{
'ProductInformationFilterName': 'string',
'ProductInformationFilterValue': [
'string',
],
'ProductInformationFilterComparator': 'string'
},
]
},
],
'AutomatedDiscoveryInformation': {
'LastRunTime': datetime(2015, 1, 1)
}
}
:returns:
Application Name - The name of the application. Logical operator is EQUALS .
Application Publisher - The publisher of the application. Logical operator is EQUALS .
Application Version - The version of the application. Logical operator is EQUALS .
Platform Name - The name of the platform. Logical operator is EQUALS .
Platform Type - The platform type. Logical operator is EQUALS .
License Included - The type of license included. Logical operators are EQUALS and NOT_EQUALS . Possible values are sql-server-enterprise | sql-server-standard | sql-server-web | windows-server-datacenter .
"""
pass
def get_paginator(operation_name=None):
"""
Create a paginator for an operation.
:type operation_name: string
:param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo').
:rtype: L{botocore.paginate.Paginator}
ReturnsA paginator object.
"""
pass
def get_service_settings():
"""
Gets the License Manager settings for the current Region.
See also: AWS API Documentation
Exceptions
:example: response = client.get_service_settings()
:rtype: dict
ReturnsResponse Syntax{
'S3BucketArn': 'string',
'SnsTopicArn': 'string',
'OrganizationConfiguration': {
'EnableIntegration': True|False
},
'EnableCrossAccountsDiscovery': True|False,
'LicenseManagerResourceShareArn': 'string'
}
Response Structure
(dict) --
S3BucketArn (string) --Regional S3 bucket path for storing reports, license trail event data, discovery data, and so on.
SnsTopicArn (string) --SNS topic configured to receive notifications from License Manager.
OrganizationConfiguration (dict) --Indicates whether AWS Organizations has been integrated with License Manager for cross-account discovery.
EnableIntegration (boolean) --Enables AWS Organization integration.
EnableCrossAccountsDiscovery (boolean) --Indicates whether cross-account discovery has been enabled.
LicenseManagerResourceShareArn (string) --Amazon Resource Name (ARN) of the AWS resource share. The License Manager master account will provide member accounts with access to this share.
Exceptions
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
:return: {
'S3BucketArn': 'string',
'SnsTopicArn': 'string',
'OrganizationConfiguration': {
'EnableIntegration': True|False
},
'EnableCrossAccountsDiscovery': True|False,
'LicenseManagerResourceShareArn': 'string'
}
"""
pass
def get_waiter(waiter_name=None):
"""
Returns an object that can wait for some condition.
:type waiter_name: str
:param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters.
:rtype: botocore.waiter.Waiter
"""
pass
def list_associations_for_license_configuration(LicenseConfigurationArn=None, MaxResults=None, NextToken=None):
"""
Lists the resource associations for the specified license configuration.
Resource associations need not consume licenses from a license configuration. For example, an AMI or a stopped instance might not consume a license (depending on the license rules).
See also: AWS API Documentation
Exceptions
:example: response = client.list_associations_for_license_configuration(
LicenseConfigurationArn='string',
MaxResults=123,
NextToken='string'
)
:type LicenseConfigurationArn: string
:param LicenseConfigurationArn: [REQUIRED]\nAmazon Resource Name (ARN) of a license configuration.\n
:type MaxResults: integer
:param MaxResults: Maximum number of results to return in a single call.
:type NextToken: string
:param NextToken: Token for the next set of results.
:rtype: dict
ReturnsResponse Syntax
{
'LicenseConfigurationAssociations': [
{
'ResourceArn': 'string',
'ResourceType': 'EC2_INSTANCE'|'EC2_HOST'|'EC2_AMI'|'RDS'|'SYSTEMS_MANAGER_MANAGED_INSTANCE',
'ResourceOwnerId': 'string',
'AssociationTime': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
LicenseConfigurationAssociations (list) --
Information about the associations for the license configuration.
(dict) --
Describes an association with a license configuration.
ResourceArn (string) --
Amazon Resource Name (ARN) of the resource.
ResourceType (string) --
Type of server resource.
ResourceOwnerId (string) --
ID of the AWS account that owns the resource consuming licenses.
AssociationTime (datetime) --
Time when the license configuration was associated with the resource.
NextToken (string) --
Token for the next set of results.
Exceptions
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.FilterLimitExceededException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
:return: {
'LicenseConfigurationAssociations': [
{
'ResourceArn': 'string',
'ResourceType': 'EC2_INSTANCE'|'EC2_HOST'|'EC2_AMI'|'RDS'|'SYSTEMS_MANAGER_MANAGED_INSTANCE',
'ResourceOwnerId': 'string',
'AssociationTime': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
:returns:
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.FilterLimitExceededException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
"""
pass
def list_failures_for_license_configuration_operations(LicenseConfigurationArn=None, MaxResults=None, NextToken=None):
"""
Lists the license configuration operations that failed.
See also: AWS API Documentation
Exceptions
:example: response = client.list_failures_for_license_configuration_operations(
LicenseConfigurationArn='string',
MaxResults=123,
NextToken='string'
)
:type LicenseConfigurationArn: string
:param LicenseConfigurationArn: [REQUIRED]\nAmazon Resource Name of the license configuration.\n
:type MaxResults: integer
:param MaxResults: Maximum number of results to return in a single call.
:type NextToken: string
:param NextToken: Token for the next set of results.
:rtype: dict
ReturnsResponse Syntax
{
'LicenseOperationFailureList': [
{
'ResourceArn': 'string',
'ResourceType': 'EC2_INSTANCE'|'EC2_HOST'|'EC2_AMI'|'RDS'|'SYSTEMS_MANAGER_MANAGED_INSTANCE',
'ErrorMessage': 'string',
'FailureTime': datetime(2015, 1, 1),
'OperationName': 'string',
'ResourceOwnerId': 'string',
'OperationRequestedBy': 'string',
'MetadataList': [
{
'Name': 'string',
'Value': 'string'
},
]
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
LicenseOperationFailureList (list) --
License configuration operations that failed.
(dict) --
Describes the failure of a license operation.
ResourceArn (string) --
Amazon Resource Name (ARN) of the resource.
ResourceType (string) --
Resource type.
ErrorMessage (string) --
Error message.
FailureTime (datetime) --
Failure time.
OperationName (string) --
Name of the operation.
ResourceOwnerId (string) --
ID of the AWS account that owns the resource.
OperationRequestedBy (string) --
The requester is "License Manager Automated Discovery".
MetadataList (list) --
Reserved.
(dict) --
Reserved.
Name (string) --
Reserved.
Value (string) --
Reserved.
NextToken (string) --
Token for the next set of results.
Exceptions
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
:return: {
'LicenseOperationFailureList': [
{
'ResourceArn': 'string',
'ResourceType': 'EC2_INSTANCE'|'EC2_HOST'|'EC2_AMI'|'RDS'|'SYSTEMS_MANAGER_MANAGED_INSTANCE',
'ErrorMessage': 'string',
'FailureTime': datetime(2015, 1, 1),
'OperationName': 'string',
'ResourceOwnerId': 'string',
'OperationRequestedBy': 'string',
'MetadataList': [
{
'Name': 'string',
'Value': 'string'
},
]
},
],
'NextToken': 'string'
}
:returns:
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
"""
pass
def list_license_configurations(LicenseConfigurationArns=None, MaxResults=None, NextToken=None, Filters=None):
"""
Lists the license configurations for your account.
See also: AWS API Documentation
Exceptions
:example: response = client.list_license_configurations(
LicenseConfigurationArns=[
'string',
],
MaxResults=123,
NextToken='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
]
)
:type LicenseConfigurationArns: list
:param LicenseConfigurationArns: Amazon Resource Names (ARN) of the license configurations.\n\n(string) --\n\n
:type MaxResults: integer
:param MaxResults: Maximum number of results to return in a single call.
:type NextToken: string
:param NextToken: Token for the next set of results.
:type Filters: list
:param Filters: Filters to scope the results. The following filters and logical operators are supported:\n\nlicenseCountingType - The dimension on which licenses are counted (vCPU). Logical operators are EQUALS | NOT_EQUALS .\nenforceLicenseCount - A Boolean value that indicates whether hard license enforcement is used. Logical operators are EQUALS | NOT_EQUALS .\nusagelimitExceeded - A Boolean value that indicates whether the available licenses have been exceeded. Logical operators are EQUALS | NOT_EQUALS .\n\n\n(dict) --A filter name and value pair that is used to return more specific results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.\n\nName (string) --Name of the filter. Filter names are case-sensitive.\n\nValues (list) --Filter values. Filter values are case-sensitive.\n\n(string) --\n\n\n\n\n\n
:rtype: dict
ReturnsResponse Syntax
{
'LicenseConfigurations': [
{
'LicenseConfigurationId': 'string',
'LicenseConfigurationArn': 'string',
'Name': 'string',
'Description': 'string',
'LicenseCountingType': 'vCPU'|'Instance'|'Core'|'Socket',
'LicenseRules': [
'string',
],
'LicenseCount': 123,
'LicenseCountHardLimit': True|False,
'ConsumedLicenses': 123,
'Status': 'string',
'OwnerAccountId': 'string',
'ConsumedLicenseSummaryList': [
{
'ResourceType': 'EC2_INSTANCE'|'EC2_HOST'|'EC2_AMI'|'RDS'|'SYSTEMS_MANAGER_MANAGED_INSTANCE',
'ConsumedLicenses': 123
},
],
'ManagedResourceSummaryList': [
{
'ResourceType': 'EC2_INSTANCE'|'EC2_HOST'|'EC2_AMI'|'RDS'|'SYSTEMS_MANAGER_MANAGED_INSTANCE',
'AssociationCount': 123
},
],
'ProductInformationList': [
{
'ResourceType': 'string',
'ProductInformationFilterList': [
{
'ProductInformationFilterName': 'string',
'ProductInformationFilterValue': [
'string',
],
'ProductInformationFilterComparator': 'string'
},
]
},
],
'AutomatedDiscoveryInformation': {
'LastRunTime': datetime(2015, 1, 1)
}
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
LicenseConfigurations (list) --
Information about the license configurations.
(dict) --
A license configuration is an abstraction of a customer license agreement that can be consumed and enforced by License Manager. Components include specifications for the license type (licensing by instance, socket, CPU, or vCPU), allowed tenancy (shared tenancy, Dedicated Instance, Dedicated Host, or all of these), host affinity (how long a VM must be associated with a host), and the number of licenses purchased and used.
LicenseConfigurationId (string) --
Unique ID of the license configuration.
LicenseConfigurationArn (string) --
Amazon Resource Name (ARN) of the license configuration.
Name (string) --
Name of the license configuration.
Description (string) --
Description of the license configuration.
LicenseCountingType (string) --
Dimension to use to track the license inventory.
LicenseRules (list) --
License rules.
(string) --
LicenseCount (integer) --
Number of licenses managed by the license configuration.
LicenseCountHardLimit (boolean) --
Number of available licenses as a hard limit.
ConsumedLicenses (integer) --
Number of licenses consumed.
Status (string) --
Status of the license configuration.
OwnerAccountId (string) --
Account ID of the license configuration\'s owner.
ConsumedLicenseSummaryList (list) --
Summaries for licenses consumed by various resources.
(dict) --
Details about license consumption.
ResourceType (string) --
Resource type of the resource consuming a license.
ConsumedLicenses (integer) --
Number of licenses consumed by the resource.
ManagedResourceSummaryList (list) --
Summaries for managed resources.
(dict) --
Summary information about a managed resource.
ResourceType (string) --
Type of resource associated with a license.
AssociationCount (integer) --
Number of resources associated with licenses.
ProductInformationList (list) --
Product information.
(dict) --
Describes product information for a license configuration.
ResourceType (string) --
Resource type. The value is SSM_MANAGED .
ProductInformationFilterList (list) --
Product information filters. The following filters and logical operators are supported:
Application Name - The name of the application. Logical operator is EQUALS .
Application Publisher - The publisher of the application. Logical operator is EQUALS .
Application Version - The version of the application. Logical operator is EQUALS .
Platform Name - The name of the platform. Logical operator is EQUALS .
Platform Type - The platform type. Logical operator is EQUALS .
License Included - The type of license included. Logical operators are EQUALS and NOT_EQUALS . Possible values are sql-server-enterprise | sql-server-standard | sql-server-web | windows-server-datacenter .
(dict) --
Describes product information filters.
ProductInformationFilterName (string) --
Filter name.
ProductInformationFilterValue (list) --
Filter value.
(string) --
ProductInformationFilterComparator (string) --
Logical operator.
AutomatedDiscoveryInformation (dict) --
Automated discovery information.
LastRunTime (datetime) --
Time that automated discovery last ran.
NextToken (string) --
Token for the next set of results.
Exceptions
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.FilterLimitExceededException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
:return: {
'LicenseConfigurations': [
{
'LicenseConfigurationId': 'string',
'LicenseConfigurationArn': 'string',
'Name': 'string',
'Description': 'string',
'LicenseCountingType': 'vCPU'|'Instance'|'Core'|'Socket',
'LicenseRules': [
'string',
],
'LicenseCount': 123,
'LicenseCountHardLimit': True|False,
'ConsumedLicenses': 123,
'Status': 'string',
'OwnerAccountId': 'string',
'ConsumedLicenseSummaryList': [
{
'ResourceType': 'EC2_INSTANCE'|'EC2_HOST'|'EC2_AMI'|'RDS'|'SYSTEMS_MANAGER_MANAGED_INSTANCE',
'ConsumedLicenses': 123
},
],
'ManagedResourceSummaryList': [
{
'ResourceType': 'EC2_INSTANCE'|'EC2_HOST'|'EC2_AMI'|'RDS'|'SYSTEMS_MANAGER_MANAGED_INSTANCE',
'AssociationCount': 123
},
],
'ProductInformationList': [
{
'ResourceType': 'string',
'ProductInformationFilterList': [
{
'ProductInformationFilterName': 'string',
'ProductInformationFilterValue': [
'string',
],
'ProductInformationFilterComparator': 'string'
},
]
},
],
'AutomatedDiscoveryInformation': {
'LastRunTime': datetime(2015, 1, 1)
}
},
],
'NextToken': 'string'
}
:returns:
(string) --
"""
pass
def list_license_specifications_for_resource(ResourceArn=None, MaxResults=None, NextToken=None):
"""
Describes the license configurations for the specified resource.
See also: AWS API Documentation
Exceptions
:example: response = client.list_license_specifications_for_resource(
ResourceArn='string',
MaxResults=123,
NextToken='string'
)
:type ResourceArn: string
:param ResourceArn: [REQUIRED]\nAmazon Resource Name (ARN) of a resource that has an associated license configuration.\n
:type MaxResults: integer
:param MaxResults: Maximum number of results to return in a single call.
:type NextToken: string
:param NextToken: Token for the next set of results.
:rtype: dict
ReturnsResponse Syntax
{
'LicenseSpecifications': [
{
'LicenseConfigurationArn': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
LicenseSpecifications (list) --
License configurations associated with a resource.
(dict) --
Details for associating a license configuration with a resource.
LicenseConfigurationArn (string) --
Amazon Resource Name (ARN) of the license configuration.
NextToken (string) --
Token for the next set of results.
Exceptions
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
:return: {
'LicenseSpecifications': [
{
'LicenseConfigurationArn': 'string'
},
],
'NextToken': 'string'
}
:returns:
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
"""
pass
def list_resource_inventory(MaxResults=None, NextToken=None, Filters=None):
"""
Lists resources managed using Systems Manager inventory.
See also: AWS API Documentation
Exceptions
:example: response = client.list_resource_inventory(
MaxResults=123,
NextToken='string',
Filters=[
{
'Name': 'string',
'Condition': 'EQUALS'|'NOT_EQUALS'|'BEGINS_WITH'|'CONTAINS',
'Value': 'string'
},
]
)
:type MaxResults: integer
:param MaxResults: Maximum number of results to return in a single call.
:type NextToken: string
:param NextToken: Token for the next set of results.
:type Filters: list
:param Filters: Filters to scope the results. The following filters and logical operators are supported:\n\naccount_id - The ID of the AWS account that owns the resource. Logical operators are EQUALS | NOT_EQUALS .\napplication_name - The name of the application. Logical operators are EQUALS | BEGINS_WITH .\nlicense_included - The type of license included. Logical operators are EQUALS | NOT_EQUALS . Possible values are sql-server-enterprise | sql-server-standard | sql-server-web | windows-server-datacenter .\nplatform - The platform of the resource. Logical operators are EQUALS | BEGINS_WITH .\nresource_id - The ID of the resource. Logical operators are EQUALS | NOT_EQUALS .\n\n\n(dict) --An inventory filter.\n\nName (string) -- [REQUIRED]Name of the filter.\n\nCondition (string) -- [REQUIRED]Condition of the filter.\n\nValue (string) --Value of the filter.\n\n\n\n\n
:rtype: dict
ReturnsResponse Syntax
{
'ResourceInventoryList': [
{
'ResourceId': 'string',
'ResourceType': 'EC2_INSTANCE'|'EC2_HOST'|'EC2_AMI'|'RDS'|'SYSTEMS_MANAGER_MANAGED_INSTANCE',
'ResourceArn': 'string',
'Platform': 'string',
'PlatformVersion': 'string',
'ResourceOwningAccountId': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
ResourceInventoryList (list) --
Information about the resources.
(dict) --
Details about a resource.
ResourceId (string) --
ID of the resource.
ResourceType (string) --
Type of resource.
ResourceArn (string) --
Amazon Resource Name (ARN) of the resource.
Platform (string) --
Platform of the resource.
PlatformVersion (string) --
Platform version of the resource in the inventory.
ResourceOwningAccountId (string) --
ID of the account that owns the resource.
NextToken (string) --
Token for the next set of results.
Exceptions
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.FilterLimitExceededException
LicenseManager.Client.exceptions.FailedDependencyException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
:return: {
'ResourceInventoryList': [
{
'ResourceId': 'string',
'ResourceType': 'EC2_INSTANCE'|'EC2_HOST'|'EC2_AMI'|'RDS'|'SYSTEMS_MANAGER_MANAGED_INSTANCE',
'ResourceArn': 'string',
'Platform': 'string',
'PlatformVersion': 'string',
'ResourceOwningAccountId': 'string'
},
],
'NextToken': 'string'
}
:returns:
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.FilterLimitExceededException
LicenseManager.Client.exceptions.FailedDependencyException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
"""
pass
def list_tags_for_resource(ResourceArn=None):
"""
Lists the tags for the specified license configuration.
See also: AWS API Documentation
Exceptions
:example: response = client.list_tags_for_resource(
ResourceArn='string'
)
:type ResourceArn: string
:param ResourceArn: [REQUIRED]\nAmazon Resource Name (ARN) of the license configuration.\n
:rtype: dict
ReturnsResponse Syntax{
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
}
Response Structure
(dict) --
Tags (list) --Information about the tags.
(dict) --Details about a tag for a license configuration.
Key (string) --Tag key.
Value (string) --Tag value.
Exceptions
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
:return: {
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
}
"""
pass
def list_usage_for_license_configuration(LicenseConfigurationArn=None, MaxResults=None, NextToken=None, Filters=None):
"""
Lists all license usage records for a license configuration, displaying license consumption details by resource at a selected point in time. Use this action to audit the current license consumption for any license inventory and configuration.
See also: AWS API Documentation
Exceptions
:example: response = client.list_usage_for_license_configuration(
LicenseConfigurationArn='string',
MaxResults=123,
NextToken='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
]
)
:type LicenseConfigurationArn: string
:param LicenseConfigurationArn: [REQUIRED]\nAmazon Resource Name (ARN) of the license configuration.\n
:type MaxResults: integer
:param MaxResults: Maximum number of results to return in a single call.
:type NextToken: string
:param NextToken: Token for the next set of results.
:type Filters: list
:param Filters: Filters to scope the results. The following filters and logical operators are supported:\n\nresourceArn - The ARN of the license configuration resource. Logical operators are EQUALS | NOT_EQUALS .\nresourceType - The resource type (EC2_INSTANCE | EC2_HOST | EC2_AMI | SYSTEMS_MANAGER_MANAGED_INSTANCE). Logical operators are EQUALS | NOT_EQUALS .\nresourceAccount - The ID of the account that owns the resource. Logical operators are EQUALS | NOT_EQUALS .\n\n\n(dict) --A filter name and value pair that is used to return more specific results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.\n\nName (string) --Name of the filter. Filter names are case-sensitive.\n\nValues (list) --Filter values. Filter values are case-sensitive.\n\n(string) --\n\n\n\n\n\n
:rtype: dict
ReturnsResponse Syntax
{
'LicenseConfigurationUsageList': [
{
'ResourceArn': 'string',
'ResourceType': 'EC2_INSTANCE'|'EC2_HOST'|'EC2_AMI'|'RDS'|'SYSTEMS_MANAGER_MANAGED_INSTANCE',
'ResourceStatus': 'string',
'ResourceOwnerId': 'string',
'AssociationTime': datetime(2015, 1, 1),
'ConsumedLicenses': 123
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
LicenseConfigurationUsageList (list) --
Information about the license configurations.
(dict) --
Details about the usage of a resource associated with a license configuration.
ResourceArn (string) --
Amazon Resource Name (ARN) of the resource.
ResourceType (string) --
Type of resource.
ResourceStatus (string) --
Status of the resource.
ResourceOwnerId (string) --
ID of the account that owns the resource.
AssociationTime (datetime) --
Time when the license configuration was initially associated with the resource.
ConsumedLicenses (integer) --
Number of licenses consumed by the resource.
NextToken (string) --
Token for the next set of results.
Exceptions
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.FilterLimitExceededException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
:return: {
'LicenseConfigurationUsageList': [
{
'ResourceArn': 'string',
'ResourceType': 'EC2_INSTANCE'|'EC2_HOST'|'EC2_AMI'|'RDS'|'SYSTEMS_MANAGER_MANAGED_INSTANCE',
'ResourceStatus': 'string',
'ResourceOwnerId': 'string',
'AssociationTime': datetime(2015, 1, 1),
'ConsumedLicenses': 123
},
],
'NextToken': 'string'
}
:returns:
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.FilterLimitExceededException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
"""
pass
def tag_resource(ResourceArn=None, Tags=None):
"""
Adds the specified tags to the specified license configuration.
See also: AWS API Documentation
Exceptions
:example: response = client.tag_resource(
ResourceArn='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
:type ResourceArn: string
:param ResourceArn: [REQUIRED]\nAmazon Resource Name (ARN) of the license configuration.\n
:type Tags: list
:param Tags: [REQUIRED]\nOne or more tags.\n\n(dict) --Details about a tag for a license configuration.\n\nKey (string) --Tag key.\n\nValue (string) --Tag value.\n\n\n\n\n
:rtype: dict
ReturnsResponse Syntax
{}
Response Structure
(dict) --
Exceptions
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
:return: {}
:returns:
(dict) --
"""
pass
def untag_resource(ResourceArn=None, TagKeys=None):
"""
Removes the specified tags from the specified license configuration.
See also: AWS API Documentation
Exceptions
:example: response = client.untag_resource(
ResourceArn='string',
TagKeys=[
'string',
]
)
:type ResourceArn: string
:param ResourceArn: [REQUIRED]\nAmazon Resource Name (ARN) of the license configuration.\n
:type TagKeys: list
:param TagKeys: [REQUIRED]\nKeys identifying the tags to remove.\n\n(string) --\n\n
:rtype: dict
ReturnsResponse Syntax
{}
Response Structure
(dict) --
Exceptions
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
:return: {}
:returns:
(dict) --
"""
pass
def update_license_configuration(LicenseConfigurationArn=None, LicenseConfigurationStatus=None, LicenseRules=None, LicenseCount=None, LicenseCountHardLimit=None, Name=None, Description=None, ProductInformationList=None):
"""
Modifies the attributes of an existing license configuration.
A license configuration is an abstraction of a customer license agreement that can be consumed and enforced by License Manager. Components include specifications for the license type (licensing by instance, socket, CPU, or vCPU), allowed tenancy (shared tenancy, Dedicated Instance, Dedicated Host, or all of these), host affinity (how long a VM must be associated with a host), and the number of licenses purchased and used.
See also: AWS API Documentation
Exceptions
:example: response = client.update_license_configuration(
LicenseConfigurationArn='string',
LicenseConfigurationStatus='AVAILABLE'|'DISABLED',
LicenseRules=[
'string',
],
LicenseCount=123,
LicenseCountHardLimit=True|False,
Name='string',
Description='string',
ProductInformationList=[
{
'ResourceType': 'string',
'ProductInformationFilterList': [
{
'ProductInformationFilterName': 'string',
'ProductInformationFilterValue': [
'string',
],
'ProductInformationFilterComparator': 'string'
},
]
},
]
)
:type LicenseConfigurationArn: string
:param LicenseConfigurationArn: [REQUIRED]\nAmazon Resource Name (ARN) of the license configuration.\n
:type LicenseConfigurationStatus: string
:param LicenseConfigurationStatus: New status of the license configuration.
:type LicenseRules: list
:param LicenseRules: New license rules.\n\n(string) --\n\n
:type LicenseCount: integer
:param LicenseCount: New number of licenses managed by the license configuration.
:type LicenseCountHardLimit: boolean
:param LicenseCountHardLimit: New hard limit of the number of available licenses.
:type Name: string
:param Name: New name of the license configuration.
:type Description: string
:param Description: New description of the license configuration.
:type ProductInformationList: list
:param ProductInformationList: New product information.\n\n(dict) --Describes product information for a license configuration.\n\nResourceType (string) -- [REQUIRED]Resource type. The value is SSM_MANAGED .\n\nProductInformationFilterList (list) -- [REQUIRED]Product information filters. The following filters and logical operators are supported:\n\nApplication Name - The name of the application. Logical operator is EQUALS .\nApplication Publisher - The publisher of the application. Logical operator is EQUALS .\nApplication Version - The version of the application. Logical operator is EQUALS .\nPlatform Name - The name of the platform. Logical operator is EQUALS .\nPlatform Type - The platform type. Logical operator is EQUALS .\nLicense Included - The type of license included. Logical operators are EQUALS and NOT_EQUALS . Possible values are sql-server-enterprise | sql-server-standard | sql-server-web | windows-server-datacenter .\n\n\n(dict) --Describes product information filters.\n\nProductInformationFilterName (string) -- [REQUIRED]Filter name.\n\nProductInformationFilterValue (list) -- [REQUIRED]Filter value.\n\n(string) --\n\n\nProductInformationFilterComparator (string) -- [REQUIRED]Logical operator.\n\n\n\n\n\n\n\n\n
:rtype: dict
ReturnsResponse Syntax
{}
Response Structure
(dict) --
Exceptions
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
:return: {}
:returns:
(dict) --
"""
pass
def update_license_specifications_for_resource(ResourceArn=None, AddLicenseSpecifications=None, RemoveLicenseSpecifications=None):
"""
Adds or removes the specified license configurations for the specified AWS resource.
You can update the license specifications of AMIs, instances, and hosts. You cannot update the license specifications for launch templates and AWS CloudFormation templates, as they send license configurations to the operation that creates the resource.
See also: AWS API Documentation
Exceptions
:example: response = client.update_license_specifications_for_resource(
ResourceArn='string',
AddLicenseSpecifications=[
{
'LicenseConfigurationArn': 'string'
},
],
RemoveLicenseSpecifications=[
{
'LicenseConfigurationArn': 'string'
},
]
)
:type ResourceArn: string
:param ResourceArn: [REQUIRED]\nAmazon Resource Name (ARN) of the AWS resource.\n
:type AddLicenseSpecifications: list
:param AddLicenseSpecifications: ARNs of the license configurations to add.\n\n(dict) --Details for associating a license configuration with a resource.\n\nLicenseConfigurationArn (string) -- [REQUIRED]Amazon Resource Name (ARN) of the license configuration.\n\n\n\n\n
:type RemoveLicenseSpecifications: list
:param RemoveLicenseSpecifications: ARNs of the license configurations to remove.\n\n(dict) --Details for associating a license configuration with a resource.\n\nLicenseConfigurationArn (string) -- [REQUIRED]Amazon Resource Name (ARN) of the license configuration.\n\n\n\n\n
:rtype: dict
ReturnsResponse Syntax
{}
Response Structure
(dict) --
Exceptions
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.InvalidResourceStateException
LicenseManager.Client.exceptions.LicenseUsageException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
:return: {}
:returns:
(dict) --
"""
pass
def update_service_settings(S3BucketArn=None, SnsTopicArn=None, OrganizationConfiguration=None, EnableCrossAccountsDiscovery=None):
"""
Updates License Manager settings for the current Region.
See also: AWS API Documentation
Exceptions
:example: response = client.update_service_settings(
S3BucketArn='string',
SnsTopicArn='string',
OrganizationConfiguration={
'EnableIntegration': True|False
},
EnableCrossAccountsDiscovery=True|False
)
:type S3BucketArn: string
:param S3BucketArn: Amazon Resource Name (ARN) of the Amazon S3 bucket where the License Manager information is stored.
:type SnsTopicArn: string
:param SnsTopicArn: Amazon Resource Name (ARN) of the Amazon SNS topic used for License Manager alerts.
:type OrganizationConfiguration: dict
:param OrganizationConfiguration: Enables integration with AWS Organizations for cross-account discovery.\n\nEnableIntegration (boolean) -- [REQUIRED]Enables AWS Organization integration.\n\n\n
:type EnableCrossAccountsDiscovery: boolean
:param EnableCrossAccountsDiscovery: Activates cross-account discovery.
:rtype: dict
ReturnsResponse Syntax
{}
Response Structure
(dict) --
Exceptions
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException
:return: {}
:returns:
(dict) --
"""
pass
|
class Categories:
def __init__(self, category_name, money_allocated, index_inside_list):
self.category_name = category_name
self.money_allocated = money_allocated
self.index_inside_list = index_inside_list
|
class Solution:
def fib(self, N: int) -> int:
self.seen = {}
self.seen[0] = 0
self.seen[1] = 1
return self.dfs(N)
def dfs(self, n):
if n in self.seen:
return self.seen[n]
self.seen[n] = self.dfs(n - 1) + self.dfs(n - 2)
return self.seen[n]
|
# Program to find whether given input string has balanced brackets or not
def isBalanced(s):
a=[]
for i in range(len(s)):
if s[i]=='{' or s[i]=='[' or s[i]=='(':
a.append(s[i])
if s[i]=='}':
if len(a)==0:
return "NO"
else:
if a[-1]=='{':
a.pop()
else:
break
if s[i]==']':
if len(a)==0:
return "NO"
else:
if a[-1]=='[':
a.pop()
else:
break
if s[i]==')':
if len(a)==0:
return "NO"
else:
if a[-1]=='(':
a.pop()
else:
break
if len(a)==0:
return "YES"
else:
return "NO"
inp = input('Enter your query string: ')
#sample input: {)[](}]}]}))}(())(
print(isBalanced(inp))
|
nome = input("Com quem estou falando? ")
print("foi um prazer te conhecer ", nome)
idade = input("quantos anos você tem, " + nome)
print("então você tem ",idade," ", nome)
|
#Requests stress Pod resources for a given period of time to simulate load
#deploymentLabel is the Deployment that the request is beings sent to
#cpuCost is the number of threads that the request will use on a pod
#execTime is how long the request will use those resource for before completing
class Request:
def __init__(self, INFOLIST):
self.label = INFOLIST[0]
self.deploymentLabel = INFOLIST[1]
self.execTime = int(INFOLIST[2])
|
"""
datos de entrada
sueldo--->s--->int
ventas realizadas departamento 1--->vrd1--->int
ventas realizadas departamento 2--->vrd2--->int
ventas realizadas departamento 3--->vrd3--->int
"""
#entradas
s=int(input("ingrese el sueldo base: "))
vrd1=int(input("ingrese el numero de ventas realizadas por departamento 1: "))
vrd2=int(input("ingrese el numero de ventas realizadas por departamento 2: "))
vrd3=int(input("ingrese el numero de ventas realizadas por departamento 3: "))
#caja negra
vt=(vrd1+vrd2+vrd3)
por=(vt*33/100)
if(vrd1>por):
s1=s+s*0.20
print("ventas mayor al 33%",s1)
else:
print("venta menor al 33%",s)
if (vrd2>por):
s2=s+s*0.20
print("ventas mayor al 33%",s2)
else:
print("venta menor al 33%",s)
if (vrd3>por):
s3=s+s*0.20
print("venta mayor a 33%",s3)
else:
print("venta menor al 33%",s)
|
valores = []
while True:
valores.append(int(input("Digite um valor")))
resp = str(input("Quer continuar?"))
if resp in 'Nn':
break
print(f"Você digitou {len(valores)} valores. \n")
valores.sort(reverse= True)
print(f"Os valores em ordem decrescente são {valores}.\n")
if 5 in valores:
print(f"O valor 5 faz parte da lista")
else:
print("Não")
# Aqui temos um algoritmo que tem a finalidade de coletar números
# e realizar analizes, nos mostrando a quantidade de valores digitados
# a ordem decrescente dos mesmos
|
dc_shell_setup_tcl = {
############
# default
############
'default': """
set BRICK_RESULTS [getenv "BRICK_RESULTS"];
set TSMC_DIR [getenv "TSMC_DIR"];
set DESIGN_NAME "%s"; # The name of the top-level design.
#############################################################
# The following variables will be set automatically during
# 'icdc setup' -> 'commit setup' execution
# Manual changes could be made, but will be overwritten
# when 'icdc setup' is executed again
#
##############################################################
# START Auto Setup Section
# Additional search path to be added
# to the default search path
# The search paths belong to the following libraries:
# * core standard cell library
# * analog I/O standard cell library
# * digital I/O standard cell library
# * SRAM macro library
# * full custom macro libraries
set ADDITIONAL_SEARCH_PATHS [list \\
%s
]
# Target technology logical libraries
set TARGET_LIBRARY_FILES [list \\
]
# List of max min library pairs "max1 min1 max2 min2"
set MIN_LIBRARY_FILES [list \\
]
# END Auto Setup Section
##############################################################
# Extra link logical libraries
set ADDITIONAL_LINK_LIB_FILES [list \\
%s
]
##############################################################
# Topo Mode Settings
# no auto setup implemented so far
# please make necessary modification
#
set MW_REFERENCE_LIB_DIRS ""; # Milkyway reference libraries
set TECH_FILE ""; # Milkyway technology file
set MAP_FILE ""; # Mapping file for TLUplus
set TLUPLUS_MAX_FILE ""; # Max TLUplus file
set TLUPLUS_MIN_FILE ""; # Min TLUplus file
set MW_POWER_NET ""; #
set MW_POWER_PORT ""; #
set MW_GROUND_NET ""; #
set MW_GROUND_PORT ""; #
""",
#############
# TSMC65
#############
'tsmc65': """
set BRICK_RESULTS [getenv "BRICK_RESULTS"];
set TSMC_DIR [getenv "TSMC_DIR"];
set DESIGN_NAME "%s"; # The name of the top-level design.
#############################################################
# The following variables will be set automatically during
# 'icdc setup' -> 'commit setup' execution
# Manual changes could be made, but will be overwritten
# when 'icdc setup' is executed again
#
##############################################################
# START Auto Setup Section
# Additional search path to be added
# to the default search path
# The search paths belong to the following libraries:
# * core standard cell library
# * analog I/O standard cell library
# * digital I/O standard cell library
# * SRAM macro library
# * full custom macro libraries
set ADDITIONAL_SEARCH_PATHS [list \\
"$TSMC_DIR/digital/Front_End/timing_power_noise/NLDM/tcbn65lp_200a" \\
"$TSMC_DIR/digital/Front_End/timing_power_noise/NLDM/tpan65lpnv2_140b" \\
"$TSMC_DIR/digital/Front_End/timing_power_noise/NLDM/tpdn65lpnv2_140b" \\
"$TSMC_DIR/sram/tsdn65lpa4096x32m8f_200b/SYNOPSYS" \\
%s
]
# Target technology logical libraries
set TARGET_LIBRARY_FILES [list \\
"tcbn65lpwc.db" \\
"tcbn65lpwc0d90d9.db" \\
"tpan65lpnv2wc.db" \\
"tpdn65lpnv2wc.db" \\
"tsdn65lpa4096x32m8f_200b_tt1p2v40c.db" \\
]
# List of max min library pairs "max1 min1 max2 min2"
set MIN_LIBRARY_FILES [list \\
"tcbn65lpwc.db" "tcbn65lpbc.db" \\
"tpan65lpnv2wc.db" "tpan65lpnv2bc.db" \\
"tpdn65lpnv2wc.db" "tpdn65lpnv2bc.db" \\
]
# END Auto Setup Section
##############################################################
# Extra link logical libraries
set ADDITIONAL_LINK_LIB_FILES [list \\
%s
]
##############################################################
# Topo Mode Settings
# no auto setup implemented so far
# please make necessary modification
#
set MW_REFERENCE_LIB_DIRS "$TSMC_DIR/digital/Back_End/milkyway/tcbn65lp_200a/frame_only/tcbn65lp $TSMC_DIR/digital/Back_End/milkyway/tpdn65lpnv2_140b/mt_2/9lm/frame_only/tpdn65lpnv2 $TSMC_DIR/digital/Back_End/milkyway/tpan65lpnv2_140b/mt_2/9lm/frame_only/tpan65lpnv2"; # Milkyway reference libraries
set TECH_FILE "$TSMC_DIR/digital/Back_End/milkyway/tcbn65lp_200a/techfiles/tsmcn65_9lmT2.tf"; # Milkyway technology file
set MAP_FILE "$TSMC_DIR/digital/Back_End/milkyway/tcbn65lp_200a/techfiles/tluplus/star.map_9M"; # Mapping file for TLUplus
set TLUPLUS_MAX_FILE "$TSMC_DIR/digital/Back_End/milkyway/tcbn65lp_200a/techfiles/tluplus/cln65lp_1p09m+alrdl_rcworst_top2.tluplus"; # Max TLUplus file
set TLUPLUS_MIN_FILE "$TSMC_DIR/digital/Back_End/milkyway/tcbn65lp_200a/techfiles/tluplus/cln65lp_1p09m+alrdl_rcbest_top2.tluplus"; # Min TLUplus file
set MW_POWER_NET ""; #
set MW_POWER_PORT ""; #
set MW_GROUND_NET ""; #
set MW_GROUND_PORT ""; #
if {[shell_is_in_topographical_mode]} {
set_preferred_routing_direction -layer M1 -dir horizontal
set_preferred_routing_direction -layer M2 -dir vertical
set_preferred_routing_direction -layer M3 -dir horizontal
set_preferred_routing_direction -layer M4 -dir vertical
set_preferred_routing_direction -layer M5 -dir horizontal
set_preferred_routing_direction -layer M6 -dir vertical
set_preferred_routing_direction -layer M7 -dir horizontal
set_preferred_routing_direction -layer M8 -dir vertical
set_preferred_routing_direction -layer M9 -dir horizontal
set_preferred_routing_direction -layer AP -dir vertical
}
"""
}
dc_shell_main_tcl = """
#
# dc_shell script based on DC-ICPRO
#
# dc_shell_setup.tcl
source %s
# sourcelist
# the following file includes all RTL-Sources as ordered lists
source %s
#########################################################################
# Setup Variables
#########################################################################
#set alib_library_analysis_path $ICPRO_DIR/tmp/dc_shell ; # Point to a central cache of analyzed libraries
set clock_gating_enabled 1
# make design read-in a bit more verbose...
#set hdlin_keep_signal_name user
set hdlin_report_floating_net_to_ground true
# Enables shortening of names as the concatenation of interface
# signals results in names > 1000s of characters
set hdlin_shorten_long_module_name true
# Specify minimum number of characters. Default: 256
set hdlin_module_name_limit 100
set DCT_IGNORED_ROUTING_LAYERS "" ; # Enter the same ignored routing
# layers as P&R
set REPORTS_DIR "$BRICK_RESULTS/dc_shell_$DESIGN_NAME/reports"
set RESULTS_DIR "$BRICK_RESULTS/dc_shell_$DESIGN_NAME/results"
set tool "dc"
set target_library $TARGET_LIBRARY_FILES
set synthetic_library dw_foundation.sldb
set link_library "* $target_library $ADDITIONAL_LINK_LIB_FILES $synthetic_library"
set search_path [concat $search_path $ADDITIONAL_SEARCH_PATHS]
# add default icpro search path for global verilog sources
set user_search_path %s
set search_path [concat $search_path $user_search_path]
# Set min libraries if they exist
foreach {max_library min_library} $MIN_LIBRARY_FILES {
set_min_library $max_library -min_version $min_library }
if {[shell_is_in_topographical_mode]} {
set mw_logic1_net $MW_POWER_NET
set mw_logic0_net $MW_GROUND_NET
set mw_reference_library $MW_REFERENCE_LIB_DIRS
set mw_design_library ${DESIGN_NAME}_LIB
set mw_site_name_mapping [list CORE unit Core unit core unit]
create_mw_lib -technology $TECH_FILE \
-mw_reference_library $mw_reference_library \
$mw_design_library
open_mw_lib $mw_design_library
set_tlu_plus_files -max_tluplus $TLUPLUS_MAX_FILE \
-min_tluplus $TLUPLUS_MIN_FILE \
-tech2itf_map $MAP_FILE
check_tlu_plus_files
check_library
}
## set multicore usage
set_host_options -max_cores %s
echo "Information: Starting Synopsys Design Compiler synthesis run ... "
echo "Information: Filtered command line output. For details see 'logfiles/compile.log'! "
#################################################################################
# Setup for Formality verification
#################################################################################
set_svf $RESULTS_DIR/${DESIGN_NAME}.svf
#################################################################################
# Read in the RTL Design
#
# Read in the RTL source files or read in the elaborated design (DDC).
#################################################################################
define_design_lib WORK -path ./worklib
if { [llength $verilog_source_list] } {
echo "Information: Analyzing Verilog sources ... "
analyze -format verilog $verilog_source_list
}
if { [llength $vhdl_source_list] } {
echo "Information: Analyzing VHDL sources ... "
analyze -format vhdl $vhdl_source_list
}
if { [llength $systemverilog_source_list] } {
echo "Information: Analyzing SystemVerilog sources ... "
analyze -format sverilog $systemverilog_source_list
}
echo "Information: Elaborating top-level '$DESIGN_NAME' ... "
elaborate $DESIGN_NAME
write -format ddc -hierarchy -output $RESULTS_DIR/${DESIGN_NAME}.elab.ddc
list_designs -show_file > $REPORTS_DIR/$DESIGN_NAME.elab.list_designs
report_reference -hier > $REPORTS_DIR/$DESIGN_NAME.elab.report_reference
echo "Information: Linking design ... "
link > $REPORTS_DIR/$DESIGN_NAME.link
############################################################################
# Apply Logical Design Constraints
############################################################################
echo "Information: Reading design constraints ... "
set constraints_file %s
if {$constraints_file != 0} {
source -echo -verbose ${constraints_file}
}
# Enable area optimization in all flows
set_max_area 0
############################################################################
# Create Default Path Groups
# Remove these path group settings if user path groups already defined
############################################################################
set ports_clock_root [get_ports [all_fanout -flat -clock_tree -level 0]]
group_path -name REGOUT -to [all_outputs]
group_path -name REGIN -from [remove_from_collection [all_inputs] $ports_clock_root]
group_path -name FEEDTHROUGH -from [remove_from_collection [all_inputs] $ports_clock_root] -to [all_outputs]
#################################################################################
# Power Optimization Section
#################################################################################
if ($clock_gating_enabled) {
set_clock_gating_style \
-positive_edge_logic integrated \
-negative_edge_logic integrated \
-control_point before \
-minimum_bitwidth 4 \
-max_fanout 8
}
#############################################################################
# Apply Power Optimization Constraints
#############################################################################
# Include a SAIF file, if possible, for power optimization
# read_saif -auto_map_names -input ${DESIGN_NAME}.saif -instance < DESIGN_INSTANCE > -verbose
if {[shell_is_in_topographical_mode]} {
# Enable power prediction for this DC-T session using clock tree estimation.
set_power_prediction true
}
# set_max_leakage_power 0
# set_max_dynamic_power 0
set_max_total_power 0
if {[shell_is_in_topographical_mode]} {
# Specify ignored layers for routing to improve correlation
# Use the same ignored layers that will be used during place and route
if { $DCT_IGNORED_ROUTING_LAYERS != ""} {
set_ignored_layers $DCT_IGNORED_ROUTING_LAYERS
}
report_ignored_layers
# Apply Physical Design Constraints
# set_fuzzy_query_options -hierarchical_separators {/ _ .} \
# -bus_name_notations {[] __ ()} \
# -class {cell pin port net} \
# -show
#extract_physical_constraints $ICPRO_DIR/units/top/export/encounter/$DESIGN_NAME.def
extract_physical_constraints ./$DESIGN_NAME.def
# OR
# source -echo -verbose ${DESIGN_NAME}.physical_constraints.tcl
}
#
# check design
#
echo "Information: Checking design (see '$REPORTS_DIR/$DESIGN_NAME.check_design'). "
check_design > $REPORTS_DIR/$DESIGN_NAME.check_design
#########################################################
# Apply Additional Optimization Constraints
#########################################################
# Prevent assignment statements in the Verilog netlist.
set verilogout_no_tri true
# Uniquify design
uniquify -dont_skip_empty_designs
#########################################################
# Compile the Design
#
# Recommended Options:
#
# -scan
# -retime
# -timing_high_effort_script
# -area_high_effort_script
#
#########################################################
echo "Information: Starting top down compilation (compile_ultra) ... "
remove_unconnected_ports [find cell -hierarchy *]
#
# set to true to enable
# enable scan insertion during compilation
#
if { %s } {
# compile design using scan ffs
compile_ultra -scan
#
# modify insert_scan_script template for your DFT requirements
#
set insert_scan_script "./scripts/${DESIGN_NAME}.insert_scan.tcl"
if { ! [file exists $insert_scan_script] } {
echo "ERROR: Insert scan script '$insert_scan_script' not found. "
exit 1
} else {
source $insert_scan_script
}
} else {
# compilation without scan insertion
# added option to keep hierarchy
compile_ultra %s
}
echo "Information: Finished top down compilation. "
#################################################################################
# Write Out Final Design
#################################################################################
remove_unconnected_ports [find cell -hierarchy *]
change_names -rules verilog -hierarchy
echo "Information: Writing results to '$RESULTS_DIR' ... "
write -format ddc -hierarchy -output $RESULTS_DIR/${DESIGN_NAME}.ddc
write -f verilog -hier -output $RESULTS_DIR/${DESIGN_NAME}.v
if {[shell_is_in_topographical_mode]} {
# write_milkyway uses: mw_logic1_net, mw_logic0_net and mw_design_library variables from dc_setup.tcl
#write_milkyway -overwrite -output ${DESIGN_NAME}_DCT
write_physical_constraints -output ${RESULTS_DIR}/${DESIGN_NAME}.mapped.physical_constraints.tcl
# Do not write out net RC info into SDC
set write_sdc_output_lumped_net_capacitance false
set write_sdc_output_net_resistance false
}
# Write SDF backannotation data
write_sdf $RESULTS_DIR/${DESIGN_NAME}.sdf
write_sdc -nosplit $RESULTS_DIR/${DESIGN_NAME}.sdc
echo "Information: Writing reports to '$REPORTS_DIR' ... "
#
# check timing/contraints
#
report_design > $REPORTS_DIR/$DESIGN_NAME.report_design
check_timing > $REPORTS_DIR/$DESIGN_NAME.check_timing
report_port > $REPORTS_DIR/$DESIGN_NAME.report_port
report_timing_requirements > $REPORTS_DIR/$DESIGN_NAME.report_timing_requirements
report_clock > $REPORTS_DIR/$DESIGN_NAME.report_clock
report_constraint > $REPORTS_DIR/$DESIGN_NAME.report_constraint
set timing_bidirectional_pin_max_transition_checks "driver"
report_constraint -max_transition -all_vio >> $REPORTS_DIR/$DESIGN_NAME.report_constraint
set timing_bidirectional_pin_max_transition_checks "load"
report_constraint -max_transition -all_vio >> $REPORTS_DIR/$DESIGN_NAME.report_constraint
report_constraints -all_violators > ${REPORTS_DIR}/${DESIGN_NAME}.report_constraints_all_violators
#
# report design
#
report_timing -max_paths 10 > $REPORTS_DIR/$DESIGN_NAME.report_timing
report_area > $REPORTS_DIR/$DESIGN_NAME.report_area
report_power > $REPORTS_DIR/$DESIGN_NAME.report_power
report_fsm > $REPORTS_DIR/$DESIGN_NAME.report_fsm
exit
"""
|
# Constants and functions for Marsaglia bits ingestion
# constants
FILE_BASE = '/media/alxfed/toca/bits.'
FILE_NUMBER_MIN = 1
FILE_NUMBER_MAX = 60
# pseudo-constants
FILE_EXTENSION = [str(i).zfill(2) for i in range(FILE_NUMBER_MIN, FILE_NUMBER_MAX + 1)]
# starts with 0 element and ends with 59, that's why the dance in the function
# pseudo-function
def file_name(n=1):
if n in range(FILE_NUMBER_MIN, FILE_NUMBER_MAX+1): # +1 because...
return FILE_BASE + FILE_EXTENSION[n-1] # -1 because...
else:
raise ValueError('There is no such file in Marsaglia set of bits')
|
#!/usr/bin/env python
#pylint: skip-file
# This source code is licensed under the Apache license found in the
# LICENSE file in the root directory of this project.
class Field(object):
def __init__(self):
"""
Attributes:
swaggerTypes (dict): The key is attribute name and the value is attribute type.
attributeMap (dict): The key is attribute name and the value is json key in definition.
"""
self.swaggerTypes = {
'modifiers': 'int',
'name': 'str',
'synthetic': 'bool',
'declaringClass': 'Class«object»',
'declaredAnnotations': 'list[Annotation]',
'enumConstant': 'bool',
'type': 'Class«object»',
'genericType': 'Type',
'annotations': 'list[Annotation]',
'accessible': 'bool'
}
self.attributeMap = {
'modifiers': 'modifiers',
'name': 'name',
'synthetic': 'synthetic',
'declaringClass': 'declaringClass',
'declaredAnnotations': 'declaredAnnotations',
'enumConstant': 'enumConstant',
'type': 'type',
'genericType': 'genericType',
'annotations': 'annotations',
'accessible': 'accessible'
}
self.modifiers = None # int
self.name = None # str
self.synthetic = None # bool
self.declaringClass = None # Class«object»
self.declaredAnnotations = None # list[Annotation]
self.enumConstant = None # bool
self.type = None # Class«object»
self.genericType = None # Type
self.annotations = None # list[Annotation]
self.accessible = None # bool
|
#!/usr/bin/env python
# -*- coding=utf-8 -*-
aString = 'hello world'
print(aString)
aString = aString + ' Python' # 可以拼接
print(aString)
aString = 'huangxiang' # 也可以重新赋值
print(aString)
"""输出结果
hello world
hello world Python
huangxiang
"""
|
ENV_PARAMS = ("temperature", "salinity", "pressure", "sound_speed", "sound_absorption")
CAL_PARAMS = {
"EK": ("sa_correction", "gain_correction", "equivalent_beam_angle"),
"AZFP": ("EL", "DS", "TVR", "VTX", "equivalent_beam_angle", "Sv_offset"),
}
class CalibrateBase:
"""Class to handle calibration for all sonar models."""
def __init__(self, echodata):
self.echodata = echodata
self.env_params = None # env_params are set in child class
self.cal_params = None # cal_params are set in child class
# range_meter is computed in compute_Sv/Sp in child class
self.range_meter = None
def get_env_params(self, **kwargs):
pass
def get_cal_params(self, **kwargs):
pass
def compute_range_meter(self, **kwargs):
"""Calculate range in units meter.
Returns
-------
range_meter : xr.DataArray
range in units meter
"""
pass
def _cal_power(self, cal_type, **kwargs):
"""Calibrate power data for EK60, EK80, and AZFP.
Parameters
----------
cal_type : str
'Sv' for calculating volume backscattering strength, or
'Sp' for calculating point backscattering strength
"""
pass
def compute_Sv(self, **kwargs):
pass
def compute_Sp(self, **kwargs):
pass
def _add_params_to_output(self, ds_out):
"""Add all cal and env parameters to output Sv dataset."""
# Add env_params
for key, val in self.env_params.items():
ds_out[key] = val
# Add cal_params
for key, val in self.cal_params.items():
ds_out[key] = val
return ds_out
|
# Leetcode 138. Copy List with Random Pointer
#
# Link: https://leetcode.com/problems/copy-list-with-random-pointer/
# Difficulty: Medium
# Complexity:
# O(N) time | where N represent the number of elements in the linked list
# O(1) space
"""
# Definition for a Node.
class Node:
def __init__(self, x: int, next: 'Node' = None, random: 'Node' = None):
self.val = int(x)
self.next = next
self.random = random
"""
class Solution:
def copyRandomList(self, head: 'Optional[Node]') -> 'Optional[Node]':
node = head
if not head:
return head
while node:
new_node = Node(node.val, node.next)
node.next = new_node
node = new_node.next
node = head
while node:
if node.random:
node.next.random = node.random.next
node = node.next.next
node = head
copy_head = head.next
result = copy_head
while result.next:
node.next = node.next.next
node = node.next
result.next = result.next.next
result = result.next
return copy_head
|
def organise(records):
# { user: {shop -> {day -> counter}}}
res = {}
for person, shop, day in records:
if person and shop and (0 < day < 8):
if person not in res:
res[person] = {}
if shop not in res[person]:
res[person][shop] = {}
if day not in res[person][shop]:
res[person][shop][day] = 0
res[person][shop][day] += 1
return res
assert(organise([]) == {})
assert(organise([('Tom', '', 5), ('Tom', 'Aldi', 4)]) == {'Tom': {'Aldi': {4: 1}}})
assert(organise([('Tom', 'Aldi', 5), ('Tom', 'Aldi', 5)]) == {'Tom': {'Aldi': {5: 2}}})
assert(organise([('Tom', 'Aldi', 1), ('Tom', 'Migros', 4), ('Jack', 'Aldi', 5)]) == {'Jack': {'Aldi': {5: 1}}, 'Tom': {'Aldi': {1: 1}, 'Migros': {4: 1}}}) |
n1=int(input('digite um valor'))
d=n1*2
t=n1*3
r=n1**(1/2)
print('O dobro do valor {} é {}, o triplo é {} e a raiz quadrada é {}'.format(n1,d,t,r)) |
"""
70.49%
"""
class Solution(object):
def isHappy(self, n):
"""
:type n: int
:rtype: bool
"""
if n == 0 or n == 1:
return True
x = [n]
curr = n
ishappy = False
while True:
digits = list(str(curr))
curr = 0
for d in digits:
curr += int(d) ** 2
x.append(curr)
if curr == 1:
ishappy = True
if x.count(curr) >= 2:
break
return ishappy |
"""
Crie um Programa que leia nome, sexo e idade de várias pessoas, guardando os dados de cada pessoa em um dicionário, e
todos os dicionários em uma lista. No final, mostre:
- Quantas pessoas foram cadastradas
- A média de Idade do grupo
- Uma lista com todas as mulheres
- Uma lista com todas as pessoas com idade acima da média
"""
pessoas = {}
lista = []
soma = media = 0
while True:
pessoas.clear()
pessoas['Nome'] = str(input('Nome: ')).strip()
while True:
pessoas['Sexo'] = str(input('Sexo [M/F]: ')).strip().upper()
if pessoas['Sexo'] in 'MF':
break
print('ERRO!! Digite apenas M ou F!!')
pessoas['Idade'] = int(input('Idade: '))
soma += pessoas['Idade']
lista.append(pessoas.copy())
while True:
conf = str(input('Continuar? [S/N]: ')).strip().upper()
if conf in 'SN':
break
print('ERRO!! Digite apeas S ou N!!')
if conf == 'N':
break
media = soma / len(lista)
print('-=' * 40)
print(f'- O grupo tem {len(lista)} pessoas')
print(f'- A média de idade do grupo é {media:5.2f} anos')
print('- As mulheres cadastradas foram:', end=' ')
for m in lista:
if m['Sexo'] == 'F':
print(f'{m["Nome"]}', end=' ')
print()
print('-' * 60)
print('- A lista das pessoas com idade acima da média: ')
print()
for p in lista:
if p['Idade'] > media:
for k, v in p.items():
print(f'{k} = {v}', end='; ')
print() |
"""
.. Copyright (c) 2016 Marshall Farrier
license http://opensource.org/licenses/MIT
Constants for working with an options database
"""
LOG = {
'format': "%(asctime)s %(levelname)s %(module)s.%(funcName)s : %(message)s",
'path': 'mfstockmkt/options/db'
}
DB = {
'dev': {
'name': 'test'
},
'prod': {
'name': 'optMkt'
}
}
INT_COLS = ('Vol', 'Open_Int',)
FLOAT_COLS = ('Last', 'Bid', 'Ask',)
MAX_RETRIES = {
'dev': 2,
'prod': 4,
}
|
"""
File for global constants used in the program.
"""
# a constant
nsensors_taska = 5
nsensors_luke = 19
nsensors = nsensors_luke
nencoded = nsensors_luke
nfeat = 1
nelectrodes = 300
|
'''
Convenience wrappers to make using the conf system as easy and seamless as possible
'''
def integrate(hub, imports, override=None, cli=None, roots=None, home_root=None, loader='json'):
'''
Load the conf sub and run the integrate sequence.
'''
hub.pop.sub.add('pop.mods.conf')
hub.conf.integrate.load(imports, override, cli=cli, roots=roots, home_root=home_root, loader=loader)
|
#!/usr/bin/env python
# create pipeline
#
reader = vtk.vtkDataSetReader()
reader.SetFileName("" + str(VTK_DATA_ROOT) + "/Data/RectGrid2.vtk")
reader.Update()
# here to force exact extent
elev = vtk.vtkElevationFilter()
elev.SetInputConnection(reader.GetOutputPort())
elev.Update()
outline = vtk.vtkRectilinearGridOutlineFilter()
outline.SetInputData(elev.GetRectilinearGridOutput())
outlineMapper = vtk.vtkPolyDataMapper()
outlineMapper.SetInputConnection(outline.GetOutputPort())
outlineMapper.SetNumberOfPieces(2)
outlineMapper.SetPiece(1)
outlineActor = vtk.vtkActor()
outlineActor.SetMapper(outlineMapper)
outlineActor.GetProperty().SetColor(black)
# Graphics stuff
# Create the RenderWindow, Renderer and both Actors
#
ren1 = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.SetMultiSamples(0)
renWin.AddRenderer(ren1)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
# Add the actors to the renderer, set the background and size
#
ren1.AddActor(outlineActor)
ren1.SetBackground(1,1,1)
renWin.SetSize(400,400)
cam1 = ren1.GetActiveCamera()
cam1.SetClippingRange(3.76213,10.712)
cam1.SetFocalPoint(-0.0842503,-0.136905,0.610234)
cam1.SetPosition(2.53813,2.2678,-5.22172)
cam1.SetViewUp(-0.241047,0.930635,0.275343)
iren.Initialize()
# render the image
#
# prevent the tk window from showing up then start the event loop
# --- end of script --
|
# Find the 10001st prime using the Sieve of Eratosthenes
def sieve(n):
sieve = [True] * (n + 1)
sieve[0] = sieve[1] = False
for i in range(2, (n + 1)):
if sieve[i]:
for j in range(i*i, (n + 1), i):
sieve[j] = False
return sieve
prime_sieve = sieve(400000);
primes = []
for idx, val in enumerate(prime_sieve):
if val:
primes.append(idx)
print(primes[10000]) |
class Node:
# Constructor to initialize the node object
def __init__(self, data):
self.data = data
self.next = None
class LinkedList:
# Function to initialize head
def __init__(self):
self.head = None
# Function to insert a new node at the beginning
def push(self, new_data):
new_node = Node(new_data)
new_node.next = self.head
self.head = new_node
# Utility function to prit the linked LinkedList
def printList(self):
temp = self.head
while(temp):
print (temp.data),
temp = temp.next
def detectLoop(self):
slow_p = self.head
fast_p = self.head
while(slow_p and fast_p and fast_p.next):
slow_p = slow_p.next
fast_p = fast_p.next.next
if slow_p == fast_p:
print ("Found Loop")
return
print ("Not Found Loop")
# Driver program for testing
llist = LinkedList()
llist.push(20)
llist.push(4)
llist.push(15)
llist.push(10)
# Create a loop for testing
llist.head.next.next.next.next = llist.head
llist.detectLoop()
|
def bubble(alist):
for first in range(len(alist)-1,0,-1):
for sec in range(first):
if alist[sec] > alist[sec+1]:
tmp = alist[sec+1]
alist[sec+1] = alist[sec]
alist[sec] = tmp
def test_bubble():
alist = [1,7,2,5,9,12,5]
bubble(alist)
assert alist[0] == 1
assert alist[1] == 2
assert alist[6] == 12
assert alist[5] == 9
def short_bubble(alist):
exchange = True
first = len(alist) - 1
while first > 0 and exchange:
exchange = False
for sec in range(first):
if alist[sec] > alist[sec+1]:
exchange = True
tmp = alist[sec+1]
alist[sec+1] = alist[sec]
alist[sec] = tmp
first -= 1
def test_short_bubble():
alist = [1,4,5,2,19,3,7]
short_bubble(alist)
assert alist[0] == 1
assert alist[1] == 2
assert alist[6] == 19
assert alist[5] == 7
|
"""
>>> from datetime import datetime, timedelta
>>> from django.utils.timesince import timesince
>>> t = datetime(2007, 8, 14, 13, 46, 0)
>>> onemicrosecond = timedelta(microseconds=1)
>>> onesecond = timedelta(seconds=1)
>>> oneminute = timedelta(minutes=1)
>>> onehour = timedelta(hours=1)
>>> oneday = timedelta(days=1)
>>> oneweek = timedelta(days=7)
>>> onemonth = timedelta(days=30)
>>> oneyear = timedelta(days=365)
# equal datetimes.
>>> timesince(t, t)
u'0 minutes'
# Microseconds and seconds are ignored.
>>> timesince(t, t+onemicrosecond)
u'0 minutes'
>>> timesince(t, t+onesecond)
u'0 minutes'
# Test other units.
>>> timesince(t, t+oneminute)
u'1 minute'
>>> timesince(t, t+onehour)
u'1 hour'
>>> timesince(t, t+oneday)
u'1 day'
>>> timesince(t, t+oneweek)
u'1 week'
>>> timesince(t, t+onemonth)
u'1 month'
>>> timesince(t, t+oneyear)
u'1 year'
# Test multiple units.
>>> timesince(t, t+2*oneday+6*onehour)
u'2 days, 6 hours'
>>> timesince(t, t+2*oneweek+2*oneday)
u'2 weeks, 2 days'
# If the two differing units aren't adjacent, only the first unit is displayed.
>>> timesince(t, t+2*oneweek+3*onehour+4*oneminute)
u'2 weeks'
>>> timesince(t, t+4*oneday+5*oneminute)
u'4 days'
# When the second date occurs before the first, we should always get 0 minutes.
>>> timesince(t, t-onemicrosecond)
u'0 minutes'
>>> timesince(t, t-onesecond)
u'0 minutes'
>>> timesince(t, t-oneminute)
u'0 minutes'
>>> timesince(t, t-onehour)
u'0 minutes'
>>> timesince(t, t-oneday)
u'0 minutes'
>>> timesince(t, t-oneweek)
u'0 minutes'
>>> timesince(t, t-onemonth)
u'0 minutes'
>>> timesince(t, t-oneyear)
u'0 minutes'
>>> timesince(t, t-2*oneday-6*onehour)
u'0 minutes'
>>> timesince(t, t-2*oneweek-2*oneday)
u'0 minutes'
>>> timesince(t, t-2*oneweek-3*onehour-4*oneminute)
u'0 minutes'
>>> timesince(t, t-4*oneday-5*oneminute)
u'0 minutes'
"""
|
#
# PySNMP MIB module TPLINK-ETHERNETOAM-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TPLINK-ETHERNETOAM-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 21:17:08 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
ModuleIdentity, Gauge32, IpAddress, MibIdentifier, Integer32, Bits, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, Counter64, TimeTicks, iso, Counter32, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "Gauge32", "IpAddress", "MibIdentifier", "Integer32", "Bits", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "Counter64", "TimeTicks", "iso", "Counter32", "Unsigned32")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
tplinkMgmt, = mibBuilder.importSymbols("TPLINK-MIB", "tplinkMgmt")
tplinkEthernetOam = ModuleIdentity((1, 3, 6, 1, 4, 1, 11863, 6, 60))
tplinkEthernetOam.setRevisions(('2015-07-06 10:30',))
if mibBuilder.loadTexts: tplinkEthernetOam.setLastUpdated('201507061030Z')
if mibBuilder.loadTexts: tplinkEthernetOam.setOrganization('TPLINK')
tplinkEthernetOamMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 60, 1))
tplinkEthernetOamMIBNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 60, 2))
ethernetOamBasicConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 60, 1, 1))
ethernetOamLinkMonConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 60, 1, 2))
ethernetOamRfiConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 60, 1, 3))
ethernetOamRmtLbConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 60, 1, 4))
ethernetOamDiscoveryInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 60, 1, 5))
ethernetOamStatistics = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 60, 1, 6))
ethernetOamEventLog = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 60, 1, 7))
mibBuilder.exportSymbols("TPLINK-ETHERNETOAM-MIB", ethernetOamBasicConfig=ethernetOamBasicConfig, ethernetOamStatistics=ethernetOamStatistics, ethernetOamDiscoveryInfo=ethernetOamDiscoveryInfo, ethernetOamLinkMonConfig=ethernetOamLinkMonConfig, ethernetOamRfiConfig=ethernetOamRfiConfig, ethernetOamEventLog=ethernetOamEventLog, tplinkEthernetOamMIBObjects=tplinkEthernetOamMIBObjects, PYSNMP_MODULE_ID=tplinkEthernetOam, ethernetOamRmtLbConfig=ethernetOamRmtLbConfig, tplinkEthernetOamMIBNotifications=tplinkEthernetOamMIBNotifications, tplinkEthernetOam=tplinkEthernetOam)
|
class ParticleInstanceModifier:
axis = None
object = None
particle_system_index = None
position = None
random_position = None
show_alive = None
show_dead = None
show_unborn = None
use_children = None
use_normal = None
use_path = None
use_preserve_shape = None
use_size = None
|
"""
Author: 陈天翼(Apollo Chen)
Date: 2019-02-18
Description: 学习重点:随机函数,字符串函数,汉字处理,字体函数,列表
"""
lines = []
def setup() :
global lines, img
size(1024, 576)
strings = [u"2019 新年快乐!", u"Happy New Year!", u"不用熬夜,心想事成。", u"多写程序,万事如意:-)", u"学业有成,找到朋友:-P", u"玩个痛快,老师再见:-("]
#lines = new ArrayList<Line>(strings.length);
textSize = height / 3 / len(strings)
textFont(createFont("Heiti", textSize))
img = loadImage("happynewyear.jpg")
for i in range(len(strings) - 1, -1, -1) :
lines.insert(0, Line((i + 1) * textSize, strings[i]));
def draw() :
global img, lines
image(img, 0, 0, width, height)
for item in lines :
item.update()
item.draw()
class Line :
def __init__(self, lineY, lineString) :
self.__lineY = lineY
self.__lineString = lineString
self.__lineX = width
self.__textWidth = textWidth(self.__lineString)
self.randomSpeed()
def update(self) :
self.__lineX -= self.__speed;
if self.__lineX + self.__textWidth < 0 :
self.randomSpeed()
self.__lineX = width
def draw(self) :
text(self.__lineString, self.__lineX, self.__lineY)
def randomSpeed(self) :
self.__speed = random(2, 5)
|
def FlagsForFile(filename, **kwargs):
return {
'flags': ['-x', 'c++', '-std=c++14', '-Wall', '-Wextra', '-Werror'
,'-I','C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/include'
,'-I','C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/atlmfc/include'
,'-I','C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/VS/include'
,'-I','C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/ucrt'
,'-I','C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/um'
,'-I','C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/shared'
,'-I','C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/winrt'
,'-I','C:/Program Files (x86)/Windows Kits/NETFXSDK/4.6.1/Include/um']
}
|
passOne = input(": ")
passTwo = input(": ")
if len(passOne) < 8:
print("Короткий!")
elif "123" in passOne:
print("Простой!")
elif passOne == passTwo:
print("OK")
else:
print("Различатся.")
|
n = int(input('Digite um valor para calcular seu fatorial: '))
f = 1
print(f'Calculando {n}! = ', end =' ')
for i in range(1, n+1):
print(f'{n}', end = ' ')
print(' x ' if n > 1 else ' = ', end = ' ')
f *= i
n -= 1
print(f) |
class TestTable:
def __init__(self):
self.id = None
self.code = None
DDLCOMMAND = """
CREATE TABLE TestTable (
id INTEGER CONSTRAINT pk_role PRIMARY KEY,
code INTEGER
);
"""
|
def most_common(lst):
return max(lst, key=lst.count)
|
# https://leetcode.com/problems/defanging-an-ip-address
class Solution:
def defangIPaddr(self, address):
if not address:
return ""
ls = address.split(".")
return "[.]".join(ls)
|
BOT = "b"
EMPTY = "-"
DIRT = "d"
def dist(pos1, pos2):
return abs(pos1[0] - pos2[0]) + abs(pos1[1] - pos2[1])
def is_dirt(pos, board):
if min(pos) < 0:
return False
if pos[0] >= len(board):
return False
if pos[1] >= len(board[0]):
return False
if board[pos[0]][pos[1]] != DIRT:
return False
return True
def find_closest_dirt(pos, board, max_distance=0):
if not max_distance:
max_distance = len(board) + len(board[0])
n_moves = 1
start = (pos[0] + n_moves, pos[1])
curr = list(start)
dx, dy = -1, 1
while n_moves <= max_distance:
if is_dirt(curr, board):
return curr
curr[0] += dx
curr[1] += dy
if curr[0] == pos[0]:
dy = -dy
if curr[1] == pos[1]:
dx = -dx
if curr == list(start):
n_moves += 1
start = (pos[0] + n_moves, pos[1])
curr = list(start)
def _next_move(pos, board):
if board[pos[0]][pos[1]] == DIRT:
return "CLEAN"
closest = find_closest_dirt(pos, board)
vector = [closest[0] - pos[0], closest[1] - pos[1]]
dir = ""
if vector[0]:
dir = "DOWN" if vector[0] > 0 else "UP"
else:
dir = "RIGHT" if vector[1] > 0 else "LEFT"
return dir
|
SMALL = 1
MEDIUM = 2
LARGE = 3
ORDER_SIZE = (
(SMALL, u'Small'),
(MEDIUM, u'Medium'),
(LARGE, u'Large')
)
MARGARITA = 1
MARINARA = 2
SALAMI = 3
ORDER_TITLE = (
(1, u'margarita'),
(2, u'marinara'),
(3, u'salami')
)
RECEIVED = 1
IN_PROCESS = 2
OUT_FOR_DELIVERY = 3
DELIVERED = 4
RETURNED = 5
ORDER_STATUS = (
(RECEIVED, u'Received'),
(IN_PROCESS, u'In Process'),
(OUT_FOR_DELIVERY, u'Out For Delivery'),
(DELIVERED, u'Delivered'),
(RETURNED, u'Returned')
)
|
word = input("Введите строку: ")
if len(word) > 5:
print(len(word))
elif len(word) < 5:
print("Need more!")
elif len(word) == 5:
print("It's five")
|
# I decided to write a code that generates data filtering object from a list of keyword parameters:
class Filter:
"""
Helper filter class. Accepts a list of single-argument
functions that return True if object in list conforms to some criteria
"""
def __init__(self, functions):
self.functions = functions
def apply(self, data):
return [
item for item in data
if all(i(item) for i in self.functions)
]
# example of usage:
# positive_even = Filter(lamba a: a % 2 == 0, lambda a: a > 0, lambda a: isinstance(int, a)))
# positive_even.apply(range(100)) should return only even numbers from 0 to 99
def make_filter(**keywords):
"""
Generate filter object for specified keywords
"""
filter_funcs = []
for key, value in keywords.items():
def keyword_filter_func(value):
return value[key] == value
filter_funcs.append(keyword_filter_func)
return Filter(filter_funcs)
sample_data = [
{
"name": "Bill",
"last_name": "Gilbert",
"occupation": "was here",
"type": "person",
},
{
"is_dead": True,
"kind": "parrot",
"type": "bird",
"name": "polly"
}
]
# make_filter(name='polly', type='bird').apply(sample_data) should return only second entry from the list
# There are multiple bugs in this code. Find them all and write tests for faulty cases.
|
def fatorial(n):
num = 1
while n >= 1:
num = num * n
n = n - 1
return num
digit = int(input('numero para mostra o fatorial '))
print(fatorial(digit)) |
# Time: O(n^2)
# Space: O(n)
class Solution(object):
def minSkips(self, dist, speed, hoursBefore):
"""
:type dist: List[int]
:type speed: int
:type hoursBefore: int
:rtype: int
"""
def ceil(a, b):
return (a+b-1)//b
dp = [0]*((len(dist)-1)+1) # dp[i]: (min time by i skips) * speed
for i, d in enumerate(dist):
for j in reversed(xrange(len(dp))):
dp[j] = ceil(dp[j]+d, speed)*speed if i < len(dist)-1 else dp[j]+d
if j-1 >= 0:
dp[j] = min(dp[j], dp[j-1]+d)
target = hoursBefore*speed
for i in xrange(len(dist)):
if dp[i] <= target:
return i
return -1
|
#!/usr/bin/python3
cars = ['bmw', 'audi', 'toyota', 'subaru']
cars.sort()
print(cars)
cars.sort(reverse=True)
print(cars)
print("\nHere is the sorted list:")
print(sorted(cars))
print("\nHere is the sorted list(reverse=True):")
print(sorted(cars, reverse = True))
print("\nHere is the original list:")
print(cars)
print(len(cars))
|
#
# PySNMP MIB module CISCO-CBP-TARGET-TC-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-CBP-TARGET-TC-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:52:40 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion")
ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, ModuleIdentity, IpAddress, NotificationType, Gauge32, Integer32, Unsigned32, iso, Bits, ObjectIdentity, MibIdentifier, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "ModuleIdentity", "IpAddress", "NotificationType", "Gauge32", "Integer32", "Unsigned32", "iso", "Bits", "ObjectIdentity", "MibIdentifier", "Counter64")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
ciscoCbpTargetTCMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 511))
ciscoCbpTargetTCMIB.setRevisions(('2006-03-24 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ciscoCbpTargetTCMIB.setRevisionsDescriptions(('Initial version.',))
if mibBuilder.loadTexts: ciscoCbpTargetTCMIB.setLastUpdated('200603240000Z')
if mibBuilder.loadTexts: ciscoCbpTargetTCMIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts: ciscoCbpTargetTCMIB.setContactInfo(' Cisco Systems Customer Service Postal: 170 W. Tasman Drive San Jose, CA 95134-1706 USA Tel: +1 800 553-NETS E-mail: [email protected], [email protected]')
if mibBuilder.loadTexts: ciscoCbpTargetTCMIB.setDescription('This MIB module defines Textual Conventions for representing targets which have class based policy mappings. A target can be any logical interface or entity to which a class based policy is able to be associated.')
class CcbptTargetType(TextualConvention, Integer32):
description = 'A Textual Convention that represents a type of target. genIf(1) A target of type interface defined by CcbptTargetIdIf Textual Convention. atmPvc(2) A target of type ATM PVC defined by the CcbptTargetIdAtmPvc Textual Convention. frDlci(3) A target of type Frame Relay DLCI defined by the CcbptTargetIdFrDlci Textual Convention. entity(4) A target of type entity defined by the CcbptTargetIdEntity Textual Convention. This target type is used to indicate the attachment of a Class Based Policy to a physical entity. fwZone(5) A target of type Firewall Security Zone defined by the CcbptTargetIdNameString Textual Convention. fwZonePair(6) A target of type Firewall Security Zone defined by the CcbptTargetIdNameString Textual Convention. aaaSession(7) A target of type AAA Session define by the CcbptTargetIdAaaSession Textual Convention. '
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))
namedValues = NamedValues(("genIf", 1), ("atmPvc", 2), ("frDlci", 3), ("entity", 4), ("fwZone", 5), ("fwZonePair", 6), ("aaaSession", 7))
class CcbptTargetDirection(TextualConvention, Integer32):
description = 'A Textual Convention that represents a direction for a target. undirected(1) Indicates that direction has no meaning relative to the target. input(2) Refers to the input direction relative to the target. output(3) Refers to the output direction relative to the target. inOut(4) Refers to both the input and output directions relative to the target. '
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))
namedValues = NamedValues(("undirected", 1), ("input", 2), ("output", 3), ("inOut", 4))
class CcbptTargetId(TextualConvention, OctetString):
description = 'Denotes a generic target ID. A CcbptTargetId value is always interpreted within the context of an CcbptTargetType value. Every usage of the CcbptTargetId Textual Convention is required to specify the CcbptTargetType object which provides the context. It is suggested that the CcbptTargetType object is logically registered before the object(s) which use the CcbptTargetId Textual Convention if they appear in the same logical row. The value of an CcbptTargetId object must always be consistent with the value of the associated CcbptTargetType object. Attempts to set a CcbptTargetId object to a value which is inconsistent with the associated targetType must fail with an inconsistentValue error. '
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 64)
class CcbptTargetIdIf(TextualConvention, OctetString):
description = 'Represents an interface target: octets contents encoding 1-4 ifIndex network-byte order '
status = 'current'
displayHint = '4d'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(4, 4)
fixedLength = 4
class CcbptTargetIdAtmPvc(TextualConvention, OctetString):
description = 'Represents an ATM PVC target: octets contents encoding 1-4 ifIndex network-byte order 5-6 atmVclVpi network-byte order 7-8 atmVclVci network-byte order '
status = 'current'
displayHint = '4d:2d:2d'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(8, 8)
fixedLength = 8
class CcbptTargetIdFrDlci(TextualConvention, OctetString):
description = 'Represents a Frame Relay DLCI target: octets contents encoding 1-4 ifIndex network-byte order 5-6 DlciNumber network-byte order '
status = 'current'
displayHint = '4d:2d'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(6, 6)
fixedLength = 6
class CcbptTargetIdEntity(TextualConvention, OctetString):
description = 'Represents the entPhysicalIndex of the physical entity target: octets contents encoding 1-4 entPhysicalIndex network-byte order '
status = 'current'
displayHint = '4d'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(4, 4)
fixedLength = 4
class CcbptTargetIdNameString(TextualConvention, OctetString):
description = 'Represents a target identified by a name string. This is the ASCII name identifying this target. '
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 64)
class CcbptTargetIdAaaSession(TextualConvention, OctetString):
description = 'Represents a AAA Session target: octets contents encoding 1-4 casnSessionId network-byte order '
status = 'current'
displayHint = '4d'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(4, 4)
fixedLength = 4
class CcbptPolicySourceType(TextualConvention, Integer32):
description = 'This Textual Convention represents the types of sources of policies. ciscoCbQos(1) Cisco Class Based QOS policy source. The source of the policy is Cisco Class Based QOS specific. ciscoCbpCommon(2) Cisco Common Class Based Policy type. The source of the policy is Cisco Common Class Based. '
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("ciscoCbQos", 1), ("ciscoCbpBase", 2))
class CcbptPolicyIdentifier(TextualConvention, Unsigned32):
description = 'A type specific, arbitrary identifier uniquely given to a policy-map attachment to a target. '
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 4294967295)
class CcbptPolicyIdentifierOrZero(TextualConvention, Unsigned32):
description = 'This refers to CcbptPolicyIdentifier values, as applies, or 0. The behavior of the value of 0 should be described in the description of objects using this type. '
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 4294967295)
mibBuilder.exportSymbols("CISCO-CBP-TARGET-TC-MIB", PYSNMP_MODULE_ID=ciscoCbpTargetTCMIB, CcbptTargetIdEntity=CcbptTargetIdEntity, CcbptPolicySourceType=CcbptPolicySourceType, CcbptTargetDirection=CcbptTargetDirection, CcbptTargetIdAaaSession=CcbptTargetIdAaaSession, ciscoCbpTargetTCMIB=ciscoCbpTargetTCMIB, CcbptTargetIdIf=CcbptTargetIdIf, CcbptTargetIdFrDlci=CcbptTargetIdFrDlci, CcbptTargetId=CcbptTargetId, CcbptTargetIdNameString=CcbptTargetIdNameString, CcbptTargetType=CcbptTargetType, CcbptTargetIdAtmPvc=CcbptTargetIdAtmPvc, CcbptPolicyIdentifierOrZero=CcbptPolicyIdentifierOrZero, CcbptPolicyIdentifier=CcbptPolicyIdentifier)
|
lanche = ('Hambúrguer', 'Suco', 'Pizza', 'Pudim', 'Batata Frita')
a = (5, 7, 3, 9, 2)
print(sorted(lanche))
print(sorted(a))
# COLOCA A TUPLA EM ORDEM
# TRANSFORMANDO () EM [] => OU SEJA, TRANSFORMANDO A TUPLA EM LISTA (para que possa ser "mutável")
|
o = c50 = c20 = c10 = r = 0
while True:
o = int(input('Quanto voce deseja sacar? '))
r = o
while r >= 50:
c50 += 1
r = r - 50
while r >= 20:
c20 += 1
r = r - 20
while r > 10:
c10 += 1
r = r - 10
if r < 10:
break
print(f'Para o valor de R$ {o}')
if c50 >0:
print(f'Foram emitidas {c50} cedulas de R$ 50')
if c20>0:
print(f'Foram emitidas {c20} cedulas de R$ 20')
if c10>0:
print(f'Foram emitidas {c10} cedulas de R$ 10')
if r>0:
print(f'Foram emitidas {r} cedulas de R$ 1')
|
__version__ = "3.12.1"
CTX_PROFILE = "PROFILE"
CTX_DEFAULT_PROFILE = "default"
|
"""Mark this test directory as a package.
See https://github.com/python/mypy/issues/4008 for more info.
"""
|
"""
{{package}} module.
---------------
{{description}}
Author: {{author}}
Email: {{email}}
"""
|
class Query:
def __init__(self, data, res={}):
self.res = res
self.data = data
def clear(self):
self.res = {}
def get(self):
return self.res
def documentAtTime(self, query, model):
self.data.clearScore()
# pLists = {}
query = query.split()
queryTermCount = {}
# pointer = {}
for term in query:
if term in queryTermCount:
queryTermCount[term] += 1
else:
queryTermCount[term] = 1
# def skipTo(maxDocId, pointer, term):
# while pointer[term] < len(pLists[term]) and pLists[term][pointer[term]].getDocId() < maxDocId:
# pointer[term] += 1
for doc in sorted(self.data.documents.values(), key=lambda x: x.docId):
score = 0
for term in query:
if doc.docId in self.data.invertedIndex.db[term] :
score += model(term, doc, self.data, queryTermCount)
doc.score = score
return list(sorted(self.data.documents.values(), key=lambda x: x.score, reverse=True))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.