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 |
|---|---|---|---|---|---|---|---|---|---|---|
mwv/scikit-learn | sklearn/preprocessing/_function_transformer.py | 163 | 2407 | from ..base import BaseEstimator, TransformerMixin
from ..utils import check_array
def _identity(X):
"""The identity function.
"""
return X
class FunctionTransformer(BaseEstimator, TransformerMixin):
"""Constructs a transformer from an arbitrary callable.
A FunctionTransformer forwards its X (a... | bsd-3-clause | -2,043,291,850,381,902,600 | 35.469697 | 77 | 0.676776 | false |
jtyr/ansible-modules-core | utilities/logic/pause.py | 10 | 2331 | # -*- mode: python -*-
# 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.
#
# Ansible is distr... | gpl-3.0 | 2,515,413,707,544,757,000 | 38.508475 | 270 | 0.731446 | false |
guerrerocarlos/odoo | addons/subscription/__openerp__.py | 261 | 1885 | # -*- 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 | 7,003,282,403,103,577,000 | 39.978261 | 107 | 0.609549 | false |
tenaciousjzh/titan-solr-cloud-test | zookeeper-3.3.5/contrib/zkpython/src/python/zk.py | 61 | 2528 | # 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 | 2,320,307,165,894,712,000 | 32.263158 | 152 | 0.675633 | false |
pidydx/grr | grr/lib/aff4_objects/reports_test.py | 2 | 1849 | #!/usr/bin/env python
"""Reporting tests."""
from grr.lib import aff4
from grr.lib import flags
from grr.lib import test_lib
from grr.lib.aff4_objects import reports
from grr.lib.rdfvalues import client as rdf_client
class ReportsTest(test_lib.AFF4ObjectTest):
"""Test the timeline implementation."""
def testCli... | apache-2.0 | 5,161,971,852,973,258,000 | 30.87931 | 70 | 0.665765 | false |
ptoraskar/django | tests/template_tests/syntax_tests/test_invalid_string.py | 440 | 2310 | from django.test import SimpleTestCase
from ..utils import setup
class InvalidStringTests(SimpleTestCase):
libraries = {'i18n': 'django.templatetags.i18n'}
@setup({'invalidstr01': '{{ var|default:"Foo" }}'})
def test_invalidstr01(self):
output = self.engine.render_to_string('invalidstr01')
... | bsd-3-clause | -9,180,522,483,129,134,000 | 36.258065 | 91 | 0.604329 | false |
phlax/pootle | pootle/apps/pootle_translationproject/migrations/0006_relink_or_drop_orphan_translationprojects.py | 7 | 1197 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.11 on 2016-11-08 21:27
from __future__ import unicode_literals
from django.db import migrations
def relink_or_drop_orphan_translationprojects(apps, schema_editor):
"""Relink or drop TPs with no project."""
Project = apps.get_model("pootle_project.Project")
... | gpl-3.0 | -385,315,388,075,579,650 | 33.2 | 79 | 0.621554 | false |
shakilkanji/rmc | data/processor.py | 3 | 23484 | import rmc.shared.constants as c
import rmc.shared.util as rmc_util
import rmc.models as m
import argparse
from datetime import datetime
import dateutil.parser
import glob
import json
import mongoengine as me
import os
import time
import re
import sys
def import_departments():
def clean_opendata_department(depar... | mit | 1,930,025,305,532,086,500 | 34.908257 | 79 | 0.539303 | false |
bdrung/audacity | lib-src/lv2/lv2/plugins/eg-metro.lv2/waflib/Tools/d.py | 278 | 2076 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
from waflib import Utils,Task,Errors
from waflib.TaskGen import taskgen_method,feature,extension
from waflib.Tools import d_scan,d_config
from waflib.Tools.ccroot import link_... | gpl-2.0 | -6,967,568,142,258,597,000 | 37.444444 | 211 | 0.703276 | false |
frankbp/robotframework-selenium2library | test/run_tests.py | 42 | 3301 | #!/usr/bin/env python
import env
import os
import sys
from subprocess import Popen, call
from tempfile import TemporaryFile
from run_unit_tests import run_unit_tests
ROBOT_ARGS = [
'--doc', 'SeleniumSPacceptanceSPtestsSPwithSP%(browser)s',
'--outputdir', '%(outdir)s',
'--variable', 'browser:%(browser)s',... | apache-2.0 | -8,557,650,495,162,871,000 | 29.284404 | 100 | 0.610724 | false |
DataMarket/multilingual | multilingual/query.py | 1 | 28615 | """
Django-multilingual: a QuerySet subclass for models with translatable
fields.
This file contains the implementation for QSRF Django.
"""
import datetime
from django.core.exceptions import FieldError
from django.db import connection
from django.db.models.fields import FieldDoesNotExist
from django.db.models.query... | mit | 3,234,908,400,310,867,000 | 44.492846 | 115 | 0.516792 | false |
scifiswapnil/Project-LoCatr | lib/python2.7/site-packages/django/db/models/base.py | 16 | 75879 | from __future__ import unicode_literals
import copy
import inspect
import warnings
from itertools import chain
from django.apps import apps
from django.conf import settings
from django.core import checks
from django.core.exceptions import (
NON_FIELD_ERRORS, FieldDoesNotExist, FieldError, MultipleObjectsReturned,... | mit | 8,267,178,087,904,420,000 | 40.737624 | 114 | 0.539873 | false |
SgfPythonDevs/tchristell-raspi | scripts/Gmail.py | 2 | 4325 | #!/user/bin/env python
# Gmail.py
# Checks for new mail using IMAPclient and gmail account
# Uses callback to react to push button to send text message
from imapclient import IMAPClient
import time
import RPi.GPIO as GPIO
# Flag to enable debugging statements
DEBUG = True
# Used for IMAP mail retrieval
HOSTNAME = '... | mit | 9,021,506,824,321,068,000 | 27.642384 | 85 | 0.615954 | false |
skarphed/skarphed | admin/src/skarphedadmin/gui/YesNoPage.py | 1 | 2349 | #!/usr/bin/python
#-*- coding: utf-8 -*-
###########################################################
# © 2011 Daniel 'grindhold' Brendle and Team
#
# This file is part of Skarphed.
#
# Skarphed is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License
# as ... | agpl-3.0 | 8,220,114,302,601,139,000 | 32.542857 | 70 | 0.631175 | false |
mcflugen/dakota-experiments | dakota_utils/models/tests/test_hydrotrend.py | 2 | 4020 | #!/usr/bin/env python
#
# Tests for dakota_utils.models.hydrotrend.
#
# Call with:
# $ nosetests -sv
#
# Mark Piper (mark.piper@colorado.edu)
from nose.tools import *
import os
import tempfile
import shutil
from dakota_utils.models.hydrotrend import HydroTrend
def setup_module():
print('HydroTrend tests:')
... | mit | 7,346,356,174,288,590,000 | 24.935484 | 68 | 0.656965 | false |
jakevdp/megaman | megaman/embedding/tests/test_embeddings.py | 4 | 1798 | """General tests for embeddings"""
# LICENSE: Simplified BSD https://github.com/mmp2/megaman/blob/master/LICENSE
from itertools import product
import numpy as np
from numpy.testing import assert_raises, assert_allclose
from megaman.embedding import (Isomap, LocallyLinearEmbedding,
LTS... | bsd-2-clause | -698,770,212,139,749,600 | 31.690909 | 77 | 0.669077 | false |
m0ppers/arangodb | 3rdParty/boost/1.61.0/tools/build/src/build_system.py | 11 | 33823 | # Status: mostly ported. Missing is --out-xml support, 'configure' integration
# and some FIXME.
# Base revision: 64351
# Copyright 2003, 2005 Dave Abrahams
# Copyright 2006 Rene Rivera
# Copyright 2003, 2004, 2005, 2006, 2007 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanyi... | apache-2.0 | 4,794,403,222,127,328,000 | 38.011534 | 136 | 0.584011 | false |
kc4271/batch_downloader | requests/packages/chardet/chardistribution.py | 2755 | 9226 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | mit | -8,079,003,940,217,450,000 | 38.939394 | 80 | 0.627683 | false |
cryptickp/heat | heat/engine/resources/openstack/glance/glance_image.py | 4 | 4527 | #
# 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
# ... | apache-2.0 | -143,608,365,873,558,080 | 34.367188 | 78 | 0.559973 | false |
mogoweb/webkit_for_android5.1 | webkit/Tools/Scripts/webkitpy/common/system/stack_utils.py | 215 | 2734 | # Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | apache-2.0 | 4,170,367,676,445,243,400 | 39.80597 | 72 | 0.707754 | false |
arbrandes/edx-platform | openedx/core/djangoapps/content_libraries/tests/test_content_libraries.py | 3 | 41306 | """
Tests for Blockstore-based Content Libraries
"""
from uuid import UUID
from unittest.mock import patch
import ddt
from django.conf import settings
from django.contrib.auth.models import Group
from django.test.client import Client
from django.test.utils import override_settings
from organizations.models import Orga... | agpl-3.0 | 5,251,416,424,670,562,000 | 49.616422 | 189 | 0.607075 | false |
litlpoet/rl-library | system/common/libs/mwclient/simplejson/decoder.py | 4 | 9113 | """
Implementation of JSONDecoder
"""
import re
from simplejson.scanner import Scanner, pattern
FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL
def _floatconstants():
import struct
import sys
_BYTES = '7FF80000000000007FF0000000000000'.decode('hex')
if sys.byteorder != 'big':
_BYT... | apache-2.0 | -4,882,981,806,272,009,000 | 31.380952 | 77 | 0.501701 | false |
pgmillon/ansible | lib/ansible/modules/cloud/amazon/aws_waf_rule.py | 16 | 13360 | #!/usr/bin/python
# Copyright (c) 2017 Will Thames
# Copyright (c) 2015 Mike Mochan
# 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': 'community'}
DO... | gpl-3.0 | -3,794,529,515,301,552,000 | 38.178886 | 148 | 0.641317 | false |
hanicker/odoo | addons/crm/sales_team.py | 321 | 5053 | # -*- coding: utf-8 -*-
import calendar
from datetime import date
from dateutil import relativedelta
import json
from openerp import tools
from openerp.osv import fields, osv
class crm_case_section(osv.Model):
_inherit = 'crm.case.section'
_inherits = {'mail.alias': 'alias_id'}
def _get_opportunities_d... | agpl-3.0 | -4,784,910,810,301,341,000 | 58.447059 | 226 | 0.639422 | false |
Hubert51/AutoGrading | learning/web_Haotian/venv/Lib/site-packages/werkzeug/wsgi.py | 17 | 49347 | # -*- coding: utf-8 -*-
"""
werkzeug.wsgi
~~~~~~~~~~~~~
This module implements WSGI related helpers.
:copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import io
try:
import httplib
except ImportError:
from http import ... | mit | -6,111,313,200,067,640,000 | 35.178152 | 81 | 0.591262 | false |
CVML/pycortex | cortex/dataset/braindata.py | 2 | 14173 | import hashlib
import numpy as np
import h5py
from ..database import db
class BrainData(object):
def __init__(self, data, subject, **kwargs):
if isinstance(data, str):
import nibabel
nib = nibabel.load(data)
data = nib.get_data().T
self._data = data
try:... | bsd-2-clause | -6,015,160,943,890,405,000 | 33.400485 | 201 | 0.558103 | false |
lifeisstillgood/kashflo | setup.py | 1 | 1202 | #!/usr/bin/env python
#! -*- coding: utf-8 -*-
###
# Copyright (c) Paul Brian 2013
# This software is subject to
# the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
###
"""
setup for HomeSpendWatch
"""
from setuptools import setup, find_packages
import os... | agpl-3.0 | 2,499,044,890,228,494,300 | 20.464286 | 67 | 0.647255 | false |
projectcalico/calico-nova | nova/api/openstack/compute/plugins/v3/image_size.py | 24 | 2270 | # Copyright 2013 Rackspace Hosting
# 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 require... | apache-2.0 | 4,726,079,810,243,462,000 | 33.923077 | 78 | 0.652423 | false |
OpenWinCon/OpenWinNet | web-gui/myvenv/lib/python3.4/site-packages/django/core/exceptions.py | 486 | 5276 | """
Global Django exception and warning classes.
"""
from django.utils import six
from django.utils.encoding import force_text
class FieldDoesNotExist(Exception):
"""The requested model field does not exist"""
pass
class DjangoRuntimeWarning(RuntimeWarning):
pass
class AppRegistryNotReady(Exception):
... | apache-2.0 | -5,969,876,282,694,283,000 | 29.49711 | 85 | 0.623768 | false |
abhattad4/Digi-Menu | digimenu2/django/contrib/admin/sites.py | 77 | 22052 | from functools import update_wrapper
from django.apps import apps
from django.conf import settings
from django.contrib.admin import ModelAdmin, actions
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.core.exceptions import ImproperlyConfigured, PermissionDenied
from django.core.urlresolvers import NoRe... | bsd-3-clause | -1,840,328,331,321,345,500 | 40.844402 | 117 | 0.573508 | false |
kissbac/upm | examples/python/vcap.py | 2 | 2281 | #!/usr/bin/python
# Author: Jon Trulson <jtrulson@ics.com>
# Copyright (c) 2016 Intel Corporation.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without l... | mit | 683,654,417,358,213,100 | 33.044776 | 78 | 0.762823 | false |
SevInf/IEDriver | py/selenium/webdriver/phantomjs/service.py | 14 | 3533 | #!/usr/bin/python
#
# Copyright 2012 Software Freedom Conservancy
#
# 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 app... | apache-2.0 | 6,322,043,488,904,468,000 | 32.018692 | 86 | 0.597226 | false |
privacyidea/privacyidea | tests/test_lib_usercache.py | 1 | 26733 | # coding: utf-8
"""
This test file tests the lib.usercache
The lib.usercache.py only depends on the database model
"""
from contextlib import contextmanager
from mock import patch
from privacyidea.lib.error import UserError
from tests import ldap3mock
from tests.test_mock_ldap3 import LDAPDirectory
from .base import... | agpl-3.0 | -1,888,625,452,792,974,600 | 43.186777 | 120 | 0.615307 | false |
eino-makitalo/odoo | addons/hr_payroll_account/wizard/__init__.py | 433 | 1116 | #-*- coding:utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# d$
#
# This program is free software: you can redistribute it and/or modify
# ... | agpl-3.0 | 2,908,746,169,873,332,000 | 43.64 | 80 | 0.619176 | false |
Just-D/chromium-1 | tools/telemetry/third_party/gsutilz/third_party/protorpc/gen_protorpc.py | 44 | 9886 | #!/usr/bin/env python
#
# Copyright 2011 Google 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 o... | bsd-3-clause | -8,349,768,606,893,111,000 | 31.953333 | 80 | 0.680761 | false |
gardner/urllib3 | test/test_filepost.py | 27 | 4190 | import unittest
from urllib3.filepost import encode_multipart_formdata, iter_fields
from urllib3.fields import RequestField
from urllib3.packages.six import b, u
BOUNDARY = '!! test boundary !!'
class TestIterfields(unittest.TestCase):
def test_dict(self):
for fieldname, value in iter_fields(dict(a='b... | mit | 4,462,061,469,082,139,000 | 30.503759 | 105 | 0.508592 | false |
GladeRom/android_external_chromium_org | third_party/jinja2/nodes.py | 623 | 28875 | # -*- coding: utf-8 -*-
"""
jinja2.nodes
~~~~~~~~~~~~
This module implements additional nodes derived from the ast base node.
It also provides some node tree helper functions like `in_lineno` and
`get_nodes` used by the parser and translator in order to normalize
python and jinja nodes.
:... | bsd-3-clause | 1,310,450,007,049,595,000 | 30.591904 | 81 | 0.600381 | false |
stefan-caraiman/python-lab | python/solutii/micu_matei/sync/sync.py | 7 | 6480 | #!/usr/bin/env python
"""
Syncronizam doua fisiere
"""
from __future__ import print_function
import os
import argparse
import shutil
from functii_auxiliare import get_hash
from functii_auxiliare import get_last_edit
from functii_auxiliare import write_sync_file
from functii_auxiliare import read_sync_file
from functii_... | mit | -5,219,827,586,258,051,000 | 31.562814 | 78 | 0.577932 | false |
dpac-vlsi/SynchroTrace | tests/quick/se/20.eio-short/test.py | 19 | 1766 | # Copyright (c) 2006 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this list ... | bsd-3-clause | 4,928,746,334,550,370,000 | 55.967742 | 78 | 0.768403 | false |
SymbiFlow/edalize | edalize/xsim.py | 1 | 5680 | # Copyright edalize contributors
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause
import os
import logging
from collections import OrderedDict
from edalize.edatool import Edatool
logger = logging.getLogger(__name__)
class Xsim(Edatool):
argtypes = ['pl... | bsd-2-clause | -5,065,238,013,934,852,000 | 39.283688 | 134 | 0.501232 | false |
shrids/kubernetes | build/json-extractor.py | 413 | 2111 | #!/usr/bin/env python
# Copyright 2014 The Kubernetes 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
#
# Unle... | apache-2.0 | 1,339,634,785,440,145,400 | 29.157143 | 90 | 0.662719 | false |
piagarwal11/GDriveLinuxClient | src/watchdog-0.8.2/src/watchdog/tricks/__init__.py | 11 | 5177 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011 Yesudeep Mangalapilly <yesudeep@gmail.com>
# Copyright 2012 Google, 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
#
# ... | mit | -2,479,692,642,133,744,000 | 28.752874 | 115 | 0.594939 | false |
dogukantufekci/workplace_saas | workplace_saas/_apps/companies/models.py | 2 | 2644 | from django.db import models
from countries.models import Country
from people.models import Person
# Models -----------------------------------------
class Company(models.Model):
SOLE_TRADER = 1
CORPORATION = 2
TYPE_CHOICES = (
(SOLE_TRADER, 'Sole Trader'),
(CORPORATION, 'Corporation'),... | mit | 3,243,802,286,183,120,400 | 20.680328 | 69 | 0.607413 | false |
Comikris/Assignment_Interpreter | FileManagement/filehandler.py | 1 | 7873 | from FileManagement.interface_filehandler import *
# Brendan
import pickle
import os
import sys
import math
# kate
import re
from datetime import *
# Kris Little design
class FileHandler(IFileHandler):
def __init__(self):
self.valid = True
# Kris
def load_file(self, file):
... | apache-2.0 | -2,066,208,822,728,837,600 | 32.682819 | 111 | 0.498666 | false |
rabipanda/tensorflow | tensorflow/contrib/py2tf/pyct/templates_test.py | 2 | 2067 | # Copyright 2017 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 | 4,031,910,180,996,787,000 | 27.315068 | 80 | 0.616836 | false |
afrantzis/pixel-format-guide | tests/pfgtest.py | 1 | 3257 | # Copyright © 2017 Collabora Ltd.
#
# This file is part of pfg.
#
# pfg 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.
#
# pf... | lgpl-2.1 | -2,459,193,073,194,229,000 | 43.60274 | 87 | 0.663391 | false |
ypwalter/fxos-certsuite | mcts/webapi_tests/telephony/test_telephony_outgoing.py | 6 | 2891 | # 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 time
from mcts.webapi_tests.semiauto import TestCase
from mcts.webapi_tests.telephony import TelephonyTestCommon... | mpl-2.0 | -3,349,398,181,666,251,300 | 42.80303 | 108 | 0.687997 | false |
Batterfii/django | django/contrib/gis/maps/google/overlays.py | 151 | 11955 | from __future__ import unicode_literals
from functools import total_ordering
from django.contrib.gis.geos import (
LinearRing, LineString, Point, Polygon, fromstr,
)
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
from django.utils.html import html_safe
@html_safe
@pyt... | bsd-3-clause | 128,455,695,766,739,630 | 35.227273 | 119 | 0.623087 | false |
EricCline/CEM_inc | env/lib/python2.7/site-packages/south/tests/logic.py | 127 | 33513 | from south.tests import unittest
import datetime
import sys
try:
set # builtin, python >=2.6
except NameError:
from sets import Set as set # in stdlib, python >=2.3
from south import exceptions
from south.migration import migrate_app
from south.migration.base import all_migrations, Migrations
from south.creat... | mit | -6,485,172,978,432,499,000 | 36.154102 | 135 | 0.449885 | false |
Coder-Yu/RecQ | algorithm/ranking/BPR.py | 2 | 5528 | #coding:utf8
from baseclass.IterativeRecommender import IterativeRecommender
from random import choice
from tool.qmath import sigmoid
from math import log
from collections import defaultdict
#import tensorflow as tf
class BPR(IterativeRecommender):
# BPR:Bayesian Personalized Ranking from Implicit Feedback
# S... | gpl-3.0 | 562,972,796,094,163,300 | 39.632353 | 123 | 0.55067 | false |
yatinkumbhare/openstack-nova | tools/regression_tester.py | 101 | 3538 | #!/usr/bin/env python
# Copyright (c) 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICE... | apache-2.0 | -7,639,716,123,157,085,000 | 31.458716 | 79 | 0.633974 | false |
uni-peter-zheng/tp-qemu | qemu/tests/openflow_acl_test.py | 2 | 18485 | import logging
import re
import os
from autotest.client.shared import error
from autotest.client.shared import utils
from virttest import utils_net, utils_test, utils_misc
from virttest import aexpect
from virttest import remote
from virttest import data_dir
@error.context_aware
def run(test, params, env):
"""
... | gpl-2.0 | -4,274,354,512,471,735,300 | 42.803318 | 79 | 0.501758 | false |
HLFH/CouchPotatoServer | libs/suds/builder.py | 197 | 4220 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser 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 ... | gpl-3.0 | 6,701,571,807,839,068,000 | 33.884298 | 85 | 0.565877 | false |
ashutosh-mishra/youtube-dl | youtube_dl/extractor/jeuxvideo.py | 1 | 1985 | # coding: utf-8
import json
import re
import xml.etree.ElementTree
from .common import InfoExtractor
class JeuxVideoIE(InfoExtractor):
_VALID_URL = r'http://.*?\.jeuxvideo\.com/.*/(.*?)-\d+\.htm'
_TEST = {
u'url': u'http://www.jeuxvideo.com/reportages-videos-jeux/0004/00046170/tearaway-playstation-... | unlicense | -5,161,699,879,710,836,000 | 37.076923 | 174 | 0.580808 | false |
getnikola/plugins | v7/mistune/mistune.py | 1 | 3824 | # -*- coding: utf-8 -*-
# Copyright © 2014 Roberto Alsina and others.
# 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... | mit | -6,196,318,237,792,976,000 | 35.759615 | 143 | 0.639289 | false |
RNAer/qiita | qiita_db/reference.py | 2 | 6342 | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | bsd-3-clause | -7,243,398,489,543,433,000 | 36.305882 | 79 | 0.541312 | false |
Curso-OpenShift/Formulario | OverFlow/ProjectFormulario/env/lib/python2.7/site-packages/django/conf/locale/nb/formats.py | 504 | 1766 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y'
TIME_FORMAT = 'H:i'
DATET... | gpl-3.0 | -2,061,388,936,181,356,000 | 41.047619 | 81 | 0.524915 | false |
AthinaB/synnefo | snf-astakos-app/astakos/api/user.py | 4 | 11741 | # Copyright (C) 2010-2014 GRNET S.A.
#
# 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 i... | gpl-3.0 | 4,507,309,923,037,638,000 | 32.641834 | 79 | 0.633507 | false |
adw0rd/lettuce | tests/integration/lib/Django-1.3/tests/modeltests/transactions/tests_25.py | 51 | 5306 | from __future__ import with_statement
from django.db import connection, transaction, IntegrityError
from django.test import TransactionTestCase, skipUnlessDBFeature
from models import Reporter
class TransactionContextManagerTests(TransactionTestCase):
def create_reporter_and_fail(self):
Reporter.objects... | gpl-3.0 | -4,988,310,388,361,887,000 | 37.729927 | 120 | 0.647569 | false |
wpoa/wiki-imports | lib/python2.7/site-packages/mwparserfromhell/nodes/extras/__init__.py | 1 | 1389 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2014 Ben Kurtovic <ben.kurtovic@gmail.com>
#
# 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 ... | gpl-3.0 | 6,203,557,384,413,909,000 | 45.3 | 79 | 0.769618 | false |
botswana-harvard/edc-pharma | edc_pharmacy/old/dispense/prescription_creator.py | 1 | 3055 | from datetime import datetime
from django.core.exceptions import ObjectDoesNotExist
from ..medications import medications
from ..models import Prescription, MedicationDefinition
class PrescriptionCreator:
"""Creates all prescription records after completing patient history model.
"""
def __init__(self, ... | gpl-2.0 | -8,991,040,122,975,133,000 | 39.733333 | 79 | 0.654337 | false |
alabid/pycrunchbase | tests/test_node.py | 3 | 1070 | from unittest import TestCase
import json
from pycrunchbase.resource.node import Node
from pycrunchbase.resource.utils import parse_date
class TestNode(Node):
KNOWN_PROPERTIES = ['property1', 'property2']
def _coerce_values(self):
# intentionally coerce bad values for test purposes
attr = '... | mit | 7,323,904,174,145,346,000 | 23.883721 | 64 | 0.603738 | false |
b0ttl3z/SickRage | lib/synchronousdeluge/transfer.py | 114 | 1346 | import zlib
import struct
import socket
import ssl
from synchronousdeluge import rencode
__all__ = ["DelugeTransfer"]
class DelugeTransfer(object):
def __init__(self):
self.sock = None
self.conn = None
self.connected = False
def connect(self, hostport):
if self.connected:
... | gpl-3.0 | 4,868,565,388,258,207,000 | 22.614035 | 100 | 0.552006 | false |
jymannob/CouchPotatoServer | libs/subliminal/services/thesubdb.py | 107 | 2775 | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
#
# This file is part of subliminal.
#
# subliminal is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 3 of... | gpl-3.0 | 1,127,259,008,734,367,700 | 43.047619 | 176 | 0.651171 | false |
shangwuhencc/scikit-learn | examples/cluster/plot_kmeans_stability_low_dim_dense.py | 338 | 4324 | """
============================================================
Empirical evaluation of the impact of k-means initialization
============================================================
Evaluate the ability of k-means initializations strategies to make
the algorithm convergence robust as measured by the relative stan... | bsd-3-clause | 943,628,025,795,480,200 | 35.336134 | 79 | 0.660962 | false |
inetCatapult/troposphere | troposphere/policies.py | 20 | 1033 | from . import AWSProperty, AWSAttribute, validate_pausetime
from .validators import positive_integer, integer, boolean
class AutoScalingRollingUpdate(AWSProperty):
props = {
'MaxBatchSize': (positive_integer, False),
'MinInstancesInService': (integer, False),
'PauseTime': (validate_pauseti... | bsd-2-clause | -7,416,100,760,144,589,000 | 26.184211 | 74 | 0.67667 | false |
bakerlover/lab5 | main/admin.py | 7 | 2264 | # -*- coding: utf-8 -*-
from flask.ext import wtf
from google.appengine.api import app_identity
import flask
import auth
import util
import model
import config
from main import app
class ConfigUpdateForm(wtf.Form):
analytics_id = wtf.StringField('Analytics ID', filters=[util.strip_filter])
announcement_html = ... | mit | 1,860,260,801,247,866,000 | 36.733333 | 134 | 0.708922 | false |
tensorflow/federated | tensorflow_federated/python/simulation/baselines/cifar100/__init__.py | 1 | 1147 | # Copyright 2021, The TensorFlow Federated Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | -2,652,925,411,633,662,000 | 59.368421 | 129 | 0.813426 | false |
kk7ds/luvs | unifi_stream_server.py | 1 | 8384 | import asyncio
import aiohttp
from aiohttp import web
import logging
from logging import handlers
import signal
import socket
import time
import unifi_ws_server
class StreamerContext(object):
pass
class RequestHandler(aiohttp.server.ServerHttpProtocol):
def __init__(self, **kwargs):
self._log = kwar... | gpl-3.0 | 7,281,761,001,856,700,000 | 32.806452 | 80 | 0.576574 | false |
RuudBurger/CouchPotatoServer | couchpotato/core/media/movie/providers/metadata/wdtv.py | 39 | 7626 | from xml.etree.ElementTree import Element, SubElement, tostring
import os
import re
import traceback
import xml.dom.minidom
from couchpotato.core.media.movie.providers.metadata.base import MovieMetaData
from couchpotato.core.helpers.encoding import toUnicode
from couchpotato.core.helpers.variable import getTitle
from ... | gpl-3.0 | -8,191,716,866,975,516,000 | 33.506787 | 116 | 0.515998 | false |
k1203/meeting | public/app/assets/plugins/vector-map/converter/simplifier.py | 234 | 5985 | import argparse
import sys
import os
from osgeo import ogr
from osgeo import osr
import anyjson
import shapely.geometry
import shapely.ops
import codecs
import time
format = '%.8f %.8f'
tolerance = 0.01
infile = '/Users/kirilllebedev/Maps/50m-admin-0-countries/ne_50m_admin_0_countries.shp'
outfile = 'map.shp'
# Open... | mit | 6,680,298,553,978,392,000 | 28.2 | 87 | 0.664495 | false |
aequitas/home-assistant | tests/components/zha/test_switch.py | 7 | 2904 | """Test zha switch."""
from unittest.mock import call, patch
from homeassistant.components.switch import DOMAIN
from homeassistant.const import STATE_ON, STATE_OFF, STATE_UNAVAILABLE
from tests.common import mock_coro
from .common import (
async_init_zigpy_device, make_attribute, make_entity_id,
async_test_devi... | apache-2.0 | -5,212,971,974,287,757,000 | 35.3 | 74 | 0.664601 | false |
secretsquirrel/the-backdoor-factory | osslsigncode/misc/pagehash.py | 7 | 3180 | #!/usr/bin/python
import struct
import sys
import hashlib
from pyasn1.type import univ
from pyasn1.codec.ber import encoder, decoder
f = open(sys.argv[1], 'rb')
filehdr = f.read(1024)
if filehdr[0:2] != 'MZ':
print "Not a DOS file."
sys.exit(0)
pepos = struct.unpack('<I', filehdr[60:64])[0]
if filehdr[pepos:p... | bsd-3-clause | 592,326,657,579,592,700 | 21.877698 | 82 | 0.597484 | false |
kosz85/django | django/db/models/sql/query.py | 1 | 92537 | """
Create SQL statements for QuerySets.
The code in here encapsulates all of the SQL construction so that QuerySets
themselves do not have to (and could be backed by things other than SQL
databases). The abstraction barrier only works one way: this module has to know
all about the internals of models in order to get ... | bsd-3-clause | -946,797,654,559,931,900 | 43.488942 | 119 | 0.593968 | false |
bigplus/thefuck | thefuck/rules/dirty_unzip.py | 5 | 1044 | import os
import zipfile
from thefuck.utils import for_app
def _is_bad_zip(file):
with zipfile.ZipFile(file, 'r') as archive:
return len(archive.namelist()) > 1
def _zip_file(command):
# unzip works that way:
# unzip [-flags] file[.zip] [file(s) ...] [-x file(s) ...]
# ^ ... | mit | 7,080,517,918,691,066,000 | 25.1 | 69 | 0.566092 | false |
daevaorn/sentry | src/sentry/migrations/0026_auto__add_field_project_status.py | 36 | 11026 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Project.status'
db.add_column('sentry_project', 'status', self.gf('django.db.models.fields.Positiv... | bsd-3-clause | 5,013,566,886,725,600,000 | 78.323741 | 167 | 0.5575 | false |
tbeadle/django | tests/prefetch_related/test_prefetch_related_objects.py | 35 | 4734 | from django.db.models import Prefetch, prefetch_related_objects
from django.test import TestCase
from .models import Author, Book, Reader
class PrefetchRelatedObjectsTests(TestCase):
"""
Since prefetch_related_objects() is just the inner part of
prefetch_related(), only do basic tests to ensure its API h... | bsd-3-clause | 2,251,514,227,585,012,000 | 38.781513 | 110 | 0.610689 | false |
huang4fstudio/django | tests/forms_tests/tests/test_fields.py | 5 | 86091 | # -*- coding: utf-8 -*-
"""
##########
# Fields #
##########
Each Field class does some sort of validation. Each Field has a clean() method,
which either raises django.forms.ValidationError or returns the "clean"
data -- usually a Unicode object, but, in some rare cases, a list.
Each Field's __init__() takes at least... | bsd-3-clause | 1,439,469,414,719,323,400 | 53.686624 | 211 | 0.621072 | false |
Amechi101/concepteur-market-app | venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/universaldetector.py | 200 | 6664 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | mit | -5,147,442,634,639,192,000 | 38.666667 | 78 | 0.557173 | false |
Alwnikrotikz/l5rcm | dialogs/managedatapack.py | 3 | 5873 | # -*- coding: iso-8859-1 -*-
# Copyright (C) 2011 Daniele Simonetti
#
# 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 versi... | gpl-3.0 | -2,336,718,140,894,636,500 | 35.420382 | 90 | 0.558658 | false |
dbaxa/django | tests/model_regress/models.py | 281 | 2293 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
CHOICES = (
(1, 'first'),
(2, 'second'),
)
@python_2_unicode_compatible
class Article(models.Model):
headline = models.CharField(max_length=100, defa... | bsd-3-clause | -8,449,453,279,391,274,000 | 25.952941 | 86 | 0.698385 | false |
brianrock/brianrock-ringo | handlers/poll.py | 1 | 7906 | # Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | apache-2.0 | -2,346,677,965,826,823,000 | 35.266055 | 84 | 0.641159 | false |
crowdata/crowdata | crowdataapp/migrations/0020_auto__add_field_documentset_header_image.py | 2 | 12999 | # -*- 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 field 'DocumentSet.header_image'
db.add_column(u'crowdataapp_documentset', 'header_image',
... | mit | 2,916,883,732,037,892,600 | 80.25 | 400 | 0.562889 | false |
scenarios/tensorflow | tensorflow/python/ops/logging_ops.py | 10 | 13502 | # 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,820,675,684,226,990,000 | 38.595308 | 99 | 0.696712 | false |
lopopolo/hyperbola | hyperbola/urls.py | 1 | 1226 | """
hyperbola URL Configuration.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Clas... | mit | 6,656,134,100,177,578,000 | 34.028571 | 79 | 0.711256 | false |
SergeyPirogov/selene | tests/integration/inner_selement_waiting_search_on_actions_like_click_test.py | 1 | 4742 | import pytest
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selene import config
from selene.common.none_object import NoneObject
from selene.driver import SeleneDriver
from tests.acceptance.helpers.helper import get_test_driver
from tests.integration.helpers.givenpage imp... | mit | -5,820,012,015,551,275,000 | 29.203822 | 88 | 0.551877 | false |
mitre/multiscanner | multiscanner/tests/test_parse_reports.py | 2 | 1531 | # -*- coding: utf-8 -*-
import multiscanner
def test_valid_reports_string():
reportlist = [([('file', 'result')], {'Name': 'Test', 'Type': 'Test'})]
r = multiscanner.parse_reports(reportlist, python=False)
assert r == '{"file":{"Test":"result"}}'
def test_valid_reports_python():
reportlist = [([('fi... | mpl-2.0 | 6,658,379,538,375,173,000 | 36.657895 | 91 | 0.583508 | false |
ddurst/zamboni | manage.py | 17 | 2113 | #!/usr/bin/env python
import logging
import os
import sys
from django.core.management import execute_from_command_line
if 'DJANGO_SETTINGS_MODULE' not in os.environ:
if len(sys.argv) > 1 and sys.argv[1] == 'test':
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings_test'
else:
os.environ.setdefau... | bsd-3-clause | 7,407,909,184,496,092,000 | 27.945205 | 79 | 0.716517 | false |
rjschwei/WALinuxAgent | azurelinuxagent/common/utils/restutil.py | 1 | 18482 | # Microsoft Azure Linux Agent
#
# Copyright 2018 Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | -7,687,376,563,869,384,000 | 31.031196 | 113 | 0.573964 | false |
gregdek/ansible | lib/ansible/modules/packaging/os/apk.py | 82 | 11119 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Kevin Brebanov <https://github.com/kbrebanov>
# Based on pacman (Afterburn <https://github.com/afterburn>, Aaron Bull Schaefer <aaron@elasticdog.com>)
# and apt (Matthew Williams <matthew@flowroute.com>) modules.
#
# GNU General Public License v3.0+ (see COPYING or... | gpl-3.0 | 7,164,721,391,530,359,000 | 31.322674 | 147 | 0.624786 | false |
blaze/dask | dask/base.py | 1 | 37839 | from collections import OrderedDict
from collections.abc import Mapping, Iterator
from contextlib import contextmanager
from functools import partial
from hashlib import md5
from operator import getitem
import inspect
import pickle
import os
import threading
import uuid
from distutils.version import LooseVersion
from ... | bsd-3-clause | -8,081,680,606,068,015,000 | 31.960801 | 98 | 0.608261 | false |
sjohannes/exaile | xl/player/__init__.py | 3 | 1566 | # Copyright (C) 2008-2010 Adam Olsen
#
# 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, or (at your option)
# any later version.
#
# This program is distributed in the hope that... | gpl-2.0 | 6,328,799,349,692,610,000 | 35.418605 | 81 | 0.747765 | false |
SDSG-Invenio/invenio | invenio/modules/messages/testsuite/test_messages.py | 15 | 5465 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2009, 2010, 2011, 2013 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... | gpl-2.0 | -913,659,442,418,672,500 | 37.216783 | 122 | 0.563403 | false |
ccn-2m/django | django/contrib/localflavor/be/forms.py | 194 | 2910 | """
Belgium-specific Form helpers
"""
from __future__ import absolute_import
from django.contrib.localflavor.be.be_provinces import PROVINCE_CHOICES
from django.contrib.localflavor.be.be_regions import REGION_CHOICES
from django.forms.fields import RegexField, Select
from django.utils.translation import ugettext_lazy... | bsd-3-clause | 5,681,554,138,726,975,000 | 39.985915 | 180 | 0.639175 | false |
alessandro-aglietti/rosdep | src/rosdep2/catkin_support.py | 7 | 4024 | """
Helper routines for catkin. These are distributed inside of rosdep2
to protect catkin against future rosdep2 API updatese. These helper
routines are assumed to run in an interactive mode with an end-user
and thus return end-user oriented error messages.
Errors are returned as arguments to raised :exc:`Validation... | bsd-3-clause | -526,288,577,649,642,560 | 33.101695 | 102 | 0.713221 | false |
mammique/django | django/template/loaders/filesystem.py | 225 | 1851 | """
Wrapper for loading templates from the filesystem.
"""
from django.conf import settings
from django.template.base import TemplateDoesNotExist
from django.template.loader import BaseLoader
from django.utils._os import safe_join
class Loader(BaseLoader):
is_usable = True
def get_template_sources(self, temp... | bsd-3-clause | -1,620,274,751,021,421,300 | 39.23913 | 117 | 0.621286 | false |
AndroidOpenDevelopment/android_external_chromium_org | tools/idl_parser/idl_lexer_test.py | 116 | 2758 | #!/usr/bin/env python
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from idl_lexer import IDLLexer
from idl_ppapi_lexer import IDLPPAPILexer
#
# FileToTokens
#
# From a source file ... | bsd-3-clause | -7,567,070,696,298,513,000 | 26.858586 | 78 | 0.656998 | false |
rversteegen/commandergenius | project/jni/python/src/Lib/lib2to3/pgen2/tokenize.py | 52 | 16184 | # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation.
# All rights reserved.
"""Tokenization help for Python programs.
generate_tokens(readline) is a generator that breaks a stream of
text into Python tokens. It accepts a readline-like method which is called
repeatedly to get the next line o... | lgpl-2.1 | 5,145,212,820,851,544,000 | 38.960494 | 79 | 0.50655 | false |
gioman/QGIS | python/plugins/processing/algs/examplescripts/ProcessingExampleScriptsPlugin.py | 9 | 1441 | # -*- coding: utf-8 -*-
"""
***************************************************************************
__init__.py
---------------------
Date : May 2016
Copyright : (C) 2016 by Victor Olaya
Email : volayaf at gmail dot com
*********************************... | gpl-2.0 | 3,228,148,530,997,548,000 | 35.025 | 84 | 0.447606 | false |
salomanders/NbodyPythonTools | nbdpt/nchiladareader.py | 1 | 4326 | import numpy as np
import glob
import struct
import pdb
import re
class Nchilada(object):
def __init__(self, filename):
self.codedict = {1: 'int8',
2: 'uint8',
3: 'int16',
4: 'uint16',
5: 'int32',
... | mit | 9,126,079,551,243,223,000 | 36.617391 | 100 | 0.473648 | 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.