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 |
|---|---|---|---|---|---|---|---|---|---|---|
Fe-Nik-S/Examples | python/patterns/creational/singleton.py | 1 | 1822 | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
#
# ---------------------------------------------------------------------
# Copyright (C) 2017-2018 The --- Project
# See LICENSE for details
# ---------------------------------------------------------------------
from thre... | mit | 2,126,206,858,101,992,700 | 29.366667 | 81 | 0.503293 | false |
adamcataldo/djscrooge | djscrooge/test/test_backtest.py | 1 | 15608 | """This module contains tests for DJ Scrooge.backtest
Copyright (C) 2012 James Adam Cataldo
This file is part of DJ Scrooge.
DJ Scrooge 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 ver... | gpl-3.0 | -442,714,047,343,478,660 | 40.073684 | 111 | 0.656266 | false |
yubo/home | home/bin/cpu_layout.py | 12 | 3414 | #! /usr/bin/python
#
# BSD LICENSE
#
# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
# 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 sou... | bsd-3-clause | 8,854,649,513,363,191,000 | 34.936842 | 76 | 0.657879 | false |
facebook/redex | tools/redex-tool/DexSqlQuery.py | 1 | 5466 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import absolute_import, division, print_function, unicode_literals
import re
import readline
import sq... | mit | -8,815,785,326,148,254,000 | 25.533981 | 85 | 0.691731 | false |
wevial/bpython | bpython/curtsiesfrontend/_internal.py | 3 | 1432 | # The MIT License
#
# Copyright (c) 2015 the bpython authors.
#
# 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, mo... | mit | 4,714,385,712,208,538,000 | 35.717949 | 79 | 0.738128 | false |
mburakergenc/Malware-Detection-using-Machine-Learning | cuckoo/pymongo-2.3/test/version.py | 1 | 1757 | # Copyright 2009-2012 10gen, 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/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | mit | 7,790,474,325,405,512,000 | 30.945455 | 74 | 0.668754 | false |
cloudera/hue | desktop/core/ext-py/djangorestframework-3.9.4/rest_framework/serializers.py | 2 | 63441 | """
Serializers and ModelSerializers are similar to Forms and ModelForms.
Unlike forms, they are not constrained to dealing with HTML output, and
form encoded input.
Serialization in REST framework is a two-phase process:
1. Serializers marshal between complex types like model instances, and
python primitives.
2. The... | apache-2.0 | -309,876,545,545,363,800 | 38.209518 | 124 | 0.604231 | false |
alekz112/statsmodels | examples/incomplete/ols_tftest.py | 34 | 6022 | """examples for usage of F-test on linear restrictions in OLS
linear restriction is R \beta = 0
R is (nr,nk), beta is (nk,1) (in matrix notation)
TODO: clean this up for readability and explain
Notes
-----
This example was written mostly for cross-checks and refactoring.
"""
import numpy as np
import numpy.testing... | bsd-3-clause | 414,908,546,743,250,940 | 29.261307 | 76 | 0.622717 | false |
BjoernT/os-ansible-deployment | scripts/fastest-infra-wheel-mirror.py | 5 | 5798 | #!/usr/bin/env python
#
# Copyright 2016, Rackspace US, 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/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | -6,942,256,862,936,884,000 | 32.514451 | 86 | 0.62901 | false |
jkettleb/iris | lib/iris/tests/unit/concatenate/test__CubeSignature.py | 3 | 4173 | # (C) British Crown Copyright 2014 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | lgpl-3.0 | -8,123,088,833,642,687,000 | 40.316832 | 79 | 0.668344 | false |
nvbn/coviolations_web | nodes/jobs.py | 1 | 1040 | from time import sleep
from datetime import datetime
from django.conf import settings
from django_rq import job, get_scheduler
from .models import NodeTask
from .utils import logger
@job
def run_node_task(node_task_id):
"""Run node task"""
node_task = NodeTask.objects.get(id=node_task_id)
while True:
... | mit | -7,135,164,491,217,777,000 | 27.108108 | 77 | 0.669231 | false |
gamahead/nupic | tests/swarming/nupic/swarming/experiments/smart_speculation_temporal/permutations.py | 8 | 5495 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | gpl-3.0 | -8,919,874,114,350,982,000 | 36.896552 | 167 | 0.684622 | false |
level3apps/Slackbot-workout | slackbotExercise.py | 1 | 2694 | import random
import time
import requests
import json
import csv
USERTOKENSTRING = xoxp-4048962059-4053175444-6326525600-eeff8e # YOUR (SLACKBOT API) USER AUTH TOKEN
URLTOKENSTRING = wqGBjH75WjWHANSEvsija2Xz # SLACKBOT REMOTE CONTROL URL TOKEN
def extractSlackUsers(token):
# Set token parameter of Slack API cal... | mit | -9,191,955,172,860,912,000 | 34.447368 | 139 | 0.693022 | false |
dwweiss/pmLib | src/tool/isFunction.py | 1 | 1819 | """
Copyright (c) 2016-17 by Dietmar W Weiss
This is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 3.0 of
the License, or (at your option) any later version.
This softwar... | lgpl-3.0 | -7,967,177,817,288,146,000 | 25.984615 | 79 | 0.531611 | false |
adityacs/ansible | lib/ansible/modules/network/dellos6/dellos6_command.py | 13 | 7386 | #!/usr/bin/python
#
# (c) 2015 Peter Sprygada, <psprygada@ansible.com>
#
# Copyright (c) 2016 Dell Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either versi... | gpl-3.0 | 8,107,255,047,046,514,000 | 30.699571 | 83 | 0.648795 | false |
msmolens/girder | girder/utility/abstract_assetstore_adapter.py | 2 | 12838 | ###############################################################################
# Copyright 2013 Kitware 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.or... | apache-2.0 | -8,008,311,888,846,149,000 | 40.954248 | 80 | 0.624163 | false |
movmov/cc | nova/endpoint/images.py | 2 | 2659 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright [2010] [Anso Labs, 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
... | apache-2.0 | -5,872,870,043,559,011,000 | 28.21978 | 80 | 0.649116 | false |
espressif/esptool | test/test_espefuse.py | 1 | 10452 | #!/usr/bin/env python
#
# Tests for espefuse.py on ESP32
#
# IMPORTANT These are not designed to be run on a real ESP32 chip.
#
# If you force them to run on a real chip, you will corrupt
# the chip's efuses on the first run and not get any useful
# test results either.
#
# Connections:
# RTS (active low) to reset
# DT... | gpl-2.0 | -396,499,227,115,490,600 | 36.06383 | 120 | 0.571183 | false |
Margato/LocalToPastebin | localtopastebin.py | 1 | 2293 | import urllib.request, webbrowser, getopt, sys, os
key_file = "key.txt"
print("Welcome! Upload your files to pastebin easialy")
print("Using: " + str(sys.getdefaultencoding().upper()))
#Make a post on pastebin
def post(key, title, content):
pastebin_vars = dict(
api_option = "paste",
api_dev_key = ... | gpl-3.0 | 5,496,227,871,199,308,000 | 31.309859 | 94 | 0.598343 | false |
dhermes/bezier | tests/utils.py | 1 | 7535 | # 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, software
# distributed under t... | apache-2.0 | -6,946,328,837,140,309,000 | 29.630081 | 79 | 0.603451 | false |
cyberkm/cppcheck | addons/cert.py | 9 | 2741 | #/usr/bin/python
#
# Cert: Some extra CERT checkers
#
# Cppcheck itself handles many CERT rules. Cppcheck warns when there is undefined behaviour.
#
# Example usage of this addon (scan a sourcefile main.cpp)
# cppcheck --dump main.cpp
# python cert.py main.cpp.dump
import cppcheckdata
import sys
import re
def reportE... | gpl-3.0 | -8,293,674,980,000,295,000 | 33.696203 | 173 | 0.625319 | false |
charliequinn/python-litmos-api | tests/test_user.py | 1 | 4818 | from collections import OrderedDict
from unittest.mock import patch
from nose.tools import assert_true, eq_
from litmos import User
class TestUser:
@patch('litmos.litmos.API')
def test_deactivate(self, api_mock):
api_mock.update.return_value = True
user = User({'Id': 'wsGth', 'Active': True... | bsd-2-clause | -251,305,617,346,059,870 | 31.554054 | 86 | 0.407223 | false |
Spoken-tutorial/spoken-website | cron/spoken_search/MySQLdb/MySQLdb/cursors.py | 1 | 17287 | """MySQLdb Cursors
This module implements Cursors of various types for MySQLdb. By
default, MySQLdb uses the Cursor class.
"""
import re
import sys
try:
from types import ListType, TupleType, UnicodeType
except ImportError:
# Python 3
ListType = list
TupleType = tuple
UnicodeType = str
restr = r... | gpl-3.0 | 425,391,322,598,737,800 | 31.433396 | 84 | 0.579106 | false |
littlstar/chromium.src | chrome/common/extensions/docs/server2/object_store_creator.py | 57 | 3297 | # Copyright 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.
from cache_chain_object_store import CacheChainObjectStore
from environment import GetAppVersion
from memcache_object_store import MemcacheObjectStore
from t... | bsd-3-clause | 5,004,472,698,671,708,000 | 40.2125 | 80 | 0.656658 | false |
mjrulesamrat/django-edx-courseware | setup.py | 1 | 1141 | import os
from distutils.core import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
def package_data(pkg, roots):
"""Generic functi... | mit | 8,948,771,385,632,833,000 | 29.864865 | 84 | 0.659071 | false |
dejwoo/xp_project | apps/api/serializers.py | 2 | 5848 | from rest_framework import serializers
from django.contrib.auth.models import Permission
from apps.api.models import User, Gateway, Node, Swarm, RxInfo, TxInfo, Message
from django.utils import timezone
class GatewaySerializer(serializers.HyperlinkedModelSerializer):
user = serializers.SerializerMethodField()
... | mit | -7,402,365,093,229,246,000 | 41.376812 | 120 | 0.64894 | false |
dlazz/ansible | lib/ansible/modules/cloud/google/gcp_sql_database.py | 2 | 9784 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | gpl-3.0 | -6,078,557,041,252,832,000 | 29.104615 | 122 | 0.590147 | false |
vyscond/cocos | utest/pyglet_mockup1/pyglet/gl/__init__.py | 5 | 1417 | # gl
from __future__ import division, print_function, unicode_literals
GL_BLEND = 3042
GL_ZERO = 0 # /usr/include/GL/gl.h:147
GL_ONE = 1 # /usr/include/GL/gl.h:148
GL_SRC_COLOR = 768 # /usr/include/GL/gl.h:149
GL_ONE_MINUS_SRC_COLOR = 769 # /usr/include/GL/gl.h:150
GL_SRC_ALPHA = 770 # /usr/include/GL/gl.h:... | bsd-3-clause | -2,869,895,612,080,824,300 | 21.854839 | 65 | 0.648553 | false |
xbezdick/tempest | tempest/api/compute/keypairs/test_keypairs.py | 8 | 4594 | # Copyright 2012 OpenStack Foundation
# 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 requ... | apache-2.0 | -4,486,845,190,563,713,000 | 47.357895 | 78 | 0.628211 | false |
hail-is/hail | benchmark/python/benchmark_hail/run/linalg_benchmarks.py | 1 | 1521 | import hail as hl
from .utils import benchmark
@benchmark()
def block_matrix_nested_multiply():
bm = hl.linalg.BlockMatrix.random(8 * 1024, 8 * 1024).checkpoint(hl.utils.new_temp_file(extension='bm'))
path = hl.utils.new_temp_file(extension='bm')
((bm @ bm) @ bm @ bm @ (bm @ bm)).write(path, overwrite=Tr... | mit | 8,492,033,377,664,760,000 | 29.42 | 109 | 0.65812 | false |
sl2017/campos | campos_welcome/wizards/campos_group_signup.py | 1 | 5226 | # -*- coding: utf-8 -*-
# Copyright 2016 Stein & Gabelgaard ApS
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import api, fields, models, _
import logging
_logger = logging.getLogger(__name__)
print "loading Group"
class CamposGroupSignup(models.TransientModel):
_name = 'campos... | agpl-3.0 | -3,341,979,347,672,628,000 | 42.915966 | 152 | 0.551856 | false |
malkavi/Flexget | flexget/plugins/output/rtorrent_magnet.py | 3 | 2357 | import os
import re
from loguru import logger
from flexget import plugin
from flexget.event import event
logger = logger.bind(name='rtorrent_magnet')
pat = re.compile('xt=urn:btih:([^&/]+)')
class PluginRtorrentMagnet:
"""
Process Magnet URI's into rtorrent compatible torrent files
Magnet URI's will l... | mit | 7,386,389,694,063,488,000 | 32.671429 | 108 | 0.607128 | false |
oskgeek/smes | smes/settings.py | 1 | 2305 | """
Django settings for smes project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
impor... | apache-2.0 | -5,130,498,896,887,669,000 | 23.784946 | 71 | 0.716269 | false |
podemos-info/odoo | addons/crm_todo/crm_todo.py | 9 | 1377 | # -*- 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,671,978,128,812,349,000 | 34.307692 | 78 | 0.604212 | false |
labordoc/labordoc-next | modules/webtag/lib/webtag_config.py | 3 | 3031 | # -*- coding: utf-8 -*-
## This file is part of CDS Invenio.
## Copyright (C) 2013 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your opti... | gpl-2.0 | 2,203,568,903,581,554,000 | 29.29 | 80 | 0.660944 | false |
nikitakurylev/TuxemonX | tests/interactive/locale/verify_master_locale.py | 4 | 1517 | """
Do some basic checks of the DB to make sure translated string
have references in the master locale. translated strings are
defined by having a "_trans" suffix.
This isn't considered to be a comprehensive check
This is a very basic check right now. Files with missing locale strings
will be listed on the bottom. ... | gpl-3.0 | 8,730,314,803,928,321,000 | 28.173077 | 85 | 0.68029 | false |
fiddlerwoaroof/new_rl | libs/combat.py | 1 | 3556 | from . import dice
from .combat_parts import races
from .combat_parts import equipment
from .combat_parts import skills
from .combat_parts import constants as const
from src import events
eh = events.EventHandler()
import collections
import random
def get_stats(sum_):
stats = [sum_/4]*4
if sum(stats) != sum_:
s... | apache-2.0 | 8,121,855,556,381,624,000 | 25.736842 | 85 | 0.668166 | false |
simonemurzilli/geonode | geonode/groups/models.py | 24 | 9189 | import datetime
import hashlib
from django.conf import settings
from django.contrib.auth.models import Group
from django.contrib.auth import get_user_model
from django.db import models, IntegrityError
from django.utils.translation import ugettext_lazy as _
from django.db.models import signals
from django.contrib.sites... | gpl-3.0 | -5,034,094,155,438,188,000 | 33.159851 | 116 | 0.595168 | false |
grimfang/panda3d | direct/src/interval/ParticleInterval.py | 9 | 4841 | """
Contains the ParticleInterval class
"""
__all__ = ['ParticleInterval']
from panda3d.core import *
from panda3d.direct import *
from direct.directnotify.DirectNotifyGlobal import directNotify
from .Interval import Interval
class ParticleInterval(Interval):
"""
Use this interval when you want to have grea... | bsd-3-clause | -8,522,300,072,208,549,000 | 33.827338 | 70 | 0.573229 | false |
broferek/ansible | lib/ansible/modules/crypto/acme/acme_certificate_revoke.py | 13 | 9551 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016 Michael Gruener <michael.gruener@chaosmoon.net>
# 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_versio... | gpl-3.0 | -8,111,532,834,494,018,000 | 41.793722 | 123 | 0.642356 | false |
leb2dg/osf.io | api_tests/users/views/test_user_files_list.py | 1 | 4625 | # -*- coding: utf-8 -*-
import pytest
from osf_tests.factories import AuthUserFactory
from api.base.settings.defaults import API_BASE
from osf.models import QuickFilesNode
from addons.osfstorage.models import OsfStorageFile
from website import util as website_utils
@pytest.fixture()
def user():
return AuthUserFa... | apache-2.0 | 4,862,686,246,585,153,000 | 34.037879 | 91 | 0.622486 | false |
google-research/google-research | state_of_sparsity/sparse_transformer/layers/sparse_modalities.py | 1 | 9887 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | -7,525,048,661,079,278,000 | 34.952727 | 80 | 0.657935 | false |
wearpants/osf.io | api/base/renderers.py | 20 | 1607 | import re
from rest_framework.renderers import JSONRenderer, BrowsableAPIRenderer, StaticHTMLRenderer
class JSONRendererWithESISupport(JSONRenderer):
format = 'json'
media_type = 'application/json'
def render(self, data, accepted_media_type=None, renderer_context=None):
# TODO: There should be a... | apache-2.0 | 8,705,993,758,676,825,000 | 35.522727 | 121 | 0.681394 | false |
ofrobots/grpc | src/python/grpcio_test/grpc_protoc_plugin/beta_python_plugin_test.py | 8 | 19824 | # Copyright 2015, Google 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 code must retain the above copyright
# notice, this list of conditions and the f... | bsd-3-clause | 8,872,153,838,065,637,000 | 38.568862 | 79 | 0.707224 | false |
dmshynk/qTox | tools/update-server/deployUpdateS3.py | 35 | 1544 | #!/usr/bin/python2.7
# This script deploys a qTox update to Amazon S3: It will upload ./qtox/win32/version, ./qtox/win32/flist, and ./qtox/win32/files/*
# Pass the path to the root of the local update server as argument, no spaces allowed
import sys
import os
import boto
from boto.s3.key import Key
# Check our local... | gpl-3.0 | 8,950,217,975,912,992,000 | 26.571429 | 131 | 0.733161 | false |
coderjames/pascal | quex-0.63.1/quex/engine/state_machine/check/outrun.py | 1 | 7199 | from quex.engine.misc.tree_walker import TreeWalker
def do(High, Low):
"""Check whether lower priority pattern 'Low' can outrun by length a
pattern 'High' even though 'High' has matched.
EXAMPLE: High: print
Low: [a-z]+
If a stream contains "printer", then 'Low... | bsd-2-clause | -3,398,871,572,496,313,300 | 41.597633 | 91 | 0.60564 | false |
partofthething/home-assistant | homeassistant/components/statistics/sensor.py | 11 | 12642 | """Support for statistics for sensor values."""
from collections import deque
import logging
import statistics
import voluptuous as vol
from homeassistant.components.recorder.models import States
from homeassistant.components.recorder.util import execute, session_scope
from homeassistant.components.sensor import PLAT... | mit | 5,535,344,987,258,458,000 | 34.711864 | 88 | 0.587961 | false |
MGautier/Programacion | Python/excepciones.py | 1 | 1050 | #!/usr/bin/env python
def division(a, b):
return a / b
def calcular():
division(1, 0)
#calcular()
try:
f = file("archivo.txt")
except:
print "El archivo no existe"
try:
num = int("3a")
print no_existe
except NameError:
print "La variable no existe"
except ValueError:
print "El valo... | mit | -587,490,334,447,726,300 | 16.5 | 69 | 0.646667 | false |
walterreade/scikit-learn | sklearn/linear_model/randomized_l1.py | 9 | 24350 | """
Randomized Lasso/Logistic: feature selection based on Lasso and
sparse Logistic Regression
"""
# Author: Gael Varoquaux, Alexandre Gramfort
#
# License: BSD 3 clause
import itertools
from abc import ABCMeta, abstractmethod
import warnings
import numpy as np
from scipy.sparse import issparse
from scipy import spar... | bsd-3-clause | 6,561,732,919,490,992,000 | 36.693498 | 79 | 0.606653 | false |
elkingtonmcb/h2o-2 | py/testdir_0xdata_only/sphere_gen.py | 11 | 6466 | import time, sys, random, math
sys.path.extend(['.','..','py'])
# a truly uniform sphere
# http://stackoverflow.com/questions/5408276/python-uniform-spherical-distribution
# he offers the exact solution: http://stackoverflow.com/questions/918736/random-number-generator-that-produces-a-power-law-distribution/918782#918... | apache-2.0 | 1,314,639,824,918,960,400 | 34.922222 | 150 | 0.601763 | false |
jpaalasm/pyglet | pyglet/app/cocoa.py | 26 | 7342 | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributi... | bsd-3-clause | -1,832,352,901,570,919,200 | 39.120219 | 124 | 0.63702 | false |
OriHoch/Open-Knesset | links/templatetags/links_tags.py | 5 | 1043 | from django import template
from django.conf import settings
from django.core.cache import cache
from links.models import Link
register = template.Library()
@register.inclusion_tag('links/_object_links.html')
def object_links(obj):
if hasattr(obj, 'cached_links'):
obj_links = obj.cached_links
else:
... | bsd-3-clause | 3,343,736,866,535,482,400 | 34.965517 | 80 | 0.66443 | false |
atopuzov/nitro-python | nssrc/com/citrix/netscaler/nitro/resource/config/ssl/sslfipssimsource.py | 3 | 4689 | #
# Copyright (c) 2008-2015 Citrix Systems, 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/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | -5,072,115,162,506,856,000 | 31.337931 | 147 | 0.715078 | false |
yasoob/youtube-dl-GUI | youtube_dl/extractor/srmediathek.py | 11 | 2324 | # coding: utf-8
from __future__ import unicode_literals
from .ard import ARDMediathekBaseIE
from ..utils import (
ExtractorError,
get_element_by_attribute,
)
class SRMediathekIE(ARDMediathekBaseIE):
IE_NAME = 'sr:mediathek'
IE_DESC = 'Saarländischer Rundfunk'
_VALID_URL = r'https?://sr-mediathek(... | mit | 3,431,648,843,288,985,000 | 38.322034 | 289 | 0.58319 | false |
frantony/picotcp | test/python/howto.py | 4 | 4677 | #PicoTCP topology test environment.
#Guidelines to prepare test scenarios.
#
#The interface is simple, it has three objects:
# * Topology
# * Network
# * Host
#
#And a handful of helping routines, such as:
# * start()
# * loop()
# * sleep()
# * wait()
#
#
################################################################... | gpl-2.0 | 3,759,567,605,272,558,600 | 33.644444 | 82 | 0.494334 | false |
Azure/azure-sdk-for-python | sdk/cognitiveservices/azure-cognitiveservices-vision-computervision/setup.py | 1 | 3107 | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | mit | -6,017,479,527,574,313,000 | 33.522222 | 91 | 0.604442 | false |
JioCloud/python-novaclient | novaclient/v3/volumes.py | 4 | 2738 | # Copyright 2013 IBM Corp.
#
# 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 t... | apache-2.0 | 6,118,192,535,623,998,000 | 35.506667 | 79 | 0.623448 | false |
carze/cutlass | cutlass/__init__.py | 2 | 1533 | from .iHMPSession import iHMPSession
from .AbundanceMatrix import AbundanceMatrix
from .Annotation import Annotation
from .ClusteredSeqSet import ClusteredSeqSet
from .Cytokine import Cytokine
from .HostSeqPrep import HostSeqPrep
from .HostAssayPrep import HostAssayPrep
from .HostEpigeneticsRawSeqSet import HostEpigene... | mit | 6,546,312,316,963,880,000 | 40.432432 | 74 | 0.875408 | false |
chenhuacai/ltp | testcases/realtime/func/pi-tests/parse-testpi1.py | 5 | 2759 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
################################################################################
## ##
## Copyright © International Business Machines Corp., 2007, 2008 ##
## ... | gpl-2.0 | 3,010,333,364,479,484,000 | 44.966667 | 85 | 0.420232 | false |
mortonjt/scipy | scipy/special/utils/datafunc.py | 101 | 1893 | from __future__ import division, print_function, absolute_import
import csv
import numpy as np
def parse_txt_data(filename):
f = open(filename)
try:
reader = csv.reader(f, delimiter=',')
data = []
for row in reader:
data.append(list(map(float, row)))
nc = len(data... | bsd-3-clause | 1,825,769,388,117,305,600 | 26.838235 | 82 | 0.505547 | false |
saurabh6790/aimobilize-app-backup | hr/doctype/salary_slip/test_salary_slip.py | 30 | 2829 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import webnotes
import unittest
class TestSalarySlip(unittest.TestCase):
def setUp(self):
webnotes.conn.sql("""delete from `tabLeave Application`""")
webnotes.conn.sql("""delete from ... | agpl-3.0 | -3,820,775,878,031,173,600 | 31.159091 | 100 | 0.686462 | false |
huggingface/pytorch-transformers | examples/research_projects/rag/finetune_rag.py | 1 | 25793 | """Finetuning script for RAG models. Adapted from examples.seq2seq.finetune.py"""
import argparse
import logging
import os
import sys
import time
from collections import defaultdict
from pathlib import Path
from typing import Any, Dict, List, Tuple
import numpy as np
import pytorch_lightning as pl
import torch
import... | apache-2.0 | 7,341,932,074,446,851,000 | 40.202875 | 197 | 0.623309 | false |
aucor/servo | servo/forms/admin.py | 1 | 3660 | # coding=utf-8
from django import forms
from django.utils.translation import ugettext as _
from servo.models.common import *
from servo.models.account import UserProfile
class QueueForm(forms.ModelForm):
class Meta:
model = Queue
exclude = ('statuses', )
widgets = {'description': forms.Te... | bsd-2-clause | -6,275,058,563,640,240,000 | 33.471698 | 78 | 0.63711 | false |
wschwa/Mr-Orange-Sick-Beard | sickbeard/notifiers/trakt.py | 49 | 2920 | # Author: Dieter Blomme <dieterblomme@gmail.com>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 ... | gpl-3.0 | 7,912,298,045,116,102,000 | 31.087912 | 118 | 0.605822 | false |
ForeverWintr/metafunctions | metafunctions/tests/test_pipe.py | 1 | 8995 | import unittest
from unittest import mock
import functools
import itertools
from metafunctions.tests.util import BaseTestCase
from metafunctions.tests.simple_nodes import *
from metafunctions.api import node
from metafunctions.api import locate_error
from metafunctions.api import bind_call_state
from metafunctions.cor... | mit | -3,679,693,612,616,860,700 | 28.016129 | 100 | 0.519956 | false |
damianam/easybuild-framework | test/framework/yeb.py | 3 | 7120 | # #
# Copyright 2015-2017 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://www.vscentrum.be),
# Flemish Research Foundation (... | gpl-2.0 | -6,470,833,589,355,053,000 | 36.083333 | 125 | 0.616573 | false |
lfz/Guided-Denoise | Attackset/Iter4_ensv3_resv2_inresv2_random/attack_iter.py | 4 | 10791 | """Implementation of sample attack."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import numpy as np
from scipy.misc import imread
from scipy.misc import imsave
from nets import inception_v3, inception_v4, inception_resnet_v2, resnet_v2
fro... | apache-2.0 | -1,902,817,908,639,203,000 | 37.539286 | 121 | 0.630711 | false |
amolenaar/gaphas | examples/simple-box.py | 1 | 1701 | #!/usr/bin/env python
"""A simple example containing two boxes and a line."""
import gi
# fmt: off
gi.require_version("Gtk", "4.0") # noqa: isort:skip
from gi.repository import Gtk # noqa: isort:skip
from gaphas import Canvas, GtkView, Line # noqa: isort:skip
from gaphas.tool import hover_tool, item_tool, scroll_to... | lgpl-2.1 | 7,114,792,557,776,170,000 | 26 | 105 | 0.667842 | false |
echoi/snac_bmi | pythia-0.8/packages/blade/blade/components/Blade.py | 2 | 2667 | #!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Michael A.G. Aivazis
# California Institute of Technology
# (C) 1998-2005 All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~... | gpl-2.0 | -4,869,891,260,756,174,000 | 22.60177 | 88 | 0.517435 | false |
brianjgeiger/osf.io | addons/gitlab/migrations/0003_add_schemes_to_schemeless_hosts.py | 15 | 1147 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-07-16 18:14
from __future__ import unicode_literals
import logging
from django.db import migrations
logger = logging.getLogger(__name__)
def add_http_scheme_to_gitlab_host(apps, schema_editor):
ExternalAccount = apps.get_model('osf', 'ExternalAccount... | apache-2.0 | -2,670,820,600,861,143,600 | 34.84375 | 112 | 0.6966 | false |
jachan/Hallways | python_client/hallways/fingerprint.py | 2 | 3352 | import collections
import json
from .frozendict import frozendict
from .location import Location
import numpy
# TODO: use continuous stats or not if it doesn't help performance that much
#from .mystats import ContinuousStats
class NetworkRecord(collections.namedtuple('NetworkRecord', ['m', 'strength_avg', 'strength_st... | gpl-2.0 | -383,108,430,799,248,260 | 38.904762 | 152 | 0.642303 | false |
rasca/django-mailer | mailer/__init__.py | 31 | 3337 | VERSION = (0, 2, 0, "a", 1) # following PEP 386
DEV_N = 3
def get_version():
version = "%s.%s" % (VERSION[0], VERSION[1])
if VERSION[2]:
version = "%s.%s" % (version, VERSION[2])
if VERSION[3] != "f":
version = "%s%s%s" % (version, VERSION[3], VERSION[4])
if DEV_N:
vers... | mit | 1,956,454,847,949,886,200 | 31.086538 | 93 | 0.615223 | false |
ProjectSWGCore/NGECore2 | scripts/equipment/bonus_sets/set_bonus_bh_dps.py | 2 | 1359 | import sys
from services.equipment import BonusSetTemplate
from java.util import Vector
def addBonusSet(core):
bonusSet = BonusSetTemplate("set_bonus_bh_dps")
bonusSet.addRequiredItem("item_band_set_bh_dps_01_01")
bonusSet.addRequiredItem("item_ring_set_bh_dps_01_01")
bonusSet.addRequiredItem("item_necklace_set_... | lgpl-3.0 | -2,963,397,524,620,089,300 | 42.870968 | 79 | 0.776306 | false |
andreparrish/python-for-android | python3-alpha/python3-src/Lib/nntplib.py | 45 | 41473 | """An NNTP client class based on:
- RFC 977: Network News Transfer Protocol
- RFC 2980: Common NNTP Extensions
- RFC 3977: Network News Transfer Protocol (version 2)
Example:
>>> from nntplib import NNTP
>>> s = NNTP('news')
>>> resp, count, first, last, name = s.group('comp.lang.python')
>>> print('Group', name, 'ha... | apache-2.0 | 4,782,849,569,568,577,000 | 36.668483 | 96 | 0.581752 | false |
r39132/airflow | tests/contrib/hooks/test_spark_jdbc_hook.py | 3 | 4919 | # -*- 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 | -6,558,302,357,396,721,000 | 34.135714 | 88 | 0.582842 | false |
cvegaj/ElectriCERT | cert-tools/cert_tools/create_v2_certificate_template.py | 1 | 7018 | #!/usr/bin/env python
'''
Creates a certificate template with merge tags for recipient/assertion-specific data.
'''
import json
import os
import uuid
import configargparse
from cert_tools import helpers
from cert_tools import jsonpath_helpers
from cert_schema import *
from cert_schema.model import scope_name
OPEN_... | gpl-3.0 | -2,832,019,978,547,410,400 | 35.743455 | 108 | 0.641066 | false |
ArthurGarnier/SickRage | lib/guessit/rules/common/words.py | 11 | 2504 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Words utils
"""
from collections import namedtuple
from . import seps
_Word = namedtuple('_Word', ['span', 'value'])
def iter_words(string):
"""
Iterate on all words in a string
:param string:
:type string:
:return:
:rtype: iterable[str]
... | gpl-3.0 | 206,782,977,460,223,680 | 30.696203 | 94 | 0.492412 | false |
nugget/home-assistant | homeassistant/components/sensor/deutsche_bahn.py | 2 | 3654 | """Support for information about the German train system."""
from datetime import timedelta
import logging
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
import homeassistant.util... | apache-2.0 | 3,503,610,764,172,588,000 | 31.052632 | 77 | 0.619869 | false |
safwanrahman/linuxdesh | kitsune/forums/views.py | 4 | 18000 | import logging
from datetime import datetime
from django.core.exceptions import PermissionDenied
from django.http import HttpResponseRedirect, Http404
from django.shortcuts import get_object_or_404, render
from django.views.decorators.http import require_POST
from authority.decorators import permission_required_or_40... | bsd-3-clause | -7,680,286,777,308,829,000 | 35.585366 | 79 | 0.614222 | false |
pescobar/easybuild-easyblocks | easybuild/easyblocks/s/suitesparse.py | 1 | 9619 | ##
# Copyright 2009-2019 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://www.vscentrum.be),
# Flemish Research Foundation (F... | gpl-2.0 | -3,555,938,976,828,414,500 | 41.561947 | 115 | 0.583325 | false |
ray-project/ray | python/ray/util/sgd/tf/tf_runner.py | 1 | 5189 | import logging
import json
import os
import ray
from ray.util.sgd import utils
logger = logging.getLogger(__name__)
def _try_import_strategy():
"""Late import for Tesnorflow"""
import tensorflow as tf
return tf.distribute.experimental.MultiWorkerMirroredStrategy
class TFRunner:
"""Manages a Tensor... | apache-2.0 | 7,527,702,541,064,756,000 | 32.694805 | 80 | 0.587975 | false |
Aloomaio/googleads-python-lib | examples/ad_manager/v201811/content_service/get_all_content.py | 1 | 1743 | #!/usr/bin/env python
#
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 | 3,134,855,379,839,378,400 | 34.571429 | 77 | 0.719449 | false |
sassman/ansible-modules-core | system/service.py | 2 | 52336 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of... | gpl-3.0 | -3,571,970,668,296,332,300 | 37.20146 | 141 | 0.554055 | false |
mountain213/neo4jworkshop | REST_clients/Python_client/neo4jrestclient/tests/test_ipython.py | 1 | 2762 | # -*- coding: utf-8 -*-
import unittest
import os
from neo4jrestclient import client
from neo4jrestclient import query
NEO4J_URL = os.environ.get('NEO4J_URL', "http://localhost:7474/db/data/")
NEO4J_VERSION = os.environ.get('NEO4J_VERSION', None)
class GraphDatabaseTesCase(unittest.TestCase):
def setUp(self):
... | mit | -3,943,099,777,802,229,000 | 39.028986 | 75 | 0.599928 | false |
qkitgroup/qkit | qkit/analysis/qfit.py | 1 | 42711 | # qfit.py
# based on dat_reader.py and data_optimizer.py by JB@KIT,
# 2015-2018 by JB@KIT and the qkit team
# data reading and fitting
# import and basic usage
'''
usage:
.. code-block:: python
from qkit import qfit as qfit
qf = qfit.QFIT()
qf.load('data/file.h5', entries=['time', 'phase'])
qf.rota... | gpl-2.0 | -7,144,015,098,114,493,000 | 46.936027 | 274 | 0.545925 | false |
emetsger/osf.io | tests/test_registrations/test_retractions.py | 2 | 39485 | """Tests related to retraction of public registrations"""
import datetime
import httplib as http
import mock
from nose.tools import * # noqa
from modularodm.exceptions import ValidationValueError
from modularodm import Q
from framework.auth import Auth
from framework.exceptions import PermissionsError
from tests.b... | apache-2.0 | 5,141,338,124,581,422,000 | 44.229095 | 117 | 0.687223 | false |
eHealthAfrica/formhub | odk_logger/migrations/0005_auto__add_field_xform_xls__add_field_xform_json__add_field_xform_share.py | 7 | 7335 | # encoding: 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 field 'XForm.xls'
db.add_column('odk_logger_xform', 'xls', self.gf('django.db.models.fields.files... | bsd-2-clause | 1,330,180,320,712,008,200 | 65.681818 | 182 | 0.555692 | false |
Xaltotun/conan | conans/test/model/version_test.py | 3 | 1479 | import unittest
from conans.model.version import Version
class VersionTest(unittest.TestCase):
def simple_test(self):
v1 = Version("1.2.3")
self.assertTrue(v1 == "1.2.3")
self.assertTrue(v1 > "1.1")
self.assertTrue(v1 > None)
self.assertTrue(v1 < "1.11")
self.asser... | mit | 4,172,866,862,984,020,500 | 38.972973 | 68 | 0.56998 | false |
chrislit/abydos | tests/distance/test_distance_unknown_l.py | 1 | 4960 | # Copyright 2019-2020 by Christopher C. Little.
# This file is part of Abydos.
#
# Abydos 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 versio... | gpl-3.0 | -5,004,158,655,528,600,000 | 38.365079 | 77 | 0.610484 | false |
bigartm/visartm | accounts/urls.py | 1 | 1072 | from django.conf.urls import url
import accounts.views as accounts_views
import django.contrib.auth.views as auth_views
urlpatterns = [
url(r'^login', accounts_views.login_view),
url(r'^logout', accounts_views.logout_view),
url(r'^signup', accounts_views.signup),
url(r'^sendmail', accounts_views.sendma... | bsd-3-clause | 353,011,019,570,136,300 | 43.666667 | 79 | 0.671642 | false |
sumedhasingla/VTK | Filters/General/Testing/Python/WarpScalarImage.py | 20 | 1081 | #!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# create a rendering window
renWin = vtk.vtkRenderWindow()
renWin.SetMultiSamples(0)
renWin.SetSize(200, 200)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
w... | bsd-3-clause | -6,369,410,655,784,804,000 | 20.62 | 50 | 0.788159 | false |
flamusdiu/oauthlib | tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py | 27 | 4860 | """Ensure credentials are preserved through the authorization.
The Authorization Code Grant will need to preserve state as well as redirect
uri and the Implicit Grant will need to preserve state.
"""
from __future__ import absolute_import, unicode_literals
import json
import mock
from .test_utils import get_query_cre... | bsd-3-clause | -4,758,780,568,565,426,000 | 40.896552 | 95 | 0.650206 | false |
WebDevLabs-SVNIT/ProjectX | projectx/projectx/settings.py | 1 | 3608 | """
Django settings for projectx project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
i... | mit | -4,555,975,049,339,582,000 | 24.237762 | 74 | 0.707594 | false |
Mikk36/OctoPrint | src/octoprint/settings.py | 7 | 34980 | # coding=utf-8
"""
This module represents OctoPrint's settings management. Within this module the default settings for the core
application are defined and the instance of the :class:`Settings` is held, which offers getter and setter
methods for the raw configuration values as well as various convenience methods to acc... | agpl-3.0 | -4,827,639,119,565,027,000 | 31.537674 | 186 | 0.658585 | false |
bitmazk/django-multilingual-events | multilingual_events/south_migrations/0006_auto.py | 1 | 6827 | # flake8: noqa
# -*- 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 M2M table for field placeholders on 'Event'
db.create_table('multilingual_events_eve... | mit | -4,060,278,127,915,013,000 | 65.931373 | 182 | 0.56423 | false |
caseyching/Impala | shell/ext-py/prettytable-0.7.1/prettytable.py | 31 | 52964 | #!/usr/bin/env python
#
# Copyright (c) 2009-2013, Luke Maurits <luke@maurits.id.au>
# All rights reserved.
# With contributions from:
# * Chris Clark
# * Klein Stephane
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:... | apache-2.0 | -8,737,255,815,158,947,000 | 35.577348 | 207 | 0.570369 | false |
colossalbit/cssypy | docs/source/conf.py | 1 | 7414 | # -*- coding: utf-8 -*-
#
# CSSyPy documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 17 20:15:21 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All ... | bsd-3-clause | 3,555,235,229,828,823,000 | 32.098214 | 148 | 0.709334 | false |
dxq-git/pyHTTP2 | pyHTTP2/client.py | 2 | 1346 | from connection import Connection
from threading import Thread
import socket
from settings import *
import ssl
from frame import *
from urlparse import urlparse
class Client(Connection):
def __init__(self, addr, enable_tls = False, debug = False):
if enable_tls:
self.sock = socket.socket(socket... | mit | 5,607,293,063,314,374,000 | 30.302326 | 78 | 0.595097 | false |
straup/buildingequalsyes | tilestache/mapequalsyes/mapquest/xapi.py | 1 | 4736 | # This is a snapshot from June 2011 of:
# https://github.com/straup/py-mapquest
"""
Copyright (c) 2011 Stamen Design
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, inclu... | bsd-2-clause | -2,194,888,724,312,530,400 | 25.757062 | 111 | 0.526394 | false |
ronakkhunt/kuma | kuma/authkeys/views.py | 31 | 1786 | from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404, render, redirect
from django.contrib.auth.decorators import login_required, permission_required
from kuma.core.utils import paginate
from .models import Key
from .forms import KeyForm
ITEMS_PER_PAGE = 15
@login_req... | mpl-2.0 | -4,287,115,857,781,773,300 | 28.278689 | 78 | 0.659015 | 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.