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 |
|---|---|---|---|---|---|---|---|
# -*- coding: utf-8 -*-
"""Pylab (matplotlib) support utilities.
Authors
-------
* Fernando Perez.
* Brian Granger
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2009 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full lice... | noslenfa/tdjangorest | uw/lib/python2.7/site-packages/IPython/core/pylabtools.py | Python | apache-2.0 | 11,701 | [
"Brian"
] | 4041460e4d9de2d6cf63869bdb2c0b3894e0f7acea7a15f12ea59d6ffbbae076 |
import pytest
from capybara.node.element import Element
from capybara.tests.helpers import isselenium
@pytest.mark.requires("js")
class TestEvaluateScript:
def test_evaluates_the_given_script_and_returns_whatever_it_produces(self, session):
session.visit("/with_js")
assert session.evaluate_script... | elliterate/capybara.py | capybara/tests/session/test_evaluate_script.py | Python | mit | 2,259 | [
"VisIt"
] | 11f89fd04c3d0ab1a5433bb2affec72c1fde1cbe942d0eef5237bbe89a3569e9 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
"""
Development script to test the algorithms of all the model coordination environments
"""
__author__ = "David Waroquiers"
__copyright__ = "Copyright 2012, ... | matk86/pymatgen | dev_scripts/chemenv/test_algos_all_geoms.py | Python | mit | 4,859 | [
"pymatgen"
] | 67f97cfec49d8301d986376d216f8591501d44842b89486d88bfa2a853aa0533 |
# ----------------------------------------------------------------------------
# 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
#
# http://www.apache.o... | nhynes/neon | neon/initializers/initializer.py | Python | apache-2.0 | 4,381 | [
"Gaussian"
] | ac1bca0eaffd7b0945ab03998b8e71fd6a4c7cccff2b8254815b2cc723642edf |
# -*- coding: utf-8 -*-
"""
Introduction to different stimulus types in Python.
* different stimulus types and properties
* cross-monitor consistent stimulus size in cm and degrees
* within-monitor equal stimulus luminsities using the DKL colorspace
Jonas Kristoffer Lindeløv, 2014. Revised 2015.
"""
# --... | lindeloev/psychopy-course | ppc2_stimuli.py | Python | gpl-2.0 | 6,668 | [
"Gaussian"
] | 48810288013bb95581f21ca1157d9f8690b3b3dcf98c4dcd70626e90451d3edc |
# Copyright 1999 by Jeffrey Chang. All rights reserved.
# Copyright 2000 by Jeffrey Chang. All rights reserved.
# Revisions Copyright 2007 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
#... | dbmi-pitt/DIKB-Micropublication | scripts/mp-scripts/Bio/Prosite/__init__.py | Python | apache-2.0 | 31,020 | [
"Biopython"
] | 948b0d829410d1c676b27f4b0aba5463a81f2c97811dadd41cfa736bafa69df7 |
import collections
import pysam
import os
import gzip
CHR = 0
POS = 1
REF = 3
ALT = 4
FMT = 8
GT = 'GT'
REF_ALIAS ='.'
ALT_FS = ','
FS = '\t'
FMT_FS = ':'
VERBOSITY = 0
__all__ = ['parseFormat', 'getGenotype', 'parseGenotype',
'VCFIterator', 'VCFReader']
def parseFormat(fmt, data):
... | andrewparkermorgan/lapels | modtools/vcfreader.py | Python | mit | 5,326 | [
"pysam"
] | 0c7525273168a4a107c06f2e5c2e25e4672007e78872a6c516d1510d83342b8a |
"""
Topological fingerprints for macromolecular structures.
"""
import numpy as np
import logging
import itertools
from deepchem.utils.hash_utils import hash_ecfp
from deepchem.feat import ComplexFeaturizer
from deepchem.utils.rdkit_utils import load_complex
from deepchem.utils.hash_utils import vectorize
from deepchem... | lilleswing/deepchem | deepchem/feat/complex_featurizers/contact_fingerprints.py | Python | mit | 8,254 | [
"RDKit"
] | 369779e06d7f9a9f0bfac589501d4a0210922174cf0ea0a1c61695044a048735 |
# -*- coding: utf-8 -*-
#
# clopath_synapse_small_network.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 ... | hakonsbm/nest-simulator | pynest/examples/clopath_synapse_small_network.py | Python | gpl-2.0 | 7,727 | [
"Gaussian",
"NEURON"
] | b74858f23bc3b7603a4d4ad9e8c3a981b2dec93997a878e1d167ccbe1d9e806c |
from jobman import DD, expand, flatten
import pynet.layer as layer
from pynet.model import *
from pynet.layer import *
from pynet.datasets.mnist import Mnist, Mnist_Blocks
import pynet.datasets.spec as spec
import pynet.datasets.mnist as mnist
import pynet.datasets.transfactor as tf
import pynet.datasets.mapping as m... | hycis/Pynet | hps/deprecated/AE.py | Python | apache-2.0 | 30,172 | [
"Gaussian"
] | 512d207470e97e5b750bcc1c5ffdbf9f4f2c3943d803ec683e86d53fbadc1101 |
import numpy as np
from numpy import linalg
from statsmodels.distributions.empirical_distribution import StepFunction
from scipy.stats import norm
from scipy.integrate import nquad
import cProfile, pstats, StringIO
from scipy.special import ndtri
from scipy.linalg import get_blas_funcs
class SampledPDF(StepFunction):
... | eicoffee/tools | lib/copula.py | Python | gpl-2.0 | 5,224 | [
"Gaussian"
] | 2fd2ca916584acd2761e11781024e53341ab31e4e4aec197bfeb64989dbbb90b |
# Twisted, the Framework of Your Internet
# Copyright (C) 2001 Matthew W. Lefkowitz
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in t... | fxia22/ASM_xf | PythonD/site_python/twisted/python/otp.py | Python | gpl-2.0 | 25,849 | [
"Elk",
"MOE"
] | 7a690b87a2745f58c81190b8f4188817a28d205e7136153114fee8ca371c15c8 |
""" Replicating the results of
Net on-chip Brillouin gain based on suspended
silicon nanowires
Van Laer et al.
http://dx.doi.org/10.1088/1367-2630/17/11/115005
"""
import time
import datetime
import numpy as np
import sys
import matplotlib
matplotlib.use('pdf')
import matplotlib.pyplot as plt
import c... | bjornsturmberg/NumBAT | lit_examples/simo-lit_05-Van_Laer-NJP_2015.py | Python | gpl-3.0 | 4,372 | [
"CRYSTAL"
] | cc33ebe9ff7a498ac282be160a35024f20e5ae103fc31701886546f424c8073d |
from functools import lru_cache
magic = 1362
# test data
# magic = 10
# goal_x = 7
# goal_y = 4
# a
goal_x = 31
goal_y = 39
# b
max_steps = 51
visited = {}
@lru_cache(None)
def is_wall(x, y):
factor = magic + x * x + 3 * x + 2 * x * y + y + y * y
bits = 0
while True:
bits += factor & 1
... | matslindh/codingchallenges | adventofcode2016/13.py | Python | mit | 1,553 | [
"VisIt"
] | 590e83c6d985286aee576bb7efae6c4546d28005194b4980531dadae37714eed |
########################################################################
# $HeadURL$
########################################################################
""" DIRAC FileCatalog utilities
"""
__RCSID__ = "$Id$"
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Utilities.List import intListToString
def getIDSelectSt... | andresailer/DIRAC | DataManagementSystem/DB/FileCatalogComponents/Utilities.py | Python | gpl-3.0 | 764 | [
"DIRAC"
] | 227e1496a189b9e4b4c8ff2a62242f635acd5533f7629e667b37f54f78c2f9c0 |
#* 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
#* https://www.gnu.org/licenses/lgpl-2.1.html
import os
i... | nuclear-wizard/moose | python/MooseDocs/extensions/package.py | Python | lgpl-2.1 | 5,047 | [
"MOOSE"
] | cbb70ec0a5098851c6f12843954575ea12abc1677c126faa7931d1024942ac28 |
# ; -*- mode: Python;-*-
from modelUtils.distanceDelays import makeDelayedLaterals
#JABALERT: Should update the docstring once the GCA paper has been
# accepted or at least submitted.
"""
GCAL
Work in progress on an improved version of the LISSOM orientation map
simulation from figure 5.9 of Miikkulainen, Bednar, Choe... | ioam/svn-history | contrib/JLStevens-TCAL/MastersVersion/models/gcal_vanilla.py | Python | bsd-3-clause | 14,269 | [
"Gaussian"
] | 53a87c27d98f5fae386c434221b4a17dc6c621039929b99bf52b34d7d3ac91b3 |
"""
Views for the verification flow
"""
import datetime
import decimal
import json
import logging
import urllib
from pytz import UTC
from ipware.ip import get_ip
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.core.mail import send_mail
from django.core.urlresolv... | tanmaykm/edx-platform | lms/djangoapps/verify_student/views.py | Python | agpl-3.0 | 60,691 | [
"VisIt"
] | a23eed84fded6081454c7619c945b32918e999f0812819bea12a453dfbdad80b |
import arch.bootstrap
import mdtraj as md
import numpy as np
import mdtraj.utils.unit.unit_definitions as u
kB = 1.3806488E-23 * u.joule / u.kelvin
epsilon0 = 8.854187817E-12 * u.farad / u.meter
gas_constant = 8.3144621 * u.joule / u.kelvin / u.mole
def dipole_moment_errorbars():
"""Modified from mdtraj.geometry... | choderalab/LiquidBenchmark | src/dipole_errorbars.py | Python | gpl-2.0 | 2,191 | [
"MDTraj"
] | c718697e8fee727e1c30e860a44fb2e4591be00feaffb0163e26865591641bd3 |
# coding: utf-8
"""
Vericred API
Vericred's API allows you to search for Health Plans that a specific doctor
accepts.
## Getting Started
Visit our [Developer Portal](https://developers.vericred.com) to
create an account.
Once you have created an account, you can create one Application for
Production and an... | vericred/vericred-python | test/test_request_provider_notification_subscription.py | Python | apache-2.0 | 10,225 | [
"VisIt"
] | d6306e0d94eb0118a9d7c2432b3fe3051c855bbc26f5b4090528c20a086bab42 |
# -*- coding: utf-8 -*-
#
# This file is part of INSPIRE.
# Copyright (C) 2014-2017 CERN.
#
# INSPIRE 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 ... | jacquerie/inspire-next | tests/integration/test_detailed_records.py | Python | gpl-3.0 | 2,148 | [
"VisIt"
] | 500e883e43f1df75ba473d9aaf600f63a07dcd0ee491a1b44814e9bc7e829a0f |
""" Meager code path measurement tool.
Ned Batchelder
http://nedbatchelder.com/blog/200803/python_code_complexity_microtool.html
MIT License.
"""
try:
from compiler import parse # NOQA
iter_child_nodes = None # NOQA
except ImportError:
from ast import parse, iter_child_nodes # N... | isohybrid/dotfile | vim/bundle/git:--github.com-klen-python-mode/pylibs/mccabe.py | Python | bsd-2-clause | 8,283 | [
"VisIt"
] | e903786e4e8ded5a7e9281017155fbb54e2f5b097f8419a9a2072add36664092 |
from __future__ import print_function, absolute_import, division
import glob
import os
import numpy as np
from .utils import expand_path, num_samples
class BaseDatasetLoader(object):
short_name = None
def load(self):
raise NotImplementedError('should be implemented in subclass')
class MSMBuilderD... | msultan/osprey | osprey/dataset_loaders.py | Python | apache-2.0 | 8,315 | [
"MDTraj"
] | e3b5babd3236f06c4126f54a377692e50577ac5e3af3a5a3848d25e502ff0e88 |
#!/usr/bin/env python
__author__ = 'waroquiers'
import unittest2
import os
import json
import numpy as np
from pymatgen.analysis.chemenv.coordination_environments.coordination_geometry_finder import LocalGeometryFinder
from pymatgen.analysis.chemenv.coordination_environments.coordination_geometries import AllCoordin... | aykol/pymatgen | pymatgen/analysis/chemenv/coordination_environments/tests/test_coordination_geometry_finder.py | Python | mit | 5,358 | [
"pymatgen"
] | ff33227fd7ee23d39b7953f7d9b00c2363acda9eee5548ab4a31552bb409a8f8 |
########################################################################
#
# File Name: __init__.py
#
#
from types import UnicodeType
"""
WWW: http://4suite.com/4DOM e-mail: support@4suite.com
Copyright (c) 2000 Fourthought Inc, USA. All Rights Reserved.
See http://4suite.com/COPYRIGHT for licen... | trevor/calendarserver | txdav/xml/xmlext.py | Python | apache-2.0 | 24,968 | [
"VisIt"
] | 5ed75de64c3e37e0f28a5ea3124817bcad34b5763a45454e606ea326bd41bc5d |
# Simple Python Library for accessing WS2801 LED stripes
# Copyright (C) 2013 Philipp Tiefenbacher <wizards23@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 2 of th... | jsphpl/ws2801-matrix | LedStrip_WS2801.py | Python | mit | 2,304 | [
"VisIt"
] | 967cdee5fbf1428ea84a707a05795de24602a651cfdf84c0fb367d3397989b3b |
"""
Objects for manipulation with VMD molecules.
"""
import logging
import os.path
from Molecule import Molecule as _Molecule
from VMD import molecule as _molecule, molrep as _molrep
__all__ = ['Frames', 'Molecule', 'FORMAT_DCD', 'FORMAT_PARM7', 'FORMAT_PDB', 'FORMAT_PSF', 'FORMATS', 'MOLECULES']
LOGGER = logging.g... | ziima/pyvmd | pyvmd/molecules.py | Python | gpl-3.0 | 10,984 | [
"VMD"
] | e238c377aea05e385358c52462c4aae9bf5552323337e564e9cc8637a97143ba |
# Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | tensorflow/probability | tensorflow_probability/python/distributions/linear_gaussian_ssm.py | Python | apache-2.0 | 92,122 | [
"Gaussian"
] | 2f780b6a5f3f7a90339cca3749b273a335e3d6ecebfde71a697ecd27d01b9e0c |
#!/usr/bin/python
from subprocess import call
ref = raw_input("FASTA reference file: ")
lib1 = raw_input("FASTQ read library 1 file 1: ")
lib2 = raw_input("FASTQ read library 2 file 1: ")
threads = raw_input("number of threads: ")
try:
open(ref+".pac")
open(ref+".ann")
open(ref+".amb")
open(ref+".bwt")
open(ref... | fjruizruano/ngs-protocols | stampy_protocol.py | Python | gpl-3.0 | 1,138 | [
"BWA"
] | ef3d8d95149983219af7300e59f4cf024dea0e7b5710e3a3c6a4b838d3f5306d |
import matplotlib.pyplot as plt
import numpy as np
import mpl_toolkits.axisartist as AA
from mpl_toolkits.axes_grid1 import host_subplot
from pprint import pprint
from matplotlib import rcParams
from matplotlib.mlab import psd
from mpl_toolkits.mplot3d import Axes3D
rcParams['xtick.direction'] = 'in'
rcParams['ytick.... | mac389/deep-brain-stimulation | src/Graphics.py | Python | apache-2.0 | 12,668 | [
"NEURON"
] | 24496952d9ce4798de3420cb5369dcf90d7891187b5ac6551cef01f8ab647fe7 |
#!/usr/bin/env python
import glob
import numpy as np
try:
from setuptools import setup
have_setuptools = True
except ImportError:
from distutils.core import setup
have_setuptools = False
try:
from Cython.Build import cythonize
have_cython = True
except ImportError:
have_cython = False
kwa... | samuelshaner/openmc | setup.py | Python | mit | 1,886 | [
"VTK"
] | 0deae2efbb7bc4213faf176f9d67e5156d37740acb4ff7195976b6cd48d37276 |
"""Unit tests for the Improve CV mail module."""
import unittest
from bob_emploi.frontend.api import user_pb2
from bob_emploi.frontend.server.mail.test import campaign_helper
class PrepareYourApplicationTest(campaign_helper.CampaignTestBase):
"""Unit tests for the _get_prepare_your_application_vars method."""
... | bayesimpact/bob-emploi | frontend/server/mail/test/prepare_your_application_test.py | Python | gpl-3.0 | 2,649 | [
"BLAST"
] | f8a4b91a57f390011aef758d298b015b7a6f214d5f46101d7d280bd8714a3fa4 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Abinit Post Process Application
author: Martin Alexandre
last edited: May 2013
"""
import sys,os,time,commands
import string, math
#GUI
import gui.graph as Graph
import gui.conv as Conv
#Utility
import utility.write as Write
import utility.analysis as Analysis
tr... | jmbeuken/abinit | scripts/post_processing/appa/gui/msd.py | Python | gpl-3.0 | 3,840 | [
"ABINIT"
] | 608e06adce32629d78bd4fa3000caec786df25622fdc454303148a092eec6764 |
#
# Copyright (c) 2015 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
# ScanCode is a trademark of nexB Inc.
#
# You may not use... | yasharmaster/scancode-toolkit | tests/licensedcode/test_legal.py | Python | apache-2.0 | 2,142 | [
"VisIt"
] | c8bfecdd13437e65ad2e9a94c04e9dc32ad2424471749713b32f28e06357e0c8 |
"""
Acceptance tests for the Import and Export pages
"""
from nose.plugins.attrib import attr
from datetime import datetime
from flaky import flaky
from abc import abstractmethod
from common.test.acceptance.tests.studio.base_studio_test import StudioLibraryTest, StudioCourseTest
from common.test.acceptance.pages.stu... | synergeticsedx/deployment-wipro | common/test/acceptance/tests/studio/test_import_export.py | Python | agpl-3.0 | 14,174 | [
"VisIt"
] | 72d869f3702d3e22bd4b2d32c44c4cbc7ea1706477c42b95768219ff01a2a1da |
# sql/elements.py
# Copyright (C) 2005-2022 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
"""Core SQL expression elements, including :class:`_expression.ClauseElement`,
:cla... | sqlalchemy/sqlalchemy | lib/sqlalchemy/sql/elements.py | Python | mit | 136,961 | [
"VisIt"
] | 1c15d08e4fbb12c30e31fee6327eb26303dc4ed279a00cdc5f9636e90b38e427 |
import plumed
ib=plumed.InputBuilder()
try:
import MDAnalysis
_HAS_MDANALYSIS=True
except:
_HAS_MDANALYSIS=False
def check(s1,s2):
if s1 != s2:
raise RuntimeError (s1,s2)
def checkfiles(f1,f2):
import filecmp
import difflib
import sys
if not filecmp.cmp(f1,f2):
s1=[]
with open(f1,"r") ... | PabloPiaggi/plumed2 | python/test/test_input_builder.py | Python | lgpl-3.0 | 5,836 | [
"MDAnalysis"
] | 8c32d0847390da4c026c644ffb26851b910c7ce82edef67e60595f028f950801 |
#! /usr/bin/env python
########################################################################
# File : dirac-stager-show-stats
# Author : Daniela Remenska
########################################################################
"""
Reports breakdown of file(s) number/size in different staging states across Storag... | DIRACGrid/DIRAC | src/DIRAC/StorageManagementSystem/scripts/dirac_stager_show_stats.py | Python | gpl-3.0 | 3,161 | [
"DIRAC"
] | 04890c6270c95d2cb9d9ca7789636ecbd2290d8866c9576b2a699da4ba19397c |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module is intended to be used to compute Pourbaix diagrams
of arbitrary compositions and formation energies. If you use
this module in your work, please consider citing the following:
General formalis... | mbkumar/pymatgen | pymatgen/analysis/pourbaix_diagram.py | Python | mit | 41,377 | [
"pymatgen"
] | e3ec5d252847d5a2372b5061da9cff326e5ad2d442647c2c153b6b9f20f31a62 |
# -*- coding: utf-8 -*-
from __future__ import division, print_function
import numpy as np
from .mh import MHMove
__all__ = ["GaussianMove"]
class GaussianMove(MHMove):
"""A Metropolis step with a Gaussian proposal function.
Args:
cov: The covariance of the proposal function. This can be a scalar... | dfm/emcee3 | emcee3/moves/gaussian.py | Python | mit | 4,020 | [
"Gaussian"
] | e3ef1c8b799d4bd82a5b5e89f5ce375b1ade3526a825b7a9e0bddd42c474923a |
# -*- coding: utf-8 -*-
"""
Polycrystalline diffraction pattern simulation
==============================================
"""
import numpy as np
from crystals.affine import change_basis_mesh
from ..voigt import pseudo_voigt
from .structure_factors import structure_factor
def powdersim(crystal, q, fwhm_g=0.03, fwhm_... | LaurentRDC/scikit-ued | skued/simulation/powdersim.py | Python | gpl-3.0 | 1,403 | [
"CRYSTAL",
"Gaussian"
] | aad3e2c0f82ac24f7d80821ccac33a89003ec8d564753f991fd0b81f25b6ed7f |
#!/usr/bin/env python
# (C) Copyright IBM Corporation 2004, 2005
# (C) Copyright Apple Inc. 2011
# All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction,... | execunix/vinos | xsrc/external/mit/MesaLib/dist/src/mapi/glapi/gen/gl_gentable.py | Python | apache-2.0 | 5,438 | [
"Brian"
] | a22b45804560502e7df353707bc414c41e1471ff83e80a450efd228d94eb073f |
#!/usr/bin/env python3
# -*-coding:Utf-8 -*
import pyfits
import numpy as np
import matplotlib.pyplot as plt
from scipy.interpolate import interp1d
from scipy.integrate import quad
"""Script used to load SMF from Davizon+17 paper with uncertainties and marke
abundance matching with it
"""
redshifts = np.array([0.2, ... | Gorbagzog/StageIAP | IaryDavidzonSMF.py | Python | gpl-3.0 | 6,050 | [
"Galaxy"
] | 6a7b373dc663e2d56c0db16cf15f7ad8a018fffa740e39d9f0cf651c06997223 |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
Topic: 解析与分析Python源码
Desc :
"""
import ast
class CodeAnalyzer(ast.NodeVisitor):
def __init__(self):
self.loaded = set()
self.stored = set()
self.deleted = set()
def visit_Name(self, node):
if isinstance(node.ctx, ast.Load):... | tongpo/Holle-World | py/python3-cookbook/cookbook/c09/p24_analyze_source.py | Python | gpl-2.0 | 2,488 | [
"VisIt"
] | 65871c9d4f6ac89e8e2299c2801bc591c4e194697d122cf8b6f374cf1a487ed2 |
# Copyright (C) 2009 by Eric Talevich (eric.talevich@gmail.com)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""I/O function wrappers for Bio.Nexus trees."""
__docformat__ = "epytext en"
from iter... | BlogomaticProject/Blogomatic | opt/blog-o-matic/usr/lib/python/Bio/Phylo/NexusIO.py | Python | gpl-2.0 | 2,695 | [
"Biopython"
] | b0fb7c17574dbd2a87b13efdf51454fdedf80e0e2285132b170b7b450f2c0011 |
# -*- coding: utf-8 -*-
from gettext import gettext as _
LEVEL1 = [
1,
_('Countries'),
['lineasDepto'],
[],
[
(_('United States'), 1, _('United States'), _('Is in the center')),
(_('Canada'), 1, _('Canada'), _('Is north')),
(_('Alaska'), 1, _('Alaska'), _('Is northwest')),
... | AlanJAS/iknowAmerica | recursos/0adelnorte/datos/levels.py | Python | gpl-3.0 | 6,367 | [
"COLUMBUS"
] | 49bd571cfd74f0083f197252b5f9b535100a76952e9261befdf62a4668f1adc0 |
# -*- coding: utf-8 -*-
"""
toolbox.py
Create Oficina Toolbar in Sugar
Copyright 2007, NATE-LSI-EPUSP
Oficina is developed in Brazil at Escola Politécnica of
Universidade de São Paulo. NATE is part of LSI (Integrable
Systems Laboratory) and stands for Learning, Work and Entertainment
Research Group. Visit our web p... | godiard/paint-activity | toolbox.py | Python | gpl-2.0 | 33,175 | [
"VisIt"
] | 21c18f93dae611dfefff09d6424a522802ea6bbbce87bef479bd191b1ea7e95f |
from __future__ import unicode_literals, division, absolute_import
from datetime import timedelta, datetime
from flexget.manager import Session
from flexget.plugins.api_tvmaze import APITVMaze, TVMazeLookup, TVMazeSeries
from tests import FlexGetBase, use_vcr
lookup_series = APITVMaze.series_lookup
class TestTVMaz... | cvium/Flexget | tests/test_tvmaze.py | Python | mit | 19,929 | [
"Firefly"
] | b260f62ca3b388a6282cfb2b58aa396cf5f50b6562a0e04a35cff1b1f8f4530c |
#!/usr/bin/python
"""
Copyright 2010 Paul Willworth <ioscode@gmail.com>
This file is part of Galaxy Harvester.
Galaxy Harvester is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of th... | clreinki/GalaxyHarvester | nameAvailable.py | Python | agpl-3.0 | 1,490 | [
"Galaxy"
] | a0cf3c51cfd436f232e97c0801127ab171419feb3dc20ba4dfecbb1b675360f5 |
#!/usr/bin/env python
# File created on 09 Feb 2010
from __future__ import division
__author__ = "Greg Caporaso"
__copyright__ = "Copyright 2011, The QIIME Project"
__credits__ = ["Greg Caporaso", "Jai Ram Rideout", "Jose Antonio Navas Molina"]
__license__ = "GPL"
__version__ = "1.8.0-dev"
__maintainer__ = "Greg Capor... | wasade/qiime | scripts/parallel_assign_taxonomy_blast.py | Python | gpl-2.0 | 5,210 | [
"BLAST"
] | ee5dec72b6ad84a39056ff5fb58fa62dec7abf36ae2cc9d32d519b534969cb1c |
# Copyright 2008-2012 Nokia Siemens Networks Oyj
#
# 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... | Senseg/robotframework | src/robot/result/testsuite.py | Python | apache-2.0 | 2,826 | [
"VisIt"
] | dfb10dd49b5f04a014fa558a2b9e58e147901d6e0e22b9bd5af84dfed013d55f |
"""
Test the Infinite GMM.
Author : Bertrand Thirion, 2010
"""
from __future__ import print_function
from __future__ import absolute_import
import numpy as np
from ..imm import IMM, MixedIMM, co_labelling
from nose.tools import assert_true
from numpy.testing import assert_array_equal
def test_colabel():
# tes... | alexis-roche/nipy | nipy/algorithms/clustering/tests/test_imm.py | Python | bsd-3-clause | 6,527 | [
"Gaussian"
] | ac02c4e9c1b2019d2c2abafcac2d19100ca677395c9839786e995a74f2b695ef |
#==========================================================================
#
# Copyright NumFOCUS
#
# 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/l... | richardbeare/ITK | Wrapping/Generators/Python/itkExtras.py | Python | apache-2.0 | 50,065 | [
"VTK"
] | 6a844b00e00319156986da368cbaaa7dde7fc38924e83eedda96e0113d09e661 |
#!/usr/bin/env python
import os
import opendrift
if not os.path.exists('openoil.nc'):
raise ValueError('Please run example.py first to generate a '
'netCDF file to be imported.')
o = opendrift.open('openoil.nc')
print(o)
o.plot()
o.plot_property('mass_oil')
| knutfrode/opendrift | examples/example_import.py | Python | gpl-2.0 | 289 | [
"NetCDF"
] | bafc2d93668ca316c0446b429028dc7c72334c4353629980ca612f449adb6960 |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Methods for selecting the bin width of histograms
Ported from the astroML project: http://astroML.org/
"""
import numpy as np
from . import bayesian_blocks
__all__ = ['histogram', 'scott_bin_width', 'freedman_bin_width',
'knuth_bin_wid... | funbaker/astropy | astropy/stats/histogram.py | Python | bsd-3-clause | 10,043 | [
"Gaussian"
] | 7e5b44e45cab1846754f344d45f9a03e2a140c511445b28b6571316019f948b6 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Unsupervised Kernel Regression (UKR) for Python.
Implemented as a scikit-learn module.
Author: Christoph Hermes
Created on Januar 16, 2015 18:48:22
The MIT License (MIT)
Copyright (c) 2015 Christoph Hermes
Permission is hereby granted, free of charge, to any pers... | chermes/python-ukr | src_naive/ukr.py | Python | mit | 11,957 | [
"Gaussian"
] | 7a60f86a684e6d7c2c4f1dc31600b4869767fd5463eca03f02e6c954ac7c370c |
#
# 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... | dhalperi/beam | sdks/python/apache_beam/runners/dataflow/dataflow_runner.py | Python | apache-2.0 | 34,929 | [
"VisIt"
] | 55443a6fc37c5ec03cf8477bd519f65c6023b5a7d970bb301fa04657b4689bb1 |
from types import SimpleNamespace
import numpy as np
import copy
import pytest
import numpy.testing as npt
from matplotlib.axes import Subplot
import matplotlib.pyplot as plt
from pulse2percept.implants import ArgusI, ArgusII
from pulse2percept.percepts import Percept
from pulse2percept.models import (Thompson2003Sp... | mbeyeler/pulse2percept | pulse2percept/models/tests/test_thompson2003.py | Python | bsd-3-clause | 7,099 | [
"Gaussian"
] | 813b6854795b38f20ecbacbef174e1953d097cd3a93696649664e528865e732c |
# ----------------------------------------------------------------------------
# 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.
# --------------------------------------------... | xguse/scikit-bio | skbio/diversity/alpha/_base.py | Python | bsd-3-clause | 25,011 | [
"scikit-bio"
] | 2b33c45b447759125ee51826fe412faa746db48398c8e532e8598ec5d768c21b |
# -*- coding: utf-8 -*-
"""
Wind vector calculations in finite differences
"""
import numpy as np
from . import utils
grids = ('cartesian','lonlat') #,'gaussian')
# TODO: laplacian, see "High Performance Python", p. 118
#
class Wind3D(object):
def __init__(self, u, v, w, x=1., y=1., z=1., lats=45., hgridtype=gr... | dennissergeev/pyveccalc | pyveccalc/standard.py | Python | mit | 12,996 | [
"Gaussian"
] | 528932a42d97c63ebec29a968215277d64dcb1a525b6693a6beb36c7a12a8828 |
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors:
#
# MDTraj is free software: y... | ctk3b/mdtraj | mdtraj/geometry/tests/test_distance.py | Python | lgpl-2.1 | 6,414 | [
"MDTraj"
] | 25fdee5f983f34d719f8c528ccd87415a33e8a13e2f62f40cefaccc0f852d23a |
# Copyright (C) 2010-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 v... | mkuron/espresso | samples/visualization_bonded.py | Python | gpl-3.0 | 1,999 | [
"ESPResSo"
] | 2312c7bcd2e61cacd2d01525bbb69850ddc3a1270055703c6af6ccf276afe320 |
#
# 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/tabulated.py | Python | gpl-3.0 | 3,708 | [
"ESPResSo"
] | 76893e2b92ec7274e49c00969417c090557e3e31071301c2aea5d8b44803e402 |
"""The Mayavi engine. This class manages the Mayavi objects at the
highest level.
"""
# Author: Prabhu Ramachandran <prabhu_r@users.sf.net>
# Copyright (c) 2005-2015, Enthought, Inc.
# License: BSD Style.
# Standard library imports.
# VTK is used to just shut off the warnings temporarily.
try:
import vtk
except ... | dmsurti/mayavi | mayavi/core/engine.py | Python | bsd-3-clause | 22,628 | [
"Mayavi",
"VTK"
] | 797667e47f04063ac4b0181f7c7725f3c67a50d4abdec2f7844a2fd8af0db0c2 |
#!python
# -*- Python -*-
# Copyright 2014-2015 Brian Olson
#
# 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 applicabl... | hcrlab/access_teleop | rosbridge_suite/rosbridge_library/src/rosbridge_library/util/cbor.py | Python | mit | 16,169 | [
"Brian"
] | 78595d2ec21684826711c27e9715176864ef11a17b367b98fdb4849c322bda86 |
from __future__ import print_function
from alge import Case, of, datatype
from timeit import repeat
Op = datatype("Op", ['a', 'b'])
class Do(Case):
@of("Op(a, b)")
def op(self, a, b):
return a + b
class Visitor(object):
def visit(self, val):
fn = getattr(self, "visit_%s" % type(val).__name__)
return fn(val... | ContinuumIO/pyalge | speed.py | Python | bsd-2-clause | 580 | [
"VisIt"
] | 89a9a156a1c814d708c6a0a1a37b57b77a4da2eba2119052b46f86223c072ed6 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
"""
Created on Apr 25, 2012
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "S... | aykol/pymatgen | pymatgen/util/tests/test_coord_utils.py | Python | mit | 11,338 | [
"pymatgen"
] | da87fa0c970b2fcad241b90859883be8af82a9e502f3daa771ea4352ff69bbcd |
"""Standard test images.
For more images, see
- http://sipi.usc.edu/database/database.php
"""
import os as _os
from .. import data_dir
from ..io import imread, use_plugin
from ._binary_blobs import binary_blobs
__all__ = ['load',
'camera',
'lena',
'text',
'checkerboard... | michaelpacer/scikit-image | skimage/data/__init__.py | Python | bsd-3-clause | 6,482 | [
"ESPResSo"
] | a5e8e342eeece83e4554e0141f1f04eb159d177b72bf8fd9fe006668b1545a5d |
'''
James D. Zoll
4/15/2013
Purpose: Defines template tags for the Leapday Recipedia application.
License: This is a public work.
'''
from django import template
register = template.Library()
@register.filter()
def css_name(value):
'''
Returns the lower-case hyphen-replaced display name,
which used as... | Zerack/zoll.me | leapday/templatetags/leapday_extras.py | Python | mit | 1,051 | [
"CRYSTAL"
] | a4ddab892c84b7887189d8ff38299cbaf7aacf5a69f1c75698403c6fcf524081 |
# Original Author: Travis Oliphant 2002
# Bug-fixes in 2006 by Tim Leslie
from __future__ import division, print_function, absolute_import
import numpy
from numpy import asarray, tan, exp, ones, squeeze, sign, \
all, log, sqrt, pi, shape, array, minimum, where, random
from .optimize import Result, _check_unknown_... | juliantaylor/scipy | scipy/optimize/anneal.py | Python | bsd-3-clause | 23,213 | [
"Gaussian"
] | 663059e647966acf2e5ab541d9324fa1f5ae01cca3018c6adc4c25bf29a2d266 |
"""
Just-in-time compilation support.
"""
import abc
import copy
import os
import re
import ast
import logging
import inspect
import hashlib
import json
from collections import namedtuple
import tempfile
import ctree
from ctree.nodes import Project
from ctree.analyses import VerifyOnlyCtreeNodes
from ctree.frontend ... | ucb-sejits/ctree | ctree/jit.py | Python | bsd-2-clause | 15,340 | [
"VisIt"
] | 8ebe3caea1515a7a2ba1895b88552a6824a68b3965662d2825466e7054a508cd |
import pyfits as fits
import numpy as np
from scipy.optimize import curve_fit, leastsq
import sys
import getopt
import os
import time
import shutil
'''
Last changed:
July 29. 2014 - Morten Stostad - Improved readability
Gemini NIFS data reduction script - PYRAF version
Reduction for: GENERAL BASELINE CALIBRATIONS
... | followthesheep/nifs_reduction_example | NIFS_Reduction_fin.py | Python | mit | 65,850 | [
"Gaussian"
] | 656a7348e729adc992f38daf6252f75456bc10a507719bd1651a73ec9604d4f8 |
# -*- coding: utf-8 -*-
"""
Acceptance tests for Video.
"""
import os
from ddt import ddt, unpack, data
from mock import patch
from nose.plugins.attrib import attr
from unittest import skipIf, skip
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from common... | itsjeyd/edx-platform | common/test/acceptance/tests/video/test_video_module.py | Python | agpl-3.0 | 51,370 | [
"VisIt"
] | 88130f0ad85ea823e2b9bc8be0562b76c11ad92c3f0476c4bdfdfe77b7c2927e |
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | marmyshev/item_title | openlp/plugins/songs/lib/mediashoutimport.py | Python | gpl-2.0 | 5,360 | [
"Brian"
] | 03e691b762db3714fbf8017b2a5923143f87c7df127f81ba612f16f396d84b83 |
#WCS response decoder.
#Decodes response from a WCS (either a Coverages XML document or a Multipart MIME) and extracts the urls of the coverage data.
#Copyright (c) 2007 STFC <http://www.stfc.ac.uk>
#Author: Dominic Lowe, STFC
#contact email: d.lowe@rl.ac.uk
#
# Multipart MIME decoding based on http://aspn.activestate.... | b-cube/OwsCapable | owscapable/coverage/wcsdecoder.py | Python | bsd-3-clause | 3,913 | [
"NetCDF"
] | 2a4d48169e1a927df482a9fe2f225e45b5cf87235d30133a5ec9bac79cd615b6 |
##############################################################################
#
# Copyright (c) 2009-2013 by University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Open Software License version 3.0
# http://www.opensource.org/licenses/osl-3.0.php
#
#... | bencaradocdavies/vgml | src/main/resources/org/auscope/portal/server/scriptbuilder/templates/escript-gravity.py | Python | gpl-3.0 | 2,927 | [
"NetCDF",
"VisIt"
] | 25b71368cef769a0c5dbdb7ae163dca20e7e4de8ad592c0a6fbbdc6ec0d60780 |
#!/usr/bin/env python
# provide a list of read sets and reference genomes
# generate a bias matrix
# python calculate_bias_matrix target_file < config
# config is space separated lines of the form
# sra,fasta
import itertools
import sys
import bias
BAM_TO_SAM="samtools view -h %s"
BEDTOOLS="bedtools"
BOWTIE_PATH="... | supernifty/reference-bias | bin/calculate_bias_matrix.py | Python | apache-2.0 | 1,410 | [
"BWA"
] | cefc832249a29118a8ee35dd6d467d383d4caf67c8d8d21c52fcb2d2400595f7 |
# Copyright 2020 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | deepmind/annealed_flow_transport | annealed_flow_transport/densities.py | Python | apache-2.0 | 16,333 | [
"Gaussian"
] | cf0ea6415b5231b89c65bf1a0dbc88f261c0c14cf17a6944bcae0f2ec7906e42 |
# Copyright 2006 James Tauber and contributors
#
# 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 agre... | minghuascode/pyj | pyjs/src/pyjs/translator_proto-KEES.py | Python | apache-2.0 | 193,343 | [
"VisIt"
] | 31ecdee43250de2b39027de48a32a54e0acf4b020773ff302fe09a84d9f5e6eb |
# -*- coding: utf-8 -*-
import execjs
from .xn_data import XNCoords
from .xn_parser import XNParserBase, safe_int, get_attribute
from . import xn_logger
logger = xn_logger.get(__name__, debug=False)
class GalaxyParser(XNParserBase):
def __init__(self):
super(GalaxyParser, self).__init__()
self._... | minlexx/xnovacmd | ui/xnova/xn_parser_galaxy.py | Python | gpl-2.0 | 5,683 | [
"CRYSTAL",
"Galaxy"
] | 916db7f3fe1ea4a9bbe7e04a9afc13430943146c92a7d0b75e3ee44ccde6301e |
"""SCons.Util
Various utility functions go here.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
#
# 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 So... | bleepbloop/Pivy | scons/scons-local-1.2.0.d20090919/SCons/Util.py | Python | isc | 53,960 | [
"VisIt"
] | 8a53385b24539aaf0c14b70b30057b400f5bd9ecd1f7159af912d04ad5e9c915 |
from __future__ import division
import numpy as np
from ase.constraints import FixConstraint
from ase.utils.geometry import find_mic
from ase.constraints import Hookean
class SlowGrowthBondLength(FixConstraint):
"""Constraint object for fixing a bond length."""
def __init__(self, a1, a2, bond_speed=0., direct... | marcocaccin/MLTI | step1_TI/ase_addon.py | Python | gpl-3.0 | 6,689 | [
"ASE"
] | bb886490bb9dbf1a4288bcf31c88edc160b328603edb752352e62585a890038d |
import numpy as np
from gpaw import debug, dry_run
from gpaw.mpi import world, serial_comm, _Communicator, \
SerialCommunicator, DryRunCommunicator
even_comm = world.new_communicator(np.arange(0, world.size, 2))
if world.size > 1:
odd_comm = world.new_communicator(np.arange(1, world.size, 2))... | robwarm/gpaw-symm | gpaw/test/mpicomm.py | Python | gpl-3.0 | 1,609 | [
"GPAW"
] | 1ae308dc464591f421eec74cca24a574b58f2c61e5732f7fa8e6ae9ae8f7dc0c |
"""Setup script for Bokeh."""
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2014, Continuum Analytics, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENCE.txt, distributed with this software.
#---------... | ChinaQuants/bokeh | setup.py | Python | bsd-3-clause | 19,865 | [
"GULP"
] | 4d71566742bad4e900ff91e4ead261ea48cffab83e3a2e7a11139f64681af237 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
def activation_statistics(init_func=lambda fan_in, fan_out: np.random.randn(fan_in, fan_out) * 0.001, nonlinearity='tanh'):
"""TODO: Docstring for activation_statistics.
Demonstrate activation statistics with diff... | Alexoner/skynet | skynet/neural_network/activation_statistics.py | Python | mit | 1,860 | [
"Gaussian"
] | e5754793ee57247ba2fb8259e0697cf488f40071d539bf692dedc08d5af71a69 |
from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import uuid
import logging
from typing import Mapping
import networkx as nx
from copy import deepcopy, copy
import pybel
import pybel.constants as pc
from pybel.dsl import *
# This is redundant but needed for docume... | johnbachman/indra | indra/assemblers/pybel/assembler.py | Python | bsd-2-clause | 25,382 | [
"Pybel"
] | 776ebe1ab20b43b3d48e31ddf75df7b844a0429ce2a0925eebe0c90dec7f0d4e |
#!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | gkc1000/pyscf | pyscf/symm/param.py | Python | apache-2.0 | 8,377 | [
"PySCF"
] | ba6928e70e4275fb37a815fc58d2d3707460798a84935d9cfce26d5c6280875b |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 Loreto Parisi <loretoparisi@gmail.com>
# Copyright (C) 2016 Silvio Olivastri <silvio.olivastri@gmail.com>
# Copyright (C) 2016 Radim Rehurek <radim@rare-technologies.com>
"""
USAGE: $ python -m gensim.scripts.word2vec2tensor --input <Word2Vec model f... | akutuzov/gensim | gensim/scripts/word2vec2tensor.py | Python | lgpl-2.1 | 3,507 | [
"VisIt"
] | 4aecc95aec4771c1b9020a340ef957e3012db7b0958d38405d7f08676ef80bea |
from ase.io.png import PNG
from ase.data.colors import jmol_colors
from ase.data import covalent_radii
from ase.utils import rotate
from math import sqrt
class MyPNG(PNG):
def __init__(self, atoms,
rotation='',
show_unit_cell=False,
radii=None,
b... | mieand/kmos | kmos/run/png.py | Python | gpl-3.0 | 5,702 | [
"ASE"
] | 9dd63edf92d12ee45bed49c54b93e1cb8ef55b6b84425c83892ff176a74bde2f |
#!/usr/bin/env python
"""
the Easy Vision Environment
EVE provides easy-to-use functionality for performing common image
processing and computer vision tasks. The intention is for them to be
used during interactive sessions, from the Python interpreter's command
prompt or from an enhanced interpreter such as ipython ... | betoesquivel/ComputerVisionLab1 | eve.py | Python | mit | 143,522 | [
"Gaussian"
] | 3e57f368656bc7adbc75f135c1161448c1b3a276b28e3c4772e3c8f53fbbb002 |
import psi4
import forte
def psi4_scf(geom, basis, reference, functional='hf', options={}) -> (float, psi4.core.Wavefunction):
"""Run a psi4 scf computation and return the energy and the Wavefunction object
Parameters
----------
geom : str
The molecular geometry (in xyz or zmat)
basis : s... | evangelistalab/forte | forte/utils/helpers.py | Python | lgpl-3.0 | 10,615 | [
"Psi4"
] | 663c1080ba6ce48c54796a0ae679fe58c96348ae23e6ebb6226db4452b8721cb |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# MDAnalysis --- https://www.mdanalysis.org
# Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#... | MDAnalysis/mdanalysis | testsuite/MDAnalysisTests/lib/test_util.py | Python | gpl-2.0 | 76,830 | [
"LAMMPS",
"MDAnalysis"
] | dc99860b9a5f3d3f5bcee39ee7d6be638d78bfa6438d2e0250e5f4f17a768f91 |
import numpy as np, SimPEG as simpeg, vtk
import vtk.util.numpy_support as npsup
# Simple write model functions.
def writeVTPFile(fileName,vtkPolyObject):
'''Function to write vtk polydata file (vtp).'''
polyWriter = vtk.vtkXMLPolyDataWriter()
if float(vtk.VTK_VERSION.split('.')[0]) >=6:
polyWrite... | grosenkj/telluricpy | telluricpy/vtkTools/io.py | Python | mit | 2,581 | [
"VTK"
] | 1a4330846330786eea298aee97f95ba29516c4b793f8387f8a6bc4c0e3db8a67 |
import pytest
from FeedUnit42 import Client, get_indicators_command, fetch_indicators, sort_report_objects_by_type, parse_reports, \
match_relationships, parse_related_indicators, create_mitre_indicator
from test_data.feed_data import INDICATORS_DATA, ATTACK_PATTERN_DATA, MALWARE_DATA, RELATIONSHIP_DATA, REPORTS_DA... | VirusTotal/content | Packs/FeedUnit42/Integrations/FeedUnit42/FeedUnit42_test.py | Python | mit | 9,974 | [
"Amber"
] | ac02382ce6bba9e289723d9813a77b5228f5805999e2e17b0a3bfdeea550a101 |
#!/usr/bin/env python
# Title: Twitter Stream to Kafka
# Create-Date: 23. Oktober 2016
# Version: 1.0
# Author: Cyrill Durrer / Christoph Haene
# Contact: http://cyrilldurrer.com
# christoph.haene@gmail.com
#
# Task: Receive Twitter Stream for Bitcoin and send to Kafka
#
# Output: ... | chaene82/bigcoin | twitter2kafka/twitter2kafka.py | Python | gpl-3.0 | 4,091 | [
"VisIt"
] | 019f3dda46ef08f6fc07063c21b345fc76894c74f11e629f64a729021f3ffe25 |
"""
@name: Modules/Housing/Schedules/auto_update.py
@author: D. Brian Kimmel
@contact: D.BrianKimmel@gmail.com
@copyright: (c) 2013-2019 by D. Brian Kimmel
@note: Created on Dec 31, 2013
@license: MIT License
@summary: Handle the automatic updating of PyHouse
This module automatically updates PyHous... | DBrianKimmel/PyHouse | Project/src/Modules/House/Schedule/auto_update.py | Python | mit | 7,001 | [
"Brian"
] | 80476d5c670d904a4a15ca7364e6650d34a37b9117a09341df3b3d3645cef383 |
# This script chooses the last two nucleotides of allele-specific primer
import argparse,re
import glob
from Bio.Seq import Seq
import os,sys
import primer3
from operator import itemgetter
from Bio.SeqUtils import MeltingTemp as mt
import subprocess as sp
import xlsxwriter as xls
import myvariant
thisDir=os.path.dirn... | aakechin/endChooser | endChooser.py | Python | gpl-3.0 | 21,528 | [
"BLAST"
] | 5c723f576882b55be916088dc7b638a491a5ccb603c3e116197a0c8930d0f40e |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
# MDAnalysis --- http://www.mdanalysis.org
# Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
# Released under th... | alejob/mdanalysis | package/MDAnalysis/analysis/encore/utils.py | Python | gpl-2.0 | 12,064 | [
"MDAnalysis"
] | 2b953548c8890f62f24cc51310da477145a9b6ca23da169af1195ea985c2a499 |
# coding=utf-8
# имена девушек генерируются из списков имен (тип девушки_first) и фамилий (тип девушки_last). Если списка фамилий
# нет - генерируется только из списка имен.
girls_names = {
'peasant_first': [
u'Жанна', u'Герда', u'Баббета', u'Cюзи', u'Альба', u'Амели', u'Аннета', u'Жоржетта', u'Бетти',
... | OldHuntsman/DefilerWings | game/pythoncode/girls_data.py | Python | bsd-3-clause | 58,860 | [
"Octopus"
] | 4d1b4a7a89e111ace955eee4e91c25d39ef286d3b82b6ae0fc7b16469034947a |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2021 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | lothian/psi4 | tests/runtest.py | Python | lgpl-3.0 | 5,306 | [
"Psi4"
] | a278547ea2831dc440b9a60947b332aab17b7953774c7c6204265e5784f17a81 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.