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 |
|---|---|---|---|---|---|---|---|
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/test_dot-jump16Feb2017_15-30.py | Python | gpl-3.0 | 29,525 | [
"Gaussian"
] | 226d8b6c4ab455c1b601726c235642b98c67f9017212ff922292635fc0769110 |
#!/usr/bin/env python
import sys
import os
import math
import json
import scipy.io.netcdf
import quantized_mesh_tile.global_geodetic
import quantized_mesh_tile.terrain
# https://pypi.python.org/pypi/quantized-mesh-tile/
# pip install quantized-mesh-tile
class Grd:
def __init__(self,fname,tileSize):
self.... | rolker/cesium-tools | srtm2qmesh.py | Python | mit | 7,012 | [
"NetCDF"
] | 17c3811436e0ce39b10dfdd6869dd62c003cf378ba9aa764801cf229a4b090d3 |
#
# mainTab
#
tab = self.notebook.mainTab
tab.settings['Program'] = 'abinit'
tab.settings['Output file name'] = 'AlAs.out'
#
# SettingsTab
#
tab = self.notebook.settingsTab
tab.settings['Eckart flag'] = False
tab.settings['Neutral Born charges'] = False
tab.settings['Sigma value'] = 5
tab.settings['Mass definition'] = ... | JohnKendrick/PDielec | Examples/AbInit/AlAs/script.py | Python | mit | 1,917 | [
"ABINIT"
] | 1985fc3b86e02faef66f911dd1e5ddfc096560d25532e577949613a454396786 |
## \package DOMLight
# Classes for generating and reading XML, based on DOM
# \author Brian Muller <mullerb@musc.edu>
"""
DOMLight is a little library for making DOM's more accessable in python.
Copyright (C) 2006 Brian Muller <mullerb@musc.edu>
This program is free software; you can redistribute it and/or
modi... | aswarren/GOGranny | GOGranny/DOMLight.py | Python | gpl-2.0 | 5,518 | [
"Brian"
] | 02ce121226ae70e982f0638d37331f5936f34c3f299c371f799a58403c9280c4 |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RCategory(RPackage):
"""Category Analysis
A collection of tools for performing cat... | LLNL/spack | var/spack/repos/builtin/packages/r-category/package.py | Python | lgpl-2.1 | 1,453 | [
"Bioconductor"
] | 083edaff714c23c33879a1c4cbbbb3bf3062e5ec1b994d94c2ebd2ef3a554827 |
#!/usr/bin/env python
# bring nested functions to top for API access
from .core.assembly import Assembly, merge
from .core.load import load_json
from .core.Parallel import cluster_info
import os as _os
import sys as _sys
import subprocess as _sps
# Dunders
__version__ = "0.9.84"
__author__ = "Deren Eaton & Isaac Over... | dereneaton/ipyrad | ipyrad/__init__.py | Python | gpl-3.0 | 1,692 | [
"BWA",
"Bioconda",
"pysam"
] | 860deb18da2820d489a1b35b4dd6ceffd39188ccf4227881758ba4d5c766b6a5 |
#!/usr/bin/env python3
#-*- coding: utf-8 -*-
# Copyright 2017, National University of Ireland and The James Hutton Insitute
# Author: Nicholas Waters
#
# This code is part of the riboSeed package, and is governed by its licence.
# Please see the LICENSE file that should have been included as part of
# this package.
i... | nickp60/riboSeed | riboSeed/run_riboSeed.py | Python | mit | 30,228 | [
"BWA"
] | 3e445ec5227646de7d29548de63a3e5a8ac72980f97ab6a117e2a477d9c3cfce |
"""
Unit tests for `dbconfig` module.
"""
__author__ = "Dan Gunter"
__date__ = "2014-04-25"
import json
import tempfile
import unittest
from pymatgen.db.dbconfig import DBConfig, normalize_auth
from pymatgen.db.dbconfig import ConfigurationFileError
class NormAuthTestCase(unittest.TestCase):
"""Test cases for no... | materialsproject/pymatgen-db | pymatgen/db/tests/test_dbconfig.py | Python | mit | 3,546 | [
"pymatgen"
] | 787a5b25b89393279e88507f07c2aa6224dc8d7eb1dc1d2295d3fb451117ae1d |
import datetime
import sys
import traceback
import uuid
from collections import namedtuple
from argh import arg, ArghParser, expects_obj
from csvuploader import HeaderCsv
from csvuploader.version import VERSION_STRING
import py.path
import appdirs
import yaml
import time
import logbook
from logbook import StreamHandl... | janusassetallocation/CsvUploader | src/csvuploader/csvuploadercmd.py | Python | bsd-3-clause | 7,159 | [
"VisIt"
] | 0bbbed229eed23c6bf4978d1d8db0d5a3a0fbadf7326e4eaf9ae695a9c6a8647 |
# -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
from unittes... | superdesk/superdesk-aap | server/aap/macros/am_fronters_test.py | Python | agpl-3.0 | 35,550 | [
"VisIt"
] | bfb2e3d1cec090331a88718c9621df6320658e56b6e59c04ed18f2a213288987 |
#
# Copyright (C) 2010,2012,2013,2014,2015,2016 The ESPResSo project
# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010
# Max-Planck-Institute for Polymer Research, Theory Group
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of th... | lahnerml/espresso | doc/tutorials/python/02-charged_system/scripts/nacl_units_vis.py | Python | gpl-3.0 | 4,794 | [
"ESPResSo"
] | 8600d6e42b79676665b7c1bb7336d7bc0f356f5abac1d87cd3a5d28ba250682d |
from Perceptron import NN
import math
import random
from tkinter import *
from tkinter.ttk import *
from HDFFuncs import *
class MainWindow(Frame):
def __init__(self, parent, geometry=None, n=NN([4,9,8,3], act='sigmoid'), menus=[]):
Frame.__init__(self, parent)
self.parent = parent
se... | Wheelspawn/Python-Neural-Networks | GUI.py | Python | gpl-3.0 | 18,116 | [
"NEURON"
] | 66b010231d67c5c4c6dfe658f4a7890df5a1cf98e49c36de6b346caf9d1857e3 |
# USTimeZone.py - Various timezone implementations
# (C) 2012 HansMayer - http://supertv.3owl.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your... | RaspberryPiChile/IPTV_CHILE | test/plugin.video.rtmpGUIplus/resources/lib/USTimeZone.py | Python | gpl-2.0 | 7,650 | [
"VisIt"
] | fb12b314547ade252ca69fa50cb556144a6f4800fc189b6bae56211fc18819f1 |
from unittest import TestCase
from octopus.lib import dataobj
class CustomDO(dataobj.DataObj):
pass
class InvalidDO(dataobj.DataObj):
pass
class TestDataObj(dataobj.DataObj):
def __init__(self, raw=None, expose_data=False):
self._struct = {
"fields" : {
"title" : {"coe... | JiscPER/magnificent-octopus | octopus/tests/unit/test_dataobj.py | Python | apache-2.0 | 28,267 | [
"Octopus"
] | 3a12f1dc48ee33c19b84c78335769aca13d7d9b4f3edd34e20da5463fdb4aca5 |
"""
This file contains utilities for molecular docking.
"""
from typing import List, Optional, Tuple
import os
import numpy as np
from deepchem.utils.typing import RDKitMol
from deepchem.utils.pdbqt_utils import pdbqt_to_pdb
def write_vina_conf(protein_filename: str,
ligand_filename: str,
... | deepchem/deepchem | deepchem/utils/docking_utils.py | Python | mit | 9,685 | [
"OpenMM",
"RDKit"
] | 9385a0eb09ead16c4f43c4b82310c0ee04bd6451ea4b9111194d76ff54d097ac |
"""
Support the ISY-994 controllers.
For configuration details please visit the documentation for this component at
https://home-assistant.io/components/isy994/
"""
import logging
from urllib.parse import urlparse
from homeassistant.const import (
CONF_HOST, CONF_PASSWORD, CONF_USERNAME,
EVENT_HOMEASSISTANT_S... | mikaelboman/home-assistant | homeassistant/components/isy994.py | Python | mit | 6,312 | [
"VisIt"
] | a751bda8c266d317427de32ab2cfabf7694648ca3ad8db2cbb74ca4a6f37129c |
# -*- coding: utf-8 -*-
"""
===========================================
OT mapping estimation for domain adaptation
===========================================
This example presents how to use MappingTransport to estimate at the same
time both the coupling transport and approximate the transport map with either
a line... | aje/POT | examples/plot_otda_mapping.py | Python | mit | 4,081 | [
"Gaussian"
] | d7fb1d3724f6ebfc7f0e1d8b99cfab5bae0d33b6d4de468695c32f0eb5f49354 |
"""Handle installation and updates of bcbio-nextgen, third party software and data.
Enables automated installation tool and in-place updates to install additional
data and software.
"""
import argparse
import collections
import contextlib
import datetime
import dateutil
from distutils.version import LooseVersion
impor... | lpantano/bcbio-nextgen | bcbio/install.py | Python | mit | 29,659 | [
"BWA",
"Bioconda",
"Biopython",
"Bowtie",
"Galaxy",
"pysam"
] | b7c5e871cc962d7af12db904901a7fbfe9fe2ece77ffe3976743e224160a53ba |
from __future__ import division, print_function, absolute_import
from numpy import (logical_and, asarray, pi, zeros_like,
piecewise, array, arctan2, tan, zeros, arange, floor)
from numpy.core.umath import (sqrt, exp, greater, less, cos, add, sin,
less_equal, greater_equ... | arokem/scipy | scipy/signal/bsplines.py | Python | bsd-3-clause | 12,073 | [
"Gaussian"
] | 3c359bf0eb241bf05bd59818c7ff9f84df01bb15e0bbc337bf0699c59f0ff233 |
#!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Unit tests for the contents of device_utils.py (mostly DeviceUtils).
"""
# pylint: disable=protected-access
# pylint: disable=unus... | benschmaus/catapult | devil/devil/android/device_utils_test.py | Python | bsd-3-clause | 122,991 | [
"MOE"
] | a4a2c9d5b4e1fa5b30a5dd64bf4e4f65da65083362e93179df5d654744c6bc21 |
import datetime
import time
import zlib
import hashlib
import redis
import re
import mongoengine as mongo
import random
import requests
import HTMLParser
from collections import defaultdict
from BeautifulSoup import BeautifulSoup
from mongoengine.queryset import Q
from django.conf import settings
from django.contrib.au... | slava-sh/NewsBlur | apps/social/models.py | Python | mit | 144,554 | [
"BLAST"
] | 3dbc13f0e3a7b562cf0c3dd298ee8a81a6288f7d93f09cb5f3c89937af423f36 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
=========================================================================
Program: Visualization Toolkit
Module: TestNamedColorsIntegration.py
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or ... | hlzz/dotfiles | graphics/VTK-7.0.0/Imaging/Core/Testing/Python/imageMCAll.py | Python | bsd-3-clause | 5,128 | [
"VTK"
] | adfc12ea8114fcff72b906865e01d33ba6407c1e50ccde427de48a78d703005f |
import espresso
# create default Lennard Jones (WCA) system with 0 particles and cubic box (L=10)
system, integrator = espresso.standard_system.LennardJones(0, (10*1.12, 10*1.12, 10*1.12))
C_FIXED = 1
C_FREE = 0
# fix x,y and z coord axis
fixMask = espresso.Int3D(C_FREE, C_FIXED, C_FREE)
# create a particel group t... | BackupTheBerlios/espressopp | examples/fix_particles/fix_particles.py | Python | gpl-3.0 | 1,137 | [
"ESPResSo",
"VMD"
] | 22c2b9a851399f970f24f396079dbd4ccb3324b9d11aaa04c712267a3309a663 |
# Copyright 2015-2016 by Raytheon BBN Technologies Corp. All Rights Reserved.
"""
Old loop unroller
Functionality is now done within eval
"""
class Unroller(ast.NodeTransformer):
"""
A more general form of the ConcurUnroller, which knows how to
"unroll" FOR loops and IF statements in more general contex... | BBN-Q/pyqgl2 | src/python/attic/unroller.py | Python | apache-2.0 | 16,251 | [
"VisIt"
] | b508fe134703579b6e7d8326ccc081aaf1922b2d09d7292d6b4e7db9b6191856 |
"""
The test_model module contains unit tests for the Model object.
"""
from pycalphad import Database, Model, variables as v, equilibrium
from pycalphad.tests.datasets import ALCRNI_TDB, ALNIPT_TDB, ALFE_TDB, ZRO2_CUBIC_BCC_TDB, TDB_PARAMETER_FILTERS_TEST
from pycalphad.core.errors import DofError
import numpy as np
i... | tkphd/pycalphad | pycalphad/tests/test_model.py | Python | mit | 5,352 | [
"pycalphad"
] | 163e93eee66abe21a5533e71cd0747285b11837aef177dc9fd96d0ac0afcc9b4 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
"""
Created on Mar 15, 2012
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "S... | johnson1228/pymatgen | pymatgen/transformations/tests/test_site_transformations.py | Python | mit | 11,437 | [
"pymatgen"
] | c107d25e6837e6f5ec3804bd6f65e4a5190164ba7e576a24979e190f17025549 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# sshuttle documentation build configuration file, created by
# sphinx-quickstart on Sun Jan 17 12:13:47 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# a... | apenwarr/sshuttle | docs/conf.py | Python | lgpl-2.1 | 8,316 | [
"Brian"
] | 7989a74f451cb185b6a2ea7351f259fe27194e36ddec466198f2f3c74b7141cc |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# createre - [insert a few words of module description on this line]
# Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of ... | heromod/migrid | mig/cgi-bin/createre.py | Python | gpl-2.0 | 1,104 | [
"Brian"
] | e0d624e31a766cd70f77a17de2f0a02785ea34a127fc074030b9ee83af1cd211 |
# Copyright: (c) 2013, James Cammarata <jcammarata@ansible.com>
# Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os.path
import re
import sh... | jhawkesworth/ansible | lib/ansible/cli/galaxy.py | Python | gpl-3.0 | 34,053 | [
"Galaxy"
] | 9ee30cb73589fbaf4b9d8cff85327bc773225d7054e2f7cb5073a68623f4fa40 |
"""
Copyright (c) 2004-Present Pivotal Software, Inc.
This program and the accompanying materials are made available under
the terms of the 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.... | edespino/gpdb | src/test/tinc/tincrepo/mpp/lib/gppkg/gppkg.py | Python | apache-2.0 | 10,700 | [
"ORCA"
] | 2ae2342a06139d07c5c26c6f540e06d96536e952ed94380fbc6f8e24111f0b06 |
"""Reconstruct subclones and phylogenetic history using PhyloWGS.
PhyloWGS uses phylogenetic histories inferred through Battenberg CNV calls
along with variant frequencies.
https://github.com/morrislab/phylowgs
http://genomebiology.com/2015/16/1/35
"""
import collections
import os
import sys
import pybedtools
from p... | Cyberbio-Lab/bcbio-nextgen | bcbio/heterogeneity/phylowgs.py | Python | mit | 12,102 | [
"pysam"
] | 4304d8c3e48c794fcb636e45f9f7fe5dcd9c6602176f690e07ab50dee0679761 |
# Authors: Matti Hämäläinen <msh@nmr.mgh.harvard.edu>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Matti Hämäläinen <msh@nmr.mgh.harvard.edu>
# Denis A. Engemann <denis.engemann@gmail.com>
#
# License: BSD (3-clause)
# Many of the computations in this code were derived from Matti Häm... | kambysese/mne-python | mne/surface.py | Python | bsd-3-clause | 66,104 | [
"VTK"
] | 8be1625518ec0063c670e63cf0a9c46daef92d3416191e2bb26a4b35f62b5bfe |
# ======================================================================
# USER-GFMD - Elastic half-space methods for LAMMPS
# https://github.com/Atomistica/user-gfmd
#
# Copyright (2011-2016,2021)
# Lars Pastewka <lars.pastewka@imtek.uni-freiburg>,
# Tristan A. Sharp and others.
# See the AUTHORS file in the top... | Atomistica/user-gfmd | src/python/gfmd/__init__.py | Python | gpl-2.0 | 2,069 | [
"LAMMPS"
] | 5e17f691b00a53c9f8d510d235f464a64c354083030e20a27e68bd970037bcf8 |
"""
To know more or get code samples, please visit my website:
https://morvanzhou.github.io/tutorials/
Or search: 莫烦Python
Thank you for supporting!
"""
# please note, all tutorial code are running under python3.5.
# If you use the version like python2.7, please modify the code accordingly
# 6 - CNN example
# to try... | tencrance/cool-config | ml_keras_learn/tutorials/kerasTUT/6-CNN_example.py | Python | mit | 2,741 | [
"VisIt"
] | de10275d194dcc8f2c34c8eb611eb2df804e32eb907c1dd6a3494ec9f9f69c5c |
# -*- coding: utf-8 -*-
"""
.. _ex-evoked-whitening:
=============================================
Whitening evoked data with a noise covariance
=============================================
Evoked data are loaded and then whitened using a given noise covariance
matrix. It's an excellent quality check to see if basel... | mne-tools/mne-python | examples/visualization/evoked_whitening.py | Python | bsd-3-clause | 2,742 | [
"Gaussian"
] | 9d07a9e24f71e6eb6100e6947ab66a1b5fa5e9c4ab6b0efca2560ee533d4a074 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#This module contains statistical procedures
from scipy import stats as scstats
from scipy import special as sc
import calculus_functions as cf
import numpy as np
import loglikelihood as logl
import random_effects
def var_decomposition(XXNorm=None,X=None,concat=False):
... | espensirnes/paneltime | build/lib.win-amd64-3.7/paneltime/stat_functions.py | Python | gpl-3.0 | 10,752 | [
"ADF"
] | fab41f20577c064bb046350844d18ae788e4ae9f9e57c2ef423fafaf79a2a53b |
# 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... | Karaage-Cluster/karaage | karaage/plugins/kgapplications/views/states.py | Python | gpl-3.0 | 20,032 | [
"Brian"
] | 6ed5385c80a05bda2e90a820e6ac6927a91e184f0522d4cb73a7ae7e132287be |
#
# FSK modulation and demodulation.
#
#
# Copyright 2005,2006,2007 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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 ve... | zeza/gnuradio-rc-testcode | scratch/fsk.py | Python | gpl-3.0 | 9,215 | [
"Gaussian"
] | 185e3dd3d94d912c9ca26a7ae04ba6d443e493e6008aba24e8782c130ff3816b |
# 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. You may obtain
# a copy of the License at
#
# ... | angdraug/nova | nova/tests/network/test_manager.py | Python | apache-2.0 | 152,297 | [
"FEFF"
] | 36238dbe5897999f9ab2a192bb7e3dada2b7ab6810734a6a895ee7847c1db818 |
# [The "BSD license"]
# Copyright (c) 2012 Terence Parr
# Copyright (c) 2012 Sam Harwell
# Copyright (c) 2014 Eric Vergnaud
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistr... | sidhart/antlr4 | runtime/Python2/src/antlr4/tree/Tree.py | Python | bsd-3-clause | 5,508 | [
"VisIt"
] | a2c56bd621c905bf89b2a59f5faf7443e5ec201d06344dd66d8013097de155f5 |
# Dual annealing unit tests implementation.
# Copyright (c) 2018 Sylvain Gubian <sylvain.gubian@pmi.com>,
# Yang Xiang <yang.xiang@pmi.com>
# Author: Sylvain Gubian, PMP S.A.
"""
Unit tests for the dual annealing global optimizer
"""
from scipy.optimize import dual_annealing
from scipy.optimize._dual_annealing import V... | jamestwebber/scipy | scipy/optimize/tests/test__dual_annealing.py | Python | bsd-3-clause | 9,165 | [
"VisIt"
] | 1e8e9c10ef7df37e27efdc3a6f4c794eca531e3af2ba4c39190732ba882a2e77 |
import numpy as np
from cryspy import const
from cryspy import geo
from cryspy import crystal
from cryspy.fromstr import fromstr as fs
from cryspy import tables
def make_blender_script(atomset, metric, structurename, outfilename):
assert isinstance(atomset, crystal.Atomset), \
"atomset must be of type cry... | tobias-froehlich/cryspy | cryspy/blender.py | Python | gpl-3.0 | 20,177 | [
"CRYSTAL"
] | 34d0c9cd7ce832acf684d2d44fe5d6ab9423edd3426b41adf406daf78102a60a |
# Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
"""
Unit tests for
:func:`iris.fileformats.netcdf._translate_constraints_to_var_callback`.
"""
from unittest.mock import Magi... | bjlittle/iris | lib/iris/tests/unit/fileformats/netcdf/test__translate_constraints_to_var_callback.py | Python | lgpl-3.0 | 3,835 | [
"NetCDF"
] | e9b8daa3dd4df006a481415b76abc07407a022faccf44cfbe0e6635dc027431d |
#
# 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... | pgandhi999/spark | python/pyspark/ml/regression.py | Python | apache-2.0 | 75,478 | [
"Gaussian"
] | 7ed32a16e9c4bd5e6784485c98b404d6bda9ca4ef22c5a683d8db6c16106b973 |
""" processing of timeseries """
import logging
logger = logging.getLogger(__name__)
from netCDF4 import Dataset
from cdo import * # python version
cdo = Cdo()
cdo.forceOutput = True
def fldmean(resource, prefix=None, dir_output = None ):
from os import path # join, basename , curdir
from os import mkdir
... | sradanov/flyingpigeon | flyingpigeon/timeseries.py | Python | apache-2.0 | 13,953 | [
"NetCDF"
] | 453629a4a6d0c2cc23e6cb2fc1a78abca88485865af91f0a296a0c7bb1ced1aa |
# (c) 2014, Brian Coca, Josh Drake, et al
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
... | jeremypogue/ansible | lib/ansible/plugins/cache/jsonfile.py | Python | gpl-3.0 | 5,656 | [
"Brian"
] | 7590da8bc30e0ad0f1f4fab7e7ae7d7f71c1447141294aa51c8d5e98c27cf18c |
#!/usr/bin/env python
from __future__ import division
import sys
from galaxy import eggs
import pkg_resources; pkg_resources.require( "bx-python" )
from bx.arrays.array_tree import *
from bx.arrays.wiggle import WiggleReader
BLOCK_SIZE = 100
def main():
input_fname = sys.argv[1]
out_fname = sys.argv[2]
... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/datatypes/converters/wiggle_to_array_tree_converter.py | Python | gpl-3.0 | 655 | [
"Galaxy"
] | 6fdc4916a039bb9582c10b7f5cfffe4e2b5ab662ab59be5da759121e3abd949a |
#
# Copyright (C) 2013,2014,2015,2016 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)... | KonradBreitsprecher/espresso | testsuite/npt.py | Python | gpl-3.0 | 2,520 | [
"ESPResSo"
] | 5d12e3153d61ece0f18f0fc1e3d744d2f43a52c3a4d96018d352cd1af04bd75c |
# 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 u... | yajiedesign/mxnet | python/mxnet/numpy/random.py | Python | apache-2.0 | 40,864 | [
"Gaussian"
] | 7d651709728bafbbf1b6522e9492f34ad5b79b399dafb15feee90d764da6ca47 |
# Copyright 2001-2004 Brad Chapman.
# Revisions copyright 2009-2013 by Peter Cock.
# Copyright 2009 by Cymon J. Cox. 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
# as part of this package.
# ... | openpaul/DNApy | muscle_wrapper.py | Python | gpl-3.0 | 63,078 | [
"BLAST",
"Biopython"
] | e66020f35965dd9eea106e7896409dac57e62c5bf961939292525f7e37f4f065 |
#!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | sunqm/pyscf | pyscf/pbc/dft/rks.py | Python | apache-2.0 | 8,175 | [
"PySCF"
] | b0fb15da26d0cc2a5eca052b62654f5f282ecf995b59bf25d735d259ffd8e4f4 |
'''
Path: magpy.lib.magpy_formats
Part of package: stream (read/write)
Type: Input tester, call to read library
PURPOSE:
Tests which format a file has using the read library.
CONTAINS:
isFormat: (Func) Runs through datatypes in library to find fitting t... | hschovanec-usgs/magpy | magpy/lib/magpy_formats.py | Python | gpl-3.0 | 16,346 | [
"NetCDF"
] | 7cd911e6e234524e519736a3997491c42864a47f45460717c715da54469bd265 |
'''
interface to genesis
'''
import socket
import errno
import math
from ocelot.rad.fel import *
from ocelot.cpbd.beam import * # Twiss, Beam, gauss_from_twiss, ParticleArray
from ocelot.cpbd.elements import *
from ocelot.utils.launcher import *
from ocelot.common.math_op import *
from ocelot.optics.wave import *
fr... | ocelot-collab/ocelot | ocelot/adaptors/genesis.py | Python | gpl-3.0 | 141,650 | [
"Gaussian"
] | 18e9b336c5e32554875f0278ec0cc43f050b4afb4b9f621d32031787dc1fee39 |
#!/usr/bin/env python
# -*- coding: latin-1 -*-
"""
Library of commonly used functions in kajgps and elsewhere
"""
from functools import wraps
from collections import namedtuple
import datetime
import codecs
import sys
import errno
import os
import csv
import kajfmt as fmt
import kajhtml
from kajhtml import td, tdr... | Green-Elk/kajgps | kajlib.py | Python | gpl-3.0 | 13,647 | [
"Elk"
] | 39fff558b66c1c428987bf288de36e4c4feda5a23b937e6f06efb0ddd2a11a29 |
"""This module defines the Atom object."""
import numpy as np
from ase.data import atomic_numbers, chemical_symbols, atomic_masses
# Singular, plural, default value:
names = {'position': ('positions', np.zeros(3)),
'number': ('numbers', 0),
'tag': ('tags', 0),
'momentum': ('momenta', np.z... | suttond/MODOI | ase/atom.py | Python | lgpl-3.0 | 6,321 | [
"ASE"
] | 7eb7856cabb366e70930a451a15df8127d277954da1afd3703916a5f28deef69 |
__author__ = 'brian'
from rog import views
from django.conf.urls import url,include
from datetime import datetime
urlpatterns = [
url(r'^$',views.index),
url(r'^api/',include(
[
#url(r'^$', views.index, name='index'),
url(r'^activities/$', views.activities, name='activities'),
... | kenyansongithub/django-rog | rog/urls.py | Python | bsd-2-clause | 347 | [
"Brian"
] | c6ff5c18c15ad41d4d1fcad40a7ce040bf905a315946d00673998e24bfba75fd |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2005-2008 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... | tiagocardosos/stoq | plugins/ecf/couponprinter.py | Python | gpl-2.0 | 17,238 | [
"VisIt"
] | c5b7ee57ad29f01f4adfb47f4bab849d6fb4b8ad3af3c5e61b130a4335c30576 |
"""
This is the Data Integrity Client which allows the simple reporting of
problematic file and replicas to the IntegrityDB and their status
correctly updated in the FileCatalog.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import six
from DIRAC impor... | ic-hep/DIRAC | src/DIRAC/DataManagementSystem/Client/DataIntegrityClient.py | Python | gpl-3.0 | 9,328 | [
"DIRAC"
] | eb199486d01154e3fdcd45a8f855d12b42e932c6736cc3cf27f0a838787fc002 |
# -*- coding: utf8 -*-
# SXRD_Collect - GUI program for collection single crystal X-ray diffraction data
# Copyright (C) 2015 Clemens Prescher (clemens.prescher@gmail.com)
# GSECARS, University of Chicago
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General P... | Luindil/SXRD_Collect | sxrd_collect/xps_trajectory/xps_trajectory.py | Python | gpl-3.0 | 12,383 | [
"CRYSTAL"
] | a4979e080c388c138467739dec9fb219c1a09ec4468b6cf294713a1495535112 |
#!/usr/bin/env python
"""Generates 2dimensional Gaussian distribution
"""
import argparse
import sys
import numpy as np
import matplotlib.pyplot as plt
def main(args):
mean = [4, 4]
cov = [[0.5, 0],
[0, 0.5]]
sample = np.random.multivariate_normal(mean, cov, args.size)
np.savetxt(args.outp... | sdukshis/ae | generate.py | Python | apache-2.0 | 1,014 | [
"Gaussian"
] | 0830cf4042fd72d6816ee0a5603f85f720836f014be3f4a90f225096f521e01c |
# -*- coding: utf-8 -*-
# Copyright (C) 2016 Fabio Falcinelli
#
# 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 Software Foundation, either version 3 of the License, or
# (at your option) any later version.
... | mhils/pydivert | pydivert/windivert/__init__.py | Python | lgpl-3.0 | 21,126 | [
"VisIt"
] | 7a1813a5cda31de239d85644a04226a69e79ef5e7f3cbd1c9e1c04def79180de |
#!/usr/bin/env python
"""
This file generates random test data from sample given data for
given models.
"""
import inspect
import os
import random
from django.db.models import Model
from fields_generator import generate_random_values
from model_reader import is_auto_field
from model_reader import is_related
from model_... | mostafa-mahmoud/djenerator | djenerator/generate_test_data.py | Python | mit | 13,070 | [
"VisIt"
] | 3eec458ffa182784cb6360082882f58d6e5fea676d770169d8e4ebd24887f386 |
# Copyright 2008, 2009
# CAMd (see accompanying license files for details).
import os
import sys
from optparse import OptionParser, SUPPRESS_HELP
import ase.gui.i18n
from gettext import gettext as _
# Grrr, older versions (pre-python2.7) of optparse have a bug
# which prevents non-ascii descriptions. How do we circ... | askhl/ase | ase/gui/ag.py | Python | gpl-2.0 | 5,380 | [
"ASE"
] | a8b187f5a10243a90a518c0b8fa36de9b0ead51f738c5fd2c685942a06554bed |
from django.db import models, transaction
from django.db.models import get_model
from edc_appointment.models import AppointmentMixin
from edc_base.audit_trail import AuditTrail
from edc_base.model.models import BaseUuidModel
from edc_base.model.validators import (datetime_not_before_study_start, datetime_not_future,)
... | botswana-harvard/microbiome | microbiome/apps/mb_maternal/models/postnatal_enrollment.py | Python | gpl-2.0 | 7,520 | [
"VisIt"
] | 209afaf814aaf8cede3189b894fc591e280033bfaee76a9ed8089704c8348d99 |
from .subject_schedule import SubjectSchedule, SubjectScheduleError
from .schedule import Schedule
from .site_visit_schedules import site_visit_schedules
from .visit import Visit, Crf, Requisition, FormsCollection, Panel
from .visit_schedule import VisitSchedule
| botswana-harvard/edc-visit-schedule | edc_visit_schedule/__init__.py | Python | gpl-2.0 | 263 | [
"VisIt"
] | 8dd20105ae0dd4dadf611d3be202bb96e62bda555dcde9029c578b4ccb65f4af |
# $Id$
#
# Copyright (C) 2003-2006 Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
from __future__ import print_function
... | soerendip42/rdkit | rdkit/Dbase/DbReport.py | Python | bsd-3-clause | 7,480 | [
"RDKit"
] | 306e1dcab8353dacbb44bffae621e878f5261da14dcd8272f166c7fc3a511d19 |
# Copyright 2017 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | google/decoupled_gaussian_process | decoupled_gaussian_process_model.py | Python | apache-2.0 | 4,419 | [
"Gaussian"
] | 27ef23c6b5d8c59ef8abf1633084e4139c46ddb5971ff603d4871b1ee72bde46 |
__source__ = 'https://leetcode.com/problems/lexicographical-numbers/'
# https://github.com/kamyu104/LeetCode/blob/master/Python/lexicographical-numbers.py
# Time: O(n)
# Space: O(1)
#
# Description: Leetcode # 386. Lexicographical Numbers
#
# Given an integer n, return 1 - n in lexicographical order.
#
# For example, ... | JulyKikuAkita/PythonPrac | cs15211/LexicographicalNumbers.py | Python | apache-2.0 | 3,826 | [
"VisIt"
] | b1872b0e0fa9ec794b4a11a75cf1e4ea7cd569ac776da2f81f12c81f82410b1d |
from __future__ import print_function
import unittest
import numpy as np
# from SimPEG.potential_fields import gravity
from SimPEG.utils.drivers import GravityDriver_Inv
from SimPEG.utils import io_utils
from scipy.constants import mu_0
import shutil
import os
class GravSensProblemTests(unittest.TestCase):
def s... | simpeg/simpeg | tests/pf/test_gravity_IO.py | Python | mit | 1,869 | [
"Gaussian"
] | a84d86c80eec78063c57a9db729b37ef590063e186943d8bf9b0c2fda43aa147 |
from electrum_grs.i18n import _
fullname = _('Two Factor Authentication')
description = ''.join([
_("This plugin adds two-factor authentication to your wallet."), '<br/>',
_("For more information, visit"),
" <a href=\"https://api.trustedcoin.com/#/electrum-help\">https://api.trustedcoin.com/#/electrum-help... | GroestlCoin/electrum-grs | electrum_grs/plugins/trustedcoin/__init__.py | Python | gpl-3.0 | 420 | [
"VisIt"
] | 7df5cd4523ea20d5e4c9bb8f24fc06c2987461466dfdc006ca0d791888951e71 |
"""
RasterPlot.py
Jose Guzman, sjm.guzman@gmail.com
Last change: Fri Sep 23 20:26:04 CEST 2016
A test with a single compartment to see the Raster plot in hoc
To execute it with IPython:
%run RasterPlot.py
"""
import numpy as np
import matplotlib.pyplot as plt
from neuron import h
from neuron import gui # allows... | JoseGuzman/NeuralNetworks | tests/RasterPlot/RasterPlot.py | Python | gpl-2.0 | 2,948 | [
"NEURON"
] | 6b60cc2b4abec3475072af5b2e1817a5ca7de2f72342e25a8fb0286c516c1a21 |
"""
Copyright (c) 2016 Gianluca Gerard
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute... | glgerard/cloud-mdbn | src/dbn.py | Python | apache-2.0 | 25,729 | [
"Gaussian"
] | 31dc3f4b9064993e2cf6382ccd11f38ce41b8fd003938441087575b529e08d98 |
#!/usr/bin/python
"""
SuperMatrix Copyright (C) 2012 Jose Sergio Hleap
This script will go over the fasta files created by SeqFetcher (or at least in the same format),
will create new fasta files with consensus sequences per species and transform them to nexus
using Joseph Hughes (University of Glasgow) Consensus.pl ... | jshleap/Phylogenetics | SuperMatrix.py | Python | gpl-3.0 | 8,355 | [
"BLAST",
"BioPerl",
"Biopython"
] | 394e30f38ac02a50745a62b33717c3137a4320908d7312733979682292d52585 |
# -*- coding: utf-8 -*-
# Copyright (C) 2019 - 2020 by Pedro Mendes, Rector and Visitors of the
# University of Virginia, University of Heidelberg, and University
# of Connecticut School of Medicine.
# All rights reserved.
# Copyright (C) 2017 - 2018 by Pedro Mendes, Virginia Tech Intellectual
# Properties, Inc.,... | copasi/COPASI | copasi/bindings/python/unittests/Test_RunParameterFitting.py | Python | artistic-2.0 | 10,256 | [
"COPASI"
] | d9b02463c9f379534d5a866b3be7f7dd573ac41a525b429ab03e2d62648f6703 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path
from distutils.version import LooseVersion
from glob import glob
from io import BytesIO
from numbers import Number
import numpy as np
from .. import backends, conventions
from .common import Ar... | jhamman/xray | xarray/backends/api.py | Python | apache-2.0 | 28,151 | [
"NetCDF"
] | 9e383ed9d116bd5311cbde0e9a9da38c19df78574c0b1adb153c177ee607301b |
import mixtape.featurizer, mixtape.tica, mixtape.cluster, mixtape.markovstatemodel
import numpy as np
import mdtraj as md
from mixtape import ghmm, feature_selection, subset_featurizer
from parameters import load_trajectories, build_full_featurizer
import sklearn.pipeline, sklearn.externals.joblib
import mixtape.utils
... | kyleabeauchamp/PMTStuff | code/optimize_NSD1.py | Python | gpl-2.0 | 955 | [
"MDTraj"
] | 85fe8d0ae2080f29b1973366ea8486c27673c636d69b1ae9906bdae77093832d |
"""
@name: Modules/Core/Utilities/_test/test_convert.py
@author: D. Brian Kimmel
@contact: D.BrianKimmel@gmail.com
@copyright: 2013-2019 by D. Brian Kimmel
@license: MIT License
@note: Created on Apr 4, 2013
@summary: This module is for testing conversion tools.
Passed all 14 tests - DBK - 2019-03-3... | DBrianKimmel/PyHouse | Project/src/Modules/Core/Utilities/_test/test_convert.py | Python | mit | 6,756 | [
"Brian"
] | b68829a784e039095fb19c452fdd41aca587a5d04277786df87e8fd49e98b077 |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'Patient', fields ['clinic', 'serial']
db... | myvoice-nigeria/myvoice | myvoice/clinics/migrations/0047_auto__add_field_patient_temp_serial__del_unique_patient_clinic_serial.py | Python | bsd-2-clause | 13,824 | [
"VisIt"
] | 3643d336b496a589c5438441334842b3967c153751ba741d29c827827827a15c |
# $Id$
#
# Copyright (C) 2007-2009 Greg Landrum
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
import os
from rdkit import Chem
from rdkit.Chem i... | bp-kelley/rdkit | rdkit/Chem/MolDb/Loader_sa.py | Python | bsd-3-clause | 5,920 | [
"RDKit"
] | 58331c377074741c2ccac0c2cfb282d41af69c609263dc101afe556dcb638da6 |
# NOTE: This example uses the next generation Twilio helper library - for more
# information on how to download and install this version, visit
# https://www.twilio.com/docs/libraries/python
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/user/account
account = "ACXXXXXXXXXXXXXXXXXXXXX... | teoreteetik/api-snippets | notifications/rest/credentials/list-credential/list-credential.6.x.py | Python | mit | 507 | [
"VisIt"
] | bee04ee29a0281393b686eb57e3c09848942095d4adda2ce105d9461e116b425 |
# -*- coding: utf-8 -*-
from iminuit import Minuit
from matplotlib import pyplot as plt
from numpy.random import randn
from probfit import BinnedLH, Extended, gaussian
data = randn(1000) * 2 + 1
# Unextended
blh = BinnedLH(gaussian, data)
# if you wonder what it looks like call describe(blh)
m = Minuit(blh, mean=0.... | iminuit/probfit | doc/pyplots/costfunc/blh.py | Python | mit | 768 | [
"Gaussian"
] | 2fb95dc7ef3e01b072f0c65b7d70a01fa595e2c3f0bedf90ba3e2b3b4effc89f |
# ASSUMES that art_illumina is the PATH env var
import os
import subprocess
import shutil
import Utility
import csv
import sam.sam_handler as sam_handler
import sys
import logging
import config.settings as settings
# If fragments are 500bp and read pairs do not overlap: for 1x coverage, 10k indiv * 9kbp per indiv / 5... | cfe-lab/Umberjack | test/simulations/generate_reads.py | Python | bsd-2-clause | 24,439 | [
"BWA",
"Bowtie"
] | c29485cab6c4f4e87c77a9312da6964df3418140d730f073fc5a2e6c256c06e2 |
#! /usr/bin/python
# -*- coding: utf-8 -*-
"""
Module is used for visualization of segmentation stored in pkl file.
"""
import sys
import os.path
path_to_script = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.join(path_to_script, "../extern/dicom2fem/src"))
import logging
logger = logging.getLog... | mjirik/imtools | imtools/lar_show_segmentation.py | Python | mit | 4,819 | [
"VTK"
] | cfd0e335dcfbca132f0802a4643cc955dc363d4961084647717feb3963c0b717 |
# creates: ase-db.out, ase-db-long.out
import ase.db
c = ase.db.connect('abc.db', append=False)
from ase import Atoms
from ase.calculators.emt import EMT
h2 = Atoms('H2', [(0, 0, 0), (0, 0, 0.7)])
h2.calc = EMT()
h2.get_forces()
c.write(h2, relaxed=False)
from ase.optimize import BFGS
BFGS(h2).run(fmax=0.01)
c.write... | misdoro/python-ase | doc/ase/db/db.py | Python | gpl-2.0 | 1,141 | [
"ASE"
] | 60b28c25eff5599c372f9550b565a0609f324ce4d7ad01094caa4009638a3bbd |
# -*- coding: utf-8 -*-
from . import base
from ..materials import compoundfromname
from ..materials import element
from ..utils import constants
from ..utils.classfactory import with_metaclass
from ..utils import instance
from ..utils import units
from ..math import linalg
import scipy.special
import numpy as np
fro... | woutdenolf/spectrocrunch | spectrocrunch/detectors/xrf.py | Python | mit | 36,931 | [
"Gaussian"
] | a053234b82ababea2ebcb69135f80a7cd7b8876e14672ecf6f3dc1d36680f0a4 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
from td.constants import EV2NM
from td.helper_funcs import FLOAT_RE
from td.ExcitedState import ExcitedState
def parse_tddft(text):
# Use transition electric dipole moments
abs_re = "VIA TRANSITION ELECTRIC DIPOLE MOMENTS(.+?)-\s*A"
abs_text = re.... | eljost/td | td/parser/orca.py | Python | gpl-3.0 | 2,978 | [
"ORCA"
] | e82f24fad0ebf938880de74dc0fd17e9ce6bed29634913eecd236643e3854bb2 |
import numpy as np
import gym
from baselines import logger
from baselines.her.ddpg import DDPG
from baselines.her.her import make_sample_her_transitions
DEFAULT_ENV_PARAMS = {
'FetchReach-v1': {
'n_cycles': 10,
},
}
DEFAULT_PARAMS = {
# env
'max_u': 1., # max absolute value of actions on d... | dsbrown1331/CoRL2019-DREX | drex-mujoco/learner/baselines/baselines/her/experiment/config.py | Python | mit | 6,798 | [
"Gaussian"
] | 4fdd6f94f029baa9e51352aa8cbec8aa822d64cf93e004e84be2a62cff5030f3 |
#!/usr/bin/env python
# coding=utf-8
# Contributor:
# Phus Lu <phus.lu@gmail.com>
__version__ = '3.0.7'
__password__ = ''
__hostsdeny__ = ()
#__hostsdeny__ = ('.youtube.com', '.youku.com', ".googlevideo.com")
__content_type__ = 'image/gif'
import sys
import os
import re
import time
import struct
import zl... | viger/docker | proxy/proxy/code/default/gae_proxy/server/gae/wsgi.py | Python | mit | 12,562 | [
"VisIt"
] | 465063b3e64d3f1c04d4113e7fa07ce9806f76795456c2a6691a48efac7c26b9 |
# -*- coding: utf-8 -*-
# Author: Vincent Dubourg <vincent.dubourg@gmail.com>
# (mostly translation, see implementation details)
# Licence: BSD 3 clause
from __future__ import print_function
import numpy as np
import scipy as sp
from scipy import linalg, optimize, rand
from ..base import BaseEstimator, Regr... | marcocaccin/scikit-learn | sklearn/gaussian_process/gaussian_process.py | Python | bsd-3-clause | 38,201 | [
"Gaussian"
] | cd991c3d97d823ba17106f2546e3204fe8c457bfe0107cc3a9afe56724de240c |
# Copyright (c) 2012, Cloudscaling
# 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 applicable... | cloudbase/nova | nova/hacking/checks.py | Python | apache-2.0 | 31,168 | [
"VisIt"
] | 7b6bfff9e204b8b899251a236e472c89aba1a4b3ebb8fc403ae209ffd4ff5368 |
#!/usr/bin/env python2
# encoding: utf-8
# The MIT License (MIT)
#
# Copyright (c) 2015 Shane O'Connor
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including withou... | Kortemme-Lab/klab | klab/bio/basics.py | Python | mit | 38,048 | [
"Biopython"
] | 3ec5cf76d6205e515c316b9190116426e3063b9d82c367b073bc91afc11f0aaa |
# Copyright (c) 2013, GlaxoSmithKline Research & Development Ltd.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# ... | AlexanderSavelyev/rdkit | rdkit/Chem/Fraggle/FraggleSim.py | Python | bsd-3-clause | 16,925 | [
"RDKit"
] | 9ac99c1dc91572a662ff5f0cfe1277048cf74559d838284b04f85c1686ae4521 |
"""The tasks module provides a simple light-weight alternative to threads.
When you have a long-running job you will want to run it in the background,
while the user does other things. There are four ways to do this:
- Use a new thread for each task.
- Use callbacks from an idle handler.
- Use a recursive mainloop... | timdiels/0install | zeroinstall/support/tasks.py | Python | lgpl-2.1 | 11,869 | [
"VisIt"
] | 7c203ecce9a6e23b40a74064204973f0b650469679e2ae850961ff38530b7991 |
import requests
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
ABERRANT_PLURAL_MAP = {
'appendix': 'appendices',
'barracks': 'barracks',
'cactus': 'cacti',
'child': 'children',
'criterion': 'criteria',
'deer': 'deer',
'echo': 'echoes',
... | edilio/api_builder | apps/builder/views.py | Python | mit | 4,519 | [
"CASINO"
] | 8c95b3a3ee88904adf40b9abfe6b3b67cb52dcc09b8c37f9963803c700840459 |
# -*- coding: utf-8 -*-
#
# Brian2GeNN documentation build configuration file, copied from Brian 2
# equivalent, which was created by sphinx-quickstart on
# Tue Aug 14 14:57:16 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values ... | brian-team/brian2genn | docs_sphinx/conf.py | Python | gpl-2.0 | 10,654 | [
"Brian"
] | b1f8fc408e6fe02c753b6b07a8359b6b51db1870dc65c97b0dbc4c709988d798 |
#
# 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... | yashdsaraf/scancode-toolkit | src/licensedcode/match_aho.py | Python | apache-2.0 | 5,926 | [
"VisIt"
] | b59c3b3d6c6a9a304fa5a45bcd46ba48e5761fdf7edf791e15e8e7016ec20219 |
"""Testing for kernels for Gaussian processes."""
# Author: Jan Hendrik Metzen <jhm@informatik.uni-bremen.de>
# License: BSD 3 clause
from sklearn.externals.funcsigs import signature
import numpy as np
from sklearn.gaussian_process.kernels import _approx_fprime
from sklearn.metrics.pairwise \
import PAIRWISE_K... | mbayon/TFG-MachineLearning | venv/lib/python3.6/site-packages/sklearn/gaussian_process/tests/test_kernels.py | Python | mit | 12,799 | [
"Gaussian"
] | b8f27ed66138547769f2579ec25f73443e96bc4fa75da2ea5aa4af45cec5da6f |
from ase.structure import bulk
from gpaw import GPAW, FermiDirac
a = 5.431
atoms = bulk('Si', 'diamond', a=a)
calc = GPAW(h=0.20,
kpts=(12,12,12), # The result should be converged with respect to kpoints !
xc='LDA',
basis='dzp', # Use LCAO b... | qsnake/gpaw | doc/tutorials/dielectric_response/silicon_gs.py | Python | gpl-3.0 | 852 | [
"ASE",
"GPAW"
] | 497233e8790092ad10ca45ca2d5fa1ba8944bf0bd57ff6e535e321fb66ed65c0 |
#!/usr/bin/python
'''
Copyright 2012 Google Inc.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
'''
'''
Rebaselines the given GM tests, on all bots and all configurations.
Must be run from the gm-expected directory. If run from a git or SVN
checkout, the files will... | Frankie-666/color-emoji.skia | tools/rebaseline.py | Python | bsd-3-clause | 2,971 | [
"Galaxy"
] | f0789aa5d8d5b40449013698cf6e7c7e90505e12c43dea384c1c949804f20624 |
# coding=utf-8
import os
import random
import string
from datetime import datetime, timedelta
from unittest import mock
from autoslug.utils import slugify
from django.conf import settings
from django.contrib.auth import SESSION_KEY
from django.db.models.fields.files import FieldFile
from django.http import HttpRespons... | sairon/score-phorum | src/phorum/tests/test_views.py | Python | bsd-3-clause | 42,594 | [
"VisIt"
] | f596e403123f81ba2124d48d49c5cc5b3b616c8e9459a7276541fc096044b4af |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.