text
stringlengths
12
1.05M
repo_name
stringlengths
5
86
path
stringlengths
4
191
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
12
1.05M
keyword
listlengths
1
23
text_hash
stringlengths
64
64
from __future__ import absolute_import import math from collections import namedtuple from PyQt4.QtGui import ( QWidget, QFrame, QLabel, QListWidget, QScrollArea, QSplitter, QListView, QVBoxLayout, QGridLayout, QSizePolicy, QPainter, QBrush, QPen, QPalette ) from PyQt4.QtCore import Qt, QSize, QRectF, ...
tomazc/orange-bio
orangecontrib/bio/widgets/OWMoleculeVisualizer.py
Python
gpl-3.0
30,307
[ "Pybel" ]
1a68ad66e2c0a17f6cee8c79822cfa43ea278ab2ee982fb27594883c8de3d2a2
from PyQt4 import QtCore, QtGui from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor import platform import sip import types import vtk class system: systemType = platform.system() AsciiToKeySymTable = ( None, None, None, None, None, None, None, None, None, ...
rsmz/pyqvtkwidget
PyQVTKWidget.py
Python
gpl-2.0
30,206
[ "VTK" ]
11bc1646a5028ca30c2cde8781f93ca443550c0b40ee4d7e0f6bae2cec701127
#!/usr/bin/env python # -*- coding: utf-8 -*- r"""rna_pdb_edit_occupancy_bfactor.py - edit occupancy or bfactor in PDB file. Example:: rna_pdb_edit_occupancy_bfactor.py --occupancy --select A:1-40,B:1-22 \ --set-to 0 \ 19_Bujnicki_Human_4_rpr_...
mmagnus/rna-pdb-tools
rna_tools/tools/rna_pdb_edit_occupancy_bfactor/rna_pdb_edit_occupancy_bfactor.py
Python
gpl-3.0
6,158
[ "Biopython" ]
9182bf763ded49137ca2d7edfff904a417745224b62567baa4c08dd739d0ff6a
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' cc_plugin_ncei/ncei_base.py ''' from __future__ import print_function from compliance_checker.base import Result, BaseCheck, BaseNCCheck from compliance_checker.cf.util import StandardNameTable, units_convertible from cc_plugin_ncei import util from cf_units import Uni...
ioos/cc-plugin-ncei
cc_plugin_ncei/ncei_base.py
Python
apache-2.0
80,767
[ "NetCDF" ]
904ed8a815504b035532141e949a200e13ddd131a8bb3e1972db89dc9517ed29
#!/usr/bin/env python import vtk def main(): colors = vtk.vtkNamedColors() colors.SetColor("right_bkg", [0.4, 0.5, 0.6, 1.0]) colors.SetColor("left_bkg", [0.6, 0.5, 0.4, 1.0]) # Create an image source = vtk.vtkImageSinusoidSource() source.Update() normalizeFilter = vtk.vtkImageNorma...
lorensen/VTKExamples
src/Python/ImageData/ImageNormalize.py
Python
apache-2.0
2,168
[ "VTK" ]
8e29407ca29e3c83e3a40d1bb808332ecc21d816756d9d6c5a9964c6cf532612
#!/usr/bin/env python3 #* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgp...
nuclear-wizard/moose
python/peacock/tests/utils/test_ExeLauncher.py
Python
lgpl-2.1
1,034
[ "MOOSE" ]
4a521cc7ff2d0cbc819d5404bc116ddd03346e34f57cebc6dd59278d2b747c1f
"""Test the vtk.mutable() type and test pass-by-reference. Created on Sept 19, 2010 by David Gobbi """ import sys import vtk from vtk.test import Testing class TestMutable(Testing.vtkTest): def testFloatMutable(self): m = vtk.mutable(3.0) n = vtk.mutable(4.0) m *= 2 self.assertEqu...
b3c/VTK-5.8
Common/Testing/Python/TestMutable.py
Python
bsd-3-clause
1,602
[ "VTK" ]
a6d32090e7b393f70df042b17efbd0880e48dcaa1710730def9c57f2944e357f
""" fillerbase Module Classes to help fill widgets with data Copyright (c) 2008-10 Christopher Perkins Original Version by Christopher Perkins 2008 Released under MIT license. """ from .configbase import ConfigBase, ConfigBaseError from .metadata import FieldsMetadata import inspect from datetime import datetime en...
gjhiggins/sprox
sprox/fillerbase.py
Python
mit
13,428
[ "VisIt" ]
30eb96b55ca57d20403257364f82234938551a3dc7e92a6de3969f0b19348449
""" Copyright (c) 2009 John Markus Bjoerndalen <jmb@cs.uit.no>, Brian Vinter <vinter@nbi.dk>, Rune M. Friborg <rune.m.friborg@gmail.com>. See LICENSE.txt for licensing details (MIT License). """ from pycsp_import import * import time @process def Prefix(cin, cout, prefixItem=None): t = prefixItem while...
runefriborg/pycsp
examples/Commstime.py
Python
mit
1,622
[ "Brian" ]
bf002c5ea9993380e674b92412e97b9dc41cc7a67616360de498827d894ff1ec
""" Code for computing cut-based free energy profiles, and optimal reaction coordinates within that framework. This code employs scipy's weave, so C/OMP compatability is required. Most machines should have this functionality by default. To Do ----- > Choose best search method in `optimize` > Add functionality for sa...
msmbuilder/msmbuilder-legacy
MSMBuilder/cfep.py
Python
gpl-2.0
19,701
[ "MDTraj" ]
e5a4968bbb1e84e6a0b52e76da8fca6dec2fa90c4f18745062ae45adfabf95af
""" This file contains the outline of an implementation to load environment modules (http://modules.sourceforge.net/). This is a community contributed feature and the core Galaxy team does utilize it, hence support for it will be minimal. The Galaxy team eagerly welcomes community contribution and maintenance however....
jmchilton/pulsar
galaxy/tools/deps/resolvers/modules.py
Python
apache-2.0
6,087
[ "Galaxy" ]
90c63fa1090a4afe543b02cb0efa2ea2a1e3d6aae2eb4776cc5e63a445c6a22c
# Copyright 2010-2017, The University of Melbourne # Copyright 2010-2017, Brian May # # This file is part of Karaage. # # Karaage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License...
brianmay/karaage
docs/conf.py
Python
gpl-3.0
1,895
[ "Brian" ]
49411c8fe7f7c7a42eeb17016944c139372e32c72711d21bb22320520a480b89
from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import ( TestCase, run_module_suite, assert_, assert_raises, assert_equal, assert_warns, assert_array_equal, assert_array_almost_equal) from numpy import random from numpy.compat import asbytes import...
nbeaver/numpy
numpy/random/tests/test_random.py
Python
bsd-3-clause
59,057
[ "Gaussian" ]
c861d37133229d61b267caeb6535e6790ffc6d695a981ac0d73aaa457171d0d2
""" Copyright (C) 2011 N.D. Price Lab This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in th...
JohnCEarls/AUREA
src/AUREA/adaptive/ResourceEstimate.py
Python
agpl-3.0
5,543
[ "DIRAC" ]
9d1698b48490cb7a823da8348bae7b8ff06f9697c5c2d16ffc92a2aee7845142
#!/bin/python import vtk import math view = vtk.vtkContextView() view.GetRenderer().SetBackground(1.0, 1.0, 1.0) view.GetRenderWindow().SetSize(400, 300) chart = vtk.vtkChartXY() view.GetScene().AddItem(chart) chart.SetShowLegend(True) arrX = vtk.vtkFloatArray() arrX.SetName("X Axis") arrC = vtk.vtkFloatArray()...
trianam/tests
python/vtkPlot.py
Python
gpl-2.0
1,708
[ "VTK" ]
a7045c488a10975428cab3053e5e0a4ccdbeac3673f0067b9c4312505af5b202
# Copyright (c) 2011 OpenStack Foundation # 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 ...
Tesora-Release/tesora-trove
trove/guestagent/db/models.py
Python
apache-2.0
42,269
[ "NAMD" ]
4991ba3d5c4301fdc2e56838a47535f03eee33be87e928d07b9f583a0e36f7c7
# coding=utf-8 # Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, print_function import fileinput import functools import json import os import re import subprocess import sys from collections impor...
jsirois/pex
pex/pip.py
Python
apache-2.0
30,029
[ "VisIt" ]
edbc2cf6dbe5028088d673ceab2ab54994b23124566679f0037891cf48b5894c
#! /usr/bin/python # # Copyright (C) 2003-2014 ABINIT group # # Written by Matthieu Verstraete in python (compatible v1.9). # This is free software, and you are welcome to redistribute it # under certain conditions (GNU General Public License, # see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt...
SamKChang/abinit-7.10.5_multipole
scripts/post_processing/get_irreps.py
Python
gpl-3.0
15,644
[ "ABINIT" ]
e74afa93acbc102abb9adcbc992a63e97ac66c9cdb30a0299f211f27e4ba2954
#!/usr/bin/env python """ Add an existing transformation to an existing production. Transformations already belonging to another production cannot be added. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function __RCSID__ = "$Id$" import DIRAC from DIRAC.Core....
ic-hep/DIRAC
src/DIRAC/ProductionSystem/scripts/dirac_prod_add_trans.py
Python
gpl-3.0
2,507
[ "DIRAC" ]
696eb6ce9c1de50a0c623d27f863dc6072505bc7a132a67c981a6493fd84cbb5
## INFO ######################################################################## ## ## ## formbuilder ## ## =========== ...
petervaro/formbuilder
views.py
Python
gpl-3.0
2,482
[ "VisIt" ]
5c221a1b909959041e97b57a8e6f37a173db1bd0ba43f0eed06e37d2bf2dc9df
"""Metrics to assess performance on classification task given class prediction Functions named as ``*_score`` return a scalar value to maximize: the higher the better Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize: the lower the better """ # Authors: Alexandre Gramfort <alexandre.gramf...
bnaul/scikit-learn
sklearn/metrics/_classification.py
Python
bsd-3-clause
95,205
[ "Brian" ]
cefcf14b1e39817460dd8d63fa1d21a7de86da6f99f00869e2e39a480a36869c
#!/usr/bin/env python import copy from lsst.sims.catalogs.generation.db import queryDB from lsst.sims.catalogs.measures.astrometry import Bbox if __name__ == "__main__": csize = 10 objects = ("GALAXY",) myqdb = queryDB.queryDB(chunksize=csize, objtype="GALAXY") ic = myqdb.getInstanceCatalogById(8574812...
lsst/sims_catalogs_generation
python/lsst/sims/catalogs/generation/deprecated/jobAllocator/simonTest1.py
Python
gpl-3.0
430
[ "Galaxy" ]
a9cc1ada7e65e8165c07c10bc614d86a45977feaf575c13ffa2e81abdb74141b
"""Metrics to assess performance on regression task. Functions named as ``*_score`` return a scalar value to maximize: the higher the better. Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize: the lower the better. """ # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # ...
manhhomienbienthuy/scikit-learn
sklearn/metrics/_regression.py
Python
bsd-3-clause
41,871
[ "Gaussian" ]
d6c0c999b5dc5b5c43432042f01c914f84611c2ad6991ffa4a48287ceff9e716
# Prepare per-patient clinical data # TODO: Possibly incorporate Palumbo data import os from load_patient_data import load_per_patient_data import numpy as np import pandas as pd pd.options.mode.chained_assignment = None # Load input data data, per_patient_dict, per_patient_fields = load_per_patient_data() # Dictio...
xpspectre/multiple-myeloma
prep_patient_data.py
Python
mit
8,458
[ "VisIt" ]
29e065d6396bb8917ae38441bea864f98af22d9e2237f633433c8296f537434f
# -*- coding: utf-8 -*- # YAFF is yet another force-field code. # Copyright (C) 2011 Toon Verstraelen <Toon.Verstraelen@UGent.be>, # Louis Vanduyfhuys <Louis.Vanduyfhuys@UGent.be>, Center for Molecular Modeling # (CMM), Ghent University, Ghent, Belgium; all rights reserved unless otherwise # stated. # # This file is pa...
molmod/yaff
yaff/examples/007_monte_carlo/co2_in_mil53/raspa.py
Python
gpl-3.0
1,403
[ "RASPA" ]
c4a4f250f373b74984219001be7203983fd1155bf22da737f967e481dfcb589b
#!/usr/bin/env python import sys import os import logging import plyvel import argparse from subprocess import call from os.path import expanduser from basta import FileUtils as futils from basta import TaxTree as ttree from basta import AssignTaxonomy from basta import DownloadUtils as dutils from basta import DBUti...
timkahlke/BASTA
basta/BastaMain.py
Python
gpl-3.0
8,636
[ "BLAST" ]
d84909dbed2699ff0f106281ff22eb3c662e24ab9f911a4f24e8b204326a4690
import os import sys import vtkAll as vtk import math import time import types import functools import numpy as np from director import transformUtils from director import lcmUtils from director.timercallback import TimerCallback from director.asynctaskqueue import AsyncTaskQueue from director import objectmodel as om...
patmarion/director
src/python/director/drilldemo.py
Python
bsd-3-clause
130,003
[ "VTK" ]
9aad6bb1d20612a36a3e213bca6a257e38207d6038a79d4eb931ee10f7a19b79
#!/usr/bin/env python # # $File: AcgtMutator.py $ # # This file is part of simuPOP, a forward-time population genetics # simulation environment. Please visit http://simupop.sourceforge.net # for details. # # Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org) # # This program is free software: you can redistribut...
BoPeng/simuPOP
docs/AcgtMutator.py
Python
gpl-2.0
1,571
[ "VisIt" ]
0ed1f4f94135cd1639567842c8df15399415e62752e5d4436d8d892c5f17ac57
import logging from datetime import datetime from pathlib import Path import h5py import xarray from numpy.ma import masked_invalid # for pcolormesh, which doesn't like NaN from matplotlib.pyplot import figure, draw, close from matplotlib.colors import LogNorm from matplotlib.ticker import MultipleLocator from matplot...
scienceopen/gridaurora
gridaurora/plots.py
Python
gpl-3.0
17,476
[ "Gaussian" ]
27bcd226af78b31c8b11aaadc82629809fb7f60ab4186c2c0ea2d11c1b4d56b8
# proxy module from __future__ import absolute_import from mayavi.modules.ui.iso_surface import *
enthought/etsproxy
enthought/mayavi/modules/ui/iso_surface.py
Python
bsd-3-clause
98
[ "Mayavi" ]
4ff3c89b537bc0d28d5e5d3c88e84d792e26aab2886a198ff4268ce156035ede
#!/usr/bin/python import mechanize import bs4 import sys def parseInput(input): """ Returns a tuple of type (input_type, course dep/None, courser num/crn) given a user unput, parseInput does it's best to understand what is going on It broadly accepst two types of input 1: CRN Simple string of numbers ...
devty1023/peepingpete_dead
src/info_retrieve.py
Python
gpl-2.0
3,593
[ "VisIt" ]
c5dd90f9f698581805bc32c22320b80e225b0dbddc73809623dcecf203c6fd09
#__docformat__ = "restructuredtext en" # ******NOTICE*************** # optimize.py module by Travis E. Oliphant # # You may copy and use this module as you see fit with no # guarantee implied provided you keep this notice in all copies. # *****END NOTICE************ # A collection of optimization algorithms. Version ...
gfyoung/scipy
scipy/optimize/optimize.py
Python
bsd-3-clause
104,490
[ "Gaussian" ]
be2fb351a6f9b879daa6bdb33b3d06b7c47becf200c504f828521b76bc22286c
# This file is part of rhizi, a collaborative knowledge graph editor. # Copyright (C) 2014-2015 Rhizi # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of...
tlevine/rhizi
src/server/neo4j_cypher_parser.py
Python
agpl-3.0
27,434
[ "VisIt" ]
789358d3c11c39b891f79baff168c9089d0c84f24af35539b2daf6fe31339182
from gmi.mostusedsites.backend.models import Base, DBSession, User, Visit from sqlalchemy import create_engine from webtest import TestApp import gmi.mostusedsites.backend as backend import pytest import transaction @pytest.fixture(scope="session") def app(request): settings = {'sqlalchemy.url': 'sqlite:///:memor...
geyer-moldfusz/gmi.most_used_sites.backend
src/gmi/mostusedsites/backend/tests/conftest.py
Python
gpl-3.0
1,185
[ "VisIt" ]
df4038af268e1356731b84c7a57a31e157da2e893a77a9115999ca2a6f5fc05e
#!/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/uhf.py
Python
apache-2.0
39,122
[ "PySCF" ]
66e9f5f002103bb62087eb5bbbba0e9861d54780660c6f3433b9cf3a87dbac90
import json import asyncio import aiohttp import websockets from listen.errors import ListenError from listen.objects import User, Song from listen.utils import ensure_token from listen.constants import ( AUTH_URL, USER, USER_FAVOURITES, SONG_FAVOURITES, SONG_REQUEST, SOCKET_ENDPOINT ) class...
GetRektByMe/Listen
listen/client.py
Python
mit
4,830
[ "MOE" ]
5cc777aa9a691ea7118bfdbff0787bd65d9b521a527aee0cc954c01b1402a1d9
# http://networkx.github.io/documentation/latest/tutorial/tutorial.html # http://code.enthought.com/projects/mayavi/ import networkx as nx import numpy as np import numpy.ma as ma import itertools from mayavi import mlab # Generate graph to visualize #H=nx.random_lobster(100,0.9,0.9) #H=nx.balanced_tree(5, 2) #H=nx.co...
fromeroj/iimas
distribuida/ejemplo.py
Python
mit
2,185
[ "Mayavi" ]
d321c9c18537c5624492ef8d84e33fd9fa22459048330e759153ed69d6589525
"""This test checks that the StrainFilter works using the default built-in EMT calculator.""" import numpy as np from ase.constraints import StrainFilter from ase.optimize.mdmin import MDMin from ase.calculators.emt import EMT from ase.structure import bulk cu = bulk('Cu', 'fcc', a=3.6) class EMTPlus(EMT): def g...
alexei-matveev/ase-local
ase/test/strain_emt.py
Python
gpl-2.0
468
[ "ASE" ]
f82572200b10918a4660a21ccbfa2282c1e0fd66ede0c264fbe6889c3ea3aa4c
#default python modules import os from datetime import datetime #external packages import numpy as np import pandas as pd from sklearn.externals import joblib from sklearn.linear_model import Lasso from sklearn.model_selection import train_test_split, GridSearchCV from sklearn.neural_network import MLPClassifier from s...
joekasp/ionic_liquids
ionic_liquids/test/test_utils.py
Python
mit
5,560
[ "RDKit" ]
70f29e00906c7bd34805dc243990c884259585e332e4408f9b193e74907cdb02
# -*- coding: utf-8 -*- import unittest import logging from nose.tools import * # flake8: noqa (PEP8 asserts) import mock from framework.auth.core import Auth from website import settings import website.search.search as search from website.search import elastic_search from website.search.util import build_query from...
cldershem/osf.io
tests/test_elastic.py
Python
apache-2.0
26,984
[ "Brian" ]
412024e6c42bfc61c57b1d7693efcddf68872d5c952fc68c0eea6217e0d44ebd
import os.path from collections import defaultdict import numpy as np import pysam class Bam(object): def __init__(self, filename): """ Basic wrapper for pysam module, to allow the quick pulling of pileups for a certain region Arguments: ---------- filename = The full pat...
McIntyre-Lab/papers
newman_events_2017/python_workflow/programs/mclib_Python/bam.py
Python
lgpl-3.0
4,148
[ "pysam" ]
c7b1dde9c97e62a9def97ffec8a0a24dbde0fdf2ce6aee7ff2feb74e18244144
from __future__ import unicode_literals import csv import itertools import re from mptt.forms import TreeNodeMultipleChoiceField from django import forms from django.conf import settings from django.core.validators import URLValidator from django.urls import reverse_lazy COLOR_CHOICES = ( ('aa1409', 'Dark red')...
snazy2000/netbox
netbox/utilities/forms.py
Python
apache-2.0
19,262
[ "Amber" ]
9881a3a6f7e4b09082e482f3b48c575c1e5246410fd23d05b5b715688ab7b7d2
from mock import Mock import unittest from nav.models.manage import Netbox, Room class MetaClassTestCase(unittest.TestCase): def setUp(self): self.maxDiff = None self.netbox = Mock(name='Netbox', spec=Netbox) self.netbox.pk = 1337 self.netbox.id = self.netbox.pk self.netbox...
alexanderfefelov/nav
tests/unittests/netmap/metaclass_testcase.py
Python
gpl-2.0
756
[ "Galaxy" ]
944d9388732affade78b1950d07977a5f4c7dbe3fcc4e43d744ce13abf540f81
#!/usr/bin/env python """ MagPy-General: Standard pymag package containing the following classes: Written by Roman Leonhardt, Rachel Bailey 2011/2012/2013/2014 Written by Roman Leonhardt, Rachel Bailey, Mojca Miklavec 2015/2016 Version 0.2 (starting 28.02.2015) """ from __future__ import print_function # -------------...
leonro/magpy-git
magpy/stream.py
Python
gpl-3.0
471,297
[ "Gaussian", "NetCDF" ]
efccf840978af3f9a81b504c5bf1d17e20fd2b45452f5fa346620d05a6a85231
# Paperwork - Using OCR to grep dead trees the easy way # Copyright (C) 2012-2014 Jerome Flesch # # Paperwork 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 ...
Starch/paperwork
src/paperwork/frontend/settingswindow/__init__.py
Python
gpl-3.0
38,070
[ "ADF" ]
ee85e4395184699740d648f7121eeec06072c3858272af4b4039b4d2f9bee2ec
"""Tornado handlers for WebSocket <-> ZMQ sockets. Authors: * Brian Granger """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, dis...
WillisXChen/django-oscar
oscar/lib/python2.7/site-packages/IPython/html/base/zmqhandlers.py
Python
bsd-3-clause
6,064
[ "Brian" ]
571184f85b5da2ebf58f95c5ab8b374c9c42b4c565659a32f8d078b5e1dd08a1
import numpy as np from .control import model_setup from .cp_confocal import twod, threed from .cp_triplet import trip from .cp_mix import triple_pnum def CF_Gxyz_gauss_3D3D2DT(parms, tau): u""" Two three-dimensional and one two-dimensional free diffusion with a Gaussian laser profile, including a triple...
paulmueller/PyCorrFit
pycorrfit/models/model_confocal_t_3d_3d_2d.py
Python
gpl-2.0
5,809
[ "Gaussian" ]
4e10b34e505decc97311d303e78876571876ea06cb63cafa30e1bf963554228b
#!/usr/bin/python import os, sys # low level handling, such as command line stuff import string # string methods available import re # regular expressions import getopt # comand line argument handling from low import * # custom functions, written by myself import anydbm # index databases (file ...
lotharwissler/bioinformatics
python/fasta/generate-fasta-aa-nt.py
Python
mit
3,295
[ "Biopython" ]
9540181e272ad0674ad39e8581e816de3755ba61944ad427746fe85ccff4115c
# -*- coding: utf-8 -*- """ Created on Fri June 23 09:30:00 2017 @author: S.Y. Agustsson """ import sys import numpy as np from scipy import misc import matplotlib.pyplot as plt from matplotlib import cm import cv2 import pyqtgraph as pg from PyQt5 import QtWidgets as qw, QtCore as qc, QtGui as qg import time # impo...
steinnymir/BeamProfiler
legacy/BeamProfilerLib/gui.py
Python
gpl-3.0
14,308
[ "Gaussian" ]
352e65797f119cd66570bbe8a9ca1c4ec53ed64fb2d69bbac3e3cb5d15a1acdc
""" Foote method for segmentation, published here: Foote, J. (2000). Automatic Audio Segmentation Using a Measure Of Audio Novelty. In Proc. of the IEEE International Conference of Multimedia and Expo (pp. 452-455). New York City, NY, USA. """ __author__ = "Oriol Nieto" __copyright__ = "Copyright 2014, Music and Audi...
urinieto/SegmenterMIREX2014
foote.py
Python
bsd-3-clause
1,264
[ "Gaussian" ]
da8289bd548da9898ffb168b72dc7e35f76f291cb5aace00a85f291c06afca80
""" Slightly more specialized than methods in the ``util.strings`` module, provides functions for parsing and extracting information from strings that follow some expected nomenclature. The primary examples of this information are IDs, names, labels, and other metadata for files and objects generated either by Illumina...
BenaroyaResearch/bripipetools
bripipetools/parsing/__init__.py
Python
mit
1,022
[ "Galaxy" ]
ab007eececc5541ba6448609410dca9c9be6f08d959109bef87c2875468d8a45
# -*- coding: utf-8 -*- """ Newspaper uses much of python-goose's extraction code. View their license: https://github.com/codelucas/newspaper/blob/master/GOOSE-LICENSE.txt Keep all html page extraction code within this file. Abstract any lxml or soup parsing code in the parsers.py file! """ __title__ = 'newspaper' __a...
srujant/MLNews
newspaper/extractors.py
Python
mit
36,554
[ "Brian" ]
efd2c2848b0ecc3d99e24c35e5dec295b7ddc0f54241f3b13b1a402940af29ec
import copy import csv import datetime import json import mock import re import urllib import pyquery from cStringIO import StringIO from nose.tools import eq_, ok_, assert_raises from nose.plugins.skip import SkipTest from django.test.client import RequestFactory from django.test.utils import override_settings from ...
pcabido/socorro
webapp-django/crashstats/crashstats/tests/test_views.py
Python
mpl-2.0
194,289
[ "VisIt" ]
86f49c8f8a16b952649027c134ae7e135f1836e4f006be6c8e65b0462e52e591
#!/usr/bin/python # (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # most of it copied from AWX's scan_packages module from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' module: package_fac...
nitzmahone/ansible
lib/ansible/modules/package_facts.py
Python
gpl-3.0
16,794
[ "Brian" ]
341069d9c6507a7093e217b1279b0a7a2d3a80413ade4e06e57bbe3906b862a8
#!/usr/bin/env python import time, os import random import writeInputs import threading as mt import tarfile import radical.entk as re import radical.utils as ru #os.environ['RADICAL_VERBOSE'] = 'INFO' os.environ['RADICAL_ENTK_VERBOSE'] = 'INFO' os.environ['RADICAL_PILOT_DBURL'] = 'mongodb://smush:key1209@ds263816....
radical-cybertools/radical.repex
old/repex/async_repex.py
Python
mit
15,118
[ "Amber" ]
71e4e7b926854560dc148decba4df98d05c860e8d4930c3426d3e52600398dc4
#!/usr/bin/env python # Copyright (C) 2013-2017 Steven Myint # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, mo...
myint/rstcheck
rstcheck.py
Python
mit
31,580
[ "VisIt" ]
582799299709bf254db679bb20b6c35145882621a6b93e4044d1259761f0ed1c
# Copyright 2007-2021 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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 ...
thomasaarholt/hyperspy
hyperspy/tests/signals/test_eds_sem.py
Python
gpl-3.0
15,337
[ "Gaussian" ]
bf8716fceefc74c8e090cd010699cf3f39a01b59ffe054ff0044f3a43953c635
#!/usr/bin/env python """Universal feed parser Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds Visit http://feedparser.org/ for the latest version Visit http://feedparser.org/docs/ for the latest documentation Required: Python 2.4 or later Recommended: CJKCodecs and iconv_codec <http://cjkpytho...
Arno-Nymous/pyload
module/lib/feedparser.py
Python
gpl-3.0
167,083
[ "NetCDF", "VisIt" ]
525fcb0ccbc1ad3442a3a2cee9428718d954eabf3b5a17ef76a01c34ed5761e3
import os import re from django.contrib.auth.models import User from django.db import models from django.db.models import Q from django.utils import timezone from django.utils.html import escape from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from djblets.util.db i...
viswimmer1/PythonGenerator
data/python_files/32676780/models.py
Python
gpl-2.0
67,150
[ "VisIt" ]
6bcd3aedf8cea917dae6fed3fdcae63aaeb8f16b1c953fd2dfa6b8d6b2f76919
import datetime import os import uuid import warnings import zipfile from typing import Dict, List, Set, Tuple, Union import dateutil.parser import geopy import netCDF4 import numpy as np import pandas import pint import pyresample import xarray import xarray.core.variable from cachetools import TTLCache from flask_ba...
DFO-Ocean-Navigator/Ocean-Data-Map-Project
data/netcdf_data.py
Python
gpl-3.0
40,517
[ "Gaussian", "NetCDF" ]
83aaeb0dd2b59a143a77c481fd734d5d62ad32532b337c526f388d4cb99e96c8
#!/usr/bin/python """ Copyright (c) 2011-2015 Nathan Boley, Marcus Stoiber This file is part of GRIT. GRIT 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...
nboley/grit
grit/proteomics/ORF.py
Python
gpl-3.0
10,272
[ "Biopython", "pysam" ]
c7f059ac3bbf8d11cd9c1350d385a39ba2302daf8d9e9ebd4c5e2563a390e113
import cv2 import numpy as np import sys print() def rectify(h): h = h.reshape((4,2)) hnew = np.zeros((4,2),dtype = np.float32) add = h.sum(1) hnew[0] = h[np.argmin(add)] hnew[2] = h[np.argmax(add)] diff = np.diff(h,axis = 1) hnew[1] = h[np.argmin(diff)] hnew[3] = h[np.argmax(diff)] ...
Hubert51/AutoGrading
learning/main_v1.py
Python
mit
28,594
[ "Gaussian" ]
b306ff57f96a6fa078cd75a6ff3e4cf56873f6f15423e1af3d7844d03f7b41be
import sys sys.path.insert(1,"../../../") import h2o from tests import pyunit_utils import random from h2o.estimators.gbm import H2OGradientBoostingEstimator def cv_cars_gbm(): # read in the dataset and construct training set (and validation set) cars = h2o.import_file(path=pyunit_utils.locate("smalldata/junit/c...
madmax983/h2o-3
h2o-py/tests/testdir_algos/gbm/pyunit_cv_cars_gbm.py
Python
apache-2.0
6,995
[ "Gaussian" ]
e269b17d9d8195a9ceace4b0d8060bac4c3477482bc26f9ae0b3bd83e681ea76
# Copyright (C) 2002, Thomas Hamelryck (thamelry@binf.ku.dk) # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. from types import IntType __doc__="Class that maps (chain_id, residue_id) to a residue pr...
dbmi-pitt/DIKB-Micropublication
scripts/mp-scripts/Bio/PDB/AbstractPropertyMap.py
Python
apache-2.0
3,335
[ "Biopython" ]
5aef52b7a43651a08d3d3e03ce3ba77e3906eb901feff8c479147f8f9ec1935c
# 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/nao/m_xjl.py
Python
apache-2.0
1,736
[ "PySCF" ]
88a8d841194a54c013db3d0cb3bb807725390760c14886f7f1caf43c14b7d32f
"""Python bindings for core 0MQ objects.""" # # Copyright (c) 2010-2011 Brian E. Granger & Min Ragan-Kelley # # This file is part of pyzmq. # # pyzmq is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free Software ...
IsCoolEntertainment/debpkg_python-pyzmq
zmq/core/__init__.py
Python
lgpl-3.0
1,560
[ "Brian" ]
9207db77aa5e9391a31724802568bcc9ae6425e261deb7c7cde9f38a3bd309d7
"""Crossover classes, that cross the elements in the supplied atoms objects. """ import random import numpy as np from ase.ga.offspring_creator import OffspringCreator class ElementCrossover(OffspringCreator): """Base class for all operators where the elements of the atoms objects cross. """ def __...
suttond/MODOI
ase/ga/element_crossovers.py
Python
lgpl-3.0
5,533
[ "ASE" ]
c952c159372b90a6405e1e470cfc5a369b8ad0cb6b5e6be946847a69662f4758
''' An example of using Tilting module with ASE ''' from __future__ import print_function import unittest from ase.lattice.spacegroup import crystal import set_path from tilde.core.settings import settings from tilde.core.api import API from tilde.parsers import Output crystal_obj = crystal( ('Sr', 'Ti', 'O',...
ansobolev/tilde
tests/apps/perovskite_tilting/ase_example.py
Python
mit
1,667
[ "ASE", "CRYSTAL" ]
15055dd51bff5634c4cbcbd564d1c6080c99691260191ad018717257ad66aa2c
__all__ = ['fixed_quad','quadrature','romberg','trapz','simps','romb', 'cumtrapz','newton_cotes'] from scipy.special.orthogonal import p_roots from scipy.special import gammaln from numpy import sum, ones, add, diff, isinf, isscalar, \ asarray, real, trapz, arange, empty import numpy as np import math...
teoliphant/scipy
scipy/integrate/quadrature.py
Python
bsd-3-clause
26,478
[ "Gaussian" ]
e6bd607da2d3281b8e9c9d0d9c13936e6f9a5d372e3850f5b5d786f9b7306427
#!/usr/bin/env python2 desc="""Identify enhanvers (eRNAs) from RNA-Seq. Enhancers are defined as genomic regions having similar level of expression. It's rather slow right now, 17h per fish genome (1.5G). Instead consider bam2cov_pool.py approach: # get 100bp windows of non-coding part of the genome w=500; awk -F'\t...
lpryszcz/bin
bam2enhancers.py
Python
gpl-3.0
4,595
[ "pysam" ]
caf576930797fa8fb4a362aa486f76f8258f30ee71e57b29fa31e74f1300ffff
# !usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under a 3-clause BSD license. # # @Author: Brian Cherinka # @Date: 2018-04-04 23:07:41 # @Last modified by: Brian Cherinka # @Last Modified time: 2018-10-18 14:12:38 from __future__ import absolute_import, division, print_function import copy from marvin...
sdss/marvin
python/marvin/utils/datamodel/dap/MPL7.py
Python
bsd-3-clause
1,180
[ "Brian" ]
31d191559ba5735150986b285015566f51e618db052d338502c13188635c56a9
from __future__ import absolute_import, division, print_function, unicode_literals from gratipay.testing import BrowserHarness class Tests(BrowserHarness): def test_sign_in_modal_is_hidden_by_default(self): self.visit('/') assert not self.css('#sign-in-modal').visible def test_clicking_sig...
gratipay/gratipay.com
tests/ttw/test_sign_in.py
Python
mit
923
[ "VisIt" ]
71210e0aa8f1bc3f0896e7d326287cd06c57b8203bc9c4bd5a7034b2ce8d2f71
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Andrew Jewett (jewett.aij at g mail) # http://www.chem.ucsb.edu/~sheagroup # License: 3-clause BSD License (See LICENSE.TXT) # Copyright (c) 2012, Regents of the University of California # All rights reserved. from ttree_lex import InputError # Users ...
ganzenmg/lammps_current
tools/moltemplate/src/lttree_styles.py
Python
gpl-2.0
9,573
[ "LAMMPS" ]
443db80d523f07910cb9acdfacc2ddb429bbec37efa74b9f39ad98a21640902a
#!/usr/bin/env python # # Copyright 2013 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. """Convert Android xml resources to API 14 compatible. There are two reasons that we cannot just use API 17 attributes, so we are ge...
mdakin/engine
build/android/gyp/generate_v14_compatible_resources.py
Python
bsd-3-clause
11,922
[ "Galaxy" ]
0c7cbd438e8eca4d63f6d764f8a12828918850c8e10b77f3306eefca4a519d5d
# # Copyright (C) 2007, Mark Lee # #http://rl-glue-ext.googlecode.com/ # # 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...
mguzdial3/MineCode
python-codec/src/rlglue/RLGlue.py
Python
apache-2.0
5,110
[ "Brian" ]
c1f6a89ef5274f9ad1c5648df2b61592689cfdff9ba2d7c4b4fb3ee92bad3429
import numpy as np from math import exp, log import random import scipy.stats import matplotlib.pyplot as plt from copy import deepcopy #Feature size N = 2 #Model parameters Theta = np.array([random.gauss(0,1) for i in range(N)]) def LogPrior(theta_p): ''' Return prior pdf. Multivariate gaussian, Cov = diag(...
dmancevo/Bayesian_Classifier
Bayesian_Classifier.py
Python
mit
2,404
[ "Gaussian" ]
5216dabfbea8a0f39afd823178a20b73c6c00e18aac86379aee47592a47b9bbf
import ConfigParser import logging import os import re from galaxy import util from galaxy import web from galaxy.web.form_builder import build_select_field from galaxy.webapps.tool_shed.model import directory_hash_id from tool_shed.dependencies.repository import relation_builder from tool_shed.util import common_ut...
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/lib/tool_shed/util/repository_util.py
Python
gpl-3.0
18,642
[ "Galaxy" ]
49322a06550093745fb104ec9205a3900a9274ad0eeda07bd12cee97e3480ed4
import vtk def get_program_parameters(): import argparse description = 'Converts the polydata to imagedata and masks the given imagedata.' epilogue = ''' Contributed by: Peter Gruber ''' parser = argparse.ArgumentParser(description=description, epilog=epilogue) parser.add_argument('fil...
lorensen/VTKExamples
src/Python/PolyData/PolyDataToImageDataStencil.py
Python
apache-2.0
2,880
[ "VTK" ]
12e645896fba7f8240d5e1765326444b23b2585b11ecf11e1294783c1989af1e
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013, 2014, 2015 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 your optio...
tiborsimko/invenio-ext
invenio_ext/script/__init__.py
Python
gpl-2.0
12,590
[ "VisIt" ]
93f9d1660c2b84252f5b2d6e4d9564d16df91e21b47e4f8e33997c19e1dae0ef
# Copyright (C) 2012-2015 Codethink Limited # # 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; version 2 of the License. # # This program is distributed in the hope that it will be useful, # but...
tacgomes/morph
morphlib/cachekeycomputer_tests.py
Python
gpl-2.0
6,074
[ "Brian" ]
c522d945181fd3df9db73637d42caa422fa6b561e67381c1c7f9f8ffa7c7b8ec
#!/usr/bin/python3 # -*- coding: utf-8 -*- from setuptools import setup from os import chdir, makedirs, walk from os.path import abspath, dirname, join, relpath from shutil import copy from subprocess import check_call def read(path): with open(path) as f: return f.read().strip() # identify and enter ...
brbsix/caffeine-reloaded
setup.py
Python
lgpl-3.0
2,082
[ "Brian" ]
2c9de1d4ddd9e26f6e9e2d545a2de31d1fe682d3c20b5fe560175de5641df0c9
# Copyright 2015 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. """Dummy benchmarks for the bisect FYI integration tests. The number they produce aren't meant to represent any actual performance data of the browser. For m...
was4444/chromium.src
tools/perf/benchmarks/dummy_benchmark.py
Python
bsd-3-clause
1,656
[ "Gaussian" ]
8b518dae4eddd6b21a6f55a53e7c972d14d10b434ea747ab8394894b57e39aa8
# Copyright (C) 2017-2020 The Software Heritage developers # See the AUTHORS file at the top-level directory of this distribution # License: GNU Affero General Public License version 3, or any later version # See top-level LICENSE file for more information import json import random from hypothesis import given from...
SoftwareHeritage/swh-web-ui
swh/web/tests/browse/views/test_revision.py
Python
agpl-3.0
11,989
[ "VisIt" ]
55974f8bfeac4fdb99d65e6b43ce646f3986face052b73016b96d3fff69b41ab
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2022 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 #...
susilehtola/psi4
psi4/driver/procrouting/proc.py
Python
lgpl-3.0
202,663
[ "Psi4" ]
9ecc3689916dad8cd9b0e686225f170d8e5a720fa6d32cf0f39f2f3c3338c7fc
#!/usr/bin/env python3 """Test the basic properties of the deast module.""" # Copyright © 2017 Timothy Pederick # # 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...
perey/deast
tests/test_module.py
Python
apache-2.0
1,931
[ "VisIt" ]
2a9049f7d8a4fb0f011f1def9187212af3f49e9e1618303faa126e582a361317
#!/usr/bin/env python ''' GOAL: - this code contains all of the code to make figures for MS paper REQUIRED MODULES - LCSbase.py ************************** written by Gregory Rudnick June 2018 ************************** ''' ########################### ###### IMPORT MODULES ########################### import LCSba...
rfinn/LCS
python/LCS_MSpaper.py
Python
gpl-3.0
116,120
[ "Galaxy" ]
634d722a5da89164b3c00c57e6f4e56403277ca1149721207057e2a6f8559d88
import numpy as np from numpy import pi import wave import scipy import scipy.io.wavfile from scipy import signal import matplotlib.pyplot as plt import math import pygame.sndarray import time import pyaudio SAMPLING_RATE = 192000 SAMPLES_PER_MS = int(SAMPLING_RATE / 1000) CARRIER_FREQ = 5000 CLOCK_MS = 100 NUM_BIT...
labseven/SigsysFinalProject
signal_functions.py
Python
mit
10,932
[ "Gaussian" ]
76481d33d15d50224652c1ecb20c217d36044af6ce619d25d6db3d166cd8503c
import tempfile import textwrap import os try: from StringIO import StringIO except ImportError: from io import StringIO import numpy as np from nose.tools import ok_, eq_ from mock import patch import neurom.io as io from neurom.io.datawrapper import DataWrapper import neurom.io.neurolucida as nasc from neu...
liesbethvanherpe/NeuroM
neurom/io/tests/test_neurolucida.py
Python
bsd-3-clause
8,012
[ "NEURON" ]
6a9d52e43273d86af0c469ff6a27dc77d2ef22878344ec675b67e945ea87938a
#!/usr/bin/env python # -*- coding: utf-8 -*- try: import urllib3 except: print('BlastPDB requires urllib3') class BlastPDB: """BlastPDB - run Blast online on the PDB database. This can be used in Jupiter based RNA notebooks, e.g. https://github.com/mmagnus/rna-pdb-tools/blob/master/rp18.ipynb ...
mmagnus/rna-pdb-tools
rna_tools/BlastPDB.py
Python
gpl-3.0
1,141
[ "BLAST" ]
dc3253268894d422c034bb0a7a57eeccea1f1f20f1b6e1a2357687fa9e01ffcc
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function # # PCR-GLOBWB (PCRaster Global Water Balance) Global Hydrological Model # # Copyright (C) 2016, Edwin H. Sutanudjaja, Rens van Beek, Niko Wanders, Yoshihide Wada, # Joyce H. C. Bosmans, Niels Drost, Ruud J. van der Ent, Inge E. M. de...
UU-Hydro/PCR-GLOBWB_model
model/configuration.py
Python
gpl-3.0
31,987
[ "NetCDF" ]
65020cc0f8398ac6167678e71383ed864cb0dcc5b07ff11486961b75657f0595
# -*- encoding: utf-8 # Setup code, stay away items = [] item = lambda *x: items.append(x) # News items go here, most recent ones at top. Dates can be either # strings or time(3) output. # # item("INSERT TITLE HERE", # (1901, 3, 1), # """ # INSERT TEXT HERE # """, # "INSERT AUTHOR HERE") # ht...
saigkill/gnome-publisher
web/newsitems.py
Python
gpl-3.0
16,101
[ "exciting" ]
e0139236bdbff0d2aa788e513a28beb988a12c5022ff4a161fd82d15a2066566
from .mdtraj_json import * import pytest import numpy as np import numpy.testing as npt from ..simstore.custom_json import bytes_codec, numpy_codec, custom_json_factory from ..simstore.test_custom_json import CustomJSONCodingTest from openpathsampling.tests.test_helpers import data_filename class MDTrajCodingTest(C...
choderalab/openpathsampling
openpathsampling/experimental/storage/test_mdtraj_json.py
Python
lgpl-2.1
2,273
[ "MDTraj" ]
d4849aa73d14c9f4ddc3cfb69809caa66ee076cce471385914e2b2e10a54b24f
# Copyright 2010-2014 Google # 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, so...
2947721120/curly-hockeypuck
src/ortools/linear_solver/linear_solver_natural_api.py
Python
apache-2.0
6,999
[ "VisIt" ]
8d37607ca7a50ac270e7bcac9815ee928a1a481a39938a5894fe6686290c1ec6
######################################################################## # $HeadURL$ # File : ExecutorReactor.py # Author : Adria Casajus ######################################################################## __RCSID__ = "$Id$" import time import threading from DIRAC import S_OK, S_ERROR, gLogger, rootPath, gConfi...
Sbalbp/DIRAC
Core/Base/ExecutorReactor.py
Python
gpl-3.0
8,253
[ "DIRAC" ]
3444d1f349b640c43f83a113d5407795d52e163f46c072f8a85c26c02c0a5739
from __future__ import division from builtins import map from builtins import zip from builtins import str from builtins import range from builtins import object import json import numpy as np import os try: from osgeo import ogr except ImportError: import ogr try: from osgeo import osr except ImportEr...
mauroalberti/beePen
geosurf/geo_io.py
Python
gpl-3.0
23,172
[ "VTK" ]
338426cdb662d9c63c6274fc9cb191857553342aba36ce3c919405ea73c320ef
import cPickle as pickle galaxies = pickle.load(open('galaxies.pickle','rb')) galaxies = filter(lambda galaxy: galaxy.ston_I > 30., galaxies) for galaxy in galaxies: print int(galaxy.ID), galaxy.RA, galaxy.DEC
boada/ICD
sandbox/legacy_plot_code/printstuff.py
Python
mit
216
[ "Galaxy" ]
6a81cc708f8175affbe03ce5187a1ae1876c21d39d71f28f6f7d94dc7e88b06f
# -*- coding: utf-8 -*- # # Copyright (c) 2017 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB ...
yashdsaraf/scancode-toolkit
src/licensedcode/index.py
Python
apache-2.0
33,611
[ "VisIt" ]
86a6d55ce2db93beea5dbca7ec9c332404b8c68b500e1777aa8a1cea98ad08af
import numpy import six import chainer from chainer.functions.array import permutate from chainer.functions.array import transpose_sequence from chainer.functions.rnn import n_step_rnn as rnn from chainer import initializers from chainer import link from chainer.utils import argument from chainer import variable def...
pfnet/chainer
chainer/links/rnn/n_step_rnn.py
Python
mit
12,967
[ "Gaussian" ]
9e01e5f2a84ac6bf525b2751f82983ad95882b43494160dee1da74f36854e198
#!/usr/bin/env python from vtk import * source = vtkRandomGraphSource() source.DirectedOff() source.SetNumberOfVertices(10) source.SetEdgeProbability(0.22) source.SetUseEdgeProbability(True) source.AllowParallelEdgesOn() source.SetStartWithTree(True) # Connect to the centrality filter. centrality = vtkBoo...
hlzz/dotfiles
graphics/VTK-7.0.0/Examples/Infovis/Python/boost_mst.py
Python
bsd-3-clause
1,801
[ "VTK" ]
94ace7b2e95e07a7ff16d718e278d1d3cf202f27e67c233fb444e2b23ffdafdd
import unittest, re, sys sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_import as h2i print "FIX!: Avoiding an RF histogram assertion error on some of these datasets" DO_RF = False class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod ...
111t8e/h2o-2
py/testdir_single_jvm/test_parse_many_doublesp_fvec.py
Python
apache-2.0
7,474
[ "Dalton" ]
d7062722c7fd02a744dc317e32a50a26795a952d1ce41adf882e076ab739d4bd