repo_name
stringlengths
6
61
path
stringlengths
4
230
copies
stringlengths
1
3
size
stringlengths
4
6
text
stringlengths
1.01k
850k
license
stringclasses
15 values
hash
int64
-9,220,477,234,079,998,000
9,219,060,020B
line_mean
float64
11.6
96.6
line_max
int64
32
939
alpha_frac
float64
0.26
0.9
autogenerated
bool
1 class
ratio
float64
1.62
6.1
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
snakeleon/YouCompleteMe-x86
third_party/ycmd/third_party/JediHTTP/vendor/jedi/test/completion/stdlib.py
2
3045
""" std library stuff """ # ----------------- # builtins # ----------------- arr = [''] #? str() sorted(arr)[0] #? str() next(reversed(arr)) next(reversed(arr)) # should not fail if there's no return value. def yielder(): yield None #? None next(reversed(yielder())) # empty reversed should not raise an error ...
gpl-3.0
-7,344,834,146,006,445,000
12.59375
63
0.503777
false
2.848457
false
false
false
dirkhusemann/rezzme
RezzMe/uri.py
1
36319
#!/usr/bin/python # -*- encoding: utf-8 -*- # Copyright (c) Contributors, http://opensimulator.org/ # See CONTRIBUTORS.TXT for a full list of copyright holders. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * ...
bsd-3-clause
-4,486,795,777,950,281,700
42.547962
300
0.451637
false
4.648534
false
false
false
berndhahnebach/BOLTS
freecad/extrusions/wheels.py
2
5455
# ************************************************************************************** # * * # * BOLTS - Open Library of Technical Specifications * # * ...
gpl-3.0
1,902,312,656,742,137,900
31.088235
88
0.449129
false
3.422208
false
false
false
skosukhin/spack
var/spack/repos/builtin/packages/eccodes/package.py
1
4224
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
-5,401,977,492,162,261,000
43.93617
113
0.6366
false
3.795148
false
false
false
chemreac/chemreac
chemreac/util/banded.py
2
2152
# -*- coding: utf-8 -*- """ chemreac.util.banded -------------------- this module contains functions to deal with banded matrices. """ from __future__ import (absolute_import, division, print_function) import numpy as np def get_banded(A, n, N, n_jac_diags=1, order='C', padded=False): """ Turns a dense matrix ...
bsd-2-clause
6,821,952,217,844,712,000
26.551282
70
0.581666
false
3.137226
false
false
false
fna/owning-a-home-api
ratechecker/migrations/0003_auto__add_fee__add_unique_fee_product_id_state_id_lender_single_family.py
2
8879
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Fee' db.create_table(u'ratechecker_fee', ( ('...
cc0-1.0
-4,739,723,807,337,827,000
72.991667
139
0.565829
false
3.540271
false
false
false
cmos3511/cmos_linux
python/op/nop/core/op_top.py
1
7885
""" Description: op platform top entrence """ import argparse from utils import pcom from conf import settings from core import runner_admin from core import runner_init from core import runner_flow from core import runner_backup from lic.op_lic import OPClient LOG = pcom.gen_logger(__name__) def gen_admin_parser(su...
gpl-3.0
7,957,769,981,726,652,000
39.025381
97
0.639949
false
3.829529
false
false
false
idjaw/keystone
keystone/contrib/endpoint_filter/migrate_repo/versions/002_add_endpoint_groups.py
14
1658
# Copyright 2014 Hewlett-Packard Company # # 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
953,416,890,962,155,500
39.439024
75
0.681544
false
4.043902
false
false
false
Dingmatt/AMSA
Plug-ins/Amsa.bundle/Contents/Code/tvdb.py
1
12335
import constants, functions, lxml, logging from functions import XMLFromURL, GetElementText from lxml import etree from lxml.builder import E from lxml.etree import Element, SubElement, Comment def ParseNoFromSeason(season, episode, default): #if season == 0 and episode == 0: # return "S" + str(default).zfi...
gpl-3.0
1,307,995,058,636,179,700
59.170732
266
0.45002
false
4.827789
false
false
false
ckot/django-oneall
django_oneall/templatetags/oneall.py
2
2309
# -*- coding: utf-8 -*- from json import dumps from django.template import Library from django.utils.html import escape from django.utils.safestring import mark_safe from ..app import settings from ..models import SocialUserCache, get_user_model register = Library() @register.inclusion_tag('oneall/header.html') de...
mit
3,545,824,287,108,598,300
31.985714
94
0.650498
false
3.688498
false
false
false
ksons/gltf-blender-importer
addons/io_scene_gltf_ksons/vnode.py
1
24998
from math import pi from mathutils import Matrix, Quaternion, Vector, Euler from .compat import mul from .mesh import mesh_name # The node graph in glTF needs to fixed up quite a bit before it will work for # Blender. We first create a graph of "virtual nodes" to match the graph in the # glTF file and then transform i...
mit
-7,500,626,219,166,107,000
34.711429
95
0.552524
false
3.493292
false
false
false
ff0000/red-fab-deploy2
fab_deploy2/operating_systems/ubuntu/gunicorn.py
1
1886
import os from fab_deploy2.base import gunicorn as base_gunicorn from fab_deploy2.tasks import task_method from fab_deploy2 import functions from fabric.api import sudo, env from fabric.contrib.files import append class Gunicorn(base_gunicorn.Gunicorn): """ Install gunicorn and set it up with supervisor. ...
mit
7,457,330,191,078,504,000
32.678571
114
0.605514
false
3.662136
false
false
false
peca3d/instanceAlongCurve
instanceAlongCurve.py
1
45705
import sys import math import random import traceback import maya.mel as mel import pymel.core as pm import maya.OpenMaya as OpenMaya import maya.OpenMayaMPx as OpenMayaMPx import maya.OpenMayaRender as OpenMayaRender kPluginCmdName = "instanceAlongCurve" kPluginNodeName = 'instanceAlongCurveLocator' kPluginNodeClassi...
mit
-1,575,250,964,229,552,000
44.935678
178
0.660737
false
4.130219
false
false
false
jeremy-bernon/Lilith
lilith/internal/reducedcouplingslo.py
1
8964
########################################################################## # # This file is part of Lilith # made by J. Bernon and B. Dumont # # Web page: http://lpsc.in2p3.fr/projects-th/lilith/ # # In case of questions email bernon@lpsc.in2p3.fr dum33@ibs.re.kr # # # Lilith is free software: you can redistribu...
gpl-3.0
2,113,900,174,371,581,200
37.472103
91
0.498327
false
2.267645
false
false
false
ThiagoLopes/ReportToEasy
advogaprojeto/core/urls.py
1
1325
"""advogaprojeto URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Cl...
gpl-2.0
-118,183,623,692,947,940
43.166667
79
0.679245
false
3.279703
false
false
false
sevein/archivematica
src/MCPClient/lib/clientScripts/verifySIPCompliance.py
1
2583
#!/usr/bin/env python2 # This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica 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, ...
agpl-3.0
-7,424,118,532,454,776,000
33.905405
85
0.655052
false
3.84375
false
false
false
ytsarev/rally
tests/deploy/engines/test_existing.py
1
2136
# Copyright 2013: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
-5,666,701,684,342,492,000
34.016393
78
0.619382
false
4.377049
true
false
false
opencord/voltha
netconf/protoc_plugins/rpc_gw_gen.py
1
9485
#!/usr/bin/env python # # Copyright 2017 the original author or 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 require...
apache-2.0
5,249,324,388,240,249,000
34.657895
85
0.620664
false
3.976939
false
false
false
fdr/wal-e
tests/test_wal_segment.py
11
2463
import pytest from stage_pgxlog import pg_xlog from wal_e import worker from wal_e import exception # Quiet pyflakes about pytest fixtures. assert pg_xlog def make_segment(num, **kwargs): return worker.WalSegment('pg_xlog/' + str(num) * 8 * 3, **kwargs) def test_simple_create(): """Check __init__.""" ...
bsd-3-clause
-4,511,927,377,189,034,000
26.674157
76
0.656922
false
3.30604
true
false
false
pwyf/IATI-Implementation-Schedules
impschedules/isfunctions.py
1
5474
import json from flask import Flask, current_app, request from functools import wraps import collections class JSONEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, datetime.datetime): return obj.isoformat() return json.JSONEncoder.default(self, obj) def jsonify(*ar...
agpl-3.0
6,427,362,584,844,358,000
33.433962
133
0.523201
false
3.594222
false
false
false
rspavel/spack
var/spack/repos/builtin/packages/ibm-databroker/package.py
1
1845
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class IbmDatabroker(CMakePackage, PythonPackage): """The Data Broker (DBR) is a distributed, in...
lgpl-2.1
8,924,453,438,641,355,000
39.108696
95
0.687805
false
3.116554
false
false
false
debayan/jatayu
botmodules/WeekendModel.py
1
2878
''' Copyright 2016 Debayan Banerjee, Shreyank Gupta 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. ...
gpl-3.0
-2,802,824,964,411,021,000
40.710145
230
0.628909
false
3.878706
false
false
false
tdeboissiere/DeepLearningImplementations
InfoGAN/src/model/models.py
1
9122
from keras.models import Model from keras.layers.core import Flatten, Dense, Dropout, Activation, Lambda, Reshape from keras.layers.convolutional import Conv2D, Deconv2D, ZeroPadding2D, UpSampling2D from keras.layers import Input, merge from keras.layers.advanced_activations import LeakyReLU from keras.layers.normaliza...
mit
-1,602,562,786,555,748,600
33.164794
126
0.604363
false
3.038641
false
false
false
le717/ICU-ReDirect
ReDirect.py
1
14189
""" This file is part of ICU (LEGO Island Configuration Utility) ICU - A collection of LEGO Island Configuration Tools Created 2012-2013 Triangle717 <http://triangle717.wordpress.com> ICU is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License a...
gpl-3.0
-2,704,006,476,380,678,700
34.475
121
0.608006
false
3.922864
false
false
false
zurgzurg/pytoken
setup.py
1
3578
import sys import os import pdb import shutil import os.path from distutils.command.clean import clean as _clean from distutils.core import setup, Extension from distutils import sysconfig ################################################################## def customize_compiler2(compiler): (cc, cxx, opt, cflags, ...
bsd-3-clause
4,125,798,810,888,287,000
26.523077
66
0.454723
false
4.103211
false
false
false
andrewebdev/django-adzone
adzone/south_migrations/0006_add_all_sites.py
6
8725
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." # Note: Don't use "from appname.models imp...
bsd-3-clause
-2,767,434,474,907,375,000
67.700787
182
0.544871
false
3.672138
false
false
false
hyperknot/hunairspace
pgairspace/features.py
2
1686
import geojson import json import os from geojson import Feature, FeatureCollection from .config import json_dir, geojson_dir from .utils import read_json, write_file_contents from .geom import sort_geojson def make_features(border, process_raw_geometry): print '---\nMaking features' features = list() ...
mit
-1,923,401,199,989,005,800
30.222222
136
0.626928
false
3.681223
false
false
false
M4rtinK/anaconda
tests/nosetests/pyanaconda_tests/signal_test.py
5
5383
# # Martin Kolman <mkolman@redhat.com> # # Copyright 2016 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # will be use...
gpl-2.0
5,196,488,187,354,119,000
33.50641
82
0.631618
false
4.262074
true
false
false
funkandwagnalls/pythonpentest
multi_process.py
2
8441
#!/usr/bin/env python ''' Author: Christopher Duffy Date: July 2015 Name: multi_process.py Purpose: To identify live web applications with a list of IP addresses, using parallel processes Copyright (c) 2015, Christopher Duffy All rights reserved. Redistribution and use in source and binary forms, with or without modi...
bsd-3-clause
1,954,952,929,908,768,800
56.421769
155
0.637721
false
4.166338
false
false
false
omf2097/pyomftools
omftools/pyshadowdive/tournament.py
1
3755
import typing from .protos import Entrypoint from .sprite import Sprite from .palette import Palette from .pilot import Pilot class TournamentFile(Entrypoint): MAX_ENEMIES = 256 MAX_LOCALES = 10 __slots__ = ( "bk_name", "winnings_multiplier", "unknown_a", "registration_fe...
mit
-2,213,516,994,580,909,800
32.526786
88
0.580826
false
3.617534
false
false
false
igatoolsProject/igatools
source/basis_functions/bernstein_extraction.serial.py
1
1764
#-+-------------------------------------------------------------------- # Igatools a general purpose Isogeometric analysis library. # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). # # This file is part of the igatools library. # # The igatools library is free software: you can use it, redistribute...
gpl-3.0
-4,496,167,519,290,841,000
35
110
0.606576
false
3.614754
false
false
false
tvtsoft/odoo8
addons/hr/res_config.py
2
3066
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp.osv import fields, osv class hr_config_settings(osv.osv_memory): _name = 'hr.config.settings' _inherit = 'res.config.settings' _columns = { 'module_hr_timesheet_sheet': fields.boolean('...
agpl-3.0
354,536,197,653,338,600
54.745455
126
0.644162
false
4.258333
false
false
false
Proteogenomics/trackhub-creator
pipelines/ensembl_data_collector.py
1
4594
# # Author    : Manuel Bernal Llinares # Project   : trackhub-creator # Timestamp : 26-07-2017 12:29 # --- # © 2017 Manuel Bernal Llinares <mbdebian@gmail.com> # All rights reserved. # """ This pipeline collects data from Ensembl to avoid race conditions when running other pipelines that use this data """ import os...
apache-2.0
-5,812,039,569,916,996,000
39.584071
118
0.655255
false
4.022807
true
false
false
zhs007/movieSpider
moviespider/moviespider/spiders/doubanmovie_spider.py
1
1869
# -*- coding: utf-8 -*- from scrapy.spider import Spider from scrapy.selector import Selector from moviespider.items import Cili006Item from moviespider.moviedb import MovieDB import scrapy class DoubanSearch2Spider(Spider): moviedb = MovieDB() name = "doubanmovie" allowed_domains = ["douban.com"] ...
mit
486,270,143,788,835,460
31.666667
114
0.547555
false
3.3898
false
false
false
k323r/flugkatze
cockpit/python/livePyQTPlot.py
1
1663
from pyqtgraph.Qt import QtGui, QtCore import pyqtgraph as pg import collections import random import time import math import numpy as np class DynamicPlotter(): def __init__(self, sampleinterval=0.1, timewindow=10., size=(600,350)): # Data stuff self._interval = int(sampleinterval*1000) ...
mit
2,714,380,203,178,526,000
30.377358
79
0.616356
false
3.443064
false
false
false
zzzzrrr/openmelee
render/sdl.py
1
3905
# # Copyright (c) 2009 Mason Green & Tom Novelli # # This file is part of OpenMelee. # # OpenMelee 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 # any later version. # # O...
gpl-3.0
6,273,487,270,064,252,000
30.491935
106
0.579513
false
3.697917
false
false
false
dariusbakunas/rawdisk
rawdisk/plugins/filesystems/ntfs/bootsector.py
1
3080
# -*- coding: utf-8 -*- from rawdisk.util.rawstruct import RawStruct from .headers import BIOS_PARAMETER_BLOCK, EXTENDED_BIOS_PARAMETER_BLOCK class BootSector(RawStruct): """Represents NTFS Bootsector Attributes: oem_id (8 byte string): NTFS filesystem signature 'NTFS ' bpb (Bpb): Initia...
bsd-3-clause
-8,052,300,448,519,116,000
32.478261
79
0.570779
false
3.52
false
false
false
nbeck90/django-imager
imager/imager_images/migrations/0002_auto_20150309_1616.py
1
1460
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('imager_images', '0001_initial'), ] operations = [ migrations.AlterField( model_name='imageralbum', n...
mit
-3,027,618,557,306,669,600
32.181818
153
0.560959
false
4.219653
false
false
false
codefordc/housing-insights
back_end/ETL/project.py
1
6472
''' make_projects_table.py ---------------------- This file creates the projects table in the database, which is sent to the front-end via /api/projects/. It depends on the following data sources: - Projects.csv, From the Preservation Catalog Folder in the s3 - 'Affordable Housing Data...
mit
-7,621,508,386,215,367,000
40.487179
192
0.631335
false
3.313876
false
false
false
akosiaris/p2pool
p2pool/work.py
1
20038
from __future__ import division import base64 import random import sys import time from twisted.internet import defer from twisted.python import log import bitcoin.getwork as bitcoin_getwork, bitcoin.data as bitcoin_data from bitcoin import helper, script, worker_interface from util import forest, jsonrpc, variable,...
gpl-3.0
8,832,913,668,593,025,000
53.451087
184
0.568819
false
3.857913
false
false
false
jrichte43/ProjectEuler
Problem-0416/solutions.py
1
1378
__problem_title__ = "A frog's trip" __problem_url___ = "https://projecteuler.net/problem=416" __problem_description__ = "A row of squares contains a frog in the leftmost square. By " \ "successive jumps the frog goes to the rightmost square and then back " \ "to the ...
gpl-3.0
4,883,869,645,783,429,000
39.529412
100
0.535559
false
3.870787
false
false
false
yossitamarov/calc_local_library
polls/excelcompiler.py
1
40551
# We will choose our wrapper with os compatibility # ExcelComWrapper : Must be run on Windows as it requires a COM link to an Excel instance. # ExcelOpxWrapper : Can be run anywhere but only with post 2010 Excel formats try: import win32com.client import pythoncom from pycel.excelwrapper import...
gpl-3.0
-7,260,504,299,018,833,000
38.833988
151
0.518113
false
3.997141
false
false
false
TilCreator/Tapastic-Comic-Downloader
tapas-dl.py
1
11896
#!/bin/env python3 from pyquery import PyQuery as pq from pathlib import Path import os import argparse import re import requests def lead0(num, max): return str(num).zfill(len(str(max))) def terminal_size(): try: import fcntl import termios import struct th, tw, hp, wp = st...
mit
-8,863,121,167,300,171,000
40.740351
301
0.580531
false
3.716339
false
false
false
treefrogframework/FrameworkBenchmarks
frameworks/Python/pyramid/frameworkbenchmarks/models.py
15
1305
""" Benchmark models. """ import json import os import psycopg2 from collections import Iterable from sqlalchemy import create_engine, MetaData, Table, Column, Integer, String from sqlalchemy.orm import sessionmaker from sqlalchemy.pool import QueuePool from sqlalchemy.ext.declarative import declarative_base, Declarat...
bsd-3-clause
5,405,198,107,441,629,000
24.588235
78
0.687356
false
3.760807
false
false
false
Shu-Ji/ebook-chinese-ocr
ocr.py
1
7062
# coding: u8 from hashlib import md5 as _m5 from itertools import izip import cPickle as pickle import os import time from PIL import Image import Levenshtein md5 = lambda s: _m5(s).hexdigest() class Otsu(object): FAST_VAL = 255 # 只要是非0就可以 BINARY_THRESHOLD = 190 # 二值化阈值 def __init__(self, path=Non...
mit
-8,641,748,544,319,254,000
29.975845
79
0.46413
false
2.980939
false
false
false
mattstruble/crusty
crusty/game.py
1
1610
#!/usr/bin/env python # Copyright (c) 2016 Matt Struble. All Rights Reserved. # # Use is subject to license terms. # # Author: Matt Struble # Date: Aug. 31 2016 import time, os from graphics.graphicsdevice import GraphicsDevice from inputs import Keyboard, Keys class Game: #{ """ Handles initialization and core ...
mit
1,304,281,080,459,204,000
22.333333
70
0.543478
false
4.065657
false
false
false
samjo-nyang/samground
samground/trash/models.py
1
1635
from django.conf import settings from django.db import models import os class Tfile(models.Model): PERM_PUBLIC = 1 PERM_CONFIDENTIAL = 2 PERM_CLASSIFIED = 3 PERM_TYPES = ( (PERM_PUBLIC, 'Public'), (PERM_CONFIDENTIAL, 'Confidential'), (PERM_CLASSIFIED, 'Classified'), ) ...
mit
-3,573,165,053,851,866,600
28.196429
63
0.650153
false
3.478723
false
false
false
umich-brcf-bioinf/Connor
setup.py
1
2313
from __future__ import print_function import os import platform import sys from setuptools import find_packages, setup import connor _REQUIRED_PYTHON_VERSION = (2, 7) def check_python_version(): if sys.version_info < _REQUIRED_PYTHON_VERSION: msg_format = ''' Problem: Python v{0}.{1} or above is require...
apache-2.0
9,214,188,016,857,975,000
38.87931
79
0.587549
false
4.036649
false
false
false
tfgraph/tfgraph
tfgraph/algorithms/pagerank/transition/transition_reset_matrix.py
1
4800
import numpy as np import tensorflow as tf from tfgraph.algorithms.pagerank.transition.transition import Transition from tfgraph.graph.graph import Graph class TransitionResetMatrix(Transition): """ Transition Matrix Class This class implements the functionality of a 2-D matrix that represents the probability...
apache-2.0
-4,060,738,975,726,950,400
37.709677
83
0.624167
false
4.067797
false
false
false
bhargavz/py-twitter-sentiment-analysis
data/db/base/userObj.py
1
2713
#!/usr/bin/python # -*- coding: utf-8 -*- # # FILE: userObj.py # # An object that mirrors the user data table in the database # # Copyright by Author. All rights reserved. Not for reuse without # express permissions. # # from datetime import datetime import copy class userObj(object): def __init__(self):...
mit
-5,726,932,227,834,109,000
31.686747
312
0.542573
false
3.37858
false
false
false
mauropalumbo75/pyqha
pyqha/plotutils.py
1
6080
#encoding: UTF-8 # Copyright (C) 2016 Mauro Palumbo # This file is distributed under the terms of the # MIT License. # See the file `License' in the root directory of the present distribution. """ A collection of wrappers for the *matplotlib* functions. .. Note:: All functions return a *matplotlib* which can be m...
mit
8,260,005,133,392,983,000
29.552764
102
0.530592
false
3.119548
false
false
false
redhat-cip/dci-agent
dci_agent/ansible/library/dci_upload.py
1
4320
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2016-2017 Red Hat, 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 # # Unle...
apache-2.0
-196,556,626,459,693,900
33.83871
77
0.574769
false
3.642496
false
false
false
daenney/err-githubhook
providers.py
1
8711
import hashlib import hmac from errbot.templating import tenv GITHUB_EVENTS = ['commit_comment', 'create', 'delete', 'deployment', 'deployment_status', 'fork', 'gollum', 'issue_comment', 'issues', 'member', 'page_build', 'public', 'pull_request_review_comment', 'pull...
gpl-3.0
-17,808,484,313,198,146
37.039301
117
0.555505
false
4.118676
false
false
false
sbkolate/sap_frappe_v6
frappe/desk/doctype/feed/feed.py
3
3188
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: See license.txt from __future__ import unicode_literals import frappe import frappe.defaults import frappe.permissions from frappe.model.document import Document from frappe.utils import get_fullname from frappe import _ exclude_from_link...
mit
5,286,188,534,838,085,000
29.361905
110
0.683814
false
3.092144
false
false
false
Shouqun/node-gn
tools/depot_tools/gerrit_util.py
1
30246
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Utilities for requesting information for a gerrit server via https. https://gerrit-review.googlesource.com/Documentation/rest-api.html """ impor...
mit
-4,422,473,123,791,376,000
33.646048
95
0.659426
false
3.64278
false
false
false
aconchillo/bitpacket
src/BitPacket/MetaField.py
2
3997
#!/usr/bin/env python # # @file MetaField.py # @brief A proxy for another field. # @author Aleix Conchillo Flaque <aconchillo@gmail.com> # @date Fri Jan 15, 2010 10:22 # # Copyright (C) 2010, 2011, 2012 Aleix Conchillo Flaque # # This file is part of BitPacket. # # BitPacket is free software: you can redistrib...
gpl-3.0
1,189,359,358,328,893,400
26.756944
80
0.592695
false
3.850674
false
false
false
kcsaff/CA
src/algorithms/xx2.py
1
4286
# Copyright (C) 2010 by Kevin Saff # This file is part of the CA scanner. # The CA scanner 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 la...
gpl-3.0
-7,492,452,754,597,536,000
29.985075
80
0.526365
false
3.281776
false
false
false
physion/ovation-python
ovation/util/licensed.py
1
2180
""" Utilities for working with github/licensed cached license data """ import pathlib import yaml import csv from six import StringIO _LICENSE_URLS = {'apache-2.0': 'https://www.apache.org/licenses/LICENSE-2.0', 'mit': 'https://opensource.org/licenses/MIT', 'gpl2': 'https://www.gnu....
gpl-3.0
7,859,681,477,088,932,000
37.928571
113
0.583945
false
3.471338
false
false
false
zongtongyi/leetcode
023_Merge_k_Sorted_Lists.py
1
1641
#! /usr/bin/env python # -*- coding:utf-8 -*- def printlist(head): print head.val while head.next: head = head.next print head.val # Definition for singly-linked list. class ListNode(object): def __init__(self, x): self.val = x self.next = None import heapq class ...
mit
-6,833,300,006,282,485,000
21.791667
56
0.473492
false
3.521459
false
false
false
mozbhearsum/balrog
auslib/web/common/releases.py
2
3014
import json import logging from connexion import problem, request from flask import Response, jsonify from auslib.global_state import dbo from auslib.web.common.csrf import get_csrf_headers log = logging.getLogger(__name__) def strip_data(release): """Return a release with all the fields except data. This...
mpl-2.0
-5,088,813,654,994,552,000
32.865169
157
0.683809
false
3.7675
false
false
false
vikas86/python_flask_vikas
vikas.py
1
2073
import sqlite3 from flask import Flask, request, session, g, redirect, url_for, abort, jsonify,render_template, flash from contextlib import closing DATABASE = '/tmp/vikas.db' DEBUG = True SECRET_KEY = 'vikas123' USERNAME = 'admin' PASSWORD = 'admin' app = Flask(__name__) app.config.from_object(__name__) def connect...
gpl-2.0
-4,087,519,908,299,340,300
27.791667
102
0.622287
false
3.54359
false
false
false
roberzguerra/RSSReader
RSSReader/settings.py
1
2431
# -*- coding:utf-8 -*- """ Django settings for RSSReader project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.pa...
apache-2.0
-8,745,893,467,391,407,000
24.6
75
0.712464
false
3.258713
false
false
false
ZeitOnline/zeit.content.author
src/zeit/content/author/tests/test_reference.py
1
5878
from zeit.cms.checkout.interfaces import ICheckoutManager import gocept.testing.mock import lxml.etree import mock import zeit.cms.content.interfaces import zeit.cms.testing import zeit.content.article.edit.author import zeit.content.author.author import zeit.content.author.testing import zope.component class Authors...
bsd-3-clause
4,233,580,874,815,613,000
40.985714
79
0.669956
false
3.821847
true
false
false
dimagol/trex-core
scripts/external_libs/simpy-3.0.10/simpy/rt.py
5
2983
"""Execution environment for events that synchronizes passing of time with the real-time (aka *wall-clock time*). """ try: # Python >= 3.3 from time import monotonic as time, sleep except ImportError: # Python < 3.3 from time import time, sleep from simpy.core import Environment, EmptySchedule, Infini...
apache-2.0
-8,112,766,933,077,260,000
32.516854
79
0.617164
false
4.207334
false
false
false
patricklaw/pants
tests/python/pants_test/integration/remote_cache_integration_test.py
3
2836
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.engine.internals.native_engine_pyo3 import PyExecutor, PyStubCAS from pants.option.global_options import RemoteCacheWarningsBehavior from pants.option.scope import GLOBAL_SCOPE_...
apache-2.0
5,741,512,221,581,652,000
37.324324
96
0.61354
false
3.82726
false
false
false
scottkirkwood/mm2odp
mm2odp/update_odp.py
1
4744
#!/usr/bin/env python # """Modify an open office document. Specifically designed to modify an OpenOffice Presentation. """ __author__ = 'scott@google.com (scottkirkwood))' import sys import zipfile import copy try: import xml.etree.ElementTree as ET # Python 2.5 except: try: import cElementTree as ET # Fas...
gpl-2.0
366,265,514,852,888,100
28.465839
79
0.580101
false
3.400717
false
false
false
edio/scribscrob
scribscrob/model.py
1
1154
STOP = "stop" PLAY = "play" PAUSE = "pause" class Song: """ Simple structure over currentsong dict returned by MPDClient """ def __init__(self, song: dict): """ Create instance from dictionary returned by MPDClient """ # primary self.title = song.get('title') ...
gpl-3.0
3,224,746,788,041,680,400
26.47619
85
0.564125
false
3.771242
false
false
false
dongweiming/web_develop
chapter3/section3/orm_sql.py
1
1240
# coding=utf-8 from sqlalchemy import create_engine, Column, Integer, String, Sequence from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import and_, or_ from sqlalchemy.orm import sessionmaker from consts import DB_URI eng = create_engine(DB_URI) Base = declarative_base() class User(Base): ...
gpl-3.0
4,338,049,061,396,765,700
24.833333
71
0.683871
false
3.076923
false
false
false
dokipen/trac
trac/resource.py
1
15270
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2009 Edgewall Software # Copyright (C) 2006-2007 Alec Thomas <alec@swapoff.org> # Copyright (C) 2007 Christian Boos <cboos@neuf.fr> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distr...
bsd-3-clause
-1,609,402,974,996,894,000
34.84507
79
0.623379
false
4.166439
false
false
false
LukeMurphey/splunk-google-drive
src/bin/google_drive_app/oauth2client/_pure_python_crypt.py
59
6367
# 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 ...
apache-2.0
1,831,056,636,899,550,000
33.603261
79
0.593215
false
4.02211
false
false
false
ladybug-tools/honeybee
honeybee_plus/radiance/command/rfluxmtx.py
3
16283
# coding=utf-8 from ._commandbase import RadianceCommand from ..datatype import RadiancePath, RadianceValue, RadianceNumber from ..datatype import RadianceBoolFlag from ..parameters.rfluxmtx import RfluxmtxParameters import os # TODO (sarith and mostapha): move parameters such as output_data_format to command # par...
gpl-3.0
188,205,192,736,165,800
37.223005
89
0.560769
false
3.951225
false
false
false
testmana2/test
E5Gui/E5ClickableLabel.py
2
1532
# -*- coding: utf-8 -*- # Copyright (c) 2012 - 2015 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a clickable label. """ from __future__ import unicode_literals from PyQt5.QtCore import pyqtSignal, Qt, QPoint from PyQt5.QtWidgets import QLabel class E5ClickableLabel(QLabel): """ Cl...
gpl-3.0
385,187,944,502,301,200
29.039216
77
0.615535
false
4.085333
false
false
false
goodcrypto/goodcrypto-libs
syr/pyjs.py
1
1207
#! /usr/bin/env python ''' Python to javascript compiler. Do not confuse this pyjs module with the python dialect at pyjs.org. Currently compiles RapydScript, a dialect of python designed to compile to javascript. Copyright 2013-2016 GoodCrypto Last modified: 2016-04-20 This file is ope...
gpl-3.0
466,930,403,348,249,900
22.211538
82
0.70174
false
3.725309
false
false
false
aisk/leancloud-python-sdk
leancloud/message.py
1
5791
# coding: utf-8 """ 实时通讯消息相关操作。 """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from datetime import datetime from typing import Any from typing import Dict from typing import Generator from typing import List fr...
lgpl-3.0
5,837,776,280,869,108,000
39.277778
118
0.621478
false
2.780822
false
false
false
Thingee/cinder
cinder/volume/api.py
1
43519
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
apache-2.0
-8,834,907,751,923,250,000
41.749509
79
0.547163
false
4.663416
false
false
false
teopeurt/tapz
tapz/panels/intervals.py
1
1969
import datetime class Interval(object): "Base date interval class" @classmethod def range(cls, start, end): """ Return a range of datetime objects between start and end """ r = [] while start <= end: r.append(start) start += cls.delta ...
bsd-3-clause
-3,802,492,518,965,144,000
26.732394
86
0.586592
false
3.772031
false
false
false
GNOME/gnome-dvb-daemon
tests/test-dvb-daemon.py
3
17249
import gnomedvb import unittest import sys import random import datetime import time import re from gi.repository import GLib class DVBTestCase(unittest.TestCase): def assertSuccessAndType(self, data, objtype): self.assertType(data[1], bool) self.assertTrue(data[1]) self.assertType(data[0]...
gpl-3.0
2,183,226,175,969,756,400
37.588367
81
0.575859
false
3.852803
true
false
false
stephrdev/brigitte
brigitte/repositories/migrations/0004_auto__add_repositoryuser__add_unique_repositoryuser_repo_user.py
1
5420
# 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 model 'RepositoryUser' db.create_table('repositories_repositoryuser', ( ('id', self.g...
bsd-3-clause
-4,994,757,493,552,065,000
62.023256
182
0.564207
false
3.841247
false
false
false
takeshixx/deen
deen/plugins/assemblies/mips.py
1
1991
try: import keystone except ImportError: keystone = None try: import capstone except ImportError: capstone = None from .__base__ import AsmBase class DeenPluginAsmMips(AsmBase): name = 'assembly_mips' display_name = 'MIPS' aliases = ['asm_mips', 'mips32', 'mi...
apache-2.0
-2,235,022,324,194,722,800
36.566038
71
0.643395
false
3.420962
false
false
false
nioushajafari/iranNewsBot
bot.py
1
3332
# -*- coding: utf-8 -*- import sys import HTMLParser import os import urllib2 import tweepy import json from time import gmtime, strftime from secrets import * reload(sys) sys.setdefaultencoding('utf-8') __location__ = os.path.realpath( os.path.join(os.getcwd(), os.path.dirname(__file__))) hparser = HTMLParser.HTM...
mit
8,835,655,319,347,536,000
25.444444
89
0.537215
false
3.756483
false
false
false
zaneb/matahari
src/python/matahari/shell/types.py
1
9668
# Copyright (C) 2011 Red Hat, Inc. # Written by Zane Bitter <zbitter@redhat.com> # # 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.1 of the License, or (at your option) any la...
gpl-2.0
5,319,773,342,217,698,000
28.386018
79
0.519032
false
3.797329
false
false
false
dkdeconti/HLA_epitope_prediction_from_WES
nethmc_parse.py
1
2758
#! /usr/bin/env python """ Parses the NetHMC output into TSV sorted by affinity. """ import argparse import itertools import re import sys from operator import itemgetter def parse_fasta_for_names(filename): """ """ name_dict = {} with open(filename, 'rU') as handle: for line in handle: ...
mit
535,049,607,968,474,560
31.833333
80
0.495286
false
3.662683
false
false
false
fromleaf/study_two_scoops
two_scoops/taste/views.py
1
2250
# -*- coding: utf-8 -*- from cached_property import cached_property from django.core.exceptions import ObjectDoesNotExist from django.views.generic import ( ListView, UpdateView, TemplateView, DetailView, CreateView ) from django.core.urlresolvers import reverse from braces.views import LoginRequiredMixin from s...
gpl-3.0
7,807,723,323,739,347,000
24.280899
73
0.680444
false
3.646677
false
false
false
xguse/spartan
src/spartan/utils/sandbox.py
1
4836
from string import Template from collections import deque from decimal import Decimal import pandas as pd from spartan.utils.errors import * from spartan.utils.misc import Bunch,fold_seq def meme_minimal2transfac(meme_path,out_path): """ """ meme_deck = deque(open(meme_path,'rU')) #raise Exc...
mit
202,428,726,396,044,200
27.964072
128
0.490281
false
3.550661
false
false
false
mferenca/HMS-ecommerce
ecommerce/extensions/api/exceptions.py
2
1277
"""Exceptions and error messages used by the ecommerce API.""" from django.utils.translation import ugettext_lazy as _ from rest_framework import status from rest_framework.exceptions import APIException PRODUCT_OBJECTS_MISSING_DEVELOPER_MESSAGE = u"No product objects could be found in the request body" PRODUCT_OBJEC...
agpl-3.0
1,228,558,517,401,397,200
40.193548
116
0.761942
false
3.917178
false
false
false
robhowley/nextbeeronme
src/db/beersimilarity.py
1
5903
# access to the beer similarity table # cli: truncate beersimilarity, load unique feature set # and recompute all beer similarities from datetime import datetime as dt from tableacc import TableAcc class BeerSimilarity(TableAcc): def __init__(self): super(BeerSimilarity, self).__init__( table_n...
apache-2.0
-2,260,625,925,836,058,000
27.941176
101
0.597832
false
3.121629
false
false
false
kniz/World
build/m.css/pelican-plugins/latex2svg.py
2
5665
#!/usr/bin/env python3 """latex2svg Read LaTeX code from stdin and render a SVG using LaTeX + dvisvgm. """ __version__ = '0.1.0' __author__ = 'Tino Wagner' __email__ = 'ich@tinowagner.com' __license__ = 'MIT' __copyright__ = '(c) 2017, Tino Wagner' import os import sys import subprocess import shlex import re from te...
lgpl-2.1
-4,294,388,438,650,157,000
29.456989
78
0.60812
false
3.741744
false
false
false
scienceopen/pyimagevideo
FPS_matplotlib_image.py
1
2891
#!/usr/bin/env python """ demo of measuring FPS performance with Matplotlib and OpenCV i.e. how fast can I update an image plot Example: $ python FPS_matplotlib_image.py matplotlib 3.0.2 imshow average FPS 27.66 over 100 frames. matplotlib 3.0.2 pcolormesh average FPS 6.76 over 100 frames. OpenCV 3.4.3 average FPS 2...
gpl-3.0
-7,584,691,287,962,307,000
29.431579
126
0.657904
false
3.098607
false
false
false
lidiamcfreitas/FenixScheduleMaker
ScheduleMaker/brython/www/src/Lib/test/test_warnings.py
27
33938
from contextlib import contextmanager import linecache import os from io import StringIO import sys import unittest import subprocess from test import support from test.script_helper import assert_python_ok from test import warning_tests import warnings as original_warnings py_warnings = support.import_fresh_module(...
bsd-2-clause
-3,574,387,733,208,198,000
41.473091
80
0.582597
false
4.434339
true
false
false
Petr-Kovalev/nupic-win32
py/nupic/support/FileLock.py
2
3105
#! /usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditi...
gpl-3.0
612,251,764,084,301,400
28.028037
83
0.613205
false
4.354839
false
false
false
TzuChieh/Photon-v2
scripts/utility/downloader.py
1
1341
import urllib.request import zipfile import os import time def download_file(src_file_url, dst_file_path, max_retry=10): print("Downloading file %s..." % dst_file_path) def progress_reporter(num_chunks_read, chunk_size, total_size): read_so_far = num_chunks_read * chunk_size print("\r - Downloaded: %d MB -" %...
mit
7,877,643,992,446,901,000
25.294118
83
0.687547
false
2.993304
false
false
false
sendgridlabs/ddbmock
tests/functional/pyramid/test_update_table.py
1
3138
import json import time import unittest import mock NOW = time.time() NOW2 = time.time() + 42 * 1000 TABLE_NAME = 'Table-1' TABLE_RT = 45 TABLE_WT = 123 TABLE_RT2 = 10 TABLE_WT2 = 10 TABLE_HK_NAME = u'hash_key' TABLE_HK_TYPE = u'N' TABLE_RK_NAME = u'range_key' TABLE_RK_TYPE = u'S' HEADERS = { 'x-amz-target': 'd...
lgpl-3.0
-6,893,056,448,100,929,000
28.603774
75
0.543658
false
3.704841
true
false
false
agriffis/urlobject
urlobject/path.py
4
4746
# -*- coding: utf-8 -*- import posixpath import urllib from .compat import urlparse from .six import text_type, u class Root(object): """A descriptor which always returns the root path.""" def __get__(self, instance, cls): return cls('/') class URLPath(text_type): root = Root() def __r...
unlicense
-1,322,789,359,125,008,000
24.643243
79
0.521079
false
3.744278
false
false
false
varunasingh/ADL_LRS
oauth_provider/managers.py
4
1707
from django.db import models from django.contrib.auth.models import User from consts import KEY_SIZE, SECRET_SIZE # lou w - removed any references to Resource class ConsumerManager(models.Manager): def create_consumer(self, name, user=None): """Shortcut to create a consumer with random key/secret.""" ...
apache-2.0
8,737,774,478,903,112,000
41.675
82
0.546573
false
4.822034
false
false
false
craws/OpenAtlas-Python
openatlas/models/imports.py
1
6864
from __future__ import annotations # Needed for Python 4.0 type annotations from typing import Any, List, Optional from flask import g from flask_login import current_user from psycopg2.extras import NamedTupleCursor from openatlas import app from openatlas.util.util import is_float from openatlas.util.display impo...
gpl-2.0
3,230,191,295,386,054,700
43
96
0.543998
false
3.981439
false
false
false
vietdh85/vh-utility
script/invest_tracing.py
1
1487
import sys import os.path import urllib2 import re from pyquery import PyQuery as pq import common def getId(url): print("=====> ", url) arr = url.split("-") arr1 = arr[1].split(".") id = arr1[0] return id def getSiteUrl(id, monitor, rcbUrl): result = "" urlRequest = "http://www.{0}/{1}".format(monitor, id) ...
gpl-3.0
-6,423,259,681,422,139,000
21.530303
75
0.601883
false
2.718464
false
false
false
ownport/pywsinfo
tests/test_utils.py
1
2581
import sys if '' not in sys.path: sys.path.append('') import pywsinfo import unittest class WebSiteUtilsTests(unittest.TestCase): def test_parse_url(self): url = 'http://www.example.com' self.assertEqual( pywsinfo.parse_url(url), {'source_url': 'http...
bsd-2-clause
6,211,147,958,173,613,000
34.847222
91
0.511817
false
4.020249
true
false
false
avihad/ARP-Storm
src/arp_open_flow/of_sw_tutorial_oo.py
1
12747
#!/usr/bin/python # Copyright 2012 James McCauley, William Yu # wyu@ateneo.edu # # This file is part of POX. # # POX 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 yo...
apache-2.0
2,650,485,851,227,177,500
37.627273
75
0.688633
false
3.508671
false
false
false
quantopian/zipline
tests/data/test_fx.py
1
10952
import itertools import pandas as pd import numpy as np from zipline.data.fx import DEFAULT_FX_RATE from zipline.testing.predicates import assert_equal import zipline.testing.fixtures as zp_fixtures class _FXReaderTestCase(zp_fixtures.WithFXRates, zp_fixtures.ZiplineTestCase): """ B...
apache-2.0
8,554,352,786,142,717,000
37.293706
79
0.56985
false
3.726438
true
false
false
mahabs/nitro
nssrc/com/citrix/netscaler/nitro/resource/config/network/ipset_binding.py
1
3601
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
apache-2.0
-326,166,921,763,444,100
28.040323
115
0.687587
false
3.229596
false
false
false