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
# Whale Detection preprocessor # detects the ROI of each whale in an image import os import numpy as np import cv2 def whaleExport(readDir, writeDir): # Get all files in readDir files = [] for (dirpath, dirnames, filenames) in os.walk(readDir): files.extend(filenames) break # Loop thr...
andpol5/whaleDetector
investigation/whaleExport.py
Python
mit
4,020
[ "Gaussian" ]
e634241c7689b882318b2cb9ff222b264c82dd6eeb9986afebc5026c26b27323
# A consolidation of the data sources for the project # includes: # NetworkX! # RDFlib! # Other things! # # Works like Configure: # Inherit from the DataUser class to access data of all kinds (listed above) import sqlite3 import networkx as nx import PyOpenWorm from PyOpenWorm import Configureable, Configure, ConfigVa...
hnunner/PyOpenWorm
PyOpenWorm/data.py
Python
mit
20,048
[ "NEURON" ]
c7f8e65479c48d1a336c7157ee34a583b5764c4ea18a024d723dcf8b37f1a5c7
# -*- coding: utf-8 -*- # This file is public domain according to its author, Brian Hsu from docutils.parsers.rst import Directive, directives from docutils import nodes try: import requests except ImportError: requests = None # NOQA from nikola.plugin_categories import RestExtension from nikola.utils impor...
immanetize/nikola
nikola/plugins/compile/rest/gist.py
Python
mit
2,598
[ "Brian" ]
fb2a24ac82b7624b09e04e1d9542f958b9576bae76d7ff1c11f5c72814537610
#!/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/ao2mo/test/test_r_outcore.py
Python
apache-2.0
4,800
[ "PySCF" ]
26c1694cd8b6d6c04e2917f952494ea4edb5ee564d7113b8147840c093f9b44b
from setuptools import setup from setuptools import Extension from setuptools import find_packages import platform from pkg_resources import get_build_platform from Cython.Build import cythonize import numpy as np import os import sys description = "A Python interface to the electron microscopy simulation program QSTE...
jacobjma/PyQSTEM
setup.py
Python
gpl-3.0
3,569
[ "ASE" ]
cd3d20b38e294fb1ecfdc905051b2dbf1a91b532257324aca56142e134e85901
#!/usr/bin/env python # -*- coding: utf-8 -*- # simrecon_utils.py """ Some utilities for SIM reconstruction. Copyright (c) 2016, David Hoffman """ # import some os functionality so that we can be platform independent import os import glob import re import tqdm import numpy as np import matplotlib.pyplot as plt from mp...
david-hoffman/scripts
simrecon_utils.py
Python
apache-2.0
57,959
[ "Gaussian" ]
94170172d16db2bcfcd84a888619315d1bd7396d1da1b140f37be4c9f1d7ed2d
from sys import stdout from time import localtime from numpy import linalg as la import cPickle as pickle import numpy as np from gpaw.utilities import pack, unpack from gpaw.utilities.tools import tri2full from gpaw.utilities.blas import rk, gemm from gpaw.basis_data import Basis from gpaw.setup import types2atomtype...
robwarm/gpaw-symm
gpaw/lcao/tools.py
Python
gpl-3.0
22,511
[ "ASE", "GPAW" ]
6c34f179fe653e3c155b18140fe4c675481b4af1de23d9296372414414318064
""" This is a very simple example referenced in the beginner's tutorial: https://enigmampc.github.io/catalyst/beginner-tutorial.html Run this example, by executing the following from your terminal: catalyst ingest-exchange -x bitfinex -f daily -i btc_usdt catalyst run -f buy_btc_simple.py -x bi...
enigmampc/catalyst
catalyst/examples/buy_btc_simple.py
Python
apache-2.0
1,715
[ "VisIt" ]
f5ed6ba3c48e449a303182ff620694560c89c489f3a8e17fc1fe1cfaf4115104
#!/usr/bin/env python ############################################################################################## # # # regrid_emissions_N96e.py # # # Requirements: # Iris 1.10, cf_units, numpy # # # This Python script has been written by N.L. Abraham as part of the UKCA Tutorials: # http://www.ukca.ac.uk/wiki...
acsis-project/emissions
emissions/python/timeslice/regrid_aircNO_n96e_360d_1year.py
Python
gpl-3.0
6,579
[ "NetCDF" ]
61f99c277d9f2570333a4606aeada88b4d6ec500e7c3afb5066a3b03108e4013
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Complete pipeline for online processing using OnACID. @author: Andrea Giovannucci @agiovann and Eftychios Pnevmatikakis @epnev Special thanks to Andreas Tolias and his lab at Baylor College of Medicine for sharing their data used in this demo. """ from __future__ impo...
agiovann/Constrained_NMF
use_cases/CaImAnpaper/online_testing2_bk_AG.py
Python
gpl-2.0
38,114
[ "NEURON" ]
67bad16a48e6add7f5043042e5e73f0986fcdfdfa07313a9cbefe60bc5e4fd2b
from .snapshot import BaseSnapshot, SnapshotFactory, SnapshotDescriptor from .trajectory import Trajectory from .topology import Topology, MDTrajTopology from . import features from .dynamics_engine import ( DynamicsEngine, NoEngine, EngineError, EngineNaNError, EngineMaxLengthError) from .external_engine i...
choderalab/openpathsampling
openpathsampling/engines/__init__.py
Python
lgpl-2.1
398
[ "Gromacs" ]
4069c4b9d95475367b7f3c9d7bbf5c1f10498bd4bc34b2084e9ebb7eade701b2
# -*- coding: utf-8 -*- """Load LDraw GPLv2 license. 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 is distribut...
TobyLobster/ImportLDraw
loadldraw/loadldraw.py
Python
gpl-2.0
208,815
[ "Bowtie" ]
d406627eadb8fbbbab1e2b6e4f70dc8860494549b9739727fec8c68840e8b9b7
# -*- coding: utf-8 -*- """Operations for BEL graphs.""" from typing import Iterable import networkx as nx from tqdm.autonotebook import tqdm from .utils import update_metadata from ..dsl import BaseEntity __all__ = [ "subgraph", "left_full_join", "left_outer_join", "union", "left_node_intersec...
pybel/pybel
src/pybel/struct/operations.py
Python
mit
5,181
[ "Pybel" ]
22d4e591c35ee7e5b60d9b4cb091b5801ee76bd3bb7611dc611c8422d9fc5e0a
#!/usr/bin/env python ######################################################################## # File : dirac-version # Author : Ricardo Graciani ######################################################################## """ print version of current DIRAC installation """ from __future__ import print_function impo...
fstagni/DIRAC
Core/scripts/dirac-version.py
Python
gpl-3.0
350
[ "DIRAC" ]
ec4262cd317d21897a9c50bb4eadb08fc59e1df8b7f8f34f5ac4b444e9bce72a
from typing import Optional, Tuple import picwriter.components as pc import gdsfactory as gf from gdsfactory.component import Component from gdsfactory.components.waveguide_template import strip from gdsfactory.types import ComponentFactory @gf.cell def dbr_tapered( length: float = 10.0, period: float = 0.8...
gdsfactory/gdsfactory
gdsfactory/components/dbr_tapered.py
Python
mit
2,807
[ "CRYSTAL" ]
dbc0bed072dd3f1ffc1b53114d55218316b75fc1df75766c38e25c456c3ed74d
# -*- coding: utf-8 -*- """ Copyright (C) 2013-2021 ITB - CNR This file is part of isoSegmenter. isoSegmenter 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...
bunop/isoSegmenter
GClib/Elements.py
Python
gpl-3.0
50,630
[ "Biopython" ]
4944904bb472256853581b20e3efafbf0305b3b5e4a0e8d4c1790807566df856
''' Created on Jan 29, 2012 @author: Jeff ''' import os.path import numpy, scipy from scipy.ndimage import gaussian_filter, map_coordinates from PySide import QtGui, QtCore import dicom import TriModel from Joint import Joint from polygonise import Polygonise from STL import readSTLfile, saveSTLFile from...
vanossj/pyAtlasBoneSegmentation
src/InputDataTypes.py
Python
mit
32,816
[ "Gaussian" ]
6d9892c0d85e7478b8be7498b2585f9ef09355cf34f9f73666172ba36d61eb7b
import astroid.inference import astroid from astroid.node_classes import * from typing import * from typing import Callable, Union, ForwardRef, _GenericAlias from astroid.transforms import TransformVisitor from itertools import chain from ..typecheck.base import Environment, TypeConstraints, _ann_node_to_type, \ _n...
RyanDJLee/pyta
python_ta/transforms/type_inference_visitor.py
Python
gpl-3.0
42,152
[ "VisIt" ]
b159a25771d116f3efb38ca51737173908d029d0f1ab24733b2dee2c0adcbec8
# Copyright (c) 2015, 2014 Computational Molecular Biology Group, Free University # Berlin, 14195 Berlin, Germany. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # * Redistributions of source c...
arokem/PyEMMA
pyemma/coordinates/tests/test_save_traj.py
Python
bsd-2-clause
7,074
[ "MDTraj" ]
02745c922cef98c01a9da5c69008dc1408105b51ec655ef1a38d170b9f101ea4
''' Created on Oct 25, 2010 @author: mkiyer chimerascan: chimeric transcript discovery using RNA-seq Copyright (C) 2011 Matthew Iyer 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 ...
tectronics/chimerascan
chimerascan/deprecated/old_gene_to_genome.py
Python
gpl-3.0
15,078
[ "pysam" ]
897eb4daecba291c17524dbb01768f602eff051c576a06b172583ef72a1328ac
#!/usr/bin/env python # -*- coding: utf-8 -*- """Views tests for the OSF.""" from __future__ import absolute_import import datetime as dt import httplib as http import json import time import unittest from flask import request import mock from nose.tools import * # noqa PEP8 asserts from modularodm import Q from m...
rdhyee/osf.io
tests/test_views.py
Python
apache-2.0
195,161
[ "Brian" ]
565240ee19e18de17012da29351b27e1617ebc2277ca6e4466f158d71429c793
#!/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...
sunqm/pyscf
pyscf/ci/__init__.py
Python
apache-2.0
3,737
[ "PySCF" ]
05994c24f603d7d3679e378581134b6f278c82c6fbc3f72d0b1421642942ab6a
import pylab as pyl import cPickle as pickle galaxies = pickle.load(open('galaxies.pickle','rb')) galaxies = filter(lambda galaxy: galaxy.Gini != None and galaxy.ston_I > 10., galaxies) f1 = pyl.figure(1,figsize=(5,5)) f1s1 = f1.add_subplot(221) f1s2 = f1.add_subplot(222) f1s3 = f1.add_subplot(223) f1s4 = f1....
boada/ICD
sandbox/lowerSN/plot_G_vs_M20_multi.py
Python
mit
1,777
[ "Galaxy" ]
6013ab3a08bc5c0716be07d0b06ebe5b9191d8dd3920062322f5362bed2a2d87
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase import vtk class vtkStructuredGridOutlineFilter(SimpleVTKClassModuleBase): def __init__(self, module_manager): SimpleVTKClassModuleBase.__init__( self, module_manager, ...
nagyistoce/devide
modules/vtk_basic/vtkStructuredGridOutlineFilter.py
Python
bsd-3-clause
521
[ "VTK" ]
1579b40fe92a941021f0945d9b84a52bc015a20082e9a915d79b4b476b841d8d
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgarren/spack
var/spack/repos/builtin/packages/r-biocinstaller/package.py
Python
lgpl-2.1
1,750
[ "Bioconductor" ]
f3d57f48b383c7af881aea1c01fe50f0ec7b2522a89222ea6d9f0bc22cb4ca68
# -*- coding: utf-8 -*- """ ORCA Open Remote Control Application Copyright (C) 2013-2020 Carsten Thielepape Please contact me by : http://www.orca-remote.org/ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as publi...
thica/ORCA-Remote
src/ORCA/utils/Platform/android/android_helper.py
Python
gpl-3.0
1,940
[ "ORCA" ]
8a5b4a6ae1c002c6294548d89740c629674065e53a8c7641d45a7dcb8b5b206f
from bulbs.neo4jserver import Graph from bulbs.model import Node, Relationship from bulbs.property import Property, String, Integer, Float, DateTime from bulbs.utils import current_datetime # TODO: check latest gist's # Requirements (installable with pip) # pytz ujson six # You need: sudo apt-get install python-dev ...
catsop/CATMAID
scripts/graphdb/test_bulbs.py
Python
gpl-3.0
3,987
[ "NEURON" ]
7a65a2c98f09998d485f4dee9554b79cbe3ec53a214cb054e8ab06a2e9eacc21
#!/usr/local/sci/bin/python2.7 ''' # KW changed make_and_qc_db.py to make_and_full_qc.py # KW changed by adding --month1 and --month2 make_and_full_qc.py invoked by typing:: python2.7 make_and_full_qc.py -i configuration.txt --year1 1850 --year2 1855 --month 1 --month2 12 # KW edited to reflect that code now produc...
Kate-Willett/HadISDH_Marine_Build
EUSTACE_SST_MAT/make_and_full_qc.py
Python
cc0-1.0
45,398
[ "NetCDF" ]
4d9964fc641f83c3fa11f424823e2c872fdeda04352b1910f3524606116088af
import re import numpy as np import math import os from skbeam.core.fitting.xrf_model import K_LINE, L_LINE, M_LINE from skbeam.core.constants.xrf import XrfElement from skbeam.core.fitting.lineshapes import gaussian from ..model.load_data_from_db import save_data_to_hdf5 from ..core.quant_analysis import ParamQuantE...
NSLS-II-HXN/PyXRF
pyxrf/simulation/sim_xrf_scan_data.py
Python
bsd-3-clause
27,000
[ "Gaussian" ]
53f875f48c7a2c16047dccd9d52ee33364fad301bf7166118a3b3f462df9d8f7
# $Id$ # # Copyright (C) 2002-2006 greg Landrum and Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # """unit testing code ...
strets123/rdkit
rdkit/Chem/EState/UnitTestEState.py
Python
bsd-3-clause
3,044
[ "RDKit" ]
e3450e0d9400a47ab6f8f7e9affa6f9f34f46ffb9054e3e04557a00257a69b80
""" awot.io.read_ground_radar ========================= These scripts are a wrapper using the pyart interface to access a large number of file formats. """ # Load the needed packages import pyart from netCDF4 import num2date, date2num from . import common def read_ground_radar(fname, map_to_awot=True, ...
adlyons/AWOT
awot/io/read_ground_radar.py
Python
gpl-2.0
2,393
[ "NetCDF" ]
3d7bba082f2ba73d49c51086e25dc094974f0eaccfaff294a12d553e0ef9424d
import astropy.io.fits as pf import os import numpy as np from copy import deepcopy from itertools import chain import unittest import healpy as hp import warnings # disable new order warnings in tests warnings.filterwarnings("ignore") class TestSphtFunc(unittest.TestCase): def setUp(self): self.lmax ...
lpsinger/healpy
healpy/test/test_sphtfunc.py
Python
gpl-2.0
14,941
[ "Gaussian" ]
26f7a2495b862d7338dfcf06c609c90b18aea04e91462865b2c6470b2e7e6a40
from django.test import TestCase from django.test.client import Client from django.contrib.auth.models import User from django.conf.urls import url from ribbit_app.models import Ribbit from . import views from django.core.urlresolvers import reverse from django.test import LiveServerTestCase from django.contrib.auth....
bkold/CarbonCopy
ribbit_app/tests.py
Python
mit
6,847
[ "Brian" ]
09fc564422f49369ce7d6bafdfa031b1f44b9a67bab64448d664d6780f17b448
""" FileCatalogFactory class to create file catalog client objects according to the configuration description """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from DIRAC import gLogger, gConfig, S_OK, S_ERROR from DIRAC.ConfigurationSystem.Client.Help...
yujikato/DIRAC
src/DIRAC/Resources/Catalog/FileCatalogFactory.py
Python
gpl-3.0
2,625
[ "DIRAC" ]
fcd44a3bcbae7668e4e84db31c69db42c600d8b5c623a7cb70aaf59068e632e0
"""Contains the parent classes for MPF's display SlideBuilder class. """ # slide_builder.py # Mission Pinball Framework # Written by Brian Madden & Gabe Knuth # Released under the MIT License. (See license info at the end of this file.) # Documentation and more info at http://missionpinball.com/mpf import logging im...
spierepf/mpf
mpf/media_controller/core/slide_builder.py
Python
mit
12,495
[ "Brian" ]
b9ef645d9b387d644ff5acbd796c7ba89e76342c305d2400edf67f68693dcf9e
import dryscrape, re, sys from bs4 import BeautifulSoup class EmailCrawler: """ Takes a domain name and prints out a list of email addresses found on that web page or a lower level web page with the same given domain name. Stores emails, paths, and visited_paths as sets to avoid duplicates. Uses Dr...
junhaodong/misc
web_crawler/find_email_addresses.py
Python
mit
3,846
[ "VisIt" ]
1690aa87ad44d1d631ff22348347ef95df1c92d1e718832bd1ca98c9d6e225c1
# ============================================================================ # # Copyright (C) 2007-2010 Conceptive Engineering bvba. All rights reserved. # www.conceptive.be / project-camelot@conceptive.be # # This file is part of the Camelot Library. # # This file may be used under the terms of the GNU General...
kurtraschke/camelot
camelot/view/export/printer.py
Python
gpl-2.0
2,211
[ "VisIt" ]
170e2ca60796dae0b2df02a3f5fcd03ef59afb4a20bd8e608a8bcb534e4fd5e4
""" It is used to load classes from a specific system. """ import re import os import DIRAC from DIRAC import gLogger from DIRAC.Core.Utilities import List from DIRAC.ConfigurationSystem.Client.Helpers import CSGlobals def loadObjects(path, reFilter=None, parentClass=None): """ :param str path: the path to the sy...
arrabito/DIRAC
Core/Utilities/Plotting/ObjectLoader.py
Python
gpl-3.0
2,325
[ "DIRAC" ]
09778f6877ca4569d9ddfbd3a2670d1876e425e6fed8ee04ca42442abb1c45c3
import os from sys import exit import pygame import time #import pywapi import requests import string import logging import datetime import calendar #import threading import random # *** Not to be used for commercial use without permission! # if you want to buy the icons for commercial use please sen...
schnitzlein/weatherstation
WeatherScreen.py
Python
mit
31,076
[ "SIESTA" ]
0d239a65f4b489b128671500c29e7826a2dc6b5c9cc5308445efd84f0b145ce1
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2008-2013 Alistek Ltd (http://www.alistek.com) All Rights Reserved. # General contacts <info@alistek.com> # # WARNING: This program as such is intended to be used by professional...
dhp-denero/LibrERP
report_aeroo_direct_print/__openerp__.py
Python
agpl-3.0
3,037
[ "VisIt" ]
e607cf9666b27dbea1b6ce92b2b53349cd03dbbd7804b3333f15be467d0d2b7a
""" Latent Dirichlet Allocation models, including vanilla LDA as well as correlated and dynamic topic models (CTMs and DTMs) employing the Polya-Gamma augmentation. """ from __future__ import absolute_import import abc import copy import numpy as np from scipy.misc import logsumexp from scipy.linalg import solve_triang...
fivejjs/pgmult
pgmult/lda.py
Python
mit
15,451
[ "Gaussian" ]
62acfe4d4744308c6d6540397e6d1bfd7080f19e2f7df03b146d5954a020bdbf
# Minimal support for git commands on an hg repository # # Copyright 2005, 2006 Chris Mason <mason@suse.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. '''browse the repository in a graphical way The hgk extension allows bro...
dscho/hg
hgext/hgk.py
Python
gpl-2.0
11,479
[ "VisIt" ]
839a21c9764f4e27c79f00f910d12299890642d2ed5c5b20adf9bf1dcedf808b
#!/usr/bin/env python # MinPath # developed by Yuzhen Ye (yye@indiana.edu) # Indiana University, Bloomington # what's new in version 1.2 (released on Oct 19, 2010) # MinPath1.2 works on any pathway system # what you need: a pathway-function mapping file (e.g, data/ec2path), and your input file # what's new in versi...
ecotox/pacfm
pacfm/tools/minpath-1.2/MinPath1.2.py
Python
mit
29,666
[ "BLAST" ]
65875298cbdbf5190245ebf89d665020c98ff6d5fea9c5aa8449ca8c6b71c417
#!/usr/bin/env python3 import argparse import sys from pysisyphus.calculators import ORCA from pysisyphus.helpers_pure import highlight_text def parse_args(args): parser = argparse.ArgumentParser() parser.add_argument("--logs", nargs="+", required=True) parser.add_argument("--gbws", nargs="+", required...
eljost/pysisyphus
scripts/orca_overlaps.py
Python
gpl-3.0
1,835
[ "ORCA" ]
7a48436d76e91e250c0bd580ba2c08bbef5dedff563b089228b3b27525706dc6
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # MDAnalysis --- http://www.mdanalysis.org # Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # # Released under th...
alejob/mdanalysis
package/MDAnalysis/analysis/rdf.py
Python
gpl-2.0
5,213
[ "MDAnalysis" ]
cc16c7a4086f032287e17bc8bf59c94aa63962d1763c3987f05e1ee97941dfae
# # Copyright (C) 2000 Stephen Davies # Copyright (C) 2000 Stefan Seefeld # All rights reserved. # Licensed to the public under the terms of the GNU LGPL (>= 2), # see the file COPYING for details. # from Synopsis import ASG from Synopsis.Formatters.HTML.Tags import * from Tree import Tree class ModuleTree(Tree): ...
stefanseefeld/synopsis
Synopsis/Formatters/HTML/Views/ModuleTree.py
Python
lgpl-2.1
2,273
[ "VisIt" ]
b7d003d43ced6609c8b46ce70594288ad59bdfc2b878544fef9f4e186d137428
""" :mod: DataManager .. module: DataManager :synopsis: DataManager links the functionalities of StorageElement and FileCatalog. This module consists of DataManager and related classes. """ # # imports from datetime import datetime, timedelta import fnmatch import os import time import errno # # from DIRAC import...
fstagni/DIRAC
DataManagementSystem/Client/DataManager.py
Python
gpl-3.0
75,362
[ "DIRAC" ]
074f832c3be96c31271748693f31b3fc6ef938d2f06eeb091be9307e1136ddec
# coding: utf-8 ''' Created on 2014-08-20 A module to load station daily data from Environment Canada from ASCII files and convert them to monthly NetCDF datasets (with extremes); the module also provides a wrapper to load the NetCDF datasets. @author: Andre R. Erler, GPL v3 ''' # external imports import numpy as ...
aerler/GeoPy
src/datasets/EC.py
Python
gpl-3.0
58,269
[ "NetCDF" ]
8b75d3f836a1f8a292b810dd73070d3a3455855675eb3d0a3102e04790d0ac81
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
googleapis/gapic-generator-python
tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_config_service_v2.py
Python
apache-2.0
245,614
[ "Octopus" ]
1ec1fac4968d58471f80de324e4bfbfb44a673ca867c6e2dde65e81428042744
#!/Users/takashi/.pyenv/shims/python import numpy as np import math def gausskernel(x1, x2, gamma): """ x1, x2 must be numpy's ndarrays. This code returns a gaussian kernel value between x1 and x2 """ subtr = np.subtract(x1, x2) return math.exp(- (np.inner(subtr, subtr) * gamma)) # ...
TakashiMatsuda/sag_svm
gausskernel.py
Python
mit
838
[ "Gaussian" ]
bc38951c63ff1bcfe2a8c5d950364c4c4d8f1414e68ca98399c4a8452253820c
# needs mayavi2 # run with ipython -wthread import networkx as nx import numpy as np from enthought.mayavi import mlab # some graphs to try #H=nx.krackhardt_kite_graph() #H=nx.Graph();H.add_edge('a','b');H.add_edge('a','c');H.add_edge('a','d') #H=nx.grid_2d_graph(4,5) H=nx.cycle_graph(20) # reorder nodes from 0,len(...
elenanst/HPOlib
virtualHPOlib/share/doc/networkx-1.11/examples/3d_drawing/mayavi2_spring.py
Python
gpl-3.0
1,095
[ "Mayavi" ]
899441425862f308b53a425ab09e1e02d842a77af34bc76f7bf06194be7d8e2b
# $Id$ # # Copyright (C) 2004-2006 Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # from __future__ import division from r...
adalke/rdkit
rdkit/DataStructs/__init__.py
Python
bsd-3-clause
1,575
[ "RDKit" ]
770cf4196d78474f9bda92caab4db1f9ea123433e3b15f1982d421d7de1da57a
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2017 rvedantam3 <vrama91@vt.edu> # # Distributed under terms of the MIT license. """A class specifying preprocessing steps for CelebA images. Author: Ramakrishna Vedantam vrama@gatech.edu The class is based on the example image decoder ...
google/joint_vae
datasets/celeba/image_decoder.py
Python
apache-2.0
3,945
[ "Gaussian" ]
1b7d8eb3fc77b35db3e689e882609ab92aa312ec3d548758dd664ef27fcfecd2
""" LazynessAnalysis returns number of time a name is use. """ from pythran.analyses.aliases import Aliases from pythran.analyses.argument_effects import ArgumentEffects from pythran.analyses.identifiers import Identifiers from pythran.analyses.pure_expressions import PureExpressions from pythran.passmanager import Fu...
pbrunet/pythran
pythran/analyses/lazyness_analysis.py
Python
bsd-3-clause
13,878
[ "VisIt" ]
c5692c4c450208a7ad73f3fb0407eb81693aa3f04b594f0d754d9e229480a26b
# -*- coding: utf-8 -*- """ tools ===== Functions that USERS will possibly want access to. """ from __future__ import absolute_import import json import warnings import six import re import os from plotly import exceptions, optional_imports from plotly.files import PLOTLY_DIR DEFAULT_PLOTLY_COLORS = [ "rgb(3...
plotly/python-api
packages/python/plotly/plotly/tools.py
Python
mit
25,137
[ "VisIt" ]
165286fecef9b4cf7b112e7174b5f870cce86da5643c30246fabd1e624345d8c
#!/usr/bin/python # -*- coding: utf-8 -*- """ Microsoft translator API An example:: The project is hosted on GitHub where your could fork the project or report issues. Visit https://github.com/**************** :copyright: © 2015 by Hiroyuki Okada & Tamagawa University :license: BSD, see LI...
okadahiroyuki/trcp
trcp_chat/nodes/aaa.py
Python
mit
1,824
[ "VisIt" ]
cd2d28f10830e29af3c81afa745127510be8e62c162d6747a0f1fefca203d416
# SecuML # Copyright (C) 2016-2018 ANSSI # # SecuML 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. # # SecuML is distributed in the h...
ah-anssi/SecuML
SecuML/core/Classification/Monitoring/FamiliesMonitoring.py
Python
gpl-2.0
8,858
[ "Gaussian" ]
703668ef77411a069bb33218a4cadbd96deeb9aa3f1479491c42328ecef4bcf7
# Copyright (C) 2009-2014 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library ...
FedoraScientific/salome-hexablock
doc/pyplots/test_disconnect.py
Python
lgpl-2.1
2,114
[ "VTK" ]
2c7d87a2e916629e8c70ce564f4bee4c90df3305a3aedac6de90c5fb3c1c6825
# coding: utf8 # online.py # 10/9/2014 jichi # # API: http://dws.voicetext.jp/tomcat/data.xml # # See: http://voicetext.jp/ # # Example: # # HIKARI (ja) Normal: # Text: 憎しみは憎しみしか生まない。 # POST http://dws.voicetext.jp/tomcat/servlet/vt [HTTP/1.1 200 OK 587ms] # - X-Requested-With: XMLHttpRequest # - Referer: http://dws.vo...
Dangetsu/vnr
Frameworks/Sakura/py/libs/voicetext/online.py
Python
gpl-3.0
7,402
[ "VisIt" ]
a3c143fb3abfa4c3cbdb028f1e97bcb8c21a60e29cd54b6ba1f4516441ffec7a
import nest import nest.raster_plot import numpy as np import pylab as pl nest.ResetKernel() nest.SetKernelStatus({"overwrite_files": True}) if (not 'bcpnn_dopamine_synapse' in nest.Models()): nest.Install('ml_module') # ##### # DOPA # ##### #popa = nest.Create('iaf_neuron', 200) #vt_dopa = nest.Create('volume...
pierreberthet/local-scripts
neuron_param_test.py
Python
gpl-2.0
3,791
[ "NEURON" ]
209801b7c1ba950b377026a1358cc387b778e53ac68c93d141a3c1589be62efc
from __future__ import absolute_import, division, print_function # ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed ...
Kleptobismol/scikit-bio
skbio/diversity/beta/_base.py
Python
bsd-3-clause
3,415
[ "scikit-bio" ]
f28e7bf56ca7988c0fe37df9187be18235850c0c703b5bd07a485e707bfe22c6
import os, shutil class calculate_stability(object): def __init__(self): self.new_sequences_list = [] self.split_new_seq_list = [] self.num_splits = 4 self.bash_file_name = "bash_file.sh" def run(self): self.read_sequence_file() self.prep_split_folders() ...
blab/stability
augur/stability-data/calculate_stability.py
Python
agpl-3.0
4,068
[ "FoldX" ]
f11198449120bd69df5f93865b3b92fae5f836ca045bb547a73edd031da2dbb9
""" This is a test of using WMSClient and several other functions in WMS In order to run this test we need the following DBs installed: - JobDB - JobLoggingDB - TaskQueueDB - SandboxMetadataDB - PilotAgentsDB And the following services should also be on: - OptimizationMind - JobMan...
arrabito/DIRAC
tests/Integration/WorkloadManagementSystem/Test_Client_WMS.py
Python
gpl-3.0
22,006
[ "DIRAC" ]
06129ea80e7e49941073202ba504ae3f423d5324d3c38f8f5a4f84c244d10137
""" Test waiting for elements to appear after requesting via ajax. """ from bok_choy.promise import BrokenPromise from bok_choy.web_app_test import WebAppTest from .pages import AjaxPage, AjaxNoJQueryPage class AjaxTest(WebAppTest): """ Test waiting for an ajax call to return. """ def setUp(self): ...
drptbl/bok-choy
tests/test_ajax.py
Python
apache-2.0
1,878
[ "VisIt" ]
b3fccba8142f3832daefee36584c060f9228dcdf8ef6251cd47116ea0782d333
""" User policy settings """ from askbot.conf.settings_wrapper import settings from askbot.deps import livesettings from django.utils.translation import ugettext as _ from askbot import const USER_SETTINGS = livesettings.ConfigurationGroup( 'USER_SETTINGS', _('User settings') ...
aavrug/askbot-devel
askbot/conf/user_settings.py
Python
gpl-3.0
1,880
[ "VisIt" ]
41c3559b3045d7cc83adc396bc595686b15da9494ee9d1230e4b83257c90486f
# generated with make_mock.py def abspath(path): """Return a normalized absolutized version of the pathname *path*. On most platforms, this is equivalent to ``normpath(join(os.getcwd(), path))``.""" return '' altsep = None def basename(path): """Return the base name of pathname *path*. This is th...
kmod/icbd
stdlib/type_mocks/os/path.py
Python
mit
9,219
[ "VisIt" ]
13ebe077d02aa6090dd774fd139995c37aa35e0adf3a9579cd44cf2f6962785f
##### import the simple module from the paraview from paraview.simple import * #### disable automatic camera reset on 'Show' paraview.simple._DisableFirstRenderCameraReset() import os DATAPATH=os.environ["VERROU_PARAVIEW_DATA_PATH"] try: DATAPATH except NameError: print("Please set the DATAPATH variable with the...
edf-hpc/verrou
pyTools/paraview_script.py
Python
gpl-2.0
2,245
[ "ParaView" ]
32fd2fa161cf1e19a5eaa90ab8380f898c0305c96e23cd03f3ff5d70042a1082
""" Copyright 2018, Google, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software d...
GoogleCloudPlatform/dlp-cloud-functions-tutorials
gcs-dlp-classification-python/main.py
Python
apache-2.0
7,254
[ "VisIt" ]
3f8e826ddb41d802155054db5d86ea3a5520fd71f6cfec841f31f28ab8d03acf
''' file name : smoothing.py Description : This sample shows how to smooth image using various filters This is Python version of this tutorial : http://opencv.itseez.com/doc/tutorials/imgproc/gausian_median_blur_bilateral_filter/gausian_median_blur_bilateral_filter.html#smoothing Level : Beginner Benefits : Learn t...
asrob-uc3m/rpc_rpi
src/python/opencv_python_tutorials/Official_Tutorial_Python_Codes/3_imgproc/smoothing.py
Python
gpl-3.0
2,055
[ "VisIt" ]
86eb6c2a69e99066e53dfcb862340bee3170a79c59eaa3e4ecf316313cd53507
import numpy as np import itertools import logging import time import traceback from collections import Mapping from ..conventions import cf_encoder from ..core.utils import FrozenOrderedDict from ..core.pycompat import iteritems, dask_array_type, OrderedDict # Create a logger object, but don't add any handlers. Leav...
drewokane/xray
xarray/backends/common.py
Python
apache-2.0
7,619
[ "NetCDF" ]
ad51a724dbf64f171cc4c9794dbfa30838b47f2440102ce3aa92aba1034163c3
#!/usr/bin/env python # # $File: statAssociation.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 redistr...
BoPeng/simuPOP
docs/statAssociation.py
Python
gpl-2.0
2,265
[ "VisIt" ]
b3f6952499def7c9f4fa91fa3f65b264af1341834f6094bef7dc075bef1662e4
from PyQt4 import QtGui from aston.qtgui.ui_settings import Ui_Form #from aston.database.Database import AstonDatabase #from aston.database.Compound import get_compound_db from aston.qtgui.TableFile import FileTreeModel from aston.qtgui.MenuOptions import peak_models from aston.spectra.Isotopes import delta13C_constant...
molliewebb/aston
aston/qtgui/Settings.py
Python
gpl-3.0
6,438
[ "Gaussian" ]
f11142322730a088559f927dbf233a6a367bfa493c4ab89c247760fa676b68ff
# -*- coding: utf-8 -*- """ Bok choy acceptance tests for problems in the LMS """ from __future__ import absolute_import import time from datetime import datetime, timedelta from textwrap import dedent import ddt from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc from common.test.acc...
ESOedX/edx-platform
common/test/acceptance/tests/lms/test_lms_problems.py
Python
agpl-3.0
48,224
[ "VisIt" ]
54750b5ac9b9804a997285230a9ef9a85ef51937f985b1a5d03cbd42c554b6e1
# import logging from ast.visit import visit as v from ast.node import Node from ast.body.methoddeclaration import MethodDeclaration from ast.stmt.minrepeatstmt import MinrepeatStmt class Desugar(object): def __init__(self): self._cur_mtd = None @v.on("node") def visit(self, node): """...
plum-umd/java-sketch
java_sk/rewrite/desugar.py
Python
mit
1,242
[ "VisIt" ]
149891bfea9aa3dece44ea92796b65481b6a7cb99aa85e5b9bc93c90228b34b6
# Draws a vector in the direction of gravity # To be run using "Tools -> Python Shell -> Run Script" inside of paraFoam # assumes that one OpenFOAM-case is opened from PyFoam.Paraview import readerObject,caseDirectory from PyFoam.Paraview.SimpleSources import Glyph,Arrow from PyFoam.RunDictionary.ParsedParameterFile...
Unofficial-Extend-Project-Mirror/openfoam-extend-Breeder-other-scripting-PyFoam
examples/paraview3/gDirection.py
Python
gpl-2.0
823
[ "ParaView" ]
2300658a9789b7a3c0a9ee575629bca5bc11360e349d0d2138fd75653256ea9e
# rall64.py --- # # Filename: rall64.py # Description: # Author: Subhasis Ray # Maintainer: # Created: Fri May 23 16:33:43 2014 (+0530) # Version: # Last-Updated: # By: # Update #: 0 # URL: # Keywords: # Compatibility: # # # Commentary: # # # # # Change log: # # # # # This program i...
BhallaLab/moose-full
moose-examples/rall_1964/rall64.py
Python
gpl-2.0
8,752
[ "MOOSE" ]
454be0b3b79e583fc834703457538dbd06008e0dc4691ee9477449fc737347e4
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase import vtk class vtkSTLReader(SimpleVTKClassModuleBase): def __init__(self, module_manager): SimpleVTKClassModuleBase.__init__( self, module_manager, vtk.vtkS...
nagyistoce/devide
modules/vtk_basic/vtkSTLReader.py
Python
bsd-3-clause
464
[ "VTK" ]
84787743963c88c9851e291bf874489f7d0924f9be8c7a99b84bdbd2247a1f3d
import pytest import psi4 from forte.solvers import solver_factory, HF, ActiveSpaceSolver def test_fci_rdms_1(): """Test the FCI 2- and 3-RDMs on LiH/STO-3G""" # setup job xyz = """ Li H 1 3.0 units bohr """ input = solver_factory(molecule=xyz, basis='sto-3g') state = input.state...
evangelistalab/forte
tests/pytest-methods/fci/test_fci-rdms-1.py
Python
lgpl-3.0
1,374
[ "Psi4" ]
8c31f5a54dbdfb3967dd6c6368ecdfee74fdfe64c6ec6a420a2d7afce6ea8675
# Package Imports from ..workspace import Block, Disconnected, Cancelled # Twisted Imports from twisted.internet import reactor, defer, task from twisted.python import log # Octopus Imports from octopus import data from octopus.constants import State import octopus.transport.basic # Do not auto-register these classe...
richardingham/octopus
octopus/blocktopus/blocks/machines.py
Python
mit
5,669
[ "Octopus" ]
d163a4f73c6be7bd5e7916c19ca5641aee58cfdc4b8eeb2f32b88406f7ab442a
""" This module contain solvers for all kinds of equations: - algebraic or transcendental, use solve() - recurrence, use rsolve() - differential, use dsolve() - nonlinear (numerically), use nsolve() (you will need a good starting point) """ from sympy.core.compatibility import iterable, is_s...
Cuuuurzel/KiPyCalc
sympy_old/solvers/solvers.py
Python
mit
48,591
[ "Gaussian" ]
59e097dcea5583d2c3a4312ad9c16c511ed6b1257944c57385afff15d64e6294
# # @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 #...
psi4/psi4
psi4/driver/driver_cbs.py
Python
lgpl-3.0
83,282
[ "CFOUR", "Psi4" ]
56ad281c50d2f0b7fab0867e698d12a8ca9a88e6ca14d950cb143a1f9179dabb
from __future__ import absolute_import from __future__ import print_function import os import sys import atexit import signal import logging from pprint import pformat from tornado.options import options from tornado.options import parse_command_line, parse_config_file from tornado.log import enable_pretty_logging f...
raphaelmerx/flower
flower/command.py
Python
bsd-3-clause
4,187
[ "VisIt" ]
655c5dd6d0b4a469542f06d24420f9bccf2f8eb893004ff6c85f0c95abcd2197
#% DEMO 17: Detector Rotation # # # # Some systems have a slight rotation of the detector due to mechanicall # inacuracies. # # According to the article "A geometric calibration method for cone beam # CT systems" (DOI: 10.1118/1.2198187), only Roll needs to be corrected # for in the algorithmic part, as the other ...
CERN/TIGRE
Python/demos/d17_DetectorRotation.py
Python
bsd-3-clause
2,390
[ "Gaussian" ]
0a2603069e1112c9165a697495f7b09d1a0f4f5a09e55361c029601c7b77d466
# # Copyright (C) 2007-2008 by Greg Landrum # All rights reserved # import numpy from rdkit import Chem, Geometry from rdkit import RDLogger from rdkit.Chem.Subshape import SubshapeObjects from rdkit.Numerics import Alignment logger = RDLogger.logger() class SubshapeAlignment(object): transform = None triang...
ptosco/rdkit
rdkit/Chem/Subshape/SubshapeAligner.py
Python
bsd-3-clause
13,373
[ "PyMOL", "RDKit" ]
4d9bcc72c3075ab9479887f317d36149560b01d8508e4233826538dcacba6e2b
"""Module containing functions for calling multiple external tools.""" from future.utils import native_str import pysam from .sambamba import sambamba_sort from .util import which def sort_bam(input_bam, output_bam, threads=1): """Sorts bam file using sambamba or samtools.""" if which('sambamba') is not No...
jrderuiter/im-fusion
src/imfusion/external/compound.py
Python
mit
462
[ "pysam" ]
41bb353202a28a9087e56e9d6d892330d6b0c382761549906e5819f0b79038b2
import datetime as _datetime import os import re import random import string import inflect import six from . import mock_random inflectify = inflect.engine() def _slugify(string): """ This is not as good as a proper slugification function, but the input space is limited >>> _slugify("beets") 'be...
classam/silly
silly/main.py
Python
mit
34,913
[ "BLAST" ]
87fb50ab31a8d601bb0b288b31602e7fdcb6b38f16e155d572cdea09e78daf59
# standart from collections import deque from lib2to3.pytree import Leaf from lib2to3.pgen2 import token from textwrap import dedent # internal from . import classes __all__ = [ 'TreeVisitor', 'CoreGenerator', ] def itail(iterable, size=1): 'Yields `size` elements of iterable and iterator over rest of...
Evgenus/protocyt
protocyt/compiler.py
Python
mit
7,320
[ "VisIt" ]
dcacdf5004e2cfb2e9f0ffefdcedd4d5568bc94cc4257a0bf3980e8cd2c39dcc
# ################################################################ # # Active Particles on Curved Spaces (APCS) # # Author: Silke Henkes # # ICSMB, Department of Physics # University of Aberdeen # # Author: Rastko Sknepnek # # Division of Physics # School of Engineering, Physics and Math...
sknepneklab/SAMoS
FormerAnalysis/sphere_patches_stresses_defects.py
Python
gpl-3.0
34,527
[ "VTK" ]
c29af754b35718ddf7efcee8d8b3f0d0f3921214d29152149272f60842e13725
""" NetCDF reader/writer module. This module is used to read and create NetCDF files. NetCDF files are accessed through the `netcdf_file` object. Data written to and from NetCDF files are contained in `netcdf_variable` objects. Attributes are given as member variables of the `netcdf_file` and `netcdf_variable` objects...
jrversteegh/softsailor
deps/scipy-0.10.0b2/scipy/io/netcdf.py
Python
gpl-3.0
29,815
[ "NetCDF" ]
2cb03d48c5f36b3bdbcacb5bbb3ad48326b1edf889b2873e15cdbedb6a840472
from __future__ import absolute_import from __future__ import division from __future__ import print_function from DIRAC.Core.Utilities.ObjectLoader import ObjectLoader from DIRAC.Core.DISET.RequestHandler import RequestHandler from DIRAC.Core.Tornado.Server.TornadoService import TornadoService def _check(result): ...
ic-hep/DIRAC
src/DIRAC/Core/Utilities/test/Test_ObjectLoader.py
Python
gpl-3.0
1,078
[ "DIRAC" ]
89de6238788dd32b7a31119b7718bf1f7f13667a5b4a0eca88a43aebd40ff9fb
#!/usr/bin/env python # File: plot_histograms3.py # Created on: Mon Aug 20 22:14:33 2012 # Last Change: Wed Feb 13 16:24:31 2013 # Purpose of script: <+INSERT+> # Author: Steven Boada import pylab as pyl from mk_galaxy_struc import mk_galaxy_struc galaxies = mk_galaxy_struc() verylow = low = med = high = superhigh =...
boada/ICD
sandbox/legacy_plot_code/plot_ICD_sersic_pie.py
Python
mit
3,589
[ "Galaxy" ]
72355a54e1286745eb5e0089c6bc20fcfc607823c417ea8ec6f88f97f63fc93e
#!/usr/bin/env python import os import sys import client_getfile as client import pyfits import time CCDNUM = 59 recv_path = '/lsst8/felipe/ARCHIVE_RECEIVED/DECam/instcal' REPO = '/lsst8/felipe/REPOS/DECam' PRODUCTS = '/lsst8/felipe/PRODUCTS' TEMPLATE_ID = { '0197371' : '0197371', '0197367' : '0197371', ...
menanteau/lsstdev
proccess_from_socket_example.py
Python
gpl-3.0
2,962
[ "VisIt" ]
0cae404762cdf9df907688f4e076a922aa1d320654fcc1e0bb89cd301bc79d17
""" :mod: StorageElementProxyHandler .. module: StorageElementProxyHandler :synopsis: This is a service which represents a DISET proxy to the Storage Element component. This is used to get and put files from a remote storage. """ from __future__ import absolute_import from __future__ import division from __future_...
yujikato/DIRAC
src/DIRAC/DataManagementSystem/Service/StorageElementProxyHandler.py
Python
gpl-3.0
11,531
[ "DIRAC" ]
0ee33d4a5e93bfa4fcb1c14b064607aa0aa1226b7c9954dfa4284eaff59b4a8b
# USAGE # SetupLHCbDirac # lhcb-proxy-init # python SCRIPTNAME lfn <lfn <lfn ....>> from DIRAC.Core.Base import Script Script.parseCommandLine(ignoreErrors=False) import sys import DIRAC.Interfaces.API.Dirac as Dirac d = Dirac.Dirac() lfns = sys.argv[1:] try: large_dict = d.getAccessURL(lfns,'CERN-USER')['Value'][...
pseyfert/gangascripts
get_eos_urls.py
Python
gpl-2.0
462
[ "DIRAC" ]
e54e6acf7819a0663db2cd7f2175f68dfa12b6a508a760a26f98c0b46cff8197
#!/usr/bin/env python #-*- coding:utf-8 -*- # # This file is part of the NNGT project to generate and analyze # neuronal networks and their activity. # Copyright (C) 2015-2019 Tanguy Fardet # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
Silmathoron/NNGT
nngt/core/group_structure.py
Python
gpl-3.0
28,658
[ "NEURON" ]
cc6ae8f3d41f28db4272332a0f9cb7177d325620fd4d2af825de112a25a101c7
""" iFiltr, Simple & Secure Social Shopping. Copyright (C) 2012-2013 iFiltr (<https://ifiltr.com>). 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 ...
ifiltr/ifiltr
populateDb.py
Python
agpl-3.0
20,273
[ "COLUMBUS" ]
6ecbd890b7c4c6ac9087cab61f212050b9c51f5463974eccac7900750e10244c
from ovito.io import import_file from ovito.modifiers import ClusterAnalysisModifier import numpy node = import_file("simulation.dump") node.modifiers.append(ClusterAnalysisModifier(cutoff = 2.8, sort_by_size = True)) node.compute() cluster_sizes = numpy.bincount(node.output.particle_properties['Cluster'].array) nump...
srinath-chakravarthy/ovito
doc/python/example_snippets/cluster_analysis_modifier.py
Python
gpl-3.0
366
[ "OVITO" ]
4130272a9a134dafc8336a52c68e82ce8dba69d945602ba8a98428b84895e131
# Copyright (C) 2016 # Max Planck Institute for Polymer Research # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, o...
espressopp/espressopp
src/analysis/AdressDensity.py
Python
gpl-3.0
2,966
[ "ESPResSo" ]
3dee4a0662df347620f7937722e17f0adf3f6db53c71681555cb6f121465e77d
# -*- coding: utf-8 -*- import numpy as np def kernel(X, Y): """Euclidian distance between X and Y. Args: X (ndarray): Input X.\n Y (ndarray): Input Y. Yields: K (ndarray): Euclideian distance matrix between X and Y. Example: Calculate the distance matrix to i...
aaskov/nsp
gp/gp_kernels.py
Python
mit
1,678
[ "Gaussian" ]
b5d6283f016709fd458a8ed5112f86c5209c1aa4a6d0f1ca15993b17d3bee0ce
# coding: utf-8 """ flask_oauthlib.contrib.oauth2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SQLAlchemy and Grant-Caching for OAuth2 provider. contributed by: Randy Topliffe """ import logging from datetime import datetime, timedelta from .cache import Cache __all__ = ('bind_cache_grant', 'bind_sqlalchemy') l...
dnlm92/chokoretto
temp/venv/lib/python2.7/site-packages/flask_oauthlib/contrib/oauth2.py
Python
mit
10,159
[ "VisIt" ]
a5663278fc93aa69c48e6c0362105f28edd5d5eb3152d453c0707fb6f7f46e66