text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
#!/usr/bin/env python
"""
Testing k-means clustering
for purely random and normally distributed data
"""
import os
import math
import random
from numpy import array, random as numpy_random
from ase.data import chemical_symbols
from kmeans import Point, kmeans, k_from_n
from element_groups import get_element_group
from... | tilde-lab/tilde | tutorials/simple_data_mining/sample_kmeans.py | Python | mit | 2,672 | [
"ASE",
"Gaussian"
] | e097864261127d2fd9b49dd9ccd94720bab8fce2bb48c59b43a70f06b66726dc |
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='statmor... | vrodgom/statmorph | setup.py | Python | bsd-3-clause | 1,364 | [
"Galaxy"
] | 62af965e1f7e121735173a10c4dd9d12a5b68911be696736ffcc63166de2b069 |
'''
(c) GeneGenie Bioinformatics Ltd. 2018
Licensed under the MIT License.
To view a copy of this license, visit <http://opensource.org/licenses/MIT/>.
@author: neilswainston
'''
# pylint: disable=invalid-name
# pylint: disable=too-many-arguments
from Bio import SeqIO
from Bio.PDB.Polypeptide import aa1, d1_to_inde... | synbiochem/synbiochem-learn | gg_learn/utils/biochem_utils.py | Python | mit | 3,485 | [
"RDKit",
"VisIt"
] | 923dad209942c123389c4a2c43b94fce403ccf2b6721c3f36296c11845777def |
# coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# 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 applicab... | google-research/google-research | smu/geometry/utilities_test.py | Python | apache-2.0 | 8,626 | [
"RDKit"
] | ad65e6fb03b3d4b8623766e77a9ca5ee09d7e974d7850bd88c33f3d5e4451d41 |
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for the Earth and Planetary Sciences
# Copyright (C) 2012 - 2017 by the BurnMan team, released under the GNU
# GPL v2 or later.
from __future__ import absolute_import
import scipy.constants
"""
molar gas constant (R) in J mol^-1 K^-1
"""
gas_c... | CaymanUnterborn/burnman | burnman/constants.py | Python | gpl-2.0 | 703 | [
"Avogadro"
] | 1c89a1403003bb7931ebb5d8295b75a8459ff6b453e5ed5b4bbb136fd617aab7 |
"""Step decorators.
Example:
@given("I have an article")
def article(author):
return create_test_article(author=author)
@when("I go to the article page")
def go_to_the_article_page(browser, article):
browser.visit(urljoin(browser.url, "/articles/{0}/".format(article.id)))
@then("I should not see the error... | spinus/pytest-bdd | pytest_bdd/steps.py | Python | mit | 9,874 | [
"VisIt"
] | 5363e87f77574138afc6fdbb1a8c56c448380f89b18fad53d58b62800dbb11c5 |
from setuptools import setup, find_packages
setup(
name = 'pdf_lib',
version = '0.2',
packages = find_packages(),
description = 'packages interacts with pymatgen to generate pdf_lib',
zip_safe = False,
url = 'https://github.com/chiahaoliu/PDF_Lib.git'
)
| chiahaoliu/pdf_lib | setup.py | Python | mit | 283 | [
"pymatgen"
] | 2144cc5cb5ffb90e78a81a8eadc9caf56b9911c91219f8e20d59d0cf612e1ae5 |
#!/usr/bin/env python
import os
import Pegasus.DAX3 as peg
import lsst.daf.persistence as dafPersist
import lsst.log
import lsst.utils
from lsst.obs.test.testMapper import TestMapper
logger = lsst.log.Log.getLogger("workflow")
logger.setLevel(lsst.log.DEBUG)
# hard-coded output repo
# A local output repo is written ... | hsinfang/lsst-notes | workflow/basicProcessCcd/generateDaxExampleTask.py | Python | gpl-3.0 | 3,719 | [
"VisIt"
] | 8cd4755c33c81267e369ef24be805f4e59a5e5120a1cd382f9f871b74053e57d |
'''
Functions to measure observables of a given galaxy sample.
The main observables are:
SFMS, SFM, SMHMR
'''
import numpy as np
# --- centralms ---
from .sham_hack import SMFClass
from . import util as UT
def f_sat(logm, z):
''' satellite fraction (Figure 3 b)
parameterized as
f_sat = B0... | changhoonhahn/centralMS | centralms/observables.py | Python | mit | 19,078 | [
"Galaxy"
] | 855878aa589bdda9a8feb458c4f82e5d03b43b26c86eab73f8c70dceff9fde8c |
"""Sensor that can display the current Home Assistant versions."""
import logging
from datetime import timedelta
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.components.sensor import PLATFORM_S... | Cinntax/home-assistant | homeassistant/components/version/sensor.py | Python | apache-2.0 | 3,842 | [
"TINKER"
] | 888e4676df8d058ad0b2beb10fb8282984670abba17e8ba1d04f0224b320bb4f |
#!/usr/bin/env python3.2
import argparse
import os
import re
import sqlite3
from collections import OrderedDict
from biocode.utils import read_list_file
def main():
"""This is the second script I've written in Python. I'm sure it shows."""
parser = argparse.ArgumentParser( description='Reads a BLAST m8 fil... | jorvis/biocode | taxonomy/create_taxonomic_profile_from_blast.py | Python | mit | 11,261 | [
"BLAST"
] | db856f4aab4c8000e67c5dcb63f0ae16f47fc7469ac687951b18ffcfd5cddddb |
# -*- coding: utf-8 -*-
from datetime import datetime, timedelta
import unittest
import re
import sys
import socket
import os
import tempfile
import contextlib
# for monkey patching config
import stubs
from subscription_manager import managercli, managerlib
from subscription_manager.injection import provide, \
... | nguyenfilip/subscription-manager | test/test_managercli.py | Python | gpl-2.0 | 62,718 | [
"BLAST"
] | fad048d91cd865a135f2d5fd2420fd40fc1d7042995473f5b32c9a3de61bb86f |
# Copyright (C) 2010-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo 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 v... | pkreissl/espresso | samples/espresso_logo.py | Python | gpl-3.0 | 6,187 | [
"ESPResSo"
] | b39ecae6cacd8662ad5bfcf84b7305aba6437558bba9d12033c6c09748763e29 |
"""
Experiment with representation, simulation and conditioning of Gaussian fields
using the KL expansion.
Note: The eigenvalue problem on an adaptively refined mesh yields modes
that behave erratically near the local refinement.
"""
# Local imports
from mesh import Mesh
from fem import System, QuadFE
from ... | hvanwyk/quadmesh | experiments/kl_expansion.py | Python | mit | 3,420 | [
"Gaussian"
] | caeba70ed701f6a1695bec7a2a1c8c0528cd08aa5c0ed228dd668b6cfabece5b |
"""
Test of multi-VO user metadata handling. Assumes a running Dirac instance with the (master?) FileCatalog
"""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
import unittest
import os
import sys
import os.path
import traceback
from DIRAC.Core.Base.Script... | ic-hep/DIRAC | tests/Integration/DataManagementSystem/Test_UserMetadata.py | Python | gpl-3.0 | 6,518 | [
"DIRAC"
] | 545d0a047c645b72172cb6d685ee12f28fe0fc328697a3f05c2aa2ed6cfd913c |
###########################################################################
#
# Copyright 2020 Google LLC
#
# 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
#
# https://www.apache.org/l... | google/starthinker | dags/trends_places_to_bigquery_via_query_dag.py | Python | apache-2.0 | 5,000 | [
"VisIt"
] | 5a6be63358fecad801952cd279dd4235c161613711362302b7f8bd8e647cdfac |
#!/usr/bin/python3
from Bio import SearchIO
import os
# fetch files in current working directory
files = [f for f in os.listdir('.') if os.path.isfile(f)]
#print(files)
for f in files:
if f.endswith('.xml'):
# print(f)
# print(f.replace('.xml', '.xml.tab')
print("converting ", f, " to ", f.replace('.xml', '.xml... | manasb/genomics | py/xml-to-tab.py | Python | gpl-3.0 | 619 | [
"BLAST"
] | 7cd2d4b5ed982dbaa45e81b0e5b3b2b7c8831e24274991321a31d2859587610c |
#!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.2
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... | e-gob/plataforma-kioscos-autoatencion | scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/network/avi/avi_vrfcontext.py | Python | bsd-3-clause | 4,514 | [
"VisIt"
] | c196069330c8f5da2a24338c742b3fe43d036613ced2c5829048080da88a7546 |
#!/usr/bin/env python
# coding: utf-8
# Plotting
# ============================
#
# This tutorial explains the high-level interface to plotting provided by the Bundle. You are of course always welcome to access arrays and plot manually.
#
# PHOEBE 2.3 uses [autofig 1.2](https://autofig.readthedocs.io/en/1.2.0) as a... | phoebe-project/phoebe2-docs | development/tutorials/plotting.py | Python | gpl-3.0 | 6,422 | [
"Gaussian"
] | 921102784c142caa81c3348235b761dc110892d295c6815026f85290260d77af |
#!/usr/bin/env python
import pyemma
import numpy as np
import mdtraj
import time
import os
# Source directory
#source_directory = '/cbio/jclab/projects/fah/fah-data/munged-with-time/no-solvent/11406' # CK2
source_directory = '11406' # CK2
##############################################################################... | choderalab/MSMs | jchodera/CK2/pyemma/cluster.py | Python | gpl-2.0 | 2,848 | [
"MDTraj"
] | 817e1c9294800049dd0d6c0662f52907d194c5ae6774cb59d20bf1f263e0ef56 |
import openvoronoi as ovd
import ovdvtk
import time
import vtk
import datetime
import math
import random
import os
import gc
def drawLine(myscreen, p1, p2):
myscreen.addActor(ovdvtk.Line(p1=(p1.x, p1.y, 0), p2=(p2.x, p2.y, 0), color=ovdvtk.yellow))
def writeFrame(w2if, lwr, n):
w2if.Modified()
current_d... | aewallin/openvoronoi | python_examples/line-segment/lineseg_50_animation.py | Python | lgpl-2.1 | 6,164 | [
"VTK"
] | 66eacdd848d5f7f6226bc83787d51b11acd10421958ce380b4b15cfad00e4870 |
"""We put utility code in a separate package so that other tests
can use it without triggering this app's unit tests
"""
import hashlib
from hq.models import ExtUser, Domain, ReporterProfile
from reporters.models import Reporter, PersistantConnection
def create_user_and_domain(username='brian',
... | commtrack/commtrack-old-to-del | apps/hq/tests/util/__init__.py | Python | bsd-3-clause | 2,792 | [
"Brian"
] | 9405c95ecb2782d6dd3736f9a8e8dcc8fb80531f0adbfd364df0ff1a49d9ffed |
#
# gPrime - A web-based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2007-2009 Brian G. Matherly
# Copyright (C) 2008 James Friedmann <jfriedmannj@gmail.com>
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2015-2016 Paul Franklin
#
# This program is free software; ... | sam-m888/gprime | gprime/plug/report/utils.py | Python | gpl-2.0 | 13,290 | [
"Brian"
] | b728ea847f818d9c70f13ca903c6e2c4e55e90541c17c409b503de1a6df6611b |
from __future__ import absolute_import
from .likelihood import Likelihood
from .logistic import Logistic
from .gaussian import Gaussian
from .softmax import Softmax
from .regression_network import RegressionNetwork
| ebonilla/AutoGP | autogp/likelihoods/__init__.py | Python | apache-2.0 | 215 | [
"Gaussian"
] | 1b6de925f2f3557186cdf57780e3d267517e03843fc372ffe93add0d814dbc0c |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | tophua/spark1.52 | python/pyspark/mllib/clustering.py | Python | apache-2.0 | 26,378 | [
"Gaussian"
] | 4e4db56f89a81d2e32d4d85dbaed60ff53db3d3a4fae41a1508ada4691270a05 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
"""
This module contains some utility functions and classes that are used in the chemenv package.
"""
__author__ = "David Waroquiers"
__copyright__ = "Copyrig... | Bismarrck/pymatgen | pymatgen/analysis/chemenv/utils/coordination_geometry_utils.py | Python | mit | 34,630 | [
"pymatgen"
] | b8b5e605cc269480e7d13b20817f0a0fdc3d17beffa79b862a88b521588253a6 |
# (c) 2015, Brian Coca <bcoca@ansible.com>
#
# This file is part of Ansible
#
# Ansible 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.... | bjolivot/ansible | lib/ansible/plugins/lookup/url.py | Python | gpl-3.0 | 2,187 | [
"Brian"
] | 0e34fa887be81ac596e399a8a8f12972dab5e42e28854902613642824b07f6dc |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are m... | mikehulluk/morphforge | src/morphforgecontrib/simulation/channels/hh_style/neuron/hocmodbuilders/mmwriter_alphabeta.py | Python | bsd-2-clause | 6,076 | [
"NEURON"
] | 33a2a66cdd4962269477dcbcd79d6c1988b29917b51c25365048ee7ca7c7ce57 |
import time
import pickle
import numpy as np
import matplotlib.pyplot as plt
from collections import OrderedDict
import theano
import theano.tensor as T
import lasagne
from lasagne.layers import batch_norm
from model import Model
from helpers import *
# -------------------------------------------------------------... | kuleshov/deep-learning-models | models/dcgan.py | Python | mit | 9,901 | [
"Gaussian"
] | f89569ea2d8fbe6c9905a4db83eec377cf69202445f165ebc22ac8a96cf6f0d9 |
import math
import random
from mycroft.skills.LILACS_core.concept import ConceptConnector
from mycroft.skills.LILACS_core.crawl_log import getLogger as CrawlLogger
from mycroft.util.log import getLogger
__authors__ = ["jarbas", "heinzschmidt"]
def sigmoid(x):
return 1 / (1 + math.exp(-x))
class ConceptCrawler... | ElliotTheRobot/LILACS-mycroft-core | mycroft/skills/LILACS_core/crawler.py | Python | gpl-3.0 | 11,544 | [
"VisIt"
] | ec442ab0d19a222144d6be6ce63c170ceebec12ac8aef3ec0bfddc373b2747a6 |
#
# Copyright (c) 2015 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
# ScanCode is a trademark of nexB Inc.
#
# You may not use... | vinodpanicker/scancode-toolkit | tests/commoncode/test_timeutils.py | Python | apache-2.0 | 4,487 | [
"VisIt"
] | 27b3fc4be69da35cabd200c6dd645585cbcab8abe0a29cd0086aa9f5abb7bb18 |
import sys
import math
import numpy as np
from random import seed, shuffle
from scipy.stats import multivariate_normal # generating synthetic data
def generate_synthetic_data(data_type, n_samples):
"""
Code for generating the synthetic data.
We will have two non-sensitive features and one sensitiv... | mbilalzafar/fair-classification | preferential_fairness/synthetic_data_demo/generate_synthetic_data.py | Python | gpl-3.0 | 2,805 | [
"Gaussian"
] | 1cae632aeb724ce885ae455db9cfc3d3f35859f60acaaf47f503bfe397f6282d |
#
# Copyright 2015 The AMP HTML Authors. All Rights Reserved.
#
# 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 applic... | luciancrasovan/amphtml | validator/validator_gen_js.py | Python | apache-2.0 | 38,618 | [
"VisIt"
] | 8cfa884d05b2090beda0f31b4e106c37f22d83b28e3b1fe2e5fd7e7825ed507a |
#!/usr/bin/env python
# Meran - MERAN UNLP is a ILS (Integrated Library System) wich provides Catalog,
# Circulation and User's Management. It's written in Perl, and uses Apache2
# Web-Server, MySQL database and Sphinx 2 indexing.
# Copyright (C) 2009-2013 Grupo de desarrollo de Meran CeSPI-UNLP
#
# This file is part ... | Desarrollo-CeSPI/meran | dev-plugins/node64/lib/node/wafadmin/Tools/d.py | Python | gpl-3.0 | 16,319 | [
"VisIt"
] | 4cd5dc69723ccc9c8e39197000c755af2880adedb8f211dac03324600f0b7c23 |
""" DIRAC FileCatalog Security Manager base class
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = "$Id$"
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Security.Properties import FC_MANAGEMENT
_readMethods = [
"exists",
"isFile",
... | ic-hep/DIRAC | src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/SecurityManager/SecurityManagerBase.py | Python | gpl-3.0 | 2,956 | [
"DIRAC"
] | 17ab552312624e465cd071900439caa639a1c75e13fc07e2b21980f8a74cff9f |
# -----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# -------------------------------------------... | Kleptobismol/scikit-bio | skbio/parse/sequences/fasta.py | Python | bsd-3-clause | 8,884 | [
"scikit-bio"
] | b4cc835a08f19c96f8c99a17697cb98c050f210b7994a8f173e26232cf710e76 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This module is also sponsored by E.T.A.I. (www.etai.fr)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version... | hryamzik/ansible | lib/ansible/modules/cloud/vmware/vmware_guest.py | Python | gpl-3.0 | 117,100 | [
"VisIt"
] | d0dbab1d81bd0bb3511f8d8596b3f68151900d35a4c0cebf275b5d4ea268b432 |
# Copyright (C) 2011-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo 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 v... | KaiSzuttor/espresso | testsuite/python/ek_eof_one_species_y.py | Python | gpl-3.0 | 1,384 | [
"ESPResSo"
] | 3490491aba62c5184ac24e9535ea27adccbf20abcfedbed30932c85c448fb204 |
# coding: utf-8
import gpflow
import numpy as np
import tensorflow as tf
from gpflow.mean_functions import Zero
from . import pZ_construction_singleBP
class AssignGP(
gpflow.models.model.GPModel, gpflow.models.InternalDataTrainingLossMixin
):
r"""
Gaussian Process regression, but where the index to which... | ManchesterBioinference/BranchedGP | BranchedGP/assigngp_dense.py | Python | apache-2.0 | 10,034 | [
"Gaussian"
] | 6739fd80e6aeff41803f91dc126396c5b7f3cf8955f4228d60ae5c22fc0ad50b |
#
# Copyright (C) 2013,2014 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo 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 l... | mgusenbauer/espresso | samples/python/charge_test.py | Python | gpl-3.0 | 976 | [
"ESPResSo"
] | 6fce4c55e71e2950ed971996f13c07abb05ece28d077e9d94becc5873e26afd2 |
import pytest
import psi4
pytestmark = [pytest.mark.quick]
def test_dft_grid_threaded_raise():
dimer = psi4.geometry("""
1 1
K -4.067042 -1.894214 0.002270
""")
psi4.set_options({
"dft_grid_name": "SG1",
"dft_vv10_radial_points": 50,
"dft_vv10_spherical_points": 1... | psi4/psi4 | tests/pytests/test_raises.py | Python | lgpl-3.0 | 1,432 | [
"Psi4"
] | e9b22175ba64c54a8db76b1d1b92459ede2bf86b968c3256f07469e687c6a174 |
import pylab as pyl
import cPickle as pickle
from scipy.stats import scoreatpercentile
galaxies = pickle.load(open('galaxies.pickle', 'rb'))
galaxies = filter(lambda galaxy: galaxy.ston_I >30., galaxies)
f1 = pyl.figure(1)
f1s1 = f1.add_subplot(111)
x = [round(galaxy.sersic) for galaxy in galaxies]
y1 = [pyl.log10... | boada/ICD | sandbox/legacy_plot_code/doublesfr.py | Python | mit | 1,622 | [
"Galaxy"
] | ddcb378352f4b48960f20b0f110a50b995b22af36068849348c4f6774ec78ab5 |
import numpy as np
from gpaw.xc.libxc import LibXC, short_names
from gpaw.xc.kernel import XCKernel, codes
from gpaw.xc.bee import BEE1
from gpaw.test import equal
funcs = []
modes = []
for name in short_names:
funcs.append(name)
modes.append(0)
for name in codes:
funcs.append(name)
modes.append(1)
fun... | robwarm/gpaw-symm | gpaw/test/xc.py | Python | gpl-3.0 | 3,451 | [
"GPAW"
] | f58120cd758b0a0fcc591af4381e826e6ad21e85a22df334f6898986dacebffd |
# Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of t... | BackupTheBerlios/espressopp | src/esutil/RNG.py | Python | gpl-3.0 | 1,739 | [
"ESPResSo"
] | c81d5575af8d6545f01f8dc49515e2d7f6e0e78f20cfaf1896ef4640c7119188 |
'''
Created on 2013-05-12
@author: brian
'''
from src.util import Cardinal
class Wander(object):
def __init__(self, actor):
self.actor = actor
def condition(self):
return True
def do(self):
direction = Cardinal.choice()
self.actor.move(direction... | Greymerk/python-rpg | src/ai/task/wander.py | Python | gpl-3.0 | 322 | [
"Brian"
] | 7988951b48be881e826ec62623f7cd7b842d36190af001cc7f35b84cf62a432f |
# Copyright 2015 Google Inc. All Rights Reserved.
#
# 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 a... | lucius-feng/yapf | yapf/yapflib/blank_line_calculator.py | Python | apache-2.0 | 5,720 | [
"VisIt"
] | 1a5e7b0b2d335f627d617311cae9a2437e9e9a6a571a70230e21f6a58c6617ad |
#! /usr/bin/env python
"""
dosomething: a command line program that does something
Put a more elaborate description and other notes here.
Then do yourself a favor and include these two lines:
The general structure of this program is based on a template that can be found at
http://www.jamesstroud.com/jamess-miscella... | stwisdom/sista-rnn | python/train_rnn.py | Python | mit | 48,391 | [
"Gaussian"
] | 371a527e2e31c43c16f49f20c7e20b08758175b2f850d769cc3be0667efca9ef |
"""
Sphinx plugins for Django documentation.
"""
import json
import os
import re
from docutils import nodes
from docutils.parsers.rst import directives
from sphinx import addnodes, __version__ as sphinx_ver
from sphinx.builders.html import StandaloneHTMLBuilder
from sphinx.writers.html import SmartyPantsHTMLTranslato... | liavkoren/djangoDev | docs/_ext/djangodocs.py | Python | bsd-3-clause | 12,017 | [
"VisIt"
] | 1dfc7f8f57e9a0cfc05353678dc52f497ebdb8cb95991403d8e9b9a6fa0870ec |
""" This module hosts the logic for executing an RPC call.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = "$Id$"
from DIRAC.Core.DISET.private.BaseClient import BaseClient
from DIRAC.Core.Utilities.ReturnValues import S_OK
from DIRAC.Core.U... | ic-hep/DIRAC | src/DIRAC/Core/DISET/private/InnerRPCClient.py | Python | gpl-3.0 | 3,052 | [
"DIRAC"
] | f6614d11c45d439b041eecaac29340f57187d8c1b6e15893cd53b9542c68952c |
# -*- coding: utf-8 -*-
'''
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 dis... | repotvsupertuga/repo | plugin.video.zen/resources/lib/sources/wrzcraft_mv_tv.py | Python | gpl-2.0 | 5,240 | [
"ADF"
] | be77bed07e866dcfbbdaa6292b463f1df05c9ccb4660194f9d4f7f8fc540443c |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
import os
import numpy as np
import bob.ip.gabor
import skimage.measure
import tables
from braincode.util import configParser
from braincode.math import make_2d_gaussian
def get_gabor_kernels(feat_dir):... | CASIANICA/brainDecodingToolbox | braincode/prf/tfrecon_util.py | Python | bsd-3-clause | 10,377 | [
"Gaussian"
] | 8d1234904e97ffdca0bba6454f09d83ce447a84efa4fe4f5ef032daad0506bba |
#!/usr/bin/env python
#Dan Blankenberg
"""
A script for calculating secure hashes / message digests.
"""
import optparse, hashlib
from galaxy import eggs
from galaxy.util.odict import odict
HASH_ALGORITHMS = [ 'md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512' ]
CHUNK_SIZE = 2**20 #1mb
def __main__():
#Parse... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/tools/filters/secure_hash_message_digest.py | Python | gpl-3.0 | 1,881 | [
"Galaxy"
] | f803b4e64ab04ec907f01932cb72e93e0e721198f3b099944ccf2519d47238ce |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""Parser for GAMESS-UK output files"""
import re
import numpy
from cclib.parser import logfileparser
from cclib.parse... | berquist/cclib | cclib/parser/gamessukparser.py | Python | bsd-3-clause | 30,330 | [
"GAMESS",
"Gaussian",
"cclib"
] | e650188e373ef9d479709c533d9cf4d54203b82afe9396a46cf763c008b94ad5 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
import unittest
import os
import warnings
from pymatgen.command_line.critic2_caller import Critic2Output
from pymatgen.analysis.graphs import *
from pymatgen.... | johnson1228/pymatgen | pymatgen/analysis/tests/test_graphs.py | Python | mit | 12,295 | [
"pymatgen"
] | fda275fda623cc2a801baaaac4019c26922b0bd2f390069a5a496c76fd058402 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
'''
This software has been developed by:
GI Genética, Fisiología e Historia Forestal
Dpto. Sistemas y Recursos Naturales
ETSI Montes, Forestal y del Medio Natural
Universida... | GGFHF/NGScloud | Package/xngshelper.py | Python | gpl-3.0 | 112,437 | [
"BLAST",
"Bioconda"
] | 1b01edda2427a72704a49ac8698c9e0e040d994a0b5031e769ae726a9f87695b |
from pyramid.view import view_config
from ..models import (
Blog,
Blogger,
)
from pyramid.httpexceptions import HTTPFound
from sqlalchemy import desc
class BlogView(object):
def __init__(self, request):
self.request = request
@view_config(route_name='add_blog',
renderer='../... | asif-mahmud/Pyramid-Apps | blogsite/blogsite/views/blog.py | Python | gpl-2.0 | 3,510 | [
"VisIt"
] | 5613f162254c3bf426535f9d630b0392a78f3831cea9d8643ca4248d5fd41e94 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import diaper
import fauxfactory
import hashlib
import iso8601
import random
import re
import command
import yaml
from contextlib import closing
from django.core.cache import cache
from django.core.exceptions import ObjectDoesNotExist
from django.core.mail... | lkhomenk/integration_tests | sprout/appliances/tasks.py | Python | gpl-2.0 | 91,548 | [
"VisIt"
] | 71c41e8aecccd421cd2362c94193861859d6aef0761fe982c2ffcef5fad5b708 |
"""This file contains code for use with "Think Stats" and
"Think Bayes", both by Allen B. Downey, available from greenteapress.com
Copyright 2014 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from __future__ import print_function, division
"""This file contains class definitions for:
H... | AllenDowney/CompStats | thinkstats2.py | Python | mit | 69,830 | [
"Gaussian"
] | 1d2a11678d579d5bbf4d117964e98e2ff3ff4022e6600cdb14aa3559d22012b4 |
import matplotlib.pyplot as plt
import numpy as np
plt.xkcd()
# This is adapted from Andrej Karpathy's blog:
# http://karpathy.github.io/neuralnets/
# written in Python instead of JS (Obviously)
# Define out unknown function we want to maximize
def unknown_function(a, b):
return a*b
# Here we defin... | medav/yatml | l1-fundamentals/p4-analytic-gradient.py | Python | mit | 1,267 | [
"VisIt"
] | f61ce71dca24abaf8d59a9b504d72ab69712d45ef0bd72424e5d88535fb89565 |
#!/usr/lib/python2.7
##########################################################################
#
# Copyright (C) 2015-2016 Sam Westreich
#
# 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;
#
# T... | transcript/samsa_v2 | python_scripts/subsys_reducer.py | Python | gpl-3.0 | 3,444 | [
"BLAST"
] | bfa8022b7fe5c6be17d83094fb8a448ff03fc2ade55e2cf8d00facbacff9ea2e |
import unittest
from jamenson.runtime.atypes import *
from jamenson.runtime.atypes import (_AnyType, _NotAnyType, Invert, JoinBase, OneOf, AllOf)
class TestAtypes(unittest.TestCase):
def testas_type(self):
def test(op, cls):
self.failUnless(isinstance(as_type(op), cls), '%s is not instance ... | matthagy/Jamenson | jamenson/tests/runtime/atypes/atypes.py | Python | apache-2.0 | 4,876 | [
"ADF"
] | 2b9b3e014ae59da0ef0c215df6589b3f4542b0261ad25f1c039796fefe2bc847 |
#
# This file is part of the PyMeasure package.
#
# Copyright (c) 2013-2021 PyMeasure Developers
#
# 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 limit... | ralph-group/pymeasure | pymeasure/instruments/tektronix/afg3152c.py | Python | mit | 7,664 | [
"Gaussian"
] | 27e33486c797125fcae04646626621acc9a727cba54f0ba6368194c9710ba304 |
#!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# 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
#
# U... | gkc1000/pyscf | pyscf/pbc/dft/test/test_gamma_vs_ks.py | Python | apache-2.0 | 1,627 | [
"PySCF"
] | d856fb73b0f25a13a02eaffd9671dcdb56f2520cd3202f183beaa7a0b5e35574 |
from ast import *
def customliterals(sentences, expand_macros, **kw):
'''
Allow to provide custom meaning to literals. Example:
class MyStr(str): pass
with customliterals:
str = MyStr
assert('hi!'.__class__ is MyStr)
assert('hi!'.__class__ is ... | delapuente/mcpy | demo/demo_macros.py | Python | mit | 4,115 | [
"VisIt"
] | fe30af8d5bae79cb649c7b9fbfc17e47e0f97331b899c2ae4bc3c9394b5aae8d |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | demis001/scikit-bio | skbio/sequence/_dna.py | Python | bsd-3-clause | 12,169 | [
"scikit-bio"
] | 200b1a5cc7f201dbeaed82902f695a9029c3e7903799aecbed326eb993a116e3 |
import json
from dateutil import parser
from django.contrib.auth.models import Group
from django.test import TransactionTestCase, Client
from hs_access_control.models import PrivilegeCodes
from hs_collection_resource.models import CollectionResource, CollectionDeletedResource
from hs_collection_resource.utils import ... | hydroshare/hydroshare | hs_collection_resource/tests/test_collection.py | Python | bsd-3-clause | 56,186 | [
"NetCDF"
] | bda565ba310c7e4bfb6ced9c4b2c01591e8b3fe9267a9929c568f1739d515011 |
#
# Copyright 2016 The BigDL Authors.
#
# 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 ... | intel-analytics/BigDL | python/chronos/src/bigdl/chronos/forecaster/base_forecaster.py | Python | apache-2.0 | 29,631 | [
"ORCA"
] | 53e56f84364117b930add89a85b9c3ca03e62a04b598fedc9b72e1ad3d2d2e19 |
# import aeropy.CST_lib as cst
import aeropy.CST_3D as cst
import aeropy.CST_3D.mesh_tools as meshtools
import panairwrapper
from aeropy.filehandling.vtk import generate_surface
from aeropy.geometry.fitting import fitting
import pickle
import numpy as np
import matplotlib.pyplot as plt
def x0_upper(dummy1, dummy2):
... | leal26/pyXFOIL | examples/3D_fitting/full/fitting_upper.py | Python | mit | 4,476 | [
"VTK"
] | 6e5f25044df7134f8f8982f8d26668e8a8d73a9dacc345a4990c6dde2ff26a86 |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2022 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | psi4/psi4 | psi4/driver/procrouting/findif_response_utils/data_collection_helper.py | Python | lgpl-3.0 | 4,112 | [
"Psi4"
] | b9ca16d33dde15e5d9223bce1f8cc4411048df2201aae20c85ed6dc992746319 |
#!/usr/bin/env python
# test_cursor.py - unit test for cursor attributes
#
# Copyright (C) 2010-2011 Daniele Varrazzo <daniele.varrazzo@gmail.com>
#
# psycopg2 is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foun... | MissCatLady/AlarmEZ | venv/lib/python2.7/site-packages/psycopg2/tests/test_cursor.py | Python | mit | 18,838 | [
"GULP"
] | f845e34d63efb6d74e67392464f7e947b0555533878d7b68c14d1acffa47f2b4 |
#!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. All Rights Reserved.
#
# 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
#
# U... | gkc1000/pyscf | pyscf/grad/ucisd.py | Python | apache-2.0 | 4,087 | [
"PySCF"
] | eede05da54bfae05156a11d53f64a1ec26742c05201865ed3d652b3ca561f891 |
#!/usr/bin/env python
#
# Copyright 2013 Google Inc. All Rights Reserved.
#
"""Do initial setup for the Cloud SDK."""
import bootstrapping
# pylint:disable=g-bad-import-order
import argparse
import os
import sys
from googlecloudsdk.calliope import actions
from googlecloudsdk.calliope import exceptions
from googlecl... | Sorsly/subtle | google-cloud-sdk/bin/bootstrapping/install.py | Python | mit | 7,671 | [
"VisIt"
] | 10b51bb6e8bb221e4946afa3022e579900ee80f4fe96b1bef4ea40b4a1ab2ee0 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Created on Nov 10, 2012
@author: shyue
"""
from pymatgen.util.testing import PymatgenTest
import random
import unittest
from pymatgen.core.composition import ChemicalPotential, Composition
from pymatgen.... | gmatteo/pymatgen | pymatgen/core/tests/test_composition.py | Python | mit | 25,326 | [
"pymatgen"
] | 3f0859faf8d664f9146e89a3e359ed9e813b1bcf93d0e98a967aeb90936956ba |
# Copyright (c) 2001-2013, Scott D. Peckham
#
# Jan 2012 Fixed "print," bug and fixed "dtype" support.
# June 2010 Reorganized & streamlined with "exec", etc.
# October 2009 routines to allow more output file formats)
# August 2009
# January 2009 Converted from IDL.
#
#--------------------------------------... | mdpiper/topoflow | topoflow/utils/model_output_LAST.py | Python | mit | 25,226 | [
"NetCDF"
] | 2a944f6a23cc1412e9cf39b891f8095192be33618e0075d32c5b23959ddd26a5 |
#!/usr/bin/python
#
# Copyright (C) 2010,2012,2013 The ESPResSo project
# Copyright (C) 2008 Axel Arnold
#
# This file is part of ESPResSo.
#
# ESPResSo 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 v... | Gexar/espresso | tools/trace_memory.py | Python | gpl-3.0 | 2,273 | [
"ESPResSo"
] | 920855807cdf220c61550681dd3c3808cc24a8274a7299cf97b744e814cc55b1 |
import os
import pysam
import subprocess
from collections import defaultdict, Counter
import glob
import random
import numpy as np
from bx.intervals.intersection import IntervalTree
from athena.mlib import util
from athena.mlib.fq_idx import FastqIndex
# NOTE must be in path
idbabin_path = 'idba_subasm'
SEED_SELF_AS... | abishara/athena_meta | athena/subassembly/barcode_assembler.py | Python | mit | 18,584 | [
"pysam"
] | eee6e61ed14c58b0f914d102c613a8c9d90e214e39da0b83e3e62abea9e216b6 |
# Copyright (C) 2016
# Max Planck Institute for Polymer Research & JGU Mainz
#
# This file is part of ESPResSo++.
#
# ESPResSo++ 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 th... | espressopp/espressopp | testsuite/FileIOTests/dump_xyz/test_dump_xyz.py | Python | gpl-3.0 | 7,301 | [
"ESPResSo"
] | 6183b83279aa9f605a1fa519c17ffd96217451969d99d5cd295b8c06ae926739 |
import random
import bs
import bsUtils
import bsElimination
import bsBomb
class Icon(bsElimination.Icon):
def updateForLives(self):
if self._player.exists():
lives = self._player.gameData['lives']
else: lives = 0
if self._showLives:
if lives > 0:
self._livesText.text = 'x' + str(lives - 1)
elif liv... | Mrmaxmeier/BombSquad-Community-Mod-Manager | mods/smash.py | Python | unlicense | 21,298 | [
"BLAST"
] | a20fa8aa47530a1edefbdbe2c2de20941d08629c2feeb99214912421779f4b3f |
import sqlalchemy
sqlalchemy.__version__
from sqlalchemy import create_engine
# Creating an inmemory sqlite database for the tutorial purposes
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, String, Sequence, ForeignKey
from sqlalchemy.orm import sessionmaker, aliased, r... | micknh/EdFirst | relationships.py | Python | mit | 5,104 | [
"TINKER"
] | a6e57d62cdf6713cec9878099bac379380e6eebb7ae1e683503408faec2532a2 |
#
# Copyright (C) 2013-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo 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... | fweik/espresso | testsuite/python/particle.py | Python | gpl-3.0 | 17,921 | [
"ESPResSo"
] | 416b13688d7b3dc10ff4303a9a3474dfeb825e1bae76cc3b894014bf3d15ce94 |
#!/usr/bin/env python
#
# MIMEHandler.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANT... | CZ-NIC/thug | src/DOM/MIMEHandler.py | Python | gpl-2.0 | 29,576 | [
"NetCDF"
] | 4d7dc72a29d5239473d9a1bc48c8b79bca0453fc41bfb47f51b381655e0a4010 |
# encoding: utf-8
import os
import numpy as np
import glob
import re
try:
import netCDF4 as netCDF
except:
import netCDF3 as netCDF
import pyroms
import pyroms_toolbox
import _remapping
import matplotlib.pyplot as plt
import datetime
def remapping_bound_sig(varname, srcfile, wts_files, srcgrd, dst_grd, \
... | dcherian/pyroms | pyroms_toolbox/pyroms_toolbox/remapping_bound_sig.py | Python | bsd-3-clause | 14,823 | [
"NetCDF"
] | ceac7cab4964f84653aa93cfa7d15d89b9f6f5ed820e022e1b9fb00a5bbbecdb |
# sql/util.py
# Copyright (C) 2005-2015 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""High level utilities which build upon other modules here.
"""
from .. import exc, u... | adamwwt/chvac | venv/lib/python2.7/site-packages/sqlalchemy/sql/util.py | Python | mit | 19,501 | [
"VisIt"
] | 13763c51819087e1b9622d049b4417694aa72765a4102e3094c3bc89bb816aab |
# Copyright (C) 2016 Collin Capano, Christopher M. Biwer, Alex Nitz
# 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.
#
#... | tjma12/pycbc | pycbc/distributions/__init__.py | Python | gpl-3.0 | 8,027 | [
"Gaussian"
] | 1987e7858e857ca84c5a46d840fdab22ad7b5d4467a2506ae6fe506e584f4849 |
""" StorageManagementDB is a front end to the Stager Database.
There are five tables in the StorageManagementDB: Tasks, CacheReplicas, TaskReplicas, StageRequests.
The Tasks table is the place holder for the tasks that have requested files to be staged.
These can be from different systems and have differe... | calancha/DIRAC | StorageManagementSystem/DB/StorageManagementDB.py | Python | gpl-3.0 | 56,348 | [
"DIRAC"
] | d855a08d52e6528632d8a80651b94427d884faefcbe3440ad5c570dacd4705f8 |
#!/usr/bin/env python
'''
Broken-symmetry DFT
'''
import numpy
from pyscf import gto
from pyscf import dft
mol = gto.Mole()
mol.verbose = 4
mol.atom = '''
Fe 5.22000000 1.05000000 -7.95000000
Fe 5.88000000 -1.05000000 -9.49000000
S 3.86000000 -0.28000000 -9.06000000
S 7.23000000 0.... | gkc1000/pyscf | examples/dft/32-broken_symmetry_dft.py | Python | apache-2.0 | 1,357 | [
"PySCF"
] | 58aba75d78038bdcb215e28708ee6a7d6ec4206f500feb21527839dc80c290df |
"""Noise Adaption"""
import numpy as np;
import theano;
import theano.tensor as T;
import telaugesa.datasets as ds;
from telaugesa.optimize import gd_updates;
from telaugesa.optimize import corrupt_input;
from telaugesa.cost import binary_cross_entropy_cost;
n_epochs=100;
batch_size=100;
datasets=ds.load_mnist("..... | duguyue100/telaugesa | scripts/noise_adaption.py | Python | mit | 1,663 | [
"Gaussian"
] | 21a6fddcc42db8ef700fe97beb712bd0db8acd4583f61217d9ccb9bd9bfc4b42 |
"""
==================
Visualize surfaces
==================
Here is a simple tutorial that shows how to visualize surfaces using DIPY. It
also shows how to load/save, get/set and update vtkPolyData and show
surfaces.
vtkPolyData is a structure used by VTK to represent surfaces and other data
structures. Here we show... | villalonreina/dipy | doc/examples/viz_surfaces.py | Python | bsd-3-clause | 2,915 | [
"VTK"
] | 607e419bfbe6b5ee62afd080835f2ce64058ab258cf8ec59c30ceddf5835ed35 |
#!/usr/bin/env python
# encoding: utf-8
"""description: Cororado PGEM models
"""
__version__ = "0.1"
__author__ = "@fanmuzhi, @boqiling"
__all__ = ["PGEMBase", "DUT", "DUT_STATUS", "Cycle"]
from base import PGEMBase, Diamond4
from dut import DUT, DUT_STATUS, Cycle
class Crystal(PGEMBase):
pass
class Saphire(PG... | hardanimal/UFT_UPGEM | src/UFT/models/__init__.py | Python | gpl-3.0 | 583 | [
"CRYSTAL"
] | 074b5fcd55774bf08f99372487d9c57eece951fa07b3edd7ab16f488d542468b |
#! test c. v1.1 Schema
import numpy as np
import psi4
# Generate JSON data
json_data = {}
json_data["molecule"] = """He 0 0 0\n--\nHe 0 0 1"""
json_data["memory"] = "5GB"
json_data["driver"] = "energy"
json_data["method"] = 'SCF'
json_data["kwargs"] = {"bsse_type": "cp"}
json_data["options"] = {"BASIS": "STO-3G"}
jso... | amjames/psi4 | tests/json/v11-energy/input.py | Python | lgpl-3.0 | 1,378 | [
"Psi4"
] | 5f9968091df55271d31e0b9c81e84beae067c514eadcc679edee145e05fbce14 |
# -*- coding: utf-8 -*-
"""
Tests of auto-arima function and class
"""
import numpy as np
import pandas as pd
import pmdarima as pm
from pmdarima.arima import auto
from pmdarima.arima.utils import nsdiffs
from pmdarima.warnings import ModelFitWarning
from pmdarima.compat.pytest import pytest_error_str, pytest_warnin... | tgsmith61591/pyramid | pmdarima/arima/tests/test_auto.py | Python | mit | 14,418 | [
"ADF"
] | 855b6129707abe005f09742b333de3873956b7e1ee244684a0cf597122fa3f47 |
#!/usr/bin/python26
# Constants specific to the site
import os
_base_dir = os.path.join(os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))))
_meme_bin = os.path.join('/usr/local/Cellar/meme/4.9.0-p4/bin/')
_db_dir = os.path.join(_base_dir, 'data/motif_db/')
_blast_db_dir = o... | maehler/Synergy | src/python/config/base.py | Python | mit | 2,143 | [
"BLAST"
] | 9eeb4c84a34371062138a5400562116b05f3b684840d2e44213af0f2ac5bb6d8 |
from __future__ import print_function
import sys
import os
import pysam
from pysam import VCF
import numpy
import csv
import cPickle as pickle
vcf_file='mainset_November2015_chr22.vcf.gz'
thresh=[1,5,10,15,20,25,30,50,100]
print('#chrom','pos','mean','median', ' '.join([str(t) for t in thresh]))
vcf=pysam.VariantFil... | pontikos/uclex_browser | uclex_to_coverage.py | Python | mit | 634 | [
"pysam"
] | d43f3ac1a28a254ca7ae3ecf7a646bbef5c75746532260f5d10433cc1dca171b |
"""
parses tabular BLAST -m8 (-format 6 in BLAST+) format
"""
import os.path as op
import sys
import logging
from itertools import groupby
from collections import defaultdict
from jcvi.formats.base import LineFile, BaseFile, must_open
from jcvi.formats.bed import Bed
from jcvi.formats.coords import print_stats
from ... | sgordon007/jcvi_062915 | formats/blast.py | Python | bsd-2-clause | 37,724 | [
"BLAST"
] | 3f86a91e0bd08254a84b4827b56a39d46d756dab52b0142452970a34e75e3875 |
from __future__ import print_function, absolute_import, division
import glob
import os
import numpy as np
from .utils import expand_path, num_samples
class BaseDatasetLoader(object):
short_name = None
def load(self):
raise NotImplementedError('should be implemented in subclass')
class MSMBuilderD... | pandegroup/osprey | osprey/dataset_loaders.py | Python | apache-2.0 | 9,192 | [
"MDTraj"
] | 2f5be3fcb42a12241f82f562976662deb103713952256ca9c1aa54507de69ae4 |
import json
import os
from dipy.data import fetch_gold_standard_io
from dipy.io.streamline import (load_tractogram, save_tractogram,
load_trk, save_trk)
from dipy.io.stateful_tractogram import Space, StatefulTractogram
from dipy.io.utils import create_nifti_header
from dipy.io.vtk impor... | FrancoisRheaultUS/dipy | dipy/io/tests/test_streamline.py | Python | bsd-3-clause | 12,479 | [
"VTK"
] | 88cf47767ea51501f4e97b07239cf108aea4abc73fde35fa3a3f0e22d938f4b3 |
import numpy as np
import copy
from ase.optimize import Optimizer
from ase.neb import *
import random
class _LBFGS(Optimizer):
"""Limited memory bfgs algorithm. Unlike the bfgs algorithm used in qn.py,
the inverse of hessian matrix is updated.
Parameters:
restart: string
Pickle file used... | freephys/python_ase | ase/optimize/lbfgs.py | Python | gpl-3.0 | 6,417 | [
"ASE"
] | 711a7907bcd8040297bc326871698068643f91dbb903e3f23a9f1bb7e77618c0 |
import inspect
import os
import platform
import numpy as np
import pandas as pd
from pkg_resources import parse_version
import pytest
import pvlib
pvlib_base_version = \
parse_version(parse_version(pvlib.__version__).base_version)
# decorator takes one argument: the base version for which it should fail
# for ... | alorenzo175/pvlib-python | pvlib/test/conftest.py | Python | bsd-3-clause | 11,023 | [
"pysam"
] | d4657cfce01d6b7be8ee44f1e6c9f74b45fb6279e75d4690447898bcd8dfb199 |
# -*- coding: utf-8 -*-
from random import randint
import numpy as np
from scipy import ndimage as ndi
from skimage import data
from skimage.draw import ellipse
from skimage.filters import gaussian
import skimage.data as data
from skued import align, ialign, itrack_peak
np.random.seed(23)
def circle_image(shape,... | LaurentRDC/scikit-ued | skued/image/tests/test_alignment.py | Python | gpl-3.0 | 3,351 | [
"Gaussian"
] | 5fcb1d3d53e65d6767a6654b088ef6a9088fde5a5e4d84152c5617d54c8b4c6a |
#!/usr/bin/env python
#------------------------------------------------------------------------------
#
# sensor metadata-extraction profiles - common utilities
#
# Project: XML Metadata Handling
# Authors: Martin Paces <martin.paces@eox.at>
#
#--------------------------------------------------------------------------... | DREAM-ODA-OS/tools | metadata/profiles/common.py | Python | mit | 3,339 | [
"NetCDF"
] | 36a3196ba230ef25a573622aa4b637525504169c3bd86adb67eebe328f5becf2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.