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 |
|---|---|---|---|---|---|---|---|---|---|---|
SwissTPH/odk_planner | tools/create_instance.py | 1 | 3752 | """Creates a new instance with default configuration files
this script creates a new instance with the default configuration files from
the ``demo/config`` directory, asking the user for MySQL credentials, and
also creating a temporary password that has to be used for first login
"""
import sys, ConfigParser, os, os.... | gpl-2.0 | -7,409,503,926,249,745,000 | 31.626087 | 82 | 0.65565 | false |
v0lk3r/ansible-modules-core | files/fetch.py | 94 | 3057 | # this is a virtual module that is entirely implemented server side
# 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 op... | gpl-3.0 | 6,348,717,356,324,721,000 | 34.964706 | 91 | 0.697416 | false |
blindroot/django | tests/admin_widgets/models.py | 49 | 4830 | from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
class MyFileField(models.FileField):
pass
@python_2_unicode_compatible
class Member(models.Model):
name = models.CharField(max_lengt... | bsd-3-clause | -3,967,719,843,982,965,000 | 28.272727 | 98 | 0.692961 | false |
coolblaze03/WSNNS3Port | .waf-1.5.16-e6d03192b5ddfa5ef2c8d65308e48e42/wafadmin/Tools/gnome.py | 6 | 6844 | #! /usr/bin/env python
# encoding: utf-8
import os,re
import TaskGen,Utils,Runner,Task,Build,Options,Logs
import cc
from Logs import error
from TaskGen import taskgen,before,after,feature
n1_regexp=re.compile('<refentrytitle>(.*)</refentrytitle>',re.M)
n2_regexp=re.compile('<manvolnum>(.*)</manvolnum>',re.M)
def posti... | gpl-2.0 | 677,448,348,075,454,700 | 40.98773 | 120 | 0.701636 | false |
bregman-arie/ansible | lib/ansible/modules/messaging/rabbitmq_user.py | 15 | 9514 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Chatham Financial <oss@chathamfinancial.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'... | gpl-3.0 | -403,332,253,535,644,700 | 31.360544 | 93 | 0.584612 | false |
itdaniher/WeDoMore | setup.py | 1 | 1174 | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='wedo',
version='1.1.0',
packages=find_packages(),
install_requires=['pyusb'],
zip_safe=False,
include_package_data=... | gpl-2.0 | -1,428,513,152,531,322,400 | 34.575758 | 156 | 0.642249 | false |
mandeepdhami/neutron | neutron/tests/unit/common/test_ipv6_utils.py | 24 | 5641 | # Copyright 2013 IBM Corp.
# 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 app... | apache-2.0 | 4,460,244,745,387,446 | 36.111842 | 79 | 0.586244 | false |
Suiname/LearnPython | functions.py | 1 | 1636 | def my_function():
print "Hello From My Function!"
def my_function_with_args(username, greeting):
print "Hello, %s , From My Function!, I wish you %s"%(username, greeting)
def sum_two_numbers(a, b):
return a + b
# print a simple greeting
my_function()
#prints - "Hello, John Doe, From My Function!, I wish... | mit | 9,097,109,958,179,274,000 | 39.9 | 207 | 0.732885 | false |
louietsai/python-for-android | python3-alpha/python3-src/Lib/turtledemo/__main__.py | 55 | 9369 | #!/usr/bin/env python3
import sys
import os
from tkinter import *
from idlelib.Percolator import Percolator
from idlelib.ColorDelegator import ColorDelegator
from idlelib.textView import view_file # TextViewer
from imp import reload
import turtle
import time
demo_dir = os.path.dirname(os.path.abspath(__file__))
STA... | apache-2.0 | 1,377,439,956,258,470,400 | 34.221805 | 88 | 0.555556 | false |
ali-salman/Aspose_Words_Java | Plugins/Aspose_Words_Java_for_Jython/asposewords/programming_documents/InsertBarcode.py | 4 | 2722 | from asposewords import Settings
from com.aspose.words import Document
from com.aspose.words import DocumentBuilder
from com.aspose.words import HeaderFooterType
from com.aspose.words import ControlChar
from com.aspose.words import SectionStart
from com.aspose.words import TabAlignment
from com.aspose.words import TabL... | mit | -8,228,643,259,824,715,000 | 37.9 | 130 | 0.747612 | false |
timhuanggithub/pox_load_balancing | pox/forwarding/l2_learning.py | 25 | 6779 | # Copyright 2011 James McCauley
#
# This file is part of POX.
#
# POX 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.
#
# POX is distri... | gpl-3.0 | -6,463,698,891,732,176,000 | 32.230392 | 75 | 0.654079 | false |
volpino/Yeps-EURAC | lib/galaxy/web/framework/middleware/profile.py | 2 | 6006 | """
Middleware that profiles the request with cProfile and displays profiling
information at the bottom of each page.
"""
import sys
import os
import threading
import cgi
import time
from cStringIO import StringIO
from paste import response
try:
# Included in Python 2.5
import cProfile
except:
try:
... | mit | -6,243,003,616,931,907,000 | 31.825137 | 128 | 0.564269 | false |
ganeshrn/ansible | lib/ansible/plugins/action/gather_facts.py | 11 | 6368 | # Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import time
from ansible import constants as C
from ansible.executor.module_common import... | gpl-3.0 | 6,107,864,062,729,387,000 | 42.616438 | 151 | 0.577261 | false |
scottferg/web-console | django/db/backends/oracle/creation.py | 9 | 11427 | import sys, time
from django.db.backends.creation import BaseDatabaseCreation
TEST_DATABASE_PREFIX = 'test_'
PASSWORD = 'Im_a_lumberjack'
class DatabaseCreation(BaseDatabaseCreation):
# This dictionary maps Field objects to their associated Oracle column
# types, as strings. Column-type strings can co... | bsd-3-clause | -2,778,541,025,500,871,000 | 43.166008 | 149 | 0.541962 | false |
progdupeupl/pdp_website | pdp/messages/urls.py | 1 | 1131 | # coding: utf-8
#
# This file is part of Progdupeupl.
#
# Progdupeupl 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 License, or
# (at your option) any later version.
#
# Progdu... | agpl-3.0 | 8,333,864,600,356,005,000 | 30.416667 | 77 | 0.704686 | false |
sycy600/pamietacz | src/pamietacz/tests/dump_load_tests.py | 1 | 12140 | from django.core.files.uploadedfile import SimpleUploadedFile
from pamietacz.models import Shelf, Deck, Card
from test_utils import (add_shelf,
add_deck,
add_card,
TransactionTestCaseWithAuthentication)
class DumpLoadTests(TransactionTestCaseWith... | bsd-2-clause | -6,577,458,846,966,097,000 | 42.985507 | 79 | 0.556755 | false |
jart/tensorflow | tensorflow/python/kernel_tests/weights_broadcast_test.py | 130 | 9711 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -194,463,064,704,277,220 | 34.184783 | 80 | 0.61003 | false |
slyphon/pants | tests/python/pants_test/backend/core/tasks/test_paths.py | 6 | 5072 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants.backend.c... | apache-2.0 | -1,885,778,651,944,263,700 | 38.015385 | 93 | 0.588525 | false |
GenericStudent/home-assistant | homeassistant/components/eddystone_temperature/sensor.py | 16 | 5640 | """
Read temperature information from Eddystone beacons.
Your beacons must be configured to transmit UID (for identification) and TLM
(for temperature) frames.
"""
import logging
# pylint: disable=import-error
from beacontools import BeaconScanner, EddystoneFilter, EddystoneTLMFrame
import voluptuous as vol
from hom... | apache-2.0 | 8,271,649,231,909,970,000 | 29.160428 | 84 | 0.617021 | false |
alexmandujano/django | tests/admin_validation/models.py | 192 | 1332 | """
Tests of ModelAdmin validation logic.
"""
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
class Album(models.Model):
title = models.CharField(max_length=150)
@python_2_unicode_compatible
class Song(models.Model):
title = models.CharField(max_length=150)
al... | bsd-3-clause | 7,361,313,592,546,934,000 | 22.368421 | 68 | 0.704955 | false |
edx/locust | setup.py | 5 | 1581 | # encoding: utf-8
from setuptools import setup, find_packages, Command
import sys, os
version = '0.7.2'
class Unit2Discover(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import sys, subprocess
basecmd... | mit | -4,958,280,989,588,865,000 | 27.727273 | 109 | 0.617089 | false |
dandygithub/kodi | addons/script.module.dandy.search.history/plugin.py | 1 | 2321 | # -*- coding: utf-8 -*-
# Writer (c) 2019, dandy
# Rev. 1.0.0
# Licence: GPL v.3: http://www.gnu.org/copyleft/gpl.html
import xbmc
import xbmcaddon
import xbmcplugin
import xbmcgui
import XbmcHelpers as common
import resources.lib.SearchHistory as history
ID = 'script.module.dandy.search.history'
ADDON = xbmcaddon.... | gpl-3.0 | 3,349,138,390,178,041,300 | 30.794521 | 103 | 0.640241 | false |
Eward5513/oceanbase | oceanbase_0.4/script/data_dispatcher/copy_sstable.py | 13 | 7762 | #!/usr/bin/python2.6
import os
import sys
import Queue
import threading
from subprocess import Popen, PIPE, STDOUT
import copy
import time
import re
import logging
class ExecutionError(Exception): pass
class Shell:
@classmethod
def sh(cls, cmd, host=None, username=None):
'''Execute a command locally or remot... | gpl-2.0 | 3,123,089,810,419,504,000 | 27.021661 | 84 | 0.580392 | false |
selyanhb/Markus | lib/tools/api_helper.py | 14 | 8102 | #!/usr/bin/python
#
# The intention of this Python script is to provide
# MarkUs users with a tool which is able to generate HTTP's
# GET, PUT, DELETE and POST requests. This may be handy for
# users planning to use MarkUs' Web API.
#
## DISCLAIMER
#
# This script is made available under the OSI-approved
# MIT license... | mit | -5,124,408,913,545,538,000 | 38.140097 | 144 | 0.61923 | false |
HwisooSo/gemV-update | src/arch/x86/isa/insts/simd64/floating_point/arithmetic/multiplication.py | 91 | 2452 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... | bsd-3-clause | -9,037,103,328,757,757,000 | 45.264151 | 72 | 0.773246 | false |
nhippenmeyer/django | tests/extra_regress/models.py | 281 | 1401 | from __future__ import unicode_literals
import copy
import datetime
from django.contrib.auth.models import User
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class RevisionableModel(models.Model):
base = models.ForeignKey('self', models.S... | bsd-3-clause | 7,233,151,798,752,401,000 | 29.456522 | 77 | 0.668808 | false |
0Chencc/CTFCrackTools | Lib/test/test_wave.py | 141 | 1151 | from test.test_support import TESTFN, run_unittest
import os
import wave
import unittest
nchannels = 2
sampwidth = 2
framerate = 8000
nframes = 100
class TestWave(unittest.TestCase):
def setUp(self):
self.f = None
def tearDown(self):
if self.f is not None:
self.f.close()
... | gpl-3.0 | 8,389,177,616,373,340,000 | 24.577778 | 60 | 0.618593 | false |
sursum/buckanjaren | buckanjaren/lib/python3.5/site-packages/django/contrib/auth/context_processors.py | 189 | 1939 | # PermWrapper and PermLookupDict proxy the permissions system into objects that
# the template system can understand.
class PermLookupDict(object):
def __init__(self, user, app_label):
self.user, self.app_label = user, app_label
def __repr__(self):
return str(self.user.get_all_permissions())
... | mit | -1,086,011,931,817,145,200 | 28.378788 | 79 | 0.608561 | false |
eduNEXT/edunext-platform | openedx/core/djangoapps/content/block_structure/transformer_registry.py | 4 | 2387 | """
Block Structure Transformer Registry implemented using the platform's
PluginManager.
"""
from base64 import b64encode
from hashlib import sha1
import six
from openedx.core.lib.cache_utils import process_cached
from openedx.core.lib.plugins import PluginManager
class TransformerRegistry(PluginManager):
"""... | agpl-3.0 | 6,359,342,410,910,622,000 | 31.256757 | 111 | 0.664432 | false |
UNINETT/nav | python/nav/ipdevpoll/plugins/psuwatch.py | 1 | 4821 | #
# Copyright (C) 2019 Uninett AS
#
# This file is part of Network Administration Visualized (NAV).
#
# NAV is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 3 as published by
# the Free Software Foundation.
#
# This program is distributed in the hope... | gpl-2.0 | 6,442,957,487,031,774,000 | 33.191489 | 85 | 0.64219 | false |
kineticgar/mecanum | avr_controller/scripts/voltage.py | 4 | 1549 | #!/usr/bin/env python
import sys
import serial
import time
print('Opening port')
arduino = serial.Serial('/dev/ttyACM0', 115200, timeout=1, dsrdtr=False)
time.sleep(3)
print('Flushing the buffer')
arduino.readline()
def a2s(arr):
""" Array of integer byte values --> binary string
"""
return ''.join(chr(b... | gpl-2.0 | -2,185,649,310,554,870,500 | 22.830769 | 77 | 0.598451 | false |
marty331/jakesclock | flask/lib/python2.7/site-packages/setuptools/extension.py | 192 | 1821 | import sys
import re
import functools
import distutils.core
import distutils.errors
import distutils.extension
from .dist import _get_unpatched
from . import msvc9_support
_Extension = _get_unpatched(distutils.core.Extension)
msvc9_support.patch_for_specialized_compiler()
def have_pyrex():
"""
Return True i... | gpl-2.0 | -6,723,070,167,514,346,000 | 30.947368 | 76 | 0.650741 | false |
Vector35/binaryninja-api | python/lineardisassembly.py | 2 | 15064 | # Copyright (c) 2015-2021 Vector 35 Inc
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, ... | mit | 2,197,409,079,472,338,400 | 29.742857 | 126 | 0.746614 | false |
3dfxmadscientist/odoo_vi | addons/mass_mailing/controllers/main.py | 21 | 3953 |
import werkzeug
from openerp import http, SUPERUSER_ID
from openerp.http import request
class MassMailController(http.Controller):
@http.route('/mail/track/<int:mail_id>/blank.gif', type='http', auth='none')
def track_mail_open(self, mail_id, **post):
""" Email tracking. """
mail_mail_stats... | agpl-3.0 | -9,126,431,844,732,939,000 | 52.418919 | 185 | 0.63319 | false |
EnviroCentre/jython-upgrade | jython/lib/test/test_unicode_file.py | 122 | 8491 | # Test some Unicode file name semantics
# We dont test many operations on files other than
# that their names can be used with Unicode characters.
import os, glob, time, shutil
import unicodedata
import unittest
from test.test_support import run_unittest, TESTFN_UNICODE
from test.test_support import TESTFN_ENCODING, T... | mit | 2,954,134,450,984,518,700 | 41.455 | 80 | 0.633023 | false |
AndroidOpenDevelopment/android_external_chromium_org | chrome/browser/metrics/variations/generate_resources_map.py | 9 | 5382 | #!/usr/bin/python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
import hashlib
import operator
import os
import re
import sys
RESOURCE_EXTRACT_REGEX = re.compile('^#define (\S*) (\d*... | bsd-3-clause | -1,134,658,073,720,331,300 | 28.734807 | 80 | 0.674842 | false |
ialmetwally/android-resource-remover | setup.py | 10 | 1065 | import os
import sys
from setuptools import setup, find_packages
version = '0.1.5'
def read(f):
return open(os.path.join(os.path.dirname(__file__), f)).read().strip()
setup(name='android-resource-remover',
version=version,
description=('Android resource remover'),
long_description='\n\n'.join... | apache-2.0 | -1,688,236,965,201,580,500 | 31.272727 | 75 | 0.606573 | false |
denim2x/Vintageous | tests/commands/test__vi_dollar.py | 6 | 4202 | import unittest
from collections import namedtuple
from Vintageous.vi.utils import modes
from Vintageous.tests import set_text
from Vintageous.tests import add_sel
from Vintageous.tests import get_sel
from Vintageous.tests import first_sel
from Vintageous.tests import ViewTest
def get_text(test):
return test.vi... | mit | 2,106,199,726,209,140,700 | 48.447059 | 142 | 0.628034 | false |
eadgarchen/tensorflow | tensorflow/contrib/training/python/training/training.py | 33 | 20450 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 | -6,349,468,755,695,101,000 | 36.522936 | 80 | 0.684694 | false |
piratos/ctfbulletin | blog/views.py | 1 | 1846 | from django.shortcuts import render, Http404
from blog.models import *
from django.contrib.auth.decorators import login_required
def user_or_challenger(request):
user_id = request.user.id
chexist = False
uexist = False
try:
user = User.objects.get(id=user_id)
uexist = True
try:... | mit | 7,390,452,668,059,153,000 | 30.844828 | 106 | 0.611593 | false |
gnuhub/intellij-community | python/helpers/docutils/parsers/rst/directives/tables.py | 49 | 19736 | # $Id: tables.py 6107 2009-08-31 02:29:08Z goodger $
# Authors: David Goodger <goodger@python.org>; David Priest
# Copyright: This module has been placed in the public domain.
"""
Directives for table elements.
"""
__docformat__ = 'reStructuredText'
import sys
import os.path
import csv
from docutils import io, nod... | apache-2.0 | 6,214,422,261,960,931,000 | 43.152125 | 87 | 0.547831 | false |
rdkls/gps-tracker-server | rest_api/rest_api.py | 1 | 6919 | #!/usr/bin/env python
import json
import config
import sys
import re
from flask_cors import CORS
from gevent.pywsgi import WSGIServer
from flask import Flask, request
from werkzeug.exceptions import NotFound, Unauthorized, BadRequest
from models import *
app = Flask(__name__)
app.debug = True
app.config['CORS_HEADERS'... | gpl-3.0 | -2,722,637,902,922,422,000 | 30.45 | 88 | 0.543431 | false |
lesthack/azucar | src/player.py | 1 | 27194 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import gobject
import gtk
import pango
import re
import os
import keybinder
import logging
import time
import pynotify
import ConfigParser
import multiprocessing
import cover
import config
UI_FILE = "data/player.ui"
class player:
def __init__(self, xmms):
se... | gpl-3.0 | -5,754,475,775,912,153,000 | 38.071839 | 206 | 0.553321 | false |
Sancus/bedrock | bedrock/press/views.py | 20 | 3927 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from django.core.mail import EmailMessage
from django.template.loader import render_to_string
from django.utils.decorato... | mpl-2.0 | 7,170,741,192,834,143,000 | 36.4 | 91 | 0.64986 | false |
amenonsen/ansible | lib/ansible/plugins/action/dellos6.py | 38 | 4085 | #
# (c) 2016 Red Hat Inc.
#
# (c) 2017 Dell EMC.
#
# 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 ve... | gpl-3.0 | -8,286,540,419,614,434,000 | 42.924731 | 122 | 0.657772 | false |
ondrokrc/gramps | gramps/gen/utils/cast.py | 1 | 2885 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2009 Gary Burton
# Copyright (C) 2011 Tim G L Lyons
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... | gpl-2.0 | -7,295,501,341,073,587,000 | 27.564356 | 79 | 0.587175 | false |
qiankunshe/sky_engine | sky/tools/webkitpy/common/system/crashlogs_unittest.py | 58 | 6058 | # 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:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and th... | bsd-3-clause | -1,171,545,544,856,151,800 | 52.140351 | 151 | 0.73341 | false |
centrumholdings/buildbot | buildbot/scripts/logwatcher.py | 2 | 3195 |
import os
from twisted.python.failure import Failure
from twisted.internet import defer, reactor, protocol, error
from twisted.protocols.basic import LineOnlyReceiver
class FakeTransport:
disconnecting = False
class BuildmasterTimeoutError(Exception):
pass
class BuildslaveTimeoutError(Exception):
pass
cl... | gpl-2.0 | 6,046,491,871,541,493,000 | 30.633663 | 78 | 0.6 | false |
DailyActie/Surrogate-Model | 01-codes/scikit-learn-master/sklearn/preprocessing/data.py | 1 | 67256 | # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Mathieu Blondel <mathieu@mblondel.org>
# Olivier Grisel <olivier.grisel@ensta.org>
# Andreas Mueller <amueller@ais.uni-bonn.de>
# Eric Martin <eric@ericmart.in>
# Giorgio Patrini <giorgio.patrini@anu.edu.au>
# Lic... | mit | -5,180,069,136,694,499,000 | 34.946553 | 88 | 0.595025 | false |
b-deng/mailinabox | tools/mail.py | 8 | 4562 | #!/usr/bin/python3
import sys, getpass, urllib.request, urllib.error, json, re
def mgmt(cmd, data=None, is_json=False):
# The base URL for the management daemon. (Listens on IPv4 only.)
mgmt_uri = 'http://127.0.0.1:10222'
setup_key_auth(mgmt_uri)
req = urllib.request.Request(mgmt_uri + cmd, urllib.parse.urlenco... | cc0-1.0 | 3,097,774,964,831,382,500 | 33.824427 | 137 | 0.647961 | false |
devs1991/test_edx_docmode | venv/lib/python2.7/site-packages/networkx/algorithms/link_analysis/tests/test_hits.py | 10 | 2367 | #!/usr/bin/env python
from nose.tools import *
from nose import SkipTest
from nose.plugins.attrib import attr
import networkx
# Example from
# A. Langville and C. Meyer, "A survey of eigenvector methods of web
# information retrieval." http://citeseer.ist.psu.edu/713792.html
class TestHITS:
def setUp(self):
... | agpl-3.0 | -5,128,596,100,568,541,000 | 26.523256 | 68 | 0.52725 | false |
DiMartinoX/plugin.video.kinopoisk.ru | script.myshows/kinopoisk/LOGGER.py | 1 | 1115 | # -*- coding: utf-8 -*-
#
try:
import xbmcaddon
__settings__ = xbmcaddon.Addon("script.myshows")
__myshows__ = xbmcaddon.Addon("plugin.video.myshows")
try:
debug = __myshows__.getSetting("debug")
except:
debug = __settings__.getSetting("debug")
except:
debug='true'
def Log(msg,... | gpl-3.0 | -3,826,702,668,287,287,000 | 26.9 | 64 | 0.549776 | false |
sathnaga/virt-test | qemu/tests/timedrift_with_stop.py | 2 | 5153 | import logging, time, os, signal
from autotest.client.shared import error
from virttest import utils_test
def run_timedrift_with_stop(test, params, env):
"""
Time drift test with stop/continue the guest:
1) Log into a guest.
2) Take a time reading from the guest and host.
3) Stop the running of t... | gpl-2.0 | -7,041,749,845,984,135,000 | 39.896825 | 79 | 0.550941 | false |
RJRandell79/RJRStudios | node_modules/node-gyp/gyp/pylib/gyp/generator/android.py | 542 | 45270 | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Notes:
#
# This generates makefiles suitable for inclusion into the Android build system
# via an Android.mk file. It is based on make.py, the standard makefile
... | gpl-2.0 | 3,021,325,676,703,697,400 | 40.380256 | 80 | 0.64038 | false |
appsembler/edx-platform | common/test/acceptance/pages/studio/settings_advanced.py | 8 | 8274 | """
Course Advanced Settings page
"""
from bok_choy.promise import EmptyPromise
from common.test.acceptance.pages.studio.course_page import CoursePage
from common.test.acceptance.pages.studio.utils import (
get_codemirror_value,
press_the_notification_button,
type_in_codemirror
)
KEY_CSS = '.key h3.title... | agpl-3.0 | -6,712,866,106,123,443,000 | 32.634146 | 116 | 0.593183 | false |
BioXiao/chimerascan | chimerascan/deprecated/old_nominate_chimeras.py | 6 | 8393 | '''
Created on Jun 4, 2011
@author: mkiyer
chimerascan: chimeric transcript discovery using RNA-seq
Copyright (C) 2011 Matthew Iyer
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 ... | gpl-3.0 | 618,910,277,618,718,300 | 39.157895 | 134 | 0.617538 | false |
inclement/vispy | vispy/visuals/collections/collection.py | 20 | 8684 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Nicolas P. Rougier
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------------------------------
"""
A collection is a... | bsd-3-clause | -3,674,755,926,362,940,400 | 33.054902 | 79 | 0.551244 | false |
HuanglabPurdue/NCS | cuda/pyCUDANCS/profile.py | 1 | 2785 | #!/usr/bin/env python
#
# Used for quickly measuring how long the solver takes to run.
#
# Hazen 08/19
#
import numpy
import pycuda.autoinit
import pycuda.driver as drv
from pycuda.compiler import SourceModule
import time
# python3 and C NCS reference version.
import pyCNCS.ncs_c as ncsC
# OpenCL version (for the OTF... | gpl-3.0 | 8,704,846,283,126,844,000 | 26.85 | 116 | 0.620826 | false |
pokemon4ik2008/py-airfoil | scons-local-2.2.0/SCons/Script/SConsOptions.py | 14 | 37624 | #
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
#
# 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
... | gpl-3.0 | 1,744,928,117,994,623,200 | 39.068158 | 111 | 0.5484 | false |
lasote/conan | conans/test/functional/disk_search_test.py | 4 | 3498 | import os
import unittest
from conans.paths import (BUILD_FOLDER, PACKAGES_FOLDER, EXPORT_FOLDER, SimplePaths, CONANINFO)
from conans.model.ref import ConanFileReference
from conans.test.utils.test_files import temp_folder
from conans.search.search import DiskSearchManager, DiskSearchAdapter
from conans.util.files impo... | mit | -2,331,113,471,100,674,600 | 42.725 | 95 | 0.613493 | false |
HiSPARC/station-software | user/python/Lib/test/test_ordered_dict.py | 4 | 13429 | import copy
import pickle
from random import shuffle
import unittest
from collections import OrderedDict
from collections import MutableMapping
from test import mapping_tests, test_support
class TestOrderedDict(unittest.TestCase):
def test_init(self):
with self.assertRaises(TypeError):
Ordere... | gpl-3.0 | -6,488,310,696,187,187,000 | 41.631746 | 99 | 0.530345 | false |
wagjo/closure-library | closure/bin/build/depstree.py | 455 | 6375 | # Copyright 2009 The Closure Library 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 a... | apache-2.0 | -5,712,011,685,755,513,000 | 32.730159 | 80 | 0.694431 | false |
safwanrahman/readthedocs.org | readthedocs/restapi/permissions.py | 2 | 2876 | """Defines access permissions for the API."""
from __future__ import absolute_import
from rest_framework import permissions
from readthedocs.core.permissions import AdminPermission
class IsOwner(permissions.BasePermission):
"""Custom permission to only allow owners of an object to edit it."""
def has_obj... | mit | 7,014,225,379,633,156,000 | 33.238095 | 80 | 0.698192 | false |
igemsoftware/SYSU-Software2013 | project/Python27/Tools/scripts/xxci.py | 94 | 2798 | #! /usr/bin/env python
# xxci
#
# check in files for which rcsdiff returns nonzero exit status
import sys
import os
from stat import *
import fnmatch
EXECMAGIC = '\001\140\000\010'
MAXSIZE = 200*1024 # Files this big must be binaries and are skipped.
def getargs():
args = sys.argv[1:]
if args:
retu... | mit | -604,772,242,415,307,000 | 23.12069 | 77 | 0.540743 | false |
smasala/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py | 124 | 21459 | # Copyright (C) 2009 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | bsd-3-clause | 711,740,053,476,322,800 | 44.176842 | 175 | 0.604688 | false |
zqzhang/crosswalk-test-suite | webapi/tct-csp-w3c-tests/csp-py/csp_img-src_asterisk_allowed_int-manual.py | 30 | 2469 | def main(request, response):
import simplejson as json
f = file('config.json')
source = f.read()
s = json.JSONDecoder().decode(source)
url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1])
url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0])
response.headers.set("Content... | bsd-3-clause | -1,792,460,367,811,362,800 | 43.089286 | 80 | 0.718915 | false |
2014cdag10/2014cdag10 | wsgi/programs/cdag1/remsub6.py | 9 | 18749 | import cherrypy
# 這是 MAN 類別的定義
'''
# 在 application 中導入子模組
import programs.cdag1.remsub6 as cdag1_remsub6
# 加入 cdag1 模組下的 remsub6.py 且以子模組 remsub6 對應其 remsub6() 類別
root.cdag1.remsub6 = cdag1_remsub6.remsub6()
# 完成設定後, 可以利用
/cdag1/remsub6
# 呼叫 man.py 中 MAN 類別的 assembly 方法
'''
class remsub6(object):
# 各組利用 index 引... | gpl-2.0 | 6,929,551,089,846,384,000 | 36.425339 | 197 | 0.655946 | false |
huguesv/PTVS | Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/win32/lib/win32timezone.py | 6 | 31716 | # -*- coding: UTF-8 -*-
"""
win32timezone:
Module for handling datetime.tzinfo time zones using the windows
registry for time zone information. The time zone names are dependent
on the registry entries defined by the operating system.
This module may be tested using the doctest module.
Written by Jason R. Coombs... | apache-2.0 | 3,678,229,288,687,771,600 | 31.527179 | 126 | 0.698966 | false |
wummel/linkchecker | linkcheck/logger/graph.py | 9 | 3382 | # -*- coding: iso-8859-1 -*-
# Copyright (C) 2000-2014 Bastian Kleineidam
#
# 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-2.0 | -2,560,546,220,964,441,600 | 32.82 | 80 | 0.606446 | false |
Celedhrim/persomov | libs/dateutil/zoneinfo/__init__.py | 144 | 2773 | # -*- coding: utf-8 -*-
"""
Copyright (c) 2003-2005 Gustavo Niemeyer <gustavo@niemeyer.net>
This module offers extensions to the standard Python
datetime module.
"""
from dateutil.tz import tzfile
from tarfile import TarFile
import os
__author__ = "Tomi Pieviläinen <tomi.pievilainen@iki.fi>"
__license__ = "Simplifie... | gpl-3.0 | 2,329,127,543,124,081,700 | 29.8 | 77 | 0.577561 | false |
mrphs/TorCtl | PathSupport.py | 1 | 81359 | #!/usr/bin/python
# Copyright 2007-2010 Mike Perry. See LICENSE file.
"""
Support classes for path construction
The PathSupport package builds on top of TorCtl.TorCtl. It provides a
number of interfaces that make path construction easier.
The inheritance diagram for event handling is as follows:
TorCtl.EventHandler ... | bsd-3-clause | 8,087,251,978,233,838,000 | 35.483857 | 214 | 0.647083 | false |
dhocker/athomepowerlineserver | commands/group_off.py | 1 | 1500 | # -*- coding: utf-8 -*-
#
# Group off
# Copyright © 2020 Dave Hocker
#
# 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, version 3 of the License.
#
# See the LICENSE file for more details.
#
fr... | gpl-3.0 | 1,348,166,435,422,400,300 | 32.311111 | 131 | 0.581721 | false |
Impactstory/total-impact-webapp | totalimpact/providers/bibtex_lookup.py | 4 | 75780 | # from https://gist.github.com/jalavik/976294
# original XML at http://www.w3.org/Math/characters/unicode.xml
# XSL for conversion: https://gist.github.com/798546
unicode_to_latex = {
u"\u0020": "\\space ",
u"\u0023": "\\#",
u"\u0024": "\\textdollar ",
u"\u0025": "\\%",
u"\u0026": "\\&",
u... | mit | -8,222,049,051,771,480,000 | 31.069403 | 63 | 0.464595 | false |
nagyistoce/devide.johannes | extra/soappy-cvp/tests/largeDataTest.py | 6 | 1091 | #!/usr/bin/env python
# Copyright (c) 2001 actzero, inc. All rights reserved.
import sys
sys.path.insert(1, "..")
from SOAPpy import *
from SOAPpy import Parser
# Uncomment to see outgoing HTTP headers and SOAP and incoming
#Config.debug = 1
if len(sys.argv) > 1 and sys.argv[1] == '-s':
server = SOAPProxy("ht... | bsd-3-clause | 7,907,859,966,641,792,000 | 20.82 | 70 | 0.651696 | false |
pilou-/ansible | lib/ansible/modules/network/f5/bigip_device_httpd.py | 14 | 22262 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | 3,499,014,108,586,050,600 | 29.791148 | 112 | 0.597835 | false |
lxl1140989/6291-xl | uboot/u-boot-dm6291-new/tools/patman/project.py | 38 | 1415 | # Copyright (c) 2012 The Chromium OS Authors.
#
# See file CREDITS for list of people who contributed to this
# project.
#
# 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
# t... | gpl-2.0 | 7,571,335,850,475,434,000 | 31.906977 | 80 | 0.715194 | false |
openstack/nova | nova/api/openstack/urlmap.py | 3 | 11598 | # Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | -1,109,548,251,499,791,700 | 36.533981 | 79 | 0.58079 | false |
ikalnytskyi/sphinxcontrib-openapi | sphinxcontrib/openapi/renderers/_httpdomain_old.py | 1 | 2292 | """Here lies still breathing and only renderer implementation."""
from docutils.parsers.rst import directives
from . import abc
from .. import openapi20, openapi30, utils
class HttpdomainOldRenderer(abc.RestructuredTextRenderer):
option_spec = {
# A list of endpoints to be rendered. Endpoints must be w... | bsd-2-clause | -6,241,177,237,378,067,000 | 41.444444 | 79 | 0.652705 | false |
wbrefvem/openshift-ansible | roles/lib_openshift/src/class/oc_process.py | 45 | 6679 | # pylint: skip-file
# flake8: noqa
# pylint: disable=too-many-instance-attributes
class OCProcess(OpenShiftCLI):
''' Class to wrap the oc command line tools '''
# pylint allows 5. we need 6
# pylint: disable=too-many-arguments
def __init__(self,
namespace,
tname=None... | apache-2.0 | 1,284,245,469,786,527,700 | 35.102703 | 99 | 0.526426 | false |
louishust/mysql5.6.14_tokudb | storage/tokudb/mysql-test/suite/tokudb/t/change_column_char.py | 54 | 1339 | #!/usr/bin/env python
import sys
def gen_test(n):
print "CREATE TABLE t (a CHAR(%d));" % (n)
for v in [ 'hi', 'there', 'people' ]:
print "INSERT INTO t VALUES ('%s');" % (v)
for i in range(2,256):
if i < n:
print "--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/"
print "--e... | gpl-2.0 | -7,673,812,259,565,424,000 | 36.194444 | 80 | 0.563854 | false |
shipci/sympy | sympy/mpmath/functions/expintegrals.py | 47 | 11452 | from .functions import defun, defun_wrapped
@defun_wrapped
def _erf_complex(ctx, z):
z2 = ctx.square_exp_arg(z, -1)
#z2 = -z**2
v = (2/ctx.sqrt(ctx.pi))*z * ctx.hyp1f1((1,2),(3,2), z2)
if not ctx._re(z):
v = ctx._im(v)*ctx.j
return v
@defun_wrapped
def _erfc_complex(ctx, z):
if ctx.re(... | bsd-3-clause | 752,051,106,462,992,500 | 26.266667 | 79 | 0.506025 | false |
dyoung418/tensorflow | tensorflow/python/keras/_impl/keras/layers/gru_test.py | 13 | 7074 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 2,547,172,269,188,668,400 | 33.847291 | 80 | 0.630619 | false |
rocky4570/moto | tests/test_ec2/test_general.py | 8 | 1322 | from __future__ import unicode_literals
# Ensure 'assert_raises' context manager support for Python 2.6
import tests.backport_assert_raises
from nose.tools import assert_raises
import boto
import boto3
from boto.exception import EC2ResponseError
import sure # noqa
from moto import mock_ec2_deprecated, mock_ec2
@mo... | apache-2.0 | -1,740,678,909,230,594,000 | 30.47619 | 64 | 0.691377 | false |
hofmannedv/training-python | commandline/fileinfo.py | 1 | 1527 | #!/usr/bin/python
# -----------------------------------------------------------
# demonstrates how to work with commandline arguments using
# docopt (http://docopt.org/)
#
# example fileinfo program
# based my blog post here:
# http://www.stackabuse.com/python-list-files-in-a-directory/
#o
# (C) 2017 Frank Hofmann, B... | gpl-2.0 | -4,972,098,143,090,842,000 | 22.136364 | 61 | 0.607728 | false |
bennojoy/ansible | v1/ansible/utils/display_functions.py | 147 | 2184 | # (c) 2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | gpl-3.0 | 1,983,624,147,042,122,000 | 33.666667 | 125 | 0.681319 | false |
ryanvarley/ExoData | exodata/astroclasses.py | 1 | 42589 | """ Contains structural classes ie binary, star, planet etc which mimic the xml
structure with objects
"""
import sys
import math
from pkg_resources import resource_stream
import logging
import numpy as np
import astropy.coordinates
import astropy.units as u
from . import equations as eq
from . import astroquantities... | mit | 912,259,993,024,885,500 | 31.436405 | 133 | 0.583531 | false |
racker/cloud-init-debian-pkg | doc/rtd/conf.py | 6 | 2327 | import os
import sys
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../../'))
sys.path.inser... | gpl-3.0 | 8,646,082,837,422,477,000 | 30.026667 | 79 | 0.698324 | false |
linjoahow/lego_Automatic-assembly | static/Brython3.1.0-20150301-090019/Lib/unittest/util.py | 794 | 4157 | """Various utility functions."""
from collections import namedtuple, OrderedDict
__unittest = True
_MAX_LENGTH = 80
def safe_repr(obj, short=False):
try:
result = repr(obj)
except Exception:
result = object.__repr__(obj)
if not short or len(result) < _MAX_LENGTH:
return result
... | gpl-3.0 | 2,513,047,964,010,605,600 | 28.692857 | 78 | 0.520808 | false |
xyuanmu/XX-Net | python3.8.2/Lib/unittest/test/test_case.py | 6 | 73098 | import contextlib
import difflib
import pprint
import pickle
import re
import sys
import logging
import warnings
import weakref
import inspect
from copy import deepcopy
from test import support
import unittest
from unittest.test.support import (
TestEquality, TestHashing, LoggingResult, LegacyLoggingResult,
... | bsd-2-clause | 116,543,674,864,339,410 | 38.469762 | 87 | 0.591302 | false |
EdDev/vdsm | vdsm_hooks/vmfex/before_vm_migrate_destination.py | 1 | 4071 | #!/usr/bin/python2
import os
import sys
import traceback
import fcntl
from xml.dom import minidom
try:
# 3.0 compat
import libvirtconnection
libvirtconnection
except ImportError:
# 3.1 compat
from vdsm import libvirtconnection
'''
Placed in before_vm_migrate_destination
vmfex hook on migration de... | gpl-2.0 | 159,011,577,274,939,680 | 28.5 | 72 | 0.626627 | false |
Bad-ptr/parser.py | utils.py | 1 | 2870 | #!/usr/bin/env python
# coding UTF-8
# Copyright 2013 Constantin Kulikov
#
# Author: Constantin Kulikov (Bad_ptr) <zxnotdead@gmail.com>
# Date: 2013/06/21 11:21:11
# License: GPL either version 2 or any later version
import sys
def SetRecursionLimit(n=5000):
sys.setrecursionlimit(n)
def _or(smth, defv):
i... | gpl-2.0 | -5,222,678,323,707,376,000 | 29.210526 | 83 | 0.560627 | false |
nickpack/django-oscar | tests/integration/auth_tests.py | 48 | 2558 | import unittest
from django.test import TestCase
from django.contrib.auth import authenticate
from django.core import mail
from oscar.core.compat import get_user_model
User = get_user_model()
class TestEmailAuthBackend(TestCase):
def test_authenticates_multiple_users(self):
password = 'lookmanohands'
... | bsd-3-clause | -2,727,890,866,600,282,600 | 37.757576 | 79 | 0.679046 | false |
kjs73/pele | pele/systems/ljcluster.py | 3 | 4106 | import tempfile
from pele.systems import AtomicCluster
from pele.potentials import LJ
from pele.utils.xyz import write_xyz
__all__ = ["LJCluster"]
class LJCluster(AtomicCluster):
"""
define the System class for a Lennard-Jones cluster
Parameters
----------
natoms : int
See Also
... | gpl-3.0 | -6,581,285,274,451,921,000 | 28.120567 | 91 | 0.595714 | false |
abhattad4/Digi-Menu | digimenu2/tests/template_tests/filter_tests/test_floatformat.py | 345 | 4480 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from decimal import Decimal, localcontext
from unittest import expectedFailure
from django.template.defaultfilters import floatformat
from django.test import SimpleTestCase
from django.utils import six
from django.utils.safestring import mark_safe
from ... | bsd-3-clause | -3,767,065,253,179,290,600 | 40.082569 | 101 | 0.623493 | false |
Matthie456/Bon_DenDuijn | SpatialDecision/external/networkx/drawing/layout.py | 11 | 18390 | """
******
Layout
******
Node positioning algorithms for graph drawing.
"""
# Copyright (C) 2004-2015 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import collections
import networkx as nx
__author__ = """... | gpl-2.0 | -6,493,617,383,591,921,000 | 28.709208 | 94 | 0.597607 | false |
Crystalnix/house-of-life-chromium | third_party/mesa/MesaLib/src/gallium/tests/python/retrace/model.py | 32 | 5631 | #!/usr/bin/env python
##########################################################################
#
# Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
# All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files ... | bsd-3-clause | -905,560,864,577,644,400 | 25.43662 | 77 | 0.590836 | false |
shaistaansari/django | django/db/backends/oracle/features.py | 356 | 2345 | from django.db.backends.base.features import BaseDatabaseFeatures
from django.db.utils import InterfaceError
try:
import pytz
except ImportError:
pytz = None
class DatabaseFeatures(BaseDatabaseFeatures):
empty_fetchmany_value = ()
interprets_empty_strings_as_nulls = True
uses_savepoints = True
... | bsd-3-clause | 7,579,197,795,033,501,000 | 40.875 | 117 | 0.715991 | false |
hernandito/SickRage | lib/hachoir_parser/misc/msoffice.py | 74 | 31094 | """
Parsers for the different streams and fragments found in an OLE2 file.
Documents:
- goffice source code
- Microsoft Office PowerPoint 97-2007 Binary File Format (.ppt) Specification
http://download.microsoft.com/download/0/B/E/0BE8BDD7-E5E8-422A-ABFD-4342ED7AD886/PowerPoint97-2007BinaryFileFormat(ppt)Specifi... | gpl-3.0 | -7,465,347,476,470,884,000 | 39.12129 | 141 | 0.493053 | false |
rhdedgar/openshift-tools | scripts/monitoring/cron-send-create-app.py | 5 | 12893 | #!/usr/bin/env python
""" Create application check for v3 """
# We just want to see any exception that happens
# don't want the script to die under any cicumstances
# script must try to clean itself up
# pylint: disable=broad-except
# main() function has a lot of setup and error handling
# pylint: disable=too-many-st... | apache-2.0 | -8,264,265,697,865,183,000 | 30.756158 | 100 | 0.564492 | false |
toshywoshy/ansible | lib/ansible/modules/cloud/rackspace/rax_files.py | 57 | 11783 | #!/usr/bin/python
# (c) 2013, Paul Durivage <paul.durivage@rackspace.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 | -1,479,280,349,050,446,800 | 29.290488 | 98 | 0.585674 | 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.