text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
from visitor import Visitor
class SliceOut(Visitor):
@classmethod
def visit_Ellipsis (self, ast, *a, **k):
return "..."
@classmethod
def visit_Slice (self, ast, *a, **k):
from expr import ExpresionOut
if ast.lower and ast.upper and ast.step:
return "%s:%s:%s" % (ExpresionOut.visit(ast.lower)... | Neppord/py2py | py2py_lib/out/slice.py | Python | mit | 1,235 | [
"VisIt"
] | c661c8c71cd00abbaef8ff5ac5e552fcf63c829c01ea180d4875166d1989ee35 |
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | xzturn/tensorflow | tensorflow/python/keras/layers/kernelized.py | Python | apache-2.0 | 11,047 | [
"Gaussian"
] | 3cd8255e7f6dfee8b7069dfc68199b74d1ed463ed2a5e221a397db2f016280b4 |
import numpy
from scipy.optimize import curve_fit
import echidna.core.smear as smear
from echidna.core.config import SpectraConfig
import echidna.core.spectra as spectra
import unittest
class TestSmear(unittest.TestCase):
def gaussian(self, x, *p):
""" A gaussian used for fitting.
Args:
... | ashleyrback/echidna | echidna/test/test_smear.py | Python | mit | 21,561 | [
"Gaussian"
] | 6fa9619d8054db927009d4b7764c6421f25a0ff6550db629aed34429cd14e85f |
class Node(object):
def __str__(self):
return self.printTree()
def accept(self, visitor):
return visitor.visit(self)
class Program(Node):
def __init__(self, blocks):
self.blocks = blocks
# self.children = ( blocks )
class Blocks(Node):
def __in... | tmachows/kompilatory | lab03-checker/AST.py | Python | gpl-2.0 | 5,328 | [
"VisIt"
] | fd427dc9184a43f11f3ce07a9705936830579ed9999fe477dcf3310da8705627 |
"""Unit tests of MQConnectionManager in the DIRAC.Resources.MessageQueue.MConnectionManager
Also, test of internal functions for mq connection storage.
"""
# ignore use of __functions, _functions
# pylint: disable=no-member, protected-access
import unittest
import mock
from DIRAC import S_OK
from DIRAC.Resources.Me... | DIRACGrid/DIRAC | src/DIRAC/Resources/MessageQueue/test/Test_MQConnectionManager.py | Python | gpl-3.0 | 32,676 | [
"DIRAC"
] | f066dec21b8f334b53bb3625ee23fa2239d10b9001a3a1e33beb992989992f8c |
#!/usr/bin/env python
""" Visualization functions for connectivity analysis. """
import sys
import os.path as op
from itertools import cycle
from functools import partial
import numpy as np
import scipy as sci
from mne.viz.utils import plt_show
from mne.viz.circle import (circular_layout, _plot_connectivity_circle... | fboers/jumeg | jumeg/connectivity/con_viz.py | Python | bsd-3-clause | 69,315 | [
"Mayavi"
] | 3eefb1f9a3625b3aeea9a17324f279a2e092d0234bb122768db29b57df458df4 |
# Emacs: treat this as -*- python -*-
import os
import gtk
import pango
import tempfile
from math import cos, sin, sqrt, atan, atan2
from os.path import basename
import numpy as np
from ase.data import chemical_symbols
from ase.data.colors import jmol_colors
from ase.gui.repeat import Repeat
from ase.gui.rotate impo... | askhl/ase | ase/gui/view.py | Python | gpl-2.0 | 35,308 | [
"ASE",
"Avogadro",
"Jmol",
"RasMol",
"VMD"
] | b50b5d26a8513760f435ad35349116299d99fe86a4c87ca8a4b4b36e0f6fd99b |
from ase.tasks.calcfactory import CalculatorFactory
from ase.calculators.abinit import Abinit
from ase.test.tasks.dcdft import DeltaCodesDFTCollection
from ase.test.tasks.dcdft import DeltaCodesDFTTask as Task
xc = 'PBE'
fit = (5, 0.02)
w = 0.06
ecut = 1500
kd = 8.0
tag = 'dcdft_%s_abinit_fhi' % xc.lower()
clas... | robwarm/gpaw-symm | gpaw/test/big/dcdft/pbe_abinit_fhi.py | Python | gpl-3.0 | 1,862 | [
"ABINIT",
"ASE"
] | f0b34f9db5f29f555f8ddec8c015df4ffb265eee67150d0a3495362818971c98 |
#!/usr/bin/env python3
# Copyright (C) 2012-2017(H)
# 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, eit... | espressopp/espressopp | examples/polymer_melt/polymer_melt.py | Python | gpl-3.0 | 4,387 | [
"ESPResSo",
"LAMMPS"
] | 014e8b169ece89e999f59f3598b836f93c0eb419107fad16620e3b2c45467df5 |
import numpy as np
try:
# Matplotlib is not a dependency
import matplotlib as mpl
mpl.use('Agg') # force the antigrain backend
from matplotlib.figure import Figure
from matplotlib.backends.backend_agg import FigureCanvasAgg
import os
import warnings
# silence matplotlib.use() warning
... | robwarm/gpaw-symm | gpaw/test/big/ehrenfest/oscfit.py | Python | gpl-3.0 | 4,582 | [
"ASE"
] | e7588f887bea1e04168e87723e2a8fd410505364a582672e8371c3b1553318fa |
# -*- coding: utf-8 -*-
"""test_docs.py:
Test if moose.doc is working.
"""
__author__ = "Dilawar Singh"
__copyright__ = "Copyright 2017-, Dilawar Singh"
__version__ = "1.0.0"
__maintainer__ = "Dilawar Singh"
__email__ = "dilawars@ncbs.res.in"
__status__ = "Develop... | upibhalla/moose-core | tests/python/test_docs.py | Python | gpl-3.0 | 550 | [
"MOOSE"
] | 33ba109345cdddeef8869851bb6d6d1b020f9ef70b25fdfddd2e2f42cd630896 |
import datetime
import os
from unittest import mock
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Permission
from django.core import mail
from django.core.files.base import ContentFile
from django.http import HttpRequest, HttpResponse
from django... | nimasmi/wagtail | wagtail/admin/tests/pages/test_edit_page.py | Python | bsd-3-clause | 74,283 | [
"VisIt"
] | 9c5086a1c911417771748034411ae84aa3d4f336253046b0cadaf7609d81fa98 |
import matplotlib.pyplot as plt
import numpy as np
from scipy.optimize import curve_fit as cf
data_dir = "../Data/"
filename = "2017-11-21-113723-pulse-NMR-data"
sample_type = "0.1 M $FeCl_3$"
# filename = "2017-11-21-110112-pulse-NMR-data"
# sample_type = "0.1 M $CuSO_4$"
data = np.loadtxt(data_dir+filename+".tx... | nathawkins/PHY451_FS_2017 | Pulsed_NMR/Analysis/20171121_morning_session_T2.py | Python | gpl-3.0 | 1,206 | [
"Gaussian"
] | ef1040c931c662416be9731df8312d6eeb44300ea3c73ea8f5e4807940f1cb0e |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This file compares the speed of various other implementations to that of
FFTKDE. It includes profiling a 1D example, a 2D example and several higher
dimensions.
"""
def main():
import functools
import time
import numpy as np
import os
import stats... | tommyod/KDEpy | docs/source/profiling.py | Python | gpl-3.0 | 9,117 | [
"Gaussian"
] | 11e48bee5e6065aad0bbc043e9012b63e295204a92c1ca2bacb0d42d07682a8f |
import sys
from . import parser as parser
from . import interpreter as interpret
if __name__ == "__main__":
_, program_file = sys.argv
program = open(program_file)
p = parser.Parser()
i = interpret.Interpreter()
ast = p.parse(program.read())
print(i.visit(ast))
| mightymoose/nash | nash/run.py | Python | bsd-3-clause | 287 | [
"VisIt"
] | 307c8a423c3e5468e73de12df3970d69215d15512610317f6f8637f9bd503467 |
# -*- coding: utf-8 -*-
"""
This file contains the Qudi Logic module base class.
Qudi is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Qudi... | childresslab/MicrocavityExp1 | logic/odmr_logic.py | Python | gpl-3.0 | 36,677 | [
"Gaussian"
] | 489473820391c0a279ea97e286b8385ea63ba7a52fc72be0eb774635b5e9024e |
#!/usr/bin/python2.4
import mcs
import sys
openbabel_import_warned = False
def convert_aromatic(graph, flexible=False):
"""detect aromatic bonds and set it to a unique type (type 4, or type 103).
When flexible is set, it will be set to type 103 to allow it to match
to both single- and double-bonds
"""
assert isin... | edc/mcs | python/examples/calc_mcs.py | Python | bsd-2-clause | 2,759 | [
"Pybel"
] | fe276b9348b1c2841def1121a91a9507c752b0c8d692e8aafb500c89b0d2d07b |
#!usr/bin/python
import matplotlib.pyplot as plt
import matplotlib.widgets as widgets
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import e_field_gen as e_field
import odeint_solve as ode
import sys as sys
ELEC_MASS = 9.10938356E-31
ELEC_CHARGE = -1.60217662E-19
FUND_FREQ = 3.7474057E14
SP_LI... | KavuriG/classical-calc-three-color | closest-all-paths/tester.py | Python | gpl-3.0 | 5,661 | [
"Gaussian"
] | be2a3e6adc0600904aa2547e71da353dceea13551f1917f9157071ac8208fc4f |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Provides class BaseVisualStim and mixins; subclass to get visual stimuli
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2020 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from __fu... | psychopy/versions | psychopy/visual/basevisual.py | Python | gpl-3.0 | 60,375 | [
"Gaussian"
] | 9a3ca7265a362baafb0a827b03047bdee2f4780a2a56994ddee2374165209088 |
#
# Implementation of Pseudo marginal MCMC for Poisson Regression
import numpy as np
from laplace_approx import laplace_approx
from scipy.misc import logsumexp
#from scipy.stats import poisson
from numpy.linalg import inv, cholesky, solve
def approx_log_marg_like(K_theta, like_func, y=None):
""" approx_log_marg_l... | andymiller/flecks | inference/pseudo_marginal.py | Python | mit | 5,022 | [
"Gaussian"
] | c75c7f99cccc571a0ffc0144555e961e0355c3e844842832b6a9b7e433ff5e67 |
# -*- coding: utf-8 -*-
#
# Author: Taylor Smith <taylor.smith@alkaline-ml.com>
#
# A user-friendly wrapper to the statsmodels ARIMA that mimics the familiar
# sklearn interface.
from sklearn.utils.metaestimators import if_delegate_has_method
from sklearn.utils.validation import check_array
from statsmodels import ap... | tgsmith61591/pyramid | pmdarima/arima/arima.py | Python | mit | 49,012 | [
"Gaussian"
] | bb15b33cad1b36514d35774301f3cf7fe7037bca13732f38de5dfe7d6a33a0f9 |
## Automatically adapted for scipy Oct 21, 2005 by
# Author: Travis Oliphant 2001
__all__ = ['quad', 'dblquad', 'tplquad', 'quad_explain', 'Inf','inf']
import _quadpack
import sys
import numpy
from numpy import inf, Inf
error = _quadpack.error
def quad_explain(output=sys.stdout):
output.write("""
Extra informat... | huard/scipy-work | scipy/integrate/quadpack.py | Python | bsd-3-clause | 19,471 | [
"Gaussian"
] | 86274b14a8fc9ac31bd66dc7ea0b45a37db8052d5d6acb597869ea8b737be70d |
from func import *
# ATTTENTION! Maybe there are some mistakes in neuron parameters!
logger = logging.getLogger('neuromodulation')
startbuild = datetime.datetime.now()
nest.ResetKernel()
nest.SetKernelStatus({'overwrite_files': True,
'local_num_threads': 8,
'resolution': 0... | research-team/NEUCOGAR | NEST/cube/integration/integration-10/run.py | Python | gpl-2.0 | 31,767 | [
"NEURON"
] | b3d1d557897d91d866a5fcd81ac1bdf620e30d47e19adcf0bdd97f3f52a65cc9 |
# Copyright 2012 Jose Blanca, Peio Ziarsolo, COMAV-Univ. Politecnica Valencia
# This file is part of seq_crumbs.
# seq_crumbs 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, ... | JoseBlanca/seq_crumbs | crumbs/seq/annotation.py | Python | gpl-3.0 | 10,075 | [
"BLAST"
] | b06b25482327dd4c389224a468a3bfb8b9c5a54dc1bbf1df32cb6dfd193b1804 |
import csv
import cv2
import tensorflow as tf
import numpy as np
from sklearn.utils import shuffle
from sklearn.model_selection import train_test_split
import matplotlib.pyplot as plt
import random
from keras.models import Sequential
from keras.layers import Flatten, Dense, Dropout, Lambda, Cropping2D
from keras.layer... | mlandry1/CarND | CarND-Behavioral-Cloning-P3/model.py | Python | mit | 17,831 | [
"Gaussian"
] | fcd448d000166dac3518ff29ab131a3a7485fa498eae81d690d1f326cdf054ce |
# -*- coding: utf-8 -*-
import pytest
from ..periodic import (
atomic_number,
mass_from_composition,
relative_atomic_masses,
groups,
symbols,
)
from ..testing import requires
from ..parsing import formula_to_composition, parsing_library
def test_atomic_number():
assert atomic_number("U") == ... | bjodah/aqchem | chempy/util/tests/test_periodic.py | Python | bsd-2-clause | 2,215 | [
"ChemPy"
] | c24d51b2878be551bcfa48728a67293e9732d59c4e5d2c5ce68b64ce5a9f0ffc |
from Gaussian import Gaussian
| aerialhedgehog/VyPy | trunk/VyPy/regression/gpr/library/__init__.py | Python | bsd-3-clause | 32 | [
"Gaussian"
] | d279ce92683be4b1613049efc9f0ec0159f2b2129c8169161a810f1c11ec9ddc |
# Copyright 2018 The TensorFlow Authors All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | tombstone/models | research/deep_contextual_bandits/bandits/algorithms/variational_neural_bandit_model.py | Python | apache-2.0 | 12,618 | [
"Gaussian"
] | ba850b354c04cdfe4858679bccd1c2f1744dee155ba7b851f869d0b304b4c816 |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# CREATED:2015-02-01 15:35:38 by Brian McFee <brian.mcfee@nyu.edu>
'''Parse SMC2 beat tracking data into JAMS format.'''
from __future__ import print_function
import sys
import argparse
import os
import librosa
import re
import pandas as pd
import jams
from jams.util ... | marl/jams-data | parsers/smc_parser.py | Python | isc | 5,556 | [
"Brian"
] | 7c33a52aaeb11e81224539bae516a56f6465983748b783ddc0ce3b95ff54645f |
"""
Great Wall Density
------------------
Figure 6.4
Density estimation for galaxies within the SDSS "Great Wall." The upper-left
panel shows points that are galaxies, projected by their spatial locations
onto the equatorial plane (declination ~ 0 degrees). The remaining panels
show estimates of the density of these p... | eramirem/astroML | book_figures/chapter6/fig_great_wall.py | Python | bsd-2-clause | 4,280 | [
"Gaussian"
] | 6fc57f6ed5016070918e4465f2ed70e54448e66eed67cce99153d47d843c2107 |
from .casino import Casino
def setup(bot):
bot.add_cog(Casino(bot))
| Redjumpman/Jumper-Cogs | casino/__init__.py | Python | gpl-3.0 | 79 | [
"CASINO"
] | 102aedb0d69fe751ceab496570b2e6af58afe7c879411001b588df73b9ea879a |
from gpaw.transport.analysor import Transport_Plotter
import numpy as np
from pylab import *
from ase import Hartree
import sys
plotter = Transport_Plotter()
plotter.plot_setup()
if len(sys.argv)<= 2:
if len(sys.argv[1]) <= 2:
vt = plotter.get_info('vt', int(sys.argv[1]), 0)
else:
tmp = sys.ar... | qsnake/gpaw | doc/documentation/transport/transport_analysis_scripts/vt.py | Python | gpl-3.0 | 640 | [
"ASE",
"GPAW"
] | ddcc483f66121e24de216ae7c9921e6f3d8b4793601912c30765792673a6906f |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os
import random
from trimesh import load_mesh
import subprocess
import OpenGL
from OpenGL import GL
import pickle
from os.path import basename
from OpenGL.arrays import vbo
from OpenGL.GL import shaders
import OpenGL.GLU
from OpenGL.GLU import gluLookAt
from ... | mwmuni/LIGGGHTS_GUI | liggghts_gui.py | Python | gpl-3.0 | 114,317 | [
"ParaView",
"VTK"
] | 0c06df7d836dbec9f500c64585c4f3ed08aa4f9c92cc6af96b406cecb39b1a3e |
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 10 09:18:14 2012
Author: Josef Perktold
"""
import numpy as np
from numpy.testing import assert_almost_equal, assert_equal
from statsmodels.stats.inter_rater import (fleiss_kappa, cohens_kappa,
to_table, aggregate_raters)
cla... | DonBeo/statsmodels | statsmodels/stats/tests/test_inter_rater.py | Python | bsd-3-clause | 11,513 | [
"ASE"
] | bbbe02ab0bb36e8885d1bd08fa027a3759b928d79f53d82868d6853361258421 |
#
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Softwar... | jjfumero/fastr | mx.fastr/suite.py | Python | gpl-2.0 | 12,284 | [
"VisIt"
] | ce4015b0d524ad71657b996e3f509fe15e1da58a14430c1e80f971722d0e63fe |
"""Tools to generate simulated TESS images."""
import numpy as np
import zachopy.utils
import astropy.io.fits
import scipy.ndimage.measurements
import os
import matplotlib.pylab as plt
import matplotlib.gridspec as gridspec
import Cosmics
import Stamper
import logging
from settings import log_file_handler
logger = log... | TESScience/SPyFFI | CCD.py | Python | mit | 48,799 | [
"Galaxy"
] | d4da7483da5aa765d78158dddd4ef8f22cd8813041ef8a449d1275172792e7b4 |
###############################################################################
##
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "Redistribution and use in source and binary for... | Nikea/VisTrails | vistrails/packages/vtk/fix_classes.py | Python | bsd-3-clause | 3,241 | [
"VTK"
] | fe940b95f5fb42ba49cb7f347df555d652dc7ef24ac9272f48539fb1ade7564e |
"""
overseer.models
~~~~~~~~~~~~~~~
A service's status should be:
- red if any(updates affecting service) are red
- yellow if any(updates affecting service) are yellow
- green if all(updates affecting service) are green
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
imp... | Mercy-Nekesa/sokoapp | sokoapp/overseer/models.py | Python | mit | 11,376 | [
"VisIt"
] | bd53478ac32f120672f375adf3ac186aa58aee214515a4ec1b78f8bef49a4241 |
""" DIRAC FileCatalog Storage Element Manager mix-in class for SE definitions within the FC database"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = "$Id$"
import six
import time
import random
from DIRAC import S_OK, S_ERROR, gConfig, gLogge... | yujikato/DIRAC | src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/SEManager/SEManagerDB.py | Python | gpl-3.0 | 5,314 | [
"DIRAC"
] | 2d454c1b7f5df9e36960f4436dc375353695a706e080236f20601e4a1d348ec5 |
# -*- coding: utf-8 -*-
#
# TODO:
# - find a workaround to draw the great circles properly when the map is centered
# on something else than 0 ...
# - refine the connection rules between long-term spot and short term ones (e.g.
# when the trasnition between two fixed spot is a short term visit)
# - add some statist... | spyhop-initiative/core | spyhop_core.py | Python | gpl-3.0 | 15,545 | [
"VisIt"
] | 0ee36155e4ada1090089ecbd39aeec91e856dac779a986acdd8cf9d22dbfc090 |
#!/usr/bin/python
import vtk
def main():
colors = vtk.vtkNamedColors()
g = vtk.vtkMutableDirectedGraph()
latitude = vtk.vtkDoubleArray()
latitude.SetName("latitude")
longitude = vtk.vtkDoubleArray()
longitude.SetName("longitude")
for i in range(-90, 90, 10):
for j in range(-180, ... | lorensen/VTKExamples | src/Python/Geovis/GeoAssignCoordinates.py | Python | apache-2.0 | 1,400 | [
"VTK"
] | d8c1e32a879f8d8289725ecd5b9b769f67a6acc66468efa644575c3db7e68237 |
"""
The Job Path Agent determines the chain of Optimizing Agents that must
work on the job prior to the scheduling decision.
Initially this takes jobs in the received state and starts the jobs on the
optimizer chain. The next development will be to explicitly specify the
path through the optimizers.
"""
fr... | yujikato/DIRAC | src/DIRAC/WorkloadManagementSystem/Executor/JobPath.py | Python | gpl-3.0 | 4,315 | [
"DIRAC"
] | 95cdca47c3cbd9cb6ebd55f61dbaff697651435820233078597fdda88ff026b5 |
# -*- coding: utf-8 -*-
'''
This module defines :class:`Unit`, a container of :class:`SpikeTrain` objects
from a unit.
:class:`Unit` derives from :class:`Container`,
from :module:`neo.core.container`.
'''
# needed for python 3 compatibility
from __future__ import absolute_import, division, print_function
import nump... | CINPLA/expipe-dev | python-neo/neo/core/unit.py | Python | gpl-3.0 | 2,633 | [
"NEURON"
] | 22aaf884848c3a84e48cb843ad08bef72103a5c9fa153414c2a002b97b5abac1 |
from rdkit import RDConfig
import unittest
from rdkit import Chem
from rdkit.Chem import rdMMPA
def natoms(tpl):
return tuple(x.GetNumAtoms() if x is not None else 0 for x in tpl)
class TestCase(unittest.TestCase):
def setUp(self):
pass
def test1(self):
m = Chem.MolFromSmiles('c1ccccc1OC')
frags... | jandom/rdkit | Code/GraphMol/MMPA/Wrap/testMMPA.py | Python | bsd-3-clause | 3,863 | [
"RDKit"
] | 23bcd4b66e39011d4855a9a55bf6fac5d01801ec4579bf53ece060b3d4da1665 |
"Generates TCastTo source files for constexpr-enabled CEntity casts"
class Namespace:
def __init__(self, name):
self.name = name
class EndNamespace:
pass
CENTITY_TYPES = (
# Class, Header
('CActor', 'World/CActor.hpp'),
('CBallCamera', 'Camera/CBallCamera.hpp'),
('CBomb', 'Weapon/CBom... | RetroView/PathShagged | Runtime/MkCastTo.py | Python | mit | 7,162 | [
"VisIt"
] | 3d316090b97f2e5ab3c1cb4e178fb312051d5fb73482b9905afddcc4d78d6215 |
""" A computing element class that attempts to use glexec if available then
defaults to the standard InProcess Computing Element behaviour.
"""
import os
import stat
import distutils.spawn # pylint: disable=no-name-in-module,import-error
import DIRAC
from DIRAC import S_OK, S_ERROR
from DIRAC.Resources.Computi... | andresailer/DIRAC | Resources/Computing/glexecComputingElement.py | Python | gpl-3.0 | 13,568 | [
"DIRAC"
] | 025abcc4b6111c2eb95dc5933e7398e2cc4c54967f1c542c4a96c96c06f69b79 |
""" For reporting messages to security log service
"""
import syslog
from DIRAC import gLogger, gConfig
from DIRAC.Core.Base.Client import Client
from DIRAC.Core.Utilities import Time
from DIRAC.Core.Utilities.ThreadScheduler import gThreadScheduler
class SecurityLogClient(object):
__securityLogStore = []
... | DIRACGrid/DIRAC | src/DIRAC/FrameworkSystem/Client/SecurityLogClient.py | Python | gpl-3.0 | 2,445 | [
"DIRAC"
] | 31e517f1b391ec073bbd8b9485d29b32e692e34fcc69720a01b4473ed22854d8 |
from slm_lab.lib import logger, util, viz
from slm_lab.spec import random_baseline
import numpy as np
import pandas as pd
import pydash as ps
import shutil
import torch
import warnings
METRICS_COLS = [
'final_return_ma',
'strength', 'max_strength', 'final_strength',
'sample_efficiency', 'training_efficien... | kengz/Unity-Lab | slm_lab/experiment/analysis.py | Python | mit | 12,367 | [
"ORCA"
] | 01ce993b8072cc94c454fd3a4573efea2ed8f26625fc422465674bd9016d74ab |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2011 Tim G L Lyons
#
# This program is free software; you can redistribute it and/or modify
# it under the terms o... | Forage/Gramps | gramps/plugins/tool/mergecitations.py | Python | gpl-2.0 | 12,199 | [
"Brian"
] | 1e9a46d2a92a68ec67ba516a30fc276634b84ea43215dd4d58e8a40780859253 |
#!/usr/bin/python3
"""
This module contains an OpenSoundControl implementation (in Pure Python), based
(somewhat) on the good old 'SimpleOSC' implementation by Daniel Holth & Clinton
McChesney.
This implementation is intended to still be 'simple' to the user, but much more
complete (with OSCServer & OSCClient classes)... | EVERTims/game_engine_evertims | assets/scripts/evertims/OSC.py | Python | mit | 90,120 | [
"VisIt"
] | 7924701e713695b376bb8443e5190dda08e4114004f207d928e4a8e6b13d6c29 |
"""User-friendly public interface to polynomial functions. """
from __future__ import print_function, division
from sympy.core import (
S, Basic, Expr, I, Integer, Add, Mul, Dummy, Tuple
)
from sympy.core.mul import _keep_coeff
from sympy.core.symbol import Symbol
from sympy.core.basic import preorder_traversal
... | wdv4758h/ZipPy | edu.uci.python.benchmark/src/benchmarks/sympy/sympy/polys/polytools.py | Python | bsd-3-clause | 171,173 | [
"Gaussian"
] | 4fae2a5d6739823f1ffd0150285bc0044418548e51ddf6096638be88ec6e9081 |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# 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)
#
... | kain88-de/mdanalysis | testsuite/MDAnalysisTests/coordinates/test_xyz.py | Python | gpl-2.0 | 5,488 | [
"MDAnalysis"
] | 95731d97b96c1a28df9893255b9b57ad08264ea992e3ae205433093e8e941183 |
# Copyright (C) 2010-2018 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | mkuron/espresso | testsuite/python/save_checkpoint.py | Python | gpl-3.0 | 9,349 | [
"ESPResSo"
] | 2d87ba036287d85ed91c7395065d05c70173fe4da901524a07fd89031e8c226c |
#!/usr/bin/env python
# Interrogate a sequence by finding out what features are present within a specified range
from __future__ import print_function
import sys
import argparse
from Bio import SeqIO
__author__ = "Joe R. J. Healey"
__version__ = "1.0"
__title__ = ""
__license__ = "GPLv3"
__doc__ = "A parser for the ... | jrjhealey/bioinfo-tools | get_spans.py | Python | gpl-3.0 | 3,272 | [
"Biopython"
] | d421b1ec931836726a8d969dbbcc849b78b7f94fa18349a2f2c7aeb523cb7e76 |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
import operator
from ..node import NodeVisitor, DataNode, ConditionalNode, KeyValueNode, ListNode, ValueNode
from ..par... | hyowon/servo | tests/wpt/harness/wptrunner/wptmanifest/backends/conditional.py | Python | mpl-2.0 | 10,519 | [
"VisIt"
] | 3c48f61f5c8aab2f805b05669a6f52fdc97414519642aab3765093a18793e6dc |
# try using distribute or setuptools or distutils.
try:
import distribute_setup
distribute_setup.use_setuptools()
except ImportError:
pass
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import os
import sys
import re
# parse version from package/module with... | peterjc/pyani | setup.py | Python | mit | 2,271 | [
"Biopython"
] | 05cc15b0599160ea713290fb4ccf6e7aa38a11246c724d5f3d349ff19a9d9c7d |
# Beware! Only tested for non-spin-polarized case
import re
import sys
import rlcompleter
import readline
from numpy import *
from enterfi import enterfi
from outputfi import outputfi
gridfname = enterfi("Enter VASP field data (CHGCAR, LOCPOT, etc.)")
outfname = outputfi("Enter output file name ")
gridfi = open(gridf... | skasamatsu/vaspgrid | chgspinsplt.py | Python | mit | 2,858 | [
"VASP"
] | 4bd25c7923b626f893af5441f23f1c392140f7227c0620e638023e6d51f72674 |
from collections import namedtuple
from simlammps.bench.util import get_particles
from simlammps.testing.md_example_configurator import MDExampleConfigurator
from simphony.bench.util import bench
from simphony.core.cuba import CUBA
from simphony.engine import lammps
_Tests = namedtuple(
'_Tests', ['method', 'na... | simphony/simphony-lammps-md | bench/wrapper_bench.py | Python | bsd-2-clause | 4,006 | [
"LAMMPS"
] | 46986fbb49853b8833decc72895e4ffa39b98ee39ae20caa076523fcb989e895 |
# The MIT License
#
# Copyright (c) 2008
# Shibzoukhov Zaur Moukhadinovich
# szport@gmail.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without ... | intellimath/pyon | load.py | Python | mit | 12,120 | [
"VisIt"
] | c2225f5796e1ff917169f499f4e546ba96347fc2c41983a13ebdc61583a22252 |
# -*- coding: utf-8 -*-
#
# Stop Drop Roll documentation build configuration file, created by
# sphinx-quickstart on Wed Jul 30 10:38:07 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file... | bhunter/stopdroproll | docs/conf.py | Python | isc | 8,990 | [
"Brian"
] | 538cc408c6b3fceaff639aaa8559b9dc38a6085234badd711a4de184064312df |
#
# Copyright (C) 2013-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | KaiSzuttor/espresso | src/python/espressomd/checkpointing.py | Python | gpl-3.0 | 9,717 | [
"ESPResSo"
] | 53e91c14a0b613821129ea9ec2f2d2f8a634afbb95628bdff0872be7c2f0e9a0 |
# -*- coding: utf-8 -*-
"""
This python package provides a wrapper for functions provided by the 4MOST Facility Simulator, 4FS.
This file contains the standard input configuration parameters for the Exposure Time Calculator (ETC).
"""
ETC_input_params_HRS = """
# example parameter file for 4FS_ETC
SIM.CODE_NAME ... | dcf21/4most-4gp | src/pythonModules/fourgp_fourfs/fourgp_fourfs/config_files.py | Python | mit | 45,111 | [
"Galaxy"
] | e2bbbc5f77f0a212af97534280601268c874565846004eef947dbe162be564dc |
from __future__ import absolute_import, unicode_literals
import json
import urllib
from django import forms
from django.contrib.auth import authenticate, login
from django.core.cache import cache
from django.db.models import Prefetch
from django.http import HttpResponse, HttpResponseBadRequest, JsonResponse
from djan... | ewheeler/rapidpro | temba/api/v1/views.py | Python | agpl-3.0 | 125,907 | [
"VisIt"
] | 19d0a0126ac7f1ce5159c61916790cbd9d472740583a973c927d19d63806534e |
__doc__ = """
Dynagalaxies
__________________
Generate a small virtual universe and create a galactical empire on it!
All in a 3D universe for fun hours of playtime!
(c) 2016 Gustavo Ramos "Gustavo6046" Rehermann, MIT License source-code | CC-BY 3.0 otherwise
"""
import random
import plugincon
import math
import tim... | Gustavo6046/GusBot-2 | plugins/dynagalaxies.py | Python | mit | 16,370 | [
"Galaxy"
] | 8e61d1875138b5b633c6e2d16ead5678f7a2bf6970358e10ff1a98d376c02e65 |
from rwslib import RWSConnection
from rwslib.rws_requests import *
from rwslib.rws_requests.odm_adapter import *
from rwslib.rws_requests.biostats_gateway import *
if __name__ == '__main__':
from _settings import accounts
# Accounts is a dict of dicts like
# accounts = {'innovate' : {'username': 'usernam... | mdsol/rwslib | rwslib/example.py | Python | mit | 9,658 | [
"VisIt"
] | 1556fe6811009d607a7b7abe842c8e9b375786c78dd6d3f75e0c26eeeeb5e87e |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | szha/mxnet | python/mxnet/numpy_extension/random.py | Python | apache-2.0 | 9,624 | [
"Gaussian"
] | bec6231104ec50879cbdc9656364c62de13780d7fabfc7be700982186776278a |
from .yahoo import YahooDict as yahoo
from .moe import MoeDict as moe
from .urban import UrbanDict as urban
| LeaYeh/zdict | zdict/dictionaries/__init__.py | Python | gpl-3.0 | 108 | [
"MOE"
] | 272509ae0870e55ea35c90e4a6aefaad0ad147b0582e473947864bbbc0547781 |
# coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | google-research/google-research | video_structure/losses.py | Python | apache-2.0 | 2,540 | [
"Gaussian"
] | cb088a09e4e698e3ff34a2d2b91e524826bc2de226d9cdc6309401fb7b267651 |
"""Mayavi/traits GUI for converting data from KIT systems"""
# Authors: Christian Brodbeck <christianbrodbeck@nyu.edu>
#
# License: BSD (3-clause)
from collections import Counter
import os
import numpy as np
from scipy.linalg import inv
from threading import Thread
from ..externals.six.moves import queue
from ..io.... | jniediek/mne-python | mne/gui/_kit2fiff_gui.py | Python | bsd-3-clause | 24,977 | [
"Mayavi"
] | 4222014b9fef95283cc21f3e6cea9bcd589dfc90c57a404c38513ad0613da0e8 |
from ase import Atoms
print(Atoms())
print(Atoms('H2O'))
#...
| suttond/MODOI | ase/test/coverage.py | Python | lgpl-3.0 | 62 | [
"ASE"
] | 5ec73b332077c407ea5c23c4864ad7612c9c7be257de22121c483b6fa265c743 |
# 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.
"""
Unit tests for the :func:`iris.experimental.ugrid.load.load_meshes` function.
"""
# Import iris.tests first so that some t... | SciTools/iris | lib/iris/tests/unit/experimental/ugrid/load/test_load_meshes.py | Python | lgpl-3.0 | 8,015 | [
"NetCDF"
] | 7a8e47309a6667a4007b88a75168f3bda532f7e7c4913da68e509915aab33f4c |
from __future__ import (absolute_import, division, print_function)
import unittest
from mantid.simpleapi import CreateSampleWorkspace, CloneWorkspace, GroupWorkspaces, AddSampleLogMultiple, CreateEmptyTableWorkspace
from testhelpers import run_algorithm
from mantid.api import AnalysisDataService, WorkspaceGroup
from s... | wdzhou/mantid | Framework/PythonInterface/test/python/plugins/algorithms/CorrectTOFTest.py | Python | gpl-3.0 | 4,745 | [
"Gaussian"
] | de621cc7d4abc99785ff9750539f7d72f6504efd920d66ba785de11448a9bf84 |
# Copyright 2003-2008 by Leighton Pritchard. All rights reserved.
# Revisions copyright 2008-2012 by Peter Cock.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
# Contact: Leighton Pritchard,... | poojavade/Genomics_Docker | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/Bio/Graphics/GenomeDiagram/_CircularDrawer.py | Python | apache-2.0 | 68,651 | [
"Biopython"
] | d9c4d350e226cf1c7fd121676507ca70f4000f1e90b2523d5c792dc7f5052ad3 |
# -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2010, 2011, 2013 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at yo... | labordoc/labordoc-next | modules/docextract/lib/refextract_regression_tests.py | Python | gpl-2.0 | 109,478 | [
"DIRAC"
] | 58864ebcdf9ed604f3210fce08016b178855e58f07ef7bf549843f8ed211d014 |
#
# Copyright (C) 2013,2014,2015,2016 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option... | KonradBreitsprecher/espresso | samples/minimal-polymer.py | Python | gpl-3.0 | 3,114 | [
"ESPResSo"
] | aa5312b1b40b8469d8975738b2ea43594249a39c9ac31e29fdbc9cbd93214210 |
# Orca
#
# Copyright 2005-2008 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... | ruibarreira/linuxtrail | usr/lib/python3/dist-packages/orca/speechserver.py | Python | gpl-3.0 | 7,645 | [
"ORCA"
] | a651f9df412597cfaea5ff2c3636f664ff7e0129dc0a2e979290d7ca40bee07a |
import sys
sys.path.insert(1, "../../../")
import h2o, tests
def glm_solvers():
training_data = h2o.import_file(tests.locate("smalldata/junit/cars_20mpg.csv"))
predictors = ["displacement","power","weight","acceleration","year"]
for solver in ["AUTO", "IRLSM", "L_BFGS", "COORDINATE_DESCENT_NAIVE", "COORD... | kyoren/https-github.com-h2oai-h2o-3 | h2o-py/tests/testdir_algos/glm/pyunit_solversGLM.py | Python | apache-2.0 | 1,170 | [
"Gaussian"
] | bafe90a26a9d6b3189716ad8263486d12cd8ce03bf734bee20563e340a404b27 |
from __future__ import division
from __future__ import print_function
from past.utils import old_div
import sys
sys.path.insert(1, "../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.gam import H2OGeneralizedAdditiveEstimator
from h2o.grid.grid_search import H2OGridSearch
# In this test, we ch... | h2oai/h2o-3 | h2o-py/tests/testdir_algos/gam/pyunit_PUBDEV_7367_gridsearch_subspaces_invalid.py | Python | apache-2.0 | 2,267 | [
"Gaussian"
] | 1be25495ac1480edb7fe68de595dbc95869682aa509e97bc5cc74ef5a6f103f4 |
#!/usr/bin/env python
"""Tests for availability of pyani dependencies
We only test for dependencies from non-standard libraries.
These tests are intended to be run using the nose package
(see https://nose.readthedocs.org/en/latest/).
"""
import subprocess
import sys
from nose.tools import assert_equal
def test_im... | peterjc/pyani | tests/test_dependencies.py | Python | mit | 1,881 | [
"BLAST",
"Biopython"
] | a473de8840ea43fa41362d81c07b429647cc85cfb02122b909a46179ce317ca4 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# configuration - configuration wrapper
# Copyright (C) 2003-2015 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Licens... | heromod/migrid | mig/shared/configuration.py | Python | gpl-2.0 | 55,041 | [
"Brian"
] | 7d40a5efe253fe10c5d4a0666c04d2aa50fe1f36af4dfcae4c0f42149b3a57cb |
"""
Landmark
:Authors:
Berend Klein Haneveld
"""
from vtk import vtkProp3DFollower
from vtk import vtkTransform
from core.vtkDrawing import CreateSphere
from core.vtkDrawing import ColorActor
from core.vtkDrawing import CreateCircle
class Landmark(object):
"""
Landmark is a container for vtkProps for easier
mana... | berendkleinhaneveld/Registrationshop | ui/transformations/Landmark.py | Python | mit | 2,337 | [
"VTK"
] | 954f5dfeb6e005653a04cd083050fdb0b753377f65d40b1381e5043e19b68586 |
#!/usr/bin/env python
import os
import os.path
import sys
import shutil
import tempfile
import unittest
from distutils import ccompiler, sysconfig
import gc
import weakref
# the user-specific include directory is not searched by default, so we may have to add it manually
IN_USER_DIR = False
try:
from site import ... | Rouslan/PyExpose | pyexpose/test/test_compile.py | Python | mit | 40,402 | [
"VisIt"
] | 56289d1dded5ecc705b33043affc34ad9860ae9e9a5c0460012ced9d3377bced |
# -*- coding: utf-8 -*-
#
# OOP-Spring-2016 documentation build configuration file, created by
# sphinx-quickstart on Fri Jan 15 14:28:38 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated fil... | Heroes-Academy/OOP_Spring_2016 | docs/source/conf.py | Python | mit | 8,215 | [
"Brian"
] | cb62767e1181cfef189d794b120e9d0ba32bf96e155ce49ec798d2562224750d |
#########################################################################
#
# classifiers.py - This file is part of the Spectral Python (SPy)
# package.
#
# Copyright (C) 2001-2010 Thomas Boggs
#
# Spectral Python is free software; you can redistribute it and/
# or modify it under the terms of the GNU General... | RubnC/modified-spectral | spectral/algorithms/classifiers.py | Python | gpl-2.0 | 17,629 | [
"Gaussian",
"NEURON"
] | 546eeaf9a4a72d41a2d3eebe1d859e9d1a1f3ac0f9ce269671375e77c4695877 |
#!/usr/bin/env python
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
import unittest
from Bio import pairwise2
class TestPairwiseGlobal(unittest.TestCase):
def test_globalxx_simple(self):
... | updownlife/multipleK | dependencies/biopython-1.65/Tests/test_pairwise2.py | Python | gpl-2.0 | 12,555 | [
"Biopython"
] | f68d79c2323b7b70143537ab798bc8c7191436282504e498e4646229ecd8d25b |
# -*- coding: utf-8 -*-
"""HTML sanitizing tools
The rule sets are taken from Wysihtml5.
This file can be used as a script to convert a Wysihtml5 parser rules
file to a proper Python representation for using it with bleach.
@since: 2015-01-07
@author: moschlar
"""
from bleach import clean
from functools import parti... | moschlar/SAUCE | sauce/lib/sanitize.py | Python | agpl-3.0 | 3,607 | [
"VisIt"
] | 312444c71014094a6a1205e6b63b95c8146d34f61076441acf12e360960ede2c |
""" Various general-use functions."""
# p2.6+ compatibility
from __future__ import division, print_function, unicode_literals
try:
unicode
except NameError:
unicode = basestring = str
xrange = range
from textwrap import wrap
import sys, os
import numpy as np
from math import sqrt
def iscontainer(s):
... | nhmc/Barak | barak/utilities.py | Python | bsd-3-clause | 15,977 | [
"Gaussian"
] | 8ff0f1ebc211b2f4e3262983944c390961693897a30fd026dd4ee24df4d5129f |
# Copyright 2018 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.
"""Implements commands for running and interacting with Fuchsia on devices."""
import boot_data
import logging
import os
import pkg_repo
import re
import su... | ric2b/Vivaldi-browser | chromium/build/fuchsia/device_target.py | Python | bsd-3-clause | 14,388 | [
"Amber"
] | dd156a68cf168e31505e29e03c4e019786a9a0f56a5d8e50d3e8d0610d658f30 |
#!/usr/bin/env python
from bioblend.galaxy import objects
from bioblend.galaxy import GalaxyInstance
from bioblend.galaxy.histories import HistoryClient
from bioblend.galaxy.datasets import DatasetClient
import subprocess
import argparse
import re
import os
from string import Template
import logging
DEBUG = os.environ.... | bgruening/galaxy_ie_helpers | galaxy_ie_helpers/__init__.py | Python | mit | 9,744 | [
"Galaxy"
] | 555e1bcfe4d7962d30bb2d764756e3af4c4a64698a06342474bb6e3ae9e75176 |
""" Python 'utf-7' Codec
Written by Brian Quinlan (brian@sweetapp.com).
"""
import codecs
### Codec APIs
class Codec(codecs.Codec):
# Note: Binding these as C functions will result in the class not
# converting them to methods. This is intended.
encode = codecs.utf_7_encode
decode = codecs.utf_7_dec... | xbmc/atv2 | xbmc/lib/libPython/Python/Lib/encodings/utf_7.py | Python | gpl-2.0 | 550 | [
"Brian"
] | e6f399f47667d652662823d5be2dcb1c17d0a9d1df126d22b99c7d34f6285964 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
import unittest2 as unittest
from pymatgen.analysis.hhi.hhi import HHIModel
class HHIModelTest(unittest.TestCase):
def test_hhi(self):
hhi = HHIMo... | aykol/pymatgen | pymatgen/analysis/hhi/tests/test_hhi.py | Python | mit | 955 | [
"pymatgen"
] | 094cd73d8cd0ba9a7595ed7bff83856556d6958e38fad6eea9e52748ec603f34 |
'''===========================================================================
16-Oct-2015 josep.sampe Initial implementation.
05-Feb-2016 josep.sampe Added Proxy execution.
01-Mar-2016 josep.sampe Addded pipeline (multi-node)
22-Mar-2016 josep.sampe Enhanced performance
========================... | iostackproject/SDS-Storlet-Middleware | crystal_filter_middleware/crystal_filter_storlet_gateway.py | Python | gpl-3.0 | 3,086 | [
"CRYSTAL"
] | 65776948be9aa963c9f6aecf19495f4a0fcb3d946580a736459020e86d9e1b2d |
#!/usr/bin/env python
# coding=utf-8
# Contributor:
# Phus Lu <phus.lu@gmail.com>
__version__ = '3.0.5'
__password__ = ''
__hostsdeny__ = () # __hostsdeny__ = ('.youtube.com', '.youku.com')
import sys
import os
import re
import time
import struct
import zlib
import base64
import logging
import httplib
im... | feeloc/GoAgentX | Resources/goagent-server/python/wsgi.py | Python | bsd-2-clause | 21,225 | [
"VisIt"
] | e4f52f694ff7c35c7eae0e8a8f6666e257f94f0adce6500bfe49770492c32096 |
#!/usr/bin/env python
#
# $Id: get_code_stats.py 9318 2011-06-10 02:37:10Z nathan_george $
#
# Proprietary and confidential.
# Copyright $Date:: 2011#$ Perfect Search Corporation.
# All rights reserved.
#
import sys
import os
import re
import optparse
import math
buildscriptDir = os.path.dirname(__file__)
buildscriptDi... | perfectsearch/sandman | code/buildscripts/codescan/get_code_stats.py | Python | mit | 12,831 | [
"VisIt"
] | c9a9a86c2acd5fd04c8ee5bd4cb544dea58c992a2cb5b267f61037c48768bc15 |
"""Acceptance tests for the Longboard API."""
import os
import unittest
import longboard
from tests.utils import TestingServer
TEST_SITE_PATH = os.path.join(os.path.dirname(__file__), 'site')
class LongboardTest(object):
"""Test functionality that should work in all browsers.
These tests are meant to ... | encodify/longboard | tests/acceptance/test_longboard.py | Python | mit | 975 | [
"VisIt"
] | 9e34cc010bd95557942124ca976096de01291b793415fe6ab7ccad6b5504d439 |
#!/usr/bin/python
# (c) 2013, Cove Schneider
# (c) 2014, Joshua Conner <joshua.conner@gmail.com>
# (c) 2014, Pavel Antonov <antonov@adwz.ru>
#
# 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... | mkrupcale/ansible | lib/ansible/modules/cloud/docker/_docker.py | Python | gpl-3.0 | 75,091 | [
"VisIt"
] | a9be66e2cf1ced2de110535774f36d84b9f663eeeeea8c2dd3ff5d807c87cebc |
from .keywords import *
from .utils import LibraryListener
from .version import VERSION
__version__ = VERSION
class Selenium2Library(
_LoggingKeywords,
_RunOnFailureKeywords,
_BrowserManagementKeywords,
_ElementKeywords,
_TableElementKeywords,
_FormElementKeywords,
_SelectElementKeywords... | Gaurang033/Selenium2Library | src/Selenium2Library/__init__.py | Python | apache-2.0 | 10,285 | [
"VisIt"
] | 396ab3a5983479feb8b07b439afbdbe4c28b3bd1dd65cc7eb577ad5c025bca18 |
# Routines for general ion image analysis using the IPython Notebooks
# Notable entries:
# A class IonImage that defines a set of attributes for ion images,
# plus some easily accessible functions within this class
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplot... | laserkelvin/Python-Ion-Imaging | ImageTools.py | Python | gpl-3.0 | 28,971 | [
"Gaussian"
] | d47261f22f5c56877634c6d13f1143f647c735a9d34b653c2350849597b5f9f9 |
import argparse
import os
import sys, traceback
import csv
import numpy as np
from datetime import datetime
import xml.etree.ElementTree as ET
import xml.dom.minidom as minidom
from os import path
sys.path.append(path.abspath(path.join(path.dirname(__file__), "..")))
from lib import env
from lib.shapefileloader impo... | SouthForkResearch/CHaMP_Metrics | tools/hydroprep.py | Python | gpl-3.0 | 6,356 | [
"VisIt"
] | 5a0f3b3f5c7d1ab8e7178c6636e60cc034adcff8c84c0f98afe6989707d07467 |
#
# Copyright (c) 2009-2015, Jack Poulson
# All rights reserved.
#
# This file is part of Elemental and is under the BSD 2-Clause License,
# which can be found in the LICENSE file in the root directory, or at
# http://opensource.org/licenses/BSD-2-Clause
#
import El, time
# TODO: Add noise so that the soft marg... | justusc/Elemental | examples/interface/SVMDense.py | Python | bsd-3-clause | 2,906 | [
"Gaussian"
] | add785fe862db096aff4e582e33cf67a5390355311c84935d55e8bf39f069990 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.