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 |
|---|---|---|---|---|---|---|---|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2014 IBM Corporation
# Copyright 2015 Lenovo
#
# 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/LI... | whowutwut/confluent | confluent_server/confluent/config/attributes.py | Python | apache-2.0 | 19,871 | [
"exciting"
] | 5e2e580d131058198b72d0d40d86d63b30ef5f99f75f3e1a3a45bf7d143871c6 |
#!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 16.3.8
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... | j00bar/ansible | lib/ansible/modules/network/avi/avi_sslprofile.py | Python | gpl-3.0 | 7,086 | [
"VisIt"
] | 40119195f7c7342d079e42d891fa65297e72da5fd35ec2f6581766986dbc9201 |
# $Id$
#
# Copyright (C) 2001-2006 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.
#
"""basic unit testing code for SMILES canonicali... | rvianello/rdkit | rdkit/Chem/UnitTestSmiles.py | Python | bsd-3-clause | 4,984 | [
"RDKit"
] | 2096486ab2c3de00afd9e46ccd49ec964ffbacbec69d5490f071a68da3b85715 |
# 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.
#
from Bio import Alphabet
COUNT = 1
FREQ = 2
##################################################################
# A class to handle frequency tables
#... | updownlife/multipleK | dependencies/biopython-1.65/build/lib.linux-x86_64-2.7/Bio/SubsMat/FreqTable.py | Python | gpl-2.0 | 2,777 | [
"Biopython"
] | d8ccb48e02a723bcb232b76c33727069d02b92e06c8e2f9136d08d2aa34d3354 |
from __future__ import print_function, division, absolute_import
from mdtraj.utils.six import iteritems
# methods to support testing
import os
import re
import functools
import numpy as np
from numpy.testing import (assert_allclose, assert_almost_equal,
assert_approx_equal, assert_array_almo... | mpharrigan/msmbuilder | MSMBuilder/testing.py | Python | gpl-2.0 | 6,453 | [
"MDTraj"
] | 9c6808b1ba936d4ff8e8b8a689f7e3f722e87ddf29af72e6d34879f73d2e29e4 |
"""
Test the coordinates class that represents the plane of orbit of the Sgr dwarf galaxy.
"""
# Third-party
import astropy.coordinates as coord
import astropy.units as u
from astropy.io import ascii
from astropy.table import Table
from astropy.utils.data import get_pkg_data_filename
import numpy as np
# This pro... | adrn/gary | gala/coordinates/tests/test_orphan.py | Python | mit | 2,090 | [
"Galaxy"
] | 5bb011f46d9d00b106230c72c00063d4bf0b89343dc91874c133f9cd1147ac74 |
""" Contains a class used for evaluating policies for accessing jobs/WMS/pilots accounting
"""
__RCSID__ = "$Id$"
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Security import Properties
from DIRAC.AccountingSystem.private.Policies.FilterExecutor import FilterExecutor
class JobPolicy( object ):
def __init__( se... | arrabito/DIRAC | AccountingSystem/private/Policies/JobPolicy.py | Python | gpl-3.0 | 2,970 | [
"DIRAC"
] | c3e58bcb922c3857afeaaa481e3543afb3b7fd9040d9fbc2c2e2d7e09ce03fae |
"""
Copyright (C) 2014, Jaguar Land Rover
This program is licensed under the terms and conditions of the
Mozilla Public License, version 2.0. The full text of the
Mozilla Public License is at https://www.mozilla.org/MPL/2.0/
Maintainer: Rudolf Streif (rstreif@jaguarlandrover.com)
"""
"""
Django settings for rvi p... | klooer/rvi_backend | settings.py | Python | mpl-2.0 | 7,090 | [
"Jaguar"
] | 4710671dd12855e17cde0c42a9a55e26fcbd2495e0f1b33814720ad339b176e9 |
# discord.py
# Base code by Eruantien
# ANWA-apecific code by Someone Else 37
#import asyncio
import discord
import logging
import time
import math
import traceback
import pickle
from sys import argv
from random import randint, gauss, shuffle
from statistics import *
from datetime import *
generat... | SomeoneElse37/BattleBot | battlebot.py | Python | mit | 105,716 | [
"Gaussian"
] | 8373b27560ec592e5ff12d9e2ebf7a24c0d15c5016a554558d60bb6c52d1a97c |
#! /usr/bin/python
import ast
import argparse
import os
import sys
import yaml
PATTERNS_V1 = []
PATTERNS_V2 = []
RESULT = {
"v1": PATTERNS_V1,
"v2": PATTERNS_V2,
}
class CallVisitor(ast.NodeVisitor):
def visit_Call(self, node):
if isinstance(node.func, ast.Name):
name = node.func.id
... | TribeMedia/synapse | scripts-dev/list_url_patterns.py | Python | apache-2.0 | 1,353 | [
"VisIt"
] | 41c59fe85cf97dec8123045e1fdc9c8367622e0bcf43b4563ca4cae0ac0f022a |
from pycalphad.plot.utils import phase_legend
from pycalphad.plot.binary.compsets import CompsetPair
from matplotlib.collections import LineCollection
from matplotlib.colors import to_rgba
import numpy as np
class TwoPhaseRegion():
"""
A group of points that belong to the same phase region.
Attributes
... | tkphd/pycalphad | pycalphad/plot/binary/zpf_boundary_sets.py | Python | mit | 11,495 | [
"pycalphad"
] | 8e196922dc3edcf20f685a2cf484aeeb819edd527c58825b267b430694fd624c |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Filters
=======
Filter bank construction
------------------------
.. autosummary::
:toctree: generated/
dct
mel
chroma
constant_q
Window functions
----------------
.. autosummary::
:toctree: generated/
window_bandwidth
get_window
Mi... | Cortexelus/librosa | librosa/filters.py | Python | isc | 25,414 | [
"Gaussian"
] | ade6f29489384e4c626d29804ffde40d83eb69e805c41d3bca8755b46b5a4707 |
# -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.db import mod... | shoopio/shoop | shuup/core/models/_manufacturers.py | Python | agpl-3.0 | 1,897 | [
"VisIt"
] | 2810cfb714578267264a9c5a7bda991da81d4f66194984d923a3cdf5aa8124f4 |
# -*- coding: utf-8 -*-
"""Sentiment analysis implementations.
.. versionadded:: 0.5.0
"""
from __future__ import absolute_import
from collections import namedtuple
import pigeo
from textblob import Blobber
import nltk
from textblob.en import sentiment as pattern_sentiment
from textblob.tokenizers import word_tokeniz... | juanc5ibanez/WhoLovesMe | WLMNaiveBayes.py | Python | apache-2.0 | 15,303 | [
"Galaxy",
"VisIt"
] | a617c1222852bc572a85488e5cfa4f9cd0b97c699152a3e308682ca8ab84b971 |
# isort:skip_file
"""
Dimensional analysis and unit systems.
This module defines dimension/unit systems and physical quantities. It is
based on a group-theoretical construction where dimensions are represented as
vectors (coefficients being the exponents), and units are defined as a dimension
to which we added a scale... | kaushik94/sympy | sympy/physics/units/__init__.py | Python | bsd-3-clause | 12,090 | [
"Avogadro"
] | ad524f2932b144ad9ea0bf5947dbbb8fe36a612fa39c723982a26c1ddce7d613 |
# -*- coding: utf-8 -*-
# Begin CVS Header
# $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/bindings/python/unittests/Test_CTrajectoryMethod.py,v $
# $Revision: 1.6 $
# $Name: $
# $Author: gauges $
# $Date: 2008/04/21 10:27:07 $
# End CVS Header
# Copyright (C) 2008 by Pedro Mendes, Virgini... | jonasfoe/COPASI | copasi/bindings/python/unittests/Test_CTrajectoryMethod.py | Python | artistic-2.0 | 899 | [
"COPASI"
] | ca7d3ac855d820dc2d840350e9382c69ee89d940e9f44cc57840724e9b3fc1d7 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2014 Edgewall Software
# Copyright (C) 2003-2007 Jonas Borgström <jonas@edgewall.com>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at htt... | jun66j5/trac-ja | trac/env.py | Python | bsd-3-clause | 40,535 | [
"VisIt"
] | 6d03cd3429e19858f8b9b65d64cb0456435b7fea2cc492a37e0d87e777060dbb |
# cd ~/SDSS/26/stellarpop
# rsync -avze comparat@login6.sciama.icg.port.ac.uk:/mnt/lustre/sdss-dr12/SDSS-DR12/stellarpop/????/spFlyPlate*.fits .
# 2627 files
# cd ~/SDSS/v5_10_0/stellarpop
# rsync -avze comparat@login6.sciama.icg.port.ac.uk:/mnt/lustre/sdss-dr12/eBDSS-DR14/stellarpop/*/spFlyPlate*.fits .
# 3005 files... | JohanComparat/pySU | spm/bin_SMF/missing_summary_files_FIREFLY.py | Python | cc0-1.0 | 44,081 | [
"Firefly"
] | 5988cc0cebf15d2fcb2dfa3eb885bde6f96c7831c969bc12e8597ffdc0362f02 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import time
# !! This is the configuration of Nikola. !! #
# !! You should edit it to your liking. !! #
# ! Some settings can be different in different languages.
# ! A comment stating (translatable) is used to denote those.
# ! There are two ways to... | gperetin/nikola-vapor-theme | conf.py | Python | mit | 44,205 | [
"VisIt"
] | 0789657d54b40b565c7e0a32bd23060987a3580cf5ed6e6faaa278f89c5bcebc |
#!/usr/bin/env python
"""
This script runs the given abinit input file with different number of processors
and compare the results
"""
from __future__ import print_function, division
import sys
import os
import argparse
import warnings
import tempfile
from collections import namedtuple
def browse_localpath(filepa... | SamKChang/abinit-7.10.5_multipole | developers/various/paradev.py | Python | gpl-3.0 | 5,515 | [
"ABINIT"
] | f1e86aa6997f92ffda2fd3899ba03586e02ba479ace5df9d9426493b4305309b |
import datetime
from billy.models import db
from .. import fixtures
def setup_func():
assert db.name.endswith('_test')
db.bills.drop()
db.legislators.drop()
db.document_ids.drop()
db.votes.drop()
db.vote_ids.drop()
db.committees.drop()
fixtures.load_metadata()
db.legislators.ins... | mileswwatkins/billy | billy/tests/models/__init__.py | Python | bsd-3-clause | 10,094 | [
"MOE"
] | 478ca4739d3b8c7f19628589f751129c5d7208d27619693b6fc073a5524b8493 |
# -*- coding: utf-8 -*-
"""
Subraph centrality and communicability betweenness.
"""
# Copyright (C) 2011 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import networkx as nx
from networkx.utils import *
__au... | JamesClough/networkx | networkx/algorithms/centrality/subgraph_alg.py | Python | bsd-3-clause | 9,496 | [
"Desmond"
] | d6200b321a55e47ecdfdd5431d3da946b06ef8d838f810f77706cb537c97fba4 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Grimoire Arthur lib.
#
# Copyright (C) 2015 Bitergia
#
# 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 yo... | sanacl/GrimoireELK | grimoire/arthur.py | Python | gpl-3.0 | 15,511 | [
"Elk"
] | 87f7b3b3a506055f4a67fa1c289c92d202111344c0e027df077bbc54a497a1f8 |
# Core of LP
#
# Author: Balkansoft.BlogSpot.com
# GNU GPL licensed
__VERSION__ = '1.0'
__ABOUT__ = 'Nano LP, v. %s'%__VERSION__
import re
import os
import sys
import copy
import stat
import pprint
#import atexit
import string
import random
import inspect
import fnmatch
import datetime
import warnings
import calendar... | bapcyk/nanolp | nanolp/core.py | Python | gpl-2.0 | 122,639 | [
"VisIt"
] | 89e9a92c543f346bf0d2d3f7cac15f30ef6e03f6c8d8a5aa5d6174c5fd24277c |
#!/usr/bin/python
#Implementing image segmentation using mean shift clustering approach.
#Author: Arvind RS
#Date: 10/21/2016
import numpy as np, scipy.misc, scipy.signal
import time, os, math, sys
import matplotlib.pyplot as plt
#Algorithm:
#1. Load the input image into a variable X.
#2. For each pixel x in X:
#2.a... | arvind-rs/computer_vision | mean_shift_segmentation/mean_shift_segmentation.py | Python | mit | 2,964 | [
"Gaussian"
] | 6eeb64555d2aa14b8973efe2b15709d0fa770b50820fe632dcd7b6fae41c8208 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon 3 July
The goal of this script is to code the Style Transfer Algorithm
Inspired from https://github.com/cysmith/neural-style-tf/blob/master/neural_style.py
and https://github.com/leongatys/PytorchNeuralStyleTransfer/blob/master/NeuralStyleTransfer.ipy... | nicaogr/Style-Transfer | Invert.py | Python | gpl-3.0 | 32,538 | [
"Gaussian"
] | 3a3d3d977837b8b854e732307353d5eb7ac33c428d4b337c2df7dc37d2f9fd27 |
import logging
from cis.data_io.Coord import Coord, CoordList
from cis.data_io.products.AProduct import AProduct
from cis.data_io.ungridded_data import UngriddedData, Metadata, UngriddedCoordinates
import cis.utils as utils
class cis(AProduct):
# If a file matches the CIS product signature as well as another sign... | zak-k/cis | cis/data_io/products/products.py | Python | gpl-3.0 | 6,840 | [
"NetCDF"
] | fa2e1401ec3a3e198282f53903bcde322e1144398a7f5925167b30c2e956aa8b |
#rewrite the program (which a burglar stole from me!) and then release it onto telegram and messenger!
''' argh what cocktail can i make with these ingredients? search and return a cocktail which has
the most matching ingredients'''
from enchant.checker import SpellChecker
import re
print("What? Cocktail")
print()
pri... | jaskaransarkaria/JARVIS-on-Messenger | modules/src/what_cocktail.py | Python | mit | 16,989 | [
"ESPResSo"
] | 7ab00edf9d963c99c5f13e6f576c277c74d7785650e72bb9f1d0e1f547dc19d5 |
""" FreeDiskSpacePolicy
FreeDiskSpacePolicy.__bases__:
DIRAC.ResourceStatusSystem.PolicySystem.PolicyBase.PolicyBase
"""
from DIRAC import S_OK
from DIRAC.ResourceStatusSystem.PolicySystem.PolicyBase import PolicyBase
class FreeDiskSpacePolicy(PolicyBase):
"""
The FreeDiskSpacePolicy class is a poli... | DIRACGrid/DIRAC | src/DIRAC/ResourceStatusSystem/Policy/FreeDiskSpacePolicy.py | Python | gpl-3.0 | 2,103 | [
"DIRAC"
] | 2ce04587e65219af6f65bf56775879bf438380658600941a606bd6fdbce1b04e |
"""
Create a profile from an ASCII CTD datafile
===========================================
Use the TAMOC ambient module to create profiles in netCDF format for use by
TAMOC from data in text files downloaded from a CTD. This file demonstrates
working with the data from the R/V Brooks McCall at Station BM 54 on May ... | socolofs/tamoc | bin/ambient/nc_profile_from_ctd.py | Python | mit | 6,344 | [
"NetCDF"
] | e7c85c06e3069c0021f83ac3cf0fecf8a8e217767d9bf980495ae2f7480da05f |
#!/usr/bin/env python
# Copyright 2018-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... | gkc1000/pyscf | pyscf/sgx/sgx_jk.py | Python | apache-2.0 | 13,646 | [
"PySCF"
] | d50ec8ef885f60b6a3ba0ad53cf29bcc992a200224556fa5788bfb60be251c00 |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | googleapis/python-dialogflow | tests/unit/gapic/dialogflow_v2beta1/test_intents.py | Python | apache-2.0 | 121,480 | [
"Octopus"
] | 8f5d562b200bca1d8b6c27095ccfcad2acea7e4efae2a3ec9453993b03a599e5 |
import glob
import pandas as pd
import numpy as np
pd.set_option('display.max_columns', 50) # print all rows
import os
os.chdir("/gpfs/commons/home/biederstedte-934/evan_projects/correct_phylo_files")
normalB = glob.glob("binary_position_RRBS_normal_B_cell*")
mcell = glob.glob("binary_position_RRBS_NormalBCD19pCD27... | evanbiederstedt/RRBSfun | trees/chrom_scripts/total_chrY.py | Python | mit | 32,997 | [
"MCell"
] | 6a45b240dea4efadbcbfd4b3b334083dc743e91e5b4e82e8191a857afd576de4 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2005, 2006 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 Soft... | andrebellafronte/stoq | stoqlib/lib/validators.py | Python | gpl-2.0 | 6,379 | [
"VisIt"
] | 4686229965415cd446348fe55c32eb1415aa907f15b4e57b3039bd6b883bde38 |
'''
SASMOL: Copyright (C) 2011 Joseph E. Curtis, Ph.D.
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.
... | madscatt/sasmol | src/python/test_sasmol/test_sasio/test_unit_sasio_Files_print_error.py | Python | gpl-3.0 | 1,767 | [
"CHARMM"
] | 8d3a187c9a56e1cbca3828d72137fc564a2b4f5a978c13c8952f9993bc4f6519 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# unpack - front end to general zip/tar unpack back end
# Copyright (C) 2003-2015 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 the GNU Gener... | heromod/migrid | mig/cgi-bin/unpack.py | Python | gpl-2.0 | 1,089 | [
"Brian"
] | 71081f8f045e3e42eb7cc2c9d0f7b67f25faa2cfb0a43c085c35eb3124f7ae62 |
import os
from socket import gethostname
import time
import urllib
from uuid import getnode as getmac
import webbrowser
import httplib2 # included with oauth2client
from oauth2client.client import OAuth2WebServerFlow, TokenRevokeError
import oauth2client.file
import gmusicapi
from gmusicapi.clients.shared import _Ba... | nvbn/Unofficial-Google-Music-API | gmusicapi/clients/musicmanager.py | Python | bsd-3-clause | 24,071 | [
"VisIt"
] | 957a2c9608a2fb60530ff456eb05afd1633b13f54f7130b2c2a937f0161bf268 |
#! /usr/bin/python
#
# SCANIT - Control A spectrometer and collect data
#
# LICENSE:
# This work is licensed under the Creative Commons Zero License
# Creative Commons CC0.
# To view a copy of this license, visit
# http://directory.fsf.org/wiki/License:CC0
# or send a letter to:
# Creative Commons, PO Box 1866, Mounta... | jluscher/SCANIT | scanit_v037.py | Python | cc0-1.0 | 98,032 | [
"VisIt"
] | 794e46822fe039d34fad02ab6bcaed1f0c706f561907a159972c46fb012fc26b |
from director import objectmodel as om
from director import affordanceitems
from director import lcmobjectcollection
from director import visualization as vis
from director.timercallback import TimerCallback
from director.uuidutil import newUUID
from director import vtkAll as vtk
from director.thirdparty import numpyjs... | patmarion/director | src/python/director/affordancemanager.py | Python | bsd-3-clause | 4,850 | [
"VTK"
] | a55b84ef31d1814e8961d8fcdc3c032e67d66590ec96b061fc5c5e236616b669 |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | AutorestCI/azure-sdk-for-python | azure-mgmt-web/azure/mgmt/web/models/app_service_environment.py | Python | mit | 12,217 | [
"ASE"
] | 8cff965dc340ea63e19be92c1894166305a7740486abe97bf0cfa2e9d631f80c |
""" :mod: TransformationCleaningAgent
=================================
.. module: TransformationCleaningAgent
:synopsis: clean up of finalised transformations
"""
# # imports
import re
from datetime import datetime, timedelta
# # from DIRAC
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Base.AgentModule... | sposs/DIRAC | TransformationSystem/Agent/TransformationCleaningAgent.py | Python | gpl-3.0 | 26,911 | [
"DIRAC"
] | bbd8d27c34eb735775f999c3589ecb491f8e5747f594e6f88d02a0a32acd835c |
import ast
from collections import OrderedDict
from .common import iter_fields
class NodeLocation:
def __init__(self, parent, field_name, field_index):
self.parent = parent
self.field_name = field_name
self.field_index = field_index
def __hash__(self):
return hash(tuple([self.... | dalejung/asttools | asttools/graph.py | Python | mit | 3,778 | [
"VisIt"
] | 086ee46560dd820216978092b3cfaf915103c92ff2096f68b178f41ac1de3aa7 |
# 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... | dhalleine/tensorflow | tensorflow/python/ops/gradients.py | Python | apache-2.0 | 28,485 | [
"VisIt"
] | 0aac701030773b5d7ed6567e57991c73a20294e564b6363c3bef180423c66022 |
"""The main API for the v2 notebook format.
Authors:
* Brian Granger
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distribute... | unnikrishnankgs/va | venv/lib/python3.5/site-packages/nbformat/v2/__init__.py | Python | bsd-2-clause | 2,577 | [
"Brian"
] | 6dddbae4647a32d94217c9a29b818353246f017d9c9225200f7a673fb4b949a8 |
#__docformat__ = "restructuredtext en"
# ******NOTICE***************
# optimize.py module by Travis E. Oliphant
#
# You may copy and use this module as you see fit with no
# guarantee implied provided you keep this notice in all copies.
# *****END NOTICE************
# A collection of optimization algorithms. Version ... | witcxc/scipy | scipy/optimize/optimize.py | Python | bsd-3-clause | 116,802 | [
"Gaussian"
] | aa519c83902b26b793e9504f80c593307e4cd1fe143307d7c17f1d5779bf3e2c |
#!/usr/bin/env python
import sys
import random
import heapq as hq
class PriorityQueue:
def __init__(self):
self.elements = []
def empty(self):
return len(self.elements) == 0
def put(self, item, priority):
hq.heappush(self.elements, (priority, item))
def get... | NoahTheDuke/DailyProgrammer | Python/Problems/191-Intermediate.py | Python | gpl-2.0 | 5,069 | [
"Galaxy"
] | c84956b6446302ab50ce5c9d389220ba76894fc41ac4f16b6f233f86c1cdf7a5 |
import numpy as np
import pytest
import nengo
import nengo.utils.distributions as dists
import nengo.utils.numpy as npext
@pytest.mark.parametrize("low,high", [(-2, -1), (-1, 1), (1, 2), (1, -1)])
def test_uniform(low, high):
n = 100
dist = dists.Uniform(low, high)
samples = dist.sample(n, np.random.Rand... | ZeitgeberH/nengo | nengo/utils/tests/test_distributions.py | Python | gpl-3.0 | 2,171 | [
"Gaussian"
] | f46c82dfdbe401eadb9e2e3db8ea2124f4e799001b4f2217fe56cf28fab43045 |
#!/usr/bin/env
"""
ncutilities.py
Using Anaconda packaged Python
"""
import datetime
from netCDF4 import Dataset
from netCDF4 import MFDataset
__author__ = 'Shaun Bell'
__email__ = 'shaun.bell@noaa.gov'
__created__ = datetime.datetime(2013, 12, 20)
__modified__ = datetime.datetime(2014, 03, 14) #<-- P... | shaunwbell/FOCI_Analysis | utilities/ncutilities.py | Python | mit | 36,125 | [
"NetCDF"
] | bdcfb3dd24ebe396566b59779fa1c6696ed88d6483f53677005e88d2d18368c1 |
#-----------------------------------------------------------------------------
# Purpose:
#
# Author: Fabio Stefanini
#
# Copyright : University of Zurich, Giacomo Indiveri, Emre Neftci, Sadique Sheik, Fabio Stefanini
# Licence : GPLv2
#-----------------------------------------------------------------------------
from ... | inincs/pyNCS | src/pyNCS/group.py | Python | gpl-2.0 | 23,783 | [
"Gaussian",
"NEURON"
] | a273fb2a820c5b1735c32342a3b7ab60159f497e794a8e130bdb343fb4dca054 |
from __future__ import unicode_literals
from .tree_walker import make_visitor
from .smarty_grammar import (SmartyLanguage, DollarSymbol, PrintStatement,
Identifier, LiteralStatement, Variable, Symbol,
EmptyOperator, ExpNoModifier, ModifierParameters,
... | Osso/smartytotwig | smartytotwig/twig_printer.py | Python | mit | 12,780 | [
"VisIt"
] | 4c974e0ce65e0e6563d14787d4547d6112c1aa715a7e404c501429cf0b4f7655 |
#!/usr/bin/env python3
import argparse
import errno
from html5lib import (HTMLParser, serializer, treebuilders, treewalkers)
import os
import re
import sys
import time
import urllib.error
import urllib.request
from xml.dom.minidom import Node
def log_if_v(msg):
if args.verbose:
print('[DEBUG] %s' % msg, fi... | riceissa/quora-backup | converter.py | Python | gpl-2.0 | 13,108 | [
"Brian"
] | fe8b085d263851e16f4a865b053b045783d20f17bfa57447ae46eb2afcfacee9 |
import numpy as np
import matplotlib.pyplot as plt
from drawnow import drawnow
import time
from neurons.activations import bipolar
LEAST_MEAN_ERROR = 'least_mean_square'
DISCRETE_ERROR = 'discrete'
class Optimizer:
def __init__(self, loss, learning_rate, epochs, stop_error):
self.loss = loss
sel... | PiotrGrzybowski/NeuralNetworks | networks/neurons/optimizer.py | Python | apache-2.0 | 5,209 | [
"NEURON"
] | d3102ea805c08a41fb57794045fc2c2c4af1e88829c9a1af71a5eaaa7f4d780f |
#!/usr/bin/python
#Audio Tools, a module and set of tools for manipulating audio data
#Copyright (C) 2007-2012 Brian Langenberger
#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... | Excito/audiotools | audiotools/ogg.py | Python | gpl-2.0 | 12,969 | [
"Brian"
] | 71f03835c94315305556f79395e69088e53239a33d43f8ce743df26a06770896 |
#!/usr/bin/env python
#
# Copyright (C) 2013 Leo Singer
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This prog... | gravitationalarry/bayestar-localization | test/test_colored_noise.py | Python | gpl-2.0 | 2,012 | [
"Gaussian"
] | 34df795e8ef240a7a2e20e95543b434fa3ca0a314fbf468192bd11626c24ab2b |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pandas as pd
import numpy as np
import os
import sys
import datetime as dt
from dateutil.relativedelta import relativedelta
# TADPOLE_SimpleForecastExampleLeaderboard.py
# - Translated from TADPOLE_SimpleForecastExampleLeaderboard.m by Neil P. Oxtoby -... | swhustla/pycon2017-alzheimers-hack | notebooks/TADPOLE_SimpleForecast1.py | Python | mit | 15,714 | [
"VisIt"
] | ffec2f8f1986020e2930599e3b4a6224282fdc6582315bcaf7e31edf3645c0f1 |
"""
Django module container for classes and operations related to the "Course Module" content type
"""
import logging
from cStringIO import StringIO
from math import exp
from lxml import etree
from path import Path as path
import requests
from datetime import datetime
import dateutil.parser
from lazy import lazy
from ... | hamzehd/edx-platform | common/lib/xmodule/xmodule/course_module.py | Python | agpl-3.0 | 64,551 | [
"VisIt"
] | a3840f9104d4d0b350d9723b82a7143b2471e0a8098e5b46e88a10ede2a707f3 |
#
# A simple Evernote API demo script that lists all notebooks in the user's
# account and creates a simple test note in the default notebook.
#
# Before running this sample, you must fill in your Evernote developer token.
#
# To run (Unix):
# export PYTHONPATH=../lib; python EDAMTest.py
#
import sys
import hashlib
... | zapier/evernote-sdk-python-old | sample/EDAMTest.py | Python | bsd-2-clause | 4,732 | [
"VisIt"
] | 0599bf6788a871803b8dabdcfd402164ef99a037cc1e1ff46a2c0d098c56d5c1 |
'''
MAP Client, a program to generate detailed musculoskeletal models for OpenSim.
Copyright (C) 2012 University of Auckland
This file is part of MAP Client. (http://launchpad.net/mapclient)
MAP Client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Publi... | MusculoskeletalAtlasProject/mapclient-src | mapclient/tools/pluginupdater.py | Python | gpl-3.0 | 16,746 | [
"Mayavi"
] | ea9e514eaf64ea8540c602ab2b0d0b3bf7e4a318221d6974a5dc15d6558ca71b |
try:
import requests
except ImportError:
message = ('Missing "requests", please install it using pip:\n'
'pip install requests')
raise ImportError(message)
try:
import json
except ImportError:
message = ('Missing "json", please install it using pip:\n'
'pip install req... | digideskio/st2contrib | packs/octopusdeploy/actions/lib/actions.py | Python | apache-2.0 | 1,951 | [
"Octopus"
] | 8b2f550230eec1dd23263b2f200e4b228722bc57ec4b7c47417bcbf8253b2223 |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
try:
from unittest.mock import patch
except ImportError:
from mock import patch
from odoo.tests.common import HttpCase, TransactionCase
''' /!\/!\
Calling `get_pricelist_available` after setting `property_product... | t3dev/odoo | addons/website_sale/tests/test_website_sale_pricelist.py | Python | gpl-3.0 | 21,831 | [
"VisIt"
] | e42606a75a42c607bd756903813ae9a8e3492a14f9b8bdae6af873eb19552278 |
from ase import Atoms
from gpaw import GPAW
from gpaw.mixer import MixerSum
a = 2.87
m = 2.2
bulk = Atoms('Fe2',
positions=[(0, 0, 0),
(a/2, a/2, a/2)],
magmoms=[m, -m],
cell=(a, a, a),
pbc=True)
calc = GPAW(kpts=(6, 6, 6),
h=0.2... | qsnake/gpaw | doc/exercises/iron/anti.py | Python | gpl-3.0 | 538 | [
"ASE",
"GPAW"
] | 364da940376c010fac71994fefe535f9ccdec8bf12c684989178aca8899a534f |
# -*- coding: utf-8 -*-
from yade import ymport, plot, qt
import numpy
#import yade.log
#yade.log.setLevel('WireMat',yade.log.TRACE)
#yade.log.setLevel('Law2_ScGeom_WirePhys_WirePM',yade.log.TRACE)
#yade.log.setLevel('Ip2_WireMat_WireMat_WirePhys',yade.log.TRACE)
#### definition for net generation
def diamondNet( r... | anna-effeindzourou/trunk | examples/anna_scripts/tensile_test/netonly_2axis.py | Python | gpl-2.0 | 7,073 | [
"ParaView"
] | e027ae4f1d029deefb3f679c46bb288ab212b54d915bd45d8cc05081ae0f6e7d |
#!/usr/bin/env python
"""Test suite for aospy.data_loader module."""
import datetime
import os
import unittest
import warnings
import numpy as np
import pytest
import xarray as xr
from cftime import DatetimeNoLeap
from aospy import Var
from aospy.data_loader import (DataLoader, DictDataLoader, GFDLDataLoader,
... | spencerkclark/aospy | aospy/test/test_data_loader.py | Python | apache-2.0 | 32,449 | [
"NetCDF"
] | 426d8d2e2cbdc2f2cdd04317c97ef927c68ce8d9eec9e94d2f6625b71403c40c |
## Aditya Gilra, NCBS, Bangalore, 2012
"""
Inside the .../moose-examples/GranuleCell/ directory supplied with MOOSE, run
python testNeuroML_Gran98.py
(other channels and morph xml files are already present in this same directory).
The soma name below is hard coded for gran98, else any other file can be used by modifyi... | BhallaLab/moose | moose-examples/neuroml/allChannelsCell/allChannelsCell.py | Python | gpl-3.0 | 2,112 | [
"MOOSE"
] | 1ba40f2fc9ed435d8b7fd15d0033d022279574eb405bae58513677490a29d526 |
""" Contains the parent classes Platform"""
# platform.py
# Mission Pinball Framework
# Written by Brian Madden & Gabe Knuth
# Released under the MIT License. (See license info at the end of this file.)
# Documentation and more info at http://missionpinball.com/mpf
import time
class Platform(object):
"""Parent ... | qcapen/mpf | mpf/system/platform.py | Python | mit | 9,832 | [
"Brian"
] | a498d0a18ec3f0b5b0a03919c24fa61d3f415a870e74d58474ac0ed23dad5bd0 |
# -*- encoding: utf-8 -*-
# Yuuno - IPython + VapourSynth
# Copyright (C) 2018 StuxCrystal (Roland Netzsch <stuxcrystal@encode.moe>)
#
# 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, eit... | stuxcrystal/yuuno | yuuno_ipython/ipy_vs/vsscript.py | Python | lgpl-3.0 | 6,509 | [
"MOE"
] | f73d1b8a3cfaed23dd95e7efcdbe7346cf4d61f6b5e6cc06cd33a4994e827f1b |
# coding: utf-8
from __future__ import absolute_import
import os
import re
import datetime
from xml.dom import minidom
from subprocess import check_call
from utils import chemistry_logger
from chemistry.calcore import config
P_RE = re.compile(r'.*Isotropic polarizability.*')
EHOMO_RE = re.compile(r'.*Alpha occ. eige... | chemistryTools/ChemToolsWebService | chemistry/calcore/utils.py | Python | agpl-3.0 | 11,783 | [
"MOPAC"
] | 413b6c0b7b1750a4b2a6850a96492b585fecfbde98878378ee90b0ae3c6c80f2 |
"""
Service interface adapted to work with tornado, must be used only by tornado service handlers
"""
from tornado import gen
from tornado.ioloop import IOLoop
from DIRAC.ConfigurationSystem.private.ServiceInterfaceBase import ServiceInterfaceBase
from DIRAC.ConfigurationSystem.Client.ConfigurationData import gConfi... | DIRACGrid/DIRAC | src/DIRAC/ConfigurationSystem/private/ServiceInterfaceTornado.py | Python | gpl-3.0 | 1,393 | [
"DIRAC"
] | 8759fd933d39a09fe6999630ca57d2954ef9a6a1d7f97ad9a0030a5c9df35ae3 |
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
class vtkTableToGraphFilter(SimpleVTKClassModuleBase):
def __init__(self, module_manager):
SimpleVTKClassModuleBase.__init__(
self, module_manager,
... | nagyistoce/devide | modules/vtk_basic/vtkTableToGraphFilter.py | Python | bsd-3-clause | 502 | [
"VTK"
] | 4108f2731abce94a35c80509194927b519a372f695ccb05925dc804315df1cdc |
#Sample Lightcurve class with Kapernka model
from scipy.optimize import curve_fit, minimize
import numpy as np
import matplotlib.pyplot as plt
import os
from JSON_to_DF import JSON_to_DataFrame
import ntpath
import json
import pandas as pd
import celerite
import pickle
#Create Kernels for Gaussian Process
#Real t... | adamamiller/NUREU17 | LSST/SuperNovaLightCurves/Lightcurve_class.py | Python | mit | 12,483 | [
"Gaussian"
] | 6e146378f73895ffda7f651f248e16f85a79ca441d895b043af5ef25b1db52b3 |
""" Base Storage Class provides the base interface for all storage plug-ins
exists()
These are the methods for manipulating files:
isFile()
getFile()
putFile()
removeFile()
getFileMetadata()
getFileSize()
prestageFile()
getTransportURL()
These are the methods for... | marcelovilaca/DIRAC | Resources/Storage/StorageBase.py | Python | gpl-3.0 | 10,748 | [
"DIRAC"
] | 9cbe6ddb2c1063193964e350d20d6f7b18e91fc2ebfdd6b52db2fa821326adac |
"""
network.py
~~~~~~~~~~
A module to implement the stochastic gradient descent learning
algorithm for a feedforward neural network. Gradients are calculated
using backpropagation. Note that I have focused on making the code
simple, easily readable, and easily modifiable. It is not optimized,
and omits many desirab... | haphaeu/yoshimi | neural_networks/mnist/network_full.py | Python | lgpl-3.0 | 6,458 | [
"Gaussian",
"NEURON"
] | 3ebbbb0e70e2d16233882975a4add4aa692177f4b16136bea0ab54d162c6d497 |
##############################################################################
# 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/perl-moose/package.py | Python | lgpl-2.1 | 2,264 | [
"MOOSE"
] | 6d99b4176607cae0afd7971b1a4c4b9494d9b95a90d2f352a922761a5b94d378 |
import os
import sys
root_path = os.path.abspath("../../")
if root_path not in sys.path:
sys.path.append(root_path)
import numpy as np
from math import pi
from Util.Timing import Timing
from Util.Bases import ClassifierBase
sqrt_pi = (2 * pi) ** 0.5
class NBFunctions:
@staticmethod
def... | carefree0910/MachineLearning | b_NaiveBayes/Vectorized/Basic.py | Python | mit | 2,985 | [
"Gaussian"
] | c98f301a484ff33cbda351f620fbb3d6bb18bc062fb1ae896b62f7d0e76fb778 |
"""Implementation of magic functions for interaction with the OS.
Note: this module is named 'osm' instead of 'os' to avoid a collision with the
builtin.
"""
from __future__ import print_function
#-----------------------------------------------------------------------------
# Copyright (c) 2012 The IPython Developmen... | Vvucinic/Wander | venv_2_7/lib/python2.7/site-packages/IPython/core/magics/osm.py | Python | artistic-2.0 | 29,004 | [
"VisIt"
] | d787ffa7bca08cb77fdd568dd4e982eb537c3ee3d3faab4d5f6f35715cd33f5a |
#!/usr/bin/python
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2018 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute... | amjames/psi4 | doc/sphinxman/document_plugins.py | Python | lgpl-3.0 | 15,221 | [
"Psi4"
] | d0e4f5eda96715b79ca84eafcc72653d1d847f8685468a438eb39b67521f54b7 |
"""
Message Queue wrapper
"""
__RCSID__ = "$Id$"
from DIRAC.FrameworkSystem.private.standardLogging.Handler.MessageQueueHandler import MessageQueueHandler
from DIRAC.FrameworkSystem.private.standardLogging.LogLevels import LogLevels
from DIRAC.Resources.LogBackends.AbstractBackend import AbstractBackend
from DIRAC.Fr... | andresailer/DIRAC | Resources/LogBackends/MessageQueueBackend.py | Python | gpl-3.0 | 1,763 | [
"DIRAC"
] | 97d22eb94b1bbdf3e1b50e1c8ba3db7abe20a5d359466f084b8ccdcb92cd210d |
#!/usr/bin/env python
import pysam
import argparse
from collections import defaultdict as dd
from bx.intervals.intersection import Intersecter, Interval
def main(args):
header = []
forest = dd(Intersecter)
with open(args.bedlike, 'r') as bed:
for line in bed:
chrom, start, end, uu... | adamewing/tebreak | scripts/misc/replace_UUID.py | Python | mit | 1,729 | [
"pysam"
] | c895d02599390ffb6d31908ad49c714d1267da5d22e42a7b9b5253d9f27158fe |
"""
@name: Modules/House/rooms.py
@author: D. Brian Kimmel
@contact: D.BrianKimmel@gmail.com
@copyright: (c) 2013-2020 by D. Brian Kimmel
@license: MIT License
@note: Created on Apr 10, 2013
@summary: Handle the rooms information for a house.
"""
__updated__ = '2020-02-17'
__version_info__ = (19, 1... | DBrianKimmel/PyHouse | Project/src/Modules/House/rooms.py | Python | mit | 12,194 | [
"Brian"
] | ad8e20e917d4a06a295de7cf9756b9c7537126cef61069bfc0cc674255b4ff51 |
#!/usr/bin/env python
import os
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Image pipeline
reader = vtk.vtkMINCImageReader()
reader.SetFileName(VTK_DATA_ROOT + "/Data/t3_grid_0.mnc")
reader.RescaleRealValuesOn()
attributes = vtk.vtkMINCImageAttrib... | ashray/VTK-EVM | IO/MINC/Testing/Python/TestMINCImageWriter.py | Python | bsd-3-clause | 1,895 | [
"VTK"
] | 19cfd14f9a71992d7d5b36a221ef3f00efb58971edbcb5565252d79b6b8426be |
#!/usr/bin/env python
"""Visualise finite strian ellipsoids"""
import numpy as np
from mayavi.api import Engine
from mayavi.sources.api import ParametricSurface
from mayavi.modules.api import Surface
from mayavi import mlab
def gen_ellipsoid(position,shape,orientation):
"""given the existence of a scene genera... | JackWalpole/finite_strain | ellipsoid_visualisation.py | Python | mit | 1,324 | [
"Mayavi"
] | be7d83d3da81ee0dde69886d4cf8d0957fc9c749c30f2e142a0db7a02d356b68 |
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | intel-analytics/BigDL | python/chronos/src/bigdl/chronos/model/MTNet_keras.py | Python | apache-2.0 | 27,121 | [
"ORCA"
] | 923c49241fcc5cb398f6b163b8059cc0674ca353c7706555ba0c3de35d8f14ae |
"""Test of ScaLAPACK diagonalize and inverse cholesky.
The test generates a random symmetric matrix H0 and
positive definite matrix S0 on a 1-by-1 BLACS grid. They
are redistributed to a mprocs-by-nprocs BLACS grid,
diagonalized in parallel, and eigenvalues are compared
against LAPACK. Eigenvectors are not compared.... | qsnake/gpaw | gpaw/test/parallel/scalapack.py | Python | gpl-3.0 | 6,030 | [
"GPAW"
] | 54f050ffaadf5a10fb19368990aa4ea44c061ac1d81529bd24f70acbb39bf2a7 |
#!/usr/bin/env python
"""
This code operates on a MTpy WinGlink format file and generates a NetCDF file.
In the WinGlink format the first three columns are x, y, z coordinates in UTM (meter),
and the fourth is the resistivity. Here we interpolated the irregularly-spaced data
points into a grid in global WGS84 CRS usin... | MTgeophysics/mtpy | mtpy/contrib/netcdf/winglink_to_netCDF.py | Python | gpl-3.0 | 4,163 | [
"NetCDF"
] | 0f735839dc08b1303de0ef0462e4c15da3405761ddccec39c3f10215a3610266 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# modified from https://github.com/bjodah/chempy/blob/master/chempy/util/periodic.py
symbols = (
'H', 'He', 'Li', 'Be', 'B', 'C', 'N', 'O', 'F', 'Ne', 'Na', 'Mg', 'Al',
'Si', 'P', 'S', 'Cl', 'Ar', 'K', 'Ca', 'Sc', 'Ti', 'V', 'Cr', 'Mn', 'Fe',
'Co', 'Ni', 'Cu', ... | luohancfd/FluidDynamicTools | Thermo_Chemical_Properties/Chemkin/periodic.py | Python | gpl-3.0 | 5,995 | [
"ChemPy"
] | 6aab8e6b89fd0ba1d8e6563e2b98b888a273619527e5d58e626a22eee40b674c |
import traceback, random
from google.appengine.api import mail
import datetime, uuid, re, logging, os
from models.slug import Slug
from models.post import Post
from models.settings import Settings
from models.timezones import timezones
from models.postcounter import PostCounter
from google.appengine.api import app_iden... | einaregilsson/MyLife | models/dailymail.py | Python | mit | 6,616 | [
"VisIt"
] | 3fb87c942064d361ccb659d6169ae8e72da464131b0ce360e0a77f8990c827c9 |
#!/usr/bin/env python
#
# This file is part of Buildbot. Buildbot is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# A... | shoelzer/buildbot | worker/setup.py | Python | gpl-2.0 | 5,545 | [
"Brian"
] | c382a2e6b33a317fae3f15bc07315b136d9530928361458be6ec181199ceab93 |
# -*- coding: utf-8 -*-
#
# nwm_to_gssha.py
# GSSHApy
#
# Created by Alan D Snow, 2016.
# License BSD 3-Clause
import logging
from datetime import timedelta
from os import mkdir, path, remove, rename
import xarray as xr
from .grid_to_gssha import GRIDtoGSSHA
log = logging.getLogger(__name__)
# ----------------... | CI-WATER/gsshapy | gsshapy/grid/nwm_to_gssha.py | Python | bsd-3-clause | 4,942 | [
"NetCDF"
] | aa81dc8afe755b1851a4611c2686fba26a964365747b3dfcf75a05bf1fefe542 |
import numpy as np
import pandas as pd
import nltk
from nltk.stem.snowball import SnowballStemmer
from sklearn.feature_extraction.text import TfidfVectorizer
from bs4 import BeautifulSoup
import re
import os
import codecs
from sklearn import feature_extraction
from sklearn.cluster import KMeans
from pprint import pprin... | ControCurator/controcurator | cronjobs/clusterComments.py | Python | mit | 25,964 | [
"VisIt"
] | bb706c24f05930102823a66608d44b0ab1bb7581e0f8eef92c1818887897f0f5 |
"""
mgws v0.01
MtGox Web Socket Interface
configuration loader
Copyright 2011 Brian Monkaba
This file is part of ga-bitbot.
ga-bitbot is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either versio... | Pascal66/ga-bitbot | mgws.py | Python | gpl-3.0 | 3,549 | [
"Brian"
] | 8a192c6bfa4a2d4d8608c6f2c2703d2a4d75c280a1eebc8a4e89e9165adf81db |
#!/usr/bin/env python
import numpy
VTK_TRIANGLE = 5
VTK_QUAD = 9
VTK_TETRA = 10
VTK_HEXAHEDRON = 12
class VtkWriter(object):
def __init__(self):
self.fp = None
self.coords = None
self.connect = None
self.residuals = None
self.cell = None
def set_mesh(self, coords... | geodynamics/cigma | scratch/utils/vtkio.py | Python | lgpl-2.1 | 2,534 | [
"VTK"
] | cd72b8b28dc2703a8029e73d7d01c0ceffb6ad91a501b4bd7b6966f8f8015b08 |
#!/usr/bin/env python
"""
This file computes the raw defect energies (for vacancy and antisite defects)
by parsing the vasprun.xml files in the VASP DFT calculations
for binary intermetallics, where the metadata is in the folder name
"""
__author__ = "Bharat Medasani, Enze Chen"
__data__ = "Aug 10, 2020"
import os
i... | pydii/pydii | pydii/scripts/gen_def_energy.py | Python | mit | 9,938 | [
"VASP",
"pymatgen"
] | f105a8eaefaa95dbcb3e6e1e217f6894f4b7d9a1dbc80f6b85c8c33c983ca218 |
from setuptools import setup, find_packages
def version():
with open('VERSION') as f:
return f.read().strip()
def readme():
with open('README.md') as f:
return f.read()
reqs = [line.strip() for line in open('requirements.txt')]
setup(
name = "wera2netcdf",
version ... | axiom-data-science/wera2netcdf | setup.py | Python | mit | 1,194 | [
"NetCDF"
] | e54132eb4e936b4eec334b59bce0683b2237fff0f9279a86278f1e97393630bf |
from __future__ import print_function
"""QM/MM interface with QM=FHI-aims, MM=gromacs
QM could be something else, but you need to read in qm-atom charges
from the qm program (in method 'get_qm_charges')
One can have many QM regions, each with a different calculator.
There can be only one MM calculator, which is calc... | suttond/MODOI | ase/calculators/ase_qmmm_manyqm.py | Python | lgpl-3.0 | 61,427 | [
"ASE",
"FHI-aims",
"GROMOS",
"Gromacs"
] | 61d726d4308c120eeeedbc2671854470769b4b8c1316443d68a3a08aac7cdbf7 |
#!/usr/bin/env python
"""
Easy Install
------------
A tool for doing automatic download/extract/build of distutils-based Python
packages. For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.
__ https://pythonhosted.org/setuptools/easy_install.html
"""
from... | Eric-Gaudiello/tensorflow_dev | tensorflow_home/tensorflow_venv/lib/python3.4/site-packages/setuptools/command/easy_install.py | Python | gpl-3.0 | 87,391 | [
"VisIt"
] | 8ff882b13c36bb527fb2cf92fcf07f76eb21a0622d7ef2bb4430e87acaa0cf1b |
#!/usr/bin/env python
# Copyright 2017 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 applicable law... | HubSpot/vitess | test/cluster/sandbox/kubernetes_components.py | Python | apache-2.0 | 5,198 | [
"VisIt"
] | ae201da18f4ce06b247809fd8bc0bf19215524329655fb3ba135d771b183a752 |
import numpy as np
from scipy import linalg
from scipy.optimize import fmin_l_bfgs_b
from scipy.stats import zscore
from hlmm import hetlm
"""
Module for defining heteroskedastic linear models, simulating heteroskedastic linear models,
and finding maximum likelihood estimates of the parameters.
Class: model
"""
cl... | AlexTISYoung/hlmm | hlmm/hetlmm.py | Python | mit | 19,887 | [
"Gaussian"
] | 30d00c76329a32d1789503f778ee03056b26491f3a9c2318263f26cd5a2d2b01 |
"""
Class for management of Stomp MQ connections, e.g. RabbitMQ
"""
import json
import socket
import stomp
import ssl
import time
from DIRAC.Resources.MessageQueue.MQConnector import MQConnector
from DIRAC.Core.Security import Locations
from DIRAC import S_OK, S_ERROR, gLogger
from DIRAC.Core.Utilities.DErrno import... | Andrew-McNab-UK/DIRAC | Resources/MessageQueue/StompMQConnector.py | Python | gpl-3.0 | 8,646 | [
"DIRAC"
] | 0336a5fea94284529765a67967ca9275609c7c0a02dc213a32348790fac5732d |
# -*- coding: utf-8 -*-
## src/disco.py
##
## Copyright (C) 2005-2006 Stéphan Kochen <stephan AT kochen.nl>
## Copyright (C) 2005-2007 Nikos Kouremenos <kourem AT gmail.com>
## Copyright (C) 2005-2017 Yann Leboulanger <asterix AT lagaule.org>
## Copyright (C) 2006 Dimitur Kirov <dkirov AT gmail.com>
## Copyright (C) 20... | jabber-at/gajim | src/disco.py | Python | gpl-3.0 | 88,288 | [
"VisIt"
] | 4b5385ab2627a5ab66bb68294be6738dc8f0f72fcceba6a33c7adf761351332f |
"""
Copyright 2011 Shao-Chuan Wang <shaochuan.wang AT gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to ... | ActiveState/code | recipes/Python/577892_Dijkstrshortest_path/recipe-577892.py | Python | mit | 3,416 | [
"VisIt"
] | 16ead0f058af213194f54b63c4d1b147d7d02d14827fc886d0a74643133bba79 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.