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 |
|---|---|---|---|---|---|---|---|
#!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
#
#
# 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... | e-gob/plataforma-kioscos-autoatencion | scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/network/avi/avi_alertscriptconfig.py | Python | bsd-3-clause | 3,476 | [
"VisIt"
] | 3476ba82cd15e3ed64adeb615e3e6f110a3963b76d402ec6169b6468b0e2202e |
#!/usr/bin/env python
from __future__ import with_statement
import sys
from galaxy import eggs
import pkg_resources
pkg_resources.require( "bx-python" )
pkg_resources.require( "numpy" )
from bx.bbi.bigwig_file import BigWigFile
import os
################################################################################... | mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/tools/evolution/add_scores.py | Python | gpl-3.0 | 4,474 | [
"Galaxy"
] | bc6006bc4dd773b818b93498dd9000cc5713022b6c3b07574cae83b6e3691ca7 |
import pkg_resources
pkg_resources.require( "twill==0.9" )
import StringIO, os, sys, random, filecmp, time, unittest, urllib, logging, difflib, zipfile
from itertools import *
import twill
import twill.commands as tc
from twill.other_packages._mechanize_dist import ClientForm
pkg_resources.require( "elementtree" )
fr... | dbcls/dbcls-galaxy | test/base/twilltestcase.py | Python | mit | 64,163 | [
"Galaxy"
] | c2639cc59a27854c091d0697ad0307a62794b7f9a9dc32122f07e0c65dcffa17 |
""" LoopFullUnrolling fully unrolls loops with static bounds. """
from pythran import metadata
from pythran.analyses import HasBreak, HasContinue, NodeCount
from pythran.openmp import OMPDirective
from pythran.conversion import to_ast
from pythran.passmanager import Transformation
from copy import deepcopy
import gas... | serge-sans-paille/pythran | pythran/optimizations/loop_full_unrolling.py | Python | bsd-3-clause | 3,744 | [
"VisIt"
] | 5dec7c3ac704334bb91a2258849c56866eb47b95ce36f5c163634e51120e90ec |
#!/usr/bin/env python
#pylint: disable=missing-docstring
#################################################################
# DO NOT MODIFY THIS HEADER #
# MOOSE - Multiphysics Object Oriented Simulation Environment #
# #... | Chuban/moose | python/chigger/tests/error/result_given_file.py | Python | lgpl-2.1 | 1,022 | [
"MOOSE"
] | e1abdce31405c04dfda1fe8678f214491f94235f0eb0a3bd9d52e56332c7bea5 |
# Implements a Gaussian process latent-variable model.
# The (high-dimensional) data, Y is explained by some low-dimensional latent
# data X, warped by a function drawn from a GP prior (f). So Y = f(X), but
# we don't know X or f.
#
# In this example, we optimize X and the hyperparameters of the GP, but
# we integrate... | kcarnold/autograd | examples/gplvm.py | Python | mit | 3,140 | [
"Gaussian"
] | 185ddbde40f3a70770a1868180f9589bb825bca49fb5b973de41afeb46f17363 |
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
class TerminalSettingSerializer(serializers.Serializer):
SORT_BY_CHOICES = (
('hostname', _('Hostname')),
('ip', _('IP'))
)
PAGE_SIZE_CHOICES = (
('all', _('All')),
('auto', _('A... | jumpserver/jumpserver | apps/settings/serializers/terminal.py | Python | gpl-3.0 | 1,677 | [
"VisIt"
] | afdfb5870262cf95d1aa8fc8fe8e97c52e222b50e3ce7adf1664c16620ec96ac |
#!/usr/bin/env python
from random import randrange
WHEEL = ["BAR", "BELL", "ORANGE", "LEMON", "PLUM", "CHERRY"]
def display_instructions():
print "WELCOME TO THE CASINO"
print "BET IN INCREMENTS OF $1 FROM $1 TO $100"
print "BET $0 WHEN YOU ARE FINISHED"
return
def pull(n):
def _win(msg, d):
... | genos/online_problems | prog_praxis/slots_202.py | Python | mit | 3,591 | [
"CASINO"
] | 6b072e7b7181da30abda228171cf83fbf3de3b197959176db7c60d4cde17ba41 |
#!/usr/bin/env python
# constrained DFT
# written by Zhihao Cui. zcui@caltech.edu
r'''
Constrained DFT (cDFT) is a method to control the locality of electron density
during the SCF calculation. By constraining the electron density or occupation
on a particular orbital, atom, or functional group, cDFT provides a soluti... | sunqm/pyscf | examples/1-advanced/033-constrained_dft.py | Python | apache-2.0 | 20,201 | [
"PySCF"
] | b3dd08b1b968c0401867ec8954f2df1091b1c30bf2ff65f16af257a4567a26b2 |
#!/usr/bin/env python
#coding=utf-8
##==============================================================================
## $Author$
## $Date$
## $Revision$
## $URL$
##==============================================================================
import ConfigParser
import time
from math import cos,sin,log,exp,sqrt
from ... | tlohner/gmmreg | Python/_core.py | Python | gpl-3.0 | 9,565 | [
"Gaussian"
] | 67cabd42452f27d7aad3670c25fc95258fe01e6df56d409b4337193f1c7b6bff |
"""
extras.py
Plotting class to generate 2-D charts for examples. This file is the only one (other than another example)
that depends upon matplotlib. If matplotlib is not imported (that is, not installed), does
a fall back operation (dump to console, and eventually, a csv). The user can either find a plotting
functio... | brianr747/SFC_models | sfc_models/examples/Quick2DPlot.py | Python | apache-2.0 | 5,346 | [
"Brian"
] | 474738d4680f4f9220283fd0c64d3f26a49cea862b55941ad017227e7afed5e5 |
# Module wordnet.py
#
# Original author: Oliver Steele <steele@osteele.com>
# Project Page: http://sourceforge.net/projects/pywordnet
#
# Copyright (c) 1998-2004 by Oliver Steele. Use is permitted under
# the Artistic License
# <http://www.opensource.org/licenses/artistic-license.html>
"""Utility functions to use wit... | tarsqi/ttk | utilities/wntools.py | Python | apache-2.0 | 12,304 | [
"Amber"
] | 035c133f1ae533380dcf105fdb649ad5958ac05aa002b6469a8622b7107b663d |
from ecmwfapi import ECMWFDataServer
server = ECMWFDataServer()
server.retrieve({
"class": "ei",
"dataset": "interim",
"date": "1979-01-01/to/1979-12-31",
"expver": "1",
"grid": "0.75/0.75",
"levtype": "sfc",
"param": "34.128/49.128/134.128/143.128/164.128/165.128/166.128/167.128/168... | beneduzi/METEO | ecmwf_inmet/py/ecmwf_download.py | Python | apache-2.0 | 15,726 | [
"NetCDF"
] | a5285e768ee6ae2e9fa47485419f0cdd26e0ab7d240147c5ef05ef5f4414b596 |
"""distutils.archive_util
Utility functions for creating archive files (tarballs, zip files,
that sort of thing)."""
# This module should be kept compatible with Python 1.5.2.
__revision__ = "$Id: archive_util.py,v 1.15 2002/11/21 18:33:28 akuchling Exp $"
import os
from distutils.errors import DistutilsExecError
f... | trivoldus28/pulsarch-verilog | tools/local/bas-release/bas,3.9/lib/python/lib/python2.3/distutils/archive_util.py | Python | gpl-2.0 | 6,256 | [
"VisIt"
] | 85ff677ee57d61d5eb0923af132c0f15ff0358d8f67446350bc11407164fe926 |
from unittest import TestCase
import os
from zombie.browser import Browser, DOMNode
from zombie.proxy.client import ZombieProxyClient
from zombie.compat import urlparse, PY3
from zombie.tests.webserver import WebServerTestCase
class BaseTestCase(WebServerTestCase):
def setUp(self):
super(BaseTestCase, se... | ryanpetrello/python-zombie | zombie/tests/test_browser.py | Python | mit | 14,573 | [
"VisIt"
] | a8d5c9bac3e23918aa00a5945c9feb490fcf62ff9c6472c5d71715bed3004a71 |
#! /usr/bin/env python
import sys
sys.path.append('/usr/lib/python2.7/dist-packages')
import db
import numpy as np
from sklearn import linear_model
from sklearn.feature_selection import SelectKBest
from sklearn.feature_selection import f_regression
from sklearn.metrics import r2_score
from rdkit import Chem
from rdki... | PMitura/smiles-neural-network | baselines/feature_sel.py | Python | bsd-3-clause | 4,131 | [
"RDKit"
] | 7009c0d62c01c0a41305442cd1bcea1e056440353b33bbe588bff7cb7bd1cd8b |
# Copyright Kevin Deldycke <kevin@deldycke.com> and contributors.
# All Rights Reserved.
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) ... | kdeldycke/meta-package-manager | meta_package_manager/managers/apm.py | Python | gpl-2.0 | 16,414 | [
"GULP"
] | 883b8e62f2919a7b6e9fc9fa275e096ee2153a5abce7d3e5e283d5e612409c27 |
def installed():
import os
from ase.test import NotAvailable
# check if CASTEP_COMMAND is set a environment variable
if not os.environ.has_key('CASTEP_COMMAND'):
print("WARNING: Environment variable CASTEP_COMMAND is not set")
print("Will set CASTEP_COMMAND = castep for the sake of this... | grhawk/ASE | tools/ase/test/castep/__init__.py | Python | gpl-2.0 | 775 | [
"ASE",
"CASTEP"
] | 32c44d347ec7425440f36d324dd0d7e74e315cf422cbe758932d564e70905d4f |
from __future__ import division
import numpy as np
def gaussian(x, a, b, c, d=0):
'''
a -> height of the curve's peak
b -> position of the center of the peak
c -> standard deviation or Gaussian RMS width
d -> offset
'''
return a * np.exp( -(((x-b)**2 )/ (2*(c**2))) ) + d
... | radjkarl/imgProcessor | imgProcessor/equations/gaussian.py | Python | gpl-3.0 | 321 | [
"Gaussian"
] | af5573e73c97fad308d27d74746c005bf30bbf9f8ecab83ac015e4ccf12b463f |
#!/usr/bin/env python
import os
import sys
import pychemia
import argparse
if __name__ == "__main__":
description = """Create a surface for a given structure along the given miller indices and for a given
number of layers"""
parser = argparse.ArgumentParser(description=description)
parser.add_argume... | MaterialsDiscovery/PyChemia | scripts/create_surface.py | Python | mit | 1,886 | [
"CRYSTAL",
"VASP"
] | 94ef8b4c09f5f69f688230d08ed2251f4a4a56b832f8203d48f70f35f59ce2ed |
#! /usr/bin/env python
import numpy as np
import sys
from .pplexceptions import OutsideRecRange
class Field():
"""
Abstract base class to be inherited by MDField, CFDField and CPLField.
Authors: Ed Smith 2019 & David Trevelyan (2010-2014)
Abstract base class template that generally spe... | edwardsmith999/pyDataView | postproclib/field.py | Python | gpl-3.0 | 26,733 | [
"VMD"
] | e620786002716d1d7b9ac990047d633a6405450ca6215eee6195ecec8c8b600e |
# coding=utf-8
from __future__ import unicode_literals
from collections import OrderedDict
from .. import Provider as PersonProvider
class Provider(PersonProvider):
formats = (
'{{first_name_male}} {{last_name}}',
'{{first_name_male}} {{last_name}}',
'{{first_name_male}} {{last_name}}',
... | deanishe/alfred-fakeum | src/libs/faker/providers/person/en_NZ/__init__.py | Python | mit | 35,384 | [
"Amber",
"Brian",
"CRYSTAL",
"Dalton",
"Desmond"
] | 40e07e6d352d60cd40061d2fbf5b0e108ba9eeea6326519c05b917c37fbdaca1 |
from xcrawler import XCrawler, Page, PageScraper
class StackOverflowItem:
def __init__(self):
self.url = None
self.related_question = None
class QuestionAndUrlsScraper(PageScraper):
def extract(self, page):
related_questions = page.xpath("//div[@class='module sidebar-related']//a[@c... | lucdom/xCrawler | examples/stackoverflow_two_level_crawler.py | Python | gpl-2.0 | 1,327 | [
"VisIt"
] | ca717880bc2d99e7c7cbc321db3b938cc67356d64b57dd4ecbc09f591e57a7ac |
# -*- coding: utf-8 -*-
from pathomx.plugins import ProcessingPlugin
import pathomx.ui as ui
from pathomx.data import DataDefinition, PandasDataDefinition
from pathomx.qt import *
# Dialog box for Metabohunter search options
class SpectraNormConfigPanel(ui.ConfigPanel):
algorithms = ['PQN', 'TSA']
def __in... | pathomx/pathomx | pathomx/plugins/spectra/loader.py | Python | gpl-3.0 | 17,135 | [
"Gaussian"
] | 10879b96a4d85afa914cf1443bea092b0b8cc94ecc2ed4b51cda019b7a0ab774 |
"""Transform a string with Python-like source code into SymPy expression. """
from __future__ import print_function, division
from .sympy_tokenize import \
generate_tokens, untokenize, TokenError, \
NUMBER, STRING, NAME, OP, ENDMARKER
from keyword import iskeyword
import ast
import re
import unicodedata
im... | wolfram74/numerical_methods_iserles_notes | venv/lib/python2.7/site-packages/sympy/parsing/sympy_parser.py | Python | mit | 29,881 | [
"VisIt"
] | a5ed16b2744bf97092ad6c9f72dac5949023d50fd5a4ed88ad9e57e7579e1e54 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 6 11:55:59 2017
@author: roger
"""
"""
The "generalized linear models" of computational neuroscience
are ultimately nonlinear vector autoregressive models in
statistics. As the name suggests, the key component in these
models is a regression from ... | sheqi/TVpgGLM | libs/regression_tv.py | Python | mit | 25,033 | [
"Gaussian"
] | 97214346519d05fc04c4b1397fd28d11788550ec29e5bea6f17935caca12896d |
"""Relative quantification extraction from MRSI modality."""
from __future__ import division
import numpy as np
from joblib import Parallel, delayed
from lmfit import minimize
from lmfit import Parameters
from scipy.special import wofz
from scipy.stats import norm
from scipy.integrate import simps
from scipy.interp... | glemaitre/protoclass | protoclass/extraction/relative_quantification_extraction.py | Python | gpl-2.0 | 21,553 | [
"Gaussian"
] | b1d226b9c2b784131608496622607added9d7e40c8cc6407cf61051e1b290681 |
#!/usr/bin/env python
# python modules
import sys
import os
import copy
# qt modules
from gaussian import GaussianCom
from molecules import Molecule
from elements_database import ATOMIC_NUMBER_DICT
try:
gaussian_com_filename = sys.argv[1]
new_folder_name = sys.argv[2]
except:
print("Usage: residel <gauss... | eduardoftoliveira/oniomMacGyver | scripts/residel_2.0.py | Python | gpl-3.0 | 2,685 | [
"Gaussian"
] | a0b2247298508e9caeeda7cf30641a5159abdf92a3da56d97ca8d5b92007e6eb |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import os
import unittest
from pymatgen.io.qchem.sets import *
from pymatgen.util.testing import PymatgenTest
__author__ = "Samuel Blau, Brandon Wood, Shyam Dwaraknath, Evan Spotte-Smith"
__copyright__ = "Co... | gmatteo/pymatgen | pymatgen/io/qchem/tests/test_sets.py | Python | mit | 29,571 | [
"pymatgen"
] | ccd90c81087138eb0b8acec9af40cd6464292690feb024c3cbfc955477f90213 |
########################################################################
# $HeadURL$
# File: Operation.py
# Date: 2012/07/24 12:12:05
########################################################################
"""
:mod: Operation
.. module: Operation
:synopsis: Operation implementation
Operation implementation
"""
# ... | Sbalbp/DIRAC | RequestManagementSystem/Client/Operation.py | Python | gpl-3.0 | 10,202 | [
"DIRAC"
] | 60decc304713a981cb6020144e09d1c24759a31c8384d3c703f06009d4f3e901 |
# coding: utf-8
from __future__ import division, unicode_literals
"""
Created on Mar 19, 2012
"""
__author__ = "Shyue Ping Ong, Stephen Dacek"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "Shyue Ping Ong"
__email__ = "shyuep@gmail.com"
__date__ = "Mar 19, 2012"
impor... | Dioptas/pymatgen | pymatgen/entries/tests/test_compatibility.py | Python | mit | 34,571 | [
"pymatgen"
] | 2290b2f36707cd8b6a887821fc597ab406a5c16b19e118e185421f4227561f48 |
#!/usr/bin/env python3
#
# A PyMol extension script to test extrusion of a single module from a single
# module's n-term
#
def main():
"""main"""
raise RuntimeError('This module should not be executed as a script')
if __name__ =='__main__':
main()
in_pymol = False
try:
import pymol
... | joy13975/elfin | pymol_scripts/extensions/extrude_single_at_single_n.py | Python | mit | 2,355 | [
"PyMOL"
] | e4595233057116f620dc8361dd17177018252664b05539edb981aa173fc880df |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Brian Coca <bcoca@ansible.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... | emersonsoftware/ansiblefork | lib/ansible/modules/system/systemd.py | Python | gpl-3.0 | 16,377 | [
"Brian"
] | b567bb9870df5a80dc8418a805775f2fc07cf4774d9ad3913a76ada850006838 |
#!/usr/bin/python
import numpy as np
import matplotlib as pl
import struct
import glob
from scipy.sparse import *
from scipy.io import mmread, mmwrite
current_version = (0,8,1)
class AurynBinaryFile:
'''
This class is the abstract base class to access binary Auryn files.
'''
def unpack(self, data):... | sanjayankur31/auryn | tools/python/auryntools/file_access.py | Python | gpl-3.0 | 13,460 | [
"NEURON"
] | 36c5d33335ba6bd07934d208a9e2b684ba3daf92258710f1c1414df74eb99b6d |
#!/usr/bin/env python
from __future__ import absolute_import, print_function, division
from mesonh_atmosphere import MesoNHAtmosphere
import os
import sys
import signal
import time
import socket
import struct
import cmath
import numpy as np
from os import getenv
# if PAPARAZZI_HOME not set, then assume the tree contai... | HWal/paparazzi | sw/simulator/mesonh/mesonh.py | Python | gpl-2.0 | 4,024 | [
"NetCDF"
] | 5876a792cb94e3a8ef28567f48473f4bf12d5f5a44fe294a90a48c47d5bf0921 |
# -*- coding: utf-8 -*-
r"""
Multithreading and multiprocessing in ray tracing
-------------------------------------------------
| Script: ``\tests\speed\1_SourceZCrystalThetaAlpha_speed.py``.
| The test is based on the example ``\examples\withRaycing\07_AnalyzerBent2D\01BD_SourceZCrystalThetaAlpha.py``.
This script... | kklmn/xrt | tests/speed/1_SourceZCrystalThetaAlpha_speed.py | Python | mit | 27,539 | [
"CRYSTAL"
] | 35d83e4b64fffb060450e506b2b7160371f0157dc8e5a83ad59a50f6216fae03 |
# coding: utf-8
from __future__ import unicode_literals
import poetryutils2
test_data = """ pow 1
#pow 1
*pow* 1
ughh 1
ughhhhh 1
lol 3
qb 2
could 1
couldnt 2
boo 1
hair 1
your 1
smell 1
me 1
let 1
be 1
gee 1
de 1
he 1
she 1
question 2
of 1
a 1
the 1
day 1
re 1
fie 1
sue 1
eme 1
wye 1
gee 1
see 1
ase 1
rue 1
pee 1
si... | cmyr/poetryutils2 | tests/test_syllables.py | Python | mit | 3,019 | [
"ASE"
] | 76ec86ce322b9af940cbb4861da6d4d50ab52b1a9ab8b67815dd6a4742b87383 |
'''
Created on Mar 1, 2012
@author: Stephen O'Hara
A tree that sorts elements based on the median
distance to a randomly selected pivot element.
"ProximityTree" because we only consider the scalar
proximity between pairs of points, and not any spatial
configuration. Points in a proximity tree can live in
non-euclidean... | svohara/proximityforest | proximityforest/ANN/ProximityForest.py | Python | gpl-3.0 | 33,597 | [
"VisIt"
] | a2eceed92f9ebe3ee730e93635339ecd29080aff5ea3fc7ad2715d194e18e24c |
#!/usr/bin/env python
"""
@brief A class for testing if a point is inside a shape
@author alexander@gokliya.net
"""
from __future__ import print_function
import numpy
import math
from functools import reduce
class Inside:
def __init__(self, shape):
"""
Constructor
@param shape instance ... | gregvonkuster/icqsol | shapes/icqInside.py | Python | mit | 7,601 | [
"VTK"
] | 89080c04d472785b490c7845e5cf27f843a2563a4e3a02d3659cf8958fa302bf |
""" Composite actions over managers shared between HTTP endpoint (routes.py)
and message queue.
"""
from lwr.lwr_client.setup_handler import build_job_config
from lwr.managers import status
from lwr.managers import LWR_UNKNOWN_RETURN_CODE
from galaxy.tools.deps import dependencies
def full_status(manager, job_status,... | jmchilton/lwr | lwr/manager_endpoint_util.py | Python | apache-2.0 | 3,222 | [
"Galaxy"
] | bbf48661394fe94963a149ebdf4cfc4103c6ed85e6eb8ecce2400d2bc4745227 |
# Copyright 2017 Square, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | square/pylink | pylink/structs.py | Python | apache-2.0 | 38,009 | [
"MOE"
] | 2a98e07f76c5be9903e6c50ea54da2bc524fbf7cee64ef466ec80a51ab2769fb |
# ============================================================================
#
# Copyright (C) 2007-2012 Conceptive Engineering bvba. All rights reserved.
# www.conceptive.be / project-camelot@conceptive.be
#
# This file is part of the Camelot Library.
#
# This file may be used under the terms of the GNU General... | jeroendierckx/Camelot | camelot/view/action.py | Python | gpl-2.0 | 3,453 | [
"VisIt"
] | c425fca0ec6f7bb7a80ec73566ab05e5f46385b7bd0e129fe470c064d4a330d2 |
# -*- coding: utf-8 -*-
# Copyright 2013 by Petra Kubincova
import read_maf as preprocessing
import seq_structures as seq
import bgzf_tool as bgzftool
import mapping
import sys
import os
def parse_mapping_input(args):
try:
import optparse
parser = optparse.OptionParser()
parser.add_option... | kpetra/maptool-python | maptool.py | Python | mit | 12,796 | [
"Biopython"
] | 99af6c48b8918de8f9a38d16438fd8cde06df94f562de76b5590b8636dbc00e9 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Lenovo, Inc.
#
# 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
# ... | StephenWeber/ansible | lib/ansible/modules/network/lenovo/cnos_save.py | Python | gpl-3.0 | 5,099 | [
"VisIt"
] | a95fc223e4e2be77b189ea2303ee24a9959359223c73e0bc9579aeb7558a224b |
import itertools
import sys
import copy
from typing import Optional
from ...utils.helpers import PickleSerializer
from ...exceptions import SmtlibError
from .expression import (
Expression,
BitVecVariable,
BoolVariable,
ArrayVariable,
Array,
Bool,
BitVec,
BoolConstant,
ArrayProxy,
... | trailofbits/manticore | manticore/core/smtlib/constraints.py | Python | agpl-3.0 | 17,980 | [
"VisIt"
] | b3f696446d45e3ee5e3d18b5dd4a0cc89b789001e2b60bd2fdbd65530468341a |
"""
redditcurl, download the images you saved on Reddit.
Copyright (C) 2015 Kaan Genç
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 3 of the License, or
(at ... | SeriousBug/redditcurl | redditcurl/__main__.py | Python | gpl-3.0 | 11,032 | [
"VisIt"
] | dbf47865be2aa401a68c5eded9ceff9df4f3e41142e98bdefc2727060c6c2cc8 |
"""
Utilities for constructing node features or bond features.
Some functions are based on chainer-chemistry or dgl-lifesci.
Repositories:
- https://github.com/chainer/chainer-chemistry
- https://github.com/awslabs/dgl-lifesci
"""
import os
import logging
from typing import List, Union, Tuple
import numpy as np
fro... | lilleswing/deepchem | deepchem/utils/molecule_feature_utils.py | Python | mit | 14,099 | [
"RDKit"
] | 76ce33776b94f1e2df49bf9693bc0551b405a4c7f4efb6c1802a5382f6fa4e95 |
#!/usr/bin/env python
'''
GAEUnit: Google App Engine Unit Test Framework
Usage:
1. Put gaeunit.py into your application directory. Modify 'app.yaml' by
adding the following mapping below the 'handlers:' section:
- url: /test.*
script: gaeunit.py
2. Write your own test cases by extending unittest.TestCas... | zaim/bukutip | gaeunit.py | Python | agpl-3.0 | 18,274 | [
"VisIt"
] | fb7d8a1ef72e3e12d22560a708f33fa2a8c0afec4d1e2d559d02a073da25013e |
import PythonQt
from PythonQt import QtCore, QtGui, QtUiTools
import director.applogic as app
import director.objectmodel as om
from director.timercallback import TimerCallback
from director import robotstate
from director import visualization as vis
from director import transformUtils
from director import ikplanner
fr... | patmarion/director | src/python/director/motionplanningpanel.py | Python | bsd-3-clause | 17,447 | [
"VTK"
] | cf3178b978159c290345592847d6d1c1f8f84bbe4617a3db5b6164d044980db9 |
# coding: utf-8
from __future__ import division, print_function
from ase import Atom, Atoms
from parcalc import ParCalculate, ClusterVasp
import elastic
from ase import io
from ase.lattice.spacegroup import crystal
from pyspglib import spglib
from time import sleep
import os, sys
def wait_for_results(systems):
fo... | jochym/Elastic | tests/test_02.py | Python | gpl-3.0 | 1,406 | [
"ASE",
"CRYSTAL"
] | 1ecf39857cd647ee19232fb6c0f3b1c3659a160f23fce97c1e119af613d74d1d |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from random import randint
import time
class Claptrap(object):
meta = {
'name': "Claptrap",
'description': "Just few funny Clap Trap's quotes",
'author': "F. Kolacek <fkolacek@redhat.com>",
'version': "1.0",
'triggers': {
'^!clap': "haveSomeFu... | fkolacek/ClapTrap | core/modules/claptrap.py | Python | mit | 8,040 | [
"exciting"
] | 575f4d851484fa87ee7d4063e5d58c4a9a43335ce960d1c6f7bfb8b96baefaf4 |
# -*- coding: utf-8 -*-
from __future__ import (unicode_literals, division, absolute_import, print_function)
store_version = 10 # Needed for dynamic plugin loading
__license__ = 'GPL 3'
__copyright__ = '2011-2014, Tomasz Długosz <tomek3d@gmail.com>'
__docformat__ = 'restructuredtext en'
import urllib
from base64 im... | ashang/calibre | src/calibre/gui2/store/stores/woblink_plugin.py | Python | gpl-3.0 | 3,922 | [
"VisIt"
] | 9a77efe1718150613c9bdf6360d997955826b1dc5d6b311c89cb9bd2953c8278 |
#
# Copyright (C) 2010-2020 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... | fweik/espresso | testsuite/python/dipolar_direct_summation.py | Python | gpl-3.0 | 7,162 | [
"ESPResSo"
] | 528f5f19095883da7697f77f2f30b1481e9f0a1adcdc5360b1f2ca7a7e19326c |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2018 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | amjames/psi4 | psi4/share/psi4/databases/S22by5.py | Python | lgpl-3.0 | 176,348 | [
"Psi4"
] | a92f71b0cf4fcf66d8eb6a23fce6a84d3fbcf01a8a68437735b80a730e0aa386 |
#########################################################################
## This program is part of 'MOOSE', the
## Messaging Object Oriented Simulation Environment.
## Copyright (C) 2014 Upinder S. Bhalla. and NCBS
## It is made available under the terms of the
## GNU Lesser General Public License version 2... | BhallaLab/moose-examples | snippets/switchKineticSolvers.py | Python | gpl-2.0 | 5,200 | [
"MOOSE"
] | 06b4f6c411056256c11c9e5902f4a98da55fc6e69ab58c4b462761bc61c12cec |
"""
Plotting utilities.
Wrappers to facilitate common plotting tasks using powerful third-party
libraries.
* :mod:`~fatiando.vis.mpl`: 2D plotting using matplotlib_
* :mod:`~fatiando.vis.myv`: 3D plotting using Mayavi_
.. _matplotlib: http://matplotlib.org/
.. _Mayavi: http://code.enthought.com/projects/mayavi/
---... | cmeessen/fatiando | fatiando/vis/__init__.py | Python | bsd-3-clause | 327 | [
"Mayavi"
] | aa78f35406d1a25c661be64fabc4aed5d32b1a10b431a2adab57c517056c691e |
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors:
#
# MDTraj is free software: y... | leeping/mdtraj | mdtraj/geometry/hbond.py | Python | lgpl-2.1 | 17,603 | [
"MDTraj"
] | 887c50bac384fa6e0f72ef2189eefb10a0bd56e674eef7399a297059464bbb0a |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module implements input and output processing from Gaussian.
"""
import re
import warnings
import numpy as np
import scipy.constants as cst
from monty.io import zopen
from pymatgen.core.composition import Compositi... | vorwerkc/pymatgen | pymatgen/io/gaussian.py | Python | mit | 59,327 | [
"Gaussian",
"pymatgen"
] | 0745ee1e40a845a5a31e1084b26b6edbd09f6485af0476c554609099d74a4ed4 |
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
# EDIT
#
# FROM HERE
author = 'Pedro Pinto da Silva'
download_url = 'https://github.com/PedrosWits/CasinoRoyale.py'
url = download_url
author_email = 'ppintodasilva@gmail.com'
version = '0.1'
dependencies = ['nose']
packag... | PedrosWits/CasinoRoyale.py | setup.py | Python | mit | 969 | [
"CASINO"
] | 42be481beb6459da54ffd5b258560d23509e6d51003c6c906b27ae926e954eeb |
#!/usr/bin/env python
# coding: utf-8
#
# Copyright 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 ... | AmesianX/dynamorio | make/upload.py | Python | lgpl-2.1 | 100,286 | [
"VisIt"
] | 3f1eddb20920631716373d87effe62b821eef239b07d074fa89750b679869bef |
import os
import mock
from headphones.unittestcompat import TestCase, TestArgs
from headphones.softchroot import SoftChroot
from headphones.exceptions import SoftChrootError
class SoftChrootTest(TestCase):
def test_create(self):
""" create headphones.SoftChroot """
cf = SoftChroot('/tmp/')
... | jetskijoe/headphones | headphones/softchroot_test.py | Python | gpl-3.0 | 3,419 | [
"ADF"
] | 01612456f1b0e610344d18e5a56c6ea82b8774bd69b7241e7fec03aaa66bb07d |
#usage: python copyrightify <base_dir>
#apply copyright header block to all relevant files
import argparse
import os
from datetime import date
#extensions to apply copyright header block to
default_extensions = [ "scala" ]
year = date.today().year
copyright = "/*\n" + " * Copyright (c) " + str(year) +" Oracle and/o... | TiarkRompf/lancet | utl/copyrightify.py | Python | agpl-3.0 | 2,531 | [
"VisIt"
] | de22e6d42369c54c8092198e08083102a02fd08032af3637efa8ce629cc6785a |
import enum
import sys
import unittest
from enum import Enum, IntEnum, unique, EnumMeta
from pickle import dumps, loads, PicklingError, HIGHEST_PROTOCOL
pyver = float('%s.%s' % sys.version_info[:2])
try:
any
except NameError:
def any(iterable):
for element in iterable:
if element:
... | viger/docker | proxy/proxy/code/default/python27/1.0/lib/noarch/enum/test.py | Python | mit | 66,740 | [
"MOE"
] | 664434dcdea0a6ec5f97689b80d3b9177ecfef9f9968810ce292f45012fb5b06 |
import os
import imp
from setuptools import setup, find_packages
version_file = os.path.abspath("be/version.py")
version_mod = imp.load_source("version", version_file)
version = version_mod.version
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Appro... | mottosso/be | setup.py | Python | lgpl-2.1 | 1,239 | [
"VisIt"
] | 6bae58064d62a5425eb173ea607bd9cc3bccd16281016a185fa7efa64a22aa57 |
# Copyright (C) 2010 CAMd
# Copyright (C) 2010 Argonne National Laboratory
# Please see the accompanying LICENSE file for further information.
"""Module for high-level BLACS interface.
Usage
=====
A BLACS grid is a logical grid of processors. To use BLACS, first
create a BLACS grid. If comm contains 8 or more ra... | robwarm/gpaw-symm | gpaw/blacs.py | Python | gpl-3.0 | 21,636 | [
"GPAW"
] | d725278bc4f011a29b3a08003a077661d1a3778e60c55305b32cdf2b8e90b2a5 |
"""
pipeline_expression.py - analysis of expression data
====================================================
Purpose
-------
This pipeline predicts gene that are differentially expressed.
This pipeline uses the bioconductor package.
Usage
-----
Type::
python <script_name>.py --help
for command line help.
C... | CGATOxford/CGATPipelines | obsolete/pipeline_expression.py | Python | mit | 10,980 | [
"Bioconductor"
] | 3220ae110bdfc857250f31793cf1872de592453989223de51434f8aafd9a65e3 |
#!/usr/bin/env python
# Copyright 2012, 2013 The GalSim developers:
# https://github.com/GalSim-developers
#
# This file is part of GalSim: The modular galaxy image simulation toolkit.
#
# GalSim is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published... | mardom/GalSim | devel/external/time_photon_shooting/time_exponential.py | Python | gpl-3.0 | 2,879 | [
"Galaxy"
] | eeb77d5bb5fe6bc999f1247c7e0cd1b11a237bdf9331d6c00cfc30f14ec8c006 |
"""Test class for the content management tests.
:Requirement: Content Management
:CaseAutomation: Automated
:CaseLevel: Component
:CaseComponent: ContentManagement
:Assignee: ltran
:TestType: Functional
:CaseImportance: High
:Upstream: No
"""
import re
import pytest
from nailgun import client
from nailgun impo... | JacobCallahan/robottelo | tests/foreman/api/test_contentmanagement.py | Python | gpl-3.0 | 56,146 | [
"Galaxy"
] | 49e98d8d88da92015386202d1dc999c8c8ddb75c613b96f48444e635df320e39 |
#!/usr/bin/env python
"""
A script to analyse FHI-aims simulations
@author Tomas Lazauskas, 2016
@web www.lazauskas.net
@email tomas.lazauskas[a]gmail.com
"""
import copy
import os
import sys
import numpy as np
from optparse import OptionParser
import source.Atoms as Atoms
import source.Fhiaims as FHIaims
import ... | tomaslaz/Analysis-Toolkit | DM_FHIaims_Analysis.py | Python | gpl-3.0 | 6,055 | [
"FHI-aims"
] | 7a78ba3ee8eeccef2ca0bc8bbb7187408f61fd269a619a088223840c080dea0b |
#!/usr/bin/env python
# encoding: utf-8
"""PGEM test configuration model.
Default connect to configuration.db which save the test items settings.
"""
__version__ = "0.1"
__author__ = "@boqiling"
__all__ = ["PGEMConfig", "TestItem"]
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column,... | fanmuzhi/UFT | src/UFT/backend/configuration.py | Python | gpl-3.0 | 3,622 | [
"CRYSTAL"
] | 6fdd59c8b61d67c7abb4e48eb95a0315413efce1d9297ba66bdb2e33ab887510 |
#
# 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
m = 2000
n = 4000
testMehrotra = True
testIPF... | birm/Elemental | examples/interface/QPDirect.py | Python | bsd-3-clause | 4,233 | [
"Gaussian"
] | b9c300e0eb3d8d8dab2379c37e10aa054e7bda5a9b0ea0340b22f719f413e8d7 |
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Image pipeline
reader = vtk.vtkImageReader()
reader.GetExecutive().SetReleaseDataFlag(0,0)
reader.SetDataByteOrderToLittleEndian()
reader.SetDataExtent(0,63,0,63,1,93)
re... | hlzz/dotfiles | graphics/VTK-7.0.0/Imaging/Core/Testing/Python/TestAllFlips.py | Python | bsd-3-clause | 1,250 | [
"VTK"
] | bf334c0d8a2399a3200ac7f5a8073808bef0e9b14ad44cd977a6c0db6de73380 |
#/usr/bin/python
from datetime import datetime
import sys
import optparse
import os
import time
import logging
assert sys.version_info[:2] >= ( 2, 4 )
new_path = [ os.path.join( os.getcwd(), "lib" ) ]
new_path.extend( sys.path[1:] ) # remove scripts/ from the path
sys.path = new_path
from galaxy import eggs
import pk... | volpino/Yeps-EURAC | scripts/galaxy_messaging/server/galaxydb_interface.py | Python | mit | 6,462 | [
"Galaxy"
] | c8111352843f9b255daabee1d593eea0e3672633f952589715ee7c9469c7d3b0 |
#!/usr/bin/env python
# encoding: utf-8
#| Copyright Inria May 2015
#| This project has received funding from the European Research Council (ERC) under
#| the European Union's Horizon 2020 research and innovation programme (grant
#| agreement No 637972) - see http://www.resibots.eu
#|
#| Contributor(s):
#| - Jean-Bap... | jbmouret/limbo | waf_tools/openmp.py | Python | gpl-3.0 | 4,024 | [
"Gaussian"
] | 89251a2bc142d90709424f4de78af92cc6529bfbefb137ee891e1627a57d0fec |
#!/usr/bin/env python3
# Read two vcf files side-by-side. If it finds a position in the 1st VCF that
# doesn't exist in the 2nd VCF, it'll have a particular output, i.e., variant to
# reference. If it finds a position in the 2nd VCF that doesn't exist in the
# 1st VCF, it'll have a particular output, i.e., reference... | razZ0r/somaticseq | src/somaticseq/vcf/vcf.py | Python | bsd-2-clause | 19,405 | [
"pysam"
] | f84292eac72d56e2ab7ae05d568419459930a1c1282414761fdc77a955fc5df0 |
# 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... | jiajiechen/mxnet | example/reinforcement-learning/a3c/a3c.py | Python | apache-2.0 | 9,725 | [
"Gaussian"
] | 51660ef35b67a332f3634c6ac1b159bec76f2a85504bdebc8b9505997685e3bd |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | johnchase/scikit-bio | skbio/stats/distance/_base.py | Python | bsd-3-clause | 29,234 | [
"scikit-bio"
] | ffa394b5461f0050ff00018e02ad286e7456b8a18ea77513f01085791f924887 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Plot an histogram with a text stats summary
See:
- https://stackoverflow.com/questions/8482588/putting-text-in-top-left-corner-of-matplotlib-plot
"""
import numpy as np
import matplotlib.pyplot as plt
###############################################################... | jeremiedecock/snippets | python/matplotlib/text_box.py | Python | mit | 1,785 | [
"Gaussian"
] | bd11005e096efd61a2c336f7ab98ac3313f615e304eb31f9a8413c271bf8293a |
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Eric Larson <larson.eric.d@gmail.com>
#
# License: Simplified BSD
import numpy as np
from scipy import linalg
from copy import deepcopy
import re
from .cov import read_cov, _get_whitener_data
from .io.pick import pick_types, channel_ty... | cmoutard/mne-python | mne/dipole.py | Python | bsd-3-clause | 26,290 | [
"Mayavi"
] | cdc1e9d9c8b5fca3b2f366dd5693380e42892e22b6087b929cbb20ba4b621cf4 |
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | marmyshev/transitions | openlp/plugins/songs/lib/openlyricsimport.py | Python | gpl-2.0 | 4,161 | [
"Brian"
] | 6d3cb347517a8a7c29ebe1dfd828f933a3335d983a83e25ed26790cef46f6ea1 |
#
# 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/zoo/chronos/autots/model/auto_lstm.py | Python | apache-2.0 | 4,411 | [
"ORCA"
] | 253b8a1bafdc12ffcc03c81b50f772a9ddcc01f992ea7e1af02cb39449f8205e |
#****************************************************************************
# This file has been modified from its original version. It has been
# formatted to fit your irc bot.
#
# The original version is a nifty PyQt application written by Douglas Bell,
# available at http://convertall.bellz.org/
#
# Below is the ... | ProgVal/Limnoria-test | plugins/Math/local/convertcore.py | Python | bsd-3-clause | 42,514 | [
"Avogadro"
] | 88bae4b50c0f4bd21f633edbdf17822c8c8b6f53b17ec672f931ca3c95e47281 |
# -*- coding: utf-8 -*-
# Copyright (c) 2016-2017, Zhijiang Yao, Jie Dong and Dongsheng Cao
# All rights reserved.
# This file is part of the PyBioMed.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the PyBioMed source tree.
"""
#####... | gadsbyfly/PyBioMed | PyBioMed/PyMolecule/Scaffolds.py | Python | bsd-3-clause | 3,302 | [
"RDKit"
] | 8ec31c5e21a34b2b915b8e676a55f7d1f03961b64f8299860eed80976ca69e2f |
import numpy as np
size = np.array([45.0,
55.0,
65.0,
75.0,
85.0,
95.0,
105.0,
110.0,
120.0,
135.0,
145.0,
155.0,
160.0,
170.0,
185.0,
195.0,
205.0,
215.0,
225.0])
timing_LowFreq = np.array([ 18.684,
31.671,
57.522,
72.086,
107.04,
139.11,
177.29,
213.87,
287.15,
315.41,
646.75,
490.08,
599.22,
776.20,
864.50,
943.94... | dinrker/Ray_FEM | Plots/python_scripts/paper1/plot_scaling_fast_solver.py | Python | mit | 2,262 | [
"Gaussian"
] | b99f9f16660ff697d05c3ca12734ac65645f002fbcba1938a5d7cd945cfbb6a8 |
#!/usr/bin/python
MINIMUM_LENGTH = 1 #bp
############################
##### DEF1 : Get Pairs #####
############################
def get_pairs(fasta_file_path):
F2 = open(fasta_file_path, "r")
list_pairwises = []
while 1:
next2 = F2.readline()
if not next2:
break
if... | abice-sbr/adaptsearch | 08_1_postProcessing_of_pairwise_v3.0.py | Python | gpl-3.0 | 5,552 | [
"BLAST"
] | a13b5ebcc6d1b6a770db85fa0af5049d58f15b8ac57d0a5334807c8acf175c49 |
from ASE.Filters.HomogeneousStrain import HomogeneousStrain
_HomogeneousStrain = HomogeneousStrain
__docformat__ = "restructuredtext en"
class HomogeneousStrain(_HomogeneousStrain):
"""Modify the supercell while keeping the scaled positions fixed.
Presents the strain of the supercell as the generalized posit... | auag92/n2dm | Asap-3.8.4/Python/asap3/Filters/HomogeneousStrain.py | Python | mit | 2,117 | [
"ASE"
] | b62d6187e88fe11d3fdac8d7084f8b796bef7be27bf453589fc44021dd6e397e |
# -*- coding: utf-8 -*-
import math, random, copy
import numpy as np
def expectation_maximization(t, nbclusters=2, nbiter=3, normalize=False,\
epsilon=0.001, monotony=False, datasetinit=True):
"""
Each row of t is an observation, each column is a feature
'nbclusters' is the number of seed... | amudalab/concept-graphs | document retrieval/em clust.py | Python | mit | 8,282 | [
"Gaussian"
] | 704dd8f89d6c6f01f695d8ce97a02b40ddb0d171c0aeece61b82ed95c62dae91 |
# author: brian dillmann
# for rscs
import re
class Evaluator:
# devices should be a DeviceManager Object
def __init__(self, devices):
self.devices = devices
def evaluate(self, condition):
try:
self.checkLegalExpression(condition)
except:
raise ValueError(e)
# extract device name from quotes in con... | dillmann/rscs | lib/Graph/Evaluator.py | Python | mit | 1,059 | [
"Brian"
] | d751e0f723f35c3e6d9fd7f993160b001f4b5a36936d4b8dc89c655ab94cc03a |
#!/usr/bin/python
#
# Copyright 2014 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 b... | dietrichc/streamline-ppc-reports | examples/adwords/v201406/basic_operations/add_text_ads.py | Python | apache-2.0 | 3,105 | [
"VisIt"
] | 63ca4c392e1b3e85ae23a44ffee1a0fac9c3fbc16e2fe3d0c31e8744245bb7f7 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from urllib.parse import urlsplit, urlparse, parse_qs, urljoin
except:
from urlparse import urlsplit, urlparse, parse_qs, urljoin
import re
import os
import requests
import time
import json
from base64 import b64decode
import copy
HTTP_HEADER = {
"User-Ag... | mrquim/mrquimrepo | script.module.schism.common/lib/unshortenit/base.py | Python | gpl-2.0 | 14,569 | [
"ADF"
] | 5980493341b9fa577b77437a9e4f463af72fcbbc59c3b788423ca89189bc8d17 |
from __future__ import print_function
'''
python module for ASE2-free and Numeric-free dacapo
U{John Kitchin<mailto:jkitchin@andrew.cmu.edu>} December 25, 2008
This module supports numpy directly.
* ScientificPython2.8 is required
- this is the first version to use numpy by default.
see https://wiki.fysik.dtu.dk/... | suttond/MODOI | ase/calculators/jacapo/jacapo.py | Python | lgpl-3.0 | 150,723 | [
"ASE",
"Gaussian",
"NetCDF"
] | 537d930cbbc43a92b3c88fb3ec87f4fb64f6ab3a2433a82c716947fe84a3d9cb |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This package implements modules for input and output to and from CREST
"""
| materialsproject/pymatgen | pymatgen/io/xtb/__init__.py | Python | mit | 173 | [
"pymatgen"
] | 36b673ff3ecafecee4e49c2a55708fba3129c536edbe55e2365a662e78079d02 |
"""Markowik command line and programmatic interface."""
import argparse
import codecs
import re
import sys
import markdown
from markowik import util
from markowik.mdx import MarkowikExtension, BadURL, STRIPTAG
# =============================================================================
# programmatic interface
#... | obensonne/markowik | src/markowik/main.py | Python | mit | 3,758 | [
"VisIt"
] | f3a55417df62c020ad77734ee98d05386e3a2ab56d84af23bf9e20e4e4ea79ec |
def guess_filetype(ext, magic_byte=None):
ext_to_type = dict((a, plg.file_type) for plg in get_plugins() \
for a in plg.abbrevs)
ftype = ''
ftype = ext_to_type.get(ext, '')
#TODO: move magic byte stuff into modules
if ftype == '' and magic_byte is not None:
if magic_byte == 0x3E:
... | bovee/Ochre | ochre/FileFormats/FileFormats.py | Python | gpl-3.0 | 1,704 | [
"Biopython"
] | f7377d85b0e8532a3809d6b56b6722ef228f545fb8e0060fb756618242718e98 |
"""
Test Config for External Libraries
"""
__RCSID__ = "$Id$"
import unittest
import logging
from StringIO import StringIO
from DIRAC.FrameworkSystem.test.testLogging.Test_Logging import Test_Logging, gLogger, cleaningLog
class Test_ConfigForExternalLibs(Test_Logging):
"""
Test enableLogsFromExternalLibs meth... | arrabito/DIRAC | FrameworkSystem/test/testLogging/Test_ConfigForExternalLibs.py | Python | gpl-3.0 | 4,175 | [
"DIRAC"
] | 5876de61eb3f11258f1e676d1c8edeec35cd14bd16584d2bfc6a887ba41f9bc1 |
"""
Example generation for the scikit learn
Generate the rst files for the examples by iterating over the python
example files.
Files that generate images should start with 'plot'
"""
from __future__ import division, print_function
from time import time
import ast
import os
import re
import shutil
import traceback
i... | NelisVerhoef/scikit-learn | doc/sphinxext/gen_rst.py | Python | bsd-3-clause | 40,198 | [
"VisIt"
] | e63eba2230adf29c1474dd242d1ffda94b375060bfef1beb0abb7e042bda2eb7 |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | gluke77/rally | tests/hacking/checks.py | Python | apache-2.0 | 20,182 | [
"VisIt"
] | 7b8c168a6212eb01468812efab6c7a7f4c3dc47154cca126fa3668e5c64f0b2b |
"""
pyNEAT
Copyright (C) 2007-2008 Brian Greer
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in ... | liquidkarma/pyneat | pyNEAT/Trait.py | Python | gpl-2.0 | 1,881 | [
"Brian"
] | 5ee3e56fd58a3358e0a879c782ec04ae8c69d0bfd259ef8cd02bfd7aa62f1759 |
from __future__ import absolute_import
from collections import defaultdict, namedtuple
from sc2reader.constants import *
from sc2reader.data import GameObject, ABILITIES
from sc2reader.utils import PersonDict, Selection, read_header, AttributeDict, Length
Location = namedtuple('Location',('x','y'))
Details = namedtu... | dsjoerg/sc2reader | sc2reader/objects.py | Python | mit | 17,817 | [
"VisIt"
] | e1b85e1bf86878d4c2c704efbbe865c44094a43c3a896b113c8d15f2dedf26f6 |
import vtk
import numpy as np
import matplotlib.pyplot as plt
def vtkmatrix_to_numpy(matrix):
m = np.ones((4, 4))
for i in range(4):
for j in range(4):
m[i, j] = matrix.GetElement(i, j)
return m
"""
Get transformation from viewpoint coordinates to
real-world coordinates. (tmat)
"""
... | lucasplus/MABDI | scripts/Plot_Depth_Image_To_Z.py | Python | bsd-3-clause | 4,777 | [
"VTK"
] | 45af1876d86019c1971d537791c722aadfe85015ce3758b1c29853bd2a6fa89d |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.