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
msingh172/youtube-dl
devscripts/gh-pages/generate-download.py
126
1263
#!/usr/bin/env python3 from __future__ import unicode_literals import hashlib import urllib.request import json versions_info = json.load(open('update/versions.json')) version = versions_info['latest'] URL = versions_info['versions'][version]['bin'][0] data = urllib.request.urlopen(URL).read() # Read template page ...
unlicense
-580,976,256,742,686,100
39.741935
92
0.721298
false
loop1024/pymo-global
android/pgs4a-0.9.6/buildlib/colorama/win32.py
22
3779
# from winbase.h STDOUT = -11 STDERR = -12 try: from ctypes import windll except ImportError: windll = None SetConsoleTextAttribute = lambda *_: None else: from ctypes import ( byref, Structure, c_char, c_short, c_uint32, c_ushort ) handles = { STDOUT: windll.k...
mit
7,657,116,972,881,553,000
32.669725
111
0.573432
false
mkolar/pyblish
pyblish/plugin.py
1
32233
"""Plug-in system Works similar to how OSs look for executables; i.e. a number of absolute paths are searched for a given match. The predicate for executables is whether or not an extension matches a number of options, such as ".exe" or ".bat". In this system, the predicate is whether or not a fname starts with "vali...
lgpl-3.0
2,263,709,763,886,713,300
24.300628
79
0.606273
false
giacomo-dantonio/hermann
spi_test.py
1
1101
#!/usr/bin/env python # # Bitbang'd SPI interface with an MCP3008 ADC device # MCP3008 is 8-channel 10-bit analog to digital converter # Connections are: # CLK => SCLK # DOUT => MISO # DIN => MOSI # CS => CE0 import time import sys import spidev spi = spidev.SpiDev() spi.open(0,0) spi.max_speed_hz...
gpl-2.0
-6,745,913,796,661,511,000
21.9375
57
0.589464
false
blazek/QGIS
python/plugins/processing/algs/qgis/Climb.py
15
8653
# -*- coding: utf-8 -*- """ /*************************************************************************** Climb begin : 2019-05-15 copyright : (C) 2019 by Håvard Tveite email : havard.tveite@nmbu.no ******************************************************...
gpl-2.0
-822,583,749,837,622,300
32.657588
150
0.470867
false
davidvon/pipa-pay-server
site-packages/pip/_vendor/requests/sessions.py
294
22290
# -*- coding: utf-8 -*- """ requests.session ~~~~~~~~~~~~~~~~ This module provides a Session object to manage and persist settings across requests (cookies, auth, proxies). """ import os from collections import Mapping from datetime import datetime from .auth import _basic_auth_str from .compat import cookielib, Or...
apache-2.0
4,685,035,577,865,724,000
33.990581
115
0.603706
false
YefriTavarez/finance_manager
fm/utilities.py
1
1245
# -*- encoding: utf-8 -*- import frappe from datetime import date from fm.api import PENDING @frappe.whitelist() def get_next_repayment_schedule(chasis_no): loan_id = frappe.get_value("Loan", { "asset": chasis_no }, "name") if not loan_id: next_month = frappe.utils.add_months(date.today(), 1) return next_mon...
gpl-3.0
-1,482,614,036,887,948,500
21.381818
85
0.614947
false
Plain-Andy-legacy/android_external_chromium_org
tools/telemetry/telemetry/page/actions/seek.py
47
2160
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A Telemetry page_action that performs the "seek" action on media elements. Action parameters are: - seconds: The media time to seek to. Test fails if not...
bsd-3-clause
-8,506,756,149,838,132,000
42.2
80
0.662963
false
coolbombom/CouchPotato
library/sqlalchemy/dialects/sybase/pysybase.py
18
3152
# pysybase.py # Copyright (C) 2010 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Support for Sybase via the python-sybase driver. http://python-sybase.sourceforge.net/ Connect strings are of...
gpl-3.0
-780,853,010,809,220,100
30.52
77
0.64118
false
mattclay/ansible
test/support/windows-integration/plugins/modules/win_user_right.py
56
3205
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Ansible Project # 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 = {'metadata_version': '1.1', ...
gpl-3.0
792,042,518,676,080,000
28.675926
92
0.687363
false
sam-m888/addons-source
lxml/lxmlGramplet.py
2
27861
# Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2009 Brian G. Matherly # Copyright (C) 2010 Douglas S. Blank # Copyright (C) 2011-2019 Jerome Rapinat # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publi...
gpl-2.0
1,984,997,722,671,846,000
29.283696
140
0.498331
false
xbmc/xbmc-antiquated
xbmc/lib/libPython/Python/Lib/distutils/spawn.py
63
6991
"""distutils.spawn Provides the 'spawn()' function, a front-end to various platform- specific functions for launching another program in a sub-process. Also provides the 'find_executable()' to search the path for a given executable name. """ # This module should be kept compatible with Python 2.1. __revision__ = "$I...
gpl-2.0
2,099,610,054,362,503,400
33.781095
79
0.552282
false
astrofrog/glue-vispy-viewers
glue_vispy_viewers/extern/vispy/visuals/polygon.py
20
3795
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ Simple polygon visual based on MeshVisual and LineVisual """ from __future__ import division import numpy as np from .visual import CompoundVisual from .mesh import Me...
bsd-2-clause
3,503,116,732,243,023,400
27.533835
79
0.562846
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.1/Lib/encodings/cp1250.py
272
13686
""" Python Character Mapping Codec cp1250 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1250.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_table) def decode(self,in...
mit
-5,286,904,644,116,568,000
43.579805
119
0.541941
false
kavi112/google-python-exercises
babynames/solution/babynames.py
212
3852
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re """Baby Names exercise Define the extract_names() function below and c...
apache-2.0
6,098,290,216,102,191,000
28.181818
79
0.659657
false
talon-one/talon_one.py
talon_one/models/campaign.py
1
34622
# coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. #...
mit
-3,623,268,046,687,791,000
34.149239
745
0.620704
false
eerwitt/tensorflow
tensorflow/contrib/graph_editor/tests/select_test.py
109
6538
# 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
1,511,193,100,201,712,400
37.233918
80
0.625421
false
TalShafir/ansible
lib/ansible/modules/cloud/oneandone/oneandone_firewall_policy.py
74
18691
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
6,797,571,822,046,266,000
31.449653
120
0.591194
false
gmist/fix-5studio
main/model/user.py
8
3029
# coding: utf-8 from __future__ import absolute_import import hashlib from google.appengine.ext import ndb from webargs.flaskparser import parser from webargs import fields as wf from api import fields import model import util import config class User(model.Base): name = ndb.StringProperty(required=True) user...
mit
5,731,826,286,963,637,000
29.29
75
0.661604
false
jyotikamboj/container
django/core/handlers/wsgi.py
20
9604
from __future__ import unicode_literals import cgi import codecs import logging import sys from io import BytesIO from threading import Lock import warnings from django import http from django.conf import settings from django.core import signals from django.core.handlers import base from django.core.urlresolvers impo...
mit
11,896,943,938,607,436
35.51711
82
0.616202
false
google/grr
grr/server/grr_response_server/gui/api_call_router_without_checks.py
1
17763
#!/usr/bin/env python """Implementation of a router class that does no ACL checks.""" from typing import Optional from grr_response_server.gui import api_call_context from grr_response_server.gui import api_call_router from grr_response_server.gui.api_plugins import artifact as api_artifact from grr_response_server....
apache-2.0
1,126,584,598,556,520,000
33.829412
82
0.757136
false
grupoprog3/proyecto_final
Entrega Final/flask/Lib/site-packages/sqlparse/filters/aligned_indent.py
20
4932
# -*- coding: utf-8 -*- # # Copyright (C) 2016 Andi Albrecht, albrecht.andi@gmail.com # # This module is part of python-sqlparse and is released under # the BSD License: https://opensource.org/licenses/BSD-3-Clause from sqlparse import sql, tokens as T from sqlparse.compat import text_type from sqlparse.utils import o...
apache-2.0
-6,409,863,024,387,779,000
37.232558
77
0.557989
false
shoyer/xray
xarray/tests/test_backends_file_manager.py
2
5585
import gc import pickle import threading from unittest import mock import pytest from xarray.backends.file_manager import CachingFileManager from xarray.backends.lru_cache import LRUCache from xarray.core.options import set_options @pytest.fixture(params=[1, 2, 3, None]) def file_cache(request): maxsize = reque...
apache-2.0
4,221,764,386,963,977,000
25.595238
77
0.64906
false
jtyuan/racetrack
src/arch/x86/isa/insts/x87/control/save_x87_status_word.py
72
2410
# 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
-4,892,617,648,682,834,000
41.280702
72
0.773029
false
leighpauls/k2cro4
native_client/site_scons/site_tools/publish.py
18
9545
#!/usr/bin/python2.4 # 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...
bsd-3-clause
582,520,010,210,709,600
36.727273
80
0.682766
false
tempbottle/Nuitka
misc/make-upload.py
1
1923
#!/usr/bin/env python # Copyright 2015, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this fi...
apache-2.0
-6,220,469,091,209,636,000
44.785714
119
0.687988
false
bram85/topydo
topydo/lib/TodoBase.py
1
8341
# Topydo - A todo.txt client written in Python. # Copyright (C) 2014 - 2015 Bram Schoenmakers <bram@topydo.org> # # 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,...
gpl-3.0
672,334,226,059,968,400
34.798283
87
0.581705
false
ITDevLtd/MCVirt
source/mcvirt-daemon/usr/lib/python2.7/dist-packages/mcvirt/cluster/remote.py
1
1310
"""Provide interface for RPC to cluster nodes.""" # Copyright (c) 2014 - I.T. Dev Ltd # # This file is part of MCVirt. # # MCVirt 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 Licens...
gpl-2.0
4,119,960,064,744,830,000
37.529412
92
0.654962
false
jaruba/chromium.src
tools/perf/page_sets/top_25_smooth.py
11
5359
# 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. from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module from page_sets import top_pages def _IssueMarkerAndSc...
bsd-3-clause
8,743,667,764,727,331,000
34.490066
78
0.713006
false
osm-fr/osmose-backend
analysers/analyser_merge_healthcare_FR_finess.py
3
7042
#!/usr/bin/env python #-*- coding: utf-8 -*- ########################################################################### ## ## ## Copyrights Frédéric Rodrigo 2018 ## ## ...
gpl-3.0
-3,468,996,189,566,404,000
52.709924
379
0.542069
false
ARMmbed/yotta_osx_installer
workspace/lib/python2.7/site-packages/colorama/win32.py
446
5121
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. # from winbase.h STDOUT = -11 STDERR = -12 try: import ctypes from ctypes import LibraryLoader windll = LibraryLoader(ctypes.WinDLL) from ctypes import wintypes except (AttributeError, ImportError): windll = None SetCon...
apache-2.0
3,717,927,782,701,439,000
34.075342
111
0.647335
false
anryko/ansible
lib/ansible/modules/cloud/azure/azure_rm_devtestlabschedule.py
19
11356
#!/usr/bin/python # # Copyright (c) 2019 Zim Kalinowski, (@zikalino) # # 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
5,932,483,398,359,610,000
32.302053
149
0.540155
false
jalavik/inspire-next
inspire/modules/forms/form.py
3
2613
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014, 2015 CERN. # # INSPIRE 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...
gpl-2.0
-7,858,260,889,455,269,000
32.075949
77
0.578263
false
h3biomed/ansible
test/units/modules/network/onyx/test_onyx_facts.py
68
2401
# # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type from units.compat.mock import patch from units.modules.utils import set_mod...
gpl-3.0
2,775,023,808,424,185,300
32.816901
92
0.64015
false
jmckaskill/subversion
tools/examples/check-modified.py
7
1678
#!/usr/bin/env python # # # 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 #...
apache-2.0
-4,628,943,126,422,300,000
24.815385
65
0.678784
false
alu042/edx-platform
lms/djangoapps/verify_student/services.py
46
4978
""" Implementation of "reverification" service to communicate with Reverification XBlock """ import logging from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.db import IntegrityError from opaque_keys.edx.keys import CourseKey from student.models import Us...
agpl-3.0
6,446,926,082,162,347,000
35.072464
117
0.641824
false
overxfl0w/Doogle
indexer.py
1
4570
#!/usr/bin/env python # -*- coding: utf-8 -*- # Authors: Jose & Alberto # from glob import glob from sys import argv from re import sub,findall,match,compile,DOTALL from nltk.corpus import stopwords from nltk.stem import SnowballStemmer import codecs try: from cPickle import dump,HIGHEST_PROTOCOL except: from pickle i...
gpl-2.0
9,171,836,926,650,113,000
45.040404
143
0.698552
false
duointeractive/django-fabtastic
fabtastic/fabric/commands/c_common.py
1
3745
import os import sys from fabric.api import * from fabtastic import db from fabtastic.fabric.util import _current_host_has_role def get_remote_db(roles='webapp_servers'): """ Retrieves a remote DB dump and dumps it in your project's root directory. """ if _current_host_has_role(roles): dump_fil...
bsd-3-clause
-319,741,337,675,480,900
38.851064
96
0.613351
false
quantumgraph/mongo-query-aggregator
tests/test_upsert.py
1
3413
import unittest import time from pymongo import MongoClient from moquag import MongoQueryAggregator from time import sleep from .settings import MONGO_DB_SETTINGS, logger from collections import Counter class TestBulk(unittest.TestCase): def setUp(self): self.conn = MongoClient(**MONGO_DB_SETTINGS) ...
mit
-5,288,481,906,591,701,000
39.152941
92
0.572224
false
ArcherSys/ASOSBLOCKLY
js/converse.js-0.8.3/docs/source/conf.py
2
7768
# -*- coding: utf-8 -*- # # Converse.js documentation build configuration file, created by # sphinx-quickstart on Fri Apr 26 20:48:03 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # #...
gpl-3.0
-3,227,144,408,095,933,000
30.836066
80
0.703141
false
jiajiechen/mxnet
python/mxnet/monitor.py
46
5239
# 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,549,079,762,643,299,000
35.636364
108
0.585035
false
ritchyteam/odoo
addons/hw_scanner/controllers/main.py
77
7438
# -*- coding: utf-8 -*- import logging import os import time from os import listdir from os.path import join from threading import Thread, Lock from select import select from Queue import Queue, Empty import openerp import openerp.addons.hw_proxy.controllers.main as hw_proxy from openerp import http from openerp.http ...
agpl-3.0
-776,763,778,741,510,300
33.435185
121
0.43587
false
annarev/tensorflow
tensorflow/lite/schema/upgrade_schema.py
23
12976
# ============================================================================== # Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at ...
apache-2.0
-4,610,382,209,479,274,500
35.968661
80
0.645114
false
bdero/edx-platform
common/lib/xmodule/xmodule/tests/test_tabs.py
21
25887
"""Tests for Tab classes""" from mock import MagicMock import xmodule.tabs as tabs import unittest from opaque_keys.edx.locations import SlashSeparatedCourseKey class TabTestCase(unittest.TestCase): """Base class for Tab-related test cases.""" def setUp(self): self.course = MagicMock() self.c...
agpl-3.0
8,332,030,988,492,024,000
37.986446
132
0.60992
false
abhitopia/tensorflow
tensorflow/python/estimator/inputs/queues/feeding_queue_runner.py
123
6899
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-2,268,018,429,787,137,300
37.327778
80
0.641252
false
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/pandas/computation/tests/test_compat.py
9
2001
#!/usr/bin/env python # flake8: noqa import nose from itertools import product from distutils.version import LooseVersion import pandas as pd from pandas.util import testing as tm from pandas.computation.engines import _engines import pandas.computation.expr as expr ENGINES_PARSERS = list(product(_engines, expr._p...
gpl-3.0
7,636,102,792,017,423,000
28
79
0.571214
false
woozzu/pylearn2
pylearn2/sandbox/cuda_convnet/pool.py
47
28462
""" .. todo:: WRITEME """ import warnings from theano.gof import Apply from theano.sandbox.cuda import CudaNdarrayType from theano.sandbox.cuda.basic_ops import as_cuda_ndarray_variable from theano.sandbox.cuda.basic_ops import gpu_contiguous from theano.sandbox.cuda import GpuOp from theano.tensor import get_sca...
bsd-3-clause
-7,703,950,079,623,846,000
29.903366
111
0.527581
false
kiddinn/plaso
plaso/cli/helpers/output_modules.py
4
3181
# -*- coding: utf-8 -*- """The output modules CLI arguments helper.""" import sys from plaso.cli import tools from plaso.cli.helpers import interface from plaso.cli.helpers import manager from plaso.lib import errors from plaso.output import manager as output_manager class OutputModulesArgumentsHelper(interface.Arg...
apache-2.0
1,079,125,163,877,038,100
33.956044
79
0.686577
false
Nolski/olympia
apps/amo/monitors.py
15
5198
import os import socket import StringIO import traceback from django.conf import settings import commonware.log from PIL import Image import amo.search from amo.helpers import user_media_path from applications.management.commands import dump_apps monitor_log = commonware.log.getLogger('z.monitor') def memcache():...
bsd-3-clause
4,299,013,529,282,862,000
30.889571
78
0.588303
false
muravjov/ansible-modules-core
windows/win_ping.py
68
1363
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>, and others # # 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 ...
gpl-3.0
5,891,510,494,931,413,000
27.395833
70
0.727073
false
Workday/OpenFrame
tools/telemetry/third_party/gsutilz/third_party/apitools/apitools/base/py/encoding_test.py
12
13894
import base64 import datetime import json from protorpc import message_types from protorpc import messages from protorpc import util import unittest2 from apitools.base.py import encoding from apitools.base.py import exceptions class SimpleMessage(messages.Message): field = messages.StringField(1) repfield ...
bsd-3-clause
271,831,492,783,076,960
39.389535
79
0.642867
false
rahulunair/nova
nova/tests/unit/cmd/test_common.py
1
5356
# Copyright 2016 Cloudbase Solutions Srl # 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 r...
apache-2.0
1,258,161,162,325,935,400
36.454545
78
0.640963
false
hasgeek/funnel
funnel/forms/notification.py
1
8978
from __future__ import annotations from collections import namedtuple from flask import url_for from baseframe import __ import baseframe.forms as forms from ..models import User, notification_type_registry from ..transports import platform_transports __all__ = [ 'transport_labels', 'UnsubscribeForm', ...
agpl-3.0
-995,960,363,134,097,800
39.981735
88
0.642897
false
timkrentz/SunTracker
IMU/VTK-6.2.0/IO/Geometry/Testing/Python/TestAVSucdReader.py
2
1247
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Read some AVS UCD data in ASCII form r = vtk.vtkAVSucdReader() r.SetFileName("" + str(VTK_DATA_ROOT) + "/Data/cellsnd.ascii.inp") AVSMapper = vtk.vtkDataSetMapper() AVSMap...
mit
1,545,641,893,649,568,000
30.815789
66
0.7498
false
hogarthj/ansible
test/units/module_utils/basic/test_selinux.py
41
11401
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com> # (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 ...
gpl-3.0
3,393,321,795,605,224,000
44.242063
136
0.614069
false
stormi/tsunami
src/primaires/perso/commandes/prompt/defaut.py
1
4813
# -*-coding:Utf-8 -* # Copyright (c) 2010 LE GOFF Vincent # 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 # lis...
bsd-3-clause
1,897,013,413,755,218,700
43.785047
82
0.631678
false
marrow/mongo
marrow/mongo/core/field/reference.py
1
3191
# encoding: utf-8 from __future__ import unicode_literals from collections import Mapping from bson import ObjectId as OID from bson import DBRef from bson.errors import InvalidId from .. import Document, Field from ....package.canonical import name as canon from ....package.loader import traverse from ....schema i...
mit
2,784,253,759,384,873,000
26.042373
109
0.669069
false
sprockets/sprockets.http
examples.py
1
1891
from tornado import web from sprockets.http import app, mixins import sprockets.http class StatusHandler(mixins.ErrorLogger, mixins.ErrorWriter, web.RequestHandler): """Example that exercises the mix-ins in this library.""" def get(self, status_code): """ Returns the requ...
bsd-3-clause
898,375,526,712,694,900
28.546875
78
0.492861
false
miyataken999/weblate
weblate/wsgi.py
2
1918
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.org/> # # 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, eith...
gpl-3.0
-8,054,748,986,284,039,000
38.895833
79
0.775457
false
donspaulding/adspygoogle
tests/adspygoogle/dfa/v1_19/dfa_logger_unittest.py
3
2579
#!/usr/bin/python # # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
-3,190,718,362,306,368,500
31.64557
79
0.688639
false
heikoheiko/pyethapp
pyethapp/db_service.py
1
1454
from devp2p.service import BaseService from ethereum.slogging import get_logger log = get_logger('db') # load available databases dbs = {} try: from leveldb_service import LevelDBService except ImportError: pass else: dbs['LevelDB'] = LevelDBService try: from codernitydb_service import CodernityDB ex...
bsd-3-clause
-1,011,082,983,556,521,900
21.71875
88
0.636864
false
SixTrack/SixDesk
boinc_software/monitor-boinc-server/general-activity/parseHTML.py
1
10987
""" A.Mereghetti, 2017-01-29 script for parsing the server_status.php and getting values from tables NB: html file is a table of tables! parsing of HTML table based on: http://codereview.stackexchange.com/questions/60769/scrape-an-html-table-with-python reminders on html tables: - <table>: start a new table; - <tr>: ...
lgpl-2.1
-3,068,080,590,717,398,000
34.672078
204
0.554838
false
dagwieers/ansible
lib/ansible/plugins/action/edgeos_config.py
42
1305
# # Copyright 2018 Red Hat 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 version 3 of the License, or # (at your option) any later version. # # Ansibl...
gpl-3.0
-5,087,002,510,175,522,000
36.285714
148
0.727203
false
dkm/RIOT
dist/tools/pyterm/testbeds/testbeds.py
100
7138
#!/usr/bin/python2 # -*- coding: utf-8 -*- # Copyright (C) 2014 Philipp Rosenkranz <philipp.rosenkranz@fu-berlin.de> # # This library 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...
lgpl-2.1
3,693,539,682,966,187,000
38.005464
166
0.636733
false
albfan/terminator
terminatorlib/keybindings.py
3
4960
#!/usr/bin/env python2 # Terminator - multiple gnome terminals in one window # Copyright (C) 2006-2010 cmsj@tenshu.net # # 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 2 only. # # T...
gpl-2.0
8,813,324,707,676,661,000
37.449612
112
0.566331
false
robbiet480/home-assistant
homeassistant/components/ambiclimate/__init__.py
7
1057
"""Support for Ambiclimate devices.""" import logging import voluptuous as vol from homeassistant.const import CONF_CLIENT_ID, CONF_CLIENT_SECRET from homeassistant.helpers import config_validation as cv from . import config_flow from .const import DOMAIN _LOGGER = logging.getLogger(__name__) CONFIG_SCHEMA = vol.S...
apache-2.0
3,023,496,579,552,882,700
21.489362
71
0.647114
false
appsembler/edx-platform
lms/djangoapps/grades/tests/integration/test_events.py
1
9599
""" Test grading events across apps. """ # pylint: disable=protected-access from mock import call as mock_call, patch from unittest import skip from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory from courseware.tests.test_submitting_problems import ProblemSubmissionTestMixin from lms.djangoa...
agpl-3.0
-3,085,182,432,292,365,300
43.439815
109
0.558391
false
xtao/code
tests/test_user_fav.py
3
1359
# -*- coding: utf-8 -*- from tests.base import TestCase from vilya.models.user_fav import UserFavItem from vilya.models.consts import K_PULL, K_ISSUE class TestUser(TestCase): def test_add_fav(self): user_id = "testuser" pull_id = 1 kind = K_PULL UserFavItem.add(user_id, pull_id...
bsd-3-clause
2,745,335,463,954,887,700
28.543478
77
0.601913
false
axinging/chromium-crosswalk
third_party/logilab/logilab/astroid/builder.py
66
9425
# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of astroid. # # astroid 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 #...
bsd-3-clause
90,148,327,993,938,660
38.270833
80
0.57931
false
BBN-Q/PySimulator
tests/SimSpeedTest.py
1
5046
# -*- coding: utf-8 -*- """ Created on Wed Dec 5 21:44:22 2012 @author: cryan """ import numpy as np from numpy import sin, cos from scipy.constants import pi from scipy.linalg import expm, eigh from PySim.SystemParams import SystemParams from PySim.PulseSequence import PulseSequence from PySim.Simulation import s...
apache-2.0
7,210,422,255,238,354,000
33.8
164
0.666072
false
jvanasco/beaker
beaker/ext/sqla.py
7
4721
from beaker._compat import pickle import logging import pickle from datetime import datetime from beaker.container import OpenResourceNamespaceManager, Container from beaker.exceptions import InvalidCacheBackendError, MissingCacheParameter from beaker.synchronization import file_synchronizer, null_synchronizer from b...
bsd-3-clause
-3,884,995,232,124,757,000
33.459854
84
0.57975
false
fHachenberg/pyecstaticalib
Ecstatica/XmlLoad.py
1
29497
# coding: utf-8 #Created on 12.02.2012 #Copyright (C) 2013 Fabian Hachenberg #This file is part of EcstaticaLib. #EcstaticaLib 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...
gpl-3.0
7,498,014,993,207,590,000
38.91475
156
0.58745
false
kartikgupta0909/mozilla-mozharness
configs/single_locale/staging_release_mozilla-beta_android.py
4
4884
BRANCH = "mozilla-beta" MOZ_UPDATE_CHANNEL = "beta" MOZILLA_DIR = BRANCH OBJDIR = "obj-l10n" STAGE_SERVER = "dev-stage01.srv.releng.scl3.mozilla.com" #STAGE_SERVER = "stage.mozilla.org" EN_US_BINARY_URL = "http://" + STAGE_SERVER + "/pub/mozilla.org/mobile/candidates/%(version)s-candidates/build%(buildnum)d/android/en-...
mpl-2.0
5,781,391,005,986,482,000
41.842105
176
0.566339
false
regular/pyglet-avbin-optimizations
experimental/buffer/sprites.py
28
2875
#!/usr/bin/python # $Id:$ import random import sys from pyglet.gl import * from pyglet import clock from pyglet import image from pyglet import window from pyglet.graphics import vertexdomain if len(sys.argv) > 1: SPRITES = int(sys.argv[1]) else: SPRITES = 2000 SPRITE_IMAGE = 'examples/noisy/ball.png' # Ho...
bsd-3-clause
3,844,158,706,963,540,500
24
69
0.54087
false
cryptickp/heat
heat/engine/resources/stack_resource.py
1
21691
# # 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
-3,277,772,739,392,380,400
38.727106
79
0.585266
false
JVenberg/PokemonGo-Bot-Desktop
pywin/Lib/UserDict.py
62
7060
"""A more or less complete user-defined wrapper around dictionary objects.""" class UserDict: def __init__(*args, **kwargs): if not args: raise TypeError("descriptor '__init__' of 'UserDict' object " "needs an argument") self = args[0] args = args[1:]...
mit
5,384,610,070,043,947,000
32.14554
79
0.540227
false
funkring/fdoo
addons/sale/wizard/sale_make_invoice_advance.py
163
10872
############################################################################## # # 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 Affero General Public L...
agpl-3.0
-1,915,896,450,821,997,300
48.418182
151
0.565029
false
beckastar/django
tests/many_to_one_regress/tests.py
26
5397
from __future__ import unicode_literals from django.db import models from django.test import TestCase from .models import ( First, Third, Parent, Child, Category, Record, Relation, Car, Driver) class ManyToOneRegressionTests(TestCase): def test_object_creation(self): Third.objects.create(id='3', nam...
bsd-3-clause
-4,230,020,347,298,393,000
40.515385
110
0.644803
false
bnbowman/HlaTools
src/pbhla/amplicons/__init__.py
10
1848
################################################################################# # Copyright (c) 2013, Pacific Biosciences of California, 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: # ...
bsd-3-clause
762,440,046,398,244,700
58.612903
81
0.716991
false
bitcity/django
django/contrib/gis/gdal/driver.py
526
3260
from ctypes import c_void_p from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import GDALException from django.contrib.gis.gdal.prototypes import ds as vcapi, raster as rcapi from django.utils import six from django.utils.encoding import force_bytes, force_text class Driver(GDALBas...
bsd-3-clause
-4,665,547,903,520,708,000
32.608247
104
0.580982
false
jmiserez/pox
tools/pox-gui.py
2
9886
#!/usr/bin/env python ''' POX GUI This file creates the main application window, sets up the layout and invokes the GUI's widgets. The left panel (log) is used for displaying context-specific information. The right panel (topology) is an interactive display of the topology. @author Kyriakos Zarifis (kyr.zarifis@gmail....
gpl-3.0
-2,705,463,180,128,674,000
34.949091
94
0.627756
false
porcobosso/spark-ec2
lib/boto-2.34.0/tests/unit/s3/test_website.py
114
9219
# Copyright (c) 2013 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 ...
apache-2.0
4,406,239,272,212,531,700
39.082609
82
0.598004
false
NicCOConnor/ansible-modules-extras
cloud/cloudstack/cs_portforward.py
31
13774
#!/usr/bin/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 Lice...
gpl-3.0
-902,405,341,616,296,600
32.185542
106
0.621043
false
yoghadj/or-tools
examples/python/nonogram_table2.py
34
6833
# Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.com # # 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
-8,907,125,230,616,967,000
26.441767
100
0.637348
false
dongjoon-hyun/spark
python/pyspark/mllib/linalg/__init__.py
15
46746
# # 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 us...
apache-2.0
-1,628,542,225,373,512,000
31.372576
99
0.531703
false
gannetson/django
tests/forms_tests/tests/test_media.py
169
45896
# -*- coding: utf-8 -*- from django.forms import CharField, Form, Media, MultiWidget, TextInput from django.template import Context, Template from django.test import SimpleTestCase, override_settings from django.utils.encoding import force_text @override_settings( STATIC_URL=None, MEDIA_URL='http://media.exam...
bsd-3-clause
3,355,250,518,135,988,000
49.214442
173
0.567588
false
BlackEarth/bl
bl/progress.py
1
2750
import inspect, logging, os, sys, traceback from time import time from bl.dict import Dict from bl.json import JSON log = logging.getLogger(__name__) class Progress(JSON): """tabulate progress statistics for given processes, and report the progress of those processes""" def __init__(self, fn=None, data=None, key...
mpl-2.0
679,735,867,812,688,000
32.13253
100
0.674182
false
sathnaga/avocado-vt
virttest/libvirt_xml/accessors.py
1
36382
""" Specializations of base.AccessorBase for particular XML manipulation types """ import logging from virttest import xml_utils from virttest import element_tree from virttest.propcan import PropCanBase from virttest.libvirt_xml import xcepts, base def type_check(name, thing, expected): """ Check that thin...
gpl-2.0
-6,498,123,844,251,117,000
39.379578
98
0.529932
false
obeattie/sqlalchemy
lib/sqlalchemy/connectors/mxodbc.py
1
2562
import sys import re from sqlalchemy.connectors import Connector class MxODBCConnector(Connector): driver='mxodbc' supports_sane_multi_rowcount = False supports_unicode_statements = False supports_unicode_binds = False supports_native_decimal = False @classmethod def dbapi(cls):...
mit
7,643,970,590,080,443,000
32.272727
72
0.603825
false
bart-h/linux-kernel-wm8505
scripts/gdb/linux/modules.py
1029
2597
# # gdb helper commands and functions for Linux kernel debugging # # module tools # # Copyright (c) Siemens AG, 2013 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb from linux import cpus, utils, lists module_type = utils.CachedTy...
gpl-2.0
723,222,921,050,544,400
26.336842
78
0.57836
false
TonyThompson/fail2ban-patch
fail2ban/server/jail.py
4
6813
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*- # vi: set ft=python sts=4 ts=4 sw=4 noet : # This file is part of Fail2Ban. # # Fail2Ban 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;...
gpl-2.0
6,310,411,975,314,429,000
28.240343
98
0.690004
false
kvar/ansible
lib/ansible/modules/network/nxos/nxos_snmp_contact.py
106
3931
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
4,140,366,138,243,421,700
25.924658
81
0.650979
false
yunque/sms-tools
lectures/06-Harmonic-model/plots-code/monophonic-polyphonic.py
21
2258
import numpy as np import matplotlib.pyplot as plt from scipy.signal import hamming, triang, blackmanharris import sys, os, functools, time sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../software/models/')) import sineModel as SM import stft as STFT import utilFunctions as UF plt.f...
agpl-3.0
4,578,877,195,632,859,000
32.220588
111
0.676705
false
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/eggs/boto-2.27.0-py2.7.egg/boto/contrib/__init__.py
396
1107
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
gpl-3.0
-1,756,804,066,504,736,500
49.318182
74
0.768744
false
irvingpop/digital-beer-menu
src/lib/werkzeug/testsuite/wsgi.py
54
8693
# -*- coding: utf-8 -*- """ werkzeug.testsuite.wsgi ~~~~~~~~~~~~~~~~~~~~~~~ Tests the WSGI utilities. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import unittest from os import path from cStringIO import StringIO ...
gpl-2.0
-3,897,388,188,012,600,000
36.66087
99
0.567536
false
tvibliani/odoo
addons/hr_attendance/wizard/__init__.py
375
1073
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
6,704,530,606,969,660,000
43.708333
78
0.616962
false
kalwar/openelisglobal-core
liquibase/OE3.4/testCatalogCI_IPCI/scripts/sortSections.py
13
1111
#!/usr/bin/env python # -*- coding: utf-8 -*- def convert_to_existing_name( name ): if name == 'Hemato-immunologie' or name == 'H�mato-immunologie': return 'Hemto-Immunology' elif name == 'Biochimie': return 'Biochemistry' elif name == 'H�matologie' or name == 'Hematologie': ...
mpl-2.0
-1,854,626,006,358,126,600
30.617647
152
0.598916
false
rkhleics/wagtailmenus
wagtailmenus/models/mixins.py
2
4937
from django.template.loader import get_template, select_template from wagtailmenus.conf import settings from wagtailmenus.utils.inspection import accepts_kwarg def get_item_by_index_or_last_item(items, index): if items is None: return try: return items[index] except IndexError: re...
mit
849,191,545,158,885,100
40.487395
79
0.616771
false
javier3407/Plugin.Video.JavierTV
resources/tools/shidurlive.py
4
4691
# -*- coding: utf-8 -*- #------------------------------------------------------------ # Regex de Shidurlive para PalcoTV # Version 0.1 (15.10.2014) #------------------------------------------------------------ # License: GPL (http://www.gnu.org/licenses/gpl-3.0.html) # Gracias a la librería plugintools de Jesús (www.mi...
gpl-2.0
-1,850,196,321,607,025,700
35.874016
182
0.633355
false
nansencenter/nansat
nansat/tests/test_pointbrowser.py
1
3888
# ------------------------------------------------------------------------------ # Name: test_pointbrowser.py # Purpose: Test the PointBrowser class # # Author: Aleksander Vines, Anton Korosov # # Created: 2015-10-22 # Copyright: (c) NERSC # Licence: This file is part of NANSAT. You can ...
gpl-3.0
5,704,891,376,783,519,000
34.345455
85
0.600309
false