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
ahmadio/edx-platform
lms/djangoapps/mobile_api/social_facebook/groups/views.py
86
4938
""" Views for groups info API """ from rest_framework import generics, status, mixins from rest_framework.response import Response from django.conf import settings import facebook from ...utils import mobile_view from . import serializers @mobile_view() class Groups(generics.CreateAPIView, mixins.DestroyModelMixin)...
agpl-3.0
-5,134,061,850,296,026,000
33.531469
117
0.614824
false
johnsonc/OTM2
opentreemap/treemap/tests/ui/uitest_registration_views.py
12
2858
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from time import sleep from django.core.urlresolvers import reverse from django.core import mail from registration.models import RegistrationProfile from treemap.tests.ui import UITes...
gpl-3.0
4,118,574,749,859,539,500
29.731183
76
0.659902
false
catb0t/simpleforth
forth.py
1
7114
#!/usr/bin/env python3 import builtins from pmlr import pmlr debug_write = pmlr.util.debug_write ERR_DATA = { ZeroDivisionError: {"IS_FATAL": False, "TYPE": "DEBUG"}, LookupError: {"IS_FATAL": False, "TYPE": "RANGE"}, IndexError: {"IS_FATAL": False, "TYPE": "RANGE"}, TypeError: ...
gpl-3.0
8,776,950,339,713,067,000
27.805668
127
0.50984
false
skidzen/grit-i18n
grit/tool/build.py
2
19603
#!/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. '''The 'grit build' tool along with integration for this tool with the SCons build system. ''' import filecmp import getopt import...
bsd-2-clause
-7,293,954,927,933,790,000
38.363454
83
0.644442
false
minosg/piblinker
piblinker.py
1
14790
#!/usr/bin/env python """blinky.py: A small library that uses wiriping pi access to raspbery pi GPIO ports,aimed at providing a simple notification interface""" __author__ = "minos197@gmail.com" __license__ = "LGPL" __version__ = "0.0.1" __email__ = "Minos Galanakis" __project__ = "smartpi" __date__ = "01-06-2015"...
lgpl-2.1
-7,796,536,866,510,282,000
30.468085
79
0.529479
false
jonwright/ImageD11
scripts/plotImageD11map.py
1
1829
#!/usr/bin/env python from __future__ import print_function from ImageD11.grain import read_grain_file import sys, os gf = read_grain_file(sys.argv[1]) mapfile=open(sys.argv[2],"w") def dodot(xyz,k): mapfile.write("%f %f %f %d\n"%(xyz[0],xyz[1],xyz[2],k)) def getmedian(s): items=s.split() j = -1 fo...
gpl-2.0
-5,133,550,507,565,548,000
21.304878
88
0.574631
false
inspyration/odoo
addons/email_template/tests/test_mail.py
124
14318
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
-2,380,559,610,332,477,000
57.680328
172
0.60155
false
eicher31/compassion-modules
child_compassion/mappings/household_mapping.py
3
3536
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py...
agpl-3.0
8,306,735,830,094,433,000
40.116279
78
0.565328
false
go-bears/nupic
src/nupic/encoders/category.py
39
7798
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
-742,178,916,835,247,100
29.944444
113
0.662349
false
dvliman/jaikuengine
.google_appengine/lib/django-1.5/tests/regressiontests/extra_regress/models.py
114
1365
from __future__ import unicode_literals import copy import datetime from django.contrib.auth.models import User from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class RevisionableModel(models.Model): base = models.ForeignKey('self', null=Tru...
apache-2.0
-6,502,126,748,451,387,000
29.333333
75
0.667399
false
goFrendiAsgard/kokoropy
kokoropy/packages/sqlalchemy/dialects/mysql/pyodbc.py
32
2640
# mysql/pyodbc.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mysql+pyodbc :name: PyODBC :dbapi: pyodbc :connectstr...
mit
-6,467,777,041,147,659,000
31.195122
77
0.660606
false
chienlieu2017/it_management
odoo/addons/website_event/controllers/main.py
7
11571
# -*- coding: utf-8 -*- import babel.dates import re import werkzeug from datetime import datetime, timedelta from dateutil.relativedelta import relativedelta from odoo import fields, http, _ from odoo.addons.website.models.website import slug from odoo.http import request class WebsiteEventController(http.Controll...
gpl-3.0
8,617,715,063,772,964,000
43.675676
213
0.551465
false
derekjchow/models
research/deeplab/core/nas_cell.py
1
8432
# Copyright 2018 The TensorFlow Authors All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
4,058,546,181,967,095,300
41.371859
80
0.629032
false
lancezlin/ml_template_py
lib/python2.7/site-packages/sklearn/metrics/tests/test_score_objects.py
15
17443
import pickle import tempfile import shutil import os import numbers import numpy as np from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_raises from sklearn.utils.testing import assert_raises_regexp from sklearn.utils.t...
mit
-8,321,461,546,816,175,000
37.935268
79
0.64513
false
14thibea/megamix
megamix/batch/DPGMM.py
1
20644
# -*- coding: utf-8 -*- # #Created on Fri Apr 14 15:21:17 2017 # #author: Elina Thibeau-Sutre # from .initializations import initialize_log_assignements,initialize_mcw from .base import _full_covariance_matrices from .base import _log_normal_matrix from .base import BaseMixture from .base import _log_B import numpy a...
apache-2.0
5,893,400,732,939,769,000
37.733583
137
0.544565
false
sgarrity/bedrock
lib/l10n_utils/management/commands/fluent.py
8
3597
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from pathlib import Path import textwrap from django.core.management.base import BaseCommand class Command(BaseComman...
mpl-2.0
-920,462,829,349,169,400
35.333333
98
0.627189
false
kevinmel2000/brython
www/src/Lib/test/unittests/test_cgitb.py
113
2551
from test.support import run_unittest from test.script_helper import assert_python_failure, temp_dir import unittest import sys import cgitb class TestCgitb(unittest.TestCase): def test_fonts(self): text = "Hello Robbie!" self.assertEqual(cgitb.small(text), "<small>{}</small>".format(text)) ...
bsd-3-clause
-8,993,424,027,276,596,000
35.442857
80
0.573501
false
rhololkeolke/apo-website-devin
src/application/facebook/facebook.py
2
8731
""" This module contains helper classes and methods for the facebook integration module .. module:: application.facebook.facebook .. moduleauthor:: Devin Schwab <dts34@case.edu> """ import facebooksdk as fb import models from flask import flash class AlbumList(object): def __init__(self, token): """ ...
bsd-3-clause
2,272,791,862,150,649,300
33.928
109
0.529607
false
korotkyn/ibis
ibis/expr/tests/test_temporal.py
9
5955
# Copyright 2014 Cloudera Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
apache-2.0
9,129,429,547,262,664,000
31.900552
74
0.537196
false
hectord/lettuce
tests/integration/lib/Django-1.2.5/django/core/handlers/base.py
44
9926
import sys from django import http from django.core import signals from django.utils.encoding import force_unicode from django.utils.importlib import import_module class BaseHandler(object): # Changes that are always applied to a response (in this order). response_fixes = [ http.fix_location_header, ...
gpl-3.0
7,864,434,311,480,931,000
44.118182
143
0.598428
false
ARM-software/mbed-beetle
tools/host_tests/host_tests_plugins/module_copy_smart.py
2
4378
""" mbed SDK Copyright (c) 2011-2013 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
apache-2.0
6,523,961,272,627,055,000
36.101695
101
0.553906
false
ahmadio/edx-platform
lms/lib/courseware_search/lms_filter_generator.py
58
5634
""" This file contains implementation override of SearchFilterGenerator which will allow * Filter by all courses in which the user is enrolled in """ from microsite_configuration import microsite from student.models import CourseEnrollment from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import Co...
agpl-3.0
7,445,365,950,426,380,000
45.561983
107
0.63241
false
goliate/sarakha63-persomov
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/twentyfourvideo.py
32
3892
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( parse_iso8601, int_or_none, ) class TwentyFourVideoIE(InfoExtractor): IE_NAME = '24video' _VALID_URL = r'https?://(?:www\.)?24video\.net/(?:video/(?:view|xml)/|player/new24_play\.swf\?id=)(...
gpl-3.0
5,228,835,369,578,570,000
34.018349
114
0.517422
false
longman694/youtube-dl
youtube_dl/extractor/watchbox.py
14
5539
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( int_or_none, js_to_json, strip_or_none, try_get, unified_timestamp, ) class WatchBoxIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?w...
unlicense
2,893,657,285,305,545,700
35.668874
116
0.506773
false
mesocentrefc/easybuild-framework
easybuild/tools/version.py
2
2926
## # Copyright 2009-2014 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (htt...
gpl-2.0
-6,282,021,567,314,024,000
34.253012
100
0.719754
false
kinghaitao/git-core
scripts/rt-tester/rt-tester.py
904
5366
#!/usr/bin/env python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt impor...
gpl-2.0
-8,372,066,044,332,046,000
23.171171
70
0.493291
false
broferek/ansible
test/units/modules/network/f5/test_bigip_service_policy.py
38
4128
# -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest import sys if sys.version_info < (2...
gpl-3.0
-4,717,631,936,433,852,000
30.272727
97
0.644864
false
wavelets/zipline
zipline/examples/dual_ema_talib.py
2
3230
#!/usr/bin/env python # # Copyright 2013 Quantopian, 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 ...
apache-2.0
-1,037,034,474,115,704,300
34.108696
77
0.644892
false
crmccreary/openerp_server
openerp/addons/account_bank_statement_extensions/account_bank_statement.py
9
6553
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
agpl-3.0
8,069,233,019,505,464,000
46.839416
157
0.610255
false
ProfessionalIT/maxigenios-website
sdk/google_appengine/lib/django-1.2/django/db/models/sql/datastructures.py
396
1157
""" Useful auxilliary data structures for query construction. Not useful outside the SQL domain. """ class EmptyResultSet(Exception): pass class FullResultSet(Exception): pass class MultiJoin(Exception): """ Used by join construction code to indicate the point at which a multi-valued join was att...
mit
2,795,459,522,885,896,000
24.152174
76
0.607606
false
wuga214/Django-Wuga
env/lib/python2.7/site-packages/pip/_vendor/distlib/markers.py
1261
6282
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # """Parser for the environment markers micro-language defined in PEP 345.""" import ast import os import sys import platform from .compa...
apache-2.0
4,225,784,778,292,974,600
32.063158
77
0.552053
false
paulgclark/rf_utilities
zmq_utils.py
1
1239
import zmq import array import time import struct import numpy as np import pmt import sys class zmq_pull_socket(): def __init__(self, tcp_str, verbose=0): self.context = zmq.Context() self.receiver = self.context.socket(zmq.PULL) self.receiver.connect(tcp_str) def poll(self, type_str...
mit
2,149,555,878,925,307,400
27.813953
63
0.596449
false
kcpawan/django
tests/many_to_one/models.py
215
2785
""" Many-to-one relationships To define a many-to-one relationship, use ``ForeignKey()``. """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Reporter(models.Model): first_name = models.CharFiel...
bsd-3-clause
-1,773,659,522,397,237,800
26.85
97
0.712029
false
xguse/ggplot
ggplot/geoms/geom_abline.py
12
1487
from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from ggplot.utils import make_iterable_ntimes from .geom import geom # Note when documenting # slope and intercept can be functions that compute the slope # and intercept using the data. If ...
bsd-2-clause
-1,214,483,387,473,522,000
34.404762
66
0.569603
false
Vegasvikk/django-cms
cms/models/static_placeholder.py
49
3452
import uuid from django.contrib.auth import get_permission_codename from django.contrib.sites.models import Site from django.core.exceptions import ValidationError from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from cm...
bsd-3-clause
5,500,780,088,044,019,000
39.139535
114
0.659328
false
home-assistant/home-assistant
tests/components/hisense_aehw4a1/test_init.py
5
2927
"""Tests for the Hisense AEH-W4A1 init file.""" from unittest.mock import patch from pyaehw4a1 import exceptions from homeassistant import config_entries, data_entry_flow from homeassistant.components import hisense_aehw4a1 from homeassistant.setup import async_setup_component async def test_creating_entry_sets_up_...
apache-2.0
3,011,705,839,678,666,000
34.695122
86
0.665186
false
ChanChiChoi/scikit-learn
examples/model_selection/plot_roc.py
146
3697
""" ======================================= Receiver Operating Characteristic (ROC) ======================================= Example of Receiver Operating Characteristic (ROC) metric to evaluate classifier output quality. ROC curves typically feature true positive rate on the Y axis, and false positive rate on the X a...
bsd-3-clause
7,034,067,062,988,640,000
34.548077
79
0.675412
false
difro/kubernetes
examples/cluster-dns/images/backend/server.py
468
1313
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
apache-2.0
6,005,757,674,417,908,000
34.486486
78
0.752475
false
vipulkanade/EventbriteDjango
lib/python2.7/site-packages/django/middleware/clickjacking.py
284
1989
""" Clickjacking Protection Middleware. This module provides a middleware that implements protection against a malicious site loading resources from your site in a hidden frame. """ from django.conf import settings class XFrameOptionsMiddleware(object): """ Middleware that sets the X-Frame-Options HTTP head...
mit
6,088,704,932,504,675,000
37.25
79
0.677728
false
rcolasanti/CompaniesHouseScraper
DVLACompanyNmeMatchCoHoAPIFindMissing.py
1
5174
import requests import json import numpy as np import pandas as pd import CoHouseToken from difflib import SequenceMatcher # In[3]: def exactMatch(line1, line2): line1=line1.upper().rstrip() line2=line2.upper().rstrip() #print("|"+line1+"|"+line2+"|",line1==line2) return line1==line2 def ...
gpl-3.0
-9,107,299,095,821,690,000
20.380165
110
0.55547
false
lyft/incubator-airflow
airflow/kubernetes/pod_generator.py
2
22063
# 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
-4,377,916,697,781,541,400
38.398214
110
0.632235
false
rochoa85/pyMIC
examples/data_map/data_map.py
1
1674
#!/usr/bin/python # Copyright (c) 2014, Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright # notice, th...
bsd-3-clause
-9,068,146,142,489,116,000
43.052632
75
0.771207
false
javierTerry/odoo
addons/email_template/html2text.py
440
14143
#!/usr/bin/env python """html2text: Turn HTML into equivalent Markdown-structured text.""" __version__ = "2.36" __author__ = "Aaron Swartz (me@aaronsw.com)" __copyright__ = "(C) 2004-2008 Aaron Swartz. GNU GPL 3." __contributors__ = ["Martin 'Joey' Schulze", "Ricardo Reyes", "Kevin Jay North"] # TODO: # Support deco...
agpl-3.0
-7,231,034,888,977,510,000
29.812636
109
0.466096
false
saguila/AlgoritmoA
pqdict.py
2
16450
"""Copyright (c) 2012 Nezar Abdennur This module contains code adapted from the Python implementation of the heapq module, which was written by Kevin O'Connor and augmented by Tim Peters and Raymond Hettinger. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated...
mit
-5,154,796,241,812,267,000
31.193738
80
0.561641
false
ashwinikd/xhprof-dataextract
lib/sql.py
1
1165
DROP_TBL_PERFDATA = "DROP TABLE perfdata" CREATE_TBL_PERFDATA = """CREATE TABLE `perfdata` ( `pk` int(11) NOT NULL AUTO_INCREMENT, `id` varchar(16) NOT NULL, `fn` varchar(256) NOT NULL, `wt` int(11) NOT NULL, `ct` int(11) NOT NULL, `pmu` int(11) NOT NULL, `mu` int(11) NOT NULL, `cpu` int(11) NOT NULL, ...
bsd-3-clause
-5,667,717,924,082,559,000
26.093023
102
0.582833
false
laurent-george/weboob
modules/barclays/pages.py
6
10301
# -*- coding: utf-8 -*- # Copyright(C) 2012 Romain Bignon # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
agpl-3.0
-2,684,563,615,446,834,700
40.865854
125
0.491407
false
nash-x/hws
neutron/service.py
3
10505
# Copyright 2011 VMware, 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 a...
apache-2.0
-2,348,898,602,650,476,500
34.133779
79
0.620086
false
mclaughlin6464/pasta
pasta/ising.py
1
5474
''' This is a dummy file for me to get started making an Ising model. I'll get this 2-D Ising running, then generalize. ''' import argparse from itertools import izip import numpy as np from matplotlib import pyplot as plt import seaborn as sns sns.set() def run_ising(N, d, K, J,h, n_steps, plot = False): ''' ...
mit
-154,069,744,090,616,030
28.278075
115
0.568871
false
benoitsteiner/tensorflow-opencl
tensorflow/python/client/session_test.py
11
71617
# 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
2,883,305,308,870,016,000
39.994276
88
0.627868
false
mhnatiuk/phd_sociology_of_religion
scrapper/lib/python2.7/site-packages/scrapy/contrib/linkextractors/htmlparser.py
11
2468
""" HTMLParser-based link extractor """ from HTMLParser import HTMLParser from urlparse import urljoin from w3lib.url import safe_url_string from scrapy.link import Link from scrapy.utils.python import unique as unique_list class HtmlParserLinkExtractor(HTMLParser): def __init__(self, tag="a", attr="href", pro...
gpl-2.0
-148,817,184,968,540,600
31.906667
97
0.60778
false
Cynary/distro6.01
arch/6.01Soft/lib601-F13-4/build/lib/soar/io/io_useif.py
2
3114
# # soar # io.py - object-oriented interface to the robot # # This io file makes use of the "official" soar interface # (sonarDistances, etc), and it is still ugly, since it relies on having # a handle on the brain environment, but it is arguably neater than # the io.py file. However it seems to introduce some kind ...
mit
-9,170,203,133,476,238,000
36.518072
72
0.635196
false
wanghaoran1988/origin
cmd/cluster-capacity/go/src/github.com/kubernetes-incubator/cluster-capacity/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-e2e/reactive/kubernetes_e2e.py
100
7192
#!/usr/bin/env python # Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
-6,698,703,982,956,785,000
34.60396
78
0.663515
false
darryncampbell/KerrieWorking-Angular
app/bower_components/bootstrap/test-infra/s3_cache.py
1700
3523
#!/usr/bin/env python2.7 from __future__ import absolute_import, unicode_literals, print_function, division from sys import argv from os import environ, stat, remove as _delete_file from os.path import isfile, dirname, basename, abspath from hashlib import sha256 from subprocess import check_call as run from boto.s3....
mit
2,759,179,791,188,848,600
31.925234
114
0.675844
false
njvack/ge-mri-rtafni
scanner-console/vendor/dicom/contrib/imViewer_Simple.py
4
12358
#========================================================================== # imViewer-Simple.py # # An example program that opens uncompressed DICOM images and # converts them via numPy and PIL to be viewed in wxWidgets GUI # apps. The conversion is currently: # # pydicom->NumPy->PIL->wxPython.Image->wxPython.B...
mit
-4,177,575,431,541,067,000
40.891525
185
0.515941
false
vadimtk/chrome4sdp
tools/telemetry/third_party/gsutilz/third_party/pyasn1/test/type/test_constraint.py
53
8746
from pyasn1.type import constraint, error from pyasn1.error import PyAsn1Error from sys import version_info if version_info[0:2] < (2, 7) or \ version_info[0:2] in ( (3, 0), (3, 1) ): try: import unittest2 as unittest except ImportError: import unittest else: import unittest class Single...
bsd-3-clause
4,188,259,075,324,585,500
30.235714
83
0.601418
false
pschmitt/home-assistant
homeassistant/components/tof/sensor.py
11
3309
"""Platform for Time of Flight sensor VL53L1X from STMicroelectronics.""" import asyncio from functools import partial import logging from VL53L1X2 import VL53L1X # pylint: disable=import-error import voluptuous as vol from homeassistant.components import rpi_gpio from homeassistant.components.sensor import PLATFOR...
apache-2.0
-2,562,695,181,623,962,600
29.638889
86
0.682079
false
claneys/shinken
test/test_servicetpl_no_hostname.py
18
2049
#!/usr/bin/env python # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the F...
agpl-3.0
-1,834,636,403,029,674,500
36.254545
134
0.666179
false
hovsepm/AutoRest
src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/BodyDateTime/autorestdatetimetestservice/auto_rest_date_time_test_service.py
3
2116
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-620,560,233,606,112,000
33.688525
89
0.669187
false
LibreSoftTeam/2016-uml-miner
phase3-outputs/scripts/umlfiles2table_images.py
1
2885
#!/usr/bin/python3 import csv import pymysql singleList = [] multipleList = [] # Connect to the database connection = pymysql.connect( host='localhost', user='operator', passwd='operator', db='chunk4_images', charset='utf8mb4', ...
gpl-3.0
-7,699,399,729,735,828,000
32.16092
123
0.49844
false
IBM/differential-privacy-library
tests/mechanisms/test_ExponentialCategorical.py
1
4894
import numpy as np from unittest import TestCase from diffprivlib.mechanisms import ExponentialCategorical from diffprivlib.utils import global_seed class TestExponential(TestCase): def setup_method(self, method): if method.__name__ .endswith("prob"): global_seed(314159) self.mech = ...
mit
-5,557,917,907,070,474,000
28.305389
97
0.492848
false
lewisc/spark-tk
python/sparktk/models/timeseries/arx.py
7
16906
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation  # # 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
-6,667,347,977,254,630,000
43.401055
244
0.547243
false
wederw/bitcoin
qa/rpc-tests/mempool_spendcoinbase.py
6
2762
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test spending coinbase transactions. # The coinbase transaction in block N can appear in block # N+100... ...
mit
-586,170,797,680,164,400
39.028986
91
0.673787
false
danilo-massa/honeyd
webserver/htdocs/index.py
2
1445
import honeyd import time import support from htmltmpl import TemplateManager, TemplateProcessor global counter self.send_response(200) self.send_header("Content-Type", "text/html") self.send_nocache() self.end_headers() # Compile or load already precompiled template. template = TemplateManager().prepare(self.root+"...
gpl-2.0
7,020,533,826,385,482,000
26.264151
79
0.689965
false
lmregus/Portfolio
python/design_patterns/env/lib/python3.7/site-packages/pip/_vendor/chardet/escsm.py
289
10510
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
mit
-308,592,456,976,034,500
41.723577
165
0.628069
false
openvapour/ryu
ryu/services/protocols/bgp/info_base/rtc.py
52
2467
# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. # # 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 appli...
apache-2.0
-6,789,287,685,204,760,000
32.794521
79
0.679773
false
admcrae/tensorflow
tensorflow/contrib/learn/python/learn/ops/seq2seq_ops.py
61
5870
# 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
-5,773,286,829,979,748,000
38.395973
80
0.671891
false
pyblish/pyblish-starter
pyblish_starter/vendor/jsonschema/_reflect.py
7
5008
# -*- test-case-name: twisted.test.test_reflect -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Standardized versions of various cool and/or strange things that you can do with Python's reflection capabilities. """ import sys from .compat import PY3 class _NoModuleFound(Exception): ...
mit
2,590,815,536,556,024,300
32.386667
79
0.665136
false
gdimitris/ChessPuzzler
Virtual_Environment/lib/python2.7/site-packages/requests/packages/chardet/big5prober.py
2931
1684
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
mit
-4,230,622,644,537,755,000
39.095238
69
0.718527
false
nive-cms/nive
nive/userdb/tests/test_app.py
1
7136
# -*- coding: utf-8 -*- import time import unittest from nive.security import AdminUser, UserFound from db_app import * class ObjectTest(unittest.TestCase): def setUp(self): self.app = app() def tearDown(self): self.app.Close() pass def test_add(self): a=self.app ...
gpl-3.0
-1,607,020,821,627,751,700
37.782609
127
0.591368
false
SwagColoredKitteh/servo
tests/wpt/web-platform-tests/tools/py/testing/root/test_py_imports.py
163
1983
import py import types import sys def checksubpackage(name): obj = getattr(py, name) if hasattr(obj, '__map__'): # isinstance(obj, Module): keys = dir(obj) assert len(keys) > 0 print (obj.__map__) for name in list(obj.__map__): assert hasattr(obj, name), (obj, name) ...
mpl-2.0
-5,177,895,444,657,549,000
28.161765
61
0.548159
false
rbenson/orgmode
resolver/https.py
2
2676
import re import sys import subprocess import sublime from .abstract import AbstractRegexLinkResolver try: import urllib.request, urllib.parse, urllib.error except ImportError: import urllib PATTERN_SETTING = 'orgmode.open_link.resolver.https.pattern' PATTERN_DEFAULT = r'^(https):(?P<url>.+)$' URL_SETTING =...
mit
-617,696,223,155,290,200
31.240964
92
0.58296
false
geosolutions-it/geonode
geonode/upload/tests/test_files.py
11
1695
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2018 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
5,208,154,752,840,141,000
36.666667
73
0.647788
false
jfinkels/networkx
networkx/generators/tests/test_expanders.py
55
2497
# Copyright 2014 "cheebee7i". # Copyright 2014 "alexbrc". # Copyright 2014 Jeffrey Finkelstein <jeffrey.finkelstein@gmail.com>. """Unit tests for the :mod:`networkx.generators.expanders` module. """ try: import scipy is_scipy_available = True except: is_scipy_available = False import networkx as nx from n...
bsd-3-clause
-8,240,160,307,509,666,000
33.680556
79
0.645575
false
hjanime/VisTrails
vistrails/gui/module_info.py
1
13979
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
bsd-3-clause
-1,784,407,531,136,948,700
44.386364
85
0.601259
false
xthirtyfive/gamemod
guiprovider.py
1
2081
# Copyright 2013 X35 # # This file is part of gamemod. # # gamemod 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
8,101,542,888,332,923,000
35.508772
121
0.701105
false
romankagan/DDBWorkbench
plugins/hg4idea/testData/bin/hgext/acl.py
91
10362
# acl.py - changeset access control for mercurial # # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. '''hooks for controlling repository access This hook makes it possible to ...
apache-2.0
5,239,691,406,254,036,000
31.791139
80
0.641382
false
jhu-lcsr-forks/ogre
Tools/Blender2.6Export/ogre_mesh_exporter/mesh_impl.py
16
16080
# ##### BEGIN MIT LICENSE BLOCK ##### # Copyright (C) 2011 by Lih-Hern Pang # 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 ...
mit
1,976,643,602,277,208,600
41.204724
157
0.721891
false
Imaginashion/cloud-vision
.fr-d0BNfn/django-jquery-file-upload/venv/lib/python3.5/encodings/cp1255.py
272
12466
""" Python Character Mapping Codec cp1255 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1255.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,207,704,298,974,207,000
39.605863
119
0.520777
false
levibostian/myBlanky
googleAppEngine/google/appengine/api/search/__init__.py
8
2549
#!/usr/bin/env python # # Copyright 2007 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 o...
mit
1,058,798,410,770,367,900
32.986667
74
0.830129
false
shakamunyi/neutron
neutron/db/metering/metering_rpc.py
46
2075
# Copyright (C) 2014 eNovance SAS <licensing@enovance.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 applicabl...
apache-2.0
-1,353,348,655,059,363,800
36.053571
79
0.660241
false
ElephoneApp/kubernetes
cluster/juju/charms/trusty/kubernetes-master/unit_tests/test_install.py
105
4115
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
apache-2.0
-4,471,815,432,505,795,600
37.101852
80
0.641555
false
cedadev/cis
cis/test/integration/test_eval.py
3
7743
import netCDF4 import numpy from hamcrest import assert_that, is_ import unittest from cis.cis_main import evaluate_cmd, col_cmd from cis.test.integration.base_integration_test import BaseIntegrationTest from cis.test.integration_test_data import * from cis.parse import parse_args from cis.test.unit.eval.test_calc im...
lgpl-3.0
4,635,982,652,704,962,000
51.673469
132
0.62818
false
diego-d5000/MisValesMd
env/lib/python2.7/site-packages/django/template/loaders/app_directories.py
1
1602
""" Wrapper for loading templates from "templates" directories in INSTALLED_APPS packages. """ import io from django.core.exceptions import SuspiciousFileOperation from django.template.base import TemplateDoesNotExist from django.template.utils import get_app_template_dirs from django.utils._os import safe_...
mit
3,960,476,586,008,162,300
36.142857
80
0.642322
false
beatrizjesus/my-first-blog
pasta/Lib/site-packages/django/contrib/redirects/migrations/0001_initial.py
142
1271
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sites', '0001_initial'), ] operations = [ migrations.CreateModel( name='Redirect', fields=[ ...
mit
-7,705,647,044,940,095,000
40
209
0.556255
false
denisenkom/django
tests/bulk_create/tests.py
5
6664
from __future__ import unicode_literals from operator import attrgetter from django.db import connection from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature from django.test.utils import override_settings from .models import Country, Restaurant, Pizzeria, State, TwoFields class BulkCreateTests(T...
bsd-3-clause
-8,335,335,551,976,320,000
38.904192
86
0.607143
false
Vogeltak/pauselan
lib/python3.4/site-packages/sqlalchemy/dialects/mysql/gaerdbms.py
59
3387
# mysql/gaerdbms.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mysql+gaerdbms :name: Google Cloud SQL :dbapi: rdbms :...
gpl-2.0
-222,051,937,422,292,350
32.205882
91
0.658105
false
numericillustration/sdc-imgapi
tools/manatee-diff/manatee2images.py
2
1948
#!/usr/bin/env python """ Take a imgapi_images-*.gz manatee table dump and emit a JSON array of images. Usage: gzcat imgapi_images-2014-11-15-00-01-56.gz | ./manatee2images.py > images.json """ import json import sys import operator from pprint import pprint import codecs # TODO: ideally we wouldn't hardcode ...
mpl-2.0
3,893,063,082,592,945,000
23.974359
82
0.563655
false
lancezlin/ml_template_py
lib/python2.7/site-packages/wheel/metadata.py
93
11676
""" Tools for converting old- to new-style metadata. """ from collections import namedtuple from .pkginfo import read_pkg_info from .util import OrderedDefaultDict try: from collections import OrderedDict except ImportError: OrderedDict = dict import re import os.path import textwrap import pkg_resources impo...
mit
-7,892,011,049,403,554,000
34.063063
102
0.593011
false
nicholaschris/landsatpy
stuff.py
1
1864
import cloud_detection_new as cloud_detection from matplotlib import pyplot as plt import views from skimage import exposure nir = cloud_detection.get_nir()[0:600,2000:2600] red = cloud_detection.get_red()[0:600,2000:2600] green = cloud_detection.get_green()[0:600,2000:2600] blue = cloud_detection.get_blue()[0:600,200...
mit
-3,928,246,446,012,056,600
27.692308
90
0.689914
false
koyuawsmbrtn/eclock
windows/kivy/kivy/core/image/img_dds.py
54
1048
''' DDS: DDS image loader ''' __all__ = ('ImageLoaderDDS', ) from kivy.lib.ddsfile import DDSFile from kivy.logger import Logger from kivy.core.image import ImageLoaderBase, ImageData, ImageLoader class ImageLoaderDDS(ImageLoaderBase): @staticmethod def extensions(): return ('dds', ) def load(...
gpl-2.0
-1,542,359,741,957,030,400
25.871795
78
0.583015
false
dudonwai/dudonsblog
Lib/site-packages/django/contrib/gis/db/models/sql/conversion.py
308
2015
""" This module holds simple classes to convert geospatial values from the database. """ from django.contrib.gis.db.models.fields import GeoSelectFormatMixin from django.contrib.gis.geometry.backend import Geometry from django.contrib.gis.measure import Area, Distance class BaseField(object): empty_strings_allow...
mit
-1,638,714,960,052,173,300
25.866667
75
0.667494
false
vedujoshi/tempest
tempest/api/identity/base.py
2
11762
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
2,494,243,205,311,572,500
39.982578
79
0.655501
false
JamesShaeffer/QGIS
tests/src/python/test_qgsmessagelog.py
30
3449
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsMessageLog. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """ __a...
gpl-2.0
-103,974,553,227,338,910
36.48913
79
0.655552
false
hophacker/bitcoin_malleability
contrib/bitrpc/bitrpc.py
46
9207
from jsonrpc import ServiceProxy import sys import string import getpass # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:8332") e...
mit
148,013,364,626,363,460
27.329231
80
0.568481
false
tinloaf/home-assistant
homeassistant/components/microsoft_face.py
4
10344
""" Support for Microsoft face recognition. For more details about this component, please refer to the documentation at https://home-assistant.io/components/microsoft_face/ """ import asyncio import json import logging import aiohttp from aiohttp.hdrs import CONTENT_TYPE import async_timeout import voluptuous as vol ...
apache-2.0
8,826,351,870,563,985,000
30.730061
79
0.604215
false
FNCS/ns-3.26
examples/wireless/mixed-wireless.py
59
17198
# /* # * This program is free software; you can redistribute it and/or modify # * it under the terms of the GNU General Public License version 2 as # * published by the Free Software Foundation; # * # * This program is distributed in the hope that it will be useful, # * but WITHOUT ANY WARRANTY; without even the ...
gpl-2.0
-2,390,654,260,867,613,000
44.020942
123
0.528434
false
Monika319/EWEF-1
Cw2Rezonans/Karolina/Oscyloskop/OscyloskopZ5W2.py
1
1312
# -*- coding: utf-8 -*- """ Plot oscilloscope files from MultiSim """ import numpy as np import matplotlib.pyplot as plt import sys import os from matplotlib import rc rc('font',family="Consolas") files=["real_zad5_05f_p2.txt"] for NazwaPliku in files: print NazwaPliku Plik=open(NazwaPliku) #print DeltaT ...
gpl-2.0
-1,034,745,225,697,455,700
23.603774
72
0.578221
false
catapult-project/catapult
telemetry/telemetry/internal/backends/chrome_inspector/devtools_client_backend.py
3
21781
# 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 __future__ import absolute_import import logging import re import socket import sys import six from py_utils import exc_util from py_utils import retry...
bsd-3-clause
6,397,773,995,444,545,000
34.244337
100
0.696662
false
v-zhongz/azure-linux-extensions
VMBackup/main/Utils/WAAgentUtil.py
11
2528
# Wrapper module for waagent # # waagent is not written as a module. This wrapper module is created # to use the waagent code as a module. # # Copyright 2014 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Y...
apache-2.0
1,095,373,671,504,539,800
29.804878
74
0.650831
false
ibinti/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/geos/prototypes/topology.py
311
2226
""" This module houses the GEOS ctypes prototype functions for the topological operations on geometries. """ __all__ = ['geos_boundary', 'geos_buffer', 'geos_centroid', 'geos_convexhull', 'geos_difference', 'geos_envelope', 'geos_intersection', 'geos_linemerge', 'geos_pointonsurface', 'geos_pre...
apache-2.0
-7,917,583,549,610,253,000
42.647059
84
0.743935
false