This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| 以下の論文で提案された改良x-means法の実装 | |
| クラスター数を自動決定するk-meansアルゴリズムの拡張について | |
| http://www.rd.dnc.ac.jp/~tunenori/doc/xmeans_euc.pdf | |
| """ | |
| import numpy as np | |
| from scipy import stats | |
| from sklearn.cluster import KMeans |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pyaudio | |
| import wave | |
| FORMAT = pyaudio.paInt16 | |
| CHANNELS = 2 | |
| RATE = 44100 | |
| CHUNK = 1024 | |
| RECORD_SECONDS = 5 | |
| WAVE_OUTPUT_FILENAME = "file.wav" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from starcluster.clustersetup import ClusterSetup | |
| from starcluster.logger import log | |
| class addRepository(ClusterSetup): | |
| def __init__(self, repositories=None): | |
| self.repositories=repositories | |
| if self.repositories: | |
| self.repositories= [repo.strip() for repo in repositories.split(',')] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from Bio import Entrez | |
| def fetch_gene_coordinates(search_term): | |
| handle = Entrez.esearch(db="gene", term=search_term) | |
| rec = Entrez.read(handle) | |
| gene_id = rec["IdList"][0] # assuming best match works | |
| handle = Entrez.efetch(db="gene", id=gene_id, retmode="xml") | |
| rec = Entrez.read(handle)[0] | |
| gene_locus = rec["Entrezgene_locus"][0] |