repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
yangqian/plugin.video.pandatv
addon.py
1
4342
# -*- coding: utf-8 -*- # Module: default # Author: Yangqian # Created on: 25.12.2015 # License: GPL v.3 https://www.gnu.org/copyleft/gpl.html # Largely following the example at # https://github.com/romanvm/plugin.video.example/blob/master/main.py import xbmc,xbmcgui,urllib2,re,xbmcplugin from BeautifulSoup import Be...
lgpl-3.0
-501,227,777,246,295,700
37.070175
94
0.659908
false
3.438986
false
false
false
tensorflow/tensor2tensor
tensor2tensor/utils/rouge_test.py
1
4407
# coding=utf-8 # Copyright 2021 The Tensor2Tensor 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 applicable...
apache-2.0
-804,987,988,696,853,200
36.666667
80
0.570002
false
3.014364
true
false
false
tangentlabs/django-fancypages
fancypages/compat.py
1
1314
# -*- coding: utf-8 -*- from django.conf import settings from django.core.exceptions import ImproperlyConfigured _user_model = None try: from django.utils.module_loading import import_string except ImportError: from django.utils.module_loading import import_by_path as import_string # noqa def get_user_mod...
bsd-3-clause
9,087,575,871,766,392,000
28.863636
83
0.672755
false
4.14511
false
false
false
fullcontact/hesiod53
hesiod53/sync.py
1
11846
#!/usr/bin/env python from boto.route53.record import ResourceRecordSets from boto.route53.status import Status import boto.route53 as r53 from collections import namedtuple import argparse import time import yaml # a DNS record for hesiod # fqdn should include the trailing . # value should contain the value without...
mit
-4,982,819,906,042,673,000
33.236994
95
0.573611
false
3.733375
false
false
false
trmznt/rhombus
rhombus/views/gallery.py
1
2066
from rhombus.views import * @roles( PUBLIC ) def index(request): """ input tags gallery """ static = False html = div( div(h3('Input Gallery'))) eform = form( name='rhombus/gallery', method=POST, action='') eform.add( fieldset( input_hidden(name='rhombus-gall...
lgpl-3.0
7,048,302,373,551,598,000
38.75
107
0.545983
false
3.353896
false
false
false
cadencewatches/frappe
frappe/website/doctype/blog_post/test_blog_post.py
1
5111
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt """Use blog post test to test permission restriction logic""" import frappe import frappe.defaults import unittest from frappe.core.page.user_properties.user_properties import add, remove, get_properties, clear_rest...
mit
-6,822,289,126,534,374,000
32.625
108
0.708081
false
3.049523
true
false
false
xiaotianyi/INTELLI-City
docs/refer_project/wx_with_web/wenpl/divide.py
1
10289
# encoding=utf-8 ''' 程序入口showreply ''' import jieba.posseg as pseg import jieba import sys import urllib2 import json import re import copy import datetime import time import calendar from parsedate import parseDate from getdata import* from showAll import* #增加用户词汇库,此处的绝对定位,以后要修改 jieba.load_userdict('wendata/dict/di...
mit
-8,308,332,650,456,147,000
23.286076
112
0.51621
false
3.033839
false
false
false
schleichdi2/OPENNFR-6.3-CORE
opennfr-openembedded-core/meta/lib/oeqa/utils/decorators.py
1
10411
# # Copyright (C) 2013 Intel Corporation # # SPDX-License-Identifier: MIT # # Some custom decorators that can be used by unittests # Most useful is skipUnlessPassed which can be used for # creating dependecies between two test methods. import os import logging import sys import unittest import threading import signal...
gpl-2.0
-7,854,347,878,974,030,000
34.053872
118
0.556046
false
4.142857
true
false
false
PinguinoIDE/pinguino-ide
pinguino/qtgui/ide/tools/paths.py
1
5277
#!/usr/bin/env python #-*- coding: utf-8 -*- #import os from PySide2 import QtCore ## Python3 compatibility #if os.getenv("PINGUINO_PYTHON") is "3": ##Python3 #from configparser import RawConfigParser #else: ##Python2 #from ConfigParser import RawConfigParser from ..methods.dialogs import Dialogs ...
gpl-2.0
-3,444,204,326,737,466,000
39.592308
144
0.602615
false
3.575203
true
false
false
alexanderfefelov/nav
python/nav/smidumps/itw_mibv3.py
1
895755
# python version 1.0 DO NOT EDIT # # Generated by smidump version 0.4.8: # # smidump -f python IT-WATCHDOGS-MIB-V3 FILENAME = "./itw_mibv3.mib" MIB = { "moduleName" : "IT-WATCHDOGS-MIB-V3", "IT-WATCHDOGS-MIB-V3" : { "nodetype" : "module", "language" : "SMIv2", "organization" : ...
gpl-2.0
632,302,935,312,327,800
35.619721
165
0.360062
false
3.81588
false
false
false
InQuest/ThreatKB
migrations/versions/bc0fab3363f7_create_cfg_category_range_mapping_table.py
1
1736
"""create cfg_category_range_mapping table Revision ID: bc0fab3363f7 Revises: 960676c435b2 Create Date: 2017-08-12 23:11:42.385100 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'bc0fab3363f7' down_revision = '960676c435b2' branch_labels = None depends_on = No...
gpl-2.0
-5,685,016,944,618,044,000
40.333333
122
0.710253
false
3.250936
false
false
false
kaflesudip/grabfeed
docs/source/conf.py
1
11341
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Grabfeed documentation build configuration file, created by # sphinx-quickstart on Tue Jan 19 09:26:38 2016. # # 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 # a...
apache-2.0
-7,082,674,678,730,671,000
30.328729
80
0.707786
false
3.65485
true
false
false
kperun/nestml
pynestml/visitors/ast_line_operation_visitor.py
1
1699
# # ASTLineOperatorVisitor.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 o...
gpl-2.0
-7,360,699,407,849,808,000
31.673077
92
0.67628
false
3.870159
false
false
false
bodhiconnolly/python-day-one-client
location.py
1
7437
#------------------------------------------------------------------------------- # Name: location v1.0 # Purpose: get location input from user and find relevant weather # # Author: Bodhi Connolly # # Created: 24/05/2014 # Copyright: (c) Bodhi Connolly 2014 # Licence: GNU General Public License...
gpl-3.0
-414,652,122,782,092,900
36.371859
80
0.514724
false
4.30133
false
false
false
Jaxkr/TruthBot.org
Truthbot/news/migrations/0001_initial.py
1
3654
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-08-06 00:21 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True depend...
gpl-2.0
-7,073,445,214,023,424,000
44.111111
120
0.584291
false
4.329384
false
false
false
bdacode/hoster
hoster/mediafire_com.py
1
5195
# -*- coding: utf-8 -*- """Copyright (C) 2013 COLDWELL AG 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 program is dist...
gpl-3.0
2,031,624,889,750,480,600
32.516129
123
0.646968
false
3.349452
false
false
false
conejoninja/xbmc-seriesly
servers/rapidshare.py
1
1655
# -*- coding: utf-8 -*- #------------------------------------------------------------ # seriesly - XBMC Plugin # Conector para rapidshare # http://blog.tvalacarta.info/plugin-xbmc/seriesly/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core import scrap...
gpl-3.0
3,959,878,289,778,645,500
37.465116
108
0.611245
false
3.062963
false
false
false
RedHatInsights/insights-core
insights/combiners/md5check.py
1
1060
""" NormalMD5 Combiner for the NormalMD5 Parser =========================================== Combiner for the :class:`insights.parsers.md5check.NormalMD5` parser. This parser is multioutput, one parser instance for each file md5sum. Ths combiner puts all of them back together and presents them as a dict where the keys...
apache-2.0
-2,259,252,239,409,799,700
30.176471
72
0.684906
false
3.365079
false
false
false
Answeror/pypaper
pypaper/acm.py
1
4948
#!/usr/bin/env python # -*- coding: utf-8 -*- from pyquery import PyQuery as pq import yapbib.biblist as biblist class ACM(object): def __init__(self, id): self.id = id @property def title(self): if not hasattr(self, 'b'): self.b = self._full_bibtex() return self.b.g...
mit
-4,266,264,121,243,585,000
28.452381
223
0.589733
false
3.102194
false
false
false
guokeno0/vitess
py/vtdb/vtgate_client.py
1
13325
# Copyright 2015 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. """This module defines the vtgate client interface. """ from vtdb import vtgate_cursor # mapping from protocol to python class. vtgate_client_conn_classes = dict() ...
bsd-3-clause
-6,460,589,704,704,032,000
37.623188
79
0.705666
false
4.491068
false
false
false
CitoEngine/cito_plugin_server
cito_plugin_server/settings/base.py
1
5183
"""Copyright 2014 Cyrus Dasadia 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 distr...
apache-2.0
5,227,405,392,165,726,000
31.597484
88
0.737604
false
3.688968
false
false
false
depristo/xvfbwrapper
setup.py
1
1339
#!/usr/bin/env python """disutils setup/install script for xvfbwrapper""" import os from distutils.core import setup this_dir = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(this_dir, 'README.rst')) as f: LONG_DESCRIPTION = '\n' + f.read() setup( name='xvfbwrapper', version='0.2....
mit
9,206,166,086,070,455,000
30.880952
75
0.631068
false
3.892442
false
false
false
zstackorg/zstack-utility
kvmagent/kvmagent/plugins/ha_plugin.py
1
27718
from kvmagent import kvmagent from zstacklib.utils import jsonobject from zstacklib.utils import http from zstacklib.utils import log from zstacklib.utils import shell from zstacklib.utils import linux from zstacklib.utils import lvm from zstacklib.utils import thread import os.path import time import traceback import ...
apache-2.0
-99,950,752,034,942,160
40.370149
140
0.548452
false
3.787647
false
false
false
hatbot-team/hatbot_resources
preparation/resources/Resource.py
1
3889
from hb_res.storage import get_storage from copy import copy import time __author__ = "mike" _resource_blacklist = {'Resource'} _resources_by_trunk = dict() _built_trunks = set() _building_trunks = set() def build_deps(res_obj): assert hasattr(res_obj, 'dependencies') for dep in res_obj.dependencies: ...
mit
-335,135,762,861,733,000
26.006944
95
0.60504
false
4.021717
false
false
false
ClaudiaSaxer/PlasoScaffolder
src/plasoscaffolder/model/sql_query_model.py
1
1280
# -*- coding: utf-8 -*- """The SQL query model class.""" from plasoscaffolder.model import sql_query_column_model_data from plasoscaffolder.model import sql_query_column_model_timestamp class SQLQueryModel(object): """A SQL query model.""" def __init__( self, query: str, name: str, columns: [sql_quer...
apache-2.0
-3,229,932,155,820,182,500
33.594595
77
0.673438
false
3.987539
false
false
false
Eldinnie/ptbtest
examples/test_echobot2.py
1
3680
from __future__ import absolute_import import unittest from telegram.ext import CommandHandler from telegram.ext import Filters from telegram.ext import MessageHandler from telegram.ext import Updater from ptbtest import ChatGenerator from ptbtest import MessageGenerator from ptbtest import Mockbot from ptbtest impor...
gpl-3.0
-2,721,112,711,893,849,600
40.348315
115
0.667663
false
3.89418
true
false
false
jastarex/DeepLearningCourseCodes
01_TF_basics_and_linear_regression/tensorflow_basic.py
1
8932
# coding: utf-8 # # TensorFlow基础 # In this tutorial, we are going to learn some basics in TensorFlow. # ## Session # Session is a class for running TensorFlow operations. A Session object encapsulates the environment in which Operation objects are executed, and Tensor objects are evaluated. In this tutorial, we will...
apache-2.0
-5,786,797,328,990,342,000
39.035874
604
0.716174
false
3.335077
false
false
false
raphaelvalentin/Utils
functions/system.py
1
3297
import re, time, os, shutil, string from subprocess import Popen, PIPE, STDOUT from random import randint, seed __all__ = ['find', 'removedirs', 'source', 'tempfile', 'copy', 'rm', 'template, template_dir'] def find(path='.', regex='*', ctime=0): r = [] regex = str(regex).strip() if regex == '*': regex = ...
gpl-2.0
-3,907,913,281,986,276,000
29.813084
98
0.544738
false
3.583696
false
false
false
rlouf/patterns-of-segregation
bin/plot_gini.py
1
2527
"""plot_gini.py Plot the Gini of the income distribution as a function of the number of households in cities. """ from __future__ import division import csv import numpy as np import itertools from matplotlib import pylab as plt # # Parameters and functions # income_bins = [1000,12500,17500,22500,27500,32500,37500,42...
bsd-3-clause
4,102,064,560,333,777,400
27.393258
114
0.651761
false
2.804661
false
false
false
Jajcus/pyxmpp
pyxmpp/jabber/muccore.py
1
27807
# # (C) Copyright 2003-2010 Jacek Konieczny <jajcus@jajcus.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be u...
lgpl-2.1
7,984,173,956,908,392,000
33.035496
98
0.559104
false
3.792036
false
false
false
mozilla/zamboni
mkt/site/monitors.py
1
8772
import os import socket import StringIO import tempfile import time import traceback from django.conf import settings import commonware.log import elasticsearch import requests from cache_nuggets.lib import memoize from PIL import Image from lib.crypto import packaged, receipt from lib.crypto.packaged import Signing...
bsd-3-clause
7,330,923,754,298,873,000
33.265625
78
0.609097
false
3.85413
false
false
false
Azure/azure-sdk-for-python
sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_operations.py
1
28513
# 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 may ...
mit
6,949,265,218,176,873,000
52.295327
219
0.63792
false
4.11978
true
false
false
richarddzh/markdown-latex-tools
md2tex/md2tex.py
1
6180
''' md2tex.py - author: Richard Dong - description: Convert markdown to latex ''' from __future__ import print_function import re import io import sys import argparse import markdown class State: NORMAL = 0 RAW = 1 class Handler: def __init__(self): self.vars = dict() self.state = State.NORMAL sel...
gpl-2.0
-6,809,639,259,904,145,000
28.2891
105
0.571683
false
3.174114
false
false
false
twestbrookunh/paladin-plugins
core/main.py
1
13912
#! /usr/bin/env python3 """ The MIT License Copyright (c) 2017 by Anthony Westbrook, University of New Hampshire <anthony.westbrook@unh.edu> 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 witho...
mit
-8,417,711,024,441,444,000
33.098039
111
0.592869
false
4.156558
false
false
false
dhhagan/ACT
ACT/thermo/visualize.py
1
13306
""" Classes and functions used to visualize data for thermo scientific analyzers """ from pandas import Series, DataFrame import pandas as pd import datetime as dt import matplotlib.pyplot as plt import numpy as np from matplotlib import dates as d import os import math import glob import matplotlib import warnings i...
mit
-598,425,282,136,535,900
40.070988
141
0.579964
false
3.310774
false
false
false
timm/timmnix
pypy3-v5.5.0-linux64/lib-python/3/ctypes/util.py
1
8948
import sys, os import contextlib import subprocess # find_library(name) returns the pathname of a library, or None. if os.name == "nt": def _get_build_version(): """Return the version of MSVC that was used to build Python. For Python 2.3 and up, the version number is included in sys.versi...
mit
3,323,634,384,645,102,000
32.639098
118
0.486142
false
3.87695
true
false
false
ForeverWintr/ImageClassipy
clouds/tests/util/util.py
1
1283
""" Test utils """ import tempfile import PIL import numpy as np from clouds.util.constants import HealthStatus def createXors(tgt): #create test xor images xorIn = [ ((255, 255, 255, 255), HealthStatus.GOOD), ((255, 255, 0, 0), HealthStatus.CLOUDY), ((0, 0, 0, 0), HealthStatus.GOOD),...
mit
-8,206,075,774,888,230,000
24.156863
97
0.58067
false
3.665714
false
false
false
klahnakoski/jx-sqlite
vendor/mo_logs/__init__.py
1
15837
# encoding: utf-8 # # # 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/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, divisi...
mpl-2.0
-3,171,591,599,001,485,000
35.916084
200
0.612111
false
4.150157
false
false
false
inside-track/pemi
pemi/fields.py
1
7300
import decimal import datetime import json from functools import wraps import dateutil import pemi.transforms __all__ = [ 'StringField', 'IntegerField', 'FloatField', 'DateField', 'DateTimeField', 'BooleanField', 'DecimalField', 'JsonField' ] BLANK_DATE_VALUES = ['null', 'none', 'na...
mit
-8,599,383,492,297,377,000
28.918033
85
0.574521
false
4.133635
false
false
false
ijat/Hotspot-PUTRA-Auto-login
PyInstaller-3.2/PyInstaller/hooks/hook-PyQt5.QtWebEngineWidgets.py
1
2207
#----------------------------------------------------------------------------- # Copyright (c) 2014-2016, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this s...
gpl-3.0
6,505,215,117,670,279,000
44.040816
106
0.589488
false
4.027372
false
false
false
loli/medpy
bin/medpy_diff.py
1
3675
#!/usr/bin/env python """ Compares the pixel values of two images and gives a measure of the difference. Copyright (C) 2013 Oskar Maier 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 versio...
gpl-3.0
8,040,638,095,303,360,000
35.76
128
0.673469
false
3.955867
false
false
false
alphagov/stagecraft
stagecraft/apps/dashboards/models/dashboard.py
1
14599
from __future__ import unicode_literals import uuid from django.core.validators import RegexValidator from django.db import models from stagecraft.apps.organisation.models import Node from stagecraft.apps.users.models import User from django.db.models.query import QuerySet def list_to_tuple_pairs(elements): retu...
mit
-177,456,948,202,694,270
30.875546
81
0.575108
false
4.125177
false
false
false
ottermegazord/ottermegazord.github.io
onexi/data_processing/s05_genPlots.py
1
1460
import pandas as pd import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import os import pdb import sys plt.style.use("ggplot") os.chdir("..") ipath = "./Data/Final_Data/" ifile = "Final_Data" opath = "./Data/Final_Data/Neighborhoods/" imgpath = "./Plots/Neighborhood_TS/" ext = ".csv" input_var =...
mit
1,006,559,307,171,647,600
27.076923
171
0.650685
false
2.570423
false
false
false
manahl/pytest-plugins
pytest-shutil/pytest_shutil/run.py
1
8562
""" Testing tools for running cmdline methods """ import sys import os import imp import logging from functools import update_wrapper import inspect import textwrap from contextlib import closing import subprocess from mock import patch import execnet from six.moves import cPickle # @UnresolvedImport from . impo...
mit
-3,054,477,449,442,501,600
32.057915
105
0.620649
false
3.884755
true
false
false
fennekki/unikko
unikko/output/html.py
1
3802
from yattag import Doc, indent from sys import stderr def _inner_recurse_tags(obj, tree, doc, tag, text): """Execute inner loop structure of HTML generation. Params: obj (Object): The object currently being looped over tree (Object): A VOTL Object containing the subtree-to-be ...
bsd-2-clause
-3,682,860,216,058,355,000
29.416
78
0.522357
false
4.252796
false
false
false
ricardog/raster-project
projections/r2py/rparser.py
1
5180
from pyparsing import * import re ParserElement.enablePackrat() from .tree import Node, Operator import pdb def rparser(): expr = Forward() lparen = Literal("(").suppress() rparen = Literal(")").suppress() double = Word(nums + ".").setParseAction(lambda t:float(t[0])) integer = pyparsing_common.signed_int...
apache-2.0
8,386,587,708,140,975,000
36.266187
143
0.547104
false
3.301466
false
false
false
scdoshi/djutils
djutils/gis.py
1
2346
""" GIS: GIS related utilities. """ ############################################################################### ## Imports ############################################################################### import math ############################################################################### ## GIS Format Con...
bsd-3-clause
8,272,118,917,767,031,000
27.962963
79
0.516624
false
3.884106
false
false
false
ArcherSys/ArcherSys
Scripts/pildriver.py
1
15521
#!c:\xampp\htdocs\scripts\python.exe """PILdriver, an image-processing calculator using PIL. An instance of class PILDriver is essentially a software stack machine (Polish-notation interpreter) for sequencing PIL image transformations. The state of the instance is the interpreter stack. The only method one will norm...
mit
-2,713,842,155,691,706,400
28.56381
95
0.58379
false
3.710495
false
false
false
botswana-harvard/bais-subject
bais_subject/models/attitudes_towards_people.py
1
6192
from django.db import models from edc_base.model_fields import OtherCharField from edc_base.model_mixins import BaseUuidModel from ..choices import (YES_NO, TESTING_REASONS, TB_NONDISCLOSURE, HIV_TEST_RESULT, ARV_USAGE, ARV_TREATMENT_SOURCE, REASONS_ARV_NOT_TAKEN, TB_REAC...
gpl-3.0
-4,917,492,235,012,561,000
27.525346
80
0.607593
false
3.580104
true
false
false
openEduConnect/eduextractor
docs/conf.py
1
9538
# -*- coding: utf-8 -*- # # eduextractor documentation build configuration file, created by # sphinx-quickstart on Mon Aug 10 17:16:14 2015. # # 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. ...
mit
-1,010,721,669,949,313,500
31.222973
79
0.707696
false
3.658611
true
false
false
fako/datascope
src/sources/models/google/text.py
1
2087
from datagrowth.exceptions import DGInvalidResource from sources.models.google.query import GoogleQuery class GoogleText(GoogleQuery): URI_TEMPLATE = 'https://www.googleapis.com/customsearch/v1?q={}' GET_SCHEMA = { "args": { "type": "array", "items": [ { ...
gpl-3.0
6,124,814,023,701,157,000
30.621212
113
0.529947
false
4.347917
false
false
false
SymbiFlow/prjxray
fuzzers/005-tilegrid/pcie/top.py
1
1574
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2017-2020 The Project X-Ray Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC import os import random random.seed(i...
isc
6,070,674,432,901,419,000
24.387097
79
0.579416
false
3.167002
false
false
false
itsnotmyfault1/kimcopter2
crazyflie-pc-client/lib/cflib/crazyflie/__init__.py
1
13576
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 20...
gpl-2.0
7,902,765,162,880,301,000
37.350282
79
0.560106
false
4.149144
false
false
false
twisted/mantissa
xmantissa/test/historic/test_privateApplication3to4.py
1
3405
""" Tests for the upgrade of L{PrivateApplication} schema from 3 to 4. """ from axiom.userbase import LoginSystem from axiom.test.historic.stubloader import StubbedTest from xmantissa.ixmantissa import ITemplateNameResolver, IWebViewer from xmantissa.website import WebSite from xmantissa.webapp import PrivateApplica...
mit
4,140,660,516,419,531,000
37.258427
77
0.726579
false
4.422078
true
false
false
tmenjo/cinder-2015.1.1
cinder/tests/test_rbd.py
1
50268
# Copyright 2012 Josh Durgin # Copyright 2013 Canonical Ltd. # 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/LICENS...
apache-2.0
-407,074,156,635,504,500
40.270936
79
0.555721
false
3.913429
true
false
false
andMYhacks/infosec_mentors_project
app/config.py
1
1971
# project/config.py import os # from dotenv import load_dotenv, find_dotenv basedir = os.path.abspath(os.path.dirname(__file__)) # load_dotenv(find_dotenv()) class BaseConfig: # Base configuration SECRET_KEY = os.environ.get('APP_SECRET_KEY') PASSWORD_SALT = os.environ.get('APP_PASSWORD_SALT') DEBU...
gpl-3.0
7,683,234,075,352,378,000
26
101
0.660071
false
3.113744
true
false
false
gangadharkadam/vlinkfrappe
frappe/model/base_document.py
1
17661
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, sys from frappe import _ from frappe.utils import cint, flt, now, cstr, strip_html, getdate, get_datetime, to_timedelta from frappe.model import default_fields from...
mit
-4,082,703,577,335,195,600
29.189744
117
0.658173
false
3.103321
false
false
false
aferrugento/SemLDA
wsd.py
1
15115
from pywsd.lesk import adapted_lesk from nltk.corpus import wordnet as wn import pickle import time import sys def main(file_name): start = time.time() #string = '/home/adriana/Dropbox/mine/Tese/preprocessing/data_output/' #string = '/home/aferrugento/Desktop/' string = '' h = open(string + file_name + '_proc.txt...
lgpl-2.1
8,973,805,166,957,558,000
30.100823
147
0.557327
false
2.40723
false
false
false
akirk/youtube-dl
youtube_dl/extractor/dreisat.py
1
3607
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, unified_strdate, determine_ext, ) class DreiSatIE(InfoExtractor): IE_NAME = '3sat' _VALID_URL = r'(?:http://)?(?:www\.)?3sat\.de/mediathek/(?:index\.php|mediathek\.php)?\?(?:...
unlicense
-2,878,699,225,443,779,000
35.806122
140
0.524258
false
3.695697
false
false
false
svr93/node-gyp
gyp/pylib/gyp/easy_xml.py
1
4891
# Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import re import os def XmlToString(content, encoding='utf-8', pretty=False): """ Writes the XML content to disk, touching the file only if it has changed. ...
mit
-6,326,042,995,111,190,000
29.56875
80
0.639951
false
3.671922
false
false
false
simphony/simphony-remote
jupyterhub/remoteappmanager_config.py
1
2462
# # -------------------- # # Docker configuration # # -------------------- # # # # Configuration options for connecting to the docker machine. # # These options override the default provided by the local environment # # variables. # # # # The endpoint of the docker machine, specified as a URL. # # By default, it is obt...
bsd-3-clause
-61,252,048,939,831,944
33.676056
79
0.672624
false
3.467606
false
false
false
jolid/script.module.donnie
lib/donnie/tvrelease.py
1
4966
import urllib2, urllib, sys, os, re, random, copy from BeautifulSoup import BeautifulSoup, Tag, NavigableString import xbmc,xbmcplugin,xbmcgui,xbmcaddon from t0mm0.common.net import Net from t0mm0.common.addon import Addon from scrapers import CommonScraper net = Net() try: import json except: # pre-frodo and python...
gpl-2.0
6,514,483,047,913,878,000
27.872093
167
0.620217
false
2.882182
false
false
false
kpiorno/kivy3dgui
kivy3dgui/objloader.py
1
5490
from kivy.logger import Logger import os class MeshData(object): def __init__(self, **kwargs): self.name = kwargs.get("name") self.vertex_format = [ ('v_pos', 3, 'float'), ('v_normal', 3, 'float'), ('v_tc0', 2, 'float')] self.vertices = [] self.i...
mit
-678,245,770,594,618,000
32.47561
121
0.428597
false
3.548804
false
false
false
bmentges/django-cart
cart/cart.py
1
2554
import datetime from django.db.models import Sum from django.db.models import F from . import models CART_ID = 'CART-ID' class ItemAlreadyExists(Exception): pass class ItemDoesNotExist(Exception): pass class Cart: def __init__(self, request): cart_id = request.session.get(CART_ID) if ...
lgpl-3.0
-4,190,622,972,837,579,300
28.697674
113
0.577525
false
3.923195
false
false
false
librallu/cohorte-herald
python/herald/remote/herald_xmlrpc.py
1
10255
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Pelix remote services implementation based on Herald messaging and xmlrpclib :author: Thomas Calmant :copyright: Copyright 2014, isandlaTech :license: Apache License 2.0 :version: 0.0.3 :status: Alpha .. Copyright 2014 isandlaTech Licensed under the ...
apache-2.0
7,400,921,342,612,229,000
28.724638
80
0.603608
false
4.336152
true
false
false
nemesiscodex/JukyOS-sugar
extensions/deviceicon/touchpad.py
1
4769
# Copyright (C) 2010, Walter Bender, Sugar Labs # # 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. # # This program is di...
gpl-2.0
4,583,050,605,971,774,500
31.664384
78
0.672678
false
3.561613
false
false
false
janschulz/igraph
interfaces/python/igraph/nexus.py
1
21903
# vim:ts=4:sw=4:sts=4:et # -*- coding: utf-8 -*- """Interface to the Nexus online graph repository. The classes in this file facilitate access to the Nexus online graph repository at U{http://nexus.igraph.org}. The main entry point of this package is the C{Nexus} variable, which is an instance of L{NexusConnection}. ...
gpl-2.0
82,784,205,133,577,890
38.103571
96
0.59241
false
4.210152
false
false
false
jepcastelein/marketopy
marketo.py
1
9277
import requests import logging import time class MarketoClient: """Basic Marketo Client""" def __init__(self, identity, client_id, client_secret, api): self.api_endpoint = api self.identity_endpoint = identity self.client_id = client_id self.client_secret = client_secret ...
apache-2.0
-1,778,801,031,148,775,700
29.12013
78
0.555244
false
3.990108
false
false
false
walty8/trac
tracopt/ticket/deleter.py
1
7165
# -*- coding: utf-8 -*- # # Copyright (C) 2010 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consists o...
bsd-3-clause
-3,726,745,054,534,510,600
40.155172
79
0.561933
false
4.409483
false
false
false
ggaughan/dee
darwen.py
1
3332
from Dee import Relation, Key, Tuple, QUOTA, MAX, MIN, IS_EMPTY, COUNT, GENERATE from DeeDatabase import Database class darwen_Database(Database): def __init__(self, name): """Define initial relvars and their initial values here (Called once on database creation)""" Database.__ini...
mit
8,448,689,067,475,852,000
40.717949
112
0.344238
false
4.640669
false
false
false
diofeher/django-nfa
django/contrib/admin/widgets.py
1
8956
""" Form Widget classes specific to the Django admin site. """ import copy from django import newforms as forms from django.newforms.widgets import RadioFieldRenderer from django.newforms.util import flatatt from django.utils.datastructures import MultiValueDict from django.utils.text import capfirst, truncate_words ...
bsd-3-clause
2,662,747,587,263,736,300
40.655814
146
0.621706
false
3.81431
false
false
false
chdb/DhammaMap
app/cryptoken.py
1
6464
#!/usr/bin/python # -*- coding: utf-8 -*- #from __future__ import unicode_literals import hashlib import hmac import os import json import utils as u import widget as W import logging from base64 import urlsafe_b64encode\ , urlsafe_b64decode class Base64Error (Exception): '''invalid Base64 chara...
mit
-6,609,240,872,610,904,000
35.942857
100
0.550124
false
3.815821
false
false
false
SciLifeLab/bcbio-nextgen
bcbio/rnaseq/count.py
1
12286
""" count number of reads mapping to features of transcripts """ import os import sys import itertools # soft imports try: import HTSeq import pandas as pd import gffutils except ImportError: HTSeq, pd, gffutils = None, None, None from bcbio.utils import file_exists from bcbio.distributed.transaction...
mit
-7,574,525,932,074,615,000
36.006024
108
0.47664
false
3.859881
false
false
false
hotdoc/hotdoc_gi_extension
setup.py
1
1887
# -*- coding: utf-8 -*- # # Copyright © 2015,2016 Mathieu Duponchelle <mathieu.duponchelle@opencreed.com> # Copyright © 2015,2016 Collabora Ltd # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Found...
lgpl-2.1
-3,706,372,489,089,509,000
35.960784
123
0.69443
false
3.58365
false
false
false
pugpe/pugpe
apps/cert/management/commands/send_certificates.py
1
2215
# -*- coding: utf-8 -*- import traceback from datetime import timedelta from django.core import mail from django.core.mail import EmailMultiAlternatives, mail_admins from django.core.management.base import BaseCommand from django.template.loader import render_to_string from django.utils.translation import ugettext_laz...
mit
7,008,236,078,179,404,000
31.072464
74
0.623588
false
3.980216
false
false
false
kodat/odoo-module-template
odoo_module_template/model.py
1
1936
# -*- coding: utf-8 -*- # Bashir Idirs (Alsuty) # Copyright (C) 2016. # # This Code is free: 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 optio...
gpl-3.0
7,697,741,544,575,525,000
30.813559
77
0.681818
false
3.355286
false
false
false
sixfeetup/cloud-custodian
c7n/resources/waf.py
1
1475
# Copyright 2016-2017 Capital One Services, 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 ...
apache-2.0
-2,341,126,569,578,517,500
33.302326
82
0.684068
false
3.70603
false
false
false
tuomas2/serviceform
serviceform/serviceform/models/participation.py
1
4015
# -*- coding: utf-8 -*- # (c) 2017 Tuomas Airaksinen # # This file is part of Serviceform. # # Serviceform 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)...
gpl-3.0
4,722,200,843,626,066,000
37.615385
95
0.714072
false
3.98709
false
false
false
thermokarst/qiime2
qiime2/core/type/tests/test_parse.py
1
4541
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2020, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
bsd-3-clause
2,467,362,676,587,686,400
36.841667
78
0.586214
false
3.644462
true
false
false
owwlo/Courier
src/courier/app/CourierService.py
1
5234
''' Created on Jan 17, 2015 @author: owwlo ''' from PyQt5 import QtGui, QtCore, QtQml, QtQuick from PyQt5.QtCore import QObject, QUrl, Qt, QVariant, QMetaObject, Q_ARG import threading import websocket import json import logging from time import sleep import coloredlogs WS_URL = "ws://localhost:88...
mit
-3,827,367,293,656,535,000
30.341317
95
0.597058
false
4.137549
false
false
false
carlthome/librosa
librosa/feature/utils.py
1
8078
#!/usr/bin/env python # -*- coding: utf-8 -*- """Feature manipulation utilities""" from warnings import warn import numpy as np import scipy.signal from .._cache import cache from ..util.exceptions import ParameterError __all__ = ['delta', 'stack_memory'] @cache(level=40) def delta(data, width=9, order=1, axis=-1, ...
isc
-6,802,198,681,692,537,000
30.678431
97
0.551498
false
3.286412
false
false
false
chewxy/cu
cmd/gencudnn/parse.py
1
3705
from bs4 import BeautifulSoup import requests import re import sys import os inputs ={} outputs = {} ios = {} docs = {} def get(): if os.path.isfile("cache/docs.html"): with open("cache/docs.html", 'r') as f: print("Using cache", file=sys.stderr) return f.read() r = requests.get("http://docs.nvidia.com/deep...
mit
-7,812,344,624,569,286,000
28.412698
134
0.623212
false
2.899061
false
false
false
MortalViews/python-notes
inheritance.py
1
1192
import random class Person: def __init__(self,name,age,location): self.name = name self.age = age self.locaiton = location def is_sick(self): return random.randint(1,10)%2==0 class AttendenceMixin: def swip_in(self): pass def swip_out(self): pass ...
apache-2.0
4,436,098,363,554,478,600
26.090909
69
0.589765
false
3.547619
false
false
false
lutris/website
games/notifier.py
1
1688
"""Send a digest of unpublished content to moderators""" from django.conf import settings from accounts.models import User from games import models from emails.messages import send_email DEFAULT_COUNT = 12 def get_unpublished_installers(count=DEFAULT_COUNT): """Return a random list of unpublished installers""" ...
agpl-3.0
-6,707,878,073,285,417,000
32.76
82
0.702607
false
3.751111
false
false
false
cloud-ark/cloudark
server/common/fm_logger.py
1
2400
import inspect import logging from server.common import constants class Logging(object): def __init__(self): logging.basicConfig(filename=constants.LOG_FILE_NAME, level=logging.DEBUG, filemode='a', format='%(asctime)s %(message)s', ...
apache-2.0
-4,898,865,385,617,483,000
34.294118
120
0.515417
false
4.339964
false
false
false
azvoleff/chitwanabm
chitwanabm/modelloop.py
1
18907
# Copyright 2008-2013 Alex Zvoleff # # This file is part of the chitwanabm agent-based model. # # chitwanabm 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...
gpl-3.0
1,953,961,682,125,296,600
48.755263
178
0.613106
false
3.252537
true
false
false
djfkahn/MemberHubDirectoryTools
roster_tools.py
1
5813
#!/usr/bin/env python """This program inputs a MemberHub directory dump, and analyzes it. """ import family import roster import os from openpyxl import load_workbook MIN_NUM_ROSTER_FIELDS = 5 def ReadRosterAdultsFromMostRecent(file_name=None): """ roster_tools.ReadRosterAdultsFromMostRecent PURPOSE: Gene...
apache-2.0
4,514,965,062,765,273,000
35.559748
109
0.590745
false
3.829381
false
false
false
yusufm/mobly
mobly/controllers/android_device_lib/event_dispatcher.py
1
15487
#!/usr/bin/env python3.4 # # 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...
apache-2.0
-2,744,429,708,353,299,500
34.766744
79
0.572093
false
4.826114
false
false
false
cavestruz/L500analysis
plotting/profiles/T_Vcirc_evolution/Vcirc_evolution/plot_Vcirc2_nu_binned_Vc500c.py
1
3175
from L500analysis.data_io.get_cluster_data import GetClusterData from L500analysis.utils.utils import aexp2redshift from L500analysis.plotting.tools.figure_formatting import * from L500analysis.plotting.profiles.tools.profiles_percentile \ import * from L500analysis.plotting.profiles.tools.select_profiles \ imp...
mit
385,859,252,746,646,600
36.352941
87
0.610394
false
2.702128
false
false
false
Videoclases/videoclases
quality_control/views/api.py
1
4172
import random from django.contrib.auth.decorators import user_passes_test from django.contrib import messages from django.core.urlresolvers import reverse from django.db.models.aggregates import Count from django.http.response import JsonResponse, HttpResponseRedirect from django.shortcuts import get_object_or_404 fro...
gpl-3.0
-7,057,957,377,848,098,000
45.355556
104
0.661793
false
4.09421
false
false
false
JGrishey/MHLSim
pylib/simulation.py
1
19119
''' Season Simulation 2017 Jacob Grishey For the purpose of simulating sports seasons and determining regular season standings. ''' # IMPORTS import json import statistics import numpy from operator import itemgetter import copy # Read JSON file (schedule, team list) with open("./../data/seas...
mit
-6,972,750,639,965,787,000
33.021352
107
0.500078
false
3.601243
false
false
false
PuZheng/lejian-backend
lejian/apis/model_wrapper.py
1
3211
# -*- coding: UTF-8 -*- import types import inspect import traceback class _MyAttributeError(Exception): pass def convert_attribute_error(f): def f_(*args, **kwargs): try: return f(*args, **kwargs) except AttributeError, e: print "~" * 78 traceback.print...
mit
353,604,400,444,146,900
29.875
76
0.507319
false
4.416781
false
false
false
flyingbanana1024102/transmission-line-simulator
src/views/materialwidget.py
1
2230
# # Transmission Line Simulator # # Author(s): Jiacong Xu # Created: Jun-28-2017 # from kivy.uix.widget import Widget from kivy.properties import * from kivy.clock import Clock from kivy.graphics.texture import Texture from kivy.graphics import * from PIL import Image, ImageDraw, ImageFilter class MaterialWidget(Wid...
mit
-3,297,739,092,324,212,700
26.530864
77
0.604933
false
3.484375
false
false
false
davy39/eric
Plugins/VcsPlugins/vcsMercurial/HgImportDialog.py
1
3032
# -*- coding: utf-8 -*- # Copyright (c) 2011 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a dialog to enter data for the Mercurial import command. """ from __future__ import unicode_literals from PyQt5.QtCore import pyqtSlot, QDateTime from PyQt5.QtWidgets import QDialog, QDialogButt...
gpl-3.0
-8,518,808,736,762,301,000
30.915789
79
0.616755
false
4.211111
false
false
false
dpmehta02/linkedin-scrapy
linkedin/spiders/linkedin_spider.py
1
3589
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import HtmlXPathSelector from scrapy.http import Request from linkedin.items import LinkedinItem class LinkedinSpider(CrawlSpider): """ Define the crawler's start URIs, s...
mit
-8,053,537,752,368,067,000
46.223684
115
0.528281
false
4.106407
false
false
false
blaze/dask
dask/dataframe/hyperloglog.py
3
2433
"""Implementation of HyperLogLog This implements the HyperLogLog algorithm for cardinality estimation, found in Philippe Flajolet, Éric Fusy, Olivier Gandouet and Frédéric Meunier. "HyperLogLog: the analysis of a near-optimal cardinality estimation algorithm". 2007 Conference on Analysis of Algori...
bsd-3-clause
-5,806,826,853,938,484,000
29.375
77
0.615638
false
3.375
false
false
false
ros/catkin
cmake/test/download_checkmd5.py
1
5773
from __future__ import print_function import errno import hashlib import os import sys try: from urllib.request import addinfourl, BaseHandler, build_opener, Request, URLError except ImportError: from urllib2 import addinfourl, BaseHandler, build_opener, Request, URLError from argparse import ArgumentParser N...
bsd-3-clause
-8,443,107,470,869,263,000
32.760234
161
0.57076
false
4.183333
false
false
false
pfmoore/invoke
invoke/parser/context.py
1
9145
import itertools from ..vendor.lexicon import Lexicon from .argument import Argument def translate_underscores(name): return name.lstrip('_').rstrip('_').replace('_', '-') def to_flag(name): name = translate_underscores(name) if len(name) == 1: return '-' + name return '--' + name def sort...
bsd-2-clause
-6,370,345,778,070,750,000
36.633745
93
0.580208
false
4.06806
false
false
false
facebook/fbthrift
thrift/lib/py/Thrift.py
1
11042
# Copyright (c) Facebook, Inc. and its affiliates. # # 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
8,498,865,374,388,009,000
29.929972
86
0.602427
false
4.366153
false
false
false
yavuzovski/playground
python/Udacity/cs215/find_eulerian_tour.py
1
1219
def find_eulerian_tour(graph): # find the node with biggest degree biggest_degree, biggest_node = 0, None for i, node in enumerate(graph): for e in node: count = 0 outer_graph = graph[:] for inner_node in outer_graph: if e in inner_node: ...
gpl-3.0
1,573,255,959,492,710,100
27.348837
88
0.464315
false
3.405028
false
false
false