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 |
|---|---|---|---|---|---|---|---|
"""Function that for given neural network, returns lists of numbers of edges,
weights and neurons per layer.
"""
from athenet.models import lenet, alexnet
from athenet.layers import FullyConnectedLayer, ConvolutionalLayer, \
ActivationLayer, Dropout, Softmax, MaxPool, LRN
import numpy as np
def _conv_edges(x... | heurezjusz/Athenet | athenet/utils/count_n_elts.py | Python | bsd-2-clause | 4,211 | [
"NEURON"
] | 86252e50ebffa064d71ef78a28731061838324962d5a799e8a45c46bdd8354e9 |
#!/usr/bin/env python
# coding=utf-8
"""556. Squarefree Gaussian Integers
https://projecteuler.net/problem=556
A **Gaussian integer** is a number z = a \+ bi where a, b are integers and i2
= -1.
Gaussian integers are a subset of the complex numbers, and the integers are
the subset of Gaussian integers for which b ... | openqt/algorithms | projecteuler/pe556-squarefree-gaussian-integers.py | Python | gpl-3.0 | 2,153 | [
"Gaussian"
] | 9de52894d03a452c2eeaed97f56e68b2792117c97f81ae8c816fbfa217a105cf |
# $HeadURL$
""" The SitesDIRACGOCDBmapping module performs the necessary CS gymnastics to
resolve sites DIRAC-GOCDB names.
Assumes CS structure of: /Resources/Sites/<GRIDNAME>/<SITENAME>
"""
__RCSID__ = "$Id$"
from DIRAC import gConfig, S_OK, S_ERROR
from DIRAC.ConfigurationSystem.Client.Helpers.Path impor... | calancha/DIRAC | Core/Utilities/SitesDIRACGOCDBmapping.py | Python | gpl-3.0 | 2,683 | [
"DIRAC"
] | 37267c896bad20469bda991f6910bbadc0c755ae47839ffa031dc1b0487b47a1 |
#!/usr/bin/env python
import math
import vtk
def get_program_parameters():
import argparse
description = 'Display a capped sphere.'
epilogue = '''
'''
parser = argparse.ArgumentParser(description=description, epilog=epilogue,
formatter_class=argparse.RawDescri... | lorensen/VTKExamples | src/Python/Modelling/CappedSphere.py | Python | apache-2.0 | 4,832 | [
"VTK"
] | 02b652e5bdcf25e516aeae8abc1ac798145407ebb1ea18ca133677505574cfff |
# Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
"""Unit tests for the `iris.config.NetCDF` class."""
# Import iris.tests first so that some things can be initialised before
#... | pp-mo/iris | lib/iris/tests/unit/config/test_NetCDF.py | Python | lgpl-3.0 | 1,478 | [
"NetCDF"
] | 59b0290b101d17f79a0dfd97d8d3e907629d30c2284c4fee3c9a6d6a1c728e50 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# For bug reports, feature and support requests please visit
# <https://github.com/mkalewski/sim2net/issues>.
"""
sim2net -- simulation application file.
If in any doubt, refer to the technical documentations that is available on the
Internet: <https://sim2net.readthed... | mkalewski/sim2net | sim2net/cli/_application_template.py | Python | mit | 1,745 | [
"VisIt"
] | 6c694fc99a896468df77c44fbbe0003c7045d769f04497c8a7107869bef0c0c6 |
# coding=utf-8
from django.test import TestCase
from feedback.models import Person, Veranstaltung, Semester, Kommentar
from feedback.forms import KommentarModelForm
class KommentarModelFormTest(TestCase):
def setUp(self):
self.p = []
self.p.append(Person.objects.create(vorname='Eric', nachname='... | d120/pyfeedback | src/feedback/tests/test_forms.py | Python | agpl-3.0 | 1,166 | [
"Brian"
] | df6cea4967381b6d11c5d25ca981cecd40b24edd25a3c06b05e326940938136b |
import tensorflow as tf
import numpy as np
def normalize(v):
norm=np.linalg.norm(v)
if norm==0:
return v
return v/norm
def readToLines(file):
csvFile=open(file)
lines=csvFile.read().splitlines()
csvFile.close()
splitLines=[]
for line in lines:
splitLines+=[line.split(',... | theoryclub/tf_workshop | MNISTExample.py | Python | mit | 2,835 | [
"NEURON"
] | ef786d7a8d9ef98abe8f4a0c12d158f7fb2ee3995f7a03e773a0dddd349bf6f1 |
'''
Copyright (C) 2015 Jacob Bieker, jacob@bieker.us, www.jacobbieker.com
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.
Thi... | jacobbieker/Insights | insights/instagram/Instagram2SQLite.py | Python | gpl-2.0 | 2,463 | [
"VisIt"
] | 58e1cb76b6b74684d96b4e6062bf2b32004d3813d53e488bc76edc776849ce29 |
################################################################################
# Copyright (C) 2013-2014 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
"""
Unit tests for `dot` module.
"""
import unittest
import nu... | jluttine/bayespy | bayespy/inference/vmp/nodes/tests/test_dot.py | Python | mit | 31,570 | [
"Gaussian"
] | eb71725d1d1884d70c9e36b50391afe2044f4bec702478b3b40f0299a55199d5 |
# Orca
#
# Copyright 2010 Joanmarie Diggs, Mesar Hameed.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# ... | GNOME/orca | src/orca/desktop_keyboardmap.py | Python | lgpl-2.1 | 4,729 | [
"ORCA"
] | 58cbe19e0fc222c7d227e16023eb3f62853dfc01ec96f623a6cf57a92f421a22 |
from random import random
import pyxel
SCENE_TITLE = 0
SCENE_PLAY = 1
SCENE_GAMEOVER = 2
STAR_COUNT = 100
STAR_COLOR_HIGH = 12
STAR_COLOR_LOW = 5
PLAYER_WIDTH = 8
PLAYER_HEIGHT = 8
PLAYER_SPEED = 2
BULLET_WIDTH = 2
BULLET_HEIGHT = 8
BULLET_COLOR = 11
BULLET_SPEED = 4
ENEMY_WIDTH = 8
ENEMY_HEIGHT = 8
ENEMY_SPEED =... | ferriman/SSandSP | pyxel-test/venv/lib/python3.8/site-packages/pyxel/examples/09_shooter.py | Python | gpl-3.0 | 8,375 | [
"BLAST"
] | e8a274368ac8ad80df79d7b8cea389cf29e7a8bc07037b473e6d9b9c94495781 |
#! /usr/bin/env python3
#
# Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 David Maxwell and Constantine Khroulev
#
# This file is part of PISM.
#
# PISM is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Fre... | pism/pism | examples/inverse/pismi.py | Python | gpl-3.0 | 23,714 | [
"NetCDF"
] | 8ef5ca881c70bc61ec0547e9aee89d0d80c40a0e40d7a8919364f8360cd6be5c |
import os
import unittest
import datetime
import tempfile
import numpy as np
from nansat.utils import gdal
from netCDF4 import Dataset
from nansat.mappers.mapper_netcdf_cf import Mapper
from mock import patch, Mock, DEFAULT
class NetCDF_CF_Tests(unittest.TestCase):
def setUp(self):
fd, self.tmp_filenam... | nansencenter/nansat | nansat/tests/mappers/test_mapper_netcdf_cf.py | Python | gpl-3.0 | 16,960 | [
"NetCDF"
] | 3b8e7ad7878e8558fc151f12c41c61ffdf988542b69272cfd843d91ae5abeaa0 |
# Lint as: python3
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | tensorflow/lingvo | lingvo/jax/layers/transformers_test.py | Python | apache-2.0 | 39,114 | [
"MOE"
] | 550c1d8036667922073ef0951e62773eaa9cab358a7663b877c02b93d3c6fa80 |
# coding: utf-8
# The MIT License (MIT)
# Copyright (c) 2016 Sentry
# Copyright (c) 2016 Łukasz Langa
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without ... | alexm92/sentry | src/sentry/lint/sentry_check.py | Python | bsd-3-clause | 11,683 | [
"VisIt"
] | 2b6decb5ed1857dbe681bcad9748eb64362ddca162b455799e2da4560060db6d |
""" Module for I/O
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json
import os
from builtins import super
import numpy as np
from astropy.table import Table
from scipy.interpolate import CubicSpline
from . import __path__
DATA_PATH = os.path... | benbaror/ne2001 | src/ne2001/ne_io.py | Python | bsd-2-clause | 6,520 | [
"Galaxy"
] | e7d3ec9b1ffe058b0eb24759866fb6b2068410374337dae4d96b8e1b71a4afc9 |
"""Configuration dictionary for submitting jobs
mode = queue # this defines whether jobs are immediately run or queued
user.name = jkitchin
user.email = jkitchin@andrew.cmu.edu
queue.command = qsub
queue.options = -joe
queue.walltime = 168:00:00
queue.nodes = 1
queue.ppn = 1
queue.mem = 2GB
queue.jobname = None
ch... | jkitchin/jasp | jasp/jasprc.py | Python | gpl-2.0 | 1,973 | [
"VASP"
] | f3e63e90e764593fae4f9f7d3fb792771c93bd9a56a864bcf9e155db9e41d3b3 |
import pandas as pd
from sklearn.ensemble import RandomForestRegressor
from sklearn.ensemble import BaggingRegressor
from sklearn.ensemble import ExtraTreesRegressor
from sklearn.ensemble import AdaBoostRegressor
from sklearn.ensemble import GradientBoostingRegressor
from sklearn.ensemble import RandomTreesEmbedding
fr... | rupakc/Kaggle-Compendium | Mercedez-Benz Greener Manufacturing/merc-baseline.py | Python | mit | 3,323 | [
"Gaussian"
] | f36251c572857f3662f0937dbdf487b8fff5b3256ada6bab40682fa26502904e |
#! /usr/bin/python
# -*- coding: utf8 -*-
import tensorflow as tf
import time
from . import visualize
from . import utils
from . import files
from . import cost
from . import iterate
from . import ops
import numpy as np
from six.moves import xrange
import random, warnings
import copy
import inspect
# __all__ = [
# ... | zjuela/LapSRN-tensorflow | tensorlayer/layers.py | Python | apache-2.0 | 264,811 | [
"NEURON"
] | 83a7e1b1774b82b7331ba1ab87cd032185d1d4d883af95f7b819f9f32d52e945 |
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 23 12:11:37 2014
@author: andylane
This script is designed to loop through generated BLAST files and given a
particular off-target-match cutoff, plot out the specificity profiles by scaffold
"""
"""
First, load in the BLAST files one by one and make a table that summ... | eatingcrispr/VirtualEating | archive/Analysis of E. coli library/ResultsAgainstExpected.py | Python | apache-2.0 | 18,751 | [
"BLAST"
] | 8c73209efc1ab57b8dc67a5e5d8bda75ddf946221d835a9b324109d276d184c2 |
########################################################################
# $HeadURL$
########################################################################
""" TaskQueueDB class is a front-end to the task queues db
"""
__RCSID__ = "ebed3a8 (2012-07-06 20:33:11 +0200) Adri Casajs <adria@ecm.ub.es>"
import types
impo... | avedaee/DIRAC | WorkloadManagementSystem/DB/TaskQueueDB.py | Python | gpl-3.0 | 53,814 | [
"DIRAC"
] | 5cb81e223bef4571046f3532893af28cc050cc5621850a5c2571313f66d21afb |
from aces.materials.POSCAR import structure as Material
class structure(Material):
def getPOSCAR(self):
return self.getMinimized()
return """POSCAR file written by OVITO
1
14.987425 0.0 -4.3867412
0.0 4.418356 0.0
0.0 0.0 11.0396528
Bi I
8 8
Cartesian
12.2848625 1.0 2.5330513
2.9865892 1.0 8.1658306
12.0008... | vanceeasleaf/aces | aces/materials/Bi8I8.py | Python | gpl-2.0 | 2,024 | [
"OVITO"
] | d77f1732375047a2da6a0a24f8637cb6ee410cb0313ad6c725edaed52b2ba301 |
"""Module for preparing data from NCBI. Most low layer module for manipulating data."""
import os
import pickle
from collections import defaultdict
from Bio import Entrez
from Bio import SeqIO
# TODO: move to init
CACHE_DIR = "../../Diploma/cache"
if not os.path.isdir(CACHE_DIR):
CACHE_DIR = "cache/"
if not ... | mkopar/Virus-classification-theano | VirClass/load_ncbi.py | Python | mit | 14,243 | [
"Biopython"
] | fb3bfd6e8431f720004f8b2284dc82540602aba7fc1d96d303e9b0b87350d186 |
"""
Create a class that contains variables related to the crystal of a DFT
simulation.
"""
import numpy as np
from operator import mod
def makeR(r):
"""Create a matrix of coordinate vectors from a single coordinate vector.
Args:
r (list or numpy.array): a single coordinate vector.
Returns:
... | jerjorg/dft | pydft/crystal.py | Python | gpl-3.0 | 6,774 | [
"CRYSTAL",
"Gaussian"
] | 32ad0b0bd88dff97cd5d1409227d7f572646e3280092e90c562c17cb3ae1dacc |
from scrapy.spider import BaseSpider
from scrapy.selector import HtmlXPathSelector
import os
from myspider.items import CSDNItem
class CSDNSpider(BaseSpider):
name = "csdn"
allowed_domains = ["blog.csdn.net"]
start_urls = []
file = open("E:\GitFolder\VerticleSearchEngine\crawl\myspider\user.json")
w... | SchoolProjs/Gitsoo | gitsoo_academic/myspider/myspider/spiders/csdn_spider.py | Python | apache-2.0 | 2,461 | [
"VisIt"
] | 207505e8d8527248dba0511e996edcd388210787bf96cfb44f28646abd2ee178 |
from unittest import mock
import numpy as np
import pytest
import hyperspy.api as hs
from hyperspy.misc.utils import slugify
from hyperspy.decorators import lazifyTestClass
RTOL = 1E-6
class TestModelJacobians:
def setup_method(self, method):
s = hs.signals.Signal1D(np.zeros(1))
m = s.create_... | magnunor/hyperspy | hyperspy/tests/model/test_model.py | Python | gpl-3.0 | 43,748 | [
"Gaussian"
] | 256636670fd1dc3b3d27f636a53cce22d64b0477ee56e078fbabb09f7f0c4640 |
import argparse
import logging
import pysam
import re
def interval_union(a, b):
"""Returns a 2-tuple representing the union of two intervals.
Args:
a: 2-tuple containing integer coordinates representing a half-open interval.
b: 2-tuple containing integer coordinates representing the other ha... | macarthur-lab/exac_readviz_scripts | utils/postprocess_reassembled_bam.py | Python | mit | 8,315 | [
"pysam"
] | 9d94fc017ca78bc51d60029d3b8fa04782628672897dc49956fa6a818f78d4aa |
import numpy as np
import cv2
from cv2 import *
from matplotlib import pyplot as plt
import time
import rospy
import std_msgs
from sensor_msgs import point_cloud2
import sensor_msgs
import math
###################################################################################################
## Chicago Engineering Des... | wfriedl/IGVC_Scipio_Software | line_detection/src/snippets/GUI_test.py | Python | gpl-2.0 | 21,715 | [
"Gaussian"
] | 883e3ff9435d54fd1c212368be4a7ebdf25bdef81aea446fd91de3c44fbab8cd |
#!/usr/bin/env/ python3
"""
This is the main point of access for the time-parallel implementation
of the APinT method. I/O is handled through the cyclops_control module
and pickled dicts, respectively.
Functions
---------
- `main` -- Exposes the high-level implementation
Invocation
----------
See the cyclops_control... | AGPeddle/Cyclops | source/cyclops.py | Python | mit | 7,911 | [
"Gaussian"
] | b34cd63195526b540f4da3d19cacb534cb5fe01a26170b37d16d4cfb427c4f2e |
try: from paraview import vtk
except: import vtk
try: from paraview import numpy_support
except: from vtk.util import numpy_support
#partie pour s'adapter aux version 5. et 6. de VTK
try:
from paraview.vtk import vtkFiltersExtraction
from paraview.vtk import vtkFiltersVerdict
from paraview.vtk im... | aurmarsan/pyturbo | fonctions_basiques.py | Python | mit | 95,033 | [
"ParaView",
"VTK"
] | 3f9f296a7a68ed339b76b2826f29dd870cc6d965c819db27acaa8852672c23ae |
import re
from scrapy.spider import BaseSpider
from scrapy.selector import HtmlXPathSelector
from scrapy.http import Request
from scrapy.utils.response import get_base_url
from scrapy.utils.url import urljoin_rfc
from scrapy.utils.response import open_in_browser
from product_spiders.items import Product, ProductLoad... | 0--key/lib | portfolio/Python/scrapy/seattlecoffeegear/amazonespresso.py | Python | apache-2.0 | 5,770 | [
"ESPResSo"
] | 0043d400718f955c7dfb167dc68bbbfdf59a401a8293318f2d1700193dd03972 |
from .variables import (GlobalScoreVariable, LocalScoreVariable,
LocalStackVariable, GlobalNbtVariable)
from .optimizers import Optimizer, TopVisitor, FuncVisitor
from commands import Var
class Allocator(TopVisitor):
def __init__(self, namespace):
self.ns = namespace
def... | simon816/Command-Block-Assembly | cmd_ir/allocator.py | Python | mit | 2,195 | [
"VisIt"
] | 3c0b444ab55ada658642d9511014e24fc3ce02bac083630dde7d8e84d57b4617 |
#!/usr/bin/env python
################################################################################
# Copyright (C) 2014, 2015 GenAP, McGill University and Genome Quebec Innovation Centre
#
# This file is part of MUGQIC Pipelines.
#
# MUGQIC Pipelines is free software: you can redistribute it and/or modify
# it und... | ccmbioinfo/mugqic_pipelines | pipelines/dnaseq/dnaseq.py | Python | lgpl-3.0 | 67,158 | [
"BWA",
"Gaussian"
] | 746fe582e44140b18ab5042b5ea485d6a92a428a64f6ab04440e1ab2e7fe1303 |
# encoding: utf-8
#
# Copyright © 2015 ATS Advanced Telematic Systems GmbH
#
# This file is part of Docker Launcher.
#
# Docker Launcher 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... | txus/docker-launcher | launcher/ansible/variables.py | Python | gpl-3.0 | 1,440 | [
"Galaxy"
] | a780a17a0432979114661aeeb3755cc89090cd4394b94223bdb6137cc4d550af |
#ImportModules
import ShareYourSystem as SYS
from ShareYourSystem.Specials.Simulaters import Populater,Brianer
#Definition
MyBrianer=Brianer.BrianerClass(
).update(
{
'StimulatingStepTimeFloat':0.1
}
).produce(
['E','I'],
Populater.PopulaterClass,
{
'PopulatingEquationStr':
'''
dv/dt = (ge+gi... | Ledoux/ShareYourSystem | Pythonlogy/draft/Simulaters/Brianer/draft/01_ExampleCell copy.py | Python | mit | 1,756 | [
"Brian"
] | f46c37501146f405f2423a4ee50792791af60af00cd6741e77625f34db2e8000 |
# This file is part of xrayutilities.
#
# xrayutilities 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 program is distributed... | dkriegner/xrayutilities | lib/xrayutilities/materials/spacegrouplattice.py | Python | gpl-2.0 | 54,980 | [
"CRYSTAL"
] | 270e934258746006b37d92fd9a85229304da1e1ff0b74c6b9d132ba66f51c56f |
# Copyright 2020 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Partner contact access link",
"summary": "Allow to visit the full contact form from a company",
"version": "14.0.1.0.0",
"development_status": "Production/Stable",
"category": "Tools... | OCA/partner-contact | partner_contact_access_link/__manifest__.py | Python | agpl-3.0 | 618 | [
"VisIt"
] | 9fe15a78c9e1a4bc12377eabae64be2bba843c8d51c8417dbaefc3ebafb58954 |
# encoding = utf-8
class Node(object):
pass
class A(Node):
pass
class B(Node):
pass
class C(A, B):
pass
class Visitor(object):
def visit(self, node, *args, **kwargs):
meth = None
for cls in node.__class__.__mro__:
meth_name = 'visit_'+cls.__name__
meth = ... | JiangKlijna/design-pattern | VisitorPattern/Visitor.py | Python | apache-2.0 | 799 | [
"VisIt"
] | fc80b1a76dd03986676a13ffa91f5efacff473b64ff83c85d1edc0d2667f7ccf |
""" SSH (Virtual) Computing Element
For a given IP/host it will send jobs directly through ssh
**Configuration Parameters**
Configuration for the SSHComputingElement submission can be done via the configuration system.
BatchSystem:
Underlying batch system that is going to be used to orchestrate executable files.... | DIRACGrid/DIRAC | src/DIRAC/Resources/Computing/SSHComputingElement.py | Python | gpl-3.0 | 32,689 | [
"DIRAC"
] | cb96977ca468470dff6d391509e98b7ece4b03996ae0a3cddbf18c648239fdba |
import xml.etree.ElementTree as ET
from io import BytesIO
import numpy as np
from .http_util import DataQuery, HTTPEndPoint, parse_iso_date
from .ncss_dataset import NCSSDataset
def default_unit_handler(data, units=None): # pylint:disable=unused-argument
r'Default unit handler, which ignores units and just ret... | hyoklee/siphon | siphon/ncss.py | Python | mit | 11,843 | [
"NetCDF"
] | 9fad9b8a3fec34eb9e41178f3c3f8cbc63560b491fd038557510bca5aeb90e0a |
# ----------------------------------------------------------------------------
# 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.
# --------------------------------------------... | kdmurray91/scikit-bio | skbio/util/_testing.py | Python | bsd-3-clause | 13,803 | [
"scikit-bio"
] | 7e34a3e883591eaee2aa6a4e843ec1b9e2a533651ee04d2343c5855e44cf8859 |
# pylint: disable=arguments-differ
""" Models for the shopping cart and assorted purchase types """
from collections import namedtuple
from datetime import datetime
from datetime import timedelta
from decimal import Decimal
import json
import analytics
from io import BytesIO
from django.db.models import Q, F
import py... | zhenzhai/edx-platform | lms/djangoapps/shoppingcart/models.py | Python | agpl-3.0 | 90,694 | [
"VisIt"
] | 2bac78cbc02a6aee8b585df71e9d590eb934ccb2c320a978299cc65f7ff3a90e |
"""
Classes that define a component of a scaling model.
Each class holds the parameters and relevant data, as a list of
arrays, from which to calculate inverse scale factors and
derivatives.
The components are initialised without any data, which is added
by setting the data dict. In order to update the internal data
l... | dials/dials | algorithms/scaling/model/components/scale_components.py | Python | bsd-3-clause | 23,435 | [
"CRYSTAL"
] | 0e6c71006df2d19f38d20f3ef6436a758857f91d7862bb1609210c3f4c292373 |
#!/usr/bin/env python
########################################################################
# File : dirac-wms-job-attributes
# Author : Stuart Paterson
########################################################################
"""
Retrieve attributes associated with the given DIRAC job
"""
from __future__ impor... | fstagni/DIRAC | Interfaces/scripts/dirac-wms-job-attributes.py | Python | gpl-3.0 | 1,211 | [
"DIRAC"
] | 075142046c2ff52e7653ac022fe377ce4839f3bb7367f7abd4cf2b4b106a44c8 |
from __future__ import print_function
import json
import os
import os.path
import re
import sys
import warnings
from collections import defaultdict
from distutils.command.build_scripts import build_scripts as BuildScripts
from distutils.command.sdist import sdist as SDist
try:
from setuptools import setup, find... | pgmillon/ansible | setup.py | Python | gpl-3.0 | 11,653 | [
"Galaxy"
] | 8affad23426a58a170a350dac53dbc48e60bb2add43e9175d5548fa849bfb71e |
# This file is part of the exercise code repository accompanying
# the book: Neuronal Dynamics (see http://neuronaldynamics.epfl.ch)
# located at http://github.com/EPFL-LCN/neuronaldynamics-exercises.
# This free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License 2.... | EPFL-LCN/neuronaldynamics-exercises | neurodynex3/tools/input_factory.py | Python | gpl-2.0 | 9,305 | [
"Brian"
] | 41c1b7aa8a389c39a64e1a84160b7145cf4d17eac925c90876ffdd0ae293f409 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2007 Donald N. Allingham
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2011 Tim G L Lyons
# Copyright (C) 2011 Doug Blank <doug.blank@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
... | Forage/Gramps | gramps/gen/filters/rules/person/__init__.py | Python | gpl-2.0 | 6,878 | [
"Brian"
] | 1738e92a9f58cd08ece692c910dd750bd960aadbb9dc23691c3ad9a8f419ef8d |
'''
Created on Aug 5, 2014
@author: gearsad
'''
import vtk
from math import *
from SceneObject import SceneObject
class Terrain(SceneObject):
'''
A simple template for a terrain.
Derived from http://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Modelling/Python/expCos.py
'''
terrainPoints = None... | GearsAD/semisorted_arnerve | sandbox/bot_vis_platform_post3b/scene/Terrain.py | Python | mit | 3,294 | [
"VTK"
] | 575305ef04ea835447f999b29eb3c33a5169a8ed1ea1e44210b99af4842d4a22 |
"""SALAMI Dataset Loader
.. admonition:: Dataset Info
:class: dropdown
The SALAMI dataset contains Structural Annotations of a Large Amount of Music
Information: the public portion contains over 2200 annotations of over 1300
unique tracks.
NB: mirdata relies on the **corrected** version of the 2.... | mir-dataset-loaders/mirdata | mirdata/datasets/salami.py | Python | bsd-3-clause | 10,958 | [
"VisIt"
] | 77bc60345cfee1a7edf78639d548a61f6232c1bdfb61a9022d732219fc0795ba |
""" codecs -- Python Codec Registry, API and helpers.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""#"
import __builtin__, sys
### Registry and builtin stateless codec functions
try:
from _codecs import *
except ImportError, why:
raise SystemErr... | HiSPARC/station-software | user/python/Lib/codecs.py | Python | gpl-3.0 | 36,143 | [
"FEFF"
] | d1117756af053b3a1080525a53b6031f61b4161eaa24d85d032f3b5dda49bfbf |
#! /usr/bin/env python
import sys
import argparse
import screed
import math
def ignore_at(iter):
for item in iter:
if item.startswith('@'):
continue
yield item
def main():
parser = argparse.ArgumentParser()
parser.add_argument('genome')
parser.add_argument('samfile')
pa... | ctb/2014-streaming | pipeline/sam-scan.py | Python | bsd-3-clause | 2,104 | [
"Bowtie"
] | 7b1a956f0e467b9b361d0d412f880a88f466f928fcc396be9a3ab262f96d7daf |
# coding: utf-8
# # VAMPPrior Implementation in Tensorflow
#
# ## Overview
#
# Commonly, machine learning algorithms can be built from 4 different modules: data, a model, a learning algorithm, and an optimization procedure. Most of the times, these 4 modules can be freely combined with other ones.
#
# We structur... | stefanthaler/tf-spikes | vampprior/train_vampprior.py | Python | apache-2.0 | 29,403 | [
"Gaussian"
] | 3036bd1b81d7036ad15e9d5916b4e8e4cdc5b850e43b69320af096ddbdd98e12 |
import pickle
import pymongo
import unittest
import warnings
from datetime import datetime
import pymongo
import pickle
import weakref
from fixtures import Base, Mixin, PickleEmbedded, PickleTest
from mongoengine import *
from mongoengine.base import _document_registry, NotRegistered, InvalidDocumentError
from mong... | KarimAllah/mongoengine | tests/document.py | Python | mit | 79,347 | [
"exciting"
] | 75c36b5807e1487e28cc78ea7865cd8591a2576445fbcf076085639803b5b9e1 |
#!/usr/bin/python
import getopt
import sys
from Bio import SeqIO
import time
import os
import shutil
import pandas
__author__ = "Andriy Sheremet"
#Helper functions definitions
def parse_contigs_ind(f_name):
"""
Returns sequences index from the input files(s)
remember to close index object after use
... | nyirock/mg_blast_wrapper | mg_blast_wrapper_v1.8.py | Python | mit | 16,671 | [
"BLAST"
] | 10d056a46582af7e2add3ef28ba90d5b3019917055f42d69aff348989cd113fa |
# -*- coding: utf-8 -*-
"""
Fitting a 2D Gaussian.
@author: Sebastian M. Gaebel
@email: sebastian.gaebel@ligo.org
"""
import matplotlib.pyplot as plt
import numpy as np
import gaps
# Print the available platform and devices
gaps.print_devices()
# Define a random 2D gaussian
x_mean, y_mean = np.ran... | sgaebel/GAPS | examples/fitting_2d_gaussian.py | Python | mit | 2,427 | [
"Gaussian"
] | b1edd5b3cd89f675ccd9ae55233530472a9636e172e54e1c417e748c07b79fef |
"""
Enterprise Recovery Email feature tests
"""
import uuid
from regression.pages.enterprise.confirm_recovery_email import ConfirmRecoveryEmail
from regression.pages.enterprise.enterprise_const import (
ENT_PORTAL_PASSWORD,
ENT_PORTAL_USERNAME
)
from regression.pages.whitelabel.reset_password_page import Rese... | edx/edx-e2e-tests | regression/tests/enterprise/test_ent_recovery_email.py | Python | agpl-3.0 | 3,611 | [
"VisIt"
] | 836cfd75accd8b9acbc80a0b973b3041b52da153c8620c85ea3ebafcfa0ba454 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# This software is licensed as described in the README.rst and LICENSE files,
# which you should have received as part of this distribution.
import argparse
from raspi_sensor.main import setup_default_mqtt_args
from raspi_mc.magnetic_contact import MC
def setup_args():
... | ricco386/broadcaster | RPi.MC/raspi_mc/main.py | Python | bsd-3-clause | 1,283 | [
"VisIt"
] | 160ed05a0a12a1d3ffeb0fe544ce834edde99facac610d12756833dc064f4270 |
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | felipeZ/nonAdiabaticCoupling | docs/conf.py | Python | mit | 6,106 | [
"NAMD"
] | d488628637e38c5bb28166b463f377b767164cead4ca5f37ccf71feb38e7eb27 |
# (C) British Crown Copyright 2010 - 2018, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | duncanwp/iris | lib/iris/util.py | Python | lgpl-3.0 | 52,689 | [
"NetCDF"
] | e294469678cfaebcac41ec73fc1a9e4834af2a6fdab551d947242423cf4d785d |
""" AlwaysActivePolicy module
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = '$Id$'
from DIRAC import S_OK
from DIRAC.ResourceStatusSystem.PolicySystem.PolicyBase import PolicyBase
class AlwaysActivePolicy(PolicyBase):
"""
The Alway... | yujikato/DIRAC | src/DIRAC/ResourceStatusSystem/Policy/AlwaysActivePolicy.py | Python | gpl-3.0 | 714 | [
"DIRAC"
] | 36406718e8fa4c24fca8b45a87364438862d6078cc15617884d1a45d7de8c810 |
import datetime
import urllib
import os
from django.utils import timezone
from django.utils.timezone import utc
from django.contrib.auth.models import User
from funfactory.urlresolvers import reverse
from nose.tools import eq_, ok_
from airmozilla.search.models import LoggedSearch
from airmozilla.main.models import ... | bugzPDX/airmozilla | airmozilla/search/tests/test_views.py | Python | bsd-3-clause | 24,403 | [
"Brian"
] | 282ab5db87054340ea21055a1cf6715faeea727eb0290294840f298283aabac2 |
# -*- coding: utf-8 -*-
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" je opcioni izraz kao sto je "polje1=\'nova vrijednost\'". Ne mozete azurirati ili izbristi rezultati JOIN-a',
'# of Houses Damaged': 'Broj oštećenih kuća',
'# of Houses... | bobrock/eden | languages/bs.py | Python | mit | 537,974 | [
"VisIt"
] | 581b7c0bc679c9e927ca394b345d61450b48b1c2b4cd7572adf4efdbf36ec829 |
# -*- coding: utf-8 -*-
#
# This file is part of CancellationTools
#
# CancellationTools is open-source software for running cancellation tasks,
# and directly analysing the data they produce.
#
# Copyright (C) 2014, Edwin S. Dalmaijer
#
# This program is free software: you can redistribute it and/or modify
# it under ... | esdalmaijer/CancellationTools | libcancellation/libanalysis.py | Python | gpl-3.0 | 50,955 | [
"Gaussian"
] | 595d3111c50633c8e8056fa38e3271bef61cc9155ff586bdaba32ae45e6313a4 |
# -*- mode: python; coding: utf-8 -*-
"""
FireLogger_ server-side support library for Python.
For usage see ``README.txt`` or visit the `github homepage`_.
.. _FireLogger: https://addons.mozilla.org/en-US/firefox/addon/11090
.. _github homepage: http://github.com/darwin/firepython
"""
__api_version__ = '0.8'
# ^--- c... | arcticio/ice-bloc-hdr | utils/external/firepython/__init__.py | Python | mit | 414 | [
"VisIt"
] | a60e53ea000481a3b43379a1eabfa762b2061167e01ac1622d044f54cfbeab7a |
# -*- coding: utf-8 -*-
#
# pulsepacket.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... | niltonlk/nest-simulator | pynest/examples/pulsepacket.py | Python | gpl-2.0 | 11,242 | [
"Gaussian",
"NEURON"
] | 146da2b9fbbdb44fe1e55c039368275e178d89f688102cc437d864ecc6c37042 |
""" This module loads all the classes from the VTK Infovis library into
its namespace. This is an optional module."""
from vtkInfovisPython import *
| spthaolt/VTK | Wrapping/Python/vtk/infovis.py | Python | bsd-3-clause | 151 | [
"VTK"
] | edf0660d2b88780b5fa017507f623dc514d54a7d0142e17ba6ea6cdfe8f209f6 |
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
# Documentation is intended to be processed by Epydoc.
"""
Introduction
============
The Munkres module provides an implementation of the Munkres algorithm
(also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
useful for solving the Assignment Problem... | emsrc/daeso-framework | lib/daeso/thirdparty/munkres.py | Python | gpl-3.0 | 25,007 | [
"Brian"
] | 970e0c518005d9fccae97e9d8e519127a7654862346147e9957ae489d3d22d78 |
import re
import requests
from datetime import date
from .constants import DEFAULT_PAGE_SIZE, MYOB_BASE_URL
from .endpoints import CRUD, METHOD_MAPPING, METHOD_ORDER
from .exceptions import (
MyobBadRequest,
MyobExceptionUnknown,
MyobForbidden,
MyobGatewayTimeout,
MyobNotFound,
MyobRateLimitExc... | ABASystems/pymyob | myob/managers.py | Python | bsd-3-clause | 8,057 | [
"TINKER"
] | 0d87b228f07a0e1886527ac3fc5c4bba90c2221f24f74ec1dd81cfd71f026733 |
""" The common code for a gradient editor for `tvtk.LookupTables` and
`tvtk.VolumeProperty` color transfer functions. Most of the code is
independent of tvtk however.
The toolkit specific code is in toolkit specific files. This code is
distributed under the conditions of the BSD license.
This code was originally wr... | dmsurti/mayavi | tvtk/util/gradient_editor.py | Python | bsd-3-clause | 52,509 | [
"VTK"
] | d3fa09b7ac813c672d4cd0e0a7c589038c052a733ca10dc02ec7ddad033095b5 |
#!/usr/bin/env python
# Visitor pattern example 2
# -----------------------
# Visitables
# -----------------------
class StockItem(object):
pass
class Necessity(StockItem):
pass
class Milk(Necessity):
name = 'milk'
price = 0.99
class Bread(Necessity):
name = 'bread'
price = 0.6
class ... | blazk/patterns | visitor/taxes2.py | Python | gpl-2.0 | 2,474 | [
"VisIt"
] | e00235c934ac0609517ab7bb9cb2f83c635c11c4943a12a4f3fd8814199196f6 |
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2014 Stanford University and the Authors
#
# Authors: Robert T. McGibbon
# Contributors:
#
# MDTraj is free software... | kyleabeauchamp/mdtraj | mdtraj/tests/test_gro.py | Python | lgpl-2.1 | 2,047 | [
"MDTraj"
] | 16137771959a397c2707bb551505237fd62949e2483e12585e489ed2bce6d52f |
# Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of t... | BackupTheBerlios/espressopp | src/interaction/HarmonicUnique.py | Python | gpl-3.0 | 3,263 | [
"ESPResSo"
] | 270b5659cae1c2db899c5b81ef816cf646c959fa12dffb2ca0d8d2db12055a48 |
# -*- coding: utf-8 -*-
# Copyright 2007-2011 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... | sillvan/hyperspy | hyperspy/_components/pes_see.py | Python | gpl-3.0 | 5,288 | [
"Gaussian"
] | 464a5c37a223ae482763f87455b44a30a5321ce3e31c9cf459d30e316f14b5cf |
import pandas as pd
import mdtraj as md
from dipeptide_parameters import *
reference = pd.read_csv("./experimental_data/baldwin_table1_populations.csv", index_col=0)
data = []
for (ff, water, seq) in products:
try:
aa = seq.split("_")[1]
t = md.load("./dcd/%s_%s_%s.dcd" % (ff, water, seq), top="./... | hainm/open-forcefield-group | nmr/ace_X_NME/code/analyze_populations.py | Python | gpl-2.0 | 813 | [
"MDTraj"
] | ab5dca873c94d60b5c53f9098ca8d7cf875f97febe58c5514896aab1a9fe30d8 |
import logging
import time
import traceback
import warnings
from collections.abc import Mapping
import numpy as np
from ..conventions import cf_encoder
from ..core import indexing
from ..core.pycompat import dask_array_type
from ..core.utils import FrozenDict, NdimSizeLenMixin
# Create a logger object, but don't add... | jhamman/xarray | xarray/backends/common.py | Python | apache-2.0 | 11,865 | [
"NetCDF"
] | 786f25f24117be72eac48ba2c252c26bb7a5c6828d5c1dcfed55e2b315c53b84 |
from __future__ import absolute_import
import unittest
import math
import json
import os
import numpy as np
from pymatgen.analysis.elasticity.tensors import *
from pymatgen.core.operations import SymmOp
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
from pymatgen.util.testing import PymatgenTest
from pymat... | tallakahath/pymatgen | pymatgen/analysis/elasticity/tests/test_tensors.py | Python | mit | 21,511 | [
"pymatgen"
] | 84a14901636b0ddd705809956203a004aad9aa29adc17ffd9ebbd128232bac12 |
# coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | google-research/google-research | es_maml/config.py | Python | apache-2.0 | 10,748 | [
"Gaussian"
] | 4dfe96e3a32c6f6168294b8bf665890b56ba63fb4796ebafc89df1e75373253f |
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2012-2017 GEM Foundation
#
# OpenQuake 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 Licen... | gem/oq-hazardlib | openquake/hazardlib/gsim/chiou_youngs_2014.py | Python | agpl-3.0 | 21,363 | [
"Brian"
] | 98b09926bf57e9d5a0b46f8162948197590f4b4cf2e158efb14359e954e5b931 |
#!/usr/bin/env python
from scipy import interpolate
from glob import glob
import os
import cosmology
import numpy
import matplotlib.pyplot as plt
import matplotlib
from scipy.stats import linregress
Polygon = matplotlib.patches.Polygon
def mag_z(axes):
LBCG = 4.0
z = numpy.arange(0.01, 1.5, 0.01)
mstar =... | boada/planckClusters | sims/plot_mag_z_relation.py | Python | mit | 7,866 | [
"Galaxy"
] | 8c19d27b2e66e0f762769b451492d68555b25624b77d0b073196aa08093f5148 |
# Copyright 2002 Gary Strangman. All rights reserved
# Copyright 2002-2016 The SciPy Developers
#
# The original code from Gary Strangman was heavily adapted for
# use in SciPy by Travis Oliphant. The original code came with the
# following disclaimer:
#
# This software is provided "as-is". There are no expressed or... | jor-/scipy | scipy/stats/stats.py | Python | bsd-3-clause | 233,671 | [
"DIRAC"
] | 1fb09185f55bd33a20b8f670a682e9d8fe0615d94efcecc27ca2328c90ffe671 |
# -*- coding: utf-8 -*-
import sqlite3
class GalaxyDB:
PLANET_TYPE_PLANET = 1
PLANET_TYPE_BASE = 5
def __init__(self):
self._conn = sqlite3.connect('galaxy5.db')
self._conn.row_factory = sqlite3.Row
self._cur = self._conn.cursor()
self._log_queries = False
def close(... | minlexx/xnova_galaxy_parser | xnova/galaxy_db.py | Python | gpl-3.0 | 8,937 | [
"Galaxy"
] | c1235bb785485856e76683707ef1c3791132ac0939022ac3e3828399a0a83f6f |
#!/usr/bin/env python
#-*- coding:utf-8 -*-
# vim:ai:sta:et:ts=4:sw=4:sts=4
"""kernelng 0.x
Tool for maintaining customized overlays of kernel-ng.eclass-based ebuilds
Copyright 2005-2014 Gentoo Foundation
Copyright (C) 2005 Colin Kingsley <tercel@gentoo.org>
Copyright (C) 2008 Zac Medico <zmedico@gentoo.org>
Cop... | gmt/kernel-ng-util | kernelng/selectors.py | Python | gpl-2.0 | 2,879 | [
"Brian"
] | 8ea0abb2f716894e9e7070c072146b77fccf68668ddd53b67c50f02ca4253bf4 |
#!/usr/bin/env python
'''
PortScanner.py (c) 2017 Luca Conterio
This file is part of PortScanner.py.
PortScanner.py 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 L... | luca-conterio/PortScanner.py | PortScanner.py | Python | gpl-3.0 | 9,316 | [
"VisIt"
] | 31b03eb84326331ed533c6cc92b8727d217492d8649341a9ce7fc8c21784fac5 |
# -*- coding: utf-8 -*-
#
# DiracDocs documentation build configuration file, created by
# sphinx-quickstart on Sun Apr 25 17:34:37 2010.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... | arrabito/DIRAC | docs/source/conf.py | Python | gpl-3.0 | 9,724 | [
"DIRAC"
] | 3a40b9febcc962ab89043dcead1e2fc86a63d87d6c16084d587cc58994d1f1cd |
import hashlib
import json
import yaml
from urllib import urlencode
from twisted.internet.defer import (
inlineCallbacks, DeferredQueue, returnValue, gatherResults)
from twisted.internet import task, reactor
from twisted.web import http
from twisted.web.server import NOT_DONE_YET
from twisted.trial.unittest import... | TouK/vumi | vumi/transports/wechat/tests/test_wechat.py | Python | bsd-3-clause | 27,369 | [
"VisIt"
] | e206b108ea8e5d20957bfd6231a39e79751c80c643321eb9b2900e487d9a6b5d |
from ovito import *
o1 = ObjectNode()
print(str(o1))
print(repr(o1))
assert(o1 == o1)
o2 = ObjectNode()
assert(o1 != o2)
assert(ovito.dataset.anim == ovito.dataset.anim) | srinath-chakravarthy/ovito | tests/scripts/test_suite/ovito_object.py | Python | gpl-3.0 | 170 | [
"OVITO"
] | f08245aa7fa03337199b0470cd3bdd64dba47a948fc3b7a12e8371d13a8a97ef |
from django.test import TestCase
from regressiontests.select_related_regress.models import *
class SelectRelatedRegressTests(TestCase):
def test_regression_7110(self):
"""
Regression test for bug #7110.
When using select_related(), we must query the
Device and Building tables usin... | mzdaniel/oh-mainline | vendor/packages/Django/tests/regressiontests/select_related_regress/tests.py | Python | agpl-3.0 | 6,336 | [
"Brian"
] | f1db7a40626f6c9a352cec20ce8b2a9d3d8f8724c2b145d1d5bede72465fef43 |
""" Test_RSS_Policy_Configurations
"""
import unittest
import DIRAC.ResourceStatusSystem.Policy.Configurations as moduleTested
__RCSID__ = '$Id: $'
################################################################################
class Configurations_TestCase( unittest.TestCase ):
def setUp( self ):
"""
... | vmendez/DIRAC | ResourceStatusSystem/Policy/test/Test_RSS_Policy_Configurations.py | Python | gpl-3.0 | 1,548 | [
"DIRAC"
] | 926dc0ef254596a09d53a3feea36287ad67953b155993b77681b381df6e0501a |
from system.core.controller import*
import random
import datetime
from time import strftime
class Ninja(Controller):
def __init__(self, action):
super(Ninja, self).__init__(action)
def index(self):
try:
session['gold']
except:
session['gold'] = 0
try:
... | authman/Python201609 | pairol_alex/Assignments/pylotNinja/controllers/Ninja.py | Python | mit | 1,500 | [
"CASINO"
] | 813b37436291951e87464f995f304b11ea782ed70c463e7788468ee8717bbfdd |
import numpy
import random
import time
from scipy.special import gammaln
# TODO: remove everything about multinomials in here. Pass in a distribution
# object with functions for sampling etc...
class multinomial():
"""
Class for keeping track of the parameters of a single multinomial.
"""
def __init_... | arider/riderml | riderml/mixture_model/dpmm.py | Python | mit | 13,519 | [
"Gaussian"
] | e532d51dcdd8ab2c68dd663c99831df8f5161e8648e699017e914207e2aa1bcb |
# Compiled by Charles Harris
# Taken from his email message to scipy-dev
# dated October 3, 2002
# updated to 2002 values by BasSw, 2006
""" Fundamental Physical Constants
These constants are taken from CODATA Recommended Values of the
Fundamental Physical Constants: 2002. They may be found at
physics.nis... | adelq/thermopy | thermochem/codata.py | Python | bsd-3-clause | 34,412 | [
"Avogadro"
] | bbcb8e0c6529d37c4c69db8b29399d16697e89681c5b30978508ab7e0314420c |
import logging
import urllib
from functools import partial
from django.conf import settings
from django.core.context_processors import csrf
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from django.contrib.auth.decorators i... | heran7/edx-platform | lms/djangoapps/courseware/views.py | Python | agpl-3.0 | 33,202 | [
"VisIt"
] | 9ce1e0763a215348fe62d2f90cdddd04f0d861dd80ce2ca4095426abcb57b551 |
# Copyright 2014, Brian Coca <bcoca@ansible.com>
# Copyright 2017, Ken Celenza <ken@networktocode.com>
# Copyright 2017, Jason Edelman <jason@networktocode.com>
# Copyright 2017, Ansible Project
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of ... | direvus/ansible | lib/ansible/plugins/filter/mathstuff.py | Python | gpl-3.0 | 7,996 | [
"Brian"
] | e72e367e4175fdc8fd97d917ce38323622102eb9999981a10d2a36ed364b858f |
# Copyright 2006 James Tauber and contributors
#
# 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 agre... | anandology/pyjamas | pyjs/src/pyjs/translator_proto.py | Python | apache-2.0 | 192,944 | [
"VisIt"
] | 313b0d269fb9c91f4b01a00f84a3c255bb96f9727abbe1f54f87866b560fe3aa |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
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
urlpatterns = [
url(r'^$', TemplateView.as_view(templ... | jvosk/repork | config/urls.py | Python | bsd-3-clause | 1,236 | [
"VisIt"
] | 58acb4214d2a9f76a880e83de8520334e3d429c5c419b7f99aa079e9e5d50502 |
# Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
import os
import re # noqa
import sys
from datetime import timedelta
# global settings
from django.conf import global_settings
# ugettext lazy
from django.utils.translation import ugettext_lazy as _
# Update this module's local settings from the global setti... | GoogleCloudPlatform/sap-deployment-automation | third_party/github.com/ansible/awx/awx/settings/defaults.py | Python | apache-2.0 | 42,385 | [
"Galaxy"
] | 4f75f1088e283a77b3f016bd5cf60431e8b686790ad9653b1f653c74fac31ad8 |
import logging
import os
import time
import matplotlib.pyplot as plt
import seaborn as sns
import mbuild as mb
import metamds as mds
import mdtraj as md
from simgen.project import Project
OFFLINE = True
def build_ethane_box(box, n_molecules, **kwargs):
from mbuild.examples import Ethane
ethane = Ethane()
... | iModels/demos | demos/ethane_box/ethane_box_simgen.py | Python | mit | 2,906 | [
"MDTraj"
] | 25c89c20f0909c9c27c418c4d65e660df7e9fa9dc3257ab24f2755f078f0a0a7 |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Rackspace
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2013 IBM Corp.
# 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. Y... | plumgrid/plumgrid-nova | nova/tests/network/test_manager.py | Python | apache-2.0 | 115,487 | [
"FEFF"
] | f488df65309d335af36d20a44cac457543a477d641230e16fe5a0284f6411935 |
"""
Student Views
"""
import datetime
import logging
import uuid
import json
import warnings
from collections import defaultdict
from pytz import UTC
from requests import HTTPError
from ipware.ip import get_ip
from django.conf import settings
from django.contrib.auth import logout, authenticate, login
from django.cont... | jamesblunt/edx-platform | common/djangoapps/student/views.py | Python | agpl-3.0 | 91,324 | [
"VisIt"
] | bf256e297c3204fb369120563101bc0ffecc32583c5ddddcd0125a95a2123d21 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.