repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
martyngigg/pyqt-msvc
doc/sphinx/conf.py
1
6425
# -*- coding: utf-8 -*- # # PyQt documentation build configuration file, created by # sphinx-quickstart on Sat May 30 14:28:55 2009. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
gpl-3.0
1,007,111,443,806,572,400
31.125
80
0.711595
false
rananda/cfme_tests
cfme/middleware/provider/hawkular.py
1
6288
import re from cfme.common import TopologyMixin, TimelinesMixin from . import MiddlewareProvider from utils.appliance import Navigatable from utils.db import cfmedb from utils.varmeth import variable from . import _get_providers_page, _db_select_query from . import download, MiddlewareBase, auth_btn, mon_btn from util...
gpl-2.0
-1,534,870,332,385,972,000
37.109091
98
0.637087
false
jimmy201602/webterminal
permission/forms.py
1
4283
from django import forms from django.contrib.auth.models import User from django.contrib.auth.models import Permission as AuthPermission from permission.models import Permission from django.contrib.contenttypes.models import ContentType from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, ...
gpl-3.0
4,408,388,683,405,748,700
37.585586
108
0.573663
false
haeihaiehaei/Python-Projects
vmware/op5_vcsa_plugin/check_vcsa.py
1
4239
#!/usr/bin/python """ Op5 check to get the health of the VCenter Appliance via REST API. Copyright 2017 Martin Persson 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, includi...
gpl-3.0
-1,029,411,036,243,976,400
38.25
460
0.689314
false
QinerTech/QinerApps
openerp/addons/website_blog/models/website_blog.py
2
12097
# -*- coding: utf-8 -*- from datetime import datetime import lxml import random from openerp import tools from openerp import SUPERUSER_ID from openerp.addons.website.models.website import slug from openerp.osv import osv, fields from openerp.tools.translate import _ from openerp.tools.translate import html_translate...
gpl-3.0
4,718,703,543,692,162,000
39.868243
137
0.55427
false
nhuntwalker/rational_whimsy
rational_whimsy/blog/models.py
1
2123
"""The Blog Post model.""" from django.db import models from django.dispatch import receiver from django.db.models.signals import post_save from redactor.fields import RedactorField from taggit.managers import TaggableManager # Create your models here. PUBLICATION_STATUS = ( ("published", "Published"), ("draf...
mit
-6,685,609,270,705,033,000
30.220588
97
0.666039
false
home-assistant/home-assistant
tests/components/stream/test_recorder.py
1
9139
"""The tests for hls streams.""" from __future__ import annotations import asyncio from collections import deque from datetime import timedelta from io import BytesIO import logging import os import threading from unittest.mock import patch import async_timeout import av import pytest from homeassistant.components.s...
apache-2.0
2,988,359,849,612,386,000
31.066667
86
0.661998
false
nihilus/epanos
pyc_fmtstr_parser/printf_parse.py
1
12979
# ported from gnulib rev be7d73709d2b3bceb987f1be00a049bb7021bf87 # # Copyright (C) 2014, Mark Laws. # Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2014 Free Software # Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public Lice...
mit
-4,507,147,994,739,678,700
28.974596
80
0.47677
false
ktarrant/options_csv
journal/trades/migrations/0001_initial.py
1
1392
# Generated by Django 2.1 on 2018-08-28 05:10 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Leg', fields=[ ('id', models.AutoField(auto_c...
mit
1,929,704,377,205,315,600
43.903226
163
0.558908
false
rschnapka/partner-contact
base_partner_merge/validate_email.py
1
4573
# -*- coding: utf-8 -*- # RFC 2822 - style email validation for Python # (c) 2012 Syrus Akbary <me@syrusakbary.com> # Extended from (c) 2011 Noel Bush <noel@aitools.org> # for support of mx and user check # This code is made available to you under the GNU LGPL v3. # # This module provides a single method, valid_email_a...
agpl-3.0
1,122,090,450,398,727,800
40.572727
77
0.605292
false
eblume/tf-idf
tfidf/preprocess.py
1
9539
#!/usr/bin/env python3 """Pre processing step for text. Example: pp = Preprocesses() """ from __future__ import absolute_import, with_statement import re from collections import namedtuple from cachetools import LRUCache, cached # python2 support from nltk.stem import SnowballStemmer from six.moves.html_parser...
mit
2,284,034,132,267,696,400
35.94186
89
0.58934
false
Drakulix/knex
tests/api/test_security.py
1
3177
import requests import os class TestPOST(object): def test_main_page(self, flask_api_url): response = requests.get(flask_api_url + '/') assert response.status_code == 404 def test_login_fake_user(self, flask_api_url): session = requests.Session() response = session.post(flask_...
mit
3,377,210,112,738,261,500
41.932432
84
0.569405
false
industrydive/fileflow
fileflow/operators/dive_python_operator.py
1
1096
""" .. module:: operators.dive_operator :synopsis: DivePythonOperator for use with TaskRunner .. moduleauthor:: Laura Lorenz <llorenz@industrydive.com> .. moduleauthor:: Miriam Sexton <miriam@industrydive.com> """ from airflow.operators import PythonOperator from .dive_operator import DiveOperator class DivePy...
apache-2.0
-2,527,563,072,624,418,000
34.354839
84
0.711679
false
awni/tensorflow
tensorflow/contrib/skflow/python/skflow/tests/test_multioutput.py
1
1502
# Copyright 2015-present The Scikit Flow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
-3,187,376,389,461,075,500
33.930233
78
0.709055
false
magcius/sweettooth
sweettooth/extensions/migrations/0008_new_icon_default.py
1
6118
# encoding: utf-8 import 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." new_default = orm.Extension._meta.get_field_by_name('icon')[0].default for ...
agpl-3.0
-7,303,733,742,660,065,000
67.741573
182
0.556064
false
snorfalorpagus/pytest-qt
tests/test_logging.py
1
12411
import datetime import pytest from pytestqt.qt_compat import qDebug, qWarning, qCritical, QtDebugMsg, \ QtWarningMsg, QtCriticalMsg, QT_API @pytest.mark.parametrize('test_succeeds', [True, False]) @pytest.mark.parametrize('qt_log', [True, False]) def test_basic_logging(testdir, test_succeeds, qt_log): """ ...
lgpl-3.0
-3,890,830,085,458,875,400
27.93007
80
0.571106
false
mattboyer/sqbrite
src/record.py
1
5656
# MIT License # # Copyright (c) 2017 Matt Boyer # # 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, modify, merge, p...
mit
4,934,288,116,914,393,000
33.487805
79
0.554455
false
flgiordano/netcash
+/google-cloud-sdk/lib/googlecloudsdk/third_party/appengine/tools/appengine_rpc_test_util.py
1
6895
# 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 ag...
bsd-3-clause
-7,914,726,820,681,663,000
30.921296
86
0.663234
false
soulweaver91/batchpatch
batchpatch.py
1
27396
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Soulweaver' import argparse import os import re import time import shutil import colorama import subprocess import unicodedata import gettext import zipfile import zlib from datetime import datetime from dateutil import tz from logger import LogLevel, Logger ...
mit
-1,857,567,898,504,627,200
42.974318
120
0.501643
false
dionisos2/CI
src/centres_of_interest_manager.py
1
14888
""" See CentresOfInterestManager class """ import re import mylib.checking as checking from mylib.string_op import replace_special_char from mylib.notifier import Notifier from xml.dom import minidom from lxml import etree from centre_of_interest import CentreOfInterest def identity(x): return x class CentresOfI...
gpl-2.0
-8,393,297,476,626,185,000
37.921466
107
0.52159
false
skorokithakis/django-fancy-cache
fancy_tests/tests/test_views.py
1
8032
import unittest import re from nose.tools import eq_, ok_ from django.test.client import RequestFactory from django.core.cache import cache from fancy_cache.memory import find_urls from . import views class TestViews(unittest.TestCase): def setUp(self): self.factory = RequestFactory() def tearDown(...
bsd-3-clause
6,376,716,639,639,333,000
40.833333
93
0.593252
false
ProteinDF/QCLObot
tests/test_amberobject.py
1
1267
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import cProfile from pstats import Stats from qclobot.amberobject import AmberObject from qclobot.utils import get_model import proteindf_bridge as bridge class TestAmberObject(unittest.TestCase): def setUp(self): pass #self.pr = cProf...
gpl-3.0
2,612,895,859,873,137,000
23.365385
55
0.616417
false
sanja7s/SR_Twitter
src_general/explain_FORMATION_DELETION_REL.py
1
6415
#!/usr/bin/env python # a bar plot with errorbars import matplotlib import numpy as np import matplotlib.pyplot as plt from matplotlib.patches import Ellipse, Polygon from pylab import * width = 0.28 # the width of the bars font = {'family' : 'sans-serif', 'variant' : 'normal', 'weight' : 'light', ...
mit
-5,203,250,858,654,813,000
33.304813
120
0.677631
false
DavidCPhillips/spfjs
configure.py
1
26384
#!/usr/bin/env python # # Copyright 2014 Google Inc. All rights reserved. # # Use of this source code is governed by The MIT License. # See the LICENSE file for details. """Script that generates the build.ninja file for SPF.""" __author__ = 'nicksay@google.com (Alex Nicksay)' import errno import distutils.version im...
mit
-3,069,535,320,014,338,000
39.219512
131
0.628335
false
LittleRichard/luxalert
luxweb/luxweb/spiders/KensingtonSpider.py
1
4229
import datetime import re import scrapy from nest.storage.luxalert.entity.Apartment import Apartment from nest.storage.luxalert.entity.ApartmentSnapshot import ApartmentSnapshot from luxweb.luxweb import HMTL_SPIDER_DATA_TUPLE_KEY from luxweb.luxweb.ScrapeErrorHandler import ScrapeErrorHandler from luxweb.luxweb.spid...
gpl-3.0
332,383,384,053,203,200
36.424779
114
0.572476
false
clovertrail/cloudinit-bis
cloudinit/config/cc_scripts_per_boot.py
1
1760
# vi: ts=4 expandtab # # Copyright (C) 2011 Canonical Ltd. # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # # Author: Scott Moser <scott.moser@canonical.com> # Author: Juerg Haefliger <juerg.haefliger@hp.com> # # This program is free software: you can redistribute it and/or modify # it...
gpl-3.0
9,048,880,670,074,391,000
29.877193
79
0.696591
false
AMOboxTV/AMOBox.LegoBuild
plugin.video.salts/scrapers/onlinedizi_scraper.py
1
4676
""" SALTS XBMC Addon Copyright (C) 2014 tknorris 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. T...
gpl-2.0
-8,868,857,414,232,558,000
43.533333
182
0.566938
false
hailongqiu/new-deepin-media-player
src/plugins/youku/youku_web_parse.py
1
5006
#! /usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2013 XXX, Inc. # 2013 红铭曼,王芳 # # Author: 红铭曼,王芳 <hongmingman@sina.com> # Maintainer: 红铭曼,王芳 <hongmingman@sina.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
gpl-3.0
5,523,252,859,593,766,000
36.257576
94
0.573607
false
codenamejason/data_from_pdf
utils.py
1
3856
# vim: sw=4:expandtab:foldmethod=marker # # Copyright (c) 2014, Jason Romero # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright ...
artistic-2.0
-7,082,099,426,749,086,000
30.606557
77
0.641079
false
MalkIPP/ipp_work
ipp_work/example/tax_rate_by_decile.py
1
1569
# -*- coding: utf-8 -*- """ Created on Mon Jun 1 17:07:33 2015 @author: malkaguillot """ from ipp_work.utils import survey_simulate, df_weighted_average_grouped from ipp_work.simulations.ir_marg_rate import varying_survey_simulation from ipp_work.example.quantiles_of_revimp import make_weighted_deciles_of_variable i...
agpl-3.0
-7,333,223,153,781,606,000
37.292683
100
0.667304
false
srznew/heat
heat/engine/resources/openstack/nova/server.py
1
65002
# # 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
-4,687,122,793,121,443,000
40.828829
79
0.53683
false
line72/subte
libsubte/interface/StopMarker.py
1
9828
# # Copyright (C) 2012 - Marcus Dillavou # # 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, or (at your option) # any later version. # # This program is distributed in the hope ...
gpl-3.0
-5,898,807,832,328,061,000
32.889655
129
0.577941
false
piontec/docker-enforcer
test/test_docker_image_helper.py
1
2127
import unittest from unittest.mock import create_autospec import docker from docker.errors import NotFound from dockerenforcer.config import Config from dockerenforcer.docker_image_helper import DockerImageHelper class DockerHelperTests(unittest.TestCase): def setUp(self): self._config = Config() ...
gpl-3.0
6,659,342,909,781,258,000
46.266667
102
0.691584
false
bikash/kaggleCompetition
microsoft malware/code/_untuned_modeling.py
1
5556
###################################################### # _untuned_modeling.py # author: Gert Jacobusse, gert.jacobusse@rogatio.nl # licence: FreeBSD """ Copyright (c) 2015, Gert Jacobusse All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that...
apache-2.0
8,355,478,780,202,789,000
31.497076
98
0.62653
false
jalabort/ijcv-2014-aam
aam/image/test/image_test.py
1
18144
import warnings import numpy as np from numpy.testing import assert_allclose, assert_equal from nose.tools import raises from menpo.testing import is_same_array from menpo.image import BooleanImage, MaskedImage, Image @raises(ValueError) def test_create_1d_error(): Image(np.ones(1)) def test_image_n_elements():...
bsd-2-clause
23,672,551,868,986,324
29.089552
76
0.641534
false
nevins-b/lemur
lemur/plugins/lemur_openssl/plugin.py
1
4304
""" .. module: lemur.plugins.lemur_openssl.plugin :platform: Unix :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. .. moduleauthor:: Kevin Glisson <kglisson@netflix.com> """ from io import open import subprocess from flask import current_app from ...
apache-2.0
4,822,535,974,338,497,000
28.278912
133
0.549954
false
alextingle/autoclapper
autoclapper.py
1
7762
#! /usr/bin/env python ## Support for byteswapping audio streams (needed for AIFF format). _typecode = {2:'h'} def _init_typecode(): import array for t in ('i', 'l'): a = array.array(t) if a.itemsize==4: _typecode[4] = t return import sys print "Can't find array typecode ...
agpl-3.0
5,807,491,492,278,945,000
32.456897
95
0.652409
false
oneconvergence/group-based-policy
gbpservice/neutron/services/grouppolicy/extension_manager.py
1
11825
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
apache-2.0
5,398,071,857,213,786,000
45.559055
78
0.622664
false
dtroyer/python-openstacksdk
openstack/object_store/v1/account.py
1
1764
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under ...
apache-2.0
-5,670,804,540,234,342,000
38.2
78
0.696145
false
civisanalytics/ansible-modules-core
cloud/amazon/iam.py
1
30387
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
2,926,000,182,716,711,000
39.035573
213
0.581532
false
kinow-io/kinow-python-sdk
test/test_media_sources_api.py
1
1195
# coding: utf-8 """ Server API Reference for Server API (REST/Json) OpenAPI spec version: 1.4.41 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys import unittest import kinow_client from kinow_client.rest import ...
apache-2.0
-5,992,378,790,204,752,000
16.573529
72
0.589958
false
titu1994/MobileNetworks
weights/remove_extra_class.py
1
1279
import h5py ''' Place all the weight files here (should automatically be placed after running weight_load.py for all the checkpoints, and then simply run this script to change the weights to support 1000 classes instead of 1001. ''' base = "mobilenet_" alphas = ["1_0", "7_5", "5_0", "2_5"] sizes = [224, 192, 160, 12...
apache-2.0
1,143,303,184,041,994,100
29.452381
95
0.637217
false
dakrauth/prolog
prolog/formatters.py
1
4768
import sys import logging from textwrap import indent from .config import config __all__ = ['PrologFormatter', 'ColorFormatter', 'Colorize'] class PrologFormatter(logging.Formatter): DEFAULT_FMT = config.LONG_FMT DEFAULT_DATEFMT = config.DATE_FMT DEFAULT_STYLE = config.STYLE_FMT def __init__(self, f...
mit
3,918,331,010,708,684,000
30.786667
78
0.551594
false
ThomasColliers/whatmigrate
siteconnection.py
1
5571
# Class that handles What.CD authentication, can download torrents and can search the site log import os,pycurl,urllib,re,sys,urllib2 from BeautifulSoup import BeautifulSoup re_main = re.compile(r'<span style="color: red;">(.*?)</span>') re_detail = re.compile(r' Torrent <a href="torrents\.php\?torrentid=\d+"> \d+</a>...
gpl-3.0
8,229,056,412,642,731,000
41.853846
215
0.588584
false
stackforge/monasca-notification
monasca_notification/plugins/email_notifier.py
1
11064
# (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP # Copyright 2017 Fujitsu LIMITED # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICE...
apache-2.0
4,724,552,376,887,592,000
34.235669
95
0.596439
false
MadsJensen/malthe_alpha_project
source_connectivity_permutation.py
1
6505
# -*- coding: utf-8 -*- """ Created on Wed Sep 9 08:41:17 2015. @author: mje """ import numpy as np import numpy.random as npr import os import socket import mne # import pandas as pd from mne.connectivity import spectral_connectivity from mne.minimum_norm import (apply_inverse_epochs, read_inverse_operator) # Pe...
mit
1,237,449,237,555,734,500
29.539906
79
0.563105
false
roderickmackenzie/gpvdm
gpvdm_gui/gui/QHTabBar.py
1
2005
# # General-purpose Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall # model for 1st, 2nd and 3rd generation solar cells. # Copyright (C) 2012-2017 Roderick C. I. MacKenzie r.c.i.mackenzie at googlemail.com # # https://www.gpvdm.com # Room B86 Coates, University Park, Nottingham, NG7 2RD...
gpl-2.0
-6,475,185,874,997,040,000
37.557692
197
0.74813
false
nnmware/nnmware
apps/money/admin.py
1
2443
# nnmware(c)2012-2020 from __future__ import unicode_literals from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from nnmware.apps.money.models import Transaction, Bill, Currency, ExchangeRate @admin.register(Transaction) class TransactionAdmin(admin.ModelAdmin): list_disp...
gpl-3.0
3,056,534,765,082,308,000
37.171875
111
0.552599
false
t3dev/odoo
addons/website_slides_survey/tests/test_course_certification_failure.py
1
6421
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.survey.tests.common import SurveyCase class TestCourseCertificationFailureFlow(SurveyCase): def test_course_certification_failure_flow(self): # Step 1: create a simple certification ...
gpl-3.0
2,418,318,624,319,238,000
51.631148
197
0.611587
false
dikaiosune/nau-elc-force-completion-mailer
mailer.py
1
7174
__author__ = 'adam' import configparser import logging import argparse import smtplib from email.mime.text import MIMEText from datetime import datetime, timedelta from xlrd import open_workbook from jinja2 import Template template = Template(""" <p>Dear {{ instructor.first }},</p> <p>One of the most common Blackbo...
mit
-1,298,246,076,243,391,500
35.050251
122
0.681907
false
jackrzhang/zulip
zerver/views/invite.py
1
5106
from django.conf import settings from django.core.exceptions import ValidationError from django.http import HttpRequest, HttpResponse from django.utils.translation import ugettext as _ from typing import List, Optional, Set from zerver.decorator import require_realm_admin, to_non_negative_int, \ require_non_guest...
apache-2.0
-138,191,675,718,502,620
42.641026
101
0.686643
false
sanguinariojoe/FreeCAD
src/Mod/Fem/femtaskpanels/task_solver_ccxtools.py
9
16191
# *************************************************************************** # * Copyright (c) 2015 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
lgpl-2.1
-6,757,533,628,294,308,000
39.680905
94
0.577852
false
matt-graham/reversible-rng
revrng/tests/test_reversible_random_state.py
1
5637
import numpy as np from revrng.numpy_wrapper import ReversibleRandomState SEED = 12345 N_ITER = 100 IN_RANGE_SAMPLES = 10000 SHAPES = [2, (1,), (5, 4), (3, 2, 1, 2)] def test_shape(): state = ReversibleRandomState(SEED) for shape in SHAPES: # ndarray shape always tuple even if integer specified ...
mit
-8,083,645,207,336,234,000
34.23125
79
0.615221
false
vhakulinen/bruno-server
bruno/commands/decorators.py
1
1424
from bruno.send_utils import send_error from bruno.env import inputs class Args: """ Decorator for validating number of args. You can also pass in help message. """ def __init__(self, no_args, msg=None): self.no_args = no_args if msg: self.msg = '(' + msg + ')' ...
gpl-2.0
-6,546,121,015,751,768,000
25.37037
79
0.525983
false
FireWalkerX/eyeOS-FOSS-V.2.0
devtools/qooxdoo-sdk/tool/bin/create-application.py
1
12157
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # # qooxdoo - the new era of web development # # http://qooxdoo.org # # Copyright: # 2008 - 2010 1&1 Internet AG, Germany, http://www.1und1.de # # License: # LGPL: http://www.gnu.org/...
agpl-3.0
4,756,107,839,994,583,000
33.933908
135
0.586329
false
gtesei/fast-furious
competitions/santander-customer-transaction-prediction/base_light_gbm1.py
1
2556
import lightgbm as lgb import pandas as pd import numpy as np import sys from datetime import datetime from pathlib import Path from sklearn.model_selection import StratifiedKFold from sklearn.model_selection import RepeatedStratifiedKFold path=Path("data/") train=pd.read_csv(path/"train.csv").drop("ID_code",axis=1) ...
mit
-557,002,843,498,613,570
31.769231
171
0.664319
false
nagyistoce/netzob
src/netzob/Common/Threads/Task.py
1
2501
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocol...
gpl-3.0
-3,064,698,557,478,612,500
53.282609
78
0.403284
false
hanak/artshow-keeper
tests/datafile.py
1
1532
# Artshow Keeper: A support tool for keeping an Artshow running. # Copyright (C) 2014 Ivo Hanak # # 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...
gpl-3.0
5,881,882,281,821,692,000
40.405405
90
0.710836
false
GarrettArm/TheDjangoBook
mysite_project/blog/views.py
1
1361
from django.shortcuts import render from django.utils import timezone from django.views import generic from .models import Post class IndexView(generic.ListView): template_name = "blog/post_list.html" context_object_name = "posts" def get_queryset(self): return Post.objects.filter(published_date...
gpl-3.0
-2,322,962,383,464,944,600
28.586957
80
0.626745
false
Great-Li-Xin/PythonDev
Games/Chap8/Zombie Mob.py
1
9550
# MyLibrary.py import sys, time, random, math, pygame from pygame.locals import * # prints text using the supplied font def print_text(font, x, y, text, color=(255, 255, 255)): imgText = font.render(text, True, color) screen = pygame.display.get_surface() # req'd when function moved into MyLibrary scree...
mit
5,144,566,735,357,413,000
31.263514
112
0.553298
false
oculusstorystudio/kraken
Python/kraken/ui/HAppkit_Editors/editor_widgets/integer_editor.py
1
2518
import sys from kraken.ui.Qt import QtWidgets, QtGui, QtCore from ..fe import FE from ..widget_factory import EditorFactory from ..base_editor import BaseValueEditor class IntegerEditor(BaseValueEditor): def __init__(self, valueController, parent=None): super(IntegerEditor, self).__init__(valueControll...
bsd-3-clause
-3,679,933,215,878,452,700
30.475
96
0.575854
false
DucQuang1/py-earth
doc/generate_figures.py
1
1933
import matplotlib as mpl mpl.use('Agg') import numpy from pyearth import Earth from matplotlib import pyplot #========================================================================= # V-Function Example #========================================================================= # Create some fake data numpy.random.se...
bsd-3-clause
4,116,783,869,634,021,400
26.614286
80
0.510088
false
mjamesruggiero/tripp
setup.py
1
1394
s!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.md') as readme_file: readme = readme_file.read() requirements = [ # TODO: put package requirements here ] test_requirements = [ # TODO: put pac...
bsd-3-clause
1,882,682,804,747,385,900
24.814815
50
0.609039
false
bvesperman/Sector67RaspberryPiAccessControl
space_machines/door.py
1
5509
import logging import time import Queue import threading from Tkinter import * from pystates import StateMachine class DoorState(StateMachine): def CLOSED_LOCKED(self): self.generate_message({"event": self.name + "_CLOSED_LOCKED"}) if self.show_gui: self.v.set("CLOSED_LOCKED") self.log.debug("turn off ...
mit
492,777,001,027,727,100
32.186747
105
0.656744
false
rmvanhees/pynadc
pynadc/scia/hk.py
1
6316
""" This file is part of pynadc https://github.com/rmvanhees/pynadc Routines to convert Sciamachy house-keeping data from raw counts to physical units. Copyright (c) 2018 SRON - Netherlands Institute for Space Research All Rights Reserved License: BSD-3-Clause """ from datetime import timedelta import numpy as...
bsd-3-clause
-2,944,959,474,597,993,500
34.483146
76
0.542749
false
40223233/2015cd_midterm
wsgi.py
1
26126
#@+leo-ver=5-thin #@+node:2014fall.20141212095015.1775: * @file wsgi.py # coding=utf-8 # 上面的程式內容編碼必須在程式的第一或者第二行才會有作用 ################# (1) 模組導入區 # 導入 cherrypy 模組, 為了在 OpenShift 平台上使用 cherrypy 模組, 必須透過 setup.py 安裝 #@@language python #@@tabwidth -4 #@+<<declarations>> #@+node:2014fall.20141212095015.1776: ** <<declar...
gpl-2.0
-7,574,877,212,437,480,000
28.628342
137
0.549093
false
opentrials/processors
processors/base/writers/fda_application.py
1
1620
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging from . import write_organisation from .. import helpers logger = logging.getLogger(__name__) # Module API def write_fda_applica...
mit
-2,835,677,600,094,138,400
29.566038
79
0.605556
false
jparyani/Mailpile
mailpile/plugins/setup_magic.py
1
40822
import os import random import sys import datetime from urllib import urlencode import mailpile.auth from mailpile.defaults import CONFIG_RULES from mailpile.i18n import ListTranslations, ActivateTranslation, gettext from mailpile.i18n import gettext as _ from mailpile.i18n import ngettext as _n from mailpile.plugins ...
apache-2.0
-7,887,133,988,458,968,000
37.95229
83
0.503748
false
munhanha/mtg-random
djangoappengine/boot.py
1
8121
import logging import os import sys PROJECT_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) DATA_ROOT = os.path.join(PROJECT_DIR, '.gaedata') # Overrides for os.environ env_ext = {'DJANGO_SETTINGS_MODULE': 'settings'} def setup_env(): """Configures app engine environment for command-line apps."...
bsd-3-clause
4,427,875,777,957,635,000
41.742105
147
0.619751
false
TheWebMonks/equipo
app/freelancers/viewsets.py
1
4110
from .serializers import serializers from .models import * from django.contrib.auth.models import User, Group from rest_framework import viewsets, permissions, renderers class ProjectViewSet(viewsets.ModelViewSet): """ API endpoint that allows users to be viewed or edited. """ queryset = Project.objec...
apache-2.0
-1,411,435,979,445,298,400
27.541667
65
0.725304
false
srossross/stable.world
stable_world/managers/base.py
1
1825
from __future__ import unicode_literals import os import click from pipes import quote from .push_file import push_file, pull_file from stable_world.py_helpers import urlparse, urlunparse class BaseManager(object): NAME = None PROGRAM = None @classmethod def enabled(cls): if cls.PROGRAM is ...
bsd-2-clause
-4,610,486,736,509,769,000
25.071429
89
0.580274
false
avedaee/DIRAC
DataManagementSystem/Service/FileCatalogProxyHandler.py
1
3492
######################################################################## # $HeadURL $ # File: FileCatalogProxyHandler.py ######################################################################## """ :mod: FileCatalogProxyHandler ================================ .. module: FileCatalogProxyHandler :synopsi...
gpl-3.0
5,032,431,279,644,278,000
35.757895
97
0.645762
false
fkie-cad/FACT_core
src/test/unit/web_interface/test_app_show_analysis.py
1
2522
from helperFunctions.data_conversion import make_bytes from test.common_helper import TEST_FW, TEST_FW_2, TEST_TEXT_FILE from test.unit.web_interface.base import WebInterfaceTest class TestAppShowAnalysis(WebInterfaceTest): def test_app_show_analysis_get_valid_fw(self): result = self.test_client.get('/an...
gpl-3.0
730,382,524,230,051,600
49.44
165
0.681998
false
akfreas/TravisTest
scripts/TestFlightDistribute.py
1
2890
#!/usr/bin/env python import biplist import os import requests import tempfile import sys import git testflight_api_url = "http://testflightapp.com/api/builds.json" def upload_app_to_testflight(archive_path, testflight_api_token, testflight_team_token, testflight_distro_lists=[], notify=True): plist_path = "%s/...
mit
-4,798,690,906,711,449,000
30.075269
135
0.632872
false
googleapis/googleapis-gen
grafeas/v1/grafeas-v1-py/grafeas/grafeas_v1/types/build.py
1
2488
# -*- 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
-2,803,864,520,464,966,700
30.493671
74
0.668408
false
TuKo/brainiak
examples/fcma/classification.py
1
9141
# Copyright 2016 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
8,559,069,756,804,332,000
49.502762
129
0.68067
false
praekelt/vumi-go
go/routers/app_multiplexer/forms.py
1
1271
from django import forms class ApplicationMultiplexerTitleForm(forms.Form): content = forms.CharField( label="Menu title", max_length=100 ) class ApplicationMultiplexerForm(forms.Form): application_label = forms.CharField( label="Application label" ) endpoint_name = forms...
bsd-3-clause
8,391,352,842,481,823,000
24.938776
68
0.610543
false
xmnlab/minilab
arch/socket_arch/simple_socket/client.py
1
1045
# Echo client program from __future__ import print_function, division, unicode_literals from random import randint import socket import pickle import sys import platform if platform.system() == 'Linux': sys.path.insert(0, '/var/www/mswim') else: sys.path.insert(0, '/mswim/') from mswim import settings HOST =...
gpl-3.0
7,342,832,662,091,720,000
23.325581
65
0.6
false
penkin/python-dockercloud
dockercloud/api/http.py
1
2612
from __future__ import absolute_import import logging from requests import Request, Session from requests import utils from urllib.parse import urljoin import dockercloud from .exceptions import ApiError, AuthError logger = logging.getLogger("python-dockercloud") global_session = Session() def get_session(): ...
apache-2.0
2,378,145,631,790,428,000
30.095238
110
0.620597
false
rawdigits/wee-slack
wee_slack.py
1
170611
# -*- coding: utf-8 -*- from __future__ import unicode_literals from collections import OrderedDict from functools import wraps from itertools import islice, count import textwrap import time import json import pickle import sha import os import re import urllib import sys import traceback import collections import ...
mit
-8,762,472,178,675,239,000
37.339551
277
0.599475
false
Brocade-OpenSource/OpenStack-DNRM-Nova
nova/compute/api.py
1
152761
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2012-2013 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache Lic...
apache-2.0
9,132,316,229,346,046,000
42.558882
79
0.566899
false
ArcherSys/ArcherSys
Lib/lib2to3/tests/pytree_idempotency.py
1
7469
<<<<<<< HEAD <<<<<<< HEAD #!/usr/bin/env python3 # Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Main program for testing the infrastructure.""" from __future__ import print_function __author__ = "Guido van Rossum <guido@python.org>" # Support imports (need to ...
mit
-5,725,509,200,969,174,000
24.934028
75
0.56286
false
deepmind/rlax
rlax/_src/policy_gradients.py
1
10472
# Copyright 2019 DeepMind Technologies Limited. 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 ...
apache-2.0
380,960,590,882,449,540
34.569966
122
0.690942
false
openstack/vitrage
vitrage/api/controllers/v1/alarm.py
1
2404
# Copyright 2016 - Nokia Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
apache-2.0
-3,731,942,575,143,812,600
30.631579
75
0.649334
false
neerajvashistha/pa-dude
lib/python2.7/site-packages/sphinx/theming.py
1
8278
# -*- coding: utf-8 -*- """ sphinx.theming ~~~~~~~~~~~~~~ Theming support for HTML builders. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import shutil import zipfile import tempfile from os import path from six import str...
mit
4,504,715,810,136,291,300
33.781513
88
0.539381
false
SylvainA/os-event-catcher
openstack/common/rpc/common.py
1
18537
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2011 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the ...
apache-2.0
7,062,735,833,508,406,000
35.490157
79
0.644657
false
rwl/PyCIM
CIM14/CDPSM/Balanced/IEC61970/Wires/EnergySource.py
1
2528
# Copyright (C) 2010-2011 Richard Lincoln # # 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, modify, merge, publish...
mit
-1,110,787,457,818,717,400
44.963636
108
0.714794
false
trilan/lemon
lemon/forms.py
1
2292
from django import forms from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.forms.formsets import formset_factory from django.forms.models import BaseInlineFormSet from django.forms.models import ModelFormMetaclass, _get_foreign_key from django.utils.trans...
bsd-3-clause
1,137,810,636,647,366,900
31.28169
77
0.58726
false
gmsanchez/nmpc_comparison
cstr_startup_colloc.py
1
9778
# Linear and nonlinear control of startup of a CSTR. import mpctools as mpc import numpy as np import matplotlib.pyplot as plt from matplotlib import gridspec import time # Define some parameters and then the CSTR model. Nx = 3 Nu = 2 Nd = 1 # Ny = Nx Delta = .25 # eps = 1e-6 # Use this as a small number. T0 = 350 c0...
gpl-3.0
3,749,407,622,004,102,700
30.850163
80
0.54009
false
bmazin/ARCONS-pipeline
photonlist/test/testExpTimeWeight.py
1
1192
''' Author: Julian van Eyken Date: Jul 9 2013 Test code for per-pixel effective exposure time weighting. ''' import os.path import photonlist.photlist as pl import photonlist.RADecImage as rdi from util.FileName import FileName def getSimpleImage(fileName=FileName(run='PAL2012',date='20121211',tstamp='20121212...
gpl-2.0
-3,305,290,240,977,502,700
34.058824
106
0.700503
false
dmonroy/chilero.pg
chilero/pg/test.py
1
2550
import asyncio import json import random import string import sys from aiohttp import request from chilero.web.test import WebTestCase from .application import Application TEST_DB_SUFFIX = 'test_{}{}{}'.format( sys.version_info.major, sys.version_info.minor, sys.version_info.micro, ) cl...
mit
3,201,463,747,761,111,600
24.247525
72
0.565098
false
jc6036/LordsAndLadies
file_filler.py
1
2432
# Using this to simply fill up a text file with placeholder names def fill_names(filename, num_of_names, variation, gender = "none"): if gender == "male": if variation == "first": with open("./%s" % str(filename), "w") as opened_file: for i in range(1, num_of_names + 1): ...
gpl-2.0
6,665,909,490,550,261,000
34.246377
74
0.515625
false
nschaetti/EchoTorch
echotorch/transforms/text/Character.py
1
3378
# -*- coding: utf-8 -*- # # Imports import torch from .Transformer import Transformer # Transform text to character vectors class Character(Transformer): """ Transform text to character vectors """ # Constructor def __init__(self, uppercase=False, gram_to_ix=None, start_ix=0, fixed_length=-1): ...
gpl-3.0
8,788,521,190,926,664,000
24.78626
87
0.450266
false
mhils/mitmproxy
mitmproxy/flowfilter.py
1
14034
""" The following operators are understood: ~q Request ~s Response Headers: Patterns are matched against "name: value" strings. Field names are all-lowercase. ~a Asset content-type in response. Asset content types are: ...
mit
5,222,736,535,658,669,000
23.322357
98
0.562847
false
rwgdrummer/maskgen
hp_tool/hp/ErrorWindow.py
1
2192
from Tkinter import * from tkSimpleDialog import Dialog import json import csv import tkFileDialog class ErrorWindow(Dialog): """ Provided a list of error messages, shows them in a simple pop-up window. """ def __init__(self, master, errors): self.errors = errors self.cancelPressed = Tr...
bsd-3-clause
-6,608,855,206,167,699,000
30.782609
89
0.605839
false
cyphactor/lifecyclemanager
testenv/trac-0.10.4/trac/util/autoreload.py
1
2888
# -*- coding: utf-8 -*- # # Copyright (C) 2006 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consists o...
gpl-3.0
-7,681,305,959,908,121,000
34.219512
80
0.608033
false
devananda/ironic
ironic/tests/unit/drivers/modules/irmc/test_power.py
1
8573
# Copyright 2015 FUJITSU LIMITED # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
-3,511,996,930,661,229,600
44.84492
78
0.606089
false
KBNLresearch/iromlab
iromlab/testsru.py
1
1831
#! /usr/bin/env python import io import xml.etree.ElementTree as ETree from .kbapi import sru def main(): """ Script for testing SRU interface outside Iromlab (not used by main Iromlab application) """ catid = "184556155" # Lookup catalog identifier #sruSearchString = '"PPN=' + str(catid)...
apache-2.0
1,240,776,010,216,517,400
27.625
85
0.581103
false
madsmpedersen/MMPE
datastructures/dual_key_dict.py
1
3481
''' Created on 08/11/2013 @author: mmpe ''' class DualKeyDict(object): def __init__(self, unique_key_att, additional_key_att): self._unique_key_att = unique_key_att self._additional_key_att = additional_key_att self._dict = {} self._unique_keys = set() def __getitem__(self, ke...
apache-2.0
1,287,717,536,764,929,500
29.535088
158
0.556162
false
zjuchenyuan/BioWeb
Lib/Bio/codonalign/codonalphabet.py
1
2100
# Copyright 2013 by Zheng Ruan (zruan1991@gmail.com). # All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Code for Codon Alphabet. CodonAlphabet class is inherited from Alphabet...
mit
-3,725,978,972,403,675,000
28.577465
73
0.69381
false