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 |
|---|---|---|---|---|---|---|---|
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2007 Donald N. Allingham
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2011 Tim G L Lyons
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publ... | SNoiraud/gramps | gramps/gen/filters/rules/family/__init__.py | Python | gpl-2.0 | 2,993 | [
"Brian"
] | 1fc119a81144048a8ae1a40e11c3e88d6a7f27c6cf7e2f2a7cc6e5c0ad58dbdc |
# encoding: utf-8
"""
Paging capabilities for IPython.core
Authors:
* Brian Granger
* Fernando Perez
Notes
-----
For now this uses ipapi, so it can't be in IPython.utils. If we can get
rid of that dependency, we could move it there.
-----
"""
#----------------------------------------------------------------------... | WillisXChen/django-oscar | oscar/lib/python2.7/site-packages/IPython/core/page.py | Python | bsd-3-clause | 12,093 | [
"Brian"
] | b3c089c01d9e6fec31a93257aa6f1ca075f52de6112b4840ee0787f4296aaa24 |
from Firefly import logging
from Firefly.components.zwave.device_types.contact_sensor import ZwaveContactSensor
from Firefly.const import CONTACT, CONTACT_CLOSED
ALARM = 'alarm'
BATTERY = 'battery'
TITLE = 'ZW120 Aeotec Door/Window Sensor'
COMMANDS = []
REQUESTS = [ALARM, BATTERY, CONTACT]
INITIAL_VALUES = {
'_al... | Firefly-Automation/Firefly | Firefly/components/zwave/aeotec/zw120_door_window_sensor_gen5.py | Python | apache-2.0 | 1,780 | [
"Firefly"
] | 439880a945abe9d0f5e4533359ce57aebee8c99c6ef04e73e4b6fb2ad3659500 |
# 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
#
# Unless required by appl... | gkc1000/pyscf | pyscf/nao/test/test_0031_rsh_vec.py | Python | apache-2.0 | 1,558 | [
"PySCF"
] | 66347d4248547b23cc67a3bbf1ff73d789bf37bd6d94d1b2e24b71dc4659dd29 |
from io import open
from logging import getLogger
from os.path import abspath, dirname, join
from xml.etree import ElementTree
from pulsar.tools.validator import ExpressionValidator
log = getLogger(__name__)
class ToolBox(object):
"""
Abstraction over a tool config file largely modelled after
Galaxy's ... | natefoo/pulsar | pulsar/tools/toolbox.py | Python | apache-2.0 | 5,322 | [
"Galaxy"
] | a423b759ad57002d18d55eb2c2e39e9952c31d53db13571a00671a715897a673 |
"""
====================================================
How to convert 3D electrode positions to a 2D image.
====================================================
Sometimes we want to convert a 3D representation of electrodes into a 2D
image. For example, if we are using electrocorticography it is common to
create sca... | mne-tools/mne-tools.github.io | 0.15/_downloads/plot_3d_to_2d.py | Python | bsd-3-clause | 4,539 | [
"Mayavi"
] | 92285373db387102cb9ab03f139f4a461098fc55aec7e1ef4d5dac6f8b94ae7e |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are m... | mikehulluk/morphforge | src/morphforgecontrib/simulation/channels/neuroml_via_neurounits/neuroml_via_neurounits_neuron.py | Python | bsd-2-clause | 2,634 | [
"NEURON"
] | b8d686830879042c6a349a26b6008d88783088c1471393f0c7d543dc51b69b9d |
#!/usr/bin/env python
import unittest
import numpy as np
import pyscf.pbc.mp.kmp2
from pyscf.pbc.mp.kmp2 import get_nocc, get_nmo, get_frozen_mask
class fake_mp:
def __init__(self, frozen, mo_occ, nkpts):
self._nocc = None
self._nmo = None
self.frozen = frozen
self.mo_occ = mo_occ... | gkc1000/pyscf | pyscf/pbc/mp/test/test_mask.py | Python | apache-2.0 | 4,496 | [
"PySCF"
] | 67f1f3ed0710360b99323e86abf3fa90ecbed47fcbf016f77498c67a1d393d75 |
#!/usr/bin/env python3
# coding:utf-8
"""
This module contains the necessary classes for serialising and querying ORF data.
"""
import os
import sqlite3
import pysam
from sqlalchemy import Column, String, Integer, ForeignKey, CHAR, Index, Float, Boolean
import sqlalchemy.exc
from sqlalchemy.orm import relationship, b... | lucventurini/mikado | Mikado/serializers/orf.py | Python | lgpl-3.0 | 18,868 | [
"pysam"
] | 2e54b6bc13ca70f6e600632f45ac746ef12b574da4b02311654fad99da890468 |
"""
==================================
Constants (:mod:`scipy.constants`)
==================================
.. module:: scipy.constants
Physical and mathematical constants and units.
Mathematical constants
======================
============ =================================================================
``pi`... | teoliphant/scipy | scipy/constants/__init__.py | Python | bsd-3-clause | 9,743 | [
"Avogadro"
] | da84828db0850eb1a265774e2493aa0aeab8f721492f669933593c2df5481c29 |
# Author: Carlos Xavier Hernandez <cxh@stanford.edu>
# Contributors:
# Copyright (c) 2016, Stanford University and the Authors
# All rights reserved.
import numpy as np
from collections import OrderedDict
from six import string_types
from ..featurizer import Featurizer
class FeatureSelector(Featurizer):
"""Concat... | Eigenstate/msmbuilder | msmbuilder/feature_selection/featureselector.py | Python | lgpl-2.1 | 5,426 | [
"MDTraj"
] | 6cd34b02e942eea64d113137c37c3ce9b4e86ce72576a4b90629765403f97f5e |
# -*- coding: utf-8 -*-
"""
Krige CV
--------
Searching for optimal kriging parameters with cross validation
"""
import numpy as np
from pykrige.rk import Krige
from sklearn.model_selection import GridSearchCV
# 2D Kring param opt
param_dict = {
"method": ["ordinary", "universal"],
"variogram_model": ["lin... | bsmurphy/PyKrige | examples/08_krige_cv.py | Python | bsd-3-clause | 1,953 | [
"Gaussian"
] | 3c93a3810beda712ed8a58fc79bf2eb157592778144444bf96166e72a146ff1b |
# Copyright (C) 2017,2018
# Max Planck Institute for Polymer Research
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Licen... | espressopp/espressopp | src/analysis/SubregionTracking.py | Python | gpl-3.0 | 4,280 | [
"ESPResSo"
] | ccd2ce4aa8505e6c247f09fa68f1768b4e4f193a8aaaa8a9d584887798626995 |
import numpy as np
from ase.atoms import Atoms
from ase.calculators.singlepoint import SinglePointCalculator
from ase.data import atomic_numbers
def get_atoms(cmr_data):
if type(cmr_data)==str:
raise RuntimeError('cmr db-file: the specified cmr group file does not contain any images, only references.\n'+
... | JConwayAWT/PGSS14CC | lib/python/multimetallics/ase/io/cmr_io.py | Python | gpl-2.0 | 2,460 | [
"ASE"
] | 7ffba2c82d1e2bad8bf845d4a1cce8b67a7210f974f5eb8c2555fe10e63f056f |
# fMBT, free Model Based Testing tool
# Copyright (c) 2012, Intel Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU Lesser General Public License,
# version 2.1, as published by the Free Software Foundation.
#
# This program is distribut... | mixu-/fMBT | utils3/eyenfinger.py | Python | lgpl-2.1 | 71,456 | [
"Gaussian"
] | 8d188439771fc9e610379b6023415ff0de76ac7d7f11d5ca2b09556798cfba1d |
# Copyright 2014 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | michaelWagner/oppia | core/domain/email_manager_test.py | Python | apache-2.0 | 78,438 | [
"VisIt"
] | 55edb75e142408aaaeb2051bb7e471bae7774ef3d7d9730cc8671951c1bfa17b |
import wx
import wx.grid
import wx.lib.scrolledpanel
import os
import os.path
import sys
import platform
import glob
import webbrowser
try:
# It may have been installed locally in the sandbox
if (platform.system() == "Windows"):
sys.path.append(os.path.expanduser("~") + "\\InteractiveROSETTA\\molfile2pa... | schenc3/InteractiveROSETTA | InteractiveROSETTA/scripts/residuecreator.py | Python | gpl-2.0 | 29,978 | [
"PyMOL"
] | ac8b96be09b23cecb6f4e12d74ed454f5548ad4740afe24497908395097ebb96 |
# -*- coding: utf-8 -*-
# Copyright 2007-2021 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | erh3cq/hyperspy | hyperspy/tests/model/test_model_as_dictionary.py | Python | gpl-3.0 | 8,879 | [
"Gaussian"
] | 776218fa0dfcb964524a5ac9616872fdf92c6454812ab6333022032e78e1015f |
#
# 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 us... | alec-heif/MIT-Thesis | spark-bin/python/pyspark/ml/regression.py | Python | mit | 59,191 | [
"Gaussian"
] | 53208cd18c7c89cd154a19ed4470774db45a5c1f388de544e2b640945a940247 |
from vtk import *
from vtk.web.camera import *
from vtk.web.query_data_model import *
import json, os, math, gzip, shutil
# Global helper variables
encode_codes = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
arrayTypesMapping = ' bBhHiIlLfd'
jsMapping = {
'b': 'Int8Array',
'B': 'Uint8Array',
'h': 'Int16Array',
'H': ... | SimVascular/VTK | Web/Python/vtk/web/dataset_builder.py | Python | bsd-3-clause | 22,027 | [
"VTK"
] | 38f72ae8d4e5fe9bc1b6af46ebffea46aa89360a8eeae54fb9fda5ca3c6fbac5 |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | jwlawson/tensorflow | tensorflow/contrib/py2tf/pyct/static_analysis/access.py | Python | apache-2.0 | 4,911 | [
"VisIt"
] | 03f68cef397dcef619e7748d264428115b0960ff4cc90d7af4ec5fcb313234d0 |
import os
import sys
from subprocess import Popen, PIPE, check_call, check_output
import pprint
import re
# This script is intended to help copy dynamic libraries used by FreeCAD into
# a Mac application bundle and change dyld commands as appropriate. There are
# two key items that this currently does differe... | timthelion/FreeCAD | src/Tools/MakeMacBundleRelocatable.py | Python | lgpl-2.1 | 11,092 | [
"VisIt"
] | 8dddc43e74c95e8dc542ea8b671658571e9e51f3f430a073073d91bb98b216dc |
from ..simstore.custom_json import JSONCodec
try:
import mdtraj as md
except ImportError:
md = None
HAS_MDTRAJ = False
else:
HAS_MDTRAJ = True
import pandas as pd
def _check_mdtraj():
if not HAS_MDTRAJ:
raise RuntimeError("Unable to import MDTraj.")
def traj_to_dict(obj):
return {'xy... | choderalab/openpathsampling | openpathsampling/experimental/storage/mdtraj_json.py | Python | lgpl-2.1 | 1,220 | [
"MDTraj"
] | 9d9309c98bc1510077b64b2e03e334358a5128d17e0909793b7d0bee1f0b0ffd |
# -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2011, 2012, 2013 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at yo... | MSusik/invenio | invenio/legacy/bibauthorid/webinterface.py | Python | gpl-2.0 | 146,848 | [
"VisIt"
] | b82ce81c5346a3bd60176b6a0582f2391adfef7ecbc2f1d59f4ea812a8e2cd34 |
from ase import Atoms
from ase.visualize import view
from ase.calculators.aims import Aims, AimsCube
from ase.optimize import QuasiNewton
water = Atoms('HOH', [(1,0,0), (0,0,0), (0,1,0)])
water_cube = AimsCube(points=(29,29,29),
plots=('total_density','delta_density',
... | slabanja/ase | doc/ase/calculators/H2O_aims.py | Python | gpl-2.0 | 803 | [
"ASE",
"FHI-aims"
] | e9e39171129c8c0b35262872630c5bb46c0e44611672a0e803000a8e66ba6fd8 |
import os
import sys
from tarfile import is_tarfile
from zipfile import is_zipfile
from ase.atoms import Atoms
from ase.units import Bohr, Hartree
from ase.io.trajectory import PickleTrajectory
from ase.io.bundletrajectory import BundleTrajectory
from ase.calculators.singlepoint import SinglePointDFTCalculator
from as... | conwayje/ase-python | ase/io/__init__.py | Python | gpl-2.0 | 21,693 | [
"ABINIT",
"ASE",
"CASTEP",
"CRYSTAL",
"FHI-aims",
"GPAW",
"GROMOS",
"Gaussian",
"Gromacs",
"LAMMPS",
"Mayavi",
"NetCDF",
"SIESTA",
"TURBOMOLE",
"VASP",
"VTK",
"WIEN2k",
"exciting"
] | b4bc9235b05104c4b92429602faf751bd7b486839b7e327458ab8b6c58bc1698 |
from sklearn.svm import LinearSVC
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import AdaBoostClassifier, GradientBoostingClassifier, RandomForestClassifier
from sklearn.naive_bayes import GaussianNB
from sklearn.pipeline import Pipeline
from sklearn.linear_model import SGDClassifier
from xgb i... | lbn/kaggle | titanic/classifier.py | Python | mit | 866 | [
"Gaussian"
] | 3ca2bdecd0c390db6ad58f1463aa263997c5e33d977011d53e814b2427c2405a |
"""
Helps to implement authentication and authorization using Auth0.
Offers functions for generating the view functions needed to implement Auth0,
a login screen, callback maker, and a function decorator for protecting
endpoints.
"""
import flask
import requests
import functools
import json
import base64
import jwt
... | david4096/ga4gh-server | ga4gh/server/auth/__init__.py | Python | apache-2.0 | 11,719 | [
"VisIt"
] | 5b4827d6acf631af4bbd30eac11e8bac0280c227758369017a0f63cc052c2b94 |
import re
import textwrap
import numpy as np
from pysisyphus.calculators.Calculator import Calculator
class Psi4(Calculator):
conf_key = "psi4"
def __init__(
self,
method,
basis,
to_set=None,
pcm="iefpcm",
solvent=None,
write_fchk=False,
**kw... | eljost/pysisyphus | pysisyphus/calculators/Psi4.py | Python | gpl-3.0 | 5,903 | [
"Psi4"
] | c60693ae4a0f8a8a71096aadbbc987f74198d8919845ad9784f64bc519a3a9dc |
# Copyright (C) 2010-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | psci2195/espresso-ffans | samples/espresso_logo.py | Python | gpl-3.0 | 6,271 | [
"ESPResSo"
] | 09d1fc374cef7d72019d540de165a2ded69d9db4f9c557467ef87b7a4b617ca1 |
from __future__ import with_statement
import time
try:
import simplejson as json
except ImportError:
import json
import logging
from tornado.web import HTTPError
from octopus.core.communication import HttpResponse, Http400, Http404, Http403, HttpConflict, Http500
from octopus.core.enums.rendernode import *
f... | mikrosimage/OpenRenderManagement | src/octopus/dispatcher/webservice/rendernodes.py | Python | bsd-3-clause | 15,694 | [
"Octopus"
] | ab766893f5995e5dec52a38f096f8341fb88fb39750ba85dae45662c05583cf5 |
from unittest import TestCase
import plotly.io as pio
import subprocess
import os
from distutils.version import LooseVersion
import requests
import time
import psutil
import pytest
import plotly.graph_objects as go
# Fixtures
# --------
from plotly.io._orca import find_open_port, which, orca_env
@pytest.fixture()
d... | plotly/python-api | packages/python/plotly/plotly/tests/test_orca/test_orca_server.py | Python | mit | 5,402 | [
"ORCA"
] | 681c1f89af265909475285c4adbedbade8710bb4d28b87e1f8d108fe233566e9 |
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modi... | MSEMJEJME/tkot | renpy/display/anim.py | Python | gpl-2.0 | 20,676 | [
"VisIt"
] | 5db435d6c8451dfce29eb90eaee7a26aa7448a3c5e1a5b623e2d2d8a41baecc5 |
import contextlib
import collections
import pickle
import re
import sys
from unittest import TestCase, main, skipUnless, SkipTest, expectedFailure
from copy import copy, deepcopy
from typing import Any, NoReturn
from typing import TypeVar, AnyStr
from typing import T, KT, VT # Not in __all__.
from typing import Union... | FFMG/myoddweb.piger | monitor/api/python/Python-3.7.2/Lib/test/test_typing.py | Python | gpl-2.0 | 87,769 | [
"VisIt"
] | fa4af0ea3157384b5e533b2bd058469e6c49c0a18cd3f07af716d2812dc588cf |
# Copyright (c) 2001 Autonomous Zone Industries
# Copyright (c) 2002 Bryce "Zooko" Wilcox-O'Hearn
# This file is licensed under the
# GNU Lesser General Public License v2.1.
# See the file COPYING or visit http://www.gnu.org/ for details.
#
# CVS:
__cvsid = '$Id: EGTPConstants.py,v 1.1 2002/07/17 02:02:47 zook... | zooko/egtp | EGTPConstants.py | Python | agpl-3.0 | 1,277 | [
"VisIt"
] | 3de4f98b7564cb69d015815c3075647c10c922eb981c8af276c28e4b70b0b0d8 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
import unittest
import pickle
import warnings
import math
from pymatgen.util.testing import PymatgenTest
from pymatgen.core.periodic_table import Element, Spe... | nisse3000/pymatgen | pymatgen/core/tests/test_periodic_table.py | Python | mit | 16,189 | [
"pymatgen"
] | d46c90779f98ac7a426b554ef47c9a93acfcd4770c0f73ec5fc05f0c908bc39a |
# Copyright 2017 Battelle Energy Alliance, 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 t... | joshua-cogliati-inl/raven | developer_tools/addTestDescriptions.py | Python | apache-2.0 | 5,073 | [
"Brian"
] | 8bd62ad2704cfd89186f4afd533c64d28e02ac97501690934438dcd92d15ec98 |
"""Filter design.
"""
from __future__ import division, print_function, absolute_import
import warnings
import numpy
from numpy import (atleast_1d, poly, polyval, roots, real, asarray, allclose,
resize, pi, absolute, logspace, r_, sqrt, tan, log10,
arctan, arcsinh, sin, exp, cosh,... | ortylp/scipy | scipy/signal/filter_design.py | Python | bsd-3-clause | 127,807 | [
"Gaussian"
] | aa1488e7279335b4e7373f2cf4184781e8e36da1c364375a1709982a81c9e3ad |
"""
Views for user API
"""
from django.shortcuts import redirect
from django.utils import dateparse
from rest_framework import generics, views
from rest_framework.decorators import api_view
from rest_framework.response import Response
from opaque_keys.edx.keys import UsageKey
from opaque_keys import InvalidKeyError
... | xuxiao19910803/edx | lms/djangoapps/mobile_api/users/views.py | Python | agpl-3.0 | 10,046 | [
"VisIt"
] | cc97fc276dba900df36eaeadcb6fa23b6df517fb09f2ed6f1d5cc53042e5f2f0 |
import json
import nose
import datetime
import pylons
import sqlalchemy.orm as orm
import ckan.plugins as p
import ckan.lib.create_test_data as ctd
import ckan.model as model
import ckan.tests.legacy as tests
import ckan.tests.helpers as helpers
import ckanext.datastore.db as db
from ckanext.datastore.tests.helpers ... | namgk/ckan-timeseries | ckanext/timeseries/tests/test_upsert.py | Python | agpl-3.0 | 21,184 | [
"Galaxy"
] | 59ec6bbd33dc17dd057a498177177dd887b3ff04e3721d43e8d66e6c376b8094 |
#
# co_co_sum_has_correct_parameter.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (... | kperun/nestml | pynestml/cocos/co_co_sum_has_correct_parameter.py | Python | gpl-2.0 | 2,733 | [
"NEURON"
] | efce0faed4751887d3be4a8606382baf1c15775d674b89ee868dd89f4be52cd0 |
#!/usr/bin/python
#########################################################################
# Bond Length Calculator #
# Jeff Doak #
# v 1.2 11/29/2011 #
# #
#This program c... | jeffwdoak/vasp_scripts | vasp_scripts/bondlengths.py | Python | mit | 13,023 | [
"CRYSTAL",
"Gaussian"
] | d38c063f04d2a6db48b0a2c90e33f5a863a0f5ce9b5da62b23540e46c5609c89 |
import numpy as np
import math
from pylab import *
from palettable.wesanderson import Zissou_5 as wsZ
import matplotlib.ticker as mtick
from scipy.interpolate import interp1d
from scipy.interpolate import griddata
import scipy.ndimage as ndimage
#read JP and TH files
#def read_JP_files(fname):
# da = np.genfromt... | natj/bender | paper/figs/fig7.py | Python | mit | 6,973 | [
"Gaussian"
] | 532b88b410875ef90a5a020f494f7fb779d67c7c74f1babebbcf0ab5a7ce7185 |
# Copyright 2008-2015 Nokia Solutions and Networks
#
# 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 l... | yahman72/robotframework | src/robot/model/keyword.py | Python | apache-2.0 | 4,031 | [
"VisIt"
] | 2c2577dd9d22e536f9126fa14e8cdb6611a322baa438b534a3ad70abe5cc081f |
"""
Tests related to the cohorting feature.
"""
from uuid import uuid4
from nose.plugins.attrib import attr
from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc
from common.test.acceptance.pages.common.auto_auth import AutoAuthPage
from common.test.acceptance.pages.lms.courseware import... | angelapper/edx-platform | common/test/acceptance/tests/discussion/test_cohorts.py | Python | agpl-3.0 | 5,947 | [
"VisIt"
] | 1f63ff6670395a57addaa8b954e90befee5e14f9490bde0d0ea6fb0dcdf1a31d |
import h5py
import numpy as np
from phonopy.units import VaspToTHz
from phonopy.structure.cells import get_primitive
from upho.phonon.eigenstates import Eigenstates
class BandStructure:
def __init__(self,
paths,
dynamical_matrix,
unitcell_ideal,
... | yuzie007/ph_unfolder | upho/phonon/band_structure.py | Python | mit | 3,762 | [
"phonopy"
] | 6eb58046f2cf6d25b5932c7ad87dbac1fcf1913a74521354c05ff7659e6e2580 |
# -*- coding: utf-8 -*-
# @Author: YangZhou
# @Date: 2017-06-13 00:44:48
# @Last Modified by: YangZhou
# @Last Modified time: 2017-06-23 18:53:35
import aces.config as config
from ase import io
from aces.graph import plot, series
import numpy as np
from aces.runners.phonopy import runner as Runner
import pandas as... | vanceeasleaf/aces | aces/runners/shengbte.py | Python | gpl-2.0 | 28,228 | [
"ASE",
"CRYSTAL",
"phonopy"
] | 576f29e6e34aa6b1efc5ee4d7049071342b26dd08df0e0ffd16d5728ff4787a9 |
"""
Neon Space
By: Dalton Fox, Nathaniel Craiglow, Brandon Mitman and Mason Lee
ETGG1802:52
"""
from particles import *
from functions import *
import time
import sys, os.path
import math
import pygame
import random
if sys.platform in ["win32", "win64"]:
os.environ["SDL_VIDEO_CENTERED"] = "1"
fi... | Cheapsalsa/Neon-Space | neon_space.py | Python | gpl-3.0 | 46,481 | [
"Dalton"
] | 93e26458fc56bbb9e9d201f2f458e24ad723c6980c7d70c4b55e297da0e34bcc |
#/*
# *
# * OpenVPN for Kodi.
# *
# * Copyright (C) 2015 Brian Hornsby
# *
# * This program is free software: you can redistribute it and/or modify
# * it under the terms of the GNU General Public License as published by
# * the Free Software Foundation, either version 3 of the License, or
# * (at your option) any late... | brianhornsby/script.openvpn | resources/lib/openvpn.py | Python | gpl-3.0 | 7,334 | [
"Brian"
] | d56e7d265d60a646c571bcae0074448a29fc1475236bfa8fe49503618eea300d |
#!/bin/env python
# create_meta.py
# Generate the WHAM input files for PyBrella given a complete PyBrella run
from __future__ import division, print_function
from argparse import ArgumentParser, SUPPRESS
from glob import glob
from shared import *
from shutil import rmtree
from stat import S_IEXEC
parser = ArgumentPa... | charlesyuan314/PyBrella | create_meta.py | Python | gpl-3.0 | 3,354 | [
"Amber"
] | 92b543b5a1e64944485cdfdeeff1e4f242d75a0996c85bf59e23ab45920f651c |
# -*- coding: utf-8 -*-
"""Release data for the IPython project."""
#-----------------------------------------------------------------------------
# Copyright (c) 2008, IPython Development Team.
# Copyright (c) 2001, Fernando Perez <fernando.perez@colorado.edu>
# Copyright (c) 2001, Janko Hauser <jhauser@zscout.de>... | madelynfreed/rlundo | venv/lib/python2.7/site-packages/IPython/core/release.py | Python | gpl-3.0 | 5,560 | [
"Brian"
] | 443150d60955aee889838c95d923c58e9248fa194705c6a00afbe35d8f75f364 |
import logging
from celery.task import task
from django.conf import settings
from django.utils import timezone
from myvoice.clinics.models import Visit
from . import importer, utils as survey_utils
from .models import Survey
from .textit import TextItApi, TextItException
logger = logging.getLogger(__name__)
def... | myvoice-nigeria/myvoice | myvoice/survey/tasks.py | Python | bsd-2-clause | 4,682 | [
"VisIt"
] | a907cc1ffe4d8a639e48d543a8a5d12dc6d48bb552cce1366c734146f478c2a2 |
from django.shortcuts import render
from django.shortcuts import redirect
from django.core.urlresolvers import reverse
from django.http import HttpResponse
from rango.models import Category, Page, UserProfile
from rango.forms import CategoryForm, PageForm, UserProfileForm
from datetime import datetime
from rango.webhos... | jxltom/tango_with_django_19 | code/tango_with_django_project/rango/views.py | Python | apache-2.0 | 10,052 | [
"VisIt"
] | 6afd1d4b06c6642166365117336064c2bda364cef7e98c21e4bbab055bc9e4eb |
import numpy as np
from ase.structure import molecule
from ase.constraints import FixedPlane
from ase.optimize import QuasiNewton
from gpaw import GPAW, FermiDirac
from gpaw.test import equal
#----------------------------------
# Initialization
molname = 'benzene-mol'
dimername = 'benzene-dimer'
f = open('benzene-dime... | robwarm/gpaw-symm | gpaw/test/big/vdw/benzene-dimer-T-shaped.py | Python | gpl-3.0 | 2,370 | [
"ASE",
"GPAW"
] | 55c52833d5f67ed4faec5b0782a96a7cdd583808ddc97737faf7d2b7458e0dd9 |
#import sys
import numpy as np
from numpy import array as npa
import matplotlib.pyplot as plt
#from matplotlib.collections import LineCollection
#from matplotlib.gridspec import GridSpec
import pymatgen as mg
from pymatgen.io.vasp.outputs import Vasprun, Procar
from pymatgen.symmetry.bandstructure import HighSymm... | neelravi/vasp | sample.py | Python | gpl-3.0 | 3,223 | [
"VASP",
"pymatgen"
] | 821551654bad7c7914550bec2404878c9fc7fee61d4798d77b5034aebe97a59b |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
##
## See COPYING file distributed along with the ncanda-data-integration package
## for the copyright and license terms
##
"""
Transform an Excel file produced by ASEBA scoring to an NCANDA release format.
```bash
# In this example, the xlsx files are names ASR_Scored_2... | sibis-platform/ncanda-datacore | scripts/reporting/aseba_reformat.py | Python | bsd-3-clause | 3,090 | [
"VisIt"
] | 458029bef58263bdd29f4b6fb212abc1cab73ab0d59cb852561e322140bcdf7d |
__author__ = 'bptripp'
import os
import csv
import numpy as np
from itertools import islice
from depthmap import *
from PIL import Image
import scipy
import scipy.misc
from depthmap import loadOBJ, Display
from heuristic import calculate_metric_map
import cPickle
import matplotlib.pyplot as plt
# class GraspDataSour... | bptripp/grasp-convnet | py/data.py | Python | mit | 26,522 | [
"Gaussian"
] | 80d9647c2a8237a9cc8d0b6f897d942225f2352ad93efe7f3588beb3b5831f8c |
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | pli3/e2-openwbif | plugin/controllers/views/mobile/movies.py | Python | gpl-2.0 | 8,410 | [
"VisIt"
] | dbc9515ecf63a2eff8861b5e72094313a171a6c147586766bff8d24d5ebe7be3 |
#!/usr/bin/env python3.4
__author__ = 'mdc_hk'
version = '1.0'
import logging, os, re, sys
import pandas as pd
from pandas import Series
from bs4 import BeautifulSoup
import numpy as np
from scipy import stats
logging.basicConfig(filename='Log.txt', level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s... | hkailee/FluSeq | varValidity.py | Python | mit | 12,778 | [
"BWA"
] | 50f5dee06a2040e7e7dc1cdc4c1865139776b3bac00531aeadfe6f13e87a2655 |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | googleapis/python-channel | tests/unit/gapic/channel_v1/test_cloud_channel_service.py | Python | apache-2.0 | 319,406 | [
"Octopus"
] | ff0fa04d14db8bd009aa636a22caf6744dd7f560038d66b9a496acd0b997b780 |
from rdkit import Chem
from rdkit.Chem import rdMolDescriptors
from rdkit.Chem import Descriptors
from rdkit.Chem.MolKey import InchiInfo
INTERESTING_DESCRIPTORS = dict(
ExactMolWt=Descriptors.ExactMolWt,
FractionCSP3=Descriptors.FractionCSP3,
HeavyAtomCount=Descriptors.HeavyAtomCount,
LabuteASA=Descri... | nbateshaus/chem-search | mol-loader/rdkit_utils.py | Python | bsd-3-clause | 2,930 | [
"RDKit"
] | a80beb7c854a8ed17666a551c94994de65938654c8b23702107e489a9916dc70 |
import math
import moose
from PyQt4 import Qt, QtGui, QtCore
from PyQt4.QtCore import QTimer
from PyQt4.QtCore import QObject
from PyQt4.QtCore import pyqtSignal
class Runner(QObject):
"""Helper class to control simulation execution
See: http://doc.qt.digia.com/qq/qq27-responsive-guis.html :
'Solving a Pr... | dilawar/moose-full | moose-gui/plugins/Runner.py | Python | gpl-2.0 | 3,353 | [
"MOOSE"
] | d76004e3e2ef47c0658ad83c32f93cf9ccc82c95cf1eac9aefd95c36ac62a804 |
#! /usr/bin/env python
########################################################################
# $HeadURL$
# File : dirac-admin-bdii-info
# Author : Aresh Vedaee
########################################################################
"""
Check info on BDII for a given CE or site
"""
from __future__ import print... | petricm/DIRAC | ConfigurationSystem/scripts/dirac-admin-bdii-info.py | Python | gpl-3.0 | 4,812 | [
"DIRAC"
] | b93cfb0c3d1cce020dd6bc29ae0f255636346397832355b423a5fe7ceac0cade |
#!/usr/bin/env python
from __future__ import print_function, absolute_import
import os
import sys
import json
import argparse
import traceback
from fnmatch import fnmatch
from .util import (keynat, tee_outstream_to_file, print_script_header,
print_datetime, timing)
import mdtraj as md
from mdtraj.fo... | rmcgibbo/mixtape-scripts | mixtape_scripts/convert_chunked_project.py | Python | mit | 6,781 | [
"MDTraj"
] | 1ba4e990c8b3dba75631f9345658ab0ca73c3b34244cb80e4a4a40afb1e5662a |
from django.conf.urls import patterns, url
from rest_framework import routers
from rest.routers import HybridRouter
import api
import views
router = HybridRouter()
router.add_api_view('hot-box', url(r'^hot-box/', api.HotBoxAPIView.as_view(), name='hot-box'))
urlpatterns = patterns('',
url(r'^trigger-hit/(?P<ct... | piotrek-golda/CivilHubIndependantCopy | hitcounter/urls.py | Python | gpl-3.0 | 384 | [
"VisIt"
] | fa167216bbf839d9226566702685860c6bc5d8008e57f62ccfd9187d1bf711fe |
#!/usr/bin/env python
# \author Bruno Combal, IOC-UNESCO
# \date July 2014
# removes peak values from a ncdf file
# peak definition: value >= peakVal and surrounding <= low or >= high
# This code was done for cleaning dhm_frequency datasets.
# It may requires adaptation for other kind of data
# note: to have cdms2 l... | BrunoCombal/misc | filter_peaks.py | Python | gpl-2.0 | 4,958 | [
"NetCDF"
] | a1edc507b76de6e9400b25ae107b8f577f25486f075fc8f983a98ed34a9b6e03 |
import sys, os, platform
import numpy
from PyQt5.QtWidgets import QApplication, QSizePolicy
from PyQt5 import QtGui, QtWidgets
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui, congruence
from orangecontrib.xoppy.widgets.gui.ow_xoppy_widget import Xoppy... | srio/Orange-XOPPY | orangecontrib/xoppy/widgets/optics/srcalc_idpower.py | Python | bsd-2-clause | 83,132 | [
"CRYSTAL"
] | 1cd0bb00ef705bd5c6ac971ed3daf27c47ba2f76671e2874935d6332b346dd78 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2007 B. Malengier
# Copyright (C) 2008 Brian G. Matherly
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 ... | SNoiraud/gramps | gramps/plugins/quickview/all_relations.py | Python | gpl-2.0 | 14,420 | [
"Brian"
] | d916c35393a98b8ffd1005b4623d5dbf67b514ffcf8bdb8cdb5e8e085fafcc58 |
#!/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.
'''Unit tests for misc.GritNode'''
import os
import sys
if __name__ == '__main__':
sys.path.append(os.path.join(os.path.dirname... | hujiajie/chromium-crosswalk | tools/grit/grit/node/misc_unittest.py | Python | bsd-3-clause | 18,622 | [
"xTB"
] | 0b4f2785c3b8a9fff43ec05f780d7a72c1e39d9accb3b7f15099e93079976113 |
# coding=utf-8
# Copyright 2020 The Google Research Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | google-research-datasets/tydiqa | baseline/bert/modeling.py | Python | apache-2.0 | 39,067 | [
"Gaussian"
] | be0915a4a4adbdcc3bc6a129fc6b8a976b8c10c56ebf181a19d47ca6b4a3b185 |
#
# 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 us... | maropu/spark | python/pyspark/mllib/util.py | Python | apache-2.0 | 21,149 | [
"Gaussian"
] | 8c829af178cf48ed035ba52aef6f141af10573c1967c9f4c111f4a95a28b6e38 |
#!/usr/bin/env python
import re
import sys
import time
from Bio import SeqIO
from StringIO import StringIO
from Bio import AlignIO
import os
import argparse
from __init__ import __version__
"""
Transcriptome Annotation by Modular Algorithms (TAMA)
TAMA Collapse
Author: Richard I. Kuo
This scri... | GenomeRIK/tama | tama_collapse.py | Python | gpl-3.0 | 263,442 | [
"pysam"
] | 33251fc7d1943bcad04149ab8fdafac84cdb0cfb0ab31c42ab62ec7639cfe8e6 |
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
# Authors: Christoph Klein
# Contributors:
#
# MDTraj is free software: yo... | dwhswenson/mdtraj | tests/test_xyz.py | Python | lgpl-2.1 | 3,549 | [
"MDTraj"
] | 1990a44b4e23cac0a46679d3b990f676350e9e36d267ed865ae95939c49ce6b5 |
#!/usr/bin/env python
import os
import numpy as np
np.seterr(invalid='ignore', divide='ignore')
from decimal import *
from scipy import interpolate
from scipy.interpolate import InterpolatedUnivariateSpline
import string
import subprocess
import time
import multiprocessing
TWOPLACES = Decimal(10) ** -2 # same a... | BradGreig/21CMMC | 21CMMC_SourceCode/Programs/CosmoHammer_21CMMC/likelihood/module/Likelihood21cmFast.py | Python | gpl-2.0 | 45,441 | [
"Gaussian"
] | 46bea627ed1d74810354240715ebfd7a62937b35429198a8e49306e958c0e715 |
#!/usr/bin/env python
""" Create a DIRAC MoveReplica request to be executed by the RMS
"""
__RCSID__ = "$Id $"
import os
from hashlib import md5
import time
from DIRAC.Core.Base import Script
Script.setUsageMessage( '\n'.join( [ __doc__.split( '\n' )[0],
__doc__.split( '\n' )[1],
... | andresailer/DIRAC | DataManagementSystem/scripts/dirac-dms-move-replica-request.py | Python | gpl-3.0 | 4,031 | [
"DIRAC"
] | 8be5577d5cb19fa3729c2a13663e809ba16938c04d8d781b08b18ca6d7f8b26b |
#!/usr/bin/env python
import numpy as np
import boldsim.sim as sim
import timeit
import argparse
parser = argparse.ArgumentParser(description='Run BOLDsim benchmarks.',
epilog='By default no benchmarks will be run, so make sure to specify one!')
parser.add_argument('-a', '--all', acti... | adamatus/boldsim | benchmark/benchmark.py | Python | gpl-2.0 | 17,981 | [
"Gaussian"
] | 24ff728304c9ebe14e84cbfd6bae61f7fdeab9fbda56355c4bf2c53c519b9622 |
from rdkit.ML import FeatureSelect as FS
from rdkit import DataStructs as DS
from rdkit import RDConfig
import unittest
class TestCase(unittest.TestCase):
def setUp(self) :
pass
def test0FromList(self) :
examples = []
bv = DS.ExplicitBitVect(5)
bv.SetBitsFromList([0,2,4])
examples.app... | rdkit/rdkit-orig | Code/ML/FeatureSelect/Wrap/testCMIM.py | Python | bsd-3-clause | 1,730 | [
"RDKit"
] | b0c26b30ca9d8f5677e0ee98cb56eeed00af74d34ce7234f11b954553f1a217f |
import numpy as np
import catmap
import re
from copy import copy
from ase.atoms import string2symbols
import warnings
def get_composition(species_string):
"""
Convert string of species into a dictionary of species and the number of each species.
:param species_string: A string of the reaction species. Sho... | ajmedford/catmap | catmap/functions.py | Python | gpl-3.0 | 18,752 | [
"ASE"
] | c42f7fbaa1be25549bc2da94e3dba9485d92a3f504d92f3855348db62f6a0e9c |
# -*- coding: utf-8 -*-
#
# Copyright © 2008 Red Hat, Inc.
# Copyright © 2008 Ricky Zhou
# Copyright © 2012 Patrick Uiterwijk
#
# This copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the GNU
# General Public License v.2. This... | bstinsonmhk/fas | fas/model/fasmodel.py | Python | gpl-2.0 | 22,810 | [
"VisIt"
] | afda160b4b05d2cbe696aea3d7e92c2eba15a9796e87341dc94a34b65087673e |
"""
Two-dimensional pattern generators drawing from various random distributions.
"""
__version__='$Revision$'
import numpy
from numpy import zeros,floor,where,choose,less,greater
import param
from param.parameterized import ParamOverrides
from .patterngenerator import PatternGenerator
from . import Composite, Gaus... | antolikjan/imagen | imagen/random.py | Python | bsd-3-clause | 28,370 | [
"Gaussian"
] | 7ded8db1afe99005846a16bd5119697577b6bfe6a90a8b4e1cafaa267edc2c06 |
#!/usr/bin/env python
"""Test functions in openmoltools.schrodinger."""
import unittest
from openmoltools.schrodinger import *
@unittest.skipIf(not is_schrodinger_suite_installed(), "This test requires Schrodinger's suite")
def test_structconvert():
"""Test run_structconvert() function."""
benzene_path = u... | choderalab/openmoltools | openmoltools/tests/test_schrodinger.py | Python | mit | 3,453 | [
"MDTraj"
] | aca8db1d077993d7efcaeec8667a0cd222b8c198e885f626efdd601854476197 |
""" TaskQueueDB class is a front-end to the task queues db
"""
__RCSID__ = "$Id"
import random
from DIRAC import gConfig, gLogger, S_OK, S_ERROR
from DIRAC.WorkloadManagementSystem.private.SharesCorrector import SharesCorrector
from DIRAC.WorkloadManagementSystem.private.Queues import maxCPUSegments
from DIRAC.Confi... | Andrew-McNab-UK/DIRAC | WorkloadManagementSystem/DB/TaskQueueDB.py | Python | gpl-3.0 | 53,146 | [
"DIRAC"
] | 6175a54864e0b2e6cbe7a17bd3d8dbe87f220f3ca59c3ee7bb4130d6bef6c643 |
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
class vtkMergeTables(SimpleVTKClassModuleBase):
def __init__(self, module_manager):
SimpleVTKClassModuleBase.__init__(
self, module_manager,
vtk.vt... | fvpolpeta/devide | modules/vtk_basic/vtkMergeTables.py | Python | bsd-3-clause | 488 | [
"VTK"
] | b792a9af5e383a36dfbbcd85b88a2e3647676a9e70b88cddd359521213392fbc |
########################################################################
# $HeadURL$
# File : PilotDirector.py
# Author : Ricardo Graciani
########################################################################
"""
Base PilotDirector class to be inherited by DIRAC and Grid specific PilotDirectors, inherited by MW
... | Sbalbp/DIRAC | WorkloadManagementSystem/private/PilotDirector.py | Python | gpl-3.0 | 19,651 | [
"DIRAC"
] | d1901bb268824a3459811cec4c126a86ee6eafc52ba14b8368db57ba752e135d |
#__docformat__ = "restructuredtext en"
# ******NOTICE***************
# optimize.py module by Travis E. Oliphant
#
# You may copy and use this module as you see fit with no
# guarantee implied provided you keep this notice in all copies.
# *****END NOTICE************
# A collection of optimization algorithms. Version ... | nvoron23/scipy | scipy/optimize/optimize.py | Python | bsd-3-clause | 94,975 | [
"Gaussian"
] | b1f7a3bcde46f64c2865cd8f414ab572e54c5da6e5c1fbc76bcf6a3061113046 |
'''
Created on 2015-01-19
Unittest for assorted PyGeoDat components not included elsewhere.
@author: Andre R. Erler, GPL v3
'''
import unittest
import numpy as np
import os, sys, gc
import multiprocessing
import logging
from time import sleep
# import geodata modules
from utils.nctools import writeNetCDF
from geo... | aerler/GeoPy | src/misc_test.py | Python | gpl-3.0 | 16,727 | [
"NetCDF"
] | 628196e21dc09c942709d8bb60b91b9b5425ecd20f7a82de4e4f2804667c13b8 |
from __future__ import absolute_import, division, print_function
# ----------------------------------------------------------------------------
# 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 ... | Kleptobismol/scikit-bio | skbio/alignment/_exception.py | Python | bsd-3-clause | 828 | [
"scikit-bio"
] | 04d3868263cba1afca60a4d34b84be1666ca7a6f37d0d4b93d141685b40ca030 |
#!/usr/bin/python3
# Copyright 2016-2018 Brian Warner
#
# 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 ... | mkdolan/facade | utilities/reset-status.py | Python | apache-2.0 | 1,779 | [
"Brian"
] | 8447ea84deaab4e73917db8f846cddb562190b53b22f19b4f24548befd4f563f |
# [Apr 2018] stolen directly from scipy so I can get an array back
# https://github.com/scipy/scipy/blob/master/scipy/optimize/_hungarian.py
# Hungarian algorithm (Kuhn-Munkres) for solving the linear sum assignment
# problem. Taken from scikit-learn. Based on original code by Brian Clapper,
# adapted to NumPy by Ga... | amjames/psi4 | psi4/driver/qcdb/util/scipy_hungarian.py | Python | lgpl-3.0 | 10,333 | [
"Brian"
] | 6dab6a8c6029427a2264afdfef37778f3c55590f4f3405abacf81bccc848e754 |
"""Additional docstring for the Transformation module."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import textwrap
MODULE = "DIRAC.TransformationSystem.Client.Transformation"
class CustomTransformation(object): # pylint: disable=too-few-public-met... | ic-hep/DIRAC | docs/diracdoctools/CustomizedDocs/CustomTransformation.py | Python | gpl-3.0 | 1,798 | [
"DIRAC"
] | 2094047b08d1eaac55d20f0a8c7f80b4a46bb9182a5210e752e25e0613bb6570 |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
# MDAnalysis --- http://www.mdanalysis.org
# Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
# Released under the GNU Public ... | kain88-de/mdanalysis | package/MDAnalysis/lib/distances.py | Python | gpl-2.0 | 28,620 | [
"MDAnalysis"
] | bf063b785c1410fd5c445072fa5b6ce8e32f9e519922639a7c30b3ad7d3e050d |
# 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 RExperimenthub(RPackage):
"""Client to access ExperimentHub resources:
This package p... | LLNL/spack | var/spack/repos/builtin/packages/r-experimenthub/package.py | Python | lgpl-2.1 | 1,221 | [
"Bioconductor"
] | e4c25490e9a715f7cb8972432331af7697f6052b540a0cce386ef33616547c99 |
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import collections
import io
from textwrap import dedent
from typing import Optional
import pytest
from tabledata import TableData
from tcolorpy import tcolor
import pytablewriter as ptw
from pytablewriter.style import Align, Cell, FontSize, Sty... | thombashi/pytablewriter | test/writer/text/test_markdown_writer.py | Python | mit | 51,368 | [
"CRYSTAL"
] | 9b047b4a960c9ee0d41a39dbeeebfe719e572651c3f89805f96a3085c86c6d3d |
r"""
Gradient analyses (:mod:`skbio.stats.gradient`)
===============================================
.. currentmodule:: skbio.stats.gradient
This module provides functionality for performing gradient analyses.
The algorithms included in this module mainly allows performing analysis of
volatility on time series data, ... | gregcaporaso/scikit-bio | skbio/stats/gradient.py | Python | bsd-3-clause | 32,198 | [
"scikit-bio"
] | be34933b6c0164d1a67cc09629d2c5f9c12a80e37015d6a414f382f4cb8bb393 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module implements a FloatWithUnit, which is a subclass of float. It
also defines supported units for some commonly used units for energy, length,
temperature, time and charge. FloatWithUnit also suppor... | mbkumar/pymatgen | pymatgen/core/units.py | Python | mit | 27,902 | [
"pymatgen"
] | e42aa474207f9c308c185821895cb7e6281fcd9d9b2b51918278352b630fbb8e |
# Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
__author__ = 'Brian Quinlan (brian@sweetapp.com)'
import collections
import logging
import threading
import time
FIRST_COMPLETED = 'FIRST_COMPLETED'
FIRST_EXCEPTION = 'FIRST_EXCEPTION'
ALL_COMPLETED = 'A... | Orav/kbengine | kbe/src/lib/python/Lib/concurrent/futures/_base.py | Python | lgpl-3.0 | 20,213 | [
"Brian"
] | 36bfef7bd2742fe718326af6fb5a3636caea0667b66d27435a829e3862d255f5 |
class Solution(object):
def findItinerary(self, tickets):
"""
:type tickets: List[List[str]]
:rtype: List[str]
"""
from collections import defaultdict
flights = defaultdict(list)
for a, b in sorted(tickets)[::-1]:
flights[a] += b,
route = ... | ChuanleiGuo/AlgorithmsPlayground | LeetCodeSolutions/python/332_Reconstruct_Itinerary.py | Python | mit | 518 | [
"VisIt"
] | d644880fb87ae5a7e4c9ccc51b628e4a7df9bd757a463aaea194838910747b83 |
import numpy as np
import unittest
import discretize
from SimPEG.maps import Wires
from SimPEG.utils import (
mkvc,
WeightedGaussianMixture,
GaussianMixtureWithPrior,
)
from scipy.stats import norm, multivariate_normal
class TestGMMs(unittest.TestCase):
def setUp(self):
np.random.seed(518936)... | simpeg/simpeg | tests/utils/test_gmm_utils.py | Python | mit | 10,138 | [
"Gaussian"
] | 78c6848548b0d79953819d34346142e6f79b7a7e3d5a1c8032b87a0c8b3c3826 |
# coding: utf-8
"""Unit tests for sending e-mails."""
from __future__ import unicode_literals
import logging
from django.conf import settings
from django.conf.urls import include, url
from django.contrib.auth.models import User
from django.core import mail
from django.core.urlresolvers import clear_url_caches, rever... | chipx86/reviewboard | reviewboard/notifications/tests/test_email_sending.py | Python | mit | 87,250 | [
"VisIt"
] | 71d8f74e3a11e9167881c6919dafbf0251d772bba27f971cb1b4ca603607e5b3 |
"""
Gaussian HMM of stock data
--------------------------
This script shows how to use Gaussian HMM on stock price data from
Yahoo! finance. For more information on how to visualize stock prices
with matplotlib, please refer to ``date_demo1.py`` of matplotlib.
"""
from __future__ import print_function
import datetim... | siddharthhparikh/INFM750-project | HMM_test.py | Python | apache-2.0 | 2,680 | [
"Gaussian"
] | c79435823a173f2b6687103442106c9bfac9738655a8898688a1b49d12032141 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.