text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
#!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''
Use callback hooks to control CASSCF solver.
'''
import numpy
from pyscf import gto, scf, mcscf
b = 1.2
mol = gto.Mole()
mol.build(
verbose = 4,
atom = [['N', (0.,0.,0.)], ['N', (0.,0.,b)]],
basis = 'cc-pvdz',
)
mf = scf.RHF(mol)
m... | gkc1000/pyscf | examples/mcscf/70-casscf_optimize_scheduler.py | Python | apache-2.0 | 1,311 | [
"PySCF"
] | f8d369e84432f44ed62d7527a9113ef68d89c9eedf24e9c8bc04bc20c969ec66 |
'''
Fits slit image to a direct image to find x and y positions.
Currently the script uses a slit image. In the future however
we probably want to use the spectrum itself because there is
no guarantee that a slit confirmation image has always been
taken.
:todo: try to do the minimalization with scipy.optmize or
some ... | sniemi/SamPy | resolve/misc/findslits.py | Python | bsd-2-clause | 25,091 | [
"Gaussian"
] | bfa8f0379ca61f9c0d80c99bf8b3f80f2f56f455326d6fa9ce9f139b87f8e011 |
########################################################################
# This example demonstrates synaptic triggering of a wave of calcium
# release (CICR) from the endoplasmic reticulum. The wave is confined to
# a subset of a dendrite where there is elevated IP3 present.
#
# Copyright (C) Upinder S. Bhalla NCBS ... | BhallaLab/moose-examples | tutorials/Rdesigneur/ex8.1_synTrigCICR.py | Python | gpl-2.0 | 1,958 | [
"MOOSE"
] | 2f69a8ba89eae098c4494c0854a8f59000312d17d2dccf7757f61c07bbfe8ab8 |
#!/usr/bin/env python
from __future__ import (absolute_import, division,
print_function, unicode_literals)
import sys
import os
import importlib
from natsort import natsorted
from amptk import amptklib
from pkg_resources import get_distribution
__version__ = get_distribution('amptk').version
d... | nextgenusfs/amptk | amptk/amptk.py | Python | bsd-2-clause | 46,599 | [
"BLAST"
] | aba4c6fd1ff53005bb91abd8a74f3fc88cf1f21aaa881d7e0af6d85109e7cd09 |
########################################################################
# $HeadURL $
# File: PutAndRegister.py
# Author: Krzysztof.Ciba@NOSPAMgmail.com
# Date: 2013/03/25 07:43:24
########################################################################
""" :mod: PutAndRegister
====================
.. module:... | rajanandakumar/DIRAC | DataManagementSystem/Agent/RequestOperations/PutAndRegister.py | Python | gpl-3.0 | 6,666 | [
"DIRAC"
] | 821a0668b83a895344d6fdaf5ccb623230a200fec5cdc21cc2cb27b6d7134c4b |
import os
import shutil
import unittest
from glob import glob
import numpy as np
import tensorflow as tf
from monty.tempfile import ScratchDir
from pymatgen.core import Lattice, Structure
from pymatgen.util.testing import PymatgenTest
from tensorflow.keras.utils import Sequence
from megnet.callbacks import ManualStop... | materialsvirtuallab/megnet | megnet/tests/test_models.py | Python | bsd-3-clause | 8,910 | [
"CRYSTAL",
"pymatgen"
] | fba0fb3bb444603a16d7e555509c37387ace4aa9547adbf178018a652476ec1b |
from MY_jinja2.visitor import NodeVisitor
import StringIO
from MY_jinja2 import nodes
class CodeGenerator(NodeVisitor):
def __init__(self):
self.is_first = True
self.indent_level = 0
self.stream = StringIO.StringIO()
def get_code(self):
return self.stream.getvalue()
def indent(self):
self.inde... | nnabeyang/MY_jinja2 | MY_jinja2/compiler.py | Python | bsd-3-clause | 4,768 | [
"VisIt"
] | 4aea9996638641a898c182e6ea3d3493e34c748bdb55ebeca1081194cc26d818 |
# Copyright (C) 2006, Thomas Hamelryck (thamelry@binf.ku.dk)
# 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.
import os
from string import upper
from Bio.PDB import *
def run_psea(fname):
"""
... | dbmi-pitt/DIKB-Micropublication | scripts/mp-scripts/Bio/PDB/PSEA.py | Python | apache-2.0 | 2,073 | [
"Biopython"
] | 7a59f8f611a3129aed8d3dd2287595196198ae09ec384686e5858b5c7a7656da |
#!/usr/local/sci/bin/python
# PYTHON3.6.1
#
# Author: Kate Willett
# Created: 18 Mar 2020
# Last update: 18 Mar 2020
# Location: /data/users/hadkw/WORKING_HADISDH/UPDATE2019/PROGS/PYTHON/
# GitHub: https://github.com/Kate-Willett/HadISDH_Build
# -----------------------
# CODE PURPOSE AND OUTPUT
# ---------------... | Kate-Willett/Climate_Explorer | PYTHON/MergeAggRegridERA5.py | Python | cc0-1.0 | 49,513 | [
"NetCDF"
] | b1362609929457f4d041bc74dcb728ba14621723544902c2923a0773a9db1bff |
import rdkit.Chem as Chem
import rdkit.Chem.AllChem as AllChem
import rdkit.Chem.rdMolDescriptors as rdMolDescriptors
from rdkit.Chem import rdDistGeom
from ppqm import chembridge
def generate_conformers_legacy(molobj, max_conf=20, min_conf=10, random_seed=1, return_copy=True):
if return_copy:
molobj = ... | ppqm/ppqm | ppqm/tasks.py | Python | mit | 2,001 | [
"RDKit"
] | 2fe7ceb47daaa7f7077df9050d6db9cbeaa861c08f2156183be9ae0944b17ba4 |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Rackspace
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2013 IBM Corp.
# 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. Y... | cloudbau/nova | nova/tests/network/test_manager.py | Python | apache-2.0 | 116,844 | [
"FEFF"
] | 28e5d63160bd7202f0e068784859c5c04cf7c76b77c0aec470080f6883c48cb1 |
from django.core.management.base import BaseCommand, CommandError
from django.core.management import call_command
from django.conf import settings
from django.db import connection
from protein.models import *
from common.tools import fetch_from_web_api
from Bio import pairwise2
from structure.functions import BlastSea... | cmunk/protwis | tools/management/commands/find_all_isoforms_gtex.py | Python | apache-2.0 | 24,816 | [
"BLAST"
] | b6a3b49df0e3f199f722200cf9230e5acf303e8bff6f7ae9e81426c3573f6e7a |
from rllab.envs.box2d.cartpole_env import CartpoleEnv
from rllab.policies.gaussian_mlp_policy import GaussianMLPPolicy
from rllab.envs.normalized_env import normalize
import numpy as np
import theano
import theano.tensor as TT
from lasagne.updates import adam
# normalize() makes sure that the actions for the environm... | brain-research/mirage-rl-qprop | examples/vpg_1.py | Python | mit | 5,002 | [
"Gaussian"
] | b17af2bbb5577a6332b02bbe9e90897497657b06a51864b9624a8facd392d858 |
#!/usr/bin/env python
# this script checks if the piRNA within the CI of the QTL for a given trait blasted to the TE elements/family for that trait
#USE: pi_blast_check.py
import re
import pickle
from collections import defaultdict
from Bio import SeqIO
from subprocess import Popen, PIPE
def search_blasted(mismatch)... | klaricch/Transposons2 | scripts/pi_blast_check.py | Python | mit | 3,177 | [
"BLAST"
] | 54fe0ee6d904ae3ae60ed228249d65e022b15c24a1d42667ac8d9cc43ccba4fb |
#!/usr/bin/env python
# coding: utf-8
# Solvers: The Inverse Problem
# ============================
#
#
# Setup
# -----------------------------
# Let's first make sure we have the latest version of PHOEBE 2.3 installed (uncomment this line if running in an online notebook session such as colab).
# In[1]:
#!pip i... | phoebe-project/phoebe2-docs | development/tutorials/solver.py | Python | gpl-3.0 | 10,385 | [
"Gaussian"
] | 00b147517bc4a9af8eedf7a411ebabaca7d4689c1c4301933d7ff96024c32230 |
import logging
import re
from urllib.parse import parse_qsl, urlparse
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import useragents
from streamlink.plugin.api.utils import itertags
from streamlink.stream import HLSStream
log = logging.getLogger(__name__)
@pluginmatcher(re.compile(... | melmorabity/streamlink | src/streamlink/plugins/senategov.py | Python | bsd-2-clause | 4,416 | [
"EPW"
] | d29ca3f5be37a7f2bf0cab038c8f6799bfde421ae73f8cdb347ea6d9c0b13040 |
import logging
import os
from concurrent.futures import (
as_completed,
wait,
ThreadPoolExecutor,
ProcessPoolExecutor
)
from .assemby_realignment import AssemblyRealigner
from .bam_io import (
BamAlignmentReader as Reader,
BamAlignmentWriter as Writer,
merge_bam,
sort_bam,
split_lo... | bardin-lab/readtagger | readtagger/findcluster.py | Python | mit | 19,829 | [
"BWA"
] | 2db9ee28cf0a7475ab835cbdf941f794926979b31002a64fe3cc4f5c62eb2ed7 |
#
# 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... | retrography/scancode-toolkit | tests/licensedcode/test_index.py | Python | apache-2.0 | 14,519 | [
"VisIt"
] | daf5361b58b4adffabf85fbff9d0ffa216bde9c8d46de1de77eefe44392972c9 |
#!/usr/bin/env python
# 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
#
# U... | gkc1000/pyscf | pyscf/cc/uccsd.py | Python | apache-2.0 | 52,265 | [
"PySCF"
] | 712ceee893659976892f6ebf8a747692853469fa4f2183289102bb845a8e7385 |
from __future__ import absolute_import
input_name = '../examples/multi_physics/thermo_elasticity.py'
output_name = 'test_thermo_elasticity.vtk'
from tests_basic import TestInput
class Test(TestInput):
pass
| vlukes/sfepy | tests/test_input_thermo_elasticity.py | Python | bsd-3-clause | 211 | [
"VTK"
] | f4ad064ab0209ae5d8f080c41609ea1a6ec28d404f537bf19d205fecf2960862 |
# 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_notification_subscription.py | Python | apache-2.0 | 10,101 | [
"VisIt"
] | 018cf74c590971e0953129cb97e4f7fc2d10ed8df79b72c172ceb586ab567ed9 |
import numpy as np
from .. import Spectrum
def test_eqw():
dx = 0.1
x = np.arange(-6,6,dx)
y = 1-np.exp(-x**2 / 2.)
sp = Spectrum(xarr=x, data=y)
sp.baseline(exclude=[-5,5], order=0, subtract=False)
sp.specfit(fittype='gaussian', guesses=(-1, 0, 0.5))
np.testing.assert_almost_equal(sp.spe... | bsipocz/pyspeckit | pyspeckit/spectrum/tests/test_eqw.py | Python | mit | 454 | [
"Gaussian"
] | ab2363e32798219da7d12544f6abd34c9f62bfcf80e6577208b0a1d7c682a4e8 |
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | ywcui1990/nupic.research | htmresearch/support/neural_correlations_utils.py | Python | agpl-3.0 | 22,473 | [
"NEURON"
] | 801e2486360426927d631449d7a36413ae373cd9af94a5a4c26c2c8de49ff4e4 |
# -*- coding: utf-8 -*-
#!/usr/bin/python
"""Test of line navigation output of Firefox.
"""
from macaroon.playback import *
import utils
sequence = MacroSequence()
########################################################################
# We wait for the focus to be on a blank Firefox window.
#
sequence.append(Wai... | h4ck3rm1k3/orca-sonar | test/keystrokes/firefox/line_nav_bug_577239.py | Python | lgpl-2.1 | 9,223 | [
"ORCA"
] | d5b5dc3d701ceeea0afb378125ad53e8f55311209c78f1b733d7325ec54f29a6 |
#!/usr/bin/python
#########################################################################
# GridMAT-MD-Auto version 1.0 #
# #
# For automated python program for running GridMAT-MD on #
# trajectory files ... | abhi34101/GridMAT-MD-Auto | GridMAT-MD-Auto.py | Python | gpl-3.0 | 11,259 | [
"Gromacs"
] | 183deab7ec4274e1f8b85b5e3982e0ce62141ab6c98775c74ce29213a6200b68 |
# Copyright (C) 2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later versio... | mkuron/espresso | testsuite/scripts/samples/test_grand_canonical.py | Python | gpl-3.0 | 1,511 | [
"ESPResSo"
] | cb33852810bf27b6a5772a9a7b2aaa3d9cf9712255450af70344ab078a8bd919 |
#
# QAPI visitor generator
#
# Copyright IBM, Corp. 2011
#
# Authors:
# Anthony Liguori <aliguori@us.ibm.com>
# Michael Roth <mdroth@linux.vnet.ibm.com>
#
# This work is licensed under the terms of the GNU GPLv2.
# See the COPYING.LIB file in the top-level directory.
from ordereddict import OrderedDict
from qapi ... | ecular/qemu_seamless | scripts/qapi-visit.py | Python | gpl-2.0 | 8,637 | [
"VisIt"
] | 64e56a85bf839390b2d946b505df15a262162cdcd500d2001426a47129689e58 |
# coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | google-research/google-research | mol_dqn/chemgraph/optimize_qed.py | Python | apache-2.0 | 3,562 | [
"RDKit"
] | da54bf5220d7b95b6afefd4c7d0978a63007623794d0e22076751613e958edb6 |
#!/usr/bin/python
import os, sys
import rpy
def usage():
print >> sys.stderr, "usage: " + sys.argv[0] + " universe-topGO.table testset.ids"
sys.exit(1)
def plausi():
if len(sys.argv) != 3: usage()
inUniverse, inTestset = sys.argv[1:3]
return inUniverse, inTestset
def init_R():
R = rpy.r
try:
R.... | lotharwissler/bioinformatics | python/geneontology/go-enrichment.py | Python | mit | 2,919 | [
"Bioconductor"
] | d8e196c9afb75a77d9358fb3a9dd55f24d480c73ca4be944fc2116d2fd181dcf |
from __future__ import division, absolute_import, print_function
import warnings
import sys
import collections
import operator
import numpy as np
import numpy.core.numeric as _nx
from numpy.core import linspace, atleast_1d, atleast_2d
from numpy.core.numeric import (
ones, zeros, arange, concatenate, array, asarr... | SiccarPoint/numpy | numpy/lib/function_base.py | Python | bsd-3-clause | 154,129 | [
"Gaussian"
] | 44a77cd0a2b495dbd4d225d50b034fc07c77e4982690098b8ae1e8a22ba99e4f |
# -*- coding: utf-8 -*-
"""
E2E tests for the LMS.
"""
from textwrap import dedent
from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc
from common.test.acceptance.pages.common.auto_auth import AutoAuthPage
from common.test.acceptance.pages.lms.annotation_component import AnnotationComp... | jolyonb/edx-platform | common/test/acceptance/tests/test_annotatable.py | Python | agpl-3.0 | 5,611 | [
"VisIt"
] | 531993c9a55b708fbed1de5c4ef56cdffdcc4a541d2326ba179d12c5c8fd7725 |
# This file is part of PyEMMA.
#
# Copyright (c) 2015, 2014 Computational Molecular Biology Group, Freie Universitaet Berlin (GER)
#
# PyEMMA 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 versi... | marscher/PyEMMA | pyemma/coordinates/tests/test_featurizer.py | Python | lgpl-3.0 | 53,439 | [
"MDTraj"
] | 60dfe4a1f95e6777912cdc4e04d46d8e97b1cf149a899dce80ac076aaa568c63 |
"""
This module implements the Hit serialisation class.
"""
from typing import Dict, List
from ...exceptions import InvalidHit
from sqlalchemy import Column, Integer, Float, ForeignKey, Index
from sqlalchemy.sql.schema import PrimaryKeyConstraint
from sqlalchemy.orm import relationship, column_property, backref
from s... | lucventurini/mikado | Mikado/serializers/blast_serializer/hit.py | Python | lgpl-3.0 | 16,660 | [
"BLAST"
] | 755dc9e105d0f33486aa514dd313f206567f80f6b5233bb771919b48575f857c |
# -*- coding: utf-8 -*-
"""An implementation of the unbiased candidate mechanism (UCM) generation workflow.
This workflow can be used to address the inconsistency in the definitions of the boundaries of pathways, mechanisms,
sub-graphs, etc. in networks and systems biology that are introduced during curation due to a... | pybel/pybel-tools | src/pybel_tools/generation.py | Python | mit | 6,783 | [
"Pybel"
] | c61d7b53af956b4e17ca2b88037ff3a219b29ae187ef68c37bf4cc885cb265e7 |
# This file is part of QuTiP: Quantum Toolbox in Python.
#
# Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
... | anubhavvardhan/qutip | qutip/continuous_variables.py | Python | bsd-3-clause | 9,366 | [
"Gaussian"
] | c8e44bb0a889fa9f9d7d74d0e5564e0a0d751c5a69c9b489389b7bf3570c1d64 |
# This file is adapted from python code released by WellDone International
# under the terms of the LGPLv3. WellDone International's contact information is
# info@welldone.org
# http://welldone.org
#
# Modifications to this file from the original created at WellDone International
# are copyright Arch Systems Inc.
fro... | iotile/coretools | iotilebuild/iotile/build/config/site_scons/cfileparser.py | Python | gpl-3.0 | 2,075 | [
"VisIt"
] | 6726f822795f7121e626fd431484ae204e4d81503bea91142965b02e5095e02c |
# Copyright 2010-2017, The University of Melbourne
# Copyright 2010-2017, Brian May
#
# This file is part of Karaage.
#
# Karaage 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... | brianmay/karaage | karaage/templatetags/machines.py | Python | gpl-3.0 | 1,126 | [
"Brian"
] | 34c30bc803a62a2cf4783a97f1610ba0a6a9dbad0cbcf72676b354d09ec3e66f |
#############################################################################
# $HeadURL$
#############################################################################
""" The Bdii2CSAgent performs checking BDII for availability of CE and SE
resources for a given or any configured VO. It detects resources not yet
... | calancha/DIRAC | ConfigurationSystem/Agent/Bdii2CSAgent.py | Python | gpl-3.0 | 12,056 | [
"DIRAC"
] | eb1ec7380dff11bc677bada1d373802034fff867f6ea7da1dee831d55693c8dc |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
"""
Miscellaneous tools used by OpenERP.
"""
from functools import wraps
import babel
from contextlib import contextmanager
import datetime
import subprocess
import io
import os
import collections
import passlib.utils
... | t3dev/odoo | odoo/tools/misc.py | Python | gpl-3.0 | 42,058 | [
"VisIt"
] | b9d6fdd14568e37eb56064cc4f71da745a7482b446b4c2f10586a324a9e62420 |
"""
EDENetworks, a genetic network analyzer
Copyright (C) 2011 Aalto University
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version... | bolozna/EDENetworks | netpython/transforms.py | Python | gpl-2.0 | 17,323 | [
"VisIt"
] | 45ee055fdb265382b34ae0589722fdd087a4f9e8ab02b03badf3411afe632872 |
# -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2017 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by th... | QuantumElephant/horton | horton/io/molden.py | Python | gpl-3.0 | 27,095 | [
"Gaussian",
"ORCA",
"Psi4",
"TURBOMOLE"
] | 7bd19e6bf9fec5fcdfdee9dc54be27b1c13f86c2e8dcaf43753d75b01e2f734c |
# -*- coding: utf-8 -*-
"""Convert the Yelp Dataset Challenge dataset from json format to csv.
For more information on the Yelp Dataset Challenge please visit http://yelp.com/dataset_challenge
"""
import argparse
import collections
import csv
import simplejson as json
def read_and_write_file(json_file_path, csv_file_... | abhirevan/Yelp-Rate-my-Review | src/json_to_csv_converter.py | Python | mit | 3,336 | [
"VisIt"
] | 59345552ca36341062eb2a1332059a27c7745d6e013a1272a07f130e08c1cdc2 |
#!/usr/bin/env python
# This tests vtkTemporalSnapToTimeStep
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
def Nearest(a):
i = int(a)
if a-i <= 0.5:
return i
else:
return i+1;
class TestTemporalSnapToTimeStep(Testing.vtkTest):
def ... | sumedhasingla/VTK | Filters/Hybrid/Testing/Python/TestTemporalSnapToTimeStep.py | Python | bsd-3-clause | 944 | [
"VTK"
] | a6d2efeaa5682dd310ee30d19a3b4c5e57705e5ad5b4eba6a2f4b53ce3cf1c42 |
import os
from pyjade import Parser, Compiler as _Compiler
from pyjade.runtime import attrs
from pyjade.utils import process
ATTRS_FUNC = '__pyjade_attrs'
class Compiler(_Compiler):
def compile_top(self):
return '# -*- coding: utf-8 -*-\n<%%! from pyjade.runtime import attrs as %s %%>'%ATTRS_FUNC
def i... | xlk521/cloudguantou | pyjade/ext/mako.py | Python | bsd-3-clause | 2,781 | [
"VisIt"
] | faf21780fd1abb71051a4403724b9633d8c12715251a8291b8c95dec374f5e81 |
import torch
import os
import sys
import itertools
import threading
from concurrent.futures import ThreadPoolExecutor
from src.python.preprocess2 import *
from blast import *
from tempfile import gettempdir
tmp_dir = gettempdir()
out_dir = "./Data"
from scipy.stats import *
import pickle
NUM_CPU = 8
eps = 10... | yotamfr/prot2vec | src/python/dingo_utils.py | Python | mit | 19,157 | [
"BLAST"
] | 0786b93051a80caf1b93273dd2722bfca6cd0af79a08cc4e6bc6320d3a365834 |
"""
===========================
Formaldehyde mm-line fitter
===========================
This is a formaldehyde 3_03-2_02 / 3_22-221 and 3_03-2_02/3_21-2_20 fitter.
It is based entirely on RADEX models.
Module API
^^^^^^^^^^
"""
from __future__ import print_function
import numpy as np
from . import hyperfine
from . im... | e-koch/pyspeckit | pyspeckit/spectrum/models/formaldehyde_mm.py | Python | mit | 18,908 | [
"Gaussian"
] | 6a4a115cce62abfc7b96ee5c952c36ff0d83f8bfe1c04c9a8451bc98ec88950a |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2005-2014 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program 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 Softw... | andrebellafronte/stoq | stoqlib/domain/stockdecrease.py | Python | gpl-2.0 | 11,829 | [
"VisIt"
] | 46f1226ac9548b39988e7129a7ccffb2072d7ba59217b1e4088bc0c0d10b7fb7 |
import atexit
import contextlib
import fnmatch
import importlib.util
import itertools
import os
import shutil
import sys
import uuid
import warnings
from enum import Enum
from functools import partial
from os.path import expanduser
from os.path import expandvars
from os.path import isabs
from os.path import sep
from po... | CYBAI/servo | tests/wpt/web-platform-tests/tools/third_party/pytest/src/_pytest/pathlib.py | Python | mpl-2.0 | 20,029 | [
"VisIt"
] | b7056cc94d99d45acd444f4f93f50234de6c54e1fd8f9f6cf4504227cfaa601f |
import mdtraj as md
from simtk.openmm import app
import simtk.openmm as mm
from simtk import unit as u
from fah_parameters import *
pdbid = "4IJ8"
ff_name = "amber99sbildn"
water_name = 'tip3p'
which_forcefield = "%s.xml" % ff_name
which_water = '%s.xml' % water_name
pdb_filename = "./pdbs/%s_box.pdb" % pdbid
out_p... | kyleabeauchamp/fah-projects | projects/setd8-p10478/code/equilibrate.py | Python | gpl-2.0 | 1,836 | [
"MDTraj",
"OpenMM"
] | f0e52289899c03b4f47d5c06e2c36a3f87bf059d98ce45a3515f743fca0bf2fc |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests that relate to evaluating models with quantity parameters
"""
# pylint: disable=invalid-name, no-member
import numpy as np
import pytest
from numpy.testing import assert_allclose
from astropy.modeling.core import Model
from astropy.modeling.m... | StuartLittlefair/astropy | astropy/modeling/tests/test_quantities_evaluation.py | Python | bsd-3-clause | 13,857 | [
"Gaussian"
] | e6ef9525c0dab82a6c82dce20b7466794ddb7aebb2f34929cd43d60822642ea6 |
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# 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, o... | godfryd/pylint | utils.py | Python | gpl-2.0 | 27,921 | [
"VisIt"
] | 1e342ea3e1c5ccd41ded4eae690b1e324731bb4fbfe5165790bf726ac9c86d27 |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | ncos/hometasks | CIFAR10_evaluation/tensorflow/cifar10.py | Python | mit | 15,860 | [
"Gaussian"
] | 25be4f4256584df0c18cb356c24347e682c98be53a52aa730e1d2ea7d5eb0926 |
# Copyright (c), Michael DeHaan <michael.dehaan@gmail.com>, 2012-2013
# Copyright (c), Toshio Kuratomi <tkuratomi@ansible.com> 2016
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
SIZE_RANGES = {
'Y': 1 << 80,
'Z': 1 << 70,
'E': 1 << 60,
'P': 1... | tedelhourani/ansible | lib/ansible/module_utils/basic.py | Python | gpl-3.0 | 111,067 | [
"VisIt"
] | 1d82d2963f2ddac4ce3809c79a33be6a853f5bfa2d6f9cfc2ee0e51baf8d1d0b |
# coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | google-research/google-research | bam/bert/modeling.py | Python | apache-2.0 | 38,140 | [
"Gaussian"
] | edb6b67070a8b33599411348f686aa712eb815dd88dac9fa510f6a394bfcd98b |
r"""*Helper enums for* ``sphobjinv``.
``sphobjinv`` is a toolkit for manipulation and inspection of
Sphinx |objects.inv| files.
**Author**
Brian Skinn (bskinn@alum.mit.edu)
**File Created**
4 May 2019
**Copyright**
\(c) Brian Skinn 2016-2022
**Source Repository**
https://github.com/bskinn/sphobjinv... | bskinn/sphobjinv | src/sphobjinv/enum.py | Python | mit | 3,039 | [
"Brian"
] | 39240097036680fa394cde5cf50b8d82933332b5b50be586e39b55d14812e985 |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | nburn42/tensorflow | tensorflow/contrib/data/python/kernel_tests/sql_dataset_op_test.py | Python | apache-2.0 | 29,651 | [
"MOE"
] | 85ea35df54a242b0ac0d0c3a343302412df34387ffd5de91c0730484ce616c66 |
#!/usr/bin/env python
# encoding: utf-8
"""Sample Maker
Creates the given number of samples from a random sample (f(x), x) with
x sampled from the uniform distribution on [0, 1]. Here, f is a linear function
with some additive gaussian noise xi (f(x) = mx + n + scale*xi).
Usage:
mkdata.py [--samples=<ss>] [-m=<m>] ... | dseuss/stuff | linreg/mkdata.py | Python | unlicense | 1,595 | [
"Gaussian"
] | fcd4f9d95b38ac7b66b373d45d01595ef85a7ebd7e38d3ae4d3207ced32088a1 |
"""
Meta-data information for MR reduction
"""
#pylint: disable=too-few-public-methods, wrong-import-position, too-many-instance-attributes, wrong-import-order
from __future__ import absolute_import, division, print_function
import sys
import time
import logging
import math
import copy
import numpy as np
from scip... | mdoucet/reflectivity_ui | reflectivity_ui/interfaces/data_handling/data_info.py | Python | apache-2.0 | 17,396 | [
"Gaussian"
] | 1f6e4d002377227dfad6ca5cd1e54221e96d8c47e8755e0cae813b2b78a21c84 |
"""CSE script written by Serge!
"""
import ast
import astunparse
import functools
from copy import deepcopy
import sys
import os
import itertools
from sspam.tools import asttools
COMMUTATIVE_OPERATORS = ast.Add, ast.Mult, ast.BitOr, ast.BitXor, ast.BitAnd
ASSOCIATIVE_OPERATORS = COMMUTATIVE_OPERATORS
BINARY_OPERATO... | quarkslab/sspam | sspam/tools/cse.py | Python | bsd-3-clause | 14,824 | [
"VisIt"
] | 0b52de7d47604c28684c446db41a648c9c5e24ffdd83187ba34274b6b5a076db |
"""
A package for building and running simple atmospheric models.
The package contains code for a spectral barotropic model, with spectral
transforms provided by pyspharm. It also provides code for writing model
state to NetCDF files.
"""
# (c) Copyright 2016 Andrew Dawson.
#
# This program is free software: you can ... | ajdawson/python_for_climate_scientists | course_content/barotropic-model/barotropic/__init__.py | Python | gpl-3.0 | 987 | [
"NetCDF"
] | 9476cdc461d21e3c2eff685fabcbb71477602c855b1fcb8994c8b45231edae86 |
"""
Miscellaneous.
"""
__author__ = "Steven Kearnes"
__copyright__ = "Copyright 2014, Stanford University"
__license__ = "3-clause BSD"
from rdkit import Chem
class PicklableMol(Chem.Mol):
"""
RDKit Mol that preserves molecule properties when pickling.
This class is similar to the PropertyMol class in ... | rbharath/vs-utils | vs_utils/utils/rdkit_utils/__init__.py | Python | gpl-3.0 | 2,324 | [
"RDKit"
] | 03fd18b36ae52ff6207c3e2bf9a5312d55ac46727d768ec5107804ab2cfaedd7 |
# this file does statistic analysis for the results
# from collections import Counter
#============ analyse the samfile output =========
#=================================================================================
def sam_result(filename):
"""
This function does some statistic calculation of the input sam... | shl198/Projects | DetectVirusPipeline/p03_ParseSam.py | Python | mit | 5,332 | [
"BLAST"
] | 21e98e673b13b0a6ff611a691a1ab0a4b695530e3da8db8d98e41269e5e17515 |
#!/usr/bin/python
import logging
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")
import procgame.game, sys, os
import procgame.config
import random
import procgame.sound
sys.path.insert(0,os.path.pardir)
import bingo_emulator.common.units as units
import bingo_em... | bingopodcast/bingos | bingo_emulator/galaxy/game.py | Python | gpl-3.0 | 94,309 | [
"Galaxy"
] | ae68ed8e6a14e0b6b6977fa57beb56b4e624c5ddc5dcb882d6c34361d1521943 |
###############################################################################
##
## Copyright (C) 2011-2014 Tavendo GmbH
##
## 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
##
#... | eugenejen/AutobahnPython | autobahn/autobahn/websocket/protocol.py | Python | apache-2.0 | 166,116 | [
"VisIt"
] | e5305fbd898b342a25fa9a85172f3abcb78b9d4abfc31274cb5a3734043047c4 |
# -*- coding: utf-8 -*-
# Author: Óscar Nájera
# License: 3-clause BSD
"""
==================
RST file generator
==================
Generate the rst files for the examples by iterating over the python
example files.
Files that generate images should start with 'plot'
"""
# Don't use unicode_literals here (be explici... | emmanuelle/multi-diffusion | doc/ext/sphinx_gallery/gen_rst.py | Python | bsd-3-clause | 21,184 | [
"Mayavi"
] | 5a8c3a48e912cc33f8fed79b0468f69d93c5f418ef467d39e966a4e04e5fb998 |
names = [ # NOQA
'Aan',
'Aalia',
'Aaliah',
'Aaliyah',
'Aaron',
'Aaryanna',
'Aavree',
'Abbie',
'Abbott',
'Abbra',
'Abby',
'Abe',
'Abel',
'Abelardo',
'Abeni',
'Abia',
'Abiba',
'Abie',
'Abigail',
'Abner',
'Abraham',
'Abram',
'Abrial',
'Abrianna',
'Abrienda',
'Abril',
'Abryl',
'Absolom',
'Abu',
'Acacia',
'Acadia',
'Ace',
... | jamespacileo/django-pure-pagination | example_project/core/names.py | Python | bsd-3-clause | 54,755 | [
"Amber",
"Brian",
"CRYSTAL",
"Dalton",
"Desmond",
"FLEUR"
] | 27058aca162e95a4b5b953ebc729f985a3b2abdc575554e179a43b2f84a0a721 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-02-09 07:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('edc_metadata', '0005_auto_20170112_0602'),
]
operations = [
migrations.Alte... | botswana-harvard/edc-entry | edc_metadata/migrations/0006_auto_20170209_0924.py | Python | gpl-2.0 | 1,199 | [
"VisIt"
] | b5ad3b6688201dbdc192fb80f4f0a9da816c915cd6694fdad9bcf9153c9f4af9 |
from Interfaces.API.Application import Application
from DIRAC.Core.Workflow.Parameter import Parameter
from DIRAC import S_OK, S_ERROR
import types, os
class GenericApplication(Application):
""" Run a script (python or shell) in an application environment.
Example:
... | sposs/DIRACInterfaceDoc | code/Interfaces/API/GenericApplication.py | Python | gpl-2.0 | 7,511 | [
"DIRAC"
] | 0207c5316c962233cfcb3bfe84aed9f9675c6d29e9af1f7824351a22a2a39799 |
import discord
from discord.ext import commands
from __main__ import send_cmd_help
from cogs.utils.dataIO import dataIO
import asyncio #Used for task loop.
import os #Used to create folder at first load.
import random #Used for selecting random catgirls.
#Global variables
JSON_mainKey = "catgirls" #Key for JSON files.... | Injabie3/Red-DiscordBot | cogs/catgirl.py | Python | gpl-3.0 | 18,923 | [
"MOE"
] | 7c6cc9c78eddbc5aebb0b382e98d705649c3e8c62868641088b2cc35efe84d0e |
#!/usr/bin/env python
from __future__ import division
import sys, os, copy
import shutil
import glob
try:
import cPickle as pickle
except ImportError:
import pickle
import wx
from wx.lib.mixins.listctrl import ListCtrlAutoWidthMixin
import tempfile
from customrubberband import RubberBand
from geticons impor... | RajaS/Eepee | src/eepee.py | Python | gpl-3.0 | 61,087 | [
"VisIt"
] | 27ee2f2423ea24f8f89b893347b2ee2ffa8b377704e138b2482226ba682a4ae8 |
from __future__ import print_function
__author__ = """Alex "O." Holcombe, Charles Ludowici, """ ## double-quotes will be silently removed, single quotes will be left, eg, O'Connor
import time, sys, platform, os
from math import atan, atan2, pi, cos, sin, sqrt, ceil, radians, degrees
import numpy as np
import psychopy, ... | alexholcombe/dot-jump | dataRaw/Fixed Cue/test_dot-jump21Nov2016_13-44.py | Python | gpl-3.0 | 26,095 | [
"Gaussian"
] | bafccebb350ef3be322ccde08621cf1bbbabfdcf63b8b6e7827fccf500bf378e |
#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=2:sw=2:softtabstop=2:smarttab:expandtab
# Physical quantities with units
#
# Written by Konrad Hinsen <hinsen@cnrs-orleans.fr>
# last revision: 2002-4-9
#
# hacked 1998/09/28 GPW: now removes __args__ from local dict after eval
# 1998/09/29 GPW: now supports co... | kdart/pycopia | core/pycopia/physics/physical_quantities.py | Python | apache-2.0 | 24,999 | [
"Avogadro"
] | fa7866b3640f35fd85b593e5069cd5e80ae5c33fb2bb34006eabe78c271e32fa |
""" The POOL XML File module provides a means to extract the GUID of a file or list
of files by searching for an appropriate POOL XML Catalog in the specified directory.
"""
__RCSID__ = "$Id$"
import os, glob, tarfile
from DIRAC.Resources.Catalog.PoolXMLCatalog import PoolXMLCatalog
from DIRAC.Core.Util... | vmendez/DIRAC | Resources/Catalog/PoolXMLFile.py | Python | gpl-3.0 | 4,966 | [
"DIRAC"
] | 8bf525099945a72985817eaabe6ee603ee69c91d3921633bec3d768b6973ac25 |
# coding: utf-8
from __future__ import division, unicode_literals
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "Shyue Ping Ong"
__email__ = "shyuep@gmail.com"
__date__ = "5/8/13"
import pymatgen
import warnings
from monty.dev import depre... | Dioptas/pymatgen | pymatgen/symmetry/pointgroup.py | Python | mit | 899 | [
"pymatgen"
] | c722dd1a9793576b5cd8dbdcb90c7b17c25367595348f119b4932430ad6c91fb |
import json
try:
from osgeo import ogr
except ImportError:
import ogr
try:
from osgeo import gdal
except ImportError:
import gdal
from ..utils.arrays import *
from ..geometries.transformations import *
from ..geometries.shapes.space4d import *
from ..io.gdal.vector import *
class TriangBeam(obje... | mauroalberti/gsf | pygsf/georeferenced/meshes.py | Python | gpl-3.0 | 14,549 | [
"VTK"
] | 7be01ccfc0fba4724acc777914167020267b32121085043021dde082c42bbf36 |
global pisa_command
pisa_command = "pisa"
global pisa_min_version
pisa_min_version = "v1.13"
def pisa_assemblies(imol):
global pisa_min_version
pisa_exe = pisa_new_enough_qm()
if not pisa_exe:
msg = "Your pisa version it too old. Need at least " + \
pisa_min_version + "."
in... | jlec/coot | python/parse_pisa_xml.py | Python | gpl-3.0 | 27,525 | [
"RasMol"
] | 24bf7f3d67b983dc016d4682014d9ff4613d9c892f7630173cfbb0fb45e3d1aa |
#!/usr/bin/env python3
#
# Copyright (C) 2018 INRA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is... | geraldinepascal/FROGS | tools/preprocess/preprocess.py | Python | gpl-3.0 | 69,327 | [
"Galaxy"
] | 1c131d197debcef90e70ebb07db9fd7d1abd8f1f8f9c98488663294b36e19a7b |
# $Id$
#
# Copyright (C) 2000-2008 greg Landrum and Rational Discovery LLC
# All Rights Reserved
#
""" code for dealing with Bayesian composite models
For a model to be useable here, it should support the following API:
- _ClassifyExample(example)_, returns a classification
Other compatibility notes:
1) To u... | bp-kelley/rdkit | rdkit/ML/Composite/BayesComposite.py | Python | bsd-3-clause | 4,921 | [
"RDKit"
] | 512bb535ef32e3050e0e787e95fda36373ec443a20c04e95b806972c9a333f85 |
#!/usr/bin/python
# (C) 2010, Markus Wildi, markus.wildi@one-arcsec.org
# (C) 2011, Petr Kubanek, Institute of Physics <kubanek@fzu.cz>
# usage
# img_astrometry.py fits_filename
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pu... | xyficu/rts2 | scripts/rts2-f/astrometry.py | Python | gpl-2.0 | 5,016 | [
"VisIt"
] | 4eab6e5bd75b0ce06eb367e09537fc782101b24b1037985e390ba9a07e9442b3 |
import ocl
import pyocl
import camvtk
import time
import datetime
import vtk
import math
def main():
print(ocl.revision())
myscreen = camvtk.VTKScreen()
myscreen.camera.SetPosition(2, 2, 5)
myscreen.camera.SetFocalPoint(0.5,0, 1)
camvtk.drawArrows(myscreen,center=(-2,-2,0)) # axis arrows
... | aewallin/opencamlib | src/attic/cutsim/cutsim_11.py | Python | lgpl-2.1 | 2,329 | [
"VTK"
] | a7d3b09ed7fefdc28fd8131d851267567eae4aba7f149409ef7ae681f17246ac |
""" DIRAC FileCatalog component representing a simple directory tree
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = "$Id: $"
import os
from DIRAC import S_OK, S_ERROR
from DIRAC.DataManagementSystem.DB.FileCatalogComponents.DirectoryManag... | yujikato/DIRAC | src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/DirectoryManager/DirectorySimpleTree.py | Python | gpl-3.0 | 4,332 | [
"DIRAC"
] | 0b61c934548dfa84dab87745a21a865aaa99cf9d9a345e76acf41ec3ff49608f |
#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | SKIRT/PTS | magic/sources/point.py | Python | agpl-3.0 | 48,938 | [
"Galaxy",
"Gaussian"
] | 1a32af152abc40d7b2fd5492532ecc8f5eee7d6f2c036cf586ba58f6c44abbdd |
"""Galaxy webapps root package -- this is a namespace package."""
__import__( "pkg_resources" ).declare_namespace( __name__ )
| mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/webapps/__init__.py | Python | gpl-3.0 | 127 | [
"Galaxy"
] | d9b920e40f67c60b5a085cc13db050cb3cee2d24ee0e8342eae4a97d06e400ac |
"""
Acceptance tests for the teams feature.
"""
import json
import random
import time
from uuid import uuid4
import ddt
from dateutil.parser import parse
from nose.plugins.attrib import attr
from selenium.common.exceptions import TimeoutException
from common.test.acceptance.fixtures import LMS_BASE_URL
from common.te... | fintech-circle/edx-platform | common/test/acceptance/tests/lms/test_teams.py | Python | agpl-3.0 | 84,876 | [
"VisIt"
] | 220df8d3c16ab4df20e0948534f40e45c821c1b4acaac1f9c7662da9f34b792d |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | skosukhin/spack | var/spack/repos/builtin/packages/espresso/package.py | Python | lgpl-2.1 | 5,920 | [
"ESPResSo"
] | 4a2dac03ae15eca3935bed4a5fd589408a01f9effcf1a766e97611644159e039 |
import os
import numpy.testing as npt
import numpy as np
import pytest
from scipy import stats
from statsmodels.distributions.mixture_rvs import mixture_rvs
from statsmodels.nonparametric.kde import KDEUnivariate as KDE
import statsmodels.sandbox.nonparametric.kernels as kernels
import statsmodels.nonparametric.bandw... | bashtage/statsmodels | statsmodels/nonparametric/tests/test_kde.py | Python | bsd-3-clause | 12,827 | [
"Gaussian"
] | cc03ec61e9a781294c765339ddf9949a317b400c71e57f4eb4de6084a8f529c5 |
# coding: utf8
"""
Functionality to read and write the Newick serialization format for trees.
.. seealso:: https://en.wikipedia.org/wiki/Newick_format
"""
from __future__ import unicode_literals
import io
import re
RESERVED_PUNCTUATION = ':;,()'
COMMENT = re.compile('\[[^\]]*\]')
def length_parser(x):
return f... | tomasmcoronado/prob-alpha | newick.py | Python | apache-2.0 | 12,861 | [
"VisIt"
] | 5baafbfa65d3061b0431d46d88fdb20a476c03071eed639f2998a2a0f73b9e26 |
"""
Title: CutMix data augmentation for image classification
Author: [Sayan Nath](https://twitter.com/sayannath2350)
Date created: 2021/06/08
Last modified: 2021/06/08
Description: Data augmentation with CutMix for image classification on CIFAR-10.
"""
"""
## Introduction
"""
"""
_CutMix_ is a data augmentation techn... | keras-team/keras-io | examples/vision/cutmix.py | Python | apache-2.0 | 11,408 | [
"Gaussian"
] | d1fbf368ca2b1a9504103de00fb3e0db9a3f447f2422f965df00d399bfebb981 |
from __future__ import absolute_import
from __future__ import division
from typing import Any, Dict, List, Tuple, Optional, Sequence, Callable, Union, Text
from django.db import connection
from django.db.models.query import QuerySet
from django.template import RequestContext, loader
from django.core import urlresolver... | KingxBanana/zulip | analytics/views.py | Python | apache-2.0 | 28,049 | [
"VisIt"
] | 0ba17e1db311ba493ba9f4807d10cbf2cf04267927f347a0ef84000d4a82ef19 |
"""
=================
Drop Shadow Frame
=================
A widget providing a drop shadow (gaussian blur effect) around another
widget.
"""
from typing import Optional, Any, Union, List
from AnyQt.QtWidgets import (
QWidget, QGraphicsScene, QGraphicsRectItem, QGraphicsDropShadowEffect,
QStyleOption, QAbstra... | ales-erjavec/orange-canvas | orangecanvas/gui/dropshadow.py | Python | gpl-3.0 | 11,138 | [
"Gaussian"
] | 50438e17b3f82c94250799c123bed115940d3ec2c93fca5db99dea2055829c65 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2014 Google 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.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | GoogleCloudPlatform/gce-oreilly | ch7-3.py | Python | apache-2.0 | 3,445 | [
"VisIt"
] | fee31467673c9f7e3edce248d9f7730f0d11c25605dcd7529209390b19a8f552 |
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from .theplatform import ThePlatformIE
from ..utils import (
find_xpath_attr,
lowercase_escape,
smuggle_url,
unescapeHTML,
)
class NBCIE(InfoExtractor):
_VALID_URL = r'https?://www\.nbc\.com/(?:[^/]+/)+(?P<id>n?\... | fast90/youtube-dl | youtube_dl/extractor/nbc.py | Python | unlicense | 15,110 | [
"Brian"
] | f3d513ba71e919a57a8fc31e422e35358a04c604b8339a09d332781175f06597 |
from drizzlepac import astrodrizzle, tweakreg, tweakback
from stwcs import updatewcs
import glob, os
from astropy.io import fits
from multiprocessing import Pool
from stsci.tools import teal
def upwcs(f):
print f
updatewcs.updatewcs(f)
def reg(exps):
hdr = fits.getheader(exps[0])
filt = hdr['FILTER']
... | Vb2341/image-junk | vis_driz.py | Python | mit | 1,604 | [
"VisIt"
] | 49d4e1a574c6d1d856a918ad0b3024073939a47be350806ac00c8456fd939f70 |
'Adventure in Style, based on the classic game and an unusual book.'
__author__ = 'Nick Montfort (based on works by Crowther, Woods, and Queneau)'
__copyright__ = 'Copyright 2011 Nick Montfort'
__license__ = 'ISC'
__version__ = '0.5.0.0'
__status__ = 'Development'
from random import random, randint, choice
from item... | cjb/curveship | fiction/adventure.py | Python | isc | 103,671 | [
"BLAST"
] | a4f26b8fc602caec8de73232d825f0086ca8d4f2c32c9f3aed39b8122360f196 |
from __future__ import print_function
from builtins import range
"""
SECTION 1 : Load and setup data for training
the datasets separated in two files from originai datasets:
iris_train.csv = datasets for training purpose, 80% from the original data
iris_test.csv = datasets for testing purpose, 20% from the original ... | rianrajagede/simplesamplecode | Keras/iris_keras.py | Python | mit | 2,650 | [
"NEURON"
] | b97897d545aaf4ea3ecde9222bff06d4542a6ea29700f3b4f375196525701c55 |
from pythoscope.astvisitor import ASTVisitor
from pythoscope.astbuilder import parse, regenerate
from assertions import *
class TestASTVisitorImports:
def test_handles_simple_imports(self):
code = "import unittest"
def assertions(names, import_from):
assert_equal(["unittest"], names)
... | mkwiatkowski/pythoscope | test/test_astvisitor.py | Python | mit | 4,032 | [
"VisIt"
] | b64d376a8f442aa19d3d9d29f0502d2d3ba6097b4f355c02b6dccdf95dfed0d8 |
import re
from django.shortcuts import render, redirect, resolve_url, HttpResponse
from django.utils.http import urlquote
from testcube.settings import logger
from .forms import AnalysisForm, ResetForm
from .models import TestRun, ObjectSource
from ..utils import read_document
def index(request):
if TestRun.obj... | tobyqin/testcube | testcube/core/views.py | Python | mit | 3,369 | [
"VisIt"
] | 7e15654a161d4f68fcbe59bf87849a7ece6a474222bc1d1dd111254ff45e699e |
from __future__ import absolute_import
import os
import os.path as op
from copy import copy
import numpy as nm
from sfepy.base.base import (
dict_from_keys_init, select_by_names, is_string, is_integer, is_sequence,
output, get_default, Struct, IndexedStruct)
import sfepy.base.ioutils as io
from sfepy.base.con... | rc/sfepy | sfepy/discrete/problem.py | Python | bsd-3-clause | 75,926 | [
"VTK"
] | 36c2c47d7fdf1e4d3008d373450523a216f8bf9035bcb2d0868239d0e9a86d92 |
from __future__ import unicode_literals
from ben10.foundation.pushpop import PushPop
from ben10.foundation.string import Dedent
from terraformer import TerraFormer
import pytest
def testImportBlockZero(monkeypatch, embed_data):
def TestIt(input, symbols, expected, import_blocks):
input = Dedent(input)
... | Kaniabi/ben10 | source/python/terraformer/_tests/test_terra_former.py | Python | lgpl-2.1 | 16,875 | [
"VisIt"
] | d504d2957fbc4bcc6a6901990549199679e4c2dec3d5cad5ad22572c26873381 |
#!/usr/bin/env python3
#
# Script to generate an ext-xyz trajectory from individual ext-xyz files with varying atom numbers using ASE.
# Appens 'X' atoms at origin to obtain frames with equal lengths
# by Patrick Melix
# 2020/06/08
#
from ase import io, Atom
import os
def main(inList, outFile='traj.xyz', outFormat='e... | patrickmelix/Python4ChemistryTools | pad-trajectory.py | Python | mit | 1,583 | [
"ASE"
] | bcd1bbfad7ccfcdecb20e9a08928508c50352ea19f103142d3d3bca68d7ab6c9 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.