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 |
|---|---|---|---|---|---|---|---|
# Taken from:
# https://github.com/Instagram/python-instagram/blob/master/get_access_token.py
from instagram.client import InstagramAPI
import sys
if len(sys.argv) > 1 and sys.argv[1] == 'local':
try:
from test_settings import *
InstagramAPI.host = test_host
InstagramAPI.base_path = test_... | saruberoz/photodl | scripts/get_instagram_access_token.py | Python | mit | 1,438 | [
"VisIt"
] | b1eeb8efe94cf3e5600ee9c62b255bc95b2c39b699f9b51e77133652b74dc4ed |
from nose import tools
import numpy as np
from digidemod.sample import decimate
def test_decimate_valueErrors():
# Attempts to decimate by a *negative* value should fail
tools.assert_raises(ValueError, decimate, np.array([1]), -1)
# Attempts to decimate by anything other than an int should fail
tools... | emd/digidemod | tests/sample_tests.py | Python | gpl-2.0 | 2,086 | [
"Gaussian"
] | 7023761e7b6d85a75d30e2dfb9cf307a6831943639dd74a5e880f48080500f6a |
# sql/compiler.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Base sql and DDL compiler implementations.
Classes provided include:
:class:`.c... | ncdesouza/bookworm | env/lib/python2.7/site-packages/sqlalchemy/sql/compiler.py | Python | gpl-3.0 | 109,429 | [
"VisIt"
] | 5ddd4b2538815f9f7058b9959845523d0a35db721998b1722980775031f0b097 |
from __future__ import absolute_import, division
from django.conf import settings
from django.core import urlresolvers
from django.db import connection
from django.db.models import Sum
from django.db.models.query import QuerySet
from django.http import HttpResponseNotFound, HttpRequest, HttpResponse
from django.templa... | j831/zulip | analytics/views.py | Python | apache-2.0 | 36,487 | [
"VisIt"
] | 94dff538fb1cf84fe6d2babf839778fc054fac70e5c8b080987500743128fc66 |
def Flux(infile,degrees,bin_size):
deg= degrees #User input: degrees to rotate image so that the galaxy is horizontal
bin= bin_size #User input: the rows divided by bin equals the bin size
infile=infile.rotate(deg)
out=np.zeros(int(rows/bin))
rows,columns=infile.shape
for k in range(len(int(ro... | mpbusch/LOFAR-ForegroundGalaxyCollaboration | Flux_profile.py | Python | mit | 607 | [
"Galaxy"
] | 4fe314b6e37862b110d4bf93027af0e8afd60946af0dcd2af4d9b64d02319aa2 |
"""
Utilities for ingesting Stack data products into the MySQL tables.
"""
from __future__ import absolute_import, print_function, division
import os
import sys
from collections import OrderedDict
import sqlite3
import numpy as np
import astropy.io.fits as fits
import lsst.afw.math as afwMath
import lsst.daf.persistenc... | DarkEnergyScienceCollaboration/pserv | python/desc/pserv/utils.py | Python | bsd-3-clause | 12,825 | [
"VisIt"
] | adfb8afea498c687311f32d66e4d048a7fdaf62c8ed67068f5b0320bba2b1e58 |
#!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses... | alexlo03/ansible | lib/ansible/modules/network/avi/avi_pkiprofile.py | Python | gpl-3.0 | 5,529 | [
"VisIt"
] | 332fd49748d1388ded7c1ed0a194d524345f99e888389f83a9b92f4502be3cd2 |
# Homework 9
#
# We're going to make a Lil' QuakeBot!!!! Please write this code as a .py file, not a Notebook.
#
# First, tips:
# READ THROUGH THE ENTIRE ASSIGNMENT BEFORE YOU BEGIN
# Be careful that you're doing all of your math with ints or floats instead of strings that look like ints or floats.
# When you write you... | raschuetz/foundations-homework | 09/homework-9-schuetz.py | Python | mit | 4,957 | [
"BLAST"
] | 11f8327bacd058ed8de4e50344ce32b64b6495672079983dcb7721ac5d1ea2f4 |
# -*- 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_conversations.py | Python | apache-2.0 | 105,962 | [
"Octopus"
] | 4cc12ee348b9e92d590efe1cc8de40a1de610c61148f266c578137d1b7a47591 |
# plugin for GromacsWrapper: stripwater.py
# Copyright (c) 2010 Oliver Beckstein <orbeckst@gmail.com>
# Released under the GNU Public License 3 (or higher, your choice)
# See the file COPYING for details.
"""
ProteinOnly
===========
Write a trajectory with only the protein retained, using
:meth:`gromacs.cbook.Transfo... | jandom/GromacsWrapper | gromacs/analysis/plugins/proteinonly.py | Python | gpl-3.0 | 8,487 | [
"Gromacs"
] | 57acc8eb70e9992033948c78b6c17428d1ea9abd70bf49da46e97c9fe3354b2d |
import numpy as np
import theano
import theano.tensor as T
from variational_coders.encoders import GaussEncoder
from variational_coders.decoders import Decoder
### Gaussian VAE ###
class Gaussian_VAE(object):
def __init__(self, rng, input, batch_size, layer_sizes,
layer_types, activations, laten... | enalisnick/stick-breaking_dgms | models/Gauss_VAE.py | Python | mit | 2,864 | [
"Gaussian"
] | c19ec836f8c6401777b86eb40a010f58c690e981f1b0512823259b26dbf1a713 |
from pyLCIO import IOIMPL, EVENT,UTIL
from pyLCIO.io.LcioReader import LcioReader
from array import array
from ROOT import *
import math
##~~~~~~~~~~~~~~~~~~~~~~~~~
#Define helpful methods
##~~~~~~~~~~~~~~~~~~~~~~~~~
def solidAngle(hit):
angle=(math.acos((math.cos(phi*math.pi/180.)*hit.getPosition()[0]+math.sin(ph... | SiliconDetector/UserAnalyses | asteinhebel_ECalAnalysis/calibrationLeakageStudies/PUB-byEvtLeakageCorr.py | Python | mit | 13,754 | [
"Gaussian"
] | fe140327f0577606e53b2e9584419c2a12fb8189d963159df1272d8df0b65afc |
'''The script reads BAM file and separate reads mapped with and without
mate into separate SAM files.
Reads are written in paired.bam and unpaired.bam accordingly.
Reads without a proper pair are ignored.
'''
import sys
import pysam
def split(infile):
prefix = infile.rstrip(".bam")
bamfile = pysam.Samfile... | likit/gimme | src/utils/split_sam.py | Python | gpl-3.0 | 1,017 | [
"pysam"
] | c920256458b7dbb0dda05020a304c9a91b7a2477820b20ea8996c8d432f49df4 |
"""
Image classes
"""
import data
import logging
from urllib import urlencode
log = logging.getLogger(__name__)
class Image( data.Data ):
"""Class describing an image"""
def set_peek( self, dataset ):
dataset.peek = 'Image in %s format (%s)' % ( dataset.extension, data.nice_size( dataset.get_size() ... | jmchilton/galaxy-central | galaxy/datatypes/images.py | Python | mit | 2,436 | [
"Galaxy"
] | 093f9767a46eb7eaa3c2c6d954dfb08e6eaa1a76cc11614dcc88f66064cd2a1f |
"""
This example show how to embedded Mayavi in a wx notebook.
This is a slightly more complex example than the `wx_embedding` example (
:ref:`example_wx_embedding`), and can be used to see how a large wx
application can use different Mayavi views.
In this example, we embed one single Mayavi scene in a Wx notebook, w... | dmsurti/mayavi | examples/mayavi/interactive/wx_mayavi_embed_in_notebook.py | Python | bsd-3-clause | 2,761 | [
"Mayavi"
] | c69d572aef06b3cd420527be84952ff53e3351e5f18ab40a8496d182830f1412 |
# creates: hoppingsummary.png
import matplotlib
matplotlib.use('Agg')
from ase.optimize.minimahopping import MHPlot
execfile('Cu2_Pt110.py')
mhplot = MHPlot()
mhplot.save_figure('hoppingsummary.png')
# Clean up directory.
import os
os.remove('hop.log')
os.remove('minima.traj')
os.remove('qn00000.traj')
os.remove('qn0... | alexei-matveev/ase-local | doc/tutorials/minimahopping/minimahopping.py | Python | gpl-2.0 | 504 | [
"ASE"
] | e02beea4a58b83f6827fc9849022e9d2658fc83abe271ca251308fc058cd9cfc |
from __future__ import absolute_import, print_function
import os
import sys
import glob
import argparse
from pprint import pprint, pformat
import mdtraj as md
from joblib import dump
from mixtape.featurizer import (DihedralFeaturizer, ContactFeaturizer,
KappaAngleFeaturizer)
from .util ... | rmcgibbo/mixtape-scripts | mixtape_scripts/featurize_trajset.py | Python | mit | 5,534 | [
"MDTraj"
] | 77864d32a357b29a5622491de494eb73c4082ca5bf3168c97a021d85d6873785 |
import logging, re, json, commands, os, copy
from datetime import datetime, timedelta
import time
import json
import copy
import itertools
import string as strm
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response, render, redirect
from djan... | PanDAWMS/panda-bigmon-lsst | lsst/views.py | Python | apache-2.0 | 238,590 | [
"VisIt"
] | 4e62dbdfd14c9a24e8260a6a3c54bae9d42917fb8c2474a14acc7434ce8e4e0a |
"""Miscellaneous functions and classes that dont fit into specific
categories."""
import sys, os, vtk
def calldata_type(type):
"""set_call_data_type(type) -- convenience decorator to easily set the CallDataType attribute
for python function used as observer callback.
For example:
import vtk... | hlzz/dotfiles | graphics/VTK-7.0.0/Wrapping/Python/vtk/util/misc.py | Python | bsd-3-clause | 3,365 | [
"VTK"
] | 8005da7d39db78ee9d6d59d165672db201e7abc8da880d74313bd1a6d66c8334 |
#!/usr/bin/env python
# import modules
import matplotlib
from os.path import splitext
from shapefile import Reader
from itertools import product
import matplotlib.pyplot as plt
from optparse import OptionParser
from netCDF4 import Dataset as nc
from mpl_toolkits.basemap import Basemap
from matplotlib.collections impor... | RDCEP/ggcmi | bin/plot.isi1/cmap.isi1.py | Python | agpl-3.0 | 8,088 | [
"NetCDF"
] | 74bcfdf1ab144b2f0ffa70f46fbd1c33b0541e7365b3903228d9202e88c4ec2e |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
import argparse
import statistics
import subprocess
import time
import logging
import cProfile
from collections import defaultdict
import shutil
import runner
from compute_abundance import get_abundance_by_scaffold, complete_fasta_with_abundance, get... | bonsai-team/matam | scripts/matam_assembly.py | Python | agpl-3.0 | 72,929 | [
"BLAST"
] | 86cf9e41ad8b442d3905ea461c60f9d61c536965470f0209844c66ceb7d7ead5 |
# -*- coding: utf-8 -*-
#
# raster_plot.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... | tillschumann/nest-simulator | pynest/nest/raster_plot.py | Python | gpl-2.0 | 9,599 | [
"NEURON"
] | 07de58b1ee495a76ad9171f8ad79e82e2b6a65a5172d4998dd885b4532bca063 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# PyRATA
#
# Authors:
# Nicolas Hernandez <nicolas.hernandez@gmail.com>
# Guan Gui 2014-08-10 13:20:03 https://www.guiguan.net/a-beautiful-linear-time-python-regex-matcher-via-nfa
# URL:
# https://github.com/nicolashernandez/PyRATA/
#
#
# Copyri... | nicolashernandez/PyRATA | demo/NPFST/FullNP.py | Python | apache-2.0 | 20,778 | [
"Gaussian"
] | 1113bd55f06b7d8a8f01f9bdd624102bc225fc75b388907dd4951ff8979a9b5f |
# Copyright (c) 2010 - 2014, AllSeen Alliance. All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PR... | hybridgroup/alljoyn | alljoyn/build_core/tools/scons/javadoc.py | Python | isc | 5,711 | [
"VisIt"
] | 668af8b1a937ce00a6b34f789648f99d475ba93071a45b35aff365ad5eef6532 |
# 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_0075_water_vna_ena_enl.py | Python | apache-2.0 | 1,931 | [
"PySCF",
"SIESTA"
] | 51294179701d2c083865dbc31ab33b8975618f9a7a487b45e48ce803aa23fc52 |
"""
:mod:`terrain` -- Calculate terrain multiplier
===============================================================================
This module is called by the module
:term:`all_multipliers` to calculate the terrain multiplier for an input tile
for 8 directions and output as NetCDF format.
:References:
Yang, T.,... | dynaryu/Wind_multipliers | terrain/terrain_mult.py | Python | gpl-3.0 | 16,307 | [
"NetCDF"
] | 566762a21d036cb37e3e09325fce69ccee7d9646c7ad7734715e52b8c2f4d0bd |
#!/usr/bin/env python
"""
tests for saving a UGrid in netcdf format
designed to be run with pytest
"""
from __future__ import (absolute_import, division, print_function)
import numpy as np
import netCDF4
from pyugrid.ugrid import UGrid, UVar
from pyugrid.test_examples import two_triangles, twenty_one_triangles
# ... | rsignell-usgs/notebook | pyugrid/test/test_save_as_netcdf.py | Python | mit | 14,290 | [
"NetCDF"
] | 36a26db1c6ab69e0a5eba3219f11f08ae035011740d14dcd449ad760cf1fe5cb |
# -*- Python -*-
# Converted by ./convert_mime_type_table.py from:
# /usr/src2/apache_1.2b6/conf/mime.types
#
content_type_map = \
{
'ai': 'application/postscript',
'aif': 'audio/x-aiff',
'aifc': 'audio/x-aiff',
'aiff': 'audio/x-aiff',
'au': 'audio/basic',
'avi': 'video... | dahaic/outerspace | server/lib/medusa/mime_type_table.py | Python | gpl-2.0 | 3,941 | [
"NetCDF"
] | 80fa7c521669c6129b585adeaf975cd2f5eb1859a901c41f6405755af0d86a88 |
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | Lyleo/nupic | nupic/regions/ImageSensorExplorers/Jiggle.py | Python | gpl-3.0 | 5,890 | [
"VisIt"
] | 29674e8e349a5abd0ef755093388cbbdf41d15c7223fa1f3199dbd8106ab0a8c |
#
# Author: Henrique Pereira Coutada Miranda
# Run multiple GW calculations using Yambo for Boron Nitride
# using different layer separations with or without the coulomb truncation
#
from __future__ import division, print_function
from yambopy import *
from qepy import *
import argparse
yambo = 'yambo'
def get_input... | henriquemiranda/yambo-py | tutorial/bn/gw_cutoff_bn.py | Python | bsd-3-clause | 4,555 | [
"Quantum ESPRESSO",
"Yambo"
] | 63b8f7bf5b03d7cf62e7b556ebea462498db71f3d5174ef71253c0a6d207749d |
#!/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/web/epgnow.py | Python | gpl-2.0 | 7,461 | [
"VisIt"
] | e782a2ed996f686f666c65e3dee33c4275b1a1c3677d6346a3b3ee1dabae6052 |
'''
Unittests for spreg.error_sp_hom module
'''
import unittest
import pysal
from pysal.spreg import error_sp_hom as HOM
from scipy import sparse
import numpy as np
class BaseGM_Error_Hom_Tester(unittest.TestCase):
def setUp(self):
db=pysal.open(pysal.examples.get_path("columbus.dbf"),"r")
y = np.... | darribas/pysal | pysal/spreg/tests/test_error_sp_hom_sparse.py | Python | bsd-3-clause | 17,871 | [
"COLUMBUS"
] | d1ed98caa4897da131bca47db5780edbdede0d280d3e18d750e88ff4d3986ec7 |
## @package shesha.init.geom_init
## @brief Initialization of the system geometry and of the Telescope object
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.2.1
## @date 2022/01/24
## @copyright GNU Lesser General Public License
#
# This file is part of COMPASS <https://anr-comp... | ANR-COMPASS/shesha | shesha/init/geom_init.py | Python | gpl-3.0 | 38,356 | [
"DIRAC"
] | 7833c7ca224638a7d416e3a47ee53f294e10362b18ce8282c0f2ea726f4ffb14 |
#!/usr/bin/env python
#----------------------------------------------------------------------
# paraviewBathyWSE.py : Visualize bathy and wse simultaneously in
# Paraview.
#----------------------------------------------------------------------
# Copyright(C) 2016 Jason Fleming
#
# This file is part of the ADCIRC Surge... | jasonfleming/asgs | output/paraviewBathyWSE.py | Python | gpl-3.0 | 7,106 | [
"ParaView"
] | d27ee64a4b8e15af1e868900a1925d3504890b986b5a78f1d282650aecf6b6d4 |
# The OARN Relief Nursery Database
# Copyright (C) 2015 Oregon Association of Relief Nurseries
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at... | wire-rabbit/oarn-database | oarndb/views/home_visit_views.py | Python | agpl-3.0 | 6,784 | [
"VisIt"
] | 8ec9caa1af30457027e3b13e2167e5961c43f57596fbad4d24a1d764570522b9 |
#!/usr/bin/env python
# This example loads an SBML file and runs the MCA task on it,
# finally the result is plotted.
#
from __future__ import print_function
import sys
from COPASI import *
from types import *
dataModel = None
def print_annotated_matrix(title, annotated_matrix):
# type: (str, CArrayAnnotation... | jonasfoe/COPASI | copasi/bindings/python/examples/run_mca.py | Python | artistic-2.0 | 3,460 | [
"COPASI"
] | 1098031363b5ecdbbf8a457a009b3b9e9d9a7fe1d22bafa78eae0f28555e8ef9 |
#!/usr/bin/env python
# coding=utf-8
# Copyright (c) 2014 by Ecreall under licence AGPL V3 terms,
# avalaible on http://www.gnu.org/licenses/agpl.html
#
# file: french_dates_grammar.py
# author: Michael Launay
import sys
import datetime
from parsimonious import Grammar, NodeVisitor
DEBUGG_VISITOR = False # True #In ... | michaellaunay/french_dates_to_ical | french_dates_to_ical/french_dates_grammar.py | Python | agpl-3.0 | 6,889 | [
"VisIt"
] | 9e9c773d50f5a8743ff3d3da3acc735e87c3ee77b096fd5df8a170f2790d3c39 |
from WebAppDIRAC.Lib.WebHandler import _WebHandler as WebHandler
from DIRAC.Core.Utilities import Time
class ExampleAppHandler(WebHandler):
DEFAULT_AUTHORIZATION = "all"
def web_getJobData(self):
timestamp = Time.dateTime().strftime("%Y-%m-%d %H:%M [UTC]")
total = 5
values = [
... | DIRACGrid/WebAppDIRAC | src/WebAppDIRAC/WebApp/handler/ExampleAppHandler.py | Python | gpl-3.0 | 800 | [
"DIRAC"
] | 1a825cd206efbcbe17ce19561bc880ea99d0a16fd1987b2c71b59b99573ad4df |
# -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2016 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by th... | crisely09/horton | horton/grid/test/test_uniform.py | Python | gpl-3.0 | 4,806 | [
"Gaussian"
] | 4c793c8f4481e1b86d3511f88636e68c87e3968ce52e5063956d27efe74a3248 |
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | google/nerfies | nerfies/model_utils.py | Python | apache-2.0 | 11,706 | [
"Gaussian"
] | edc1784d5cd2c3fc5b7a15e4b82ab39dc6432dbe016f8953ffe0623da7b61b41 |
#!/usr/bin/env python
# coding: utf-8
"""
Goal: не ставить много дополнительный пакетов
а использовать голый математический пакет с
тонкой прослойкой над ним. Плюс это возволяет
расширять модели после
Goal: как можно меньше Simulink-like вещей
fixme: численно или символьно?
"""
from sympy import oo... | zaqwes8811/micro-apps | self_driving/control/__init__.py | Python | mit | 4,256 | [
"Brian"
] | 086b3fd452cd698b04d29624e4326b5a7d5ec1d52aeb05648cacc15ef128ad09 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (... | 2013Commons/hue | apps/useradmin/src/useradmin/test_ldap_deprecated.py | Python | apache-2.0 | 29,872 | [
"MOE"
] | 4b6002221345633a2a548338ac9c28605c44ada2c03c121204d9924f79c80c17 |
__all__ = ['camera']
import os
import pickle
from paraview.simple import GetActiveCamera, RenderAllViews, WriteImage
class camera:
"""An object to store a single camera location/view. You can make a list/dict of these objects to save interesting views for your project. This object saves just a few parameters ab... | banesullivan/ParaViewGeophysics | pvmacros/vis/objs.py | Python | bsd-3-clause | 5,418 | [
"ParaView"
] | c1ca8ab58766f9a3e638adb8c60f1358a7781247323db105b4f58dd5d135a230 |
#!/usr/bin/python
import sys, os
import warnings
import numpy as np
import borgy.builder.stats as cbs
from optparse import OptionParser
import random
import borgy.builder.config as cbc
import borgy.builder.models as cbm
import borgy.builder.stats as cbs
import borgy.builder.reconstructor as rtor
import borgy.graph.gra... | pkerpedjiev/ernwin | fess/scripts/align_stems.py | Python | agpl-3.0 | 5,326 | [
"PyMOL"
] | 8495fc31f6452c2ef63f4273313620ebb861e231d500bc9720b8d683a1eefab8 |
##
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2007 Brian G. Matherly
# Copyright (C) 2010 Peter Landgren
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2011 Adam Stein <adam@csh.rit.edu>
# Copyright (C) 2011 Tim G L Lyons
# Copyright (C) 2013,2015 Paul Franklin
#... | Nick-Hall/gramps | gramps/gen/plug/report/endnotes.py | Python | gpl-2.0 | 8,871 | [
"Brian"
] | b36972e553c41bfdd080069ff44d610c0fef47bd616b981add12613fd1b34500 |
#!/usr/bin/env python3
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgp... | nuclear-wizard/moose | tutorials/darcy_thermo_mech/step08_postprocessors/problems/step8.py | Python | lgpl-2.1 | 3,946 | [
"MOOSE",
"VTK"
] | f29b25fd229f7ee9cbe500538c86477f53f1d509d48a1f528331d290aee0a153 |
#! /usr/bin/env python
from math import radians, sin
import Tkinter as Tk
import tkFileDialog
from scipy.interpolate import interp1d, InterpolatedUnivariateSpline
from scipy.optimize import fmin as fmin_sco
from scipy.optimize import fmin_tnc
import numpy
from numpy import arange, linspace, abs, array, zeros_like, co... | latrop/GRCF | GRCFlibs/GRCFmathFunctions.py | Python | gpl-3.0 | 35,327 | [
"Galaxy"
] | 9f4e74401f2646bc30a6d8acdbd842762a3f219b9cb046ff0d962c59a138c8ea |
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | jeeftor/alfredToday | src/lib/oauth2client/tools.py | Python | mit | 14,931 | [
"VisIt"
] | a2ae63a681dc98e8523cf49997eac4cd62f582f89424287daf719f9318f38bae |
from django.apps import apps as django_apps
from django.db import models
from edc_visit_schedule.model_mixins import VisitScheduleMethodsModelMixin
from ..offstudy_non_crf import OffstudyNonCrf
class OffstudyNonCrfModelMixinError(Exception):
pass
class OffstudyNonCrfModelMixin(VisitScheduleMethodsModelMixin, m... | botswana-harvard/edc-offstudy | edc_offstudy/model_mixins/offstudy_non_crf_model_mixin.py | Python | gpl-2.0 | 1,677 | [
"VisIt"
] | 2be730a17cb6c40f0a0df617cef166b4ee52c9c7c63a67c9b70ffa52f542c45d |
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | googlearchive/rgc-models | response_model/python/metric_learning/end_to_end/sr_embedding_baseline_models.py | Python | apache-2.0 | 11,821 | [
"Gaussian"
] | ec70b6475ebb1892f29dda9a08e69cbb962afc31f320843119b295cfd8b31bfc |
# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
import os
import os.path as osp
#import PIL
import Image
import cv2
fro... | herobd/fast-rcnn | lib/datasets/imdb.py | Python | mit | 9,720 | [
"Brian"
] | 7c3501b84bb65e3779516d5d17de4d13f114a6e94433a3a0882d8cbc13d2e47a |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Radim Rehurek <me@radimrehurek.com>
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""
Deep learning via word2vec's "skip-gram and CBOW models", using either
hierarchical softmax or negative sampling [1]_ [2]_.
The train... | olavurmortensen/gensim | gensim/models/word2vec.py | Python | lgpl-2.1 | 78,399 | [
"VisIt"
] | e747bf1b7da7566caaaa4517c7435f503799c97693ff78869b3aa2cc55f27462 |
#!/usr/bin/env python
"""Script to run Selenium2Library acceptance tests.
Tests are executed using Robot Framework and results verified automatically
afterwards using `robotstatuschecker` tool. The tool can be installed using
`pip install robotstatuschecker` and more information about it can be found
from: https://git... | HelioGuilherme66/robotframework-selenium2library | test/run_tests.py | Python | apache-2.0 | 8,197 | [
"VisIt"
] | b46543016dff1e56670667339844ea58d6269ef16e71d768ee0bc1c7f8091866 |
# noqa: D100
import tempfile
from distutils.version import StrictVersion
from importlib import import_module
from pathlib import Path
from typing import Sequence, Union
from birdy.utils import is_opendap_url
from owslib.wps import Output
from . import notebook as nb
class BaseConverter(object): # noqa: D101
mi... | bird-house/birdy | birdy/client/converters.py | Python | apache-2.0 | 10,829 | [
"NetCDF"
] | c1432ae8c674a777d2c853ad2826ab261420fad77a9da4bdd6d60bab5b0f39e8 |
#-------------------------------------------------------------------------------
# Cloud-COPASI
# Copyright (c) 2013 Edward Kent.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the GNU Public License v3.0
# which accompanies this distribution, and is available... | edkent/cloud-copasi | cloud_copasi/condor/condor_spec.py | Python | gpl-3.0 | 3,141 | [
"COPASI"
] | 81b55344767785811faf5741d874e495a0947830dedf068cbfa6fdda86ac33e8 |
""" Principal Component Analysis
"""
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Olivier Grisel <olivier.grisel@ensta.org>
# Mathieu Blondel <mathieu@mblondel.org>
# Denis A. Engemann <d.engemann@fz-juelich.de>
# Michael Eickenberg <michael.eickenberg@inria.fr>
# ... | jaidevd/scikit-learn | sklearn/decomposition/pca.py | Python | bsd-3-clause | 28,644 | [
"Gaussian"
] | 1268728d94d84cee35f9ebd6d062915a01a0f4cacc8a91b006dbfef587cb4b69 |
#!/usr/bin/env python
"""
put files in the FileCatalog (and Storage Element)
When destination SE is not specified, dput will use COMDIRAC configuration option "default_se".
"""
import os
import DIRAC
from DIRAC import S_OK, S_ERROR
from COMDIRAC.Interfaces import error
from COMDIRAC.Interfaces import critical
from... | calancha/COMDIRAC | Interfaces/scripts/dput.py | Python | gpl-3.0 | 3,191 | [
"DIRAC"
] | 18a6c0111b9fd8ffc6464574544def02cd109195ad09d69ed326ada0cbb2cbc8 |
# Originally written by Brian Baskin (@bbaskin):
# https://github.com/Rurik/Java_IDX_Parser
# See the file 'LICENSE' for copying permission.
import struct
import time
import zlib
from viper.common.abstracts import Module
from viper.core.session import __sessions__
class IDX(Module):
cmd = 'idx'
description ... | MeteorAdminz/viper | viper/modules/idx.py | Python | bsd-3-clause | 8,740 | [
"Brian"
] | 84d7b55e0f6922979c790abbc33909b1af06d1eb7708cbdf67062ad014f9b4b8 |
#!/usr/bin/env python
# aws_vpnconfig.py - a utility to generate vyos VPN config stanzas from
# aws vpn configurations
# Copyright (C) 2017 Brian 'redbeard' Harrington
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License... | brianredbeard/edgeos_setup | scripts/aws_vpnconfig/aws_vpnconfig.py | Python | agpl-3.0 | 11,612 | [
"Brian"
] | a19678d6c8407d1fbe90a1cb73c65b7f463a1dd141ab3f096cb40a227c6d85f8 |
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
class vtkPointSource(SimpleVTKClassModuleBase):
def __init__(self, module_manager):
SimpleVTKClassModuleBase.__init__(
self, module_manager,
vtk.vt... | chrisidefix/devide | modules/vtk_basic/vtkPointSource.py | Python | bsd-3-clause | 469 | [
"VTK"
] | ad1811ce577d25f1ce29f59e09c12202d84d7423b592691d21d0ed3ab39e68fd |
# from Cython.Build import cythonize
from setuptools import setup
setup(name='Azimuth',
version='2.0',
author='Nicolo Fusi and Jennifer Listgarten',
author_email="fusi@microsoft.com, jennl@microsoft.com",
description=("Machine Learning-Based Predictive Modelling of CRISPR/Cas9 guide efficiency... | MicrosoftResearch/Azimuth | setup.py | Python | bsd-3-clause | 657 | [
"Biopython"
] | 091503e97384cfa526a8f2b22e4029158a99dd9ffd114e63ffdd87d551fd7a69 |
"""
Base classes used by studio tests.
"""
from __future__ import absolute_import
from bok_choy.page_object import XSS_INJECTION
from common.test.acceptance.fixtures.course import CourseFixture
from common.test.acceptance.fixtures.library import LibraryFixture
from common.test.acceptance.pages.common.auto_auth import... | ESOedX/edx-platform | common/test/acceptance/tests/studio/base_studio_test.py | Python | agpl-3.0 | 6,180 | [
"VisIt"
] | 891a1e69c76f4cab9e52316dcbb3f5877922a54280338a02956d0842c64672d7 |
# -*- coding: utf-8 -*-
#
# test_connect_helpers.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 Li... | synergetics/nest | pynest/nest/tests/test_connect_helpers.py | Python | gpl-2.0 | 17,873 | [
"NEURON"
] | 85906b9a2e9526ac3849d06d1cfaad01bfef528a27be166283e40538637c57d4 |
"""
PySCeS - Python Simulator for Cellular Systems (http://pysces.sourceforge.net)
Copyright (C) 2004-2015 B.G. Olivier, J.M. Rohwer, J.-H.S Hofmeyr all rights reserved,
Brett G. Olivier (bgoli@users.sourceforge.net)
Triple-J Group for Molecular Cell Physiology
Stellenbosch University, South Africa.
Permiss... | asttra/pysces | pysces/PyscesStoich.py | Python | bsd-3-clause | 56,107 | [
"PySCeS"
] | 2f78aaebcf7a82559b8aa6615c92ad67f504f11331a79f52d2aeb17a934d47e3 |
# coding=utf-8
# Copyright 2018 The Tensor2Tensor 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... | vthorsteinsson/tensor2tensor | tensor2tensor/data_generators/algorithmic.py | Python | apache-2.0 | 17,395 | [
"Gaussian"
] | 7bc467a24f1a8cf3095028ac2161dc58a7445e6e445527acb154ff55e103b0e2 |
"""Dirac notation for states."""
from __future__ import print_function, division
from sympy import (cacheit, conjugate, Expr, Function, integrate, oo, sqrt,
Tuple)
from sympy.core.compatibility import u, range
from sympy.printing.pretty.stringpict import stringPict
from sympy.physics.quantum.qexpr ... | ahhda/sympy | sympy/physics/quantum/state.py | Python | bsd-3-clause | 29,186 | [
"DIRAC"
] | c17a5699cfe7286b333f9743ad2e141d239b330692b3cba361be2e53baaa8588 |
import os
import boto
from boto.s3.key import Key
import mdtraj
# The secret key is available as a secure environment variable
# on travis-ci to push the build documentation to Amazon S3.
AWS_ACCESS_KEY_ID = os.environ['AWS_ACCESS_KEY_ID']
AWS_SECRET_ACCESS_KEY = os.environ['AWS_SECRET_ACCESS_KEY']
BUCKET_NAME = 'msmb... | rmcgibbo/msmbuilder3 | tools/push_docs_to_amazon_s3.py | Python | gpl-3.0 | 845 | [
"MDTraj"
] | 68c6ecb730dc37281cdac5be7c287505054e8ea21bcbbb2c8ada27d973449171 |
#!/usr/bin/env python2.6
import ssl
import xmlrpc.client
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-i", "--slice-id", dest="sliceID",
help="Slice ID, unique string")
parser.add_option("-r", "--reservation", dest="reservation",
help="Reservation GU... | RENCI-NRIG/ahab | ahab_py/bin/getReservationStitchInfo.py | Python | epl-1.0 | 1,851 | [
"ORCA"
] | 9cb145c29eb2c9fef727126fddf9367e9f086baeedcc7c4b855f28c5b5655aa3 |
# Copyright 2003, 2007 by Sebastian Bassi. sbassi@genesdigitales.com
# 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.
import math
def lcc_mult(seq,wsize):
"""Local Composi... | dbmi-pitt/DIKB-Micropublication | scripts/mp-scripts/Bio/SeqUtils/lcc.py | Python | apache-2.0 | 5,877 | [
"Biopython"
] | 741f290d063a08d1052a9448b425f64000c106a2a0ba5512e86c5cf13080a412 |
"""Provides classes for pyBA. """
import numpy as np
from numpy.linalg import solve, cholesky, eigh
# Exception classes for error handling
class ZeroException(Exception):
pass
class SamplingException(Exception):
pass
class ShapeException(Exception):
pass
# Main pyBA classes
class Bgmap:
""" Bac... | berianjames/pyBAST | pyBA/classes.py | Python | mit | 17,911 | [
"Gaussian"
] | 12a2b29b6f02d4f525fe3315dbb6c9db36f2ffefad93d6d743d455b387a35048 |
from django.utils.translation import ugettext_lazy as _
from crystal_dashboard.dashboards.crystal import dashboard
import horizon
class Rings(horizon.Panel):
name = _("Storage Policies")
slug = "rings"
dashboard.CrystalController.register(Rings)
| Crystal-SDS/dashboard | crystal_dashboard/dashboards/crystal/rings/panel.py | Python | gpl-3.0 | 258 | [
"CRYSTAL"
] | 86bd4f27e972cb0c2942c667317d54b28fe0a47810d9fd5e4611deb2b0cf63b8 |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import os
from pymatgen.core.structure import Structure
from pymatgen.io.atat import Mcsqs
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import PymatgenTest
test_dir = os.path.join(PymatgenTest.T... | vorwerkc/pymatgen | pymatgen/io/tests/test_atat.py | Python | mit | 3,781 | [
"pymatgen"
] | 74e163315bdb7052a91ffeeb8f0efd6dd939e109d3ea622b66256bc7cbedf9e6 |
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
class vtkHyperOctreeContourFilter(SimpleVTKClassModuleBase):
def __init__(self, module_manager):
SimpleVTKClassModuleBase.__init__(
self, module_manager,
... | nagyistoce/devide | modules/vtk_basic/vtkHyperOctreeContourFilter.py | Python | bsd-3-clause | 512 | [
"VTK"
] | 3e59cb4d35abbf669c03f7f820029614da4ba06186e0630bf3e6b2a3f131e546 |
import collections
import numpy
import os
import pandas
import pysam
from grocsvs import step
from grocsvs import datasets as svdatasets
from grocsvs.stages import genotyping
from grocsvs.stages import mate_pair_evidence
from grocsvs.stages import export_vcf
pandas.options.display.max_rows = 250
pandas.options.displa... | grocsvs/grocsvs | src/grocsvs/stages/postprocessing.py | Python | mit | 15,791 | [
"pysam"
] | aa1a5e59fe45a87e9167e1058b66f6b176d25c9267fb4f0e2204d757405f602a |
#
# Copyright (C) 2002-2006 greg Landrum and Rational Discovery LLC
#
# @@ 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.
#
"""
unit testing code for ca... | ptosco/rdkit | rdkit/Chem/UnitTestSurf.py | Python | bsd-3-clause | 8,907 | [
"RDKit"
] | a22732df5c813eb81408694de1f1a01c0e7c33d7fc8e9455a1decb1d3a706b36 |
from __future__ import (absolute_import, division, print_function)
import math
import numpy as np
from scipy import constants
# Parameters in this bloc shouldn't be changed by a user. They should be treated as constants.
# Changing these parameters may lead to non-functional Abins.
# power expansion in terms of FUNDA... | dymkowsk/mantid | scripts/AbinsModules/AbinsConstants.py | Python | gpl-3.0 | 6,800 | [
"CASTEP",
"CRYSTAL",
"DMol3",
"Gaussian"
] | 8b51edaf9fc53829f4076a6ac18602475e6348a552afdfab05e439b3f4489e24 |
# -*- coding: utf-8 -*-
#
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Eric Larson <larson.eric.d@gmail.com>
# Joan Massich <mailsik@gmail.com>
# Guillaume Favelier <guillaume.favelier@gmail.com>
# Oleh Kozynets <ok7mailbox@gmail.com>
#
# License: Simplified BSD
imp... | olafhauk/mne-python | mne/viz/_brain/tests/test_brain.py | Python | bsd-3-clause | 28,481 | [
"Mayavi"
] | b1b5e1b7a44b6d496ee3e1c0dc01064a4ab3658d22061a7e4b04e6be07b54767 |
"""Unbinned log-likelihood fit
fit a Gaussian signal on a flat background
compare results from binned and unbinned log-likelihood fits
"""
from kafe2 import Fit, Plot, HistContainer, UnbinnedContainer
import numpy as np
import matplotlib.pyplot as plt
def generate_data(N, min, max, pos, width, s):
"""ge... | dsavoiu/kafe2 | examples/010_unbinned_fit/02_unbinned_hist_comparison.py | Python | gpl-3.0 | 2,023 | [
"Gaussian"
] | 6a6025abb3da49adc0726bc2e1c0ef08309ece28df7e357de004857a23a17b95 |
"""Module containing many types of two sample test algorithms"""
from __future__ import print_function
from __future__ import division
from builtins import str
from builtins import range
from past.utils import old_div
from builtins import object
from future.utils import with_metaclass
__author__ = "wittawat"
from abc... | wittawatj/interpretable-test | freqopttest/tst.py | Python | mit | 71,643 | [
"Gaussian"
] | 07b62dec33f8e7a3385855992f0e787efbb62079e4842ab0f6dad3ac9630691d |
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
class vtkOpenFOAMReader(SimpleVTKClassModuleBase):
def __init__(self, module_manager):
SimpleVTKClassModuleBase.__init__(
self, module_manager,
vtk... | nagyistoce/devide | modules/vtk_basic/vtkOpenFOAMReader.py | Python | bsd-3-clause | 484 | [
"VTK"
] | a486e12ad5e8970b85825ef1ec73674052295afcaa86c246f19d5b76ab249d0c |
import numpy as np
from scipy.special import gammainccinv
from scipy.ndimage.filters import convolve
def _inv_nchi_cdf(N, K, alpha):
"""Inverse CDF for the noncentral chi distribution
See [1]_ p.3 section 2.3"""
return gammainccinv(N * K, 1 - alpha) / K
# List of optimal quantile for PIESNO.
# Get opt... | FrancoisRheaultUS/dipy | dipy/denoise/noise_estimate.py | Python | bsd-3-clause | 12,298 | [
"Gaussian"
] | 0151f073b12ede8008bede545924ab157b5a9c1712372f7900a6e1b979d2fb4e |
from urllib2 import urlopen
from bs4 import BeautifulSoup
import requests
#point to FRUS volumes
html = urlopen("http://digicoll.library.wisc.edu/cgi-bin/FRUS/FRUS-idx?type=browse&scope=FRUS.FRUS1")
soup = BeautifulSoup(html, 'html.parser')
with open("frus_section_title.txt", "w") as file:
#scrape FRUS volume relati... | thomasgpadilla/webscraping | frus_section_title.py | Python | cc0-1.0 | 1,366 | [
"VisIt"
] | ded29e4323ebb884943ad21b8384f8c5d4a520561f613ebd3d478116441dc2ad |
import unittest
import os
import numpy as np
from upho.phonon.rotational_projector import RotationalProjector
from phonopy.interface.vasp import read_vasp
POSCAR_DIR = os.path.join(os.path.dirname(__file__), 'poscars')
class TestRotationalProjector(unittest.TestCase):
def setUp(self):
self._vectors = np.... | yuzie007/upho | tests/test_rotational_projector.py | Python | mit | 2,438 | [
"VASP",
"phonopy"
] | 67a65f89985667a97c135867ff24fdc7f6dbbffb2c735ba8fa8a58d3fd7801a3 |
from __future__ import print_function
import cv2
import numpy as np
import random
import os
import sys
import tensorflow as tf
import tqdm
import xml.etree.cElementTree as ET
from future.utils import python_2_unicode_compatible
from six.moves import cPickle as pickle
from xml.dom import minidom
class Yolo:
"""Im... | lovish1234/YOLOv1 | yolo.py | Python | mit | 44,116 | [
"NEURON"
] | ff9a449e106660a8a9586e414ccf776c218e390986306e56b77a3fc74e2fd219 |
# $Id$
#
# Copyright (C) 2006-2008 Greg Landrum
#
# @@ All Rights Reserved @@
#
from __future__ import print_function
import os,sys
import unittest
from rdkit.six.moves import cPickle
from rdkit import RDConfig
from rdkit import Chem
from rdkit.Chem import ChemicalFeatures
from rdkit.Geometry import rdGeometry as geom... | AlexanderSavelyev/rdkit | Code/ChemicalFeatures/Wrap/testFeatures.py | Python | bsd-3-clause | 4,027 | [
"RDKit"
] | cfa449c27862d8321716c84313ef34ca457299655ae3ecdf1f01b98af6ca6770 |
from __future__ import print_function
import os
from os.path import expanduser, join
import sys
import numpy as np
import io
from mfem import path as mfem_path
if len(sys.argv) > 1 and sys.argv[1] == '-p':
import mfem.par as mfem
use_parallel = True
from mfem.common.mpi_debug import nicePrint as print
... | mfem/PyMFEM | test/test_gridfunc.py | Python | bsd-3-clause | 1,768 | [
"VTK"
] | 176dfb9fe7e5149ff35bfb1d4fcf207a1b52c83ef11a177180afe5b490d2e3a6 |
__author__ = "Nicolo' Navarin"
__date__ = "13/feb/2015"
from graphKernel import GraphKernel
from scipy.sparse import csr_matrix
from ..graph import graph
from ..graph.GraphTools import generateDAG
import numpy as np
import sys
#from dependencies.pythontk import tree_kernels_new
from ..tree import tree_kernels_STonlyr... | nickgentoo/scikit-learn-graph | skgraph/kernel/ODDCLSTGraphKernel.py | Python | gpl-3.0 | 6,122 | [
"Gaussian"
] | 65dc6c7b49b512a172272d98b685cc843fbed9323f75ef128ed94738cecb62f6 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Andrew Jewett (jewett.aij at g mail)
# http://www.chem.ucsb.edu/~sheagroup
# License: 3-clause BSD License (See LICENSE.TXT)
# Copyright (c) 2012, Regents of the University of California
# All rights reserved.
"""
ltemplify.py
The "ltemplify.py" script... | sy0302/lammps_qtb | tools/moltemplate/src/ltemplify.py | Python | gpl-2.0 | 132,327 | [
"LAMMPS"
] | a765c7c72a2cbe38fcafc709aedcc0b850de4847715907f219fa19bff968c519 |
from v8 import JSContext, JSEngine
from v8.ast import AST
try:
import json
except ImportError:
import simplejson as json
class TestAST:
class Checker(object):
def __init__(self, testcase):
self.testcase = testcase
self.called = []
def __enter__(self):
... | pombredanne/python-v8 | tests/test_ast.py | Python | apache-2.0 | 14,468 | [
"VisIt"
] | fe4d87c17c05990107864bdd718d738d3c12a4d96deea1b7ad05ebca45b6eb81 |
import sys
from PyQt5 import QtWidgets, QtCore, QtGui, uic
import signal
from Framework.arm_status_sender import ArmStatusSender as ArmStatusSender
from Framework.arm_control_receiver import ArmControlReceiver as ArmControlReceiver
#####################################
# GroundStation Class Definition
##############... | caperren/Archives | OSU Coursework/ROB 421 - Applied Robotics/software/windows_packages/denso_slave/denso_slave.py | Python | gpl-3.0 | 2,746 | [
"ASE"
] | a729cfaac232e1ee861ad2421749935b2a0e06ba67b70e7810a0a3e027ad5cf7 |
# 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/m_kmat_den.py | Python | apache-2.0 | 8,747 | [
"PySCF"
] | 4ac56ff105b4401b493ad99b07c02c2f6a934c5733a40a801f8a42aa2ce022d7 |
# Copyright 2007-2022 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 your option) any later ve... | hyperspy/hyperspy | hyperspy/tests/model/test_chi_squared.py | Python | gpl-3.0 | 3,380 | [
"Gaussian"
] | 1d1fbc910de4206e1f66cf95128878ed30e87ec4770ffe255dd96735bf458f47 |
import logging
from cStringIO import StringIO
from math import exp
from lxml import etree
from path import path # NOTE (THK): Only used for detecting presence of syllabus
import requests
from datetime import datetime
import dateutil.parser
from lazy import lazy
from xmodule.modulestore import Location
from xmodule.se... | TsinghuaX/edx-platform | common/lib/xmodule/xmodule/course_module.py | Python | agpl-3.0 | 46,410 | [
"VisIt"
] | 926fa628e88c7693c0399fcaf2e1a2a00fd2f3771c4ae3b063f2e6258357416c |
import os
from uuid import uuid4
from datetime import datetime
from ..helpers import UniqueCourseTest
from ...fixtures.course import CourseFixture, XBlockFixtureDesc
from ...pages.lms.auto_auth import AutoAuthPage
from ...pages.lms.course_nav import CourseNavPage
from ...pages.lms.courseware import CoursewarePage
from ... | vismartltd/edx-platform | common/test/acceptance/tests/lms/test_lms_edxnotes.py | Python | agpl-3.0 | 44,241 | [
"VisIt"
] | 6f2bed1a09e0f21725eae52d70055a30e11161379e0733336bbaf9bb15876213 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# dashboard - Dashboard entry page backend
# Copyright (C) 2003-2015 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Lic... | heromod/migrid | mig/shared/functionality/dashboard.py | Python | gpl-2.0 | 11,969 | [
"Brian"
] | 42feebc7c1a8a4b192e7c22c1291acc940e7aa97c2ccbb3feeeeb7b41ba6e329 |
""" This is a test of the chain
FTS3Client -> FTS3ManagerHandler -> FTS3DB
It supposes that the DB is present, and that the service is running
"""
import unittest
import time
import sys
from DIRAC.Core.Base.Script import parseCommandLine
parseCommandLine()
from DIRAC.DataManagementSystem.Client.FTS3Client i... | andresailer/DIRAC | tests/Integration/DataManagementSystem/Test_Client_FTS3.py | Python | gpl-3.0 | 12,876 | [
"DIRAC"
] | f65a390415d54550e718220b7bcdb06ab2ebe5892ff28cf66b8b84aa0ba24e2f |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class KimApi(CMakePackage):
"""OpenKIM is an online framework for making molecular simulations
... | iulian787/spack | var/spack/repos/builtin/packages/kim-api/package.py | Python | lgpl-2.1 | 1,945 | [
"OpenKIM"
] | ecebf3c618996e5c7770a95b6912e3bac699c2dc9bb30e1f66733853eb6625c2 |
# coding: utf-8
"""
Acceptance tests for licensing of the Video module
"""
from __future__ import unicode_literals
from common.test.acceptance.fixtures.course import XBlockFixtureDesc
from common.test.acceptance.pages.lms.courseware import CoursewarePage
from common.test.acceptance.pages.studio.overview import CourseO... | ahmedaljazzar/edx-platform | common/test/acceptance/tests/video/test_video_license.py | Python | agpl-3.0 | 4,987 | [
"VisIt"
] | 8d308faafb848ae0da17d67626068e3e1a2262953befe1bff12c4f4d95f59d75 |
"""
Training costs for unsupervised learning of energy-based models
"""
from functools import wraps
import logging
import numpy as np
import sys
from theano import scan
import theano.tensor as T
from theano.compat.six.moves import zip as izip
from pylearn2.compat import OrderedDict
from pylearn2.costs.cost import Cos... | JazzeYoung/VeryDeepAutoEncoder | pylearn2/pylearn2/costs/ebm_estimation.py | Python | bsd-3-clause | 11,066 | [
"CDK"
] | 49cc0ecd024a8397f3263c4ec3ef301da92a6a9518779eaa965a0ae420299d97 |
"""
Test to train multivariate Gaussian. We would like to convert a multivariate Guassian to another
multivariate Gaussian
"""
import numpy as np
import torch
import torch.nn as nn
from torchlib.common import FloatTensor
from torchlib.dataset.utils import create_data_loader
from torchlib.trainer.regressor import Regre... | vermouth1992/tf-playground | test.py | Python | apache-2.0 | 2,147 | [
"Gaussian"
] | 08d2bc14df89a05decf409a09a4e41a53cd9328d04c4b6aec03daa5a7ada01b3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.