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 |
|---|---|---|---|---|---|---|---|
import functools
import logging
from pip._vendor import six
from pip._vendor.packaging.utils import canonicalize_name
from pip._vendor.resolvelib import BaseReporter, ResolutionImpossible
from pip._vendor.resolvelib import Resolver as RLResolver
from pip._internal.exceptions import InstallationError
from pip._interna... | RalfBarkow/Zettelkasten | venv/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py | Python | gpl-3.0 | 10,097 | [
"VisIt"
] | d583fed68398a73316eab13f1325bf918259db2c4fe4bf2a8b4ba659e85cede0 |
# -*- coding:utf-8 -*-
## src/common/optparser.py
##
## Copyright (C) 2003-2005 Vincent Hanquez <tab AT snarc.org>
## Copyright (C) 2003-2014 Yann Leboulanger <asterix AT lagaule.org>
## Copyright (C) 2005-2006 Dimitur Kirov <dkirov AT gmail.com>
## Nikos Kouremenos <kourem AT gmail.com>
## Copy... | irl/gajim | src/common/optparser.py | Python | gpl-3.0 | 37,112 | [
"CRYSTAL"
] | b81b782878608ed9a1bea47f3c6194767ba3263a8950ec823d9853ce0a441210 |
from abipy.abilab import Structure
from abiflows.fireworks.workflows.abinit_workflows import DfptFWWorkflow
from abiflows.database.mongoengine.utils import DatabaseData
from abiflows.database.mongoengine.abinit_results import RelaxResult
# data for the database where the relaxed structures were stored
source_db = Data... | gmatteo/abiflows | abiflows/fireworks/examples/phonon_wf.py | Python | gpl-2.0 | 4,532 | [
"ABINIT"
] | 2f54324dbd1398df9812a981d1dea2872ee231a72c6814b1d7d784f38c089e8b |
#!/usr/bin/env python
from galaxy import eggs
import sys, string
from rpy import *
import numpy
def stop_err(msg):
sys.stderr.write(msg)
sys.exit()
def sscombs(s):
if len(s) == 1:
return [s]
else:
ssc = sscombs(s[1:])
return [s[0]] + [s[0]+comb for comb in ssc] + ssc
infile... | volpino/Yeps-EURAC | tools/regVariation/rcve.py | Python | mit | 4,111 | [
"Galaxy"
] | f0b67f8998c71bcae80b4d9c9f592238529665924380fc8eb01b342156e64306 |
#!/bin/env python
"""
Module simtk.unit.quantity
Physical quantities with units, intended to produce similar functionality
to Boost.Units package in C++ (but with a runtime cost).
Uses similar API as Scientific.Physics.PhysicalQuantities
but different internals to satisfy our local requirements.
In particular, there i... | marscher/mdtraj | MDTraj/utils/unit/quantity.py | Python | lgpl-2.1 | 27,812 | [
"OpenMM"
] | 898e1e8fe346f0b46caea780734ed1c741669550cd9f107a75252fcba25e4c8f |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Patch the sequences of one assembly using sequences from another assembly. This
is tested on merging the medicago WGS assembly with the clone-by-clone assembly.
There are a few techniques, used in curating medicago assembly.
1. Split chimeric scaffolds based on genet... | sgordon007/jcvi_062915 | assembly/patch.py | Python | bsd-2-clause | 31,696 | [
"BLAST"
] | f09051d1678f0137d93e6a3bcfab3dac73de2c13352385eeec944bea9eeb97a1 |
#!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses... | alxgu/ansible | lib/ansible/modules/network/avi/avi_systemconfiguration.py | Python | gpl-3.0 | 6,594 | [
"VisIt"
] | 50d276a1097e68f53cc48945c0e11afbda04bef222c6cc0b0503bf26fff21a0f |
from gpaw.transport.analysor import Transport_Plotter
import numpy as np
from pylab import *
import sys
if '*' in sys.argv[1]:
fd=0
nbias = int(sys.argv[1].split('*')[0])
else:
fd=1
nbias = int(sys.argv[1])
plotter = Transport_Plotter(fd)
dense_level=1
plotter.plot_setup()
if len(sys.argv) > 1:
bia... | qsnake/gpaw | doc/documentation/transport/transport_analysis_scripts/iv.py | Python | gpl-3.0 | 810 | [
"GPAW"
] | 439efaa3f1c136e14ed98e021eabd49783b8881e6a16be81033ab6123c34328e |
"""Kernels for Gaussian process regression and classification.
The kernels in this module allow kernel-engineering, i.e., they can be
combined via the "+" and "*" operators or be exponentiated with a scalar
via "**". These sum and product expressions can also contain scalar values,
which are automatically converted to... | anntzer/scikit-learn | sklearn/gaussian_process/kernels.py | Python | bsd-3-clause | 84,532 | [
"Gaussian"
] | 82818a5855b0b9af55c76e7fc5a71de6add56b89f3952d7c599dd6a005d48bcc |
import json
from .common import CatmaidApiTestCase
class LogsApiTests(CatmaidApiTestCase):
log_rows = [
[
'test2',
'create_neuron',
'2012-07-22T16:50:57.758000+00:00',
5290.0,
... | catsop/CATMAID | django/applications/catmaid/tests/apis/test_logs.py | Python | gpl-3.0 | 3,523 | [
"NEURON"
] | 84f4e5506aaca3206967e62f549091a30c9b748a4aa63c7a6b84ac415a6d88fe |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2022 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | psi4/psi4 | psi4/driver/qcdb/pytest/addons.py | Python | lgpl-3.0 | 3,612 | [
"Psi4"
] | 12de26b8b2b8f8a4a927820730587ab168c7ebd20b75a53747f79f2b15861f7e |
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.ensemble import BaggingClassifier
from sklearn.ensemble import AdaBoostClassifier
from sklearn.ensemble import ExtraTreesClassifier
from sklearn.neural_network import MLPClassifie... | rupakc/Kaggle-Compendium | Telestra Network Disruption Challenge/telestra-baseline.py | Python | mit | 3,316 | [
"Gaussian"
] | 3314a0ec5b970b4d0611ae9c5591277bce22b8223e539001ddc394f6666ac830 |
__author__ = 'amarch'
# -*- coding: utf-8 -*-
from utils import strutils as infoutils
import itertools
from scipy.integrate import *
from RotationCurve import *
from Galaxy import *
from utils import strutils as infoutils
import itertools
import copy
class RadialToAzimuthalRatioHandler():
def __init__(self, g... | Amarchuk/2FInstability | core/RadialToAzimuthalRatioHandler.py | Python | gpl-3.0 | 3,132 | [
"Galaxy"
] | f2cf1f2cb72285627e7943d328db8cf9c7421624fa7381bcca6cb40dd0245bf5 |
#!/usr/bin/env python
import sys
import os
import numpy as np
from datetime import datetime
"""
Obtain a tight binding Hamiltonian of Haldane model with Wannier90 format
How to run
python haldane_hr_gen.py
This will generate the tight binding hamiltonian Haldane_hr.dat
LATTICE
Angstrom
2.1377110 -1.2342080 0.00... | quanshengwu/wannier_tools | examples/Haldane_model/haldane_hr_gen-trivial-insulator.py | Python | gpl-3.0 | 3,153 | [
"Wannier90"
] | 26187be41090ef17f5d2289609c68614690e6814bc91011de924851f070380cd |
#!/usr/bin/env python
# Copyright 2014-2020 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | gkc1000/pyscf | pyscf/cc/test/test_uccsd.py | Python | apache-2.0 | 31,315 | [
"PySCF"
] | fb3c19bcff361fd38c8fb8d499e5aa4d07496c6fbbcb7d8321cf352b7faee47e |
import needl, needl.schedule as schedule, needl.utils as utils
from needl.adapters.fingerprint import FingerprintAdapter
import requests
import zipfile
from io import BytesIO
import urllib.parse as url
AWS_ROOT = 'https://s3.amazonaws.com'
CSV_NAME = 'top-1m.csv'
TOP1M = '/alexa-static/' + CSV_NAME + '.zip'
AWS_THUMBP... | eth0izzle/Needl | needl/tasks/alexa.py | Python | mit | 1,254 | [
"VisIt"
] | cbbf98d0977d3a4882c981673f579e4884dfd0a8c42739022a122f5754f8b512 |
# Copyright (C) 2013 by Yanbo Ye (yeyanbo289@gmail.com)
# 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.
"""Classes and methods for tree construction"""
import itertools
import copy
from Bio.Phylo imp... | zjuchenyuan/BioWeb | Lib/Bio/Phylo/TreeConstruction.py | Python | mit | 39,710 | [
"BLAST",
"Biopython"
] | 6897a7f85a9c302d74da8c1817b27192b35d6ed9d309653bab3e15c4234b3afb |
#!/usr/bin/env python
# PySCUBA/src/PySCUBA/Preprocessing.py
# Author: Gregory Giecold for the GC Yuan Lab
# Affiliation: Harvard University
# Contact: g.giecold@gmail.com; ggiecold@jimmy.harvard.edu
from __future__ import division
from operator import and_
from os import getcwd, makedirs, path
import re
from st... | GGiecold/PySCUBA | src/PySCUBA/Preprocessing.py | Python | mit | 29,858 | [
"VisIt"
] | 1b14daebffc84465fcacadd274ece25ecd60899e1f0eb1ba72fe8c4eb895eef4 |
#!/usr/bin/env python
"""
A simple utility to redo the failed/errored tests.
You need to specify the session directory in order for this script to locate the
tests which need to be re-run.
See also dotest.py, the test driver running the test suite.
Type:
./dotest.py -h
for help.
"""
import os, sys, datetime
impo... | s20121035/rk3288_android5.1_repo | external/lldb/test/redo.py | Python | gpl-3.0 | 6,653 | [
"VisIt"
] | 959565f00144c7ccfdba2e2866e7084b224fd1039154aa88feaf04959dd458b5 |
#!/usr/bin/python
"""
Copyright 2013 Paul Willworth <ioscode@gmail.com>
This file is part of Galaxy Harvester.
Galaxy Harvester is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of th... | clreinki/GalaxyHarvester | ghObjectRecipe.py | Python | agpl-3.0 | 6,086 | [
"Galaxy"
] | cd2460fced71028693cb16ae6948958f5001e7c4ab8e6f0c796fef9b056cdd6d |
import os
from fabric.api import task, env, run, local, put, cd, sudo
from fabric.contrib.files import exists
from .utils import die, err, yay, template
from . import django, db
def handle_rq(bundle_name, bundle_root, env):
# RQ forks processes and they load the latest version of the code.
# No need to rest... | linovia/fab-bundle | fab_bundle/bundle.py | Python | bsd-3-clause | 8,545 | [
"VisIt"
] | 39f1399facf23b7d4ba5f18aecdfc4099700f383f230f46214b05d17b08d27d2 |
# Copyright (C) 2018-2021 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU Affero General Public License version 3, or any later version
# See top-level LICENSE file for more information
from swh.web.api.apidoc import api_doc, format_docstring
from... | SoftwareHeritage/swh-web-ui | swh/web/api/views/origin_save.py | Python | agpl-3.0 | 4,183 | [
"VisIt"
] | 90bea849dd01020fbefc0868ce7705655cc7597f0398bdc6908cce6f8749d1b2 |
from DIRAC import S_OK, S_ERROR
from DIRAC.AccountingSystem.Client.Types.Pilot import Pilot
from DIRAC.AccountingSystem.private.Plotters.BaseReporter import BaseReporter
class PilotPlotter( BaseReporter ):
_typeName = "Pilot"
_typeKeyFields = [ dF[0] for dF in Pilot().definitionKeyFields ]
def _reportCumulati... | andresailer/DIRAC | AccountingSystem/private/Plotters/PilotPlotter.py | Python | gpl-3.0 | 11,286 | [
"DIRAC"
] | 19af29e0c4ba293fbffba74329a6c5ac5041112e88b59d148795778c7150d2cd |
import sys
import os
import pylab as pl
import Tkinter as Tk
from matplotlib.backend_bases import cursors
import matplotlib
rcParams = matplotlib.rcParams
from matplotlib._pylab_helpers import Gcf
cursord = {
cursors.MOVE: "fleur",
cursors.HAND: "hand2",
cursors.POINTER: "arrow",
cursors.SELECT_REG... | aardk/jupyter-casa | python/casa/TablePlotTkAgg.py | Python | gpl-2.0 | 41,002 | [
"FLEUR"
] | 7df64f5592d355626d23af91e867e19dbd4dcf765f12a4c4bb3d6f7aaebea39f |
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import with_statement
__license__ = 'GPL 3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
from itertools import izip
from calibre.customize import Plugin as _Plugin
FONT_SIZES = [('xx-small', 1),
... | insomnia-lab/calibre | src/calibre/customize/profiles.py | Python | gpl-3.0 | 26,072 | [
"Galaxy"
] | 0b1b5a210897b36a5ba6df23c0d47830ff710f73d70c0d0e657c408d1b0dab03 |
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for Chromium.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presu... | keishi/chromium | PRESUBMIT.py | Python | bsd-3-clause | 18,140 | [
"VisIt"
] | 1f385e0b320245e82c8d05d2b38e879c57bb9e283d70b82553d3af6a7e1d91bf |
""" IdProvider based on OAuth2 protocol
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from authlib.oauth2.rfc6749.util import scope_to_list
from DIRAC import S_OK
from DIRAC.Resources.IdProvider.OAuth2IdProvider import OAuth2IdProvider
from DIRAC.Conf... | ic-hep/DIRAC | src/DIRAC/Resources/IdProvider/IAMIdProvider.py | Python | gpl-3.0 | 809 | [
"DIRAC"
] | d8c6f91e1c8b099bac2b083513819ebbe051a353a246f4839caae1bb96870b3a |
"""
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... | zorroblue/scikit-learn | sklearn/tree/export.py | Python | bsd-3-clause | 18,326 | [
"Brian"
] | f0eb201201ecf84524c72ea3a4f834aebe29e8d9bb5b1c0f9fd1dff39ca5b1d9 |
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Daniel Strohmeier <daniel.strohmeier@tu-ilmenau.de>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
#
# License: BSD (3-clause)
import copy
import warnings
import numpy as np
from ..io.pick import pick_channels_cov
from ..forwar... | jniediek/mne-python | mne/simulation/evoked.py | Python | bsd-3-clause | 5,459 | [
"Gaussian"
] | 0c60d98baad2e47676eac56932cd9918ea5bd16eda109dbcdc9ca275c7a7044a |
import sys
from birdfeeder.client import write_spider, write_walker, clear, feed_from_thredds, feed_from_walker, feed_from_spider
import logging
logging.basicConfig(format='%(message)s', level=logging.WARN)
logger = logging.getLogger(__name__)
def create_parser():
import argparse
parser = argparse.Argument... | bird-house/bird-feeder | birdfeeder/__init__.py | Python | apache-2.0 | 7,360 | [
"NetCDF"
] | fd1c349a0fd7502d9d99b4eab3be2009377f8194f2d5d69497593eb16ecfdfb3 |
# -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2007 Johan Gonqvist <johan.gronqvist@gmail.com>
# Copyright (C) 2007-2009 Gary Burton <gary.burton@zen.co.uk>
# Copyright (C) 2007-2009 Stephane Charet... | jralls/gramps | gramps/plugins/webreport/narrativeweb.py | Python | gpl-2.0 | 96,157 | [
"Brian"
] | 324b35e4fce8ef42c53d6e832089111c6824522b57ad0396e625d16123d04110 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module implements various equation of states.
Note: Most of the code were initially adapted from ASE and deltafactor by
@gmatteo but has since undergone major refactoring.
"""
import logging
import warnings
from ab... | vorwerkc/pymatgen | pymatgen/analysis/eos.py | Python | mit | 19,652 | [
"ASE",
"pymatgen"
] | d743109f79f506c65a0161af4c4fef98d7b651308cbdaa118f16fa214389c883 |
"""
The GLEAM REsidual Source IDentifier program
Created by:
Robin Cook
March 24 2016
Modifications by:
Robin Cook
"""
# Imports
import sys
import os
import numpy as np
import math
import time
# Other Imports
import scipy
import astropy
from astropy.table import Table
import ntpath
from opt... | AstroRobin/GLEAM-RESID | ReSId.py | Python | mit | 44,533 | [
"Galaxy"
] | 8be25541b4fd895d90bb201c6e067b25cd0e81a1396150ff978de45849bdaedc |
# Copyright (c) 2003-2014 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# 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, o... | spirrello/spirrello-pynet-work | applied_python/lib/python2.7/site-packages/pylint/checkers/classes.py | Python | gpl-3.0 | 47,374 | [
"VisIt"
] | f360953da376b1c5088189765183b6b16d0796523c0854b2a0afaa56f0c57dc3 |
# Copyright 2018 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | deepmind/streetlearn | streetlearn/python/environment/curriculum_courier_game.py | Python | apache-2.0 | 6,183 | [
"VisIt"
] | 9be3c466b246c2b7c83bdf4aba5c26cdfe08cca1bab49df6e183cc5c3134066d |
"""
Tools to process galaxy spectra .fits files from SDSS-II Legacy survey.
Authored by Grace Telford 02/13/16
"""
# TODO: add parameter descriptions to SpecProcessor, normalize, and process_fits
from __future__ import absolute_import, print_function, division
import numpy as np
from scipy import interp
import time... | ogtelford/specprep | specprep/processing.py | Python | bsd-3-clause | 6,212 | [
"Galaxy"
] | 6df932628de39ca72f661079010bf7b88e105972f1ef0cf0dff4f112229aabba |
import sys, itertools, optparse
optParser = optparse.OptionParser(
usage = "python %prog [options] <flattened_gff_file> <sam_file> <output_file>",
description=
"This script counts how many reads in <sam_file> fall onto each exonic " +
"part given in <flattened_gff_file> and outputs a list of... | vipints/oqtans | oqtans_tools/DEXSeq/1.6/src/dexseq_count.py | Python | bsd-3-clause | 6,000 | [
"Bioconductor",
"HTSeq"
] | 97d045709a234bcb321ceb68ccf305a6ffb5e727c87c9bf8b475bea803e51431 |
#!/usr/bin/env python
# Copyright (c) 2002-2008 ActiveState Software.
# License: MIT License.
# Author: Trent Mick (trentm at google's mail thing)
"""
Quick directory changing.
Usage:
go <shortcut>[/sub/dir/path] # change directories
# same as "go -c ..."
... | trentm/go-tool | lib/go.py | Python | mit | 25,855 | [
"VisIt"
] | 8ced7defcf796b22bba8d5762a7d1a94fdb1fad5110be9c1e5f20c58a13587d9 |
# This file is part of wger Workout Manager.
#
# wger Workout Manager is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# wger W... | rolandgeider/wger | wger/core/tests/base_testcase.py | Python | agpl-3.0 | 17,904 | [
"VisIt"
] | 9eaeff44bd839dfa93465356ba0a14e645408bb0fc878a3017a54f228eb804dd |
"""
Fuzzy Logic Base Class
E. Jucovy, 2005
based on fuzzy.py by D.S. Blank, 2001
"""
__author__ = "E. Jucovy, Douglas Blank <dblank@brynmawr.edu>"
__version__ = "$Revision: 2458 $"
from math import exp
class FuzzyOperators:
def Union(self,a,b):
pass
def Intersection(self,a,b):
pass
def Complement(s... | emilydolson/forestcat | pyrobot/brain/fuzzy.py | Python | agpl-3.0 | 11,951 | [
"Gaussian"
] | 4b836db948d96eff795c069e6d85f20abf6accc4d00529f526dcbefd3a219c31 |
# -*- coding: utf-8 -*-
"""Various text used throughout the website, e.g. status messages, errors, etc.
"""
# Status Messages
#################
# NOTE: in status messages, newlines are not preserved, so triple-quotes strings
# are ok
# Status message shown at settings page on first login
# (upon clicking primary e... | GaryKriebel/osf.io | website/language.py | Python | apache-2.0 | 6,493 | [
"VisIt"
] | 55541f0fb02941680d6e5721d75430c44b18149084ba6f31385a40969fe23a53 |
"""Each ElkM1 area will be created as a separate alarm_control_panel."""
from elkm1_lib.const import AlarmState, ArmedStatus, ArmLevel, ArmUpState
from elkm1_lib.util import username
import voluptuous as vol
from homeassistant.components.alarm_control_panel import (
ATTR_CHANGED_BY,
FORMAT_NUMBER,
AlarmCon... | sander76/home-assistant | homeassistant/components/elkm1/alarm_control_panel.py | Python | apache-2.0 | 9,831 | [
"Elk"
] | b77f8b7daa4182f2b862869a00a9196d1031688c4575c797f4ef3c550ebda75e |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2004 Martin Hawlisch
# Copyright (C) 2005-2006, 2008 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of ... | Forage/Gramps | gramps/plugins/export/exportvcalendar.py | Python | gpl-2.0 | 9,612 | [
"Brian"
] | 5ccb09a320db529f760291cbac75cfe399c8f35ce213baceb7107b80d4f3ba15 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# flares.py - Waqas Bhatti (wbhatti@astro.princeton.edu) - Oct 2017
'''
This contains a stellar flare model from Pitkin+ 2014.
http://adsabs.harvard.edu/abs/2014MNRAS.445.2268P
'''
import numpy as np
##################################
## MODEL AND RESIDUAL FUNCTIONS ... | lgbouma/astrobase | astrobase/lcmodels/flares.py | Python | mit | 3,809 | [
"Gaussian"
] | b3b3f900300125528fa09481d8c9164a621db0a16b8be975a0b99320c284e2cb |
# Copyright 2009-2015 Eucalyptus Systems, Inc.
#
# 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; version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# b... | gholms/eucalyptus-service-image | esitoolsupport/esibase.py | Python | bsd-2-clause | 5,149 | [
"VisIt"
] | b11319f3ce1a55b57e5d7b9ad1a361ad219712a0023ba894f002c4cc8f3b165d |
from functools import reduce
from determinant import det
from matrix import mat , transpose , reverse , show , subscripts , parse
from combinatorics import C
from information import comparator
def mohanty ( compare , Mo , m , n ) :
"""
>>> compare = comparator( [ ] )
>>> Mo = mat( 0 , 0 )
>>> mohanty( compar... | aureooms/mupi | mohanty.py | Python | agpl-3.0 | 3,115 | [
"Gaussian"
] | 7b771751ae51df83806065109961a97eb12a6a49f86704fd4c496df80a5d6e92 |
# Copyright 2021 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | google-research/vmoe | vmoe/moe.py | Python | apache-2.0 | 19,848 | [
"MOE"
] | 6217eb171b9f0fb9fea4994f4a898e31b43e57c5c1edee588179bf692bc6aa0c |
# -*- coding: utf-8 -*-
"""
End-to-end tests for the LMS Instructor Dashboard.
"""
import ddt
from bok_choy.promise import EmptyPromise
from six.moves import range
from common.test.acceptance.fixtures.certificates import CertificateConfigFixture
from common.test.acceptance.fixtures.course import CourseFixture, XBloc... | cpennington/edx-platform | common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py | Python | agpl-3.0 | 58,884 | [
"VisIt"
] | 9f9a99901486600d970049245c27d5071ad5514759288b5ddfe410c1f4035524 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2012-2013 Async Open Source <http://www.async.com.br>
## 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 Fou... | andrebellafronte/stoq | stoq/gui/test/test_config_wizard.py | Python | gpl-2.0 | 10,749 | [
"VisIt"
] | 5022b1c946272dd9686816411f7f26343280ce9e22438462507e3a0588945af2 |
from matplotlib import rc
fsize = 17
rc('text', usetex=False)
rc('font', size=fsize)#, ftype=42)
line_width = 3
point_size = 30
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import yt
import numpy as np
import glob
from onezone import star
import os
import sys
from galaxy_analysis.analysis... | aemerick/galaxy_analysis | misc/missing_mass_analysis.py | Python | mit | 15,245 | [
"Galaxy"
] | 786b75f3bd43cd09b1d95373999ada4e14964cb67029c545d1be514c2d5f4f29 |
# Halldór Jens Vilhjálmsson
from . import room
import random
import time
import turtle
import os
# Brotinn Lykill og Brotinn Lykill(43) Sun Cream -> Eidur
print("You are in room 43!")
time.sleep(1)
print("The first thing you see is a Treasure Goblin from Diablo 3")
room.grunnur.items.append(["Sun Cream"])
print("YOU... | Forritarar-FS/Kastali | pythonHus/room43.py | Python | unlicense | 2,219 | [
"VisIt"
] | d94b3e8da355054900f40d81d10c1d55f0b4df4b521ccd85a220c9c821acd733 |
#! /usr/bin/python
# Copyright Ivan Sovic, 2015. www.sovic.org
#
# Creates a pileup from a given SAM/BAM file, and calls consensus bases (or variants).
import os;
import sys;
import operator;
import subprocess;
VERBOSE_VARIANT_FILE = True;
OUTPUT_N_VARIANTS = False;
def increase_in_dict(dict_counter, value):
try:
... | isovic/ra-consensus | src/denovoconsensus3.py | Python | mit | 30,955 | [
"BWA"
] | e115033504130485cc3a11385eedfa95558cfc4daf0b47043d54c95741737908 |
# ====================================================================
# 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 re... | romanchyla/pylucene-trunk | samples/LuceneInAction/lia/advsearching/MultiSearcherTest.py | Python | apache-2.0 | 2,564 | [
"MOOSE",
"ORCA"
] | c44a148356937ee6f4c8044bc256282bd4c089a9add2e716cfa1e30aec61694a |
#
# Copyright (c) 2004 Conectiva, Inc.
#
# Written by Anders F Bjorklund <afb@users.sourceforge.net>
#
# This file is part of Smart Package Manager.
#
# Smart Package Manager 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 Softwar... | blackPantherOS/packagemanagement | smartpm/smart/interfaces/qt/priorities.py | Python | apache-2.0 | 13,734 | [
"CRYSTAL"
] | a04bb12141745585f98b9d1ad187e31d8d12f7b5da57f5daeba6422f761a6809 |
import numpy as np
from ase.units import Hartree
from gpaw.aseinterface import GPAW
from gpaw.lcao.overlap import NewTwoCenterIntegrals
from gpaw.utilities import unpack
from gpaw.utilities.tools import tri2full, lowdin
from gpaw.lcao.tools import basis_subset2, get_bfi2
from gpaw.coulomb import get_vxc as get_ks_xc
f... | robwarm/gpaw-symm | gpaw/lcao/pwf2.py | Python | gpl-3.0 | 16,335 | [
"ASE",
"GPAW"
] | a4d1b055dcded331a14330796c9858b59ad79cfb8d87bcc1dac56555bf1e5c32 |
"""
Generate samples of synthetic data sets.
"""
# Authors: B. Thirion, G. Varoquaux, A. Gramfort, V. Michel, O. Grisel,
# G. Louppe
# License: BSD 3 clause
import numpy as np
from scipy import linalg
from ..utils import check_random_state
def make_classification(n_samples=100, n_features=20, n_informativ... | joshbohde/scikit-learn | sklearn/datasets/samples_generator.py | Python | bsd-3-clause | 30,408 | [
"Gaussian"
] | 3a6caa6029d72c65c90d705137c00e1f3e3537efc8fb42f4e0e7ef2b233b4b19 |
# This file is part of Androguard.
#
# Copyright (C) 2012, Geoffroy Gueguen <geoffroy.gueguen@gmail.com>
# 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:/... | reox/androguard | androguard/decompiler/dad/instruction.py | Python | apache-2.0 | 37,768 | [
"VisIt"
] | 205f0de1f005429d8527e5af68edf7753b4c03b6298249674bc9843257a73d90 |
# encoding: utf-8
"""surfaceslab.py - Window for setting up surfaces
"""
import gtk
from gettext import gettext as _
from ase.gui.widgets import pack, cancel_apply_ok, oops
from ase.gui.pybutton import PyButton
from ase.gui.setupwindow import SetupWindow
import ase.lattice.surface as _surf
import ase
import numpy as n... | suttond/MODOI | ase/gui/surfaceslab.py | Python | lgpl-3.0 | 10,313 | [
"ASE",
"CRYSTAL"
] | 09279a5140650ef9d597104f036aa533b7d8f46280856f1e0931834a02b2d0da |
"""
This is a data file for IsyEvent.py
"""
# author : Peter Shipley <peter.shipley@gmail.com>
# copyrigh : Copyright (C) 2015 Peter Shipley
# license : BSD
__all__ = [] # EVENT_CTRL, LOG_USERID
## EVENT_CTRL ##
EVENT_CTRL = {
"_0" : "Heartbeat",
"_1" : "Trigger",
"_2" : "Protocol Spe... | joegross/ISYlib-python | ISY/IsyEventData.py | Python | bsd-2-clause | 9,543 | [
"Elk"
] | 2ef1267f9ec32de3fe87c3a72e070e65133179344e17bf283f724c0a45f134e8 |
# Outdoor Comfort Calculator - Univeral Thermal Climate Index(UTCI)
#
# Ladybug: A Plugin for Environmental Analysis (GPL) started by Mostapha Sadeghipour Roudsari
#
# This file is part of Ladybug.
#
# Copyright (c) 2013-2015, Chris Mackey <Chris@MackeyArchitecture.com>
# Ladybug is free software; you can redistribu... | samuto/ladybug | src/Ladybug_Outdoor Comfort Calculator.py | Python | gpl-3.0 | 23,821 | [
"EPW"
] | 82e0914ee4fe0fcd7f738e598d879477733a463d77e952bdd8f22c494bdfb457 |
from __future__ import print_function, division
import os,unittest
from pyscf.nao import tddft_iter
from pyscf.nao.m_comp_spatial_distributions import spatial_distribution
import h5py
import numpy as np
dname = os.path.dirname(os.path.abspath(__file__))
Ha = 27.211386024367243
td = tddft_iter(label='water', iter_broa... | gkc1000/pyscf | pyscf/nao/test/test_0072_tddft_iter_dens_spatial.py | Python | apache-2.0 | 2,632 | [
"PySCF"
] | 3ddf8cc41c2a6da1630cb9ecc2e6b47faaab88152b9f5ed396ed6c602d0fa1bc |
# 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... | Laurawly/tvm-1 | tests/python/frontend/pytorch/test_forward.py | Python | apache-2.0 | 135,425 | [
"VisIt"
] | 309bd046f1dc1b42a60c1006b616e47969ada13d9d3ac25023113cbee824dedb |
'''
Elements for building Deep Neural Networks with Keras.
---
This file is part of Nifty python package. Copyright (c) by Marcin Wojnarski.
Nifty 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... | mwojnars/nifty | deep/keras.py | Python | gpl-3.0 | 24,030 | [
"NEURON"
] | 22b8649ccdfefa0c39697b388dcfb684260615c1096767d4fb5564339ff828b0 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
# The MIT License (MIT)
# This code is part of the Random3Dcity package
# Copyright (c) 2015
# Filip Biljecki
# Delft University of Technology
# fbiljecki@gmail.com
# Permission is hereby granted, free of charge, to any person obtaining... | tudelft3d/Random3Dcity | generateCityGML.py | Python | mit | 351,967 | [
"xTB"
] | d087b6533209576919e00fdcf957517d5a65dd7b1e55952c7727870babc9cd50 |
""" Schemas for mesoscope scans."""
import datajoint as dj
from datajoint.jobs import key_hash
import matplotlib.pyplot as plt
import numpy as np
import scanreader
from . import experiment, notify, shared
from .utils import galvo_corrections, signal, quality, mask_classification, performance
from .exceptions import Pi... | ecobost/pipeline | python/pipeline/meso.py | Python | lgpl-3.0 | 82,180 | [
"Gaussian"
] | 03063006f9b91e3b3e0a453aaf345830b275714568318008f6ee73fb8f20a93b |
import numpy as np
import tensorflow as tf
from traindata import training
from test import parsing
import logging
import re
import os
import csv
import gensim
import json
import argparse
logging.basicConfig(format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p',level=logging.DEBUG)
logging.info('logger start... | rakat/depparser | main.py | Python | apache-2.0 | 4,816 | [
"MCell"
] | c9699d4edd02e12a9ddd075cffebeec9b89daa164838ecfaf52a72440c227c40 |
# -*- coding: utf-8 -*-
# Copyright (C) 2011-2013 by Florian Mounier, Kozea
# This file is part of pystil, licensed under a 3-clause BSD license.
def labelize(string, lang):
"""return the label for a criteria"""
if lang == 'fr':
return {
'new': 'Nouvelles visites',
'unique': 'V... | Kozea/pystil | pystil/i18n.py | Python | bsd-3-clause | 3,404 | [
"VisIt"
] | bc9dc6c71e81e8d9ad91fcfa8f4d56bbbd2aee33f0e56e01307a53b93a94df38 |
from math import pi, sqrt
# flux in 1/(m^2*s)
# 1e15 is the surface atom density in atoms/cm^2. I convert to m^2 by a factor of 100^2
Na = 6.02214e23
Z = 1e15*(100**2)
# mass in kg
m = 28/(Na*1000)
# boltzmann constant J/K, kb = R/Na
kb = 1.38066e-23
# Temperature, Kelvin
T = 300
# sticking coefficient
sticking = 1
... | mannyfin/IRAS | plotTPD_data programs/HertzKnudsen.py | Python | bsd-3-clause | 1,193 | [
"CRYSTAL"
] | 4ec8e4a0a0eb7d1df82af93a243b0c97ee0e4514880070a69edd27e267ecf934 |
##########################################################################
#
# Copyright 2008-2010 VMware, Inc.
# All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software withou... | tuanthng/apitrace | wrappers/gltrace.py | Python | mit | 54,571 | [
"VisIt"
] | 8a132b4f6f4bcff87eb122a8f3b3f2581792b79a8d8b7ad5d68fc81d9c7ce4e4 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
##
# derived_models.py: Models that decorate and extend other models.
##
# © 2017, Chris Ferrie (csferrie@gmail.com) and
# Christopher Granade (cgranade@cgranade.com).
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted p... | Alan-Robertson/python-qinfer | src/qinfer/derived_models.py | Python | agpl-3.0 | 41,714 | [
"Gaussian"
] | c4347ffa05c7f7204f51a24df9c7b3c6e9c64f62562b1f3e3af2e74143aea7aa |
#!/usr/bin/env python
#Dan Blankenberg
"""
Updates metadata in the database to match rev 1891.
Remember to backup your database before running.
"""
import sys, os, ConfigParser
import galaxy.app
from galaxy.util.bunch import Bunch
import galaxy.datatypes.tabular
assert sys.version_info[:2] >= ( 2, 4 )
def main():
... | volpino/Yeps-EURAC | scripts/cleanup_datasets/update_metadata.py | Python | mit | 3,156 | [
"Galaxy"
] | 48adf0462c9d339f9befbf022184af05a40e5ae44aa54ea889a988ad1f145487 |
""""
This script builds the landcover codes input csv for heat source based on
using the ttools nodes feature class
"""
from __future__ import print_function
import arcpy
import csv
from operator import itemgetter
from os.path import join
from os.path import exists
# -------------------------------------------------... | rmichie/PyScripts | QC_S_Willamette/Build_LC_Codes.py | Python | apache-2.0 | 5,652 | [
"Brian"
] | 8e93591e536f40b445372bbc1ddddf612704d553e89241892d5bd2b9a7c552c2 |
# $HeadURL: $
""" ElementInspectorAgent
This agent inspect Resources, and evaluates policies that apply.
"""
import datetime
import math
import Queue
from DIRAC import S_ERROR, S_OK
from DIRAC.Core.Base.AgentModule import AgentMo... | hgiemza/DIRAC | ResourceStatusSystem/Agent/ElementInspectorAgent.py | Python | gpl-3.0 | 8,749 | [
"DIRAC"
] | 412a566b269295fc833281077fb94a35c721a44cf6e7579b2deb1e929dc58176 |
#!/usr/bin/python
# system
from collections import defaultdict
from functools import wraps
import pdb
import pprint
import re
import sys
import time
import traceback
# pypi
from splinter import Browser
from treelib import Tree
# local
import user as userdata
import list_to_tree
pp = pprint.PrettyPrinter(indent=4)
... | metaperl/karatbars-utils | k0de/upgraded/login.py | Python | mit | 1,933 | [
"VisIt"
] | b6b5c35ff778b44faab423e9e5807aba0ba7f725c0ecbf0e7bff9b92773ae301 |
from functools import wraps
from hyperspy.component import Component
_CLASS_DOC = \
"""%s component (created with Expression).
.. math::
f(x) = %s
"""
def _fill_function_args(fn):
@wraps(fn)
def fn_wrapped(self, x):
return fn(x, *[p.value for p in self.parameters])
return fn_wrapped
... | CodeMonkeyJan/hyperspy | hyperspy/_components/expression.py | Python | gpl-3.0 | 8,366 | [
"Gaussian"
] | 86c09b11e3b5c226bd10757d276040926c18f46445b8540b348726a61450fd04 |
"""Functionality for manipulating multiple grism exposures simultaneously
"""
import os
import time
import glob
from collections import OrderedDict
import multiprocessing as mp
import scipy.ndimage as nd
import numpy as np
import matplotlib.pyplot as plt
from astropy.table import Table
import astropy.io.fits as pyfi... | gbrammer/grizli | grizli/multifit.py | Python | mit | 194,256 | [
"Gaussian"
] | f826384d325864e17d05f467f3252c7545c44b9a9af96aa801bf6a3d1455debc |
#!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Makes sure files have the right permissions.
Some developers have broken SCM configurations that flip the executable
permission... | sgraham/nope | tools/checkperms/checkperms.py | Python | bsd-3-clause | 13,349 | [
"Galaxy",
"xTB"
] | b83e5462961639340b23e06f5bbfcad75e54f37491d0c2a32387edac680380c4 |
import os, sys, time
from PlummerGalaxy import PlummerGalaxy
def printargs():
print("arguments: {numpts} {nbody: aarseth|simplecpu|opencl-cpu|opencl-gpu} {optional:render?} {optional:opencl-particles-per-thread}")
if len(sys.argv) <= 2:
printargs()
quit()
# ==================== Argument 1: number of poin... | jasonbunk/NBodyGalaxySimulation | run_plummer_benchmark.py | Python | gpl-3.0 | 3,774 | [
"Galaxy"
] | f4b5bd7fcf3c6b7e516e9cac387dc2fb08f10175f2bef7242d4dac320fcc7fc8 |
#-*- encoding=utf-8 -*-
'''
Created on Jan 18, 2013
@author: brian
'''
import openid
from openid.fetchers import HTTPFetcher, HTTPResponse
from urlparse import parse_qs, urlparse
from django.conf import settings
from django.test import TestCase, LiveServerTestCase
from django.core.cache import cache
from django.test.... | BehavioralInsightsTeam/edx-platform | openedx/core/djangoapps/external_auth/tests/test_openid_provider.py | Python | agpl-3.0 | 21,207 | [
"Brian"
] | 02807b0ffab0b8be3a217f4df8cf9c0ae63712252adde68cfbd4a24b114b2f02 |
#!/usr/bin/python
# Physics, a 2D Physics Playground for Kids
# Copyright (C) 2008 Alex Levenson and Brian Jordan
# Copyright (C) 2012 Daniel Francis
# Copyright (C) 2012-13 Walter Bender
# Copyright (C) 2013 Sai Vineet
# Copyright (C) 2012-13 Sugar Labs
# This program is free software: you can redistribute it ... | walterbender/physics | physics.py | Python | gpl-3.0 | 9,021 | [
"Brian"
] | 2a4012d53441a289de3ff5c4e757349d605af0e02bb4d7a1f988c87c43416d62 |
"""ebsd module to manipulate Electron Back Scattered data sets."""
import h5py
import numpy as np
import os
from pymicro.crystal.microstructure import Orientation
from pymicro.crystal.lattice import Symmetry, CrystallinePhase, Lattice
class OimPhase(CrystallinePhase):
"""A class to handle a phase. This is just a ... | heprom/pymicro | pymicro/crystal/ebsd.py | Python | mit | 28,109 | [
"CRYSTAL"
] | 17c18cd176aabd14edeedede99ef9edd8ff8f131cf1b1f7b17d851bca8d55b41 |
#* 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/lgpl-2.1.html
def highlig... | harterj/moose | python/peacock/Input/BCHighlighter.py | Python | lgpl-2.1 | 1,358 | [
"MOOSE",
"VTK"
] | b6a02765e9d42abe725958b7b51c77a6ac8760ea1cf0c8ff54c0aed496e1771b |
from __future__ import print_function, division
import unittest, numpy as np
from pyscf import gto, tddft, scf
from pyscf.nao import bse_iter
from pyscf.nao import polariz_nonin_ave
from pyscf.data.nist import HARTREE2EV
class KnowValues(unittest.TestCase):
def test_0164_bse_h2o_spin2_uhf_nonin(self):
""" Inter... | gkc1000/pyscf | pyscf/nao/test/test_0164_bse_h2o_spin2_uhf_nonin.py | Python | apache-2.0 | 1,689 | [
"PySCF"
] | c91d5366aaeb3e3b8d4f48e3eddf54de4b4e4fa04683dd8ef71a7175cb17fa02 |
# 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 use ... | Kami/libcloud | libcloud/common/google.py | Python | apache-2.0 | 31,736 | [
"VisIt"
] | 0c6e6754488afe5b6adf38cc1f8579c6faf94f264d87d0054a0332de2709d421 |
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2019 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
#... | dgasmith/psi4 | psi4/driver/qcdb/qcformat.py | Python | lgpl-3.0 | 4,080 | [
"Psi4"
] | 2c77643aa3804e709c31c9b2bfd854bd534323446b9e3058db6dd7fb3ce915db |
#!/usr/bin/python
from optparse import OptionParser
import numpy as np
import sys
usage = """
A script for creating an error model from biased sequencing data.
Information about the biases should be formatted as a 4x4 table
indicating the probability of an experimentally-derived change
from the rows to the columns... | pkerpedjiev/bwa-pssm | scripts/error_model.py | Python | gpl-3.0 | 2,785 | [
"BWA"
] | 9818d7ab11aaedc64546f46a2510d54b87ec072cb385710bf64f000670eee9e9 |
import itertools
import math
from ..ssa import objtypes
from . import visitor
from .stringescape import escapeString
# Explicitly cast parameters to the desired type in order to avoid potential issues with overloaded methods
ALWAYS_CAST_PARAMS = 1
class VariableDeclarator(object):
def __init__(self, typename, i... | Cubitect/ASMModSuit | Krakatau-master/Krakatau/java/ast.py | Python | gpl-3.0 | 28,636 | [
"VisIt"
] | 45c94706fc8dc37f356434bb5168c7cb13e1aae430b5d20f4a23e101ddae77b6 |
import os
import unittest
from datasources.FileDataSource import FileDataSource
from parsers.NaPekarceParser import NaPekarceParser
class NaPekarceParserTest(unittest.TestCase):
def test_parse(self):
parser = NaPekarceParser(FileDataSource(os.path.dirname(__file__) + '/page_napekarce.html', 'utf8'))
... | BrandEmbassy/dailymenu | tests/parsers/NaPekarceParserTest.py | Python | mit | 1,531 | [
"ESPResSo"
] | 328846f9975fa492ead1ab557bf09fd110d60324431c02acf2399b549ba33e8e |
# Psychrometric Chart
#
# Ladybug: A Plugin for Environmental Analysis (GPL) started by Mostapha Sadeghipour Roudsari
#
# This file is part of Ladybug.
#
# Copyright (c) 2013-2015, Chris Mackey <Chris@MackeyArchitecture.com>
# Ladybug is free software; you can redistribute it and/or modify
# it under the terms of t... | boris-p/ladybug | src/Ladybug_Psychrometric Chart.py | Python | gpl-3.0 | 117,875 | [
"EPW"
] | 4fda24157eff26a162fc32759f9edbded719311871f0804f95a4778b9404d717 |
#!/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... | jdilallo/jdilallo-test | examples/adwords/v201309/error_handling/handle_policy_violation_error.py | Python | apache-2.0 | 3,956 | [
"VisIt"
] | 186893dfca858a2523273dc2746062c3b004b28fe427a340fdbe13de49690238 |
#!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | gkc1000/pyscf | pyscf/dmrgscf/test/test_dmrgnevpt2.py | Python | apache-2.0 | 1,447 | [
"PySCF"
] | 3eb26bd659bf1564307c1dea68af0fcd998626f4307344c37847587cfa354a41 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from html.parser import HTMLParser
from html.entities import name2codepoint
class MyHTMLParser(HTMLParser):
def handle_starttag(self, tag, attrs):
print('<%s>' % tag)
def handle_endtag(self, tag):
print('</%s>' % tag)
def handle_startendtag(self... | shawnleo001/Pythonoob | Module/module_7html-test.py | Python | gpl-3.0 | 35,404 | [
"COLUMBUS"
] | fc7695ac3e54ae83e5c6dade005afd6662569a0a68cb1593824590bed39e32e4 |
import md5
import dateutil.parser
import dateutil.relativedelta
import json
import time
from flask import jsonify, request, abort, make_response, g
from flaskapimongo import app, mongo
from pymongo.errors import OperationFailure
@app.before_request
def before_request():
g.request_start_time = time.time()
g.re... | antonsoroko/flaskapimongo | flaskapimongo/views.py | Python | gpl-3.0 | 3,109 | [
"VisIt"
] | 01680f88ca4ccfae462298f01abff887011d8e0fd881ea429cca2880248e92ee |
from __future__ import print_function, division
import time
import warnings
from mdtraj.utils.delay_import import import_
from mdtraj.utils.validation import ensure_type, cast_indices, check_random_state
from mdtraj.utils.unit import in_units_of
from mdtraj.utils.rotation import rotation_matrix_from_quaternion, uniform... | casawa/mdtraj | mdtraj/utils/__init__.py | Python | lgpl-2.1 | 3,770 | [
"MDTraj"
] | a3f06f026679fdeb3cef62adcde45dc9f604ae30e1821ffb1cad63e696688683 |
"""
Draw a background for HE0435 (should be generalized later)
Compute the precise astometry for Euler pixel size from Courbin2011
"""
import os
import astropy.io.fits as pyfits
import scipy
# Astrometry : from Courbin2011
# in arcseconds
A = (0.0, 0.0)
B = (-1.4743, +0.5518)
C = (-2.4664, -0.6022)
D = (-0.9378, -1.... | COSMOGRAIL/COSMOULINE | pipe/extrascripts/background/drawbackground.py | Python | gpl-3.0 | 7,062 | [
"Gaussian"
] | 6b07e5d44f013925c2e5e037c945c9f442b3da7b1a61075c8ef8ad2146ae9926 |
#!/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... | nuclear-wizard/moose | python/peacock/tests/exodus_tab/test_VTKWindowPlugin.py | Python | lgpl-2.1 | 6,061 | [
"MOOSE",
"VTK"
] | a9a979201a73cc51a4157fb0a6af9dff7e4429b532c4a1930f720531ac2d603b |
__author__ = 'tweninge'+'@'+'nd.edu'
__author__ = 'saguinag'+'@'+'nd.edu'
__author__ = 'rodrigopala91'+'@'+'gmail.com'
__version__ = "0.1.0"
##
## hrgm = hyperedge replacement grammars model
##
# TODO: Sort out the returns
# VersionLog:
# 0.0.1 Initial state; modified tw_karate_chop to accommodate this version
#
im... | abitofalchemy/hrg_nets | hrgm.py | Python | gpl-3.0 | 10,646 | [
"VisIt"
] | a73e623526c95dd2f1783bd41b3acc7fbcaee410120de3cf5daea64d31f1f6e3 |
# Orca
#
# Copyright 2013 Igalia, S.L.
#
# Author: Joanmarie Diggs <jdiggs@igalia.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your o... | ruibarreira/linuxtrail | usr/lib/python3/dist-packages/orca/orca_gui_commandlist.py | Python | gpl-3.0 | 4,290 | [
"ORCA"
] | 1798322dd848caaaa24cb7cecc41e27c91d8d35f77c9e79844229cb050f7e6c2 |
"""K-means clustering"""
# Authors: Gael Varoquaux <gael.varoquaux@normalesup.org>
# Thomas Rueckstiess <ruecksti@in.tum.de>
# James Bergstra <james.bergstra@umontreal.ca>
# Jan Schlueter <scikit-learn@jan-schlueter.de>
# Nelle Varoquaux
# Peter Prettenhofer <peter.prettenh... | ashhher3/scikit-learn | sklearn/cluster/k_means_.py | Python | bsd-3-clause | 54,782 | [
"Gaussian"
] | 511be01489595e399524218ca92dfbbc1283f096e48ec153ba279951fc7ad6c5 |
# ----------------------------------------------------------------------------
# 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.
# --------------------------------------------... | SamStudio8/scikit-bio | skbio/tests/test_base.py | Python | bsd-3-clause | 12,772 | [
"scikit-bio"
] | e04aab3a68504779c716202468779bdeface54db8b5bff4e49da10f928ba6fbd |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.