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 |
|---|---|---|---|---|---|---|---|
"""
Bok choy acceptance tests for conditionals in the LMS
"""
from flaky import flaky
from capa.tests.response_xml_factory import StringResponseXMLFactory
from common.test.acceptance.tests.helpers import UniqueCourseTest
from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc
from common.t... | itsjeyd/edx-platform | common/test/acceptance/tests/lms/test_conditional.py | Python | agpl-3.0 | 4,885 | [
"VisIt"
] | 6b893e75a8743b3ffea1b19a21657f2a4e898481e4fec30705af0827b639feee |
#!/usr/bin/env python3
#pylint: disable=missing-docstring
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
... | nuclear-wizard/moose | python/chigger/tests/transform/scale.py | Python | lgpl-2.1 | 942 | [
"MOOSE",
"VTK"
] | 3d01d1cb0892eca98d6029ed993278cddc5523e8a84ab65e98e16446b1e3a4ef |
#!/usr/bin/env python
''' VIC exact restart testing '''
import numpy as np
import datetime
import os
import glob
import xarray as xr
import warnings
from test_utils import read_vic_ascii
from tonic.testing import VICTestError
def prepare_restart_run_periods(restart_dict, state_basedir):
''' For restart tests, re... | wietsefranssen/VIC | tests/test_restart.py | Python | gpl-2.0 | 16,190 | [
"NetCDF"
] | bda4a94893392333cb94ba13e432161c752d2632b7630ea93c2d12ef313b4215 |
# -*- coding: utf-8 -*-
#
# AtHomePowerlineServer - networked server for CM11/CM11A/XTB-232 X10 controllers
# Copyright © 2014, 2019 Dave Hocker
#
# 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 Fou... | dhocker/athomepowerlineserver | commands/DeviceBright.py | Python | gpl-3.0 | 1,552 | [
"xTB"
] | 7958bfae5a888f9c2fdb97bfe817c20f0bf5810b2389a17dd039eab0e37f1f5b |
# Copyright 2009-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""View classes for ITranslationMessage interface."""
__metaclass__ = type
__all__ = [
'BaseTranslationView',
'contains_translations',
'convert_translationmessag... | abramhindle/UnnaturalCodeFork | python/testdata/launchpad/lib/lp/translations/browser/translationmessage.py | Python | agpl-3.0 | 71,809 | [
"VisIt"
] | 7689d5b4258f9f8c31bfc1070a6ce9833571a3166d15062e24969d6f38d2dcfd |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2011 - 2015 -- Lars Heuer <heuer[at]semagia.com>
# All rights reserved.
#
# License: BSD, see LICENSE.txt for more details.
#
"""\
Tests classificationist parsing.
:author: Lars Heuer (heuer[at]semagia.com)
:organization: Semagia - <http://www.semagia.com/>
:license: ... | heuer/cablemap | cablemap.core/tests/test_reader_classified_by.py | Python | bsd-3-clause | 39,464 | [
"Brian",
"VisIt"
] | 1fefbade559281e040b17e735fded7aea9c90bf4ad8965c390d70ba9ab2071c1 |
#!/usr/bin/env vtkpython
''' Script to rewrite McStas trace output to VTK for plotting '''
# initially from python/mcdisplay/matplotlib
# ported to VTK by Gael Goret, Eric Pellegrini and Bachir Aoun, nMoldyn project, ILL/CS 2014
#
import numpy as np
import vtk
import sys
from util import parse_multiline, rotate, r... | mads-bertelsen/McCode | tools/Python/obsoleted/mcdisplay-VTK/mcdisplay.py | Python | gpl-2.0 | 8,027 | [
"VTK"
] | ef8a2bff5db76568b3e32eb6b20aea633ef01a200464f48b91616ba8fc3b8ef0 |
import random
import tictactoe
import numpy as np
from math import sqrt, log
class Node:
""" A node in the game tree. Note wins is always from the viewpoint of playerJustMoved.
Crashes if state not specified.
"""
def __init__(self, move=None, parent=None, state=None):
self.move = move # t... | Perif/MCTS | mymcts.py | Python | gpl-3.0 | 6,549 | [
"VisIt"
] | 83b5d22391d78bfe18eb87e16cd91742ded4a27f075eeb26fafca1f1c2764705 |
#!/usr/bin/env python3
import fastentrypoints # NOQA pylint: disable=unused-import
from setuptools import setup, find_packages
def read_file(fn):
with open(fn) as f:
content = f.read()
return content
setup(
name="ymp",
use_scm_version={'write_to': 'src/ymp/_version.py'},
description="Fl... | epruesse/ymp | setup.py | Python | gpl-3.0 | 2,505 | [
"Bioconda"
] | ea6e9ff0c2826d85d15a61f377a2da05ef239443bf6211bdf2854e282156b3be |
import openvoronoi as ovd
import ovdvtk
import time
import vtk
import datetime
import math
import random
import os
def drawLine(myscreen, p1, p2):
myscreen.addActor(ovdvtk.Line(p1=(p1.x, p1.y, 0), p2=(p2.x, p2.y, 0), color=ovdvtk.yellow))
def writeFrame(w2if, lwr, n):
w2if.Modified()
current_dir = os.ge... | aewallin/openvoronoi | python_examples/line-segment/lineseg_1.py | Python | lgpl-2.1 | 4,285 | [
"VTK"
] | f9373f94585b880c9a5ea1b25dd5fc9236b34d9ff350e3c86b0aa56c5d906fe6 |
# Dilate 3D horizontal
# May 2016 - Martijn Koopman
# ToDo: Clean code; pass variable dims to function GetArrValue() and SetArrValue() as arguments
# User parameters
radius = 2 # 2 * 10 cm on both sides + 10 cm in middle = 50cm
vertical_extrusion = 1 # 19 * 10 cm = 190 cm
# Input
idi = se... | martijnkoopman/thesis | 1_dilate.py | Python | gpl-3.0 | 2,869 | [
"VTK"
] | 4a52dde59133dc9dcd76bf97df7e69f438d1ea3056c8267600df6ffd2eb41425 |
#!/usr/bin/env python
"""
Complement regions.
usage: %prog in_file out_file
-1, --cols1=N,N,N,N: Columns for chrom, start, end, strand in file
-l, --lengths=N: Filename of .len file for species (chromosome lengths)
-a, --all: Complement all chromosomes (Genome-wide complement)
"""
from galaxy import eggs
i... | volpino/Yeps-EURAC | tools/new_operations/gops_complement.py | Python | mit | 3,083 | [
"Galaxy"
] | a3ea6473c03089ee67160fa15fce7c2ba339c865b5652cff582317337d117727 |
## numpy-oldnumeric calls replaced by custom script; 09/06/2016
##
## Biskit, a toolkit for the manipulation of macromolecular structures
## Copyright (C) 2004-2018 Raik Gruenberg & Johan Leckner
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public L... | graik/biskit | biskit/pdbModel.py | Python | gpl-3.0 | 139,409 | [
"Amber"
] | 92d01e54ec6aa43175b6b278e7c7cdf3bc716babffba74af9759036673c082d2 |
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 18 16:46:57 2015
@author: liorf
"""
from numpy import *
from matplotlib.mlab import find
from scipy.stats import mode, chisquare
import time
def clean_tree_for_pickle(tree_node):
# tree_node.relations=None
if tree_node.chosen_query is None:
return
t... | lioritan/Thesis | problems/alg10_ficuslike.py | Python | gpl-2.0 | 41,817 | [
"VisIt"
] | e2217bb11ba632cc7f320a00a2c637ba8a69019efb21c36afdf099a887892bed |
'''
Finding matches and no matches between a fasta and a BLAST file
Usage: python find_match_2.py <fasta_file> <blast_file> <kind of sequence in blast rna/prot>
Author: Nicolas Schmelling
'''
import sys
from Bio import SeqIO
def compare(fasta_file, blast_file, kind):
RNA_hit = {}
fasta_hit = {}
... | luizirber/galGal | scripts/find_match_2.py | Python | bsd-3-clause | 1,332 | [
"BLAST"
] | 37fad626644d52e710f41032992c1330a455594f7d6388ba031c8208e2420e62 |
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | EricSB/nupic | src/nupic/data/generators/distributions.py | Python | agpl-3.0 | 4,449 | [
"Gaussian"
] | ab3b74cba6dfaa319b87af053cf87beca3dd0b13126d40459fb913f3c774a667 |
# This script is executed in the main console namespace so
# that all the variables defined here become console variables.
from __future__ import division
import director
from director import irisdriver
import os
import sys
import PythonQt
import json
from PythonQt import QtCore, QtGui
from time import time
import i... | patmarion/director | src/python/director/startup.py | Python | bsd-3-clause | 38,781 | [
"VTK"
] | 62924e445d9d0b89b8cd1149e4e311d77305c49f5be81b72006da6504280efbe |
#
# Copyright 2015 by Justin MacCallum, Alberto Perez, Ken Dill
# All rights reserved
#
import numpy as np
import math
class ProteinBase(object):
'''
Base class for other Protein classes.
Provides functionality for translation/rotation and adding H-bonds.
'''
def __init__(self):
self._t... | laufercenter/meld | meld/system/protein.py | Python | mit | 7,985 | [
"Amber"
] | cf5492a674cbbdb8758e4d7b6fba8184bb211e1fc49aa474c87ae86f5e04b436 |
# -*- encoding: utf-8 -*-
from shapely.wkt import loads as wkt_loads
import dsl
from . import FixtureTest
class RestAreaServices(FixtureTest):
def test_rest_area_node(self):
self.generate_fixtures(dsl.way(159773030, wkt_loads('POINT (-76.73912905210828 40.99079246918038)'), {u'source': u'openstreetmap.org... | mapzen/vector-datasource | integration-test/480-rest_area-services.py | Python | mit | 3,053 | [
"CRYSTAL"
] | 7a46067d45c4a97461567614e7b069a7b99b5299446a7c8b59a60ed9684d058b |
#!/usr/bin/env python3
'''
Write a function named printTable() that takes a list of lists
of strings and displays it in a well-organized table with each
column right-justified. Assume that all the inner lists will
contain the same number of strings. For example, the value
could look like this:
tableData = [['apples',... | apaksoy/automatetheboringstuff | practice projects/chap 06/table printer chap 6.py | Python | mit | 1,327 | [
"MOOSE"
] | d859b323da58ce8c884fbce6d575decac5f72914736c4c90cd8b89478748d1b5 |
"""
sentry.web.frontend.accounts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.contrib import messages
from django.contrib.auth import login as login_user, authenti... | fotinakis/sentry | src/sentry/web/frontend/accounts.py | Python | bsd-3-clause | 12,500 | [
"VisIt"
] | 930fde4de89da4a7abcc885824768fcfcfa6eb99755263c1303db08adda3c3b2 |
"""
File: pitch_constraint_solver.py
Purpose: For a melody define as a p_map, and a set of policy constraints, solve for compatible melodies
satisfying constraints, as a set of p_map's.
"""
from melody.solver.p_map import PMap
from structure.note import Note
from misc.ordered_set import OrderedSet
class ... | dpazel/music_rep | melody/solver/pitch_constraint_solver.py | Python | mit | 17,648 | [
"VisIt"
] | a51cf8e0f37ff5e6f22af278d3312491f58f9733bd3065b5ee76b32dd7d64b3d |
#
# Copyright (C) 2008, Brian Tanner
#
#http://rl-glue-ext.googlecode.com/
#
# 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 requ... | pclarke91/rl-glue-ext | projects/codecs/Python/src/tests/glue_test.py | Python | apache-2.0 | 1,296 | [
"Brian"
] | 9a84daf9d99b2f2b0e72f0605ce3ab814b86429946dbe6798e320a04344d462c |
# This file is adapted from https://github.com/ray-project/ray/blob/master
# /examples/rl_pong/driver.py
#
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
... | intel-analytics/BigDL | python/orca/example/ray_on_spark/rl_pong/rl_pong.py | Python | apache-2.0 | 11,878 | [
"NEURON",
"ORCA"
] | 8808839e8dece9d03373e09de8394e82f79a89fadd07b5b2e0252a1d0f608e99 |
import numpy as np
from ase.lattice import bulk
from gpaw import GPAW
from gpaw.response.df import DielectricFunction
# Part 1: Ground state calculation
atoms = bulk('Si', 'diamond', a=5.431) # Generate diamond crystal structure for silicon
calc = GPAW(mode='pw', kpts=(4,4,4)) # GPAW calculator initialization
... | robwarm/gpaw-symm | doc/tutorials/dielectric_response/silicon_ABS_simpleversion.py | Python | gpl-3.0 | 860 | [
"ASE",
"CRYSTAL",
"GPAW"
] | fdffb6f1d902422c6a3f81077527dc824df8410445a6ede774b5e12980aeffcf |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
template source file.
https://github.com/kallimachos/template
Copyright (C) 2019 Brian Moss
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... | kallimachos/template | template/template.py | Python | gpl-3.0 | 988 | [
"Brian"
] | 9bbbfb6f9a3626ea6b6f2d8821c8fe9d890440ccfba5a7e49dbf9cd9920dea57 |
# Copyright 2014 Uri Laserson
#
# 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,... | churchlab/ulutil | ulutil/seqtools.py | Python | apache-2.0 | 11,310 | [
"Biopython"
] | d6fa99f57c5efc12d926d75eb78569edd9ce4ca0c4673ff4d89eceaa316cfd37 |
# Copyright 2012-2014 Brian May
#
# This file is part of python-tldap.
#
# python-tldap 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.... | Karaage-Cluster/python-tldap | tldap/backend/base.py | Python | gpl-3.0 | 8,635 | [
"Brian"
] | 65e56cb3c6d6f832af0ffebede404de9a0aeee298cb0700fb90d85c90282ab79 |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
from itertools import count
import re, os, cStringIO, time, cgi, string, urlparse
from xml.dom import minidom as dom
from xml.sax.handler import ErrorHandler, feature_validation
from xml.dom.pulldom import SAX2DOM
from xml.sax import make_parser
... | mzdaniel/oh-mainline | vendor/packages/twisted/twisted/lore/tree.py | Python | agpl-3.0 | 40,046 | [
"VisIt"
] | 7f078ee6de629f101ab5038123dc64038fe604f5bf482c5ee5c965d27ab3350c |
# Copyright (C) 2003 CAMP
# Please see the accompanying LICENSE file for further information.
"""
Quasi-Newton algorithm
"""
__docformat__ = 'reStructuredText'
import numpy as np
import weakref,time,sys
from ase import *
def f(lamda,Gbar,b,radius):
b1 = b - lamda
g = radius**2 - np.dot(Gbar/b1, Gbar/b1)
... | freephys/python_ase | ase/optimize/oldqn.py | Python | gpl-3.0 | 11,761 | [
"ASE"
] | d7051a5081e15ef9b76b209bd62ce73ad0e3383007ec56c55b88d49558a89ab8 |
# -*- coding: utf-8 -*-
#
# Natural Language Toolkit: Snowball Stemmer
#
# Copyright (C) 2001-2010 NLTK Project
# Author: Peter Michael Stahl <pemistahl@gmail.com>
# Peter Ljunglof <peter.ljunglof@heatherleaf.se> (revisions)
# Algorithms: Dr Martin Porter <martin@tartarus.org>
# URL: <http://www.nltk.org/>
# Fo... | markgw/jazzparser | lib/nltk/stem/snowball.py | Python | gpl-3.0 | 155,023 | [
"ASE"
] | 9e8ef4ac59b6511cbcc8168c6184b26656e6de89240b2bafc43bdac0b2b5f5e0 |
'''
This example uses Kivy Garden Graph addon to draw graphs plotting the
accelerometer values in X,Y and Z axes.
The package is installed in the directory: ./libs/garden/garden.graph
To read more about kivy garden, visit: http://kivy-garden.github.io/.
'''
import kivy
from kivy.app import App
from kivy.uix.boxlayout ... | kivy/plyer | examples/accelerometer/using_graph/main.py | Python | mit | 2,722 | [
"VisIt"
] | b0929d057476b2433deeb26eb730c5e70e0f5b05e4188ad231944e7e2101cb35 |
# proxy module
from __future__ import absolute_import
from mayavi.filters.gaussian_splatter import *
| enthought/etsproxy | enthought/mayavi/filters/gaussian_splatter.py | Python | bsd-3-clause | 101 | [
"Mayavi"
] | c6e5d85b178fb5042ba9a9a87d34c2b2713c99ca71bede682a2af824eeb7e397 |
add = lambda x, y: x + y
print(add(2, 3))
names = ['David Beazley', 'Brian Jones', 'Raymond Hettinger', 'Ned Batchelder']
print(sorted(names, key=lambda name: name.split()[-1].lower())) | likeleon/Python | cookbook/7.6 이름 없는 함수와 인라인 함수 정의.py | Python | gpl-2.0 | 186 | [
"Brian"
] | b05c4e391a8761fe8f2379e1005ef69b26d516dc9fb208c58f9936b4e836da6a |
# coding: utf-8
""" Interpolate absolute magnitudes from the PARSEC isochrones """
from __future__ import division, print_function
__author__ = "Andy Casey <arc@ast.cam.ac.uk>"
# Standard library
from glob import glob
# Third party
import numpy as np
import scipy.interpolate
def load_parsec_isoch... | davidwhogg/Platypus | code/distances/distances.py | Python | mit | 7,656 | [
"Gaussian"
] | 39800fe1ee2cff63c024a3ff83218303157cd9f6d9829d583f8e5b5d75f677cc |
""" A computing element class that uses sudo
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import pwd
import stat
import errno
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Utilities import DErrno
from DIRAC.Core.Utilities.Subprocess impor... | ic-hep/DIRAC | src/DIRAC/Resources/Computing/SudoComputingElement.py | Python | gpl-3.0 | 9,479 | [
"DIRAC"
] | be6647e7712f8a14cf55e63aaf65dc99924e1db2bb1f786454e79627ec8d438d |
import os
import sys
class Atom(object):
"""Atom Class"""
def __init__(self, rectype="ATOM", id=-1, name="", altLoc=" ", resName=" ",
chainID=-1, resSeq=-1, iCode=" ",
x=0, y=0, z=0, occupancy=" ", tempFactor=" ", charge=" "):
self.rectype = rectype
self.id =... | iamgp/pyPDB | pyPDB.py | Python | gpl-3.0 | 17,831 | [
"Amber"
] | 50735a6a58ec9eae0942cc142867084fcf84f5501c28f1b1b7c095b0b3cca7d8 |
# coding: utf-8
import os
from os.path import join, exists
import shutil
import pybel
from .config import CALCULATE_DATA_PATH
from .mopac import MopacModel
from .gaussian_optimize import GaussianOptimizeModel
from utils import chemistry_logger
from django.conf import settings
from chemistry.calcore.utils import Calcore... | chemistryTools/ChemToolsWebService | chemistry/calcore/converters.py | Python | agpl-3.0 | 9,523 | [
"Gaussian",
"MOPAC",
"Pybel"
] | d0983166ddabb26de37857ade0571f33e61ecec10dc0193c6489ea5079c62813 |
"""
===========================================
Sparse coding with a precomputed dictionary
===========================================
Transform a signal as a sparse combination of Ricker wavelets. This example
visually compares different sparse coding methods using the
:class:`sklearn.decomposition.SparseCoder` esti... | kashif/scikit-learn | examples/decomposition/plot_sparse_coding.py | Python | bsd-3-clause | 4,037 | [
"Gaussian"
] | 1f09918937c8f110679230266819cbbfe176adcb532cca0cfe89cae298753ad7 |
'''
Author: S.T. Castle
Created: 2015-03-15
'''
#import math
import numpy as np
from scipy import ndimage
from scipy import stats
import scipy.ndimage.filters
import scipy.linalg
#import skimage.feature
import cv2
from matplotlib import pyplot as plt
def main():
'''
Run the explicit coherence enhancing filt... | castlest/shell-detection | coherence-elliptical-kernel/main.py | Python | bsd-3-clause | 7,932 | [
"Gaussian"
] | c8b64818f4016da1940eeb3b8af33e683b158908384160f38f756b0d76414300 |
# -*- coding: utf-8 -*-
"""
Regression tests for the Test Client, especially the customized assertions.
"""
import os
import warnings
from django.conf import settings
from django.core.exceptions import SuspiciousOperation
from django.core.urlresolvers import reverse
from django.template import (TemplateDoesNotExist, T... | mitsuhiko/django | tests/regressiontests/test_client_regress/models.py | Python | bsd-3-clause | 45,179 | [
"VisIt"
] | c928a1d3d02f542ee83afa689f1b6f2be24f970068e85c26c95aafa2bf297143 |
"""Support for creating packages of data
Data Bundles are packages of data that simplify the process of finding,
cleaning, transforming and loading popular datasets. The data bundle format,
tools and management processes are designed to make common public data sets easy
to use and share, while allowing users to audit ... | treyhunner/databundles | databundles/__init__.py | Python | bsd-3-clause | 2,193 | [
"VisIt"
] | 31ecf81abafb7c6ceb65dd22b6fb31327b0aeb35ed09d9c95676210fe752655e |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import unicode_literals
import textwrap
"""
This module implements input and output processing from QChem.
"""
import copy
import re
import numpy as np
from string import Template
import six
... | aykol/pymatgen | pymatgen/io/qchem.py | Python | mit | 82,167 | [
"Gaussian",
"Q-Chem",
"pymatgen"
] | 2bd97a7965fb59251d8c960b69c1e6cd8ee1c214747a0dfc4a15d170eb69bd58 |
# Copyright (c) 2008-2015 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
r"""Tools for mimicing the API of the Common Data Model (CDM).
The CDM is a data model for representing a wide array of data. The
goal is to be a simple, universal interface to... | ahill818/MetPy | metpy/io/cdm.py | Python | bsd-3-clause | 13,610 | [
"NetCDF"
] | 53242a0df34be8e7698c2f12c959c64e579bb5a48e57b4825eda73a2b41ce738 |
#!/usr/bin/python
'''
Create Video Statistics
'''
import os, sys
import csv
import re
import json
import gsutil
import bqutil
import datetime
import process_tracking_logs
from path import Path as path
from collections import OrderedDict
from collections import defaultdict
from check_schema_tracking_log import schema2... | mitodl/edx2bigquery | edx2bigquery/make_video_analysis.py | Python | gpl-2.0 | 28,500 | [
"VisIt"
] | afa8613cd549298f67c06377e8f3a44e5c0431f8bfdb41e619ef9147954fdcbe |
#~~~~~~~GLOBAL IMPORTS~~~~~~~#
# Standard library packages import
from os import path
# Local library packages import
from pyDNA.Utilities import mkdir, import_seq, file_basename, file_name, file_extension, fgunzip
from BlastnWrapper import Aligner
from MakeblastdbWrapper import NewDB, ExistingDB
#~~~~~~~MAIN METHOD... | a-slide/pyDNA | Blast/Blastn.py | Python | gpl-2.0 | 2,949 | [
"BLAST"
] | b0dd40c0c71618993a682bd8d8432a5e49274e460cf80b19d2920a398aba2539 |
from base import *
def prim_equal(p1, p2):
return match((p1, p2),
("(PInt(), PInt())", lambda: True),
("(PFloat(), PFloat())", lambda: True),
("(PStr(), PStr())", lambda: True),
("(PChar(), PChar())", lambda: True),
("(PBool(), PBool())", lambda: True),
("_", lambda:... | pshc/archipelago | types_builtin.py | Python | mit | 10,301 | [
"VisIt"
] | 00fce1422b6f62b25808e3f5ba25a09b550e368abbd765276068471b4e92559d |
from __future__ import print_function, division
import os
import tempfile
import h5py
import numpy as np
from numpy.testing import assert_array_almost_equal_nulp
from ...dust import IsotropicDust
from .. import Model
from ...util.functions import random_id
def get_test_dust(set_emissivities=True):
dust = Isotr... | hyperion-rt/hyperion | hyperion/model/tests/test_helpers.py | Python | bsd-2-clause | 4,063 | [
"VisIt"
] | 089c70896c1e61535e2b976bfdb559570849cff808f8488097b0a1e971c6e72b |
""" This is a test of the chain
DataStoreClient -> DataStoreHandler -> AccountingDB
It supposes that the DB is present, and that the service is running
this is pytest!
"""
# pylint: disable=invalid-name,wrong-import-position
from DIRAC.Core.Base.Script import parseCommandLine
parseCommandLine()
from DI... | fstagni/DIRAC | tests/Integration/AccountingSystem/Test_DataStoreClient.py | Python | gpl-3.0 | 1,561 | [
"DIRAC"
] | 587708a3519e726e9b0a3d6f40eb440212318c029554938b6490d49e675f6a24 |
import datetime
from dateutil.relativedelta import relativedelta
from django.utils.timezone import now, get_current_timezone
from unittest import mock
from factory.fuzzy import FuzzyDate, FuzzyInteger, FuzzyChoice
from freezegun import freeze_time
from jmespath import search as s
from django.urls import reverse
from... | UKTradeInvestment/export-wins-data | mi/tests/test_region_views.py | Python | gpl-3.0 | 95,185 | [
"Amber"
] | ab814ae87b11ea8ea335b2c358b2d3d80cfe3426d07766a720f6ee1d3c8fbd79 |
#!/usr/bin/env python
"""
Read a maf and output a single block fasta file, concatenating blocks
usage %prog species1,species2 maf_file out_file
"""
#Dan Blankenberg
import sys
from galaxy import eggs
import pkg_resources; pkg_resources.require( "bx-python" )
from bx.align import maf
from galaxy.tools.util import maf_... | volpino/Yeps-EURAC | tools/maf/maf_to_fasta_concat.py | Python | mit | 2,085 | [
"Galaxy"
] | c5c4649d9be10e352d3c2ed48eaa67b3158ac1403bd70c586badbf2197f0a1bc |
#!/usr/bin/python3
#
# Copyright (c) 2012 Mikkel Schubert <MikkelSch@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
... | MikkelSchubert/paleomix | paleomix/common/vcffilter.py | Python | mit | 12,710 | [
"pysam"
] | a2c27c9e6ee73872688c3703742967d685cf932058eb50263a1feee6686b3c29 |
from math import sqrt,log,cos,sin,pi
from random import random
# Constants
Z = 79
e = 1.602e-19
E = 7.7e6*e
epsilon0 = 8.854e-12
a0 = 5.292e-11
sigma = a0/100
N = 1000000
# Function to generate two Gaussian random numbers
def gaussian():
r = sqrt(-2*sigma*sigma*log(1-random()))
theta = 2*pi*random()
x = r... | KiMiralles/Python-Learning | Computational Physics Newman/Book Resources/rutherford.py | Python | gpl-3.0 | 559 | [
"Gaussian"
] | e426a68536de8ec39780c102f4761d5546d3a995bb5960dbab28afc67317b414 |
# -*- 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 required by applicable law or... | googleapis/python-aiplatform | tests/unit/gapic/aiplatform_v1/test_migration_service.py | Python | apache-2.0 | 80,019 | [
"Octopus"
] | fae7a5c648fa6a1af177dee41656499884f7852ca105e47059c52152e10cc4d6 |
# -*- python -*-
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2001-2007 Donald N. Allingham, Martin Hawlisch
# Copyright (C) 2009 Yevgeny Zegzda <ezegjda@ya.ru>
# Copyright (C) 2010 Nick Hall
#
# This program is free software; you can redistribute it and/or mo... | sam-m888/gramps | gramps/plugins/view/pedigreeview.py | Python | gpl-2.0 | 84,720 | [
"FLEUR"
] | ef80d635045d8be4c67be5063048acd8cd4f436642b99d0cf47247290be470e6 |
import argparse
import os
from coalib.misc import Constants
from coalib.parsing.filters import available_filters
# argcomplete is a delayed optional import
# This variable may be None, the module, or False
argcomplete = None
class CustomFormatter(argparse.RawDescriptionHelpFormatter):
"""
A Custom Formatter... | jayvdb/coala | coalib/parsing/DefaultArgParser.py | Python | agpl-3.0 | 11,829 | [
"VisIt"
] | e6020aef8812254e8c2e9c89b64584763eca17b6074c8b9d175877bb829217d9 |
################################################################################
#
# RMG - Reaction Mechanism Generator
#
# Copyright (c) 2002-2017 Prof. William H. Green (whgreen@mit.edu),
# Prof. Richard H. West (r.west@neu.edu) and the RMG Team (rmg_dev@mit.edu)
#
# Permission is hereby granted, free of cha... | Molecular-Image-Recognition/Molecular-Image-Recognition | code/rmgpy/molecule/resonanceTest.py | Python | mit | 46,203 | [
"RDKit"
] | 36602f90904e063be216f531fc28dd2360c87a911161d81d6e5d6e2100f35af7 |
from __future__ import print_function
import httplib2
import os
import sys
import dateutil.parser as dateparse
try:
from apiclient import discovery
import oauth2client
from oauth2client import client
from oauth2client import tools
except ImportError:
print("""
Google API Modules are required:
pip i... | adammhaile/HOTBot | hotbot/__init__.py | Python | mit | 23,945 | [
"VisIt"
] | 05d55d6904c0266fe67f0f31e4c752b68cbf32a0e766ca34bd7a79848168ef97 |
#!/usr/bin/env python
# EDITABLE SECTIONS ARE MARKED WITH #@#
version="2.5.TAW160730"
authors=["Djurre de Jong", "Jaakko J. Uusitalo", "Tsjerk A. Wassenaar"]
# Parameters are defined for the following (protein) forcefields:
forcefields = ['martini21','martini21p','martini22','martini22p','elnedyn','elnedyn22','el... | Tsjerk/MartiniTools | martinize.py | Python | gpl-2.0 | 271,798 | [
"ChemPy",
"GROMOS",
"Gromacs",
"PyMOL"
] | 40a790fb7db2ce02fe7c956dad9969a495493e324f482e5ebb3645093004a0ae |
#!/usr/bin/env python
import sys
import BioClasses
import cPickle
import pysam
import scipy
def main():
# load data from the GTF pic
with open( "/home/paul/Resources/H_sapiens/test.hg19.chr.pic" ) as f:
genes = cPickle.load( f )
# load the indexed FASTA file
fastafile = pysam.Fastafile( "/home/paul/Resources/... | polarise/python-bioclasses | test/test_TSS_Sequence.py | Python | gpl-2.0 | 1,311 | [
"pysam"
] | 6982b8268d413982f82ff54c883b92c809c1780fa44f35b9c96e042979d3f359 |
#
# mainTab
#
tab = self.notebook.mainTab
tab.settings['Program'] = 'vasp'
tab.settings['Output file name'] = 'OUTCAR'
#
# SettingsTab
#
tab = self.notebook.settingsTab
tab.settings['Eckart flag'] = False
tab.settings['Neutral Born charges'] = False
tab.settings['Sigma value'] = 5
tab.settings['Mass definition'] = 'ave... | JohnKendrick/PDielec | Examples/ATR/Na2SO42/script.py | Python | mit | 1,777 | [
"VASP"
] | dae344448d3903288f20cee20b196a5042fa6e271863139d3a61f0dc331e63a1 |
from voxel_globe.common_tasks import shared_task, VipTask
from voxel_globe.websockets import ws_logger
import random, time
@shared_task(base=VipTask, bind=True)
def success_task(self):
ws_logger.debug(self, "d " + str(random.random()))
ws_logger.info(self, "i " + str(random.random()))
ws_logger.warn(self, "w " +... | ngageoint/voxel-globe | voxel_globe/channel_test/tasks.py | Python | mit | 1,715 | [
"exciting"
] | 85b06932973c6316cdac26e550020585ae82fc0491e0707243d13f7c4cdb56ef |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, Brian Coca <bcoca@ansible.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | e-gob/plataforma-kioscos-autoatencion | scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/system/runit.py | Python | bsd-3-clause | 8,577 | [
"Brian"
] | cd6de0943fdffd4277ce48092baf390380d45cd5d7b04fc6066dacc4e3f5972c |
# Copyright 2013 OpenStack Foundation
# 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 requ... | rajalokan/glance | glance/api/v2/image_members.py | Python | apache-2.0 | 14,662 | [
"Brian"
] | f8b5af9a7cca99d5e25551d52c7fc55dc0b20a8094a1135dfdf7220ea6564988 |
# 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... | AndreasMadsen/tensorflow | tensorflow/contrib/distributions/python/ops/mvn.py | Python | apache-2.0 | 28,686 | [
"Gaussian"
] | f2b84b08b86cc17a502da0855e2c302c62d3e727aa1586843e5837d99f564118 |
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | gkc1000/pyscf | pyscf/nao/test/silver_55/test_pb_batch.py | Python | apache-2.0 | 1,825 | [
"PySCF",
"SIESTA"
] | ef46249da5966ce3bfa7530e7f7ee636d9264df779b09ff628dfe5e7acb39f62 |
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Red Hat | Ansible
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Options for authenticating with the API.
class ModuleDocFragment(object):
DOCUMENTATION = r'''
options:
host:
description:
- Provide a URL f... | roadmapper/ansible | lib/ansible/plugins/doc_fragments/k8s_auth_options.py | Python | gpl-3.0 | 4,390 | [
"VisIt"
] | 10c50fd8d6a76951e7bd4f7a867186f77245d88777d3892f2f1438de813a820a |
#/**********************************************************************
#** This program is part of 'MOOSE', the
#** Messaging Object Oriented Simulation Environment.
#** Copyright (C) 2003-2014 Upinder S. Bhalla. and NCBS
#** It is made available under the terms of the
#** GNU Lesser General Public License ... | BhallaLab/moose | moose-examples/paper-2015/Fig6_NetMultiscale/ReducedModel.py | Python | gpl-3.0 | 36,806 | [
"Gaussian",
"MOOSE",
"NEURON"
] | 8c758dec3eaf91495218b024ca36abe69f3b5a16f5ef716b16814848ec32d4d9 |
'''
This __init__ file is for a PySCeS "eXtension module" (pysx), the following variables can be set for each module
'''
pysx_name = 'Pysces module template'
pysx_oscompat = ['posix','nt']
pysx_base_class = 'CONTRIB_demo'
pysx_author = 'Brett G. Olivier'
pysx_email = 'bgoli@users.sourceforge.net'
pysx_affiliation = 'T... | asttra/pysces | pysces/contrib/demo/__init__.py | Python | bsd-3-clause | 448 | [
"PySCeS"
] | 11d9c1dc535467c7ecacae7749e91bbf54ba68991c2efaf408f6d2372c8f0878 |
# Copyright 2012 Red Hat, Inc.
#
# 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, or
# (at your option) any later version.
#
# This program is distributed in the ... | oVirt/vdsm | contrib/nfs-check.py | Python | gpl-2.0 | 10,118 | [
"VisIt"
] | b511c40ca59669eebd07ead9acbdc4ffb222335b22f33fad8c751f06e6702f19 |
# -*- coding: utf-8 -*-
# Copyright (c) 2006-2011, 2013-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2011-2014 Google, Inc.
# Copyright (c) 2012 Tim Hatch <tim@timhatch.com>
# Copyright (c) 2013-2016 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2014 Brett Cannon <brett@python.org>
# Co... | axbaretto/beam | sdks/python/.tox/lint/lib/python2.7/site-packages/pylint/checkers/exceptions.py | Python | apache-2.0 | 16,289 | [
"VisIt"
] | 3a009e9c0d53528faabcf6f564e72d83eda76144fe9993baf49a07cec775ee55 |
from __future__ import annotations
import os
import sys
from unittest import mock
import pytest
from dxtbx.model import ExperimentList
from xia2.Handlers.Phil import PhilIndex
from xia2.Modules.Indexer.DialsIndexer import DialsIndexer
from xia2.Schema.XCrystal import XCrystal
from xia2.Schema.XSample import XSample... | xia2/xia2 | tests/Modules/Indexer/test_DIALS_indexer.py | Python | bsd-3-clause | 2,609 | [
"CRYSTAL"
] | 1cdfeec7ecf81cc54356e48da69a74ec66126ee64c837389c343320b680ac45a |
#
# Copyright (C) 2013-2018 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... | hmenke/espresso | testsuite/python/langevin_thermostat.py | Python | gpl-3.0 | 17,386 | [
"ESPResSo"
] | 834bb973feea5e557e12937a0ded402ad640a25a316b668b02f2f101af3647a6 |
# !/usr/bin/python
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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 ... | Rfam/rfam-production | scripts/export/genomes/genome_fetch.py | Python | apache-2.0 | 44,321 | [
"VisIt"
] | 71cc0496f38d0c6fdb8c38009d32a1705f4df8ed4e131fb4fd42fa8333ef0e07 |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2017 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
#... | jH0ward/psi4 | psi4/driver/util/tty/color.py | Python | lgpl-3.0 | 7,149 | [
"Psi4"
] | 9ba4042cedf537d1a89e0a1bc49058503b1a2fdaaa130b73de3546acbcc95321 |
# Copyright (c) 2014, the GREAT3 executive committee (http://www.great3challenge.info/?q=contacts)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# 1. Redistributions of source code must retain... | barnabytprowe/great3-public | great3sims/shear.py | Python | bsd-3-clause | 19,773 | [
"Galaxy"
] | 480e01411f366c3cb1bf71dc2a71e559cdd7fa5ff34f53a3ee8281867037d541 |
#!/usr/bin/env python
import os, sys, string, subprocess, re, socket, getopt
# If hostname equals head_node, this script will run
head_node = 'hpcbuild'
# Moose stable and devel checkout locations
moose_stable = 'https://hpcsc.inl.gov/svn/herd/trunk/moose'
moose_devel = 'https://hpcsc.inl.gov/svn/herd/trunk/devel/moo... | shanestafford/moose | framework/scripts/updateStable.py | Python | lgpl-2.1 | 8,251 | [
"Elk",
"MOOSE"
] | 2e5328884660932153b74637758ccb6362a6b90b3e1d19b904abb0da8ffd9ea2 |
#!/opt/moose/miniconda/bin/python
import matplotlib as mpl
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.ticker as mtick
import pylab
data = np.genfromtxt('./elas_plas_nl1_cycle_out.csv', delimiter=',', names=True)
fig = plt.figure()
ax1 = fig.add_subplot(111)
mpl.rcParams.update({'font.size': ... | Chuban/moose | modules/combined/test/tests/inelastic_strain/elas_plas/plot_cycled_strain.py | Python | lgpl-2.1 | 866 | [
"MOOSE"
] | ed385570b422f9a91699e606978f6404813ffb403d39f623dedae1c11414d611 |
import plotly.offline as py
import plotly.graph_objs as go
soap = go.Bar(
x=['iPad 2', 'iPhone 4S', 'Samsung Galaxy S4'],
y=[5.109, 9.694, 1.465],
name="SOAP")
rest_xml = go.Bar(
x=['iPad 2', 'iPhone 4S', 'Samsung Galaxy S4'],
y=[3.301, 4.973, 1.019],
name="REST (XML)")
rest_json = go.Bar(
... | zgsolucoes/Treinamento | 06-Microservices/RESTful/fig/source/SOAP-vs-REST.py | Python | apache-2.0 | 883 | [
"Galaxy"
] | 183c3d1b347ac7d16a58320f3918952112e4357ac68154b260920cbb9ebffa2c |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2011 Paul Franklin
#
# This program is free software; you can redistribute it and/or modify
# it under the terms o... | Fedik/gramps | gramps/gui/plug/_windows.py | Python | gpl-2.0 | 51,290 | [
"Brian"
] | c01db4deef470410da634c9e818ed7b2bdfee11cb4715c3236f51249f3105b31 |
from __future__ import print_function
import numpy as np
import pandas as pd
import regreg.api as rr
import selection.tests.reports as reports
from selection.tests.flags import SET_SEED, SMALL_SAMPLES
from selection.tests.instance import logistic_instance, gaussian_instance
from selection.tests.decorators import (wai... | selective-inference/selective-inference | sandbox/randomized_tests/test_without_screening.py | Python | bsd-3-clause | 7,872 | [
"Gaussian"
] | 1f9f712531c4ed6ffcb511af09a9d24bdec53050153c14f8156f4255da441bbe |
#!/usr/bin/env python
#
# PyCow - Python to JavaScript with MooTools translator
# Copyright 2009 Patrick Schneider <patrick.p2k.schneider@gmail.com>
#
# 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 Lice... | p2k/PyCow | pycow/pycow.py | Python | apache-2.0 | 34,344 | [
"VisIt"
] | 99fd0af697ed14d7ac051fe86515ee383f78e076225be8d982d1578d193a751e |
'''
A tool to annotate and print variants in tabular format
Author: Khalid Mahmood
Contact: khalid.mahmood@unimelb.edu.au
Copyright: 2015
'''
#!/usr/bin/python
from utils import findlist
from annotations import getTabixVal,getTabixValCondel,getTabixBool
from annotations import getfathmm,adjust_scores
import sys
imp... | khalidm/VarPub | src/readvcf2.py | Python | gpl-2.0 | 15,746 | [
"pysam"
] | 563d7c6e6ed69b971c21ee9d9d62d968f254cfdb80ec0b26f565a4de02ed1a89 |
from __future__ import annotations
import os
import pytest
from cctbx import uctbx
from dials.tests.algorithms.indexing.test_index import run_indexing
@pytest.mark.xfail
def test_run(dials_regression, tmpdir):
expected_unit_cell = uctbx.unit_cell(
(11.624, 13.550, 30.103, 89.964, 93.721, 90.132)
)... | dials/dials | tests/algorithms/indexing/test_phi_scan.py | Python | bsd-3-clause | 6,645 | [
"CRYSTAL"
] | 789664ee9c2ffe88e1695bb696e4303c074e4b21ac88a0e6a6139ca6452cd662 |
from ase.data.g2_1_ref import convert
from ase.data.g2_1_ref import atomization_vasp
from ase.data.g2_1_ref import diatomic
info = {}
info['atomization energy'] = {}
info['atomization energy'].update({'reference': convert(atomization_vasp, 0)})
info['atomization energy'].update({'PBE': convert(atomization_vasp, 2)})... | grhawk/ASE | tools/ase/data/g2_1_ref_g03.py | Python | gpl-2.0 | 599 | [
"ASE"
] | 909080e7b14dbd9be1d6b8e03e5052008e21ac20ca61aae2f46d4fc8dc2cfd0d |
# $Id: nodes.py 6011 2009-07-09 10:00:07Z gbrandl $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
Docutils document tree element class library.
Classes in CamelCase are abstract base classes or auxiliary classes. The one
exception is `Text`, for a text... | edisonlz/fruit | web_project/base/site-packages/docutils/nodes.py | Python | apache-2.0 | 64,905 | [
"VisIt"
] | b2a79f6b47566bb5541cff867568505221fbd1e7bd1360c9214121323b2dc0a2 |
import os
import types
import logging
import string
import unittest
import cStringIO as StringIO
import cherrypy
from cherrypy.process.wspbus import states
from webtest import TestApp
try:
import sqlobject
from sqlobject.inheritance import InheritableSQLObject
except ImportError:
sqlobject = None
try:
... | dbrattli/python-gearshift | gearshift/testutil.py | Python | mit | 10,478 | [
"VisIt"
] | 41b6d780bc768c9bc90f185d295408a1e81eeac9df916c6b621b9b8c05e93b68 |
"""
Set of programs to degrade/convolve synthetic images/spectra to observational
conditions
"""
from scipy import ndimage, signal
import scipy.interpolate as interp
import numpy as np
import math
def spec_conv(spec, wave, conv_type='IRIS', ww=None, wpts=200, winterp='linear',
xMm=16.5491, graph=False, ... | M1kol4j/helita | helita/sim/synobs.py | Python | bsd-3-clause | 24,461 | [
"Gaussian"
] | 8e2573f230326082932839b64f5967ca90001046ec230558fd0961a511f16224 |
import sys
sys.path.append('../../src/')
import cryspy
from cryspy.fromstr import fromstr as fs
metric = cryspy.geo.Cellparameters(10.4416, 10.4416, 6.3432, 90, 90, 120).to_Metric()
atomset = cryspy.crystal.Atomset( { \
cryspy.crystal.Atom("Ca1", "Ca", fs("p 0 0 0 ")), \
cryspy.crystal.Atom("M... | tobias-froehlich/cryspy | tests/blendertest/blendertest.py | Python | gpl-3.0 | 1,841 | [
"CRYSTAL"
] | 10b3f4bf1c1a57f57ebcb1d2dcaa0652d4cbc70cd07aefcfeaced75fb758da60 |
# Hop --- a framework to analyze solvation dynamics from MD simulations
# Copyright (c) 2009 Oliver Beckstein <orbeckst@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, either versio... | Becksteinlab/hop | hop/utilities.py | Python | gpl-3.0 | 29,424 | [
"MDAnalysis"
] | 19c8fcacd9590d6ba40f2d7e62eb521076e49af3de1b3c9f5801444ca0507474 |
from __future__ import print_function, division
import unittest, numpy as np
from pyscf.nao import tddft_iter
from pyscf.nao.tddft_iter_x_zip import tddft_iter_x_zip as td_c
from os.path import dirname, abspath
class KnowValues(unittest.TestCase):
def test_x_zip_feature_na20_chain(self):
""" This a test for com... | gkc1000/pyscf | pyscf/nao/test/test_0091_tddft_x_zip_na20.py | Python | apache-2.0 | 1,134 | [
"PySCF",
"SIESTA"
] | e728b719564bb623ff025f05a6ca9cb9ff0805ce1c4fb8f4d221698d50b7689c |
# -*- coding: utf-8 -*-
#
# This file is part of cclib (http://cclib.github.io), a library for parsing
# and interpreting the results of computational chemistry packages.
#
# Copyright (C) 2006-2014, the cclib development team
#
# The library is free software, distributed under the terms of
# the GNU Lesser General Pub... | ghutchis/cclib | src/cclib/parser/gamessparser.py | Python | lgpl-2.1 | 56,389 | [
"Firefly",
"GAMESS",
"Gaussian",
"cclib"
] | c172506d76738b5baeef2affc915dac3d7f27ccf284caa88b03a6d44a7d94da6 |
'''
Nacker is a tool to circumvent 802.1x Network Access Control (NAC) on
a wired LAN.
Copyright (C) 2013 Carsten Maartmann-Moe
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 t... | mehulsbhatt/nacker | caravan/tcp.py | Python | gpl-2.0 | 3,089 | [
"MOE"
] | f468e3bf61571e62072cc4669d0c2d4cf329dbaeb558551f1b62b40f838185c0 |
#! /usr/bin/env python3
#
# Copyright 2006-2017 Romain Boman
#
# 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... | rboman/progs | metafor/biomec/vtkToolsTEST.py | Python | apache-2.0 | 4,488 | [
"VTK"
] | 42b11ff671269d10ce31d30433ce11318f1f2739d5a3ee383afc5b57fca3eeff |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publi... | pmghalvorsen/gramps_branch | gramps/plugins/tool/eventcmp.py | Python | gpl-2.0 | 16,295 | [
"Brian"
] | 88c83d893bd54a02dee79bffa81ec4245a5d901f2d3fc671bd1486d884204650 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import unittest
import os
import json
from monty.json import MontyDecoder
from pymatgen import Composition
from pymatgen.apps.battery.conversion_battery import ConversionElectrode, \
ConversionVoltagePai... | mbkumar/pymatgen | pymatgen/apps/battery/tests/test_conversion_battery.py | Python | mit | 3,604 | [
"pymatgen"
] | 02b09086dde0e7afdd9eb62cc1509c424729da8d7059e96e36b24a2fe3f44f86 |
# Copyright 2017 Max Planck Society
# Distributed under the BSD-3 Software license,
# (See accompanying file ./LICENSE.txt or copy at
# https://opensource.org/licenses/BSD-3-Clause)
"""Training AdaGAN on various datasets.
Refer to the arXiv paper 'AdaGAN: Boosting Generative Models'
Coded by Ilya Tolstikhin, Carl-Joha... | tolstikhin/adagan | iclr_mnist_vae.py | Python | bsd-3-clause | 8,020 | [
"Gaussian"
] | 3adb69a330e9178c6efbbff44c99e53cbe141933d8924b841455077786f5f188 |
# Copyright 2018 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... | arborh/tensorflow | tensorflow/python/keras/layers/kernelized_test.py | Python | apache-2.0 | 16,387 | [
"Gaussian"
] | 9333014d302703427a08e263a82b5dffecd83e5fb72c67bfce71f3cba0761ff5 |
"""
This is the boilerplate default configuration file.
Changes and additions to settings should be done in the config module
located in the application root rather than this config.
"""
config = {
# webapp2 sessions
'webapp2_extras.sessions' : {'secret_key': '_PUT_KEY_HERE_YOUR_SECRET_KEY_'},
# webapp2 authenticatio... | bb111189/Arky2 | config/production.py | Python | lgpl-3.0 | 4,100 | [
"VisIt"
] | d9c7619b51153385df3bf0951710cf83d09e7503cffd11853770b1b7619e91ba |
#!/usr/bin/python
"""
(C) Copyright 2014-2017 Marc Rosanes
The program is distributed under the terms of the
GNU General Public License (or the Lesser GPL).
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 Foun... | sagiss/txrm2nexus | txm2nexuslib/scripts/normalize.py | Python | gpl-3.0 | 4,710 | [
"Gaussian"
] | 92dbe450bd964ed3d3a75cd13b9d5f57fb807edc916b974a35db8272c2eb98f5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.