text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
# -*- coding: utf-8 -*-
#
# Markov Logic Networks
#
# (C) 2006-2011 by Dominik Jain (jain@cs.tum.edu)
#
# 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
# witho... | danielnyga/pracmln | python2/pracmln/mln/learning/pll.py | Python | bsd-2-clause | 18,010 | [
"Gaussian"
] | d61c0cf1ca70797b43c170b72accec8df9958c9bf6c942989822f2946fea376f |
import datetime as dt
from collections import defaultdict
from typing import TYPE_CHECKING, Any, Dict, List, Optional
import dash
import dash_bootstrap_components as dbc
import dash_html_components as html
import google.protobuf.json_format as json_format
from dash.dependencies import ALL, Input, Output, State
from gr... | googleinterns/userjourneytool | ujt/callbacks/change_over_time_callbacks.py | Python | apache-2.0 | 9,410 | [
"Cytoscape"
] | 3ea0c884875e8a5a9cc60e979de6ec063de88e30a92237912d28ebb636e2fc9f |
# -*- coding: utf-8 -*-
from blitzdb.backends.sql.relations import ManyToManyProxy
from ..helpers.movie_data import Actor, Director, Movie
def prepare_data(backend):
backend.init_schema()
backend.create_schema()
francis_coppola = Director({'name' : 'Francis Coppola'})
stanley_kubrick = Director({'... | adewes/blitzdb | tests/sql/test_eager_loading.py | Python | mit | 6,012 | [
"Brian"
] | 56c3321cc44a2aaa1620b453f108b5530911bb45b9386efabd407862d617a4e9 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# demo.py --- Demonstration program and cheap test suite for pythondialog
#
# Copyright (C) 2002-2010, 2013, 2014, 2015 Florent Rougon
# Copyright (C) 2000 Robb Shecter, Sultanbek Tezadov
#
# This program is in the public domain.
"""Demonstration program for pythondial... | skalkoto/pythondialog | examples/demo.py | Python | lgpl-2.1 | 72,287 | [
"Galaxy"
] | 2cab75a6b68917e7f8b95b44021217ae986ecf5a8f4ba954f8a9bbf72c3902bf |
## Making interactions.txt file from sorted BLAST outputs
import json,os,csv
def csv_to_list(csv_file, delimiter=","):
with open (csv_file, 'r') as csv_con:
reader = csv.reader(csv_con, delimiter=delimiter)
return list(reader)
def convert_cells_to_floats(csv_cont):
for row in range(len(cs... | arlissc/phageParser | interactions.py | Python | mit | 2,823 | [
"BLAST",
"Cytoscape"
] | e840566f44dbac879a18295581a25f251164da14a15c6acd5d365075ebd239d8 |
# $HeadURL: $
''' AlwaysBannedPolicy module
'''
from DIRAC import S_OK
from DIRAC.ResourceStatusSystem.PolicySystem.PolicyBase import PolicyBase
__RCSID__ = '$Id: $'
class AlwaysBannedPolicy( PolicyBase ):
'''
The AlwaysBannedPolicy is a dummy module that can be ... | Sbalbp/DIRAC | ResourceStatusSystem/Policy/AlwaysBannedPolicy.py | Python | gpl-3.0 | 895 | [
"DIRAC"
] | 399f537cf06f0e45cb162de6d5e832f005ebd46e9229a2a7e07ec789eafcc551 |
# coding: utf-8
"""
Quality trimming.
"""
from __future__ import print_function, division, absolute_import
import sys
if sys.version > '3':
xrange = range
def quality_trim_index(qualities, cutoff, base=33):
"""
Find the position at which to trim a low-quality end from a nucleotide sequence.
Qualities are assum... | wholeGenomeSequencingAnalysisPipeline/BacPipe | cutadapt-1.12/cutadapt/qualtrim.py | Python | gpl-3.0 | 1,766 | [
"BWA"
] | 8e20d1b04eae5b3a964ff3031aade1cdd561ea8e34abc6a7ca75b18a0670b628 |
#
# 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... | guoxiaolongzte/spark | python/pyspark/mllib/util.py | Python | apache-2.0 | 19,622 | [
"Gaussian"
] | 1966b9a03adb2aec4ba8d294b5d36ad2723f0c507dd4d401c617e40b04e875c0 |
# -*- coding: utf-8 -*-
#
# DataStructures-Winter-2016 documentation build configuration file, created by
# sphinx-quickstart on Sat Jan 9 19:59:34 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
# autoge... | Heroes-Academy/DataStructures_Winter_2016 | docs/source/conf.py | Python | mit | 8,352 | [
"Brian"
] | 617c8fe35a58fa57f2eb29fd2a5709d1f20a12ae62fa2d76198f61f092b603e0 |
#!/usr/bin/python3
import subprocess
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
from SettingsWidgets import SidePage, GSettingsDependencySwitch, DependencyCheckInstallButton, GSettingsSoundFileChooser
from xapp.GSettingsWidgets import *
DPI_FACTOR_LARGE = 1.25
DPI_FACTOR_NORMAL ... | leigh123linux/Cinnamon | files/usr/share/cinnamon/cinnamon-settings/modules/cs_accessibility.py | Python | gpl-2.0 | 23,242 | [
"ORCA"
] | 39dfb2b143b71986e2dbbfebe25c781ec7e1658768f90a7f29d89104586a12d3 |
import logging
import re
from django.conf import settings
from django.contrib.sites.models import Site
from django.core.exceptions import ImproperlyConfigured
from django.shortcuts import redirect
from wiki.core.exceptions import NoRootURL
from wiki.models import URLPath, Article
from courseware.courses import get_co... | kalebhartje/schoolboost | lms/djangoapps/course_wiki/views.py | Python | agpl-3.0 | 4,536 | [
"VisIt"
] | 6e4c726c6a476795a9e63ff31a9d31519b3fbbe7eddf00d86f5cefab1c39f935 |
#!/usr/bin/env python
import os
try:
__IPYTHON__
import sys
del sys.argv[1:]
except:
pass
import srwl_bl
import srwlib
import srwlpy
import math
import srwl_uti_smp
def set_optics(v, names=None, want_final_propagation=True):
el = []
pp = []
if not names:
names = ['Lens', 'Lens_CRL'... | radiasoft/sirepo | tests/template/srw_generate_data/srw-all-optics.py | Python | apache-2.0 | 66,529 | [
"CRYSTAL",
"Gaussian"
] | 5b2d33b36181a19ffd166375d9cf686bebdabb591d5f9999fe37dba09b4c5b64 |
########################################################################
# $HeadURL$
# File : SSHOSGComputingElement.py
# Author : S.Poss
########################################################################
""" For OSG, it's required to go through condor_g (grid universe), via SSH
"""
from DIRAC.Resources.Computin... | Sbalbp/DIRAC | Resources/Computing/SSHOSGComputingElement.py | Python | gpl-3.0 | 873 | [
"DIRAC"
] | 18e3470ea1e270dd03deddd562b28a18115ce0aaa3d226bebc919e87b943a3b1 |
from ase import Atoms
from ase.calculators.emt import EMT
from ase.calculators.test import numeric_forces
h2 = Atoms('H2', positions=[(0, 0, 0), (0, 0, 1.1)],
calculator=EMT())
f1 = numeric_forces(h2, d=0.0001)
f2 = h2.get_forces()
assert abs(f1 - f2).max() < 1e-6
| conwayje/ase-python | ase/test/h2.py | Python | gpl-2.0 | 277 | [
"ASE"
] | ee6e4950e34854659b8ec1b91cf223a371158357eb2104fbf501fd5e2a2a590d |
#
# @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 it and/or modify
#... | amjames/psi4 | psi4/driver/qcdb/parker.py | Python | lgpl-3.0 | 6,398 | [
"Psi4"
] | 9f1a5498d0524f002c9e6863d1701285b98cdf381acd0227e7c90225526264cf |
"""===========================
Variant annotation pipeline
===========================
:Author: Andreas Heger & David Sims
:Release: $Id$
:Date: |today|
:Tags: Python
The Variants pipeline attempts to annotate variants in
a :term:`vcf` formatted file. It computes
1. The effects of SNPs on transcripts and genes
... | CGATOxford/CGATPipelines | obsolete/pipeline_variant_annotation.py | Python | mit | 34,326 | [
"pysam"
] | edf50decdf8ceb0d82a29ac3b1f06e6f768ff997a386bdc472250769b160e22b |
import numpy as np
from math import sqrt, exp
def tri2full(H_nn, UL='L'):
"""Fill in values of hermitian matrix.
Fill values in lower or upper triangle of H_nn based on the opposite
triangle, such that the resulting matrix is symmetric/hermitian.
UL='U' will copy (conjugated) values from upper triang... | grhawk/ASE | tools/ase/transport/tools.py | Python | gpl-2.0 | 14,424 | [
"Gaussian"
] | cea7039b4d01f01e77dbf4d9757d8fdc663d9cbfc6f2ba89144dea7b2f224b1c |
#!/usr/env/python
"""
rock_weathering.py
CellLab-CTS model that simulates the weathering of rock to saprolite around
a network of fractures.
Created (and translated from earlier code by) by Greg Tucker, Jul 2015
"""
from __future__ import print_function
import time
import numpy as np
from landlab import RasterModel... | csherwood-usgs/landlab | landlab/ca/examples/rock_weathering.py | Python | mit | 5,506 | [
"NetCDF"
] | e3425b8dbe93bc84b672bf195b51d6611f25682140a3ae9b17485dc50ada1936 |
from django.db import models
# Create your models here.
class Apache(models.Model):
date = models.DateTimeField(auto_now=False, auto_now_add=False)
visit = models.IntegerField()
def __str__(self):
return "%s" % self.visit
| za/dd3 | dd3/visitor/models.py | Python | apache-2.0 | 231 | [
"VisIt"
] | 612aa5bc7303bec89c174348b9f24f80f5caa0d85c7f8c638c40ec7d0855437c |
"""
Module for handling experiment parameters and defaults.
$Id: params.py,v 1.5 2006/01/23 22:59:48 adastra Exp $
This module defines an attribute descriptor for experiment
parameters. An experiment parameter is represented in PLASTK as
special kind of class attribute.
For example, suppose someone has defined a n... | ronaldahmed/SLAM-for-ugv | neural-navigation-with-lstm/MARCO/plastk/params.py | Python | mit | 6,688 | [
"Gaussian"
] | 066682ad3abfbc9fbd28fdf2ba678b83aace15031f5a6520cb6f87ca313848b0 |
""" Parent contains the base class for diverter devices."""
# diverter.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 logging
from mpf.system.devi... | jabdoa2/mpf | mpf/devices/diverter.py | Python | mit | 14,479 | [
"Brian"
] | 8db760aa20ad8906e5df7dc0359e443d1d42ddefc196530d4d144b5e359882b4 |
# !/usr/bin/env python
# -*- coding: utf-8 -*-
"""Small wrapper which sends an asynchronous post request to a given http port."""
import json
import logging
from functools import partial
from requests import ConnectionError
from requests_futures.sessions import FuturesSession
logger = logging.getLogger(__name__)
c... | ansrivas/pylogging | pylogging/elogger.py | Python | mit | 2,866 | [
"Elk"
] | 41285b38fa4ec062c831646aeace2eb3e0e73fc8da0b2a45d31fc645c1a7ae97 |
# Copyright 2000-2002 by Andrew Dalke.
# Revisions copyright 2007-2010 by Peter Cock.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Alphabets used in Seq objects etc to de... | bryback/quickseq | genescript/Bio/Alphabet/__init__.py | Python | mit | 14,103 | [
"Biopython"
] | 4962bc9346f9c8cbb6d9c0c2c2b4381666d3218104f8f2208916ba8a12fbe55a |
##############################################################################
# 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/r-agdex/package.py | Python | lgpl-2.1 | 1,775 | [
"Bioconductor"
] | 3a8463622daf024688ea78b8dc6f3fdd1fa7f18834d7c0c4ef2c5487ced22622 |
import numpy as np
import fcts
import copy
import matplotlib.pyplot as plt
import math
class FAIndividual:
'''
individual of firefly algorithm
'''
def __init__(self, vardim, bound):
'''
vardim: dimension of variables
bound: boundaries of variables
''... | luzhijun/Optimization | 其他算法/fa.py | Python | apache-2.0 | 5,878 | [
"Firefly"
] | 33a556e2ed7211f2730e8187421c1d69ae515edfbf9f65e7befb4f99e6f38003 |
#!/usr/bin/env python
# Copyright (C) 2014 Swift Navigation Inc.
# Contact: Colin Beighley <colin@swift-nav.com>
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS... | mfine/piksi_firmware | scripts/update_view.py | Python | gpl-3.0 | 16,870 | [
"VisIt"
] | 899e7d6732015aee990996262526f0628baed09d4ced73729ab8a1a557c9c985 |
# Copyright 2022 The jax3d 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... | google-research/jax3d | jax3d/projects/nesf/nerfstatic/metrics/metrics.py | Python | apache-2.0 | 5,969 | [
"Gaussian"
] | 587d34a0120593fc31eacfe13ada9e7db930515533a7284cd36bffa0aa0c227e |
# ============================================================================
#
# Copyright (C) 2007-2010 Conceptive Engineering bvba. All rights reserved.
# www.conceptive.be / project-camelot@conceptive.be
#
# This file is part of the Camelot Library.
#
# This file may be used under the terms of the GNU General... | kurtraschke/camelot | camelot/admin/form_action/__init__.py | Python | gpl-2.0 | 14,795 | [
"VisIt"
] | 29ccc65a7a36a5b860f5b2e99f24e22cd39a2cd3fc5ab0f1a3a2096c72390c4b |
try:
import unittest2 as unittest
except ImportError:
import unittest
import random
import string
from GangaCore.GPIDev.Base.Proxy import addProxy, getProxyAttr, isProxy, isType, stripProxy
from GangaCore.GPIDev.Lib.GangaList.GangaList import GangaList
GangaList = addProxy(GangaList)
from .TFile import TFil... | ganga-devs/ganga | ganga/GangaCore/test/Unit/GangaList/TestGangaList.py | Python | gpl-3.0 | 15,899 | [
"VisIt"
] | 14a4248f815cf8c2d7dcd0b7493367f7dc4b709a2068c83d7122f3a8b2359f71 |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | frreiss/tensorflow-fred | tensorflow/python/eager/function_test.py | Python | apache-2.0 | 178,951 | [
"Octopus"
] | ea46c8cdba91b07fc588e16fbd6e3641500c022bba0273c805fa953a95a22e44 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module provides classes that operate on points or vectors in 3D space.
"""
import re
import string
import warnings
from math import cos, pi, sin, sqrt
import numpy as np
from monty.json import MSONable
from pymatge... | vorwerkc/pymatgen | pymatgen/core/operations.py | Python | mit | 21,794 | [
"CRYSTAL",
"pymatgen"
] | a7663174cdf5a56f5f968f5f0f0ee3a9804d415e16d57ff52e92c134ef289a37 |
##############################################################################
# Copyright (c) 2013-2018, 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... | EmreAtes/spack | var/spack/repos/builtin/packages/paraview/package.py | Python | lgpl-2.1 | 7,916 | [
"NetCDF",
"ParaView",
"VTK"
] | 5fd2accb80e2acb41f1ef5bced8d63caf357778cfa064cde9af9e57b7ade7954 |
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | marmyshev/item_title | resources/__init__.py | Python | gpl-2.0 | 2,273 | [
"Brian"
] | f7c08639435e3828d28bfbeecda569f757daef47096de2b1c8b7e6610926fc8d |
"""
Topological fingerprints.
"""
__author__ = "Steven Kearnes"
__copyright__ = "Copyright 2014, Stanford University"
__license__ = "BSD 3-clause"
from rdkit import Chem
from rdkit.Chem import rdMolDescriptors
from vs_utils.features import Featurizer
class CircularFingerprint(Featurizer):
"""
Circular (Mor... | rbharath/vs-utils | vs_utils/features/fingerprints.py | Python | gpl-3.0 | 2,817 | [
"RDKit"
] | 6f47f067faaaa491403e0e1dec6ae2ebc26627272e99d003d0a84310cf8e9056 |
# -*- coding: utf-8 -*-
import colorsys
from datetime import datetime, timedelta
import enum
import logging
from random import random
import re
import sys
from typing import Any, Dict, Tuple
import urllib
import urllib.parse
import uuid
from django import forms
from django.conf import settings
from django.contrib.aut... | catmaid/CATMAID | django/applications/catmaid/models.py | Python | gpl-3.0 | 83,195 | [
"NEURON"
] | 70b22ebbfce664e411a31557d71e6402b8e34688b93cc1a6764972a77fd27a95 |
"""
End-to-end tests for receive email
"""
from common.test.acceptance.fixtures.course import CourseFixture
from ..ga_helpers import GaccoTestMixin
from ..helpers import UniqueCourseTest
from ...pages.lms.ga_account_settings import AccountSettingsPage
from ...pages.lms.ga_dashboard import DashboardPage
class Receiv... | nttks/edx-platform | common/test/acceptance/tests/lms/test_ga_receive_email.py | Python | agpl-3.0 | 2,878 | [
"VisIt"
] | a6dd8717d940662896ee6744ccd8dc4d6997a831c36ac938373d913570cd3f10 |
# -*. coding: utf-8 -*-
# Copyright (c) 2008-2012, Noel O'Boyle; 2012, Adrià Cereto-Massagué
# All rights reserved.
#
# This file is part of Cinfony.
# The contents are covered by the terms of the GPL v2 license
# which is included in the file LICENSE_GPLv2.txt.
"""
pybel - A Cinfony module for accessing Open Babel
G... | torcolvin/openbabel | scripts/python/pybel.py | Python | gpl-2.0 | 33,936 | [
"Open Babel",
"Pybel"
] | bea3d6fbef97fa940d358aa1720de1f86ab67a27cf9a5f45503fc30491dd0d61 |
#!/usr/bin/env pypy
# __author__ = 'Thomas van Gurp'
# Date created: 16/09/2014 (europe date)
# Function: Base calling for methylated nucleotides and SNP's
#Python version: 2.7.3
#External modules: vcf, HTSeq
#Known bugs: None
#Modifications: None
from itertools import izip
from Bio import SeqIO
import argparse
import... | thomasvangurp/epiGBS | mapping_varcall/variant_calling/variant_calling.py | Python | mit | 74,737 | [
"ADF",
"HTSeq"
] | d7766f32d5d68bb433c89a367c58284371c027fca3e06d27a1cd78409d9d7416 |
"""
OpenStackEndpoint is Endpoint base class implementation for the OpenStack cloud service.
"""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
__RCSID__ = "$Id$"
import requests
import json
import base64
# DIRAC
from DIRAC import gLogger, S_OK, S_ERR... | ic-hep/DIRAC | src/DIRAC/Resources/Cloud/OpenStackEndpoint.py | Python | gpl-3.0 | 18,971 | [
"DIRAC"
] | 7dcca58cf822af703b43ff5ef2d02130842f44ed321d2f66819bf2df15438f0b |
#
# co_co_function_unique.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your op... | kperun/nestml | pynestml/cocos/co_co_function_unique.py | Python | gpl-2.0 | 3,474 | [
"NEURON"
] | 04bdcb30055374ddaffe952f6e0d24d88ba048152e69be8f5884a8e06308849a |
""" SandboxHandler is the implementation of the Sandbox service
in the DISET framework
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = "$Id$"
import os
import time
import threading
import tempfile
import six
from DIRAC import gLogger, S... | yujikato/DIRAC | src/DIRAC/WorkloadManagementSystem/Service/SandboxStoreHandler.py | Python | gpl-3.0 | 19,472 | [
"DIRAC"
] | b96e88bb87656b179bdd7580d39215ad6d76f98998204d3040ed7fa41aebe11f |
# File: ctscan.py
# Description: MPR rendering
from vtk import *
#needed to determine the path to the source files
from os.path import dirname, realpath, join
def get_binary_relative_file(filepath):
basedir = dirname(realpath(__file__)) #Get the directory of the .py file, courtesy of http://stackoverflow.c... | RDeckers/ScientificVisualization-1TD389 | Assignments/Assignment 2/Part 1/ctscan.py | Python | gpl-3.0 | 5,119 | [
"VTK"
] | 545f7a15ced77ed3ac35d05e5af696fb5d41313cad030f3c2056318c065464e7 |
#!/bin/env python3
# AUTHORS:
# Hakan Ozadam
# Rachel Brown
#
# Moore Laboratory
# UMASS Medical School / HHMI
# RNA Therapeutics Institute
# Albert Sherman Center, ASC4-1009
# 368 Plantation Street
# Worcester, MA 01605
# USA
#
###########################... | hakanozadam/bal | align.py | Python | gpl-2.0 | 20,699 | [
"pysam"
] | a7068f6bb6d25e9416076a459178bf90aeb8ae7bdb638e4a8889e655b50e6647 |
import numpy as np
import astropy.units as u
from astropy.coordinates import Angle
from astropy import log
import sys
if sys.version_info < (3, 0):
from itertools import izip as zip
from .progressbar import _map_context
from .feather_cubes import get_channel_chunks
def total_profile(cube, spatial_mask=None, h... | e-koch/CubeAnalysis | cube_analysis/spectral_stacking.py | Python | mit | 5,152 | [
"Galaxy"
] | 8f11bd36955aeda19acd74ab5470a862fcf5264948dada2ff768d304486609d5 |
"""Tests for asttools module.
- TestGetIdentifiers
- TestGetSize
- TestGetConstExpr
- TestConstFolding
- TestReplaceBitwiseOp
- TestReplaceBitwiseFunctions
- TestGetConstMod
- TestComparator
"""
# pylint: disable=relative-import
import ast
import unittest
from sspam.tools import asttools
from sspam.tools.flattening ... | quarkslab/sspam | tests/test_asttools.py | Python | bsd-3-clause | 7,627 | [
"VisIt"
] | 1d82149c6c9d93fa41c4cbd23821435660e6cb3fb43f190f97a455c23705e8e0 |
"""distutils.archive_util
Utility functions for creating archive files (tarballs, zip files,
that sort of thing)."""
# This module should be kept compatible with Python 2.1.
__revision__ = "$Id$"
import os
from distutils.errors import DistutilsExecError
from distutils.spawn import spawn
from distutils.dir_util impo... | scs/uclinux | user/python/python-2.4.4/Lib/distutils/archive_util.py | Python | gpl-2.0 | 6,179 | [
"VisIt"
] | 6df9324b8842994c1c185021191932f25491302f932e75d0be9385889d8c4c64 |
"""Preprocessing workflow definition."""
import os
import os.path as op
import numpy as np
import pandas as pd
import nibabel as nib
import matplotlib as mpl
import matplotlib.pyplot as plt
from sklearn import decomposition as decomp
from moss.mosaic import Mosaic
import seaborn as sns
from nipype.interfaces import ... | tuqc/lyman | lyman/workflows/preproc.py | Python | bsd-3-clause | 42,536 | [
"Gaussian"
] | af11a02462d7e2b498fa64e2c3d75e48a9651999afbaaa6fa4f89593ea8a8585 |
# coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | google-research/motion_imitation | motion_imitation/robots/minitaur.py | Python | apache-2.0 | 53,998 | [
"Gaussian"
] | 5eab1d952fdd112cdbaa9d3fdcd12fb159ab9bc3a4c1bcccb6b28dd6e26f98cc |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# CREATED:2015-02-14 16:20:25 by Brian McFee <brian.mcfee@nyu.edu>
# unit tests for librosa cache
"""Tests for librosa.cache"""
import os
import sys
import tempfile
import shutil
import numpy as np
import pytest
import librosa._cache
# Disable any initial cache sett... | librosa/librosa | tests/test_cache.py | Python | isc | 1,323 | [
"Brian"
] | 2a2b3d65a37af945975c88d9943c7a5c7f0833aaaea579f3d16d9218b33a1124 |
#
# This source file is part of the EdgeDB open source project.
#
# Copyright 2008-present MagicStack Inc. and the EdgeDB 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... | edgedb/edgedb | edb/pgsql/compiler/clauses.py | Python | apache-2.0 | 12,910 | [
"VisIt"
] | 9140b34049bc9ce272cd4af03fb5aa78ad1b21e58c25f3e1bd1f58d4cd1b4c51 |
""" This is a test of the AuthDB. Requires authlib
It supposes that the DB is present and installed in DIRAC
"""
import time
import DIRAC
DIRAC.initialize() # Initialize configuration
from authlib.jose import JsonWebKey, JsonWebSignature, jwt, RSAKey
from authlib.common.encoding import json_b64encode, urlsafe_b... | DIRACGrid/DIRAC | tests/Integration/Framework/Test_AuthDB.py | Python | gpl-3.0 | 7,345 | [
"DIRAC"
] | 15e1fc13431d4d754f1630c0c7719b64b2d9047322f1110b084738504e88d496 |
"""Main entrypoint for cwl-tes."""
from __future__ import absolute_import, print_function, unicode_literals
import argparse
import os
import functools
import signal
import sys
import logging
import ftplib
import jwt
import uuid
from typing import MutableMapping, MutableSequence
from typing_extensions import Text
impo... | common-workflow-language/cwl-tes | cwl_tes/main.py | Python | apache-2.0 | 26,053 | [
"VisIt"
] | ba0205f19fc0131fde3af01cd07a455ec98b1ae6056434242d3ebfbad8456e7b |
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | gkc1000/pyscf | pyscf/tools/ring.py | Python | apache-2.0 | 910 | [
"PySCF"
] | 53c9380d30209c3902e221234dff6f11e3b1592b5a2ecd65202609ff21aa9957 |
#!/usr/bin/env python
########################################################################
# $HeadURL$
# File : dirac-wms-job-get-output-data
# Author : Stuart Paterson
########################################################################
"""
Retrieve the output data files of a DIRAC job
"""
__RCSID__ = "$... | Sbalbp/DIRAC | Interfaces/scripts/dirac-wms-job-get-output-data.py | Python | gpl-3.0 | 1,439 | [
"DIRAC"
] | 0e47f94465884480de8776d96b1f53f61fcdecfec28b66c8cf042416c5c1e5d1 |
# -*- coding: utf-8 -*-
import __main__
import numpy
import pylab
import os.path
import os
import copy
import pdb
import param
import topo.pattern
import topo.command.analysis
from math import pi, sqrt, exp, pow
from numpy.oldnumeric import zeros, Float, sum
from topo.projection import CFProjection, SharedWeightCFPro... | ioam/svn-history | contrib/jacommands.py | Python | bsd-3-clause | 44,993 | [
"Gaussian",
"NEURON"
] | 22497ced8e0d7d4ade31ceaa9f3125d723ab900b35490aba96ffca5e56cdebd9 |
"""Test check utilities."""
# Authors: MNE Developers
# Stefan Appelhoff <stefan.appelhoff@mailbox.org>
#
# License: BSD (3-clause)
import os
import os.path as op
import shutil
import sys
import numpy as np
import pytest
from pathlib import Path
import mne
from mne.datasets import testing
from mne.io.pick im... | Teekuningas/mne-python | mne/utils/tests/test_check.py | Python | bsd-3-clause | 7,618 | [
"Mayavi"
] | 2ff4451971e9d680646877909bc644f92f634eb11442c71dee32a850fffe3703 |
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2019, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | BenKaehler/q2-feature-classifier | q2_feature_classifier/_blast.py | Python | bsd-3-clause | 4,756 | [
"BLAST"
] | 9eae7de9121766b108442cc5e3519b2b6e42c4d401bd7a2f8eac678409ba90a9 |
import ocl
import camvtk
import time
import vtk
import datetime
import math
import gzip
import csv
def readPts():
spamReader = csv.reader(open('tsplib/graph.txt', 'rb'), delimiter=',', quotechar='|')
pts=[]
for row in spamReader:
pts.append( ocl.Point( float(row[0]), float(row[1]) ) )
return p... | aewallin/opencamlib | examples/python/tsp/tsp_04.py | Python | lgpl-2.1 | 2,828 | [
"VTK"
] | f898d6ca0d0736968976b48305b5bfa5a7bacef3e18b682c2118c006a4af4c01 |
# This file was written by Brian E. Granger
# (https://github.com/ellisonbg/talk-sicm2-2013) and is licensed under
# the MIT License.
import os
import struct
from io import BytesIO
import base64
import sys
from IPython.utils.py3compat import string_types
from IPython.core.display import DisplayObject
class Audio(Dis... | jfsantos/ift6266h14 | notebooks/audiodisplay.py | Python | mit | 3,329 | [
"Brian"
] | 30db9eabc1f472a4a84822a7ff0b0ba376f7bcc269f8647bea2f224c1e77a90e |
import operator
from behave import *
from django.db.models import Q
use_step_matcher("parse")
@when(u'I register movie')
def step_impl(context):
for row in context.table:
context.browser.visit(
context.get_url('FilmRevolutionApp:create_movie'))
form = context.browser.find_by_tag('for... | jaumeg3/WebPractDjango | features/steps/register_productor.py | Python | gpl-3.0 | 1,011 | [
"VisIt"
] | d2081df793e90a52f6ed2c49f68e4e5b585b06432e33058c1c06fba2d511a1bd |
from setuptools import setup, find_packages
import imp
version = imp.load_source('muda.version', 'muda/version.py')
setup(
name='muda',
version=version.version,
description='Python module for musical data augmentation',
author='Brian McFee',
author_email='brian.mcfee@nyu.edu',
url='http://git... | silky/muda | setup.py | Python | apache-2.0 | 1,275 | [
"Brian"
] | 172151e5f5c77fbe0092f0e722d7ee535153548e8d87de3af31488fefc8e22f8 |
# -*- coding: utf-8 -*-
"""This module contains the SQLAlchemy database models that support the definition cache and graph cache."""
import datetime
from collections import defaultdict
from typing import Any, Iterable, Mapping, Optional, Tuple
from sqlalchemy import (
JSON,
Boolean,
Column,
... | pybel/pybel | src/pybel/manager/models.py | Python | mit | 23,397 | [
"Pybel"
] | 27c34bc3766a127919be18dd075ead48bcff26f8211b2d2bf35f6e9596c3a161 |
# try using distribute or setuptools or distutils.
try:
import distribute_setup
distribute_setup.use_setuptools()
except ImportError:
pass
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import sys
import re
# parse version from package/module without impor... | widdowquinn/THAPBI | santi_script/setup.py | Python | mit | 2,098 | [
"Biopython"
] | 3439bbdc4c2c0d3ce19b90da46599b069a6ffa2beee8332796fdd9c565660d05 |
# This script do all processing of BRCA data
# Section of importing modules
import argparse
import subprocess as sp
import os
import sys
from multiprocessing import Pool,Queue
import multiprocessing as mp
import glob
import re
import math
import logging
# Global variables
global thisDir,configs,allWork,threads,args
t... | aakechin/BRCA-analyzer | brca_analyzer.py | Python | gpl-3.0 | 47,032 | [
"BWA"
] | c5e774391123087b915d3627db9cbdc61e6c95c8d7a11341f1fd42f73ac1d375 |
# -*- coding: utf-8 -*-
"""
Methods for column density calculation.
Author: R. Lombaert
"""
import os
from scipy.integrate import trapz
from scipy import average, argmax
from astropy import constants as cst
import math
import cc.path
from cc.tools.io import DataIO
from cc.data import Data
class ColumnDensity(obj... | IvS-KULeuven/ComboCode | cc/modeling/tools/ColumnDensity.py | Python | gpl-3.0 | 9,642 | [
"Avogadro"
] | d62a5dade620a720165513b3f7d07e17ed900669651e259e4d6f12453eee4537 |
#!/usr/bin/env python
########################################################################
# $HeadURL$
# File : dirac-admin-lfn-replicas
# Author : Stuart Paterson
########################################################################
"""
Obtain replica information from file catalogue client.
"""
from __fut... | fstagni/DIRAC | Interfaces/scripts/dirac-dms-lfn-replicas.py | Python | gpl-3.0 | 1,486 | [
"DIRAC"
] | 8f705fd371ad507349bfee46da28800714368452c5731e259cc76dd39e19b608 |
# store.py - repository store handling for Mercurial
#
# Copyright 2008 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from i18n import _
import osutil, util
import os, stat
_sha = util.sha1
# Thi... | joewalnes/idea-community | plugins/hg4idea/testData/bin/mercurial/store.py | Python | apache-2.0 | 11,400 | [
"VisIt"
] | 346f38b7048c58325487beed09f8195f163de26a1d7e789a690e110a495cec19 |
# coding=utf-8
# Copyright 2020 The Real-World RL Suite 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 appl... | google-research/realworldrl_suite | realworldrl_suite/environments/manipulator.py | Python | apache-2.0 | 24,441 | [
"Gaussian"
] | d3626a4a175071e204414b7d762b3d05bbb84ea8119c4b3e6badeb8289ebae67 |
import os
from datetime import datetime
from django.test import SimpleTestCase
from django.utils.functional import lazystr
from django.utils.html import (
conditional_escape, escape, escapejs, format_html, html_safe, json_script,
linebreaks, smart_urlquote, strip_spaces_between_tags, strip_tags, urlize,
)
from... | EmadMokhtar/Django | tests/utils_tests/test_html.py | Python | mit | 11,715 | [
"ADF"
] | 8c680a02b9edd74dc712ae08c0976cdc424fe94a24fb5f99578dfc24c9dc17da |
"""Program to find the credit grade of a person.
usage:
firefly credit_grade.find_credit_grade
"""
import zlib
import random
def find_credit_grade(email):
"""Returns the credit grade of the person identified by the given email address.
The credit grade is generated randomly using the email as the se... | amitkaps/full-stack-data-science | credit-risk-deploy/credit_grade.py | Python | mit | 789 | [
"Firefly"
] | 5c8623f892db696879835ca1fedb3e9b14f068a7f59c09caa03ea5ff02ddfcf6 |
# $Id$
#
# Copyright (C) 2001-2008 greg Landrum and 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.
#
""" Exposes functionali... | rdkit/rdkit-orig | rdkit/Chem/MolSurf.py | Python | bsd-3-clause | 13,782 | [
"MOE",
"RDKit"
] | c265e14139fbefe5b842789aa98365ff3fc9397926556a395db3772c1a9420a5 |
# $HeadURL$
__RCSID__ = "$Id$"
import time
import select
import cStringIO
try:
from hashlib import md5
except:
from md5 import md5
from DIRAC.Core.Utilities.ReturnValues import S_ERROR, S_OK
from DIRAC.Core.Utilities import DEncode
from DIRAC.FrameworkSystem.Client.Logger import gLogger
class BaseTransport:
b... | sposs/DIRAC | Core/DISET/private/Transports/BaseTransport.py | Python | gpl-3.0 | 10,205 | [
"DIRAC"
] | 419f9fa0ddc36345ce1ebb6c0deea83628838cb6af9565fc6cddc950341ff4ef |
"""
Module containing NetCDF file reading functions
"""
from cis.exceptions import InvalidVariableError
from cis.utils import listify
import logging
def get_netcdf_file_attributes(filename):
"""
Get all the global attributes from a NetCDF file
:param filename: The filename of the file to get the variables... | cedadev/cis | cis/data_io/netcdf.py | Python | lgpl-3.0 | 12,011 | [
"NetCDF"
] | 3d63b87d20fdb78a1caf75ab102dce1d29a0f65d9ad6bb38c231793cdfdb58c5 |
#!/usr/bin/env python3
# ver 0.1 - coding python by Hyuntae Jung on 02/25/2017
# ver 0.2 - support pdb and dcd files for openmm on 5/8/2017
# ver 0.3 - support xtc trajectory files for Monte Carlo using "reduce_unitcells_3d_to_1d" on 6/6/2017
# ver 0.4 - support block average module on 6/26/2017 and remove out agai... | jht0664/Utility_python_gromacs | python/massf_1d.py | Python | mit | 4,954 | [
"MDAnalysis",
"OpenMM"
] | 7556834cb0105361713772b49cd33aaea9fb9ea69cbe397ae1b925eba2ee3eaf |
# 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... | MBoustani/climate | examples/taylor_diagram_example.py | Python | apache-2.0 | 5,089 | [
"NetCDF"
] | 05e0eb264746d1b248aaa49d608596fca3f719c53575933e911b342ecc72e789 |
#!/usr/bin/env python
"""
Demonstrate all the parametric objects.
"""
from __future__ import print_function
import collections
import vtk
def get_program_parameters():
import argparse
description = 'Display the parametric surfaces.'
epilogue = '''
'''
parser = argparse.ArgumentParser(descrip... | lorensen/VTKExamples | src/Python/GeometricObjects/ParametricObjectsDemo.py | Python | apache-2.0 | 14,840 | [
"VTK"
] | f91b0912d81124923ab59605d5290262945a7747ce5f6938bd8960c2792830a8 |
from quex.DEFINITIONS import QUEX_PATH
import quex.input.command_line.query as query
from quex.input.setup import SETUP_INFO, DEPRECATED, \
global_character_type_db, \
command_line_args_defined, \
... | dkopecek/amplify | third-party/quex-0.65.2/quex/input/command_line/validation.py | Python | gpl-2.0 | 14,408 | [
"VisIt"
] | 1894ac8138dcfea7f722aeef22f5e72fb76fa303239496576a04416072499969 |
#Session where I define all the function needed
def Planck(x,e,T):
a=numpy.expm1(0.0144043/(x*10**(-9))/T)
P=e/(x*10**(-9))**5*3.74691*10**(-16)*1/(a-1)
return P
#Defined Wien function
def Wien(Int,x):
h=6.626*10**(-34)
c=3*10**8
Kb=1.38*10**(-23)
pi=math.pi
W=Kb/h/c*numpy.log((x*10**(-9... | mtwharmby/lucky | Lucky/src_Mike_GUI_Total/trials/PreLucky.py | Python | apache-2.0 | 4,633 | [
"Gaussian"
] | a2b67591b2a17c7030a18c928de7462a89c7add000d9afea479b7025158cbf7a |
# Copyright 2008-2012 Nokia Siemens Networks Oyj
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | Senseg/robotframework | src/robot/result/keywordremover.py | Python | apache-2.0 | 4,046 | [
"VisIt"
] | 39157cdb480656fbed9958d051ee8afdcb2948700768a77dc4639b6cbb49e79d |
# -*- coding: utf-8 -*-
"""
Climate Data Module
@author: Mike Amy
"""
same = lambda x: x
# keyed off the units field in the sample_table_spec table
standard_unit = {
"in": same,
"out": same
}
# be careful to use floats for all of these numbers
units_in_out = {
"Celsius": {
"in": lambda ce... | flavour/ssf | modules/ClimateDataPortal/__init__.py | Python | mit | 17,203 | [
"NetCDF"
] | f2040550c58004602574bb621bed7b8bba79e63a05e6dbf8723e634de80f88c4 |
from collections import deque
import time
import requests
# Constants
BRAZIL = 'br'
EUROPE_NORDIC_EAST = 'eune'
EUROPE_WEST = 'euw'
KOREA = 'kr'
LATIN_AMERICA_NORTH = 'lan'
LATIN_AMERICA_SOUTH = 'las'
NORTH_AMERICA = 'na'
OCEANIA = 'oce'
RUSSIA = 'ru'
TURKEY = 'tr'
# Platforms
platforms = {
BRAZIL: 'BR1',
EUR... | jjmaldonis/Riot-API-Code | riotwatcher.py | Python | mit | 24,174 | [
"CRYSTAL"
] | 8e060463c50982c07a494787070a2cca422c66eec5be6e5d8238840aeb1e3384 |
# Copyright 2013 Velodyne Acoustics, 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 or agreed to... | Kitware/VeloView | Application/Ui/python/lidarview/applogic.py | Python | apache-2.0 | 70,647 | [
"ParaView",
"VTK"
] | 8d24c1cdb159acf4765a42d9a28722e2af639e2e2532111194ab8b360de8332b |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QGridLayout, QSpacerItem
NUM_LAYOUT = 5
DEFAULT_LAYOUT = 2
def populateLayout(parent, layout, index):
if (index == 0):
parent.setBackground("/var/fspanel/images/metal3.jpg")
layout.setH... | neksysinfo/fspanel | fsLayout.py | Python | gpl-3.0 | 13,538 | [
"ADF"
] | 6912dbb4a8ccdcd4c6701fae170dee209dcc4fdd807ed459a294d1a420b362a0 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
v1.1:
- Permite indicar "dirac pulse" en vías full range (en ese caso no existe un pcm real)
v1.2
- Gestiona PEQ (EQ paramétrico basado en Ecasound)
"""
#-------------------------------------
# El módulo "read_brutefir_process.py" proporciona la relación de coeficien... | rripio/FIRtro | custom/old/presets_SINATTEN.py | Python | gpl-3.0 | 9,114 | [
"DIRAC"
] | 3c4a4c1a4274baad1d5c4f132cfff709ba2fe97dd109726c2402e34ce5b6066b |
# Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of the G... | espressopp/espressopp | src/analysis/XTemperature.py | Python | gpl-3.0 | 1,933 | [
"ESPResSo"
] | 08e279873e028cf10fdecb5d6cb61dc88215834bf7a106df19c43936fce92b9b |
#!/usr/bin/env python
# Greg Von Kuster
"""
usage: %prog score_file interval_file chrom start stop [out_file] [options]
-b, --binned: 'score_file' is actually a directory of binned array files
-m, --mask=FILE: bed file containing regions not to consider valid
-c, --chrom_buffer=INT: number of chromosomes (... | volpino/Yeps-EURAC | tools/stats/aggregate_scores_in_intervals.py | Python | mit | 8,734 | [
"Galaxy"
] | 7674ac830042e181413b3d14d94c478d3e18ecbd55c2a57a19b04f7e65dba27f |
"""
CBMPy: MiriamIds module
=======================
Constraint Based Modelling in Python (http://pysces.sourceforge.net/cbm)
Copyright (C) 2009-2015 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
This program is free software: you can redistribute it and/or modify
it under the terms of th... | asttra/pysces | pysces/lib/miriamids.py | Python | bsd-3-clause | 124,353 | [
"PySCeS"
] | bac5c02099d371f50260e6580ae9155955c96e763f9127eba9066899d316deb8 |
import lssps._lssps as c
def gaussian_smoothing(grid, sigma):
"""
Apply Gaussian smoothing (
Args:
grid (Grid): grid of white noise
sigma (float): smoothing length
"""
if grid.mode != 'fourier-space':
raise ValueError('grid must be in fourier-space')
c._etc_gaussian_smooth... | junkoda/lss-ps | py/lssps/etc.py | Python | gpl-3.0 | 348 | [
"Gaussian"
] | 70f59c4ca3b64ed81b88993d49cda5508f7737c8f7dd0c312335e686e54d555f |
#from scipy import *
from pylab import *
import numpy
import collections as cll
from tank import *
#from math import pi
# Read data
Datasource=0 #or 0:Paraview gauges 1:Gauge functions 2:Vof integration 3:Zero crossing analysis
Variable=1 # 0:y; 1:u; 2:v
if Datasource!=3:
Numbe... | erdc-cm/air-water-vv | 2d/hydraulicStructures/sharp_crested_weir/deprecated/sharp_crested_weir_AV_V1/TimeSeriesPlot_HydStr.py | Python | mit | 6,498 | [
"ParaView"
] | 656b270918e899bcc3cde58033fc2d97e31dad247896177144fa48a3cccc7762 |
from __future__ import print_function
__author__ = """Alex "O." Holcombe""" ## double-quotes will be silently removed, single quotes will be left, eg, O'Connor
import numpy as np
import itertools #to calculate all subsets
from copy import deepcopy
from math import atan, pi, cos, sin, sqrt, ceil
import time, sys, platfo... | alexholcombe/MOTcircular | helpersAOH.py | Python | mit | 23,657 | [
"Gaussian"
] | 844329799d9c20d8142b8dce2c70640f6309500d4115a757d9304e282423c4a4 |
import math
class QuadratureRule(object):
"""
Quadrature rules are implemented using this class, in order to
simplify the code and provide a common infrastructure
for tasks such as error estimation and node caching.
You can implement a custom quadrature rule by subclassing
:class:`QuadratureRu... | pernici/sympy | sympy/mpmath/calculus/quadrature.py | Python | bsd-3-clause | 38,231 | [
"Gaussian"
] | f60b29b47d7d7925cf430ed841ab4d00973578b23aa03804a7dc775bec8ac59d |
"""
Tests for geography support in PostGIS
"""
from __future__ import unicode_literals
import os
from unittest import skipUnless
from django.contrib.gis.db import models
from django.contrib.gis.db.models.functions import Area, Distance
from django.contrib.gis.measure import D
from django.db import connection
from dja... | loic/django | tests/gis_tests/geogapp/tests.py | Python | bsd-3-clause | 7,049 | [
"VisIt"
] | 80c3ce92ae635eef80b9ec02b81d5cc1e19e17ee2d2c82a2c0cdbf4c0cc49cbd |
import argparse
import sys, traceback
import os
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")))
from lib.loghelper import Logger
from lib.exception import DataException, MissingException, NetworkException
from lib.metricxmloutput import writeMetricsToXML
from lib.metricxmloutput impor... | SouthForkResearch/CHaMP_Metrics | tools/topoauxmetrics/topoauxmetrics.py | Python | gpl-3.0 | 6,244 | [
"VisIt"
] | c4c5039c27c34c7f352ddd8d6e0942e15d1b4da0e80e43eefb8b17b3b67b34ef |
#!/usr/bin/env python
"""
setup.py file for aum
"""
from distutils.core import setup, Extension
cosmology_module = Extension('_cosmology',
sources=['src/cosmology.i', 'src/cosmology.cpp', 'src/haloes.cpp', 'src/powerspectrum.cpp', 'src/gauleg.cpp'],
swig_opts=["-... | surhudm/aum | setup.py | Python | gpl-3.0 | 1,537 | [
"Galaxy"
] | 3a7fbdf621abe89e4030802e4f0257ccae4dd967d6b24e780e8993c01d34d276 |
#!/usr/bin/env python
#
# Copyright 2008,2009 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 version 3, or (at your opt... | GREO/GNU-Radio | gr-utils/src/python/usrp2_siggen.py | Python | gpl-3.0 | 15,328 | [
"Gaussian"
] | 42398cc8e0efec30de18bbd0d67124df7af0bf6c75bee0f2323fa4758d84cc0f |
#!/Users/ameliaantrim/anaconda/bin/python
'''
Creates PyMol files to color molecules according to the number of times each contact
pair appears in the peptide dataset.
Inputs:
(1) pair_dict: A dictionary mapping each amino acid pair in the peptide dataset to the
number of times it appears in that dataset
(2) pdb... | afantrim/epitope_mapping | src/SequentialPairs/PyMolColor.py | Python | gpl-2.0 | 4,655 | [
"Biopython",
"PyMOL"
] | 859e1b4ecde8ddb12e0c49cd15e27ae7b6c5606b9813661d7f53b898f96d236e |
# Copyright (C) 2010-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | espressomd/espresso | src/python/espressomd/observables.py | Python | gpl-3.0 | 28,531 | [
"ESPResSo"
] | 396c9d2b92e1ade93ea7006eb5a2b79f7022e9f2ddcf87d9120e7420b96400b7 |
import numpy as np
import matplotlib.pyplot as pl
import scipy.optimize as opt
from DIRECT import solve
import scipy.sparse as sp
try:
import seaborn as sn
seabornOK = True
except:
seabornOK = False
def cholInvert(A):
"""
Invert matrix A using a Cholesky decomposition. It works only for symmetric matrices.
Inpu... | aasensio/pyGPLSD | gpLSD.py | Python | mit | 9,159 | [
"Gaussian"
] | 569b30627589d94283befa16a80bb2f8ca4d14fe844a4c7ed3b457e780e7b295 |
import unittest
from unittest import TestCase
from numpy import array,r_
from numpy.ma.testutils import assert_close
from numpy.testing.utils import assert_allclose, assert_equal
from scipy.stats import norm
from scipy.stats.stats import pearsonr
from sklearn.utils import shuffle
from pyisc import AnomalyDetector, ... | STREAM3/pyisc | unittests/test_p_ConditionalGaussianDependencyMatrix.py | Python | lgpl-3.0 | 4,102 | [
"Gaussian"
] | 54ed566a26dbe6143cc6766b62543826df77b7e2b00407120fb5192b7285cb2e |
# -*- coding: utf-8 -*-
"""Factories for the OSF models, including an abstract ModularOdmFactory.
Example usage: ::
>>> from tests.factories import UserFactory
>>> user1 = UserFactory()
>>> user1.username
fred0@example.com
>>> user2 = UserFactory()
fred1@example.com
Factory boy docs: http://f... | AndrewSallans/osf.io | tests/factories.py | Python | apache-2.0 | 10,378 | [
"Brian"
] | ed7cde8e19e7e789f015c0c51ed9d47206739fa1cabc8f34d644d156f1c96cd7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.