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 |
|---|---|---|---|---|---|---|---|---|---|---|
MathieuDuponchelle/meson | mesonbuild/environment.py | 1 | 54236 | # Copyright 2012-2016 The Meson development team
# 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 agree... | apache-2.0 | 4,455,378,164,143,387,600 | 39.294205 | 238 | 0.577992 | false |
pratikmallya/hue | desktop/core/ext-py/Django-1.6.10/tests/initial_sql_regress/tests.py | 58 | 1614 | from django.core.management.color import no_style
from django.core.management.sql import custom_sql_for_model
from django.db import connections, DEFAULT_DB_ALIAS
from django.test import TestCase
from django.test.utils import override_settings
from .models import Simple
class InitialSQLTests(TestCase):
"""
Th... | apache-2.0 | -3,805,768,718,060,124,000 | 33.340426 | 75 | 0.64684 | false |
dmlc/tvm | tests/python/topi/python/test_topi_space_to_batch_nd.py | 2 | 2735 | # 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
# "License"); you may not u... | apache-2.0 | 3,991,019,436,631,475,700 | 36.986111 | 91 | 0.648995 | false |
jnishi/chainer | chainermn/extensions/checkpoint.py | 3 | 11305 | import errno
import os
import shutil
import tempfile
import time
import chainer
from chainer.training import extension
from chainer.utils import experimental
def create_multi_node_checkpointer(name, comm, cp_interval=5,
gc_interval=5, path=None):
'''Create multi-node checkpoint... | mit | 5,000,558,271,333,339,000 | 33.051205 | 79 | 0.602388 | false |
jelugbo/hebs_master | common/djangoapps/student/migrations/0029_add_lookup_table_between_user_and_anonymous_student_id.py | 58 | 16365 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'AnonymousUserId'
db.create_table('student_anonymoususerid', (
('id', self.gf('dj... | agpl-3.0 | -3,987,283,680,103,319,600 | 83.360825 | 182 | 0.551421 | false |
MacHu-GWU/angora-project | angora/algorithm/iterable.py | 1 | 19421 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module description
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module offer high performance and memory efficient looping toolset.
Usually we process elements one at a time rather than bringing the whole
iterable into memory al... | mit | 4,980,238,713,925,286,000 | 29.044304 | 89 | 0.510771 | false |
Edraak/edraak-platform | lms/djangoapps/courseware/tests/test_course_tools.py | 13 | 4261 | """
Unit tests for course tools.
"""
import crum
import datetime
from mock import patch
from nose.plugins.attrib import attr
import pytz
from django.test import RequestFactory
from course_modes.models import CourseMode
from course_modes.tests.factories import CourseModeFactory
from courseware.course_tools import Ver... | agpl-3.0 | -7,225,594,421,601,068,000 | 39.580952 | 93 | 0.721896 | false |
lin-credible/scikit-learn | examples/svm/plot_svm_scale_c.py | 223 | 5375 | """
==============================================
Scaling the regularization parameter for SVCs
==============================================
The following example illustrates the effect of scaling the
regularization parameter when using :ref:`svm` for
:ref:`classification <svm_classification>`.
For SVC classificati... | bsd-3-clause | 2,377,328,645,040,458,000 | 34.596026 | 79 | 0.645395 | false |
dannyboi104/SickRage | lib/dogpile/core/dogpile.py | 59 | 5640 | import time
import logging
log = logging.getLogger(__name__)
class NeedRegenerationException(Exception):
"""An exception that when raised in the 'with' block,
forces the 'has_value' flag to False and incurs a
regeneration of the value.
"""
NOT_REGENERATED = object()
class Lock(object):
"""Dogpi... | gpl-3.0 | -28,139,238,033,248,536 | 33.814815 | 79 | 0.602837 | false |
michalfita/nis2ldap | tests/test_records_person.py | 1 | 1591 | # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# bu... | gpl-3.0 | 6,926,852,136,975,761,000 | 40.868421 | 109 | 0.707731 | false |
ninnux/exscript | src/Exscript/protocols/drivers/junos_erx.py | 7 | 1624 | # Copyright (C) 2007-2010 Samuel Abels.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2, as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANT... | gpl-2.0 | 8,227,695,860,938,472,000 | 35.909091 | 75 | 0.684113 | false |
PetePriority/home-assistant | homeassistant/components/waterfurnace/sensor.py | 4 | 3993 | """
Support for Waterfurnace.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.waterfurnace/
"""
from homeassistant.components.sensor import ENTITY_ID_FORMAT
from homeassistant.components.waterfurnace import (
DOMAIN as WF_DOMAIN, UPDATE_TOPIC
... | apache-2.0 | -846,405,637,093,478,800 | 32.275 | 78 | 0.641372 | false |
t3wz/mtasa-blue | vendor/google-breakpad/src/tools/gyp/test/rules-rebuild/gyptest-default.py | 345 | 2242 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that a rule that generates multiple outputs rebuilds
correctly when the inputs change.
"""
import TestGyp
test = TestGyp.Test... | gpl-3.0 | 1,147,647,396,795,319,000 | 23.637363 | 76 | 0.702944 | false |
mdworks2016/work_development | Python/05_FirstPython/Chapter9_WebApp/fppython_develop/lib/python3.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.py | 54 | 26964 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Access to Python's configuration information."""
import codecs
import os
import re
import sys
from os.path import pardir, realpath
try:
import configparser
except ImportError:
import Conf... | apache-2.0 | 5,399,725,762,782,431,000 | 33.218274 | 80 | 0.540758 | false |
gg7/sentry | src/sentry/tasks/options.py | 27 | 1173 | """
sentry.tasks.options
~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from datetime import timedelta
from django.utils import timezone
from sentry.models import Option
from sent... | bsd-3-clause | 539,061,192,802,849,150 | 32.514286 | 84 | 0.70844 | false |
olapaola/olapaola-android-scripting | python/src/Lib/urllib.py | 48 | 64844 | """Open an arbitrary URL.
See the following document for more info on URLs:
"Names and Addresses, URIs, URLs, URNs, URCs", at
http://www.w3.org/pub/WWW/Addressing/Overview.html
See also the HTTP spec (from which the error codes are derived):
"HTTP - Hypertext Transfer Protocol", at
http://www.w3.org/pub/WWW/Protocols... | apache-2.0 | -8,156,321,931,809,761,000 | 35.511261 | 102 | 0.547298 | false |
mhils/mitmproxy | mitmproxy/contentviews/auto.py | 1 | 1091 | from mitmproxy import contentviews
from mitmproxy.net import http
from mitmproxy.utils import strutils
from . import base
class ViewAuto(base.View):
name = "Auto"
def __call__(self, data, **metadata):
headers = metadata.get("headers", {})
ctype = headers.get("content-type")
if data an... | mit | -6,038,580,383,715,990,000 | 37.964286 | 78 | 0.591201 | false |
supertom/ansible-modules-core | files/acl.py | 17 | 11212 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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 the License, or
# (at your option) any later version.
#
... | gpl-3.0 | -4,673,858,508,285,010,000 | 30.846591 | 341 | 0.611329 | false |
ryangallen/django | tests/schema/tests.py | 83 | 71412 | import datetime
import itertools
import unittest
from copy import copy
from django.db import (
DatabaseError, IntegrityError, OperationalError, connection,
)
from django.db.models import Model
from django.db.models.deletion import CASCADE
from django.db.models.fields import (
AutoField, BigIntegerField, Binary... | bsd-3-clause | 1,190,937,439,833,312,800 | 41.838632 | 125 | 0.614253 | false |
abhiQmar/servo | tests/heartbeats/characterize_android.py | 139 | 4036 | #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import sys
import os
from os import path
import time
import datetime
import argparse
import subpr... | mpl-2.0 | -1,651,666,561,608,779,000 | 32.915966 | 108 | 0.609762 | false |
pozar87/apts | apts/observations.py | 1 | 8310 | import logging
from datetime import datetime, timedelta
from string import Template
import matplotlib.dates as mdates
import numpy
import pkg_resources
import svgwrite as svg
from matplotlib import pyplot
from .conditions import Conditions
from .objects.messier import Messier
from .objects.planets import Planets
from... | apache-2.0 | 4,065,025,668,737,495,600 | 37.467593 | 107 | 0.652064 | false |
amanzotti/paris_scraping | fetch.py | 1 | 17484 | import requests
from bs4 import BeautifulSoup
import sys
import numpy as np
# then add this function lower down
from memory_profiler import profile
import pandas as pd
from sortedcontainers import SortedDict
import datetime
import bs4
# TODO
# http://www.meilleursagents.com/immobilier/recherche/?item_types%5B%5D=3696... | mit | -6,757,245,930,467,434,000 | 34.25 | 326 | 0.528369 | false |
richardcs/ansible | lib/ansible/modules/windows/win_domain.py | 15 | 3882 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Red Hat, Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'core'}
DOCUMENTATI... | gpl-3.0 | 5,648,779,416,804,206,000 | 36.68932 | 142 | 0.705822 | false |
zofuthan/airmozilla | airmozilla/manage/urls.py | 5 | 13794 | from django.conf.urls import patterns, url
from .views import (
picturegallery,
dashboard,
events,
approvals,
suggestions,
vidly_media,
comments,
loggedsearches,
users,
groups,
channels,
locations,
regions,
templates,
topics,
tags,
recruitmentmessages... | bsd-3-clause | 6,016,502,303,559,950,000 | 41.183486 | 78 | 0.6136 | false |
luzfcb/pip | tests/unit/test_appdirs.py | 4 | 7219 | import sys
import pretend
from pip.utils import appdirs
class TestUserCacheDir:
def test_user_cache_dir_win(self, monkeypatch):
@pretend.call_recorder
def _get_win_folder(base):
return "C:\\Users\\test\\AppData\\Local"
monkeypatch.setattr(
appdirs,
"... | mit | 7,509,580,539,484,689,000 | 32.576744 | 79 | 0.581521 | false |
rruebner/odoo | addons/report_webkit/webkit_report.py | 26 | 16606 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com)
# All Right Reserved
#
# Author : Nicolas Bessi (Camptocamp)
# Contributor(s) : Florent Xicluna (Wingo SA)
#
# WARNING: This program as such is intended... | agpl-3.0 | 2,460,905,689,219,154,000 | 42.132468 | 131 | 0.577382 | false |
alexblaessle/PyFRAP | pyfrp/gui/pyfrp_gui_fit_dialogs.py | 2 | 15172 | #=====================================================================================================================================
#Copyright
#=====================================================================================================================================
#Copyright (C) 2014 Alexander Blaessle... | gpl-3.0 | 620,448,795,263,883,000 | 31.839827 | 172 | 0.660559 | false |
goodwinnk/intellij-community | python/helpers/pydev/pydevd_attach_to_process/winappdbg/plugins/__init__.py | 102 | 1755 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2009-2014, Mario Vilas
# 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... | apache-2.0 | -4,959,533,686,449,204,000 | 49.142857 | 78 | 0.756125 | false |
vmindru/ansible | lib/ansible/plugins/connection/libvirt_lxc.py | 47 | 7419 | # Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# Based on chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
# (c) 2013, Michael Scherer <misc@zarb.org>
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https:/... | gpl-3.0 | -8,495,461,730,766,240,000 | 39.763736 | 121 | 0.605742 | false |
awkspace/ansible | lib/ansible/modules/cloud/digital_ocean/digital_ocean_tag_facts.py | 29 | 2926 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Ansible Project
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
# 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__ = ty... | gpl-3.0 | -7,563,437,085,666,533,000 | 24.008547 | 92 | 0.636705 | false |
obnoxxx/samba | buildtools/wafsamba/gccdeps.py | 33 | 3350 | # encoding: utf-8
# Thomas Nagy, 2008-2010 (ita)
"""
Execute the tasks with gcc -MD, read the dependencies from the .d file
and prepare the dependency calculation for the next run
"""
import os, re, threading
import Task, Logs, Utils, preproc
from TaskGen import before, after, feature
lock = threading.Lock()
prepro... | gpl-3.0 | -2,209,017,204,518,356,200 | 25.377953 | 87 | 0.543284 | false |
petercable/mi-dataset | mi/dataset/driver/ctdmo_ghqr/imodem/ctdmo_ghqr_imodem_telemetered_driver.py | 7 | 2169 | #!/usr/bin/env python
"""
@package mi.dataset.driver.ctdmo_ghqr.imodem
@file mi-dataset/mi/dataset/driver/ctdmo_ghqr/imodem/ctdmo_ghqr_imodem_telemetered_driver.py
@author Mark Worden
@brief Driver for the ctdmo_ghqr_imodem instrument
Release notes:
Initial Release
"""
from mi.dataset.dataset_parser import DataSetD... | bsd-2-clause | 920,430,194,819,590,300 | 33.428571 | 95 | 0.706316 | false |
dyoung418/tensorflow | tensorflow/python/framework/ops.py | 1 | 190049 | # Copyright 2015 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,096,544,194,176,993,000 | 34.676553 | 115 | 0.656073 | false |
gitcoinco/web | app/dashboard/embed.py | 1 | 10901 | from django.http import HttpResponse, JsonResponse
from django.template import loader
from django.utils import timezone
from django.utils.cache import patch_response_headers
import requests
from dashboard.models import Bounty
from git.utils import get_user, org_name
from PIL import Image, ImageDraw, ImageFont
from rat... | agpl-3.0 | -4,671,346,504,243,543,000 | 32.336391 | 101 | 0.531603 | false |
blademainer/intellij-community | python/helpers/epydoc/docwriter/html.py | 89 | 143938 | #
# epydoc -- HTML output generator
# Edward Loper
#
# Created [01/30/01 05:18 PM]
# $Id: html.py 1674 2008-01-29 06:03:36Z edloper $
#
"""
The HTML output generator for epydoc. The main interface provided by
this module is the L{HTMLWriter} class.
@todo: Add a cache to L{HTMLWriter.url()}?
"""
__docformat__ = 'epyt... | apache-2.0 | 4,757,254,241,329,110,000 | 40.231166 | 97 | 0.507892 | false |
diarmuidcwc/GTSVideoDecom | VidOverPCM.py | 1 | 12132 | #-------------------------------------------------------------------------------
# Name: VidOverPCM
# Purpose:
#
# Copyright 2014 Diarmuid Collins dcollins@curtisswright.com
# https://github.com/diarmuid
#
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms o... | gpl-2.0 | 8,960,066,831,773,691,000 | 47.925926 | 160 | 0.579871 | false |
natpen/gitinspector | gitinspector/gravatar.py | 47 | 1278 | # coding: utf-8
#
# Copyright © 2013 Ejwa Software. All rights reserved.
#
# This file is part of gitinspector.
#
# gitinspector 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,... | gpl-3.0 | 2,326,961,711,918,714,000 | 32.605263 | 73 | 0.732968 | false |
zaxtax/scikit-learn | sklearn/decomposition/tests/test_online_lda.py | 5 | 13165 | import numpy as np
from scipy.linalg import block_diag
from scipy.sparse import csr_matrix
from scipy.special import psi
from sklearn.decomposition import LatentDirichletAllocation
from sklearn.decomposition._online_lda import (_dirichlet_expectation_1d,
_dirichlet_expect... | bsd-3-clause | -745,847,524,037,665,800 | 38.065282 | 79 | 0.608583 | false |
Karel-van-de-Plassche/bokeh | examples/plotting/file/graphs.py | 9 | 2346 | from bokeh.models import StaticLayoutProvider, ColumnDataSource, HoverTool, TapTool
from bokeh.models.graphs import NodesAndLinkedEdges
from bokeh.palettes import Set3_12
from bokeh.plotting import figure, show, output_file
from bokeh.sampledata.us_states import data as us_states
from bokeh.sampledata.airport_routes im... | bsd-3-clause | 5,494,474,471,345,996,000 | 45 | 122 | 0.682438 | false |
brianshumate/uniweb | surfbot/validator/admin.py | 1 | 1649 | """
Validator project
admin.py
Copyright (c) 2009 Brian Shumate
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify,... | bsd-2-clause | 5,946,381,036,170,220,000 | 40.25 | 121 | 0.734384 | false |
credativ/pulp | bindings/test/unit/test_upload.py | 17 | 1554 | import unittest
import mock
from pulp.bindings.upload import UploadAPI
class TestUploadAPI(unittest.TestCase):
def setUp(self):
self.api = UploadAPI(mock.MagicMock())
def test_import_upload_with_override_config(self):
ret = self.api.import_upload('upload_id', 'repo_id', 'unit_type_id', unit... | gpl-2.0 | 1,666,426,030,323,627,300 | 37.85 | 99 | 0.522523 | false |
denys-duchier/django | tests/auth_tests/models/custom_permissions.py | 21 | 1253 | """
The CustomPermissionsUser users email as the identifier, but uses the normal
Django permissions model. This allows us to check that the PermissionsMixin
includes everything that is needed to interact with the ModelBackend.
"""
from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin
from django.db ... | bsd-3-clause | -1,464,757,726,220,142,800 | 32.864865 | 92 | 0.709497 | false |
sgml/popcorn_maker | popcorn_gallery/popcorn/migrations/0025_auto__del_field_template_template.py | 3 | 11522 | # -*- 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):
# Deleting field 'Template.template'
db.delete_column('popcorn_template', 'template')
def backwards(se... | bsd-3-clause | -9,144,588,548,636,272,000 | 76.858108 | 207 | 0.555719 | false |
MingyuanXie/CopyNet | emolga/models/pointers.py | 1 | 36210 | __author__ = 'jiataogu'
import theano
import logging
import copy
from emolga.layers.recurrent import *
from emolga.layers.ntm_minibatch import Controller
from emolga.layers.embeddings import *
from emolga.layers.attention import *
from emolga.layers.highwayNet import *
from emolga.models.encdec import *
from core impo... | mit | 933,543,689,109,602,700 | 35.799797 | 124 | 0.523253 | false |
annatisch/autorest | src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/Paging/autorestpagingtestservice/models/__init__.py | 16 | 1275 | # 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 ... | mit | 9,073,196,671,243,353,000 | 38.84375 | 98 | 0.703529 | false |
mwx1993/TACTIC | 3rd_party/CherryPy/cherrypy/_cpnative_server.py | 80 | 6042 | """Native adapter for serving CherryPy via its builtin server."""
import logging
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
import cherrypy
from cherrypy._cperror import format_exc, bare_error
from cherrypy.lib import httputil
from cherrypy import wsgiserver
class ... | epl-1.0 | -2,409,583,573,277,319,700 | 39.28 | 95 | 0.511586 | false |
gsnbng/erpnext | erpnext/hr/doctype/vehicle_log/vehicle_log.py | 2 | 1904 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt, cstr
from frappe.model.mapper import get_mapped_doc
from frappe.model.d... | agpl-3.0 | 3,839,761,405,600,424,400 | 38.666667 | 121 | 0.73687 | false |
benjaminbrinkman/open-ad-platform | .venv/lib/python3.4/site-packages/werkzeug/_compat.py | 148 | 6190 | import sys
import operator
import functools
try:
import builtins
except ImportError:
import __builtin__ as builtins
PY2 = sys.version_info[0] == 2
_identity = lambda x: x
if PY2:
unichr = unichr
text_type = unicode
string_types = (str, unicode)
integer_types = (int, long)
int_to_byte = c... | mit | 2,545,315,066,810,004,000 | 29.643564 | 83 | 0.594507 | false |
saukrIppl/seahub | seahub/auth/tokens.py | 2 | 2939 | from datetime import date
from django.conf import settings
from django.utils.http import int_to_base36, base36_to_int
from django.utils.crypto import constant_time_compare, salted_hmac
from django.utils import six
from seahub.base.models import UserLastLogin
class PasswordResetTokenGenerator(object):
"""
Stra... | apache-2.0 | -3,181,058,370,545,543,000 | 35.7375 | 87 | 0.633889 | false |
GreenRecycleBin/servo | python/mach/mach/dispatcher.py | 22 | 14395 | # 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/.
from __future__ import unicode_literals
import argparse
import difflib
import sys
from operator import itemgetter
fro... | mpl-2.0 | -104,948,683,222,238,500 | 43.566563 | 142 | 0.609865 | false |
atiqueahmedziad/addons-server | src/olympia/tags/models.py | 1 | 2686 | from django.urls import NoReverseMatch
from django.db import models
from olympia import activity, amo
from olympia.amo.fields import PositiveAutoField
from olympia.amo.models import ManagerBase, ModelBase
from olympia.amo.urlresolvers import reverse
class TagManager(ManagerBase):
def not_denied(self):
"... | bsd-3-clause | 6,119,637,966,976,299,000 | 29.179775 | 75 | 0.637379 | false |
jswope00/GAI | lms/djangoapps/licenses/migrations/0001_initial.py | 188 | 8260 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'CourseSoftware'
db.create_table('licenses_coursesoftware', (
('id', self.gf('dja... | agpl-3.0 | 1,571,714,761,697,666,600 | 69 | 182 | 0.564165 | false |
Frodox/buildbot | master/buildbot/test/util/validation.py | 1 | 20786 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-2.0 | 5,702,544,683,084,740,000 | 29.522761 | 90 | 0.580198 | false |
samvarankashyap/googlecloudutility2 | lib/pyasn1/codec/cer/encoder.py | 226 | 3161 | # CER encoder
from pyasn1.type import univ
from pyasn1.codec.ber import encoder
from pyasn1.compat.octets import int2oct, null
class BooleanEncoder(encoder.IntegerEncoder):
def encodeValue(self, encodeFun, client, defMode, maxChunkSize):
if client == 0:
substrate = int2oct(0)
else:
... | apache-2.0 | 6,017,869,198,347,276,000 | 35.333333 | 76 | 0.626068 | false |
Arno-Nymous/pyload | module/plugins/accounts/UptoboxCom.py | 5 | 1247 | # -*- coding: utf-8 -*-
import time
import re
import urlparse
from ..internal.misc import json
from ..internal.XFSAccount import XFSAccount
class UptoboxCom(XFSAccount):
__name__ = "UptoboxCom"
__type__ = "account"
__version__ = "0.23"
__status__ = "testing"
__description__ = """Uptobox.com acc... | gpl-3.0 | -2,795,432,059,961,859,600 | 28 | 80 | 0.534884 | false |
stephane-martin/salt-debian-packaging | salt-2016.3.3/salt/modules/cmdmod.py | 2 | 98226 | # -*- coding: utf-8 -*-
'''
A module for shelling out.
Keep in mind that this module is insecure, in that it can give whomever has
access to the master root execution access to all salt minions.
'''
from __future__ import absolute_import
# Import python libs
import functools
import glob
import json
import logging
imp... | apache-2.0 | -7,790,780,983,794,556,000 | 32.777854 | 121 | 0.562387 | false |
Stanford-Online/edx-platform | lms/djangoapps/support/tests/test_views.py | 9 | 17238 | # coding: UTF-8
"""
Tests for support views.
"""
import itertools
import json
import re
from datetime import datetime, timedelta
import ddt
import pytest
from django.contrib.auth.models import User
from django.urls import reverse
from django.db.models import signals
from nose.plugins.attrib import attr
from pytz impo... | agpl-3.0 | 1,790,463,491,650,209,500 | 38.801386 | 135 | 0.635546 | false |
ardekantur/pyglet | pyglet/graphics/vertexdomain.py | 9 | 30147 | # ----------------------------------------------------------------------------
# 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:
#
# * Redistribu... | bsd-3-clause | -7,354,716,796,558,217,000 | 36.542964 | 100 | 0.598667 | false |
robhudson/kuma | kuma/users/helpers.py | 12 | 4921 | from django.conf import settings
from django.contrib import admin
from jinja2 import escape, Markup, contextfunction
from jingo import register
from allauth.utils import get_request_param
from allauth.account.utils import user_display
from allauth.socialaccount import providers
from allauth.socialaccount.templatetags... | mpl-2.0 | -2,901,475,254,567,296,500 | 33.173611 | 174 | 0.642349 | false |
abhishekarora12/ansible | lib/ansible/template/safe_eval.py | 14 | 4160 | # (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 the License, or
# (at your option) any lat... | gpl-3.0 | -6,001,808,601,834,607,000 | 32.015873 | 98 | 0.621875 | false |
nerginer/GrovePi | Projects/tilt_buzzer/tilt_buzzer.py | 6 | 2405 | # tilt_buzzer.py
#
# This is an project using the Grove Switch, Buzzer and accelerometer from the GrovePi starter kit
#
# In this project, the buzzer starts making a sound when the accelerometer is held perpendicular and the Switch is on
'''
## License
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open sou... | mit | 6,938,851,721,667,924,000 | 38.442623 | 117 | 0.757588 | false |
firebitsbr/raspberry_pwn | src/pentest/sqlmap/tamper/randomcase.py | 7 | 1413 | #!/usr/bin/env python
"""
Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import re
from lib.core.common import randomRange
from lib.core.data import kb
from lib.core.enums import PRIORITY
__priority__ = PRIORITY.NORMAL
def dependencies():
pa... | gpl-3.0 | 3,488,635,620,463,803,400 | 23.362069 | 86 | 0.562633 | false |
eayunstack/python-cinderclient | cinderclient/v1/qos_specs.py | 16 | 4799 | # Copyright (c) 2013 eBay Inc.
# Copyright (c) OpenStack LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | -2,571,929,388,451,305,500 | 31.208054 | 79 | 0.598666 | false |
iuliat/nova | nova/objects/dns_domain.py | 29 | 2606 | # Copyright (C) 2014, Red Hat, 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... | apache-2.0 | 7,863,155,659,081,482,000 | 32.844156 | 78 | 0.668457 | false |
myarjunar/inasafe | safe/gui/tools/wizard/step_kw25_classification.py | 3 | 7047 | # coding=utf-8
"""InaSAFE Wizard Step Classifications."""
# noinspection PyPackageRequirements
from PyQt4 import QtCore
from PyQt4.QtGui import QListWidgetItem
from safe.utilities.i18n import tr
from safe import messaging as m
from safe.common.exceptions import InvalidWizardStep
from safe.definitions.layer_purposes ... | gpl-3.0 | 7,266,009,001,056,585,000 | 38.368715 | 79 | 0.639421 | false |
takeshineshiro/cinder | cinder/api/contrib/backups.py | 7 | 14949 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2014 TrilioData, Inc
# Copyright (c) 2015 EMC Corporation
# 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
# ... | apache-2.0 | -7,318,025,740,613,609,000 | 36.466165 | 79 | 0.611278 | false |
AZCompTox/AZOrange | orange/OrangeWidgets/Data/OWDataDomain.py | 2 | 19433 | """
<name>Select Attributes</name>
<description>Manual selection of attributes.<br>Aside from a data set with the selected attributes, the widget also outputs an "Attribute List" which can be used with another "Select Attribute" widget to make the same variable selection</description>
<icon>icons/SelectAttributes.png</... | lgpl-3.0 | -4,331,013,466,603,990,000 | 44.193023 | 268 | 0.620182 | false |
omniscale/wmtsproxy | wmtsproxy/wmtsproxy/wmtsparse.py | 2 | 10937 | import re
import sys
from xml.etree import ElementTree as etree
from mapproxy.util.ext.wmsparse.util import resolve_ns
from mapproxy.util.py import reraise_exception
from .exceptions import CapabilitiesError
class WMTSCapabilities(object):
_default_namespace = 'http://www.opengis.net/wmts/1.0'
_namespaces ... | apache-2.0 | -7,986,744,544,819,686,000 | 40.271698 | 129 | 0.584347 | false |
nishad-jobsglobal/odoo-marriot | addons/hr_attendance/report/__init__.py | 375 | 1071 | # -*- 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,894,468,400,213,371,000 | 43.625 | 78 | 0.61718 | false |
keithroe/vtkoptix | ThirdParty/Twisted/twisted/scripts/tap2deb.py | 27 | 7227 | # -*- test-case-name: twisted.scripts.test.test_tap2deb -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
tap2deb creates Debian packages which wrap .tap files.
"""
import os
import sys
import shutil
import subprocess
from email.utils import formatdate as now
from twisted.python import ... | bsd-3-clause | -320,527,632,135,722,240 | 23.009967 | 86 | 0.613671 | false |
hkariti/mopidy | tests/mpd/test_dispatcher.py | 17 | 1578 | from __future__ import absolute_import, unicode_literals
import unittest
import pykka
from mopidy import core
from mopidy.internal import deprecation
from mopidy.mpd.dispatcher import MpdDispatcher
from mopidy.mpd.exceptions import MpdAckError
from tests import dummy_backend
class MpdDispatcherTest(unittest.TestC... | apache-2.0 | 5,011,127,333,259,803,000 | 31.875 | 79 | 0.644487 | false |
Mhynlo/SickRage | lib/pgi/codegen/construct.py | 19 | 5385 | # Copyright 2013 Christoph Reiter
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
"""Create a gobject constr... | gpl-3.0 | 4,452,195,577,768,484,000 | 23.256757 | 79 | 0.630084 | false |
max0d41/ThugBrowser | src/DOM/Sidebar.py | 9 | 1718 | #!/usr/bin/env python
#
# Sidebar.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; w... | gpl-2.0 | -8,002,091,100,770,722,000 | 34.061224 | 90 | 0.703143 | false |
atsaki/libcloud | libcloud/utils/logging.py | 64 | 1750 | # 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 "License"); you may not use ... | apache-2.0 | 929,158,797,341,141,400 | 36.234043 | 76 | 0.678857 | false |
piorrro33/pcsx2 | 3rdparty/freetype/src/tools/docmaker/formatter.py | 45 | 6195 | #
# formatter.py
#
# Convert parsed content blocks to a structured document (library file).
#
# Copyright 2002-2016 by
# David Turner.
#
# This file is part of the FreeType project, and may only be used,
# modified, and distributed under the terms of the FreeType project
# license, LICENSE.TXT. By continuing ... | gpl-2.0 | -7,814,904,221,508,256,000 | 26.171053 | 76 | 0.540113 | false |
turbokongen/home-assistant | homeassistant/components/wink/fan.py | 7 | 3313 | """Support for Wink fans."""
import pywink
from homeassistant.components.fan import (
SPEED_HIGH,
SPEED_LOW,
SPEED_MEDIUM,
SUPPORT_DIRECTION,
SUPPORT_SET_SPEED,
FanEntity,
)
from . import DOMAIN, WinkDevice
SPEED_AUTO = "auto"
SPEED_LOWEST = "lowest"
SUPPORTED_FEATURES = SUPPORT_DIRECTION + S... | apache-2.0 | 872,569,899,431,159,600 | 29.118182 | 79 | 0.609116 | false |
JSeam2/IsoGraph | genetic/genetic_algo.py | 1 | 10666 | """
Implementation referenced from
https://github.com/handcraftsman/GeneticAlgorithmsWithPython/blob/master/ch02/genetic.py
"""
import random
from qutip import *
import numpy as np
import pandas as pd
from functools import reduce
import datetime
import time
import pickle
import copy
# QUTIP NOTES
# hadamard = "SNOT"... | mit | -7,794,520,415,320,391,000 | 26.632124 | 90 | 0.54594 | false |
nathangeffen/tbonline-old | tbonlineproject/external/south/db/postgresql_psycopg2.py | 21 | 2609 |
from django.db import connection, models
from south.db import generic
class DatabaseOperations(generic.DatabaseOperations):
"""
PsycoPG2 implementation of database operations.
"""
backend_name = "postgres"
def rename_column(self, table_name, old, new):
if old == new:
# S... | mit | -553,185,398,811,322,560 | 37.367647 | 113 | 0.621694 | false |
philippeowagner/django-timesheet | src/timesheet/views.py | 2 | 1599 | import datetime, time
from django.http import Http404
from django.db.models import Sum
from django.template import RequestContext
from django.contrib.auth.models import User
from django.shortcuts import render_to_response
from timesheet.models import Timesheet
def week_archive(request, username, year, week,
templat... | bsd-3-clause | 5,257,232,983,400,238,000 | 27.052632 | 74 | 0.706692 | false |
rackerlabs/base-image-blueprints | debian_9_pvhvm_heat.py | 1 | 5404 | #!/usr/bin/env python3
# 6/27/2019
# Author: Kevin McJunkin
# Use away if this is somehow relevant to ya
import os
import subprocess
import shutil
import stat
# Install required packages via yum
def install_packages():
package_list = ['python3-pip',
'gcc',
'git',
... | apache-2.0 | -338,517,642,760,213,300 | 32.153374 | 94 | 0.587528 | false |
olevinsky/django-guardian | guardian/utils.py | 10 | 4610 | """
django-guardian helper functions.
Functions defined within this module should be considered as django-guardian's
internal functionality. They are **not** guaranteed to be stable - which means
they actual input parameters/output type may change in future releases.
"""
import os
import logging
from django.conf impor... | bsd-2-clause | 6,747,916,852,774,399,000 | 32.649635 | 81 | 0.664642 | false |
supriyasingh01/github_basics | Internetworking Distributed Project/finalProject/ovs/pox-master/tests/unit/lib/epoll_select_test.py | 7 | 2478 | #!/usr/bin/env python
import unittest
import sys
import os.path
import SocketServer
import threading
import socket
import signal
from copy import copy
sys.path.append(os.path.dirname(__file__) + "/../../..")
from pox.lib.epoll_select import EpollSelect
class TCPEcho(SocketServer.StreamRequestHandler):
def handle... | cc0-1.0 | 2,079,760,700,566,805,000 | 26.842697 | 76 | 0.620258 | false |
stevenmizuno/QGIS | python/plugins/processing/algs/qgis/QgisAlgorithmProvider.py | 3 | 12156 | # -*- coding: utf-8 -*-
"""
***************************************************************************
QgisAlgorithmProvider.py
---------------------
Date : December 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
***************... | gpl-2.0 | 4,584,367,056,312,344,000 | 36.869159 | 76 | 0.648322 | false |
joelpmichael/peer2backup | libs/key.py | 1 | 10615 | # -*- coding: utf_8 -*-
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
# Crypto Key Database
import os
import sqlite3
import shutil
import uuid
import random
import base64
import Crypto.PublicKey.RSA
import Crypto.Random.random
import Crypto.Cipher.PKCS1_OAEP
import Crypto.Hash.SHA256
# increment keydb_ver... | apache-2.0 | 2,380,474,342,367,396,400 | 33.917763 | 140 | 0.600942 | false |
atul-bhouraskar/django | django/contrib/auth/admin.py | 89 | 8687 | from django.conf import settings
from django.conf.urls import url
from django.contrib import admin, messages
from django.contrib.admin.options import IS_POPUP_VAR
from django.contrib.admin.utils import unquote
from django.contrib.auth import update_session_auth_hash
from django.contrib.auth.forms import (
AdminPass... | bsd-3-clause | -3,095,025,117,139,773,400 | 41.583333 | 91 | 0.59779 | false |
sffjunkie/astral | src/test/test_sun_elevation_adjustment.py | 1 | 1206 | # -*- coding: utf-8 -*-
from datetime import datetime
import freezegun
import pytest
from almost_equal import datetime_almost_equal
from astral.geocoder import database, lookup
from astral.location import Location
from astral.sun import adjust_to_horizon, adjust_to_obscuring_feature, sunrise
class TestE... | apache-2.0 | -5,705,963,813,988,974,000 | 31.5 | 78 | 0.668325 | false |
t3dev/odoo | addons/l10n_in/report/exempted_gst_report.py | 1 | 4273 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, tools
class L10nInExemptedReport(models.Model):
_name = "l10n_in.exempted.report"
_description = "Exempted Gst Supplied Statistics"
_auto = False
account_move_id =... | gpl-3.0 | 7,890,720,264,200,515,000 | 43.510417 | 107 | 0.563773 | false |
asadziach/tensorflow | tensorflow/contrib/learn/python/learn/graph_actions.py | 14 | 28607 | # 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 | 3,842,785,342,728,354,000 | 38.403581 | 82 | 0.655679 | false |
cgundogan/RIOT | tests/gnrc_sock_udp/tests/01-run.py | 39 | 3105 | #!/usr/bin/env python3
# Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de>
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import sys
from testrunner import run
def testfunc(child):
... | lgpl-2.1 | 6,088,719,411,092,058,000 | 54.446429 | 85 | 0.715298 | false |
onto/sonata | sonata/misc.py | 1 | 6358 |
import os
import subprocess
import re
import locale
import logging
import sys
logger = logging.getLogger(__name__)
def convert_time(raw):
# Converts raw time to 'hh:mm:ss' with leading zeros as appropriate
h, m, s = ['%02d' % c for c in (raw / 3600, (raw % 3600) / 60, raw % 60)]
if h == '00':
i... | gpl-3.0 | 2,914,018,651,205,552,000 | 23.083333 | 77 | 0.553633 | false |
AdrianaDinca/bitcoin | qa/rpc-tests/bip65-cltv.py | 62 | 3311 | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test the CHECKLOCKTIMEVERIFY (BIP65) soft-fork logic
#
from test_framework.test_framework import Bit... | mit | 7,627,370,472,824,126,000 | 34.98913 | 98 | 0.610994 | false |
cloudcopy/seahub | thirdpart/rest_framework/filters.py | 5 | 1757 | from rest_framework.compat import django_filters
FilterSet = django_filters and django_filters.FilterSet or None
class BaseFilterBackend(object):
"""
A base class from which all filter backend classes should inherit.
"""
def filter_queryset(self, request, queryset, view):
"""
Return ... | apache-2.0 | -1,313,677,624,528,793,600 | 28.779661 | 94 | 0.615253 | false |
vincepandolfo/django | tests/save_delete_hooks/models.py | 409 | 1030 | """
Adding hooks before/after saving and deleting
To execute arbitrary code around ``save()`` and ``delete()``, just subclass
the methods.
"""
from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Person(... | bsd-3-clause | -5,048,492,631,333,193,000 | 28.428571 | 75 | 0.636893 | false |
gopal1cloud/neutron | neutron/tests/unit/api/rpc/agentnotifiers/test_dhcp_rpc_agent_api.py | 9 | 7125 | # Copyright (c) 2013 Red Hat, 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 writ... | apache-2.0 | 7,492,861,981,450,793,000 | 45.266234 | 79 | 0.60393 | false |
40223229/2015cd_midterm | gear.py | 204 | 19237 | #@+leo-ver=5-thin
#@+node:office.20150407074720.1: * @file gear.py
#@@language python
#@@tabwidth -4
#@+<<declarations>>
#@+node:office.20150407074720.2: ** <<declarations>> (application)
#@@language python
import cherrypy
import os
import sys
# 這個程式要計算正齒輪的齒面寬, 資料庫連結希望使用 pybean 與 SQLite
# 導入 pybean 模組與所要使用的 Store 及 S... | gpl-2.0 | -6,128,154,283,787,471,000 | 37.562642 | 172 | 0.574694 | false |
jnewland/home-assistant | tests/components/zwave/test_sensor.py | 11 | 5058 | """Test Z-Wave sensor."""
from homeassistant.components.zwave import const, sensor
import homeassistant.const
from tests.mock.zwave import (
MockNode, MockValue, MockEntityValues, value_changed)
def test_get_device_detects_none(mock_openzwave):
"""Test get_device returns None."""
node = MockNode()
val... | apache-2.0 | 8,472,181,274,994,650,000 | 39.790323 | 76 | 0.687426 | false |
2013Commons/HUE-SHARK | desktop/core/ext-py/south/south/management/commands/datamigration.py | 6 | 4513 | """
Data migration creation command
"""
import sys
import os
import re
from optparse import make_option
try:
set
except NameError:
from sets import Set as set
from django.core.management.base import BaseCommand
from django.core.management.color import no_style
from django.db import models
from django.conf im... | apache-2.0 | -4,561,414,015,543,391,000 | 34.543307 | 128 | 0.61201 | false |
Cadair/ginga | ginga/web/bokehw/CanvasRenderBokeh.py | 3 | 5041 | #
# CanvasRenderBokeh.py -- for rendering into a Bokeh widget
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
import numpy
from . import BokehHelp
from ginga.canvas.mix... | bsd-3-clause | -4,610,996,261,689,369,000 | 29.36747 | 76 | 0.558024 | false |
mspublic/OpenLTE | LTE_fdd_dl_file_scan/src/__init__.py | 8 | 1748 | #
# Copyright 2008,2009 Free Software Foundation, Inc.
#
# This application 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, or (at your option)
# any later version.
#
# This application is di... | agpl-3.0 | 7,222,895,388,727,985,000 | 31.981132 | 74 | 0.632151 | false |
sburnett/seattle | nodemanager/timeout_xmlrpclib.py | 3 | 1051 | # This code is almost verbatim from:
# http://blog.bjola.ca/2007/08/using-timeout-with-xmlrpclib.html
try:
import xmlrpclib
from xmlrpclib import *
except ImportError:
# Python 3.0 portability fix...
import xmlrpc.client as xmlrpclib
from xmlrpc.client import *
import httplib
def Server(url, *args, **kwargs... | mit | 5,238,021,851,001,239,000 | 23.44186 | 64 | 0.707897 | 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.