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
EricNeedham/assignment-1
venv/lib/python2.7/site-packages/sqlalchemy/events.py
22
39746
# sqlalchemy/events.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 """Core event interfaces.""" from . import event, exc from .pool import Pool f...
mit
154,911,117,829,488,700
38.197239
79
0.640593
false
maciejkula/scipy
scipy/sparse/linalg/tests/test_onenormest.py
4
9575
"""Test functions for the sparse.linalg._onenormest module """ from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import (assert_allclose, assert_equal, assert_, decorators, TestCase, run_module_suite) import scipy.linalg import scipy.sparse.linalg from scip...
bsd-3-clause
2,964,660,327,789,552,000
35.826923
88
0.60094
false
drcapulet/sentry
src/sentry/web/frontend/projects/quotas.py
24
2011
""" sentry.web.frontend.projects ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from django.contrib import messages from django.core.urlresolvers import reverse from django.http...
bsd-3-clause
-7,598,812,396,621,180,000
33.084746
124
0.675286
false
sander76/home-assistant
homeassistant/components/smart_meter_texas/config_flow.py
3
2779
"""Config flow for Smart Meter Texas integration.""" import asyncio import logging from aiohttp import ClientError from smart_meter_texas import Account, Client from smart_meter_texas.exceptions import ( SmartMeterTexasAPIError, SmartMeterTexasAuthError, ) import voluptuous as vol from homeassistant import co...
apache-2.0
3,250,314,867,892,210,700
31.694118
88
0.666787
false
xinwu/horizon
openstack_dashboard/test/test_data/sahara_data.py
1
18950
# 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 # distributed unde...
apache-2.0
-7,523,586,367,454,752,000
35.372361
77
0.487916
false
irmen/Tale
setup.py
1
3027
""" Setup script for distutils 'Tale' mud driver, mudlib and interactive fiction framework Copyright by Irmen de Jong (irmen@razorvine.net) """ import re from setuptools import setup with open("tale/__init__.py") as version_file: # extract the VERSION definition from the tale package without importing it vers...
lgpl-3.0
1,328,493,924,708,206,800
39.36
126
0.657086
false
ParthGanatra/mitmproxy
mitmproxy/flow_format_compat.py
2
1814
""" This module handles the import of mitmproxy flows generated by old versions. """ from __future__ import absolute_import, print_function, division from . import version def convert_013_014(data): data["request"]["first_line_format"] = data["request"].pop("form_in") data["request"]["http_version"] = "HTTP/"...
mit
9,159,714,350,214,749,000
29.233333
108
0.590959
false
tedlaz/pyted
pykoinoxrista/koinoxrista/hml_dapanes.py
1
2568
# -*- coding: utf-8 -*- from pymiles.sqlite import db_select as dbs import greek_str as gs def html_dapanes(ida, dbf): sql_koi = "SELECT * FROM koi WHERE id=%s" % ida sql_koid = "SELECT * FROM koi_d WHERE koi_id=%s ORDER BY pdate" % ida sql_ej = "SELECT * FROM ej ORDER BY id" head = dbs.select(dbf, s...
gpl-3.0
-657,954,688,774,943,400
31.467532
108
0.5048
false
ConPaaS-team/conpaas
conpaas-services/src/conpaas/services/helloworld/manager/manager.py
1
4220
from threading import Thread from conpaas.core.expose import expose from conpaas.core.manager import BaseManager from conpaas.core.https.server import HttpJsonResponse, HttpErrorResponse from conpaas.services.helloworld.agent import client from conpaas.core.misc import check_arguments, is_in_list, is_not_in_list,\ ...
bsd-3-clause
8,140,809,065,478,551,000
31.21374
82
0.556635
false
confirm/ansibleci
ansibleci/tests/tag.py
1
2631
# -*- coding: utf-8 -*- # # Copyright (c) 2015 confirm IT solutions # # 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, mo...
mit
8,228,025,650,757,928,000
51.54
462
0.622002
false
vicky2135/lucious
oscar/lib/python2.7/site-packages/django_extensions/management/commands/sqldiff.py
2
47618
# -*- coding: utf-8 -*- """ sqldiff.py - Prints the (approximated) difference between models and database TODO: - better support for relations - better support for constraints (mainly postgresql?) - support for table spaces with postgresql - when a table is not managed (meta.managed==False) then only do a one-way ...
bsd-3-clause
-3,176,328,924,806,518,300
46.905433
448
0.593536
false
ningchi/scikit-learn
sklearn/neighbors/approximate.py
9
22278
"""Approximate nearest neighbor search""" # Author: Maheshakya Wijewardena <maheshakya.10@cse.mrt.ac.lk> # Joel Nothman <joel.nothman@gmail.com> import numpy as np import warnings from scipy import sparse from .base import KNeighborsMixin, RadiusNeighborsMixin from ..base import BaseEstimator from ..utils.va...
bsd-3-clause
-7,452,445,684,876,584,000
39.802198
79
0.579091
false
danieldmm/minerva
scripts/postprocess_features.py
1
1813
from models.keyword_features import FeaturesReader, getAnnotationListsForContext, tokenWeight, getRootDir import os import gzip import json from tqdm import tqdm def getOneContextFeatures(context): """ Prepares a single context's data for any nn. Takes ["token_features"] from list of sentences an...
gpl-3.0
7,134,670,011,104,532,000
26.059701
105
0.648649
false
bitemyapp/ganeti
test/py/ganeti.cli_unittest.py
5
55966
#!/usr/bin/python # # Copyright (C) 2008, 2011, 2012, 2013 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: # # 1. Redistributions of source code must retain the above copyright noti...
bsd-2-clause
-6,707,811,661,163,229,000
33.804726
80
0.565897
false
vermamanoj/soc_2017Jul
qradar/qradar_connector.py
1
1977
#!/usr/bin/env python3 import os import sys import requests from configparser import ConfigParser from gentelella.core import global_config import logging logger = logging.getLogger('root') FORMAT = "[%(filename)s:%(lineno)s-%(funcName)s] %(message)s" logging.basicConfig(format=FORMAT) logger.setLevel(logging.INFO) ...
mit
6,896,249,320,087,742,000
31.95
99
0.583713
false
danielfrg/cyhdfs3
cyhdfs3/tests/test_others.py
2
2534
from __future__ import print_function, absolute_import from utils import * import posixpath def test_is_pickeable(hdfs): import pickle hdfs2 = pickle.loads(pickle.dumps(hdfs)) assert hdfs.host == hdfs2.host assert hdfs.port == hdfs2.port def multiprocess_func(section): import os import cyh...
apache-2.0
-1,614,664,590,902,767,900
24.59596
83
0.554065
false
malirod/dip
src/client.py
1
1093
#!/usr/bin/env python # -*- coding: utf-8 -*- from util.path import get_input_files, get_file_ext from config import (INPUT_DIR, VALID_EXTS, BEANSTALK_HOST, BEANSTALK_PORT, BEANSTALK_TUBE) from util.log import setup_logging from os.path import join import logging import beanstalkc logger = logg...
gpl-3.0
5,113,143,107,435,902,000
26.325
88
0.666057
false
oliverlee/sympy
sympy/combinatorics/tensor_can.py
13
40944
from __future__ import print_function, division from sympy.core.compatibility import range from sympy.combinatorics.permutations import Permutation, _af_rmul, \ _af_invert, _af_new from sympy.combinatorics.perm_groups import PermutationGroup, _orbit, \ _orbit_transversal from sympy.combinatorics.util import _d...
bsd-3-clause
1,040,579,235,444,020,400
33.493682
109
0.557835
false
j5shi/Thruster
pylibs/idlelib/configSectionNameDialog.py
2
4071
""" Dialog that allows user to specify a new config file section name. Used to get new highlight theme and keybinding set names. The 'return value' for the dialog, used two placed in configDialog.py, is the .result attribute set in the Ok and Cancel methods. """ from Tkinter import * import tkMessageBox class G...
gpl-2.0
-296,595,226,079,826,750
42.25
80
0.588799
false
cszqwe/incubator-singa
tool/graph.py
9
1398
#/** # * Copyright 2015 The Apache Software Foundation # * # * 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 u...
apache-2.0
211,615,048,975,211,170
32.285714
79
0.706009
false
infosec-o4it/inventario
bia/admin.py
1
2416
# -*- coding: utf-8 -*- from django.contrib import admin from .models import ProcesoBia, CapitalTiempo, AplicacionesTiempo from .models import PersonasTiempo, CanalesActividad, CanalesTiempo from .models import DocumentosActividad, DocumentosTiempo, EquiposTIActividad from .models import EquiposTiTiempo, EquiposNoTIAct...
gpl-3.0
6,076,201,734,023,603,000
59.4
79
0.85803
false
trevor/calendarserver
twistedcaldav/directory/calendaruserproxyloader.py
1
4355
## # Copyright (c) 2009-2014 Apple 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 l...
apache-2.0
1,479,831,022,553,511,700
30.330935
119
0.61194
false
walbert947/ansible-modules-core
packaging/os/apt_repository.py
16
19073
#!/usr/bin/python # encoding: utf-8 # (c) 2012, Matt Wright <matt@nobien.net> # (c) 2013, Alexander Saltanov <asd@mokote.com> # (c) 2014, Rutger Spiertz <rutger@kumina.nl> # # 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...
gpl-3.0
-1,087,469,285,577,967,900
35.538314
146
0.58339
false
indico/indico
indico/core/oauth/util.py
1
3398
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import hashlib from uuid import UUID from authlib.oauth2.rfc6749 import list_to_scope, scope_to_list from...
mit
7,706,720,988,045,286,000
38.511628
108
0.701589
false
jeremybanks/stack-suggestions-bot
src/stackexchange/site.py
1
2184
class Site(object): def __init__(self, stack_exchange, site_data): """ Initializes the Site given a item from a /sites response. The data must be complete; don't filter out any fields. (The default behaviour is to include all fields.) The Site objet will have all possible f...
mit
2,115,681,325,751,210,500
40.207547
81
0.595696
false
mabhub/Geotrek
geotrek/core/widgets.py
4
3323
""" We distinguish two types of widgets : Geometry and Topology. Geometry widgets receive a WKT string, deserialized by GEOS. Leaflet.Draw is used for edition. Topology widgets receive a JSON string, deserialized by Topology.deserialize(). Geotrek custom code is used for edition. :notes: ...
bsd-2-clause
3,893,293,936,703,938,600
30.647619
83
0.667469
false
BT-astauder/odoo
addons/purchase_requisition/purchase_requisition.py
16
23485
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
4,870,444,895,170,810,000
54.129108
432
0.6241
false
jjd27/xen-api
ocaml/idl/ocaml_backend/python/test_client.py
29
1223
#!/usr/bin/python import getopt, sys, xmlrpclib url = "http://dhcp108:70000" #default parsed = getopt.getopt(sys.argv[1:], "u:url") if len(parsed[0]) == 1: url = parsed[0][0][1] # Create an object to represent our server. server = xmlrpclib.Server(url); # Call the server and get our result. print "Logging in... ...
lgpl-2.1
-8,496,878,081,359,612,000
26.795455
98
0.654129
false
paplorinc/intellij-community
python/testData/inspections/PyCompatibilityInspection/stringLiteralExpression.py
3
3306
a = u"String" # Python 3.6 a = <error descr="Python version 2.7 does not support a 'F' prefix"><warning descr="Python version 2.6, 3.4, 3.5 do not support a 'F' prefix">f</warning></error>"" a = <error descr="Python version 2.7 does not support a 'F' prefix"><warning descr="Python version 2.6, 3.4, 3.5 do not support...
apache-2.0
-747,938,652,563,302,500
58.053571
282
0.65245
false
ismailsunni/geonode
geosafe/models.py
1
6780
from __future__ import absolute_import import tempfile import urlparse from django.conf import settings from django.core.files.base import File from django.core.urlresolvers import reverse from django.db import models from celery.result import AsyncResult from geonode.layers.models import Layer from geonode.people.m...
gpl-3.0
3,505,547,208,602,128,000
27.016529
79
0.605605
false
dragon788/powerline
powerline/lib/watcher/inotify.py
35
7921
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import errno import os import ctypes from threading import RLock from powerline.lib.inotify import INotify from powerline.lib.monotonic import monotonic from powerline.lib.path import realpath class I...
mit
403,453,236,594,433,200
28.55597
152
0.66229
false
F5Networks/f5-ansible
ansible_collections/f5networks/f5_modules/plugins/modules/bigip_monitor_snmp_dca.py
1
23355
#!/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 DOCUMENTATION = r''' --- module: bigip_monitor_snmp_dca ...
gpl-3.0
8,502,129,284,505,672,000
29.852048
94
0.603939
false
shakamunyi/tensorflow
tensorflow/contrib/distributions/python/ops/gaussian.py
2
8079
# Copyright 2016 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,743,043,769,153,469,400
33.378723
125
0.652308
false
JordanReiter/python-oauth2
oauth2/__init__.py
6
24905
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel 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 ...
mit
-5,290,430,773,135,147,000
32.884354
134
0.617105
false
zofuthan/airmozilla
airmozilla/main/context_processors.py
5
11943
import datetime from django.conf import settings from django.db.models import Q from django.utils import timezone from django.core.cache import cache from funfactory.urlresolvers import reverse from airmozilla.main.models import ( Event, Channel, EventHitStats, most_recent_event ) from airmozilla.mai...
bsd-3-clause
3,431,418,118,143,389,700
31.991713
79
0.59449
false
Distrotech/libreoffice
testtools/source/bridgetest/pyuno/core.py
7
17619
# # This file is part of the LibreOffice project. # # 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/. # # This file incorporates work covered by the following license noti...
gpl-3.0
-6,889,867,776,256,954,000
48.215084
118
0.615131
false
neerja28/Tempest
tempest/api/compute/volumes/test_volumes_get.py
5
3024
# 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
8,277,674,554,553,515,000
39.864865
79
0.614749
false
sssllliang/silverberry
lib/google/protobuf/internal/descriptor_pool_test.py
19
35436
#! /usr/bin/env python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ...
apache-2.0
5,672,402,507,135,217,000
42.214634
80
0.703155
false
iotile/coretools
iotilesensorgraph/iotile/sg/parser/scopes/trigger_scope.py
1
2303
from .scope import Scope from ...node import InputTrigger from ...exceptions import SensorGraphSemanticError from ...stream import DataStream class TriggerScope(Scope): """A scope that implements trigger_chain but cannot provide a clock. Args: sensor_graph (SensorGraph): The sensor graph we are workin...
gpl-3.0
5,710,999,682,054,407,000
39.403509
118
0.65914
false
ichbinder23/mailsend
Mailer.py
1
1917
''' Created on 15.10.2014 @author: jakob ''' import smtplib from email.MIMEMultipart import MIMEMultipart from email.MIMEBase import MIMEBase from email.MIMEText import MIMEText from email.Utils import COMMASPACE, formatdate from email import Encoders import os.path class Mailer(object): def __init__(self, imai...
gpl-2.0
4,603,037,186,639,711,700
35.884615
110
0.577465
false
edquist/autopyfactory
attic/jsd3.py
3
4287
#! /usr/bin/env python # # Job submission-related code. # # # Copyright (C) 2011 Jose Caballero # # 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 ...
gpl-3.0
347,834,638,143,927,900
24.825301
109
0.594588
false
torbjoernk/easybuild-easyblocks
easybuild/easyblocks/s/slepc.py
10
5767
## # Copyright 2009-2015 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
-1,552,919,844,008,710,700
37.446667
108
0.638113
false
noba3/KoTos
addons/plugin.video.rtl2-now.de/resources/lib/kodion/items/video_item.py
16
4457
import re import datetime from .base_item import BaseItem __RE_IMDB__ = re.compile(r'(http(s)?://)?www.imdb.(com|de)/title/(?P<imdbid>[t0-9]+)(/)?') class VideoItem(BaseItem): def __init__(self, name, uri, image=u'', fanart=u''): BaseItem.__init__(self, name, uri, image, fanart) self._genre = No...
gpl-2.0
4,031,269,859,424,774,000
22.967742
90
0.565178
false
ChinaQuants/zipline
setup.py
1
6383
#!/usr/bin/env python # # Copyright 2014 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
6,638,006,999,681,160,000
28.013636
79
0.586088
false
sensysnetworks/uClinux
user/python/Lib/distutils/cmd.py
4
19410
"""distutils.cmd Provides the Command class, the base class for the command classes in the distutils.command package. """ # created 2000/04/03, Greg Ward # (extricated from core.py; actually dates back to the beginning) __revision__ = "$Id: cmd.py,v 1.25 2000/09/26 02:12:31 gward Exp $" import sys, os, string, re f...
gpl-2.0
4,063,554,653,729,518,000
39.103306
79
0.604225
false
midma101/AndIWasJustGoingToBed
.venv/lib/python2.7/site-packages/paramiko/agent.py
7
12321
# Copyright (C) 2003-2007 John Rochester <john@jrochester.org> # # This file is part of paramiko. # # Paramiko 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 ...
mit
1,747,289,928,490,454,800
31.423684
82
0.586073
false
yanchen036/tensorflow
tensorflow/contrib/distributions/python/ops/bijectors/affine_scalar.py
3
4227
# 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
-6,396,973,251,379,227,000
28.978723
80
0.625739
false
strogo/djpcms
djpcms/migrations/0003_auto__add_field_blockcontent_for_not_authenticated.py
1
10859
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'BlockContent.for_not_authenticated' db.add_column('djpcms_blockcontent', 'for_not_authenti...
bsd-3-clause
461,357,308,424,885,440
76.014184
182
0.551064
false
user-none/calibre
src/calibre/gui2/preferences/ignored_devices.py
14
3695
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid at kovidgoyal.net>' __docformat__ = 'restructuredtext en' ...
gpl-3.0
-6,033,297,496,390,095,000
34.873786
90
0.606225
false
lao605/product-definition-center
pdc/apps/changeset/tests.py
4
5753
# # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # from mock import Mock, call, patch from django.test import TestCase from django.core.urlresolvers import reverse from rest_framework import status from rest_framework.test import APITestCase from .middleware ...
mit
-2,710,370,780,748,330,000
41.614815
102
0.654267
false
google/llvm-propeller
llvm/utils/lit/lit/TestRunner.py
3
61152
from __future__ import absolute_import import errno import io import itertools import getopt import os, signal, subprocess, sys import re import stat import platform import shutil import tempfile import threading import io try: from StringIO import StringIO except ImportError: from io import StringIO from lit...
apache-2.0
-7,036,055,583,136,992,000
37.679317
106
0.567766
false
jojurajan/asplusquiz
problem_2/country_ip.py
1
2718
import csv class CountryIp(object): ''' Find the country to which the given IP is allocated ''' ip_map = None ip_ranges = None def __init__(self): self._set_ip_country_map() def _set_ip_country_map(self): ''' * Load data from IpToCountry.csv into a mapping of the ...
mit
-2,149,022,767,538,018,300
33.405063
83
0.528698
false
enthought/traitsgui
enthought/pyface/workbench/action/reset_all_perspectives_action.py
1
1179
""" An action that resets *all* perspectives. """ # Enthought library imports. from enthought.pyface.api import YES # Local imports. from workbench_action import WorkbenchAction # The message used when confirming the action. MESSAGE = 'Do you want to reset ALL perspectives to their defaults?' class ResetAllPersp...
bsd-3-clause
-6,225,161,870,719,519,000
28.475
79
0.513147
false
jirikuncar/invenio-previewer
invenio_previewer/version.py
2
1143
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 CERN. # # Invenio 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...
gpl-2.0
1,392,125,906,243,515,100
35.870968
76
0.743657
false
CyrusBiotechnology/dj-bioinformatics-protein
dj_bioinformatics_protein/models.py
1
10977
import logging import hashlib import os import re from django.db import models from django.conf import settings from .fields import AminoAcidSequenceField, AminoAcidSequenceTextField, AminoAcidAlignmentField, AminoAcidAlignmentTextField logger = logging.getLogger('dj_bioinformatics_protein.' + __name__) FORMATS_SET...
mit
6,637,823,392,020,612,000
35.347682
124
0.610914
false
agoravoting/agora-ciudadana
agora_site/misc/utils.py
2
16239
""" taken from http://www.djangosnippets.org/snippets/377/ """ from django.core.urlresolvers import resolve, Resolver404 from django.http import HttpRequest from django.conf import settings from django.core.urlresolvers import reverse from django.contrib.sites.models import Site from django.utils.datastructures impor...
agpl-3.0
1,330,964,010,952,777,500
32.07332
126
0.660755
false
janezkranjc/clowdflows
streams/models.py
2
7040
from django.db import models from django.contrib.auth.models import User import workflows.library from picklefield.fields import PickledObjectField import workflows class HaltStream(Exception): pass # Create your models here. class Stream(models.Model): user = models.ForeignKey(User,related_name="streams") ...
gpl-3.0
-1,379,623,310,772,043,000
39.693642
107
0.47429
false
nearai/program_synthesis
program_synthesis/naps/uast/uast_watcher.py
1
5298
# Watcher is a way to monitor Executor activity # Example cases: # - collect execution traces # - collect information about data flowing through statements to later find blocks # with the same behaviour across different solutions to the same problem # # The current set of events is tailored towards the use cases a...
apache-2.0
5,210,443,456,277,423,000
33.402597
122
0.642695
false
BT-ojossen/connector
connector/queue/queue.py
28
1459
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
agpl-3.0
9,191,123,347,857,750,000
34.585366
78
0.612748
false
dwighthubbard/ipython_embedded_notebooks
intro/range_finder.py
1
3017
#!/usr/bin/python3 import RPi.GPIO as GPIO import time import sys # Set our pin to output mode #GPIO.setmode(GPIO.BOARD) #GPIO.setup(12, GPIO.OUT) # Set the PWM frequency in Hz (cycles per second) #p = GPIO.PWM(12, 60) # channel=12 frequency=60Hz # Start doing PWM #p.start(0) class RangeFinder(object): mode...
mit
-3,249,227,595,914,577,000
24.15
76
0.563474
false
tensorflow/tensorflow
tensorflow/python/kernel_tests/distributions/student_t_test.py
6
19442
# 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,590,174,913,916,238,000
37.575397
104
0.623187
false
SUSE/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_06_01/models/next_hop_result.py
2
1736
# 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
8,696,477,861,373,701,000
41.341463
90
0.626152
false
rtshome/ansible_pgsql
library/postgresql_row.py
1
6865
#!/usr/bin/python try: import psycopg2 import psycopg2.extras from psycopg2 import sql except ImportError: postgresqldb_found = False else: postgresqldb_found = True from ansible.module_utils.basic import AnsibleModule from ansible.module_utils._text import to_native from ansible.module_utils.pycom...
bsd-2-clause
-8,077,004,353,811,047,000
28.463519
118
0.595921
false
selboo/PyCommand
main.py
1
2351
#!/usr/bin/env python # encoding:utf-8 # AUTHOR written by Selboo 2015/03/12 import db, config import os, sys, re, threading from pyinotify import WatchManager, Notifier, ProcessEvent from pyinotify import IN_DELETE, IN_CREATE, IN_MODIFY from re import compile, findall from base64 import b64decode class EventHand...
apache-2.0
-5,778,610,143,709,891,000
26.988095
71
0.546576
false
sloria/osf.io
api_tests/nodes/views/test_node_registrations_list.py
10
3374
import pytest from urlparse import urlparse from api.base.settings.defaults import API_BASE from osf_tests.factories import ( ProjectFactory, RegistrationFactory, AuthUserFactory, ) def node_url_for(n_id): return '/{}nodes/{}/'.format(API_BASE, n_id) @pytest.fixture() def user(): return AuthUse...
apache-2.0
1,766,313,734,836,958,500
34.515789
97
0.623296
false
mcolom/ipolDevel
tools/demo_copy/demo_copy.py
1
11377
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # GNU General Public Licence (GPL) # # 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 late...
agpl-3.0
2,079,383,569,601,409,500
32.961194
124
0.617298
false
UCL-INGI/INGInious
inginious/agent/docker_agent/_docker_interface.py
1
12251
# -*- coding: utf-8 -*- # # This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for # more information about the licensing of this file. """ (not asyncio) Interface to Docker """ import os from datetime import datetime from typing import List, Tuple, Dict import docker import logging from in...
agpl-3.0
-131,092,979,959,046,900
43.875458
141
0.583299
false
boberfly/gaffer
python/GafferSceneTest/CopyPrimitiveVariablesTest.py
7
9258
########################################################################## # # Copyright (c) 2019, Image Engine Design 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: # # * Redistrib...
bsd-3-clause
-6,846,627,221,472,812,000
35.164063
164
0.67628
false
rmotr-curriculum/quiz-itp-w2
quiz-questions/question_2.py
1
2558
import unittest def number_of_customers_per_state(customers): """Return the number of customers per state. This function receives a dictionary containing states (as keys) and customers for those states (as a list of dictionaries) and should return a final dictionary containing the count of customers ...
mit
3,779,246,963,487,866,000
24.326733
74
0.397576
false
paour/weblate
weblate/trans/migrations/0021_auto__chg_field_change_user.py
2
14771
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2014 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://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, eithe...
gpl-3.0
7,479,276,465,363,045,000
74.346939
182
0.552207
false
bionoid/kivy
kivy/modules/touchring.py
10
2568
''' Touchring ========= Shows rings around every touch on the surface / screen. You can use this module to check that you don't have any calibration issues with touches. Configuration ------------- :Parameters: `image`: str, defaults to '<kivy>/data/images/ring.png' Filename of the image to use. `sca...
mit
-8,605,356,993,669,973,000
25.474227
79
0.590343
false
kravent/autosubs
src/autosubsTranslate.py
1
9306
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import urllib, urllib2 import copy import re import codecs import threading import time import simplejson def htmldecode(text): text = text.replace('&lt;','<').replace('&gt;','>') text = text.replace('&#39;',"'").replace('&quot;','"') text = text.replace(...
gpl-3.0
4,717,834,657,142,963,000
27.206687
95
0.557328
false
shrutisingala/ns-3-dev-git-limited-slow-start
src/network/bindings/modulegen__gcc_ILP32.py
20
688489
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
5,879,978,282,618,899,000
61.915928
594
0.601395
false
google-research/falken
service/learner/brains/specs_test.py
1
57941
# Copyright 2021 Google LLC # # 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
2,687,925,033,447,588,000
38.096491
80
0.629451
false
lucychambers/lucychambers.github.io
.bundle/ruby/2.0.0/gems/pygments.rb-0.6.3/vendor/simplejson/simplejson/__init__.py
37
20581
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
gpl-2.0
-4,017,454,985,689,951,700
39.354902
79
0.656431
false
justin212k/cogent_rnj
test_rnj.py
1
1224
#! /usr/bin/env python import unittest, os from cogent.phylo.distance import * from rnj import rnj from cogent import LoadTree __author__ = "Justin Kuczynski" __copyright__ = "" __credits__ = ["Justin Kuczynski"] __license__ = "GPL" __version__ = "1.0" __maintainer__ = "Justin Kuczynski" __email__ = "justinak@gmail.c...
mit
84,138,358,852,427,620
29.6
68
0.607026
false
rimbalinux/LMD3
django/utils/simplejson/encoder.py
13
16050
"""Implementation of JSONEncoder """ import re c_encode_basestring_ascii = None c_make_encoder = None ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]') ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])') HAS_UTF8 = re.compile(r'[\x80-\xff]') ESCAPE_DCT = { '\\': '\\\\', '"': '\\"', '\b': '\\b', ...
bsd-3-clause
-679,986,628,007,827,100
35.325581
136
0.509782
false
olavopeixoto/plugin.video.brplay
resources/lib/modules/netnow/scraper_vod.py
1
12025
# -*- coding: utf-8 -*- from auth import PLATFORM from auth import get_request_data import requests import resources.lib.modules.control as control from resources.lib.modules import cache from resources.lib.modules import workers import scraper_live import player import os import urllib PLAYER_HANDLER = player.__name_...
gpl-3.0
6,716,482,351,882,543,000
33.642651
185
0.54829
false
rosmo/ansible
lib/ansible/modules/cloud/azure/azure_rm_aks.py
3
33951
#!/usr/bin/python # # Copyright (c) 2018 Sertac Ozercan, <seozerca@microsoft.com> # # 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
279,072,542,825,387,300
39.562724
160
0.570646
false
aiueogawa/ccxt
datagrid/exchanges.py
1
653294
# -*- coding: utf-8 -*- """ MIT License Copyright (c) 2017 Igor Kroitor 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,...
mit
-4,919,360,203,065,701,000
36.746573
211
0.461253
false
jwiggins/scikit-image
skimage/io/_plugins/freeimage_plugin.py
26
27618
import ctypes import numpy import sys import os import os.path from numpy.compat import asbytes, asstr def _generate_candidate_libs(): # look for likely library files in the following dirs: lib_dirs = [os.path.dirname(__file__), '/lib', '/usr/lib', '/usr/local/l...
bsd-3-clause
-3,460,456,233,723,943,400
35.007823
79
0.597074
false
zas/picard
picard/ui/edittagdialog.py
3
12144
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2011-2014 Michael Wiencek # Copyright (C) 2014 Sophist-UK # Copyright (C) 2016-2017 Sambhav Kothari # Copyright (C) 2017 Wieland Hoffmann # Copyright (C) 2017-2018, 2020 Laurent Monin # Copyright (C) 2018 Vishal Choudhary # Cop...
gpl-2.0
-4,111,216,551,356,728,300
39.751678
136
0.633976
false
google-research/football
gfootball/replay.py
1
1265
# coding=utf-8 # Copyright 2019 Google LLC # 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 ...
apache-2.0
-4,181,820,207,905,264,600
29.853659
79
0.744664
false
popazerty/obh-sh4
lib/python/Screens/LocationBox.py
25
16256
# # Generic Screen to select a path/filename combination # # GUI (Screens) from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.InputBox import InputBox from Screens.HelpMenu import HelpableScreen from Screens.ChoiceBox import ChoiceBox # Generic from Tools.BoundFunction import bou...
gpl-2.0
-846,379,975,282,609,700
29.159555
231
0.683501
false
jdm/gemrb
gemrb/GUIScripts/Spellbook.py
1
22686
# -*-python-*- # GemRB - Infinity Engine Emulator # Copyright (C) 2011 The GemRB Project # # 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) ...
gpl-2.0
-4,937,222,554,928,820,000
34.009259
127
0.715772
false
loveshell/sleepy-puppy
sleepypuppy/api/views.py
9
15763
# Copyright 2015 Netflix, 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...
apache-2.0
3,686,837,271,280,829,000
26.702988
141
0.526232
false
open-switch/ops-quagga
ops-tests/component/zebra/test_zebra_ct_connected_routes.py
2
173308
# -*- coding: utf-8 -*- # # (c)Copyright 2015 Hewlett Packard Enterprise Development LP # # GNU Zebra 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, or (at your option) any # later version. ...
gpl-2.0
-6,156,353,884,264,763,000
53.774968
97
0.698571
false
hstau/manifold-cryo
get_fit_1D_open_manifold_3D_param.py
1
2346
import numpy as np import solve_d_R_d_tau_p_3D import a def op(psi): #psi = -psi #global psi, x, a, b #global maxIter,delta_a_max, delta_b_max,delta_tau_max,a_b_tau_result a.maxIter = 100 # % maximum number of iterations, each iteration determines #% optimum s...
gpl-2.0
1,708,977,163,319,388,700
27.325
85
0.501279
false
nocko/cfmi
cfmi/scheduling/models.py
1
3246
from datetime import timedelta, datetime from cfmi.database.newsite import Session, Interval from cfmi.utils import sessions_by_date from flask import current_app from sqlalchemy import (and_, or_, not_) def merge_date_time(date, time): return(datetime(date.year, date.month, date.day, time.hour, time.minute, t...
bsd-3-clause
-4,234,959,028,177,617,000
35.886364
102
0.585952
false
douglaz/ignition-core
tools/spark-ec2/spark_ec2.py
1
52113
#!/usr/bin/env python # -*- coding: utf-8 -*- # # 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 Lice...
mit
-2,970,042,283,297,121,300
39.523328
132
0.573811
false
cloudera/hue
desktop/core/ext-py/SQLAlchemy-1.3.17/examples/performance/__init__.py
4
14298
"""A performance profiling suite for a variety of SQLAlchemy use cases. Each suite focuses on a specific use case with a particular performance profile and associated implications: * bulk inserts * individual inserts, with or without transactions * fetching large numbers of rows * running lots of short queries All s...
apache-2.0
5,206,350,444,372,951,000
31.421769
132
0.595258
false
mrluker/hdrnet
hdrnet/bin/train.py
2
10910
#!/usr/bin/env python # Copyright 2016 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 ...
apache-2.0
7,337,033,957,576,542,000
41.286822
146
0.668194
false
ondrejmular/pcs
pcs/lib/communication/sbd.py
3
10962
import json from pcs.common import reports from pcs.common.node_communicator import ( Request, RequestData, ) from pcs.common.reports import ReportItemSeverity from pcs.common.reports.item import ReportItem from pcs.lib.communication.tools import ( AllAtOnceStrategyMixin, AllSameDataMixin, MarkSucc...
gpl-2.0
-8,674,690,028,321,442,000
31.241176
80
0.530743
false
reiniervdwindt/power-rangers-api
src/api/v1/rangers/serializers.py
1
1093
from rest_framework import serializers from rangers.models import Appearance, Ranger from weapons.models import Weapon from zords.models import Zord class RangerWeaponSerializer(serializers.ModelSerializer): class Meta(object): fields = ('id', 'name', 'type',) model = Weapon class RangerZordSer...
mit
-700,959,239,394,694,900
25.658537
65
0.67978
false
kevdougful/PyWeather
Server/forecastdata.py
1
9833
"""Classes for encapsulating forecast data. This file is part of PyWeather. PyWeather 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. PyWe...
gpl-2.0
6,107,496,749,409,317,000
43.497738
94
0.643242
false
helenjin/scanalysis
src/scanalysis/sca_gui.py
1
7517
#!/usr/local/bin/python3 import tkinter as tk from tkinter import filedialog, ttk class sca_gui(tk.Tk): def __init__(self, parent): tk.Tk.__init__(self, parent) self.parent = parent self.initialize() def initialize(self): self.grid() self.vals = None self.curre...
gpl-2.0
659,605,362,825,649,500
49.449664
155
0.634562
false
nharraud/invenio-demosite
invenio_demosite/config.py
7
1033
# -*- coding: utf-8 -*- # # This file is part of Invenio Demosite. # Copyright (C) 2014 CERN. # # Invenio Demosite 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...
gpl-2.0
-5,843,752,253,668,208,000
34.62069
74
0.743466
false
ysuarez/Evergreen-Customizations
Open-ILS/src/extras/Evergreen.py
11
2004
""" Evergreen IRC Interface plugin for supybot """ import supybot import urllib import xml.dom.minidom import re __revision__ = "$Id$" __author__ = 'PINES' __contributors__ = {} import supybot.conf as conf import supybot.utils as utils from supybot.commands import * import supybot.plugins as plugins import supybot....
gpl-2.0
5,851,850,775,180,706,000
31.852459
201
0.649202
false
erinspace/osf.io
website/profile/utils.py
3
6903
# -*- coding: utf-8 -*- from framework import auth from website import settings from osf.models import Contributor from website.filters import profile_image_url from osf.models.contributor import get_contributor_permissions from osf.utils.permissions import reduce_permissions from osf.utils import workflows def get...
apache-2.0
3,013,846,338,002,016,000
34.219388
156
0.578299
false
momingsong/ns-3
src/applications/bindings/modulegen__gcc_LP64.py
28
717210
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
3,725,484,663,931,790,000
61.885577
594
0.603632
false