repo_name stringlengths 5 100 | path stringlengths 4 254 | copies stringlengths 1 5 | size stringlengths 4 7 | content stringlengths 681 1M | license stringclasses 15
values | hash int64 -9,223,351,895,964,839,000 9,223,298,349B | line_mean float64 3.5 100 | line_max int64 15 1k | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class | ratio float64 1.5 8.15 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ahmedbodi/AutobahnPython | examples/asyncio/websocket/echo/client_coroutines.py | 13 | 2044 | ###############################################################################
##
## Copyright (C) 2013-2014 Tavendo GmbH
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## h... | apache-2.0 | 7,822,061,744,094,950,000 | 31.444444 | 79 | 0.623288 | false | 4.214433 | false | false | false |
ifduyue/django | django/core/checks/registry.py | 13 | 3108 | from itertools import chain
from django.utils.itercompat import is_iterable
class Tags:
"""
Built-in tags for internal checks.
"""
admin = 'admin'
caches = 'caches'
compatibility = 'compatibility'
database = 'database'
models = 'models'
security = 'security'
signals = 'signals... | bsd-3-clause | -2,035,686,896,372,967,700 | 30.714286 | 91 | 0.602317 | false | 4.433666 | false | false | false |
kmike/scikit-learn | sklearn/utils/__init__.py | 3 | 10094 | """
The :mod:`sklearn.utils` module includes various utilites.
"""
from collections import Sequence
import numpy as np
from scipy.sparse import issparse
import warnings
from .murmurhash import murmurhash3_32
from .validation import (as_float_array, check_arrays, safe_asarray,
assert_all_fini... | bsd-3-clause | 2,334,709,577,611,160,600 | 26.883978 | 79 | 0.56806 | false | 3.874856 | false | false | false |
houlixin/BBB-TISDK | linux-devkit/sysroots/i686-arago-linux/usr/lib/python2.7/encodings/cp1250.py | 593 | 13942 | """ Python Character Mapping Codec cp1250 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1250.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,in... | gpl-2.0 | -6,356,832,018,515,183,000 | 44.413681 | 119 | 0.550351 | false | 3.023639 | false | false | false |
dataxu/ansible | lib/ansible/modules/system/kernel_blacklist.py | 125 | 4009 | #!/usr/bin/python
# encoding: utf-8 -*-
# Copyright: (c) 2013, Matthias Vogelgesang <matthias.vogelgesang@gmail.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__ = type
ANSIBLE_METADATA = {'... | gpl-3.0 | 8,498,771,084,445,727,000 | 24.864516 | 92 | 0.575206 | false | 4.017034 | false | false | false |
163gal/Time-Line | libs_arm/wx/_controls.py | 2 | 332374 | # This file was created automatically by SWIG 1.3.29.
# Don't modify this file, modify the SWIG interface instead.
import _controls_
import new
new_instancemethod = new.instancemethod
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "thisown"): return self.this.own(value)
if (name... | gpl-3.0 | -3,839,353,247,363,315,700 | 41.465057 | 151 | 0.65503 | false | 3.857592 | false | false | false |
blackbliss/callme | flask/lib/python2.7/site-packages/werkzeug/contrib/cache.py | 306 | 23519 | # -*- coding: utf-8 -*-
"""
werkzeug.contrib.cache
~~~~~~~~~~~~~~~~~~~~~~
The main problem with dynamic Web sites is, well, they're dynamic. Each
time a user requests a page, the webserver executes a lot of code, queries
the database, renders templates until the visitor gets the page he sees.
... | mit | -7,111,811,701,270,589,000 | 33.637703 | 86 | 0.579106 | false | 4.281631 | false | false | false |
pipet/pipet | pipet/sources/zendesk/tasks.py | 2 | 1544 | from contextlib import contextmanager
from datetime import datetime
from inspect import isclass
from celery import chord, group
from celery_once import QueueOnce
from celery.schedules import crontab
from celery.utils.log import get_task_logger
from sqlalchemy.orm.attributes import flag_modified
# from pipet import ce... | apache-2.0 | 156,606,072,465,059,940 | 28.692308 | 96 | 0.645725 | false | 4.084656 | false | false | false |
prutseltje/ansible | test/units/modules/network/f5/test_bigip_gtm_datacenter.py | 23 | 6819 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# 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
import os
import json
import sys
from nose.plugins.skip import SkipTest
i... | gpl-3.0 | 1,435,203,684,349,960,200 | 30.716279 | 91 | 0.628685 | false | 4.235404 | true | false | false |
antb/TPT----My-old-mod | src/python/stdlib/ctypes/test/test_errno.py | 115 | 2330 | import unittest, os, errno
from ctypes import *
from ctypes.util import find_library
from test import test_support
try:
import threading
except ImportError:
threading = None
class Test(unittest.TestCase):
def test_open(self):
libc_name = find_library("c")
if libc_name is None:
r... | gpl-2.0 | 785,952,512,028,991,400 | 28.125 | 69 | 0.554077 | false | 3.782468 | true | false | false |
marcoantoniooliveira/labweb | oscar/lib/python2.7/site-packages/debug_toolbar/panels/sql/forms.py | 36 | 2784 | from __future__ import absolute_import, unicode_literals
import json
import hashlib
from django import forms
from django.conf import settings
from django.db import connections
from django.utils.encoding import force_text
from django.utils.functional import cached_property
from django.core.exceptions import Validation... | bsd-3-clause | -2,574,129,591,306,319,400 | 29.26087 | 83 | 0.64727 | false | 4.309598 | false | false | false |
2asoft/tdesktop | Telegram/build/release.py | 4 | 7388 | import os, sys, requests, pprint, re, json
from uritemplate import URITemplate, expand
from subprocess import call
changelog_file = '../../changelog.txt'
token_file = '../../../TelegramPrivate/github-releases-token.txt'
version = ''
commit = ''
for arg in sys.argv:
if re.match(r'\d+\.\d+', arg):
version = arg
... | gpl-3.0 | -4,684,818,419,198,945,000 | 27.859375 | 138 | 0.614781 | false | 3.20799 | false | false | false |
UASLab/ImageAnalysis | video/hud.py | 1 | 43557 | import datetime
import ephem # dnf install python3-pyephem
import math
import navpy
import numpy as np
# find our custom built opencv first
import sys
sys.path.insert(0, "/usr/local/opencv3/lib/python2.7/site-packages/")
import cv2
sys.path.append('../scripts')
from lib import transformations
impo... | mit | -679,292,853,521,603,500 | 40.601719 | 115 | 0.489497 | false | 3.026053 | false | false | false |
jdemel/gnuradio | gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/text.py | 3 | 1295 | #
# Copyright 2010 Free Software Foundation, Inc.
#
# This file was generated by gr_modtool, a tool from the GNU Radio framework
# This file is a part of gr-howto
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
"""
Utilities for extracting text from generated classes.
"""
from __future__ import unicode_literals
def ... | gpl-3.0 | -4,949,053,946,127,237,000 | 27.152174 | 100 | 0.642471 | false | 3.912387 | false | false | false |
4rado/RepositoryForProject | Lib/site-packages/scipy/linalg/decomp_schur.py | 55 | 5250 | """Schur decomposition functions."""
import numpy
from numpy import asarray_chkfinite, single
# Local imports.
import misc
from misc import LinAlgError, _datacopied
from lapack import get_lapack_funcs
from decomp import eigvals
__all__ = ['schur', 'rsf2csf']
_double_precision = ['i','l','d']
def schur(a, output='... | gpl-3.0 | -8,418,565,791,650,039,000 | 30.437126 | 83 | 0.555619 | false | 3.252788 | false | false | false |
savi-dev/keystone | keystone/common/kvs.py | 4 | 1477 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 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 requ... | apache-2.0 | 1,685,284,111,099,958,500 | 27.403846 | 75 | 0.631009 | false | 4.125698 | false | false | false |
zasdfgbnm/tensorflow | tensorflow/examples/tutorials/mnist/mnist_softmax_xla.py | 37 | 3631 | # 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 | 5,282,069,357,783,920,000 | 33.254717 | 80 | 0.657119 | false | 3.57734 | false | false | false |
alex/fabric | fabric/network.py | 8 | 24613 | """
Classes and subroutines dealing with network connections and related topics.
"""
from __future__ import with_statement
from functools import wraps
import getpass
import os
import re
import time
import socket
import sys
from StringIO import StringIO
from fabric.auth import get_password, set_password
from fabric.... | bsd-2-clause | -4,666,307,345,220,745,000 | 36.236006 | 164 | 0.621826 | false | 4.222508 | true | false | false |
adrianholovaty/django | django/contrib/gis/admin/widgets.py | 10 | 4344 | from django.forms.widgets import Textarea
from django.template import loader, Context
from django.templatetags.static import static
from django.utils import translation
from django.contrib.gis.gdal import OGRException
from django.contrib.gis.geos import GEOSGeometry, GEOSException
# Creating a template context that c... | bsd-3-clause | 8,129,332,532,780,420,000 | 39.981132 | 74 | 0.5686 | false | 4.636073 | false | false | false |
vikatory/kbengine | kbe/src/lib/python/Lib/encodings/cp863.py | 272 | 34252 | """ Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP863.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_map)
def decode(self,input,errors='strict'):
... | lgpl-3.0 | -6,916,906,441,276,573,000 | 48.071633 | 97 | 0.602739 | false | 2.951232 | false | false | false |
vjmac15/Lyilis | lib/youtube_dl/extractor/baidu (VJ Washington's conflicted copy 2017-08-29).py | 90 | 1980 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import unescapeHTML
class BaiduVideoIE(InfoExtractor):
IE_DESC = '百度视频'
_VALID_URL = r'https?://v\.baidu\.com/(?P<type>[a-z]+)/(?P<id>\d+)\.htm'
_TESTS = [{
'url': 'http://v.baidu.com... | gpl-3.0 | 8,918,850,448,971,882,000 | 33.75 | 111 | 0.58222 | false | 3.13871 | false | false | false |
Solinea/horizon | openstack_dashboard/dashboards/admin/images/views.py | 3 | 8396 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | apache-2.0 | 3,675,810,975,928,954,000 | 38.051163 | 78 | 0.575989 | false | 4.548212 | false | false | false |
luiseduardohdbackup/odoo | addons/account/wizard/account_move_line_reconcile_select.py | 385 | 2362 | # -*- 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 | -3,165,510,815,337,637,000 | 42.666667 | 119 | 0.59542 | false | 4.203209 | false | false | false |
ruschelp/cortex-vfx | test/IECore/Shader.py | 12 | 3204 | ##########################################################################
#
# Copyright (c) 2007-2011, Image Engine Design 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:
#
# * Redis... | bsd-3-clause | 8,937,002,234,067,745,000 | 34.208791 | 78 | 0.660737 | false | 3.751756 | true | false | false |
gangadharkadam/smrterp | erpnext/stock/doctype/warehouse/warehouse.py | 3 | 5175 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cint, validate_email_add
from frappe import throw, msgprint, _
from frappe.model.document import Document
cl... | agpl-3.0 | 6,077,781,720,569,020,000 | 36.773723 | 114 | 0.687343 | false | 3.224299 | false | false | false |
ajose01/rethinkdb | scripts/VirtuaBuild/builder.py | 46 | 6345 | #!/usr/bin/env python
# Copyright 2010-2012 RethinkDB, all rights reserved.
from vcoptparse import *
import vm_build
import sys
from threading import Thread, Semaphore
class Builder(Thread):
def __init__(self, name, branch, target, semaphore):
Thread.__init__(self)
self.name = name
self.bra... | agpl-3.0 | 939,719,559,956,513,200 | 44.647482 | 275 | 0.626162 | false | 3.265569 | false | false | false |
c1728p9/pyOCD | pyOCD/target/target_stm32f103rc.py | 4 | 1457 | """
mbed CMSIS-DAP debugger
Copyright (c) 2006-2013 ARM Limited
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 ... | apache-2.0 | -6,004,540,841,488,146,000 | 32.883721 | 151 | 0.728895 | false | 3.237778 | false | false | false |
technologiescollege/s2a_fr | s2a/Python/Lib/test/lock_tests.py | 110 | 15126 | """
Various tests for synchronization primitives.
"""
import sys
import time
from thread import start_new_thread, get_ident
import threading
import unittest
from test import test_support as support
def _wait():
# A crude wait/yield function not relying on synchronization primitives.
time.sleep(0.01)
class ... | gpl-3.0 | 1,044,183,361,976,538,100 | 26.703297 | 82 | 0.536229 | false | 3.940089 | true | false | false |
krishna-pandey-git/django | tests/template_tests/filter_tests/test_timesince.py | 207 | 5422 | from __future__ import unicode_literals
from datetime import datetime, timedelta
from django.template.defaultfilters import timesince_filter
from django.test import SimpleTestCase
from django.test.utils import requires_tz_support
from ..utils import setup
from .timezone_utils import TimezoneTestCase
class Timesinc... | bsd-3-clause | -8,209,475,703,017,608,000 | 41.031008 | 128 | 0.634821 | false | 3.571805 | true | false | false |
mne-tools/mne-tools.github.io | 0.20/_downloads/76822bb92a8465181ec2a7ee96ca8cf4/plot_decoding_csp_timefreq.py | 1 | 6457 | """
============================================================================
Decoding in time-frequency space data using the Common Spatial Pattern (CSP)
============================================================================
The time-frequency decomposition is estimated by iterating over raw data that
has be... | bsd-3-clause | 240,441,842,313,748,830 | 39.10559 | 79 | 0.611275 | false | 3.6834 | false | false | false |
pennersr/django-allauth | allauth/socialaccount/providers/orcid/provider.py | 2 | 1564 | from allauth.socialaccount.providers.base import ProviderAccount
from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider
class Scope(object):
USERINFO_PROFILE = "/authenticate"
class OrcidAccount(ProviderAccount):
def get_profile_url(self):
return extract_from_dict(self.account.ex... | mit | 6,449,739,463,738,600,000 | 27.436364 | 86 | 0.618926 | false | 3.777778 | false | false | false |
d40223223/2015cdbg6team0622 | static/Brython3.1.1-20150328-091302/Lib/importlib/basehook.py | 608 | 1396 | from javascript import JSObject
from browser import window
import urllib.request
class TempMod:
def __init__(self, name):
self.name=name
#define my custom import hook (just to see if it get called etc).
class BaseHook:
def __init__(self, fullname=None, path=None):
self._fullname=fullname
self._p... | gpl-3.0 | 834,423,359,024,821,900 | 29.347826 | 70 | 0.537966 | false | 3.867036 | false | false | false |
fx2003/tensorflow-study | TensorFlow实战/models/syntaxnet/dragnn/python/composite_optimizer.py | 12 | 2604 | # Copyright 2017 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 required by applicable law or a... | mit | 4,514,945,215,384,570,000 | 36.2 | 80 | 0.635177 | false | 4.458904 | false | false | false |
mshafiq9/django | django/views/generic/detail.py | 306 | 6922 | from __future__ import unicode_literals
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from django.http import Http404
from django.utils.translation import ugettext as _
from django.views.generic.base import ContextMixin, TemplateResponseMixin, View
class SingleObjectMixin(Conte... | bsd-3-clause | -6,310,951,046,772,378,000 | 36.825137 | 108 | 0.582202 | false | 4.477361 | false | false | false |
takeflight/wagtailmodelchooser | wagtailmodelchooser/__init__.py | 1 | 2011 | from .utils import kwarg_decorator, last_arg_decorator
from .version import version as __version__
from .version import version_info
__all__ = [
'__version__', 'version_info', 'registry', 'register_model_chooser',
'register_simple_model_chooser', 'register_filter',
]
class Registry(object):
def __init__(... | bsd-2-clause | -339,373,218,791,220,300 | 29.469697 | 81 | 0.665341 | false | 4.079108 | false | false | false |
hsuchie4/TACTIC | src/pyasm/deprecated/flash/flash_file_naming.py | 6 | 1678 | ###########################################################
#
# Copyright (c) 2005, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permi... | epl-1.0 | 7,258,592,367,855,573,000 | 26.966667 | 78 | 0.607867 | false | 3.884259 | false | false | false |
yongshengwang/hue | desktop/core/ext-py/pycrypto-2.6.1/build/lib.linux-x86_64-2.7/Crypto/PublicKey/DSA.py | 123 | 13695 | # -*- coding: utf-8 -*-
#
# PublicKey/DSA.py : DSA signature primitive
#
# Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net>
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public d... | apache-2.0 | 7,233,003,489,526,411,000 | 35.134565 | 116 | 0.584958 | false | 4.029126 | false | false | false |
FlaPer87/qpid-proton | proton-c/mllib/dom.py | 41 | 6497 | #
# 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... | apache-2.0 | -4,284,463,407,971,938,300 | 19.958065 | 75 | 0.583654 | false | 3.666479 | false | false | false |
happyleavesaoc/home-assistant | homeassistant/components/cover/myq.py | 3 | 2882 | """
Support for MyQ-Enabled Garage Doors.
For more details about this platform, please refer to the documentation
https://home-assistant.io/components/cover.myq/
"""
import logging
import voluptuous as vol
from homeassistant.components.cover import CoverDevice
from homeassistant.const import (
CONF_USERNAME, CON... | apache-2.0 | -2,589,647,039,719,210,500 | 28.111111 | 77 | 0.649202 | false | 3.832447 | false | false | false |
destijl/grr | grr/lib/key_utils.py | 2 | 3080 | #!/usr/bin/env python
"""This file abstracts the loading of the private key."""
from cryptography import x509
from cryptography.hazmat.backends import openssl
from cryptography.hazmat.primitives import hashes
from cryptography.x509 import oid
from grr.lib import rdfvalue
from grr.lib.rdfvalues import crypto as rdf_c... | apache-2.0 | -7,206,638,405,950,660,000 | 31.765957 | 78 | 0.69513 | false | 3.589744 | false | false | false |
bbrezillon/linux-sunxi | scripts/gdb/linux/symbols.py | 68 | 6310 | #
# gdb helper commands and functions for Linux kernel debugging
#
# load kernel and module symbols
#
# Copyright (c) Siemens AG, 2011-2013
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
#
# This work is licensed under the terms of the GNU GPL version 2.
#
import gdb
import os
import re
from linux import module... | gpl-2.0 | -3,705,187,531,682,248,700 | 34.852273 | 79 | 0.58225 | false | 4.145861 | false | false | false |
dharmabumstead/ansible | lib/ansible/plugins/action/command.py | 117 | 1121 | # Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible import constants as C
from ansible.plugins.action import ActionBase
from ansible.util... | gpl-3.0 | 6,676,477,658,934,152,000 | 36.366667 | 103 | 0.683318 | false | 3.8 | false | false | false |
TESScience/httm | httm/transformations/metadata.py | 1 | 5125 | # HTTM: A transformation library for RAW and Electron Flux TESS Images
# Copyright (C) 2016, 2017 John Doty and Matthew Wampler-Doty of Noqsi Aerospace, Ltd.
#
# 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 Softwar... | gpl-3.0 | 368,438,116,170,356,100 | 41.008197 | 117 | 0.642537 | false | 3.921194 | false | false | false |
aguedes/bluez | test/sap_client.py | 86 | 30639 | """ Copyright (C) 2010-2011 ST-Ericsson SA """
""" Author: Szymon Janc <szymon.janc@tieto.com> for ST-Ericsson. """
""" 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... | gpl-2.0 | -5,468,918,267,625,201,000 | 31.490986 | 125 | 0.549561 | false | 3.621631 | false | false | false |
mvidalgarcia/indico | indico/core/webpack.py | 2 | 1598 | # This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
import os
from flask_webpackext import FlaskWebpackExt
from flas... | mit | -9,097,333,290,528,816,000 | 36.162791 | 92 | 0.69587 | false | 3.859903 | false | false | false |
seanwestfall/django | django/views/static.py | 190 | 5142 | """
Views and functions for serving static files. These are only to be used
during development, and SHOULD NOT be used in a production setting.
"""
from __future__ import unicode_literals
import mimetypes
import os
import posixpath
import re
import stat
from django.http import (
FileResponse, Http404, HttpRespons... | bsd-3-clause | -7,987,543,726,296,927,000 | 33.05298 | 78 | 0.624854 | false | 3.931193 | false | false | false |
dionbosschieter/NetworkMonitor | src/Client/InfoContainer.py | 1 | 1892 | import terminal
import curses
import time
from curses import panel
class InfoContainer(object):
def __init__(self, stdscreen, title, debug_console):
self.debug_console = debug_console
self.height = int(terminal.height/2)
self.width = terminal.width - 2
self.title = title
s... | mit | 8,029,939,048,508,223,000 | 27.666667 | 68 | 0.581924 | false | 3.753968 | false | false | false |
eriol/circuits | examples/node/nodeserver.py | 3 | 2429 | #!/usr/bin/env python
"""Node Server Example
This example demonstrates how to create a very simple node server
that supports bi-diractional messaging between server and connected
clients forming a cluster of nodes.
"""
from __future__ import print_function
from os import getpid
from optparse import OptionParser
... | mit | -6,181,088,414,534,044,000 | 21.490741 | 75 | 0.59613 | false | 4.075503 | false | false | false |
krieger-od/nwjs_chromium.src | chrome/common/extensions/docs/server2/build_server.py | 80 | 3340 | #!/usr/bin/env python
# Copyright (c) 2012 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.
# This script is used to copy all dependencies into the local directory.
# The package of files can then be uploaded to App Engine.... | bsd-3-clause | -4,363,357,893,083,128,000 | 36.52809 | 80 | 0.594611 | false | 3.380567 | false | false | false |
bijanfallah/OI_CCLM | src/RMSE_MAPS_INGO.py | 1 | 2007 | # Program to show the maps of RMSE averaged over time
import matplotlib.pyplot as plt
from sklearn.metrics import mean_squared_error
import os
from netCDF4 import Dataset as NetCDFFile
import numpy as np
from CCLM_OUTS import Plot_CCLM
# option == 1 -> shift 4 with default cclm domain and nboundlines = 3
# option == 2... | mit | 6,172,872,896,229,471,000 | 37.596154 | 124 | 0.63727 | false | 3.16063 | false | false | false |
steven-hadfield/dpxdt | deployment/appengine/appengine_config.py | 4 | 2989 | #!/usr/bin/env python
# Copyright 2013 Brett Slatkin
#
# 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 o... | apache-2.0 | 6,358,295,125,254,556,000 | 28.89 | 77 | 0.742389 | false | 3.694685 | false | false | false |
gangadharkadam/contributionerp | erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.py | 46 | 3173 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
def execute(filters=None):
columns = get_columns()
proj_details = get_project_details()
pr_item_map = get_purchas... | agpl-3.0 | -2,526,490,087,109,348,000 | 39.164557 | 98 | 0.69209 | false | 2.987759 | false | false | false |
imsparsh/python-for-android | python3-alpha/extra_modules/gdata/books/__init__.py | 124 | 18532 | #!/usr/bin/python
"""
Data Models for books.service
All classes can be instantiated from an xml string using their FromString
class method.
Notes:
* Book.title displays the first dc:title because the returned XML
repeats that datum as atom:title.
There is an undocumented gbs:ope... | apache-2.0 | 7,942,596,538,569,523,000 | 38.179704 | 80 | 0.642402 | false | 4.106359 | false | false | false |
jjmleiro/hue | desktop/core/ext-py/Django-1.6.10/tests/save_delete_hooks/models.py | 130 | 1035 | """
13. 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 Per... | apache-2.0 | 5,388,654,497,079,564,000 | 28.571429 | 75 | 0.635749 | false | 3.736462 | false | false | false |
kasioumis/invenio | invenio/modules/documentation/views.py | 1 | 3579 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013, 2014 CERN.
#
# 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 option) any... | gpl-2.0 | 9,194,547,294,458,207,000 | 35.520408 | 78 | 0.657726 | false | 4.260714 | false | false | false |
crosswalk-project/blink-crosswalk-efl | Source/devtools/scripts/concatenate_module_scripts.py | 11 | 2413 | #!/usr/bin/env python
#
# Copyright 2014 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.
"""
Concatenates module scripts based on the module.json descriptor.
Optionally, minifies the result using rjsmin.
"""
from cStringI... | bsd-3-clause | -1,551,874,067,306,360,800 | 26.735632 | 93 | 0.654787 | false | 3.548529 | false | false | false |
aman-iitj/scipy | scipy/ndimage/__init__.py | 46 | 5436 | """
=========================================================
Multi-dimensional image processing (:mod:`scipy.ndimage`)
=========================================================
.. currentmodule:: scipy.ndimage
This package contains various functions for multi-dimensional image
processing.
Filters :mod:`scipy.ndima... | bsd-3-clause | -2,567,934,379,819,761,000 | 28.704918 | 74 | 0.702355 | false | 4.260188 | false | false | false |
JackDandy/SickGear | lib/guessit/transfo/guess_weak_episodes_rexps.py | 21 | 2127 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2012 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free... | gpl-3.0 | 7,319,974,327,149,637,000 | 33.306452 | 74 | 0.643159 | false | 3.99812 | false | false | false |
mrknow/filmkodi | plugin.video.fanfilm/resources/lib/resolvers/putstream.py | 2 | 1131 | # -*- coding: utf-8 -*-
'''
FanFilm Add-on
Copyright (C) 2015 lambda
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 ... | apache-2.0 | 8,110,821,232,460,552,000 | 28.763158 | 73 | 0.654288 | false | 4.127737 | false | false | false |
joewashear007/ScrappyDoo | copy.py | 1 | 3382 | import os
import shutil
import zipfile
import fnmatch
import uuid
def main():
kits = findAll(".")
for kit in kits:
print("* ", kit, " -> ", kits[kit])
print()
print()
print("Starting extraction:")
print("------------------------------------------")
extractKits(kits)
def findAll(dir... | mit | 7,577,268,462,791,354,000 | 27.905983 | 102 | 0.527794 | false | 3.704272 | false | false | false |
sasukeh/neutron | neutron/api/rpc/callbacks/resource_manager.py | 32 | 4710 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 | -3,525,136,190,414,913,000 | 32.884892 | 79 | 0.679193 | false | 4.313187 | false | false | false |
listamilton/supermilton.repository | script.module.youtube.dl/lib/youtube_dl/extractor/moniker.py | 66 | 3951 | # coding: utf-8
from __future__ import unicode_literals
import os.path
import re
from .common import InfoExtractor
from ..utils import (
ExtractorError,
remove_start,
sanitized_Request,
urlencode_postdata,
)
class MonikerIE(InfoExtractor):
IE_DESC = 'allmyvideos.net and vidspot.net'
_VALID_U... | gpl-2.0 | 2,729,320,049,983,951,400 | 33.060345 | 105 | 0.529486 | false | 3.39433 | false | false | false |
gohin/django | django/contrib/auth/management/commands/createsuperuser.py | 65 | 7695 | """
Management utility to create superusers.
"""
from __future__ import unicode_literals
import getpass
import sys
from django.contrib.auth import get_user_model
from django.contrib.auth.management import get_default_username
from django.core import exceptions
from django.core.management.base import BaseCommand, Comm... | bsd-3-clause | 6,320,757,852,442,747,000 | 43.738372 | 109 | 0.538532 | false | 4.764706 | false | false | false |
wwright2/dcim3-angstrom1 | sources/openembedded-core/scripts/pybootchartgui/pybootchartgui/samples.py | 7 | 5537 | # This file is part of pybootchartgui.
# pybootchartgui 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.
# pybootchartgui is dis... | mit | 4,583,296,552,943,260,700 | 35.668874 | 160 | 0.601409 | false | 3.50443 | false | false | false |
rickerc/neutron_audit | neutron/plugins/nec/ofc_manager.py | 9 | 9461 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012 NEC 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
# a copy of the License at
#
# http://www.apache.or... | apache-2.0 | -5,019,626,671,642,997,000 | 45.377451 | 79 | 0.621499 | false | 3.4217 | false | false | false |
vmobi-gogh/android_kernel_samsung_gogh | Documentation/networking/cxacru-cf.py | 14668 | 1626 | #!/usr/bin/env python
# Copyright 2009 Simon Arlott
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# This program i... | gpl-2.0 | 1,200,256,328,089,234,400 | 32.875 | 78 | 0.730012 | false | 3.318367 | false | false | false |
slockit/DAO | tests/scenarios/fuel/run.py | 4 | 1429 | import random
from utils import constrained_sum_sample_pos, arr_str
scenario_description = (
"During the fueling period of the DAO, send enough ether from all "
"accounts to create tokens and then assert that the user's balance is "
"indeed correct and that the minimum fueling goal has been reached"
)
d... | lgpl-3.0 | -5,488,954,882,271,867,000 | 28.770833 | 75 | 0.621414 | false | 3.435096 | false | false | false |
tarzan0820/odoo | openerp/tools/lru.py | 237 | 3197 | # -*- coding: utf-8 -*-
# taken from http://code.activestate.com/recipes/252524-length-limited-o1-lru-cache-implementation/
import threading
from func import synchronized
__all__ = ['LRU']
class LRUNode(object):
__slots__ = ['prev', 'next', 'me']
def __init__(self, prev, me):
self.prev = prev
... | agpl-3.0 | 7,655,114,437,631,426,000 | 23.592308 | 99 | 0.510166 | false | 3.674713 | false | false | false |
Ircam-Web/mezzanine-organization | organization/projects/migrations/0085_auto_20190619_2023.py | 1 | 1116 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2019-06-19 18:23
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_depende... | agpl-3.0 | 4,549,997,135,370,149,400 | 38.857143 | 276 | 0.650538 | false | 3.943463 | false | false | false |
sdague/home-assistant | homeassistant/components/dyson/sensor.py | 5 | 6457 | """Support for Dyson Pure Cool Link Sensors."""
import logging
from libpurecool.dyson_pure_cool import DysonPureCool
from libpurecool.dyson_pure_cool_link import DysonPureCoolLink
from homeassistant.const import PERCENTAGE, STATE_OFF, TEMP_CELSIUS, TIME_HOURS
from homeassistant.helpers.entity import Entity
from . im... | apache-2.0 | 5,239,885,266,624,850,000 | 30.807882 | 83 | 0.627536 | false | 3.827504 | false | false | false |
suninsky/ReceiptOCR | Python/server/lib/python2.7/site-packages/markupsafe/__init__.py | 144 | 10697 | # -*- coding: utf-8 -*-
"""
markupsafe
~~~~~~~~~~
Implements a Markup string.
:copyright: (c) 2010 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import re
import string
from collections import Mapping
from markupsafe._compat import text_type, string_types, int_types, \
u... | mit | 2,225,617,646,636,672,500 | 34.072131 | 82 | 0.567355 | false | 4.029002 | false | false | false |
ahmadio/edx-platform | lms/djangoapps/mobile_api/social_facebook/groups/views.py | 86 | 4938 | """
Views for groups info API
"""
from rest_framework import generics, status, mixins
from rest_framework.response import Response
from django.conf import settings
import facebook
from ...utils import mobile_view
from . import serializers
@mobile_view()
class Groups(generics.CreateAPIView, mixins.DestroyModelMixin)... | agpl-3.0 | -5,134,061,850,296,026,000 | 33.531469 | 117 | 0.614824 | false | 4.216909 | false | false | false |
skidzen/grit-i18n | grit/tool/build.py | 2 | 19603 | #!/usr/bin/env python
# Copyright (c) 2012 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.
'''The 'grit build' tool along with integration for this tool with the
SCons build system.
'''
import filecmp
import getopt
import... | bsd-2-clause | -7,293,954,927,933,790,000 | 38.363454 | 83 | 0.644442 | false | 4.028566 | false | false | false |
jonwright/ImageD11 | scripts/plotImageD11map.py | 1 | 1829 | #!/usr/bin/env python
from __future__ import print_function
from ImageD11.grain import read_grain_file
import sys, os
gf = read_grain_file(sys.argv[1])
mapfile=open(sys.argv[2],"w")
def dodot(xyz,k):
mapfile.write("%f %f %f %d\n"%(xyz[0],xyz[1],xyz[2],k))
def getmedian(s):
items=s.split()
j = -1
fo... | gpl-2.0 | -5,133,550,507,565,548,000 | 21.304878 | 88 | 0.574631 | false | 2.57969 | false | false | false |
eicher31/compassion-modules | child_compassion/mappings/household_mapping.py | 3 | 3536 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2016 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py... | agpl-3.0 | 8,306,735,830,094,433,000 | 40.116279 | 78 | 0.565328 | false | 3.69488 | false | false | false |
go-bears/nupic | src/nupic/encoders/category.py | 39 | 7798 | # ----------------------------------------------------------------------
# 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... | agpl-3.0 | -742,178,916,835,247,100 | 29.944444 | 113 | 0.662349 | false | 4.093438 | false | false | false |
dvliman/jaikuengine | .google_appengine/lib/django-1.5/tests/regressiontests/extra_regress/models.py | 114 | 1365 | from __future__ import unicode_literals
import copy
import datetime
from django.contrib.auth.models import User
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class RevisionableModel(models.Model):
base = models.ForeignKey('self', null=Tru... | apache-2.0 | -6,502,126,748,451,387,000 | 29.333333 | 75 | 0.667399 | false | 3.611111 | false | false | false |
goFrendiAsgard/kokoropy | kokoropy/packages/sqlalchemy/dialects/mysql/pyodbc.py | 32 | 2640 | # mysql/pyodbc.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: mysql+pyodbc
:name: PyODBC
:dbapi: pyodbc
:connectstr... | mit | -6,467,777,041,147,659,000 | 31.195122 | 77 | 0.660606 | false | 3.776824 | false | false | false |
chienlieu2017/it_management | odoo/addons/website_event/controllers/main.py | 7 | 11571 | # -*- coding: utf-8 -*-
import babel.dates
import re
import werkzeug
from datetime import datetime, timedelta
from dateutil.relativedelta import relativedelta
from odoo import fields, http, _
from odoo.addons.website.models.website import slug
from odoo.http import request
class WebsiteEventController(http.Controll... | gpl-3.0 | 8,617,715,063,772,964,000 | 43.675676 | 213 | 0.551465 | false | 3.881583 | false | false | false |
derekjchow/models | research/deeplab/core/nas_cell.py | 1 | 8432 | # Copyright 2018 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 applicab... | apache-2.0 | 4,058,546,181,967,095,300 | 41.371859 | 80 | 0.629032 | false | 3.51187 | false | false | false |
sgarrity/bedrock | lib/l10n_utils/management/commands/fluent.py | 8 | 3597 | # 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 pathlib import Path
import textwrap
from django.core.management.base import BaseCommand
class Command(BaseComman... | mpl-2.0 | -920,462,829,349,169,400 | 35.333333 | 98 | 0.627189 | false | 4.221831 | false | false | false |
kevinmel2000/brython | www/src/Lib/test/unittests/test_cgitb.py | 113 | 2551 | from test.support import run_unittest
from test.script_helper import assert_python_failure, temp_dir
import unittest
import sys
import cgitb
class TestCgitb(unittest.TestCase):
def test_fonts(self):
text = "Hello Robbie!"
self.assertEqual(cgitb.small(text), "<small>{}</small>".format(text))
... | bsd-3-clause | -8,993,424,027,276,596,000 | 35.442857 | 80 | 0.573501 | false | 3.900612 | true | false | false |
rhololkeolke/apo-website-devin | src/application/facebook/facebook.py | 2 | 8731 | """
This module contains helper classes and methods
for the facebook integration module
.. module:: application.facebook.facebook
.. moduleauthor:: Devin Schwab <dts34@case.edu>
"""
import facebooksdk as fb
import models
from flask import flash
class AlbumList(object):
def __init__(self, token):
"""
... | bsd-3-clause | 2,272,791,862,150,649,300 | 33.928 | 109 | 0.529607 | false | 4.367684 | false | false | false |
hectord/lettuce | tests/integration/lib/Django-1.2.5/django/core/handlers/base.py | 44 | 9926 | import sys
from django import http
from django.core import signals
from django.utils.encoding import force_unicode
from django.utils.importlib import import_module
class BaseHandler(object):
# Changes that are always applied to a response (in this order).
response_fixes = [
http.fix_location_header,
... | gpl-3.0 | 7,864,434,311,480,931,000 | 44.118182 | 143 | 0.598428 | false | 4.887248 | false | false | false |
ahmadio/edx-platform | lms/lib/courseware_search/lms_filter_generator.py | 58 | 5634 | """
This file contains implementation override of SearchFilterGenerator which will allow
* Filter by all courses in which the user is enrolled in
"""
from microsite_configuration import microsite
from student.models import CourseEnrollment
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import Co... | agpl-3.0 | 7,445,365,950,426,380,000 | 45.561983 | 107 | 0.63241 | false | 4.648515 | false | false | false |
goliate/sarakha63-persomov | couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/twentyfourvideo.py | 32 | 3892 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
parse_iso8601,
int_or_none,
)
class TwentyFourVideoIE(InfoExtractor):
IE_NAME = '24video'
_VALID_URL = r'https?://(?:www\.)?24video\.net/(?:video/(?:view|xml)/|player/new24_play\.swf\?id=)(... | gpl-3.0 | 5,228,835,369,578,570,000 | 34.018349 | 114 | 0.517422 | false | 3.560634 | false | false | false |
longman694/youtube-dl | youtube_dl/extractor/watchbox.py | 14 | 5539 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
int_or_none,
js_to_json,
strip_or_none,
try_get,
unified_timestamp,
)
class WatchBoxIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?w... | unlicense | 2,893,657,285,305,545,700 | 35.668874 | 116 | 0.506773 | false | 3.5 | false | false | false |
mesocentrefc/easybuild-framework | easybuild/tools/version.py | 2 | 2926 | ##
# Copyright 2009-2014 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (htt... | gpl-2.0 | -6,282,021,567,314,024,000 | 34.253012 | 100 | 0.719754 | false | 3.31746 | false | false | false |
broferek/ansible | test/units/modules/network/f5/test_bigip_service_policy.py | 38 | 4128 | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# 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
import os
import json
import pytest
import sys
if sys.version_info < (2... | gpl-3.0 | -4,717,631,936,433,852,000 | 30.272727 | 97 | 0.644864 | false | 3.973051 | true | false | false |
wavelets/zipline | zipline/examples/dual_ema_talib.py | 2 | 3230 | #!/usr/bin/env python
#
# Copyright 2013 Quantopian, 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 ... | apache-2.0 | -1,037,034,474,115,704,300 | 34.108696 | 77 | 0.644892 | false | 3.410771 | false | false | false |
crmccreary/openerp_server | openerp/addons/account_bank_statement_extensions/account_bank_statement.py | 9 | 6553 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under ... | agpl-3.0 | 8,069,233,019,505,464,000 | 46.839416 | 157 | 0.610255 | false | 3.877515 | false | false | false |
ProfessionalIT/maxigenios-website | sdk/google_appengine/lib/django-1.2/django/db/models/sql/datastructures.py | 396 | 1157 | """
Useful auxilliary data structures for query construction. Not useful outside
the SQL domain.
"""
class EmptyResultSet(Exception):
pass
class FullResultSet(Exception):
pass
class MultiJoin(Exception):
"""
Used by join construction code to indicate the point at which a
multi-valued join was att... | mit | 2,795,459,522,885,896,000 | 24.152174 | 76 | 0.607606 | false | 3.708333 | false | false | false |
wuga214/Django-Wuga | env/lib/python2.7/site-packages/pip/_vendor/distlib/markers.py | 1261 | 6282 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Parser for the environment markers micro-language defined in PEP 345."""
import ast
import os
import sys
import platform
from .compa... | apache-2.0 | 4,225,784,778,292,974,600 | 32.063158 | 77 | 0.552053 | false | 4.011494 | false | false | false |
paulgclark/rf_utilities | zmq_utils.py | 1 | 1239 | import zmq
import array
import time
import struct
import numpy as np
import pmt
import sys
class zmq_pull_socket():
def __init__(self, tcp_str, verbose=0):
self.context = zmq.Context()
self.receiver = self.context.socket(zmq.PULL)
self.receiver.connect(tcp_str)
def poll(self, type_str... | mit | 2,149,555,878,925,307,400 | 27.813953 | 63 | 0.596449 | false | 3.422652 | false | false | false |
kcpawan/django | tests/many_to_one/models.py | 215 | 2785 | """
Many-to-one relationships
To define a many-to-one relationship, use ``ForeignKey()``.
"""
from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Reporter(models.Model):
first_name = models.CharFiel... | bsd-3-clause | -1,773,659,522,397,237,800 | 26.85 | 97 | 0.712029 | false | 3.607513 | false | false | false |
xguse/ggplot | ggplot/geoms/geom_abline.py | 12 | 1487 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
from ggplot.utils import make_iterable_ntimes
from .geom import geom
# Note when documenting
# slope and intercept can be functions that compute the slope
# and intercept using the data. If ... | bsd-2-clause | -1,214,483,387,473,522,000 | 34.404762 | 66 | 0.569603 | false | 3.662562 | false | false | false |
Vegasvikk/django-cms | cms/models/static_placeholder.py | 49 | 3452 | import uuid
from django.contrib.auth import get_permission_codename
from django.contrib.sites.models import Site
from django.core.exceptions import ValidationError
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from cm... | bsd-3-clause | 5,500,780,088,044,019,000 | 39.139535 | 114 | 0.659328 | false | 4.070755 | false | false | false |
ChanChiChoi/scikit-learn | examples/model_selection/plot_roc.py | 146 | 3697 | """
=======================================
Receiver Operating Characteristic (ROC)
=======================================
Example of Receiver Operating Characteristic (ROC) metric to evaluate
classifier output quality.
ROC curves typically feature true positive rate on the Y axis, and false
positive rate on the X a... | bsd-3-clause | 7,034,067,062,988,640,000 | 34.548077 | 79 | 0.675412 | false | 3.260141 | true | false | false |
rcolasanti/CompaniesHouseScraper | DVLACompanyNmeMatchCoHoAPIFindMissing.py | 1 | 5174 |
import requests
import json
import numpy as np
import pandas as pd
import CoHouseToken
from difflib import SequenceMatcher
# In[3]:
def exactMatch(line1, line2):
line1=line1.upper().rstrip()
line2=line2.upper().rstrip()
#print("|"+line1+"|"+line2+"|",line1==line2)
return line1==line2
def ... | gpl-3.0 | -9,107,299,095,821,690,000 | 20.380165 | 110 | 0.55547 | false | 3.272612 | false | false | false |
javierTerry/odoo | addons/email_template/html2text.py | 440 | 14143 | #!/usr/bin/env python
"""html2text: Turn HTML into equivalent Markdown-structured text."""
__version__ = "2.36"
__author__ = "Aaron Swartz (me@aaronsw.com)"
__copyright__ = "(C) 2004-2008 Aaron Swartz. GNU GPL 3."
__contributors__ = ["Martin 'Joey' Schulze", "Ricardo Reyes", "Kevin Jay North"]
# TODO:
# Support deco... | agpl-3.0 | -7,231,034,888,977,510,000 | 29.812636 | 109 | 0.466096 | false | 3.623623 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.