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
anryko/ansible
lib/ansible/modules/network/fortios/fortios_log_memory_setting.py
7
8901
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
gpl-3.0
-3,691,998,271,114,214,000
28.376238
97
0.612515
false
XiaodunServerGroup/ddyedx
cms/djangoapps/contentstore/management/commands/tests/test_rollback_split_course.py
17
4146
""" Unittests for deleting a split mongo course """ import unittest from StringIO import StringIO from mock import patch from django.contrib.auth.models import User from django.core.management import CommandError, call_command from django.test.utils import override_settings from contentstore.management.commands.rollba...
agpl-3.0
1,071,065,198,228,768,400
36.690909
95
0.710323
false
plotly/python-api
packages/python/plotly/plotly/tests/test_core/test_optional_imports/test_optional_imports.py
2
1848
from __future__ import absolute_import import sys from unittest import TestCase from plotly.optional_imports import get_module class OptionalImportsTest(TestCase): def test_get_module_exists(self): import math module = get_module("math") self.assertIsNotNone(module) self.assertEqu...
mit
-6,567,751,678,211,484,000
33.867925
88
0.62987
false
elastic-coders/aiohttp
aiohttp/protocol.py
3
28891
"""Http related parsers and protocol.""" import collections import functools import http.server import re import string import sys import zlib from abc import abstractmethod, ABC from wsgiref.handlers import format_date_time from multidict import CIMultiDict, upstr import aiohttp from . import errors, hdrs from .log ...
apache-2.0
-1,479,275,159,077,733,400
30.609409
79
0.567235
false
alex/raven
raven/contrib/django/models.py
1
7491
""" raven.contrib.django.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Acts as an implicit hook for Django installs. :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import sys import logging import warnings ...
bsd-3-clause
5,755,710,240,139,443,000
34.671429
141
0.596049
false
walac/servo
tests/wpt/css-tests/tools/pywebsocket/src/test/test_endtoend.py
449
26811
#!/usr/bin/env python # # Copyright 2012, 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...
mpl-2.0
8,010,455,882,783,258,000
34.605578
79
0.597591
false
chaitanyanettem/justcompare
crawlers/bookadda.py
1
2941
#! /usr/bin/python import requests from bs4 import BeautifulSoup import re import sys reload(sys) sys.setdefaultencoding("utf-8") var=requests.get("http://www.bookadda.com") soup=BeautifulSoup(var.text) find1=soup.find('ul',{"class":"left_menu"}) f=open("bookaddalinks.txt",'w') for link in find1.find_all('a'): f.w...
mit
137,602,020,588,102,460
24.353448
81
0.66712
false
eaplatanios/tensorflow
tensorflow/python/ops/math_grad_test.py
22
8339
# 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,503,847,858,013,544,000
38.334906
80
0.64768
false
kingofkosmos/-tg-station
tools/dmi/merge_driver.py
15
6601
#!/usr/bin/env python3 import sys import dmi from hooks.merge_frontend import MergeDriver def images_equal(left, right): if left.size != right.size: return False w, h = left.size left_load, right_load = left.load(), right.load() for y in range(0, h): for x in range(0, w): l...
agpl-3.0
-1,540,351,938,570,416,000
35.469613
102
0.572186
false
yaroslavvb/tensorflow
tensorflow/python/ops/variables.py
11
48817
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-7,623,984,777,921,595,000
36.350421
104
0.673229
false
potato/searx
searx/engines/google_news.py
1
2179
""" Google (News) @website https://news.google.com @provide-api no @using-api no @results HTML @stable no @parse url, title, content, publishedDate """ from lxml import html from searx.engines.google import _fetch_supported_languages, supported_languages_url from searx.url_utils import ur...
agpl-3.0
-5,258,567,377,346,930,000
24.940476
99
0.557136
false
pacoqueen/bbinn
formularios/consulta_ventas_solo_tickets.py
1
29443
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2005-2008 Francisco José Rodríguez Bogado # # (pacoqueen@users.sourceforge.net) # # ...
gpl-2.0
-5,828,332,349,387,962,000
49.400685
121
0.45828
false
ClovisIRex/Snake-django
env/lib/python3.6/site-packages/django/contrib/gis/geoip/prototypes.py
23
3950
from ctypes import POINTER, Structure, c_char_p, c_float, c_int, string_at from django.contrib.gis.geoip.libgeoip import free, lgeoip # #### GeoIP C Structure definitions #### class GeoIPRecord(Structure): _fields_ = [('country_code', c_char_p), ('country_code3', c_char_p), ('cou...
mit
3,635,958,867,324,466,000
28.924242
87
0.642532
false
gisce/OCB
addons/project_long_term/project_long_term.py
33
16612
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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
2,322,893,762,959,771,000
48.147929
249
0.574524
false
VagrantApe/flaskMicroblog
venv/lib/python2.7/site-packages/sqlalchemy/orm/dynamic.py
14
13297
# orm/dynamic.py # Copyright (C) 2005-2013 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 """Dynamic collection API. Dynamic collections act like Query() objects for read opera...
bsd-3-clause
5,436,517,407,666,871,000
35.732044
84
0.590058
false
supasate/word_prediction
Chapter9/9-2-last-word-solution.py
1
1531
# เติมโค้ดในลูป while เพื่อหาคำสุดท้ายก่อนกด tab def add_to_corpus_index(key, next_word, corpus_index): if key not in corpus_index: corpus_index[key] = {next_word: 1} else: if next_word in corpus_index[key]: corpus_index[key][next_word] += 1 else: corpus_index...
gpl-2.0
-8,018,980,096,616,991,000
26.584906
66
0.594798
false
nikolas/lettuce
tests/integration/lib/Django-1.3/tests/regressiontests/forms/tests/regressions.py
50
7623
# -*- coding: utf-8 -*- from django.forms import * from django.utils.unittest import TestCase from django.utils.translation import ugettext_lazy, activate, deactivate from regressiontests.forms.models import Cheese class FormsRegressionsTestCase(TestCase): def test_class(self): # Tests to prevent against...
gpl-3.0
2,418,460,780,438,430,000
51.537931
634
0.614597
false
jmesteve/asterisk
openerp/addons/point_of_sale/report/pos_details_summary.py
22
5615
# -*- 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
-256,121,992,597,838,100
41.537879
147
0.500801
false
mikedchavez1010/XX-Net
python27/1.0/lib/linux/gevent/pool.py
10
10938
# Copyright (c) 2009-2010 Denis Bilenko. See LICENSE for details. """Managing greenlets in a group. The :class:`Group` class in this module abstracts a group of running greenlets. When a greenlet dies, it's automatically removed from the group. The :class:`Pool` which a subclass of :class:`Group` provides a way to li...
bsd-2-clause
4,883,216,611,447,424,000
30.251429
132
0.582191
false
ReachingOut/unisubs
apps/search/management/commands/test_index_updating.py
5
9879
import datetime import os import warnings from optparse import make_option from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.management.base import AppCommand from django.db import reset_queries from django.utils.encoding import smart_str from haystack.query impor...
agpl-3.0
-2,266,424,624,772,414,200
37.589844
148
0.564936
false
anomen-s/programming-challenges
cryptopals.com/0028-Implement_a_SHA-1_keyed_MAC/solve.py
1
1113
#!/usr/bin/python3 # -*- coding: utf-8 -*- ''' Find a SHA-1 implementation in the language you code in. Don't cheat. It won't work. Do not use the SHA-1 implementation your language already provides (for instance, don't use the "Digest" library in Ruby, or call OpenSSL; in Ruby, you'd want a pure-Ruby SHA-1). Write ...
gpl-2.0
3,714,231,680,255,034,000
25.5
179
0.69991
false
adelez/grpc
test/cpp/qps/gen_build_yaml.py
8
4953
#!/usr/bin/env python2.7 # Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
1,334,594,554,751,711,700
38.943548
123
0.656774
false
Yong-Lee/django
tests/forms_tests/tests/test_regressions.py
155
8024
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.forms import ( CharField, ChoiceField, Form, HiddenInput, IntegerField, ModelForm, ModelMultipleChoiceField, MultipleChoiceField, RadioSelect, Select, TextInput, ) from django.test import TestCase, ignore_warnings from django.utils...
bsd-3-clause
9,189,782,802,573,337,000
51.756579
660
0.619279
false
cchurch/ansible
lib/ansible/modules/cloud/amazon/aws_direct_connect_link_aggregation_group.py
31
18136
#!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = """ --- module...
gpl-3.0
2,748,808,126,453,630,500
38.77193
150
0.616012
false
TheWardoctor/Wardoctors-repo
script.module.uncoded/lib/resources/lib/sources/en/vodly.py
7
4367
# -*- coding: utf-8 -*- ''' Covenant Add-on This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This prog...
apache-2.0
8,471,458,873,157,305,000
36.655172
107
0.479963
false
uranusjr/django
django/conf/locale/sv/formats.py
65
1502
# This file is distributed under the same license as the Django package. # # 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' DATETIME_FORMAT = 'j F Y H:i' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT ...
bsd-3-clause
-1,819,124,622,075,204,600
38.526316
77
0.531292
false
Edraak/edx-platform
common/lib/xmodule/xmodule/capa_base.py
1
61702
"""Implements basics of Capa, including class CapaModule.""" import cgi import copy import datetime import hashlib import json import logging import os import traceback import struct import sys import re # We don't want to force a dependency on datadog, so make the import conditional try: import dogstats_wrapper a...
agpl-3.0
-303,898,433,642,524,000
40.718729
128
0.589203
false
ppribeli/AliPhysics
PWGJE/EMCALJetTasks/Tracks/analysis/model/SpectrumSmearer.py
41
3661
#************************************************************************** #* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * #* * #* Author: The ALICE Off-line Project. * #* Contributors ...
bsd-3-clause
4,986,825,241,472,757,000
45.948718
144
0.572521
false
RedhawkSDR/integration-gnuhawk
qa/gnuradio/gr/gnuradioStubs.py
1
2524
# # This file is protected by Copyright. Please refer to the COPYRIGHT file # distributed with this source distribution. # # This file is part of GNUHAWK. # # GNUHAWK is free software: you can redistribute it and/or modify is under the # terms of the GNU General Public License as published by the Free Software # F...
gpl-3.0
7,415,971,519,017,984,000
30.160494
89
0.634707
false
rkerr/trigger
trigger/utils/notifications/events.py
13
4682
# -*- coding: utf-8 -*- """ Event objects for the notification system. These are intended to be used within event handlers such as `~trigger.utils.notifications.handlers.email_handler()`. If not customized within :setting:`NOTIFICATION_HANDLERS`, the default notification type is an `~trigger.utils.notification.event...
bsd-3-clause
1,953,765,810,662,148,000
32.205674
79
0.643315
false
cataliniordache/Human-Computer-Interaction-Project
RestfulServices/flask/lib/python2.7/site-packages/sqlalchemy/dialects/sybase/pysybase.py
33
3208
# sybase/pysybase.py # Copyright (C) 2010-2014 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: sybase+pysybase :name: Python-Sybase :dbapi: Sybase ...
apache-2.0
-2,440,013,475,347,256,300
30.45098
77
0.64308
false
manqala/erpnext
erpnext/accounts/doctype/gl_entry/test_gl_entry.py
59
1071
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, unittest from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry class TestGLEntry(unittest.TestCase): ...
gpl-3.0
2,069,813,287,503,580,400
41.84
101
0.701214
false
PW-Sat2/PWSat2OBC
integration_tests/emulator/comm_zmq_adapter.py
1
5457
from Queue import Empty from threading import Thread from time import sleep import numpy as np import logging import zmq import devices from utils import ensure_string class ZeroMQAdapter(object): def __init__(self, comm, grc_uplink_address="tcp://localhost:7002", grc_downlink_address="tcp://localhos...
agpl-3.0
2,325,925,191,792,811,000
33.206452
147
0.573575
false
zlz3907/TextLineProcessor
WordXmlParse.py
1
2778
#! /usr/bin/python # -*- coding: utf-8 -*- import re; import sys; import os; textre = re.compile("\!\[CDATA\[(.*?)\]\]", re.DOTALL); def get_text(xml): match = re.search(textre, xml); if not match: return xml; return match.group(1); def get_elements(xml, elem): p = re.compile("<" + elem + ">"...
gpl-2.0
7,371,378,503,153,240,000
31.682353
149
0.551836
false
molmod/zeobuilder
zeobuilder/conversion.py
1
3834
# -*- coding: utf-8 -*- # Zeobuilder is an extensible GUI-toolkit for molecular model construction. # Copyright (C) 2007 - 2012 Toon Verstraelen <Toon.Verstraelen@UGent.be>, Center # for Molecular Modeling (CMM), Ghent University, Ghent, Belgium; all rights # reserved unless otherwise stated. # # This file is part of Z...
gpl-3.0
5,270,994,180,194,587,000
33.232143
94
0.666927
false
kkh029/Alchemy
Alchemy/cocos2d/tools/particle/convert_YCoordFlipped.py
89
2224
#!/usr/bin/python #ConvertYCoordFlipped.py import plistlib import os.path import argparse import glob import shutil #keys in dictionary metaDataKey = 'metaData' yCoordFlippedConvertedKey = 'yCoordFlippedConverted' yCoordFlippedKey = 'yCoordFlipped' #check if the particle file has been converted def checkFlippedConve...
apache-2.0
2,073,751,205,354,912,300
32.19403
104
0.653777
false
ax333l/QuoteBook
QuoteBook/sqv.py
1
3777
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'sqw.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Quote(object): def setupUi(self, Quote): Quote.setObjectName("Qu...
gpl-3.0
-3,819,692,273,131,843,600
43.964286
114
0.709823
false
wndias/bc.repository
script.module.urlresolver/lib/urlresolver/plugins/videohut.py
4
2399
""" urlresolver XBMC Addon Copyright (C) 2011 t0mm0 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
gpl-2.0
-2,883,219,360,068,812,000
33.768116
104
0.599833
false
hogarthj/ansible
lib/ansible/module_utils/urls.py
2
42462
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
-8,998,292,204,771,442,000
39.020735
159
0.608426
false
indirectlylit/kolibri
kolibri/core/discovery/test/test_network_utils.py
3
6974
import mock import requests from django.test import TestCase from ..utils.network import errors from ..utils.network.client import NetworkClient from ..utils.network.urls import get_normalized_url_variations from .helpers import mock_request class TestURLParsing(TestCase): def test_valid_ipv4_address(self): ...
mit
6,434,617,876,978,015,000
38.851429
87
0.582162
false
martin-craig/Airtime
python_apps/media-monitor2/mm2.py
2
1082
# -*- coding: utf-8 -*- import sys import os from media.saas.launcher import setup_global, launch_instance, setup_logger from media.monitor.config import MMConfig def main(global_config, api_client_config, log_config): """ function to run hosted install """ mm_config = MMConfig(global_config) log = setup_l...
gpl-3.0
3,662,404,555,866,349,600
30.823529
76
0.610906
false
Azure/azure-sdk-for-python
sdk/purview/azure-mgmt-purview/azure/mgmt/purview/_purview_management_client.py
1
4032
# 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 may ...
mit
852,259,387,275,462,700
44.303371
129
0.696429
false
mattclay/ansible
lib/ansible/plugins/strategy/linear.py
23
22994
# (c) 2012-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) an...
gpl-3.0
-7,116,970,976,261,657,000
48.663067
158
0.535488
false
pgmillon/ansible
test/units/modules/network/f5/test_bigip_gtm_monitor_https.py
38
5285
# -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest import sys if sys.version_info < (2...
gpl-3.0
-6,726,853,901,930,371,000
30.088235
100
0.613056
false
axant/tgext.ecommerce
tgext/ecommerce/lib/utils.py
1
2806
import os import re, unicodedata import tg import gettext import math import inspect class NoDefault(object): """A dummy value used for parameters with no default.""" def slugify(value, type, models): if isinstance(value, dict): for k, v in value.iteritems(): key = k value = ...
mit
-6,032,980,646,917,515,000
26.242718
102
0.609052
false
Titulacion-Sistemas/PythonTitulacion-EV
Lib/site-packages/setuptools/command/setopt.py
285
5068
import distutils, os from setuptools import Command from distutils.util import convert_path from distutils import log from distutils.errors import * __all__ = ['config_file', 'edit_config', 'option_base', 'setopt'] def config_file(kind="local"): """Get the filename of the distutils, local, global, or per-user co...
mit
1,237,312,805,263,218,200
29.902439
79
0.564128
false
alxgu/ansible
lib/ansible/modules/cloud/openstack/os_user_facts.py
31
4544
#!/usr/bin/python # Copyright (c) 2016 Hewlett-Packard Enterprise Corporation # 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
-8,205,428,068,561,136,000
27.223602
125
0.615757
false
danic85/virtual_assistant
behaviours/tests/test_translator.py
2
2268
import datetime, unittest import os, sys from mock import Mock, call, patch from lib import feeds import re from behaviours import translator import json class TestTranslatorMethods(unittest.TestCase): def test_translate(self): path = os.path.dirname(os.path.realpath(__file__)) + '/testdata/translator_get...
gpl-3.0
-6,075,521,644,142,404,000
44.36
122
0.621693
false
epiphany27/NewsBlur
vendor/paypal/standard/ipn/django_migrations/0001_initial.py
18
10862
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='PayPalIPN', fields=[ ('id', models.AutoField(ve...
mit
6,403,795,892,620,220,000
80.059701
156
0.60394
false
mlperf/training_results_v0.5
v0.5.0/google/cloud_v2.8/ssd-tpuv2-8/code/ssd/model/tpu/models/experimental/resnet50_keras/resnet_preprocessing.py
5
6831
# 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
4,520,869,185,446,289,000
36.125
80
0.659054
false
mscuthbert/abjad
abjad/tools/selectiontools/test/test_selectiontools_Selection__all_are_components_in_same_logical_voice.py
2
46366
# -*- encoding: utf-8 -*- import pytest from abjad import * Component = scoretools.Component Selection = selectiontools.Selection def test_selectiontools_Selection__all_are_components_in_same_logical_voice_01(): r'''Unincorporated leaves do not share a logical voice. Unicorporated leaves do not share a root c...
gpl-3.0
5,712,929,182,451,938,000
23.795187
81
0.462429
false
samthor/intellij-community
python/lib/Lib/anydbm.py
171
2620
"""Generic interface to all dbm clones. Instead of import dbm d = dbm.open(file, 'w', 0666) use import anydbm d = anydbm.open(file, 'w') The returned object is a dbhash, gdbm, dbm or dumbdbm object, dependent on the type of database being opened (determined by whichdb module) in the...
apache-2.0
7,072,292,880,655,320,000
30.566265
70
0.629389
false
bbondy/brianbondy.gae
libs/markdown/extensions/toc.py
1
5238
""" Table of Contents Extension for Python-Markdown * * * (c) 2008 [Jack Miller](http://codezen.org) Dependencies: * [Markdown 2.0+](http://www.freewisdom.org/projects/python-markdown/) """ import markdown from markdown import etree import re class TocTreeprocessor(markdown.treeprocessors.Treeprocesso...
mit
3,385,228,535,645,483,500
35.414286
90
0.461245
false
0nse/WikiWho
functions/print.py
1
8966
#!/usr/bin/python # -*- coding: utf-8 -*- ''' @author: Maribel Acosta @author: Fabian Floeck @author: Michael Ruster ''' import csv import re import functions.TextPostProcessing as TextPostProcessing import functions.WarningTemplates as WarningTemplates import BlockTimeCalculation from datetime import datetime def w...
mit
-8,569,177,056,360,458,000
58.773333
323
0.651684
false
johannmeyer/bepoppy8
start.py
12
16455
#!/usr/bin/env python from __future__ import print_function import pygtk import gtk pygtk.require('2.0') import os import shutil import datetime from fnmatch import fnmatch import subprocess class ConfChooser(object): # General Functions def update_combo(self, combo, clist, active): combo.set_se...
gpl-2.0
-494,693,842,779,647,900
37.5363
160
0.611911
false
Ardesco/selenium
py/test/selenium/webdriver/common/clear_tests.py
8
2547
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
-3,649,479,012,932,000,300
34.873239
67
0.753828
false
tpfanco/tpfanco-admin
src/tpfanco_admin/thermometer.py
1
23240
#! /usr/bin/python2.7 # -*- coding: utf-8 -*- # # tpfanco - controls the fan-speed of IBM/Lenovo ThinkPad Notebooks # Copyright (C) 2011-2015 Vladyslav Shtabovenko # Copyright (C) 2007-2009 Sebastian Urban # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General P...
gpl-3.0
550,347,924,536,000,960
37.991611
170
0.545764
false
tinkerinestudio/Tinkerine-Suite
TinkerineSuite/python/Lib/numpy/polynomial/tests/test_chebyshev.py
24
18772
"""Tests for chebyshev module. """ from __future__ import division import numpy as np import numpy.polynomial.chebyshev as ch from numpy.testing import * def trim(x) : return ch.chebtrim(x, tol=1e-6) T0 = [ 1] T1 = [ 0, 1] T2 = [-1, 0, 2] T3 = [ 0, -3, 0, 4] T4 = [ 1, 0, -8, 0, 8] T5 = [ 0, 5, ...
agpl-3.0
-8,891,690,994,955,280,000
31.933333
74
0.490038
false
Matt-Deacalion/django
django/db/backends/oracle/schema.py
404
5313
import binascii import copy import datetime import re from django.db.backends.base.schema import BaseDatabaseSchemaEditor from django.db.utils import DatabaseError from django.utils import six from django.utils.text import force_text class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): sql_create_column = "ALT...
bsd-3-clause
-3,667,363,436,779,995,600
41.846774
109
0.599661
false
bzero/bitex
libs/coinkit/coinkit/wallet.py
10
1797
# -*- coding: utf-8 -*- """ Coinkit ~~~~~ :copyright: (c) 2014 by Halfmoon Labs :license: MIT, see LICENSE for more details. """ from inspect import isclass from .keypair import * from .passphrase import random_256bit_passphrase, random_160bit_passphrase def is_cryptocurrency_keypair_class(cls): ...
gpl-3.0
3,935,177,284,706,575,000
27.078125
80
0.62493
false
Snifer/BurpSuite-Plugins
Sqlmap/tamper/versionedkeywords.py
7
1619
#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import os import re from lib.core.common import singleTimeWarnMessage from lib.core.data import kb from lib.core.enums import DBMS from lib.core.enums import PRIORITY __prio...
gpl-2.0
-3,362,810,754,961,801,700
30.134615
167
0.621989
false
alrusdi/lettuce
tests/integration/lib/Django-1.2.5/django/template/debug.py
66
3732
from django.template import Lexer, Parser, tag_re, NodeList, VariableNode, TemplateSyntaxError from django.utils.encoding import force_unicode from django.utils.html import escape from django.utils.safestring import SafeData, EscapeData from django.utils.formats import localize class DebugLexer(Lexer): def __init_...
gpl-3.0
-3,560,336,711,352,880,600
35.950495
104
0.617095
false
abstract-open-solutions/server-tools
auth_from_http_remote_user/controllers/main.py
41
4132
# -*- coding: utf-8 -*- ############################################################################## # # Author: Laurent Mignon # Copyright 2014 'ACSONE SA/NV' # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
agpl-3.0
4,125,079,077,474,999,300
36.563636
78
0.566796
false
coderbone/SickRage-alt
lib/github/Installation.py
7
3318
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2017 Jannis Gebauer <ja.geb@me.com> # # ...
gpl-3.0
-3,986,348,241,516,680,000
43.24
129
0.519289
false
jeromecc/doctoctocbot
src/doctocnet/urls.py
1
2933
"""doctocnet URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-bas...
mpl-2.0
5,711,828,462,308,200,000
39.191781
82
0.69792
false
madjelan/scikit-learn
sklearn/preprocessing/data.py
113
56747
# 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> # License: BSD 3 clause from itertools import chain, combina...
bsd-3-clause
-4,107,546,275,149,958,000
34.961343
79
0.596278
false
dmsimard/ansible
test/support/network-integration/collections/ansible_collections/vyos/vyos/plugins/module_utils/network/vyos/facts/legacy/base.py
47
4455
# -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ The VyOS interfaces fact class It is in this file the configuration is collected from the device for a given resource, parsed, and the facts tree is populated based on the ...
gpl-3.0
-6,870,016,707,213,944,000
26.5
82
0.554658
false
hypothesis/via
via/views/index.py
1
1231
from urllib.parse import urlparse from pyramid.httpexceptions import HTTPFound, HTTPNotFound from pyramid.view import view_config, view_defaults from via.views._helpers import url_from_user_input from via.views.exceptions import BadURL @view_defaults(route_name="index") class IndexViews: def __init__(self, requ...
mit
-6,898,440,605,195,098,000
29.02439
82
0.632006
false
pculture/unisubs
apps/auth/forms.py
1
10180
# Amara, universalsubtitles.org # # Copyright (C) 2013 Participatory Culture Foundation # # 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 Free Software Foundation, either version 3 of the # License, or (at your op...
agpl-3.0
3,850,146,727,500,721,000
39.07874
361
0.651179
false
nzavagli/UnrealPy
UnrealPyEmbed/Source/Python/Lib/python27/bdb.py
144
21714
"""Debugger basics""" import fnmatch import sys import os import types __all__ = ["BdbQuit","Bdb","Breakpoint"] class BdbQuit(Exception): """Exception to give up completely""" class Bdb: """Generic Python debugger base class. This class takes care of details of the trace facility; a derived class...
mit
-4,463,587,018,124,405,000
32.665116
80
0.565856
false
CongLi/avocado-vt
virttest/libvirt_vm.py
2
106547
""" Utility classes and functions to handle Virtual Machine creation using libvirt. :copyright: 2011 Red Hat Inc. """ import time import string import os import logging import fcntl import re import shutil import tempfile import platform import aexpect from avocado.utils import process from avocado.utils import cryp...
gpl-2.0
1,462,767,513,350,247,000
38.652773
95
0.50343
false
frank10704/DF_GCS_W
MissionPlanner-master/packages/IronPython.StdLib.2.7.5-beta1/content/Lib/distutils/command/upload.py
54
7196
"""distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to PyPI).""" import os import socket import platform from urllib2 import urlopen, Request, HTTPError from base64 import standard_b64encode import urlparse import cStringIO as StringIO from hashlib import md5 from dist...
gpl-3.0
6,220,134,591,047,154,000
35.092784
84
0.523346
false
dasbruns/netzob
src/netzob/Common/Models/Vocabulary/UnknownSymbol.py
1
4213
#-*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocols...
gpl-3.0
-3,731,605,200,047,863,300
49.071429
118
0.401569
false
beni55/fuzzywuzzy
fuzzywuzzy/utils.py
11
1841
from __future__ import unicode_literals import sys from fuzzywuzzy.string_processing import StringProcessor PY3 = sys.version_info[0] == 3 def validate_string(s): try: return len(s) > 0 except TypeError: return False bad_chars = str("").join([chr(i) for i in range(128, 256)]) # ascii damm...
mit
-3,890,460,486,203,452,000
24.219178
94
0.646388
false
ep1cman/workload-automation
wlauto/core/workload.py
5
4009
# Copyright 2014-2015 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
-1,382,920,389,298,044,000
35.445455
117
0.678224
false
cesc-park/CRCN
entity/grid_adder_to_data.py
1
2515
#import entity_grid from entity_grid import * from parsetree import * import svm as disvm import json import pickle import os import re # from easydict import EDict as edict # args = edict() # args.jobs = 1 # args.mem = 10 args={} args['jobs']=1 args['mem']=10 args['parser']="./stanford-parser/stanford-parser.jar" arg...
mit
6,804,309,223,777,282,000
32.533333
86
0.710537
false
eptmp3/Sick-Beard
lib/enzyme/__init__.py
168
2414
# -*- coding: utf-8 -*- # enzyme - Video metadata parser # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # Copyright 2003-2006 Thomas Schueppel <stain@acm.org> # Copyright 2003-2006 Dirk Meyer <dischi@freevo.org> # # This file is part of enzyme. # # enzyme is free software; you can redistribute it and/or mod...
gpl-3.0
-7,684,311,634,599,901,000
37.31746
112
0.63256
false
GheRivero/ansible
lib/ansible/modules/storage/netapp/na_ontap_snapshot.py
9
11805
#!/usr/bin/python # (c) 2018, NetApp, 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', 'status': ['preview'], ...
gpl-3.0
-8,601,633,392,368,216,000
36.00627
78
0.607963
false
fossoult/odoo
openerp/modules/loading.py
59
21202
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
agpl-3.0
-9,123,584,312,455,142,000
44.792657
147
0.585652
false
bitifirefly/edx-platform
common/djangoapps/third_party_auth/tests/utils.py
112
3037
"""Common utility for testing third party oauth2 features.""" import json import httpretty from provider.constants import PUBLIC from provider.oauth2.models import Client from social.apps.django_app.default.models import UserSocialAuth from student.tests.factories import UserFactory from .testutil import ThirdParty...
agpl-3.0
7,993,860,910,750,778,000
34.729412
106
0.65591
false
HiSPARC/station-software
user/python/Lib/test/test_rfc822.py
23
9461
import unittest from test import test_support rfc822 = test_support.import_module("rfc822", deprecated=True) try: from cStringIO import StringIO except ImportError: from StringIO import StringIO class MessageTestCase(unittest.TestCase): def create_message(self, msg): return rfc822.Message(String...
gpl-3.0
-5,079,569,641,768,560,000
34.973384
83
0.511997
false
Carmezim/tensorflow
tensorflow/contrib/learn/python/learn/estimators/estimator.py
5
55283
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-3,583,087,863,066,493,000
39.060145
85
0.647667
false
Carmezim/tensorflow
tensorflow/contrib/learn/python/learn/estimators/constants.py
79
1657
# 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,308,207,534,595,430,400
35.822222
80
0.723597
false
CSC301H-Fall2013/JuakStore
site-packages/build/lib/django/test/testcases.py
31
46782
from __future__ import unicode_literals import difflib import json import os import re import sys from copy import copy from functools import wraps try: from urllib.parse import urlsplit, urlunsplit except ImportError: # Python 2 from urlparse import urlsplit, urlunsplit import select import socket import ...
mit
-5,334,973,799,821,270,000
38.713073
95
0.595058
false
heeraj123/oh-mainline
mysite/search/migrations/0023_re_run_icon_scaling.py
17
3768
# This file is part of OpenHatch. # Copyright (C) 2009 OpenHatch, Inc. # Copyright (C) 2010 John Stumpo # # 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 Free Software Foundation, either version 3 of the License, ...
agpl-3.0
6,100,514,415,757,253,000
56.090909
145
0.600584
false
beni55/django
django/contrib/gis/db/backends/base/features.py
93
3542
from functools import partial from django.contrib.gis.db.models import aggregates class BaseSpatialFeatures(object): gis_enabled = True # Does the database contain a SpatialRefSys model to store SRID information? has_spatialrefsys_table = True # Does the backend support the django.contrib.gis.utils...
bsd-3-clause
8,129,816,045,216,632,000
39.25
94
0.698758
false
NullSoldier/django
tests/app_loading/tests.py
288
3113
from __future__ import unicode_literals import os from django.apps import apps from django.test import SimpleTestCase from django.test.utils import extend_sys_path from django.utils import six from django.utils._os import upath class EggLoadingTest(SimpleTestCase): def setUp(self): self.egg_dir = '%s/e...
bsd-3-clause
3,025,583,041,404,805,600
39.428571
104
0.631224
false
dcosentino/edx-platform
lms/djangoapps/instructor/features/bulk_email.py
116
6813
""" Define steps for bulk email acceptance test. """ # pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step from lettuce.django import mail from nose.tools import assert_in, assert_equal # pylint: disable=no-name-in-module from django.core.management import call_co...
agpl-3.0
1,059,806,733,838,365,600
33.760204
95
0.662704
false
arenadata/ambari
ambari-server/src/main/resources/stacks/ADH/1.0/services/HBASE/package/scripts/hbase_thrift_server.py
2
1815
""" 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 this ...
apache-2.0
5,258,600,867,936,863,000
28.754098
72
0.748209
false
archyufa/CloudFerry
condensation/group.py
9
3406
# Copyright (c) 2014 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
apache-2.0
-6,634,275,360,245,546,000
32.067961
76
0.558133
false
maggienj/ActiveData
mo_kwargs/__init__.py
2
5140
# encoding: utf-8 # # # 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/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import from __f...
mpl-2.0
1,860,166,450,715,781,600
41.833333
132
0.581712
false
aisipos/django
tests/forms_tests/field_tests/test_filepathfield.py
22
5261
from __future__ import unicode_literals import os.path from django.forms import FilePathField, ValidationError, forms from django.test import SimpleTestCase from django.utils import six from django.utils._os import upath def fix_os_paths(x): if isinstance(x, six.string_types): return x.replace('\\', '/'...
bsd-3-clause
-9,056,186,808,816,731,000
42.479339
105
0.568713
false
huchoi/edx-platform
common/lib/xmodule/xmodule/modulestore/__init__.py
2
25982
""" This module provides an abstraction for working with XModuleDescriptors that are stored in a database an accessible using their Location as an identifier """ import logging import re import json import datetime from uuid import uuid4 from collections import namedtuple, defaultdict import collections from contextl...
agpl-3.0
2,479,555,446,968,764,400
36.655072
125
0.635748
false
cloudbau/cinder
cinder/tests/api/contrib/test_services.py
5
11428
# Copyright 2012 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,891,467,860,855,571,000
40.256318
78
0.485999
false
ToonTownInfiniteRepo/ToontownInfinite
Panda3D-1.9.0/python/Lib/idlelib/ToolTip.py
149
2736
# general purpose 'tooltip' routines - currently unused in idlefork # (although the 'calltips' extension is partly based on this code) # may be useful for some purposes in (or almost in ;) the current project scope # Ideas gleaned from PySol from Tkinter import * class ToolTipBase: def __init__(self, button): ...
mit
-5,969,421,013,412,277,000
29.741573
79
0.597588
false
finfish/scrapy
scrapy/extensions/telnet.py
3
4136
""" Scrapy Telnet Console extension See documentation in docs/topics/telnetconsole.rst """ import pprint import logging import traceback import binascii import os from twisted.internet import protocol try: from twisted.conch import manhole, telnet from twisted.conch.insults import insults TWISTED_CONCH_A...
bsd-3-clause
-291,099,699,059,808,100
34.050847
89
0.633221
false
jcftang/ansible
lib/ansible/modules/packaging/os/opkg.py
37
5435
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Patrick Pelletier <pp.pelletier@gmail.com> # Based on pacman (Afterburn) and pkgin (Shaun Zinck) modules # # This module 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 Softwa...
gpl-3.0
462,583,859,360,711,400
27.605263
194
0.611592
false
glenn-edgar/local_controller_3
__backup__/python_2_ref/moisture_monitoring.py
1
11106
# external control import datetime import time import string #import urllib2 import math import redis import base64 import json import py_cf.cf_interpreter import os import copy import rabbit_cloud_status_publish import io_control class Moisture_Control(object): def __init__(self, redis_handle , graph_managem...
mit
5,362,178,034,049,720,000
37.034247
157
0.622186
false
pbrod/scipy
scipy/io/netcdf.py
15
37687
""" NetCDF reader/writer module. This module is used to read and create NetCDF files. NetCDF files are accessed through the `netcdf_file` object. Data written to and from NetCDF files are contained in `netcdf_variable` objects. Attributes are given as member variables of the `netcdf_file` and `netcdf_variable` objects...
bsd-3-clause
3,944,973,118,587,882,000
34.926597
103
0.571125
false
BT-ojossen/odoo
addons/payment_paypal/tests/test_paypal.py
378
11126
# -*- coding: utf-8 -*- from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.addons.payment.tests.common import PaymentAcquirerCommon from openerp.addons.payment_paypal.controllers.main import PaypalController from openerp.tools import mute_logger from lxml import objectify import u...
agpl-3.0
-700,531,705,549,833,900
44.975207
166
0.583498
false