repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a10networks/a10sdk-python | a10sdk/core/A10_license/license_manager.py | 2 | 3641 | from a10sdk.common.A10BaseClass import A10BaseClass
class LicenseManager(A10BaseClass):
"""Class Description::
Configure license manager.
Class license-manager supports CRUD Operations and inherits from `common/A10BaseClass`.
This class is the `"PARENT"` class for this module.`
:param remin... | apache-2.0 | 6,751,228,559,833,759,000 | 67.698113 | 717 | 0.629223 | false | 3.545278 | true | false | false |
wpjesus/codematch | ietf/secr/sreq/views.py | 1 | 31714 | import datetime
from django.contrib import messages
from django.db.models import Q
from django.http import Http404
from django.shortcuts import render_to_response, get_object_or_404, redirect
from django.template import RequestContext
from ietf.group.models import Group
from ietf.ietfauth.utils import has_role, role_... | bsd-3-clause | 6,976,563,764,438,070,000 | 41.856757 | 208 | 0.609542 | false | 4.159213 | false | false | false |
Sharpe49/ts2 | ts2/scenery/signals/signaltype.py | 2 | 8199 | #
# Copyright (C) 2008-2014 by Nicolas Piganeau
# npi@m4x.org
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later versi... | gpl-2.0 | -8,990,320,079,687,772,000 | 30.534615 | 78 | 0.580925 | false | 3.106859 | false | false | false |
anubhavshrimal/Data_Structures_Algorithms_In_Python | LinkedList/RemoveCycle.py | 1 | 2335 | # Python program to check if the singly linked list contains cycle or not
# Node class
class Node:
# Constructor to initialise data and next
def __init__(self, data=None):
self.data = data
self.next = None
class SinglyLinkedList:
# Constructor to initialise head
def __init__(self):... | mit | 1,079,654,399,842,356,100 | 25.235955 | 82 | 0.5803 | false | 3.911223 | false | false | false |
winhamwr/dbag | dbag/management/commands/dbag_fake_metrics.py | 1 | 1830 |
import datetime
import logging
from random import normalvariate
from django.core.management.base import BaseCommand
from dbag import autodiscover, dbag_manager
from dbag.models import Metric, DataSample
logger = logging.getLogger(__name__)
class Command(BaseCommand):
args = ''
help = 'Fake 60 days worth o... | mit | -4,289,920,390,959,840,000 | 31.678571 | 94 | 0.649727 | false | 4.09396 | false | false | false |
ArcherSys/ArcherSys | Lib/site-packages/github/tests/CommitComment.py | 1 | 9425 | <<<<<<< HEAD
<<<<<<< HEAD
# -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <z... | mit | 7,885,755,248,334,809,000 | 56.121212 | 157 | 0.528806 | false | 4.391892 | true | false | false |
Schwertspize/speedfng | scripts/make_release.py | 1 | 6559 | import shutil, os, sys, zipfile
#valid_platforms = ["win32", "linux86", "linux86_64", "src"]
if len(sys.argv) != 3:
print("wrong number of arguments")
print(sys.argv[0], "VERSION PLATFORM")
sys.exit(-1)
name = "teeworlds"
version = sys.argv[1]
platform = sys.argv[2]
exe_ext = ""
use_zip = 0
use_gz = 1
use_dmg = 0... | gpl-2.0 | -5,283,229,130,025,674,000 | 32.294416 | 111 | 0.676475 | false | 2.754725 | false | false | false |
neocogent/sqlchain | sqlchain/bci.py | 1 | 8115 | #
# Blockchain.info compatible API module
#
import urlparse, json
from string import hexdigits
from struct import unpack
from sqlchain.insight import apiTx, addrUTXOs
from sqlchain.util import is_address, mkaddr, gethdr, addr2id, txh2id, is_BL32, readBlob, getBlobHdr, log
from sqlchain.version import MAX_TX_BLK, MAX... | mit | 8,063,946,094,554,549,000 | 41.265625 | 148 | 0.553666 | false | 3.1724 | false | false | false |
lpsinger/astropy | astropy/wcs/wcs.py | 2 | 132534 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# Under the hood, there are 3 separate classes that perform different
# parts of the transformation:
#
# - `~astropy.wcs.Wcsprm`: Is a direct wrapper of the core WCS
# functionality in `wcslib`_. (This includes TPV and TPD
# polynomial disto... | bsd-3-clause | -5,870,206,485,518,874,000 | 37.00803 | 153 | 0.539122 | false | 4.18062 | false | false | false |
lizardsystem/lizard-waterbalance | lizard_waterbalance/viewer.py | 1 | 2403 | # Views for lizard viewer
from django.core.urlresolvers import reverse
from django.shortcuts import render_to_response
from django.template import RequestContext
from lizard_waterbalance.views import GRAPH_TYPES
from lizard_waterbalance.views import IMPLEMENTED_GRAPH_TYPES
from lizard_waterbalance.layers import Adapte... | gpl-3.0 | 4,279,775,483,879,260,700 | 32.375 | 69 | 0.637953 | false | 3.618976 | false | false | false |
sdockray/ai-commune | language.py | 1 | 39064 | import nltk
import itertools
import random
import unicodedata
import re
import copy
import string
import pprint
import os
import sys
import glob
import errno
#from nltk import parse_cfg, ChartParser
from random import choice
from nltk.grammar import CFG, Nonterminal, read_grammar, standard_nonterm_parser
from nltk.uti... | gpl-2.0 | 1,911,016,498,711,629,000 | 34.066427 | 161 | 0.679014 | false | 2.980165 | false | false | false |
edx/ecommerce | ecommerce/extensions/payment/views/paypal.py | 1 | 7126 | """ Views for interacting with the payment processor. """
import logging
import os
from io import StringIO
from django.core.exceptions import MultipleObjectsReturned
from django.core.management import call_command
from django.db import transaction
from django.http import Http404, HttpResponse, HttpResponseBadRequest... | agpl-3.0 | -631,426,130,551,693,700 | 39.72 | 111 | 0.660399 | false | 4.361077 | false | false | false |
naiyt/steamplaytime | main.py | 1 | 16043 | import os
import webapp2
import jinja2
import time
import logging
import urllib
from lib import utils
from lib import hltb
from lib import users
from lib.config import *
from google.appengine.api import taskqueue
from google.appengine.api import mail
from datetime import datetime, timedelta
from lib import counters
fro... | mit | -8,651,724,123,876,461,000 | 38.614815 | 236 | 0.569906 | false | 3.944677 | true | false | false |
singingwolfboy/webhookdb | webhookdb/tasks/issue.py | 1 | 4749 | # coding=utf-8
from __future__ import unicode_literals, print_function
from datetime import datetime
from iso8601 import parse_date
from celery import group
from urlobject import URLObject
from webhookdb import db
from webhookdb.models import Issue, Repository, Mutex
from webhookdb.process import process_issue
from we... | agpl-3.0 | -6,424,778,397,686,561,000 | 31.979167 | 77 | 0.621605 | false | 3.541387 | false | false | false |
AllYarnsAreBeautiful/ayab-desktop | src/main/python/ayab/ayab_gui.py | 1 | 15784 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/main/python/ayab/ayab_gui.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWin... | gpl-3.0 | -3,773,171,113,028,260,400 | 60.898039 | 115 | 0.728206 | false | 4.072239 | false | false | false |
btallman/incubator-airflow | airflow/settings.py | 1 | 4847 | # -*- coding: utf-8 -*-
#
# 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
... | apache-2.0 | -1,215,649,299,356,516,000 | 30.277419 | 89 | 0.649061 | false | 3.553519 | true | false | false |
jorgecasals/VoiceTrainingTool | Playground/ui_plot.py | 1 | 3695 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'login.ui'
#
# Created: Tue Jan 24 22:11:54 2017
# by: PyQt4 UI code generator 4.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except Attribut... | gpl-3.0 | 5,553,523,648,392,241,000 | 40.516854 | 79 | 0.675507 | false | 3.709839 | false | false | false |
fouric/magic-less | magic_less.py | 1 | 2666 | #!/usr/bin/python3
import fileinput
import termbox
import time
import math
import re
def getNumWindows(lines, height):
return max(math.ceil(len(lines) / height), 1)
def getWindowToPutLineInto(index, height):
return int(index / height)
def tabConvert(line):
result = ''
screenIndex = 0
for charIndex... | mit | -9,111,796,855,915,698,000 | 30.738095 | 104 | 0.531133 | false | 3.697642 | false | false | false |
JohanComparat/nbody-npt-functions | bin/bin_SMHMr/MD10_select_AGN_lightcone_in_RA_DEC_per_file.py | 1 | 1063 | # overall python packages
import glob
import astropy.io.fits as fits
import os
import time
import numpy as n
import sys
t0=time.time()
def get_AGN_catalog(env='MD10'):
# gets the file list to add the Xray luminosity
fileList = n.array(glob.glob(os.path.join(os.environ[env], "light-cone", "MDPL2_ROCKSTAR_FluxProj_*_... | cc0-1.0 | 4,710,567,357,439,743,000 | 29.371429 | 130 | 0.665099 | false | 2.477855 | false | false | false |
EricssonResearch/calvin-base | calvin/runtime/north/plugins/port/endpoint/local.py | 1 | 5329 | # -*- coding: utf-8 -*-
# Copyright (c) 2016 Ericsson AB
#
# 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 | -4,340,782,523,569,693,700 | 38.474074 | 122 | 0.633702 | false | 3.768741 | false | false | false |
thewangcj/MyFlasky | app/api_1_0/posts.py | 1 | 1436 | from . import api
from .authentication import auth
from ..models import Post, Permission
from flask import jsonify, request, url_for
from .decorators import permission_required
from .. import db
from .errors import forbidden
@api.route('/posts/')
@auth.login_required
def get_posts():
posts = Post.query.all()
... | mit | -8,348,515,463,282,556,000 | 18.183099 | 73 | 0.674743 | false | 2.986842 | false | false | false |
rtfd/readthedocs.org | readthedocs/oauth/migrations/0013_create_new_table_for_remote_repository_normalization.py | 1 | 4878 | # Generated by Django 2.2.17 on 2020-12-21 18:16
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields
class Migration(migrations.Migration):
dependencies = [
('socialaccount', '0003_extra_data_default_dict'),
... | mit | -6,625,662,495,210,098,000 | 68.685714 | 210 | 0.637146 | false | 4.234375 | false | false | false |
quattor/aquilon | tests/broker/test_del_static_route.py | 1 | 4670 | #!/usr/bin/env python
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017 Contributor
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance... | apache-2.0 | 942,343,042,056,496,500 | 38.91453 | 83 | 0.556959 | false | 3.781377 | true | false | false |
JohnOmernik/pimeup | animatronics/oldPWM/JO_LED_dist_IR.py | 1 | 8767 | #!/usr/bin/python
#Libraries
import RPi.GPIO as GPIO
from neopixel import *
from Adafruit_PWM_Servo_Driver import PWM
import random
import time
import sys
import alsaaudio
import wave
import struct
import math
# Initialise the PWM device using the default address
pwm = PWM(0x40)
# Note if you'd like more debug output... | apache-2.0 | -7,643,866,623,014,220,000 | 25.248503 | 120 | 0.576708 | false | 3.008579 | false | false | false |
paulmadore/Eric-IDE | 6-6.0.9/eric/Helpviewer/History/HistoryDialog.py | 2 | 5151 | # -*- coding: utf-8 -*-
# Copyright (c) 2009 - 2015 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing a dialog to manage history.
"""
from __future__ import unicode_literals
from PyQt5.QtCore import pyqtSignal, Qt, QUrl
from PyQt5.QtGui import QFontMetrics, QCursor
from PyQt5.QtWidgets import QD... | gpl-3.0 | 742,895,941,013,402,900 | 33.804054 | 79 | 0.622015 | false | 4.324937 | false | false | false |
k3yavi/alevin | testing/src-py/separate_cell_reads.py | 1 | 1468 | import click
def get_file_handle(fhDict, K, outPath):
if K not in fhDict.keys():
fhDict[K] = open(outPath + "/" + K +'.fastq', 'w')
return fhDict[K]
def close_all(fhDict):
for fh in fhDict.values():
fh.close()
@click.command()
@click.option('--fq', help='path for combine cell fastq files... | gpl-3.0 | -4,653,557,358,651,555,000 | 27.784314 | 71 | 0.436649 | false | 3.725888 | false | false | false |
kgullikson88/NIRI-Scripts | FitPSF.py | 1 | 12751 | from astropy.modeling import models, fitting
from astropy.io import fits
import numpy as np
import matplotlib.pyplot as plt
from photutils import aperture_photometry, CircularAperture, CircularAnnulus
from photutils.geometry import circular_overlap_grid
from photutils.aperture_funcs import get_phot_extents
from matplot... | mit | -7,369,544,549,420,067,000 | 37.993884 | 131 | 0.645204 | false | 2.938018 | false | false | false |
lyddonb/contour | setup.py | 1 | 1070 | #!/usr/bin/env python
import os
import sys
VERSION = '0.2.2'
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
packages = [
'contour',
]
requires = []
try:
license = ope... | apache-2.0 | 563,004,239,748,594,200 | 20.836735 | 67 | 0.623364 | false | 3.651877 | false | true | false |
rmed/zoe-docversion | agents/docversion/docversion.py | 1 | 7960 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Zoe Docversion
#
# Copyright (c) 2015 Rafael Medina García <rafamedgar@gmail.com>
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
... | mit | -2,954,790,587,927,959,600 | 33.158798 | 83 | 0.584872 | false | 4.023761 | false | false | false |
olavopeixoto/plugin.video.brplay | resources/lib/modules/sbt/player.py | 1 | 4481 | # -*- coding: utf-8 -*-
import sys
from resources.lib.modules import control, ytlive
from . import get_authorization
import re
import requests
from urlparse import urlparse
from resources.lib.hlsproxy.simpleproxy import MediaProxy
import xbmc
import threading
proxy = control.proxy_url
proxy = None if proxy is None o... | gpl-3.0 | 8,301,540,669,338,235,000 | 28.675497 | 103 | 0.594733 | false | 3.923818 | false | false | false |
fishjord/gsutil | gslib/commands/version.py | 2 | 5531 | # -*- coding: utf-8 -*-
# Copyright 2011 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 require... | apache-2.0 | 5,063,320,827,853,308,000 | 31.535294 | 79 | 0.647984 | false | 3.806607 | true | false | false |
aipescience/daiquiri-admin | daiquiri/data.py | 1 | 2181 | from daiquiri.exceptions import DaiquiriException
class Data():
def __init__(self, connection, dryrun=False):
self.connection = connection
self.dryrun = dryrun
def fetch_databases(self):
response = self.connection.get('/data/databases/')
if response['status'] != 'ok':
... | apache-2.0 | 3,794,259,067,222,062,600 | 39.388889 | 91 | 0.537368 | false | 4.310277 | false | false | false |
translate/translate | translate/misc/xml_helpers.py | 2 | 6006 | #
# Copyright 2006-2009 Zuza Software Foundation
#
# This file is part of the Translate Toolkit.
#
# 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 ... | gpl-2.0 | 3,318,754,907,454,567,000 | 30.610526 | 83 | 0.645188 | false | 3.725806 | false | false | false |
antoinearnoud/openfisca-france | openfisca_france/reforms/inversion_directe_salaires.py | 1 | 7137 | # -*- coding: utf-8 -*-
from __future__ import division
from openfisca_france.model.base import * # noqa analysis:ignore
from openfisca_core.reforms import Reform
from openfisca_core.taxscales import MarginalRateTaxScale
TAUX_DE_PRIME = .10
class salaire_imposable_pour_inversion(Variable):
value_type = flo... | agpl-3.0 | 6,653,553,115,885,001,000 | 43.167702 | 115 | 0.653916 | false | 3.037591 | false | false | false |
zhangziang/django-allauth | allauth/socialaccount/providers/twitter/south_migrations/0004_auto__del_twitteraccount__del_twitterapp.py | 83 | 1925 | # encoding: utf-8
from south.db import db
from south.v2 import SchemaMigration
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'TwitterAccount'
db.delete_table('twitter_twitteraccount')
# Deleting model 'TwitterApp'
db.delete_table('twitter_twi... | mit | 5,676,506,746,976,885,000 | 41.777778 | 162 | 0.623896 | false | 3.759766 | false | false | false |
aouyar/healthgraph-api | samples/bottle/runkeeper_demo.py | 1 | 7570 | #!/usr/bin/env python
"""Demo Application for HealthGraph-API Python Library developed using Bottle
fast, simple and lightweight WSGI micro web-framework for Python.
The configuration file runkeeper_demo.conf must be edited to set the client_id
and client_secret. The client_id and client_secret is generated upon reg... | gpl-3.0 | 6,390,842,798,694,345,000 | 35.399038 | 88 | 0.584941 | false | 3.829034 | true | false | false |
bowen0701/algorithms_data_structures | lc0040_combination_sum_ii.py | 1 | 2408 | """Leetcode 40. Combination Sum II
Medium
URL: https://leetcode.com/problems/combination-sum-ii/
Given a collection of candidate numbers (candidates) and a target number (target),
find all unique combinations in candidates where the candidate numbers sums to target.
Each number in candidates may only be used once in... | bsd-2-clause | -7,937,067,154,014,296,000 | 24.617021 | 86 | 0.58804 | false | 3.73913 | false | false | false |
cobbr/ObfuscatedEmpire | lib/stagers/osx/launcher.py | 10 | 3008 | from lib.common import helpers
class Stager:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Launcher',
'Author': ['@harmj0y'],
'Description': ('Generates a one-liner stage0 launcher for Empire.'),
'Comments': [
''
... | bsd-3-clause | 2,608,837,467,109,761,000 | 33.976744 | 150 | 0.481383 | false | 4.620584 | false | false | false |
jeacaveo/planning_70 | tests/test_planning.py | 1 | 19305 | # -*- coding: utf-8 -*-
from openerp.tests import common
from openerp.osv.orm import except_orm
from datetime import datetime
from . import test_util
class TestPlanning(common.TransactionCase):
def setUp(self):
super(TestPlanning, self).setUp()
# Cursor and user initialization
cr, uid =... | agpl-3.0 | 2,837,416,261,368,471,600 | 44 | 114 | 0.563015 | false | 3.759494 | true | false | false |
Onirik79/aaritmud | src/entitypes/wear.py | 1 | 8532 | # -*- coding: utf-8 -*-
"""
Modulo per la delle entità indossabili.
"""
#= IMPORT ======================================================================
from src.element import Flags
from src.enums import TO, WEAR
from src.log import log
from src.utility import copy_existing_attributes
#= CLASSI ===========... | gpl-2.0 | 2,517,004,198,724,982,300 | 35.618026 | 133 | 0.563174 | false | 3.695106 | false | false | false |
Joe310/GenomeSimulator | genomeapp/functional_tests.py | 1 | 2183 | __author__ = 'Joseph'
from selenium import webdriver
import unittest
class NewVisitorTest(unittest.TestCase):
def setUp(self):
self._browser = webdriver.Firefox()
self._browser.implicitly_wait(3)
def tearDown(self):
self._browser.quit()
def test_can_read_faq_and_documentation(se... | mit | -4,115,457,066,850,291,000 | 34.786885 | 93 | 0.670637 | false | 4.166031 | true | false | false |
rex-xxx/mt6572_x201 | external/mesa3d/src/glsl/builtins/tools/texture_builtins.py | 1 | 11257 | #!/usr/bin/python
import sys
import StringIO
def vec_type(g, size):
if size == 1:
if g == "i":
return "int"
elif g == "u":
return "uint"
return "float"
return g + "vec" + str(size)
# Get the base dimension - i.e. sampler3D gives 3
# Array samplers also get +1 h... | gpl-2.0 | 8,654,787,939,779,851,000 | 31.255014 | 110 | 0.601848 | false | 3.025262 | false | false | false |
collective/archetypes.clippingimage | setup.py | 1 | 1437 | from setuptools import setup, find_packages
import sys, os
version = '3.0dev'
shortdesc ="Image field and/or patch with clipping support for Plone/Archetypes."
longdesc = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
longdesc += open(os.path.join(os.path.dirname(__file__), 'LICENSE.txt')).read()
... | bsd-3-clause | 5,273,509,373,429,543,000 | 36.815789 | 95 | 0.617954 | false | 3.958678 | false | false | false |
dnguyen85/dotfiles | ranger/ranger.symlink/colorschemes/solarized.py | 1 | 4143 | # This file is part of ranger, the console file manager.
# License: GNU GPL version 3, see the file "AUTHORS" for details.
# Author: Joseph Tannhuber <sepp.tannhuber@yahoo.de>, 2013
# Solarized like colorscheme, similar to solarized-dircolors
# from https://github.com/seebi/dircolors-solarized.
# This is a modification... | mit | 7,461,797,607,139,912,000 | 29.240876 | 72 | 0.433261 | false | 5.121137 | false | false | false |
swilly22/redis-module-graph | demo/imdb/imdb_utils.py | 2 | 1489 | import csv
import os
from datetime import date
from redisgraph import Node, Edge
graph_name = "imdb"
def populate_graph(redis_con, redis_graph):
# check if graph already exists
if redis_con.exists(graph_name):
return
# Load movies entities
print("Loading movies")
movies = {}
with open(os.path.dirname(os.p... | agpl-3.0 | -8,350,654,456,553,309,000 | 23.409836 | 91 | 0.621894 | false | 2.948515 | false | false | false |
pheanex/xpython | exercises/nucleotide-count/nucleotide_count_test.py | 1 | 1643 | """Tests for the nucleotide-count exercise
Implementation note:
The count function must raise a ValueError with a meaningful error message
in case of a bad argument.
"""
import unittest
from nucleotide_count import count, nucleotide_counts
class DNATest(unittest.TestCase):
def test_empty_dna_string_has_no_adeno... | mit | 8,047,413,779,586,888,000 | 30.596154 | 74 | 0.647596 | false | 3.332657 | true | false | false |
cortesi/mitmproxy | mitmproxy/proxy/protocol/http1.py | 6 | 3015 | from mitmproxy import http
from mitmproxy.proxy.protocol import http as httpbase
from mitmproxy.net.http import http1
from mitmproxy.utils import human
class Http1Layer(httpbase._HttpTransmissionLayer):
def __init__(self, ctx, mode):
super().__init__(ctx)
self.mode = mode
def read_request_he... | mit | 7,856,812,799,556,453,000 | 35.325301 | 94 | 0.643781 | false | 3.806818 | false | false | false |
ArcherSys/ArcherSys | Scripts/rst2latex.py | 1 | 2597 | <<<<<<< HEAD
<<<<<<< HEAD
#!K:\ArcherVMPeridot\htdocs\Scripts\python.exe
# $Id: rst2latex.py 5905 2009-04-16 12:04:49Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing LaTeX.
"""
try:
i... | mit | -7,565,479,212,643,585,000 | 29.916667 | 76 | 0.669234 | false | 3.587017 | false | false | false |
jpmml/sklearn2pmml | setup.py | 1 | 1245 | from distutils.core import setup
exec(open("sklearn2pmml/metadata.py").read())
setup(
name = "sklearn2pmml",
version = __version__,
description = "Python library for converting Scikit-Learn pipelines to PMML",
author = "Villu Ruusmann",
author_email = "villu.ruusmann@gmail.com",
url = "https://github.com/jpmml/... | agpl-3.0 | -5,506,894,899,441,275,000 | 27.953488 | 91 | 0.695582 | false | 2.785235 | false | false | false |
noisyboiler/wampy | test/integration/test_exception_handling.py | 1 | 1130 | # 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/.
import pytest
from wampy.errors import WampyError
from wampy.peers.clients import Client
from wampy.roles.callee import... | mpl-2.0 | -3,468,914,153,672,435,700 | 26.560976 | 69 | 0.660177 | false | 3.575949 | false | false | false |
jnishi/chainer | chainer/functions/connection/convolution_nd.py | 1 | 19957 | import numpy
from six import moves
import chainer
from chainer import backend
from chainer.backends import cuda
from chainer import configuration
from chainer import function_node
from chainer.functions.connection import convolution_2d
from chainer.utils import conv
from chainer.utils import conv_nd
from chainer.utils... | mit | 8,424,070,243,722,764,000 | 36.025974 | 79 | 0.54417 | false | 3.299223 | true | false | false |
vaporry/ethereum-buildbot | factories/go_ethereum_brew.py | 1 | 10817 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import factory
reload(factory)
from factory import *
import go_ethereum
reload(go_ethereum)
from go_ethereum import *
def brew_go_factory(branch='develop'):
factory = BuildFactory()
for step in [
Git(
haltOnFailure=True,
logEnvir... | mit | 6,101,197,980,366,753,000 | 36.954386 | 154 | 0.49376 | false | 4.197516 | false | false | false |
marmyshev/bug_1117098 | openlp/plugins/bibles/forms/editbibleform.py | 2 | 9998 | # -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | gpl-2.0 | 2,972,002,615,949,225,000 | 47.760976 | 118 | 0.569028 | false | 4.212389 | false | false | false |
justinleet/incubator-metron | metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py | 2 | 10499 | """
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this ... | apache-2.0 | 2,826,888,406,970,405,400 | 42.028689 | 142 | 0.654824 | false | 4.143252 | true | false | false |
googleapis/googleapis-gen | google/ads/googleads/v6/googleads-py/tests/unit/gapic/googleads.v6/services/test_third_party_app_analytics_link_service.py | 1 | 33293 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 1,898,535,129,896,755,500 | 45.628852 | 244 | 0.695131 | false | 4.019923 | true | false | false |
vivekhas3/python_quizzup | pyquiz/models.py | 1 | 2455 | from django.db import models
from django.contrib.auth.models import User, AbstractUser
from django.conf import settings
# Create your models here.
class CustomUser(AbstractUser):
USERNAME_FIELD = 'email'
REQUIRED_FIELDS = ['username']
role = models.CharField(max_length = 100)
def get_username(self):
... | mit | -6,171,878,731,439,517,000 | 36.19697 | 64 | 0.719756 | false | 3.702866 | false | false | false |
lu-ci/apex-sigma-plugins | help/help.py | 3 | 2083 | import discord
async def help(cmd, message, args):
if args:
cmd_name = ''.join(args).lower()
if cmd_name in cmd.bot.modules.alts:
cmd_name = cmd.bot.modules.alts[cmd_name]
if cmd_name in cmd.bot.modules.commands:
command = cmd.bot.modules.commands[cmd_name]
... | gpl-3.0 | 3,667,281,427,012,402,000 | 58.314286 | 115 | 0.627168 | false | 3.084695 | false | false | false |
Fenykepy/pinpict | user/views.py | 1 | 10713 | import datetime
from uuid import uuid4
from django.contrib.auth import authenticate, login, logout
from django.views.generic import FormView, UpdateView, ListView
from django.core.urlresolvers import reverse_lazy, reverse
from django.shortcuts import redirect, get_object_or_404, render
from django.utils import timezon... | gpl-3.0 | -1,185,714,314,090,228,200 | 29.008403 | 82 | 0.609073 | false | 4.003363 | false | false | false |
rendrom/rosreestr2coord | rosreestr2coord/console.py | 1 | 5497 | #!/usr/bin/env python
# coding: utf-8
import os
import signal
import sys
from rosreestr2coord.batch import batch_parser
from rosreestr2coord.parser import Area, TYPES
from rosreestr2coord.version import VERSION
def getopts():
import argparse
import textwrap
'''
Get the command line options.
'''
... | mit | -7,630,628,900,499,210,000 | 37.173611 | 110 | 0.54648 | false | 3.943329 | false | false | false |
wvangeit/AllenSDK | allensdk/config/model/formats/hdf5_util.py | 1 | 1673 | # Copyright 2014 Allen Institute for Brain Science
# Licensed under the Allen Institute Terms of Use (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.alleninstitute.org/Media/policies/terms_of_use_content.html
#
# Unless require... | gpl-3.0 | 7,085,696,069,343,545,000 | 37.022727 | 91 | 0.624029 | false | 3.973872 | false | false | false |
dnxbjyj/python-basic | gui/wxpython/wxPython-demo-4.0.1/demo/agw/UltimateListCtrl.py | 1 | 2028 | #!/usr/bin/env python
import wx
import os
import sys
try:
dirName = os.path.dirname(os.path.abspath(__file__))
except:
dirName = os.path.dirname(os.path.abspath(sys.argv[0]))
sys.path.append(os.path.split(dirName)[0])
try:
from agw import ultimatelistctrl as ULC
except ImportError: # if it's not there l... | mit | -3,308,467,105,719,309,300 | 24.037037 | 80 | 0.527613 | false | 3.508651 | false | false | false |
DweebsUnited/CodeMonkey | ToPeeCAAAW/listToGCode.py | 1 | 1561 | import argparse
import os
UPSPD = "4000"
DNSPD = "2000"
ZUP = "26"
ZDN = "7"
parser = argparse.ArgumentParser( description='Convert a pointlist to a gcode file' )
parser.add_argument( "infilename" )
args = parser.parse_args( )
f = open( args.infilename )
with open( os.path.join( os.path.dirname( args.infilename ... | bsd-3-clause | -8,886,442,040,638,230,000 | 24.590164 | 95 | 0.502883 | false | 2.880074 | false | false | false |
elenimikro/offradio_playlist_scraper | src/offradio_playlist_scraper.py | 1 | 3002 | '''
Created on 24 Nov 2013
@author: elenimikroyannidi
'''
from bs4 import BeautifulSoup
from urllib2 import urlopen
import spotify.manager
import getpass
BASE_URL = "http://www.offradio.gr/player/#tabs-2"
class SessionManager(spotify.manager.SpotifySessionManager):
def logged_in(self, session, error):
pr... | lgpl-3.0 | 8,035,900,215,722,279,000 | 33.918605 | 155 | 0.606262 | false | 3.482599 | false | false | false |
Turupawn/website | lutrisweb/settings/production.py | 1 | 1188 | import os
from base import * # noqa
DEBUG = False
MEDIA_URL = '//lutris.net/media/'
FILES_ROOT = '/srv/files'
FILES_URL = 'https://lutris.net/files/'
ALLOWED_HOSTS = ['.lutris.net', '.lutris.net.', ]
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'lutris',... | agpl-3.0 | 3,377,462,680,988,564,500 | 23.75 | 73 | 0.642256 | false | 3.142857 | false | true | false |
edx/ecommerce | ecommerce/core/management/commands/tests/test_create_or_update_site.py | 1 | 16695 |
from ddt import data, ddt
from django.contrib.sites.models import Site
from django.core.management import CommandError, call_command
from oscar.core.loading import get_model
from ecommerce.tests.testcases import TestCase
Partner = get_model('partner', 'Partner')
@ddt
class CreateOrUpdateSiteCommandTests(TestCase)... | agpl-3.0 | -7,296,050,529,310,972,000 | 48.98503 | 110 | 0.623121 | false | 3.864583 | true | false | false |
opsxbot/opsbot | src/common/runlog.py | 1 | 11193 | # -*- coding: utf-8 -*-
"""
Created on Fri Jul 07 10:10:39 2017
@author: 160229
"""
from __future__ import print_function
import logging
from datetime import datetime
from elasticsearch import Elasticsearch
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
with open('.context', 'r') as f:
env = json... | lgpl-2.1 | 8,411,097,556,458,681,000 | 36.313333 | 160 | 0.559457 | false | 3.523135 | false | false | false |
dennisobrien/bokeh | bokeh/embed/wrappers.py | 3 | 2494 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2018, Anaconda, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#---------------------------------------------------... | bsd-3-clause | -7,074,152,195,363,582,000 | 26.711111 | 82 | 0.315557 | false | 5.668182 | false | false | false |
InfraBox/infrabox | src/pyinfrabox/testresult/__init__.py | 1 | 2102 | from builtins import int, range
from pyinfrabox import ValidationError
from pyinfrabox.utils import *
def check_version(v, path):
if not isinstance(v, int):
raise ValidationError(path, "must be an int")
if v != 1:
raise ValidationError(path, "unsupported version")
def parse_measurement(d, pa... | mit | -5,859,573,530,182,021,000 | 29.911765 | 79 | 0.5804 | false | 3.485904 | false | false | false |
Lyrositor/Majora-Demonic-Utility | ROM.py | 1 | 6275 | """
Majora's Demonic Utility - all-in-one editor for Majora's Mask.
Copyright (C) 2013 Lyrositor <gagne.marc@gmail.com>
This file is part of Majora's Demonic Utility.
Majora's Demonic Utility is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public Lice... | gpl-3.0 | -3,942,179,139,336,162,000 | 31.015306 | 79 | 0.514582 | false | 3.608396 | false | false | false |
Themakew/BrakeControlWorkbench | app/views.py | 1 | 1210 | from flask import redirect
from flask import render_template
from flask import request
from flask import url_for
from flask.ext.login import login_required
from flask.ext.login import login_user
from flask.ext.login import logout_user
from application import app
from application import DB
from models import User
from ... | gpl-3.0 | 8,637,065,312,585,812,000 | 23.2 | 75 | 0.680165 | false | 3.793103 | false | false | false |
smn/onadata | onadata/apps/main/models/meta_data.py | 5 | 9743 | import mimetypes
import os
import requests
import logging
from contextlib import closing
from django.db.models.signals import post_save
from django.core.exceptions import ValidationError
from django.core.files.temp import NamedTemporaryFile
from django.core.files.uploadedfile import InMemoryUploadedFile
from django.co... | bsd-2-clause | 3,667,399,798,796,142,000 | 30.633117 | 79 | 0.597352 | false | 3.872417 | false | false | false |
TeamFeH/back-end | back_end/back_end/settings.py | 1 | 2221 | """
Django settings for back_end 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.path.join(BASE_DIR, ...)
i... | gpl-2.0 | -8,269,348,100,177,435,000 | 23.141304 | 71 | 0.719496 | false | 3.237609 | false | false | false |
nickeubank/python-igraph | scripts/x11torgb.py | 3 | 1113 | #!/usr/bin/env python
"""Converts X11 color files to RGB formatted Python dicts"""
import sys
import pprint
if len(sys.argv)<2:
print "Usage: %s filename" % sys.argv[0]
sys.exit(1)
colors = {
"black": (0. , 0. , 0. , 1.),
"silver": (0.75, 0.75, 0.75, 1.),
"gray": (0.5 , 0.5 , 0.5 , 1.),
"w... | gpl-2.0 | -9,039,554,383,200,207,000 | 26.825 | 60 | 0.422282 | false | 2.182353 | false | false | false |
savi-dev/keystone | tests/test_cert_setup.py | 3 | 1544 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack 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 requir... | apache-2.0 | -3,798,912,613,175,485,000 | 28.692308 | 69 | 0.727979 | false | 3.485327 | true | false | false |
ArabellaTech/drf_tweaks | tests/test_serializers.py | 1 | 4981 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from rest_framework import serializers
from rest_framework.request import Request
from rest_framework.test import APIRequestFactory
from rest_framework.test import APITestCase
from drf_tweaks.serializers import ModelSerializer
from drf_tweaks.serializers... | mit | 6,078,169,911,515,252,000 | 31.344156 | 95 | 0.639229 | false | 4.099588 | true | false | false |
FATruden/boto | boto/ec2/autoscale/group.py | 12 | 12574 | # Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, mod... | mit | 8,443,321,054,328,987,000 | 36.311573 | 81 | 0.626133 | false | 4.511661 | true | false | false |
adrienbrault/home-assistant | tests/components/shelly/test_logbook.py | 8 | 1970 | """The tests for Shelly logbook."""
from homeassistant.components import logbook
from homeassistant.components.shelly.const import (
ATTR_CHANNEL,
ATTR_CLICK_TYPE,
ATTR_DEVICE,
DOMAIN,
EVENT_SHELLY_CLICK,
)
from homeassistant.const import ATTR_DEVICE_ID
from homeassistant.setup import async_setup_co... | mit | -907,748,952,169,753,000 | 30.774194 | 86 | 0.540609 | false | 4.32967 | true | false | false |
FrankNagel/qlc | src/webapp/quanthistling/scripts/annotations/annotations_for_yagkug1998.py | 1 | 7435 | # -*- coding: utf8 -*-
import sys, os
sys.path.append(os.path.abspath('.'))
import re
from operator import attrgetter
import difflib
# Pylons model init sequence
import pylons.test
import logging
from quanthistling.config.environment import load_environment
from quanthistling.model.meta import Sessi... | gpl-3.0 | -4,577,932,332,892,952,600 | 34.99005 | 159 | 0.494822 | false | 3.605723 | false | false | false |
kanakb/pyhelix | pyhelix/examples/dummy/dummy_statemodel.py | 1 | 1504 | import pyhelix.statemodel as statemodel
class DummyStateModel(statemodel.StateModel):
"""
Dummy state model for master-slave
"""
def on_become_slave_from_offline(self, message):
partition_name = message['simpleFields']['PARTITION_NAME']
print('{0}: on become slave from offline'.format... | apache-2.0 | -8,558,898,564,868,566,000 | 31.695652 | 75 | 0.658245 | false | 4.297143 | false | false | false |
tedunderwood/GenreProject | python/reception/logistic.py | 2 | 6064 | import os, sys
import numpy as np
import pandas as pd
from bagofwords import BagOfWords, StandardizingVector
import epistolarymetadata
import pickle
from sklearn.linear_model import LogisticRegression
from sklearn import cross_validation
import SonicScrewdriver as utils
def select_common_features(trainingset, n):
'''... | mit | -34,663,919,800,669,464 | 32.877095 | 93 | 0.753958 | false | 3.622461 | false | false | false |
jonathf/chaospy | chaospy/distributions/collection/alpha.py | 1 | 1953 | """Alpha probability distribution."""
import numpy
from scipy import special
import chaospy
from ..baseclass import SimpleDistribution, ShiftScaleDistribution
class alpha(SimpleDistribution):
"""Standard Alpha distribution."""
def __init__(self, a=1):
super(alpha, self).__init__(dict(a=a))
def ... | mit | -3,789,500,369,627,800,000 | 26.125 | 66 | 0.529442 | false | 3.344178 | false | false | false |
mganeva/mantid | scripts/SANS/sans/algorithm_detail/batch_execution.py | 1 | 70390 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from __future__ import (absolute_import, divi... | gpl-3.0 | 1,590,312,607,012,001,000 | 53.355212 | 136 | 0.610953 | false | 4.408467 | false | false | false |
hendawy/drchrono-patient-education | pshare/sharebackend/models.py | 1 | 3848 | # std lib imports
import datetime
import md5
# django imports
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.conf import settings
# third-party app imports
# app imports
from .t... | mit | 3,022,033,983,117,195,300 | 27.503704 | 80 | 0.653846 | false | 3.707129 | false | false | false |
bmazin/ARCONS-pipeline | examples/Pal2012_transitPhot/transitFitPSF.py | 1 | 5627 | '''Julian's copy of sdssfitpsf.psf'''
from examples.Pal2012_transitPhot.gaussfitter import gaussfit
import numpy as np
from util import utils
from util.readDict import readDict
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
def aperture(startpx,startpy,radius=3):
r = radius
length =... | gpl-2.0 | -4,292,940,037,907,478,500 | 31.526012 | 115 | 0.659499 | false | 2.774655 | false | false | false |
sam-m888/addons-source | DescendantBooks/CollectAscendants.py | 1 | 19827 | #
# Copyright (C) 2011 Matt Keenan <matt.keenan@gmail.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 of the License, or
# (at your option) any later version.
#
# This pr... | gpl-2.0 | -2,902,665,460,637,751,300 | 44.164009 | 79 | 0.528068 | false | 4.721839 | false | false | false |
eramirem/astroML | book_figures/chapter8/fig_huber_func.py | 3 | 1661 | """
Huber Loss Function
-------------------
Figure 8.7
The Huber loss function for various values of c.
"""
# Author: Jake VanderPlas
# License: BSD
# The figure produced by this code is published in the textbook
# "Statistics, Data Mining, and Machine Learning in Astronomy" (2013)
# For more information, see ht... | bsd-2-clause | 3,377,786,467,356,691,000 | 28.140351 | 79 | 0.555087 | false | 3.269685 | false | false | false |
lindareijnhoudt/resync | resync/test/test_resource.py | 2 | 7210 | import unittest
import re
from resync.resource import Resource, ChangeTypeError
class TestResource(unittest.TestCase):
def test01a_same(self):
r1 = Resource('a')
r2 = Resource('a')
self.assertEqual( r1, r1 )
self.assertEqual( r1, r2 )
def test01b_same(self):
r1 = Resou... | apache-2.0 | 1,824,873,780,564,346,600 | 39.505618 | 122 | 0.566297 | false | 2.934473 | true | false | false |
mikeboers/git-xblob | gitxblob/commands/add.py | 1 | 1302 | """usage: git-xblob add <path> [...]"""
import os
import re
from optparse import OptionParser
from ..utils import git, call
def bail(code=1):
print __doc__.strip()
exit(code)
def run_add(args):
opt_parser = OptionParser()
opt_parser.add_option('-g', '--glob', action='store_true')
opts, args =... | bsd-3-clause | -2,181,619,134,181,365,800 | 22.690909 | 86 | 0.512289 | false | 3.818182 | false | false | false |
electron/electron | build/zip_libcxx.py | 1 | 1644 | #!/usr/bin/env python
from __future__ import print_function
import os
import subprocess
import sys
import zipfile
def execute(argv):
try:
output = subprocess.check_output(argv, stderr=subprocess.STDOUT)
return output
except subprocess.CalledProcessError as e:
print(e.output)
raise e
def get_object... | mit | 8,799,618,793,315,901,000 | 34 | 85 | 0.680049 | false | 3.125475 | false | false | false |
keir-rex/zipline | zipline/history/history_container.py | 18 | 33931 | #
# Copyright 2014 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | apache-2.0 | -8,235,685,006,706,024,000 | 33.872559 | 79 | 0.560962 | false | 4.293976 | false | false | false |
griddynamics/osc-robot-openstack-dashboard | openstack_dashboard/settings.py | 1 | 4739 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2011 Fourth Paradigm Development, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "Licen... | apache-2.0 | 1,143,676,675,998,193,300 | 28.993671 | 99 | 0.715763 | false | 3.634202 | false | false | false |
pytroll/satpy | satpy/readers/ghrsst_l3c_sst.py | 1 | 4495 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017-2019 Satpy developers
#
# This file is part of satpy.
#
# satpy 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 Licens... | gpl-3.0 | -2,474,557,449,049,640,000 | 34.96 | 95 | 0.58198 | false | 3.531029 | false | false | false |
gnowgi/gnowsys-studio | gstudio/moderator.py | 3 | 9390 |
# Copyright (c) 2011, 2012 Free Software Foundation
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later ver... | agpl-3.0 | 9,074,196,934,828,764,000 | 47.402062 | 92 | 0.647178 | false | 4.598433 | false | false | false |
Bajoo/client-pc | bajoo/api/container.py | 1 | 16906 | # -*- coding: utf-8 -*-
import io
import logging
import shutil
from threading import Lock
from ..promise import Promise, reduce_coroutine
from .. import encryption
from ..network.errors import HTTPNotFoundError
from . import User
_logger = logging.getLogger(__name__)
class Container(object):
"""
Represent... | gpl-3.0 | 7,155,744,619,296,869,000 | 32.947791 | 79 | 0.563587 | false | 4.377525 | false | false | false |
wadester/wh_test_py | py_inotify3.py | 1 | 2732 | #!/usr/bin/env python
# Module: py_inotify3.py
# Purpose: use pyinotify to monitor a test dir
# Date: N/A
# Notes:
# 1) https://github.com/seb-m/pyinotify/wiki
# -- examples/daemon.py
#
import pyinotify
import time as t
import datetime as dt
import os
import sys
import signal
# define the monitor dir
MONDIR=... | gpl-2.0 | 8,374,478,065,171,803,000 | 25.524272 | 68 | 0.681186 | false | 3.202814 | false | false | false |
areeb-beigh/hacker-scripts | src/help.py | 1 | 2976 | """
This module is used to display the help content for each command
when the argument --h or --help is passed to that command
"""
#################################################################################
# Copyright (C) 2016 Areeb Beigh <areebbeigh@gmail.com> #
# ... | gpl-3.0 | 4,389,388,318,513,094,000 | 37.153846 | 87 | 0.525538 | false | 3.962716 | false | false | false |
nathanielvarona/airflow | tests/providers/google/cloud/transfers/test_gcs_to_sftp.py | 1 | 11892 | #!/usr/bin/env python
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "... | apache-2.0 | 4,178,632,685,901,016,600 | 35.366972 | 107 | 0.560545 | false | 3.701214 | true | false | false |
mibanescu/pulp | nodes/test/nodes_tests/test_importer_strategies.py | 7 | 9190 | import os
import shutil
from tempfile import mkdtemp
from unittest import TestCase
from uuid import uuid4
from mock import Mock, patch
from pulp.plugins.model import Unit
from pulp.server.config import config as pulp_conf
from pulp_node.importers.strategies import *
from pulp_node.importers.inventory import UnitInven... | gpl-2.0 | -5,935,788,428,593,638,000 | 34.076336 | 100 | 0.635038 | false | 3.76485 | true | false | false |
Yustos/FeedFilter | src/Settings.py | 1 | 1762 | # -*- coding: utf-8 -*-
from CodernityDB.database import Database
from CodernityDB.hash_index import HashIndex
class SettingsIndex(HashIndex):
def __init__(self, *args, **kwargs):
kwargs['key_format'] = '32s'
super(SettingsIndex, self).__init__(*args, **kwargs)
def make_key(self, key):
... | mit | 2,202,272,602,314,242,800 | 28.216667 | 76 | 0.563564 | false | 3.552419 | false | false | false |
jason-neal/spectrum_overload | setup.py | 1 | 4321 | """ spectrum_overload Setup.py
My first attempt at a setup.py file. It is based off
A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Licensed under the MIT Licence
# To use a consistent encoding
import codecs
import os
# Alway... | mit | 813,931,727,823,715,000 | 40.548077 | 91 | 0.663735 | false | 3.741126 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.