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 |
|---|---|---|---|---|---|---|---|
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | GoogleCloudPlatform/functions-framework-python | tests/test_view_functions.py | Python | apache-2.0 | 6,493 | [
"Galaxy"
] | eebdafd37758b1d30072b3161a5225f285b292234e22db4a4f034064e9617f47 |
"""
Notes:
http://docs.readthedocs.io/en/latest/getting_started.html
pip install sphinx sphinx-autobuild sphinx_rtd_theme sphinxcontrib-napoleon
cd ~/code/ubelt
mkdir docs
cd docs
sphinx-quickstart
# need to edit the conf.py
cd ~/code/ubelt/docs
make html
sphinx-apidoc -f -o... | Erotemic/ubelt | docs/source/conf.py | Python | apache-2.0 | 11,032 | [
"VisIt"
] | 8dcb42db2f4032930908587c490035c15e51b8c8978569cce4992c3ae55d0f9b |
# -*- coding: utf-8 -*-
"""Algorithms for spectral clustering"""
# Author: Gael Varoquaux gael.varoquaux@normalesup.org
# Brian Cheung
# Wei LI <kuantkid@gmail.com>
# License: BSD 3 clause
import warnings
import numpy as np
from ..base import BaseEstimator, ClusterMixin
from ..utils import check_rand... | meduz/scikit-learn | sklearn/cluster/spectral.py | Python | bsd-3-clause | 18,536 | [
"Brian",
"Gaussian"
] | 25776606314c1543e3ebc1bc98d82a66867ad08692440a59cb5fd13f1499ab56 |
import numpy as np
import quantities as pq
def spatial_rate_map(x, y, t, sptr, binsize=0.01*pq.m, box_xlen=1*pq.m,
box_ylen=1*pq.m, mask_unvisited=True, convolve=True,
return_bins=False, smoothing=0.02):
"""Divide a 2D space in bins of size binsize**2, count the number of... | CINPLA/expipe-dev | exana/exana/tracking/fields.py | Python | gpl-3.0 | 31,411 | [
"Gaussian"
] | 0e765aad9689fb70b4dc7805930159d219100f9f53fc23ffdb6b72994c555cd5 |
# mencoder "mf://mpg_288x288x24_lam15_t273_a0353140_0000_rv.dat_%d.png" -mf fps=20 -o anim.avi -ovc lavc -lavcopts vcodec=msmpeg4v2:vbitrate=500
import numpy
import sys
from mmdlab.datareader import readfile_metgas_boxes
from mmdlab.utils import make_mlab_scalar_field
from mmdlab.utils import show_scalar_planes
from m... | detorto/mdvis | src/rotate_reg.py | Python | mit | 2,586 | [
"Mayavi"
] | 75d3c5b5c752d0ee8e80dcea616fad01dc67069da3188bcb10475913b418f9ec |
"""
Dataproviders that use either:
- the file contents and/or metadata from a Galaxy DatasetInstance as
their source.
- or provide data in some way relevant to bioinformatic data
(e.g. parsing genomic regions from their source)
"""
import base
import line
import column
import external
from gal... | icaoberg/cellorganizer-galaxy-tools | datatypes/dataproviders/dataset.py | Python | gpl-3.0 | 31,600 | [
"Galaxy",
"pysam"
] | 1b1a9e301543632b4e245923b4f85cfd1db0204ab83c57834f6d12bbf639c580 |
import params
from neuron import h
from neuron import numpy
import mkmitral
pc = h.ParallelContext()
nhost = int(pc.nhost())
rank = int(pc.id())
matrank = (41, 61)
domain = ((-500, 1500, 50), (-500, 2500, 50))
def f(ii):
i = int(ii)
density = numpy.zeros(matrank)
for gid in range(i , params.Nmitral, nhost):
... | JustasB/MitralSuite | Models/Migliore2014/mitral_dend_density.py | Python | mit | 1,354 | [
"Mayavi",
"NEURON"
] | 84e60ef0d5ffe6aad327bbf686455cd4586f54ed9f37ea2d2dd905fc25a5765f |
#!/usr/bin/env python
# Original provided by Mark Olesen
import os,sys
from platform import uname
# from __future__ import print_function
try:
from PyFoam.ThirdParty.six import print_
except ImportError:
def print_(*args):
# Simple workaround to report the failure
for a in args:
sy... | mortbauer/openfoam-extend-Breeder-other-scripting-PyFoam | bin/pyFoamVersion.py | Python | gpl-2.0 | 10,018 | [
"VTK"
] | 329b92fb1841079951a98427c6b65bdca3b8a68deddce2fcf82245bb70c9ed82 |
'''
Steps for problem.feature lettuce tests
'''
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from lettuce.django import django_url
from common import i_am_registered_for_the_course
from problems_setup import PROBLEM_DICT, answer_problem, problem_has_answer, add_problem_to_course
fro... | TsinghuaX/edx-platform | lms/djangoapps/courseware/features/problems.py | Python | agpl-3.0 | 7,541 | [
"VisIt"
] | b5d0441bea9a98fc577d03d02c1b5b6d11cd2cf3fabc4be8ac9958b5572ef016 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Tests for the TreeKDE.
"""
import numpy as np
from KDEpy.TreeKDE import TreeKDE
import itertools
import pytest
args = list(itertools.product([[-1, 0, 1, 10], [1, 2, 3, 4], [1, 1, 1, 2]], [1, 2, 3]))
@pytest.mark.parametrize("data, split_index", args)
def test_addit... | tommyod/KDEpy | KDEpy/tests/test_TreeKDE.py | Python | gpl-3.0 | 4,770 | [
"Gaussian"
] | daa55cf7d2a3adb3667907d1c90a578c5db4e73cefb3d25852f22304653fb5d3 |
# Lint as: python3
# Copyright 2019 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 ... | tensorflow/lingvo | lingvo/core/builder_layers_test.py | Python | apache-2.0 | 28,447 | [
"MOE"
] | 73a9bdbdf1c293a882c8b52bbac653e30dfa738ef3e7e38d9322a60342123450 |
# -*- coding: utf8 -*-
import os
import bitcoin
from secp256k1 import PrivateKey
import pytest
import serpent
from rlp.utils import decode_hex
from ethereum import tester, utils, abi
from ethereum.utils import safe_ord, big_endian_to_int
# Test EVM contracts
serpent_code = '''
def main(a,b):
return(a ^ b)
'''
... | pipermerriam/pyethereum | ethereum/tests/test_contracts.py | Python | mit | 40,537 | [
"MOOSE"
] | c2153fd9eb56405558c1bd5e837e4d18d7671466b9b311201ee51f5612928ba6 |
#!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | gkc1000/pyscf | pyscf/ci/addons.py | Python | apache-2.0 | 1,295 | [
"PySCF"
] | 7808252997c6416265f98709443aeb1dd3c5bf759892e8c90a5afb2499544d24 |
"""
Record a video using Selenium + <canvas> toDataURI
"""
import traceback
import urlparse
import datetime
import os
import sys
import subprocess
import time
import base64
import json
import tempfile
import urllib
import urllib2
from cStringIO import StringIO
from PIL import Image
from selenium import we... | miohtama/slideshow9000 | slideshow/recorder.py | Python | agpl-3.0 | 7,743 | [
"exciting"
] | a3b5cc159a45899983df283a1b1677844ceede1904b59fd9672432e84647c9b5 |
#!/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... | R-a-dio/python-audio-tools | audiotools/ape.py | Python | gpl-2.0 | 45,026 | [
"Brian"
] | 45a71021658aa5adac4d787f5da9032ce5f866237488ff235cf5871e7eb0f49d |
from django.utils.translation import ugettext_lazy as _
from .constants import (
ALIVE, DEAD, DECLINED, DWTA, FEMALE, IND, MALE, NAIVE,
NEG, NEVER, NO, NOT_APPLICABLE, OMANG, OTHER, POS, REFUSED, UNKNOWN, YES,
MORNING, AFTERNOON, EVENING, ANYTIME, WEEKDAYS, WEEKENDS,
NOT_SURE, NORMAL, ABNORMAL, NOT_DON... | botswana-harvard/edc-constants | edc_constants/choices.py | Python | gpl-2.0 | 12,706 | [
"VisIt"
] | f40258816d3f388f4ec2d59340ad869a3970cbefd85e18b30a6b48c676bc3e25 |
"""
Feedforward layers.
TODO: write more documentation
"""
__docformat__ = 'restructedtext en'
__authors__ = ("Razvan Pascanu "
"KyungHyun Cho "
"Caglar Gulcehre ")
__contact__ = "Razvan Pascanu <r.pascanu@gmail>"
import numpy
import copy
import theano
import theano.tensor as TT
from th... | tomsbergmanis/gh_rnn_lm | groundhog/layers/ff_layers.py | Python | bsd-3-clause | 18,627 | [
"Gaussian"
] | a8fb7697dd951e048b2ec89409e1766c7ac7bcd1cc3945b5563d08cd3e2e817b |
# -*- coding: utf-8 -*-
"""
List of registered IEEE 24-bit Organizationally Unique IDentifiers.
Original data file:
http://standards.ieee.org/regauth/oui/oui.txt
"""
REGISTERED_OUID = {
0x000000: u'XEROX CORPORATION',
0x000001: u'XEROX CORPORATION',
0x000002: u'XEROX CORPORATION',
0x000003: u'XEROX CORPOR... | goofwear/raspberry_pwn | src/pentest/metagoofil/hachoir_parser/network/ouid.py | Python | gpl-3.0 | 385,658 | [
"ASE",
"Amber",
"BWA",
"CRYSTAL",
"Galaxy",
"NEURON"
] | 6671aa0858e3b89aa39b1da9528b96880aaef931974e425b8618ccb4e3ba46a5 |
from numpy import *
from plotting.myplot import *
from plotting.plot_images import *
from mystat.correlate_cov import *
import scipy.stats as st
def running_mean(x, N):
cs = cumsum(insert(x, 0, 0))
return (cs[N:] - cs[:-N]) / N
def bin_means(x, y, binnr = 10):
vals, bins, binnr = st.binned_statistic(x, y... | zsomko/visualcortex | python/spikes/analyze_spikes.py | Python | gpl-2.0 | 8,294 | [
"NEURON"
] | 37565a6f9636e8161fe5ea7cc7aeda512b1d653609d02824f6ff80857a6dcfac |
#!/usr/bin/env python
# written by: Oliver Cordes 2016-05-30
# changed by: Oliver Cordes 2016-05-30
import os, sys
import getopt
try:
import numpy as np
except:
print( 'Install the numpy python module!' )
sys.exit( -1 )
try:
from astropy.io import fits
except:
print( 'Install the astropy pytho... | ocordes/arctic | test_suite/bin/add_noise.py | Python | lgpl-3.0 | 2,942 | [
"Gaussian"
] | 6c0163bd10d434201d2db576c9a4e693818df5cefd5f156f528f047afb3e6c75 |
#!/usr/bin/env python
from __future__ import print_function, unicode_literals
import getpass
import imp
import os
import pkg_resources
import platform
import re
import shutil
import sys
import textwrap
import subprocess
import warnings
from optparse import OptionGroup, OptionParser
from random import choice as random... | beol/reviewboard | reviewboard/cmdline/rbsite.py | Python | mit | 71,263 | [
"VisIt"
] | 72dd6f2595ce518c5f4ba8d6811fdf6154fd15c234543743ae7836574ae9417c |
#!/usr/bin/env python
"""
Utilities to help with grid io
NOTE: this isn't used yet, but should be useful for loading non
UGRID-compliant files.
Ideally, we'll add loading from shape files or what have you in the future
"""
from __future__ import (absolute_import, division, print_function)
import netCDF4
import num... | NOAA-ORR-ERD/gridded | gridded/pyugrid/grid_io/utils.py | Python | unlicense | 4,122 | [
"NetCDF"
] | 234b1c5c360cc0c5ec10e74fea8b9b36fc486a996cb9e79c02c16af04f051f4f |
# $Id$
#
# Copyright (C) 2003 Rational Discovery LLC
# All Rights Reserved
#
from rdkit import RDConfig
import sys,os,types
from rdkit import Chem
from rdkit.VLib.Filter import FilterNode
class SmartsFilter(FilterNode):
""" filter out molecules matching one or more SMARTS patterns
There is a count associate... | rdkit/rdkit-orig | rdkit/VLib/NodeLib/SmartsMolFilter.py | Python | bsd-3-clause | 2,725 | [
"RDKit"
] | 2af8d7b799bc0a933d1d48576492245144606cfcabf1eb7835d29e2cb927b166 |
#!/usr/bin/python3
import numpy as np
import matplotlib.pyplot as plt
from auryntools import *
# This code snipped assumes that you have run the example simulation
# sim_coba_binmon with default paramters.
# This generates spk output files under /tmp/
filename = "/tmp/coba.0.e.spk"
seconds = 0.1
sf = AurynBinary... | fzenke/auryn | tools/python/simple_spike_raster.py | Python | gpl-3.0 | 484 | [
"NEURON"
] | 72329f864af9954c9cd9da5819e79cadfab367cf70a27d9e173ccf112ecabeaa |
#########
# getNavData.py
# This program is part of the online PS-Drone-API-tutorial on www.playsheep.de/drone.
# It shows how to read out selected NavData-values from a Parrot AR.Drone 2.0 using the PS-Drone-API. The drone will stay on the ground.
# Dependencies: a POSIX OS, PS-Drone-API 2.0 beta or higher.
# (w) J. P... | reixd/ps-drone | tutorials/getNavData.py | Python | artistic-2.0 | 2,454 | [
"VisIt"
] | bbe834f00ac9ce5e71a2ec8f8127d636c85b6f11ed35e8b08e49ed37625830e8 |
#!/usr/bin/python
#
# Copyright 2007 Google Inc.
# Licensed to PSF under a Contributor Agreement.
#
# 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/LICE... | nouiz/fredericbastien-ipaddr-py-speed-up | tags/2.1.8/ipaddr_test.py | Python | apache-2.0 | 49,013 | [
"FEFF"
] | 7fefe031897f073d5308c9b1eeb903bec7ae9aae4c945d7eff7736bf4dbb2cda |
""" JobRunningWaitingRatioPolicy
Policy that calculates the efficiency following the formula::
( running ) / ( running + waiting + staging )
if the denominator is smaller than 10, it does not take any decision.
"""
from DIRAC import S_OK
from DIRAC.ResourceStatu... | andresailer/DIRAC | ResourceStatusSystem/Policy/JobRunningWaitingRatioPolicy.py | Python | gpl-3.0 | 2,410 | [
"DIRAC"
] | f72e1e6a45b28ec8142fd620ebf389ab643a80f4f4702ae75f7c74e4c76be720 |
#!/bin/python
"""
Program Monte-Carlo by Aksyonov Dmitry, Skoltech, Moscow
"""
import sys, json, os, glob, copy
print('Python version is', sys.version)
from shutil import copyfile
import random
from os.path import expanduser
home = expanduser("~")
sys.path.append(home+'/tools/') # for numpy libraries
... | dimonaks/siman | siman/monte.py | Python | gpl-2.0 | 16,446 | [
"VASP"
] | 4e9b01ace1bee62feb19552e0656018cef0e4436f01b88537b6bc6f144c110e7 |
# (c) 2014, Brian Coca, Josh Drake, et al
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
... | grimmjow8/ansible | lib/ansible/plugins/cache/base.py | Python | gpl-3.0 | 7,445 | [
"Brian"
] | 2c11d6043986efa44114b8b7f1dfb8ddddc2fd3bc8c0b088a009930a1e288cf3 |
#!/usr/bin/env python
#
# Copyright 2012 The Plaso Project Authors.
# Please see the AUTHORS file for details on individual 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
#
# ht... | iwm911/plaso | plaso/lib/objectfilter_test.py | Python | apache-2.0 | 18,566 | [
"Desmond"
] | 5aaa0e64a483e1f3b9324a4203043181312a5a08d036ee89aead51c8297f4600 |
from io import BytesIO
from threading import Lock
import contextlib
import itertools
import os.path
import pickle
import shutil
import tempfile
import unittest
import sys
import numpy as np
import pandas as pd
import xray
from xray import Dataset, open_dataset, open_mfdataset, backends, save_mfdataset
from xray.backe... | cpaulik/xray | xray/test/test_backends.py | Python | apache-2.0 | 38,439 | [
"NetCDF"
] | 50e91f751b0f69ab32c8832f1e585ecdea71e918e4ab90f938e51c8c356f593c |
def extractAdamantineDragonintheCrystalWorld(item):
"""
"""
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol or frag) or 'preview' in item['title'].lower():
return None
if 'Crystal World' in item['tags']:
return buildReleaseMessageWithType(item, 'Adamantine Dragon i... | fake-name/ReadableWebProxy | WebMirror/management/rss_parser_funcs/feed_parse_extractAdamantineDragonintheCrystalWorld.py | Python | bsd-3-clause | 409 | [
"CRYSTAL"
] | a63024c7fc5ec429714f402ab2fdf559c636defaccace61f83e51a3a61ae971f |
# drizzle/base.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
# Copyright (C) 2010-2011 Monty Taylor <mordred@inaugust.com>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: drizz... | jessekl/flixr | venv/lib/python2.7/site-packages/sqlalchemy/dialects/drizzle/base.py | Python | mit | 14,993 | [
"VisIt"
] | 97c8e18989d79038dbc71b65a95ec44070bf4863dbdbc0222c67b8662af275fe |
# Copyright (C) 2003-2005 Peter J. Verveer
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following d... | mbayon/TFG-MachineLearning | venv/lib/python3.6/site-packages/scipy/ndimage/filters.py | Python | mit | 52,520 | [
"Gaussian"
] | 8ababcfef262e72f16c509775e0675fb942c51f7f4252715ed427741b306a109 |
#!/usr/bin/env python
# Install.py tool to build the CSlib library
# used to automate the steps described in the README file in this dir
from __future__ import print_function
import sys,os,re,subprocess
# help message
help = """
Syntax from src dir: make lib-message args="-m"
or: make lib-message a... | quang-ha/lammps | lib/message/Install.py | Python | gpl-2.0 | 3,018 | [
"LAMMPS"
] | 058fe3095555879b0d01023602af3dcf040b20b35aeb910d83cb956631ff359a |
#!/usr/local/bin/python
"""
setup.py file for LAMMPS with system MPICH library
"""
from distutils.core import setup, Extension
import os, glob
path = os.path.dirname(os.getcwd())
# list of src files for LAMMPS
libfiles = glob.glob("%s/src/*.cpp" % path)
lammps_library = Extension("_lammps",
... | gladk/LIGGGHTS-PUBLIC | python/setup.py | Python | gpl-2.0 | 1,359 | [
"LAMMPS"
] | 3d880a208bc79eeae4f5a9fa8ff0d9838cde91ae2fdb348c6582519370d3ad39 |
paraview_plugin_version = '2.1.0'
# This is module to import. It provides VTKPythonAlgorithmBase, the base class
# for all python-based vtkAlgorithm subclasses in VTK and decorators used to
# 'register' the algorithm with ParaView along with information about UI.
from paraview.util.vtkAlgorithm import smdomain, smhint,... | banesullivan/ParaViewGeophysics | PVPlugins/PVGeo_Model_Builder.py | Python | bsd-3-clause | 5,281 | [
"ParaView",
"VTK"
] | 9792327652c857afb19854e04a4907f5cc24e16985cc500732b33c5cb2d263b3 |
#!/usr/bin/env python
#
# Restriction Analysis Libraries.
# Copyright (C) 2004. Frederic Sohm.
#
# 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.
#
""" Notes about the diverses class of the ... | bryback/quickseq | genescript/Bio/Restriction/Restriction.py | Python | mit | 81,213 | [
"Biopython"
] | 786c242fd937c13ab61c7984d90a4dccf26fe657441eeb3fb6f8abe9feb912af |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'PreviousObstetricHistory.year'
db.delete_column(u'patient_previousobstetrichistory', 'year... | aazhbd/medical_info01 | patient/migrations/0025_auto__del_field_previousobstetrichistory_year__add_field_previousobste.py | Python | bsd-3-clause | 30,003 | [
"VisIt"
] | c57f09124ec1a5b97e545bd592218f62c37568fd3cc243a403a6588b83931371 |
##############################################################################
# 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... | mfherbst/spack | var/spack/repos/builtin/packages/r-affyrnadegradation/package.py | Python | lgpl-2.1 | 1,966 | [
"Bioconductor"
] | b078d2570cd2118897ee6b94de35b76b46f05157b3a31de365e6fc87aa895f7a |
from .sets import *
import math
import random
class TimeBiasSet(BoxSet):
"""A set for an integration time variable that samples more-or-less
uniformly from the *outcome* state, given a maximum integration duration
and a space of controls uspace.
It assumes the next state is obtained by the integral
... | krishauser/pyOptimalMotionPlanning | pomp/spaces/biassets.py | Python | apache-2.0 | 3,155 | [
"Gaussian"
] | df512f40d599911cdb7ae2df77ec02bbeece97a214d234b98ea27c307f3438ae |
#!/usr/bin/env python3
#
# Copyright (c) 2017 Weitian LI <weitian@aaronly.me>
# MIT License
#
"""
Create new randomized coordinates by adding random offset to the existing
OSKAR sky model (i.e., osm), and replace original coordinates with the
specified new ones.
"""
import os
import argparse
import numpy as np
cla... | liweitianux/atoolbox | astro/oskar/osm-randomize-coord.py | Python | mit | 5,722 | [
"Gaussian"
] | 5b0c798c9ccaf43dd762ec3985251e954830da6e1b65b3fa5f680a81c74eebdf |
#
# Copyright 2018 Analytics Zoo 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... | intel-analytics/analytics-zoo | pyzoo/test/zoo/orca/learn/jep/test_pytorch_estimator_for_spark.py | Python | apache-2.0 | 6,309 | [
"ORCA"
] | e55d4d7fe18fad01b0f7e8daecfd6bc641e9f8e584f90a4a870a2d1adcbe2601 |
"""
View for Courseware Index
"""
# pylint: disable=attribute-defined-outside-init
from datetime import datetime
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.context_processors import csrf
from django.core.urlreso... | shabab12/edx-platform | lms/djangoapps/courseware/views/index.py | Python | agpl-3.0 | 22,960 | [
"VisIt"
] | 48138fde1968e188abc31f14159fdfe48edf75e63d7a6b191147a1201c91840e |
#!/usr/bin/env python
#
# Wrapper script for starting the biopet-bamstats JAR package
#
# This script is written for use with the Conda package manager and is copied
# from the peptide-shaker wrapper. Only the parameters are changed.
# (https://github.com/bioconda/bioconda-recipes/blob/master/recipes/peptide-shaker/pep... | CGATOxford/bioconda-recipes | recipes/biopet-bamstats/biopet-bamstats.py | Python | mit | 3,367 | [
"Bioconda"
] | c3c49fd6a432b61267914b08342a14f1a69cb1fb56571cabf4601f8c77ffaa3d |
# -*- coding: utf-8 -*-
#!/usr/bin/env python3
#-------------------------------------------------------------------------------
# Name:
# Purpose: This .py file extracts adjacency lists and detects communities
# from the corresponding timeslots.
#
# Required libs: python-dateutil,pyparsing,numpy,ma... | dinos66/commRankingMine | CommunityRanking_v3.py | Python | apache-2.0 | 88,525 | [
"Bowtie"
] | 09e05126d083f8f1a102440b30d6701eb352a9dee064e706883f51c9d918bd9a |
# Copyright (C) 2015 Samuel Owen, Ivan Pechenezhskiy
#
# 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 program ... | McDermott-Group/LabRAD | LabRAD/Measurements/General/waveform.py | Python | gpl-2.0 | 22,660 | [
"Gaussian"
] | 3436b911112993f41d993bb1f83d9241e3f5e3df84a2e25c084d901aed0bcaaf |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | resmo/ansible | lib/ansible/modules/files/acl.py | Python | gpl-3.0 | 11,789 | [
"Brian"
] | c2a1580d56de0552b5318ed381a79a93720c0c2ce04ab1020f140ce789aa9051 |
"""
View for Courseware Index
"""
# pylint: disable=attribute-defined-outside-init
import logging
import six
from six.moves import urllib
from django.conf import settings
from django.contrib.auth.views import redirect_to_login
from django.db import transaction
from django.http import Http404
from django.template.co... | msegado/edx-platform | lms/djangoapps/courseware/views/index.py | Python | agpl-3.0 | 26,965 | [
"VisIt"
] | ead21751d885e7e5f1e12c9b2521762e75df43f617d368aaf4cdac56ba3aa4a9 |
# Test of the handling of degenerate bands in response code
from ase import Atoms
from gpaw import GPAW, PW
from gpaw.response.df import DielectricFunction
from gpaw.test import findpeak, equal
import numpy as np
def get_hydrogen_chain_dielectric_function(NH, NK):
a = Atoms('H', cell=[1, 1, 1], pbc=True)
a.ce... | robwarm/gpaw-symm | gpaw/test/hyd_chain_response.py | Python | gpl-3.0 | 1,359 | [
"ASE",
"GPAW"
] | b987489e53333b01594505a644b264f63718f8b210ef0705c90c12227b766f44 |
# -*- coding: utf-8 -*-
#
# Copyright 2015 AirPlug 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 applic... | ddinsight/dd-streamworks | stream_worker/devmodule/production/networklog/__init__.py | Python | apache-2.0 | 12,862 | [
"Galaxy"
] | 6ce8cd03a7b442f811af28c23ab15a3c31c0215a327b1a314387bc972e84cf40 |
import sys
import shlex
import pysam
import subprocess
import multiprocessing
import os
def is_nonempty_file(path):
return os.path.isfile(path) and os.path.getsize(path)
def submit_mdist(tup):
ss, ks, sketchfns, ofn = tup
subprocess.check_call("mash dist -p 1 %s > %s" %
(" ".jo... | dnbaker/emp | python/run_dist.py | Python | gpl-3.0 | 10,939 | [
"pysam"
] | 5899d0e6df5f7221e0ea4535975bf210854e103426aa34b8f5dfb4df3d1a79e2 |
'''
Created on Jan 20, 2016
@author: rch
'''
from traits.api import \
Float, Property, cached_property, Int, \
Instance, Array, Bool, List
import numpy as np
from oricreate.api import YoshimuraCPFactory, \
fix, link, r_, s_, t_, MapToSurface,\
GuConstantLength, GuDofConstraints, \
GuPsiConstraint... | simvisage/oricreate | apps/waterbomb/ex01_pwaterbomb_ahc.py | Python | gpl-3.0 | 27,583 | [
"Mayavi"
] | f841edf76e6911b2565b5c991c73c7fc43bfdc935e0dc6adfdf7bf27d6797839 |
# pylint: disable-msg=I0011,C0301,W0611
"""I found some of my scripts trigger off an AttributeError in pylint
0.8.1 (with common 0.12.0 and astroid 0.13.1).
Traceback (most recent call last):
File "/usr/bin/pylint", line 4, in ?
lint.Run(sys.argv[1:])
File "/usr/lib/python2.4/site-packages/pylint/lint.py", lin... | ruchee/vimrc | vimfiles/bundle/vim-python/submodules/astroid/tests/testdata/python3/data/package/import_package_subpackage_module.py | Python | mit | 2,242 | [
"VisIt"
] | 53a06c31bff28056fc46a226b13ad6106262854ee726010b3c7e80bd633ecda5 |
from paraview.simple import *
import os
mainDirName = os.getcwd() + '\\vtk\\'
fileRootFmt = '5MW_Land_ModeShapes.Mode{:d}.LinTime1.' # keep the format specifier {:d} for the mode number
nModes = 15 # number of modes to visualize
fps = 30 # frames per second (rate to save in the .avi file)
StructureModule = 'ED'... | OpenFAST/r-test | glue-codes/openfast/5MW_Land_ModeShapes/plotModeShapes.py | Python | apache-2.0 | 4,700 | [
"ParaView",
"VTK"
] | b7d9c2ab078aa40e9f62123807b6a1345ce4987da4d94046215300e2fdaa5c7c |
#runas import numpy as np; x = np.arange(1., 26.).reshape(5,5); factorMatrix0(x), factorMatrix1(x)
import numpy as np
#pythran export factorMatrix0(float[:,:])
def factorMatrix0(M):
# Gaussian elimination, partial pivoting.
# M must be an (n,n+1) numpy array. Not tested!
n = M.shape[0]
m= M.shape[1]
for l... | serge-sans-paille/pythran | pythran/tests/cases/lu.py | Python | bsd-3-clause | 1,516 | [
"Gaussian"
] | e68b062f35a65a530157031aff303fafb6b15352a394f509c1f8fe5ea931c330 |
# -*- coding: utf-8 -*-
"""
This is a Numeric/numpy free port of the method:
Scientific.Geometry.Transformation.Rotation.axisAndAngle(self)
From Konrad Hinsen ScientificPython
http://dirac.cnrs-orleans.fr/plone/software/scientificpython
"""
__author__ = "Pierre Legrand (pierre legrand \at synchrotron-soleil fr)"
__da... | RAPD/RAPD | src/plugins/subcontractors/xdsme/new/xdsme-0.4.9/XOconv/AxisAndAngle.py | Python | agpl-3.0 | 3,373 | [
"DIRAC"
] | c67f652c7a0d9e649139654c66d3044aad1e6a326e2296d593c2ff7c6bbe5d54 |
import os
import lan
debug = False
class CGenerator(object):
""" Uses the same visitor pattern as the NodeVisitor, but modified to
return a value from each visit method, using string accumulation in
generic_visit.
"""
def __init__(self):
self.output = ''
self.quotes = '\... | dikujepsen/OpenTran | src/framework/codegen/cgen.py | Python | mit | 12,254 | [
"VisIt"
] | 8e49bc0b01ca3437add16262a3fe7ede8e06fb6451a30685229d2fb80f7c4860 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2014 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU Lesser General Public License as published by
## the Free Software F... | andrebellafronte/stoq | stoqlib/gui/wizards/productwizard.py | Python | gpl-2.0 | 6,117 | [
"VisIt"
] | 5efd3ba012c42136c758146077e81e95f31518ed7c39bbf8e4ddfe1c5071217d |
try:
from mmtf import fetch, parse
except ImportError:
from Bio import MissingPythonDependencyError
raise MissingPythonDependencyError("Install mmtf to use Bio.PDB.mmtf "
"(e.g. pip install mmtf-python)")
from Bio.PDB.mmtf.DefaultParser import StructureDecoder
def ge... | zjuchenyuan/BioWeb | Lib/Bio/PDB/mmtf/__init__.py | Python | mit | 1,141 | [
"Biopython"
] | ad01fe2538d8ec77b376be89e5dd99e3f9da77f39d75adcf559ab3aabda38305 |
import os
import uuid
import unittest
import bson
import pymongo
from pymatgen.db.query_engine import QueryEngine, QueryResults
from pymatgen.db.tests import common
has_mongo = common.has_mongo()
test_dir = os.path.join(os.path.dirname(__file__), "..", "..", "..", "test_files")
class QueryResultsTest(unittest.Tes... | materialsproject/pymatgen-db | pymatgen/db/tests/test_queryresults.py | Python | mit | 2,299 | [
"pymatgen"
] | 700dcc56a81807533662d90a32ceac79c4de90c5f53357e4338bd975bd8fb6fd |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2017 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of ... | kratman/psi4public | psi4/driver/qcdb/parker.py | Python | gpl-2.0 | 6,432 | [
"Psi4"
] | e885eba50b4a882ec5f5bbc539ff256688a8138cac5adcbbf27a3e6e673d70a8 |
#!/usr/bin/env python
__author__ = 'thomasvangurp'
# Date created: 22/11/2014 (europe date)
# Function: Pipeline for mapping reads to reference
#Python version: 2.7.3
#External dependencies: samtools,pysam,methylation_calling.py
#Known bugs: None
#Modifications: None
import pysam
import argparse
import subprocess
impor... | thomasvangurp/epiGBS | mapping_varcall/mapping_variant_calling.py | Python | mit | 27,215 | [
"Biopython",
"pysam"
] | a3af5973aec438a66618e0a481a0b14ffce2aa68226d0e10074ebe78a5b6a0ac |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2017 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of ... | kratman/psi4public | psi4/share/psi4/databases/BAKERJCC93.py | Python | gpl-2.0 | 42,491 | [
"Psi4"
] | 49d37892e793409889a9cf19d420ee413a01bc71d54c05f0c2203be60f40f90f |
#!/usr/bin/env python
########################################################################
# File : dirac-dms-pfn-accessURL
# Author : Stuart Paterson
########################################################################
"""
Retrieve an access URL for a PFN given a valid DIRAC SE
Usage:
dirac-dms-pfn-acce... | yujikato/DIRAC | src/DIRAC/Interfaces/scripts/dirac_dms_pfn_accessURL.py | Python | gpl-3.0 | 1,410 | [
"DIRAC"
] | a6bf0f191994655441ad7ace42a86f4657a303e49747e175a58904d382f3e147 |
#----------------------------------------------------------------------
# Copyright (c) 2013-2015 Raytheon BBN Technologies
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without restriction, including ... | plantigrade/geni-tools | src/gcf/omnilib/stitch/defs.py | Python | mit | 9,291 | [
"ORCA"
] | 44c7b759401e503897e65086cf0f375dbb293156a24c5401bc20d8ad01bd21f7 |
"""Coders for individual Variable objects."""
from __future__ import absolute_import, division, print_function
import warnings
from functools import partial
import numpy as np
import pandas as pd
from ..core import dtypes, duck_array_ops, indexing
from ..core.pycompat import dask_array_type
from ..core.variable impo... | jcmgray/xarray | xarray/coding/variables.py | Python | apache-2.0 | 10,630 | [
"NetCDF"
] | 616da71b2c23a87fb38a5a6983d7ccf5a0de81bbfc23d4e3528a398f50c74900 |
"""Defines use-cases for verifying requirements and providing examples
"""
import unittest
import seres
from seres import test
objs = test.get_all_models()
class FileCsv(unittest.TestCase):
def test_create(self):
seres.create("file:///C:/Users/Brian/Projects/seres/test/test.csv", objs)
def test_read(self):
... | Tythos/seres | test/restful_crud.py | Python | mit | 635 | [
"Brian"
] | 410accb9a13a136f6bdad19c9d057d3f8c1383044a928e5dbd63de3d9c7b81d0 |
""" """
import os
import glob
import ast
import logging
import subprocess
import ctypes as c
import numpy as np
import numpy.ctypeslib as ctl
from .vhdl_ctree.frontend import get_ast
from .vhdl_ctree.c.nodes import MultiNode
from .vhdl_ctree.jit import LazySpecializedFunction
from errors import TransformationError
from... | alphaFred/Sejits4Fpgas | sejits4fpgas/src/jit_synth.py | Python | gpl-3.0 | 7,688 | [
"VisIt"
] | 906b677f28c2515ac6faeae3afd14a7a87f3ce4e95cd04cd0cff0e03996945a6 |
# -*- coding: utf-8 -*-
#
# we set up default information for our locale.
# Translators should use this file as the basis of their translation.
# Copy this file and rename it for you locale.
#
# For example, Spanish uses:
# defaults_es.py
#
# British English uses:
# defaults_en_GB.py
#
# Please fill in the below fields... | thinkle/gourmet | gourmet/defaults/defaults_en.py | Python | gpl-2.0 | 43,183 | [
"Octopus"
] | 2de050179b96be74367c3e29027ea4041cf32195bbada63c2c11d6cc58f67f04 |
''' DowntimeCommand module
'''
import urllib2
from datetime import datetime, timedelta
from DIRAC import gLogger, S_OK, S_ERROR
from DIRAC.Core.LCG.GOCDBClient import GOCDBClient
from DIRAC.Core.Utilities.SitesDIRACGOCDBmapping ... | marcelovilaca/DIRAC | ResourceStatusSystem/Command/DowntimeCommand.py | Python | gpl-3.0 | 12,680 | [
"DIRAC"
] | 3265386f13d2622fd315a87ffc704b1475399048a5b8c6378abc0dbef80d733e |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Jeroen Hoekx <jeroen.hoekx@dsquare.be>, Alexander Bulimov <lazywolf0@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free So... | lberruti/ansible-modules-extras | system/lvol.py | Python | gpl-3.0 | 8,229 | [
"Firefly"
] | 89e7e40f539453a5b89b41e36875c8368fd9c97be88b10c66de9f20d3d4a9df7 |
from __future__ import absolute_import
import unittest
from pymatgen.core.lattice import Lattice
from pymatgen.core.structure import Structure
from pymatgen.analysis.elasticity.tensors import Tensor
from pymatgen.analysis.elasticity.strain import Strain, Deformation,\
convert_strain_to_deformation, DeformedSt... | matk86/pymatgen | pymatgen/analysis/elasticity/tests/test_strain.py | Python | mit | 8,507 | [
"pymatgen"
] | 1247a47950da4676085d855a114d13b546c899d42bfc9c8fbeb9dd5c8387d2b8 |
#!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | sunqm/pyscf | pyscf/scf/rohf.py | Python | apache-2.0 | 18,334 | [
"PySCF"
] | bbacde3258c4308aa5dff1435f7df4064eb46adafcde5d56da6393ef3aa063f2 |
import sys
from ase.test.tasks.dcdft import DeltaCodesDFTTask
from gpaw.atom.configurations import parameters
from gpaw.test.big.scf.analyse import rundefs
if len(sys.argv) == 1:
xc = 'PBE'
run = None
elif len(sys.argv) == 2:
xc = 'PBE'
run = sys.argv[1]
elif len(sys.argv) == 3:
xc = sys.argv[1]
... | robwarm/gpaw-symm | gpaw/test/big/scf/dcdft_pbe_pw.py | Python | gpl-3.0 | 4,362 | [
"ASE",
"GPAW"
] | 8cce479340b694d74b3ad53218175d7a182f1484fb34eafac7cb41c04f9d1067 |
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | hnakamur/ansible | lib/ansible/constants.py | Python | gpl-3.0 | 16,032 | [
"Galaxy"
] | a43d803cf63770762c0624bf73b2487c2243755cbfa344a008dd22ea58a87347 |
# -*- coding: utf-8 -*-
# HiPart is a program to analyze the electronic structure of molecules with
# fuzzy-atom partitioning methods.
# Copyright (C) 2007 - 2012 Toon Verstraelen <Toon.Verstraelen@UGent.be>
#
# This file is part of HiPart.
#
# HiPart is free software; you can redistribute it and/or
# modify it under t... | molmod/hipart | hipart/tests/utils.py | Python | gpl-3.0 | 7,966 | [
"Gaussian"
] | 4e32dc948c91bc7e2b24c95bcae6294221beeb7d27c18258c388065b16f4994f |
"""
Ensure that we can use pathlib.Path objects in all relevant IO functions.
"""
import sys
try:
from pathlib import Path
except ImportError:
# Not available. No fallback import, since we'll skip the entire
# test suite for Python < 3.6.
pass
import numpy as np
from numpy.testing import assert_
impor... | mbayon/TFG-MachineLearning | venv/lib/python3.6/site-packages/scipy/io/tests/test_paths.py | Python | mit | 2,994 | [
"NetCDF"
] | 5439a650dc99de48801c507ef5e35d144b37b2ce19cd9e19e0f9b5554224445a |
# -*- coding: cp1252 -*-
# Copyright (C) 2011 - 2015 The Board of Regents of the University of Wisconsin System
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program i... | sanyaade-mediadev/Transana | MediaConvert.py | Python | gpl-2.0 | 92,531 | [
"MOE"
] | a778320ab8273dc4e24c81d1e219f978d72641e410db2096388ede1f3af277d6 |
import logging
from igraph import Graph
from more_itertools import unique_everseen
from parvusdb import GraphDatabase
from .base_writer import BaseWriter
class RelationTripletsWriter(BaseWriter):
_logger = logging.getLogger(__name__)
def visit(self, g):
triplets = self.__get_relations_and_entities_f... | fractalego/pynsett | pynsett/writer/relation_triplets_writer.py | Python | mit | 1,132 | [
"VisIt"
] | 431bbde156e9680c90c98bf9b66356ba119daa31b8896b5af676576e0e38f8b5 |
#
# 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 ... | sethah/BigDL | pyspark/bigdl/nn/layer.py | Python | apache-2.0 | 111,477 | [
"Gaussian"
] | 7209594d6046f88106b3be6195516583e06adf4d3225d01ac1306b7f8a687087 |
# -*- coding: utf-8 -*-
"""A plugin to generate a list of domains visited."""
from urllib import parse as urlparse
from plaso.analysis import interface
from plaso.analysis import manager
class UniqueDomainsVisitedPlugin(interface.AnalysisPlugin):
"""A plugin to generate a list all domains visited.
This plugin ... | Onager/plaso | plaso/analysis/unique_domains_visited.py | Python | apache-2.0 | 2,814 | [
"VisIt"
] | 29fde9c8212a90aa39e730ee7b5844d570d74e6fd9d23277fa09e189c1a08414 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division, print_function
__author__ = "Dilawar Singh"
__copyright__ = "Copyright 2017-, Dilawar Singh"
__version__ = "1.0.0"
__maintainer__ = "Dilawar Singh"
__email__ = "dilawars@ncbs.res.in"
__status__ ... | upibhalla/moose-core | scripts/submit.py | Python | gpl-3.0 | 4,374 | [
"MOOSE"
] | ccc9f4c55c3460ae5ee18e1946ad32ac796cfcd38207dda30bec5bce96dfba2c |
#!/usr/bin/env python
# Copyright 2014-2020 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | gkc1000/pyscf | pyscf/solvent/ddcosmo.py | Python | apache-2.0 | 35,982 | [
"Gaussian",
"PySCF"
] | 378688be6108e6ece86ec61cb4f9b5a851b6910db8aaeb50fc1749ad666c2da0 |
# inputs: directories
# read in each bam, check that it's
# output: combined, indexed bam
# for each input directory
import argparse
import glob
import logging
import os
import peewee
from peewee import fn
from playhouse import shortcuts
import pysam
import traceback
from utils.haplotype_caller import compute_output... | macarthur-lab/exac_readviz_scripts | pipeline/combine_bams.py | Python | mit | 13,595 | [
"pysam"
] | 74c27e7a2146e8d2a5025beee9eeb7b5c25629bcc87c8e1dca17f4b5e4884eec |
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Generic presubmit checks that can be reused by other presubmit checks."""
from __future__ import print_function
import os as _os
from warnings impo... | CoherentLabs/depot_tools | presubmit_canned_checks.py | Python | bsd-3-clause | 71,292 | [
"VisIt"
] | 9e7781eeab288231cab05c4e047efc1d7154265a11fb3bf27b996e27854a1088 |
# encoding: utf-8
"""
Creates geometry objects from facets.
"""
from yade.wrapper import *
import utils,math,numpy
try:
from minieigen import *
except ImportError:
from miniEigen import *
#facetBox===============================================================
def facetBox(center,extents,orientation=Quaternion.Ide... | bchareyre/trial | py/geom.py | Python | gpl-2.0 | 22,443 | [
"ParaView"
] | 702ac41a8f8151920ad4dd0a589c0bd35f1ae1d6ffc457d5c3dd619d8eef0cda |
import string
import math
from pymol.cgo import *
from pymol import cmd
axes = [
LINEWIDTH, 3.0,
BEGIN, LINES,
COLOR, 0.2, 1.0, 0.2,
VERTEX, 0.0, 0.0, 0.0,
VERTEX, 3.0, 0.0, 0.0,
COLOR, 1.0, 0.2, 0.2,
VERTEX, 0.0, 0.0, 0.0,
VERTEX, 0.0, 3.0, 0.0,
COLOR, 0.2, 0.2, 1.0,
VERTEX, 0.0... | gratefulfrog/lib | python/pymol/pymol_path/examples/devel/cgo_label_hack.py | Python | gpl-2.0 | 1,498 | [
"PyMOL"
] | d41646be90be071c9fd5cec67dcf8044807700d866c1dff442cd83b9583a3c72 |
"""
Student Views
"""
import datetime
import logging
import uuid
import json
import warnings
from collections import defaultdict
from urlparse import urljoin, urlsplit, parse_qs, urlunsplit
from django.views.generic import TemplateView
from pytz import UTC
from requests import HTTPError
from ipware.ip import get_ip
i... | caesar2164/edx-platform | common/djangoapps/student/views.py | Python | agpl-3.0 | 114,210 | [
"VisIt"
] | cacc4b309de5b74e6965f07f8a8ae60b7c16e59a0cc8ead68cecefb71df88f51 |
# The following code has been adapted from Till A. Hoffmann.
# See https://nbviewer.jupyter.org/gist/tillahoffmann/f844bce2ec264c1c8cb5
# and https://stackoverflow.com/questions/27623919/weighted-gaussian-kernel-density-estimation-in-python
import numpy as np
from scipy.spatial.distance import cdist
import thalesians... | thalesians/tsa | src/main/python/thalesians/tsa/kde.py | Python | apache-2.0 | 11,693 | [
"Gaussian"
] | 9eb26d2d0e4be38ea3ac4cc96f2237ebaaa86bc650ccd5300fa9973a4f995abb |
# -*- coding:utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2010, 2011, 2012 CERN.
##
## Invenio 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 you... | fjorba/invenio | modules/bibindex/lib/bibindex_engine_tokenizer_unit_tests.py | Python | gpl-2.0 | 16,481 | [
"Brian"
] | 892d3e97c91ddbe6860b9339c333954d24f8656de7c22e916de4b4302eb898a0 |
#!/usr/bin/env python
# Copyright 2015 The Kubernetes 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 appli... | imcsk8/origin | vendor/k8s.io/kubernetes/hack/boilerplate/boilerplate.py | Python | apache-2.0 | 7,352 | [
"VisIt"
] | 1da3b19a8e77bb6004396ea881e68d0814ef2822f8634b1e3a84b05c7046857e |
#!/usr/bin/python
#
# This source file is part of appleseed.
# Visit https://appleseedhq.net/ for additional information and resources.
#
# This software is released under the MIT license.
#
# Copyright (c) 2020 Terry Chen, The appleseedhq Organization
#
# Permission is hereby granted, free of charge, to any person ob... | luisbarrancos/appleseed | scripts/utils.py | Python | mit | 1,898 | [
"VisIt"
] | 73d0533f88b13735721ac17feea3030b94dc00d210d16655621fce557e3972c7 |
"""
Demonstrate SVG filtering effects which might be used with mpl.
Note that the filtering effects are only effective if your svg rederer
support it.
"""
from __future__ import print_function
import matplotlib
matplotlib.use("Svg")
import matplotlib.pyplot as plt
import matplotlib.transforms as mtransforms
fig1 =... | lthurlow/Network-Grapher | proj/external/matplotlib-1.2.1/lib/mpl_examples/misc/svg_filter_line.py | Python | mit | 2,145 | [
"Gaussian"
] | 99ec65ca9d2324789de4b11a46c3d5e25b8b82b492738255f3654ffc17123e96 |
import sys
import bisect
sys.path.append('../../../vmdgadgets')
import vmdutil
def get_index(frame_no, keys):
index = bisect.bisect_left(keys, frame_no)
if index <= len(keys) -1 and keys[index] == frame_no:
return index, True
else:
return index - 1, False
def get_vmdtransformation(frame_n... | Hashi4/vmdgadgets | sample/lookat/sm31942771/modify_root.py | Python | apache-2.0 | 2,047 | [
"VMD"
] | a3dc18e3703fd21349e496917091c4e26a0653cb784eafa8ac98abc411c26bdf |
#! /usr/bin/python
"""
Creates a pileup file from a bam file and a reference.
usage: %prog [options]
-p, --input1=p: bam file
-o, --output1=o: Output pileup
-R, --ref=R: Reference file type
-n, --ownFile=n: User-supplied fasta reference file
-d, --dbkey=d: dbkey of user-supplied file
-x, --indexDir=... | volpino/Yeps-EURAC | tools/samtools/sam_pileup.py | Python | mit | 3,931 | [
"Galaxy"
] | 76f303a6bd3ae23f19302855dd94644b24c0cfdd88e02e00a59849c27c9d1253 |
#
# script.py - non-interactive, script based anaconda interface
#
# Copyright (C) 2011
# Red Hat, Inc. All rights reserved.
#
# 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 o... | kalev/anaconda | pyanaconda/script.py | Python | gpl-2.0 | 1,640 | [
"Brian"
] | 3b48c71760848879b49fe308bebe2d919bdb1f7c0cbda995f20211577841128b |
# Copyright (C) 2014
# Pierre de Buyl
# 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 ... | capoe/espressopp.soap | src/interaction/HarmonicTrap.py | Python | gpl-3.0 | 3,020 | [
"ESPResSo"
] | c42238b80ab63a69a255200fd4759073252c07111eabbb5be7389ededab7c4de |
#! /usr/bin/env python3
metadata = {
"name" : "DIMS report",
"output" : "html",
"description" : "Generate a report for Moderate and Severe Intellectual Disability (DIMS)",
"localisation" : ["fr-FR"]
}
def report_data(analysis_id, data, cache_path, output_path, annso_core=None):
import ipdb
... | REGOVAR/regovar-server | annso/reports/dims/report.py | Python | agpl-3.0 | 34,592 | [
"pysam"
] | 62ea910aa9ad59b9f07d8a931158226d1be79bab95f4918f9ab00c4be40754b8 |
import copy
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import matplotlib.patches as mpatches
from scipy.stats import beta
from .simulation import ReMapSim
from .formatting import cmap_colors, mpl_defaults
import time
def HistAnimation(core_di... | alexrutar/banditvis | banditvis/animation.py | Python | mit | 18,173 | [
"Gaussian"
] | f7e06ef986ad110b5ac6546ecc6be9d8c4c502d567544d5219588dc5d9215a67 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.