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
# 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/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | googleads/google-ads-python | examples/remarketing/update_audience_target_restriction.py | Python | apache-2.0 | 7,937 | [
"VisIt"
] | c5556465071c7d1dabe661cff4d9e81cff0b3bb0e406d5f0009787ed3e20f602 |
#! /usr/bin/env python
from __future__ import absolute_import, division, print_function
from future.builtins import zip
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# Th... | JWDebelius/scikit-bio | skbio/stats/ordination/_base.py | Python | bsd-3-clause | 16,386 | [
"scikit-bio"
] | fabb340334c546124762bae1a59eb915c542c33aeed8b6c60a9f645e360039a5 |
# -*- coding: utf-8 -*-
"""
Generators for random graphs.
"""
# Copyright (C) 2004-2010 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
__author__ = "\n".join(['Aric Hagberg (hagberg@lanl.gov)',
... | marco-mariotti/selenoprofiles | libraries/networkx/generators/random_graphs.py | Python | gpl-2.0 | 30,592 | [
"VisIt"
] | 14a21a526a54caf6bcab0fef87b1376f236ab417c2e2bd84f16a57766754277e |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module defines filters for Transmuter object.
"""
import abc
from pymatgen.core.periodic_table import get_el_sp
from monty.json import MSONable
from pymatgen.analysis.structure_matcher import Structu... | gVallverdu/pymatgen | pymatgen/alchemy/filters.py | Python | mit | 13,153 | [
"pymatgen"
] | 5a5d1c288deb627003c4da12577ff320256574783e7a1b8f4150f62c099ac093 |
"""Train a self-driving truck via reinforcement learning."""
from __future__ import print_function, division
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import models as models_reinforced
from plans import create_plans
from batching import BatchLoader, BackgroundBatchLoader, st... | aleju/self-driving-truck | train_reinforced/train.py | Python | mit | 56,501 | [
"Gaussian"
] | 69812b3dc8f8c76d5facc637e686c5073703d6a079e7ae4351f315df9ad32439 |
# -*- coding: utf-8 -*-
"""Factories for the OSF models, including an abstract ModularOdmFactory.
Example usage: ::
>>> from tests.factories import UserFactory
>>> user1 = UserFactory()
>>> user1.username
fred0@example.com
>>> user2 = UserFactory()
fred1@example.com
Factory boy docs: http://f... | mluo613/osf.io | tests/factories.py | Python | apache-2.0 | 30,123 | [
"Brian"
] | 0ffac9fb0597402a98ba6853244bb852c4ec4bef33b45214499aab584058b21e |
import os
import types as pytypes
from copy import deepcopy
from superstring import string2val
from numpy import fromstring,empty,array,float64,ones,pi,dot
from numpy.linalg import inv
from unit_converter import convert
from generic import obj
from structure import Structure,kmesh
from physical_system import PhysicalSy... | habanero-rice/hclib | test/performance-regression/full-apps/qmcpack/nexus/library/pwscf_input.py | Python | bsd-3-clause | 56,402 | [
"CRYSTAL",
"DIRAC",
"QMCPACK"
] | cd8f606fc1c6632529928ea59a7eabd174e478db63dfeea79386a7a7cdcc12cb |
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... | Tatsh-ansible/ansible | lib/ansible/module_utils/basic.py | Python | gpl-3.0 | 106,833 | [
"VisIt"
] | b1a97416f5c95f85fa6aaf283f4c066ff5536d3a1279aa861c83f55ce1bcb06c |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Module for interfacing with phonopy, see https://atztogo.github.io/phonopy/
"""
import numpy as np
from monty.dev import requires
from monty.serialization import loadfn
from pymatgen.core import Lattice, ... | davidwaroquiers/pymatgen | pymatgen/io/phonopy.py | Python | mit | 14,469 | [
"phonopy",
"pymatgen"
] | 9a0a96032a01a9f85f946e14188c2ed5e82990fcbc2dbed752d207079dd1d85f |
import unittest
import numpy as np
from pyscf.lib import finger
from pyscf.pbc import gto as pbcgto
from pyscf.pbc import scf as pbcscf
from pyscf.pbc import df as pbc_df
import pyscf.cc
import pyscf.pbc.cc as pbcc
import pyscf.pbc.tools.make_test_cell as make_test_cell
from pyscf.pbc.lib import kpts_helper
import py... | gkc1000/pyscf | pyscf/pbc/cc/test/test_eom_kuccsd_diag.py | Python | apache-2.0 | 4,547 | [
"PySCF"
] | 8f6d90772e6c0f0de1cc0cb484a59af593f0a6941e5bac83226adb7f36a40767 |
#!/usr/bin/env python3
from plumbum import colors
with colors.fg.red:
print("This is in red")
print("This is completely restored, even if an exception is thrown!")
print("The library will restore color on exiting automatically.")
print(colors.bold["This is bold and exciting!"])
print(colors.bg.cyan | "This is o... | tomerfiliba/plumbum | examples/color.py | Python | mit | 704 | [
"exciting"
] | e81aea9f9eeadf0b7fde21be30b48e136a7ecd0d48afe4724b9d069f1245b266 |
# This file is part of cclib (http://cclib.github.io), a library for parsing
# and interpreting the results of computational chemistry packages.
#
# Copyright (C) 2007,2008,2012,2014,2015, the cclib development team
#
# The library is free software, distributed under the terms of
# the GNU Lesser General Public version... | jchodera/cclib | test/data/testTD.py | Python | lgpl-2.1 | 4,468 | [
"ADF",
"cclib"
] | 8b0f55dc21846dd316966ab43bd2f2917ba1a8b64f2cbe9c6ec7d74285b820ec |
#!/usr/bin/env python
from Scientific import MPI
import Numeric, sys
import os
communicator = MPI.world.duplicate()
num_cpus = 4
if communicator.rank == 0:
for i in xrange(201):
mod_cpus = i % num_cpus
print "i = %i, i %% num_cpus = %i" % (i, mod_cpus)
communicator.send(str(i), mod_cpus, 0)
#result, source, ... | paultcochrane/pyvisi | special_vis/steffen/make_frames_mpi.py | Python | gpl-2.0 | 750 | [
"VTK"
] | 69750c69d1dca953258b8ea6ceb4d5a592d8988ae993457cde0111839ce0ef33 |
"""
For managing policies. This seems like a better way to organize things. For now,
we have **stochastic** policies. This assumes the Python3 way of calling
superclasses' init methods.
TODO figure out a good way to integrate deterministic policies, figure out how
to get a good configuration file (for neural nets), et... | DanielTakeshi/rl_algorithms | utils/policies.py | Python | mit | 9,618 | [
"Gaussian"
] | b8a936d15a159df87ce01e2411a1a6bdf9a5937e56ec96b49bfe2983a3d94499 |
import os
from ase import Atom, Atoms
from gpaw import GPAW
from gpaw.test import equal
from gpaw.analyse.expandyl import ExpandYl
R=0.7 # approx. experimental bond length
a = 2.
c = 3.
H2 = Atoms([Atom('H', (a/2, a/2, (c-R)/2)),
Atom('H', (a/2, a/2, (c+R)/2))],
cell=(a,a,c), pbc=True)
calc = G... | qsnake/gpaw | gpaw/test/ylexpand.py | Python | gpl-3.0 | 1,049 | [
"ASE",
"GPAW"
] | 03dc2df7e1ed5c6e74c0d0615b9b5400e70dd5a193042e5e041c5750268f1d14 |
#! /usr/bin/env python
from openturns import *
TESTPREAMBLE()
RandomGenerator.SetSeed(0)
try:
dim = 10
R = CorrelationMatrix(dim)
for i in range(dim):
for j in range(i):
R[i, j] = (i + j + 1.0) / (2.0 * dim)
mean = NumericalPoint(dim, 2.0)
sigma = NumericalPoint(dim, 3.0)
... | sofianehaddad/ot-svn | python/test/t_HypothesisTest_correlation.py | Python | mit | 5,653 | [
"Gaussian"
] | a544bff5c0042fb14a684f9d23924aa71bbfaebdfd70eb86e7d1d51fb910aa2b |
# Default Django settings. Override these with settings in the module
# pointed-to by the DJANGO_SETTINGS_MODULE environment variable.
# This is defined here as a do-nothing function because we can't import
# django.utils.translation -- that module depends on the settings.
gettext_noop = lambda s: s
#################... | thiriel/maps | venv/lib/python2.7/site-packages/django/conf/global_settings.py | Python | bsd-3-clause | 22,070 | [
"VisIt"
] | fa60a17f283e9d1ac4ea9d58eded5eebacb3732365922a126e5c05b1c97cbb5e |
# -*- coding: utf-8 -*-
#! /usr/bin/env python
""" crypto.cipher.rijndael_test
Tests for the rijndael encryption algorithm
Copyright © (c) 2002 by Paul A. Lambert
Read LICENSE.txt for license information.
"""
from crypto.cipher.rijndael import Rijndael
from crypto.cipher.base import noPadding
from bin... | TheDSCPL/SSRE_2017-2018_group8 | Projeto/Python/cryptopy/crypto/cipher/rijndael_test.py | Python | mit | 9,588 | [
"Brian"
] | 96e5bed93a6218cbfa4903f613210b16194a2c3163b48b415d2710a5fe6ead2c |
from ase import *
from ase.calculators.emt import ASAP
try:
import Asap
except ImportError:
pass
else:
a = Atoms('Cu2', positions=[(0, 0, 0), (0, 0, 2.7)],
calculator=ASAP())
print a.get_distance(0, 1), a.get_potential_energy()
QuasiNewton(a).run(0.01)
print a.get_distance(0, 1), ... | freephys/python_ase | ase/test/asap.py | Python | gpl-3.0 | 345 | [
"ASE"
] | 3be3b528e9fb6f869b5726800e5c1036bb715b1531db040d415a71c7b935447d |
"""Test passing arguments of various types
Created on Sept 19, 2010 by David Gobbi
"""
import sys
import vtk
from vtk.test import Testing
arrays = [
vtk.vtkFloatArray,
vtk.vtkDoubleArray,
vtk.vtkSignedCharArray,
vtk.vtkShortArray,
vtk.vtkIntArray,
vtk.vtkLongArray,
vtk.vtkTypeInt64Array,
vtk.vtkIdTyp... | HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/VTK/Common/Core/Testing/Python/TestArrayArguments.py | Python | gpl-3.0 | 2,982 | [
"VTK"
] | f3b1ef36615e83f70375502718a831cf182738b27bab2f11751430e6ba8340c0 |
# -*- coding: 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):
# Deleting field 'ObstetricHistory.list_previous_obstetric_history'
db.delete_column(u'patient_obstetrichist... | aazhbd/medical_info01 | patient/migrations/0019_auto__del_field_obstetrichistory_list_previous_obstetric_history__del_.py | Python | bsd-3-clause | 30,080 | [
"VisIt"
] | abded570214c4b0a7aabdd190c6f68754f0bad073babcd8b69dd06620d4fad2d |
from setuptools import setup
__version__ = (5, 5, 8)
setup(
name="nchelpers",
description="Helper classes and methods for Climate and Forecast NetCDF"
"datasets",
keywords="NetCDF climate forecast",
packages=['nchelpers'],
version='.'.join(str(d) for d in __version__),
url="htt... | pacificclimate/nchelpers | setup.py | Python | gpl-3.0 | 1,497 | [
"NetCDF"
] | 54cbf73ef1ea38c4c7a65a0d974808c14b9e6d5a2feffede5aaf022a47c2e2b2 |
## Description: class MorphML for loading MorphML from file or xml element into MOOSE
## Version 1.0 by Aditya Gilra, NCBS, Bangalore, India, 2011 for serial MOOSE
## Version 1.5 by Niraj Dudani, NCBS, Bangalore, India, 2012, ported to parallel MOOSE
## Version 1.6 by Aditya Gilra, NCBS, Bangalore, India, 2012, further... | dilawar/moose-full | moose-core/python/moose/neuroml/MorphML.py | Python | gpl-2.0 | 40,696 | [
"MOOSE",
"NEURON"
] | a8e968df09afcd77e3d423ce3aa0cf5303d61094380aeaef2f626c6d6c1eeb18 |
"""
Parses an XML feed into a Python representation. You should probably use L{iface_cache.iface_cache} rather than the functions here.
"""
# Copyright (C) 2009, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from zeroinstall import _, logger
import os
import errno
from zeroinstall i... | rammstein/0install | zeroinstall/injector/reader.py | Python | lgpl-2.1 | 10,692 | [
"VisIt"
] | 7c820f04c7c6d97f55a4b0d4e0501d41ad7423b8d27655839d9686cf623fe8dd |
# coding: utf8
# copies.py - copy detection for Mercurial
#
# Copyright 2008 Olivia Mackall <olivia@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from __future__ import absolute_import
import collections
import os
... | jwren/intellij-community | plugins/hg4idea/testData/bin/mercurial/copies.py | Python | apache-2.0 | 47,022 | [
"VisIt"
] | fe59939304bad21710ba5c4125171cf8f33d564ede8ccbac2e553ea9074faca6 |
#!/usr/bin/env python
"""layoutCytoscapeWeb.py
Author: Sam Ng
Last Updated: 2014-06-13
"""
import math, os, re, shutil, sys
from copy import deepcopy
import pandas
import pandas
from PATHMARK import Pathway
from optparse import OptionParser
html_link = """<a href="%s">%s</a>"""
html_head = """<!DOCTYPE html PUBLIC... | UCSC-MedBook/MedBook_ | tools/old-external-tools/shazam/layoutCytoscapeWeb.py | Python | bsd-3-clause | 16,284 | [
"Cytoscape"
] | 4b3e453e4d502068debf52037478bad2c3779151ecb6fe6ee6995d5cb4b6c176 |
#
# @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/driver/procrouting/empirical_dispersion.py | Python | lgpl-3.0 | 14,895 | [
"Psi4"
] | 680f98f7ac65fe67c0279bd6a28861619f1e4dcfcdd5b698a75393f20b136833 |
from django.utils.six import BytesIO
from PIL import ImageFilter
from versatileimagefield.datastructures.filteredimage import FilteredImage
from versatileimagefield.registry import versatileimagefield_registry
class GaussianBlurImage(FilteredImage):
def process_image(self, image, image_format, save_kwargs={}):
... | rastrexando-eu/rastrexando-eu | core/versatile_filters.py | Python | gpl-3.0 | 591 | [
"Gaussian"
] | f0b153bbbdafaed67cca8d411fcf629ca11cc1ee552aecf481c96cf741e39a6b |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# checkconf - [insert a few words of module description on this line]
# Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of... | heromod/migrid | mig/server/checkconf.py | Python | gpl-2.0 | 6,600 | [
"Brian"
] | db93c97f546f092de58b3f0535f75c74b382ff5e437452a31acbe3352a59a3cb |
#!/usr/bin/env python
from pyscf import lib
from pyscf.scf import uhf
from mpi4pyscf.tools import mpi
from mpi4pyscf.scf import hf as mpi_hf
rank = mpi.rank
@mpi.register_class
class UHF(uhf.UHF, mpi_hf.SCF):
get_jk = mpi_hf.SCF.get_jk
get_j = mpi_hf.SCF.get_j
get_k = mpi_hf.SCF.get_k
def dump_fla... | sunqm/mpi4pyscf | mpi4pyscf/scf/uhf.py | Python | gpl-3.0 | 551 | [
"PySCF"
] | 94f1b7dd51dc9fedf7c615da78c447ff5027f82df7a756e6a85b215ba70ef495 |
#!/usr/bin/env python
"""
Artificial Intelligence for Humans
Volume 3: Deep Learning and Neural Networks
Python Version
http://www.aifh.org
http://www.jeffheaton.com
Code repository:
https://github.com/jeffheaton/aifh
Copyright 2015 by Jeff Heaton
Licensed under the Apache License, V... | trenton3983/Artificial_Intelligence_for_Humans | vol3/vol3-python-examples/lib/aifh/boltzmann.py | Python | apache-2.0 | 4,026 | [
"NEURON",
"VisIt"
] | 5cbf8820205623728ff000dcc4b3e4ff477a2adb62504dc052cb733837ca6de2 |
# expression.py
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Michael Bayer mike_mp@zzzcomputing.com
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Defines the base components of SQL expression trees.
All components are derived... | dbbhattacharya/kitsune | vendor/packages/sqlalchemy/lib/sqlalchemy/sql/expression.py | Python | bsd-3-clause | 152,008 | [
"VisIt"
] | cc8bce9e6622ee43cdb0c590c5aa5a25469fb190cd100e243fd887fa35fb7a41 |
#!/usr/bin/env python
# framework to start a simulated vehicle and connect it to MAVProxy
# Peter Barker, April 2016
# based on sim_vehicle.sh by Andrew Tridgell, October 2011
import optparse
import sys
import atexit
import os
import subprocess
import tempfile
import getpass
import time
import signal
class CompatErr... | roger-zhao/ardupilot-3.3 | Tools/autotest/sim_vehicle.py | Python | gpl-3.0 | 24,247 | [
"Firefly"
] | c61f993f80efe34ea2431774dca72b860005440deaaaab58b2e2187171d9b485 |
# Copyright (C) 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 versio... | psci2195/espresso-ffans | testsuite/scripts/tutorials/test_06-active_matter__enhanced_diffusion.py | Python | gpl-3.0 | 1,398 | [
"ESPResSo"
] | db9a638359ac91f0e165aed5efe96ab5247c53694dfd99b0eec24003d0aad8ea |
# -*- coding: utf-8 -*-
"""Tests for the CausalR algorithm."""
from pybel.dsl import gene, protein, rna
from pybel_tools.analysis.causalr import rank_causalr_hypothesis, run_cna
from tests.constants import ExampleNetworkMixin
HGNC = 'HGNC'
class TestCausalR(ExampleNetworkMixin):
def test_cna(self):
tes... | pybel/pybel-tools | tests/test_causalr.py | Python | mit | 3,786 | [
"Pybel"
] | 5b03d78c8e5d0359e1de7913585fd0709bebe9ce1c33facfa574be2381a5a895 |
import distutils.spawn
import os
import pickle
import sys
import subprocess as sp
import time as T
from morphct.code import helper_functions as hf
### There are still so many edge cases that the following function doesn't always
### work. Use the one below it instead.
# def check_job_output(orca_lines):
# # Somet... | matty-jones/MorphCT | morphct/code/single_core_run_orca.py | Python | gpl-3.0 | 7,597 | [
"ORCA"
] | f47445c8062356d24ed157354fce754dd094b11198a2b89bc5de7f2c246b168e |
# demonstrate 3d postprocessing with yade
#
# 1. qt.SnapshotEngine saves images of the 3d view as it appears on the screen periodically
# makeVideo is then used to make real movie from those images
# 2. VTKRecorder saves data in files which can be opened with Paraview
# see the User's manual for an intro to Parav... | hbenniou/trunk | doc/sphinx/tutorial/05-3d-postprocessing.py | Python | gpl-2.0 | 1,747 | [
"ParaView",
"VTK"
] | 1240f5aed20d1c14aea2d68920d784d93185ec6720a3a210e3f931636e31a804 |
#!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses... | Russell-IO/ansible | lib/ansible/modules/network/avi/avi_backup.py | Python | gpl-3.0 | 4,095 | [
"VisIt"
] | 61c92aad54923029eba4958756365e1854bdf41c84158b4454fe103f73a0d60d |
#!/usr/bin/env python
__author__ = "waroquiers"
import unittest
from pymatgen.analysis.chemenv.coordination_environments.chemenv_strategies import (
AdditionalConditionInt,
AngleCutoffFloat,
CSMFloat,
DistanceCutoffFloat,
SimplestChemenvStrategy,
)
from pymatgen.util.testing import PymatgenTest
... | vorwerkc/pymatgen | pymatgen/analysis/chemenv/coordination_environments/tests/test_chemenv_strategies.py | Python | mit | 4,657 | [
"pymatgen"
] | f73497bc52981c226d342d058b1025a11d77a1c561ca717a2c2ce93d3687e20a |
###BAMtoExonBED
#Author Nathan Salomonis - nsalomonis@gmail.com
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, co... | nsalomonis/AltAnalyze | import_scripts/BAMtoGeneVariants.py | Python | apache-2.0 | 12,504 | [
"pysam"
] | f0d371beb13d3920e2434940be0d313ccb893a2aa00f7efc2b5d35e0285e637c |
# 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 ... | Hybrid-Cloud/badam | patches_tool/aws_patch/aws_deps/libcloud/security.py | Python | apache-2.0 | 3,016 | [
"VisIt"
] | b68331e4cbc9f61168bbdd83a91f3682bfa438f3c22af68c0bac5ded88dac62b |
import numpy as np
from pproc import DiscretizedPointProcess
from ..inference.ess import elliptical_slice
from ..inference.whitened_mh import whitened_mh, spherical_proposal
from ..kernel import MultiKronKernel
from ..util.kron_util import kron_mat_vec_prod
#
# models a discretized log gaussian cox process in N dimen... | andymiller/flecks | models_modules/lgcp.py | Python | mit | 4,728 | [
"Gaussian"
] | c6eff2bde2b58a3f0cb1dbe82ddd8ad864b9199635775efaf02d89b827b896a1 |
#!/usr/bin/python2
# -*- Mode: Python; py-indent-offset: 8 -*-
# (C) Copyright Zack Rusin 2005
# All Rights Reserved.
#
# 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, ... | guorendong/iridium-browser-ubuntu | third_party/mesa/src/src/mapi/glapi/gen/gl_enums.py | Python | bsd-3-clause | 6,645 | [
"Brian"
] | 37754da1bf302289793c5a18a5b4f353f33ccb490d0801be9c30593d5287d012 |
#!/usr/bin/env jython
# copyright 2002 the Brothers Wilcox
# <mailto:zooko@zooko.com>
#
# This file is part of OvP.
#
# OvP is open source 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 Lic... | zooko/ogresvpixies | CAvCA.py | Python | gpl-2.0 | 8,165 | [
"VisIt"
] | be61c948e03352cce43bd17f55a13a1a0817fec17f2601753135813c6b9891f1 |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | pli3/Openwebif | plugin/controllers/views/mobile/bouquets.py | Python | gpl-2.0 | 5,911 | [
"VisIt"
] | dc3bf9350b0651ef91cb6f0ffb07697c3c093d6f3ca873808955b3d92fd9bf2b |
#!/usr/bin/env python
#
# Appcelerator Titanium Module Packager
#
#
import os, sys, glob
import zipfile
cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
required_module_keys = ['name','version','moduleid','description','copyright','license','copyright','platform','minsdk']
module_defaults = ... | rcarlsen/CompressionModule | build.py | Python | gpl-3.0 | 3,124 | [
"VisIt"
] | 7cdc59abfd0cfc41ce4a871fc9839cf90e717b4f86aadd79ef4f8254d43b1a00 |
# Copyright 2013-2021 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 *
class Nco(AutotoolsPackage):
"""The NCO toolkit manipulates and analyzes data stored in
netC... | LLNL/spack | var/spack/repos/builtin/packages/nco/package.py | Python | lgpl-2.1 | 3,089 | [
"NetCDF"
] | 34874c8403a010e8f01d9e64451fc1519deb70b475605d587272bc717ac1ced4 |
# Variational Bayes (VB) for univariate gaussian
# based on: https://github.com/probml/pmtk3/blob/master/demos/unigaussVbDemo.m
# Author: Gerardo Durán-Martín (@gerdm)
import superimport
import jax
import jax.numpy as jnp
import matplotlib.pyplot as plt
from jax import random
from jax.scipy import stats
from datacla... | probml/pyprobml | scripts/unigauss_vb_demo.py | Python | mit | 6,165 | [
"Gaussian"
] | 86eaca7c1ee6a221c4932a9e272b7e723addd3e9f3acf564872ef3a25140b48a |
# Copyright 2015 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... | kobejean/tensorflow | tensorflow/python/ops/gradients_impl.py | Python | apache-2.0 | 49,767 | [
"VisIt"
] | 838f6ffde5399b33d09b1c10aa1a5075b855f6337468579c0052e41e6f28a0bc |
# Import the old tracking id from the RCM file for period 19660101-19701231,
# as it is the first used file to create historical indices:
# (e.g. tasmin_EUR-44_IPSL-IPSL-CM5A-MR_historical_r1i1p1_SMHI-RCA4_v1_day_19660101-19701231.nc)
#track_GCM_indice=$(
import netCDF4
from netCDF4 import Dataset
import ctypes
im... | igryski/Indices_icclim_ClipC | src/TMIN/get_put_invar_tracking_id_python_TMIN_NO_BIAS_CORR.py | Python | gpl-3.0 | 11,515 | [
"NetCDF"
] | 12cde5def189286ccac744262cbc35b0678b8e72035e3a810c39faca85231a59 |
import ternary
import numpy as np
import pandas as pd
from functions import *
import sys
from functools import reduce
from sklearn.manifold import *
from sklearn.cluster import *
from sklearn.linear_model import *
from sklearn.ensemble import *
from pylab import *
import _pickle as cPickle
from skimage.filters import g... | gviejo/ThalamusPhysio | python/main_test_final_classification_XGB.py | Python | gpl-3.0 | 13,731 | [
"Gaussian"
] | 5cf67b5001f6afa7e7c4f72168e9deb5c441ec4f88821f6b1c880ff1b1092dbd |
# Import the rebound module
import rebound
import os
# Create a REBOUND simulation
sim = rebound.Simulation()
# Set variables (defaults are G=1, t=0, dt=0.01)
k = 0.01720209895 # Gaussian constant
sim.G = k*k # Gravitational constant
# Setup particles (data taken from NASA Horizons)
# This could also ... | eford/rebound | python_examples/outersolarsystem/problem.py | Python | gpl-3.0 | 1,903 | [
"Gaussian"
] | a83f6536275dbbd7859775e3d912454df13b932d3525c48706d421d5d6809dc5 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from preggy import expect
from octopus.model import Response
from tests import TestCase
class TestResponseModel(TestCase):
def test_can_create_response(self):
response = Response(
url="http://www.google.com",
status_code=200,
... | heynemann/octopus | tests/test_model.py | Python | mit | 1,198 | [
"Octopus"
] | 7e9b9e5292e458073b11031ae1445f64ec25c3f322e97a54af3777a256c56f4d |
# 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/Multiple_Contact_Classification/classify_2_objects_2_categories_1200ms_scaled.py | Python | mit | 9,645 | [
"Mayavi"
] | 36438ee4e733c3cec420fb3e46d9073d2bcc126ce5bc1a55acf26480ec55dc0d |
from ase.atoms import Atoms
def write_py(fileobj, images):
if isinstance(fileobj, str):
fileobj = open(fileobj, 'w')
fileobj.write('from ase import *\n')
if not isinstance(images, (list, tuple)):
images = [images]
fileobj.write('atoms = ')
else:
fileobj.write('ima... | freephys/python_ase | ase/io/py.py | Python | gpl-3.0 | 610 | [
"ASE"
] | 678bb504cae5c1a0f1ddba9e97c7e6bda5e7968272996f4a3d6a753a43cfad4c |
# $Id$
#
# Copyright (C) 2003-2006 greg Landrum and Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
"""unit testing code ... | strets123/rdkit | rdkit/Dbase/UnitTestDbConnect.py | Python | bsd-3-clause | 5,190 | [
"RDKit"
] | 167be4d219d468d92b1bcd14c9890ccb0ddbc3dda88ad6757a49706803afb11f |
# -*- coding: utf-8 -*-
# SMDL
# Steam Market DownLoader
# v 0.1
# 5/6/2016
# NQysit
import os
import time
import pprint
import requests
from bs4 import BeautifulSoup
# tournaments IDs
# 1 - 2013 DreamHack Winter
# 3 - 2014 EMS One Katowice
# 4 - 2014 ESL One Cologne
# 5 - 2014 DreamHack Winter
# 6 - 2015 ESL One Ka... | NQysit/smdl | get_tournament_stickers.py | Python | gpl-3.0 | 2,815 | [
"COLUMBUS"
] | b6bd895617f7bd169a9c5e15d03f6cbcb90c37a09b64ac73612f1c04b25d79f3 |
from numpy import *
from asap3 import *
from ase.lattice.cubic import FaceCenteredCubic
from ase import data
from asap3.testtools import *
import time
random.seed([114543, 8487])
listcutoff = 4.98409 # The EMT value for Cu
element = "Cu"
element2 = "Ag"
latconst = data.reference_states[data.atomic_numbers[element]]... | auag92/n2dm | Asap-3.8.4/Test/MonteCarloOptim_Alloy.py | Python | mit | 4,797 | [
"ASE"
] | 7adbe51acf969d3736d1f781e5d44675d3e89d264f533adf283305d999c07981 |
#Code to find the best fit bayesian solution to the running renormalisation
#SSP fitting method
#####################################################
#Import modules
import numpy as np
from scipy.io import readsav
from numpy import random
import emcee_1
import sys
import cPickle
from astropy.io import fits
from RR_fun... | elizabethswann/RR_fitter | codes/bayesian_force.py | Python | mit | 9,747 | [
"Galaxy"
] | 2ad07a904d50602eadf6235b46c6d1aa22dabae773e77ef4de4b4e6655801f79 |
"""
This plugin adds support for the ParaSail language.
The following features are provided:
* GPR project support:
- "ParaSail" becomes available in the list of languages for projects
when creating or editing projects through the GPS inteface.
When editing projects outside of GPS, all is needed... | qunying/gps | share/library/parasail.py | Python | gpl-3.0 | 2,132 | [
"ASE"
] | f5d1548c6e0ab05fbf1b644526c2feeed1ff5f5cbe6d69816b49b63a36324bc5 |
"""Test scriptlet to add an additional ball into play"""
# add_a_ball.py
# Mission Pinball Framework
# Written by Brian Madden & Gabe Knuth
# Released under the MIT License. (See license info at the end of this file.)
from mpf.system.scriptlet import Scriptlet
class AddABall(Scriptlet):
def on_load(self):
... | spierepf/mpf | machine_files/demo_man/scriptlets/add_a_ball.py | Python | mit | 1,670 | [
"Brian"
] | 21c522f9f9430056e56b8b06ab0c5573cffdeba28eedba857df9425755d20de1 |
#--------------------------------------------------------------------------
# Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas
# Copyright: (C) 2001 Centro de Pesquisas Renato Archer
# Homepage: http://www.softwarepublico.gov.br
# Contact: invesalius@cti.gov.br
# License: GNU ... | tatiana/invesalius | invesalius/data/mask.py | Python | gpl-2.0 | 3,324 | [
"VTK"
] | 069918212627bc39e6957d8541f048e6946a75da3b7780ff3e486c903c5a7de9 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Simulation and plotting script reproducing figure 2 of:
Multimodal modeling of neural network activity: computing LFP, ECoG, EEG and
MEG signals with LFPy2.0
Espen Hagen, Solveig Næss, Torbjørn V Ness, Gaute T Einevoll
bioRxiv 281717; doi: https://doi.org/10.1101/28171... | espenhgn/LFPy | examples/bioRxiv281717/figure_2.py | Python | gpl-3.0 | 27,642 | [
"NEURON"
] | f60b7a216f4a80e156f5ef35ddc3314394456f846bc064f462bcdbfe9bac563e |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Sun Aug 7 13:44:32 2016
@author: agiovann
"""
from __future__ import division
from __future__ import print_function
#%%
from builtins import str
from builtins import range
from past.utils import old_div
get_ipython().magic('load_ext autoreload')
get_ipyt... | simonsfoundation/CaImAn | use_cases/granule_cells/powell_graph.py | Python | gpl-2.0 | 7,733 | [
"NEURON"
] | 21e560cd705ebcb88619759be81c5d96fa24190718ab292a90fe525734a26c78 |
# Orca
#
# Copyright 2005-2009 Sun Microsystems Inc.
#
# This library 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 2.1 of the License, or (at your option) any later version.
#
# This... | Alberto-Beralix/Beralix | i386-squashfs-root/usr/share/pyshared/orca/scripts/apps/soffice/formatting.py | Python | gpl-3.0 | 5,815 | [
"ORCA"
] | fe11da89e461b85720d1fe692408cd9d6e7d4240ddc614c369500bbaf670dfb9 |
""" File catalog class. This is a simple dispatcher for the file catalog plug-ins.
It ensures that all operations are performed on the desired catalogs.
"""
import types, re
from DIRAC import gLogger, gConfig, S_OK, S_ERROR
from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations
from DIRAC.... | avedaee/DIRAC | Resources/Catalog/FileCatalog.py | Python | gpl-3.0 | 11,179 | [
"DIRAC"
] | dc3cfda380ffa875a720cd539aa3a0fd30ec0cf5c336332a2950e96534c2e7c6 |
# -*- coding: utf-8 -*-
################################################################################
###
### ReadTABLEfile
###
################################################################################
###
### a package that reads a table-style file and organizes it into a dictionary according to the colu... | lorisercole/thermocepstrum | sportran/i_o/read_tablefile.py | Python | gpl-3.0 | 12,385 | [
"LAMMPS"
] | 6562013b02741d31b021a3a9e14ae169b6dd51e29039d1f39bfbb3fe8a66d1e9 |
import numpy as np
from openpathsampling.integration_tools import unit
functions = ['trajectory_coordinates', 'trajectory_box_vectors',
'trajectory_velocities']
def _trajectory_units(traj, feature, unit_):
def strip_unit(obj):
try:
obj = obj.value_in_unit(unit_)
except Att... | choderalab/openpathsampling | openpathsampling/engines/openmm/features/traj_quantities.py | Python | lgpl-2.1 | 1,023 | [
"OpenMM"
] | afaea6099769020d0f1bb9931d097ffdb2a394a1fe6277efb492d46545aefe1e |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module implements Compatibility corrections for mixing runs of different
functionals.
"""
import os
import abc
import warnings
from collections import defaultdict
from typing import Sequence, Union, O... | mbkumar/pymatgen | pymatgen/entries/compatibility.py | Python | mit | 43,079 | [
"VASP",
"pymatgen"
] | 8359c8051cd5628689351032204d90f79b4c3e5243f411f306dad99e97ef6fbb |
from django.test import TransactionTestCase
from django.contrib.auth.models import Group
from django.conf import settings
from hs_core import hydroshare
from hs_core.hydroshare import utils
from hs_core.models import CoreMetaData
from hs_core.testing import TestCaseCommonUtilities
class TestNetcdfMetaData(TestCaseCo... | RENCI/xDCIShare | hs_app_netCDF/tests/test_netcdf_metadata_user_zone.py | Python | bsd-3-clause | 6,484 | [
"NetCDF"
] | 3e6b0c76ecf3202910eefd3739a24e82c06bc086806961dc428586c286ffeab3 |
"""
Processes for Species distribution
Author: Nils Hempelmann (nils.hempelmann@lsce.ipsl.fr)
"""
from pywps.Process import WPSProcess
from flyingpigeon.sdm import _SDMINDICES_
from flyingpigeon.log import init_process_logger
import logging
logger = logging.getLogger(__name__)
class SDMgetindicesProcess(WPSProcess)... | KatiRG/flyingpigeon | flyingpigeon/processes/wps_sdm_getindices.py | Python | apache-2.0 | 4,813 | [
"NetCDF"
] | 939dcb2ac61bbf39a52a6d416cab885cc16a6f7e5bd3277322cf47d2c8b6808c |
# combine and streamline sampler.py and distn_input.py
"""
This module allows for sampling of distributions encountered in wind energy research using a flexible
text input file specification. The distributions currently available are:
- Weibull
- Gamma
- vonMises
- uniform
- normal
- bivariate normal
In additio... | FUSED-Wind/fusedwind | src/fusedwind/runSuite/runCaseGenerator.py | Python | apache-2.0 | 27,215 | [
"Gaussian"
] | 15f1a773a8ede4c291236f37e69a35994f1ad0bf23059fe0d289b47a797f25c7 |
#!/usr/bin/env python
# Copyright 2014-2021 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... | sunqm/pyscf | pyscf/cc/uintermediates_slow.py | Python | apache-2.0 | 7,310 | [
"PySCF"
] | a20d68d25b7427cd0778bb0f458b960ffe0333f598ef4a45055811eb15ef27ac |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
sessions2trash.py
Run this script in a web2py environment shell e.g. python web2py.py -S app
If models are loaded (-M option) auth.settings.expiration is assumed
for sessions without an expiration. If models are not loaded, sessions older
than 60 minutes are removed. U... | Titosoft/ferry-boat | web2py/scripts/sessions2trash.py | Python | mit | 7,888 | [
"VisIt"
] | cdfe7bb7d21330afe119ff6e1ac33a4988dcb5389ee3ad88f8e52e60b640dc49 |
from copy import deepcopy
from random import choice
from typing import Callable, Tuple, Union
from networkx.algorithms.dag import topological_sort
import numpy as np
from matplotlib import pyplot as plt
from networkx.classes.multidigraph import MultiDiGraph
from numpy.core.multiarray import ndarray
from numpy.core.num... | neildhir/DCBO | src/bases/root.py | Python | mit | 29,854 | [
"Gaussian"
] | a01f18a6bff38b7b75a265e9f3b3e3a5fd17613c5124196b7f448318db61409f |
import json
import os
import sys
from functools import wraps
from typing import Any, Callable, Dict, Iterable, List, Optional, Set
from zulip import Client
from zerver.lib import mdiff
from zerver.models import get_realm, get_user
from zerver.openapi.openapi import validate_against_openapi_schema
ZULIP_DIR = os.path... | timabbott/zulip | zerver/openapi/python_examples.py | Python | apache-2.0 | 40,589 | [
"Octopus"
] | 19549b6f51394050d42f37b15bf5f090f8942cb85e48497ab53a74b396fdf73d |
# Copyright (c) 2015 RIPE NCC
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the h... | danielquinn/ripe-atlas-tools | ripe/atlas/tools/commands/go.py | Python | gpl-3.0 | 1,380 | [
"VisIt"
] | 3e6232567389c7b8128cbf2f7a3ac21b12570f1b8880ad57c2b0c35ece87c21b |
from .periodic_table import lookup_element_by_symbol
class MoleculeFormatterMixin(object):
def format_psi4(self, guess_charge=False):
"""
Formats a molecule in a format suitable for psi4
"""
if guess_charge:
self.guess_charge()
template = ("molecule {title} {{... | jasonrig/molecule-utils | molutils/util/molecule_formatters.py | Python | mit | 2,962 | [
"GAMESS",
"Psi4"
] | f8a8bd9bf8ca0e67b5fd9c2560ca0fd366c6efdf9da55246df661161623e5c1f |
"""Loads configurations from .yaml files and expands environment variables.
"""
import copy
import collections
import glob
import math
import os
import pprint
import sys
import yaml
import toolz as tz
class CmdNotFound(Exception):
pass
# ## Generalized configuration
def update_w_custom(config, lane_info):
"... | Cyberbio-Lab/bcbio-nextgen | bcbio/pipeline/config_utils.py | Python | mit | 17,637 | [
"Bioconda",
"Galaxy"
] | fc6cd8a49be5ea8a0fdf82a66f97d01c49fe532b42173b8e9ea96b67a87190f7 |
#!/usr/bin/env python
# Contiguity - Tool for visualising assemblies
# Copyright (C) 2013-2015 Mitchell Sullivan
# 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,... | mjsull/Contiguity | Contiguity.py | Python | gpl-3.0 | 248,810 | [
"BLAST",
"Bowtie"
] | 87b033a9275858d16938722660038fba9ddbd6e508b3370de8243ffdb97fff55 |
from __future__ import absolute_import, division, print_function
from jaspyx.ast_util import ast_call
from jaspyx.visitor import BaseVisitor
class FuncNew(BaseVisitor):
def func_new(self, type_, *args):
self.output('(new ')
self.visit(ast_call(type_, *args))
self.output(')')
| ztane/jaspyx | jaspyx/visitor/func_new.py | Python | mit | 306 | [
"VisIt"
] | 5ec6655bff7db17be49db56bc462d4d885d01c2dd0fd73809cc060431e4b98a8 |
'''Implementation of the Mapper class using BWA (Heng Li) mapper.
:Date: 17 Sep, 2015
:Author: Alex Jironkin
'''
from collections import OrderedDict
import logging
import os
import shlex
from subprocess import Popen, PIPE
import subprocess
import tempfile
from phe.mapping import Mapper
class BWAMapper(Mapper):
... | phe-bioinformatics/PHEnix | phe/mapping/BWAMapper.py | Python | gpl-3.0 | 3,655 | [
"BWA"
] | f6fe12e99cef94b8dd8a12e3e2eb97a203d35abc684ac9e511b55c68398abea5 |
'''Term visiting.'''
class Visitor(object):
'''Base class for term visitors.'''
def __init__(self):
pass
def visit(self, term, *args, **kargs):
'''Visit the given term.'''
return term.accept(self, *args, **kargs)
def visitTerm(self, term, *args, **kargs):
raise NotImplementedError
def visitLit(self, ... | mewbak/idc | aterm/visitor.py | Python | lgpl-2.1 | 2,047 | [
"VisIt"
] | b421898a3ad8daad0446ca6d8cb9adb6af347d213d93f71acfd833fae8d1287e |
# -*- coding: utf-8 -*-
"""
Domain adaptation with optimal transport
"""
# Author: Remi Flamary <remi.flamary@unice.fr>
# Nicolas Courty <ncourty@irisa.fr>
# Michael Perrot <michael.perrot@univ-st-etienne.fr>
#
# License: MIT License
import numpy as np
import scipy.linalg as linalg
from .bregman impo... | aje/POT | ot/da.py | Python | mit | 68,413 | [
"Gaussian"
] | f439e2c03a1387af625405477280024d998e94e0f70600dc570e5d1ce0ded91f |
"""Pretty-printing (pprint()), the 'Print' Op, debugprint() and pydotprint().
They all allow different way to print a graph or the result of an Op
in a graph(Print Op)
"""
from __future__ import absolute_import, print_function, division
from copy import copy
import logging
import os
import sys
import hashlib
import n... | Weihonghao/ECM | Vpy34/lib/python3.5/site-packages/theano/printing.py | Python | agpl-3.0 | 47,918 | [
"Amber"
] | 5c308aeb4581e7f0b25499cd1c1fd07caac5b6fc08832fac2305e536e9215ddf |
from functools import total_ordering
from .owlobject import OWLObject
from .owlobjectvisitor import OWLObjectVisitor
@total_ordering
class OWLAnnotation(OWLObject):
"""TODO: implement"""
def __init__(self, property, value, annotations):
"""
:param property: an owlapy.model.OWLAnnotationPrope... | patrickwestphal/owlapy | owlapy/model/owlannotation.py | Python | gpl-3.0 | 1,780 | [
"VisIt"
] | d461704fc7c2f5acf9017ae50116da789d6368d73222c42cd2a833694d953e4e |
import numpy as np
from mayavi import mlab
import mayavi.tools
from tvtk.api import tvtk
def scale(fig, ratio, reset=False):
"""
Scales a Mayavi figure and resets the camera.
Parameters
----------
"""
for actor in fig.scene.renderer.actors:
if reset:
actor.scale = np.ones(3... | joferkington/scipy2015-3d_printing | utils.py | Python | mit | 3,167 | [
"Mayavi",
"VTK"
] | 671e896da76e3dc69befd5af089a9be729ecfa5a49c0e326794b4eef6a423462 |
# Copyright (C) 2013, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from __future__ import print_function
import os, subprocess
from io import BytesIO
from os.path import join, dirname, basename, relpath
from xml.dom import minidom, Node
from zeroinstall.injector import qdom, model,... | bastianeicher/0repo | repo/incoming.py | Python | lgpl-2.1 | 9,425 | [
"VisIt"
] | 4126bfa56b0f8a3277c7a3a87c815b6ce5ea2dbcf9247e94a7bcbb1b9abcf95b |
""" Test class for FileCatalogComponents
"""
# pylint: disable=protected-access
# imports
from mock import MagicMock
from DIRAC.DataManagementSystem.DB.FileCatalogComponents.DirectoryManager.DirectoryTreeBase import DirectoryTreeBase
from DIRAC.DataManagementSystem.DB.FileCatalogComponents.DirectoryManager.DirectoryL... | DIRACGrid/DIRAC | src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/test/Test_DataManagement_FileCatalogComponents.py | Python | gpl-3.0 | 3,219 | [
"DIRAC"
] | affb1e90f2dd87757a521012959aac291eb410910e5aed1eb872e1ea9db924e1 |
# -*- coding: utf-8 -*-
"""
@author: Jussi Tiira
"""
import snowfall as sf
import read
import numpy as np
from os import path
import netCDF4 as cdf
from datetime import datetime, date, timedelta
resultspath = '../results/netcdf'
identifier = 'PIP_004'
instr_prefix = identifier + '_'
ext = '.cdf'
dtformat = '%Y-%m-%dT... | juhi24/baecc | scripts/scr_netcdf.py | Python | gpl-3.0 | 4,584 | [
"NetCDF"
] | 86342216be581f36d8ea91ce1f107054952c229ecfff3852039bec8bf8a231c0 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Generate dummy data for tests/examples
"""
import numpy as np
def dummy_gauss_image(x=None, y=None,
xhalfrng=1.5, yhalfrng=None, xcen=0.5, ycen=0.9,
xnpts=1024, ynpts=None, xsigma=0.55, ysigma=0.25,
nois... | maurov/xraysloth | sloth/test/dummy_data.py | Python | bsd-3-clause | 2,978 | [
"Gaussian"
] | 69d51fda54f3611d003566b7dd585fd7cd315762034de7a58d63d14dc75babf1 |
##############################################################################
##############################################################################
# Routines for
# Parameter inference using GPO
#
# Copyright (c) 2016 Johan Dahlin
# liu (at) johandahlin.com
#
##################################################... | compops/gpo-abc2015 | para/gpo_gpy.py | Python | mit | 27,008 | [
"Gaussian"
] | 6cf477ff201afe2e88fef75b96dbf455a20cb22181e26c87c190249908432f6f |
from builtins import object
###############################################################################
#
# Copyright (c) 2011 Ruslan Spivak
#
# 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 Softw... | mdiener/grace | grace/py27/slimit/ast.py | Python | gpl-3.0 | 10,869 | [
"VisIt"
] | 87ff8ef352749e33ad9c149ed6724001563d78299e0fd074e542a0784c4c0fcc |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import os
import re
import webapp2
import jinja2
import logging
from markupsafe import Markup, escape # https://pypi.python.org/pypi/MarkupSafe
import parsers
from google.appengine.ext import ndb
from google.appengine.ext import blobstore
from google.appengine.api impo... | mfhepp/schemaorg | sdoapp.py | Python | apache-2.0 | 56,932 | [
"VisIt"
] | 1bc9303040b8d0e2634bb947a232313f9a1e8bcfe5becf3ee5ba237fb2377673 |
import numpy as np
from input_parameters.preprocess import *
from input_parameters.general_parameters import *
import sys
from decimal import Decimal
import matplotlib.pyplot as plt
from beams.beams import *
from input_parameters.rf_parameters import *
from plots.plot_beams import *
from plots.plot_impedance i... | kiliakis/BLonD | __TEST_CASES/main_files/TC10_Fixed_frequency.py | Python | gpl-3.0 | 3,581 | [
"Gaussian"
] | fa543aecdc4f9ff76602cd1e5730a08cd2b81f064a30bbe4418dc7f6f3c7eee9 |
from . import make_sequence_from_gate_lists
# TODO: pulse_mod
################################################################
# ALLXY
################################################################
allxy_gates = [['I', 'I'],
['X', 'X'],
['Y', 'Y'],
['X', 'Y'],
... | QCoDeS/Qcodes-contrib | qdev_transmon_helpers/sequencing/allxy.py | Python | mit | 1,183 | [
"Gaussian"
] | 6566c64117de45c02fb761c33a3b6f4aeb8d9ec6d9d56a937d75c5ac23716a78 |
import sys
import os
import io
import psycopg2
import xml.etree.ElementTree as ET
from lxml import etree
import math
from collections import Counter
from operator import itemgetter
import datetime
import collections
#Intended for use with CWar
def block(ch):
'''
Return the Unicode block name for ch, or None... | grantdelozier/TopoCluster | experimental/TestResolverVCWar_NER.py | Python | apache-2.0 | 33,612 | [
"FEFF"
] | a9230444dc2bc4ba265e852891ddaec752e92393e992a9f21e942c5abd1a7fb6 |
"""Python definition of EMT parameters."""
from asap3.Internal.BuiltinPotentials import EMTParameters
import copy
import numpy as np
import ase
bohr = 0.5291772; # Same number of digits as in EMTDefaultParameters
bohr3 = bohr * bohr * bohr
_std_emt_params = {
13: {"name" : "Al",
"E0": -3.280,
... | auag92/n2dm | Asap-3.8.4/Python/asap3/Internal/EMTParameters.py | Python | mit | 8,783 | [
"ASE"
] | a581c1779fb2f1302337a7c2c16e571336258a96c8f964ea2f623c924c7d3170 |
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
from __future__ import division
import os
import shutil
import subprocess
import tempfile
import numpy as np
from .coords import angstrom
__all__ = ['MopacSolver']
def MopacSolver(cmd='mopac', method='PM7', work... | azag0/pyberny | src/berny/solvers.py | Python | mpl-2.0 | 3,411 | [
"MOPAC"
] | 89508c1f58f49e7816e782ce6e4a055d37dbe4ae3df38da6e371f3ebfef4c39e |
# sliceDirections.py copyright (c) 2003 Charl P. Botha <cpbotha@ieee.org>
# $Id$
# class encapsulating all instances of the sliceDirection class
import gen_utils
# the following two lines are only needed during prototyping of the modules
# that they import
import modules.viewers.slice3dVWRmodules.sliceDirection
reloa... | chrisidefix/devide | modules/viewers/slice3dVWRmodules/sliceDirections.py | Python | bsd-3-clause | 22,637 | [
"VTK"
] | 73a0e0a37c15f5f1acfa1671867c7545fbafc6a38ce6181f4344b9bf4b21e608 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.