text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
"""
Miscellaneous tools used by OpenERP.
"""
from functools import wraps
import cProfile
from contextlib import contextmanager
import subprocess
import logging
import os
import passlib.utils
import socket
import sys
im... | drakuna/odoo | openerp/tools/misc.py | Python | gpl-3.0 | 35,305 | [
"VisIt"
] | 20b4c88f403e0117f5a79fa347ecb049509d727fd255c92b909aab01aa943066 |
"""The standard SOM."""
import json
import logging
from collections import Counter, defaultdict
from typing import Callable, Dict, List, Optional, Tuple
import numpy as np
from somber.base import Base, _T
from somber.components.initializers import range_initialization
from somber.components.utilities import Scaler
... | stephantul/somber | somber/som.py | Python | mit | 13,370 | [
"NEURON"
] | 1e8bef7d89a55419ab40a948efaeed3992b7894f55648c483d46edf836c83021 |
""" Contains the Flasher parent class. """
# flasher.py
# Mission Pinball Framework
# Written by Brian Madden & Gabe Knuth
# Released under the MIT License. (See license info at the end of this file.)
# Documentation and more info at http://missionpinball.com/mpf
import logging
from mpf.system.devices import Device
... | jabdoa2/mpf | mpf/devices/flasher.py | Python | mit | 3,036 | [
"Brian"
] | 9234fdb9e13e80c67fbfe08ac75d993556b69dd1a77a138d74507f7f327cf9ff |
# -*- coding: utf-8 -*-
import numpy as np
import paraBEM
from paraBEM.airfoil import Airfoil
from paraBEM.utils import check_path
from paraBEM.vtk_export import VtkWriter
from paraBEM.pan2d import DirichletDoublet1Case2 as Case
# geometry
airfoil = Airfoil.trefftz_kutta(-0.1 + 0.0j, np.deg2rad(30))
airfoil.numpoints... | looooo/paraBEM | examples/vtk/vtk_airfoil_linear_dirichlet.py | Python | gpl-3.0 | 1,604 | [
"VTK"
] | dd485eadfe97d3b088d0e9f5d132a2f1a78a2db4f3b0ad2eb69a8b67e9a6e09c |
__author__ = "Andre Merzky, Ole Weidner"
__copyright__ = "Copyright 2012-2013, The SAGA Project"
__license__ = "MIT"
""" PBS job adaptor implementation
"""
import threading
import saga.url as surl
import saga.utils.pty_shell as sups
import saga.adaptors.base
import saga.adaptors.cpi.job
from saga... | PanDAWMS/pilot | saga/adaptors/pbs/pbsjob.py | Python | apache-2.0 | 44,553 | [
"Jaguar"
] | 20ba90e1bb3406bfa5698bb4893856de581a01de63ed1dc30287aeb8599f7fc3 |
#!/usr/bin/env python
#*******************************
# A quick output of quicksim simulation for DESI
# For each 500 input spectra, this wrapper Outputs Four files for each arm B,R,Z,
# 1. frame file (x3)
# 2. Flux Calibration Vector file (x3)
# 3. Sky Model File (x3)
# 4. cframe file (x3)
#
#Example:
#
#***********... | forero/desisim | bin/quickGen.py | Python | bsd-3-clause | 20,034 | [
"Gaussian"
] | 2b86fa1a73f6c6626a359a5f63937daaddc1ed6b8613dcdc307645a715696e24 |
## Automatically adapted for numpy.oldnumeric Jun 27, 2008 by -c
#
# Copyright (C) 2000 greg Landrum
#
""" functionality for generating an image showing the results of a composite model voting on a data set
Uses *Numeric* and *PIL*
"""
from __future__ import print_function
import numpy
from PIL import Image, Im... | soerendip42/rdkit | rdkit/ML/MLUtils/VoteImg.py | Python | bsd-3-clause | 6,125 | [
"RDKit"
] | 0d7db21952a6800d6349bead4cbb4d0754dcba27ddc83d3cd79fe4877056ed95 |
"""
==================================================
Plot different SVM classifiers in the iris dataset
==================================================
Comparison of different linear SVM classifiers on a 2D projection of the iris
dataset. We only consider the first 2 features of this dataset:
- Sepal length
- Se... | DailyActie/Surrogate-Model | 01-codes/scikit-learn-master/examples/svm/plot_iris.py | Python | mit | 3,229 | [
"Gaussian"
] | ea993ba8591838ccfe99d642dfc1af30f4f1e23e76f19122195887b5584da119 |
# -*- coding: utf-8 -*-
#
# gPrime - A web-based genealogy program
#
# Copyright (C) 2003-2005 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
#
# 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 Soft... | sam-m888/gprime | gprime/plugins/rel/rel_nl.py | Python | gpl-2.0 | 23,388 | [
"Brian"
] | 68ed98ba4943f1435b0564b34fe219a9e9691568fbc0741297045f5262fa5038 |
# -*- 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 publish... | thica/ORCA-Remote | src/ORCA/interfaces/InterfaceConfig.py | Python | gpl-3.0 | 12,145 | [
"ORCA"
] | 8b8ee05448fb7bb38a81d67e54ac2ca1fc7bfc504c7cb2f9520f4a93c63b6182 |
# Copyright (C) 2007 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 writ... | bileto/transitfeed | tests/transitfeed/teststoptime.py | Python | apache-2.0 | 17,066 | [
"CASINO"
] | 0657a1996ed4d4e2c672ca7359f1af90c9963a358ff0d415dc8a17643ab6620c |
#
# Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | intel-analytics/analytics-zoo | pyzoo/test/zoo/orca/data/test_pandas_backend.py | Python | apache-2.0 | 15,486 | [
"ORCA"
] | fcdd7b795c67fe5d125711efbac69d0534af6b683424b54098f4bb716b32eae2 |
import unittest
import random
from models.amity import Amity
from models.room import Room, LivingSpace, Office
from models.person import Person, Fellow, Staff
class TestAmity(unittest.TestCase):
def setUp(self):
"""
Test Fixture for instantiating Amity class
"""
pass
def... | andela-lolali/amity | tests/test_amity.py | Python | gpl-2.0 | 15,413 | [
"Brian"
] | 2640f87643ec78f1a5899f6a848bb27469ccabbe42ce2b2728567b22b4fbbde3 |
# Copyright (C) 2015 Henrique Pereira Coutada Miranda, Alejandro Molina-Sanchez
# All rights reserved.
#
# This file is part of yambopy
#
from subprocess import Popen, PIPE
import os
import json
from time import sleep
import re
class YamboIn():
"""
Class to read, write, create and manipulate yambo input files ... | alexmoratalla/yambo-py | yambopy/io/inputfile.py | Python | bsd-3-clause | 12,731 | [
"Yambo"
] | 8ad7c28dfec531b9e220583ee3f45d296b63ecbe00742f4429727963823cef15 |
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | marmyshev/item_title | openlp/core/utils/__init__.py | Python | gpl-2.0 | 15,814 | [
"Brian"
] | 8aa473c5053dd3340f897182dfcd17bf8f4191b69d4f0ecb81dce1633d5997c6 |
#!/usr/bin/env python2
# vim:fileencoding=utf-8
# License: GPLv3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>
from __future__ import (unicode_literals, division, absolute_import,
print_function)
from collections import defaultdict
from io import BytesIO
import unittest
from lxml impo... | jelly/calibre | src/calibre/ebooks/metadata/opf3_test.py | Python | gpl-3.0 | 31,317 | [
"MOOSE"
] | 7e1093599e685220e82358c81c2e53196b5c89c0467522920a2a2647e8361fde |
from codecs import open # To use a consistent encoding
from os import path
try:
from setuptools import setup, Command
except:
from distutils.core import setup, Command
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'README.md'), encodi... | aebrahim/ome | setup.py | Python | mit | 2,574 | [
"Biopython",
"pysam"
] | e1eabf0e44f100c0bea9697de17e69cb270824bb02b8089370b3545c6b5f57c9 |
"""
Miscellaneous utility functions.
"""
__author__ = "Steven Kearnes"
__copyright__ = "Copyright 2014, Stanford University"
__license__ = "BSD 3-clause"
import gzip
import numpy as np
import os
import pandas as pd
from rdkit import Chem
from rdkit.Chem.Scaffolds import MurckoScaffold
def pad_array(x, shape, fill=0... | bowenliu16/deepchem | deepchem/utils/__init__.py | Python | gpl-3.0 | 1,878 | [
"RDKit"
] | 7e684ec1c38feee4dc6ef818114c47510f65d4283de5b575a9bb8574544b06c3 |
from math import *
import sys
import numpy as np
def likelihood(b0, sigmab, nobs, s0, sigmas, randomseed = 0):
if randomseed != 0:
np.random.seed(randomseed)
n_BkgSig = b0 + s0
err_BkgSig = sqrt(sigmab*sigmab + sigmas*sigmas)
# Use Gaussian approximation if predicted number of events ... | swayand/Checkmate | tools/python/likelihood.py | Python | gpl-2.0 | 981 | [
"Gaussian"
] | a975b0c5dc823e5d678c963aef3131d9a7837be0d9aefe70a67da1f903bf1e6f |
# ######################################################################
# Copyright (c) 2014, Brookhaven Science Associates, Brookhaven #
# National Laboratory. All rights reserved. #
# #
# @author: Li Li (lili@bnl.g... | giltis/scikit-xray | skxray/core/fitting/tests/test_lineshapes.py | Python | bsd-3-clause | 12,311 | [
"Gaussian"
] | af858706713cd8101620f21c71a7580902563885f1b10a6709c5a4ffed949e0a |
# -*- coding: utf-8 -*-
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" je opcioni izraz kao sto je "polje1=\'nova vrijednost\'". Ne mozete azurirati ili izbristi rezultati JOIN-a',
'# of Houses Damaged': 'Broj oštećenih kuća',
'# of Houses... | flavour/eden | languages/bs.py | Python | mit | 538,035 | [
"VisIt"
] | 2e6d1dd0f483fdd86afe605211d3dcdd0f836a02d1ff604c845edb32a46f9402 |
from __future__ import division
import numpy as np
import scipy.sparse as sp
from sklearn.metrics import euclidean_distances
from sklearn.random_projection import johnson_lindenstrauss_min_dim
from sklearn.random_projection import gaussian_random_matrix
from sklearn.random_projection import sparse_random_matrix
from... | WangWenjun559/Weiss | summary/sumy/sklearn/tests/test_random_projection.py | Python | apache-2.0 | 14,033 | [
"Gaussian"
] | bdeb114b4302214ece1f214e8e5540ec8c32fb0f5a6d366f31f5ec148c88421a |
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project
# All rights reserved.
#
# This file is part of NeuroM <https://github.com/BlueBrain/NeuroM>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | lidakanari/NeuroM | neurom/check/tests/test_neuron_checks.py | Python | bsd-3-clause | 12,896 | [
"NEURON"
] | 50290b2714811b8614e1e27cfad92a10502f4e06251e32dab09385b38fac0d56 |
from __future__ import print_function
import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
def glm_solvers():
predictors = ["displacement","power","weight","acceleration","year"]
for solver in ["AUTO", "IRLSM", "L_BFGS", "COORDINATE_DESCENT_NAIVE", "COORDINATE_DESCENT"]:
... | nilbody/h2o-3 | h2o-py/tests/testdir_algos/glm/pyunit_DEPRECATED_solversGLM.py | Python | apache-2.0 | 1,285 | [
"Gaussian"
] | 286a27d1e1bb8b441c9c14b6e1392ee0032903d2061342932012eabb60d4ddf9 |
# coding: utf-8
#
# Copyright 2012 NAMD-EMAP-FGV
#
# This file is part of PyPLN. You can get more information at: http://pypln.org/.
#
# PyPLN 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 o... | NAMD/pypln.backend | tests/test_worker_palavras_semantic_tagger.py | Python | gpl-3.0 | 3,630 | [
"NAMD"
] | 9aa7922f8f705c66b2c081bc796deda8148419f84ba5c27988e3306f150bc6dc |
""" The following script will use the 3mm Gaussian smoothed data
(see dataprep_script.py) and take a only a subset of the voxels on this smooted
data. Specifically it will,
* Mask voxels based on the FFT and variance threshhold filtering (see brain_mask)
folder
* Save a subset of the smooth data consisting of o... | rishizsinha/project-beta | code/filter_script.py | Python | bsd-3-clause | 3,115 | [
"Gaussian"
] | c30398ab416e2a89d6e9d24fee5295da5772e7bfcf2c5c1b695546947b9ca57e |
# Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
"""
Classes for representing multi-dimensional data with metadata.
"""
from collections import OrderedDict
from collections.... | bjlittle/iris | lib/iris/cube.py | Python | lgpl-3.0 | 162,982 | [
"NetCDF"
] | e3b38fcafb34aa82880274f66c9e869542a13d1429a85e6cedb6c89dfb1e3fba |
import os
from math import pi, cos, sin
from ase import Atom, Atoms
from ase.parallel import rank, barrier
from gpaw import GPAW, FermiDirac
from gpaw.test import equal, gen
from gpaw.xas import XAS, RecursionMethod
# Generate setup for oxygen with half a core-hole:
gen('Si', name='hch1s', corehole=(1, 0, 0.5))
a = 4... | qsnake/gpaw | gpaw/test/si_xas.py | Python | gpl-3.0 | 1,922 | [
"ASE",
"GPAW"
] | b1da89a20450a602d431c2ee988156b451ebaf1d4028a1832ad727a67f57fa13 |
# !/usr/bin/env python
__author__ = 'NishantNath'
'''
Using : Python 2.7+ (backward compatibility exists for Python 3.x if separate environment created)
Required files : hdf5_getters.py, find_second_max_value.py
Required packages : numpy, pandas, matplotlib, sklearn, pickle
Steps:
1.
# Uses naive bayes gaussian me... | nishantnath/MusicPredictiveAnalysis_EE660_USCFall2015 | Code/Machine_Learning_Algos/10k_Tests/ml_classification_naive_gaussian_bayes_training.py | Python | mit | 7,780 | [
"Gaussian"
] | 23124336b80b44ec847396804ea5d1d2b3007934137a4a569712d2be6eff4225 |
# This is a modified version of OSC Mode that supports sending lamp updates to the graphical
# OSC client. This has been modified from an earlier version written by Brian Madden.
# Unfortunately, this version has not been generated from Brian's latest version, and as
# such some functionality from his latest is like... | mjocean/OscSwitchMatrixGUI | osc.py | Python | mit | 12,950 | [
"Brian"
] | 41e2b23cc424ad70201c7952e69b95d117d6fc034859d8b521f2b549ed4df1c5 |
from __future__ import print_function
from ase import *
from hotbit import Hotbit
import numpy as np
import sys
"""
This is a test script that gives insight how good are
the parametrizations for H-H, C-C and C-H. Reference
values are taken from
D. Porezag et al., Physical Review B, volume 51, number 19, 1995
Sa... | pekkosk/hotbit | hotbit/test/hydrocarbon-test.py | Python | gpl-2.0 | 9,355 | [
"ASE"
] | 4e5bc609a7fde3100e0aea6ea9b1c1c57dd2f2a88e6aff248d8f5df12a7dbf97 |
import os
from .base import * # noqa
# Disable debug mode
DEBUG = False
ENV = 'prd'
DEFAULT_SITE_PORT = 80
# Compress static files offline
# http://django-compressor.readthedocs.org/en/latest/settings/#django.conf.settings.COMPRESS_OFFLINE
COMPRESS_OFFLINE = True
# Send notification emails as a background task... | praekelt/molo-tuneme | tuneme/settings/production.py | Python | bsd-2-clause | 2,257 | [
"Firefly"
] | 72e3444bdfcc6868d25148c768eacf5edf2ae4cf033e0e4441c2e78fd116b859 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2018 Guenter Bartsch
#
# 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... | gooofy/voxforge | zamiaai/skills/dialog/dlg.py | Python | lgpl-3.0 | 53,400 | [
"exciting"
] | 032456cabea87187bc7e1620e42e2034e660da4d7baa7b70dc25e8104b7ef395 |
import ast
import os
import sys
from .python.ast import Visitor
from .python.debug import dump
def transpile(input, prefix='.', outdir=None, namespace='python', verbosity=0):
transpiler = Transpiler(namespace=namespace, verbosity=verbosity)
for file_or_dir in input:
if os.path.isfile(file_or_dir):
... | cflee/voc | voc/transpiler.py | Python | bsd-3-clause | 3,437 | [
"VisIt"
] | b810f5343f91ef63c549edbdfe52559697da49a8cc7875def0c49bb80ade7b21 |
#
# Copyright 2014, 2020-2021 Lars Pastewka (U. Freiburg)
# 2014 James Kermode (Warwick U.)
#
# matscipy - Materials science with Python at the atomic-scale
# https://github.com/libAtoms/matscipy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General P... | libAtoms/matscipy | tests/test_invariants.py | Python | lgpl-2.1 | 2,451 | [
"Matscipy"
] | 9bd1e7c1d5089cba1e6ed8af2f80466080df2eb6a5d0e9056509839d61e7fdde |
# -*- coding: utf-8 -*-
# Copyright(C) 2012-2014 Laurent Bachelier
#
# This file is part of weboob.
#
# weboob 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 ... | willprice/weboob | weboob/browser/browsers.py | Python | agpl-3.0 | 26,635 | [
"VisIt"
] | 76e167ba8f8ff0abbd3858977db3e022f1ff682f14ee9c6805f4e8e3c3e8cdca |
# Author: Henrique Pereira Coutada Miranda
# Tests for yambopy
# Si
#
from __future__ import print_function
import matplotlib
import unittest
import sys
import os
import shutil
import argparse
import subprocess
import filecmp
import shutil as sh
from yambopy import *
from qepy import *
this_file_path = os.path.dirname(... | alexmoratalla/yambopy | yambopy/integration_tests/itest_yambopy.py | Python | bsd-3-clause | 1,761 | [
"Yambo"
] | 6a04a2689214c68fbff0915b763973b50ec66d1de54fc2ecc6e97575fddb45db |
""" Handler to manage proxies in the ProxyManager service
"""
__RCSID__ = "$Id$"
import json
import tempfile
import os
from tornado import web, gen
from RESTDIRAC.RESTSystem.Base.RESTHandler import WErr, WOK, RESTHandler
from DIRAC.FrameworkSystem.Client.ProxyManagerClient import gProxyManager
from DIRAC.Core.Utilit... | DIRACGrid/RESTDIRAC | RESTSystem/API/Proxy/ProxyHandler.py | Python | gpl-3.0 | 4,197 | [
"DIRAC"
] | 069e44c7cd3167708639ee5cfcd2ae5922ec4c76dc7fc7e851e57031773b66da |
#
# GMSK modulation and demodulation.
#
#
# Copyright 2005-2007,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from __future__ import un... | skoslowski/gnuradio | gr-digital/python/digital/gmsk.py | Python | gpl-3.0 | 10,561 | [
"Gaussian"
] | 8e5bcf677f13b266b07b30abc773664a67be835bc0d1a7c8245f5e12c44f0f27 |
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Provides an interface to start and stop Android emulator.
Assumes system environment ANDROID_NDK_ROOT has been set.
Emulator: The class provides t... | cvsuser-chromium/chromium | build/android/pylib/utils/emulator.py | Python | bsd-3-clause | 12,487 | [
"Galaxy"
] | be2b9baf291ecbe3af8d6416ab0d089670b0828a4c7d274503f49fbc8a6b75ad |
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from tqdm import tqdm
from IPython import embed
import sys
# Choose standard VAE or VaDE
#from VAE_Models.VaDE import VaDE as model
from VAE_Models.VAE import VAE as model
from VAE_Models.architectures import CNN, DNN, UPCNN
from tensorflow.exa... | mathnathan/VAE_Models | conv_test_drive.py | Python | mit | 2,655 | [
"Gaussian"
] | 898ee96740a65641a35cd9cf638e330a225c02eb49d614e0d15dbbb397e29b15 |
from cardboard import types
from cardboard.ability import (
AbilityNotImplemented, spell, activated, triggered, static
)
from cardboard.cards import card, common, keywords, match
@card("Gamekeeper")
def gamekeeper(card, abilities):
def gamekeeper():
return AbilityNotImplemented
return gamekeeper... | Julian/cardboard | cardboard/cards/sets/urzas_destiny.py | Python | mit | 26,540 | [
"BLAST"
] | 2f6e9630aaa8b9e8268dfd708ea3775eafe4cb9d5448eb551c6e6c6e22752b5b |
"""
sis.py
Sequential important sampling class object (basic particle filter)
The prior is used as the importance density
"""
import numpy as np
import math
class sis():
def __init__(self,nx=1,Ns=10,propagateFunction=None,processNoiseSampleFunction=None,measurementPdfFunction=None):
## initialization flag... | fatadama/estimation | filters/python/sis_particle/sis.py | Python | gpl-2.0 | 3,460 | [
"Gaussian"
] | 58abe263fc99f1f0aabe62b538e84e10d2d72a9d8119a68e34ec6bfec569929e |
from __future__ import absolute_import
import unittest
import gulp.structures
class RingBufferTestCase(unittest.TestCase):
klass = gulp.structures.RingBuffer
def setUp(self):
self.buf = self.klass(size=3)
def test_empty_get_returns_none(self):
assert self.buf.get() is None
def test... | dw/scratch | boris/test/structures_test.py | Python | mit | 908 | [
"GULP"
] | dcde14d8e8c66d656bae36b70ceee6942dc587aa647717bcfda49dfedbd3af6c |
from fov import fov
import sys
TEST_CASES = ("""
.....
... .......
... ..... .......
0 .1. ..2.. ...3...
... ..... .......
... .......
.....
""", """
....
. ......
.. ......
....#.....
.......#..
#.5.....
.....#....
....... .
......
......
.....
""", ""... | elemel/python-fov | src/fov_test.py | Python | mit | 2,634 | [
"VisIt"
] | f0bd8798e39dbcc1220c00c732d62905c90836fd4102d427f194cc320c5636d0 |
#!/usr/bin/env python
# =============================================================================================
# MODULE DOCSTRING
# =============================================================================================
"""
Tools to build Yank experiments from a YAML configuration file.
"""
# =========... | andrrizzi/yank | Yank/yamlbuild.py | Python | mit | 107,854 | [
"Amber",
"Gromacs",
"NetCDF",
"OpenMM"
] | 880e3ac49a622df428bd430112a62d0101f6c3245a3ee8783c650049bb58ddb4 |
### Written for CAMP 2016 tutorial
### Adapted from Vogels 2011
### Author: Harsha Gurnani
### Date: June 18, 2016
#####################################
from brian2 import *
from time import time
from numpy import *
from scipy import *
from inputsignals import *
from spikegen import *
from inputsignals import *
#set... | h-mayorquin/camp_india_2016 | tutorials/LTP-I/Demo2/FullDemo2_Vogels_InhSTDP.py | Python | mit | 5,142 | [
"NEURON"
] | 5576f412062d77a3a9baa752e8c709ce711f3b228aba3eea4cc1a62f91d84eda |
#!/usr/bin/env python
#
# $File: controlledOffGenerator.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 ... | BoPeng/simuPOP | docs/controlledOffGenerator.py | Python | gpl-2.0 | 1,715 | [
"VisIt"
] | 88ed2902972f40f76d6f39f61293685a4e986d5528c11cdff387d209a87c6692 |
# -*- coding: utf-8 -*-
#
# recording_demo.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License,... | lekshmideepu/nest-simulator | pynest/examples/recording_demo.py | Python | gpl-2.0 | 2,235 | [
"NEURON"
] | 955d6085e7c1c804a2b67438162fc074f1507fa712bda97dbdf4cc1ef06dbc9b |
from __future__ import print_function, division, unicode_literals
import os
from pymatgen.core.structure import Structure
from pymatgen.core.operations import SymmOp
from pymatgen.core.composition import Composition
from pymatgen.core.periodic_table import Element
from pymatgen.symmetry.analyzer import SpacegroupAnal... | ashtonmv/twod_materials | twod_materials/utils.py | Python | gpl-3.0 | 23,697 | [
"VASP",
"pymatgen"
] | 5de5c0b03744bb0368e53254fa247bf0fe8f353c5172441a876cfec064b24cd4 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from pymatgen.util.testing import PymatgenTest
from pymatgen.core.lattice import Lattice
from pymatgen.core.structure import Structure
from pymatgen.io.xcrysden import XSF
class XSFTest(PymatgenTest):
de... | dongsenfo/pymatgen | pymatgen/io/tests/test_xcrysden.py | Python | mit | 843 | [
"pymatgen"
] | 5db3cbfc258a31b7bf3e5d00dd1d3d3ddebdf5751096c54a19d794123b60ea36 |
import numpy as np
def addNoise(img, snr=25, rShot=0.5):
'''
adds Gaussian (thermal) and shot noise to [img]
[img] is assumed to be noise free
[rShot] - shot noise ratio relative to all noise
'''
s0, s1 = img.shape[:2]
m = img.mean()
if np.isnan(m):
m = np.na... | radjkarl/imgProcessor | imgProcessor/filters/addNoise.py | Python | gpl-3.0 | 1,101 | [
"Gaussian"
] | 699dc5cfe9d5082308c172692be11a77b7b5cd26bcd13b384b02cef1c76b0d4c |
#
# unit tests for the ChemShell interface
#
import os,sys
if __name__ == "__main__":
# Need to add the gui directory to the python path so
# that all the modules can be imported
gui_path = os.path.split(os.path.dirname( os.path.realpath( __file__ ) ))[0]
sys.path.append(gui_path)
else:
from viewer... | alexei-matveev/ccp1gui | interfaces/testchemshell.py | Python | gpl-2.0 | 6,748 | [
"GAMESS",
"Molpro"
] | 33b04064d328aa89b80a02b28488e781cc2bdc5737cea9e0c0ed70d7e87bc868 |
import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
import random
def cv_carsGLM():
# read in the dataset and construct training set (and validation set)
cars = h2o.import_file(path=pyunit_utils.locate("smalldata/junit/cars_20mpg.csv"))
# choose the type model-building... | pchmieli/h2o-3 | h2o-py/tests/testdir_algos/glm/pyunit_DEPRECATED_cv_carsGLM.py | Python | apache-2.0 | 6,359 | [
"Gaussian"
] | adec59df3a5362eb69e3f58c1b74cfa36a08d5592c384ca16604ce9c1476e685 |
import os
import util
import numpy as np
def merge_nc_files(list_nc_files, path_out_nc, common_var_name='', mask_val=np.NaN, default_val=np.NaN,
replace_var_by_file_name=False, normalize_arr=None):
"""
Args:
list_nc_files:
path_out_nc:
common_var_name:
repla... | ritviksahajpal/pygeoutil | pygeoutil/discarded.py | Python | mit | 2,788 | [
"NetCDF"
] | 372ce3748c4823b2a180838f8ffa73e05e2272a4a1177c6615af4b5cbeb1883e |
# -*- coding: utf-8 -*-
"""
wakatime.languages.templates
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Parse dependencies from Templates.
:copyright: (c) 2014 Alan Hamlett.
:license: BSD, see LICENSE for more details.
"""
from . import TokenParser
from ..compat import u
""" If these keywords are found in the so... | Djabbz/wakatime | wakatime/dependencies/templates.py | Python | bsd-3-clause | 5,487 | [
"ESPResSo",
"GULP"
] | da19a95d56d6f92baa3599029f91e5c981fdcf8e55026824f5705e8a5b847870 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module defines standard transformations which transforms a structure into
another structure. Standard transformations operate in a structure-wide manner,
rather than site-specific manner.
All transformations should in... | materialsproject/pymatgen | pymatgen/transformations/standard_transformations.py | Python | mit | 35,507 | [
"CRYSTAL",
"pymatgen"
] | bed7ca483703882cbe3b9f11fddf3ef58a4a2b28c2c249f4ce0ce334e073dc82 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# convert Princeton Meteorological Forcing Dataset from NetCDF format
# to WPS intermediate file format.
# author: Hui ZHENG
# email: woolf1988@qq.com
import os
import os.path
import struct
import argparse
import dateutil.parser
import numpy as np
import netCDF4 as nc
... | woolf1988/noahmp-tools | ungrib_princeton.py | Python | gpl-3.0 | 6,775 | [
"NetCDF"
] | 19877653c7b9770a31dbcca82d841b282ffdb3b395345e849a9d85ed2a6e3531 |
#!/usr/bin/env python
""" File Catalog Client Command Line Interface. """
__RCSID__ = "$Id$"
import cmd
import commands
import os.path
import time
import sys
from types import DictType, ListType
from DIRAC.Core.Security.ProxyInfo import getProxyInfo
from DIRAC.Core.Utilities.List import uniqueElements
from DIRAC.In... | miloszz/DIRAC | DataManagementSystem/Client/FileCatalogClientCLI.py | Python | gpl-3.0 | 67,714 | [
"DIRAC"
] | 3b864bd840478ecec020789c7ad250eca86a322076ad3d4d995bb232f09a6ec3 |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | googleapis/python-compute | tests/unit/gapic/compute_v1/test_disks.py | Python | apache-2.0 | 191,961 | [
"Octopus"
] | c8b876a751d13edf727744a7d1068dbe7fdd9d1f95e91330c74474a2bb0af9ac |
from queries import queries
#
# Requests on visits size
#
class visits_queries(queries):
def __init__(self, cursor, output, refdate = 'now'):
super(visits_queries, self).__init__(cursor, output, refdate)
def nb_visit_by_visit_size_monthly(self):
self._nb_visit_by_visit_size(30)
sel... | niavok/elveos | stats/src/bloatitstats/queries/visits_queries.py | Python | agpl-3.0 | 2,258 | [
"VisIt"
] | 7398cdbfedb0d8f84d4b4a8976a39f2ee9c28810c85df3830ee00a9067bb5433 |
#!/usr/local/bin/env python
#=============================================================================================
# MODULE DOCSTRING
#=============================================================================================
"""
YANK command-line interface (cli)
"""
#====================================... | jchodera/yank | Yank/cli.py | Python | lgpl-3.0 | 7,361 | [
"Amber",
"Gromacs",
"MDTraj",
"NetCDF",
"OpenMM"
] | 94d71636785964dfd8d91f69a5becccbf76ba2139b456beda3fe2f14a88bfec5 |
import numpy as np
def line_luminosity(halos, log_m1=12.32, log_pnorm=5.78, p1=1.31, p2=-0.08, log_gnorm=5.52, gsigma=0.36, scatter=0.37):
"""Lco(M) parameterized as double power law + Gaussian (sharing the same central mass).
Parameters
----------
halos
log_m1
log_pnorm
p1
p2
log_... | tonyyli/imapper2 | models/double_power_gaussian.py | Python | mit | 677 | [
"Gaussian"
] | 3ad84edbf799df8e78d57a4117055a44056fd860848c2eca160e771bc1f44b63 |
""" Encapsulate here the logic for matching jobs
Utilities and classes here are used by MatcherHandler
"""
import time
from DIRAC import gLogger
from DIRAC.FrameworkSystem.Client.MonitoringClient import gMonitor
from DIRAC.Core.Utilities.PrettyPrint import printDict
from DIRAC.Core.Security import Properties
fr... | arrabito/DIRAC | WorkloadManagementSystem/Client/Matcher.py | Python | gpl-3.0 | 14,664 | [
"DIRAC"
] | 0d059ad6655288e30ff8777c93f806c21d0277caf0b695291481d9a9166ee7c5 |
from moderate.models import (
ModerateState,
)
from moderate.tests.model_maker import (
make_moderate_state,
)
from story.models import (
Area,
Story,
)
from story.tests.model_maker import (
make_area,
make_story,
)
from login.tests.scenario import (
get_user_staff,
get_user_web,
)
def... | pkimber/old_story | story/tests/scenario.py | Python | apache-2.0 | 2,763 | [
"VisIt"
] | 065386605883e70df6a2db5a2abe675a08e18f2d704575159d6a93a5427d3d68 |
# -*- coding: utf-8 -*-
# ROTD suggest a recipe to cook for dinner, changing the recipe every day.
# Copyright © 2015 Xeryus Stokkel
# ROTD 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 versio... | XeryusTC/rotd | functional_tests/test_admin.py | Python | agpl-3.0 | 9,966 | [
"VisIt"
] | bc2717ffbfb244b0452bfaa047676c8e21a91001c9a420e68e025f4a7722fd07 |
import fileinput
class odor():
def __init__(self, index, name, glom_weights):
self.index = index
self.name = name
self.glom_weights = glom_weights
odors = {} # by name
for line in fileinput.input('input-odors.txt'):
data = line.split('\t')
odors.update({data[0]: odor(fileinput.lineno(), data[0], [f... | JustasB/MitralSuite | Models/Migliore2014/odors.py | Python | mit | 540 | [
"Mayavi"
] | 438a1978efa017e865e24233b072f4cf1472a5da154e1ab473d02e97a07e0623 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('visit', '0086_auto_20150829_2157'),
]
operations = [
migrations.RemoveField(
model_name='issueprek',
... | koebbe/homeworks | visit/migrations/0087_auto_20150829_2219.py | Python | mit | 468 | [
"VisIt"
] | 9e06bada2ac2896ab7a26d6911fb805808e98baa67f72d91f67a2aaef38365c7 |
class GeographicInfo():
state_abbreviations = ["AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DC", "DE", "FL", "GA",
"HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD",
"MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ",
... | AHOCHI/AHOCHI-crawler | Ahochi/geographic_info.py | Python | gpl-3.0 | 16,786 | [
"COLUMBUS"
] | 98ceea53fdbfa1aabb4068604301e74546254d40a606d115d334b9cb154d6c0d |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Script to visualize the model coordination environments
"""
__author__ = "David Waroquiers"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "2.0"
__maintainer__ = "David Waroquiers"
__email__ = "davi... | materialsproject/pymatgen | dev_scripts/chemenv/strategies/multi_weights_strategy_parameters.py | Python | mit | 14,289 | [
"pymatgen"
] | 46c9179533a0be625c9cfc199e4b11bb61bf051cdb154b4242cc3bf7aca61b10 |
# coding=utf-8
__author__ = 'Abhineet Saxena'
"""
The Code for the ACM XRDS Hello World! column collects summary statistics for thethe CNN architecture constructed
from the architecture detailed at Google TensorFlow MNIST Expert tutorial:
https://www.tensorflow.org/versions/r0.7/tutorials/mnist/pros/index.html
Note:... | acmxrds/summer-2016 | helloworld/MNIST2Conv_Stat_Collect.py | Python | gpl-3.0 | 11,236 | [
"NEURON"
] | bcf6318b65e8d03395ca07cda568e1e33e37b3c7a76919f032d168c85400f110 |
#
# atactk: ATAC-seq toolkit
#
# Copyright 2015 Stephen Parker
#
# Licensed under Version 3 of the GPL or any later version
#
"""
Code for reading and manipulating data commonly used in ATAC-seq pipelines.
"""
import csv
import gzip
import pysam
import sys
FEATURE_FIELDNAMES = [
'reference',
'start',
'... | ParkerLab/atactk | atactk/data.py | Python | gpl-3.0 | 9,007 | [
"pysam"
] | 840368546182907494774e5bd9a6c2d9a851b1b1443c69425aa2b419cb8f638d |
'''This script demonstrates how to build a variational autoencoder with Keras.
Reference: "Auto-Encoding Variational Bayes" https://arxiv.org/abs/1312.6114
'''
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm
from keras.layers import Input, Dense, Lambda
from keras.models import Model
f... | DingKe/nn_playground | vae/variational_autoencoder.py | Python | mit | 4,986 | [
"Gaussian"
] | d4425550a2e270b00c3c4a3bb6e5fa26b4017f0b368bb9af729f45e79c4f0703 |
#!/usr/bin/env python
########################################################################
# File : dirac-jobexec
# Author : Stuart Paterson
########################################################################
""" The dirac-jobexec script is equipped to execute workflows that
are specified via their XML... | yujikato/DIRAC | src/DIRAC/WorkloadManagementSystem/scripts/dirac_jobexec.py | Python | gpl-3.0 | 3,725 | [
"DIRAC"
] | de64a75edb9fcabd28d94cc04e2f56ec5c8472e3ab8bd03424363b94231f6ca3 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
"""
Created on Mar 18, 2012
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "S... | sonium0/pymatgen | pymatgen/apps/borg/tests/test_queen.py | Python | mit | 1,226 | [
"pymatgen"
] | e4d25e544b417eb17d155d0dcde74cde45769af871f2dda972cdf5c4440958ab |
'''
Plotting functions for jumeg.
'''
import os
import numpy as np
import mne
from .jumeg_utils import (get_files_from_list, thresholded_arr,
triu_indices, check_read_raw)
from .base.jumeg_base import jumeg_base
from .jumeg_math import (calc_performance,
calc_fre... | fboers/jumeg | jumeg/jumeg_plot.py | Python | bsd-3-clause | 32,159 | [
"Gaussian"
] | 55e6ca9e0311d821c2f54fd016815f0deb44001dadb7d7632549534260a8ce64 |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | Azure/azure-sdk-for-python | sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_support_tickets_operations.py | Python | mit | 24,503 | [
"VisIt"
] | 949e01e6dbeffbc88b2ecbd2eeeb1aad1a07d91089467d77d77de46fd40d67d1 |
"""Analyze python import statements."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import ast
import os
from . import types as t
from .io import (
read_binary_file,
)
from .util import (
display,
ApplicationError,
is_subdir,
)
from .data import (
dat... | shsingh/ansible | test/lib/ansible_test/_internal/import_analysis.py | Python | gpl-3.0 | 9,281 | [
"VisIt"
] | 6fabbb882cea0e403456c99d6a17d588c8e1f8ac9b586a9775246b10b2cbc180 |
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Provides an interface to communicate with the device via the adb command.
Assumes adb binary is currently on system path.
"""
# pylint: disable-all
... | patrickm/chromium.src | build/android/pylib/android_commands.py | Python | bsd-3-clause | 67,878 | [
"Galaxy"
] | 4d535e9957c2d1a0d4cf597d670d2b0edd521bcb7718622d61af9deae460e956 |
from rosetta import *
init()
pose = pose_from_pdb("putsomefilehere")
pyobs = PyMOL_Observer()
pyobs.add_observer(pose)
pyobs.pymol.keep_history(True)
# pyobs.generalEvent() // ???
# specify scoring functions
fa_score = get_fa_scorefxn()
dna_score = create_score_function('dna')
dna_score.set_weight(fa_elec, 1)
... | sherbert-lemon/uwaterloo-igem-2015 | models/tridimensional/incomplete_scripts/pymol_observer.py | Python | mit | 648 | [
"PyMOL"
] | 070237670efd4df4215d468fbdd3350e6ea7dd4dce0caa716037784e02d789d9 |
# Orca
#
# Copyright 2005-2009 Sun Microsystems Inc.
#
# 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... | Alberto-Beralix/Beralix | i386-squashfs-root/usr/share/pyshared/orca/scripts/apps/evolution/speech_generator.py | Python | gpl-3.0 | 7,485 | [
"ORCA"
] | 70550eee575ed9f68aa4529dfcc0e6aa0f008e441ede1f1a92e35422d41678a8 |
""" NotificationDB class is a front-end to the Notifications database
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = "$Id$"
import time
from DIRAC import gConfig, gLogger, S_OK, S_ERROR
from DIRAC.Core.Utilities.Mail import Mail
from DIRAC... | ic-hep/DIRAC | src/DIRAC/FrameworkSystem/DB/NotificationDB.py | Python | gpl-3.0 | 35,794 | [
"DIRAC"
] | 06f5a3b426c2173b6feaa4dd723fa206ef667912c874b4b71377b8067b96f549 |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | pli3/Openwebif | plugin/controllers/views/web/recordnow.py | Python | gpl-2.0 | 5,220 | [
"VisIt"
] | 5f2079d2257082154b76f4a70c96698c624baacfa000dafe245ef1ca5e41e98d |
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | amir343/ansible | lib/ansible/constants.py | Python | gpl-3.0 | 15,275 | [
"Galaxy"
] | ff7c8d80f50d03a48abb27244f44c41a532f397cf1e59fd3fb82c80e39486d34 |
"""
Copyright (c) 2017 Sam Witte
Created on Jan 19, 2017
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 late... | SamWitte/Codds_DarkMatter | src/Data/PandaX.py | Python | gpl-2.0 | 3,466 | [
"Gaussian"
] | 0c6d2787a7ef490533d78bd3c4a483b311aa32fb41626bea151a135a112471a0 |
# Copyright 2015 Google Inc. 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 applicable law or a... | xtiankisutsa/MARA_Framework | tools/enjarify/enjarify/jvm/optimization/stack.py | Python | lgpl-3.0 | 8,891 | [
"VisIt"
] | 39847ee273cd8cd6722b15114f4026c89d642e9879a5c21b17788625ecbf9592 |
#!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''
A simple example to run CCSD(T) and UCCSD(T) calculation.
'''
import pyscf
mol = pyscf.M(
atom = 'H 0 0 0; F 0 0 1.1',
basis = 'ccpvdz')
mf = mol.RHF().run()
mycc = mf.CCSD().run()
et = mycc.ccsd_t()
print('CCSD(T) correlation energy'... | gkc1000/pyscf | examples/cc/00-simple_ccsd_t.py | Python | apache-2.0 | 460 | [
"PySCF"
] | b55d434806191b6c480767047e2b1cad8590c2fb85892f0b6d98919667442c1a |
"""
Implementation of general use functions.
"""
import numpy as np
import numpy.ma as ma
import pandas as pd
from pandas import DataFrame
import cPickle
import gzip
import GPy
import classes
import time
import os
from os import path
import argparse
import matplotlib.pyplot as plt
from cStringIO import StringIO
import ... | mdepasca/miniature-adventure | utilities.py | Python | unlicense | 33,644 | [
"Galaxy",
"Gaussian"
] | f96a289f80d25a6b6db42b369529552cf202afe539d35f166267caa1b00ac82b |
# coding: utf-8
# # **Bayesian and Gaussian Process regression**
#
# Notebook version: 1.0 (Oct 16, 2015)
#
# Authors: Miguel Lázaro Gredilla
# Jerónimo Arenas García (jarenas@tsc.uc3m.es)
#
# Changes: v.1.0 - First version. Python version
#
# Pending changes:
# In[1]:
# Import... | ML4DS/ML4all | R_lab1_Bay_GP_Regresion_v_py2/Pract_regression.py | Python | mit | 14,524 | [
"Gaussian"
] | cf0260c8f1dfb296f469c09a18cb84df24e8b66a45119e115513581775e13eed |
import HTSeq
import itertools
import numpy
def GenomicInterval_xrange( gi, step ):
for pos in xrange( gi.start, gi.end, step ):
yield HTSeq.GenomicPosition( gi.chrom, pos, gi.strand )
def GenomicInterval_xranged( gi, step ):
if gi.strand == "-":
step *= -1
for pos in xrange( gi.start_d, gi.... | simon-anders/htseq | python2/HTSeq/_HTSeq_internal.py | Python | gpl-3.0 | 1,407 | [
"HTSeq"
] | 5d3c8f5d4adb8a3d2c2bb582b36cee476c44e763cd8de683065e131a50c84910 |
#!/usr/bin/env python3
# Utility for detecting and fixing whitespace issues in LAMMPS
#
# Written by Richard Berger (Temple University)
from __future__ import print_function
import sys
if sys.version_info.major < 3:
sys.exit('This script must be run with Python 3.5 or later')
if sys.version_info.minor < 5:
sy... | jeremiahyan/lammps | tools/coding_standard/whitespace.py | Python | gpl-2.0 | 5,919 | [
"LAMMPS"
] | 078a3c818a4de8c39c76da55448a7913c2ef10547304e502286babd2b0bbaa6a |
# -*- coding:utf-8 -*-
#
# Author : TangHanYi
# E-mail : thydeyx@163.com
# Create Date : 2017-01-09 10:14:54 AM
# Last modified : 2017-01-09 10:50:42 AM
# File Name : Word_Ladder.py
# Desc :
import collections
import Queue
class Solution(object):
def ladderLength(self, beginWord, endWo... | thydeyx/LeetCode-Python | Word_Ladder.py | Python | mit | 2,083 | [
"VisIt"
] | e05bc9cd2a2f0e3516215e27c4abcdcce69b409128245c273bf38d1948517609 |
from datetime import datetime, timedelta
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from Firefly import logging
DAYS_OF_WEEK = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun']
class Scheduler(object):
def __init__(self):
self._scheduler = AsyncIOScheduler()
self._scheduler.start()
de... | Firefly-Automation/Firefly | Firefly/helpers/scheduler.py | Python | apache-2.0 | 5,842 | [
"Firefly"
] | 8bfa0a1019545fe627463b36b8d54d926ca5142ae43c59bc3fe411410653c08a |
#!/usr/bin/env python3
#pylint: disable=missing-docstring
#* 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
... | nuclear-wizard/moose | python/chigger/tests/offscreen/offscreen.py | Python | lgpl-2.1 | 697 | [
"MOOSE"
] | 1e6b56786004bb2b76e76336a1a1a48f35172453afe78750099d950f3519c034 |
from ..util.misc import StatusCheck
import netCDF4 as nc
import numpy as np
import os
import pandas as pd
import xarray as xr
class ObsIO(object):
"""Interface to access stations and observations from a data source.
ObsIOs are obtained from obsio.ObsioFactory.
Attributes
----------
stns : pandas... | jaredwo/obsio | obsio/providers/generic.py | Python | gpl-3.0 | 15,785 | [
"NetCDF"
] | 96840e96a678ddc2c6597343dc93bc0d5c4eeb77eb786263a244a0828ffd0040 |
import cairo, math, sys
import cairoplot
from series import Series
# non-random data for needs of visual comparison of changes
if '--non-random' in sys.argv:
random = lambda : 1.0
print 'Plotting nonrandom data'
else:
import random
random = random.random
# Line plotting
test_scatter_plot = 1
test_dot... | mrooney/wxbanker | wxbanker/cairoplot/seriestests.py | Python | gpl-3.0 | 15,337 | [
"Gaussian"
] | a3fec66e542b9cbd9aa82f1d93387cd90f104f7f233f5654583f863fc3f9968b |
#!/usr/bin/env python3
# Copyright 2016 - 2021 Bas van Meerten and Wouter Franssen
# This file is part of ssNake.
#
# ssNake 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... | smeerten/ssnake | src/functions.py | Python | gpl-3.0 | 13,264 | [
"Gaussian"
] | 414fb48c02d4f1bb4b25e88ac9502b1972046b45580d27d9a5450135cd190c32 |
#!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''
CCSD and CCSD(T) density matrices
'''
import numpy
from pyscf import gto, scf, cc, ao2mo
mol = gto.M(
atom = 'H 0 0 0; F 0 0 1.1',
basis = 'ccpvdz')
mf = scf.RHF(mol).run()
mycc = cc.CCSD(mf).run()
#
# CCSD density matrix in MO basis
... | sunqm/pyscf | examples/cc/01-density_matrix.py | Python | apache-2.0 | 1,517 | [
"PySCF"
] | ca676f41f97b39b2dac31570dba6ff9ec100fbab4fd4ef50ad670e49f3f6ff96 |
#!/usr/bin/env python3
########################################################################
# Solves problem 234 from projectEuler.net.
# Finds the sum of the semidivisible numbers below 999966663333
# Copyright (C) 2011 Santiago Alessandri
#
# This program is free software: you can redistribute it and/or... | sanSS/programming-contests | project-euler/problem234.py | Python | gpl-3.0 | 1,866 | [
"VisIt"
] | 2df56e8bbeae54d16459b7c06f9a2590f72bac25686ddf6b9fcd96935dcf4cbd |
#!/usr/bin/env python
# This example demonstrates the use of vtkSTLReader to load data into
# VTK from a file. This example also uses vtkLODActor which changes
# its graphical representation of the data to maintain interactive
# performance.
import vtk
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT ... | hlzz/dotfiles | graphics/VTK-7.0.0/Examples/IO/Python/stl.py | Python | bsd-3-clause | 1,155 | [
"VTK"
] | e24c87f2d730251c68ee1edce3cf455c757ef6ceed4f1e9d6097ff16d6c48098 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.