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
mvdbeek/tools-iuc
tools/gemini/test-data/util/shrink_simple_tab.py
20
1807
from __future__ import print_function import argparse from functools import partial def keep_line(line, pos_cols, region): fields = line.rstrip().split(b'\t') if fields[pos_cols[0]] == region[0]: # same chromosome if ( region[1] < int(fields[pos_cols[1]]) < region[2] ) or ( ...
mit
-4,119,085,635,227,968,000
28.622951
79
0.540675
false
pselle/calibre
src/calibre/gui2/dbus_export/menu2.py
14
2317
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>' # A implementation of the GMenuModel export of menus/actions on DBus. # GMen...
gpl-3.0
3,266,502,129,737,561,600
35.203125
157
0.682348
false
lmyrefelt/CouchPotatoServer
couchpotato/core/providers/torrent/iptorrents/main.py
9
4032
from bs4 import BeautifulSoup from couchpotato.core.helpers.encoding import tryUrlencode from couchpotato.core.helpers.variable import tryInt from couchpotato.core.logger import CPLog from couchpotato.core.providers.torrent.base import TorrentProvider import traceback log = CPLog(__name__) class IPTorrents(TorrentPr...
gpl-3.0
-63,768,485,972,955,140
38.145631
182
0.497272
false
miipl-naveen/optibizz
addons/account_check_writing/__openerp__.py
313
1808
# -*- 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
-1,026,328,510,826,246,800
38.304348
78
0.583518
false
jeffreyliu3230/osf.io
scripts/migrate_piwik_base_nodes.py
49
1670
#!/usr/bin/env python # -*- coding: utf-8 -*- """Update Piwik for nodes that were forked, registered or templated prior to October 2014. """ import datetime import logging import sys import time from modularodm import Q from framework.analytics.piwik import _update_node_object from scripts import utils as scripts_ut...
apache-2.0
-6,310,000,734,647,020,000
27.793103
81
0.623353
false
simonz05/django-notice
notice/views.py
1
1542
try: import uwsgi except ImportError: pass # raise ImportError('uWSGI is required to run this package') from django.contrib.auth.decorators import login_required, user_passes_test from django.http import HttpResponse from django.template import RequestContext from django.utils.functional import Promise from...
bsd-3-clause
-7,363,368,681,692,120,000
26.535714
75
0.677691
false
dirkx/AccesSystem
lib-python/AlertEmail.py
1
2771
#!/usr/bin/env python3.4 # import sys import uuid import smtplib import time import logging from email.mime.text import MIMEText from ACNode import ACNode class AlertEmail(ACNode): default_smtphost = 'localhost' default_smtpport = 25 default_alertsubject = "[Node alert]" default_alertfrom = 'acnode@unknown' ...
apache-2.0
3,378,468,933,549,891,600
30.850575
98
0.635511
false
ChrisAntaki/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/newstringio.py
132
1757
# Copyright (C) 2010 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 ...
bsd-3-clause
6,673,797,447,390,772,000
44.051282
72
0.766079
false
aperigault/ansible
lib/ansible/modules/network/fortios/fortios_wireless_controller_utm_profile.py
19
10162
#!/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
-8,122,677,758,812,564,000
31.158228
105
0.590238
false
rbaumg/trac
trac/wiki/admin.py
1
12181
# -*- coding: utf-8 -*- # # Copyright (C) 2008-2019 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.com/license.html. # # This software consists ...
bsd-3-clause
4,286,486,528,596,987,000
41.148789
79
0.523767
false
divio/django
django/contrib/contenttypes/fields.py
73
22873
from __future__ import unicode_literals from collections import defaultdict from django.contrib.contenttypes.models import ContentType from django.core import checks from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist from django.db import DEFAULT_DB_ALIAS, connection, models, router, transaction...
bsd-3-clause
4,713,259,737,985,717,000
38.099145
116
0.564202
false
pratikmallya/hue
desktop/core/ext-py/boto-2.38.0/boto/cloudsearch2/document.py
136
11630
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 r...
apache-2.0
-7,074,582,748,187,262,000
35.920635
88
0.628117
false
NewpTone/stacklab-nova
debian/python-nova/usr/share/pyshared/nova/api/openstack/volume/contrib/__init__.py
8
1284
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Justin Santa Barbara # 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.apach...
apache-2.0
-6,259,017,709,170,741,000
31.923077
78
0.714953
false
dracos/QGIS
python/plugins/processing/algs/lidar/lastools/lasmerge.py
2
3710
# -*- coding: utf-8 -*- """ *************************************************************************** lasmerge.py --------------------- Date : September 2013 Copyright : (C) 2013 by Martin Isenburg Email : martin near rapidlasso point com ****************...
gpl-2.0
9,118,592,069,188,990,000
40.222222
82
0.583288
false
chazy/reviewboard
reviewboard/diffviewer/models.py
1
3892
from datetime import datetime from django.db import models from django.utils.translation import ugettext_lazy as _ from djblets.util.fields import Base64Field from reviewboard.scmtools.models import Repository class FileDiff(models.Model): """ A diff of a single file. This contains the patch and inform...
mit
2,658,781,260,155,846,000
34.706422
79
0.586845
false
tpodowd/boto
boto/kms/__init__.py
113
1640
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...
mit
-4,855,673,002,274,805,000
39
74
0.740854
false
sarahgrogan/scikit-learn
doc/tutorial/text_analytics/skeletons/exercise_01_language_train_model.py
254
2005
"""Build a language detector model The goal of this exercise is to train a linear classifier on text features that represent sequences of up to 3 consecutive characters so as to be recognize natural languages by using the frequencies of short character sequences as 'fingerprints'. """ # Author: Olivier Grisel <olivie...
bsd-3-clause
-4,572,698,986,958,136,000
31.33871
78
0.75212
false
windelbouwman/ppci-mirror
ppci/arch/avr/arch.py
1
11632
""" AVR architecture. See for good documentation about AVR ABI: - https://gcc.gnu.org/wiki/avr-gcc The stack grows downwards in AVR. The stack pointer points to the current empty stack slot. This is somewhat confusing, because on other machines the stack pointer points to the latests pushed byte. The stack frame is...
bsd-2-clause
374,502,628,830,998,500
28.522843
78
0.5239
false
potatolondon/django-nonrel-1-4
tests/regressiontests/utils/simplelazyobject.py
33
3440
import copy import pickle from django.utils.unittest import TestCase from django.utils.functional import SimpleLazyObject, empty class _ComplexObject(object): def __init__(self, name): self.name = name def __eq__(self, other): return self.name == other.name def __hash__(self): r...
bsd-3-clause
3,900,891,623,276,316,700
30.851852
93
0.631105
false
ClovisIRex/Snake-django
env/lib/python3.6/site-packages/django/db/models/functions/base.py
44
8087
""" Classes that represent database functions. """ from django.db.models import Func, Transform, Value, fields class Cast(Func): """ Coerce an expression to a new field type. """ function = 'CAST' template = '%(function)s(%(expressions)s AS %(db_type)s)' mysql_types = { fields.CharFie...
mit
6,485,412,908,877,055,000
34.942222
100
0.635464
false
wallnerryan/quantum_migrate
quantum/plugins/plumgrid/plumgrid_nos_plugin/rest_connection.py
2
3469
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 PLUMgrid, 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/lic...
apache-2.0
-2,173,290,001,162,488,800
36.706522
78
0.598732
false
rackerlabs/deuce
deuce/tests/test_openstack_swift_hook.py
1
10337
import falcon import mock import binascii import base64 import json import deuce from deuce.transport.wsgi import hooks from deuce.drivers import swift from deuce.tests import HookTest def before_hooks_swift(req, resp, params): return [ hooks.OpenstackSwiftHook(req, resp, params) ] class DummyClassO...
apache-2.0
-6,993,677,194,807,943,000
42.616034
79
0.535262
false
leeseulstack/openstack
neutron/tests/unit/ml2/test_ml2_plugin.py
5
52265
# Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
-4,253,256,986,498,280,000
46.384406
79
0.552129
false
leekchan/tornado_test
tornado/tcpserver.py
74
10693
#!/usr/bin/env python # # Copyright 2011 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
8,971,069,978,719,191,000
40.607004
83
0.612737
false
alexlo03/ansible
lib/ansible/modules/windows/win_route.py
21
1660
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Daniele Lazzari <lazzari@mailup.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # This is a windows documentation stub. Actual code lives in the .ps1 # file of the same name. ANSIBLE_METADATA = {'metad...
gpl-3.0
-632,281,597,292,733,200
23.776119
92
0.644578
false
kellyschrock/ardupilot
Tools/scripts/configure_all.py
4
2215
#!/usr/bin/env python """ script to run configre for all hwdef.dat, to check for syntax errors """ import os import shutil import subprocess import sys import fnmatch import argparse parser = argparse.ArgumentParser(description='configure all ChibiOS boards') parser.add_argument('--build', action='store_true', defa...
gpl-3.0
-7,196,603,118,541,965,000
30.642857
108
0.618962
false
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/pytz/lazy.py
514
5263
from threading import RLock try: from UserDict import DictMixin except ImportError: from collections import Mapping as DictMixin # With lazy loading, we might end up with multiple threads triggering # it at the same time. We need a lock. _fill_lock = RLock() class LazyDict(DictMixin): """Dictionary popu...
gpl-3.0
-2,632,166,638,769,756,000
30.327381
75
0.470074
false
lynndotconfig/server-tools
language_path_mixin/__openerp__.py
13
1370
# -*- coding: utf-8 -*- ############################################################################## # # Odoo, an open source suite of business apps # This module copyright (C) 2015 Therp BV (<http://therp.nl>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
-3,065,154,728,770,706,000
40.515152
78
0.594161
false
Teamxrtc/webrtc-streaming-node
third_party/webrtc/src/chromium/src/tools/findit/match_set.py
48
4429
# Copyright (c) 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 re from threading import Lock import crash_utils REVIEW_URL_PATTERN = re.compile(r'Review URL:( *)(.*?)/(\d+)') class Match(object): """Re...
mit
-7,135,778,289,312,794,000
33.601563
77
0.659743
false
dongjoon-hyun/electron
script/update.py
18
3148
#!/usr/bin/env python import argparse import os import platform import subprocess import sys from lib.config import get_target_arch, PLATFORM from lib.util import get_host_arch, import_vs_env SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) def main(): os.chdir(SOURCE_ROOT) if PLATFO...
mit
7,726,495,444,142,448,000
30.48
78
0.653748
false
superdesk/superdesk-content-api
content_api/tests/packages_init_app_test.py
13
2280
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014, 2015 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license from u...
agpl-3.0
-4,326,493,226,692,033,500
30.666667
84
0.672807
false
jahrome/viper
modules/rats/unrecom.py
6
2755
# Originally written by Kevin Breen (@KevTheHermit): # https://github.com/kevthehermit/RATDecoders/blob/master/unrecom.py import string from zipfile import ZipFile from cStringIO import StringIO from Crypto.Cipher import ARC4 import xml.etree.ElementTree as ET from viper.common.out import * def extract_embedded(zip_...
bsd-3-clause
2,783,851,955,126,725,600
34.320513
85
0.605445
false
kirca/odoo
addons/point_of_sale/wizard/pos_box.py
381
2211
from openerp.osv import osv from openerp.tools.translate import _ from openerp.addons.account.wizard.pos_box import CashBox class PosBox(CashBox): _register = False def run(self, cr, uid, ids, context=None): if not context: context = dict() active_model = context.get('active_mod...
agpl-3.0
-1,430,884,214,601,462,300
34.66129
113
0.611488
false
srm912/servo
tests/wpt/css-tests/tools/pywebsocket/src/test/set_sys_path.py
496
1815
# Copyright 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...
mpl-2.0
-2,908,488,805,063,084,500
39.333333
75
0.770799
false
CUFCTL/DLBD
Spring2018/src/utils.py
1
16622
### Import necessary packages from __future__ import absolute_import from __future__ import division from __future__ import print_function from xml.etree import ElementTree as et import cv2, os, sys, shutil, glob, argparse, re, io import numpy as np import tensorflow as tf import PIL, hashlib, logging from PIL import ...
mit
-513,049,784,587,092,160
35.374179
136
0.570449
false
SpaceGroupUCL/qgisSpaceSyntaxToolkit
esstoolkit/external/networkx/drawing/tests/test_layout.py
1
15534
"""Unit tests for layout functions.""" import networkx as nx from networkx.testing import almost_equal import pytest numpy = pytest.importorskip("numpy") test_smoke_empty_graphscipy = pytest.importorskip("scipy") class TestLayout: @classmethod def setup_class(cls): cls.Gi = nx.grid_2d_graph(5, 5) ...
gpl-3.0
1,505,483,636,345,683,000
37.261084
86
0.562959
false
achang97/YouTunes
lib/python2.7/site-packages/youtube_dl/extractor/rds.py
57
2800
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( parse_duration, parse_iso8601, js_to_json, ) from ..compat import compat_str class RDSIE(InfoExtractor): IE_DESC = 'RDS.ca' _VALID_URL = r'https?://(?:www\.)?rds\.ca/vid(?:[eé]|%C3%A9)o...
mit
728,399,942,977,140,200
38.957143
126
0.547372
false
ecederstrand/django
tests/messages_tests/test_cookie.py
299
7424
import json from django.contrib.messages import constants from django.contrib.messages.storage.base import Message from django.contrib.messages.storage.cookie import ( CookieStorage, MessageDecoder, MessageEncoder, ) from django.test import SimpleTestCase, override_settings from django.utils.safestring import Safe...
bsd-3-clause
255,156,758,580,351,040
40.47486
114
0.645609
false
ATIX-AG/ansible
lib/ansible/modules/network/f5/bigip_device_group.py
24
14387
#!/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
447,597,128,245,252,600
30.759382
98
0.619657
false
cpyou/odoo
addons/sale/tests/__init__.py
7
1131
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
agpl-3.0
-517,112,269,927,309,760
39.428571
78
0.618921
false
jelugbo/tundex
common/djangoapps/reverification/models.py
66
2118
""" Models for reverification features common to both lms and studio """ from datetime import datetime import pytz from django.core.exceptions import ValidationError from django.db import models from util.validate_on_save import ValidateOnSaveMixin from xmodule_django.models import CourseKeyField class MidcourseReve...
agpl-3.0
-410,258,836,801,600,700
37.509091
97
0.686969
false
kuri65536/python-for-android
python3-alpha/python-libs/pyxmpp2/ext/__init__.py
47
1026
# # (C) Copyright 2011 Jacek Konieczny <jajcus@jajcus.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful...
apache-2.0
-7,183,547,516,919,096,000
33.2
70
0.729045
false
angr/angr
tests/test_ptmalloc.py
1
8838
import nose.tools from angr import SimState, SimHeapPTMalloc # TODO: Make these tests more architecture-independent (note dependencies of some behavior on chunk metadata size) def chunk_iterators_are_same(iterator1, iterator2): for ck in iterator1: ck2 = next(iterator2) if ck.base != ck2.base: ...
bsd-2-clause
4,900,829,279,935,285,000
31.021739
114
0.647545
false
peterstace/project-euler
OLD_PY_CODE/project_euler_old_old/111/number_theory.py
2
7023
"""This module implements functions that have to do with number theory.""" import random from operator import mul _stock_primes = [2, 3, 5, 7, 11, 13, 17, 19] def int_pow(x, n): """Raise x to the power n (if n is negative a ValueError is raised). intPow(0, 0) is defined to be 0. """ if n < 0: ...
unlicense
-1,005,543,209,299,355,400
27.204819
80
0.533817
false
ericzolf/ansible
lib/ansible/module_utils/facts/sysctl.py
29
1931
# 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 distributed in the hope that ...
gpl-3.0
5,417,112,982,108,406,000
30.145161
97
0.601243
false
ForkedReposBak/mxnet
example/ssd/dataset/pascal_voc.py
42
10238
# 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 u...
apache-2.0
3,546,918,525,159,237,600
34.797203
107
0.545224
false
dvliman/jaikuengine
.google_appengine/google/appengine/_internal/django/template/defaultfilters.py
23
29329
"""Default variable filters.""" import re from decimal import Decimal, InvalidOperation, ROUND_HALF_UP import random as random_module try: from functools import wraps except ImportError: from google.appengine._internal.django.utils.functional import wraps # Python 2.4 fallback. from google.appengine._interna...
apache-2.0
2,157,422,820,455,243,800
30.879348
100
0.632991
false
Jorge-Rodriguez/ansible
lib/ansible/modules/windows/win_iis_webapppool.py
28
7155
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Henrik Wallström <henrik@wallstroms.nu> # 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...
gpl-3.0
-2,857,965,495,706,557,400
32.900474
109
0.689781
false
ebagdasa/tempest
tempest/api/orchestration/stacks/test_soft_conf.py
9
7506
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
1,241,819,736,111,191,000
45.04908
78
0.634959
false
NoobieDog/nexmon
utilities/wireshark/tools/netscreen2dump.py
42
4423
#!/usr/bin/env python """ Converts netscreen snoop hex-dumps to a hex-dump that text2pcap can read. Copyright (c) 2004 by Gilbert Ramirez <gram@alumni.rice.edu> 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 F...
gpl-3.0
8,913,046,169,035,055,000
29.715278
85
0.596654
false
ioram7/keystone-federado-pgid2013
build/python-keystoneclient/keystoneclient/exceptions.py
1
4260
# Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 Nebula, Inc. """ Exception definitions. """ class CommandError(Exception): pass class ValidationError(Exception): pass class AuthorizationFailure(Exception): pass class NoTokenLookupException(Exception): """This form of authentication does not ...
apache-2.0
163,452,291,124,880,060
24.207101
79
0.588967
false
Magnitus-/DockerFiles
network-setup/image/setup.py
1
5370
#!/usr/local/bin/python import os import datetime import re import docker from jinja2 import Template from yaml import load TEMPLATES_DIRECTORY = os.environ['TEMPLATE_DIRECTORY'] CONFIG_DIRECTORY = os.environ['CONFIG_DIRECTORY'] SERVICE_NAMES = { 'dns': os.environ.get('DNS_SERVICE_NAME', 'dns'), 'dhcp': os....
mit
1,075,574,204,063,991,900
35.290541
124
0.61527
false
Immortalin/python-for-android
python3-alpha/python3-src/Lib/test/test_aifc.py
55
3979
from test.support import findfile, run_unittest, TESTFN import unittest import os import aifc class AIFCTest(unittest.TestCase): def setUp(self): self.f = self.fout = None self.sndfilepath = findfile('Sine-1000Hz-300ms.aif') def tearDown(self): if self.f is not None: sel...
apache-2.0
3,442,845,424,157,426,700
32.720339
78
0.57527
false
uclouvain/osis_louvain
base/forms/learning_unit/educational_information/mail_reminder.py
1
3305
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
-5,669,984,448,811,951,000
43.053333
111
0.648002
false
yati-sagade/incubator-airflow
airflow/contrib/operators/gcs_to_bq.py
1
9518
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
2,539,694,970,877,682,000
45.8867
89
0.655705
false
mlesche/deep_seq_pipeline
deep_seq_pipeline/src/general_scripts/createGTFfiles.py
1
18824
#!/usr/bin/env python ''' The MIT License (MIT) Copyright (c) <2014> <Mathias Lesche> 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 ...
mit
-5,108,667,414,796,950,000
37.975155
247
0.626222
false
val-iisc/sketch-parse
exp-src/table3.py
1
8623
import scipy from scipy import ndimage import cv2 import numpy as np import sys import torch import resnet_dilated_frozen_r5_D #TODO import resnet_dilated_frozen_r5_D #TODO import resnet_dilated_frozen_r5_D_pose #TODO import resnet_dilated_frozen_r5_D_pose #TODO from torch.autograd import Variable import torchvision.m...
mit
5,603,728,314,545,810,000
40.657005
148
0.640728
false
bravo-zhang/spark
sql/hive/src/test/resources/data/scripts/cat.py
105
1040
# # 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 u...
apache-2.0
8,665,065,281,389,745,000
34.862069
61
0.759615
false
danielreed/python-hpOneView
examples/scripts/get-role-category-actions.py
2
3990
#!/usr/bin/env python ### # (C) Copyright (2012-2015) Hewlett Packard Enterprise Development LP # # 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 limita...
mit
-1,177,332,997,256,905,200
32.813559
105
0.651378
false
Isendir/brython
www/src/Lib/logging/config.py
739
35619
# Copyright 2001-2013 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
bsd-3-clause
-5,619,888,493,032,352,000
37.548701
91
0.538533
false
jjhelmus/CyLP
cylp/tests/test_CyCoinMpsIO.py
4
2151
import unittest import inspect import os from os.path import join import numpy as np from cylp.cy import CyCoinMpsIO from cylp.cy.CyCoinMpsIO import getQpsExample currentFilePath = os.path.dirname(inspect.getfile(inspect.currentframe())) class TestCyCoinMpsIO(unittest.TestCase): def test(self): problem...
epl-1.0
-6,352,901,617,877,679,000
38.109091
77
0.407717
false
Anonymouslemming/ansible
lib/ansible/modules/network/dellos10/dellos10_config.py
62
10381
#!/usr/bin/python # # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # # Copyright (c) 2017 Dell Inc. # # 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 versi...
gpl-3.0
8,762,618,975,001,923,000
33.83557
137
0.661208
false
Lab603/PicEncyclopedias
jni-build/jni/include/tensorflow/models/rnn/ptb/reader_test.py
14
2036
# 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...
mit
3,342,756,976,246,397,400
32.377049
80
0.646857
false
izapolsk/integration_tests
cfme/tests/infrastructure/test_cluster_analysis.py
1
1373
import pytest from cfme import test_requirements from cfme.infrastructure.provider import InfraProvider from cfme.markers.env_markers.provider import ONE_PER_TYPE from cfme.utils.appliance.implementations.ui import navigate_to from cfme.utils.wait import wait_for pytestmark = [ pytest.mark.tier(2), test_requ...
gpl-2.0
376,748,302,571,119,360
32.487805
98
0.701384
false
Parsl/parsl
parsl/executors/high_throughput/zmq_pipes.py
1
5931
#!/usr/bin/env python3 import zmq import time import pickle import logging import threading logger = logging.getLogger(__name__) class CommandClient(object): """ CommandClient """ def __init__(self, ip_address, port_range): """ Parameters ---------- ip_address: str ...
apache-2.0
31,298,653,186,771,536
35.386503
99
0.56112
false
ryannjohnson/popular-python
popular/users.py
1
1254
class User(object): """Information about an authenticated user. Providers return different forms of information. This container is meant to provide a common interface with that information across all vendors. """ ATTRIBUTES = [ 'id', 'name', 'nickname', 'email...
mit
8,587,119,586,498,760,000
25.680851
77
0.555821
false
rtucker-mozilla/inventory
api_v2/relengdistro_handler.py
6
1741
from piston.handler import BaseHandler, rc from systems.models import System, RelengDistro, SystemRack,SystemStatus,NetworkAdapter,KeyValue from truth.models import Truth, KeyValue as TruthKeyValue from dhcp.DHCP import DHCP as DHCPInterface from dhcp.models import DHCP from MacroExpansion import MacroExpansion from Ke...
bsd-3-clause
-1,682,568,992,461,277,000
29.54386
96
0.627226
false
unixweb/rpi-cpu-alarm
alarm25.py
1
1103
#!/usr/bin/python import os import smtplib import time from email.mime.text import MIMEText mailserver = "XXXX.de" smtpport = 25 smtpuser = "XXXX" smtpasswd = "XXXXX" recipient = "XXXX@XXXX.de" smtpsender = "alarm@XXXX.de" alarmtemp = 25 day = repr(time.localtime()[2]) + "."+repr(time.localtime()[1])+"."+repr(time....
gpl-3.0
-5,482,726,366,122,872,000
30.514286
131
0.666364
false
angelapper/edx-platform
lms/djangoapps/courseware/model_data.py
5
36505
""" Classes to provide the LMS runtime data storage to XBlocks. :class:`DjangoKeyValueStore`: An XBlock :class:`~KeyValueStore` which stores a subset of xblocks scopes as Django ORM objects. It wraps :class:`~FieldDataCache` to provide an XBlock-friendly interface. :class:`FieldDataCache`: A object which pro...
agpl-3.0
-93,385,231,714,304,320
34.545278
114
0.618271
false
rizar/fuel
tests/test_caltech101_silhouettes.py
25
1642
import numpy from numpy.testing import assert_raises from fuel.datasets import CalTech101Silhouettes from tests import skip_if_not_available def test_caltech101_silhouettes16(): skip_if_not_available(datasets=['caltech101_silhouettes16.hdf5']) for which_set, size, num_examples in ( ('train', 16, ...
mit
7,943,553,427,072,820,000
33.208333
74
0.615713
false
benjaminabel/pelican-plugins
goodreads_activity/goodreads_activity.py
76
1871
# -*- coding: utf-8 -*- """ Goodreads Activity ================== A Pelican plugin to lists books from your Goodreads shelves. Copyright (c) Talha Mansoor """ from __future__ import unicode_literals import logging logger = logging.getLogger(__name__) from pelican import signals class GoodreadsActivity(): def...
agpl-3.0
6,308,629,016,954,321,000
28.698413
85
0.605024
false
Benowit/android_kernel_motorola_msm8974
tools/perf/scripts/python/net_dropmonitor.py
1258
1562
# Monitor the system for dropped packets and proudce a report of drop locations and counts import os import sys sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import * drop_log = {} kallsyms = [] def...
gpl-2.0
-3,116,154,758,661,115,000
20.694444
90
0.633163
false
Lab603/PicEncyclopedias
jni-build/jni-build/jni/include/tensorflow/python/kernel_tests/lrn_op_test.py
4
5376
# 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...
mit
-5,517,320,769,085,290,000
36.075862
84
0.60119
false
rosscdh/silk
django_silky/silk/profiling/dynamic.py
8
6869
from functools import partial import inspect import logging import sys import re import six from silk.profiling.profiler import silk_profile Logger = logging.getLogger('silk') def _get_module(module_name): """ Given a module name in form 'path.to.module' return module object for 'module'. """ if '...
mit
8,137,319,883,238,759,000
29.802691
115
0.596302
false
fargalaxy1/geonode-leaflet
geonode/groups/tests.py
11
17197
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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
-562,986,067,860,580,400
36.712719
115
0.633541
false
ShaheenHossain/eagle-medical
medical_his/tests/test_medical_hospital_or.py
1
1700
# -*- coding: utf-8 -*- ############################################################################## # # This file is part of medical_his, # an Odoo module. # # Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>) # # medical_his is free software: # you can redistribute it and/or modify it under t...
agpl-3.0
2,002,941,685,625,658,000
33.693878
78
0.602941
false
MetrodataTeam/incubator-airflow
airflow/contrib/sensors/jira_sensor.py
30
5905
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
-21,410,294,023,632,710
39.445205
88
0.584759
false
midma101/m0du1ar
.venv/lib/python2.7/site-packages/pip/_vendor/packaging/version.py
439
11949
# Copyright 2014 Donald Stufft # # 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...
mit
-1,003,375,354,030,776,400
28.650124
79
0.561135
false
weiawe/django
tests/migrations/test_loader.py
28
11971
from __future__ import unicode_literals from unittest import skipIf from django.db import connection, connections from django.db.migrations.graph import NodeNotFoundError from django.db.migrations.loader import AmbiguityError, MigrationLoader from django.db.migrations.recorder import MigrationRecorder from django.tes...
bsd-3-clause
4,922,035,956,840,612,000
37.246006
107
0.611311
false
mojaves/convirt
tests/monkey.py
1
3383
from __future__ import absolute_import # # Copyright 2012-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 2 of the License, or # (at your option) any l...
lgpl-2.1
5,754,611,144,464,882,000
30.324074
78
0.600059
false
jeffmahoney/supybot
plugins/Reply/test.py
18
2633
### # Copyright (c) 2005, Daniel DiPaolo # 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 condition...
bsd-3-clause
-7,419,360,346,634,726,000
43.627119
79
0.723889
false
yfried/ansible
lib/ansible/modules/monitoring/grafana_dashboard.py
6
14980
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Thierry Sallé (@seuf) # 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 ANSIBLE_METADATA = { 'status': ['preview'], 'supported_by': 'com...
gpl-3.0
1,613,199,191,530,275,800
32.50783
143
0.604153
false
2014c2g2/teamwork
wsgi/static/reeborg/src/libraries/brython/Lib/posix.py
11
20408
"""This module provides access to operating system functionality that is standardized by the C Standard and the POSIX standard (a thinly disguised Unix interface). Refer to the library manual and corresponding Unix manual entries for more information on calls.""" import datetime F_OK = 0 O_APPEND = 8 O_BINARY = 32...
gpl-2.0
5,133,681,144,866,925,000
34.246978
122
0.667679
false
switchboardOp/ansible
contrib/inventory/cloudstack.py
119
9137
#!/usr/bin/env python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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...
gpl-3.0
-5,271,363,229,490,245,000
34.968504
118
0.522001
false
goldsborough/.emacs
.emacs.d/.python-environments/default/lib/python3.5/encodings/cp869.py
272
32965
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP869.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
mit
-3,032,943,352,756,695,600
46.844702
97
0.599666
false
Tiglas/pickup-planner
request_handler/flask/lib/python2.7/site-packages/wheel/signatures/__init__.py
565
3779
""" Create and verify jws-js format Ed25519 signatures. """ __all__ = [ 'sign', 'verify' ] import json from ..util import urlsafe_b64decode, urlsafe_b64encode, native, binary ed25519ll = None ALG = "Ed25519" def get_ed25519ll(): """Lazy import-and-test of ed25519 module""" global ed25519ll if not ...
mit
-7,473,202,033,981,354,000
34.650943
86
0.621328
false
abought/osf.io
website/addons/forward/views/config.py
3
1679
"""Views for the node settings page.""" # -*- coding: utf-8 -*- import httplib as http from flask import request from modularodm.exceptions import ValidationError from framework.exceptions import HTTPError from website.project.decorators import ( must_have_addon, must_have_permission, must_not_be_registr...
apache-2.0
7,534,908,917,806,706,000
26.52459
75
0.653961
false
nricklin/PyGithub
github/GistHistoryState.py
74
10159
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
6,432,418,197,155,957,000
36.349265
119
0.568757
false
drewp/tahoe-lafs
misc/simulators/simulate_load.py
10
4916
#!/usr/bin/env python # WARNING. There is a bug in this script so that it does not simulate the actual Tahoe Two server selection algorithm that it was intended to simulate. See http://allmydata.org/trac/tahoe-lafs/ticket/302 (stop permuting peerlist, use SI as offset into ring instead?) import random SERVER_CAPACIT...
gpl-2.0
-2,289,749,357,633,114,400
30.922078
266
0.568552
false
seenaburns/lifts
database.py
1
4543
""" --- database.py ~~~~~~~~~~~ Lifts flatfile database accessing / querying functions. """ # For with clause, create new db_manager that connects def dbm(db_file): return DB_Manager(db_file) class DB_Manager(): def __init__(self, db_file): self.db_file = db_file pass # __enter__ a...
bsd-3-clause
-8,624,551,688,779,441,000
29.489933
104
0.520581
false
eoneil1942/voltdb-4.7fix
tests/ee/indexes/index_scripted_test.py
2
2299
#!/usr/bin/env python # This file is part of VoltDB. # Copyright (C) 2008-2014 VoltDB 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 limitati...
agpl-3.0
-5,554,360,088,808,174,000
29.653333
157
0.743367
false
nwspeete-ibm/openwhisk
tools/travis/box-upload.py
1
1039
#!/usr/bin/env python import os import subprocess import sys import tempfile import urllib # Compresses the contents of a folder and upload the result to Box. # Run this script as: # # $ upload-logs.py LOG_DIR DEST_NAME # # e.g.: # # $ upload-logs.py /tmp/wsklogs logs-5512.tar.gz def upload_file(local_file, remote_fi...
apache-2.0
6,467,444,550,318,754,000
25.641026
171
0.621752
false
nikhilraog/boto
boto/ec2/elb/attributes.py
153
5103
# 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, dis- # tribute, sublicense, and/or sell co...
mit
8,710,877,874,145,947,000
32.136364
79
0.623163
false
gwct/core
generators/cds-aln/04_codon_filter.py
1
14930
#!/usr/bin/python ############################################################ # For Penn genomes, 06.2020 # Takes a log file from a clipkit run on amino acid sequence # and removes corresponding sites from codon alignment. ############################################################ import sys, os, core, coreseq, arg...
gpl-3.0
-1,043,580,790,576,864,600
45.949686
314
0.578165
false
smukoehler/SDB-control
mpcdriver.py
1
3535
import urlparse import datetime import urllib2 from smap.driver import SmapDriver from smap.util import periodicSequentialCall from smap.contrib import dtutil from sklearn import linear_model from smap.archiver.client import RepublishClient from functools import partial from mpc import * class SimpleMPC(SmapDriver): ...
bsd-2-clause
-9,041,269,087,117,866,000
27.97541
140
0.687694
false
markusappel/McCode
tools/Python/obsoleted/mcdisplay-x3d/rewrite.py
3
5048
#!/usr/bin/env python ''' Small script to rewrite McStas trace output to CSV data for plotting ''' import argparse import sys import numpy as np import x3d from util import parse_multiline, rotate, get_line, debug, draw_circle UC_COMP = 'COMPONENT:' MC_COMP = 'MCDISPLAY: component' MC_COMP_SHORT = 'COMP: '...
gpl-2.0
6,273,149,213,350,744,000
29.780488
106
0.512282
false
Juniper/contrail-dev-controller
src/config/vnc_openstack/vnc_openstack/tests/test_basic.py
5
2533
import sys import json sys.path.append('../common/tests') from testtools.matchers import Equals, Contains from test_utils import * import test_common import test_case class NBTestExtraFieldsPresenceCodeDefault(test_case.NeutronBackendTestCase): def test_extra_fields_on_network(self): test_obj = self._cre...
apache-2.0
8,895,995,223,917,108,000
38.578125
84
0.610343
false
mattbernst/polyhartree
support/ansible/runner/lookup_plugins/dnstxt.py
166
2221
# (c) 2012, Jan-Piet Mens <jpmens(at)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 later ver...
gpl-3.0
-5,859,915,675,477,204,000
31.661765
99
0.597028
false
a9261/flexx
flexx/ui/test.py
20
6110
import time import logging import flexx from flexx import app, ui import faulthandler faulthandler.enable() #logging.log class MyApp(ui.Widget): #_config = ui.App.Config(title='Flexx test app', size=(400, 300), # )#icon='https://assets-cdn.github.com/favicon.ico') ...
bsd-2-clause
-8,141,204,833,954,480,000
42.956835
94
0.440753
false
hoangt/tpzsimul.gem5
src/dev/arm/Gic.py
24
2982
# Copyright (c) 2012 ARM Limited # 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 implementation of the functionality ...
bsd-3-clause
-7,471,190,947,716,052,000
47.885246
84
0.765929
false