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 |
|---|---|---|---|---|---|---|---|
'''
.. currentmodule:: skrf.mathFunctions
=============================================
mathFunctions (:mod:`skrf.mathFunctions`)
=============================================
Provides commonly used mathematical functions.
Complex Component Conversion
---------------------------------
.. autosummary::
:toctr... | aerialist/scikit-rf | skrf/mathFunctions.py | Python | bsd-3-clause | 12,480 | [
"DIRAC"
] | 6c2251bdeceb06808ced5eb7ce8fa85f848d4a93c3ce701e59020141d67adfdc |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Module implementing an XYZ file object class.
"""
import re
from io import StringIO
import pandas as pd
from monty.io import zopen
from pymatgen.core.structure import Molecule
class XYZ:
"""
Ba... | gmatteo/pymatgen | pymatgen/io/xyz.py | Python | mit | 4,753 | [
"pymatgen"
] | 9eb4642d26a6be2f0f74d885749c0c68894cee17a339ebe98285fb4f046abcd4 |
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
... | ericmjl/flu-gibson | setup.py | Python | mit | 2,042 | [
"Biopython"
] | c8219d36206d8dcba06cab68e3d7597709f2d532b90450db0a72e7dce57a3e20 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Lenovo, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# ... | t0mk/ansible | lib/ansible/modules/network/lenovo/cnos_rollback.py | Python | gpl-3.0 | 11,128 | [
"VisIt"
] | 20fb4149bad0d8168129e4467723bdd9fd3abc3aa640543033bdb3ccc6c69d5d |
import itertools
import time
import numpy as np
import os
import glob
import mdtraj as md
import fahmunge
import pandas as pd
# Reads in a list of project details from a CSV file with Core17/18 FAH projects and munges them.
projects = pd.read_csv("./projects.csv", index_col=0)
output_path = "/data/choderalab/fah/mun... | steven-albanese/FAHMunge | scripts/munge_fah_data.py | Python | lgpl-2.1 | 1,001 | [
"MDTraj"
] | e014aa40b04d32faa2376c9203831eeb7f2065d9ccc2bde9b77e4ea2b97a3376 |
#!/usr/bin/env python
"""Universal feed parser
Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds
Visit http://feedparser.org/ for the latest version
Visit http://feedparser.org/docs/ for the latest documentation
Required: Python 2.1 or later
Recommended: Python 2.3 or later
Recommended: CJKCodecs... | crasu/feedingit | src/feedparser.py | Python | gpl-3.0 | 123,018 | [
"NetCDF",
"VisIt"
] | 8aed5d164b898ea81516cf8932b45f33ff3f88309aea7530d33b173ea6043bbf |
# -*- coding:utf-8 -*-
# Copyright (c) 2015, Galaxy Authors. All Rights Reserved
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Author: wangtaize@baidu.com
# Date: 2015-04-20
import os
def build_init_cgroup_cmd():
all_cmd = []
all_cmd.append("cd /home/g... | fxsjy/galaxy | deploy/galaxy.py | Python | bsd-3-clause | 1,906 | [
"Galaxy"
] | 55e0032dd6cdccf77b6cb77cc5a5fc74774f4cf3fb421c4eaa808a51b0a56269 |
import numpy as np
import bpy
from bpy.props import FloatProperty, EnumProperty, BoolProperty
from mathutils import Matrix
from sverchok.node_tree import SverchCustomTreeNode
from sverchok.data_structure import (updateNode, zip_long_repeat, ensure_nesting_level,
get_data_nesting_... | DolphinDream/sverchok | nodes/surface/minimal_surface.py | Python | gpl-3.0 | 9,210 | [
"Gaussian"
] | 2b7e33ae1a3af81031f9c3dc2c62f7330faba568f99644c0ce027dbf753a1c4e |
# setup.py ---
#
# Filename: setup.py
# Description:
# Author: subha
# Maintainer:
# Created: Sun Dec 7 20:32:02 2014 (+0530)
# Version:
# Last-Updated: Tue Oct 27 14:55:03 2015 (-0400)
# By: Subhasis Ray
# Update #: 17
# URL:
# Keywords:
# Compatibility:
#
#
# Commentary:
#
#
#
#
# Change log:
#
#
#
#... | dilawar/moose-full | moose-core/setup.py | Python | gpl-2.0 | 12,971 | [
"MOOSE",
"NEURON"
] | 84acfcba5d964a848daec836a680c1fe5e4098c2ccb72371b82e500cfd175218 |
#
# Copyright (c) 2017 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
# ScanCode is a trademark of nexB Inc.
#
# You may not use... | yashdsaraf/scancode-toolkit | src/commoncode/paths.py | Python | apache-2.0 | 9,830 | [
"VisIt"
] | a71e63b569d9850c20a94fe88a06cfd94c4d0c906b4a73ff9bae606db5b671c2 |
"""Code for the B{0desktop} command."""
# Copyright (C) 2009, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from zeroinstall import _
import sys
from optparse import OptionParser
import logging
def main(command_args):
"""Implements the logic of the 0desktop command.
@param command... | timdiels/zeroinstall | zeroinstall/gtkui/desktop.py | Python | lgpl-2.1 | 2,025 | [
"VisIt"
] | f5f5447c101fe1a973bf7d066088b3b18f85641ea14e3ce7d2aff2ed2933cde3 |
# -*- coding: utf-8 -*-
from __future__ import print_function, with_statement
from collections import OrderedDict
from contextlib import closing
import datetime
from distutils.version import LooseVersion
from ftplib import FTP, FTP_TLS
from ftplib import all_errors as FTP_ALL_ERRORS
import logging
import os.path
impo... | andreas-h/mss-chem | msschem/download.py | Python | mit | 19,790 | [
"NetCDF"
] | 9e3e4ad12b2fc29f4b0671a21bb693847452efb12aac4c2f2c5f34dbc3f9e459 |
# -*- coding: utf-8 -*-
#
#
# TheVirtualBrain-Scientific Package. This package holds all simulators, and
# analysers necessary to run brain-simulations. You can use it stand alone or
# in conjunction with TheVirtualBrain-Framework Package. See content of the
# documentation-folder for more details. See also http://ww... | echohenry2006/tvb-library | tvb/simulator/profiling/surface_deterministic_surface_stimulus.py | Python | gpl-2.0 | 4,724 | [
"Gaussian"
] | c91d88f09a3f5a9158eab33f10363fbef04a8df6c2144f1c77d2b6c8f51745e0 |
#====================== BEGIN GPL LICENSE BLOCK ======================
#
# 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 vers... | jemandez/creaturas-magicas | Configuraciones básicas/scripts/addons/molecular/__init__.py | Python | gpl-3.0 | 47,008 | [
"VisIt"
] | 449452cc7a8f5d97724d570af23e5e255d8437e5144f059f7ac1fc1ab7826280 |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | demis001/scikit-bio | skbio/util/tests/__init__.py | Python | bsd-3-clause | 419 | [
"scikit-bio"
] | c48b2adb328263e5cea21c483a464306387d041571bf637e46bbb0edaa33725f |
'''subclassing kde
Author: josef pktd
'''
import numpy as np
import scipy
from scipy import stats
import matplotlib.pylab as plt
class gaussian_kde_set_covariance(stats.gaussian_kde):
'''
from Anne Archibald in mailinglist:
http://www.nabble.com/Width-of-the-gaussian-in-stats.kde.gaussia... | Xinglab/rmats2sashimiplot | src/MISO/misopy/kde_subclass.py | Python | gpl-2.0 | 5,947 | [
"Gaussian"
] | 48399c99e9ed2cc87a3f7e350a7ea3d9b8a5842f71eaf21f2d78f13cacbedbc0 |
# -*- 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-resource-manager | tests/unit/gapic/resourcemanager_v3/test_organizations.py | Python | apache-2.0 | 95,942 | [
"Octopus"
] | 30d22ce7b959ca5a7713743f32c6b921ba4e6807676f540e93951d38ebb3521f |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'EphysProp.norm_criteria'
db.add_column(u'neuroelectro_eph... | lessc0de/neuroelectro_org | neuroelectro/south_migrations/0076_auto__add_field_ephysprop_norm_criteria.py | Python | gpl-2.0 | 30,975 | [
"NEURON"
] | fb4e621661299aadd20d01b9a658439467cad1917db2896c8e633d02bbca51c8 |
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""The fsl module provides classes for interfacing with the `FSL
<http://www.fmrib.ox.ac.uk/fsl/index.html>`_ command line tools. This
was written to work with FSL version 4.1.4.
E... | mick-d/nipype | nipype/interfaces/fsl/utils.py | Python | bsd-3-clause | 88,095 | [
"Gaussian",
"VTK"
] | 043b9591400dde5e773a34ac3d968fe8b0954d0b263483d0dd7994139eca32d7 |
# 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.... | brianmay/python-tldap-debian | tldap/methods/samba.py | Python | gpl-3.0 | 3,326 | [
"Brian"
] | e240c8608169c4cc7e0617c8759b00907befa722576489aceb620752be3f887b |
# -*- 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) 2007-2014, the cclib development team
#
# The library is free software, distributed under the terms of
# the GNU Lesser General Pub... | jchodera/cclib | src/cclib/method/cda.py | Python | lgpl-2.1 | 4,771 | [
"cclib"
] | 9fbc869bc5ec914a4d0623333ddf8855a15452724a65b043b49e6eb3958f49d2 |
# -*- coding: utf-8 -*-
"""
This module contains the individual fixes that the main fix_text function
can perform.
"""
from __future__ import unicode_literals
import re
import sys
import codecs
import warnings
from ftfy.chardata import (possible_encoding, CHARMAP_ENCODINGS,
CONTROL_CHARS, LI... | dantebarba/docker-media-server | plex/Sub-Zero.bundle/Contents/Libraries/Shared/ftfy/fixes.py | Python | gpl-3.0 | 25,441 | [
"FEFF"
] | c3aa013636d984c7acc40e6ba7bb1e59043454167a588f630853bce5a2b19534 |
# /usr/bin/env python2
import pickle
from sys import exit
from RecBlastUtils import *
# Description:
# This is part 2 of the RecBlast stand-alone version.
# It starts from the first blast results and ends with running the second blast.
# PARAMETERS #
COUNT = 0
def increment():
"""Increments a ... | neuhofmo/RecBlast | part_two.py | Python | mit | 16,736 | [
"BLAST"
] | 32735061224d70d827a9e7340bc11abd5c2c577959336d2cae643ce4102bb952 |
import ase.db
c = ase.db.connect('abc.db')
from ase import Atoms
from ase.calculators.emt import EMT
h2 = Atoms('H2', [(0, 0, 0), (0, 0, 0.7)])
h2.calc = EMT()
h2.get_forces()
c.write(h2, ['molecule'], relaxed=False)
from ase.optimize import BFGS
BFGS(h2).run(fmax=0.01)
c.write(h2, ['molecule'], relaxed=True, data={... | askhl/ase | doc/ase/db/db.py | Python | gpl-2.0 | 740 | [
"ASE"
] | 5338bd8e3d0cb9adfe51b13baaad948ce495826240af42aacfa55fdc7ecf87d6 |
edges = {}
visited = set()
def visit(x):
visits = 1
visited.add(x)
for n in edges[x]:
if n not in visited:
visits += visit(n)
return visits
with open("inputs/day12.txt") as f:
for line in f:
[source, dests] = line.strip().split(" <-> ")
dests = dests.split(", "... | astonshane/AdventOfCode | 2017/python/day12.py | Python | mit | 565 | [
"VisIt"
] | 33241b85ac57800c18d40aa718d87e8cd610e8b864e9fa1605aac39bdb90dc82 |
import numpy as np
from collections import OrderedDict
from theano import tensor as T
from os.path import join as pjoin
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
from smartlearner.interfaces.direction_modifier import DirectionModifier
from smartlearner.utils import sharedX
class Gradient... | MarcCote/smartlearner | smartlearner/direction_modifiers/gradient_noise.py | Python | bsd-3-clause | 2,931 | [
"Gaussian"
] | f8cec9b1410e8387883392615556e1675e5c44c198cd29f550ff1b0cb51a1341 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011, 2012 Pablo Barenbaum <foones@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 version 3 of the License, or
# (at your option) a... | gobstones/PyGobstones-Lang | pygobstoneslang/lang/gbs_lint.py | Python | gpl-3.0 | 40,480 | [
"VisIt"
] | 059612893b238d53c26107efdc6e64a2c635446cc1ec67ee428af20c33fcc198 |
'''
import google as g
data = g.doGoogleSearch('the martian')
print data.results
'''
'''
from pygoogle import pygoogle
g = pygoogle('the martian')
g.pages = 5
print '*Found %s results*'%(g.get_result_count())
g.get_urls()
'''
import pprint
from googleapiclient.discovery import build
def main():
# Build a service ... | xianjunzhengbackup/code | data science/machine_learning_for_the_web/chapter_8/movie_reviews_analizer_app/scrapy_spider/test_api/google_api.py | Python | mit | 754 | [
"VisIt"
] | 6f7f489bcf269ea0b540121e3cca5cc9f77e461881b0680dc3dcdb4526aed84f |
#########################################################################
## This program is part of 'MOOSE', the
## Messaging Object Oriented Simulation Environment.
## Copyright (C) 2013 Upinder S. Bhalla. and NCBS
## It is made available under the terms of the
## GNU Lesser General Public License version 2... | dilawar/moose-full | moose-examples/snippets/chemDoseResponse.py | Python | gpl-2.0 | 6,804 | [
"MOOSE"
] | 5d2a6599f7d85b276c64dcc38d8384d692bccce585c6ba610f94fb081da5c6cb |
# -*- coding: utf-8 -*-
#
# TinyMock documentation build configuration file, created by
# sphinx-quickstart on Fri Feb 11 14:20:15 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | bwbeach/bstat | doc/conf.py | Python | mit | 6,990 | [
"Brian"
] | 13bc210f4399b83b3256b90224b4fa5d14e006d63be5c567c9f36a362f960a9f |
import ast
import _ast
from nimoy.specification import Specification
from nimoy.ast_tools.expression_transformer import ComparisonExpressionTransformer, ThrownExpressionTransformer
class ComparisonExpressionTransformerSpec(Specification):
def equality_expressions_are_transformed(self):
with setup:
... | Luftzig/nimoy | specs/nimoy/ast_tools/expression_transformer_spec.py | Python | apache-2.0 | 3,070 | [
"VisIt"
] | e9cef7884cf9a4e19f92d2cbc9db183b3a1b631a830afedb0d1aff39a5dac8e8 |
import pytest
import DIRAC
@pytest.mark.parametrize(
"path, expected",
[
("/opt/dirac/versions/v7.2.1-1622561290/Linux-x86_64/", "/opt/dirac"),
("/opt/dirac/versions/v10.2.1-1622561290/Linux-x86_64/", "/opt/dirac"),
("/opt/dirac/versions/v10.2.0a14.dev11+ga5b9ec512-1622561290/Linux-x8... | DIRACGrid/DIRAC | src/DIRAC/tests/Test_init.py | Python | gpl-3.0 | 1,954 | [
"DIRAC"
] | d5212147b8922f912fd8ba855144cda403773e29fdeb88e2d23f0ad6d3d8cbd5 |
# coding=utf-8
import os
import six
import unittest
from nose.plugins.attrib import attr
from conans.client import tools
from conans.client.tools.scm import Git
from conans.errors import ConanException
from conans.test.utils.tools import temp_folder, create_local_git_repo,\
TestClient
from conans.util.files impor... | memsharded/conan | conans/test/unittests/client/tools/scm/test_git.py | Python | mit | 11,533 | [
"ASE"
] | 84e06a143962e6effbf886898dfea871547a3f03f5467e62585e51100de41a9f |
"""
Grammar for selecting regions of a domain.
Regions serve for selection of certain parts of the computational domain
represented as a finite element mesh. They are used to define the boundary
conditions, the domains of terms and materials etc.
Notes
-----
History: pre-git versions already from from 13.06.2006.
"""... | RexFuzzle/sfepy | sfepy/discrete/parse_regions.py | Python | bsd-3-clause | 6,738 | [
"VisIt"
] | 800680948b7b3455bf68d45b5b76a02eff3d72f8fef17b7130bf8de702b205fe |
# -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2017, Caleb Bell <Caleb.Andrew.Bell@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... | CalebBell/thermo | tests/test_joback.py | Python | mit | 4,016 | [
"RDKit"
] | edc30e0f9247ce9a0254ac2193c8cc5a1c477c8c72bc541f8d7fad925401a663 |
"""
Example of a basic contour plot
Will hopefully help me write a decent interface.
"""
import sys,os
# import the python visualisation interface
from pyvisi import *
# original vtk code
import vtk
import numarray
# generate the x and y grid data
x = numarray.arrayrange(-1, 1, stride=0.5, type='Float')
y = numa... | paultcochrane/pyvisi | examples/basicContourExample.py | Python | gpl-2.0 | 2,807 | [
"VTK"
] | 1ba9bd381c3c8dbde6ca92705a781760805b5d6e3f4ab22917ae9709b608bcf4 |
# Copyright 2014-2020 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... | sunqm/pyscf | pyscf/pbc/df/test/test_rsdf_ao2mo.py | Python | apache-2.0 | 7,428 | [
"PySCF"
] | e6a88213cd0541287dff11ea27a19e847d63fc09b0932e5e47382e91a9d6d268 |
# -*- 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-vision | tests/unit/gapic/vision_v1/test_product_search.py | Python | apache-2.0 | 244,008 | [
"Octopus"
] | 286e7ad9ee77ad9dd0c726ab4f62b9595f7e02e5e972a012226aea9a019e55c7 |
# coding: utf-8
from __future__ import division, unicode_literals
"""
This module implements a Composition class to represent compositions,
and a ChemicalPotential class to represent potentials.
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2011, The Materials Project"
__version__ = "0.1"
__maintainer... | rousseab/pymatgen | pymatgen/core/composition.py | Python | mit | 31,110 | [
"pymatgen"
] | ee5f081d1ba2e0bfc8d548d2b0c994bc46aff87df85c9184a4ed995064dce4e8 |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | zuotingbing/spark | python/pyspark/ml/clustering.py | Python | apache-2.0 | 60,944 | [
"Gaussian"
] | 2254c58df354dbe271d409c60743afeaee824b57156392f6887b945aa89f84be |
"""
NeuroLearn Simulator Tools
==========================
Tools to simulate multivariate data.
"""
__all__ = ["Simulator", "SimulateGrid"]
__author__ = ["Sam Greydanus", "Luke Chang"]
__license__ = "MIT"
import os
import numpy as np
import nibabel as nib
import pandas as pd
import matplotlib.pyplot as plt
from nil... | ljchang/nltools | nltools/simulator.py | Python | mit | 30,441 | [
"Gaussian"
] | e2dbe347d31e8971e8ad0947d436a4934e9cc4e927fd85bb462aea016b86dab6 |
import os
import nest
import logging
import datetime
from time import clock
from parameters import *
from data import *
times = []
spikegenerators = {} # dict name_part : spikegenerator
spikedetectors = {} # dict name_part : spikedetector
multimeters = {} # dict name_part : multimeter
SYNAPSES = 0
FORM... | magnastrazh/NEUCOGAR | nest/GDP/scripts/func.py | Python | gpl-2.0 | 12,364 | [
"NEURON"
] | db26b764bcfeaf49483d687a30e81a611efa571dc8a5eefd001b944695cba5d6 |
# coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
import sub... | cevaris/pants | tests/python/pants_test/backend/python/test_python_chroot.py | Python | apache-2.0 | 10,560 | [
"VisIt"
] | 453fc03ae24d964a160f8e8bb2371a052af70dc9e05522cfcc5e9cc8179c8169 |
#!/usr/bin/env python
#===============================================================================
# Copyright (c) 2014 Geoscience Australia
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions ar... | alex-ip/agdc | deprecated/scene_kml_generator.py | Python | bsd-3-clause | 20,073 | [
"NetCDF"
] | b067cc53b6b5b7f0348d9753004c8bc7f9ca8e3f9aaf618bdd599e19c9e0ff59 |
import vtk
def set_image_border(image, value):
"""Sets the border pixels of 'image' to 0. The method assumes that image is 3D. If it is 1D or 2D whole image will be set to 0."""
if not isinstance(image, vtk.vtkImageData):
raise TypeError("the input has to be of type vtkImageData")
if image.GetNumberOfScalar... | zibneuro/convert | vol2mesh/imgtools.py | Python | bsd-3-clause | 1,207 | [
"VTK"
] | 176306c3e0a76060419066b0ba69e186c4f48156491becea60a2ae2d6d21b178 |
# encoding: utf-8
from __future__ import division, print_function
import ast
import types
from expr import UnaryOp, BinaryOp, LogicalOp, ComparisonOp
from utils import add_context
import actions
import aggregates
import alignment
import charts
import groupby
import links
import matching
import exprmisc
import exprra... | benjello/liam2 | liam2/exprtools.py | Python | gpl-3.0 | 12,285 | [
"VisIt"
] | 34664b38d9f582795500fc18d34dfcfef856d94eb87aa4ebed3a17d79225fdc6 |
#!/usr/bin/env python
__author__ = 'Mike McCann,Duane Edgington,Danelle Cline'
__copyright__ = '2018'
__license__ = 'GPL v3'
__contact__ = 'duane at mbari.org'
__doc__ = '''
Master loader for all CANON May-June Campaign 2018
Mike McCann, Duane Edgington, Danelle Cline
MBARI 15 May 2018
@var __date__: Date of last s... | danellecline/stoqs | stoqs/loaders/CANON/loadCANON_september2018.py | Python | gpl-3.0 | 20,474 | [
"NetCDF"
] | bcb848a56e39d05d6d2e291a62b1ae841082486de940106e2d31072ca717c5c0 |
# -*- 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 cablemap.core.utils.titlefy
:author: Lars Heuer (heuer[at]semagia.com)
:organization: Semagia - <http://www.semagia.com/>
:license: ... | heuer/cablemap | cablemap.core/tests/test_utils_titlefy.py | Python | bsd-3-clause | 6,363 | [
"VisIt"
] | e2c6ae3fac983b37f5e349475a5a794db7d26a942d263a75d2cafbf1de791f6b |
"""
Interactive Foreground Extraction using GrabCut Algorithm
- use GrabCut to extract foreground in images
- create an interactive application
GrabCut - algorithm for foreground extraction with minimal user interaction
from user POV:
initially, user draws rectangle around foreground region
foreground reg... | SSG-DRD-IOT/commercial-iot-security-system | opencv/tutorials/imageProcessing/grabcut/grabcut.py | Python | mit | 5,222 | [
"Gaussian"
] | 0a26e61a8dad2ee12458cf29bbe6b834e979c59774f1643b85fd94c0694b37bd |
"""
This module provides a number of algorithms that can be used with
the dataset classes defined in the dataset_adapter module.
See the documentation of the dataset_adapter for some examples.
These algorithms work in serial and in parallel as long as the
data is partitioned according to VTK data parallel executio... | timkrentz/SunTracker | IMU/VTK-6.2.0/Wrapping/Python/vtk/numpy_interface/algorithms.py | Python | mit | 44,383 | [
"VTK"
] | d5437be639a8ce7700ae33bf53568bbfc9bfc2047dd342d125cc3edfbe7a14ac |
# -*- 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) 2014-2016, the cclib development team
#
# The library is free software, distributed under the terms of
# the GNU Lesser General Pub... | ghutchis/cclib | src/cclib/parser/qchemparser.py | Python | lgpl-2.1 | 65,755 | [
"Gaussian",
"Q-Chem",
"cclib"
] | 15c5ae4bc3680185d2b28b0b05f163d64ed7efa66418e25774793d7b1ec464b7 |
#!/usr/bin/python
#
# CCLib_proxy Utilities - BlueGiga Specific
# Copyright (c) 2014 Ioannis Charalampidis
#
# 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
#... | wavesoft/CCLib | Python/ble_info.py | Python | gpl-3.0 | 1,798 | [
"cclib"
] | d240266b624637a95b2c016528ac46d3b221accc9d654336a40f4f94b030cc89 |
import director.objectmodel as om
import director.applogic as app
from shallowCopy import shallowCopy
import director.vtkAll as vtk
from director import transformUtils
from director import callbacks
from director import frameupdater
from director.fieldcontainer import FieldContainer
from PythonQt import QtCore, QtGui
i... | manuelli/director | src/python/director/visualization.py | Python | bsd-3-clause | 39,578 | [
"VTK"
] | 2a743e026f74c4c82e2f64d383115cd65ac928313f7a8a51c4808f8c5e77a4f0 |
#
# gPrime - A web-based genealogy program
#
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2008 Jerome Rapinat
# Copyright (C) 2008 Benny Malengier
# Copyright (C) 2010 Gary Burton - derived from _HasGalleryBase.py
#
# This program is free software; you can redistribute it and/or modify
# it under the term... | sam-m888/gprime | gprime/filters/rules/source/_hasrepository.py | Python | gpl-2.0 | 2,639 | [
"Brian"
] | 6a2554e2f571b0f84ce8514af4dacd4e891d5ddbeef54877f13774fdd6020216 |
import ocl
import camvtk
import time
import vtk
import datetime
import math
def drawLoops(myscreen, loops, loopcolor):
nloop = 0
for lop in loops:
n = 0
N = len(lop)
first_point=ocl.Point(-1,-1,5)
previous=ocl.Point(-1,-1,5)
for p in lop:
if n==0: # don't dra... | AlanZatarain/opencamlib | scripts/cutter_shapes.py | Python | gpl-3.0 | 5,287 | [
"VTK"
] | 0c665dba85977ff7bc110cbd4b7f8a6d97739704e8225c88b61b97c0a1d76c4a |
#!/usr/bin/env python
__author__ = "Mike McCann"
__copyright__ = "Copyright 2012, MBARI"
__license__ = "GPL"
__maintainer__ = "Mike McCann"
__email__ = "mccann at mbari.org"
__doc__ = '''
Script to read data from Western Flyer Seabird profile ctd .asc files and
write them to netCDF files.
Use the conventions for ... | danellecline/stoqs | stoqs/loaders/CANON/toNetCDF/pctdToNetcdf.py | Python | gpl-3.0 | 11,905 | [
"NetCDF"
] | 7ba94089b3d76ffe68a3d288f00cfbc2502c2db73c86a39f8962ebcd7806a036 |
# Copyright (c) 2015. Mount Sinai School of Medicine
#
# 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 o... | hammerlab/varlens | varlens/reads_util.py | Python | apache-2.0 | 5,851 | [
"pysam"
] | 371220eb661b05642ef8a4d64f0b480ecc0c6e09a2d3f4ebd3edac0c94c85621 |
"""
Test functions for GEE
External comparisons are to R and Stata. The statsmodels GEE
implementation should generally agree with the R GEE implementation
for the independence and exchangeable correlation structures. For
other correlation structures, the details of the correlation
estimation differ among implementa... | jseabold/statsmodels | statsmodels/genmod/tests/test_gee.py | Python | bsd-3-clause | 77,202 | [
"Gaussian"
] | 99b30f3a3f4f106e1b70fdf90c9235e664c960377c712983a48060b6e272ad8c |
# runs after the job (and after the default post-filter)
import os
from galaxy import eggs
from galaxy import jobs
from galaxy.tools.parameters import DataToolParameter
# Older py compatibility
try:
set()
except:
from sets import Set as set
#def exec_before_process(app, inp_data, out_data, param_dict, tool=Non... | volpino/Yeps-EURAC | tools/new_operations/operation_filter.py | Python | mit | 3,752 | [
"Galaxy"
] | 02c8c3e490eb04a2435e4f2df4c8deebb68141aefafcaf249a6d1cf436e517b8 |
#
# AtHomePowerlineServer - networked server for CM11/CM11A/XTB-232 X10 controllers
# Copyright © 2014, 2020 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 Foundation, version 3 of the... | dhocker/athomepowerlineserver | commands/ServerCommand.py | Python | gpl-3.0 | 3,623 | [
"xTB"
] | fc77c2a8b8083dee06883a47058192145aa0db5ccfada0b8cf27531ae50a2dba |
""" The Site Director is an agent performing pilot job submission to particular sites/Computing Elements.
.. literalinclude:: ../ConfigTemplate.cfg
:start-after: ##BEGIN SiteDirector
:end-before: ##END
:dedent: 2
:caption: SiteDirector options
"""
import os
import sys
import random
import socket
from collect... | ic-hep/DIRAC | src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py | Python | gpl-3.0 | 60,084 | [
"DIRAC"
] | b5ca6003f1dfa9c63fa098863ec1618464854fd4fbf40e668a3a57aeffb4a2e4 |
#!/usr/bin/env python
import sys, commands
import numpy as np
from time import time
import nibabel as nib
from dipy.denoise.nlmeans import nlmeans
# Get path of the toolbox
status, path_sct = commands.getstatusoutput('echo $SCT_DIR')
# Append path that contains scripts, to be able to load modules
sys.path.append(path... | 3324fr/spinalcordtoolbox | dev/tamag/old/sct_denoising_nlm.py | Python | mit | 6,195 | [
"Gaussian"
] | 1d45557a870b19ed50d8e0bb5e9b1c964bb92d4198bddc0add87c651eb47e5db |
# -*- coding: utf-8 -*-
# Copyright (c) 2015-2022, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
"""
Custom Axes
###################
"""
#
#import seaborn as sns
#
#from exa.mpl import _plot_contour, _plot_surface
#from exatomic import Energy
#
#
#def _get_minimum(mindf):
# a... | exa-analytics/exatomic | exatomic/mpl.py | Python | apache-2.0 | 23,126 | [
"Gaussian"
] | 74233792f8e825a6d03e2c81697770b2c21957e6e037715deb1a9bb051ce05e5 |
#-----------------------------------------------------
# Author: Yaqiang Wang
# Date: 2014-12-27
# Purpose: MeteoInfo data module
# Note: Jython
#-----------------------------------------------------
import os
import datetime
from org.meteoinfo.data.meteodata import MeteoDataInfo, Dimension, DimensionType
... | meteoinfo/meteoinfolab | pylib/mipylib/dataset/midata.py | Python | lgpl-3.0 | 33,069 | [
"NetCDF"
] | 53b89347451bb8ebb030f836f6d7aade9099241c81caac49bd58fa0b40416b66 |
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.pyplot import Rectangle # Used to make dummy legend
# Open CSV File from Simulation
datafileS = open('../MASTER_DISTRIBUTIONS/HIIregion_popSynthesis.csv', 'r')
csvFileS = []
for row in datafileS:
csvFileS.append(row.strip().split(','))
# Save Galac... | WillArmentrout/galSims | tests/completeness/Completeness_TwoPanel_Compare.py | Python | gpl-2.0 | 26,007 | [
"Galaxy"
] | 56e10d0565e8a10a37e436cf5735583cec87ce4b5d2c7a3daa6d9279d96f9545 |
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from django.views import defaults as default_views
from home import views as home_views
from django.views.generic.base impo... | pcodes/mhn_interface | config/urls.py | Python | mit | 2,022 | [
"VisIt"
] | d3d52059da63156b8e1712a9ffdb5c2dff263c0ad084b9bb6e0e6bcdab02cfb4 |
from abapy.postproc import FieldOutput
from abapy.mesh import Mesh, Nodes
x = [0.,1.,0.]
y = [0.,0.,1.]
z = [0.,0.,0.]
labels = [1,2,3]
nodes = Nodes(x=x,y=y,z=z, labels=labels)
mesh = Mesh(nodes=nodes)
mesh.add_element(label = 1 , connectivity = [1,2,3], space = 2 , name = 'tri3') # triangle element
nodeField = FieldO... | lcharleux/abapy | doc/example_code/postproc/FieldOutput-dump2vtk.py | Python | gpl-2.0 | 719 | [
"VTK"
] | 3fd1bb2f95c7748e612c88375ca9994ddfad10b57c4d41a5f01817b6b620be3e |
import glob
import pandas as pd
import numpy as np
pd.set_option('display.max_columns', 50) # print all rows
import os
os.chdir("/gpfs/commons/home/biederstedte-934/evan_projects/correct_phylo_files")
normalB = glob.glob("binary_position_RRBS_normal_B_cell*")
mcell = glob.glob("binary_position_RRBS_NormalBCD19pCD27... | evanbiederstedt/RRBSfun | trees/chrom_scripts/normalCll12.py | Python | mit | 32,958 | [
"MCell"
] | d623838b9fb4927003a07f67ea902649922d0738f1354021294161d2b6818bbe |
# Wrapper for the shortest augmenting path algorithm for solving the
# rectangular linear sum assignment problem. The original code was an
# implementation of the Hungarian algorithm (Kuhn-Munkres) taken from
# scikit-learn, based on original code by Brian Clapper and adapted to NumPy
# by Gael Varoquaux. Further impr... | lhilt/scipy | scipy/optimize/_lsap.py | Python | bsd-3-clause | 3,950 | [
"Brian"
] | 926c368af7be0e72c3390faf142e101f19929280cc23b9bfe8a1a4a1e61bac4f |
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from django.views import defaults as default_views
urlpatterns = [
url(r'^$', TemplateView.as_view(template_name='page... | nunchaks/cookiecutter-django | {{cookiecutter.project_slug}}/config/urls.py | Python | bsd-3-clause | 1,670 | [
"VisIt"
] | 555b46bb3b931ddfe3806c84821deda3aec412d2870ef730208b4aa40488d68c |
# -*- coding: utf-8 -*-
"""
ORCA Open Remote Control Application
Copyright (C) 2013-2020 Carsten Thielepape
Please contact me by : http://www.orca-remote.org/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publi... | thica/ORCA-Remote | src/ORCA/utils/Platform/android/android_GetIPAddressV4.py | Python | gpl-3.0 | 2,290 | [
"ORCA"
] | 6d8d5a67df319bb5c203420b7c75ab72a9485f491bb3d35c69044c6935bf6cba |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import json
import os
import unittest
from pymatgen.analysis.structure_prediction.substitutor import Substitutor
from pymatgen.core.composition import Composition
from pymatgen.core.periodic_table import Species
from pymatge... | vorwerkc/pymatgen | pymatgen/analysis/structure_prediction/tests/test_substitutor.py | Python | mit | 1,664 | [
"pymatgen"
] | da2cadf99d76c9d1fc72bff6bdaacb17c075aed6293db5e17639f678c0f66e75 |
import numpy as np
import pylab as plt
from dopamine.stochastics import *
from ipdb import set_trace as debug
class DiscWorld(object):
'''This provides a simulation environment for testing reinforcement
learning algorithms. It provides a one-dimensional space with a one-
dimensional action space. Ac... | lightscalar/dopamine | dopamine/discworld.py | Python | mit | 5,582 | [
"Gaussian"
] | d9b771236d679ba1a51db17d93fe7bd61485426c99ed243f4c1775334b322ecb |
# 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, software
# d... | gluke77/rally | tests/unit/test_mock.py | Python | apache-2.0 | 11,998 | [
"VisIt"
] | f9241a635755630ffecd72743b069fe73556c7c63d8fafbc442da4c0f7c6cc13 |
#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | SKIRT/PTS | modeling/core/model.py | Python | agpl-3.0 | 445,343 | [
"Galaxy"
] | 96f8bd741a05154e3e8856a9a152d525c0ae96f92adad26655211dcca832f2be |
# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see PYFITS.rst
import copy
import collections
from io import StringIO, BytesIO
import pytest
import numpy as np
from astropy.io import fits
from astropy.io.fits.verify import VerifyWarning
from astropy.utils.exceptions import AstropyUserWarning... | lpsinger/astropy | astropy/io/fits/tests/test_header.py | Python | bsd-3-clause | 115,080 | [
"BLAST"
] | e82a0e5d0ca8116fd16f5c0a6ec113ddbb3d26e259f831441bb03886fc569b51 |
../../../../../../../../share/pyshared/orca/scripts/apps/yelp/yelp_v2/__init__.py | Alberto-Beralix/Beralix | i386-squashfs-root/usr/lib/python2.7/dist-packages/orca/scripts/apps/yelp/yelp_v2/__init__.py | Python | gpl-3.0 | 81 | [
"ORCA"
] | 0070122df3416ace300b1a46430ef2b5882ad4d76f0dd5882409212d493252e4 |
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2015 Nervana Systems Inc.
# 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
#
# ... | coufon/neon-distributed | tests/serialization/alexnet.py | Python | apache-2.0 | 3,948 | [
"Gaussian"
] | 247b3eb7174788c39ee863e482a4133ee2deef692b5d4d24d01a492495c5fbd4 |
import pytest
import marm.cli
@pytest.mark.parametrize(
('stored,pkt_type,pkt_filter,dur,splits,packets'), [
('sonic-v.mjr', 'vp8', None, 10.0, 12, 9654),
('sonic-a.mjr', 'opus', None, 10.0, 12, 5996),
('streets-of-rage.pcap', 'vp8', 'ssrc=3830765780', 2.0, 5, 1239),
('streets-of-... | mayfieldrobotics/marm | test/test_cli.py | Python | bsd-3-clause | 2,981 | [
"VisIt"
] | b246802a3d7e8ebaed418216a5812ddcdc4755109aca540564ac81acd450009b |
# -*- coding: utf-8 -*-
#
# complex.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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
# (... | sdiazpier/nest-simulator | extras/ConnPlotter/examples/complex.py | Python | gpl-2.0 | 4,833 | [
"Gaussian"
] | 7755d56cf066cde6000b82f14c6d6be82d972b7d0f9b1e9fcceebd49c62c6e25 |
#!/usr/bin/env python
"""
Description : to merge same transcripts in single loci and define as an
alternative spliced form for the gene.
Copyright (C) 2010-2015 Friedrich Miescher Laboratory of the Max Planck Society
"""
def display_content(final_dict):
"""
displaying the summary from GFF file
"""
pr... | vipints/brca_pilot | utils/gff_loci_merge.py | Python | bsd-3-clause | 16,709 | [
"Galaxy"
] | ba82a4e7d3544e7ea0df476bbae7af672054b7fca82ebe3e37399e41082d0fc0 |
# Copyright (C) 2010 Nokia Corporation
# Copyright (C) 2010 Collabora Ltd.
#
# 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 l... | freedesktop-unofficial-mirror/telepathy__telepathy-mission-control | tests/twisted/account-manager/service.py | Python | lgpl-2.1 | 4,435 | [
"MOOSE"
] | 24d3ec6c28a4434a087a3589c889c62485ff46a9258b22dfbf25e991b716e051 |
#
# Copyright (c) 2017 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
# ScanCode is a trademark of nexB Inc.
#
# You may not use... | michaelrup/scancode-toolkit | src/scancode/cli.py | Python | apache-2.0 | 27,604 | [
"VisIt"
] | 6386b071a36320bc4cc1c181561e8df138cd7f4afdf6d9b0cc8c1fe22d7ea0fc |
#!/usr/bin/python
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2018 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... | amjames/psi4 | doc/sphinxman/extract_changeset.py | Python | lgpl-3.0 | 1,762 | [
"Psi4"
] | 60a1385adbafc2ea471bc986b134e5103cbbc824cc17e0fe2e94676e0599ecc7 |
"""
Acceptance tests for Studio related to the acid xblock.
"""
from common.test.acceptance.pages.studio.auto_auth import AutoAuthPage
from common.test.acceptance.pages.studio.overview import CourseOutlinePage
from common.test.acceptance.pages.xblock.acid import AcidView
from common.test.acceptance.fixtures.course impo... | synergeticsedx/deployment-wipro | common/test/acceptance/tests/studio/test_studio_acid_xblock.py | Python | agpl-3.0 | 7,011 | [
"VisIt"
] | 00971f998bc3b91a57a60c4e18ef69d7d8f3b110c115918794c2866074ae880e |
from scipy.optimize import curve_fit
import numpy as np
from scipy.stats import t
from scipy.constants import k, epsilon_0
debye = 3.33564e-30
#import numpy as np
def getError(var_matrix, dof):
a = 1 - 0.05/2
factorSE = t.isf(a, dof)
variance = np.diagonal(var_matrix)
SE = np.sqrt(variance)
error... | kourk0am/pyNMR | fitMod.py | Python | mit | 28,362 | [
"CRYSTAL",
"Gaussian"
] | da6ca93ffe8bf0444565e2f5f6257480be5fa1c131815c141ebf5ad9e8dabbe8 |
#!/usr/bin/python
# Note: The octal portions of binsource files are assumed to consist
# of 8 6-octal-digit fields, separated by a single space between fields.
#
# In this version of the program, all that's required is the name of the
# B&W octal image produced by octopus.py for use as OCR input. The
# program uses t... | avtobiff/virtualagc | Tools/Proofer/ProoferBox.py | Python | gpl-2.0 | 9,568 | [
"Octopus"
] | 74d6725a38ca351cc11c83f9ea3f92859dd99e660f85878d6317bb0bdc23b474 |
"""
==========================
FastICA on 2D point clouds
==========================
Illustrate visually the results of :ref:`ICA` vs :ref:`PCA` in the
feature space.
Representing ICA in the feature space gives the view of 'geometric ICA':
ICA is an algorithm that finds directions in the feature space
corresponding t... | sniemi/SamPy | statistics/plot_ica_vs_pca.py | Python | bsd-2-clause | 3,458 | [
"Gaussian"
] | e65fea73f28201119c9f42b66d691bc0f0aca9a8ec84b2fae8bb27b4f65707af |
# dirstate.py - working directory tracking for mercurial
#
# Copyright 2005-2007 Matt Mackall <mpm@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 errn... | seewindcn/tortoisehg | src/mercurial/dirstate.py | Python | gpl-2.0 | 45,352 | [
"VisIt"
] | 09aa1a505839f265293ffe6a3e62c819190a09654bd07433aa46153b3736e212 |
# Copyright (c) 2007 The Regents of The University of Michigan
# Copyright (c) 2010 The Hewlett-Packard Development Company
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of sou... | tiagormk/gem5-hmp | src/python/m5/stats/__init__.py | Python | bsd-3-clause | 5,029 | [
"VisIt"
] | c1c036f38c4d613bccade9a3047214eb579e434c81c8ea1793fa47ab624299d1 |
# -*- coding: utf-8 -*-
"""
=====================
Cython related magics
=====================
Magic command interface for interactive work with Cython
.. note::
The ``Cython`` package needs to be installed separately. It
can be obtained using ``easy_install`` or ``pip``.
Usage
=====
To enable the magics below,... | noslenfa/tdjangorest | uw/lib/python2.7/site-packages/IPython/extensions/cythonmagic.py | Python | apache-2.0 | 11,448 | [
"Brian"
] | 62c1272288a8cb78c81999467db1ec2a366a4b395c23c8cc41c5ae3048de542e |
from dragonfly import (Grammar, AppContext, MappingRule, Dictation, Key, Text, Integer, Mimic)
putty_context = AppContext(executable="putty")
bash_context = AppContext(title="bash")
grammar = Grammar("bash", context=(putty_context | bash_context))
noSpaceNoCaps = Mimic("\\no-caps-on") + Mimic("\\no-space-on")
... | simianhacker/code-by-voice | macros/_bash.py | Python | mit | 2,766 | [
"GULP"
] | 7b5426aea986c45d591e0d7efb57f98545a05ec6afbe11bea3304687fc4eea76 |
#!/usr/bin/env python
# File: plot_color_vs_mass_vs_icd.py
# Created on: Mon 19 Mar 2012 12:01:47 PM CDT
# Last Change: Wed Oct 3 10:34:07 2012
# Purpose of script: <+INSERT+>
# Author: Steven Boada
import pylab as pyl
from mk_galaxy_struc import mk_galaxy_struc
from colsort import colsort
def plot_color_vs_mass_vs... | boada/ICD | sandbox/legacy_plot_code/plot_color_vs_mass_vs_sersic.py | Python | mit | 2,175 | [
"Galaxy"
] | 76ed8b15dee91f7db8a089a6e59d8248fb4428c13f7e33c1798ef5224028938d |
# Copyright 2008-2014 Nokia Solutions and Networks
#
# 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 l... | userzimmermann/robotframework-python3 | src/robot/result/executionresult.py | Python | apache-2.0 | 4,928 | [
"VisIt"
] | 41ca76abd82b6d18c9e007a846e68d7939cf6b99addacfbf7072dd7220fed837 |
# Orca
#
# Copyright 2005-2008 Sun Microsystems Inc.
# Copyright 2013 Igalia, S.L.
#
# 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 optio... | pvagner/orca | src/orca/scripts/apps/evolution/script.py | Python | lgpl-2.1 | 5,605 | [
"ORCA"
] | 8bd38fd44c31c934987748143ec53b13a540873f15c0202be029d724356fff9a |
"""
Blueprint for providing test endpoints for when the system is run in functional test mode.
Under normal operation, this blueprint will not be in use
"""
from flask import Blueprint, send_from_directory
from octopus.lib import paths
blueprint = Blueprint('test', __name__)
@blueprint.route("/download/<filename>", ... | JiscPER/jper | service/views/test.py | Python | apache-2.0 | 769 | [
"Octopus"
] | 1c5029c250d73b7a3635dc420e2a9edd355385d87102e3883714763cfcade662 |
#!/usr/bin/env python2
"""Module cma implements the CMA-ES, Covariance Matrix Adaptation Evolution
Strategy, a stochastic optimizer for robust non-linear non-convex
derivative-free function minimization for Python versions 2.6 and 2.7
(for Python 2.5 class SolutionDict would need to be re-implemented, because
it d... | nushio3/cmaes | python/cma.py | Python | mit | 261,903 | [
"exciting"
] | ef45940437fb887dc850348ee5cf67b7663904821739759ff7e7325bc4afa882 |
"""piddletest.py
This module puts the various PIDDLE backends through their paces.
"""
from rdkit.sping import pagesizes
from rdkit.sping.pid import *
# The original code imported letters, a more generic lisit. This is no longer supported.
from string import ascii_letters as LETTERS
import math
backends = ['PDF', '... | rdkit/rdkit | rdkit/sping/tests/pidtest.py | Python | bsd-3-clause | 15,521 | [
"RDKit"
] | b9c644db6d7f9bbf4f175be4237fafe9a71de2b1206a9f596c3fc562973599ca |
"""Contains classes and functionally to calculate collocations
"""
# pylint: disable-msg=E1101
import math
import numpy
import numpy.ma
import numpy.core.umath_tests
import logging
import datetime
import pathlib
import functools
import itertools
import scipy
import scipy.stats
import scipy.interpolate
import progres... | gerritholl/pyatmlab | pyatmlab/collocations.py | Python | bsd-3-clause | 118,083 | [
"NetCDF"
] | 2c1c9be36f4eb6f4cfd439a0b6293e187b384f1587f809c8d32eb66e141d7e60 |
#!/usr/bin/env python
"""Wrapper for the Strava (http://www.strava.com) API.
See https://stravasite-main.pbworks.com/w/browse/ for API documentation."""
__author__ = "Brian Landers"
__contact__ = "brian@packetslave.com"
__copyright__ = "Copyright 2012, Brian Landers"
__license__ = "Apache"
__version__ = "1.... | cd34/strava | strava/__init__.py | Python | apache-2.0 | 8,449 | [
"Brian"
] | d8297d578ea843d449cd91424f855ff33fa4750b1d4f4879893b4b7be163a315 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.