repo_name
stringlengths
5
100
path
stringlengths
4
299
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1.03M
license
stringclasses
15 values
hash
int64
-9,223,351,895,964,839,000
9,223,297,778B
line_mean
float64
3.17
100
line_max
int64
7
1k
alpha_frac
float64
0.25
0.98
autogenerated
bool
1 class
AutorestCI/azure-sdk-for-python
azure-mgmt-media/azure/mgmt/media/models/regenerate_key_input.py
5
1061
# 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
-6,920,071,918,550,743,000
32.15625
77
0.580584
false
infilect/ml-course1
deep-learning-keras/keras-scripts/imdb_lstm.py
4
1879
'''Trains an LSTM model on the IMDB sentiment classification task. The dataset is actually too small for LSTM to be of any advantage compared to simpler, much faster methods such as TF-IDF + LogReg. # Notes - RNNs are tricky. Choice of batch size is important, choice of loss and optimizer is critical, etc. Some conf...
mit
649,705,111,399,673,500
31.964912
94
0.716871
false
prashantbh/kafka
tests/kafkatest/services/kafka/config_property.py
13
9454
# 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 ...
apache-2.0
5,579,875,960,285,273,000
52.412429
102
0.785276
false
nikolay-fedotov/tempest
tempest/api/orchestration/stacks/test_resource_types.py
9
1907
# 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 # d...
apache-2.0
-224,897,668,363,859,550
42.363636
78
0.67226
false
kawamon/hue
desktop/core/ext-py/boto-2.46.1/boto/cloudformation/stack.py
32
14230
from datetime import datetime from boto.resultset import ResultSet class Stack(object): def __init__(self, connection=None): self.connection = connection self.creation_time = None self.description = None self.disable_rollback = None self.notification_arns = [] self...
apache-2.0
-7,131,283,241,473,819,000
32.640662
86
0.571047
false
cpitclaudel/company-coq
etc/find-missing-tactics.py
4
1507
import subprocess import re TACTIC = re.compile(r'\| IDENT "([^"]+)"') FIRST_WORD = re.compile("^[a-zA-Z_]*") UNDOCUMENTED = set(("autounfold_one", "autounfoldify", "casetype", "convert_concl_no_check", "exact_no_check", "fauto", "finduction", "fold_match", "fold_matches", "implify", "ipattern", "is_fix", "is_ground"...
gpl-3.0
6,816,290,856,527,489,000
50.965517
343
0.675514
false
namanjain236/personfinder
tools/babel/util.py
61
10411
# -*- coding: utf-8 -*- # # Copyright (C) 2007 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://babel.edgewall.org/wiki/License. # # This software consists of v...
apache-2.0
-5,452,820,674,669,644,000
27.137838
79
0.573336
false
dturner-tw/pants
src/python/pants/backend/graph_info/tasks/list_owners.py
2
1221
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.base.exce...
apache-2.0
-3,135,101,541,443,977,000
33.885714
96
0.719902
false
ABaldwinHunter/django-clone-classic
tests/template_tests/tests.py
7
5075
# -*- coding: utf-8 -*- from __future__ import unicode_literals import sys from django.contrib.auth.models import Group from django.template import Context, Engine, TemplateSyntaxError from django.template.base import UNKNOWN_SOURCE from django.test import SimpleTestCase, override_settings from django.urls import NoR...
bsd-3-clause
6,495,954,376,303,050,000
34.683099
90
0.585554
false
tdautc19841202/wechatpy
wechatpy/client/api/semantic.py
7
1772
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from optionaldict import optionaldict from wechatpy.client.api.base import BaseWeChatAPI class WeChatSemantic(BaseWeChatAPI): def search(self, query, category, uid=None, l...
mit
-8,640,124,292,685,211,000
29.468085
76
0.571229
false
COCS4950G7/COSC4950
Source/Network/GUI_WXPythonExamples/GUI_FocusEvent.py
1
1980
__author__ = 'Chris Hamm' #GUI_FocusEvent #the focus indicates the currently selected widgets in application. #The text entered from the keyboard or pasted from the clipboard is sent to the widget, which has focus #wx.EVT_SET_FOCUS which is generated when a widget recives focus #wx.EVT_KILL_FOCUS is generated when the...
gpl-3.0
-9,159,968,910,904,013,000
26.901408
111
0.601515
false
rolando-contrib/scrapy
tests/test_selector.py
16
8970
import warnings import weakref from twisted.trial import unittest from scrapy.http import TextResponse, HtmlResponse, XmlResponse from scrapy.selector import Selector from scrapy.selector.lxmlsel import XmlXPathSelector, HtmlXPathSelector, XPathSelector from lxml import etree class SelectorTestCase(unittest.TestCase)...
bsd-3-clause
4,693,955,435,050,447,000
41.511848
130
0.581828
false
swegener/micropython
tests/extmod/uctypes_sizeof.py
10
1251
try: import uctypes except ImportError: print("SKIP") raise SystemExit desc = { # arr is array at offset 0, of UINT8 elements, array size is 2 "arr": (uctypes.ARRAY | 0, uctypes.UINT8 | 2), # arr2 is array at offset 0, size 2, of structures defined recursively "arr2": (uctypes.ARRAY | 0, 2,...
mit
2,361,576,658,775,791,600
25.617021
86
0.642686
false
JensTimmerman/radical.pilot
src/radical/pilot/db/database.py
1
28615
#pylint: disable=C0301, C0103, W0212 """ .. module:: radical.pilot.database :platform: Unix :synopsis: Database functions. .. moduleauthor:: Ole Weidner <ole.weidner@rutgers.edu> """ __copyright__ = "Copyright 2013-2014, http://radical.rutgers.edu" __license__ = "MIT" import os import saga import datetime im...
mit
-2,865,921,344,388,207,000
32.546307
100
0.453329
false
maxwward/SCOPEBak
askbot/migrations/0039_populate_tag_filter_strategies.py
2
27664
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models from askbot import const class Migration(DataMigration): def forwards(self, orm): """populate email and display filter strategies""" for user in orm['auth.User'].objects.all():...
gpl-3.0
-4,055,692,490,258,369,500
82.075075
185
0.557909
false
grandmasterchef/WhatManager2
WhatManager2/settings.example.py
1
9362
import os import djcelery djcelery.setup_loader() WHAT_USER_ID = 123456 WHAT_USERNAME = 'your what.cd username' WHAT_PASSWORD = 'your what.cd password' # How frequently your profile will be stored, in seconds WHAT_PROFILE_SNAPSHOT_INTERVAL = 10 * 60 # What part of your disk is guaranteed left empty by WM MIN_FREE_D...
mit
-1,908,932,392,732,087,800
33.546125
99
0.711173
false
jrydberg/moto
tests/test_ec2/test_internet_gateways.py
19
7539
from __future__ import unicode_literals # Ensure 'assert_raises' context manager support for Python 2.6 import tests.backport_assert_raises from nose.tools import assert_raises import re import boto from boto.exception import EC2ResponseError import sure # noqa from moto import mock_ec2 VPC_CIDR="10.0.0.0/16" BA...
apache-2.0
660,586,028,355,534,800
32.959459
86
0.689216
false
arborh/tensorflow
tensorflow/python/feature_column/utils.py
30
6134
# Copyright 2019 The TensorFlow 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 required by applica...
apache-2.0
-4,958,732,391,228,748,000
38.831169
80
0.682263
false
hasgeek/lastuser
lastuserapp/__init__.py
1
3065
# -*- coding: utf-8 -*- from flask import Flask from flask_migrate import Migrate from baseframe import Version, assets, baseframe import coaster.app from ._version import __version__ import lastuser_core # isort:skip import lastuser_oauth # isort:skip import lastuser_ui # isort:skip from lastuser_core import lo...
bsd-2-clause
-6,568,382,015,279,695,000
32.681319
84
0.676672
false
plotly/plotly.py
packages/python/plotly/plotly/io/_utils.py
1
1472
from __future__ import absolute_import import plotly import plotly.graph_objs as go from plotly.offline import get_plotlyjs_version def validate_coerce_fig_to_dict(fig, validate): from plotly.basedatatypes import BaseFigure if isinstance(fig, BaseFigure): fig_dict = fig.to_dict() elif isinstance...
mit
-6,869,936,403,315,884,000
28.44
81
0.613451
false
WASPACDC/hmdsm.repository
plugin.program.addon_activador-1.0.0/activador.py
3
1296
#!/usr/bin/python # -*- coding: utf-8 -*- import xbmc, xbmcgui, os from sqlite3 import dbapi2 as db_lib conn =db_lib.connect(os.path.join(xbmc.translatePath('special://profile/Database'),'Addons27.db')) conn.text_factory = str def get_kodi_version(): try: return float(xbmc.getInfoLabel('System.BuildVersion')...
gpl-2.0
5,846,601,725,793,439,000
27.173913
166
0.659459
false
pombreda/formalchemy
formalchemy/helpers.py
2
6308
""" A small module to wrap WebHelpers in FormAlchemy. """ from webhelpers.html.tags import text from webhelpers.html.tags import hidden from webhelpers.html.tags import password from webhelpers.html.tags import textarea from webhelpers.html.tags import checkbox from webhelpers.html.tags import radio from webhelpers.htm...
mit
-129,308,596,076,430,930
28.339535
103
0.613348
false
NeCTAR-RC/external_naginator
external_naginator/__init__.py
1
28225
""" Generate all the nagios configuration files based on puppetdb information. """ import os import sys import grp import pdb import stat import logging import configparser import filecmp import shutil import tempfile import subprocess import traceback from os import path from io import StringIO from collections import...
mit
1,099,402,090,502,372,200
35.466408
79
0.53357
false
shouldmakemusic/yaas
controller/DeviceController.py
1
11127
# Copyright (C) 2015 Manuel Hirschauer (manuel@hirschauer.net) # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version...
gpl-2.0
-8,390,716,330,668,589,000
37.368966
138
0.681495
false
hoodie/libavg
src/python/app/settings.py
2
8384
#!/usr/bin/env python # -*- coding: utf-8 -*- # libavg - Media Playback Engine. # Copyright (C) 2003-2014 Ulrich von Zadow # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # vers...
lgpl-2.1
-5,335,792,898,479,195,000
28.730496
90
0.579914
false
blaze225/zulip
zerver/webhooks/stash/tests.py
26
1101
# -*- coding: utf-8 -*- from typing import Text from zerver.lib.test_classes import WebhookTestCase class StashHookTests(WebhookTestCase): STREAM_NAME = 'stash' URL_TEMPLATE = u"/api/v1/external/stash?stream={stream}" def test_stash_message(self): # type: () -> None """ Messages ar...
apache-2.0
-2,553,588,233,211,449,300
39.777778
110
0.608538
false
h1ds/h1ds
h1ds/h1ds_summary/migrations/0010_auto__del_field_summaryattribute_source__add_field_summaryattribute_so.py
1
3957
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'SummaryAttribute.source' db.delete_column('h1ds_summary_summaryattribute', 'source') ...
mit
-2,852,872,805,563,367,400
55.528571
180
0.583523
false
coderjames/pascal
quex-0.63.1/quex/engine/state_machine/setup_pre_context.py
1
3271
# (C) Frank-Rene Schaefer # ABSOLUTELY NO WARRANTY import quex.engine.state_machine.algorithm.beautifier as beautifier import quex.engine.state_machine.algorithm.acceptance_pruning as acceptance_pruning from quex.blackboard import E_PreContextIDs, setup as Setup def...
bsd-2-clause
775,866,475,204,237,000
48.560606
114
0.633445
false
mjhoy/dotfiles
offlineimap.py
1
1082
#!/usr/bin/python import re, subprocess, os def get_password(path): return os.popen("pass %s" %(path)).read() def get_authinfo_password(machine, login, port): s = "machine %s login %s port %s password ([^\s]*)" % (machine, login, port) p = re.compile(s) authinfo = os.popen("gpg -q --no-tty -d ~/.authi...
mit
6,887,556,220,862,612,000
39.074074
113
0.608133
false
timpalpant/KaggleTSTextClassification
scripts/csv_to_npz.py
1
1146
#!/usr/bin/env python ''' Convert data to npz file for easy loading ''' import argparse from common import * def opts(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('train', help='Training data (csv)') parser.add_argument('train_labels', help='Training data l...
gpl-3.0
4,213,318,312,893,817,000
30.861111
69
0.593368
false
wangkangcheng/ccc
qap/functional_preproc.py
3
14228
def get_idx(in_files, stop_idx=None, start_idx=None): """ Method to get the first and the last volume for the functional run. It verifies the user specified first and last volume. If the values are not valid, it calculates and returns the very first and the last slice Parameters --...
bsd-3-clause
-8,111,842,691,503,999,000
26.680934
104
0.599733
false
balloob/home-assistant
homeassistant/components/lutron/cover.py
6
2050
"""Support for Lutron shades.""" import logging from homeassistant.components.cover import ( ATTR_POSITION, SUPPORT_CLOSE, SUPPORT_OPEN, SUPPORT_SET_POSITION, CoverEntity, ) from . import LUTRON_CONTROLLER, LUTRON_DEVICES, LutronDevice _LOGGER = logging.getLogger(__name__) def setup_platform(ha...
apache-2.0
-1,934,956,601,237,655,600
28.710145
83
0.636585
false
jruiperezv/ANALYSE
common/djangoapps/embargo/tests/test_middleware.py
12
15449
""" Tests for EmbargoMiddleware """ import mock import pygeoip import unittest from django.core.urlresolvers import reverse from django.conf import settings from django.db import connection, transaction from django.test.utils import override_settings import ddt from student.models import CourseEnrollment from studen...
agpl-3.0
6,012,280,184,676,277,000
44.979167
153
0.653246
false
paulocsanz/graphs.c
tsp/unused/tsp.py
1
2205
from itertools import combinations from math import sqrt from sys import float_info from time import time class Graph: def __init__(self, vertices): self.vertex_map = {} self.vertex_list = [] self.vertices = vertices self.path = [] def distance(self, first, second): if ...
agpl-3.0
-991,842,888,075,741,600
30.056338
78
0.545578
false
google-code-export/photivo
mm extern photivo.py
7
4118
#!/usr/bin/env python ''' mm extern photivo.py Passes an image to Photivo Author: Michael Munzert (mike photivo org) Bernd Schoeler (brother.john photivo org) Version: 2011.08.28 Brother John: Adjust Photivo cli 2011.01.29 Brother John: Ask user for photivo.exe and store in gimprc 2011.01.27 Brother Joh...
gpl-3.0
8,150,004,020,216,476,000
33.196581
94
0.635503
false
dorant/home-assistant
homeassistant/components/device_tracker/nmap_tracker.py
6
4567
""" homeassistant.components.device_tracker.nmap ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Device tracker platform that supports scanning a network with nmap. Configuration: To use the nmap tracker you will need to add something like the following to your configuration.yaml file. device_tracker: platform: nmap_...
mit
-638,606,654,089,353,200
29.446667
78
0.622947
false
robbi/pyload
module/plugins/hoster/MegaCoNz.py
5
15848
# -*- coding: utf-8 -*- import base64 import os import random import re import struct import Crypto.Cipher.AES import Crypto.Util.Counter from module.network.HTTPRequest import BadHeader from ..internal.Hoster import Hoster from ..internal.misc import decode, encode, exists, fsjoin, json ##########################...
gpl-3.0
-735,684,338,417,736,400
34.936508
224
0.549849
false
thast/EOSC513
DC/SparseGN/Identity_withoutW/Id_withoutW.py
1
7654
from SimPEG import Mesh, Regularization, Maps, Utils, EM from SimPEG.EM.Static import DC import numpy as np import matplotlib.pyplot as plt #%matplotlib inline import copy import pandas as pd from scipy.sparse import csr_matrix, spdiags, dia_matrix,diags from scipy.sparse.linalg import spsolve from scipy.stats import...
mit
-6,036,011,230,578,902,000
29.742972
110
0.629736
false
mezz64/home-assistant
tests/components/speedtestdotnet/test_init.py
7
2310
"""Tests for SpeedTest integration.""" import speedtest from homeassistant import config_entries from homeassistant.components import speedtestdotnet from homeassistant.setup import async_setup_component from tests.async_mock import patch from tests.common import MockConfigEntry async def test_setup_with_config(has...
apache-2.0
4,729,427,388,357,643,000
28.615385
82
0.689177
false
erwilan/ansible
lib/ansible/modules/cloud/amazon/efs_facts.py
31
11554
#!/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
-5,584,986,281,401,199,000
29.405263
156
0.595638
false
Dramac/TriViSiJu
modules/__init__.py
1
1074
# To get sub-modules """ TriViSiJu: Graphical interface for the AstroJeune Festival Copyright (C) 2012 Jules DAVID, Tristan GREGOIRE, Simon NICOLAS and Vincent PRAT This file is part of TriViSiJu. TriViSiJu is free software: you can redistribute it and/or modify it under the terms of the GNU General Publ...
gpl-3.0
7,324,211,841,122,520,000
33.645161
82
0.758845
false
airportmarc/the416life
src/apps/users/forms.py
1
3834
""" This is to supply the new singup page over AllAuths default pages """ from django import forms from django.forms.widgets import CheckboxInput from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Submit, HTML, Field, Button, Div from django.conf import settings from django.contrib.auth...
mit
7,812,487,095,638,604,000
37.727273
145
0.60746
false
JGulbronson/rmc
kittens/add_from_flickr.py
8
3011
#!/usr/bin/env python from StringIO import StringIO import os import re import sys import requests from PIL import Image import rmc.kittens.data as kitten_data import rmc.shared.constants as c import rmc.shared.secrets as s def get_photo_info_from_flickr(photo_id): print >>sys.stderr, 'Getting information about...
mit
546,238,919,285,766,660
31.728261
78
0.610096
false
reimandlab/Visualistion-Framework-for-Genome-Mutations
website/tests/test_imports/test_kinase.py
2
2076
from imports.protein_data import kinase_mappings as load_kinase_mappings from database_testing import DatabaseTest from miscellaneous import make_named_temp_file from database import db from models import Kinase, Protein, Gene # head data/curated_kinase_IDs.txt curated_kinases_list = """\ LCK LCK SRC SRC FYN FYN ABL ...
lgpl-2.1
-5,855,577,757,118,663,000
30.454545
90
0.610308
false
Joergen/zamboni
settings_test.py
1
3729
import atexit import tempfile from django.utils.functional import lazy _tmpdirs = set() def _cleanup(): try: import sys import shutil except ImportError: return tmp = None try: for tmp in _tmpdirs: shutil.rmtree(tmp) except Exception, exc: sys...
bsd-3-clause
7,081,259,407,107,484,000
25.446809
79
0.654867
false
Panda3D-google-code-repositories/naith
game/bin/manager.py
1
7278
# -*- coding: utf-8 -*- # Copyright Tom SF Haines # # 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...
apache-2.0
-8,112,825,600,628,867,000
36.709845
283
0.658285
false
flavour/ssf
controllers/patient.py
3
4894
# -*- coding: utf-8 -*- """ Patient Tracking """ module = request.controller if module not in deployment_settings.modules: raise HTTP(404, body="Module disabled: %s" % module) # ----------------------------------------------------------------------------- def index(): "Module's Home Page" module_na...
mit
5,781,058,041,843,743,000
30.779221
203
0.469146
false
WASPACDC/hmdsm.repository
plugin.video.quasar/resources/site-packages/quasar/osarch.py
4
1667
import xbmc import sys import platform def get_platform(): build = xbmc.getInfoLabel("System.BuildVersion") kodi_version = int(build.split()[0][:2]) ret = { "arch": sys.maxsize > 2 ** 32 and "x64" or "x86", "os": "", "version": platform.release(), "kodi": kodi_version, ...
gpl-2.0
1,493,729,428,259,158,800
33.729167
75
0.55009
false
ediardo/folsom
common/database_handler.py
1
2119
from models.house_record import HouseRecord from models.user import User from models.result import Result from models.base import Base from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker class DatabaseHandler(): def __init__(self, connection_string): # self.engine = create_engine(...
apache-2.0
-113,806,223,733,194,240
32.634921
83
0.629542
false
pastewka/lammps
tools/amber2lmp/amber2lammps.py
8
35867
#! /usr/bin/evn python2 # This is amber2lammps, a program written by Keir E. Novik to convert # Amber files to Lammps files. # # Copyright 1999, 2000 Keir E. Novik; all rights reserved. # # Modified by Vikas Varshney, U Akron, 5 July 2005, as described in README # Bug Fixed :Third argument in Dihedral Coeffs section ...
gpl-2.0
-8,097,712,517,030,925,000
34.582341
197
0.481139
false
soldag/home-assistant
homeassistant/components/rfxtrx/binary_sensor.py
11
7563
"""Support for RFXtrx binary sensors.""" import logging import RFXtrx as rfxtrxmod from homeassistant.components.binary_sensor import ( DEVICE_CLASS_MOTION, DEVICE_CLASS_SMOKE, BinarySensorEntity, ) from homeassistant.const import ( CONF_COMMAND_OFF, CONF_COMMAND_ON, CONF_DEVICE_CLASS, CON...
apache-2.0
3,038,740,157,943,357,000
27.539623
82
0.578871
false
SoteriousIdaofevil/xmlstar
src/libxml2-2.9.1.tar/libxml2-2.9.1/python/generator.py
13
48766
#!/usr/bin/python -u # # generate python wrappers from the XML API description # functions = {} enums = {} # { enumType: { enumConstant: enumValue } } import os import sys import string if __name__ == "__main__": # launched as a script srcPref = os.path.dirname(sys.argv[0]) else: # imported srcPref =...
mit
1,028,407,188,964,338,600
38.711726
120
0.487635
false
metacloud/python-cinderclient
cinderclient/auth_plugin.py
8
4568
# Copyright 2013 OpenStack Foundation # Copyright 2013 Spanish National Research Council. # 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://ww...
apache-2.0
4,118,304,488,959,902,700
30.944056
78
0.658494
false
sbstp/streamlink
src/streamlink_cli/utils/player.py
23
1244
import os import sys from ..compat import shlex_quote def check_paths(exes, paths): for path in paths: for exe in exes: path = os.path.expanduser(os.path.join(path, exe)) if os.path.isfile(path): return path def find_default_player(): if "darwin" in sys.platf...
bsd-2-clause
-293,428,143,168,114,900
30.897436
75
0.561897
false
akhmadMizkat/odoo
addons/hr_holidays/hr_holidays.py
1
39047
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (c) 2005-2006 Axelor SARL. (http://www.axelor.com) import calendar import datetime from datetime import date import logging import math import time from operator import attrgetter from werkzeug import url_e...
gpl-3.0
-563,360,036,962,107,300
57.629129
568
0.602249
false
tbeadle/selenium
py/test/selenium/webdriver/common/utils.py
41
1041
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
-6,418,838,208,798,828,000
39.038462
62
0.7195
false
raccoongang/edx-platform
lms/djangoapps/courseware/access_response.py
2
4961
""" This file contains all the classes used by has_access for error handling """ from django.utils.translation import ugettext as _ from xmodule.course_metadata_utils import DEFAULT_START_DATE class AccessResponse(object): """Class that represents a response from a has_access permission check.""" def __init...
agpl-3.0
-3,311,439,934,669,775,000
34.690647
106
0.626487
false
aaronboyle/trivial
pygame/faeriewaccor.py
1
7035
import pygame,sys,random from pygame.locals import * pygame.init() pygame.font.init() random.seed() ### Initialize constants screenResolution = (640,480) colorBlack = (0,0,0) colorWhite = (255,255,255) colorLtGrey = (190,190,190) colorDkGrey = (80,80,80) colorGreen = (0,255,0) colorRed = (255,0,0) colorBlue = (0,...
unlicense
5,505,095,088,313,380,000
16.413366
100
0.623312
false
BrainTech/openbci
obci/utils/tagger_gui/tag_frame.py
1
5016
#!/usr/bin/python # -*- coding: utf-8 -*- from PyQt4 import QtGui, QtCore from timer import Timer from button import Button from frame import Frame from player import Player import time class TagFrame(Frame): def __init__(self): super(TagFrame, self).__init__() def init_frame(self, status_bar, tag_s...
gpl-3.0
-4,335,205,495,966,599,700
32.225166
100
0.555024
false
okor/thumbor
tests/loaders/test_file_loader_http_fallback.py
7
1935
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com from mock import patch from os.path import abspath, join, dirname f...
mit
-5,391,886,534,609,443,000
27.455882
73
0.702326
false
jungle90/Openstack-Swift-I-O-throttler
test/unit/obj/test_reconstructor.py
8
105935
# Copyright (c) 2010-2012 OpenStack Foundation # # 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 agree...
apache-2.0
4,415,196,587,893,767,000
41.255684
79
0.49925
false
vincent-noel/libSigNetSim
libsignetsim/sedml/Task.py
1
3714
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014-2017 Vincent Noel (vincent.noel@butantan.gov.br) # # This file is part of libSigNetSim. # # libSigNetSim 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 Fou...
gpl-3.0
5,935,475,291,927,596,000
31.876106
102
0.772213
false
emresefer/Parana
util.py
1
4633
import networkx as nx import itertools def parseHomologyInfo( hfile ): ''' Parse the "Emre" format homology file. This returns a dictonary where the key, k, is an ancestral protein. The value is a 2-tuple of sets. The first set contains the homologs of k in G1 and the second set contains the...
apache-2.0
374,425,206,605,050,900
29.281046
118
0.548457
false
nkgilley/home-assistant
homeassistant/components/elgato/light.py
6
4764
"""Support for LED lights.""" from datetime import timedelta import logging from typing import Any, Callable, Dict, List, Optional from elgato import Elgato, ElgatoError, Info, State from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, SUPPORT_BRIGHTNESS, SUPPORT_COLOR_TEMP, ...
apache-2.0
-8,574,963,186,089,603,000
29.151899
105
0.619647
false
our-city-app/oca-backend
src/rogerthat/bizz/friends.py
1
83704
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium 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 appl...
apache-2.0
-2,872,275,547,037,006,000
47.949708
165
0.65562
false
mtils/ems
ems/qt4/itemmodel/merged.py
1
15814
''' Created on 01.08.2011 @author: michi ''' from PyQt4.QtCore import QModelIndex, Qt, pyqtSignal, QObject, QVariant from PyQt4.QtGui import QAbstractProxyModel from ems.qt4.itemmodel.reflectable_mixin import ReflectableMixin #@UnresolvedImport from ems.qt4.util import variant_to_pyobject class SignalTranslator(QOb...
mit
-7,199,127,218,735,544,000
39.548718
95
0.640255
false
deepsrijit1105/edx-platform
lms/djangoapps/courseware/tests/test_video_handlers.py
6
35856
# -*- coding: utf-8 -*- """Video xmodule tests in mongo.""" import os import freezegun import tempfile import textwrap import json import ddt from nose.plugins.attrib import attr from datetime import timedelta, datetime from webob import Request from mock import MagicMock, Mock, patch from xmodule.contentstore.conte...
agpl-3.0
6,408,480,736,475,752,000
38.004357
145
0.619617
false
robhudson/zamboni
mkt/downloads/views.py
5
1342
from django import http from django.shortcuts import get_object_or_404 import commonware.log import amo from access import acl from amo.utils import HttpResponseSendFile from files.models import File from mkt.webapps.models import Webapp log = commonware.log.getLogger('z.downloads') def download_file(request, file...
bsd-3-clause
-865,827,683,980,715,100
34.315789
78
0.653502
false
shaunaks/python-monasca
monasca/v2/elasticsearch/alarmdefinitions.py
1
14709
# Copyright 2015 Carnegie Mellon University # # Author: Shaunak Shatmanyu <shatmanyu@gmail.com> # # 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...
apache-2.0
-6,302,949,945,039,539,000
40.668555
78
0.518458
false
woutdenolf/spectrocrunch
spectrocrunch/visualization/id21_scanoverlap.py
1
7933
# -*- coding: utf-8 -*- from ..io.spec import spec import h5py import numpy as np import matplotlib.pyplot as plt from scipy import interpolate from ..math.utils import logscale import warnings def show( x, y, images, xp, yp, xlabel, ylabel, names, transpose=False, flipvert=Fa...
mit
-2,253,729,458,052,529,000
24.840391
84
0.499811
false
Southpaw-TACTIC/TACTIC
3rd_party/python3/site-packages/cherrypy-18.1.2/cherrypy/_cpnative_server.py
4
6677
"""Native adapter for serving CherryPy via its builtin server.""" import logging import sys import io import cheroot.server import cherrypy from cherrypy._cperror import format_exc, bare_error from cherrypy.lib import httputil from ._cpcompat import tonative class NativeGateway(cheroot.server.Gateway): """Nati...
epl-1.0
3,932,335,958,504,604,000
38.744048
78
0.510708
false
carroarmato0/jenkins-job-builder
tests/cmd/subcommands/test_update.py
13
4433
# Joint copyright: # - Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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 req...
apache-2.0
232,580,272,836,688,420
42.891089
78
0.607715
false
tongpo/Holle-World
py/python3-cookbook/cookbook/c04/p04_iterator_protocol.py
1
2195
#!/usr/bin/env python # -*- encoding: utf-8 -*- """ Topic: 自定义迭代器协议 Desc : """ class Node: def __init__(self, value): self._value = value self._children = [] def __repr__(self): return 'Node({!r})'.format(self._value) def add_child(self, node): self._children.append(node...
gpl-2.0
4,999,741,213,663,535,000
22.684783
72
0.548876
false
DirkHoffmann/indico
indico/modules/events/reviewing_questions_fields.py
4
2523
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from wtforms.fields import BooleanField from wtforms.validators import InputRequired from indico.modules....
gpl-3.0
1,532,861,685,992,132,900
34.535211
115
0.732461
false
Darthkpo/xtt
openpyxl/descriptors/tests/test_excel.py
1
2799
from __future__ import absolute_import import pytest from .. import Strict @pytest.fixture def UniversalMeasure(): from ..excel import UniversalMeasure class Dummy(Strict): value = UniversalMeasure() return Dummy() class TestUniversalMeasure: @pytest.mark.parametrize("value", ...
mit
-9,000,623,897,279,098,000
22.521008
77
0.544837
false
drix00/xray_spectrum_analyzer
python/xrayspectrumanalyzer/tools/FitPolynomialFunction.py
1
5364
#!/usr/bin/env python """ .. py:currentmodule:: ProbeBroadening3D.fit.FitPolynomialFunction .. moduleauthor:: Hendrix Demers <hendrix.demers@mail.mcgill.ca> description """ ############################################################################### # Copyright 2016 Hendrix Demers # # Licensed under the Apache Lic...
apache-2.0
6,428,750,328,526,998,000
25.423645
88
0.557233
false
zhongzho/starter-python-bot
bot/eliza2.py
1
7086
# # Copyright (C) 2001-2012 NLTK Project # Authors: Steven Bird <sb@csse.unimelb.edu.au> # Edward Loper <edloper@gradient.cis.upenn.edu> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT # Based on an Eliza implementation by Joe Strout <joe@strout.net>, # Jeff Epler <jepler@inetnebr.com...
mit
25,046,015,231,620,012
28.280992
83
0.5779
false
arummler/eudaq
legacy/etc/logtools/MagicLogBookToGoogleSpreadsheet.py
14
2708
#!/usr/bin/python # Authors Mathieu Benoit (mbenoit@CERN.CH) # Samir Arfaoui (sarfaoui@CERN.ch) import time #You need to have the gdata (google docs) libraries in your PYTHONPATH import gdata.spreadsheet.service import getpass import os import subprocess #UGLY HACK, adding check_output for python version l...
lgpl-3.0
7,582,569,043,515,473,000
29.772727
111
0.702733
false
jcoady9/youtube-dl
youtube_dl/extractor/hearthisat.py
23
5242
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_urlparse from ..utils import ( HEADRequest, KNOWN_EXTENSIONS, sanitized_Request, str_to_int, urlencode_postdata, urlhandle_detect_ext, ) class HearThisAtIE(InfoExtr...
unlicense
-3,868,348,171,557,122,600
37.82963
134
0.523846
false
pnedunuri/scipy
scipy/stats/_distn_infrastructure.py
15
113133
# # Author: Travis Oliphant 2002-2011 with contributions from # SciPy Developers 2004-2011 # from __future__ import division, print_function, absolute_import from scipy._lib.six import string_types, exec_ import sys import keyword import re import inspect import types import warnings from scipy.misc impor...
bsd-3-clause
5,672,481,910,288,009,000
33.397385
103
0.547515
false
rukku/inasafe
realtime/test_sftp_client.py
3
1487
""" InaSAFE Disaster risk assessment tool developed by AusAid and World Bank - **Ftp Client Test Cases.** Contact : ole.moller.nielsen@gmail.com .. note:: 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 Softwa...
gpl-3.0
-6,185,071,771,989,733,000
31.326087
78
0.661063
false
hydroffice/hyo_ssp
hydroffice/ssp/io/udpio.py
1
3813
from __future__ import absolute_import, division, print_function, unicode_literals import logging import socket import threading from abc import ABCMeta log = logging.getLogger(__name__) from .base_io import BaseIo class UdpIO(BaseIo): __metaclass__ = ABCMeta @classmethod def replace_non_ascii_byte(c...
lgpl-3.0
8,809,588,958,966,625,000
28.10687
110
0.579072
false
levelrf/level_basestation
grc/python/FlowGraph.py
1
5095
""" Copyright 2008-2011 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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-3.0
6,510,629,608,634,344,000
28.114286
97
0.674975
false
plq/spyne
examples/django/rpctest/core/models.py
2
2571
# coding: utf-8 """Rpc test models.""" from django.core.validators import MinLengthValidator, MaxLengthValidator from django.db import models class FieldContainer(models.Model): """Test model for ``DjangoMapper``.""" char_field = models.CharField(max_length=32, default='test') char_field_nullable = mo...
lgpl-2.1
1,756,771,281,544,145,400
37.954545
80
0.669778
false
openqt/algorithms
leetcode/python/ac/lc438-find-all-anagrams-in-a-string.py
1
2271
# coding=utf-8 import unittest """438. Find All Anagrams in a String https://leetcode.com/problems/find-all-anagrams-in-a-string/description/ Given a string **s** and a **non-empty** string **p** , find all the start indices of **p** 's anagrams in **s**. Strings consists of lowercase English letters only and the le...
gpl-3.0
5,922,783,463,375,500,000
23.684783
78
0.521797
false
oaubert/advene
lib/advene/plugins/hpi_motion_dynamics.py
1
8797
# Motion Dynamics Extractor plugin - estimate perceived motion changes based on optical flow computation. # # Copyright (C) 2021 Christian Hentschel (christian.hentschel@hpi.de), Jacob Löbkens (jcbl423@gmail.com) # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
gpl-2.0
5,403,479,900,569,239,000
43.424242
130
0.559231
false
utkbansal/kuma
kuma/wiki/views/utils.py
5
2432
# -*- coding: utf-8 -*- from datetime import datetime import newrelic.agent from kuma.core.cache import memcache from ..constants import DOCUMENT_LAST_MODIFIED_CACHE_KEY_TMPL from ..models import Document def split_slug(slug): """ Utility function to do basic slug splitting """ slug_split = slug.sp...
mpl-2.0
-968,280,042,417,950,200
29.024691
75
0.582237
false
saimn/doit
tests/test_cmd_auto.py
7
4873
import time from multiprocessing import Process import pytest from doit.cmdparse import DefaultUpdate from doit.task import Task from doit.cmd_base import TaskLoader from doit import filewatch from doit import cmd_auto from .conftest import CmdFactory # skip all tests in this module if platform not supported platfo...
mit
-1,066,652,798,924,691,000
31.925676
79
0.567617
false
fvpolpeta/devide
modules/user/muscleLinesToSurface.py
7
12661
# muscleLinesToSurface copyright (c) 2003 Charl P. Botha http://cpbotha.net/ # $Id$ from module_base import ModuleBase from module_mixins import NoConfigModuleMixin import module_utils import vtk class muscleLinesToSurface(ModuleBase, NoConfigModuleMixin): """Given muscle centre lines marked with 0-valued voxels,...
bsd-3-clause
4,655,593,225,886,525,000
37.60061
78
0.515599
false
maxwhosevillage/django-simple-utilities
utilities/admin/__init__.py
1
36603
# coding: utf-8 import re import StringIO import pickle import json from django.contrib import admin from django.db import models from django.utils.translation import ugettext_lazy as _ from django.http import HttpResponse from django.utils.html import escape, escapejs, strip_spaces_between_tags from django import for...
gpl-3.0
-7,080,564,700,646,644,000
41.011481
277
0.625765
false
ticklemepierce/osf.io
website/addons/wiki/routes.py
22
4570
""" """ import os from framework.routing import Rule, json_renderer from website.routes import OsfWebRenderer from . import views TEMPLATE_DIR = '../addons/wiki/templates/' settings_routes = { 'rules': [], 'prefix': '/api/v1', } widget_routes = { 'rules': [ Rule([ '/project/<pid>/...
apache-2.0
4,821,086,195,160,131,000
29.466667
106
0.514004
false
jorconnor/senior-design-rpl
testfiles/python/input/dependencies/dependencies1.py
3
6647
#The MIT License (MIT) # #Copyright (c) 2017 Jordan Connor # #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, m...
mit
-5,181,699,294,558,578,000
30.060748
97
0.555288
false
xiehe/gjjx-zhushou
login.py
1
2287
#!/usr/bin/env python # coding: utf-8 import os import sys import webbrowser import random import re from PIL import Image from io import BytesIO header = { 'User-Agent' : 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.13 Safari/537.36', 'Referer': 'http://www.gjj...
mit
-5,721,049,146,547,121,000
26.21519
130
0.526291
false
bertucho/epic-movie-quotes-quiz
dialogos/build/cffi/testing/cffi0/test_ffi_backend.py
3
11151
import py, sys, platform import pytest from testing.cffi0 import backend_tests, test_function, test_ownlib from cffi import FFI import _cffi_backend class TestFFI(backend_tests.BackendTests, test_function.TestFunction, test_ownlib.TestOwnLib): TypeRepr = "<ctype '%s'>" @staticmeth...
mit
2,344,467,808,344,002,600
39.111511
78
0.506143
false
bcornwellmott/frappe
frappe/patches/v7_1/refactor_integration_broker.py
23
1670
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import json def execute(): for doctype_name in ["Razorpay Log", "Razorpay Payment", "Razorpay Settings"]: dele...
mit
1,341,075,913,696,431,400
31.115385
94
0.686228
false
Maaphoo/Retr3d
multiprocessing/process.py
52
9370
# # Module providing the `Process` class which emulates `threading.Thread` # # multiprocessing/process.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: #...
gpl-3.0
-7,880,929,767,971,504,000
28.009288
79
0.589861
false
tensorflow/tensorflow
tensorflow/python/keras/layers/preprocessing/benchmarks/bucketized_column_dense_benchmark.py
7
2966
# Copyright 2020 The TensorFlow 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 required by applica...
apache-2.0
-3,177,815,211,221,658,000
36.544304
101
0.719488
false
andresailer/DIRAC
MonitoringSystem/private/TypeLoader.py
3
1396
""" It is used to load the monitoring types. """ import re from DIRAC.Core.Utilities import DIRACSingleton from DIRAC.Core.Utilities.Plotting.ObjectLoader import loadObjects from DIRAC.MonitoringSystem.Client.Types.BaseType import BaseType __RCSID__ = "$Id$" ########################################################...
gpl-3.0
5,862,922,863,693,751,000
28.083333
97
0.565903
false
edmundgentle/schoolscript
SchoolScript/bin/Debug/pythonlib/Lib/distutils/msvccompiler.py
1
24144
"""distutils.msvccompiler Contains MSVCCompiler, an implementation of the abstract CCompiler class for the Microsoft Visual Studio. """ # Written by Perry Stoll # hacked by Robin Becker and Thomas Heller to do a better job of # finding DevStudio (through the registry) __revision__ = "$Id$" import sys,...
gpl-2.0
-6,819,336,377,355,405,000
35.607477
99
0.516029
false
shiftregister/shiftregister
mapping/all_lines.py
1
2627
# 1|LINESTRING(8.9871812 50.0591294,8.4325862 49.1043102) # sets of lines from each point to each point longX, latY (in csv is lat/long so we need to swop) import csv, sys #epsilon=sys.float_info.epsilon epsilon=0.01 # precision #data = sys.argv[1] #title = sys.argv[2] def read_csv_file(filename): data = [] ...
gpl-3.0
-1,033,840,676,938,384,400
36.528571
212
0.632661
false