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
kontais/EFI-MIPS
ToolKit/cmds/python/Lib/base64.py
7
11261
#! /usr/bin/env python """RFC 3548: Base16, Base32, Base64 Data Encodings""" # Modified 04-Oct-1995 by Jack Jansen to use binascii module # Modified 30-Dec-2003 by Barry Warsaw to add full RFC 3548 support import re import struct import binascii __all__ = [ # Legacy interface exports traditional RFC 1521 Base6...
bsd-3-clause
6,864,509,106,308,675,000
30.107735
78
0.595684
false
redhat-openstack/ironic
ironic/tests/common/test_disk_partitioner.py
3
8877
# Copyright 2014 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
apache-2.0
5,499,461,690,389,595,000
43.833333
79
0.528332
false
tdr130/ARDT
ARDT.py
9
4935
#!/usr/bin/env python # ###################################### import threading import re import sys import time import socket import string import random import hashlib import Queue c_g = "\033[1;32m" c_r = "\033[1;31m" c_y = "\033[1;33m" c_e = "\033[0m" target = "" akamai_ips = [] base_request = "" threads = [...
gpl-2.0
-5,622,923,735,651,769,000
26.416667
732
0.636272
false
jkakavas/creepy
creepy/ui/PersonProjectWizard.py
7
18769
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '.\personProjectWizard.ui' # # Created: Fri Jan 31 15:30:24 2014 # by: PyQt4 UI code generator 4.9.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 ...
gpl-3.0
22,272,355,462,730,944
82.417778
324
0.779424
false
martinghunt/Fastaq
pyfastaq/tests/intervals_test.py
2
9339
#!/usr/bin/env python3 import unittest from pyfastaq import intervals class TestIntervals(unittest.TestCase): def test_init(self): '''Throw error if try to construct genome_interval from a non-int, or end<start''' with self.assertRaises(intervals.Error): intervals.Interval('a', 1) ...
gpl-3.0
6,391,297,924,381,389,000
41.067568
97
0.593747
false
wattlebird/pystruct
pystruct/tests/test_learners/test_primal_dual.py
5
1151
#from crf import BinaryGridCRF #from structured_svm import NSlackSSVM, SubgradientSSVM #from structured_svm import objective_primal, PrimalDSStructuredSVM #from toy_datasets import binary #def test_primal_dual_binary(): #for C in [1, 100, 100000]: #for dataset in binary: #X, Y = dataset(n_samp...
bsd-2-clause
-4,332,070,732,081,085,400
41.62963
71
0.56907
false
solashirai/edx-platform
lms/djangoapps/course_blocks/tests/test_signals.py
9
2116
""" Unit tests for the Course Blocks signals """ from xmodule.modulestore.exceptions import ItemNotFoundError from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory from ..api import get_course_blocks, _get_block_structure_manager from ..tr...
agpl-3.0
445,194,021,282,653,900
40.490196
107
0.721645
false
Noirello/PyLDAP
tests/test_tornado.py
1
7802
import unittest import sys import pytest from conftest import get_config, network_delay from bonsai import LDAPClient from bonsai import LDAPEntry import bonsai.errors def dummy(timeout=None): def dummy_f(f): return f return dummy_f try: from tornado import gen from tornado.testing import...
mit
865,521,617,047,090,800
35.629108
86
0.550244
false
montoyjh/pymatgen
pymatgen/electronic_structure/bandstructure.py
1
41712
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import numpy as np import math import itertools import collections import warnings from monty.json import MSONable from pymatgen.core.periodic_table import get_el_sp from pymatgen.core.structure import Struct...
mit
-676,974,746,694,923,400
39.97446
101
0.53282
false
darren-wang/gl
glance/tests/integration/v2/test_tasks_api.py
5
20030
# Copyright 2013 Rackspace Hosting # 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 require...
apache-2.0
8,380,838,150,023,207,000
35.352087
79
0.565202
false
ThiagoGarciaAlves/erpnext
erpnext/templates/pages/product_search.py
29
1184
# 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 from frappe.utils import cstr from erpnext.setup.doctype.item_group.item_group import get_item_for_list_in_html no_cache = 1 no_sitemap =...
agpl-3.0
-3,131,648,091,549,166,000
29.358974
85
0.688345
false
jakirkham/nanshe
tests/test_nanshe/test_imp/test_registration.py
3
24055
__author__ = "John Kirkham <kirkhamj@janelia.hhmi.org>" __date__ = "$Feb 20, 2015 10:40:15 EST$" import nose import nose.plugins import nose.plugins.attrib import os import shutil import tempfile import h5py import numpy import nanshe.io.hdf5.serializers import nanshe.imp.registration from past.builtins import b...
bsd-3-clause
-677,713,587,896,744,800
24.214885
71
0.476491
false
gary-pickens/HouseMonitor
housemonitor/lib/waitforsystemtime.py
1
1545
''' Created on Dec 14, 2013 @author: gary ''' from datetime import datetime import time class WaitForSystemTime( object ): ''' When HouseMonitor is starting at boot time, the NTP (Network Time Protocol) has not set the time yet. This class delays the start until the system time has been set. '''...
mit
-6,216,288,742,393,243,000
27.090909
74
0.594175
false
prmtl/fuel-web
fuel_agent_ci/fuel_agent_ci/drivers/fabric_driver.py
4
4071
# Copyright 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...
apache-2.0
-4,002,654,429,508,231,000
34.094828
77
0.589781
false
mistercrunch/airflow
airflow/contrib/operators/gcs_to_s3.py
7
1631
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
5,580,610,664,724,588,000
36.068182
96
0.720417
false
danakj/chromium
tools/perf/core/benchmark_finders.py
14
1238
# Copyright 2015 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 imp import inspect import os import sys from core import perf_benchmark def GetClassFilePath(clazz): """ Return the absolute file path to |clazz|....
bsd-3-clause
1,190,419,418,544,215,000
30.74359
80
0.705977
false
valesi/electrum
plugins/cosigner_pool/qt.py
4
6879
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2014 Thomas Voegtlin # # 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 y...
gpl-3.0
4,982,712,453,873,649,000
32.8867
151
0.58933
false
internap/almanach
tests/auth/test_mixed_auth.py
1
2037
# Copyright 2016 Internap. # # 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
-3,238,183,001,054,495,000
41.4375
113
0.735886
false
schettino72/nikola
nikola/data/themes/base/messages/messages_hi.py
6
2054
# -*- encoding:utf-8 -*- from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "पढ़ने में %d मिनट बाकी", "(active)": "", "Also available in:": "उपलब्ध भाषाएँ:", "Archive": "आर्काइव", "Categories": "श्रेणियाँ", "Comments": "टिप्पणियाँ", "LANGUAGE": "हिन्दी", "L...
mit
-8,039,683,895,320,288,000
34.641026
73
0.471942
false
coala/coala
tests/bears/BearTest.py
4
31575
import pdb import os from collections import defaultdict import datetime from io import BytesIO, StringIO import multiprocessing import unittest from os.path import abspath, exists, isfile, join, getmtime from tempfile import TemporaryDirectory, NamedTemporaryFile import shutil from freezegun import freeze_time from u...
agpl-3.0
-7,395,492,256,786,567,000
38.126394
80
0.590911
false
SunghanKim/mwparserfromhell
tests/test_builder.py
3
21872
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2015 Ben Kurtovic <ben.kurtovic@gmail.com> # # 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 ...
mit
4,305,054,947,200,492,000
48.475113
79
0.553366
false
klausman/scion
python/lib/crypto/trc.py
1
14393
# Copyright 2014 ETH Zurich # # 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, sof...
apache-2.0
-1,832,684,012,152,019,700
36.871053
96
0.598638
false
elliterate/capybara.py
tests/_test_selenium_marionette.py
1
2359
import os import pytest from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.firefox.options import Options import capybara from capybara.selenium.driver import Driver from capybara.session import Session from capybara.tests.app import app from capybara.tests.suite imp...
mit
1,059,170,167,414,687,000
32.225352
78
0.72234
false
yanheven/neutron
neutron/tests/unit/objects/test_base.py
6
13419
# 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
-6,890,074,864,445,030,000
38.122449
78
0.605112
false
EDUlib/edx-platform
openedx/features/course_experience/tests/views/test_course_outline.py
1
34329
""" Tests for the Course Outline view and supporting views. """ import datetime import re import ddt import six from completion.waffle import ENABLE_COMPLETION_TRACKING_SWITCH from completion.models import BlockCompletion from completion.test_utils import CompletionWaffleTestMixin from django.contrib.sites.models im...
agpl-3.0
-494,362,490,768,276,200
43.699219
183
0.659879
false
opendatateam/udata
udata/core/issues/tasks.py
2
2336
from udata import mail from udata.i18n import lazy_gettext as _ from udata.models import Dataset, Reuse from udata.tasks import connect, get_logger from .models import Issue, Message from .signals import on_new_issue, on_new_issue_comment, on_issue_closed log = get_logger(__name__) def owner_recipients(issue): ...
agpl-3.0
2,922,285,658,324,438,500
37.933333
78
0.659247
false
houseind/robothon
GlyphProofer/dist/GlyphProofer.app/Contents/Resources/lib/python2.6/numpy/f2py/diagnose.py
7
5683
#!/usr/bin/env python import os,sys,tempfile def run_command(cmd): print 'Running %r:' % (cmd) s = os.system(cmd) print '------' def run(): _path = os.getcwd() os.chdir(tempfile.gettempdir()) print '------' print 'os.name=%r' % (os.name) print '------' print 'sys.platform=%r' % (sy...
mit
1,156,515,901,983,183,600
33.23494
101
0.48302
false
oblitum/ycmd
ycmd/completers/completer_utils.py
1
9555
# Copyright (C) 2013 Google Inc. # # This file is part of ycmd. # # ycmd 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. # # ycmd is di...
gpl-3.0
4,772,879,747,813,162,000
36.324219
80
0.632548
false
beav/pulp
bindings/pulp/bindings/auth.py
2
4622
# -*- coding: utf-8 -*- # # Copyright © 2012 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or impli...
gpl-2.0
-343,089,840,848,470,400
33.485075
75
0.592729
false
Trax-air/swagger-stub
travis_pypi_setup.py
1
3768
#!/usr/bin/env python # -*- coding: utf-8 -*- """Update encrypted deploy password in Travis config file """ from __future__ import print_function import base64 import json import os from getpass import getpass import yaml from cryptography.hazmat.primitives.serialization import load_pem_public_key from cryptography.h...
mit
5,696,835,382,458,828,000
29.885246
80
0.679406
false
wangyarui/deep-learning
rnn/train-theano.py
1
3943
#! /usr/bin/env python import csv import itertools import operator import numpy as np import nltk import sys import os import time from datetime import datetime from utils import * from rnn_theano import RNNTheano _VOCABULARY_SIZE = int(os.environ.get('VOCABULARY_SIZE', '8000')) _HIDDEN_DIM = int(os.environ.get('HIDD...
unlicense
4,335,853,474,409,367,600
40.505263
124
0.673852
false
pdfminer/pdfminer.six
tests/test_pdfminer_psparser.py
2
3053
import logging from nose.tools import assert_equal from pdfminer.psparser import KWD, LIT, PSBaseParser, PSStackParser, PSEOF logger = logging.getLogger(__name__) class TestPSBaseParser: """Simplistic Test cases""" TESTDATA = br'''%!PS begin end " @ # /a/BCD /Some_Name /foo#5f#xbaa 0 +1 -2 .5 1.234 (abc...
mit
7,970,602,359,698,973,000
28.931373
79
0.47396
false
edx/edx-platform
openedx/core/djangoapps/credit/services.py
3
7489
""" Implementation of "credit" XBlock service """ import logging from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.core.exceptions import ObjectDoesNotExist from opaque_keys.edx.keys import CourseKey from common.djangoapps.student.models import CourseEnrollmen...
agpl-3.0
1,703,073,508,382,825,700
33.995327
105
0.59741
false
OpenTrons/opentrons-api
robot-server/tests/service/session/test_router.py
2
14869
import pytest from unittest.mock import MagicMock, patch from datetime import datetime import typing from pydantic.main import BaseModel from robot_server.service.dependencies import get_session_manager from robot_server.service.session.command_execution import CommandExecutor, \ Command from robot_server.servic...
apache-2.0
-8,265,883,172,919,127,000
30.569002
119
0.521689
false
angelapper/edx-platform
lms/djangoapps/edxnotes/views.py
5
6721
""" Views related to EdxNotes. """ import json import logging from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.http import Http404, HttpResponse from django.views.decorators.http import require_GET from opaque_keys.edx.k...
agpl-3.0
-1,188,266,086,755,511,000
31.626214
108
0.596637
false
endlessm/chromium-browser
tools/grit/grit/pseudo_unittest.py
5
1861
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. '''Unit tests for grit.pseudo''' from __future__ import print_function import os import sys if __name__ == '__main__': sys.path...
bsd-3-clause
1,148,394,896,949,791,000
32.836364
72
0.653412
false
msavoury/machine-learning
apps/rateawatch/rateawatch.py
1
2526
import os import webapp2 import jinja2 import webapp2 import json from google.appengine.ext import ndb JINJA_ENVIRONMENT = jinja2.Environment( loader=jinja2.FileSystemLoader(os.path.dirname(__file__)), extensions=['jinja2.ext.autoescape'], autoescape=True) class UserRating(ndb.Model): username = ndb...
mit
307,169,230,011,078,660
31.805195
71
0.641726
false
AZtheAsian/zulip
zerver/views/integrations.py
4
5338
from __future__ import absolute_import from typing import Optional, Any, Dict from collections import OrderedDict from django.views.generic import TemplateView from django.conf import settings from django.http import HttpRequest, HttpResponse, HttpResponseNotFound import os import ujson from zerver.lib import bugdown...
apache-2.0
1,749,742,848,947,373,600
39.135338
125
0.611652
false
dppereyra/pyamazonclouddrive
bin/acdsession.py
10
3367
#!/usr/bin/env python # # Copyright (c) 2011 anatanokeitai.com(sakurai_youhei) # # 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 right...
mit
9,216,724,403,935,162,000
29.889908
76
0.696763
false
gautam1858/tensorflow
tensorflow/python/profiler/option_builder.py
13
16616
# 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
-4,446,657,029,276,592,600
34.733333
128
0.618861
false
xkcd1253/Mimi
flask/lib/python2.7/site-packages/flask_whooshalchemy.py
5
9043
''' whooshalchemy flask extension ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Adds whoosh indexing capabilities to SQLAlchemy models for Flask applications. :copyright: (c) 2012 by Karl Gyllstrom :license: BSD (see LICENSE.txt) ''' from __future__ import with_statement from __future__ import absolute_imp...
gpl-2.0
4,833,850,226,278,433,000
32.246324
82
0.607652
false
ZxlAaron/mypros
python/pyspark/ml/classification.py
10
64620
# # 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
5,156,803,246,546,186,000
37.694611
100
0.61874
false
arlolra/flashproxy
experiments/proxy-extract.py
3
2497
#!/usr/bin/env python import datetime import getopt import re import sys def usage(f = sys.stdout): print >> f, """\ Usage: %s [INPUTFILE] Extract proxy connections from a facilitator log. Each output line is date\tcount\n where count is the approximate poll interval in effect at date. -h, --help ...
mit
-4,201,470,982,416,928,000
29.45122
114
0.642371
false
h3biomed/ansible
lib/ansible/modules/network/fortios/fortios_log_syslogd_override_setting.py
23
12526
#!/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
7,582,874,373,944,974,000
31.117949
104
0.509181
false
cmvandrevala/finance_scripts
tests/portfolio_creator/test_portfolio_creator.py
1
4436
import unittest import json from portfolio_creator.portfolio_creator import PortfolioCreator class MockDataSource: def get(self): return json.dumps({"snapshots": [{"timestamp": "2017-01-02", "institution": "John's Union", ...
mit
3,293,467,591,836,899,000
47.217391
105
0.457845
false
stef1927/python-driver
docs/conf.py
6
7188
# -*- coding: utf-8 -*- # # Cassandra Driver documentation build configuration file, created by # sphinx-quickstart on Mon Jul 1 11:40:09 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...
apache-2.0
4,259,747,190,828,340,700
31.672727
96
0.711603
false
dmlc/tvm
tests/python/contrib/test_coreml_codegen.py
3
6157
# 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
1,426,598,191,818,227,700
26.243363
98
0.626117
false
abhishekgahlot/flask
setup.py
9
3041
""" Flask ----- Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions. And before you ask: It's BSD licensed! Flask is Fun ```````````` .. code:: python from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __n...
bsd-3-clause
4,386,557,360,297,393,000
26.396396
79
0.585663
false
job/pypeer
bin/get_routes_from_session.py
2
1560
#!/usr/bin/env python import argparse import sys from lxml import etree sys.path.append('./lib') from jnpr.junos import Device from pypeer.ConfigDictionary import ConfigDictionary from pypeer.RouteData import RouteData def main(device_ip, peer_ip): config = ConfigDictionary() username = config.username() ...
mit
-1,282,931,392,251,232,000
27.363636
104
0.6
false
simgislab/osm-geocode
address_parser.py
1
2655
# -*- coding: utf-8 -*- """ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as ...
gpl-2.0
1,332,626,209,184,329,700
36.685714
114
0.50417
false
johankaito/fufuka
microblog/flask/venv/lib/python2.7/site-packages/celery/app/__init__.py
6
4380
# -*- coding: utf-8 -*- """ celery.app ~~~~~~~~~~ Celery Application. """ from __future__ import absolute_import import os from celery.local import Proxy from celery import _state from celery._state import ( get_current_app as current_app, get_current_task as current_task, connect_on_app_fin...
apache-2.0
-3,282,554,475,946,911,000
28.2
76
0.612329
false
yarikoptic/pystatsmodels
statsmodels/sandbox/nonparametric/densityorthopoly.py
3
17839
# -*- coding: cp1252 -*- # some cut and paste characters are not ASCII '''density estimation based on orthogonal polynomials Author: Josef Perktold Created: 2011-05017 License: BSD 2 versions work: based on Fourier, FPoly, and chebychev T, ChebyTPoly also hermite polynomials, HPoly, works other versions need normali...
bsd-3-clause
-6,597,284,244,583,072,000
30.351494
98
0.572958
false
benjaoming/lcrs
lcrs/master/ui/mainwindow.py
2
7625
# -*- coding: utf-8 -*- # # LCRS Copyright (C) 2009-2011 # - Benjamin Bach # # LCRS 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-3.0
-1,067,136,764,861,414,500
33.977064
115
0.595016
false
chifflier/libprelude
bindings/tools/idmef-path-gd.py
4
5722
#!/usr/bin/python # # Graph IDMEF Messages # import time import sys sys.path.append('.') sys.path.append('./.libs') import gd try: import PreludeEasy except: print "Import failed" print "Try 'cd ./.libs && ln -s libprelude_python.so _PreludeEasy.so'" sys.exit(1) # # GD Constants # timel...
gpl-2.0
-7,571,392,418,003,852,000
28.647668
99
0.573401
false
moonboots/tensorflow
tensorflow/python/ops/control_flow_grad.py
2
7938
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-2,382,441,656,723,787,300
37.533981
80
0.695767
false
nils-wisiol/ddns
src/ddns/errors.py
1
4280
#!/usr/bin/python ############################################################################### # # # ddns - A dynamic DNS client for IPFire # # Copyright (C) 2012 IPFire development team ...
gpl-3.0
8,554,441,590,693,067,000
26.792208
91
0.589252
false
ctrlaltdel/neutrinator
vendor/openstack/tests/unit/load_balancer/test_quota.py
3
2997
# Copyright (c) 2018 China Telecom Corporation # 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 # # Un...
gpl-3.0
-2,897,508,562,307,050,000
36
78
0.669002
false
gastrodia/Cinnamon
files/usr/lib/cinnamon-settings/cinnamon-settings.py
7
25817
#!/usr/bin/env python2 import sys reload(sys) sys.setdefaultencoding('utf-8') sys.path.append('/usr/lib/cinnamon-settings/modules') sys.path.append('/usr/lib/cinnamon-settings/bin') import os import glob import gettext import gi gi.require_version('Gtk', '3.0') from gi.repository import Gio, Gtk, GObject, GdkPixbuf, ...
gpl-2.0
-2,137,927,399,424,171,300
41.743377
200
0.564318
false
gazeti/aleph
aleph/model/collection.py
2
6250
import logging from datetime import datetime from sqlalchemy import func, cast from sqlalchemy.dialects.postgresql import ARRAY from aleph.core import db, url_for from aleph.model.validate import validate from aleph.model.role import Role from aleph.model.permission import Permission from aleph.model.common import IdM...
mit
2,366,045,524,785,914,400
36.42515
79
0.60224
false
eteq/erikutils
erikutils/xkeckhelio.py
1
23585
#This is a direct port of x_keckhelio.pro from XIDL from __future__ import division, print_function from math import pi from numpy import cos, sin import numpy as np def x_keckhelio(ra, dec, epoch=2000.0, jd=None, tai=None, longitude=None, latitude=None, altitude=None, obs='keck'): """ `ra` an...
mit
7,700,543,838,721,033,000
37.855025
85
0.578418
false
mattrobenolt/invoke
invoke/collection.py
5
15319
import copy import types from .vendor import six from .vendor.lexicon import Lexicon from .config import merge_dicts from .parser import Context as ParserContext from .tasks import Task class Collection(object): """ A collection of executable tasks. """ def __init__(self, *args, **kwargs): "...
bsd-2-clause
-8,001,643,771,406,033,000
37.880711
123
0.590639
false
Evgenus/revigred-server
revigred/protocol.py
1
1500
import asyncio import json from autobahn.asyncio.websocket import ( WebSocketServerProtocol, WebSocketServerFactory, ) class ServerProtocol(WebSocketServerProtocol): def onConnect(self, request): self.client = self.model.create_new_user() self.client.connect(self) self.logger.d...
bsd-3-clause
-5,139,739,119,801,721,000
29.632653
105
0.625333
false
deanhiller/databus
webapp/play1.3.x/python/Lib/encodings/utf_32.py
3
5098
""" Python 'utf-32' Codec """ import codecs, sys ### Codec APIs encode = codecs.utf_32_encode def decode(input, errors='strict'): return codecs.utf_32_decode(input, errors, True) class IncrementalEncoder(codecs.IncrementalEncoder): def __init__(self, errors='strict'): codecs.Incrementa...
mpl-2.0
694,609,488,705,437,200
33.402778
75
0.572774
false
rmartinjak/sagenb
sagenb/notebook/auth.py
6
4496
class AuthMethod(): """ Abstract class for authmethods that are used by ExtAuthUserManager All auth methods must implement the following methods """ def __init__(self, conf): self._conf = conf def check_user(self, username): raise NotImplementedError def check_password(sel...
gpl-2.0
-6,063,709,309,822,882,000
29.794521
79
0.554048
false
c2corg/v6_api
c2corg_api/tests/models/test_cache_version.py
1
17818
import datetime from c2corg_api.models.area import Area from c2corg_api.models.area_association import AreaAssociation from c2corg_api.models.association import Association from c2corg_api.models.cache_version import CacheVersion, \ update_cache_version, update_cache_version_associations, \ update_cache_versio...
agpl-3.0
-5,723,569,617,226,166,000
42.995062
79
0.66343
false
xcyan/models
pcl_rl/policy.py
13
16946
# 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 applicab...
apache-2.0
7,729,494,943,596,259,000
36.995516
87
0.613006
false
DiegoSelle/master_thesis
cloud_exploration.py
1
12064
import numpy as np from mesonh_atm.mesonh_atmosphere import MesoNHAtmosphere import matplotlib.pyplot as plt from scipy.interpolate import RegularGridInterpolator import modules.cloud as ModCloud #Old Data without advection path = "/net/skyscanner/volume1/data/mesoNH/ARM_OneHour3600files_No_Horizontal_Wind/" mfiles = ...
mit
4,372,990,722,579,709,000
39.483221
114
0.625663
false
operep/PythonAutoLearn
complexPrograms/euCapitalsQuizGenerator.py
1
2717
#! python2 #Program which will use dictionary and generate random quiz files with #questions and answers in random order along with answer key import random, os #The quiz data. dictionary={'United Kingdom' : 'London', 'Albania' : 'Tirana', 'Andorra' : 'Andorra la Vella', 'Austria' : 'Vienna', ...
gpl-3.0
4,456,716,308,613,281,300
45.050847
88
0.598454
false
lextoumbourou/txstripe
stripe/test/resources/test_charges.py
4
3120
import stripe from stripe.test.helper import ( StripeResourceTest, NOW, DUMMY_CHARGE ) class ChargeTest(StripeResourceTest): def test_charge_list(self): stripe.Charge.list(created={'lt': NOW}) self.requestor_mock.request.assert_called_with( 'get', '/v1/charges', ...
mit
6,645,618,441,985,686,000
26.610619
67
0.50609
false
flavour/RedHat
modules/unit_tests/s3db/pr.py
7
23399
# -*- coding: utf-8 -*- # # PR Unit Tests # # To run this script use: # python web2py.py -S eden -M -R applications/eden/modules/unit_tests/s3db/pr.py # import unittest import datetime from gluon import * from gluon.storage import Storage from lxml import etree # =====================================================...
mit
5,767,524,883,297,620,000
36.558587
84
0.546348
false
cchristelis/watchkeeper
django_project/event_mapper/migrations/0001_initial.py
5
7921
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone from django.conf import settings import django.contrib.gis.db.models.fields class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.C...
bsd-2-clause
2,204,084,221,235,948,000
59.007576
213
0.604722
false
cyanna/edx-platform
lms/djangoapps/bulk_email/tests/test_models.py
14
7465
""" Unit tests for bulk-email-related models. """ from django.test import TestCase from django.core.management import call_command from django.conf import settings from student.tests.factories import UserFactory from mock import patch, Mock from bulk_email.models import CourseEmail, SEND_TO_STAFF, CourseEmailTemplat...
agpl-3.0
-5,334,411,548,091,353,000
41.175141
137
0.673543
false
OniOniOn-/MCEdit-Unified
pymclevel/player.py
11
1697
import nbt import version_utils class Player: def __init__(self, playerNBTFile): self.nbtFile = playerNBTFile self.nbtFileName = playerNBTFile.split("\\")[-1] self.root_tag = nbt.load(playerNBTFile) # Properties setup self._uuid = self.nbtFileName.split(".")[0] pl...
isc
2,621,828,147,134,761,000
24.328358
113
0.582793
false
rafaelmartins/pyoembed
setup.py
1
1114
#!/usr/bin/env python # -*- coding: utf-8 -*- """ setup.py ~~~~~~~~ :copyright: (c) 2014 by Rafael Goncalves Martins :license: GPL-2, see LICENSE for more details. """ from setuptools import setup, find_packages import os cwd = os.path.dirname(os.path.abspath(__file__)) setup( name='pyoembed', ...
bsd-3-clause
-6,753,817,959,143,042,000
24.906977
77
0.60772
false
thanatos/crypto-tools
crypto_tools/generate_private_key.py
1
3190
"""Generate a private key.""" import argparse import getpass import sys from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import rsa # Two good sources for this: # First, the crpyto SE: # http://crypto.s...
mit
-6,496,813,991,280,293,000
29.084906
96
0.643775
false
zvolsky/codex2020
languages/fr.py
1
9162
# -*- coding: utf-8 -*- { '!langcode!': 'fr', '!langname!': 'Français', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression optionnelle comme "champ1=\'nouvellevaleur\'". Vous ne pouvez mettre à jour ou supprimer les résultats ...
agpl-3.0
-1,561,224,637,631,581,700
39.636771
293
0.687817
false
pombredanne/algos-urv
django/db/models/sql/compiler.py
9
44075
from django.core.exceptions import FieldError from django.db import connections from django.db.backends.util import truncate_name from django.db.models.sql.constants import * from django.db.models.sql.datastructures import EmptyResultSet from django.db.models.sql.expressions import SQLEvaluator from django.db.mod...
bsd-3-clause
6,440,348,684,551,839,000
42.837233
108
0.534884
false
ilay09/keystone
keystone/tests/unit/common/test_injection.py
14
7730
# Copyright 2012 OpenStack Foundation # # 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...
apache-2.0
5,019,655,915,812,358,000
31.478992
79
0.621087
false
home-assistant/home-assistant
homeassistant/components/esphome/climate.py
5
9358
"""Support for ESPHome climate devices.""" from __future__ import annotations from aioesphomeapi import ( ClimateAction, ClimateFanMode, ClimateInfo, ClimateMode, ClimateState, ClimateSwingMode, ) from homeassistant.components.climate import ClimateEntity from homeassistant.components.climate....
apache-2.0
428,674,981,804,760,640
30.089701
84
0.635713
false
DigitalCampus/django-ujjwal-oppia
oppia/quiz/admin.py
6
1718
# oppia/quiz/admin.py from django.contrib import admin from oppia.quiz.models import Quiz, Question, Response, ResponseProps, QuestionProps from oppia.quiz.models import QuizProps, QuizQuestion, QuizAttempt, QuizAttemptResponse class QuizAttemptAdmin(admin.ModelAdmin): list_display = ('user', 'quiz', 'attempt_dat...
gpl-3.0
4,412,428,456,045,342,000
39.928571
106
0.74447
false
DailyActie/Surrogate-Model
01-codes/scikit-learn-master/examples/covariance/plot_mahalanobis_distances.py
1
6231
r""" ================================================================ Robust covariance estimation and Mahalanobis distances relevance ================================================================ An example to show covariance estimation with the Mahalanobis distances on Gaussian distributed data. For Gaussian dis...
mit
4,281,541,903,728,256,500
42.573427
79
0.679827
false
gorcz/mercurial
mercurial/templatefilters.py
2
13028
# template-filters.py - common template expansion filters # # Copyright 2005-2008 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import cgi, re, os, time, urllib import encoding, node, util import h...
gpl-2.0
1,865,124,696,221,018,000
29.227378
80
0.575683
false
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/pylint/checkers/strings.py
8
26724
# Copyright (c) 2009-2010 Arista Networks, Inc. - James Lingard # Copyright (c) 2004-2013 LOGILAB S.A. (Paris, FRANCE). # Copyright 2012 Google Inc. # # http://www.logilab.fr/ -- mailto:contact@logilab.fr # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Publ...
agpl-3.0
-5,079,807,530,429,138,000
42.453659
84
0.549805
false
TaxIPP-Life/til-france
til_france/data/data/Destinie.py
1
28133
# -*- coding:utf-8 -*- ''' Created on 11 septembre 2013 Ce programme : Input : Output : ''' import logging from pandas import merge, DataFrame, concat, read_table import numpy as np import os import pdb import time import sys # 1- Importation des classes/librairies/tables nécessaires à l'importation des données de ...
gpl-3.0
-679,478,304,218,613,800
47.010309
120
0.533498
false
GeosoftInc/gxapi
spec/ps/DOCEGEO.py
1
5366
from .. import Availability, Class, Constant, Define, Method, Parameter, Type gx_class = Class('DOCEGEO', doc="Technical Services GX functions Header File for Docegeo") gx_defines = [ ] gx_methods = { 'Docegeo': [ Method('IPSectionPlot_DOCEGEO', module='geocsdocegeo', version='6.3.0', ...
bsd-2-clause
-2,517,532,100,698,699,300
42.274194
79
0.422102
false
albertomurillo/ansible
lib/ansible/modules/network/f5/bigip_remote_syslog.py
14
14569
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
-3,912,569,845,770,745,000
30.063966
132
0.599149
false
Distrotech/intellij-community
python/helpers/pydev/third_party/pep8/autopep8.py
21
121747
#!/usr/bin/env python # # Copyright (C) 2010-2011 Hideo Hattori # Copyright (C) 2011-2013 Hideo Hattori, Steven Myint # Copyright (C) 2013-2014 Hideo Hattori, Steven Myint, Bill Wendling # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation file...
apache-2.0
-5,528,320,661,522,171,000
32.020613
79
0.537245
false
deryni/cockpit
test/verify/machinesxmls.py
1
4667
# This file is part of Cockpit. # # Copyright (C) 2020 Red Hat, Inc. # # Cockpit 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.1 of the License, or # (at your option) any later versio...
lgpl-2.1
1,977,698,032,751,698,700
24.78453
80
0.596957
false
plotly/plotly.py
packages/python/plotly/plotly/graph_objs/volume/_caps.py
2
6821
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Caps(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "volume" _path_str = "volume.caps" _valid_props = {"x", "y", "z"} # x # - @propert...
mit
863,666,565,619,956,100
31.327014
82
0.500806
false
etherkit/OpenBeacon2
macos/venv/lib/python3.8/site-packages/pip/_internal/utils/glibc.py
24
3297
# The following comment should be removed at some point in the future. # mypy: strict-optional=False from __future__ import absolute_import import os import sys from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from typing import Optional, Tuple def glibc_version_string(): #...
gpl-3.0
2,129,941,661,303,765,500
32.642857
111
0.676979
false
xpowerx5005/Weekday-Calculator
Weekday Calculator.py
1
11835
#Input in the entry boxes of 'Year', 'Month' and 'Day' #Month must be written as a number between 1-12 #Press "Calculate" button to return weekday of the given date from time import* from tkinter import* class Calculator: #GUI LAYOUT def __init__(self, master): self.master = master self....
apache-2.0
-7,962,390,991,995,282,000
39.251701
95
0.496704
false
aleximplode/s4scraper
scrapef.py
1
9681
#!/usr/bin/python ''' Author: Alexander Godlewski Year: 2011 A script to browse through the leaderboards for SOCOM 4 using multiprocessing to overcome network blocking Gather the results and dump to a CSV file There are issues with the implementation of the leaderboards ...
mit
-3,767,706,355,816,823,300
34.595588
157
0.528664
false
highweb-project/highweb-webcl-html5spec
testing/test_env.py
12
8394
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Sets environment variables needed to run a chromium unit test.""" import os import stat import subprocess import sys # This is...
bsd-3-clause
-6,769,126,356,607,834,000
33.68595
80
0.668096
false
nathanielvarona/airflow
tests/task/task_runner/test_cgroup_task_runner.py
3
1867
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
6,412,202,582,494,916,000
42.418605
89
0.728441
false
vmahuli/contrail-controller
src/config/test/utils/verification_util.py
29
3819
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import urllib2 import xmltodict import json import requests from lxml import etree import socket class JsonDrv (object): def _http_con(self, url): return urllib2.urlopen(url) def load(self, url): return json.load(self._htt...
apache-2.0
2,835,414,122,174,178,300
24.46
79
0.524221
false
evernym/zeno
plenum/server/inconsistency_watchers.py
2
1031
from typing import Callable, Iterable from plenum.server.quorums import Quorums class NetworkInconsistencyWatcher: def __init__(self, cb: Callable): self.callback = cb self._nodes = set() self._connected = set() self._quorums = Quorums(0) self._reached_consensus = False ...
apache-2.0
-8,176,798,623,406,414,000
30.242424
95
0.627546
false
rhijul/jaikuengine
settings.py
28
11254
# Copyright 2009 Google 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, s...
apache-2.0
-9,122,076,332,528,893,000
26.925558
79
0.734672
false
listamilton/supermilton.repository
plugin.video.olhardigital/default.py
1
1215
# -*- coding: utf-8 -*- #------------------------------------------------------------ # http://www.youtube.com/user/moshipery #------------------------------------------------------------ # Licença: GPL (http://www.gnu.org/licenses/gpl-3.0.html) # Baseado no código do addon youtube #------------------------------------...
gpl-2.0
36,636,912,093,056,300
24.808511
69
0.580033
false
renner/spacewalk
spacecmd/src/lib/shell.py
3
7608
# # Licensed under the GNU General Public License Version 3 # # 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 p...
gpl-2.0
-6,142,400,948,772,226,000
30.053061
79
0.560594
false
pomegranited/edx-platform
cms/djangoapps/contentstore/features/checklists.py
3
4725
# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step from nose.tools import assert_true, assert_equal from selenium.common.exceptions import StaleElementReferenceException ############### ACTIONS #################### @step('I select Checklists from the Tools menu...
agpl-3.0
3,535,864,958,596,505,600
36.8
115
0.695661
false