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 |
|---|---|---|---|---|---|---|---|
#
# 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... | vikkyrk/incubator-beam | sdks/python/apache_beam/examples/snippets/snippets.py | Python | apache-2.0 | 40,103 | [
"VisIt"
] | cad9f38b016ed10da6110d89690ff01066698d473d0b900db18493f3a7618337 |
#!/usr/bin/env python3
import sys
if sys.version_info < (3, 0):
raise "must use python 3.0 or greater"
import sys
from elasticsearch import Elasticsearch
from pprint import pprint
import json
from collections import OrderedDict
import os
CA_CERTS_PATH='/Users/philpot/aws/credentials/certs.pem'
es = Elasticsearc... | usc-isi-i2/graph-keyword-search | src/dig/harvest.py | Python | apache-2.0 | 13,865 | [
"Amber"
] | 9d1ac6bebc0facfa91b5b43d9005a0404f4d585bb224abf1862167e76483a0cc |
import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.random_forest import H2ORandomForestEstimator
import random
def random_attack():
def attack(train, valid, x, y):
kwargs = {}
# randomly select parameters and their corresponding values
... | madmax983/h2o-3 | h2o-py/tests/testdir_algos/rf/pyunit_random_attack_medium.py | Python | apache-2.0 | 3,804 | [
"Gaussian"
] | aaf4c5add0b48a6ef3730a7df7b346030794f1f944677ee3edb49fe8ff804ea2 |
#
# Copyright (C) 2006-2007 Cooper Street Innovations Inc.
# Charles Eidsness <charles@cooper-street.com>
#
# 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 2
# of the License, ... | Narrat/python3-eispice | module/waveform.py | Python | gpl-2.0 | 7,564 | [
"Gaussian"
] | d7f1214ceed704b20e4558c3d9de5c21a6bd6e92de1a56807bf2f5f2339ad85f |
"""
<Filename>
geoip_module.py
<Purpose>
This is the command dictionary for location-related services for seash.
For more information on the command dictionary, see the documentation for
seash_importer.py.
It implements the following commands:
show location
show coordinates
"""
import seash_gl... | drewwestrick/Repy-Web-Server | seattle_repy/modules/geoip/__init__.py | Python | gpl-2.0 | 4,190 | [
"VisIt"
] | 78439d2e4706adac3da0d8dc50106d5bf8fb20101fd0674112579e90cd2e0cea |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import unicode_literals
import unittest2 as unittest
from pymatgen.io.vasp.sets import *
from pymatgen.io.vasp.inputs import Poscar, Incar, Kpoints
from pymatgen import Specie, Lattice, Struct... | Bismarrck/pymatgen | pymatgen/io/vasp/tests/test_sets_deprecated.py | Python | mit | 15,130 | [
"VASP",
"pymatgen"
] | a239b74d57ed2c176d61fc7e8ecc439496e701d18970e82ea53057f930e0b08d |
#
# QAPI visitor generator
#
# Copyright IBM, Corp. 2011
#
# Authors:
# Anthony Liguori <aliguori@us.ibm.com>
# Michael Roth <mdroth@linux.vnet.ibm.com>
#
# This work is licensed under the terms of the GNU GPLv2.
# See the COPYING.LIB file in the top-level directory.
from ordereddict import OrderedDict
from qapi ... | asias/qemu | scripts/qapi-visit.py | Python | gpl-2.0 | 9,031 | [
"VisIt"
] | c246e613759ea58fde40a111e57216743d481b40edd139c12ea1c9a13f0addfb |
"""Analysis of text input into executable blocks.
The main class in this module, :class:`InputSplitter`, is designed to break
input from either interactive, line-by-line environments or block-based ones,
into standalone blocks that can be executed by Python as 'single' statements
(thus triggering sys.displayhook).
A ... | cloud9ers/gurumate | environment/lib/python2.7/site-packages/IPython/core/inputsplitter.py | Python | lgpl-3.0 | 34,393 | [
"Brian"
] | 88fcc9def25cb5f15ff127f5291fca075543b86041312f0082aa5569c476d7d2 |
"""
Collection of functions for inspecting assembly results
"""
import os
import sys
import re
import logging
import pandas
import numpy
from Bio import SeqIO, SeqUtils
try:
from edl.util import ascii_histogram, InputFile
from edl.blastm8 import FilterParams, filterM8Stream
except ImportError:
# This is a l... | jmeppley/py-metagenomics | edl/assembly.py | Python | mit | 34,517 | [
"Biopython"
] | 58467aff5cd9bb596290c54c90e499045bae0bad0f837daf732378b021a33bd5 |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'CustomValue'
db.create_table(u'profiles_customvalue', (
(u'id', self.gf('djang... | 216software/Profiles | communityprofiles/profiles/oldmigrations/0051_auto__add_customvalue.py | Python | mit | 18,452 | [
"MOE"
] | 12154e2c6340585d4695bebd23728f5791685d6f1d1edafcab759f1f67dc2636 |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2022 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | googleapis/python-access-approval | scripts/fixup_accessapproval_v1_keywords.py | Python | apache-2.0 | 6,343 | [
"VisIt"
] | a5dd21c3d62a1c71f4149967c71be1c8fa7078179555fffca756b68543be3c4d |
import os, re, subprocess, unittest
# enable test mode
os.putenv('LAMMPS_SHELL_TESTING','1')
shell_prompt_re = r"([^>]*LAMMPS Shell> ([a-z0-9_]+) *([a-z0-9_\.]+)?.*\n)+"
cmd_group_re = r"([^>]*LAMMPS Shell> ([a-z0-9_]+) +([a-z0-9]+) +([a-z0-9]+)? *([a-z/0-9]+)?.*\n)+"
#
class LammpsShell(unittest.TestCase):
de... | rbberger/lammps | unittest/tools/test_lammps_shell.py | Python | gpl-2.0 | 5,733 | [
"LAMMPS"
] | 6c72cce45dd7ac0dc98e1cb05e723ab97f4263455bee2c130bbc34c02785f3c1 |
#!/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/indev/testInfTau.py | Python | bsd-2-clause | 5,846 | [
"NEURON"
] | a71431a136ed42224babcf2117ee54b76c0a077c78b80f4f97d2d1200c743b24 |
# -*- coding: utf-8 -*-
# Author: Vincent Dubourg <vincent.dubourg@gmail.com>
# (mostly translation, see implementation details)
# Licence: BSD 3 clause
from __future__ import print_function
import numpy as np
from scipy import linalg, optimize
from ..base import BaseEstimator, RegressorMixin
from ..metrics... | arjoly/scikit-learn | sklearn/gaussian_process/gaussian_process.py | Python | bsd-3-clause | 34,913 | [
"Gaussian"
] | 329db10dd7d97ba59d61db87da4581da668db94632dd96206391458aeb38cecd |
# Copyright 2018 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | google/ml-metadata | setup.py | Python | apache-2.0 | 6,377 | [
"VisIt"
] | 6e3d8d9fccb603aec54ccc313f558078a9ab9ec80b8f7cca90a529d6107ecaef |
# Copyright (c) 2012 Purdue University
# All rights reserved.
#
# Redistribution and use in source and binary forms, with o without ... | lastweek/gem5 | configs/spec2k6/run.py | Python | bsd-3-clause | 7,132 | [
"GAMESS",
"Gromacs",
"NAMD"
] | 2da2a1fc82d8fdb9ef12e723d8de148248841f218a7be87104265e2c3645e461 |
# ******************************************************************************
# pysimm.system module
# ******************************************************************************
#
# ******************************************************************************
# License
# ****************************************... | polysimtools/pysimm | pysimm/system.py | Python | mit | 190,918 | [
"CHARMM",
"LAMMPS",
"VMD"
] | 839611d0cf6b4b86b048d4fa56b751c515480aa2f518cb745c7d2c5f1d53a302 |
"""
Galaxy root package.
""" | jmchilton/galaxy-central | galaxy/__init__.py | Python | mit | 28 | [
"Galaxy"
] | 6fa36f7ebf34ce886c90e3793f47deeba2d7e4543f5c0a66e782bae39286435d |
#! /usr/bin/env python
import warnings
import numpy as np
try:
from tvtk.api import tvtk
except ImportError:
warnings.warn("vtk is not installed")
class VtkGridMixIn(object):
pass
else:
class VtkGridMixIn(object):
_EDGE_COUNT_TO_TYPE = {
1: tvtk.Vertex().cell_type,
... | csdms/coupling | deprecated/grids/vtk_mixin.py | Python | mit | 2,523 | [
"VTK"
] | 57f54f3a6d6d33ff8eed5caf2c04788cd979024f91b7baae2687d66d27a0550d |
########################################################################
# $Id$
########################################################################
"""
Matcher class. It matches Agent Site capabilities to job requirements.
It also provides an XMLRPC interface to the Matcher
"""
__RCSID__ = "$Id$"
import time
fr... | avedaee/DIRAC | WorkloadManagementSystem/Service/MatcherHandler.py | Python | gpl-3.0 | 23,221 | [
"DIRAC"
] | d6157bbb785dd08a075bc70a5c08d1f4b35ace7b44df0d7d4b9b15e41ed0eb55 |
#!/usr/bin/env python
import sys, getopt
import glob, os
# MergeHash can maybe go on the hour queue
JobParams = {
'CreateHash': {
'outfile': """CreateHash_Job.q""",
'header': ["""#BSUB -J CreateHash""","""#BSUB -o PROJECT_HOME/Logs/CreateHash-Out.out""","""#BSUB -e PROJECT_HOME/Logs/CreateHash-Err.err""","""#BS... | hurwitzlab/LSA-pipeline | PBS_Scripts/create_jobs.py | Python | mit | 11,911 | [
"BLAST"
] | 381f5cedf1e3b870774514f3f006374a40a0cbea49adea9da8f8fd9a485af6af |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import os
import glob
class SspaceStandard(Package):
"""SSPACE standard is a stand-alone program... | iulian787/spack | var/spack/repos/builtin/packages/sspace-standard/package.py | Python | lgpl-2.1 | 2,015 | [
"BWA",
"Bowtie"
] | a407c2b2494dfc8a7b598f5e679b41d4c12ef3b014b9e2893760bc566e289d9d |
#!/usr/bin/python
# file: mdoc.py
# author: Brian Fulkerson and Andrea Vedaldi
# description: MDoc main
# Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson.
# All rights reserved.
#
# This file is part of the VLFeat library and is made available under
# the terms of the BSD license (see the COPYING ... | silencej/pollenTubeProc | segPollen/vlfeat/docsrc/mdoc.py | Python | gpl-3.0 | 16,193 | [
"Brian",
"VisIt"
] | 1b9863fb80b6daa7555932c44988167947550b797f7d6d1e3c8136809554379c |
"""Functions to plot M/EEG data on topo (one axes per channel)
"""
from __future__ import print_function
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Denis Engemann <denis.engemann@gmail.com>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eri... | rajegannathan/grasp-lift-eeg-cat-dog-solution-updated | python-packages/mne-python-0.10/mne/viz/topo.py | Python | bsd-3-clause | 23,928 | [
"Gaussian"
] | fcdf77576856ceebd8c458186360863088ce63b8c1725f0c57d6b8ed76167770 |
# Copyright: (c) 2013, James Cammarata <jcammarata@ansible.com>
# Copyright: (c) 2018, Ansible Project
# 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
import os.path
import re
import sh... | dlazz/ansible | lib/ansible/cli/galaxy.py | Python | gpl-3.0 | 32,953 | [
"Galaxy"
] | eb750a8ae5fc9b533ca8da8a0adf9ae8eadb978f54a5b1daebf0c53b1f4e3ccd |
# Developer: SpatialDev
# Company: Spatial Development International
# for more information please visit the following link below
# Website: https://lpdaac.usgs.gov/products/modis_products_table/land_cover/yearly_l3_global_500_m/mcd12q1
# --------------- Imports -------------------------------------
# standard lib... | SERVIR/ReferenceNode_ETL | sources/land/arcpy_land_etl_main.py | Python | apache-2.0 | 14,497 | [
"VisIt"
] | 591373d5c057cc8693e54ed7295a268845ad0f21be772d8b67948ed7669a6238 |
"""
====================================================
Imputing missing values before building an estimator
====================================================
Missing values can be replaced by the mean, the median or the most frequent
value using the basic :class:`~sklearn.impute.SimpleImputer`.
In this example w... | xuewei4d/scikit-learn | examples/impute/plot_missing_values.py | Python | bsd-3-clause | 9,687 | [
"Gaussian"
] | d9342b62ecfea850acf9232e9cc3cefdb9a518dc9e3e629c23bda6137ee45700 |
import os, sys, datetime, string
import numpy as np
from netCDF4 import Dataset
import numpy.ma as ma
import matplotlib.pyplot as plt
from pylab import *
import mpl_util
import time
__author__ = 'Trond Kristiansen'
__email__ = 'trond.kristiansen@imr.no'
__created__ = datetime.datetime(2012, 12, 3)
__modified__ =... | trondkr/romstools | CreateObsFileIS4DVAR/getCortad.py | Python | mit | 6,008 | [
"NetCDF"
] | 446c7ff569452e9ad0c4a8505751815b0f018b772e05c7fe5903dcf3e0e96813 |
# -*- coding: utf-8 -*-
# Generic Base Interface for Infrared based interfaces. Handles loading and convertion of IR Codes
"""
ORCA Open Remote Control Application
Copyright (C) 2013-2020 Carsten Thielepape
Please contact me by : http://www.orca-remote.org/
This program is free software: you ... | thica/ORCA-Remote | src/interfaces/generic_infrared/interface.py | Python | gpl-3.0 | 3,274 | [
"ORCA"
] | 9fac01c46b906d21292f43300c3e9dff4f37f76dc6f755faf8d7ac31e84f19fc |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
from pymatgen.analysis.chemenv.utils.scripts_utils import strategies_class_lookup
from os.path import expanduser, exists
from os import makedirs
import json
fro... | czhengsci/pymatgen | pymatgen/analysis/chemenv/utils/chemenv_config.py | Python | mit | 7,410 | [
"pymatgen"
] | b9c81140d2eecd51597229589fc9dc4b1532735fd5d1ace7dc943d9096916d92 |
# -*- coding: utf-8 -*-
"""
Strongly connected components.
"""
# Copyright (C) 2004-2011 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import networkx as nx
__authors__ = "\n".join(['Eben Kenah',
... | GbalsaC/bitnamiP | venv/lib/python2.7/site-packages/networkx/algorithms/components/strongly_connected.py | Python | agpl-3.0 | 8,874 | [
"VisIt"
] | 05fd753161e24732e43cc4061b937811ba8986257f59ebcb1e80ea9a8b4d03aa |
## ## ## qepy.py v.0.1.2
## ## ## Created: 06/12/2014 - KDP
import os
import commands
import numpy as np
import cPickle as pickle
from inspect import ismethod
from subprocess import Popen, PIPE, call
from shutil import rmtree, copytree, copy2
from os.path import isdir
import runlist as runl # parameter list for runn... | kparrish/qepy | qepy/qepy.py | Python | gpl-2.0 | 41,365 | [
"CRYSTAL",
"Quantum ESPRESSO",
"VisIt"
] | 6e56cac78a5665f8751b8037a898bf06880aa7e34887791ec896e20201acf7e2 |
# -*- coding: utf-8 -*-
from setuptools import setup
def local_version(version):
# https://github.com/pypa/setuptools_scm/issues/342
return ""
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="mpcontribs-io",
author="Patrick Huck",
author_email="phuck@lbl.gov",
... | materialsproject/MPContribs | mpcontribs-io/setup.py | Python | mit | 907 | [
"pymatgen"
] | 0de6c62f037aab796b87c2924c0a9d49b75c08092d1e425ae4981e0b89506ff9 |
# -*- coding:Utf-8 -*-
"""
.. currentmodule:: pylayers.network.network
Node Class
==========
.. autosummary::
:toctree: generated/
Node.__init__
Node.randomMAC
Network Class
==============
.. autosummary::
:toctree: generated/
Network.__init__
Network.__repr__
Network creation
------... | buguen/pylayers | pylayers/network/network.py | Python | lgpl-3.0 | 64,459 | [
"Mayavi"
] | c7e1a0bf2666b500f13afe8a55ad7944458ef098c73769681e47b19b68228d1f |
# Copyright (C) 2012 Swift Navigation Inc.
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
# EITHER EXPRESSED OR IMPLIED, INCLUDING B... | henryhallam/peregrine | peregrine/acquisition.py | Python | gpl-3.0 | 21,587 | [
"Gaussian"
] | fc1a3797ff6d548e1e01a8cbb826818954365c296e521be98f26d6c0c55af721 |
"""
Locals computes the value of locals()
"""
from pythran.passmanager import ModuleAnalysis
import pythran.metadata as md
import ast
class Locals(ModuleAnalysis):
"""
Statically compute the value of locals() before each statement
Yields a dictionary binding every node to the set of variable names defi... | hainm/pythran | pythran/analyses/locals_analysis.py | Python | bsd-3-clause | 3,598 | [
"VisIt"
] | 0076391b6056838a2708462217f174a638f79817b8be21fafa0d789c4d39fa39 |
# Copyright 2020 The gRPC 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 wri... | firebase/grpc-SwiftPM | src/python/grpcio_tests/tests_py3_only/unit/_simple_stubs_test.py | Python | apache-2.0 | 9,641 | [
"BLAST"
] | 6ea62d039e5007a5a9800b674b11a5cee4483a191ec69e330c051072f550ca5f |
'''
This is a scaled down version of clingo-dl show casing how to implement a
propagator for difference logic.
'''
from typing import List, Sequence, Optional, MutableMapping, Tuple, Set, cast
import heapq
import sys
from clingo import ast
from clingo.symbol import Function, Number, Symbol, SymbolType, Tuple_
from cl... | potassco/clingo | examples/clingo/dl/app.py | Python | mit | 14,545 | [
"VisIt"
] | ec3fc5082ef6b39aa7633e19fec79f025a1fd09c3de8b118264e976a42e82088 |
# (C) British Crown Copyright 2014 - 2017, Met Office
#
# This file is part of Iris.
#
# Iris 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 Foundation, either version 3 of the License, or
# (at your option) any l... | LukeC92/iris | lib/iris/tests/unit/fileformats/netcdf/test__load_cube.py | Python | lgpl-3.0 | 7,296 | [
"NetCDF"
] | 4b62be05ffb74aaa24781bb1e6717a3f48163abebec961489fd1673576e6aba0 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# @package parse_blast.py
# @author Lea Picard
import sys, os, subprocess
from Bio import Entrez, SeqIO
from collections import defaultdict
def dict2fasta(dico):
"""
Function that takes a dictionary with key are ID and value Seq, and returns a fasta string.
:param dico: a... | leapicard/pipeline | parse_blast.py | Python | gpl-3.0 | 4,316 | [
"BLAST"
] | cc7d50115771158bb110d3310a3c8b4ab1c24011c0c6445cbad622f7b7dab74b |
# Version: 0.15
"""
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, and pypy
* [![Latest Version]
(https://pypip.in/version/versioneer/badge.svg?style=flat)
](ht... | cbertinato/pandas | versioneer.py | Python | bsd-3-clause | 62,487 | [
"Brian"
] | 1fa0c2905a517714fc8dbef75142d5cde4ddc3d129f55e9ce8c00b704432f7c3 |
#!/usr/bin/env python
import argparse
import csv
from . import orca_parser
from .copper_imidazole_analysis import CopperImidazoleAnalysis
cia = CopperImidazoleAnalysis()
parser = argparse.ArgumentParser(description="Given pathnames of ORCA output files, make a dump of certain spectroscopic parameters to a CSV file... | berquist/orcaparse | scripts/copper_imidazole_csv.py | Python | mpl-2.0 | 2,075 | [
"ORCA"
] | b69c3b1ecafdf2406977fbd1cd1859dd53a3113c70db4ad639cba1c9249a6108 |
#!/usr/bin/env python
# getgeneseqfromgenbank.py
# gets the name and sequence of gene(s) from a Genbank file
# Copyright (C) 2007 C. Jayakumar
#
# 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, ... | C-Jay-Kumar/script-tools | python/getgeneseqfromgenbank.py | Python | gpl-3.0 | 4,560 | [
"Biopython"
] | 91c08f778d652af6423e8d5880f0d28ff5c872881e37bc636d2983d17a7efdd3 |
# -*- coding: utf-8 -*-
# !/bin/env python
# In this file we generate all kind of data: real one, random one, ...
import random
import math
from optimizedGPS.structure import GPSGraph
from optimizedGPS.structure import GraphMLParser
from optimizedGPS.structure import Driver
from optimizedGPS.structure import Drivers... | mickael-grima/optimizedGPS | optimizedGPS/data/data_generator.py | Python | apache-2.0 | 6,547 | [
"Gaussian"
] | 4a62c51574374668d06954b096da2156cf43cd68e8c990da15728b721a5da18e |
# encoding=utf8
#!/usr/bin/env python
import urllib2
import json
import re
from bs4 import BeautifulSoup
from nltk.tokenize import sent_tokenize
from socket import error as SocketError
#
# checks whether the first argument is the same word as a plural string, checking plurals
#
def equalCheckingPlurals(string, plura... | kbrohkahn/kevin.broh-kahn.com | view-recipes/parse-recipes-p2.py | Python | apache-2.0 | 33,917 | [
"ESPResSo"
] | a829fc5269028f5d3fb308b37ed4aa69649fa3a5c4ed5ad3cacf997d174504d4 |
class Singelton(object):
def __new__(cls,*a,**kwarg):
return cls
class VisitorError(Exception):
pass
class Visitor(Singelton):
@classmethod
def visit(self,node, *a):
"""Finds and calls the appropiate function visit_<NodeName>"""
try:
visitor = getattr(self, 'visit_' + node.__class__.__n... | Neppord/py2py | py2py_lib/out/visitor.py | Python | mit | 506 | [
"VisIt"
] | d061c7bc1be651cc0d5e74829217ce2ac6b7e06f644e1cdb1683e8846f4096db |
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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) an... | shawnsi/ansible | lib/ansible/constants.py | Python | gpl-3.0 | 17,940 | [
"Galaxy"
] | 445cda414858ffae10eef746ece27acd135f56ee8e38efb421a47cdc5d38e364 |
#!/usr/bin/env python
# Python module for simulated annealing - anneal.py - v1.0 - 2 Sep 2009
#
# Copyright (c) 2009, Richard J. Wagner <wagnerr@umich.edu>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright... | Ecotrust/cogs-priorities | util/surrogate/anneal.py | Python | bsd-3-clause | 13,776 | [
"COLUMBUS",
"VisIt"
] | 030d7a66d6c5748695856bd37bfed9d8c950ad68f9350ed903174f17da3de0cd |
# -*- coding: UTF-8 -*-
import numpy as np
from fgn import fgn
from numpy.polynomial.hermite_e import hermeval
class hermite( fgn ) :
"""A derived class to produce sample paths of a Hermite process of order d
with a specified fractional integration parameter (the Hurst exponent). For
the best performance N-... | ivannz/study_notes | year_14_15/course_project/code/project/hermite.py | Python | mit | 2,253 | [
"Gaussian"
] | 81a4fd1480cf103c866b9deef99c3242c66ef109e70e74af1064c9b655df99d8 |
# -*- coding: utf-8 -*-
"""
MolVS - Molecule Validation and Standardization
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MolVS is a python tool built on top of RDKit that performs validation and standardization of chemical structures.
Note that the C++ reimplementation of this is available in the module rdkit.Chem... | bp-kelley/rdkit | rdkit/Chem/MolStandardize/__init__.py | Python | bsd-3-clause | 1,667 | [
"RDKit"
] | 9ba3d0b4891b55752af7f43fd422f070c736520283cd1cc1f0cb4386d354c711 |
'''
Central/Satellite galaxy without assembly biased model
'''
import numpy as np
import os.path as path
from halo_utils import load_project_halocat
from Corrfunc.theory.wp import wp
from halotools.sim_manager import CachedHaloCatalog
from halotools.empirical_models import HodModelFactory
from halotools.empirical_mod... | mjvakili/gambly | code/hod.py | Python | mit | 3,537 | [
"Galaxy"
] | be0c20bfa9329632a27d27ca3aa05aebace7f5b22038059fcd4064c385c93cca |
# $HeadURL: $
''' TransferCommand module
'''
from datetime import datetime, timedelta
from DIRAC import S_OK, S_ERROR
from DIRAC.AccountingSystem.Client.ReportsClient import ReportsClient
from DIRAC.... | Andrew-McNab-UK/DIRAC | ResourceStatusSystem/Command/TransferCommand.py | Python | gpl-3.0 | 7,715 | [
"DIRAC"
] | 19350eb85c87ea188dfde76ff27dc40936dccf34a3e719f35429e621586f76c9 |
#!/bin/env python
"""
Create a production to replicate files from some storage elements to others
:since: May 31, 2018
:author: A. Sailer
"""
from DIRAC.Core.Base.Script import Script
@Script()
def main():
"""reads command line parameters, makes check and creates replication transformation"""
from DIRAC imp... | DIRACGrid/DIRAC | src/DIRAC/TransformationSystem/scripts/dirac_transformation_replication.py | Python | gpl-3.0 | 1,404 | [
"DIRAC"
] | 3b47d4011e4f83e1eed23255f87eb58c17b3ed1a83e233e869e9eab8f0530794 |
#!/usr/bin/env python
# Copyright (C) 2007 CAMP
# Please see the accompanying LICENSE file for further information.
from distutils.core import setup, Command
from distutils.command.build_py import build_py as _build_py
from glob import glob
from os.path import join
import os
import sys
import shutil
long_descript... | conwayje/ase-python | setup.py | Python | gpl-2.0 | 5,378 | [
"ABINIT",
"ASE",
"CASTEP",
"Elk",
"FLEUR",
"Gaussian",
"MOPAC",
"NWChem",
"VASP",
"VTK"
] | ed4cc6e0fa66c362f245d885c1839f9fa547cc86fe4c817cda2be3ebb5452ff6 |
from setuptools import setup,find_packages
def readme():
with open('README.rst') as f:
return f.read()
setup(name='barnaba',
description='analyze nucleic acid 3D structures and MD trajectories',
long_description=readme(),
classifiers=[
'Development Status :: 5 - Production/... | srnas/barnaba | setup.py | Python | gpl-3.0 | 1,380 | [
"MDTraj"
] | 3cfeb88dd95d72238f22403c575b2f38d0fe568bfee6de8551bd3d7eafa9fc40 |
__author__ = 'chrispaulson'
import numpy as np
import scipy
from scipy.optimize import minimize
from .matrixops import matrixops
import copy
from matplotlib import pyplot as plt
import pylab
from mpl_toolkits.mplot3d import axes3d
from pyKriging import samplingplan
import inspyred
from random import Random
from time... | capaulson/pyKriging | pyKriging/krige.py | Python | mit | 30,061 | [
"Mayavi"
] | 796d0a454cbfe8f92c266bea0fd611ab131016013e89a88f984dedce0aacd73d |
# Copyright 2016 The TensorFlow 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 applica... | unnikrishnankgs/va | venv/lib/python3.5/site-packages/tensorflow/contrib/distributions/python/ops/mvn_tril.py | Python | bsd-2-clause | 7,102 | [
"Gaussian"
] | 09bb83c4de480421274561ba9a41eb867926c8fbccedaa3edab8d28402c15fda |
# Principal Component Analysis Code :
from numpy import mean,cov,double,cumsum,dot,linalg,array,rank,size,flipud
from pylab import *
import numpy as np
import matplotlib.pyplot as pp
#from enthought.mayavi import mlab
import scipy.ndimage as ni
import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3')
import ro... | tapomayukh/projects_in_python | classification/Classification_with_kNN/Single_Contact_Classification/Final/best_kNN_PCA/4-categories/1/test11_cross_validate_categories_1_1200ms.py | Python | mit | 4,730 | [
"Mayavi"
] | f8355b961449c205782e40f86918cca58288564305c0a748d44f90d6c0bb3da3 |
#!/usr/bin/env python
from Bio.Blast import NCBIWWW, NCBIXML
def callpBLAST(sequence):
result_handle = NCBIWWW.qblast("blastn", "nr", sequence)
blast_record = NCBIXML.read(result_handle)
return blast_record | gbugaisky/bimm_185_conotoxin | submodules/callpBLAST.py | Python | gpl-2.0 | 211 | [
"BLAST"
] | 9bece3f63db42d70e3bfd61a32afb45d8d8f1dc511e226eddeab66988c2b4305 |
"""
Base classes used by studio tests.
"""
from bok_choy.web_app_test import WebAppTest
from bok_choy.page_object import XSS_INJECTION
from ...pages.studio.auto_auth import AutoAuthPage
from ...fixtures.course import CourseFixture
from ...fixtures.library import LibraryFixture
from ..helpers import UniqueCourseTest
fro... | solashirai/edx-platform | common/test/acceptance/tests/studio/base_studio_test.py | Python | agpl-3.0 | 6,036 | [
"VisIt"
] | 766b9402baea07780c4e64d3dde7fb0c736a3ba0f1ea7a22d6e574d61509176b |
#!/usr/bin/env python3
"""
Copyright 2020 Paul Willworth <ioscode@gmail.com>
This file is part of Galaxy Harvester.
Galaxy Harvester is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 ... | pwillworth/galaxyharvester | html/getUserHistory.py | Python | gpl-3.0 | 5,273 | [
"Galaxy"
] | 092fbd51496070151003abb67390cf6c52040189991d2228f2b31d045b9f7939 |
# Copyright 2016 The TensorFlow 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 applica... | nikste/tensorflow | tensorflow/contrib/distributions/python/ops/mvn.py | Python | apache-2.0 | 28,657 | [
"Gaussian"
] | f4dea9150ebb6928a3069aee48ecab01a624b652cd71bba0fbb94b88221ae079 |
# -*- coding: utf-8 -*-
"""
Created on Tue May 17 10:59:20 2016
@author: huliqun
"""
import random, string
import mimetypes
import os
import uuid
import json
import traceback
from selenium import webdriver
import datetime
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, se... | LiqunHu/MVPN | workserver/util/SysUtil.py | Python | gpl-3.0 | 9,796 | [
"VisIt"
] | 979a3f86d3db5c3b37e8581b2692ff8b47f30511095b956ef3216e19f1d2538c |
# $HeadURL$
"""
Extremely simple utility class to send mails
"""
__RCSID__ = "$Id$"
import socket
from smtplib import SMTP
from email.mime.text import MIMEText
from getpass import getuser
from DIRAC import gLogger, S_OK, S_ERROR
class Mail:
def __init__( self ):
self._subject = ''
self._message = ''
... | Sbalbp/DIRAC | Core/Utilities/Mail.py | Python | gpl-3.0 | 1,450 | [
"DIRAC"
] | 40bcbf3b1771993d672d09df93c5d84bd125589d6906fc8ec7ec6b43d889946f |
#!/usr/bin/env python
import sys
import vtk
def main(argv):
if len(argv) < 2:
print "usage:",argv[0]," data.nrrd data.cmap"
exit(1)
data_fn = argv[1]
cmap_fn = argv[2]
reader = vtk.vtkPNrrdReader()
reader.SetFileName(data_fn)
reader.Update()
data = reader.GetOutput()
# opacity function
opacit... | daniel-perry/rt | data/volume_render_mip.py | Python | mit | 1,654 | [
"VTK"
] | 4d2c040acf7e15e9d765a23fbcebf8a55e34f376f2a6d7feb3fe2db1935b0546 |
# Copyright 2018 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/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | googleapis/gapic-generator-python | tests/unit/schema/wrappers/test_method.py | Python | apache-2.0 | 28,578 | [
"Octopus"
] | 326359fabc58b56a290505076037f259ebc7a2206eea3d05333cbb105993e07b |
'''
This module is pretty experimental and uses pythonnet to laod a C#-DLL
The OpenHardwareMonitorLib is a pretty sophisticated library to get system metrics
For more information about the project/code visit the GitHub Repository
https://github.com/openhardwaremonitor/openhardwaremonitor
It map... | OpServ-Monitoring/opserv-backend | app/gathering/measuring/ohm_source.py | Python | gpl-3.0 | 13,382 | [
"VisIt"
] | 06dad6220b86730df73ff979f82d4386a84905370e491e6f6a6b49e8ba862308 |
# coding: utf-8
# # Convert all daily JSON log files for a deployment to a single NetCDF file
# using CF-1.6, Discrete Sampling Geometry (DSG) conventions, **`featureType=timeSeries`**
# In[1]:
get_ipython().magic('matplotlib inline')
import json
import pandas as pd
import numpy as np
import glob
from pyaxiom.netc... | rsignell-usgs/notebook | OOI/from_ooi_json-pwrsys-deployment.py | Python | mit | 2,187 | [
"NetCDF"
] | 4e76521eac4273b152fb646e4597f9dfd0b738cceeee2ec7eefa345f8e316618 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import time
# Configuration, please edit
# Data about this site
BLOG_AUTHOR = "wcmckee"
BLOG_TITLE = "artctrl-tech"
# This is the main URL for your site. It will be used
# in a prominent link
SITE_URL = "http://artctrl.me/tech"
# This is the URL where n... | wcmckee/wcmckee.com | conf.py | Python | mit | 23,584 | [
"VisIt"
] | dbf4f4b2b43796b7b5b9d98231165daf9d2f6d01474b63e24cd1f5d54c73322b |
########################################################################
# This example demonstrates a multiscale model with synaptic input, Ca
# entry to the spine, receptor modulation following phosphorylation and
# Ca diffusion from spine to the dendrite. Lots going on.
# System switches to a potentiated state aft... | BhallaLab/moose-examples | tutorials/Rdesigneur/ex8.2_multiscale_gluR_phosph_3compt.py | Python | gpl-2.0 | 2,648 | [
"MOOSE"
] | d8ee28055b98cb305e19d6a7dce2af9b0b2034859d5076c536a06100fff610c8 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017-2020 Satpy developers
#
# This file is part of satpy.
#
# satpy 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 Licens... | pytroll/satpy | satpy/tests/reader_tests/test_seviri_l1b_nc.py | Python | gpl-3.0 | 11,322 | [
"NetCDF"
] | 9e3195bc1aece4b9b5db69bec18113f1b63d5427787a82ccde0614a526409012 |
#
# Copyright 2007 Diane Trout
# This software is covered by the GNU Lesser Public License 2.1
# (exciting copyrighting nothing, isn't it)
| detrout/benderjab | benderjab/__init__.py | Python | lgpl-2.1 | 139 | [
"exciting"
] | 5637fd5cc8ceaff7f06bd6896193232e4962c5489cc4b2181be4ab3364846fdc |
#!/usr/bin/env python
#JSON {"lot": "RKS/6-31G(d)",
#JSON "scf": "CDIISSCFSolver",
#JSON "er": "numeric",
#JSON "difficulty": 8,
#JSON "description": "RKS DFT example with LDA and numerical Hartree"}
import numpy as np
from horton import * # pylint: disable=wildcard-import,unused-wildcard-import
# Load the coor... | QuantumElephant/horton | data/examples/hf_dft/rks_water_numlda.py | Python | gpl-3.0 | 3,519 | [
"Gaussian"
] | e14c6d8035f29f01dd73ed76fd03d84b1d87354bab725b4f9cdb59ac6c37e1d4 |
#
# Parse tree nodes for expressions
#
from __future__ import absolute_import
import cython
cython.declare(error=object, warning=object, warn_once=object, InternalError=object,
CompileError=object, UtilityCode=object, TempitaUtilityCode=object,
StringEncoding=object, operator=object,
... | fperez/cython | Cython/Compiler/ExprNodes.py | Python | apache-2.0 | 497,288 | [
"VisIt"
] | 0883554ab3a6441e281b52858fdbf5c8ab786e14c2d11e1c0e706ca40ab10dcd |
"""
Utilities for constructing node features or bond features.
Some functions are based on chainer-chemistry or dgl-lifesci.
Repositories:
- https://github.com/chainer/chainer-chemistry
- https://github.com/awslabs/dgl-lifesci
"""
import os
import logging
from typing import List, Union, Tuple
import numpy as np
fro... | peastman/deepchem | deepchem/utils/molecule_feature_utils.py | Python | mit | 16,782 | [
"RDKit"
] | d5f95a0cc0e444bb331ef930bed251fa9c821f398a74b4b94f1134e31fab106e |
import cv2, sqlite3, time, os.path, pandas, math, sys, pickle, logging, picamera
import numpy as np
logger = logging.getLogger('dispenser.recognizer')
logger.setLevel(logging.DEBUG)
# settings
TARGET_PIXEL_AREA = 1000000.0
class Recogizer:
def __init__(self):
# init camera
self.camera = picamera... | samclane/pill-dispenser | pill_recog.py | Python | mit | 8,253 | [
"Gaussian"
] | 74ed4db8b47ea41a53fced5797498e1bd6f07318a058147069f58d468b43305f |
from __future__ import absolute_import, print_function
from . import common_info
from . import c_spec
#----------------------------------------------------------------------------
# The "standard" conversion classes
#----------------------------------------------------------------------------
default = [c_spec.int_c... | valexandersaulys/prudential_insurance_kaggle | venv/lib/python2.7/site-packages/scipy/weave/converters.py | Python | gpl-2.0 | 2,703 | [
"VTK"
] | 5456e2af18a9dba21ffa9242e32551f78925772944c943d15e2f2f6f24fa1f16 |
"""
Copyright (C) 2007-2010 Martin Laprise (mlaprise@gmail.com)
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; version 2 dated June, 1991.
This software is distributed in the hope that it will be ... | mlaprise/PyOFTK | PyOFTK/cavity.py | Python | gpl-2.0 | 15,373 | [
"ASE"
] | 3a6e59c2bd28ab478761086c03dc196cf661e44dcc40db3e2fca0aad90b8af13 |
#-------------------------------------------------------------------------------
# rbtlib: root.py
#
# Get the Root List Resource from a Review Board instance.
#-------------------------------------------------------------------------------
# The MIT License (MIT)
# Copyright (c) 2016 Brian Minard
#
# Permission is her... | bminard/rbtlib | rbtlib/root.py | Python | mit | 2,173 | [
"Brian"
] | d97fa5c2e707e2eb71f21e8258fb07729fcd84edcdbc2ce131bbc76f1b17f090 |
#
# plotting.py
#
# Some useful, not very generic plotting functions
#
# Copyright (C) 2012 Lukas Solanka <l.solanka@sms.ed.ac.uk>
#
# 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 Fre... | MattNolanLab/ei-attractor | grid_cell_model/otherpkg/plotting.py | Python | gpl-3.0 | 4,458 | [
"Brian"
] | d773b9e597290d54970293c14ac775543cf2cd9078dc517c3b14a4a88fc58277 |
# Zulip's OpenAPI-based API documentation system is documented at
# https://zulip.readthedocs.io/en/latest/documentation/api.html
#
# This file defines the Python code examples that appears in Zulip's
# REST API documentation, and also contains a system for running the
# example code as part of the `tools/test-api` t... | showell/zulip | zerver/openapi/python_examples.py | Python | apache-2.0 | 43,251 | [
"Octopus"
] | 333ac8ea191805846b1c83b4fe2ae788cd53d2a025f599bf79ea82ae9c202246 |
# 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 (t... | apache/incubator-allura | Allura/allura/controllers/auth.py | Python | apache-2.0 | 31,193 | [
"VisIt"
] | abc3a493c4b600e4bfd8f77a2d1d71ce64f1c03c722469d05ea77f22b59df165 |
import json
import random
import sys
import numpy as np
import scipy as sp
import tensorflow as tf
class Cost(object):
@staticmethod
def fn(a, y):
return np.sum(np.nan_to_num(-y * np.log(a) - (1 - y) * np.log(1 - a)))
#For mutiple ys?
#If y = y_1, y_2, ... are desired output values, a^L... | FlowBoat/Flow-Tech-NeurAlgae | Versions/v0/NeurAlgae0.2.py | Python | gpl-3.0 | 7,825 | [
"NEURON"
] | 675a6c1eb2808160cf35eac98160867162991eb6245e9a0b2376d85da751a789 |
''' Automated particle selection (AutoPicker)
This script (`ara-autopick`) was designed locate particles on a micrograph using template matching
(like LFCPick), yet incorporates several post-processing algorithms to reduce the number of noise
windows and contaminants.
It will not remove all contaminants but experim... | ezralanglois/arachnid | arachnid/app/autopick.py | Python | gpl-2.0 | 36,461 | [
"Gaussian"
] | a6c9e173124dff1216a84b6c793e3fa78d020abaf8fc788720dce4b8c9eef70a |
#############################################################################################
#
# Python script to demonstrate interaction with CASDA's SIAP v2 service.
#
# This script does a SIA 2 query to get the image cubes for a given sky location, and creates an
# async job to download all matched image cube file... | csiro-rds/casda-samples | siap.py | Python | apache-2.0 | 4,692 | [
"Galaxy"
] | 0bebf2e09b2516fdffd8f5aee4c75f538739400ff2abe5cf375a9c062b648a75 |
#!/usr/bin/env python
##############################################################################################
#
#
# regrid_emissions_N96e.py
#
#
# Requirements:
# Iris 1.10, cf_units, numpy
#
#
# This Python script has been written by N.L. Abraham as part of the UKCA Tutorials:
# http://www.ukca.ac.uk/wiki... | acsis-project/emissions | emissions/python/periodic_1960/regrid_SO2_low_emissions_n96e_360d_1960.py | Python | gpl-3.0 | 7,020 | [
"NetCDF"
] | f872a0ecf59e030d3b1040d78a4941aef28d2d62483097c3bf78863965b44b6e |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('visit', '0025_auto_20150614_1727'),
]
operations = [
migrations.AlterModelOptions(
name='caregiver',
... | koebbe/homeworks | visit/migrations/0026_auto_20150614_1731.py | Python | mit | 493 | [
"VisIt"
] | f1ed2ea841329c666504308129d3b8d4fd5cfffb09fd2320f33d830cb4854634 |
#!/usr/bin/env python
import logging
logging.basicConfig()
log = logging.getLogger("gui")
import wx
import os, sys
from util.trayErrors import NoUndoError
from xtal_panel import XtalPanel
from screen_panel import ScreenPanel
from score_panel import ScorePanel
from stock_panel import StockPanel
#from dataStructures.re... | tschalch/pyTray | src/gui/main_frame.py | Python | bsd-3-clause | 17,121 | [
"CRYSTAL"
] | 12f2910ff4558ad71a6052cb175564c818bccc3479566bea665c232c443be79b |
#!/usr/bin/python3
# Author: Sari Sabban
# Email: sari.sabban@gmail.com
# URL: https://github.com/sarisabban
#
# Created By: Sari Sabban
# Created Date: 13 January 2017
#
# Modified By: Sari Sabban
# Modified Date: 3 February 2017
#
# Modified By: Sari Sabban
# Modified Date: 10 February 2017
import r... | sarisabban/RefineAssist | RefineAssist3.py | Python | mit | 7,363 | [
"Biopython",
"PyMOL"
] | 2a12b95b0f05ef3125ad3c2d1dcccb9495b8d4fc489febb90db1605c50bc6bbf |
#
# This source file is part of appleseed.
# Visit https://appleseedhq.net/ for additional information and resources.
#
# This software is released under the MIT license.
#
# Copyright (c) 2016-2019 Esteban Tovagliari, The appleseedhq Organization
#
# Permission is hereby granted, free of charge, to any person obtaini... | luisbarrancos/appleseed-maya2 | scripts/appleseedMaya/renderGlobals.py | Python | mit | 77,738 | [
"VisIt"
] | aacca05387d4cf617bd4f8c34b57d6cc1aee605bad7f69023705d5625bb58385 |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2021 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
#... | lothian/psi4 | psi4/share/psi4/databases/NBC10.py | Python | lgpl-3.0 | 98,454 | [
"Psi4"
] | e7d468491ad20d5cc61358389835abd419423141c6bf4301cbef1450bb4a9751 |
import logging
import glob
from opendrift.readers.reader_netCDF_CF_generic import Reader
def reader_from_url(url, timeout=10):
'''Make readers from URLs or paths to datasets'''
if isinstance(url, list):
return [reader_from_url(u) for u in url]
files = glob.glob(url)
for f in files: # Regular... | knutfrode/opendrift | opendrift/readers/__init__.py | Python | gpl-2.0 | 3,051 | [
"NetCDF"
] | 9a753edcc58178ef10b38fcfac740f3643702413f3c87abfa64938dd187509e1 |
#!/usr/bin/env python
import theano
import theano.tensor as T
import numpy
import numpy as np
import pickle as pkl
from collections import OrderedDict
import cPickle as pickle
from theano import config
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
floatX = config.floatX
def shared_to_cpu(sha... | codedecde/ImageQA | Src/TheanoModel/Code/simple_af_theano.py | Python | mit | 8,603 | [
"Gaussian"
] | 28ad9bb1d33debbd6134c27613525115635f9bfeb1a8df6c2aa484f95cca4c01 |
# WCS response decoder.
# Decodes response from a WCS (either a Coverages XML document or a Multipart MIME)
# and extracts the urls of the coverage data.
# Copyright (c) 2007 STFC <http://www.stfc.ac.uk>
# Author: Dominic Lowe, STFC
# contact email: d.lowe@rl.ac.uk
#
# Multipart MIME decoding based on http://aspn.activ... | kalxas/OWSLib | owslib/coverage/wcsdecoder.py | Python | bsd-3-clause | 3,848 | [
"NetCDF"
] | 63adcaf487fa05bb0682c1c68d68edf0f47e1a4f1f3e83130be3edc6f9b69727 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import numpy as np
from fractions import Fraction
from math import gcd
from itertools import groupby, product
from string import ascii_lowercase
from warnings import warn
import logging
import math
import war... | dongsenfo/pymatgen | pymatgen/transformations/advanced_transformations.py | Python | mit | 57,841 | [
"CRYSTAL",
"pymatgen"
] | cd029ff3c0bf7efe854785aa40ccbf5944963f1dbdfac86a365009e3dcefcece |
#!/usr/bin/python
import httplib
import httplib2
import os
import random
import sys
import time
from apiclient.discovery import build
from apiclient.errors import HttpError
from apiclient.http import MediaFileUpload
from oauth2client.file import Storage
from oauth2client.client import flow_from_clientsecrets
from oau... | lhongskie/yt-samples-python | upload_video.py | Python | apache-2.0 | 5,540 | [
"VisIt"
] | 9c4e2d76726f21e5fb306a16dd8f7045a7ef58e61950c65fd796da66129b6f11 |
#!/usr/bin/env python
# Copyright 2015 The Kubernetes 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
#
# Unle... | rawlingsj/gofabric8 | vendor/k8s.io/minikube/hack/boilerplate/boilerplate.py | Python | apache-2.0 | 5,254 | [
"VisIt"
] | 1644762af6684d5a9fc4840f9503f6eb8d1426de67b5b813c24a1a2dfc87c17e |
# coding: utf-8
"""
Factory functions producing ABINIT workflows. Entry points for client code (high-level interface)
"""
from __future__ import unicode_literals, division, print_function
from .abiobjects import KSampling, Screening, SelfEnergy, ExcHamiltonian, HilbertTransform
from .strategies import ScfStrategy, Nsc... | yanikou19/pymatgen | pymatgen/io/abinitio/calculations.py | Python | mit | 20,426 | [
"ABINIT",
"pymatgen"
] | 7ef538a19a18ccbb1e798ac0ac5263f88aba23c30183c5e10c6ddc450405bd19 |
#!/usr/bin/env python
import os
try:
__IPYTHON__
import sys
del sys.argv[1:]
except:
pass
import srwl_bl
import srwlib
import srwlpy
import math
import srwl_uti_smp
def set_optics(v=None):
el = []
pp = []
names = ['Lens', 'Lens_CRL', 'CRL', 'CRL_Zone_Plate', 'Zone_Plate', 'Zone_Plate_Fiber... | mkeilman/sirepo | tests/template/srw_generate_data/srw-all-optics.py | Python | apache-2.0 | 64,879 | [
"CRYSTAL",
"Gaussian"
] | bef37b48756734b3a781f8dad3b8217578660a119ea940d8923011382e75025a |
import pandas as pd
import numpy as np
import xarray as xr
import matplotlib.pyplot as plt
import matplotlib.dates as md
import requests
from netCDF4 import Dataset
from matplotlib import path
def tidal_currents(T, a1, a2, alpha):
"""Function estimates a depth averaged velocity
for a simple tidal channel
... | mguerrap/tydal | tydal/module3_utils.py | Python | mit | 12,090 | [
"NetCDF"
] | 5c7e12fefa81be298f8e38e086cacc7de11490900c08b1bd3b5b59627ebad2b4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.