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 |
|---|---|---|---|---|---|---|---|---|---|---|
leiferikb/bitpop | build/third_party/sqlalchemy_0_7_1/sqlalchemy/orm/unitofwork.py | 8 | 21483 | # orm/unitofwork.py
# Copyright (C) 2005-2011 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
"""The internals for the unit of work system.
The session's flush() process passes ... | gpl-3.0 | -8,607,683,430,778,418,000 | 35.849057 | 85 | 0.566727 | false |
root-mirror/root | build/unix/makeversion.py | 15 | 1920 | # Script to update base/inc/RVersion.h.
# Called by main Makefile as soon as build/version_number has been updated.
#
# Author: Axel, 2020-03-06
import os, subprocess, re
from datetime import date, datetime
versionline = ""
with open("build/version_number", "r") as file:
versionline = file.read().replace('\n', '')
... | lgpl-2.1 | -317,788,820,973,465,300 | 29 | 86 | 0.66875 | false |
pombredanne/django-moderation | tests/tests/unit/testforms.py | 2 | 3554 | from __future__ import unicode_literals
from django.db.models.fields.files import ImageFieldFile
from django.forms import CharField
from django.contrib.auth.models import User
from django.test.testcases import TestCase
from tests.models import UserProfile, ModelWithImage
from moderation.forms import BaseModeratedObjec... | bsd-3-clause | -5,238,196,359,393,684,000 | 36.410526 | 79 | 0.632808 | false |
jpallas/beakerx | beakerx/beakerx/commands.py | 1 | 2777 | # Copyright 2018 TWO SIGMA OPEN SOURCE, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | apache-2.0 | -886,533,217,108,563,300 | 38.112676 | 138 | 0.681311 | false |
oudalab/fajita | pythonAPI/flask/lib/python3.5/site-packages/jinja2/optimizer.py | 222 | 1722 | # -*- coding: utf-8 -*-
"""
jinja2.optimizer
~~~~~~~~~~~~~~~~
The jinja optimizer is currently trying to constant fold a few expressions
and modify the AST in place so that it should be easier to evaluate it.
Because the AST does not contain all the scoping information and the
compiler has to ... | mit | -1,351,325,545,516,692,500 | 34.142857 | 81 | 0.643438 | false |
cratuki/solent | scenarios/eng_40_simple_udp_sub.py | 2 | 5645 | # // license
# Copyright 2016, Free Software Foundation.
#
# This file is part of Solent.
#
# Solent is free software: you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
... | lgpl-3.0 | 1,193,683,458,385,590,800 | 29.679348 | 81 | 0.578565 | false |
kwlzn/pex | tests/test_integration.py | 1 | 31413 | # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import functools
import os
import platform
import subprocess
import sys
from contextlib import contextmanager
from textwrap import dedent
import pytest
from twitter.common.contextutil imp... | apache-2.0 | 5,323,880,516,638,372,000 | 35.065442 | 99 | 0.603317 | false |
sysalexis/kbengine | kbe/res/scripts/common/Lib/tkinter/commondialog.py | 153 | 1412 | # base class for tk common dialogues
#
# this module provides a base class for accessing the common
# dialogues available in Tk 4.2 and newer. use filedialog,
# colorchooser, and messagebox to access the individual
# dialogs.
#
# written by Fredrik Lundh, May 1997
#
from tkinter import *
class Dialog:
command ... | lgpl-3.0 | -99,357,663,238,334,180 | 22.533333 | 67 | 0.575779 | false |
AutorestCI/azure-sdk-for-python | azure-cognitiveservices-search-videosearch/azure/cognitiveservices/search/videosearch/models/trending_videos_subcategory.py | 2 | 1152 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -4,547,473,118,082,767,400 | 29.315789 | 80 | 0.560764 | false |
kaiw/meld | meld/vcview.py | 1 | 36042 | # Copyright (C) 2002-2006 Stephen Kennedy <stevek@gnome.org>
# Copyright (C) 2010-2013 Kai Willadsen <kai.willadsen@gmail.com>
# 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 o... | gpl-2.0 | -1,263,621,584,028,315,600 | 40.332569 | 113 | 0.560679 | false |
WaldurChatbot/Waldur-Chatbot | common/offline_graphs/totalcosts_offline.py | 1 | 16907 | import json
import collections
import matplotlib
matplotlib.use('Agg') # requirement of matplotlib
import matplotlib.pyplot as plt
import numpy as np
from textwrap import wrap
myinput = """[
{
"url":"https://api.etais.ee/api/invoices/9e67980771a94de3bd0075fe84522b05/",
"uuid":"9e67980771a94de3bd0075f... | mit | 2,200,156,060,488,851,500 | 30.251386 | 116 | 0.528538 | false |
kobejean/tensorflow | tensorflow/contrib/optimizer_v2/gradient_descent.py | 19 | 2974 | # 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 | -6,668,295,772,036,250,000 | 42.101449 | 80 | 0.7115 | false |
cshallue/models | research/neural_programmer/data_utils.py | 5 | 27733 | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | apache-2.0 | -5,809,049,516,772,958,000 | 40.641141 | 179 | 0.611762 | false |
sophacles/invoke | invoke/config.py | 1 | 19816 | import copy
import imp
import json
import os
from os.path import join, splitext, expanduser
from .vendor import six
if six.PY3:
from .vendor import yaml3 as yaml
else:
from .vendor import yaml2 as yaml
from .env import Environment
from .exceptions import UnknownFileType
from .util import debug
class DataPro... | bsd-2-clause | 8,378,058,556,717,453,000 | 35.160584 | 116 | 0.587505 | false |
Filechaser/nzbToMedia | libs/subliminal/providers/addic7ed.py | 25 | 11049 | # -*- coding: utf-8 -*-
import logging
import re
from babelfish import Language, language_converters
from guessit import guessit
from requests import Session
from . import ParserBeautifulSoup, Provider
from .. import __short_version__
from ..cache import SHOW_EXPIRATION_TIME, region
from ..exceptions import Authentic... | gpl-3.0 | -2,250,915,038,737,154,000 | 37.498258 | 119 | 0.59209 | false |
sylvestre/bedrock | bin/run-db-download.py | 5 | 2276 | #!/usr/bin/env python
import os
import sys
import requests
from db_s3_utils import (
get_db_checksum,
get_git_sha,
get_prev_db_data,
set_db_data,
JSON_DATA_FILE,
DB_FILE,
)
BUCKET_NAME = os.getenv('AWS_DB_S3_BUCKET', 'bedrock-db-dev')
REGION_NAME = os.getenv('AWS_DB_REGION', 'us-west-2')
S3... | mpl-2.0 | -2,692,884,791,351,399,000 | 23.73913 | 74 | 0.598418 | false |
nccgroup/umap | USBEndpoint.py | 1 | 3016 | # USBEndpoint.py
#
# Contains class definition for USBEndpoint.
class USBEndpoint:
direction_out = 0x00
direction_in = 0x01
transfer_type_control = 0x00
transfer_type_isochronous = 0x01
transfer_type_bulk = 0x02
transfer_type_interrupt = 0x03
... | agpl-3.0 | 6,028,073,241,812,534,000 | 31.430108 | 83 | 0.540782 | false |
eevol/django-cities-light | cities_light/south_migrations/0008_add_region_geoname_id.py | 2 | 4208 | # -*- 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 'Region.geoname_id'
db.add_column('cities_light_region', 'geoname_id',
... | mit | 8,472,219,900,437,577,000 | 68 | 148 | 0.545627 | false |
wikimedia/operations-debs-python-kafka | test/record/test_util.py | 8 | 3754 | import struct
import pytest
from kafka.record import util
varint_data = [
(b"\x00", 0),
(b"\x01", -1),
(b"\x02", 1),
(b"\x7E", 63),
(b"\x7F", -64),
(b"\x80\x01", 64),
(b"\x81\x01", -65),
(b"\xFE\x7F", 8191),
(b"\xFF\x7F", -8192),
(b"\x80\x80\x01", 8192),
(b"\x81\x80\x01", -... | apache-2.0 | -6,386,860,816,513,231,000 | 38.104167 | 79 | 0.660629 | false |
tumbl3w33d/ansible | lib/ansible/modules/storage/purestorage/purefa_info.py | 13 | 38316 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2019, Simon Dodsley (simon@purestorage.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 = {'metadata_version': '1.1',... | gpl-3.0 | 4,381,747,402,003,268,600 | 36.60157 | 119 | 0.524872 | false |
jhbradley/moose | scripts/cluster_launcher.py | 15 | 5493 | #!/usr/bin/env python
import os, sys, re, shutil
from optparse import OptionParser, OptionGroup, Values
# Determine the MOOSE Directory
MOOSE_PYTHON_DIR = None
if os.environ.has_key('MOOSE_DIR'):
MOOSE_PYTHON_DIR = os.path.join(os.environ['MOOSE_DIR'], 'python')
else:
MOOSE_PYTHON_DIR = os.path.join(os.path.split(... | lgpl-2.1 | 1,130,026,343,563,476,200 | 30.568966 | 139 | 0.638813 | false |
filodej/django-filer | filer/utils/loader.py | 38 | 1668 | #-*- coding: utf-8 -*-
"""
This function is snatched from
https://github.com/ojii/django-load/blob/3058ab9d9d4875589638cc45e84b59e7e1d7c9c3/django_load/core.py#L49
local changes:
* added check for basestring to allow values that are already an object
or method.
"""
from django.utils.importlib import import_module
... | bsd-3-clause | 8,743,951,720,569,841,000 | 33.040816 | 105 | 0.702038 | false |
GbalsaC/bitnamiP | venv/lib/python2.7/site-packages/rest_framework/tests/test_relations_nested.py | 17 | 14625 | from __future__ import unicode_literals
from django.db import models
from django.test import TestCase
from rest_framework import serializers
from .models import OneToOneTarget
class OneToOneSource(models.Model):
name = models.CharField(max_length=100)
target = models.OneToOneField(OneToOneTarget, related_nam... | agpl-3.0 | 4,935,699,822,333,326,000 | 43.861963 | 109 | 0.532103 | false |
apache/airflow | tests/providers/http/sensors/test_http.py | 3 | 8988 | #
# 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,055,733,941,616,388,600 | 34.385827 | 106 | 0.596796 | false |
epssy/hue | desktop/core/ext-py/Django-1.6.10/django/conf/locale/sv/formats.py | 118 | 1568 | # -*- 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'
DATETI... | apache-2.0 | 642,496,914,496,357,900 | 37.243902 | 77 | 0.536352 | false |
hplustree/trove | trove/guestagent/datastore/experimental/couchbase/manager.py | 3 | 4570 | # Copyright (c) 2013 eBay Software Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... | apache-2.0 | 8,605,148,480,222,095,000 | 35.854839 | 78 | 0.644858 | false |
sadmansk/servo | tests/wpt/web-platform-tests/webvtt/tools/categorize_results.py | 89 | 3940 | import os
import sys
import json
import fnmatch
TEST_DIR = "/webvtt/"
CATEGORIES_FILE = "../categories.json"
class Test:
def __init__(self, file, name, status, message):
self.file = file
self.name = name
self.status = status
self.message = message
self.passed = status == 'P... | mpl-2.0 | 3,280,402,204,201,289,000 | 27.759124 | 100 | 0.574112 | false |
worldbank/cv4ag | modules/gdal_polygonize.py | 2 | 6981 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#******************************************************************************
# $Id$
#
# Project: GDAL Python Interface
# Purpose: Application for converting raster data to a vector polygon layer.
# Author: Frank Warmerdam, warmerdam@pobox.com
#
#*****************... | mit | 4,252,563,812,222,802,000 | 29.889381 | 99 | 0.528434 | false |
pdellaert/ansible | contrib/inventory/gce.py | 37 | 19275 | #!/usr/bin/env python
# Copyright: (c) 2013, Google Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
'''
GCE external inventory script
=================================
Generates inventory that Ansible can understand by making API requests
Google Compute Engine via th... | gpl-3.0 | 4,223,607,659,863,575,000 | 35.996161 | 100 | 0.578885 | false |
thomasf/offlineimap | offlineimap/folder/Base.py | 4 | 40980 | # Base folder support
# Copyright (C) 2002-2015 John Goerzen & contributors
#
# 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) a... | gpl-2.0 | 3,898,671,425,232,595,500 | 37.156425 | 101 | 0.606711 | false |
ntts-clo/ryu | ryu/services/protocols/vrrp/monitor.py | 56 | 6586 | # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2013 Isaku Yamahata <yamahata at private email ne jp>
#
# 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 | -3,261,666,733,693,897,000 | 37.290698 | 79 | 0.613574 | false |
zapster/graal-core | mx.graal-core/mx_graal_core.py | 1 | 36920 | #
# ----------------------------------------------------------------------------------------------------
#
# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify ... | gpl-2.0 | -5,988,293,005,455,470,000 | 45.20776 | 207 | 0.642281 | false |
Ictp/indico | indico/ext/importer/handlers.py | 2 | 2394 | # -*- coding: utf-8 -*-
##
##
## This file is part of Indico.
## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN).
##
## Indico 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; eith... | gpl-3.0 | 414,000,664,360,610,600 | 31.351351 | 89 | 0.696742 | false |
ininex/geofire-python | resource/lib/python2.7/site-packages/gcloud/monitoring/test_label.py | 6 | 4111 | # Copyright 2016 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | mit | 7,835,766,359,558,512,000 | 35.705357 | 77 | 0.628071 | false |
suneeth51/neutron | neutron/tests/unit/plugins/ml2/test_security_group.py | 24 | 6979 | # Copyright (c) 2013 OpenStack Foundation
# Copyright 2013, Nachi Ueno, NTT MCL, 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.ap... | apache-2.0 | 9,115,734,760,529,115,000 | 43.737179 | 78 | 0.589626 | false |
armersong/zato | code/zato-web-admin/src/zato/admin/web/views/security/oauth.py | 6 | 2297 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2010 Dariusz Suchojad <dsuch at zato.io>
Licensed under LGPLv3, see LICENSE.txt for terms and conditions.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
# stdlib
import logging
# Zato
from zato.admin.web.forms import ChangePasswordFo... | gpl-3.0 | -7,199,716,883,176,776,000 | 30.902778 | 89 | 0.662603 | false |
rcgee/oq-hazardlib | openquake/hazardlib/tests/gsim/chiou_youngs_2014_test.py | 1 | 6695 | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2014-2016 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... | agpl-3.0 | -4,242,961,051,601,092,600 | 38.382353 | 78 | 0.673936 | false |
serzans/wagtail | wagtail/project_template/home/migrations/0002_create_homepage.py | 61 | 1179 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def create_homepage(apps, schema_editor):
# Get models
ContentType = apps.get_model('contenttypes.ContentType')
Page = apps.get_model('wagtailcore.Page')
Site = apps.get_model('wagtailcore.Site')
Home... | bsd-3-clause | 3,709,111,853,753,085,400 | 25.2 | 71 | 0.642918 | false |
zixiliuyue/pika | pika/connection.py | 2 | 82517 | """Core connection objects"""
import ast
import sys
import collections
import copy
import logging
import math
import numbers
import platform
import warnings
if sys.version_info > (3,):
import urllib.parse as urlparse # pylint: disable=E0611,F0401
else:
import urlparse
from pika import __version__
from pika i... | bsd-3-clause | 2,915,653,437,244,767,000 | 36.490686 | 83 | 0.612492 | false |
SyamGadde/cython | pyximport/test/test_pyximport.py | 13 | 2070 | from __future__ import absolute_import, print_function
from pyximport import pyximport; pyximport.install(reload_support=True)
import os, sys
import time, shutil
import tempfile
def make_tempdir():
tempdir = os.path.join(tempfile.gettempdir(), "pyrex_temp")
if os.path.exists(tempdir):
remove_tempdir... | apache-2.0 | 532,124,084,486,552,260 | 27.75 | 80 | 0.664734 | false |
yize/grunt-tps | tasks/lib/python/Lib/python2.7/test/test_contextlib.py | 125 | 9103 | """Unit tests for contextlib.py, and other context managers."""
import sys
import tempfile
import unittest
from contextlib import * # Tests __all__
from test import test_support
try:
import threading
except ImportError:
threading = None
class ContextManagerTestCase(unittest.TestCase):
def test_contextm... | mit | -5,217,423,221,812,626,000 | 26.923313 | 77 | 0.497858 | false |
afrolov1/nova | nova/virt/baremetal/db/sqlalchemy/api.py | 3 | 11612 | # Copyright (c) 2012 NTT DOCOMO, INC.
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "Lic... | apache-2.0 | -2,347,573,809,996,540,000 | 34.619632 | 78 | 0.648639 | false |
lthurlow/Network-Grapher | proj/external/networkx-1.7/build/lib.linux-i686-2.7/networkx/algorithms/traversal/breadth_first_search.py | 14 | 1422 | """
====================
Breadth-first search
====================
Basic algorithms for breadth-first searching.
"""
__author__ = """\n""".join(['Aric Hagberg <hagberg@lanl.gov>'])
__all__ = ['bfs_edges', 'bfs_tree',
'bfs_predecessors', 'bfs_successors']
import networkx as nx
from collections import defa... | mit | -9,208,797,914,760,831,000 | 26.346154 | 80 | 0.604782 | false |
emilydolson/forestcat | pyrobot/brain/psom/visvector.py | 2 | 7394 | #A set of model vector visualization tools.
#Each visualizer should be a subclass of VisVector, which is an abstract class.
#If a visualizer is added, it should be added to the if statement in
#VisVectorFactory. Each new class should follow the nameing convention
#XVisVector, where X is the string that gets passed to ... | agpl-3.0 | -2,642,859,162,786,429,400 | 32.609091 | 80 | 0.591425 | false |
mantidproject/mantid | scripts/Muon/GUI/Common/home_runinfo_widget/home_runinfo_widget_presenter.py | 3 | 2415 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
from... | gpl-3.0 | 2,080,127,078,228,277,800 | 55.162791 | 117 | 0.601242 | false |
DavidLP/home-assistant | homeassistant/components/point/__init__.py | 4 | 11084 | """Support for Minut Point."""
import asyncio
import logging
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_TOKEN, CONF_WEBHOOK_ID
from homeassistant.helpers import config_validation as cv
from homeassistant.h... | apache-2.0 | -5,390,508,415,574,125,000 | 32.086567 | 78 | 0.617196 | false |
vmindru/ansible-modules-core | network/basics/uri.py | 4 | 17344 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Romeo Theriault <romeot () hawaii.edu>
#
# 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 th... | gpl-3.0 | -7,470,269,198,667,298,000 | 35.208768 | 154 | 0.636185 | false |
paran0ids0ul/infernal-twin | build/pip/pip/index.py | 237 | 47847 | """Routines related to PyPI, indexes"""
from __future__ import absolute_import
import logging
import cgi
from collections import namedtuple
import itertools
import sys
import os
import re
import mimetypes
import posixpath
import warnings
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip._vendor.... | gpl-3.0 | -2,580,494,234,433,815,000 | 35.833718 | 79 | 0.546534 | false |
github-account-because-they-want-it/django | django/contrib/contenttypes/views.py | 380 | 3608 | from __future__ import unicode_literals
from django import http
from django.apps import apps
from django.contrib.contenttypes.models import ContentType
from django.contrib.sites.requests import RequestSite
from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext as _
def sh... | bsd-3-clause | -4,735,900,011,849,519,000 | 39.088889 | 92 | 0.593681 | false |
StevenBlack/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/test/finder_unittest.py | 124 | 5471 | # Copyright (C) 2012 Google, Inc.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer... | bsd-3-clause | 5,108,746,506,816,876,000 | 42.420635 | 95 | 0.646317 | false |
addition-it-solutions/project-all | addons/crm/wizard/crm_phonecall_to_phonecall.py | 8 | 4319 | # -*- 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 | 852,247,374,029,905,300 | 43.525773 | 116 | 0.581153 | false |
talavis/Protein-Data-Visualisation | project.py | 1 | 13480 | #!/usr/bin/env python2
import sys
# check input parameters, generate INDATA list
# code placed here to avoid unneccesary vtk loading
if len(sys.argv) == 1 :
sys.stderr.write('Using standard data set, to use other data:\n'.format(sys.argv[0]))
sys.stderr.write('Usage: {0} <pdb file> <connection file> |<protna... | bsd-3-clause | 8,655,102,237,018,712,000 | 38.300292 | 145 | 0.600148 | false |
fbradyirl/home-assistant | homeassistant/components/braviatv/media_player.py | 2 | 11127 | """Support for interface with a Sony Bravia TV."""
import ipaddress
import logging
from getmac import get_mac_address
import voluptuous as vol
from homeassistant.components.media_player import MediaPlayerDevice, PLATFORM_SCHEMA
from homeassistant.components.media_player.const import (
SUPPORT_NEXT_TRACK,
SUPP... | apache-2.0 | 7,334,856,799,800,362,000 | 29.822715 | 84 | 0.591714 | false |
gsobczyk/hamster | src/hamster/lib/dbus.py | 1 | 3725 | import dbus
from dbus.mainloop.glib import DBusGMainLoop as DBusMainLoop
from json import dumps, loads
from calendar import timegm
from hamster.lib import datetime as dt
from hamster.lib.fact import Fact
"""D-Bus communication utilities."""
# file layout: functions sorted in alphabetical order,
# not taking into ac... | gpl-3.0 | -9,060,559,440,202,236,000 | 28.563492 | 94 | 0.627919 | false |
himanshuo/osf.io | website/addons/github/views/hooks.py | 36 | 3114 | # -*- coding: utf-8 -*-
import os # noqa
from dateutil.parser import parse as dateparse
from flask import request
from website import models
from website.project.decorators import must_be_valid_project
from website.project.decorators import must_not_be_registration
from website.project.decorators import must_have_a... | apache-2.0 | -7,800,492,790,601,596,000 | 26.557522 | 91 | 0.578998 | false |
thewangcj/MyFlasky | app/__init__.py | 1 | 1626 | from flask import Flask
from flask_bootstrap import Bootstrap
from flask_mail import Mail
from flask_moment import Moment
from flask_sqlalchemy import SQLAlchemy
from config import config # 导入配置
from flask_login import LoginManager
from flask_pagedown import PageDown
# 初始化flask-login
login_manager = LoginManager()
#... | mit | -1,001,647,825,935,740,900 | 26.510204 | 87 | 0.734421 | false |
jagill/treeano | treeano/sandbox/nodes/paired_conv.py | 2 | 2082 | """
node for 2 conv's paired together, which allows more flexible combinations of
filter size and padding - specifically even filter sizes can have "same"
padding
"""
import numpy as np
import theano
import theano.tensor as T
import treeano
import treeano.nodes as tn
import canopy
fX = theano.config.floatX
@treeano... | apache-2.0 | -4,696,539,391,155,134,000 | 36.178571 | 77 | 0.577329 | false |
Bedrock02/digital-tribe-site | lib/werkzeug/contrib/cache.py | 84 | 30341 | # -*- 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 | 6,546,068,512,295,072,000 | 34.362471 | 79 | 0.58126 | false |
babble/babble | include/jython/Lib/test/test_binop.py | 87 | 10683 | """Tests for binary operators on subtypes of built-in types."""
import unittest
from test import test_support
def gcd(a, b):
"""Greatest common divisor using Euclid's algorithm."""
while a:
a, b = b%a, a
return b
def isint(x):
"""Test whether an object is an instance of int or long."""
re... | apache-2.0 | 3,587,106,364,580,369,400 | 31.570122 | 80 | 0.52972 | false |
danielfrg/word2vec | word2vec/wordclusters.py | 1 | 1041 | import numpy as np
class WordClusters(object):
def __init__(self, vocab, clusters):
self.vocab = vocab
self.clusters = clusters
def ix(self, word):
"""
Returns the index on self.vocab and self.clusters for 'word'
"""
temp = np.where(self.vocab == word)[0]
... | apache-2.0 | 3,615,452,939,829,426,700 | 27.916667 | 76 | 0.585975 | false |
brokenjacobs/ansible | lib/ansible/modules/network/cloudengine/ce_snmp_traps.py | 39 | 19559 | #!/usr/bin/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 distribut... | gpl-3.0 | 8,155,352,616,532,098,000 | 34.691606 | 104 | 0.51475 | false |
flan/media-storage | clients/python/media_storage/compression.py | 2 | 6538 | """
media-storage : compression
===========================
Offers efficient handlers for compressing and decompressing data, using
file-like objects (often tempfiles).
This module is shared by every Python facet of the media-storage project and
changes to one instance should be reflected in all.
Usage
-----
(De)co... | lgpl-3.0 | -6,602,452,722,148,314,000 | 32.020202 | 101 | 0.667788 | false |
echa/gearman-go | example/py/client.py | 7 | 1499 | #!/usr/bin/python
import gearman
def check_request_status(job_request):
if job_request.complete:
print "Job %s finished! Result: %s - %s" % (job_request.job.unique, job_request.state, job_request.result)
elif job_request.timed_out:
print "Job %s timed out!" % job_request.unique
elif job_r... | mit | -3,153,373,670,519,710,700 | 29.591837 | 115 | 0.645764 | false |
borosnborea/SwordGO_app | example/kivymap/.buildozer/venv/lib/python2.7/site-packages/pip/commands/list.py | 168 | 7412 | from __future__ import absolute_import
import logging
import warnings
from pip.basecommand import Command
from pip.exceptions import CommandError
from pip.index import PackageFinder
from pip.utils import (
get_installed_distributions, dist_is_editable)
from pip.utils.deprecation import RemovedInPip10Warning
from ... | gpl-3.0 | -1,375,532,974,396,679,200 | 34.464115 | 79 | 0.552887 | false |
micolous/metrodroid | extra/mct_to_mfcdump.py | 1 | 2747 | #!/usr/bin/env python3
# -*- mode: python; indent-tabs-mode: nil; tab-width: 2 -*-
"""
mct_to_mfcdump.py - Converts a dump from MIFARE Classic Tool to mfoc/mfcuk .mfc
format (raw data)
Copyright 2015-2018 Michael Farrell <micolous+git@gmail.com>
This program is free software: you can redistribute it and/or modify
it ... | gpl-3.0 | -4,961,703,611,185,420,000 | 30.215909 | 101 | 0.676374 | false |
fivejjs/GPy | GPy/models/bcgplvm.py | 4 | 1639 | # Copyright (c) 2012-2014, GPy authors (see AUTHORS.txt).
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import numpy as np
from ..core import GP
from ..models import GPLVM
from ..mappings import *
class BCGPLVM(GPLVM):
"""
Back constrained Gaussian Process Latent Variable Model
:param Y: ... | bsd-3-clause | 3,038,411,989,542,060,000 | 33.145833 | 103 | 0.651617 | false |
aloverso/SoftwareSystems | hw04/wave3/thinkdsp.py | 23 | 31996 | """This file contains code used in "Think DSP",
by Allen B. Downey, available from greenteapress.com
Copyright 2013 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
import array
import math
import numpy
import random
import scipy
import scipy.stats
import struct
import subprocess
import thi... | gpl-3.0 | -2,440,405,395,366,568,000 | 23.783888 | 75 | 0.579197 | false |
a10networks/a10-openstack-lib | a10_openstack_lib/tests/test_resources.py | 1 | 1779 | # Copyright (C) 2016 A10 Networks 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 requi... | apache-2.0 | 1,576,925,566,725,584,000 | 37.673913 | 85 | 0.714446 | false |
yongshengwang/builthue | desktop/core/ext-py/requests-2.0.0/requests/packages/bs4/tests/test_html5lib.py | 293 | 2929 | """Tests to ensure that the html5lib tree builder generates good trees."""
import warnings
try:
from bs4.builder import HTML5TreeBuilder
HTML5LIB_PRESENT = True
except ImportError, e:
HTML5LIB_PRESENT = False
from bs4.element import SoupStrainer
from bs4.testing import (
HTML5TreeBuilderSmokeTest,
... | apache-2.0 | 3,610,799,395,104,068,600 | 33.458824 | 120 | 0.573916 | false |
highco-groupe/odoo | addons/delivery/stock.py | 8 | 8971 | # -*- 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 | -6,992,775,309,256,184,000 | 47.231183 | 183 | 0.578977 | false |
foobarbazblarg/stayclean | stayclean-2017-december/display-during-signup.py | 1 | 6725 | #!/usr/bin/python
# TODO: issues with new oauth2 stuff. Keep using older version of Python for now.
# #!/usr/bin/env python
from participantCollection import ParticipantCollection
import string
import re
import datetime
import pyperclip
# Edit Me!
# Remember, this is during signup, so current month is not March, it'... | mit | 4,226,845,965,079,023,000 | 60.697248 | 569 | 0.702454 | false |
ModdedPA/android_external_chromium_org | chrome/browser/resources/web_dev_style/js_checker.py | 59 | 8940 | # 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.
"""Presubmit script for Chromium JS resources.
See chrome/browser/resources/PRESUBMIT.py
"""
class JSChecker(object):
def __init__(self, input_api, o... | bsd-3-clause | -6,772,776,687,993,409,000 | 35.942149 | 80 | 0.616443 | false |
hogarthj/ansible | test/units/modules/cloud/amazon/test_elb_application_lb.py | 33 | 4551 | #
# (c) 2017 Michael Tinning
#
# 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)
import json
from copy import deepcopy
import pytest
from ansible.module_utils._text import to_bytes
from ansible.module_utils... | gpl-3.0 | 3,055,201,174,453,935,000 | 28.551948 | 119 | 0.671721 | false |
0jpq0/kbengine | kbe/res/scripts/common/Lib/email/_encoded_words.py | 85 | 7913 | """ Routines for manipulating RFC2047 encoded words.
This is currently a package-private API, but will be considered for promotion
to a public API if there is demand.
"""
# An ecoded word looks like this:
#
# =?charset[*lang]?cte?encoded_string?=
#
# for more information about charset see the charset module. ... | lgpl-3.0 | -168,851,404,253,971,600 | 34.80543 | 80 | 0.665614 | false |
peterwilletts24/Python-Scripts | plot_scripts/EMBRACE/heat_flux/plot_from_pp_3234_diff_8km.py | 2 | 5598 | """
Load pp, plot and save
"""
import os, sys
import matplotlib
matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!
from matplotlib import rc
from matplotlib.font_manager import FontProperties
from matplotlib import rcParams
from mpl_toolkits.basemap import Basemap
rc('font', family = '... | mit | -5,112,691,995,934,458,000 | 30.273743 | 150 | 0.680064 | false |
111pontes/ydk-py | cisco-ios-xe/ydk/models/cisco_ios_xe/Cisco_IOS_XE_environment_oper.py | 1 | 4896 | """ Cisco_IOS_XE_environment_oper
This module contains a collection of YANG definitions for
monitoring Environment of a Network Element.Copyright (c) 2016\-2017 by Cisco Systems, Inc.All rights reserved.
"""
import re
import collections
from enum import Enum
from ydk.types import Empty, YList, YLeafList, DELETE,... | apache-2.0 | 2,316,826,110,117,678,600 | 25.042553 | 250 | 0.590278 | false |
IsaacHaze/tweepy | tweepy/binder.py | 40 | 10796 | # Tweepy
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
from __future__ import print_function
import time
import re
from six.moves.urllib.parse import quote
import requests
import logging
from tweepy.error import TweepError, RateLimitError, is_rate_limit_error_message
from tweepy.utils import co... | mit | 4,479,261,453,270,845,400 | 41.503937 | 102 | 0.508707 | false |
shashank971/edx-platform | common/lib/xmodule/xmodule/video_module/bumper_utils.py | 86 | 4238 | """
Utils for video bumper
"""
import copy
import json
import pytz
import logging
from collections import OrderedDict
from datetime import datetime, timedelta
from django.conf import settings
from .video_utils import set_query_parameter
try:
import edxval.api as edxval_api
except ImportError:
edxval_api = No... | agpl-3.0 | -331,563,203,577,693,400 | 28.84507 | 115 | 0.646295 | false |
esemin83/python_training | test/test_db_matches_ui.py | 1 | 1134 | from model.group import Group
from timeit import timeit
from model.group_address import Address_data
from test.test_string_value import merge_emails
from test.test_string_value import merge_phones_like_on_homepage
#def test_group_list(app, db):
# print(timeit(lambda: app.group.get_group_list(), number=1))
# def ... | apache-2.0 | 7,783,693,567,523,265,000 | 42.615385 | 113 | 0.673721 | false |
smlbiobot/SML-Cogs | figlet/figlet.py | 1 | 2994 | # -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2017 SML
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy... | mit | -837,171,908,442,863,600 | 32.640449 | 75 | 0.691717 | false |
agry/NGECore2 | scripts/mobiles/naboo/kaadu_female.py | 2 | 1593 | import sys
from services.spawn import MobileTemplate
from services.spawn import WeaponTemplate
from resources.datatables import WeaponType
from resources.datatables import Difficulty
from resources.datatables import Options
from java.util import Vector
def addTemplate(core):
mobileTemplate = MobileTemplate()
mobi... | lgpl-3.0 | 8,099,512,725,521,832,000 | 32.208333 | 129 | 0.826742 | false |
timothycrosley/WebBot | instant_templates/create_webbot_appengine/pygments/lexers/hdl.py | 27 | 16181 | # -*- coding: utf-8 -*-
"""
pygments.lexers.hdl
~~~~~~~~~~~~~~~~~~~
Lexers for hardware descriptor languages.
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, bygroups, include, using, t... | gpl-2.0 | 5,449,502,376,541,512,000 | 44.452247 | 88 | 0.520363 | false |
glatard/nipype | nipype/workflows/smri/freesurfer/utils.py | 15 | 13485 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
import nipype.pipeline.engine as pe
import nipype.interfaces.fsl as fsl
import nipype.interfaces.freesurfer as fs
import nipype.interfaces.meshfix as mf
import nipype.interfaces.io as nio
import nipype.in... | bsd-3-clause | -3,747,115,830,170,916,400 | 34.864362 | 130 | 0.564034 | false |
steebchen/youtube-dl | youtube_dl/extractor/foxsports.py | 31 | 1391 | from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
smuggle_url,
update_url_query,
)
class FoxSportsIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?foxsports\.com/(?:[^/]+/)*(?P<id>[^/]+)'
_TEST = {
'url': 'http://www.foxsports.com/tennessee/v... | unlicense | 5,345,522,177,904,536,000 | 31.348837 | 109 | 0.528397 | false |
SiriusBizniss/evetowerthing | requests-master/requests/packages/chardet/constants.py | 3008 | 1335 | ######################## 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 | -6,906,855,364,030,983,000 | 33.230769 | 69 | 0.698876 | false |
marcwebbie/youtube-dl | youtube_dl/extractor/vube.py | 26 | 6929 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_str,
)
from ..utils import (
int_or_none,
ExtractorError,
)
class VubeIE(InfoExtractor):
IE_NAME = 'vube'
IE_DESC = 'Vube.com'
_VALID_URL = r'https?://vube\.com/(?:[^/]+/)+(?P<id... | unlicense | -3,647,922,358,492,520,000 | 39.284884 | 145 | 0.504113 | false |
zbqf109/goodo | openerp/addons/project_timesheet/__openerp__.py | 23 | 1210 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Bill Time on Tasks',
'version': '1.0',
'category': 'Project Management',
'description': """
Synchronization of project task work entries with timesheet entries.
================================... | gpl-3.0 | -1,569,992,309,141,853,700 | 36.8125 | 104 | 0.62314 | false |
frt-arch/taiga-back | taiga/projects/issues/permissions.py | 6 | 2290 | # Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the F... | agpl-3.0 | -2,187,809,654,650,624,500 | 42.169811 | 80 | 0.713724 | false |
benoitsteiner/tensorflow-xsmm | tensorflow/contrib/distributions/python/kernel_tests/seed_stream_test.py | 39 | 3229 | # 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 applica... | apache-2.0 | 2,151,187,087,774,798,800 | 39.3625 | 80 | 0.677609 | false |
dpetzold/django | tests/file_storage/models.py | 219 | 1603 | """
Storing files according to a custom storage system
``FileField`` and its variations can take a ``storage`` argument to specify how
and where files should be stored.
"""
import random
import tempfile
from django.core.files.storage import FileSystemStorage
from django.db import models
class CustomValidNameStorag... | bsd-3-clause | -2,303,848,628,703,364,900 | 35.431818 | 100 | 0.724267 | false |
rs2/pandas | pandas/core/arrays/sparse/dtype.py | 1 | 12178 | """Sparse Dtype"""
import re
from typing import TYPE_CHECKING, Any, List, Optional, Tuple, Type
import warnings
import numpy as np
from pandas._typing import Dtype, DtypeObj
from pandas.errors import PerformanceWarning
from pandas.core.dtypes.base import ExtensionDtype, register_extension_dtype
from pandas.core.dty... | bsd-3-clause | 1,306,626,974,453,503,000 | 30.631169 | 86 | 0.550172 | false |
davidcusatis/horizon | openstack_dashboard/dashboards/project/volumes/volumes/forms.py | 10 | 35894 | # Copyright 2012 Nebula, 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 o... | apache-2.0 | 1,136,729,255,800,933,500 | 43.533499 | 79 | 0.515518 | false |
benjaminjkraft/django | tests/select_for_update/tests.py | 123 | 9449 | from __future__ import unicode_literals
import threading
import time
from multiple_database.routers import TestRouter
from django.db import DatabaseError, connection, router, transaction
from django.test import (
TransactionTestCase, override_settings, skipIfDBFeature,
skipUnlessDBFeature,
)
from .models im... | bsd-3-clause | 1,346,606,889,182,337,500 | 35.910156 | 80 | 0.617631 | false |
rve/pracmcm | ca/final.py | 1 | 10402 | import random
lane_num = 2
lane = [[], []]
max_car_num = 10000
road_len = 1000
h = 6
p_b = 0.94
p_0 = 0.5
p_d = 0.1
v_max = [6, 10]
gap = 7
p_car = 1
p_crash = 0
time_period = 200
class Car:
car_cnt = 0
def __init__(self, v = 1, lane = 1):
self.size = 1
if random.random() < 0.1:
... | mit | 8,238,868,536,402,490,000 | 32.022222 | 129 | 0.396751 | false |
zorroz/microblog | flask/lib/python2.7/site.py | 306 | 27543 | """Append module search paths for third-party packages to sys.path.
****************************************************************
* This module is automatically imported during initialization. *
****************************************************************
In earlier versions of Python (up to 1.5a3), scripts or... | bsd-3-clause | -7,674,046,361,638,859,000 | 35.336412 | 117 | 0.570163 | false |
dut3062796s/PTVS | Python/Tests/TestData/VirtualEnv/env/Lib/encodings/rot_13.py | 88 | 2697 | #!/usr/bin/env python
""" Python Character Mapping Codec for ROT13.
See http://ucsub.colorado.edu/~kominek/rot13/ for details.
Written by Marc-Andre Lemburg (mal@lemburg.com).
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
... | apache-2.0 | 648,247,004,201,911,700 | 20.855932 | 71 | 0.64442 | false |
zhouzhenghui/python-for-android | python3-alpha/python3-src/Doc/includes/test.py | 139 | 3744 | """Test module for the noddy examples
Noddy 1:
>>> import noddy
>>> n1 = noddy.Noddy()
>>> n2 = noddy.Noddy()
>>> del n1
>>> del n2
Noddy 2
>>> import noddy2
>>> n1 = noddy2.Noddy('jim', 'fulton', 42)
>>> n1.first
'jim'
>>> n1.last
'fulton'
>>> n1.number
42
>>> n1.name()
'jim fulton'
>>> n1.first = 'will'
>>> n1.n... | apache-2.0 | -5,069,525,683,617,464,000 | 16.577465 | 56 | 0.614316 | false |
rouxbuciu/Handle-My-Music-Business | menu_services.py | 2 | 1960 | import os
import menu_main
import fr_functions
import cfg
# =================================
# SERVICES MENU
# =================================
def view_services():
os.system('clear')
print("\n\nService".ljust(40) + " Price")
print("="*60)
for n in cfg.SERVICES:
print("| " + str(n).... | gpl-2.0 | 9,209,929,811,775,838,000 | 27 | 74 | 0.565816 | false |
terryshi96/script | repo.py | 1 | 2429 | #! /usr/bin/python
# -*- encoding: utf-8 -*-
import sys
import os
import commands
import datetime
def post_dingtalk(msg):
print('sending dingtalk message.....')
os.system("curl %s -H 'Content-Type: application/json' \
-d '{\"msgtype\": \"text\",\"text\": {\"content\": \" %s \"}}'"%(dingtalk_url, msg))... | mit | -8,269,692,326,253,573,000 | 39.79661 | 178 | 0.546323 | false |
determinedcheetahs/cheetah_juniper | hadoop/contrib/hod/hodlib/GridServices/service.py | 182 | 8174 | #Licensed to the Apache Software Foundation (ASF) under one
#or more contributor license agreements. See the NOTICE file
#distributed with this work for additional information
#regarding copyright ownership. The ASF licenses this file
#to you under the Apache License, Version 2.0 (the
#"License"); you may not use thi... | apache-2.0 | 2,618,001,420,655,485,000 | 29.729323 | 84 | 0.676902 | 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.