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 |
|---|---|---|---|---|---|---|---|
################################################################################
# Name: PyZenity.py
# Author: Brian Ramos
# Created: 10/17/2005
# Revision Information:
# $Date: $
# $Revision: $
# $Author: bramos $
#
# Licence: MIT Licence
#
# Copyright (c) 2010 Brian Ramos
# Permission is hereby g... | dleicht/PSB | PyZenity.py | Python | mit | 15,175 | [
"Brian"
] | 641d8dadc81f8c10d4ae3f6cd6afb99f83ff73c66741ffcbfde67c0c3c3d422f |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2007-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; ... | gramps-project/addons-source | Query/QueryQuickview.py | Python | gpl-2.0 | 21,665 | [
"Brian"
] | 30f2d638e73b8254ed678bd1b3baf91d501a5273234b73f0f596c3eb4e44b322 |
# -*- coding: utf-8 -*-#
import Tkinter
import logging
import sys, os
import webbrowser
# set basedir for testing this application
if '__file__' in globals():
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../..')
sys.path.append(basedir)
format = '%(name)s - %(levelname)s - %(file... | tKroopy/tkroopy | src/applications/examples/fibonacci_numbers.py | Python | gpl-3.0 | 4,165 | [
"VisIt"
] | cf28f0bfe450eda68d63c5a372178330ea46b6213bbbf40e12a6a1bee259e0de |
from datetime import datetime, timedelta
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group
from django.utils import timezone
import factory
from . import models
UserModel = get_user_model()
class UserFactory(factory.django.DjangoModelFactory):
email = factory.Sequence... | oleg-chubin/let_me_play | let_me_app/factories.py | Python | apache-2.0 | 3,328 | [
"VisIt"
] | ca2635922f289851d63ce3638876a4ff261698f7cc87e4b69ec1e822bb6bcd54 |
from queue import Queue, Empty
import jack
import time
from PyQt5.QtGui import QImage, QColor
class midifeedback:
NOTEON = 0x9
NOTEOFF = 0x8
MIDICTRL = 11
NOTE_NAME = ['C', 'C#',
'D', 'D#',
'E',
'F', 'F#',
'G', 'G#',
... | sonejostudios/midifeedback | midifeedback.py | Python | gpl-2.0 | 3,894 | [
"Amber"
] | a77a27b934185fe5018caf34fd85125e60bd6b29cab0d087d464a27fdbb223ba |
#!/usr/bin/env python
"""
Reorder the atoms in the Angles section of a data file to make sure that
atoms have a "canonical order" (for example the first atom has a lower
id than the last atom, for angle and dihedral interactions.
(This helps us detect potential problems like dupicate Angle interactions.)
... | anshumang/lammps-analytics | tools/moltemplate/src/nbody_reorder_atoms.py | Python | gpl-2.0 | 2,656 | [
"LAMMPS"
] | 38ba8c1f20d0d1529c3d977f636be32d0b9348cf1624491f284b47922393dd53 |
# -*- coding: utf-8 -*-
"""
This code combines two lammps data files, with clay.data as the second file whose index is modified.
The clay.data file should first be handled with redundant conncetions, i.e. after using removeRedundantTopo.py
Currently support CLASS I FF for the first file, i.e. no bb, ba, aa, etc
... | riddlezyc/geolab | src/io/combineTwofile.py | Python | gpl-3.0 | 7,532 | [
"LAMMPS"
] | 0b034fcab0a287e4d8c39b4ec43f130d3fcbb3d591f91afd9353a1eebb275b31 |
"""
Rendering utils
@author: Chris Scott
"""
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import ctypes as C
import logging
import numpy as np
import vtk
from vtk.util import numpy_support
from six.moves import range
#########################... | chrisdjscott/Atoman | atoman/rendering/utils.py | Python | mit | 8,308 | [
"VTK"
] | 314f1baef94baa65a4cb3930deaa6210a718d87bd05f93a5529f7685be06d25f |
# ==================================================================================================
# Copyright 2011 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | foursquare/commons-old | src/python/twitter/common/dirutil/tail.py | Python | apache-2.0 | 3,069 | [
"Brian"
] | c4de150a8e26a97da4304e70a8058ad9e2a45f8624cf458b34e5fa734912b074 |
# (c) 2014 Michael DeHaan, <michael@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ve... | alexlo03/ansible | lib/ansible/playbook/role/requirement.py | Python | gpl-3.0 | 6,833 | [
"Galaxy"
] | a8390b4cc191019042444c87c2ef697cf7b7f819a6f3d4a665a45b3e41ceb02b |
"""
This is only meant to add docs to objects defined in C-extension modules.
The purpose is to allow easier editing of the docstrings without
requiring a re-compile.
NOTE: Many of the methods of ndarray have corresponding functions.
If you update these docstrings, please keep also the ones in
core/fromnum... | AustereCuriosity/numpy | numpy/add_newdocs.py | Python | bsd-3-clause | 224,421 | [
"Brian"
] | c27b51ab94b2ed7e72ed1d21ef06bc154cdfac075e2d7fe719555e1594f85f83 |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import gzip
import json
import os
import random
import unittest
from collections import OrderedDict
import numpy as np
import pandas as pd
try:
import ruamel.yaml as yaml
except ImportError:
try:
... | richardtran415/pymatgen | pymatgen/io/lammps/tests/test_data.py | Python | mit | 45,469 | [
"CHARMM",
"LAMMPS",
"pymatgen"
] | 43861f67ffab0a413aa45fb7a0f43a86f0e5b6e8064b16e68eecdf47c4f921cd |
import json
import os
import unittest
from io import open
from pymatgen.phonon.bandstructure import PhononBandStructureSymmLine
from pymatgen.phonon.dos import CompletePhononDos
from pymatgen.phonon.plotter import PhononBSPlotter, PhononDosPlotter, ThermoPlotter
from pymatgen.util.testing import PymatgenTest
class P... | gmatteo/pymatgen | pymatgen/phonon/tests/test_plotter.py | Python | mit | 3,863 | [
"pymatgen"
] | 6358eb3c4389f72cc746547ee5ffbb070e01377235015714f020f27225ffbd5b |
"""
Python implementation of the LiNGAM algorithms.
The LiNGAM Project: https://sites.google.com/site/sshimizu06/lingam
"""
import itertools
import numbers
import warnings
import numpy as np
from sklearn.utils import check_array, resample
from .bootstrap import BootstrapResult
from .direct_lingam import DirectLiNGAM
... | cdt15/lingam | lingam/multi_group_direct_lingam.py | Python | mit | 11,025 | [
"Gaussian"
] | 6342483f4a4d6bce1f87c0f3901cb33898d15d9bfd246ad4edf033a2bba3dd52 |
# $Id$
#
# Copyright (C) 2006 Greg Landrum
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
from rdkit import Geometry
from rdkit.Chem.FeatMaps imp... | rvianello/rdkit | rdkit/Chem/FeatMaps/FeatMapParser.py | Python | bsd-3-clause | 5,307 | [
"Gaussian",
"RDKit"
] | b95abe06b7adec31cc13f45bb2c1c13ac3ae22e7bd997f1110d3ffe1b045cf39 |
from PIL import ImageFilter
def generate_gaussian_noise_by_level(image, level, width):
"""
Add Gaussian noise of an intended level to an image.
:param image: an image input
:param level: represent the percentage of blur. (Ex: level 1 means that the
image is blurred with the radius of ... | FlintHill/SUAS-Competition | UpdatedImageProcessing/UpdatedImageProcessing/ShapeDetection/utils/gaussian_blur.py | Python | mit | 1,054 | [
"Gaussian"
] | 9e3ee5c30c8a0290e1d89099604124d7c2681cd7426fa864e16a63a9787d34db |
# Copyright 2022 The Brax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | google/brax | brax/experimental/composer/components/octopus.py | Python | apache-2.0 | 22,585 | [
"Octopus"
] | 9f04e7f4d751695528bfd373def912f1e9eea1078acb6b3a2bc09f802365e7c4 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import datetime
import os
from unittest import TestCase
import warnings
from django.utils import html, safestring
from django.utils._os import upath
from django.utils.encoding import force_text
class TestUtilsHtml(TestCase):
def chec... | gdi2290/django | tests/utils_tests/test_html.py | Python | bsd-3-clause | 8,304 | [
"ADF"
] | 3115f31e6a040c806f32873cc1d7f1bf3b2e73961848f27e53be85ec7130cf22 |
from pysimm import system, lmps, forcefield
def run(test=False):
# create empty system
print('Example progress: Creating an empty system...')
s = system.System()
# create new molecule in our system
print('Example progress: Adding an empty molecule container to our system...')
m = s.molecul... | polysimtools/pysimm | Examples/01_methane/dreiding/create.py | Python | mit | 3,174 | [
"LAMMPS"
] | 227af7e8be195e258d8e3df2acba5a842880433a03192905828925e06290f955 |
#
# Copyright (C) 2011 by Brian Weck
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
#
import sys, os.path, time, re
import urllib, urllib2, cookielib
import simplejson, HTMLParser
from urlparse import urlparse
from HTTPHeaderLogger import HTTPHeaderLoggerHandler
from . import lo... | bweck/cssbot | cssbot/reddit.py | Python | mit | 5,380 | [
"Brian"
] | 9184d9a7269665a14190424e34d8e81028ae0fee73dd76d28a7a9a52208fc3c3 |
""" This is a test of the AuthDB. Requires authlib, pyjwt
It supposes that the DB is present and installed in DIRAC
"""
import time
import DIRAC
DIRAC.initialize() # Initialize configuration
payload = {
"sub": "user",
"iss": "issuer",
"iat": int(time.time()),
"exp": int(time.time()) + (12 * 3600... | DIRACGrid/DIRAC | tests/Integration/Framework/Test_TokenDB.py | Python | gpl-3.0 | 2,859 | [
"DIRAC"
] | df394d7e8d1dc3c58a39dbd3f168a157f9ff67e2bd1041c6fd95fc282ccac231 |
"""
DIRAC.RequestManagementSystem.Agent package
"""
| DIRACGrid/DIRAC | src/DIRAC/RequestManagementSystem/Agent/__init__.py | Python | gpl-3.0 | 55 | [
"DIRAC"
] | 86bfae30968bdeff0caf1d4c9bec4f3a923bc490b35a6a11b76d661d02e31897 |
#
# _____ _____ _______ __ _ _______ ______ _______ _____
# | | |_____] |______ | \ | | |_____/ |_____| | |
# |_____| | |______ | \_| | | \_ | | __|__ |_____
#
# _______ _____ __ _ _ _ _______ ______ _______ _____ _____ __ _
# | | | | \ | ... | sainsb/RLIS_Trails_to_OT | RLISTrails2OT.py | Python | mit | 17,249 | [
"ORCA"
] | 2555083abbb01b36d356ff13a66ed4d6b38030c0e3162b057de7a3bd18a8cfb3 |
# (c) 2015, Brian Coca <bcoca@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.... | rmfitzpatrick/ansible | lib/ansible/plugins/lookup/url.py | Python | gpl-3.0 | 2,419 | [
"Brian"
] | 724052ba80a880d857a4ef66310f24adac9c63a825f9072f051d47ff8f89ba58 |
# Copyright 2010-2017, The University of Melbourne
# Copyright 2010-2017, Brian May
#
# This file is part of Karaage.
#
# Karaage 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... | brianmay/karaage | karaage/plugins/kgsoftware/views.py | Python | gpl-3.0 | 13,065 | [
"Brian"
] | c00cde309b8138822587508f8a1e588448ee2db36e36dc56bdb6a6a8ebd7de82 |
# $Id$
#
# Copyright (C) 2007 Greg Landrum
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
import sys
from rdkit import Chem
class FastSDMolSuppli... | rdkit/rdkit-orig | rdkit/Chem/FastSDMolSupplier.py | Python | bsd-3-clause | 2,187 | [
"RDKit"
] | 90c9d0dc673aac279de8e6ffbba0ab920887afe48e9b10a76f94757cda0c1f96 |
# -*- coding: utf-8 -*-
# MolMod is a collection of molecular modelling tools for python.
# Copyright (C) 2007 - 2019 Toon Verstraelen <Toon.Verstraelen@UGent.be>, Center
# for Molecular Modeling (CMM), Ghent University, Ghent, Belgium; all rights
# reserved unless otherwise stated.
#
# This file is part of MolMod.
#
#... | molmod/molmod | molmod/io/number_state.py | Python | gpl-3.0 | 12,169 | [
"Gaussian"
] | cce0f68489873dceed8b9c10767e0760ebe45cf1baec8cd4d2c8d5fe39507007 |
# -*- coding: UTF-8 -*-
#
# Copyright (c) 2013, Yung-Yu Chen <yyc@solvcon.net>
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# - Redistributions of source code must retain the above copyrigh... | yungyuc/solvcon | solvcon/parcel/linear/velstress/material.py | Python | bsd-3-clause | 17,175 | [
"CRYSTAL"
] | c697857968a97d95f57dbf727c3a2bd879ef7422c3e7a5b30a4ce8fdfac13bb8 |
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# 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 th... | alejob/mdanalysis | package/MDAnalysis/analysis/encore/similarity.py | Python | gpl-2.0 | 64,668 | [
"Gaussian",
"MDAnalysis"
] | 95604d9ccc625a9c05f568a3379fcab9d74852f046d13624a9ddecffed1e66a1 |
# -*- coding: utf-8 -*-
###############################################################################
# This source file is part of the Tomviz project, https://tomviz.org/.
# It is released under the 3-Clause BSD License, see "LICENSE".
###############################################################################
... | OpenChemistry/tomviz | tomviz/python/tomviz/io/__init__.py | Python | bsd-3-clause | 1,825 | [
"VTK"
] | 23dfb2dd79ef714c6f6f25c8f6bb3429fcb48599f0018776c36a1b0442a1ac7e |
# shieldBoostAmplifierPassive
#
# Used by:
# Implants named like: grade Crystal (15 of 18)
type = "passive"
def handler(fit, container, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Operation"),
"shieldBonus", container.getModifiedItemAttr("sh... | Ebag333/Pyfa | eos/effects/shieldboostamplifierpassive.py | Python | gpl-3.0 | 343 | [
"CRYSTAL"
] | 09193185ba4870ec4af6a9abdbed696eff854a60a53cecb960286f4a735d413e |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Classes for reading/manipulating/writing VASP input files. All major VASP input
files.
"""
import os
import re
import itertools
import warnings
import logging
import math
import json
import glob
import sub... | gVallverdu/pymatgen | pymatgen/io/vasp/inputs.py | Python | mit | 89,456 | [
"VASP",
"pymatgen"
] | c5318a9bdf4c2957619a8c49e393ca95cb73db63375f9c4e7e53aedcdd8da40f |
# coding=utf-8
# coding=utf-8
# Copyright 2019 The RecSim 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 ap... | google-research/recsim | recsim/agents/bandits/glm_algorithms.py | Python | apache-2.0 | 6,821 | [
"Gaussian"
] | 4fa7468a0773cd153360e035f5779f73d2ee7e363f64f9a1cce5120a9fbf1978 |
"""
===============================
Plot classification probability
===============================
Plot the classification probability for different classifiers. We use a 3
class dataset, and we classify it with a Support Vector classifier, L1
and L2 penalized logistic regression with either a One-Vs-Rest or multinom... | vortex-ape/scikit-learn | examples/classification/plot_classification_probability.py | Python | bsd-3-clause | 2,886 | [
"Gaussian"
] | abb4ab8e2658823a565a636aa69ab77fb7eb6d4996b60a79b54b3d84f0061537 |
#! /usr/bin/env python2
from RecBlastUtils import *
import urllib2
import pickle
from time import strftime
import subprocess
# Description:
# The script performs part 1 of the RecBlast program. Starting from a list of genes and taxa and then moving on to
# saving the sequences and running Blast on them.
... | neuhofmo/RecBlast | part_one.py | Python | mit | 12,789 | [
"BLAST"
] | b7cff52b283814e315414b0a7f61b77cbe0485e241deaa9b93a80d23150ec482 |
"""
Provides a base class that implements operations on a taxonomic tree that
require recursively visiting each taxon within the tree.
"""
class TaxonVisitor:
"""
Base class for all taxon tree visitor classes. Client code calls the visit() method
with an instance of Taxon as an argument. The visitor cla... | stuckyb/sqlite_taxonomy | utilities/taxolib/taxonvisitor.py | Python | gpl-3.0 | 2,844 | [
"VisIt"
] | 4d04b5d81daf56a94e1d053306267c6d6d78a740dd378f4dcfe86bab21b91a97 |
# -*- coding: utf-8 -*-
import random
import time
import scrapy
from scrapyprj.items import HouseNewsItem
from scrapyprj.utils import safe_extract, extract_article, extract_url
class SznewsSpider(scrapy.Spider):
handle_httpstatus_list = [400, 404, 407, 502]
name = "sznews"
allowed_domains = ["dc.sznews.c... | Alexoner/web-crawlers | scrapyprj/scrapyprj/spiders/sznews.py | Python | gpl-2.0 | 4,365 | [
"VisIt"
] | 232904d7ef02342d8622bd049d8afe0609e7d9a44908de29a2296c3f152403e3 |
"""Groove MIDI Loader
.. admonition:: Dataset Info
:class: dropdown
The Groove MIDI Dataset (GMD) is composed of 13.6 hours of aligned MIDI and
synthesized audio of human-performed, tempo-aligned expressive drumming.
The dataset contains 1,150 MIDI files and over 22,000 measures of drumming.
To e... | mir-dataset-loaders/mirdata | mirdata/datasets/groove_midi.py | Python | bsd-3-clause | 14,280 | [
"VisIt"
] | e9c8861c98e07cbd619d7584121470ab56bd83d507a1a1749875d39dbdf59949 |
#!/usr/bin/env python
"""Automatically install required tools and data to run bcbio-nextgen pipelines.
This automates the steps required for installation and setup to make it
easier to get started with bcbio-nextgen. The defaults provide data files
for human variant calling.
Requires: git, wget, bgzip2, Python 3.x, P... | gifford-lab/bcbio-nextgen | scripts/bcbio_nextgen_install.py | Python | mit | 11,013 | [
"BWA",
"Bioconda",
"Bowtie",
"Galaxy"
] | 2426231cc2b26b9576be22f40f1206cd2be0a451069599e91ccceb87b9f46afc |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgarren/spack | var/spack/repos/builtin/packages/r-adsplit/package.py | Python | lgpl-2.1 | 2,169 | [
"Bioconductor"
] | 983d6cc8905452f27c703b179adbaa428ccbd15d3ad567b5f2df20ed71a13e8e |
import datetime
from xml.dom.minidom import parseString
from django.core import mail
from django.core.urlresolvers import reverse
from django.template import Context, Template
from django.test import TestCase, override_settings
from django.contrib.auth.models import User
from django.contrib.contenttypes.models impor... | amarandon/smeuhsocial | apps/threadedcomments/tests/test_templatetags.py | Python | mit | 12,278 | [
"Brian"
] | 30310a91155124862efcfa14a475c5b07a51add3bfa6206ac8c6f4a50cd60d79 |
#-*- coding: utf-8 -*-
""" 通过某个关键字排序一个字典列表 """
from operator import itemgetter
rows = [
{'fname': 'Brian', 'lname': 'Jones', 'uid': 1003},
{'fname': 'David', 'lname': 'Beazley', 'uid': 1002},
{'fname': 'John', 'lname': 'Cleese', 'uid': 1002},
{'fname': 'Big', 'lname': 'Jones', 'uid': 1004}
]
rows_by_f... | Jackson-Y/Machine-Learning | exercise/sort_dict_List_by_key.py | Python | mit | 788 | [
"Brian"
] | ebfeb8dad7a7e4e3c08a9a3cbdc579f84233d7c467b42a3bbad78a78fff615a7 |
# -*- coding: UTF-8 -*-
# Copyright (C) 2006, 2010 Hervé Cauwelier <herve@oursours.net>
# Copyright (C) 2006-2007, 2009-2011 J. David Ibáñez <jdavid.ibp@gmail.com>
# Copyright (C) 2007 Sylvain Taverne <taverne.sylvain@gmail.com>
# Copyright (C) 2009 David Versmisse <versmisse@lil.univ-littoral.fr>
# Copyright (C) 2009 ... | hforge/itools | itools/pkg/build.py | Python | gpl-3.0 | 6,702 | [
"GULP"
] | 54ea42de6571be6ed95a1ac3d67e12d6b069873173bbf0535fbe8baaf1bfe040 |
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This progr... | tlksio/tlksio | env/lib/python3.4/site-packages/pylint/checkers/format.py | Python | mit | 15,049 | [
"VisIt"
] | 4d7919796e01d7de5374e7b96dea1b68db3682f821a37e694d0f61701995dd08 |
""" Classes and functions for Symmetric Diffeomorphic Registration """
import logging
import abc
import numpy as np
import numpy.linalg as npl
import nibabel as nib
from dipy.align import vector_fields as vfu
from dipy.align import floating
from dipy.align import VerbosityLevels
from dipy.align import Bunch
from di... | FrancoisRheaultUS/dipy | dipy/align/imwarp.py | Python | bsd-3-clause | 63,918 | [
"Gaussian"
] | 23a5b85673f761ee1db26db4b89c6f54e364af8858ad1c490b89f85b35d5b0e7 |
import click
from parsec.cli import pass_context, json_loads
from parsec.decorators import custom_exception, json_output
@click.command('update_permissions')
@click.argument("dataset_id", type=str)
@click.option(
"--access_ids",
help="role IDs which should have access permissions for the dataset.",
type=s... | galaxy-iuc/parsec | parsec/commands/datasets/update_permissions.py | Python | apache-2.0 | 1,127 | [
"Galaxy"
] | f7619a8383503c4871b11ac90716a46a920b8648bffa64b50df4d34bf865db3c |
# -*- coding: utf-8 -*-
"""Building and simulating spiking neural networks using Brian2.
@author: rbodo
"""
import warnings
import numpy as np
import os
from tensorflow.keras.models import load_model
from snntoolbox.parsing.utils import get_type
from snntoolbox.simulation.utils import AbstractSNN, get_shape_from_la... | NeuromorphicProcessorProject/snn_toolbox | snntoolbox/simulation/target_simulators/brian2_target_sim.py | Python | mit | 15,271 | [
"NEURON"
] | 2a13efb9375d4c015fa63e429803f47f9226ceb64b6e9e76c0aa90163f25e444 |
from model import User, Location, Visit
import pylibmc
mc = pylibmc.Client(["127.0.0.1"], binary=True,
behaviors={"tcp_nodelay": True})
class RepositoryBase(object):
def add_item(self, data):
key, item = self.create_item(data)
mc.set(key, item)
return item
def add_multi(s... | KonbOgonb/hlc_r1 | app/repository.py | Python | mit | 2,067 | [
"VisIt"
] | 66913d57583e594a201878119844358e24d426f074feb97ac7bd82f442bfbdbd |
#!/usr/bin/env python
"""Deainterleave FastQ. Can handle paired and single end.
This can for example be used to properly convert a PE BAM back to FastQ:
htscmd bamshuf -uOn 128 $bam tmp | htscmd bam2fq -a - | deinterleave_fastq.py - $outprefix
"""
__author__ = "Andreas Wilm"
__email__ = "wilma@gis.a-star.edu.sg"
__co... | CSB5/misc-scripts | deinterleave_fastq.py | Python | gpl-2.0 | 4,554 | [
"Biopython"
] | edd4a1d491db030685e47ee56f74823bb51d352b386ba2858d7ff1082dc400dd |
# This file is taken from the server repo (dropbox/python_linters/main.py) and
# changed to output in a format that arc understands (--arc-out option).
from __future__ import absolute_import
"Used to run the python AST linters on a set of files. Normally run through bin/lint"
import ast
import argparse
import json
imp... | dropbox/changes | linters/main.py | Python | apache-2.0 | 7,862 | [
"VisIt"
] | a229df8ba27233b98744e7baf7c8be9675b3b9c836031550ef5d11af44dc0a5c |
###############################
# This file is part of PyLaDa.
#
# Copyright (C) 2013 National Renewable Energy Lab
#
# PyLaDa is a high throughput computational platform for Physics. It aims to make it easier to
# submit large numbers of jobs on supercomputers. It provides a python interface to physical input,
# ... | pylada/pylada-light | tests/espresso/test_namelists.py | Python | gpl-3.0 | 7,784 | [
"CRYSTAL",
"ESPResSo",
"VASP"
] | eb8aee0256f883dbc9d97d440a8eb1f06fe06db0e05f48514cc8c14960ba73c0 |
'''
CMEMS module
Contains functions related to local data handling.
Maren K. Karlsen 2020.10.29
'''
import logging
import ftputil
import os
import sys
import re
import hashlib
import datetime
import pandas as pd
import numpy as np
import netCDF4
from modules.CMEMS.Export_CMEMS_netCDF_builder import buildnetcdfs
f... | squaregoldfish/QuinCe | external_scripts/export/modules/CMEMS/Export_CMEMS_metadata.py | Python | gpl-3.0 | 11,248 | [
"NetCDF"
] | 184a4ceea3496bb30f3aec2fed6499bf60b3e0faf01d381a8450964adb58e812 |
# -*- coding: utf-8 -*-
import codecs
import json
import os
import tempfile
from django import forms
from django.core.files.storage import default_storage as storage
from django.core.urlresolvers import reverse
from django.test.client import RequestFactory
from mock import patch
from nose.tools import eq_
from pyquer... | clouserw/zamboni | mkt/developers/tests/test_views_validation.py | Python | bsd-3-clause | 8,515 | [
"exciting"
] | 8723107ef61d4b94705064bedc1f07e011948835364d0f624442de96594a2be8 |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | TheTimmy/spack | var/spack/repos/builtin/packages/paraview/package.py | Python | lgpl-2.1 | 5,978 | [
"NetCDF",
"ParaView"
] | 28a51f207db6f0c8c6abf47867c76a6cdc35d17a87a4ec09f69e0d8f91ba2ad3 |
# -*- 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... | beernarrd/gramps | gramps/plugins/webreport/narrativeweb.py | Python | gpl-2.0 | 441,735 | [
"Brian"
] | 588611dd0854ddb7528295d0b9303f0ea27ad5e3793712f5fdea6ef917ab36b0 |
import os
import unittest
import vtk, qt, ctk, slicer
from slicer.ScriptedLoadableModule import *
import logging
#
# DistanceMapRegistration
#
class DistanceMapRegistration(ScriptedLoadableModule):
"""Uses ScriptedLoadableModule base class, available at:
https://github.com/Slicer/Slicer/blob/master/Base/Python/sl... | KitwareMedical/AugmentedLabelRegistration | DistanceMapRegistration/DistanceMapRegistration.py | Python | apache-2.0 | 11,258 | [
"VTK"
] | 003f84e2979ec26fa93cd9fd64939e9f54c0282746dec6e2afa1e044d83f275b |
"""
:mod: DataManager
.. module: DataManager
:synopsis: DataManager links the functionalities of StorageElement and FileCatalog.
This module consists of DataManager and related classes.
"""
# # imports
from datetime import datetime, timedelta
import fnmatch
import os
import time
import errno
import six
# # from DI... | DIRACGrid/DIRAC | src/DIRAC/DataManagementSystem/Client/DataManager.py | Python | gpl-3.0 | 83,144 | [
"DIRAC"
] | 5091028ec5956665e26f225f5aff31b0fa04c50fb0c1802aee96c8fa3900ba1b |
import json
from pyramid.renderers import render, Response
from src.sgd.frontend import config
from pyramid.view import notfound_view_config
from src.sgd.frontend.yeastgenome import send_message
from src.sgd.tools.blast import do_blast
from src.sgd.tools.patmatch import do_patmatch
from src.sgd.tools.seqtools import do... | yeastgenome/SGDFrontend | src/sgd/frontend/__init__.py | Python | mit | 17,738 | [
"BLAST"
] | 04b383b21367abd1697ba51a4f2f56d1dca566d6be43d585a5b0f22c6fd3f912 |
#
# Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | intel-analytics/analytics-zoo | pyzoo/test/zoo/orca/learn/ray/mxnet/test_mxnet_spark_xshards.py | Python | apache-2.0 | 5,851 | [
"ORCA"
] | ec158da10a8604ac43dba324ab2709ebc8db1230dd30680dc8e4d2c4852285e6 |
###
# Copyright 2008-2011 Diamond Light Source Ltd.
# This file is part of Diffcalc.
#
# Diffcalc 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... | DiamondLightSource/diffcalc | test/diffcalc/hkl/you/test_calc_surface.py | Python | gpl-3.0 | 20,799 | [
"CRYSTAL"
] | 04a308f71e8b82a4ce11067d15dd506960013cc558ac70c006f1d0099acd4481 |
# This file is part of PyEMMA.
#
# Copyright (c) 2016, 2015, 2014 Computational Molecular Biology Group, Freie Universitaet Berlin (GER)
#
# PyEMMA 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, eithe... | marscher/PyEMMA | pyemma/coordinates/data/util/frames_from_file.py | Python | lgpl-3.0 | 6,378 | [
"MDTraj"
] | 908dd56913ed059b1eb0f3dd983ee2d2f1f3facf7a453939ca9c8999ad458cd0 |
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | marmyshev/item_title | openlp/core/lib/screen.py | Python | gpl-2.0 | 10,667 | [
"Brian"
] | bb3603557d621a7e6aeb9567ccf3fc5fc7528ce23eb9888c812afdb6b04d0d6c |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# __author__ = 'CwT'
import urllib.parse as urlparse
import logging
IGNORED_EXTENSIONS = [
# images
'mng', 'pct', 'bmp', 'gif', 'jpg', 'jpeg', 'png', 'pst', 'psp', 'tif',
'tiff', 'ai', 'drw', 'dxf', 'eps', 'ps', 'svg', 'ico',
# audio
'mp3', 'wma', 'o... | CvvT/crawler_sqlmap | crawler/util/urleliminate.py | Python | apache-2.0 | 3,493 | [
"VisIt"
] | 8412d01fa82a0c40d0d877bd35ac3fcb3a0531634bce997d2c59cef88a396d9e |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from urlparse import urlparse
from django.db import migrations
from django.conf import settings
import os
from pyaxiom.netcdf import EnhancedDataset, EnhancedMFDataset
def path(dataset):
if urlparse(dataset.uri).scheme == "" and not dataset.uri.st... | ayan-usgs/sci-wms | wms/migrations/0021_auto_20150429_1429.py | Python | gpl-3.0 | 4,468 | [
"NetCDF"
] | 3ed97202ed319c7453b326ba054edc03f379d87fe62468833e2111ececfbc884 |
import types
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.DISET.RequestHandler import RequestHandler
from RESTDIRAC.RESTSystem.DB.OATokenDB import OATokenDB
from RESTDIRAC.RESTSystem.Client import OAToken
__RCSID__ = "$Id$"
class OATokenStoreHandler( RequestHandler ):
@classmethod
def initializeHandler( cls, ... | DIRACGrid/RESTDIRAC | RESTSystem/Service/OATokenStoreHandler.py | Python | gpl-3.0 | 2,562 | [
"DIRAC"
] | bee84492dbc285d20f3d2cc235eb1790365791a34463c67d282d156f5badd671 |
#!/usr/bin/env python
'''
PBC-SOC integrals
'''
from pyscf.pbc import gto
cell = gto.Cell()
cell.atom='''
C 0.000000000000 0.000000000000 0.000000000000
C 1.685068664391 1.685068664391 1.685068664391
'''
cell.basis = 'ccpvdz'
cell.a = '''
0.000000000, 3.370137329, 3.370137329
3.370137329, 0.000000000, 3.3701... | gkc1000/pyscf | examples/pbc/33-soc_integrals.py | Python | apache-2.0 | 4,376 | [
"PySCF"
] | d7b437b28d4369647d5d88f820315d9edf91178f37769cd16c5949e89d932d79 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import funannotate.library as lib
from funannotate.aux_scripts.fasta2agp import parse_scaffolds_makeagp
from pkg_resources import parse_version
import sys
import os
import subprocess
import shutil
import argparse
import re
import uuid
from natsort import natsorted
import ... | nextgenusfs/funannotate | funannotate/annotate.py | Python | bsd-2-clause | 80,841 | [
"BLAST",
"Biopython"
] | 437c83128a8b91e35b1bf1f665add971c45f8340f7dcd62a8f3620672f6e6e95 |
import os.path as osp
import pickle
import numpy as np
from mastic.system import AssociationType
from mastic.molecule import MoleculeTypeAtomSelection
from mastic.interactions.hydrogen_bond import HydrogenBondType
inputs_path = "../examples/sEH-TPPU"
# load the SystemType we will add associations to
system_type_pkl_... | salotz/mast | prototypes/test_self_assoc.py | Python | mit | 3,686 | [
"CRYSTAL"
] | a62c4ed8157128da310cbc1692532f0b2fa5b90a45d2272ee8d140bf57b0555f |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""Calculation of overlap population analysis based on cclib data."""
import random
import numpy
from .cal... | Schamnad/cclib | src/cclib/method/opa.py | Python | bsd-3-clause | 4,773 | [
"cclib"
] | 62e397596f968fef30b311a675c88d002b7fd8ccae06af25fc16d71c3f6d5eb7 |
import argparse
import pandas as pd
import re
from typing import List, Match, Dict, TextIO, Union
from datetime import date
# In this file, a "feature" refers to the collection of data between the > keys of the bprom output.
# That collection of data refers to one section of the DNA upstream of a gene
def re... | TAMU-CPT/galaxy-tools | tools/external/bprom_gff3_converter.py | Python | gpl-3.0 | 11,702 | [
"Galaxy"
] | f262a48024ede8051ce736ab9251a9aeb0fb3df019b4c5d8f9fb635fc531d1cb |
# -*- 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-dialogflow | tests/unit/gapic/dialogflow_v2/test_answer_records.py | Python | apache-2.0 | 72,052 | [
"Octopus"
] | bf63ca5788a6b0f1d241300274e690bc5a979508271de40c66848b853f252a8a |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | wscullin/spack | var/spack/repos/builtin/packages/rsem/package.py | Python | lgpl-2.1 | 1,886 | [
"Bowtie"
] | 3db078e2c31ec33795af9ae8715eb96e6b3efc6d77573fe9a1dcfac70a3870d1 |
# In the game, Monopoly, the standard board is set up in the
# following way:
# GO A1 CC1 A2 T1 R1 B1 CH1 B2 B3 JAIL
# H2 C1
# T2 U1
# H1 C2
# CH3 ... | cloudzfy/euler | src/84.py | Python | mit | 4,488 | [
"VisIt"
] | a15a3badb796be244c5e4d550c4a94efb1a9156ec125c909fef4e5526e7560eb |
tests=[
("python","UnitTestBuildComposite.py",{}),
("python","UnitTestScreenComposite.py",{}),
("python","UnitTestAnalyzeComposite.py",{}),
]
for dir in ['Cluster','Composite','Data','DecTree','Descriptors','FeatureSelect','InfoTheory','KNN','ModelPackage','NaiveBayes','Neural','SLT']:
tests.append(('pyth... | rdkit/rdkit-orig | rdkit/ML/test_list.py | Python | bsd-3-clause | 523 | [
"RDKit"
] | 6eb514ecca5ad02dfe45e3993258623c590e67fcd5b3604bde8d0d5c5d4bcd85 |
#!/usr/bin/env python
import sys
import pysam
import Script
def usage(what=None):
if what == "bedmode":
sys.stderr.write("""chromCoverage.py - Bedmode: report coverage in a set of regions
Usage: chromCoverage.py [-o F] -b B [-a] bamfile
Read regions from BED file B, and write to standard output (or to ... | albertoriva/bioscripts | chromCoverage.py | Python | gpl-3.0 | 8,364 | [
"pysam"
] | 7f3b681bad410a90e4e95749aedefbfb9c3a2962b7b2e8b0cc040a12b2427d39 |
# ============================================================================
#
# Copyright (C) 2007-2012 Conceptive Engineering bvba. All rights reserved.
# www.conceptive.be / project-camelot@conceptive.be
#
# This file is part of the Camelot Library.
#
# This file may be used under the terms of the GNU General... | jeroendierckx/Camelot | camelot/view/controls/delegates/monthsdelegate.py | Python | gpl-2.0 | 2,687 | [
"VisIt"
] | 480b711e7455a2bbb2ff6744489830589e25fbdf5ad8e9f0776eace26831678f |
from urllib.request import urlopen
from behave import then, when
@when(u'I visit "{url}"')
def visit(context, url):
page = urlopen(context.base_url + url)
context.response = str(page.read())
@then(u'I should see "{text}"')
def i_should_see(context, text):
assert text in context.response
| behave/behave-django | tests/acceptance/steps/live_test_server.py | Python | mit | 305 | [
"VisIt"
] | 1f842833b7c3e08af8e1829244074a99b500787d811a1ec92cd80a782c4499b3 |
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from django.views import defaults as default_views
urlpatterns = [
url(r'^$', TemplateView.as_view(template_name='page... | webyneter/cookiecutter-django | {{cookiecutter.project_slug}}/config/urls.py | Python | bsd-3-clause | 1,592 | [
"VisIt"
] | ee77123014b1df95c5b3cdaa11ed35623592fc07f57b0d50fdb1a4fc47ec7b6f |
"""A quick DOM implementation.
Python's xml.dom is very slow. The xml.sax module is also slow (as it imports urllib2).
This is our light-weight version.
"""
# Copyright (C) 2009, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from xml.parsers import expat
class Element(object):
"""... | timdiels/zeroinstall | zeroinstall/injector/qdom.py | Python | lgpl-2.1 | 3,777 | [
"VisIt"
] | 7f4689596d68dc9cef692cd141d0b0ffad1bda32a34e481463b161522b96e12b |
import os
from itertools import count
from pyjade import Parser, Compiler as _Compiler
from pyjade.runtime import attrs
from pyjade.utils import process
def process_param(key, value, terse=False):
if terse:
if (key == value) or (value is True):
return key
if isinstance(value, ba... | glennyonemitsu/MarkupHiveServer | src/pyjade/ext/underscore.py | Python | mit | 4,076 | [
"VisIt"
] | 75b905e92bcb5f32aeeb6f4a794baafde74585dbaaf64a099c360c891e976dad |
"""OpenMM molecular dynamics runner with accessory classes.
OpenMM is a library with support for running molecular dynamics
simulations with specific support for fast GPU calculations. The
component based architecture of OpenMM makes it a perfect fit with
wepy.
In addition to the principle OpenMMRunner class there ar... | ADicksonLab/wepy | src/wepy/runners/openmm.py | Python | mit | 46,448 | [
"MDTraj",
"OpenMM"
] | 4fc7581ac6ca38b992b5e8a5e74f68e07defc042fb90130d79c2efa082982e56 |
#!/usr/bin/env python
from vtk import *
graph = vtkMutableDirectedGraph()
a = graph.AddVertex()
b = graph.AddChild(a)
c = graph.AddChild(a)
d = graph.AddChild(b)
e = graph.AddChild(c)
f = graph.AddChild(c)
tree = vtkTree()
tree.CheckedShallowCopy(graph)
view = vtkGraphLayoutView()
view.AddRepresentati... | hlzz/dotfiles | graphics/VTK-7.0.0/Examples/Infovis/Python/create_tree.py | Python | bsd-3-clause | 452 | [
"VTK"
] | 5bccc23e21a308efaa15a4d2e998d1e0ca79229e2f8c1d26d4c24102bacf4399 |
from sympy.core.add import Add
from sympy.core.basic import Basic, C
from sympy.core.expr import Expr
from sympy.core.function import count_ops
from sympy.core.power import Pow
from sympy.core.symbol import Symbol, Dummy
from sympy.core.numbers import Integer, ilcm, Rational, Float
from sympy.core.singleton import S
fr... | lidavidm/mathics-heroku | venv/lib/python2.7/site-packages/sympy/matrices/matrices.py | Python | gpl-3.0 | 108,816 | [
"DIRAC",
"Gaussian"
] | 60b899481207cc9acf9b459fa0ce98d56b1cba2238f3b0495b0b269bdad06eee |
import numpy as np
from numpy.testing import assert_array_almost_equal
from sklearn.neighbors.kd_tree import (KDTree, NeighborsHeap,
simultaneous_sort, kernel_norm,
nodeheap_sort, DTYPE, ITYPE)
from sklearn.neighbors.dist_metrics import Dista... | mblondel/scikit-learn | sklearn/neighbors/tests/test_kd_tree.py | Python | bsd-3-clause | 7,918 | [
"Gaussian"
] | d3c4a2f0b6c5d975909594bc7e5138eabc4bbb3cfadbdc8a36a9c51fb5941c59 |
import numpy, theano
from theano import tensor as T
# TODO: Covariance parameters may be too simple. Think of a way to make the matrix positive semi-definite and non-singular
class ReconstructionModel(object):
def __init__(self, ont_rep, vocab_rep, init_hyp_strengths=None, rec_model_type="gaussian"):
"""
on... | pdasigi/spade | reconstruction.py | Python | gpl-2.0 | 2,810 | [
"Gaussian"
] | a2bed4d4873ec16f775a84c79d03af9f647c09a5564d53154d5c271c16ac8b51 |
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 | Shelter Animal Outcomes/shelter-baseline.py | Python | mit | 2,963 | [
"Gaussian"
] | b18f6ee059300f7106a2dcbd7a93919139b57d3323783c6fe85211782ae7a705 |
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Matti Hamalainen <msh@nmr.mgh.harvard.edu>
# Denis Engemann <denis.engemann@gmail.com>
# Andrew Dykstra <andrew.r.dykstra@gmail.com>
# Teon Brooks <teon.brooks@gmail.com>
#
# License: BSD (3-clause)
import os
... | ARudiuk/mne-python | mne/channels/channels.py | Python | bsd-3-clause | 31,361 | [
"Mayavi"
] | b80243a4259ce431064bbee24a0afddd3be5f95ccf8ef2e50e847893b9703902 |
import numpy as np
from ase.tasks.bulk import BulkTask
from gpaw import FermiDirac, MethfesselPaxton, MixerSum, \
KohnShamConvergenceError, PoissonSolver
from gpaw.factory import GPAWFactory
a0 = 2.84
def f(name, dist, k, g):
tag = '%s-%02d-%2d' % (name, k, g)
task = BulkTask(tag=tag, lattice_constant... | ajylee/gpaw-rtxs | doc/tutorials/lattice_constants/iron.py | Python | gpl-3.0 | 1,199 | [
"ASE",
"GPAW"
] | 0a9dd9d1ef603f9199be47e69da9d1da65520b034c264b35de3fac260a4674d4 |
"""Contains SSIM library functions and classes."""
from __future__ import absolute_import
import argparse
import glob
import sys
import numpy as np
from scipy import signal
from ssim import compat
from ssim.compat import Image, ImageOps
from ssim.utils import convolve_gaussian_2d
from ssim.utils import get_gaussian... | jterrace/pyssim | ssim/ssimlib.py | Python | mit | 9,166 | [
"Gaussian"
] | b73b71dd7d57aca62550232d17992d170597a604867d18f28cf4ee46b9c41d16 |
#!/usr/bin/env python3
import os
import pkg_resources
import tbapy
__version__ = pkg_resources.require("FRCUploader")[0].version
# Default Variables
DEBUG = False # DON'T COMMIT THIS LINE IF TRUE
DEFAULT_TAGS = "{}, frcuploader, FIRST, omgrobots, FRC, FIRST Robotics Competition, robots, Robotics, {game}"
MATCH_TYPE... | NikhilNarayana/FRC-YouTube-Uploader | frcuploader/consts.py | Python | gpl-3.0 | 2,768 | [
"VisIt"
] | c7be91059d1ad28c9354a3c945ef780de4ef0f04212b7c3dc2f35c84f26ff2d2 |
import numpy as np
# Conditional import machinery for vtk
from dipy.utils.optpkg import optional_package
# Allow import, but disable doctests if we don't have vtk
vtk, have_vtk, setup_module = optional_package('vtk')
if have_vtk:
vtkInteractorStyleUser = vtk.vtkInteractorStyleUser
# version = vtk.vtkVersion.... | nilgoyyou/dipy | dipy/viz/interactor.py | Python | bsd-3-clause | 11,768 | [
"VTK"
] | 005f5fe7cc63c6d48626fbb24cbd9ae7d6d258dcc9389d750e913fdaa61b3e5c |
import pygame
import random
import time
import math
import psycopg2
class Database:
def __init__(self):
# Connect to an existing database
self.connection = psycopg2.connect("dbname=postgres user=postgres password= host=localhost")
# Open a cursor to perform database operations... | Kaana38/INF1C---Project-2---groep-3 | game.py | Python | mit | 106,624 | [
"Elk"
] | d4157a040469a99a192baf8cb9f993dffcaaaaeb876b7ef7f13cabd73d85ba15 |
from gi.repository import Gtk, Gdk, GObject
import logging
import os
import xapian
from gettext import gettext as _
from cellrenderers import (CellRendererAppView,
CellButtonRenderer,
CellButtonIDs)
from softwarecenter.ui.gtk3.em import em, StockEms
from software... | Alberto-Beralix/Beralix | i386-squashfs-root/usr/share/software-center/softwarecenter/ui/gtk3/widgets/apptreeview.py | Python | gpl-3.0 | 23,470 | [
"ORCA"
] | b09a21320abb952a81a55dbcdf0522ddf4e50388815a4d83b0eb8db458516c04 |
"""
Surrogate analysis
------------------
This example shows how to estimate a significance threshold in a comodulogram.
A comodulogram shows the estimated PAC metric on a grid of frequency bands.
In absence of PAC, a PAC metric will return values close to zero, but not
exactly zero. To estimate if a value is signific... | pactools/pactools | examples/plot_surrogate_analysis.py | Python | bsd-3-clause | 4,809 | [
"Gaussian"
] | 894e05e4699605f972b6504805afa367b79f1a6c23a93edd30f5bd4ec21e4b58 |
#!/usr/bin/env python3
#
# Copyright 2022 David Fort <contact@hardening-consulting.com>
#
# This script is meant to parse some FreeRDP logs in DEBUG mode (WLOG_LEVEL=DEBUG) and interpret the
# smartcard traffic, dissecting the PIV or GIDS commands
#
# usage:
# * live: WLOG_LEVEL=DEBUG xfreerdp <args with smartca... | awakecoding/FreeRDP | tools/smartcard-interpreter.py | Python | apache-2.0 | 17,389 | [
"ADF"
] | 12e2af7d097e12be3fcc5a44f94178ac270f0a2c37caa5ce8505ae190f0c5323 |
# Author: Prabhu Ramachandran <prabhu [at] aero . iitb . ac . in>
# Copyright (c) 2008, Prabhu Ramachandran
# License: BSD Style.
# Enthought library imports.
from traits.api import Instance
# Local imports.
from mayavi.components.contour import Contour as ContourComponent
from mayavi.core.pipeline_info import Pipel... | dmsurti/mayavi | mayavi/filters/contour.py | Python | bsd-3-clause | 1,197 | [
"Mayavi"
] | 749f3ec702dec1244722d8d1bfb60562aee032d8c7b95f7fbe6e7f2608f964ef |
# ----------------------------------------------------------------------------
# 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.
# --------------------------------------------... | gregcaporaso/scikit-bio | skbio/sequence/_genetic_code.py | Python | bsd-3-clause | 31,064 | [
"scikit-bio"
] | b49a907aae1df1879d023f5e6ae38cae72eb41f5f4063845704d6a92e7dca179 |
from abc import abstractmethod, ABCMeta
import six
from collections import Iterable, OrderedDict
from copy import copy
class State(six.with_metaclass(ABCMeta)):
def __init__(self, state, name=None):
"""
Base class for State.
:param state: scalar or iterables
:param name: string nam... | czhengsci/veidt | veidt/monte_carlo/base.py | Python | bsd-3-clause | 4,107 | [
"pymatgen"
] | 9f27c1891100cb895b968a57e4e15e48d2015b037f92d7126e238fde1c154d0c |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'kek.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
Mai... | MightyEnki/sc-thingie | kek.py | Python | lgpl-3.0 | 26,611 | [
"Jaguar",
"Octopus"
] | 5ad8193f67788c6411a649863a6fd14b19dbe4f35adfbc05bdb821ac98108174 |
# Nexus.py - a NEXUS parser
#
# Copyright 2005 by Frank Kauff & Cymon J. Cox. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
# Bug reports welcome: fkauff@duke.edu
#
"""Nexus ... | dbmi-pitt/DIKB-Micropublication | scripts/mp-scripts/Bio/Nexus/Nexus.py | Python | apache-2.0 | 68,776 | [
"Biopython"
] | 1d4bc1a88edf0e62d379a37ba5d0b5aa04ea13a70c029c6b1074092298b048dd |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.