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
blueshed/blueshed-py
src/blueshed/handlers/basic_auth.py
1
1716
''' Created on 30 Jan 2014 @author: peterb ''' import base64 import logging class BasicAuthMixin(object): """ BasicAuthMixin """ def _request_auth(self, realm): if self._headers_written: raise Exception('headers have already been written') self.set_status(401) ...
mit
-6,292,737,734,026,273,000
29.642857
86
0.578089
false
victor-rene/kivy-gamelib
stickman/bone.py
1
2072
import math from kivy.graphics.context_instructions import PopMatrix, PushMatrix, Rotate from kivy.properties import NumericProperty from kivy.uix.image import Image class Bone(Image): angle = NumericProperty() def __init__(self, **kw): super(Bone, self).__init__(**kw) self.name = kw['name'] if 'name' ...
mit
-4,379,856,465,922,003,000
28.197183
87
0.629826
false
zsjohny/jumpserver
apps/assets/serializers/asset.py
1
6406
# -*- coding: utf-8 -*- # from rest_framework import serializers from django.db.models import Prefetch, F from django.utils.translation import ugettext_lazy as _ from orgs.mixins.serializers import BulkOrgResourceModelSerializer from common.serializers import AdaptedBulkListSerializer from ..models import Asset, Node...
gpl-2.0
9,099,904,642,541,609,000
33.695652
82
0.602287
false
dreikanter/public-static
publicstatic/conf.py
1
6519
# coding: utf-8 """Configuration-related fuctionality and defaults.""" import codecs from datetime import datetime import os import yaml from publicstatic import const from publicstatic import errors from publicstatic.version import __version__ _params = {} # Configuration parameters _path = '' # Configuration fil...
bsd-3-clause
7,952,291,187,067,263,000
27.845133
76
0.619574
false
lmazuel/azure-sdk-for-python
azure-mgmt-commerce/azure/mgmt/commerce/models/recurring_charge.py
1
1457
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-3,596,932,056,541,768,000
34.536585
76
0.599176
false
js850/PyGMIN
examples/gui/NewLJ.py
1
3256
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'NewLJ.ui' # # Created: Thu May 10 03:10:06 2012 # by: PyQt4 UI code generator 4.8.6 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attribute...
gpl-3.0
-8,122,948,593,237,993,000
53.266667
156
0.722052
false
AlexStarov/Shop
applications/sms_ussd/migrations/0001_initial.py
1
2850
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
apache-2.0
-8,317,468,991,251,916,000
78.166667
917
0.638947
false
DeeDee22/nelliepi
src/ch/fluxkompensator/nelliepi/ui/screen/ListScreen.py
1
8571
''' Created on Oct 4, 2013 @author: geraldine ''' from ch.fluxkompensator.nelliepi.ui.screen.ScreenWithFooter import ScreenWithFooter from ch.fluxkompensator.nelliepi.ui.widgets.TextButton import TextButton from ch.fluxkompensator.nelliepi.Constants import RED from ch.fluxkompensator.nelliepi.Constants import BLUE fro...
gpl-2.0
2,301,281,593,638,598,700
43.180412
291
0.608447
false
bgribble/mfp
mfp/gui/xyplot/scatterplot.py
1
7839
#! /usr/bin/env python ''' scatterplot.py Specialization of XYPlot for showing sets of discrete datapoints Copyright (c) 2012 Bill Gribble <grib@billgribble.com> ''' import math from .mark_style import MarkStyle from .xyplot import XYPlot from mfp import log class ScatterPlot (XYPlot): def __init__(self, eleme...
gpl-2.0
96,053,023,676,297,900
31.6625
71
0.494834
false
rriggio/empower-runtime
empower/apps/wifimobilitymanager/wifimobilitymanager.py
1
1790
#!/usr/bin/env python3 # # Copyright (c) 2019 Roberto Riggio # # 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 applicabl...
apache-2.0
189,241,044,302,953,950
30.403509
75
0.660894
false
HardTacos/techmodnotify-reddit-bot
techmodnotify.py
1
6960
#!/usr/bin/env python2.7 # ============================================================================= # IMPORTS # ============================================================================= import praw import MySQLdb import ConfigParser import time import parsedatetime.parsedatetime as pdt import pprint import lo...
mit
9,204,832,635,670,012,000
37.666667
130
0.500144
false
ShaguptaS/moviepy
moviepy/video/compositing/CompositeVideoClip.py
1
4062
import numpy as np from moviepy.video.VideoClip import VideoClip, ColorClip from moviepy.audio.AudioClip import CompositeAudioClip # CompositeVideoClip class CompositeVideoClip(VideoClip): """ A VideoClip made of other videoclips displayed together. This is the base class for most compositions. ...
mit
4,766,768,109,639,454,000
34.321739
74
0.575332
false
rphlypo/parietalretreat
setup_data_path_salma.py
1
6001
import glob import os.path from pandas import DataFrame import pandas def get_all_paths(data_set=None, root_dir="/"): # TODO # if data_set ... collections.Sequence # iterate over list if data_set is None: data_set = {"hcp", "henson2010faces", "ds105", "ds107"} list_ = list() head, tail...
bsd-2-clause
-7,010,199,412,020,630,000
40.386207
78
0.472421
false
CSysTeam/SecurityPackage
RC4/RC4Test.py
1
1105
import unittest from RC4 import RC4 class RC4Test(unittest.TestCase): def test_RC4TestEnc1(self): algorithm = RC4() cipher = algorithm.Encrypt("abcd", "test") self.assertEqual(cipher, "ÏíDu") def test_RC4TestDec1(self): algorithm = RC4() cipher = algo...
gpl-3.0
-1,260,778,394,339,443,200
20.096154
62
0.568824
false
ttm/percolation
percolation/rdf/ontology.py
1
7460
import percolation as P from .rdflib import NS a=NS.rdf.type def percolationSystem(): triples=[ (NS.per.CurrentStatus, a, NS.per.SystemStatus) ] def minimumTestOntology(context="minimum_ontology"): triples=[ (NS.po.FacebookSnapshot,NS.rdfs.subClassOf,NS.po.Snapshot), ...
gpl-3.0
-2,680,139,253,561,081,000
40.21547
111
0.659651
false
debsankha/bedtime-programming
ls222/visual-lotka.py
1
5120
#!/usr/bin/env python from math import * import thread import random import time import pygtk pygtk.require("2.0") import gtk import gtk.glade import commands import matplotlib.pyplot class rodent: def __init__(self): self.time_from_last_childbirth=0 class felix: def __init__(self): self.size=0 self.is_virgin...
gpl-3.0
245,585,090,863,972,380
24.858586
96
0.614844
false
blaze/distributed
distributed/protocol/tests/test_collection_cuda.py
1
2448
import pytest from distributed.protocol import serialize, deserialize from dask.dataframe.utils import assert_eq import pandas as pd @pytest.mark.parametrize("collection", [tuple, dict]) @pytest.mark.parametrize("y,y_serializer", [(50, "cuda"), (None, "pickle")]) def test_serialize_cupy(collection, y, y_serializer):...
bsd-3-clause
-6,239,707,411,565,194,000
36.090909
87
0.611928
false
cs243iitg/vehicle-webapp
webapp/vms/forms.py
1
15620
from vms import models from django.contrib.auth.models import User from django import forms from django.forms.extras.widgets import SelectDateWidget from django.contrib.admin.widgets import AdminSplitDateTime from django.utils.translation import ugettext_lazy as _ from datetimewidget.widgets import DateTimeWidget, Date...
mit
-1,965,283,994,541,151,200
42.268698
271
0.516005
false
dragon788/wordfreq
tests/test.py
1
5277
from wordfreq import ( word_frequency, available_languages, cB_to_freq, top_n_list, random_words, random_ascii_words, tokenize ) from nose.tools import ( eq_, assert_almost_equal, assert_greater, raises ) def test_freq_examples(): # Stopwords are most common in the correct language assert_greater(...
mit
-1,019,574,581,594,584,000
28.701149
80
0.590557
false
wasade/qiime
tests/test_plot_semivariogram.py
1
12517
#!/usr/bin/env python __author__ = "Antonio Gonzalez Pena" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["Antonio Gonzalez Pena"] __license__ = "GPL" __version__ = "1.8.0-dev" __maintainer__ = "Antonio Gonzalez Pena" __email__ = "antgonza@gmail.com" from qiime.plot_semivariogram import hist_bins...
gpl-2.0
-72,869,779,810,298,130
25.688699
80
0.308141
false
SuperKogito/Cryptos
CryptosCode/ExitPage.py
1
2699
# -*- coding: utf-8 -*- """ Created on Sat Sep 23 19:05:35 2017 @author: SuperKogito """ # Define imports import tkinter as tk class ExitPage(tk.Frame): """ Exit page class """ def __init__(self, parent, controller): tk.Frame.__init__(self, parent) self.controller = controller self.con...
mit
7,732,974,716,320,206,000
42.532258
83
0.527603
false
nicholaschris/landsatpy
utils.py
1
2693
import operator import pandas as pd import numpy as np from numpy import ma from scipy.misc import imresize import scipy.ndimage as ndimage from skimage.morphology import disk, dilation def get_truth(input_one, input_two, comparison): # too much abstraction ops = {'>': operator.gt, '<': operator.lt, ...
mit
181,416,954,024,829,280
33.101266
132
0.602674
false
taigaio/taiga-back
taiga/projects/settings/migrations/0001_initial.py
1
1897
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2018-09-24 11:49 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import taiga.projects.settings.choices class Migration(migrations.Mi...
agpl-3.0
5,703,856,807,743,608,000
46.425
457
0.651555
false
chooyan-eng/ChooyanHttp
http_client.py
1
2148
import socket class ChooyanHttpClient: def request(host, port=80): response = ChooyanResponse() s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((host, port)) request_str = 'GET / HTTP/1.1\nHost: %s\r\n\r\n' % (host) s.send(request_str.encode('utf-8')) ...
apache-2.0
7,177,049,130,168,306,000
26.189873
93
0.53352
false
normanyahq/Parameterized-Remote-Shell-Execution-Service
server.py
1
1415
from flask import Flask, request from subprocess import Popen, PIPE import json app = Flask(__name__) HelpMessage = """ Usage: POST command to this URL with following payload: {"file": "...", args:[...]} We are using this format to keep it the same with NodeJs spawnSync Example: {"file": "ls", arg...
mit
-8,591,826,401,162,474,000
36.236842
113
0.54629
false
kwilliams-mo/iris
lib/iris/tests/test_plot.py
1
32122
# (C) British Crown Copyright 2010 - 2013, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any l...
gpl-3.0
-226,536,056,870,025,340
34.221491
79
0.578731
false
google/orchestra
orchestra/google/marketing_platform/operators/display_video_360.py
1
18902
# # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
apache-2.0
-7,000,088,430,640,466,000
37.185859
115
0.585811
false
z-jason/anki
aqt/forms/dconf.py
1
20860
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'designer/dconf.ui' # # Created: Sun Mar 30 10:19:28 2014 # by: PyQt4 UI code generator 4.10.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except...
agpl-3.0
-2,270,101,088,143,623,200
52.901809
135
0.671381
false
invisiblearts/DRCN
drcn_main.py
1
3349
# The MIT License (MIT) # # Copyright (c) 2016 invisiblearts # # 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,442,491,745,930,020,000
39.841463
112
0.727381
false
SlideAtlas/SlideAtlas-Server
testing/unit/test_models.py
1
3917
import os import sys import logging from bson import ObjectId logging.basicConfig(level=logging.INFO) slideatlaspath = os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")) sys.path.append(slideatlaspath) from slideatlas import models from slideatlas.models import Image from slideatlas.models import Imag...
apache-2.0
-205,574,692,043,793,570
27.591241
98
0.580546
false
sudheesh001/pontoon
pontoon/sync/tasks.py
1
7172
import logging from django.conf import settings from django.db import connection, transaction from django.utils import timezone from pontoon.administration.vcs import CommitToRepositoryException from pontoon.base.models import ChangedEntityLocale, Project, Repository from pontoon.base.tasks import PontoonTask from po...
bsd-3-clause
-5,564,550,856,805,116,000
39.292135
93
0.587144
false
izapolsk/integration_tests
cfme/tests/infrastructure/test_host_drift_analysis.py
1
4959
import pytest from cfme import test_requirements from cfme.common.host_views import HostDriftAnalysis from cfme.infrastructure.host import Host from cfme.infrastructure.provider import InfraProvider from cfme.utils import testgen from cfme.utils.appliance.implementations.ui import navigate_to from cfme.utils.blockers ...
gpl-2.0
-5,240,017,921,410,725,000
34.170213
93
0.667272
false
Semanticle/Semanticle
sm-mt-devel/src/metabulate/tests/test26case-004d.py
1
18359
''' Copyright 2009, 2010 Anthony John Machin. All rights reserved. Supplied subject to The GNU General Public License v3.0 Created on 28 Jan 2009 Last Updated on 10 July 2010 As test20 with tests of: rules instantiation and query inference Related: single dict TS recursion rule plus generic rule + minimal da...
gpl-2.0
3,084,103,411,011,080,700
66.00365
216
0.503513
false
gadybadger/mixpanel-celery
mixpanel/conf/settings.py
1
2592
"""Default configuration values and documentation""" from django.conf import settings """ .. data:: MIXPANEL_API_TOKEN API token for your Mixpanel account. This configures the Mixpanel account where all of the action will be. You can find this on the ``API Information`` tab on your `mixpanel account...
bsd-3-clause
-5,596,797,928,066,212,000
26.574468
90
0.682099
false
Maksimall89/houmpack
lcdmy.py
1
4270
#!/usr/bin/python # -------------------------------------- # ___ ___ _ ____ # / _ \/ _ \(_) __/__ __ __ # / , _/ ___/ /\ \/ _ \/ // / # /_/|_/_/ /_/___/ .__/\_, / # /_/ /___/ # # lcd_16x2.py # 20x4 LCD Test Script with # backlight control and text justification # # Author : Matt Hawkins # ...
gpl-3.0
820,359,828,313,660,300
23.682081
73
0.572131
false
ONEcampaign/humanitarian-data-service
displacement_tracker_data.py
1
27157
import requests import pandas as pd import os.path import resources.constants import json from pandas.io.json import json_normalize from utils.data_utils import get_ordinal_number """ This script aggregates data from multiple endpoints and returns a single .json file containing all data used in the displacement tracke...
mit
-2,764,529,129,630,111,000
38.07482
154
0.647347
false
anthonyalmarza/trex
tests/test_pipelining.py
1
4322
# import sys from twisted.trial import unittest from twisted.internet import defer # from twisted.python import log import trex from trex import redis from .mixins import REDIS_HOST, REDIS_PORT # log.startLogging(sys.stdout) class InspectableTransport(object): def __init__(self, transport): self.orig...
mit
806,835,028,002,761,900
32.246154
83
0.64484
false
sam17/room-of-requirement
alexa_skill/alexa_dumbledore_skill.py
1
3214
import logging import json from flask_ask import Ask,request,session, question, statement from flask import Flask import requests import datetime SERVER_IP = "http://ec2-52-221-204-189.ap-southeast-1.compute.amazonaws.com:3000/" THIS = "Saturn" app = Flask(__name__) ask = Ask(app, "/") logging.getLogger('flask_ask')....
mit
-247,352,226,600,152,580
45.57971
214
0.679838
false
GcsSloop/PythonNote
PythonCode/Python入门/函数/定义可变参数.py
1
1027
#coding=utf-8 #author: sloop ''' ÈÎÎñ Çë±àд½ÓÊܿɱä²ÎÊýµÄ average() º¯Êý¡£ ''' #´úÂë def average(*args): s = sum(args)*1.0 #ºÍ l = len(args) #¸öÊý return 0.0 if l==0 else s/l #ƽ¾ùÖµ print average() print average(1, 2) print average(1, 2, 2, 3, 4) ''' def average(*args): retur...
apache-2.0
4,462,728,893,564,518,000
18.769231
140
0.571568
false
WielderOfMjoelnir/pypeira
pypeira/core/time.py
1
1497
# This might no have any use anymore, as the HDU objects is the new thing. # Possibly changed it a bit to a time converter instead of getter I suppose. def hdu_get_time(hdu, time_format='bmjd'): """ Will be used as a key function for the list.sort() or sorted() functions. Example, hdus.sort(key=h...
mit
-3,143,395,251,555,858,400
34.642857
88
0.637275
false
Ritiek/Spotify-Downloader
spotdl/encode/encoders/ffmpeg.py
1
5171
import subprocess import os from spotdl.encode import EncoderBase from spotdl.encode.exceptions import EncoderNotFoundError from spotdl.encode.exceptions import FFmpegNotFoundError import logging logger = logging.getLogger(__name__) # Key: from format # Subkey: to format RULES = { "m4a": { "mp3": "-code...
mit
6,673,886,669,052,045,000
31.522013
94
0.553278
false
hfeeki/transifex
transifex/projects/search_indexes.py
1
1115
import datetime from haystack.indexes import * from haystack import site from transifex.projects.models import Project class ProjectIndex(RealTimeSearchIndex): text = CharField(document=True, use_template=True) slug = CharField(model_attr='slug', null=False) name = CharField(model_attr='name', null...
gpl-2.0
-4,778,798,853,786,573,000
31.823529
79
0.69417
false
wireservice/agate
agate/csv_py3.py
1
4555
#!/usr/bin/env python """ This module contains the Python 3 replacement for :mod:`csv`. """ import csv import six from agate.exceptions import FieldSizeLimitError POSSIBLE_DELIMITERS = [',', '\t', ';', ' ', ':', '|'] class Reader(six.Iterator): """ A wrapper around Python 3's builtin :func:`csv.reader`. ...
mit
8,741,911,248,189,680,000
25.32948
119
0.568606
false
atpy/atpy
atpy/fitstable.py
1
11686
from __future__ import print_function, division import os import numpy as np from astropy.io import fits from .exceptions import TableException from .helpers import smart_dtype, smart_mask from .decorators import auto_download_to_file, auto_fileobj_to_file standard_keys = ['XTENSION', 'NAXIS', 'NAXIS1', 'NAXIS2', ...
mit
6,538,405,604,914,906,000
27.364078
78
0.552114
false
skriticos/ac
src/AniChou/myanimelist.py
1
14742
# =========================================================================== # # Name: myanimelist.py # Purpose: Provide an interface to anime data; syncronize with the MyAnimeList # server; # # Copyright (c) 2008 Gareth Latty # Copyright (c) 2009 Sebastian Bartos # Copyright (c) 2009 Daniel Anderson - dan...
gpl-3.0
-4,077,253,962,298,515,500
35.580645
84
0.599647
false
rschnapka/bank-payment
account_direct_debit/model/account_invoice.py
1
5845
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2011 - 2013 Therp BV (<http://therp.nl>). # # All other contributions are (C) by their respective contributors # # All Rights Reserved # # This program is free software: you can redistrib...
agpl-3.0
8,191,803,226,444,862,000
34.424242
79
0.623268
false
serverdensity/sd-agent-core-plugins
kafka/test_kafka.py
1
4269
# (C) Datadog, Inc. 2010-2017 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib import threading import time from types import ListType import unittest import os import mock # 3p from nose.plugins.attrib import attr # project from aggregator import MetricsAggregator import logging ...
bsd-3-clause
428,857,691,575,272,450
33.991803
142
0.622628
false
cybertk/mffr
chromium_tools/mffr.py
1
6105
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Usage: mffr.py [-d] [-g *.h] [-g *.cc] REGEXP REPLACEMENT This tool performs a fast find-and-replace operation on files in the ...
bsd-3-clause
2,502,402,201,311,980,000
34.494186
80
0.618509
false
xfire/pydzen
pydzen.py
1
11601
#!/usr/bin/env python # # Copyright (C) 2008 Rico Schiekel (fire at downgra dot de) # # 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 l...
gpl-2.0
3,186,768,065,354,532,000
33.120588
125
0.560383
false
DESatAPSU/DAWDs
python/origBandpass_FITSToCSV.py
1
1930
# Converts STD_BANDPASSES_Y3A1_FGCM_20170630_extend3000.fits to # y3a2_std_passband_extend3000_ugrizYatm.csv # # To run (bash): # python origBandpass_FITSToCSV.py > origBandpass_FITSToCSV.log 2>&1 & # # To run (tcsh): # python origBandpass_FITSToCSV.py >& origBandpass_FITSToCSV.log & # # DLT, 2017-06-30 # bas...
mit
466,522,794,910,993,100
29.15625
89
0.702073
false
rubgombar1/sharing-cars
sharingcars/common/migrations/0001_initial.py
1
4372
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-05-02 14:13 from __future__ import unicode_literals from django.conf import settings import django.core.validators from django.db import migrations, models import django.db.models.deletion import sharingcars.helpers.User class Migration(migrations.Migration...
gpl-3.0
-6,813,793,928,361,808,000
43.161616
188
0.583715
false
netzary/Kaline
ldapdb/models/__init__.py
2
1719
# -*- coding: utf-8 -*- # # django-ldapdb # Copyright (c) 2009-2011, Bolloré telecom # All rights reserved. # # See AUTHORS file for a full list of contributors. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1...
mit
-4,321,518,929,922,104,000
48.057143
82
0.761211
false
SophieIPP/openfisca-france
openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/cotisations_sociales/travail_fonction_publique.py
1
13483
# -*- coding: utf-8 -*- from __future__ import division import math from numpy import minimum as min_ from ....base import * # noqa analysis:ignore from .base import apply_bareme_for_relevant_type_sal class allocations_temporaires_invalidite(Variable): column = FloatCol entity_class = Individus label...
agpl-3.0
1,825,974,932,120,057,000
44.043478
116
0.662236
false
great-expectations/great_expectations
tests/datasource/test_batch_generators.py
1
6706
import os from great_expectations.datasource.batch_kwargs_generator import ( DatabricksTableBatchKwargsGenerator, GlobReaderBatchKwargsGenerator, SubdirReaderBatchKwargsGenerator, ) try: from unittest import mock except ImportError: from unittest import mock def test_file_kwargs_generator( d...
apache-2.0
-4,090,798,318,681,937,400
36.463687
88
0.621384
false
ekeih/libtado
docs/source/conf.py
1
4718
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # libtado documentation build configuration file, created by # sphinx-quickstart on Thu Feb 16 17:11:41 2017. # # 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 # au...
gpl-3.0
-4,247,994,556,229,859,300
29.050955
79
0.673379
false
er432/TASSELpy
TASSELpy/net/maizegenetics/trait/CombinePhenotype.py
1
4297
from TASSELpy.utils.helper import make_sig from TASSELpy.utils.Overloading import javaOverload, javaConstructorOverload, javaStaticOverload from TASSELpy.net.maizegenetics.trait.AbstractPhenotype import AbstractPhenotype from TASSELpy.net.maizegenetics.trait.Phenotype import Phenotype from TASSELpy.net.maizegenetics.tr...
bsd-3-clause
-5,652,573,568,547,928,000
42.846939
98
0.628811
false
muhleder/timestrap
timestrap/settings/base.py
1
3215
import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname( os.path.dirname( os.path.dirname( os.path.abspath(__file__) ) ) ) # SECURITY WARNING: set this to your domain name in production! ALLOWED_HOSTS = ['*'] # Application ...
bsd-2-clause
-8,415,473,442,261,682,000
21.326389
79
0.677138
false
nimbusproject/epumgmt
src/python/tests/test_epumgmt_defaults_log_events.py
1
16586
import os import shutil import tempfile import ConfigParser import epumgmt.defaults.log_events from epumgmt.defaults import DefaultParameters from mocks.common import FakeCommon class TestAmqpEvents: def setup(self): self.runlogdir = tempfile.mkdtemp() self.vmlogdir = tempfile.mkdtemp() ...
apache-2.0
1,316,809,836,541,782,800
39.552567
476
0.629447
false
maljac/odoo-addons
partner_views_fields/res_config.py
1
1422
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import fields, models class partner...
agpl-3.0
-1,070,431,712,767,902,500
37.432432
78
0.587904
false
ksachs/invenio
modules/bibindex/lib/bibindex_engine.py
1
101146
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, ## 2010, 2011, 2012, 2013 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Softwar...
gpl-2.0
-8,379,763,187,648,380,000
43.014795
207
0.561683
false
google/mobly
mobly/controllers/android_device.py
1
38734
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
4,298,027,864,091,027,000
32.769834
84
0.677286
false
ccpgames/eve-metrics
web2py/applications/admin/languages/ru-ru.py
1
23612
# coding: utf8 { '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Update" ist ein optionaler Ausdruck wie "Feld1 = \'newvalue". JOIN Ergebnisse können nicht aktualisiert oder gelöscht werden', '%Y-%m-%d': '%Y-%m-%d', '%Y-%m-%d %H:%M:%S': '%Y-%m-%d...
mit
-6,415,771,533,756,039,000
49.516035
630
0.711998
false
egabancho/invenio
invenio/modules/oauth2server/provider.py
1
3287
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2014 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) a...
gpl-2.0
8,069,406,589,776,774,000
30.009434
77
0.662915
false
msebire/intellij-community
python/helpers/pydev/pydevconsole.py
1
12520
''' Entry point module to start the interactive console. ''' from _pydev_bundle._pydev_getopt import gnu_getopt from _pydev_comm.rpc import make_rpc_client, start_rpc_server, start_rpc_server_and_make_client from _pydev_imps._pydev_saved_modules import thread start_new_thread = thread.start_new_thread try: from c...
apache-2.0
3,085,186,923,838,286,300
31.268041
138
0.626038
false
MarauderXtreme/sipa
sipa/model/finance.py
1
2369
from abc import ABCMeta, abstractmethod from flask_babel import gettext from sipa.model.fancy_property import ActiveProperty, Capabilities from sipa.units import format_money from sipa.utils import compare_all_attributes class BaseFinanceInformation(metaclass=ABCMeta): """A Class providing finance information a...
mit
-564,479,798,384,781,100
31.013514
80
0.604474
false
rogerthat-platform/rogerthat-backend
src-test/rogerthat_tests/mobicage/bizz/test_system.py
1
1331
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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
8,916,654,792,265,788,000
35.972222
98
0.746807
false
99designs/colorific
setup.py
1
1724
# -*- coding: utf-8 -*- # # setup.py # colorific # """ Package information for colorific. """ import os.path import platform try: from setuptools import setup except ImportError: from distutils.core import setup PROJECT_DIR = os.path.realpath(os.path.join(os.path.dirname(__file__))) README_PATH = os.path....
isc
7,411,314,964,488,441,000
28.220339
77
0.62819
false
hutchison/bp_mgmt
bp_cupid/views/Student.py
1
2805
from django.shortcuts import render, get_object_or_404 from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required, user_passes_test from django.views.generic import View from ..models import ( Student, Gewicht, Platz, Zeitraum, ) class StudentDetail...
agpl-3.0
-2,386,100,749,923,359,000
29.150538
75
0.578103
false
dmargala/qusp
examples/compare_delta.py
1
7364
#!/usr/bin/env python import argparse import numpy as np import numpy.ma as ma import h5py import qusp import matplotlib.pyplot as plt import scipy.interpolate import fitsio class DeltaLOS(object): def __init__(self, thing_id): path = '/data/lya/deltas/delta-%d.fits' % thing_id hdulist = fitsio....
mit
-6,005,995,334,850,592,000
36.380711
134
0.623303
false
botchat/botclassifier
pythonbotchat/cleverbot/cleverbot_chat.py
1
1770
""" It is very simple selnium based code which cat with clevarbot and genrate log from chat """ import time from datetime import datetime from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_con...
mit
8,204,009,665,455,109,000
42.170732
118
0.655932
false
jeremyblalock/translucent
translucent.py
1
1658
#!/usr/bin/python import sys, re class Color(object): def __init__(self, inp, alpha=1): self.alpha = alpha if type(inp) is str: if re.match(r'^#\d{3}$', inp): inp = '#' + inp[1] * 2 + inp[2] * 2 + inp[3] * 2 if re.match(r'^#\d{6}$', inp): se...
mit
1,282,436,452,587,701,200
31.509804
86
0.473462
false
petrk94/Bytebot
plugins/weather.py
1
1832
#!/usr/bin/env python2 # -*- coding: utf-8 -*- from time import time from plugins.plugin import Plugin from bytebot_config import BYTEBOT_PLUGIN_CONFIG import requests class weather(Plugin): """ The weather function read the current temperature of the city Erfurt. It is necessary to register to get an A...
mit
-601,392,227,284,431,400
28.532258
77
0.51775
false
rsj217/tongdao
app/libs/router.py
1
1736
#!/usr/bin/env python # -*- coding:utf-8 -*- # # The route helpers were originally written by # # Jeremy Kelley (http://github.com/nod). import tornado.web class Route(object): """ decorates RequestHandlers and builds up a list of routables handlers Tech Notes (or 'What the *@# is really happening here...
mit
7,487,647,330,691,189,000
28.931034
101
0.634793
false
vivek8943/GeoTweetSearch
api/web/twitter_instance.py
1
17775
import json import logging from threading import RLock import time from api.caching.instance_codes import consumeCode, unconsumeCode from api.caching.instance_lifetime import removeInstance, addInstance, setInstanceTemporalSourceLastTime from api.caching.temporal_analytics import getTemporalInfluenceCollection, addTemp...
apache-2.0
1,512,580,514,915,106,800
40.7277
168
0.659241
false
guildai/guild
examples/iris-svm/plot_iris_exercise.py
1
1702
""" A tutorial exercise for using different SVM kernels. Adapted from: https://scikit-learn.org/stable/auto_examples/exercises/plot_iris_exercise.html """ import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from sklearn import datasets, svm kernel = 'linear' # choice of line...
apache-2.0
-7,042,708,352,236,452,000
22
79
0.63396
false
tigerking/pyvision
src/pyvision/types/Perspective.py
1
10434
# PyVision License # # Copyright (c) 2006-2008 David S. Bolme # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, thi...
bsd-3-clause
-4,219,870,404,864,798,700
32.986971
104
0.626222
false
suutari-ai/shoop
shuup/core/models/_currencies.py
3
2858
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals import decimal import ba...
agpl-3.0
-5,743,874,669,232,669,000
33.853659
118
0.620014
false
PUM-9/mickwald_client
scripts/mickClient.py
1
1457
#!/usr/bin/env python import rospy from chat_server.msg import Message import sys def select_mode(): mode = sys.argv[sys.argv.__len__()-1] if mode == 'read': read_client() if mode == 'send': run_client() if mode != 'read': if mode != 'send': print("Usage: use \"rea...
gpl-3.0
-6,251,699,994,255,307,000
25.490909
86
0.571723
false
Bachmann1234/diff-cover
diff_cover/report_generator.py
1
11385
""" Classes for generating diff coverage reports. """ from __future__ import unicode_literals from abc import ABCMeta, abstractmethod from jinja2 import Environment, PackageLoader from jinja2_pluralize import pluralize_dj from diff_cover.snippets import Snippet import six class DiffViolations(object): """ Cla...
apache-2.0
8,383,550,399,648,663,000
30.191781
95
0.587
false
dcherian/pyroms
examples/Beaufort/make_weight_files.py
1
1429
import pyroms # Part of Arctic2 grid containing the Beaufort irange=(420,580) jrange=(470,570) #irange=None #jrange=None srcgrd = pyroms.grid.get_ROMS_grid('ARCTIC2') dstgrd = pyroms.grid.get_ROMS_grid('BEAUFORT') pyroms.remapping.make_remap_grid_file(srcgrd,irange=irange,jrange=jrange) pyroms.remapping.make_remap_g...
bsd-3-clause
-3,818,889,346,827,392,000
37.621622
99
0.662701
false
google-research/federated
utils/models/resnet_models.py
1
11325
# Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
7,382,932,942,000,230,000
29.119681
80
0.6083
false
astrorafael/ema
ema/dev/todtimer.py
1
7813
# ---------------------------------------------------------------------- # Copyright (c) 2014 Rafael Gonzalez. # # 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...
mit
850,098,103,163,987,100
31.827731
112
0.622936
false
catkin/xylem
setup.py
1
3476
#!/usr/bin/env python from setuptools import setup, find_packages # TODO: read README and LICENSE files to compose "long description" # # This might be useful: # http://stackoverflow.com/questions/1192632/how-to-convert-restructuredtext-to-plain-text # http://www.jeffknupp.com/blog/2013/08/16/open-sourcing-a-python-p...
apache-2.0
1,582,719,489,883,545,600
38.05618
90
0.613061
false
SlicerRt/SlicerDebuggingTools
PyDevRemoteDebug/ptvsd-4.1.3/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_console.py
1
9547
'''An helper file for the pydev debugger (REPL) console ''' import sys import traceback from code import InteractiveConsole from _pydev_bundle import _pydev_completer from _pydev_bundle.pydev_console_utils import BaseInterpreterInterface, BaseStdIn from _pydev_bundle.pydev_imports import Exec from _pydev_bund...
bsd-3-clause
6,231,292,679,407,175,000
35.735178
120
0.567299
false
mcedit/mcedit
drawable.py
1
1360
""" ${NAME} """ from __future__ import absolute_import, division, print_function, unicode_literals import logging log = logging.getLogger(__name__) from OpenGL import GL class Drawable(object): def __init__(self): super(Drawable, self).__init__() self._displayList = None self.invalidL...
isc
-3,960,994,668,484,728,000
20.935484
82
0.552941
false
bdastur/notes
python/asyncio/future_1.py
1
2115
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' https://pymotw.com/3/asyncio/futures.html ''' import asyncio import time import functools #import gc #gc.set_debug(gc.DEBUG_STATS) def mark_done(future, result): print("Setting future result to ", result) future.set_result(result) async def work_one(future...
apache-2.0
-2,974,231,611,736,339,000
26.467532
76
0.621277
false
jumpstarter-io/horizon
openstack_dashboard/test/api_tests/cinder_tests.py
1
7570
# Copyright 2012 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
apache-2.0
-8,110,810,110,104,336,000
40.593407
78
0.671334
false
MarkusH/django-osm-field
example/example/views.py
1
1290
from django.urls import reverse from django.views.generic import ( CreateView, DeleteView, DetailView, ListView, UpdateView, ) from .models import ExampleModel class ExampleCreateView(CreateView): fields = [ "location", "location_lat", "location_lon", "another"...
mit
-6,783,156,971,044,450,000
17.428571
63
0.63876
false
ldieselUT/Kruus-robtech
install/_setup_util.py
1
12413
#!/usr/bin/python # -*- coding: utf-8 -*- # Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistrib...
mit
-4,014,986,708,254,159,400
41.656357
213
0.655764
false
dipanjanS/text-analytics-with-python
Old-First-Edition/Ch06_Text_Similarity_and_Clustering/utils.py
1
1097
# -*- coding: utf-8 -*- """ Created on Sun Sep 11 23:06:06 2016 @author: DIP """ from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer def build_feature_matrix(documents, feature_type='frequency', ngram_range=(1, 1), min_df=0.0, max_df=1.0): feature_type = featur...
apache-2.0
3,488,268,610,334,958,600
36.862069
102
0.601641
false
jmesmon/trifles
2011s_lab2/gen_spice2.py
1
4333
#! /usr/bin/env python act2_spice = """\ * Lab 1, Act 2, BJT {bjt}, Part {part}, Plot Num {qn} Vs Vi1 0 {wave} Vcc Vi2 0 DC 5 RC1 Vi2 Vo1 {rc} RB1 Vi1 Vb {rb} Q1 Vo1 Vb 0 {bjt} {extra} * Model for 2N3904 NPN BJT (from Eval library in Pspice) .model 2N3904 NPN(Is=6.734f Xti=3 Eg=1.11 Vaf=74.03 Bf=416.4 Ne...
gpl-3.0
8,072,626,812,433,768,000
26.251572
76
0.426956
false
bardes/sonitus
tools/tone_gen.py
1
1271
#!/usr/bin/env python from sys import argv, stderr usage = \ """ Usage: {program} <sample rate> <A4 freq.> [octaves=8] e.g.: {program} 64000 442.0 5 """.format(program=argv[0]) if len(argv) < 3 or len(argv) > 4 : print(usage, file = stderr) exit(1) A4 = 0 sample_rate = 0 octaves = 8 try: A4 = float(argv...
mit
7,935,027,801,271,016,000
22.981132
76
0.585366
false
cihai/cihai
cihai/exc.py
1
2127
"""Exceptions raised from the Cihai library.""" class CihaiException(Exception): """Base Cihai Exception class.""" class ImportStringError(ImportError, CihaiException): """ Provides information about a failed :func:`import_string` attempt. Notes ----- This is from werkzeug.utils c769200 on ...
mit
5,505,620,915,528,148,000
29.826087
75
0.520451
false
centrofermi/e3pipe
tracking/E3FittingTool2dUnweighted.py
1
2330
#!/usr/bin/env python # ********************************************************************* # * Copyright (C) 2015 Luca Baldini (luca.baldini@pi.infn.it) * # * * # * For the license terms see the file LICENSE, distributed * # * along ...
gpl-3.0
-3,082,154,406,652,267,000
36.580645
76
0.530472
false
lmregus/Portfolio
python/design_patterns/env/lib/python3.7/site-packages/sphinx/util/i18n.py
1
10576
""" sphinx.util.i18n ~~~~~~~~~~~~~~~~ Builder superclass for all builders. :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import gettext import os import re import warnings from collections import namedtuple from datetime import datetim...
mit
-8,594,470,671,615,113,000
36.052632
91
0.59697
false
ojengwa/sympy
sympy/logic/boolalg.py
2
41626
""" Boolean algebra module for SymPy """ from __future__ import print_function, division from collections import defaultdict from itertools import product, islice from sympy.core.basic import Basic from sympy.core.cache import cacheit from sympy.core.numbers import Number from sympy.core.decorators import deprecated ...
bsd-3-clause
4,697,731,169,025,037,000
27.012113
79
0.568707
false
dvhbru/dvhb-hybrid
dvhb_hybrid/mailer/django.py
1
2561
import base64 from concurrent.futures import ThreadPoolExecutor from django.core import mail from . import base class DjangoConnection(base.BaseConnection): def __init__(self, loop, conf, **kwargs): super().__init__(**kwargs) self.loop = loop self.executor = ThreadPoolExecutor(max_worker...
mit
-2,037,320,954,963,782,400
34.569444
71
0.522843
false
vthorsteinsson/tensor2tensor
tensor2tensor/models/research/transformer_aux.py
1
5657
# coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
apache-2.0
1,745,558,954,910,225,200
31.511494
79
0.671027
false
GGFHF/NGScloud
Package/gdialogs.py
1
44030
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #------------------------------------------------------------------------------- ''' This software has been developed by: GI Genética, Fisiología e Historia Forestal Dpto. Sistemas y Recursos Naturales ETSI Montes, Forestal y del Medio Natural Universida...
gpl-3.0
6,362,230,730,517,971,000
36.62735
350
0.57714
false
Iconik/eve-suite
src/model/static/map/constellation.py
1
1590
from model.flyweight import Flyweight from model.static.database import database class Constellation(Flyweight): def __init__(self, constellation_id): #prevents reinitializing if "_inited" in self.__dict__: return self._inited = None #prevents reinitializing sel...
gpl-3.0
1,197,304,585,575,209,200
30.8
79
0.577358
false