repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
diego-d5000/MisValesMd | env/lib/python2.7/site-packages/django/db/backends/sqlite3/schema.py | 1 | 11456 | import _sqlite3 # isort:skip
import codecs
import copy
from decimal import Decimal
from django.apps.registry import Apps
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
from django.utils import six
class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
sql_delete_table = "DROP TA... | mit | 8,917,223,311,476,454,000 | 43.102362 | 114 | 0.56669 | false |
AustereCuriosity/astropy | astropy/samp/tests/test_hub_proxy.py | 1 | 1178 | from ..hub_proxy import SAMPHubProxy
from ..hub import SAMPHubServer
from .. import conf
def setup_module(module):
conf.use_internet = False
class TestHubProxy(object):
def setup_method(self, method):
self.hub = SAMPHubServer(web_profile=False, mode='multiple', pool_size=1)
self.hub.start... | bsd-3-clause | 5,713,479,540,355,891,000 | 21.653846 | 81 | 0.654499 | false |
fxia22/pointGAN | show_gan_rnn.py | 1 | 2043 | from __future__ import print_function
from show3d_balls import *
import argparse
import os
import random
import numpy as np
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.optim as optim
import torch.utils.data
import torchvision.datasets as dset
import torc... | mit | -721,880,346,011,303,300 | 23.035294 | 92 | 0.675967 | false |
alex-eri/aiohttp-1 | aiohttp/client_proto.py | 1 | 6070 | import asyncio
import asyncio.streams
from .client_exceptions import (ClientOSError, ClientPayloadError,
ClientResponseError, ServerDisconnectedError)
from .http import HttpResponseParser, StreamWriter
from .streams import EMPTY_PAYLOAD, DataQueue
class ResponseHandler(DataQueue, asyn... | apache-2.0 | 8,525,949,508,562,163,000 | 30.780105 | 77 | 0.531796 | false |
martinhbramwell/evalOfFlask | frmwk/forms/attic/demo_forms.py | 1 | 1202 | from flask.ext.wtf import Form, TextField, BooleanField, TextAreaField
from flask.ext.wtf import Required, Length
from flask.ext.babel import gettext
from frmwk.model.mdUser import User
class EditForm(Form):
nickname = TextField('nickname', validators = [Required()])
about_me = TextAreaField('about_me', valid... | bsd-3-clause | 4,632,528,655,272,532,000 | 41.928571 | 145 | 0.65807 | false |
Zerknechterer/pyload | module/plugins/crypter/MultiloadCz.py | 1 | 1754 | # -*- coding: utf-8 -*-
import re
from module.plugins.internal.Crypter import Crypter
class MultiloadCz(Crypter):
__name__ = "MultiloadCz"
__type__ = "crypter"
__version__ = "0.41"
__pattern__ = r'http://(?:[^/]*\.)?multiload\.cz/(stahnout|slozka)/.+'
__config__ = [("use_subfolder" , ... | gpl-3.0 | -8,429,412,199,865,437,000 | 40.761905 | 117 | 0.530217 | false |
CartoDB/crankshaft | release/python/0.8.2/crankshaft/crankshaft/segmentation/segmentation.py | 1 | 8893 | """
Segmentation creation and prediction
"""
import numpy as np
from sklearn.ensemble import GradientBoostingRegressor
from sklearn import metrics
from sklearn.cross_validation import train_test_split
from crankshaft.analysis_data_provider import AnalysisDataProvider
# NOTE: added optional param here
class Segmenta... | bsd-3-clause | 7,995,125,924,327,904,000 | 38.004386 | 122 | 0.574834 | false |
openconfig/oc-pyang | openconfig_pyang/plugins/util/yangpath.py | 1 | 1676 | """Copyright 2016 The OpenConfig Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, s... | apache-2.0 | 9,101,595,041,839,160,000 | 24.014925 | 72 | 0.704057 | false |
rossant/galry | examples/mandelbrot.py | 1 | 1978 | """GPU-based interactive Mandelbrot fractal example."""
from galry import *
import numpy as np
import numpy.random as rdn
FSH = """
// take a position and a number of iterations, and
// returns the first iteration where the system escapes a box of size N.
int mandelbrot_escape(vec2 pos, int iterations)
{
vec2 z = vec2... | bsd-3-clause | 5,936,480,683,851,878,000 | 24.701299 | 78 | 0.627401 | false |
textioHQ/pattern | examples/05-vector/06-svm.py | 1 | 4083 | from __future__ import print_function
import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", ".."))
import random
from pattern.db import Datasheet
from pattern_text.nl import tag, predicative
from pattern.vector import SVM, KNN, NB, count, shuffled
# This example demonstrates a Support ... | bsd-3-clause | -5,175,451,043,334,958,000 | 38.640777 | 87 | 0.70267 | false |
gmcastil/numpy | numpy/core/tests/test_arrayprint.py | 1 | 7408 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import division, absolute_import, print_function
import sys
import numpy as np
from numpy.compat import sixu
from numpy.testing import (
TestCase, run_module_suite, assert_, assert_equal
)
class TestArrayRepr(object):
def test_nan_inf(self):
... | bsd-3-clause | -4,426,322,103,313,854,500 | 39.922652 | 84 | 0.44647 | false |
Reigel/kansha | kansha/authentication/ldap/ldap_auth.py | 1 | 4186 | # -*- coding:utf-8 -*-
# --
# Copyright (c) 2012-2014 Net-ng.
# All rights reserved.
#
# This software is licensed under the BSD License, as described in
# the file LICENSE.txt, which you should have received as part of
# this distribution.
# --
from nagare import log
try:
import ldap
except ImportError:
ldap ... | bsd-3-clause | 3,308,616,112,407,735,300 | 29.779412 | 106 | 0.567845 | false |
CrowdStrike/kafka-python | setup.py | 1 | 1752 | import sys
from setuptools import setup, Command
with open('VERSION', 'r') as v:
__version__ = v.read().rstrip()
class Tox(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
@classmethod
def run(cls):
import tox
... | apache-2.0 | 5,926,308,993,090,215,000 | 24.764706 | 78 | 0.627283 | false |
davy39/eric | eric6_trpreviewer.py | 1 | 2399 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2004 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Eric6 TR Previewer.
This is the main Python script that performs the necessary initialization
of the tr previewer and starts the Qt event loop. This is a standalone version
of the integrated t... | gpl-3.0 | -8,780,271,109,807,929,000 | 25.076087 | 78 | 0.581909 | false |
chrishah/MITObim | misc_scripts/circules.py | 2 | 14307 | #!/usr/bin/python
import sys,warnings
import argparse
VERSION="0.5"
DESCRIPTION='''
circules - checks for circularity in nucleotide sequences
version: v.%s
# Disclaimer: #
The script is currently in the beta phase. Any feedback is much appreciated.
''' %VERSION
kmers = []
dic = {}
seqs = {}
motifs_by_regions = {}
... | mit | 5,351,275,712,881,326,000 | 36.064767 | 307 | 0.638499 | false |
h-friederich/lpm | login.py | 1 | 3179 | from functools import wraps
from flask import Blueprint, request, redirect, render_template, url_for, g, flash
from flask.ext.login import LoginManager, login_user, logout_user, current_user
from flask_wtf import Form
from wtforms import StringField, PasswordField
import base64
from . import auth
login_manager = Login... | bsd-3-clause | 5,078,731,911,012,853,000 | 29 | 95 | 0.621579 | false |
diegonalvarez/tournament-stats | equipos/migrations/0001_initial.py | 1 | 5904 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Equipo'
db.create_table(u'equipos_equipo', (
(u'id', self.gf('django.db.models.f... | mit | -1,342,480,729,113,450,200 | 66.873563 | 195 | 0.558435 | false |
mortentoo/maya | scripts/animvr/export_obj_sequence.py | 1 | 1035 | import pymel.core as pm
class ExportObjSequence:
def __init__(self):
self.objects = []
self.start_frame = None
self.end_frame = None
def export(self):
if not pm.ls(sl=True):
pm.warning("No objects selected")
return
path = pm.fileDia... | gpl-3.0 | -4,551,239,341,659,585,500 | 27.75 | 118 | 0.523671 | false |
patrick-winter-knime/mol-struct-nets | molstructnets/steps/prediction/tensor2d/tensor_2d.py | 1 | 3072 | import h5py
from keras import models
import numpy
from steps.prediction.shared.tensor2d import prediction_array
from util import data_validation, file_structure, progressbar, logger, file_util, hdf5_util, misc
class Tensor2D:
@staticmethod
def get_id():
return 'tensor_2d'
@staticmethod
def ... | gpl-3.0 | -7,248,230,788,257,675,000 | 51.067797 | 128 | 0.623372 | false |
tomicic/ModelMMORPG | sc.py | 1 | 3434 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
from spade.Agent import BDIAgent
from spade.Behaviour import OneShotBehaviour, EventBehaviour, ACLTemplate, MessageTemplate
from spade.ACLMessage import ACLMessage
from spade.AID import aid
from spade.SWIKB import SWIKB as KB
Overflow = 0.00
'''
TODO:
Reimplement agents... | gpl-3.0 | 5,696,110,524,052,965,000 | 33.686869 | 135 | 0.655213 | false |
lem9/weblate | weblate/trans/tests/test_diff.py | 1 | 2571 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2017 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <https://weblate.org/>
#
# 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, eith... | gpl-3.0 | 1,324,236,150,092,939,800 | 31.443038 | 72 | 0.608272 | false |
EnviDat/ckanext-envidat_theme | ckanext/envidat_theme/action.py | 1 | 3448 | # coding: utf8
from ckan.logic import side_effect_free
from ckan.logic.action.get import user_show
import ckan.plugins.toolkit as toolkit
from ckanext.passwordless import util
import json
from xml.etree import ElementTree
import requests
from logging import getLogger
log = getLogger(__name__)
@side_effect_free
de... | agpl-3.0 | -2,467,828,462,179,743,000 | 27.262295 | 84 | 0.555394 | false |
rbarlow/pulp_python | plugins/test/unit/plugins/importers/test_importer.py | 1 | 7890 | """
Contains tests for pulp_python.plugins.importers.importer.
"""
from gettext import gettext as _
import unittest
import mock
from pulp_python.common import constants
from pulp_python.plugins import models
from pulp_python.plugins.importers import importer
class TestEntryPoint(unittest.TestCase):
"""
Test... | gpl-2.0 | -8,726,490,154,107,941,000 | 42.833333 | 100 | 0.641825 | false |
Aiacos/DevPyLib | mayaLib/guiLib/base/baseUI.py | 1 | 6497 | __author__ = 'Lorenzo Argentieri'
import inspect
import ast
import mayaLib.pipelineLib.utility.docs as doc
from PySide2 import QtCore, QtWidgets
import pymel.core as pm
def test(a, b, c, d='ciao', e='stronzo', f=1):
"""
Test Function
:param a:
:param b:
:param c:
:param d:
:param e:
:... | agpl-3.0 | -574,755,296,216,365,000 | 29.502347 | 108 | 0.52732 | false |
marco-lancini/Showcase | app_socialnetworks/tumblr.py | 1 | 7041 | from __init__ import *
from oauthclient import *
class TumblrClient(OauthClient):
"""
Wrapper for Tumblr APIs
:CONSUMER_KEY: Tumblr App ID
:CONSUMER_SECRET: Tumblr API Secret
:blog: the connected Tumblr blog, if any
:user_auth: account of the user on Showcase
:auth: boolean flag (if True,... | mit | -552,312,351,703,994,600 | 30.017621 | 115 | 0.530464 | false |
rspavel/spack | lib/spack/spack/environment.py | 1 | 68581 | # 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)
import collections
import os
import re
import sys
import shutil
import copy
import socket
import six
from ordereddict_ba... | lgpl-2.1 | -7,866,164,561,951,928,000 | 36.55805 | 79 | 0.589361 | false |
crowsonkb/style_transfer | log_utils.py | 1 | 3838 | import logging
import os
import sys
try:
import curses
except ImportError:
curses = None
def _stderr_supports_color():
color = False
if curses and hasattr(sys.stderr, 'isatty') and sys.stderr.isatty():
try:
curses.setupterm()
if curses.tigetnum("colors") > 0:
... | mit | 4,683,264,071,271,343,000 | 32.964602 | 99 | 0.585201 | false |
itu-oss-project-team/oss-github-analysis-project | github_analysis_tool/analyzer/commit_based_analyzer.py | 1 | 2535 | import collections
from github_analysis_tool.analyzer.abstract_analyzer import AbstractAnalyzer
from github_analysis_tool.services.db_column_constants import Columns
class CommitBasedAnalyzer(AbstractAnalyzer):
def __init__(self):
AbstractAnalyzer.__init__(self, "commit")
def create_matrix(self, repo... | mit | -7,743,140,120,545,697,000 | 43.473684 | 118 | 0.624852 | false |
dnaextrim/django_adminlte_x | adminlte/static/plugins/datatables/extensions/Responsive/examples/styling/index.html.py | 1 | 2421 | XXXXXXXXX XXXXX
XXXXXX
XXXXXX
XXXXX XXXXXXXXXXXXXXXX
XXXXX XXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX
XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXX X... | mit | -5,425,496,570,000,140,000 | 41.491228 | 167 | 0.857497 | false |
Pinkerton/django-ical | django_ical/tests/test_feed.py | 1 | 15645 | from datetime import date
from datetime import datetime
from os import linesep
from django.test import TestCase
from django.test.client import RequestFactory
import icalendar
import pytz
from django_ical import utils
from django_ical.feedgenerator import ICal20Feed
from django_ical.views import ICalFeed
class Test... | mit | -4,178,158,778,942,191,000 | 35.898585 | 119 | 0.52496 | false |
DiamondLightSource/diffcalc | diffcalc/gdasupport/you.py | 1 | 4367 | from diffcalc.gdasupport.scannable.diffractometer import DiffractometerScannableGroup
from diffcalc.gdasupport.scannable.hkl import Hkl
from diffcalc.gdasupport.scannable.hkloffset import HklOffset
from diffcalc.gdasupport.scannable.simulation import SimulatedCrystalCounter
from diffcalc.gdasupport.scannable.wavelength... | gpl-3.0 | -3,793,663,831,858,863,000 | 32.083333 | 107 | 0.715365 | false |
kubeflow/tf-operator | sdk/python/kubeflow/tfjob/models/v1_tf_job.py | 1 | 7910 | # Copyright 2019 kubeflow.org.
#
# 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,... | apache-2.0 | 2,290,367,220,663,842,300 | 31.024291 | 295 | 0.604172 | false |
Mossman1215/pgp-backup | upload_dir_instructions.py | 1 | 2112 | import os,sys,json,random
class uploadTest:
def __init__(self):
self.source = sys.argv[1]
self.f = open("operations.txt",'w',1)
self.counter = 0
print('running')
self.mapping = dict()
def getParentID(self,filename):
... | mit | -2,677,422,769,158,516,000 | 43 | 97 | 0.432292 | false |
Fe-Nik-S/Examples | python/external_api/Sencore/lib/const.py | 1 | 4426 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import namedtuple
path_attr = namedtuple("path_attr", ("PATH", "ATTR"))
__ALL__ = ["SENCORE_URLS_ENUM", "SENCORE_DATA_PATH", "SENCORE_ATTRS_ENUM", "RESULT_PATH"]
class SENCORE_URLS_ENUM(object):
ETH = "http://{address}/probe/ethdata"
ETR_ALL = ... | mit | -8,902,507,808,757,745,000 | 33.310078 | 115 | 0.584049 | false |
splicemachine/spliceengine | assembly/hdp3.1.0/src/main/resources/common-services/SPLICEMACHINE/2.5.1/service_advisor.py | 1 | 16882 | #!/usr/bin/env ambari-python-wrap
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the... | agpl-3.0 | -3,605,641,735,364,624,400 | 53.634304 | 466 | 0.701635 | false |
seraphlnWu/creditor | configurations/mainnode.py | 1 | 1032 | # coding=utf8
from os.path import join
main_node_host = 'localhost'
main_node_port = 5036
controller_port = 5036
controller_timeout = 10
main_node_manhole_port = 8791
app_root = '/home/wubin/observer'
client_register_timeout = 10
client_request_timeout = 1000 # seconds
request_max_attempts = 1
request_attem... | apache-2.0 | 5,372,193,645,929,906,000 | 18.471698 | 56 | 0.716085 | false |
8l/beri | cheritest/trunk/tests/trace/test_raw_trace.py | 2 | 2042 | #-
# Copyright (c) 2013 Colin Rothwell
# All rights reserved.
#
# This software was developed by and Colin Rothwell as part of his summer
# internship.
#
# @BERI_LICENSE_HEADER_START@
#
# Licensed to BERI Open Systems C.I.C. (BERI) under one or more contributor
# license agreements. See the NOTICE file distributed wi... | apache-2.0 | 5,793,459,442,878,046,000 | 41.541667 | 79 | 0.711557 | false |
bwohlberg/sporco | sporco/admm/tvl1.py | 1 | 24507 | # -*- coding: utf-8 -*-
# Copyright (C) 2015-2020 by Brendt Wohlberg <brendt@ieee.org>
# All rights reserved. BSD 3-clause License.
# This file is part of the SPORCO package. Details of the copyright
# and user license can be found in the 'LICENSE.txt' file distributed
# with the package.
r"""Classes for ADMM algorith... | bsd-3-clause | 4,074,499,690,839,444,500 | 31.373844 | 79 | 0.541478 | false |
ml-lab/NearPy | nearpy/distances/cosine.py | 1 | 1649 | # -*- coding: utf-8 -*-
# Copyright (c) 2013 Ole Krause-Sparmann
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy,... | mit | 4,337,693,486,132,774,400 | 40.225 | 79 | 0.703457 | false |
sukritranjan/ranjansasselov2016b | compute_UV_doses.py | 1 | 29816 | # -*- coding: iso-8859-1 -*-
"""
This code is used to weigh the UV radiances we compute by biological action spectra.
"""
########################
###Import useful libraries
########################
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import pdb
from matplotlib.pyp... | mit | -5,561,900,649,416,079,000 | 54.317254 | 825 | 0.713442 | false |
nonbiostudent/python-spectroscopy | src/spectroscopy/plugins/flyspec.py | 1 | 8319 | """
Plugin to read and write FlySpec data.
"""
import calendar
import datetime
import os
import numpy as np
from spectroscopy.dataset import Dataset, Spectra, ResourceIdentifier, Retrievals
from spectroscopy.plugins import DatasetPluginBase
class FlySpecPluginException(Exception):
pass
class FlySpecPlugin(Dat... | gpl-3.0 | 7,344,202,771,692,823,000 | 38.42654 | 81 | 0.538406 | false |
maggienj/ActiveData | tests/test_jx/test_set_ops.py | 1 | 34963 | # encoding: utf-8
#
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Author: Kyle Lahnakoski (kyle@lahnakoski.com)
#
from __future__ import division
from __future_... | mpl-2.0 | -3,831,913,277,298,706,400 | 29.995567 | 90 | 0.263736 | false |
jameswatt2008/jameswatt2008.github.io | python/Python基础/截图和代码/加强/老王开枪/老王开枪-7-创建敌人.py | 1 | 2720 | class Person(object):
"""人的类"""
def __init__(self, name):
super(Person, self).__init__()
self.name = name
self.gun = None#用来保存枪对象的引用
self.hp = 100
def anzhuang_zidan(self, dan_jia_temp, zi_dan_temp):
"""把子弹装到弹夹中"""
#弹夹.保存子弹(子弹)
dan_jia_temp.baocun_zidan(zi_dan_temp)
def anzhuang_danjia(self, gun_... | gpl-2.0 | 8,752,744,205,176,716,000 | 17.552632 | 60 | 0.62772 | false |
ThibaultReuille/graphiti | Scripts/console/edition.py | 1 | 5823 | import script
from script import *
class Info(script.Script):
def run(self, args):
self.console.log("{0} nodes, {1} edges.".format(og.count_nodes(), og.count_edges()))
class Load(script.Script):
def run(self, args):
if len(args) < 2:
self.console.log("Usage: {0} <filename>".format(args[0]))
return
std... | bsd-2-clause | -4,776,052,747,866,240,000 | 32.471264 | 116 | 0.638502 | false |
nanshihui/PocCollect | component/fast_cgi/fast_cgi.py | 1 | 2068 | #!/usr/bin/env python
# encoding: utf-8
from t import T
import socket
class P(T):
def __init__(self):
T.__init__(self)
def verify(self,head='',context='',ip='',port='',productname={},keywords='',hackinfo=''):
timeout=3
result = {}
result['result']=False
target_url... | mit | 5,356,842,197,419,762,000 | 28.414286 | 93 | 0.499514 | false |
klmitch/python-keystoneclient | keystoneclient/contrib/auth/v3/oidc.py | 1 | 8795 | # 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, software
# distributed under t... | apache-2.0 | -3,890,712,068,428,765 | 40.880952 | 79 | 0.61444 | false |
Yarichi/Proyecto-DASI | Malmo/Python_Examples/mission_quit_command_example.py | 1 | 4421 | # ------------------------------------------------------------------------------------------------
# Copyright (c) 2016 Microsoft Corporation
#
# 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 Softw... | gpl-2.0 | -3,410,355,032,639,231,500 | 35.151261 | 117 | 0.598055 | false |
ema/conpaas | conpaas-services/src/conpaas/services/htc/manager/configuration.py | 1 | 4786 | '''
Created on Jul 23, 2013
@author: Vlad
'''
import random
class Configuration:
def __init__(self,types_list, cost_list, limit_list):
self.keys = dict(zip(types_list, range(len(types_list))))
self.averages = {} # dictionary of averages with k as a machine type
self.rav = {} # di... | bsd-3-clause | -8,171,769,272,402,431,000 | 32.236111 | 126 | 0.494985 | false |
omerwe/LEAP | leapUtils.py | 1 | 10998 | import numpy as np
from optparse import OptionParser
import scipy.linalg as la
import scipy.stats as stats
import scipy.linalg.blas as blas
import pandas as pd
import csv
import time
import fastlmm.util.VertexCut as vc
from pysnptools.snpreader.bed import Bed
import pysnptools.util as pstutil
import pysnptools.util.phe... | apache-2.0 | 3,903,449,392,061,788,700 | 32.530488 | 122 | 0.68367 | false |
puruckertom/ubertool | ubertool/varroapop/varroapop_functions.py | 1 | 11627 | from __future__ import division #brings in Python 3.0 mixed type calculation rules
import logging
import json
import requests
import math
import pandas as pd
import os
rest_url_varroapop = os.environ.get('OPENCPU_REST_SERVER')
#rest_url_varroapop = 'http://localhost'
if not os.environ.get('OPENCPU_REST_SERVER'):
... | unlicense | -3,814,458,858,010,616,000 | 65.821839 | 133 | 0.649609 | false |
TravelModellingGroup/TMGToolbox | TMGToolbox/src/network_editing/NCS11/conversion/convert_VDFs.py | 1 | 8469 | '''
Copyright 2014 Travel Modelling Group, Department of Civil Engineering, University of Toronto
This file is part of the TMG Toolbox.
The TMG Toolbox is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Fou... | gpl-3.0 | -17,125,685,268,828,372 | 41.139303 | 148 | 0.526036 | false |
ioreshnikov/wells | wells/time_dependent.py | 1 | 1615 | import scipy as s
import scipy.fftpack as fft
import scipy.integrate
import sys
def integrate(t, x, input, potential, delta, pump, loss, absorber):
nt = len(t)
nx = len(x)
dx = x[1] - x[0]
k = 2*s.pi * fft.fftfreq(nx, dx)
d = - delta - 1/2 * k**2
spectrum = fft.fft(input)
spectrum_ = sp... | mit | 2,178,837,503,368,915,500 | 28.907407 | 73 | 0.544892 | false |
HenriqueLR/payments | app/main/decorators.py | 1 | 1514 | #encoding: utf-8
from django.core.exceptions import PermissionDenied
from django.contrib import messages
from django.shortcuts import redirect
from django.contrib.auth import get_user_model
from wallet.models import Debit, Deposit, Note
from main.utils import get_list_permissions
User = get_user_model()
def ajax_r... | mit | 5,929,164,697,228,002,000 | 31.12766 | 103 | 0.721007 | false |
jmatthed/avatar-samples | qemu_uboot/test_system.py | 1 | 4490 | from avatar.system import System
import logging
from avatar.emulators.s2e import init_s2e_emulator
import threading
import subprocess
from avatar.targets.gdbserver_target import init_gdbserver_target
import os
import time
log = logging.getLogger(__name__)
configuration = {
"output_directory": "/tmp/1",
"con... | apache-2.0 | 1,403,994,548,638,476,000 | 31.071429 | 118 | 0.436526 | false |
maxim-borisyak/craynn | craynn/layers/conv_ops.py | 1 | 2783 | from lasagne import *
__all__ = [
'conv', 'conv1x1',
'deconv', 'deconv1x1',
'upscale',
'max_pool', 'mean_pool', 'floating_maxpool', 'floating_meanpool',
'global_pool',
'upconv', 'downconv'
]
get_conv_nonlinearity = lambda f=None: nonlinearities.LeakyRectify(0.05) if f is None else f
get_companion_nonline... | mit | -6,815,556,254,835,466,000 | 32.542169 | 127 | 0.71254 | false |
vindeka/gateswift | gateswift/middleware.py | 1 | 5131 | # Copyright (c) 2013 Vindeka, 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 writ... | apache-2.0 | 8,751,585,938,849,223,000 | 38.469231 | 101 | 0.618008 | false |
EdTsft/swilite | swilite/prolog.py | 1 | 50967 | """An object-oriented interface to Prolog."""
from collections import namedtuple
from ctypes import (
POINTER,
byref,
c_char,
c_double,
c_int,
c_int64,
c_size_t,
c_void_p,
)
from swilite.core import (
BUF_DISCARDABLE,
CVT_WRITEQ,
PL_ATOM,
PL_BLOB,
PL_DICT,
PL_FLO... | mit | -278,160,444,804,315,000 | 30.287293 | 80 | 0.567858 | false |
mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/util/plugin_config.py | 1 | 2386 | from xml.etree import ElementTree
try:
from galaxy import eggs
eggs.require('PyYAML')
except Exception:
# If not in Galaxy, ignore this.
pass
try:
import yaml
except ImportError:
yaml = None
from galaxy.util.submodules import submodules
def plugins_dict(module, plugin_type_identifier):
"... | gpl-3.0 | -1,747,664,163,855,154,200 | 28.45679 | 108 | 0.650042 | false |
uclouvain/OSIS-Louvain | program_management/tests/business/test_excel.py | 1 | 6599 | ##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | agpl-3.0 | 8,218,960,028,132,070,000 | 47.874074 | 110 | 0.637617 | false |
jakevdp/scipy | scipy/special/orthogonal.py | 1 | 58856 | """
A collection of functions to find the weights and abscissas for
Gaussian Quadrature.
These calculations are done by finding the eigenvalues of a
tridiagonal matrix whose entries are dependent on the coefficients
in the recursion formula for the orthogonal polynomials with the
corresponding weighting function over ... | bsd-3-clause | -6,653,320,370,332,630,000 | 27.296154 | 139 | 0.55544 | false |
lobnek/pyutil | test/test_mongo/test_engine/test_strategy.py | 1 | 3434 | from pyutil.mongo.engine.strategy import Strategy, strategies, configuration
from pyutil.mongo.engine.symbol import Symbol, Group
from pyutil.performance.drawdown import drawdown
from pyutil.performance.month import monthlytable
from pyutil.performance.return_series import from_nav
from pyutil.portfolio.portfolio impor... | mit | 5,867,971,628,889,860,000 | 29.39823 | 97 | 0.689866 | false |
KlinkOnE/caf-port | scripts/gcc-wrapper.py | 1 | 3550 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2011, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the abo... | gpl-2.0 | -2,623,976,439,378,806,300 | 32.17757 | 97 | 0.663099 | false |
CanalTP/navitia | source/tyr/tests/integration/autocomplete_test.py | 1 | 11540 | # coding: utf-8
# Copyright (c) 2001-2018, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public transport:
# a non ending quest to... | agpl-3.0 | 7,122,653,603,733,621,000 | 33.550898 | 110 | 0.62175 | false |
samuelshaner/openmc | tests/run_tests.py | 1 | 17900 | #!/usr/bin/env python
from __future__ import print_function
import os
import sys
import shutil
import re
import glob
import socket
from subprocess import call, check_output
from collections import OrderedDict
from optparse import OptionParser
# Command line parsing
parser = OptionParser()
parser.add_option('-j', '--... | mit | -5,832,388,550,918,468,000 | 31.965009 | 134 | 0.611955 | false |
tsotetsi/textily-web | temba/middleware.py | 1 | 5471 | from __future__ import absolute_import, unicode_literals
import pstats
import traceback
import copy
from cStringIO import StringIO
from django.conf import settings
from django.db import transaction
from django.utils import timezone, translation
from temba.orgs.models import Org
from temba.contacts.models import Conta... | agpl-3.0 | 4,714,688,521,143,626,000 | 31.182353 | 126 | 0.628039 | false |
vuolter/autoupgrade | setup.py | 1 | 1152 | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name="autoupgrade-ng",
version="0.3.0",
author="Walter Purcaro",
author_email="vuolter@gmail.com",
description="Automatic upgrade of PyPI packages",
long_description=open('README.rst').read(),
keywords=['autoupgrade', 'pip-upgrade... | mit | -4,360,612,504,642,803,000 | 32.882353 | 67 | 0.626736 | false |
FlintHill/SUAS-Competition | SUASSystem/SUASSystem/image_processing.py | 1 | 3266 | from time import sleep
from PIL import Image
import os
import math
import random
from .utils import *
from UpdatedImageProcessing import *
from .settings import GCSSettings
from .converter_functions import inverse_haversine, get_mission_json
from .location import Location
"""
This file contains our image processing log... | mit | -1,299,459,855,585,969,200 | 56.298246 | 236 | 0.672994 | false |
itoledoc/gWTO2 | arrayResolution2p.py | 1 | 23318 | #!/usr/bin/python
"""
Script to return the Cycle 2 arrays for a given LAS, Angular Resolution
HISTORY:
2012.10.11:
- first shot
- Cycle 1 setup
2012.11.20:
- Adding resolution, LAS for different declination
2012.12.27:
- adding a filter if no configurati... | gpl-2.0 | -7,200,967,021,325,123,000 | 30.173797 | 133 | 0.46908 | false |
Sayter99/86Scratch | Helpers/86Scratch/s2a_fm.py | 1 | 4575 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 25 13:17:15 2013
@author: Alan Yorinks
Copyright (c) 2013-14 Alan Yorinks All right reserved.
This program 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 Fre... | mit | -6,333,871,453,249,498,000 | 34.75 | 111 | 0.676066 | false |
alalek/cmake_utils | tests/checkoutput.py | 1 | 12432 | #!/bin/env python3
import os
import string
import sys
import re
from pprint import pprint
class CheckException(Exception):
pass
CHECK_SIMPLE = ''
CHECK_NEXT = '-NEXT'
CHECK_SAME = '-SAME'
CHECK_NOT = '-NOT'
CHECK_BETWEEN = '-BETWEEN' # check without order
CHECK_LABEL = 'LABEL'
def _apply_check(c, m, varia... | mit | 5,228,359,323,008,180,000 | 31.375 | 119 | 0.492761 | false |
maxvonhippel/q2-diversity | q2_diversity/_filter.py | 1 | 1145 | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2017, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | bsd-3-clause | -3,368,935,227,757,453,300 | 41.407407 | 78 | 0.571179 | false |
lamotriz/sistemas-de-aterramento | src/agilent_u2531a.py | 1 | 14700 | # -*- coding: utf-8 -*-
# Comunicacao com a placa agilent U2531A
#
# UFC - Universidade de Federal do Ceará
#
# Responsáveis:
# Felipe Bandeira da Silva
# Francisco Alexander
#
from __future__ import division
import platform
#if platform.system() == 'Windows':
# import visa
#else:
# import visa_linux_emulatio... | apache-2.0 | -3,173,579,012,957,982,000 | 25.769231 | 110 | 0.557373 | false |
argivaitv/argivaitv | plugin.video.salts/salts_lib/kodi.py | 1 | 4210 | """
SALTS XBMC Addon
Copyright (C) 2015 tknorris
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
T... | gpl-2.0 | -4,517,156,319,772,024,300 | 33.793388 | 139 | 0.670784 | false |
dol-sen/gentoolkit | pym/gentoolkit/test/test_cpv.py | 1 | 4129 | #!/usr/bin/python
#
# Copyright(c) 2009, Gentoo Foundation
#
# Licensed under the GNU General Public License, v2
#
# $Header$
import unittest
from gentoolkit.cpv import *
from gentoolkit.test import cmp
class TestGentoolkitCPV(unittest.TestCase):
def assertEqual2(self, o1, o2):
# logic bugs hidden behind short c... | gpl-2.0 | 9,081,922,295,895,087,000 | 28.283688 | 74 | 0.614434 | false |
Ezhil-Language-Foundation/open-tamil | tests/solthiruthi_data_parser.py | 1 | 1780 | # -*- coding: utf-8 -*-
# (C) 2015 Muthiah Annamalai
# setup the paths
from opentamiltests import *
from solthiruthi.data_parser import *
from solthiruthi.solthiruthi import Solthiruthi
import sys
class CmdLineIO(unittest.TestCase):
def test_CLI_interface_help(self):
return
# find a way to run th... | mit | -1,105,546,994,034,957,800 | 32.584906 | 82 | 0.617416 | false |
jwayneroth/mpd-touch | pygameui/button.py | 1 | 11634 | import label
import callback
import theme
import pygame
import view
import imageview
CENTER = 0
LEFT = 1
RIGHT = 2
TOP = 3
BOTTOM = 4
WORD_WRAP = 0
CLIP = 1
"""
Button
A button with a text caption.
Essentially an interactive label.
Signals
on_clicked(button, mousebutton)
"""
class Button(label.Label):
def __in... | mit | -5,597,498,205,768,523,000 | 27.101449 | 83 | 0.514097 | false |
ABI-Software/ZincView | src/zincview.py | 1 | 30614 | #!/usr/bin/python
"""
ZincView example visualisation application using OpenCMISS-Zinc, python, Qt (PySide)
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""
import os
impo... | mpl-2.0 | -1,349,197,757,580,551,200 | 40.822404 | 202 | 0.641471 | false |
dmishin/knuth_bendix | vondyck.py | 1 | 4552 | from knuth_bendix import knuthBendix, RewriteRuleset, shortLex
def vdRule(n, m, k=2):
"""Create initial ruleset for von Dyck group with inverse elements
https://en.wikipedia.org/wiki/Triangle_group#von_Dyck_groups
"""
return RewriteRuleset({
tuple('aA'): (),
tuple('Aa'): (),
tup... | mit | -8,688,118,971,699,404,000 | 26.257485 | 95 | 0.491872 | false |
cgarrard/osgeopy-code | Chapter13/listing13_4.py | 1 | 1939 | # Script to draw world countries as patches.
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.path import Path
import matplotlib.patches as patches
from osgeo import ogr
def order_coords(coords, clockwise):
"""Orders coordinates."""
total = 0
x1, y1 = coords[0]
for x, y in coords[1:... | mit | 7,704,621,990,206,990,000 | 29.777778 | 70 | 0.643115 | false |
aleneum/kogniserver | src/kogniserver/async.py | 1 | 2307 | import logging
import os
from threading import Thread
import time
try:
import asyncio
except ImportError:
# Trollius >= 0.3 was renamed
import trollius as asyncio
from autobahn.asyncio.wamp import ApplicationSession
from services import SessionHandler
class Ping(Thread):
def __init__(self, wamp):
... | mit | 8,312,911,809,580,319,000 | 26.141176 | 97 | 0.61075 | false |
jainanisha90/WeVoteServer | import_export_facebook/models.py | 1 | 55791 | # import_export_facebook/models.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
from django.core.validators import RegexValidator
from django.db import models
from email_outbound.models import SEND_STATUS_CHOICES, TO_BE_PROCESSED
from wevote_functions.functions import generate_random_string, positive_... | mit | -7,461,401,211,381,602,000 | 53.536657 | 120 | 0.582764 | false |
kenrick95/airmozilla | airmozilla/urls.py | 1 | 1959 | from django.conf import settings
from django.conf.urls import patterns, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
import djcelery
from airmozilla.base.monkeypatches import patch
patch()
handler500 = 'airmozilla.base.views.handler500'
urlpatterns = patterns(
'',
(r'^(?P<... | bsd-3-clause | -1,065,121,520,599,024,900 | 37.411765 | 79 | 0.665646 | false |
SEL-Columbia/commcare-hq | custom/ilsgateway/commtrack.py | 1 | 12744 | import logging
import traceback
from django.contrib.auth.models import User
from corehq.apps.locations.models import Location
from corehq.apps.sms.mixin import PhoneNumberInUseException, VerifiedNumber
from corehq.apps.users.models import WebUser, CommCareUser, CouchUser, UserRole
from custom.api.utils import apply_upd... | bsd-3-clause | 4,437,364,392,095,602,000 | 39.332278 | 118 | 0.605148 | false |
arthurmensch/modl | benchmarks/log.py | 1 | 2179 | import time
import numpy as np
from lightning.impl.primal_cd import CDClassifier
from lightning.impl.sag import SAGAClassifier
from sklearn.datasets import fetch_20newsgroups_vectorized
from lightning.classification import SAGClassifier
from sklearn.linear_model import LogisticRegression
bunch = fetch_20newsgroups_v... | bsd-2-clause | 7,691,973,709,971,517,000 | 33.046875 | 68 | 0.490133 | false |
chatziko/mopidy-youtube | mopidy_youtube/backend.py | 1 | 5534 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re
import string
from multiprocessing.pool import ThreadPool
from urlparse import urlparse, parse_qs
import unicodedata
import pafy
from mopidy import backend
from mopidy.models import SearchResult, Track, Album
import pykka
import requests
from ... | apache-2.0 | 1,411,562,814,534,946,800 | 27.822917 | 76 | 0.555114 | false |
DucQuang1/py-earth | setup.py | 1 | 3348 | from setuptools import setup, Extension
import numpy
import sys
import os
sys.path.insert(0, os.path.join('.', 'pyearth'))
from _version import __version__
# Determine whether to use Cython
if '--cythonize' in sys.argv:
cythonize_switch = True
del sys.argv[sys.argv.index('--cythonize')]
else:
cythonize_swi... | bsd-3-clause | -5,795,489,001,214,014,000 | 32.148515 | 78 | 0.506272 | false |
biddellns/sc2league-server | config/urls.py | 1 | 1043 | """sc2league URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | gpl-3.0 | -8,316,606,483,788,474,000 | 32.645161 | 82 | 0.71908 | false |
concurrentlabs/laguna | 1.0/scripts/cachequery/cache_query.py | 1 | 2571 | #!/usr/bin/python
import io
import os
import signal
import sys
from subprocess import call
hit = miss = bypass = expired = 0
#########################################################################################
#########################################################################################
def main():
... | apache-2.0 | -3,529,379,872,526,363,000 | 30.353659 | 89 | 0.318164 | false |
bank-netforce/netforce | netforce_general/netforce_general/models/user_group.py | 1 | 1497 | # Copyright (c) 2012-2015 Netforce Co. Ltd.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publ... | mit | 9,020,449,533,256,077,000 | 41.771429 | 80 | 0.727455 | false |
tkchafin/scripts | phylip2biNumNex.py | 1 | 8129 | #!/usr/bin/python
import re
import sys
import os
import getopt
import operator
import random
def main():
params = parseArgs()
if params.phylip:
#Get sequences as dict of lists
seqs = readPhylip(params.phylip)
#get list of columns and list of samplenames
alen = getSeqLen(seqs)
columns = [[]for i in range... | gpl-3.0 | 3,747,132,566,112,011,300 | 23.558912 | 154 | 0.615451 | false |
MrHarcombe/python-gpiozero | gpiozero/pins/data.py | 1 | 53566 | from __future__ import (
unicode_literals,
absolute_import,
print_function,
division,
)
str = type('')
import os
import sys
from textwrap import dedent
from itertools import cycle
from operator import attrgetter
from collections import namedtuple
from ..exc import PinUnknownPi, PinMultiplePins, Pi... | bsd-3-clause | -1,324,905,326,528,842,200 | 45.297321 | 212 | 0.501251 | false |
jlecount-sungevity/holmium.core | tests/facet_tests.py | 1 | 8107 | """
tests for facets
"""
import unittest
from flask_testing import LiveServerTestCase
import mock
from holmium.core import Page, Element, Locators, Elements, Section, ElementMap
from holmium.core.facets import FacetError, defer, title, cookie, strict
from holmium.core.pageobject import NonexistentElement
from . impor... | mit | 386,016,274,215,468,740 | 32.639004 | 86 | 0.63735 | false |
kerfab/jdic | jdic/jdic.py | 1 | 21228 | """
The Jdic module provides the features required to manipulate
JSON objects through a consistent API.
"""
from __future__ import unicode_literals
import json
import hashlib
import importlib
from collections import Sequence, Mapping
import json_delta
import jsonschema
from . import drivers # pylint: disable=unused-imp... | unlicense | 7,458,643,821,538,832,000 | 34.858108 | 99 | 0.554127 | false |
rombie/contrail-controller | src/config/common/tests/test_common.py | 1 | 42367 | #
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
import sys
import gevent.monkey
gevent.monkey.patch_all()
import logging
import tempfile
import mock
from pprint import pformat
import coverage
import fixtures
import testtools
from testtools import content
from flexmock import flexmock
from webtest ... | apache-2.0 | -2,208,394,981,384,609,800 | 37.410698 | 121 | 0.594897 | false |
pytorch/vision | references/detection/utils.py | 1 | 8671 | from collections import defaultdict, deque
import datetime
import errno
import os
import time
import torch
import torch.distributed as dist
class SmoothedValue(object):
"""Track a series of values and provide access to smoothed values over a
window or the global series average.
"""
def __init__(self... | bsd-3-clause | -5,394,417,501,050,074,000 | 28.39322 | 94 | 0.548149 | false |
LowieHuyghe/edmunds | tests/log/drivers/testsyslog.py | 1 | 2970 |
from tests.testcase import TestCase
from tests.foundation.syslogserver import SysLogServer
class TestSysLog(TestCase):
"""
Test the SysLog
"""
def set_up(self):
"""
Set up the test case
"""
super(TestSysLog, self).set_up()
self._server = SysLogServer()
... | apache-2.0 | 7,226,208,718,824,647,000 | 30.595745 | 95 | 0.437037 | false |
yhteentoimivuuspalvelut/ckanext-ytp-request | ckanext/ytp/request/command.py | 1 | 1325 | import logging
from ckan.lib.cli import CkanCommand
class InitDBCommand(CkanCommand):
"""
Initialises the database with the required tables
Connects to the CKAN database and creates the member request tables
Usage:
paster initdb
- Creates the database table member request
"""... | agpl-3.0 | -445,495,278,592,315,600 | 26.604167 | 78 | 0.587925 | false |
dfm/emcee3 | emcee3/tests/unit/test_state.py | 1 | 1654 | # -*- coding: utf-8 -*-
from __future__ import division, print_function
import numpy as np
from ...state import State
__all__ = ["test_dtype", "test_serialization", "test_repr"]
def test_dtype(seed=1234):
np.random.seed(seed)
dtype = [
("coords", np.float64, (4, )),
("log_prior", np.float... | mit | 8,939,081,856,143,124,000 | 23.686567 | 77 | 0.555623 | false |
allenai/document-qa | docqa/nn/span_prediction_ops.py | 1 | 4078 | import tensorflow as tf
import numpy as np
"""
Some utility functions for dealing with span prediction in tensorflow
"""
def best_span_from_bounds(start_logits, end_logits, bound=None):
"""
Brute force approach to finding the best span from start/end logits in tensorflow, still usually
faster then the p... | apache-2.0 | 2,821,853,730,584,280,600 | 36.072727 | 100 | 0.615498 | false |
bunnyinc/django-oidc-provider | oidc_provider/models.py | 1 | 6596 | # -*- coding: utf-8 -*-
import base64
import binascii
from hashlib import md5, sha256
import json
from django.db import models
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
CLIENT_TYPE_CHOICES = [
('confidential', 'Confidential'),
(... | mit | -7,244,896,210,937,017,000 | 35.043716 | 285 | 0.642359 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.