repo_name stringlengths 5 100 | path stringlengths 4 299 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1.03M | license stringclasses 15
values | hash int64 -9,223,351,895,964,839,000 9,223,297,778B | line_mean float64 3.17 100 | line_max int64 7 1k | alpha_frac float64 0.25 0.98 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
mjenrungrot/algorithm | Kattis/collatz.py | 2 | 1179 | """
Problem: collatz
Link: https://open.kattis.com/problems/collatz
Source: Kattis / CTU Open 2011
"""
while True:
A, B = list(map(int, input().split()))
if A == 0 and B == 0: break
if A == B:
print("{:} needs 0 steps, {:} needs 0 steps, they meet at {:}".format(A, B, A))
continue
ori... | mit | 1,773,556,188,656,078,800 | 22.117647 | 119 | 0.412214 | false |
SimenB/thefuck | tests/rules/test_terraform_init.py | 3 | 1455 | import pytest
from thefuck.rules.terraform_init import match, get_new_command
from thefuck.types import Command
@pytest.mark.parametrize('script, output', [
('terraform plan', 'Error: Initialization required. '
'Please see the error message above.'),
('terraform plan', 'This module is n... | mit | -2,430,255,138,444,243,000 | 43.090909 | 87 | 0.66323 | false |
vankesteren/jasp-desktop | Tools/modScripts/translationSplitter.py | 6 | 7635 | #!/usr/bin/python
import os
import sys
import regex
from collections import namedtuple
from enum import Enum
if len(sys.argv) < 4:
print("Usage: python translationSplitter.py toBeTranslated.po alreadyTranslated.po { po-file-folder | po-file+ }")
exit(1)
keepTalking = False
toBeTranslatedFilename = sys.argv[1]
al... | agpl-3.0 | -3,025,433,825,465,988,000 | 23.24127 | 246 | 0.682515 | false |
infobloxopen/infoblox-netmri | infoblox_netmri/api/broker/v2_5_0/device_group_defn_broker.py | 16 | 123011 | from ..broker import Broker
class DeviceGroupDefnBroker(Broker):
controller = "device_group_defns"
def index(self, **kwargs):
"""Lists the available device group defns. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of the various ways to query lists, using ... | apache-2.0 | -4,876,036,232,465,950,000 | 53.094547 | 999 | 0.612685 | false |
ocaisa/easybuild-framework | easybuild/tools/toolchain/toolchain.py | 3 | 19735 | # #
# Copyright 2012-2015 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (ht... | gpl-2.0 | -4,989,489,100,763,440,000 | 41.902174 | 120 | 0.618546 | false |
jMyles/AutobahnPython | examples/wamp/rpc/symmetric/client.py | 18 | 1530 | ###############################################################################
##
## Copyright 2013 Tavendo GmbH
##
## 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-2.0 | 3,721,318,196,799,021,600 | 29 | 79 | 0.636601 | false |
AuScope/vgml | src/main/resources/org/auscope/portal/server/scriptbuilder/templates/escript-magnetic.py | 3 | 3212 |
##############################################################################
#
# Copyright (c) 2009-2013 by University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Open Software License version 3.0
# http://www.opensource.org/licenses/osl-3.0.php
#
#... | gpl-3.0 | -304,191,300,855,227,140 | 31.113402 | 101 | 0.687111 | false |
fenglu-g/incubator-airflow | airflow/config_templates/default_celery.py | 4 | 4104 | # -*- coding: utf-8 -*-
#
# 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
#... | apache-2.0 | 1,846,901,440,203,672,600 | 44.6 | 107 | 0.662768 | false |
joachimwolff/minHashNearestNeighbors | sparse_neighbors_search/cluster/minHashDBSCAN.py | 1 | 3421 | # Copyright 2016, 2017, 2018, 2019, 2020 Joachim Wolff
# PhD Thesis
#
# Copyright 2015, 2016 Joachim Wolff
# Master Thesis
# Tutor: Fabrizio Costa
# Winter semester 2015/2016
#
# Chair of Bioinformatics
# Department of Computer Science
# Faculty of Engineering
# Albert-Ludwigs-University Freiburg im Breisgau
from skle... | mit | 1,588,282,949,375,221,200 | 39.247059 | 91 | 0.579655 | false |
youssef-emad/shogun | examples/meta/generator/tests/test_translate_java.py | 3 | 6770 | from translate import Translator
import json
import unittest
class TestJavaTranslator(unittest.TestCase):
def setUp(self):
with open("targets/java.json", "r") as targetFile:
self.translator = Translator(json.load(targetFile))
def test_translateProgram(self):
"""
CSVFile tr... | gpl-3.0 | 2,583,687,988,764,884,000 | 41.3125 | 397 | 0.588183 | false |
RealKinetic/locust_k8s | docker/locust-tasks/locustfile.py | 2 | 1096 | # 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 th... | apache-2.0 | 1,910,149,797,277,030,400 | 28.621622 | 84 | 0.688869 | false |
tswast/google-cloud-python | bigquery/samples/table_insert_rows_explicit_none_insert_ids.py | 1 | 1343 | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 7,757,110,027,831,912,000 | 36.305556 | 77 | 0.707372 | false |
slinderman/pyhawkes | pyhawkes/internals/weights.py | 1 | 24982 | import numpy as np
from scipy.special import gammaln, psi
from scipy.special import logsumexp
from joblib import Parallel, delayed
from pybasicbayes.abstractions import GibbsSampling, MeanField, MeanFieldSVI
from pyhawkes.internals.distributions import Bernoulli, Gamma
from pyhawkes.utils.utils import logistic, logit... | mit | -8,214,192,277,978,752,000 | 35.153401 | 104 | 0.544872 | false |
gratefulfrog/ArduGuitar | Ardu2/design/POC-3_MAX395/pyboard/V1_WithHMI/pyboard_no_debug/csv.py | 2 | 5862 | # csv.py
# my implementation of csv reading and writing
"""
READING interface:
try:
with open(self.filePath, 'r') as csvfile:
#print "opened file: " + self.filePath
reader = csv.Reader(csvfile)
self.header = next(reader)
... | gpl-2.0 | -5,950,035,282,991,769,000 | 33.686391 | 88 | 0.418287 | false |
mgit-at/ansible | lib/ansible/modules/network/ios/ios_user.py | 9 | 15497 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Ansible by Red Hat, inc
#
# This file is part of Ansible by Red Hat
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Li... | gpl-3.0 | 4,922,159,421,067,481,000 | 30.691207 | 110 | 0.62554 | false |
arne-cl/discoursegraphs | tests/test_relabel.py | 1 | 7853 | #!/usr/bin/env python
from networkx import (
convert_node_labels_to_integers, empty_graph, DiGraph, Graph, MultiDiGraph,
MultiGraph, nx)
import pytest
from discoursegraphs.relabel import relabel_nodes
"""
This module contains tests for the relabel module, which was slightly adapted
from the same module in n... | bsd-3-clause | 8,131,633,362,504,863,000 | 32.135021 | 79 | 0.573539 | false |
mrquim/mrquimrepo | script.module.youtube.dl/lib/youtube_dl/extractor/tinypic.py | 64 | 1896 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import ExtractorError
class TinyPicIE(InfoExtractor):
IE_NAME = 'tinypic'
IE_DESC = 'tinypic.com videos'
_VALID_URL = r'https?://(?:.+?\.)?tinypic\.com/player\.php\?v=(?P<id>[^&]+)&s=\d+'
_TESTS = [
... | gpl-2.0 | -4,597,872,331,539,985,000 | 32.857143 | 104 | 0.53692 | false |
moyogo/defcon | Lib/defcon/objects/glyph.py | 1 | 51864 | from __future__ import absolute_import
import weakref
from warnings import warn
from fontTools.misc.arrayTools import unionRect
from defcon.objects.base import BaseObject
from defcon.objects.contour import Contour
from defcon.objects.point import Point
from defcon.objects.component import Component
from defcon.objects.... | mit | -3,219,715,125,084,927,000 | 35.575458 | 309 | 0.634563 | false |
moylop260/odoo-dev | addons/mrp_byproduct/mrp_byproduct.py | 30 | 8808 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 4,225,047,293,519,693,000 | 53.37037 | 218 | 0.618756 | false |
koparasy/gemfi | configs/example/ruby_direct_test.py | 6 | 5375 | # Copyright (c) 2006-2007 The Regents of The University of Michigan
# Copyright (c) 2009 Advanced Micro Devices, Inc.
# 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 co... | bsd-3-clause | 1,973,769,458,501,934,300 | 36.852113 | 79 | 0.692651 | false |
matthew-tucker/mne-python | mne/minimum_norm/psf_ctf.py | 21 | 18951 | # Authors: Olaf Hauk <olaf.hauk@mrc-cbu.cam.ac.uk>
# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
#
# License: BSD (3-clause)
from copy import deepcopy
import numpy as np
from scipy import linalg
from ..io.pick import pick_channels
from ..utils import logger, verbose
from ..forward import co... | bsd-3-clause | 2,768,933,391,410,751,000 | 42.465596 | 79 | 0.61316 | false |
hkawasaki/kawasaki-aio8-1 | lms/djangoapps/courseware/tests/test_access.py | 23 | 6706 | import courseware.access as access
import datetime
from mock import Mock
from django.test import TestCase
from django.test.utils import override_settings
from courseware.tests.factories import UserFactory, CourseEnrollmentAllowedFactory, StaffFactory, InstructorFactory
from student.tests.factories import AnonymousUs... | agpl-3.0 | 2,838,229,190,782,936,000 | 44.006711 | 121 | 0.679839 | false |
adamdoupe/enemy-of-the-state | link.py | 1 | 4653 | import re
import output
from lazyproperty import lazyproperty
from collections import namedtuple
class Link(object):
LinkIdx = namedtuple("LinkIdx", "type path params")
xpathsimplifier = re.compile(r"\[[^\]]*\]")
def __init__(self, internal, reqresp):
assert internal
assert reqresp
... | gpl-2.0 | -4,311,830,849,712,518,700 | 28.636943 | 88 | 0.585429 | false |
zstackorg/zstack-woodpecker | zstackwoodpecker/zstackwoodpecker/operations/monitor_operations.py | 2 | 6149 | '''
All host operations for test.
@author: Songtao
'''
import apibinding.api_actions as api_actions
import zstackwoodpecker.test_util as test_util
import account_operations
import zstackwoodpecker.operations.account_operations as account_operations
import apibinding.inventory as inventory
def get_mon... | apache-2.0 | -3,006,976,577,302,114,300 | 36.917722 | 102 | 0.721581 | false |
sinhrks/scikit-learn | sklearn/metrics/ranking.py | 2 | 27187 | """Metrics to assess performance on classification task given scores
Functions named as ``*_score`` return a scalar value to maximize: the higher
the better
Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize:
the lower the better
"""
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.... | bsd-3-clause | 6,740,976,122,526,023,000 | 34.96164 | 79 | 0.624122 | false |
isivisi/pybot | pybot/web/uimodules.py | 1 | 1638 | import tornado
import pybot.globals as globals
from pybot.pybotextra import allFilters
import json
class Raffle(tornado.web.UIModule):
def render(self):
return self.render_string("templates/rafflemodule.html", data=globals.data)
class UserPoints(tornado.web.UIModule):
def render(self, top=0):
... | gpl-3.0 | -8,570,704,250,861,037,000 | 38 | 120 | 0.694139 | false |
adrianschroeter/kiwi | test/unit/tasks_system_build_test.py | 1 | 9818 | import sys
import mock
import os
from mock import patch, call
import kiwi
from .test_helper import argv_kiwi_tests
from kiwi.tasks.system_build import SystemBuildTask
class TestSystemBuildTask(object):
def setup(self):
sys.argv = [
sys.argv[0], '--profile', 'vmxFlavour', 'system', 'build',... | gpl-3.0 | -5,475,405,908,561,977,000 | 40.079498 | 116 | 0.638928 | false |
lonnen/socorro | socorro/lib/threaded_task_manager.py | 1 | 14201 | # 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/.
"""This module defines classes that implements a threaded
producer/consumer system. A single iterator thread pushes job... | mpl-2.0 | 5,145,759,100,393,674,000 | 45.867987 | 84 | 0.580734 | false |
cmbclh/vnpy1.7 | archive/datayes/api.py | 11 | 43801 | #encoding: UTF-8
import os
import json
import time
import requests
import pymongo
import pandas as pd
from datetime import datetime, timedelta
from Queue import Queue, Empty
from threading import Thread, Timer
from pymongo import MongoClient
from requests.exceptions import ConnectionError
from errors import (VNPAST_C... | mit | 9,052,507,582,145,055,000 | 27.078205 | 77 | 0.61679 | false |
MYaseen208/Calculator | Documentation/source/gui.py | 1 | 3815 | # By Geetha, Ali, Yaseen, Majid and Mortaza
# import Tkinter as Tk # Python2
import tkinter as Tk # Python3
import subprocess
class Calculator:
# Constructor for adding buttons
def __init__(self, window):
window.title('Calculator By Geetha, Ali, Yaseen, Majid and Mortaza')
window.geometry()
... | gpl-3.0 | -2,637,277,800,477,473,300 | 62.583333 | 129 | 0.658453 | false |
hfp/tensorflow-xsmm | tensorflow/python/autograph/converters/call_trees.py | 5 | 12529 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -7,970,651,286,638,464,000 | 34.797143 | 80 | 0.660308 | false |
brython-dev/brython | scripts/javascript_minifier.py | 1 | 2627 | """Javascript minifier"""
import re
def minify(src):
_res, pos = '', 0
while pos < len(src):
if src[pos] in ('"', "'", '`') or \
(src[pos] == '/' and src[pos - 1] == '('):
# the end of the string is the next quote if it is not
# after an odd number of backslashe... | bsd-3-clause | 6,306,103,374,661,249,000 | 31.432099 | 75 | 0.347925 | false |
mjafin/bcbio-nextgen | bcbio/galaxy/api.py | 10 | 2835 | """Access Galaxy NGLIMS functionality via the standard API.
"""
import urllib
import urllib2
import json
import time
class GalaxyApiAccess:
"""Simple front end for accessing Galaxy's REST API.
"""
def __init__(self, galaxy_url, api_key):
self._base_url = galaxy_url
self._key = api_key
... | mit | -1,893,774,085,017,352,200 | 33.156627 | 95 | 0.549559 | false |
pytexas/PyTexasBackend | conference/event/migrations/0007_auto_20190315_0221.py | 1 | 1382 | # Generated by Django 2.0.10 on 2019-03-15 02:21
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('event', '0006_auto_20190310_2253'),
]
operations = [
migrations.CreateModel(
name='PrizeWinner... | mit | 8,712,056,727,591,242,000 | 42.1875 | 251 | 0.583936 | false |
treeio/treeio | treeio/finance/csvapi.py | 2 | 1449 | # encoding: utf-8
# Copyright 2011 Tree.io Limited
# This file is part of Treeio.
# License www.tree.io/license
"""
Import/Export Contacts API
"""
import csv
from django.http import HttpResponse
import StringIO
import datetime
class ProcessTransactions(object):
"Import/Export Contacts"
def export_transact... | mit | -5,004,105,069,990,892,000 | 30.5 | 116 | 0.672878 | false |
freevo/freevo2 | src/core/event.py | 1 | 5940 | # -*- coding: iso-8859-1 -*-
# -----------------------------------------------------------------------------
# event.py - Global events for Freevo
# -----------------------------------------------------------------------------
# $Id$
#
# -----------------------------------------------------------------------------
# Fr... | gpl-2.0 | 4,403,699,767,020,894,000 | 32 | 79 | 0.560269 | false |
jantman/python-mcollective | tests/unit/connector/test_stomp.py | 2 | 1197 | """
Tests for StompConnector
"""
import pytest
from pymco.connector import stomp
CONFIGSTR = '''
topicprefix = /topic/
collectives = mcollective
main_collective = mcollective
libdir = /path/to/plugins
logfile = /path/to/mcollective.log
loglevel = debug
daemonize = 0
identity = mco1
# Plugins
securityprovider = none
... | bsd-3-clause | 5,373,397,545,902,347,000 | 20.763636 | 82 | 0.734336 | false |
StefanoRaggi/Lean | Algorithm.Python/PandasDataFrameHistoryAlgorithm.py | 3 | 7375 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
#
# 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 Licen... | apache-2.0 | -252,864,504,842,198,980 | 47.84106 | 147 | 0.654508 | false |
lindycoder/netman | netman/core/objects/vlan.py | 1 | 1476 | # Copyright 2015 Internap.
#
# 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, so... | apache-2.0 | 5,296,037,036,328,892,000 | 42.411765 | 117 | 0.686992 | false |
ligovirgo/seismon | p_and_s/test_p_and_s.py | 2 | 2465 |
import os, sys
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize'] = (13, 8) if False else (10, 6)
from obspy.taup.taup import getTravelTimes
from obspy.core.util.geodetics import gps2DistAzimuth
from obspy.taup import TauPyModel
from seismon.eqm... | gpl-3.0 | 8,292,354,089,427,684,000 | 23.89899 | 111 | 0.691684 | false |
openstack/manila | manila/share/drivers/netapp/dataontap/cluster_mode/data_motion.py | 1 | 34061 | # Copyright (c) 2016 Alex Meade. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | -8,708,134,808,909,844,000 | 45.341497 | 79 | 0.566836 | false |
benjello/openfisca-france | openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/cotisations_sociales/contrat_professionnalisation.py | 1 | 5969 | # -*- coding: utf-8 -*-
from __future__ import division
from numpy import datetime64, timedelta64
from openfisca_france.model.base import * # noqa analysis:ignore
class professionnalisation(Variable):
column = BoolCol
entity_class = Individus
label = u"L'individu est en contrat de professionnalisati... | agpl-3.0 | -7,057,880,705,877,680,000 | 43.742424 | 120 | 0.645107 | false |
kingvuplus/ts-gui-3 | lib/python/Components/Pixmap.py | 38 | 3125 | from ConditionalWidget import ConditionalWidget
from GUIComponent import GUIComponent
from enigma import ePixmap, eTimer
from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN
from os import path
from skin import loadPixmap
class Pixmap(GUIComponent):
GUI_WIDGET = ePixmap
def getSize(self):
s = self.... | gpl-2.0 | -4,067,766,056,966,849,500 | 25.260504 | 117 | 0.6784 | false |
elgambitero/FreeCAD_sf_master | src/Mod/Ship/shipCapacityCurve/PlotAux.py | 16 | 5190 | #***************************************************************************
#* *
#* Copyright (c) 2011, 2012 *
#* Jose Luis Cercos Pita <jlcercos@gmail.com> *
#* ... | lgpl-2.1 | 160,937,239,777,189,220 | 40.528 | 76 | 0.493256 | false |
guthemberg/yanoama | yanoama/amen/system/runner.py | 1 | 2476 | from yanoama.amen.system.collector import system_info_collector, process_info_collector
from yanoama.amen.core import settings
from yanoama.amen.utils.dates import unix_utc_now
import sys
class Runner(object):
def __init__(self):
self.active_checks = settings.SYSTEM_CHECKS
#self.process_checks... | bsd-3-clause | 6,456,345,211,602,889,000 | 28.129412 | 88 | 0.550485 | false |
citrix-openstack-build/ceilometer | ceilometer/image/notifications.py | 3 | 3971 | # -*- encoding: utf-8 -*-
#
# Copyright © 2012 Red Hat, Inc
#
# Author: Eoghan Glynn <eglynn@redhat.com>
#
# 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/license... | apache-2.0 | 3,191,904,136,939,929,000 | 29.775194 | 75 | 0.607557 | false |
JasonHanG/tensor-gallery | cnn-text-classification/text_cnn.py | 2 | 3776 | import tensorflow as tf
import numpy as np
class TextCNN(object):
"""
A CNN for text classification.
Uses an embedding layer, followed by a convolutional, max-pooling and softmax layer.
"""
def __init__(
self, sequence_length, num_classes, vocab_size,
embedding_size, filter_sizes, num_... | apache-2.0 | 6,086,297,899,356,951,000 | 43.952381 | 101 | 0.562765 | false |
cogeorg/black_rhino | examples/degroot/networkx/algorithms/tests/test_dag.py | 20 | 5729 | #!/usr/bin/env python
from nose.tools import *
import networkx as nx
class TestDAG:
def setUp(self):
pass
def test_topological_sort1(self):
DG=nx.DiGraph()
DG.add_edges_from([(1,2),(1,3),(2,3)])
assert_equal(nx.topological_sort(DG),[1, 2, 3])
assert_equal(nx.topologica... | gpl-3.0 | -3,263,586,685,965,317,000 | 34.147239 | 79 | 0.575668 | false |
CiscoSystems/nova | nova/virt/xenapi/vm_utils.py | 1 | 103690 | # Copyright (c) 2010 Citrix Systems, Inc.
# Copyright 2011 Piston Cloud Computing, Inc.
# Copyright 2012 OpenStack Foundation
#
# 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
#
# ... | apache-2.0 | 2,891,476,081,493,106,700 | 36.829259 | 79 | 0.583615 | false |
taotie12010/bigfour | lms/djangoapps/discussion_api/tests/utils.py | 21 | 12908 | """
Discussion API test utilities
"""
import json
import re
import httpretty
def _get_thread_callback(thread_data):
"""
Get a callback function that will return POST/PUT data overridden by
response_overrides.
"""
def callback(request, _uri, headers):
"""
Simulate the thread creati... | agpl-3.0 | 2,143,241,298,417,913,000 | 34.756233 | 93 | 0.570189 | false |
crashtack/code-katas | src/distance.py | 1 | 1134 | def calculate_distance(point1, point2):
"""
Calculate the distance (in miles) between point1 and point2.
point1 and point2 must have the format [latitude, longitude].
The return value is a float.
Modified and converted to Python from: http://www.movable-type.co.uk/scripts/latlong.html
"""
i... | mit | -6,536,165,982,946,111,000 | 38.103448 | 101 | 0.641975 | false |
stefan-caraiman/cloudbase-init | cloudbaseinit/utils/debiface.py | 3 | 4325 | # Copyright 2014 Cloudbase Solutions Srl
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | 5,532,225,192,987,332,000 | 32.269231 | 78 | 0.577803 | false |
Dhivyap/ansible | lib/ansible/modules/cloud/amazon/aws_codepipeline.py | 5 | 11145 | #!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 | -3,009,924,253,532,782,000 | 35.421569 | 140 | 0.613279 | false |
ainafp/nilearn | nilearn/decoding/tests/test_searchlight.py | 1 | 2253 | """
Test the searchlight module
"""
# Author: Alexandre Abraham
# License: simplified BSD
from nose.tools import assert_equal
import numpy as np
import nibabel
from .. import searchlight
def test_searchlight():
# Create a toy dataset to run searchlight on
# Initialize with 4x4x4 scans of random values on 30... | bsd-3-clause | -3,541,917,900,307,912,000 | 33.661538 | 79 | 0.610297 | false |
ashishb/python_based_web_frontend_test | samples/flask_sample_code_test.py | 1 | 1177 | """An example of using frontend_testing_helper with flask as a sample framework.
The code will work with any framework, just modify the _GetEndpointsList
accordingly.
"""
import unittest
import flask_sample_code
import sys
import os
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'))
from... | mit | -2,917,197,306,074,032,000 | 23.020408 | 80 | 0.703483 | false |
SVoxel/R7800 | git_home/samba.git/third_party/waf/wafadmin/Tools/gas.py | 32 | 1108 | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2008 (ita)
"as and gas"
import os, sys
import Task
from TaskGen import extension, taskgen, after, before
EXT_ASM = ['.s', '.S', '.asm', '.ASM', '.spp', '.SPP']
as_str = '${AS} ${ASFLAGS} ${_ASINCFLAGS} ${SRC} -o ${TGT}'
Task.simple_task_type('asm', as_str, 'PIN... | gpl-2.0 | 1,019,404,871,725,606,500 | 28.945946 | 71 | 0.659747 | false |
mozilla-metrics/fhr-toolbox | mrjob/plugin-collection.py | 2 | 5996 | """
Collect plugin stats.
"""
import healthreportutils
from datetime import date, datetime, timedelta
import os, shutil, csv
import sys, codecs
import traceback
import mrjob
from mrjob.job import MRJob
import tempfile
try:
import simplejson as json
except ImportError:
import json
# How many days must a user... | apache-2.0 | 7,737,720,010,921,893,000 | 25.530973 | 87 | 0.564543 | false |
timvandermeij/drone-tomography | core/Import_Manager.py | 3 | 6502 | import importlib
import sys
import types
class Import_Manager(object):
"""
A manager for dynamically importing modules.
"""
def __init__(self):
"""
Initialize the import manager.
"""
self._package = __package__.split('.')[0]
self._unloaded_modules = {}
@pr... | gpl-3.0 | 955,164,929,699,004,200 | 38.168675 | 122 | 0.642264 | false |
maxfoow/MalmoExperience | Malmo-0.16.0-Windows-64bit/Python_Examples/tutorial_4_solved.py | 3 | 6528 | # ------------------------------------------------------------------------------------------------
# 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 Software ... | gpl-3.0 | -343,366,979,993,780,500 | 39.80625 | 203 | 0.580729 | false |
cedricp/ddt4all | crcmod/_crcfunpy.py | 1 | 2995 | #-----------------------------------------------------------------------------
# Low level CRC functions for use by crcmod. This version is implemented in
# Python for a couple of reasons. 1) Provide a reference implememtation.
# 2) Provide a version that can be used on systems where a C compiler is not
# available f... | gpl-3.0 | 1,332,846,799,121,102,800 | 33.425287 | 79 | 0.615025 | false |
albatrossandco/brubeck_cms | brubeck/core/emailing/recaptcha.py | 1 | 4463 | # CREDIT: http://smileychris.tactful.co.nz/ramblings/recaptcha/
from django.forms import *
from django.conf import settings
import httplib, urllib
class RecaptchaWidget(Widget):
def __init__(self, theme=None, tabindex=None):
'''
From http://recaptcha.net/apidocs/captcha/#look-n-feel:
theme: ... | bsd-3-clause | -1,978,053,276,252,926,500 | 34.141732 | 98 | 0.610576 | false |
leiferikb/bitpop | src/build/android/pylib/gtest/gtest_config.py | 9 | 1624 | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Configuration file for android gtest suites."""
# Add new suites here before upgrading them to the stable list below.
EXPERIMENTAL_TEST_SUITES = [
... | gpl-3.0 | -335,279,971,260,037,060 | 26.066667 | 75 | 0.687192 | false |
muennich/mupdf | scripts/cmapflatten.py | 1 | 3109 | # Parse a Uni* CMap file and flatten it.
#
# The Uni* CMap files only have 'cidchar' and 'cidrange' sections, never
# 'bfchar' or 'bfrange'.
import sys
def flattencmap(filename):
codespacerange = []
usecmap = ""
cmapname = ""
cmapversion = "1.0"
csi_registry = "(Adobe)"
csi_ordering = "(Unknown)"
csi_supplemen... | agpl-3.0 | 1,733,319,341,587,167,200 | 27.787037 | 85 | 0.628498 | false |
AlexanderFabisch/scikit-learn | sklearn/preprocessing/imputation.py | 29 | 14119 | # Authors: Nicolas Tresegnie <nicolas.tresegnie@gmail.com>
# License: BSD 3 clause
import warnings
import numpy as np
import numpy.ma as ma
from scipy import sparse
from scipy import stats
from ..base import BaseEstimator, TransformerMixin
from ..utils import check_array
from ..utils.fixes import astype
from ..utils... | bsd-3-clause | 8,555,956,253,983,739,000 | 36.650667 | 79 | 0.531907 | false |
OSEHRA-Sandbox/VistA | Scripts/SplitZWR.py | 1 | 3389 | #!/usr/bin/env python
# Split a .zwr files into pieces of maximum size:
#
# python SplitZWR.py --size <MiB> *.zwr
#
# or
#
# ls *.zwr | python SplitZWR.py --size <MiB> --stdin
#
#---------------------------------------------------------------------------
# Copyright 2011 The Open Source Electronic Health Record Age... | apache-2.0 | -6,671,641,364,911,628,000 | 33.232323 | 79 | 0.567129 | false |
RealTimeWeb/wikisite | MoinMoin/script/old/migration/12_to_13_mig02.py | 1 | 6493 | #!/usr/bin/env python
"""
migration from moin 1.3 < patch-78 to moin 1.3 >= patch-78
* switch quoting mechanism from (xx)(xx) to (xxxx)
* charset isn't changed, it was utf-8 before and will be utf-8 after
Steps for a successful migration:
1. stop your wiki and make a backup
2. make a co... | apache-2.0 | -4,561,852,729,684,848,000 | 36.316092 | 95 | 0.623287 | false |
jjmiranda/edx-platform | cms/envs/devstack_optimized.py | 23 | 1642 | """
Settings to run Studio in devstack using optimized static assets.
This configuration changes Studio to use the optimized static assets generated for testing,
rather than picking up the files directly from the source tree.
The following Paver command can be used to run Studio in optimized mode:
paver devstack s... | agpl-3.0 | 6,952,518,904,967,960,000 | 34.695652 | 91 | 0.721681 | false |
ahamilton55/ansible | lib/ansible/modules/system/ping.py | 29 | 2109 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by... | gpl-3.0 | -8,821,988,215,486,247,000 | 30.014706 | 96 | 0.675676 | false |
CanonicalLtd/subiquity | subiquitycore/models/network.py | 1 | 16975 | # Copyright 2015 Canonical, Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distribute... | agpl-3.0 | -9,217,052,195,006,354,000 | 30.552045 | 77 | 0.549691 | false |
YzPaul3/h2o-3 | h2o-py/h2o/estimators/deeplearning.py | 1 | 27113 | from .estimator_base import H2OEstimator
class H2ODeepLearningEstimator(H2OEstimator):
"""Build a supervised Deep Neural Network model
Builds a feed-forward multilayer artificial neural network on an H2OFrame
Parameters
----------
model_id : str, optional
The unique id assigne... | apache-2.0 | -5,524,750,572,744,844,000 | 30.749415 | 94 | 0.6408 | false |
yiheng/BigDL | spark/dl/src/test/resources/tf/models/temporal_convolution.py | 9 | 1651 | #
# Copyright 2016 The BigDL 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 ... | apache-2.0 | -6,083,195,665,722,011,000 | 35.711111 | 97 | 0.697759 | false |
mspark93/VTK | Rendering/Core/Testing/Python/TestOutOfRangeDiscretizableColorTransferFunction.py | 9 | 1421 | #!/usr/bin/env python
import sys
import vtk
from vtk.test import Testing
useBelowRangeColor = 0
if sys.argv.count("--useBelowRangeColor") > 0:
useBelowRangeColor = 1
useAboveRangeColor = 0
if sys.argv.count("--useAboveRangeColor") > 0:
useAboveRangeColor = 1
cmap = vtk.vtkDiscretizableColorTransferFunction()... | bsd-3-clause | -3,426,403,097,778,588,000 | 25.314815 | 50 | 0.790992 | false |
pyrocko/pyrocko | src/scenario/targets/gnss_campaign.py | 1 | 3991 | # http://pyrocko.org - GPLv3
#
# The Pyrocko Developers, 21st Century
# ---|P------/S----------~Lg----------
from __future__ import absolute_import, division, print_function
import logging
import os.path as op
import numpy as num
from pyrocko import gf, util
from pyrocko.guts import Float
from .base import TargetGen... | gpl-3.0 | 6,038,908,862,209,002,000 | 31.983471 | 86 | 0.614132 | false |
wxs/keras | tests/auto/test_loss_weighting.py | 31 | 5537 | from __future__ import absolute_import
from __future__ import print_function
import numpy as np
np.random.seed(1336) # for reproducibility
from keras.datasets import mnist
from keras.models import Sequential, Graph
from keras.layers.core import Dense, Activation
from keras.utils import np_utils
import unittest
nb_c... | mit | 4,567,960,397,381,501,000 | 41.922481 | 148 | 0.641864 | false |
Azure/azure-sdk-for-python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/__init__.py | 1 | 9184 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 8,691,949,672,866,523,000 | 41.915888 | 124 | 0.726699 | false |
spotify/luigi | luigi/retcodes.py | 8 | 4658 | # -*- coding: utf-8 -*-
#
# Copyright 2015-2015 Spotify AB
#
# 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... | apache-2.0 | 23,745,922,212,479,748 | 42.12963 | 104 | 0.646844 | false |
KennethNielsen/SoCo | setup.py | 1 | 2580 | #!/usr/bin/env python
import io
import re
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
# Code from here: https://pytest.org/latest/goodpractises.html
def finalize_options(self):
TestCommand.finalize_options(self)
... | mit | 3,196,205,863,717,753,000 | 28.318182 | 74 | 0.65155 | false |
mariusbaumann/pyload | module/plugins/internal/MultiHoster.py | 1 | 2415 | # -*- coding: utf-8 -*-
import re
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, replace_patterns, set_cookies
class MultiHoster(SimpleHoster):
__name__ = "MultiHoster"
__type__ = "hoster"
__version__ = "0.28"
__pattern__ = r'^unmatchable$'
__description__... | gpl-3.0 | -5,986,857,389,860,580,000 | 27.75 | 193 | 0.575983 | false |
denisff/python-for-android | python3-alpha/python3-src/Lib/idlelib/Debugger.py | 55 | 16368 | import os
import bdb
import types
from tkinter import *
from idlelib.WindowList import ListedToplevel
from idlelib.ScrolledList import ScrolledList
from idlelib import macosxSupport
class Idb(bdb.Bdb):
def __init__(self, gui):
self.gui = gui
bdb.Bdb.__init__(self)
def user_line(self, frame):... | apache-2.0 | 5,973,071,751,481,614,000 | 32.268293 | 79 | 0.539895 | false |
neumerance/cloudloon2 | openstack_dashboard/openstack/common/rpc/matchmaker_ring.py | 19 | 3692 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011-2013 Cloudscaling Group, Inc
#
# 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/licens... | apache-2.0 | 1,185,011,274,033,428,700 | 31.385965 | 78 | 0.626219 | false |
migue/voltdb | lib/python/voltcli/voltadmin.d/save.py | 1 | 3812 | # This file is part of VoltDB.
# Copyright (C) 2008-2017 VoltDB Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later ver... | agpl-3.0 | 7,709,832,698,870,177,000 | 41.355556 | 106 | 0.554302 | false |
weese/seqan | misc/seqan_instrumentation/py2exe/dist/classes/requests/packages/urllib3/util.py | 41 | 3789 | # urllib3/util.py
# Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from base64 import b64encode
try:
from select import poll, POLLIN
except ImportError: # `pol... | bsd-3-clause | 3,920,647,605,950,137,300 | 26.860294 | 79 | 0.604117 | false |
lemonade512/BluebonnetsPointsApp | bluebonnetspointsapp/lib/pbr/builddoc.py | 18 | 9083 | # Copyright 2011 OpenStack LLC.
# Copyright 2012-2013 Hewlett-Packard Development Company, L.P.
# 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
#
# htt... | gpl-3.0 | -130,640,983,658,371,090 | 38.491304 | 78 | 0.58582 | false |
marcusmueller/gnuradio | grc/core/generator/cpp_top_block.py | 3 | 14845 | import codecs
import yaml
import operator
import os
import tempfile
import textwrap
import re
from mako.template import Template
from .. import Messages, blocks
from ..Constants import TOP_BLOCK_FILE_MODE
from .FlowGraphProxy import FlowGraphProxy
from ..utils import expr_utils
from .top_block import TopBlockGenerato... | gpl-3.0 | 4,455,088,950,805,332,000 | 36.677665 | 119 | 0.567666 | false |
arante/pyloc | py2/cool-things/gvr_towers.py | 2 | 5500 | # hanoi.py
# Animated Towers of Hanoi using Tk with optional bitmap file in
# background.
#
# Usage: tkhanoi [n [bitmapfile]]
#
# n is the number of pieces to animate; default is 4, maximum 15.
#
# The bitmap file can be any X11 bitmap file (look in
# /usr/include/X11/bitmaps for samples); it is displayed as t... | gpl-3.0 | -3,750,815,699,398,943,000 | 35.414966 | 77 | 0.431455 | false |
sindhus/hasjob | alembic/versions/c55612fb52a_organization.py | 4 | 3065 | """Organization
Revision ID: c55612fb52a
Revises: 1fce9db567a5
Create Date: 2015-01-27 02:02:42.510116
"""
# revision identifiers, used by Alembic.
revision = 'c55612fb52a'
down_revision = '1fce9db567a5'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table('organization',
sa.C... | agpl-3.0 | 6,588,068,108,834,663,000 | 45.439394 | 116 | 0.647961 | false |
mjun/lightdm-gtk-greeter-settings | lightdm_gtk_greeter_settings/IconChooserDialog.py | 1 | 15171 | #!/usr/bin/env python
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
# LightDM GTK Greeter Settings
# Copyright (C) 2014 Andrew P. <pan.pav.7c5@gmail.com>, Matko Jun <matko.jun@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of... | gpl-3.0 | 5,935,098,429,966,021,000 | 46.707547 | 89 | 0.601674 | false |
correl/Transmission-XBMC | resources/lib/basictypes/debug.py | 2 | 1615 | """Logging facilities for basictypes
If the logging package (from Python 2.3) is available,
we use it for our logging needs, otherwise we use a
simplistic locally-defined class for logging.
"""
import traceback, cStringIO
def getException(error):
"""Get formatted exception"""
exception = str(error)
file = cStringIO... | mit | -3,817,802,577,678,520,300 | 27.333333 | 69 | 0.695975 | false |
brianmckinneyrocks/django-social-auth | social_auth/context_processors.py | 2 | 2963 | from social_auth.backends import BACKENDS
from social_auth.utils import group_backend_by_type
from social_auth.models import User
# Note: social_auth_backends and social_auth_by_type_backends don't play nice
# together
def social_auth_backends(request):
"""Load Social Auth current user data to context.
... | bsd-3-clause | 4,949,616,726,671,713,000 | 40.152778 | 80 | 0.673979 | false |
dededong/goblin-core | llvm/3.4.2/llvm-3.4.2.src/test/CodeGen/SystemZ/Large/branch-range-06.py | 10 | 3534 | # Test 64-bit COMPARE IMMEDIATE AND BRANCH in cases where the sheer number of
# instructions causes some branches to be out of range.
# RUN: python %s | llc -mtriple=s390x-linux-gnu | FileCheck %s
# Construct:
#
# before0:
# conditional branch to after0
# ...
# beforeN:
# conditional branch to after0
# main:
# ... | bsd-3-clause | -6,939,034,083,382,276,000 | 31.422018 | 77 | 0.575552 | false |
daherk2/authomatic | tests/functional_tests/expected_values/tumblr.py | 12 | 2365 | import re
import fixtures
import constants
from authomatic.providers import oauth1
conf = fixtures.get_configuration('tumblr')
CONFIG = {
'logout_url': 'https://www.tumblr.com/logout',
'login_xpath': '//*[@id="signup_email"]',
'password_xpath': '//*[@id="signup_password"]',
'consent_xpaths': [
... | mit | -5,752,121,557,341,079,000 | 29.333333 | 79 | 0.542072 | false |
foxscotch/advent-of-code | 2015/07/p1.py | 1 | 3009 | # god, this is so overkill
class Board:
def __init__(self, file):
self.instructions = []
self.wires = WireManager()
for line in file:
tokens = [int(i) if i.isdigit() else i.strip() for i in line.split(' ')]
self.instructions.append(Instruction(self, tokens))
... | mit | -3,724,423,761,786,651,000 | 26.605505 | 84 | 0.532403 | false |
anisku11/sublimeku | Packages/pygments/all/pygments/formatters/img.py | 25 | 18002 | # -*- coding: utf-8 -*-
"""
pygments.formatters.img
~~~~~~~~~~~~~~~~~~~~~~~
Formatter for Pixmap output.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import sys
from pygments.formatter import Formatter
from pygments.util import ge... | mit | -1,553,359,144,998,655,000 | 31.146429 | 84 | 0.546828 | false |
stickypants/asset_manager | pygal/graph/dot.py | 1 | 4294 | # -*- coding: utf-8 -*-
# This file is part of pygal
#
# A python svg graph plotting library
# Copyright © 2012-2016 Kozea
#
# 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... | gpl-3.0 | 8,052,539,895,964,645,000 | 32.80315 | 79 | 0.552294 | false |
blueburningcoder/nupic | src/nupic/regions/CLAClassifierRegion.py | 3 | 16974 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013-15, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditio... | agpl-3.0 | -7,845,002,573,289,658,000 | 33.016032 | 82 | 0.619006 | false |
tachang/python-saml | tests/src/OneLogin/saml2_tests/authn_request_test.py | 3 | 10526 | # -*- coding: utf-8 -*-
# Copyright (c) 2014, OneLogin, Inc.
# All rights reserved.
from base64 import b64decode
import json
from os.path import dirname, join, exists
import unittest
from urlparse import urlparse, parse_qs
from zlib import decompress
from onelogin.saml2.authn_request import OneLogin_Saml2_Authn_Requ... | bsd-3-clause | -3,479,289,380,598,456,000 | 45.575221 | 143 | 0.670055 | false |
marmyshev/transitions | openlp/plugins/songs/lib/xml.py | 1 | 34187 | # -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | gpl-2.0 | -371,223,998,917,800,600 | 39.076202 | 111 | 0.556121 | false |
nubark/odoo | addons/payment_paypal/models/paypal.py | 12 | 19220 | # -*- coding: utf-'8' "-*-"
import base64
import json
import logging
import urlparse
import werkzeug.urls
import urllib2
from openerp.addons.payment.models.payment_acquirer import ValidationError
from openerp.addons.payment_paypal.controllers.main import PaypalController
from openerp.osv import osv, fields
from opene... | gpl-3.0 | -5,452,991,303,755,321,000 | 45.650485 | 147 | 0.565088 | false |
pakit/recipes_bot | tests/conftest.py | 3 | 1284 | """
Used for pytest plugins & session scoped fixtures.
"""
from __future__ import absolute_import
import sys
import mock
import pytest
import tests.common as tc
@pytest.fixture(scope='session', autouse=True)
def setup_test_bed(request):
"""
Fixture sets up the testing environment for pakit as a whole.
Se... | bsd-3-clause | 199,374,408,169,850,370 | 21.526316 | 65 | 0.640966 | false |
Donkyhotay/MoonPy | zope/app/publication/tests/test_zopepublication.py | 1 | 20095 | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# T... | gpl-3.0 | -3,034,679,002,042,648,600 | 36.490672 | 79 | 0.639015 | false |
Subsets and Splits
Gradio Code Samples
Limits the results to entries containing the word 'gradio' in the repo_name, content, or path, providing a filtered subset of the dataset.