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 |
|---|---|---|---|---|---|---|---|
##
# Copyright (C) 2012 Jasper Snoek, Hugo Larochelle and Ryan P. Adams
#
# This code is written for research and educational purposes only to
# supplement the paper entitled
# "Practical Bayesian Optimization of Machine Learning Algorithms"
# by Snoek, Larochelle and Adams
# Advances in Neural Information Processing S... | recursix/spearmint-salad | spearmint_salad/old/_spearmint/chooser/GPEIChooser.py | Python | bsd-3-clause | 14,002 | [
"Gaussian"
] | 8325cc50283576a264556457527d48941c7fde30d50b864787a07b19f5891b0c |
#!/usr/bin/env python
#==========================================================================
#
# Copyright Insight Software Consortium
#
# 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 Licen... | eile/ITK | Utilities/Maintenance/BuildHeaderTest.py | Python | apache-2.0 | 5,157 | [
"VTK"
] | 1c0e73d67acac29b6436e8745234a5bb310cbb125ec22a60d7ffae5d0fbd8668 |
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 25 18:09:30 2017
INPUT:
tvec: N x 6 matrix where each row is a time vector
data: N x 4 matrix where each row is a set of measurements
OUTPUT:
Screen output: a table of descriptive statistics
min 25% 50% 75% max
... | danmark2312/Project-Electricity | functions/statistics.py | Python | gpl-3.0 | 1,375 | [
"MOE"
] | e094f8b98a5781e45c353ddda0f6f4c155c628fc73272a464d2b01e4c3bdb0b3 |
## v1.0a
## sannes
import urllib2, httplib, socket, sys, threading
from re import search
from time import sleep
from random import randint
from optparse import OptionParser
url = urllib2
parser = OptionParser()
Hello = """
_____
/ ___/____ _____ ____ ___ _____
\_... | knightmare2600/d4rkc0de | others/Webclicker.py | Python | gpl-2.0 | 8,634 | [
"VisIt"
] | 47b55321d218af26aee967a9019d15a9f556dd738dba6be78f2d285f2a404386 |
# Jython Database Specification API 2.0
#
# $Id: dbextstest.py 2101 2002-05-10 16:11:41Z bzimmer $
#
# Copyright (c) 2001 brian zimmer <bzimmer@ziclix.com>
import dbexts, runner, tempfile, os
from random import random
class dbextsTestCase(runner.SQLTestCase):
def setUp(self):
template = """
[def... | DarioGT/OMS-PluginXML | org.modelsphere.sms/lib/jython-2.2.1/Lib/test/zxjdbc/dbextstest.py | Python | gpl-3.0 | 8,655 | [
"Brian"
] | 416cedc2159ea631f8899d110cace0c436d968762dd0fa64446bf6a1261dcda3 |
""" An (master) roi experiment for the catreward project. """
from roi.base import Roi, Mean
class Catreward(Roi):
""" A Roi analysis class, customized for the catreward project. """
def __init__(self, TR, roi_name, trials, durations, data):
Roi.__init__(self, TR, roi_name, trials, durations, data)
... | parenthetical-e/fmri | catreward/roi/exps/base.py | Python | bsd-2-clause | 36,690 | [
"Gaussian"
] | 75279206d285d39134d22e243011acdcc4cc854454d8c71b85526702a95a5b47 |
"""Header value parser implementing various email-related RFC parsing rules.
The parsing methods defined in this module implement various email related
parsing rules. Principal among them is RFC 5322, which is the followon
to RFC 2822 and primarily a clarification of the former. It also implements
RFC 2047 encoded w... | timm/timmnix | pypy3-v5.5.0-linux64/lib-python/3/email/_header_value_parser.py | Python | mit | 103,889 | [
"CRYSTAL"
] | 873260d6ca45f4f0f3ab1a21aa85f22ce272822ce8c7447047d38830108622df |
#!/usr/bin/env python
# Author: Andrew Jewett (jewett.aij at g mail)
# License: MIT License (See LICENSE.md)
# Copyright (c) 2013
# All rights reserved.
"""
lttree_postprocess.py
This is a stand-alone python script which checks the files created by
lttree.py to insure that the standard instance-variables... | smsaladi/moltemplate | moltemplate/lttree_postprocess.py | Python | bsd-3-clause | 16,125 | [
"LAMMPS"
] | a884c3cca2e320f35f53875bd503bead11281b458c8fcefd93515de19a284b6c |
#!/usr/bin/env python
#===============================================================================
# Copyright 2017 Geoscience Australia
#
# 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... | alex-ip/geophys_utils | geophys_utils/_netcdf_point_utils.py | Python | apache-2.0 | 50,413 | [
"NetCDF"
] | cf0d65d2901ff6b16acef3a94534dd9acb6f79057a12090b412752cde6b327a4 |
# -*- coding: utf-8 -*-
#
# Google Genomics documentation build configuration file, created by
# sphinx-quickstart on Wed Apr 30 15:58:16 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 fil... | harshinamdar/start-here | docs/source/conf.py | Python | apache-2.0 | 14,412 | [
"Bioconductor"
] | 0b30ca7df4537bf6e3a7069705a53b81267d5ea019efd4312801c767675f6c54 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import numpy as np
import SimpleITK as sitk
import os
import math
import sys
import subprocess
import tempfile
import shutil
import requests
import matplotlib.pyplot as plt
from matplotlib.ticker import ScalarFormatter
from itertools im... | openconnectome/ndreg | ndreg-old/ndreg-old.py | Python | apache-2.0 | 63,081 | [
"VTK"
] | 9d57a005d8d71be89e57b86974edd6c8641964c3cf01799e4caa77d73ca780aa |
#!/usr/bin/env python
"""Performs a molecular optimization using CP2K and prints local PDOS
projected on subsets of atoms based on the atom type and coordination number."""
import argparse
import itertools
import logging
import os
from typing import Dict, List
import pkg_resources
from nanoCAT.recipes import coordinat... | SCM-NV/qmworks-namd | scripts/qmflows/coordination_ldos.py | Python | mit | 5,877 | [
"CP2K"
] | e365a933817fee00f43d97727f1928d743a85bbcd9ffa6f574643dbb91fb18fa |
#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
# ... | SKIRT/PTS | modeling/config/make_ssfr_maps.py | Python | agpl-3.0 | 1,172 | [
"Gaussian"
] | c8f2a7e368fb0e50eab72d670a56514464296b238320b5c5ec470887fdf06ce6 |
###############################################################################
# #
# # Copyright 2011-2013 Tavendo GmbH
# # Copyright 2013 Dominique Hunziker <dominique.hunziker@gmail.com>
# # Copyright 2013 Dhananjay Sathe <dhananjaysathe@gmail.com>
# #
# # Licensed under the Apache License, Version 2.0 (th... | rapyuta/autobahn_rce | autobahn/autobahn/websocket.py | Python | apache-2.0 | 157,695 | [
"VisIt"
] | f211ce0b5eba24a0461c9ee3b5037071ea0899d81577295315ec1f0256a867a6 |
from __future__ import division
from common import recover_xor_key, score_text
from itertools import cycle, izip, islice, tee
# Taken from https://docs.python.org/2/library/itertools.html#recipes
def _pairwise(iterable):
"""s -> (s0,s1), (s1,s2), (s2, s3), ..."""
a, b = tee(iterable)
next(b, None)
retu... | ericnorris/cryptopals-solutions | cryptopals/set1/challenge_06.py | Python | mit | 2,500 | [
"ADF"
] | 8d394a3b5d99c5ccc74ce9d935371855ef7fe1fb05996e6f0d135063024572b8 |
import numpy
import vtk
from .raw import points as to_vtk_points
from .raw import vertices as to_vtk_vertices
from numpy2vtk.exceptions import Numpy2VtkFormatException
def vertices(points, z_index=0):
"""
Returns the VTK-representation of a number of vertices that are defined by the points array.
Args:
... | selaux/numpy2vtk | numpy2vtk/data/vertices.py | Python | lgpl-3.0 | 1,385 | [
"VTK"
] | 46bc9c9a2da4807499c34f5c9a57e5033b5bce4f438f043cac1b4f6e988138fe |
"""
https://leetcode.com/explore/challenge/card/february-leetcoding-challenge-2021/585/week-2-february-8th-february-14th/3639/
"""
from typing import List
class Solution:
def is_bipartite(self, graph: List[List[int]]) -> bool:
# depth first search on graph
# color each node 0 or 1 depending on th... | kalyons11/kevin | kevin/leet/is_graph_bipartite.py | Python | mit | 1,883 | [
"VisIt"
] | a8d86649b3422d365f1a6c518de0e78e502c4d1dfe646586cc5b5e6e2b9bd33e |
#!/usr/bin/env python3
#
# (C) 2017, Markus Wildi, wildi.markus@bluewin.ch
#
# 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, or (at your option)
# any later version.
#
... | jstrobl/rts2 | scripts/dome_target_az.py | Python | lgpl-3.0 | 15,268 | [
"VisIt"
] | 94526ea99f4420e42a9950de05d505a0656a87c79660d40aee14baf0aff40e50 |
""" This is a test of the chain
SiteStatus -> ResourceStatusClient -> ResourceStatusDB
It supposes that the DB is present, and that the service is running
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# pylint: disable=invalid-name,wrong-impor... | ic-hep/DIRAC | tests/Integration/ResourceStatusSystem/Test_SiteStatus.py | Python | gpl-3.0 | 5,988 | [
"DIRAC"
] | 31db1c397a827469122b9a75e885e376f21c40638f993d8f1882535361ed3d6f |
import matplotlib.pyplot as plt
import numpy as np
import dpp
import math
t = 0.005
x = []
y = []
for i in range(0, int(1/t)):
a = 2*math.pi*float(i)*t
x.append(math.cos(a))
y.append(math.sin(a))
x = np.array(x)
y = np.array(y)
k = 50
idx = np.arange(x.size)
np.random.shuffle(idx)
x_uniform = x[idx[:k]]
y_unif... | bdol/bdol-ml | dpp/unit_ring.py | Python | lgpl-3.0 | 1,112 | [
"Gaussian"
] | 854cbe559e2c3a18ed362f60d18955d5b2e2161704725d2473f6d852f97ff41f |
import numpy
from chainer.backends import cuda
from chainer.functions.connection import deconvolution_2d
from chainer import initializers
from chainer import link
from chainer.utils import argument
from chainer import variable
class Deconvolution2D(link.Link):
"""__init__(self, in_channels, out_channels, ksize=... | ktnyt/chainer | chainer/links/connection/deconvolution_2d.py | Python | mit | 7,583 | [
"Gaussian"
] | 1c4e46d754fc84e506415797863f0c39128aee6711af65209843f6b91805a827 |
"""A simple wrapper round BWA because I got tired of writing out the invocations
bwa mem -t 8 -p ../data/red_alga.fa.gz Out/reads_c.fq > Out/temp.sam
samtools view -Sb Out/temp.sam > Out/temp.bam
samtools sort Out/temp.bam Out/reads
samtools index Out/reads.bam
Usage:
pybwa <ref> <fastq> <bam> [-S] [-P] ... | latticelabs/Mitty | mitty/util/pybwa.py | Python | gpl-2.0 | 1,808 | [
"BWA"
] | 7fa2da5bf47ff8c86730f5976ccc2d86163ce0c8f5567993998334a7f838b422 |
import sys
from galaxy import util
from galaxy.web.base.controller import *
from galaxy.model.orm import *
# Older py compatibility
try:
set()
except:
from sets import Set as set
import logging
log = logging.getLogger( __name__ )
class LibraryAdmin( BaseController ):
@web.expose
@web.require_admin
... | volpino/Yeps-EURAC | lib/galaxy/web/controllers/library_admin.py | Python | mit | 64,232 | [
"Galaxy"
] | ef45c6be41771931fb7bfc739b41a77e009b7de971fd0a9eeb90a3185a4c4da8 |
# $Id$
# Copyright (C) 2005 Greg Landrum and Rational Discovery LLC
#
# 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 of the License, or (at your option) any later ve... | rdkit/rdkit | rdkit/sping/ReportLab/pidReportLab.py | Python | bsd-3-clause | 10,479 | [
"RDKit"
] | 5c1b8ea9ff8e9a56d4f8cdf7963a0e33bc85021e47fded5b0da4c414dbe2dcff |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# DNSChef is a highly configurable DNS Proxy for Penetration Testers
# and Malware Analysts. Please visit http://thesprawl.org/projects/dnschef/
# for the latest version and documentation. Please forward all issues and
# concerns to iphelix [at] thesprawl.org.
DNSCHEF_V... | ru-faraon/dnschef | dnschef.py | Python | bsd-3-clause | 30,691 | [
"VisIt"
] | 63da1b33e723b28e30a706bb383b861c19bac9bb48d263adb66f6233657a433b |
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Matti Hamalainen <msh@nmr.mgh.harvard.edu>
#
# License: BSD (3-clause)
import numpy as np
import os
import os.path as op
from scipy import sparse, linalg
from copy import deepcopy
from .io.constants import FIFF
from .io.tree import dir... | trachelr/mne-python | mne/source_space.py | Python | bsd-3-clause | 92,749 | [
"Mayavi"
] | 32f3d693d8d26378f6bb53b5abfc6ce1eb4af332a3674671d4043a8bdeaa94c3 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import os
import unittest
import warnings
import pandas as pd
from pymatgen.core.structure import Structure
from pymatgen.analysis.magnetism.heisenberg import HeisenbergMapper
from pymatgen.util.testing import PymatgenTest
... | vorwerkc/pymatgen | pymatgen/analysis/magnetism/tests/test_heisenberg.py | Python | mit | 2,719 | [
"pymatgen"
] | e946e451119535eb77ec8e6bf7a415c70e771a24c2e8cb653386027e1c0527b0 |
from __future__ import print_function, absolute_import
import os
import re
import subprocess
from operator import itemgetter
class InvalidResiduesError(Exception):
pass
def get_pdb_seq(pdb, chain):
'''
Read a PDB[pdb] input and outputs a sequence of a desired chain[chain].
'''
import modeller
... | salilab/cryptosite | lib/cryptosite/cleaning.py | Python | lgpl-2.1 | 5,864 | [
"BLAST"
] | bff9830f7f2933e64036d16f318701ad01a5b16bd29c5eaa4ea932c652e79b8a |
from article_metrics.utils import lmap
from .logic import generic_ga_filter
def query_processor_frame_1(ptype, frame):
adhoc = lmap(lambda path: "ga:pagePath==%s" % path, [
"/from-ancient-dna-to-decay-an-interview-with-jessica-metcalf",
"/food-for-thought-an-interview-with-ana-domingos",
"... | elifesciences/elife-metrics | src/metrics/interview_type.py | Python | gpl-3.0 | 1,959 | [
"Brian"
] | e21bae6e185212adbcfed7b16ca79d9fcebe5099360a3fcc338a2e09ea4de5b1 |
# copyright 2003-2015 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of pylint.
#
# pylint 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 Fre... | justathoughtor2/atomicApe | cygwin/lib/python2.7/site-packages/pylint/reporters/ureports/nodes.py | Python | gpl-3.0 | 5,239 | [
"VisIt"
] | e76aeed8e9924850e5e1f2302c03fcd6baee715d5eacaf50ca05e6b0aab985d3 |
import re
from typing import Any, Dict
from antlr4.Token import CommonToken
from cleo.styles import OutputStyle
from sdoc import sdoc2
from sdoc.antlr.sdoc2Parser import sdoc2Parser
from sdoc.antlr.sdoc2ParserVisitor import sdoc2ParserVisitor
from sdoc.sdoc.SDocVisitor import SDocVisitor
from sdoc.sdoc2.Position impo... | SDoc/py-sdoc | sdoc/sdoc2/SDoc2Visitor.py | Python | mit | 7,187 | [
"VisIt"
] | e034ab1cef1d01288fb1e7b458c68da0d53b6388358922389243a49368a88899 |
#!/usr/bin/env python
"""
Script that emulates the behaviour of a shell to edit the CS config.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
from DIRAC.Core.Base import Script
from DIRAC.Core.Utilities.DIRACScript import DIRACScript
# Inva... | yujikato/DIRAC | src/DIRAC/ConfigurationSystem/scripts/dirac_configuration_shell.py | Python | gpl-3.0 | 604 | [
"DIRAC"
] | 7d0082d9ca679edbfaaefcc20aac6f195ae761463a5eb526009f0d7bda59d6c9 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Copyright (C) 2015 Dato, Inc.
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the DATO-PYTHON-LICENSE file for details.
'''
import sys
import parser
import symbol
import token
import ast
import inspect
import ... | chen0031/Dato-Core | src/unity/python/graphlab_util/lambda_closure_capture.py | Python | agpl-3.0 | 9,429 | [
"VisIt"
] | 27959cf3b0cfc641d902cea40412bfe8cee503313828b2482408ed0983b08ef1 |
# -*- coding: utf-8 -*-
"""
Default Django settings. Override these with settings in the module pointed to
by the DJANGO_SETTINGS_MODULE environment variable.
"""
from __future__ import unicode_literals
# This is defined here as a do-nothing function because we can't import
# django.utils.translation -- that module d... | aisipos/django | django/conf/global_settings.py | Python | bsd-3-clause | 21,790 | [
"VisIt"
] | 21be8b3dc6ca30895320e18ab1d0dd779e4abc7b6095a9b3413cafb131cd7a0b |
#!/usr/bin/env python
# Luke Matarazzo
# Pen Testing - Email Scraper
import urllib2
from urlparse import urlparse
import re
import argparse
from BeautifulSoup import BeautifulSoup, SoupStrainer
from sys import exit
#create the email regex object once for efficiency
emailRegex = re.compile("[\w.%+-]+@[\w.-]+\.[a-zA-Z]... | bigshebang/pentesting | scraper.py | Python | bsd-3-clause | 5,321 | [
"VisIt"
] | 637779f2620970e5762989481df8136de0b91f8dcdd72fe77c20cdea5e370d7f |
# -*- coding: utf-8 -*-
import colorsys
from datetime import datetime, timedelta
import logging
from random import random
import re
import sys
from typing import Any, Dict, Tuple
import urllib
import urllib.parse
from django import forms
from django.conf import settings
from django.contrib.auth.models import User, Gr... | tomka/CATMAID | django/applications/catmaid/models.py | Python | gpl-3.0 | 74,716 | [
"NEURON"
] | 2cc45385dba38ef83cfffd50d3dc7ae76faec2273a449dba1958c82e8e7a088e |
"""
Find runs that match crAssphage with a minimum number of runs, a minimum alignment length, and a minimum percent
identity
"""
import os
import sys
import argparse
import pysam
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Count hits in a bam file")
parser.add_argument('-d', hel... | linsalrob/EdwardsLab | bam/count_bam_hits.py | Python | mit | 1,880 | [
"pysam"
] | 716b04d198fea28762b2818d4f2114ba20bf1528ee04e47e8f62bca73dbfc655 |
"""
Browser set up for acceptance tests.
"""
#pylint: disable=E1101
#pylint: disable=W0613
from lettuce import before, after, world
from splinter.browser import Browser
from logging import getLogger
from django.core.management import call_command
from django.conf import settings
from selenium.common.exceptions import... | PepperPD/edx-pepper-platform | common/djangoapps/terrain/browser.py | Python | agpl-3.0 | 6,336 | [
"VisIt"
] | a99196acae29830d28a550f0aeee9e6ba1bca00f74e6b292b65de44373c709f0 |
"""Result collection for daylight studies with several hours.
Use this PointInTime result grid to load the results from database for daylight factor,
vertical sky component, and point-in-time illuminance or radiation studies.
"""
from __future__ import division
from ...schedule import Schedule
from ..recipe.id import ... | ladybug-tools/honeybee | honeybee_plus/radiance/resultcollection/timeseries.py | Python | gpl-3.0 | 27,348 | [
"ASE"
] | 20ce1db9bc414263877d80f8ed54cc91c378ee072213507a402af7db12213bd2 |
##
# Copyright 2009-2020 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | pescobar/easybuild-easyblocks | easybuild/easyblocks/n/ncl.py | Python | gpl-2.0 | 8,924 | [
"NetCDF"
] | 4c570655874291e84bdad0d4b3208d1fa075493f51a6b4bddd5988a8a63b6575 |
#
# @file printRenderInformation.py
# @brief prints an overview of the render information in the given SBML file
# @author Frank Bergmann
#
# This file is part of libSBML. Please visit http:#sbml.org for more
# information about SBML, and the latest version of libSBML.
#
import sys
import os.path
fr... | TheCoSMoCompany/biopredyn | Prototype/src/libsbml-5.10.0/examples/python/render/printRenderInformation.py | Python | bsd-3-clause | 4,405 | [
"VisIt"
] | 76dd9a48c9b60717dce46d0e883ad335e200183c3687f3ec9a87b67033c96453 |
import os
from mpl_toolkits.basemap import Basemap, shiftgrid
import matplotlib.colors as colors
from scipy.signal import medfilt2d
import netCDF4
import pyroms
import pyroms_toolbox
from ROMS_bathy_smoother import *
#Grid dimension
Lm = 200
Mm = 150
# define the 4 corners of the grid
# first point is the top left ... | kshedstrom/pyroms | examples/stuff/make_scgrid.py | Python | bsd-3-clause | 3,455 | [
"NetCDF"
] | ddf912a914c1b2c4c1ac69e2a8b0947256c5de94b209ae1fdfc07f220b6b339e |
#%% Demo 4: Simple Image reconstruction
#
#
# This demo will show how a simple image reconstruction can be performed,
# by using OS-SART and FDK
#
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
# This file is part... | CERN/TIGRE | Python/demos/d04_SimpleReconstruction.py | Python | bsd-3-clause | 1,715 | [
"Gaussian"
] | d202f5da422b4a98d3d9d8a7b1074588a2e7de75de8cc3ae0a63dec026386d39 |
"""Sensor that can display the current Home Assistant versions."""
from datetime import timedelta
import logging
from pyhaversion import (
HaVersion,
HaVersionChannel,
HaVersionSource,
exceptions as pyhaversionexceptions,
)
import voluptuous as vol
from homeassistant.components.sensor import (
PLA... | jawilson/home-assistant | homeassistant/components/version/sensor.py | Python | apache-2.0 | 4,382 | [
"TINKER"
] | 066ae27f02692fd46eb6d94eff09f7f585524485bc50d392e1e1aefa496011ba |
# -*- coding: utf-8 -*-
# © 2018 Andrei Levin - Didotech srl (www.didotech.com)
from openerp.osv import fields, orm
class ResCompany(orm.Model):
_inherit = 'res.company'
_columns = {
'google_key': fields.char('Google API key', size=64, help="""To create your key:
- Visit the APIs console ... | iw3hxn/LibrERP | hr_attendance_position/models/company.py | Python | agpl-3.0 | 787 | [
"VisIt"
] | 73f6a6186531236492b2cff175006291dcd639bd063cca5834e42d12d4e30ecc |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Zappa CLI
Deploy arbitrary Python programs as serverless Zappa applications.
"""
from __future__ import unicode_literals
from __future__ import division
from past.builtins import basestring
from builtins import input, bytes
import argcomplete
import argparse
import... | juanantoniofm12/toonai | Zappa/zappa/cli.py | Python | mit | 100,264 | [
"VisIt"
] | 3be0916fd26f72e9b046be3211fad45e656884e9788cc4fb935653a742bf1441 |
import netCDF4 as nc
import numpy as np
float_type = 'f8'
# Get number of vertical levels and size from .ini file
with open('gabls1.ini') as f:
for line in f:
if(line.split('=')[0]=='ktot'):
kmax = int(line.split('=')[1])
if(line.split('=')[0]=='zsize'):
zsize = float(line.... | microhh/microhh2 | cases/gabls1/gabls1_input.py | Python | gpl-3.0 | 1,811 | [
"NetCDF"
] | 3b5c726d594e39740abed18935240d3c22cb48af1d1a020c9a8791733b2c9561 |
#!/usr/bin/env python
#=============================================================================================
# MODULE DOCSTRING
#=============================================================================================
"""
Utility functions to help setting up Yank configurations.
"""
#==================... | jchodera/yank | Yank/pipeline.py | Python | lgpl-3.0 | 13,242 | [
"Amber",
"Gromacs",
"MDTraj",
"OpenMM"
] | 01fa2d871e90df6d697b5b9566ab6423e378b8957dbd664b10d668998e1522aa |
from django.db import models
from django.contrib.auth.models import User
class Visit (models.Model):
id = models.AutoField(primary_key=True)
ip = models.CharField( max_length = 15 ) #may be this should be the key
host = models.CharField( max_length = 255 )
referer = models.CharField( max_length = 255 )... | keelhaule/alfanous | src/alfanous-django/wui/models.py | Python | agpl-3.0 | 648 | [
"VisIt"
] | 8fa118d02a1dd6f335839ea0ccbd80f8d34596cece56f23685b79e9039fb7005 |
import vtk
import numpy as np
class ThickenSurf():
def __init__(in_vtk_poly_data):
self.poly_data = in_vtk_poly_data
pass
def FindEdges(self):
pass
def MakeVertices(self):
pass
def MakeMesh(self):
pass
pass
| alinar/Molar | molar/VisTools.py | Python | gpl-2.0 | 268 | [
"VTK"
] | 2a0bdc7dff389cb4fc1320a8b7598c857f4911deb3a4902d57e99b543bf682ee |
#!/usr/bin/python3
from .notaclass import Nota
import argparse
import sys
import json
import os
import re
import textwrap
import datetime
import tempfile
from random import randint, seed
from time import strptime
import subprocess
indent = " "
showRandomHint = False
def nota():
hints = [
'see recent... | dankelley/nota | nota/main.py | Python | gpl-3.0 | 34,409 | [
"VisIt"
] | 3fc17c22b0beabd36dafc86752489fa24e1f0f0b122206f9c98958873403c4a8 |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
class PyTorchGeometric(PythonPackage):
"""PyTorch Geometric (PyG) is a geometric deep learning extension
library ... | iulian787/spack | var/spack/repos/builtin/packages/py-torch-geometric/package.py | Python | lgpl-2.1 | 3,179 | [
"ASE"
] | ac3f136b6b9b33749378b54fb1b3d0ff47262507554b69d1dfc58d28cdb7dc1b |
"""
This module defines export functions for decision trees.
"""
# Authors: Gilles Louppe <g.louppe@gmail.com>
# Peter Prettenhofer <peter.prettenhofer@gmail.com>
# Brian Holt <bdholt1@gmail.com>
# Noel Dawe <noel@dawe.me>
# Satrajit Gosh <satrajit.ghosh@gmail.com>
# Trevor... | davidgbe/scikit-learn | sklearn/tree/export.py | Python | bsd-3-clause | 15,814 | [
"Brian"
] | 55e5ea2e86245ac82b36e08ba2283f1eec12dd20b0f1ef484a81f496582f75b1 |
## \example reference_frames.py
# Show how to properly extract coordinates in the presence of rigid bodies.
from __future__ import print_function
import RMF
# print out transformed coordinates
def print_coordinates(reference_frame, coords):
print(reference_frame.get_global_coordinates(coords))
# walk through th... | shanot/imp | modules/rmf/dependency/RMF/examples/reference_frames.py | Python | gpl-3.0 | 1,928 | [
"VisIt"
] | 295796e81e59412bfe16a72d889cd73b5d48355e3631d3e62b198612c40e2ea2 |
import pysam
def num_svas():
""" Calculate the number of surrogate variables
"""
raise NotImplementedError
| jeffhsu3/genda | genda/stats/gksvm.py | Python | bsd-3-clause | 122 | [
"pysam"
] | 77ff425660ef66d0807962744c82adbcd9f45c239fb5e3bf07f9bb707065bbc1 |
"""Testing for Gaussian process classification """
# Author: Jan Hendrik Metzen <jhm@informatik.uni-bremen.de>
# License: BSD 3 clause
import numpy as np
from scipy.optimize import approx_fprime
from sklearn.gaussian_process import GaussianProcessClassifier
from sklearn.gaussian_process.kernels import RBF, Constant... | imaculate/scikit-learn | sklearn/gaussian_process/tests/test_gpc.py | Python | bsd-3-clause | 6,079 | [
"Gaussian"
] | 016dab7517685d470d7f21e6739dfaec5404cd1e369ee01fd45b3f6157ac0541 |
#!/usr/bin/env python
'''
Scan HF/DFT PES.
'''
import numpy
from pyscf import gto
from pyscf import scf, dft
#
# A scanner can take the initial guess from previous calculation
# automatically.
#
mol = gto.Mole()
mf_scanner = scf.RHF(mol).as_scanner()
ehf1 = []
for b in numpy.arange(0.7, 4.01, 0.1):
mol = gto.M(v... | gkc1000/pyscf | examples/scf/30-scan_pes.py | Python | apache-2.0 | 1,329 | [
"PySCF"
] | c6184da067b768c319c9ae31c4f00f4b01260f7c1e4bd660f84308ea446c4a00 |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Group.order'
db.add_column(u'profiles_group', 'order', self.gf('django.db.models.fields.Po... | ProvidencePlan/Profiles | communityprofiles/profiles/oldmigrations/0073_auto__add_field_group_order.py | Python | mit | 23,238 | [
"MOE"
] | efe4fe5d7d9e51e90c16b678d10009f689eb05c37bd70552aa942d74c64b1608 |
'''
this model example is taken from https://github.com/brian-team/brian2genn_benchmarks/blob/master/Mbody_example.py
'''
###############################################################################
## PARAMETERS
# select code generation standalone device
devicename = 'cuda_standalone'
# devicename = 'cpp_standalo... | brian-team/brian2cuda | examples/mushroombody.py | Python | gpl-2.0 | 8,076 | [
"Brian"
] | c02f502c4122a3c38458f2110e50e9805c292f6ab5e45bd97f6efec7ce5bf88b |
# Copyright 2000 by Jeffrey Chang. All rights reserved.
# Copyright 2001 by Gavin E. Crooks. All rights reserved.
# Modifications Copyright 2004/2005 James Casbon.
# Copyright 2005 by Regents of the University of California. All rights reserved
# (Major rewrite for conformance to corebio. Gavin Crooks)
#
# This c... | JohnReid/bioinf-utilities | python/corebio/resource/astral.py | Python | mit | 12,606 | [
"Biopython"
] | 97126565f0f60fecf5718c3fb4739569bf1f3f4dd9f61663f96dad816436e98a |
from itertools import chain
import unittest
from robot.utils.asserts import assert_equal, assert_raises_with_msg, assert_true
from robot.errors import DataError
from robot.result import Keyword, TestCase, TestSuite
from robot.result.configurer import SuiteConfigurer
SETUP = Keyword.SETUP_TYPE
TEARDOWN = Keyword.TEAR... | alexandrul-ci/robotframework | utest/result/test_configurer.py | Python | apache-2.0 | 11,532 | [
"VisIt"
] | 320a99ed1e61c2b44bafff277ec20f7f55cbf8d236bcd235704e360770d685a5 |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RDirichletmultinomial(RPackage):
"""Dirichlet-Multinomial Mixture Model Machine Learning f... | LLNL/spack | var/spack/repos/builtin/packages/r-dirichletmultinomial/package.py | Python | lgpl-2.1 | 1,463 | [
"Bioconductor"
] | 69410934b6902592a9190a6b9891fa02f5777f2f3dc17a910b9f5d6535c5b8ed |
# -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import print_function
import ast
import click
imp... | shoopio/shoop | _misc/ensure_code_style.py | Python | agpl-3.0 | 5,277 | [
"VisIt"
] | c5c15ef10b559afe5da80a393afe3f3f62bb4a80f6f6f1804060aa9e7260a8f3 |
#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | Stargrazer82301/CAAPR | CAAPR/CAAPR_AstroMagic/PTS/pts/do/eagle/insert.py | Python | mit | 3,475 | [
"Galaxy"
] | 1d78717eb911e552cfac1ed7ff4c0f46afa03c4a77e0b2d9018385032b4b12f0 |
# Copyright 2015 Google Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed ... | google/prettytensor | prettytensor/parameters.py | Python | apache-2.0 | 3,939 | [
"Gaussian"
] | 87f242d9253770648b28b02c90ed7ae3588a547351441269b37bf65f1ff79dea |
# Released under The MIT License (MIT)
# http://opensource.org/licenses/MIT
# Copyright (c) 2013-2015 SCoT Development Team
import unittest
from importlib import import_module
import numpy as np
from numpy.testing import assert_allclose
import scot
from scot import varica, datatools
from scot.var import VAR
class ... | cbrnr/scot | scot/tests/test_varica.py | Python | mit | 6,978 | [
"Gaussian"
] | e0f5bd40ce4940e6bc6cd4ab9dc46ae25ab37f63d74ea93465a24c4810bb6818 |
"""
Python implementation of the fast ICA algorithms.
Reference: Tables 8.3 and 8.4 page 196 in the book:
Independent Component Analysis, by Hyvarinen et al.
"""
# Authors: Pierre Lafaye de Micheaux, Stefan van der Walt, Gael Varoquaux,
# Bertrand Thirion, Alexandre Gramfort, Denis A. Engemann
# License: BS... | RomainBrault/scikit-learn | sklearn/decomposition/fastica_.py | Python | bsd-3-clause | 18,717 | [
"Gaussian"
] | 67fefb379c911788e27f877aa76a72389f600197783aecc8efa72226bfc371a2 |
import re
from collections import defaultdict
from itertools import product
import networkx as nx
from bs4 import BeautifulSoup
from markdown import markdown
from parsimonious.grammar import Grammar
from parsimonious.nodes import NodeVisitor
class Node:
def __init__(self, name=None, attributes=None):
self... | horoshenkih/mind-graph | organon/parser.py | Python | gpl-3.0 | 8,781 | [
"VisIt"
] | 00e56bde148fb8843d422f30ee5e060c0639d273c43fa802b6f8e67228b9bf8b |
from __future__ import absolute_import
#######################################################################
#
#
# Next Event Renderer for Dreambox/Enigma-2
# Coded by Vali (c)2010
# Support: www.dreambox-tools.info
#
#
# This plugin is licensed under the Creative Commons
# Attribution-NonCommercial-Share... | atvcaptain/enigma2 | lib/python/Components/Renderer/NextEvent.py | Python | gpl-2.0 | 1,984 | [
"VisIt"
] | 0e0bfd7de7e9e12f78d30c96b946f43dfd8417b24979d7d7fc2f7c9b09315ece |
"""A quick DOM implementation.
Python's xml.dom is very slow. The xml.sax module is also slow (as it imports urllib2).
This is our light-weight version.
"""
# Copyright (C) 2009, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from xml.parsers import expat
import zeroinstall
from zer... | turtledb/0install | zeroinstall/injector/qdom.py | Python | lgpl-2.1 | 3,485 | [
"VisIt"
] | 456c8f3c5d173b1f9a5e40ba754bad8ca8db97e421a51d109e45fb8750f3c8ec |
import vtk
# Read the file (to test that it was written correctly)
reader = vtk.vtkXMLImageDataReader()
reader.SetFileName("D:/Notebooks_Bogota2017/SS_2017/data/challenge_0.vti")
reader.Update()
# Convert the image to a polydata
imageDataGeometryFilter = vtk.vtkImageDataGeometryFilter()
imageDataGeometryFilter.SetInp... | dianafprieto/SS_2017 | scripts/06_NB_Challenges.py | Python | mit | 1,210 | [
"VTK"
] | 15ee3dbda42a9ca0368f8ece8701a3913189f7f9bc0fb931afa18bae1692423b |
from ase.tasks.main import run
atoms, task = run("elk bulk Al -x fcc -a 4.04 --k-point-density=3.0 -p tasks=0,xc=PBE,rgkmax=5.0,tforce=True")
atoms, task = run('elk bulk Al -s')
| alexei-matveev/ase-local | ase/test/elk/elk_cmdline.py | Python | gpl-2.0 | 179 | [
"ASE",
"Elk"
] | 2b278077c000948af0487957f5fde5adfb0119ded0d8b93fc3377d01b9a27786 |
"""
This object is a small tool to allow user to quickly
determine the variance in q from the
instrumental parameters.
"""
from instrument import Sample
from instrument import Detector
from instrument import TOF as Neutron
from instrument import Aperture
# import math stuffs
from math import pi
from math import sqrt
i... | lewisodriscoll/sasview | src/sas/sascalc/calculator/resolution_calculator.py | Python | bsd-3-clause | 39,326 | [
"Gaussian"
] | a68a47cb57be43c54d4f730b6016bbd253fe7e02cfba32f63ac84e5896d120bc |
# Utility methods to do peak integration
from __future__ import (absolute_import, division, print_function)
from six.moves import range
import numpy
import math
from scipy.optimize import curve_fit
import mantid.simpleapi as mantidsimple
from mantid.api import AnalysisDataService
def apply_lorentz_correction(peak_int... | ScreamingUdder/mantid | scripts/HFIR_4Circle_Reduction/peak_integration_utility.py | Python | gpl-3.0 | 29,473 | [
"Gaussian"
] | f119db43266c13beea2df616bbec5c4b413b4a2a9e2026f4fcaadd95ca158067 |
""" The U.S. Standard Atmosphere 1976 is an idealized, steady-state model of
mean annual conditions of Earth's atmosphere from the surface to 1000 km at
latitude 45N, as it is assumed to exist during a period with moderate solar
activity. The defining meteorological elements are sea-level temperature and
pressure, and ... | poliastro/poliastro | src/poliastro/earth/atmosphere/coesa76.py | Python | mit | 13,539 | [
"Avogadro"
] | 283a6c74dab70af118f7cddaf0681931521cb5124fe64a7923342b71ff34f63b |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
E-I network connected with NEST topology
----------------------------------------
Simulation of a network consisting of an excitatory and an inhibitory
neuron population with distance-dependent connectivity.
The code bases on the script
brunel_alpha_nest.py
which... | espenhgn/VIOLA | test_data/topo_brunel_alpha_nest.py | Python | gpl-2.0 | 44,541 | [
"Gaussian",
"NEURON"
] | 4cbe91371d3a98623a34775465c1c0c56612a7843c3c1bb996de16e9f4a14535 |
# Copyright 2014 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.
"""This file contains printing-related functionality of the bisect."""
import datetime
import re
from bisect_results import BisectResults
import bisect_uti... | CTSRD-SOAAP/chromium-42.0.2311.135 | tools/auto_bisect/bisect_printer.py | Python | bsd-3-clause | 15,203 | [
"VisIt"
] | 254bfa02070110f80238339d72b1f8189fc8e9b1a60a65829de70662a7096624 |
"""
Methods for cooking with OpenMM
"""
__version__ = "v0.1"
__author__ = "Carlos Xavier Hernández <cxh@stanford.edu>"
from mdcookbook.core import *
from mdcookbook.utils import *
| cxhernandez/md-cookbook | mdcookbook/__init__.py | Python | mit | 183 | [
"OpenMM"
] | 2aeb0faf2365cb985664884cb66dcd0d60d585d746882ab352a81fd8939e9e84 |
#!/usr/bin/env python3
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgp... | harterj/moose | python/moosesqa/SQARequirementReport.py | Python | lgpl-2.1 | 3,945 | [
"MOOSE"
] | 0f436c8ca2a2ba6aaf0256c8b8d026f38d1f558518c90324bfe423d13ac085bd |
from __future__ import with_statement
import hashlib
import os
import stat
import tempfile
from fnmatch import filter as fnfilter
from fabric.state import output, connections, env
from fabric.utils import warn
from fabric.context_managers import settings
class SFTP(object):
"""
SFTP helper class, which is a... | akaariai/fabric | fabric/sftp.py | Python | bsd-2-clause | 11,000 | [
"VisIt"
] | 5ad5e5c829a7e73caea25afb01b920d983035744247de63fab023242cc5b205b |
#!/usr/bin/python
"""
# Created on Aug 12, 2016
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com) GitHub ID: grastogi23
#
# module_check: supported
#
# Copyright: (c) 2016 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
"""
... | haad/ansible | lib/ansible/modules/network/avi/avi_gslbservice_patch_member.py | Python | gpl-3.0 | 10,405 | [
"VisIt"
] | 5adedec1245a41fc7fe732bf0db5e54f404b183e484ef856a5c15f65e88774ee |
# Copyright 2012 by Wibowo Arindrarto. All rights reserved.
# 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.
"""Bio.SearchIO object to model search results from a single query."""
import sys
# Add p... | Ambuj-UF/ConCat-1.0 | src/Utils/Bio/SearchIO/_model/query.py | Python | gpl-2.0 | 31,206 | [
"BLAST",
"Biopython"
] | bfad314c708807eebd57e28c489e114dbaa849878321dbb105a7bd49fb99eb8e |
"""
Instructor Dashboard Views
"""
import logging
import datetime
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
import uuid
import pytz
from django.contrib.auth.decorators import login_required
from django.views.decorators.http import require_POST
from django.utils.translation imp... | tanmaykm/edx-platform | lms/djangoapps/instructor/views/instructor_dashboard.py | Python | agpl-3.0 | 31,501 | [
"VisIt"
] | b8b81552c8f3afd3256e61974bb1158d97a87c6a7f0fb84f9f126b3829fd661b |
"""
Physical units and dimensions.
The base class is Unit, where all here defined units (~200) inherit from.
The find_unit function can help you find units for a given quantity:
>>> import sympy.physics.units as u
>>> u.find_unit('coul')
['coulomb', 'coulombs']
>>> u.find_unit(u.charge)
['C', 'ch... | wolfram74/numerical_methods_iserles_notes | venv/lib/python2.7/site-packages/sympy/physics/units.py | Python | mit | 8,234 | [
"Avogadro"
] | 5ea740f5b0c3bc0e47abdc2718b2c52655d964e1907142bc4a9b2ba3c2e0f13e |
import logging
from autotest.client.shared import error
@error.context_aware
def run(test, params, env):
"""
KVM virtio viostor heavy random write load:
1) Log into a guest
2) Install Crystal Disk Mark [1]
3) Start Crystal Disk Mark with heavy write load
:param test: QEMU test object
:pa... | ypu/tp-qemu | qemu/tests/win_disk_write.py | Python | gpl-2.0 | 1,545 | [
"CRYSTAL"
] | abce4e4cae828467ca769b4cbd8243764b55c8781cd2f8ce1bad99e0946b805f |
"""
Instructor Dashboard Views
"""
import logging
import datetime
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
import uuid
import pytz
from django.contrib.auth.decorators import login_required
from django.views.decorators.http import require_POST
from django.utils.translation imp... | rhndg/openedx | lms/djangoapps/instructor/views/instructor_dashboard.py | Python | agpl-3.0 | 25,900 | [
"VisIt"
] | 881ca820f5bc57eae1f3f5e45dd8e23a7ddcedc393dd8d841baad889e58d89ea |
# -*- coding: UTF-8 -*-
#
# Copyright (c) 2015-2019 by Inteos Sp. z o.o.
# All rights reserved. See LICENSE file for details.
#
from __future__ import unicode_literals
from django.shortcuts import render, redirect, get_object_or_404
from django.http import JsonResponse, Http404
from django.urls import reverse
from l... | inteos/IBAdmin | restore/views.py | Python | agpl-3.0 | 43,533 | [
"VMD"
] | 74501253e77ddc3513aae9428c457cd075a9d53a575a7b65b010e68b182cc88a |
"""
Profiling class for updated information on process status
"""
__RCSID__ = "$Id$"
import datetime
import errno
import psutil
from DIRAC import gLogger, S_OK, S_ERROR
from DIRAC.Core.Utilities.DErrno import EEZOMBIE, EENOPID, EEEXCEPTION
def checkInvocation(func):
""" Decorator for invoking psutil methods
""... | chaen/DIRAC | Core/Utilities/Profiler.py | Python | gpl-3.0 | 5,557 | [
"DIRAC"
] | 5741b3f30fda980303f483f2c020ddb0aa67c73b66aa00b76151238aed759ce9 |
# coding=utf-8
"""
Protein-Ligand Interaction Profiler - Analyze and visualize protein-ligand interactions in PDB files.
test_literature_validated.py - Unit Tests for literature-validated cases.
"""
import unittest
from plip.structure.preparation import PDBComplex
class LiteratureValidatedTest(unittest.TestCase):
... | ssalentin/plip | plip/test/test_literature_validated.py | Python | gpl-2.0 | 37,793 | [
"CRYSTAL"
] | 1e8cdb6185fbb833c8c9b1d132e0add240a2ede955f3e80b6ccb86f64553b416 |
"""
Useful recipes from various internet sources (thanks)
mostly decorator patterns
"""
import os.path as op
import re
import logging
import functools
from collections import defaultdict
class memoized(object):
"""
Decorator that caches a function's return value each time it is called.
If called later w... | sgordon007/jcvi_062915 | utils/cbook.py | Python | bsd-2-clause | 12,250 | [
"BLAST"
] | d096193d4d62329c1d46a543889ae24f2b81afcebd1264eb82d49a2ac7d15044 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Jeroen Hoekx <jeroen.hoekx@dsquare.be>, Alexander Bulimov <lazywolf0@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free So... | ravello/ansible-modules-extras | system/lvol.py | Python | gpl-3.0 | 8,197 | [
"Firefly"
] | ac6fb06736e06b716b386e61a7a0d01d4e0d641b5c76ffdf39b33885e5470dd8 |
import numpy as np
from ase import Atoms
from ase.units import Bohr, Ry
def read_scf(filename):
try:
f = open(filename + '.scf', 'r')
pip = f.readlines()
ene = []
for line in pip:
if line[0:4] == ':ENE':
ene.append(float(line[43:59]) * Ry)
f.clo... | askhl/ase | ase/io/wien2k.py | Python | gpl-2.0 | 5,987 | [
"ASE"
] | bff66e0d9db8c5523383ab4ed791c61abad12e97fef48bfc3295a5351b5220e0 |
from lsst.obs.decam.ingest import DecamParseTask
root.parse.retarget(DecamParseTask)
root.parse.hdu = 1 # PHU
root.parse.translation = {'proposal': 'PROPID',
'visit': 'EXPNUM',
'taiObs': 'DATE-OBS', # Header says UTC, but shouldn't matter if we're consistent
... | LSST-nonproject/obs_omegacam | config/ingest.py | Python | gpl-3.0 | 1,718 | [
"VisIt"
] | 6cad49c756d8cfc729fd268addc4aa3436872808b93f43a24708c15f6a468805 |
from ScriptingLanguage.Interpreter import Interpreter
__author__ = 'chronium'
def visit_assignment(assignment):
Interpreter().add_variable(assignment.value[0], assignment.value[1].visit())
return '[{}] = {}'.format(assignment.value[0], Interpreter().get_variable(assignment.value[0]))
| chronium/ChronoScript | ScriptingLanguage/Visitors/AssignmentVisitor.py | Python | gpl-2.0 | 295 | [
"VisIt"
] | 6a220740017ae1c24c7cae06655905243ac61f8b22cec2f92b48dd24d54216bf |
#!/usr/bin/env python
#
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com>
# Chris Houseknecht, <house@redhat.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 ... | adityacs/ansible | contrib/inventory/azure_rm.py | Python | gpl-3.0 | 32,631 | [
"Galaxy"
] | 2de3f5a7e80399d75cd9c389f94c8ac4c0b1c92bba1f16ef45c8af2e9ccacd06 |
#
# Copyright (C) 2010-2019 The ESPResSo project
# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010
# Max-Planck-Institute for Polymer Research, Theory Group
#
# 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... | psci2195/espresso-ffans | doc/tutorials/02-charged_system/scripts/nacl_units_vis.py | Python | gpl-3.0 | 5,397 | [
"ESPResSo"
] | ee70b480662bcb16924e432b6717bc33be82ba13d864d7a7dfa5e788b40d277c |
#
# Copyright (c) 2015 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
# ScanCode is a trademark of nexB Inc.
#
# You may not use... | yasharmaster/scancode-toolkit | tests/licensedcode/test_index.py | Python | apache-2.0 | 27,649 | [
"VisIt"
] | 51543e1415a5e08b2d9d93a901c63b17a80e1aca72fcfd0878d59eeb7c6e5ebd |
import warnings
import mdtraj as md
import numpy as np
from msmbuilder.example_datasets import AlanineDipeptide
from msmbuilder.featurizer import Featurizer
from msmbuilder.featurizer import RMSDFeaturizer
class OldRMSDFeaturizer(Featurizer):
"""Featurizer based on RMSD to a series of reference frames.
Par... | mpharrigan/mixtape | msmbuilder/tests/test_rmsdfeaturizer.py | Python | lgpl-2.1 | 8,866 | [
"MDTraj"
] | 5fe28f13f56530f19fca4cfbe216ff41d9003f5d9dd1b59e304abdae43427f16 |
# TODO: simplify module!! all this muck was necessary due to the old
# demand-driven model. Keep the code around, it could be used as
# illustrative case.
import gen_utils
from module_base import ModuleBase
from module_mixins import NoConfigModuleMixin
import module_utils
import vtk
import vtkdevide
class modifyHom... | nagyistoce/devide | modules/filters/modifyHomotopy.py | Python | bsd-3-clause | 11,359 | [
"VTK"
] | 33a7238d7e8c97e6e9112f767806f02caa601f26a264a888e09200a1bae3cad6 |
# functions to do a spectral analysis of a greyscale image.
#
# Some parts of this code adapted with thanks from a notebook on
# image statistics by Bart Machilsen and Maarten Demeyer (see
# http://nbviewer.jupyter.org/github/gestaltrevision/python_for_visres/blob/master/Part7/Part7_Image_Statistics.ipynb)
from __futu... | tomwallis/PsyUtils | psyutils/image/_spectral_analysis.py | Python | mit | 8,328 | [
"Bowtie",
"Gaussian"
] | afae8a126b65bf62e507f4310faca8669221152174db1d1444710f850c0cea31 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.