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
gbiggs/rtsprofile
rtsprofile/message_sending.py
1
20553
# -*- Python -*- # -*- coding: utf-8 -*- '''rtsprofile Copyright (C) 2009-2015 Geoffrey Biggs RT-Synthesis Research Group Intelligent Systems Research Institute, National Institute of Advanced Industrial Science and Technology (AIST), Japan All rights reserved. Licensed under the GNU Lesser Ge...
lgpl-3.0
9,126,888,891,478,318,000
33.60101
89
0.57432
false
google/uncertainty-baselines
uncertainty_baselines/datasets/datasets_test.py
1
1049
# coding=utf-8 # Copyright 2021 The Uncertainty Baselines 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 ap...
apache-2.0
3,725,327,766,936,208,400
31.78125
74
0.744519
false
kevinarpe/kevinarpe-rambutan3
rambutan3/check_args/collection/RRangeSizeMatcher.py
1
2658
from rambutan3 import RArgs from rambutan3.check_args.base.RAbstractTypeMatcher import RAbstractTypeMatcher from rambutan3.check_args.base.traverse.RTypeMatcherError import RTypeMatcherError from rambutan3.string.RMessageText import RMessageText class RRangeSizeMatcher(RAbstractTypeMatcher): """ This class is...
gpl-3.0
-1,375,920,728,825,385,700
33.973684
108
0.565839
false
timmyomahony/python-parsnip
parsnip/__init__.py
1
4250
import urllib import urllib2 import cookielib from lxml import etree DEBUG = False VERSION = "0.0.1" import logging logger = logging.getLogger(__name__) if DEBUG: logging.basicConfig(level=logging.DEBUG) from parsnip import utils class Webtext(object): """ Represents a webtext to be sent to a list of recipients...
mit
8,747,260,817,803,172,000
33
111
0.702588
false
Hernanarce/pelisalacarta
python/version-command-line/platformcode/platformtools.py
1
1188
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # platformtools # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ from core import config def dialog_ok(heading, line1, line2="", line3=""): return True def dialog_notification(heading,...
gpl-3.0
9,129,338,694,733,797,000
21.433962
102
0.637205
false
googleapis/python-shell
google/cloud/shell/__init__.py
1
2691
# -*- 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
7,066,398,266,885,760,000
42.403226
79
0.808993
false
rahulbahal7/cloud-gateway
server.py
1
7070
from flask import Flask, render_template, request, g import os import subprocess import requests import sqlite3 import yaml app = Flask(__name__) dnat_cmd = "sudo iptables -t nat %s PREROUTING -d %s -j DNAT --to-destination %s" port_fwd_cmd = "sudo iptables -t nat %s PREROUTING -p %s -d %s --dport %s -j DNAT --to-de...
apache-2.0
7,519,551,738,405,763,000
30.283186
112
0.591372
false
fbradyirl/home-assistant
tests/components/script/test_init.py
1
9084
"""The tests for the Script component.""" # pylint: disable=protected-access import unittest from unittest.mock import patch, Mock import pytest from homeassistant.components import script from homeassistant.components.script import DOMAIN from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_NAME, SERVI...
apache-2.0
-9,201,643,174,911,545,000
28.493506
87
0.572105
false
cloudera/ibis
ibis/backends/pandas/tests/conftest.py
1
1158
from pathlib import Path import pandas as pd import ibis import ibis.expr.operations as ops from ibis.backends.tests.base import BackendTest, RoundHalfToEven class TestConf(BackendTest, RoundHalfToEven): check_names = False additional_skipped_operations = frozenset({ops.StringSQLLike}) supported_to_time...
apache-2.0
8,643,831,911,716,360,000
32.085714
79
0.570812
false
fabiobatalha/publication_stats
publication/thrift/server.py
1
7000
# coding: utf-8 import json import argparse import logging import os import sys from publication.controller import stats, ServerError import thriftpy import thriftpywrap from thriftpy.rpc import make_server logger = logging.getLogger(__name__) publication_stats_thrift = thriftpy.load( os.path.join(os.path.dirna...
bsd-2-clause
-4,031,151,090,188,490,000
30.96347
142
0.611143
false
plotly/python-api
packages/python/plotly/plotly/graph_objs/splom/marker/_line.py
1
24938
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "splom.marker" _path_str = "splom.marker.line" _valid_props = { "autocolorscale", ...
mit
-8,391,715,932,195,973,000
36.842185
87
0.565322
false
alexholehouse/SBMLIntegrator
libsbml-5.0.0/src/bindings/python/test/sbml/TestRateRule.py
1
3765
# # @file TestRateRule.py # @brief RateRule unit tests # # @author Akiya Jouraku (Python conversion) # @author Ben Bornstein # # $Id$ # $HeadURL$ # # ====== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING ====== # # DO NOT EDIT THIS FILE. # # This file was generated automatically by converting t...
gpl-3.0
2,724,558,399,042,802,700
32.616071
79
0.635591
false
petrutlucian94/cinder
cinder/volume/drivers/solidfire.py
1
52455
# All Rights Reserved. # Copyright 2013 SolidFire 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...
apache-2.0
-2,846,976,939,667,799,600
39.789269
79
0.551196
false
amasiero/approach_control
approach_control_manipulator/nodes/approach_control_manipulator/OpenGripper.py
1
1219
#!/usr/bin/env python import rospy import smach import numpy as np from std_msgs.msg import Float64 from dynamixel_msgs.msg import JointState class OpenGripper(smach.State): def __init__(self): smach.State.__init__(self, outcomes = ['success', 'in_progress', 'fail']) self.joint4 = rospy.Publishe...
gpl-2.0
2,137,452,575,474,509,000
26.111111
92
0.59557
false
DayGitH/Python-Challenges
DailyProgrammer/DP20140702B.py
1
2885
""" [7/2/2014] Challenge #169 [Intermediate] Home-row Spell Check https://www.reddit.com/r/dailyprogrammer/comments/29od55/722014_challenge_169_intermediate_homerow_spell/ #User Challenge: Thanks to /u/Fruglemonkey. This is from our idea subreddit. http://www.reddit.com/r/dailyprogrammer_ideas/comments/26pak5/interme...
mit
-7,657,910,540,772,636,000
49.614035
119
0.754939
false
weaverch/super8scan
Scripts/Capture/super8scan/__init__.py
1
2102
################################################################### # This file is a modification of the file "__init__.py" from the # # RPi Telecine project. I've included that project's header and # # copyright below. # ##############################################...
bsd-3-clause
-6,091,237,985,187,468,000
41.04
83
0.696004
false
ua-snap/downscale
snap_scripts/downscaling_L48/downscale_cmip5_L48.py
1
6512
# downscale the prepped cmip5 data used in running the TEM model (IEM) # author: Michael Lindgren if __name__ == '__main__': import glob, os, rasterio, itertools from functools import partial import downscale from downscale import preprocess import numpy as np import argparse # # parse the commandline argument...
mit
-4,572,493,743,222,169,000
37.311765
151
0.670147
false
gviejo/ThalamusPhysio
python/main_make_MAPinfo.py
1
14284
#!/usr/bin/env python ''' File name: main_make_movie.py Author: Guillaume Viejo Date created: 09/10/2017 Python Version: 3.5.2 To make shank mapping ''' import numpy as np import pandas as pd # from matplotlib.pyplot import plot,show,draw import scipy.io from functions import * from pylab import * from skle...
gpl-3.0
-2,535,166,758,625,621,500
36.989362
199
0.556007
false
pepeportela/edx-platform
common/djangoapps/student/tests/test_reset_password.py
1
15742
""" Test the various password reset flows """ import json import re import unittest import ddt from django.conf import settings from django.contrib.auth.hashers import UNUSABLE_PASSWORD_PREFIX from django.contrib.auth.models import User from django.contrib.auth.tokens import default_token_generator from django.core.ca...
agpl-3.0
-2,669,021,319,108,499,000
43.849003
120
0.652395
false
PiJoules/python-type-inference
pytype.py
1
13687
class PyType: NEW_METHOD = "__new__" INIT_METHOD = "__init__" DEL_METHOD = "__del__" REPR_METHOD = "__repr__" STR_METHOD = "__str__" BYTES_METHOD = "__bytes__" FORMAT_METHOD = "__format__" LT_METHOD = "__lt__" LE_METHOD = "__le__" EQ_METHOD = "__eq__" NE_METHOD = "__ne__" ...
mit
-4,542,938,915,994,257,400
28.245726
129
0.560532
false
lipixun/pytest
rabbitmq/publishconfirm/client.py
1
2881
#!/usr/bin/env python # encoding=utf8 # The publish confirm test client import sys reload(sys) sys.setdefaultencoding('utf8') import gevent from gevent import monkey monkey.patch_all() from haigha.connections.rabbit_connection import RabbitConnection from haigha.message import Message class Client(object): """T...
gpl-2.0
3,695,272,715,719,721,500
31.370787
134
0.597015
false
hyakuhei/cleantox
hacking/tests/test_doctest.py
1
3232
#!/usr/bin/env python # Copyright (c) 2013 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 # # Unle...
apache-2.0
6,823,572,021,448,614,000
34.911111
77
0.586015
false
rmed/zoe-sysinfo
agents/sysinfo/sysinfo.py
1
12303
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Zoe Sysinfo - https://github.com/rmed/zoe-sysinfo # # Copyright (c) 2015 Rafael Medina García <rafamedgar@gmail.com> # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentati...
mit
5,714,891,798,546,808,000
29.83208
80
0.482361
false
futurice/django-jsonmodel
test/test_human.py
1
1642
from django.test import TestCase from django.core.urlresolvers import reverse from djangojsonmodel.convert import jsmodels from djangojsonmodel.contrib.human.mappings import shortnames from djangojsonmodel.contrib.human.urls import drf from .urls import urlpatterns from .urls_api import router from pprint import ppr...
mit
-5,252,892,620,313,928,000
30.576923
68
0.644945
false
gkunter/coquery
coquery/gui/ui/findWidgetUi.py
1
2751
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'findWidget.ui' # # Created by: PyQt5 UI code generator 5.7.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_FindWidget(object): def setupUi(self, FindWidget): FindWi...
gpl-3.0
5,910,999,480,630,010,000
46.431034
102
0.708833
false
zaxlct/python-django-learning
SendMail/通过SSL发送邮件.py
1
1172
# coding:utf-8 #!/usr/bin/env python import smtplib,datetime,sys from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.application import MIMEApplication username = sys.argv[1] passwd = sys.argv[2] _user = "oa@eycode.com" _pwd = "密码" _to_list = ["%s@eycode.com"%userna...
mit
-3,474,270,333,641,462,300
20.5
72
0.67345
false
haidlir/drox
lib.py
1
4946
# The MIT License (MIT) # Copyright (c) 2015 haidlir # 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, mer...
mit
212,829,334,784,592,700
33.587413
105
0.573797
false
dayatz/taiga-back
tests/integration/test_totals_projects.py
1
5868
# -*- coding: utf-8 -*- # Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2017 Anler Hernández <hello@anler.me> # Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alon...
agpl-3.0
-8,717,044,814,042,567,000
35.203704
82
0.701449
false
vlegoff/tsunami
src/primaires/perso/montrer/__init__.py
1
1990
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 notice, this # ...
bsd-3-clause
-8,451,832,110,852,041,000
49.769231
79
0.781313
false
cgqyh/pyalgotrade-mod
testcases/websocket_server.py
1
1284
import threading from wsgiref import simple_server from ws4py.server import wsgirefserver from ws4py.server import wsgiutils class WebSocketServerThread(threading.Thread): def __init__(self, host, port, webSocketServerClass): super(WebSocketServerThread, self).__init__() self.__host = host ...
apache-2.0
-4,481,928,351,619,121,000
33.702703
83
0.679907
false
clipo/idss-seriation
seriation/database.py
1
10460
#!/usr/bin/env python # Copyright (c) 2015. Mark E. Madsen <mark@madsenlab.org> # # This work is licensed under the terms of the Apache Software License, Version 2.0. See the file LICENSE for details. """ Description here """ from mongoengine import * from seriation import idss_version import datetime import loggi...
apache-2.0
-8,235,923,105,254,227,000
36.625899
119
0.711663
false
yogendersolanki91/winfsp
tools/gensrc/ntstatus.py
2
3934
#!/usr/bin/python import sys pairs = [] for line in sys.stdin: pairs.extend(line.strip().split()) pairs = zip(pairs[::2], pairs[1::2]) fixed = { 'ERROR_ACCESS_DENIED': 'STATUS_ACCESS_DENIED', 'ERROR_CANNOT_IMPERSONATE': 'STATUS_CANNOT_IMPERSONATE', 'ERROR_CONNECTION_ABORTED': 'STATUS_CONNECTION_ABORT...
gpl-3.0
-1,532,350,312,026,019,800
45.833333
80
0.678953
false
godmar/problemtools
setup.py
1
2718
#!/usr/bin/env python2 from setuptools import setup, find_packages from setuptools.command.bdist_egg import bdist_egg as _bdist_egg import distutils.cmd from distutils.command.build import build as _build import os import subprocess class BuildSupport(distutils.cmd.Command): """A custom command to build the supp...
mit
-8,236,077,664,496,998,000
27.610526
95
0.611111
false
CanonicalLtd/subiquity
setup.py
1
3933
#!/usr/bin/env python3 # -*- mode: python; -*- # # Copyright 2015 Canonical, Ltd. # # 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 lat...
agpl-3.0
8,198,292,872,499,578,000
29.253846
74
0.580219
false
sam-m888/gprime
gprime/lib/primaryobj.py
1
12459
# # gPrime - A web-based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2011 Tim G L Lyons # # 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 versio...
gpl-2.0
-4,829,788,241,042,503,000
34.69914
79
0.609278
false
aroth-arsoft/arsoft-web-filewatch
arsoft/web/filewatch/wsgi.py
1
1283
#!/usr/bin/python # -*- coding: utf-8 -*- # kate: space-indent on; indent-width 4; mixedindent off; indent-mode python; """ WSGI config for arsoft.web.filewatch project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level v...
gpl-3.0
-7,853,104,654,603,299,000
39.09375
80
0.788776
false
lmazuel/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/win_rm_listener.py
1
1843
# 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
5,345,644,278,437,206,000
42.880952
83
0.622897
false
mscook/nway-dbify
nway-dbify/parse.py
1
1080
# Copyright 2013 Mitchell Stanton-Cook Licensed under the # Educational Community 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.osedu.org/licenses/ECL-2.0 # # Unless required by appli...
apache-2.0
-5,660,395,515,860,145,000
33.83871
73
0.662963
false
rdo-infra/releng
rdoutils/cmd/check_dependants.py
1
10118
#! /usr/bin/python3 # # Mostly copied code from find_unblocked_orphans.py in fedora # # Credits to original authors: # Jesse Keating <jkeating@redhat.com> # Till Maas <opensource@till.name> # # Copyright (c) 2009-2013 Red Hat # SPDX-License-Identifier: GPL-2.0 # # From: # https://pagure.io/releng/blob/main/f/sc...
apache-2.0
-6,268,966,650,308,080,000
39.472
112
0.579957
false
dhellmann/openstack-release-test
doc/source/conf.py
1
2460
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software...
apache-2.0
5,722,083,156,617,589,000
31.8
79
0.689837
false
tasleson/lsm-ci
testing/server.py
1
1369
#!/usr/bin/env python3 """ Test development server. """ import socket import ssl import testlib import traceback import sys bindsocket = socket.socket() bindsocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) bindsocket.bind(("", 8675)) bindsocket.listen(5) while True: print("Waiting for a client...") ...
apache-2.0
-4,696,118,900,612,178,000
22.603448
67
0.577064
false
telefonicaid/murano
murano/common/messaging/mqclient.py
1
3376
# Copyright (c) 2013 Mirantis 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 writ...
apache-2.0
6,651,683,647,796,950,000
30.849057
72
0.601007
false
ASoftTech/Scons-Tools-Grbd
scons_tools_grbd/Tools/Docs/Doxygen/DoxygenCommon.py
1
12301
""" DoxygenCommon Common code associated with doxygen builders """ import os, sys, os.path as path, yaml import SCons.Script from SCons.Environment import Environment from SCons.Script import File, Dir import glob from fnmatch import fnmatch from functools import reduce # Currently supported output for...
mit
-959,350,828,641,448,600
33.862974
118
0.509959
false
mpdehaan/camp
camp/tracker/scenes.py
1
1248
""" Copyright 2016, Michael DeHaan <michael.dehaan@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-2.0 Unless required by applicable law or agreed...
apache-2.0
-4,207,163,904,414,912,000
30.2
102
0.659455
false
nearai/program_synthesis
program_synthesis/naps/examples/seq2seq/pointer_seq_encoder.py
1
1895
import torch import torch.nn as nn from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence from torch.autograd import Variable class SeqEncoder(nn.Module): def __init__(self, args): super(SeqEncoder, self).__init__() self.num_units = args.num_units self.num_encoder_layers...
apache-2.0
2,590,437,045,472,163,000
45.219512
112
0.65277
false
chrisatthestudy/jot
src/test.py
1
8053
#!/usr/bin/python # -*- coding: utf-8 -*- """ Python CLI Test Unit """ # Standard library imports import datetime import os # Third party imports # Application specific imports import jot if (__name__ == "__main__"): # Basic unit tests for API() import unittest class APITestCase(unittest.TestC...
mit
3,204,859,210,727,376,000
44.755682
105
0.56302
false
vesellov/bitdust.devel
transport/tcp/tcp_connection.py
1
16191
#!/usr/bin/env python # tcp_connection.py # # Copyright (C) 2008-2018 Veselin Penev, https://bitdust.io # # This file (tcp_connection.py) is part of BitDust Software. # # BitDust is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the F...
agpl-3.0
-3,884,063,711,890,305,000
33.819355
160
0.556173
false
andresgz/ekratia
ekratia/core/email.py
1
2332
from ekratia.conversations.models import Thread from ekratia.referendums.models import Referendum from django_email import EmailTemplate import logging logger = logging.getLogger('ekratia') def notify_comment_node(request, node, object_type): """ Method to create new comment for the current Thread """ ...
bsd-3-clause
-1,448,053,471,273,552,600
31.388889
67
0.542453
false
chadversary/chromiumos.chromite
cbuildbot/stages/sync_stages.py
1
40929
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Module containing the sync stages.""" import contextlib import datetime import logging import os import sys from xml.etree import ElementTree from...
bsd-3-clause
-4,545,775,359,455,105,000
38.317003
80
0.684405
false
lsst-sqre/sqre-apikit
tests/test_lsstflask_type_errors.py
1
1993
#!/usr/bin/env python """Test APIFlask class for input parameters causing TypeErrors. """ import apikit import pytest def test_lsstflask_type_errors(): """Test APIFlask for input parameters causing TypeErrors. """ # No arguments at all. # Obviously the linter is correct here... with pytest.raises(...
mit
-3,355,852,424,482,573,300
39.673469
70
0.582037
false
tomashaber/raiden
raiden/network/protocol.py
1
24753
# -*- coding: utf-8 -*- import logging import random from collections import ( namedtuple, defaultdict, ) from itertools import repeat import cachetools import gevent from gevent.event import ( _AbstractLinkable, AsyncResult, Event, ) from ethereum import slogging from raiden.exceptions import ( ...
mit
2,086,037,826,785,422,800
30.572704
93
0.584899
false
sbradley7777/glocktop_analyze
glocktop_analyze/plugins/snapshots.py
1
5213
#!/usr/bin/python """ @author : Shane Bradley @contact : sbradley@redhat.com @copyright : GPLv3 * This plugin outputs the number of snapshots taken for a filesystem, the start time, and end time or last snapshot taken. * This plugin outputs the filesystem name, time when snapshot taken when dlm activity is g...
gpl-3.0
-5,534,080,927,086,368,000
51.656566
158
0.532707
false
commtrack/commtrack-old-to-del
tests/deployment/selenium/hq_test.py
1
3617
from selenium import selenium import unittest, time, re, urllib2 from post import * import os import sys import time class testingPost(unittest.TestCase): def setUp(self): self.verificationErrors = [] self.selenium = selenium("localhost", 4444, "*firefox", server) self.selenium.start() ...
bsd-3-clause
-2,440,084,986,140,611,000
35.908163
111
0.594968
false
MisanthropicBit/bibpy
bibpy/entry/base.py
1
1986
# -*- coding: utf-8 -*- """Base class for all types of entries.""" class BaseEntry: """Base class for all types of entries.""" def format(self, **options): raise NotImplementedError() def format_auxiliary_entry(self, entry_type, contents, indent=' ', singleline...
mit
4,408,465,947,743,820,300
24.139241
78
0.572508
false
SummerLW/Perf-Insight-Report
dashboard/dashboard/task_runner_test.py
1
1415
# Copyright 2015 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. import mock from dashboard import task_runner from dashboard import testing_common class TaskRunnerTest(testing_common.TestCase): def setUp(self): ...
bsd-3-clause
4,223,666,183,864,671,000
29.76087
80
0.695406
false
tscloud/hamsalad
callservice_class.py
1
6917
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ # Copyright (C) 2014 Tom Cloud # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) ...
agpl-3.0
-3,144,253,205,164,794,000
36.797814
111
0.556021
false
hchim/stockanalyzer
simulator/TradeSimulator.py
1
4978
import pandas as pd import numpy as np from utils.webdata import get_close_of_symbols class TradeSimulator(object): def __init__(self, start_val=1000000, leverage=2.0, allow_short=True): """ Parameters ---------- start_val: float start value of the portfolio l...
mit
-7,645,321,113,309,966,000
33.811189
126
0.537364
false
WillBrennan/DigitClassifier
DeepConv.py
1
8479
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Will Brennan' # Built-in Module import os import time import logging import warnings import cPickle as pickle from datetime import datetime # Standard Modules import numpy import sklearn import theano import theano.tensor as T # Custom Modules import Scripts...
bsd-2-clause
1,989,639,045,380,812,300
47.176136
174
0.608916
false
Floobits/floobits-neovim-old
plugin/floo/editor.py
1
2900
import sys from collections import defaultdict import time import vim try: from .common import shared as G from .common import msg except (ImportError, ValueError): import common.shared as G from common import msg timeouts = defaultdict(list) top_timeout_id = 0 cancelled_timeouts = set() calling_tim...
apache-2.0
-7,985,132,652,886,116,000
21.65625
137
0.623103
false
saghul/aiohttp
aiohttp/websocket.py
1
8733
"""WebSocket protocol versions 13 and 8.""" __all__ = ['WebSocketParser', 'WebSocketWriter', 'do_handshake', 'Message', 'WebSocketError', 'MSG_TEXT', 'MSG_BINARY', 'MSG_CLOSE', 'MSG_PING', 'MSG_PONG'] import base64 import binascii import collections import hashlib import struct from aiohttp impo...
apache-2.0
6,830,857,299,312,674,000
31.94717
79
0.596953
false
seiferteric/bmaptools
tests/helpers.py
1
10844
# Copyright (c) 2012-2013 Intel, Inc. # License: GPLv2 # Author: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2, # as published by the Free Software Foundation. # # This progra...
gpl-2.0
-6,630,529,943,013,134,000
35.635135
80
0.57239
false
dsavransky/EXOSIMS
EXOSIMS/StarCatalog/SIMBAD300Catalog.py
1
1291
# -*- coding: utf-8 -*- from EXOSIMS.StarCatalog.SIMBADCatalog import SIMBADCatalog from EXOSIMS.util.get_dirs import get_cache_dir import os, inspect class SIMBAD300Catalog(SIMBADCatalog): """SIMBAD300 Catalog class This class populates the star catalog used in EXOSIMS from the SIMBAD300 ca...
bsd-3-clause
8,737,107,476,047,672,000
38.34375
77
0.620449
false
thedanotto/google-maps-urlerator
google_maps_urlerator/settings/local_mini.py
1
4841
import os DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'google_maps_urlerator.sqlite3', ...
mit
3,139,702,584,782,255,000
36.246154
127
0.706259
false
virantha/photokeeper
photokeeper/filecopy.py
1
2553
# Copyright 2016 Virantha Ekanayake 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 la...
apache-2.0
1,588,081,966,827,932,400
34.458333
89
0.617313
false
breeezzz/local-bitcoins-api
LocalBitcoins/market_depth.py
1
6253
''' Created on 7 Jun 2013 @author: Jamie ''' import urllib2 import math import re import itertools import argparse from bs4 import BeautifulSoup import matplotlib.pyplot as plt markets = {'UK': {'url': 'gb/united%20kingdom/', 'curr': 'GBP'}, 'USA': {'url': 'us/united%20states/', 'curr': 'USD'}, ...
mit
-5,073,392,285,492,566,000
34.731429
107
0.592196
false
jhseu/tensorflow
tensorflow/python/keras/saving/hdf5_format_test.py
1
46964
# Copyright 2018 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
7,052,613,163,125,570,000
36.661588
80
0.630632
false
dougfelt/nototools
nototools/merge_fonts.py
1
6510
#!/usr/bin/env python # # Copyright 2017 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
-1,896,441,785,038,470,700
35.166667
131
0.697389
false
thombashi/pytablewriter
test/writer/text/sourcecode/test_numpy_writer.py
1
6388
""" .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ import pytest import pytablewriter as ptw from ...._common import print_test_result from ....data import ( Data, headers, mix_header_list, mix_value_matrix, null_test_data_list, value_matrix, value_matrix_iter, va...
mit
4,589,981,548,541,643,000
26.534483
109
0.533187
false
prasanna08/oppia
scripts/check_e2e_tests_are_captured_in_ci.py
1
8956
# Copyright 2020 The Oppia 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 applicable ...
apache-2.0
-971,472,052,565,327,900
38.10917
80
0.682671
false
planetarymike/IDL-Colorbars
IDL_py_test/027_Eos_B.py
1
5942
from matplotlib.colors import LinearSegmentedColormap from numpy import nan, inf cm_data = [[1., 1., 1.], [1., 1., 1.], [0.498039, 0.498039, 0.498039], [0., 0., 0.513725], [0., 0., 0.533333], [0., 0., 0.54902], [0., 0., 0.564706], [0., 0., 0.580392], [0., 0., 0.6], [0., 0., 0.615686], [0., 0., 0.568627], [0., 0., 0.584...
gpl-2.0
-4,094,152,691,494,448,000
20.686131
69
0.49411
false
jab/bidict
bidict/_delegating.py
1
1313
# -*- coding: utf-8 -*- # Copyright 2009-2021 Joshua Bronson. All Rights Reserved. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """Provide :class:`_DelegatingBidi...
mpl-2.0
6,723,408,480,734,901,000
32.666667
106
0.658797
false
frederica07/Dragon_Programming_Process
PyOpenGL-3.0.2/OpenGL/GL/VERSION/GL_1_3.py
1
1829
'''OpenGL extension VERSION.GL_1_3 This module customises the behaviour of the OpenGL.raw.GL.VERSION.GL_1_3 to provide a more Python-friendly API The official definition of this extension is available here: http://www.opengl.org/registry/specs/VERSION/GL_1_3.txt ''' from OpenGL import platform, constants, constant,...
bsd-2-clause
7,089,357,555,982,002,000
26.298507
70
0.618917
false
GFibrizo/TPS_7529
TP1/Estadistico de orden K/fuerza_bruta.py
1
1235
def es_estadistico_orden_k(conjunto, candidato, k): menores = 0 for elem in conjunto: if elem < candidato: menores += 1 return menores == k ################################################################################ ##########################################################...
apache-2.0
-2,356,529,184,397,459,000
38.83871
80
0.364372
false
google-research/google-research
nigt_optimizer/nigt_test.py
1
1295
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
apache-2.0
-5,804,821,532,759,230,000
28.431818
74
0.722008
false
ifengkou/python_splider
history/smzdm_splider_re.py
1
4876
# -*- coding: utf-8 -*- import sys reload(sys) sys.setdefaultencoding( "utf-8" ) import string import urllib2 import re import json class HTML_Tool: # 用 非贪婪模式 匹配 \t 或者\n 或者 空格超链接 和图片 BgnCharToNoneRex = re.compile("(\t|\n|\r| |<a.*?>|<img.*?>)") #用 非贪婪模式 陪 任意 <> EndCharToNoneRex = re.compile("<.*?>") ...
mit
8,403,273,562,992,043,000
30.7
131
0.520955
false
ebilionis/variational-reformulation-of-inverse-problems
unittests/test_cached_function.py
1
1091
""" Tests the vuq.CachedFunction decorator. Author: Ilias Bilionis Date: 6/6/2014 """ import numpy as np import time from vuq import * # Test the evaluation of a cached and of an un-cached function # An expensive function def f(x): for i in xrange(1000): x += i x /= 1000000 return 2....
gpl-2.0
-7,619,550,343,440,725,000
15.283582
62
0.597617
false
kgiusti/gofer
src/gofer/messaging/consumer.py
1
4280
# Copyright (c) 2013 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or implied, # including the impl...
lgpl-2.1
7,477,042,401,144,376,000
27.918919
75
0.573598
false
HaebinShin/tensorflow
tensorflow/contrib/layers/python/layers/layers.py
1
58331
# Copyright 2016 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
7,947,719,514,058,417,000
42.465723
80
0.631842
false
adragomir/bottle
test/test_outputfilter.py
1
5031
# -*- coding: utf-8 -*- '''Everything returned by Bottle()._cast() MUST be WSGI compatiple.''' import unittest import bottle from tools import ServerTestBase, tob, tobs class TestOutputFilter(ServerTestBase): ''' Tests for WSGI functionality, routing and output casting (decorators) ''' def test_bytes(self): ...
mit
-7,577,298,989,531,907,000
30.588608
82
0.5556
false
emory-libraries/eulxml
eulxml/xpath/parserules.py
1
7468
# file eulxml/xpath/parserules.py # # Copyright 2010,2011 Emory University Libraries # # 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...
apache-2.0
4,975,221,762,441,156,000
19.293478
82
0.584226
false
PersianWikipedia/Database-reports
zzkootah.py
1
7721
#!/usr/bin/python # -*- coding: utf-8 -*- # # Reza(User:reza1615), 2011 # MIT license import catlib ,pagegenerators import wikipedia,urllib,gzip,codecs,re import MySQLdb as mysqldb import config,os from datetime import timedelta,datetime wikipedia.config.put_throttle = 0 wikipedia.put_throttle.setDelay() i...
mit
-4,913,412,699,687,561,000
44.486486
234
0.486337
false
cadappl/krep
krep_subcmds/topic_subcmd.py
1
2707
import re from topics import all_topics, SubCommand class TopicSubcmd(SubCommand): COMMAND = 'topic' help_summary = 'Print the topic summaries' help_usage = '''\ %prog <topic> ... Display all registered topics of the program for debugging purpose. Topic contains the classes that can be imported from "...
lgpl-3.0
8,216,177,758,233,503,000
30.114943
74
0.533801
false
c-PRIMED/puq
test/UniformPDF_test.py
1
4485
#! /usr/bin/env python ''' Testsuite for the UniformPDF class ''' from __future__ import absolute_import, division, print_function import numpy as np from puq import * import scipy.stats as stats def _hisplot(y, nbins): n, bins = np.histogram(y, nbins, normed=True) mids = bins[:-1] + np.diff(bins) / 2.0 ...
mit
1,280,009,626,194,173,200
22.118557
83
0.584392
false
codewatchorg/dirscalate
dirscalate.py
1
7428
# Josh Berry # CodeWatch # December 2013 # import re import argparse import StringIO import datetime import requests from requests.auth import HTTPBasicAuth from requests.auth import HTTPDigestAuth from requests_ntlm import HttpNtlmAuth parser = argparse.ArgumentParser(prog='dirscalate.py', formatter_class=argpars...
bsd-2-clause
-6,577,279,926,893,694,000
32.165179
177
0.675283
false
FrankNagel/qlc
src/webapp/quanthistling/scripts/annotations/annotations_for_payne1989.py
1
4018
# -*- coding: utf8 -*- import sys, os sys.path.append(os.path.abspath('.')) import re from operator import attrgetter import difflib # Pylons model init sequence import pylons.test import logging from quanthistling.config.environment import load_environment from quanthistling.model.meta import Sessi...
gpl-3.0
6,149,296,717,054,123,000
31.764706
115
0.623444
false
smallyear/linuxLearn
salt/salt/loader.py
1
51863
# -*- coding: utf-8 -*- ''' We wanna be free to ride our machines without being hassled by The Man! And we wanna get loaded! And we wanna have a good time! And that's what we are gonna do. We are gonna have a good time... ''' # Import python libs from __future__ import absolute_import import os import imp import sys i...
apache-2.0
7,259,339,349,541,373,000
33.71419
118
0.503326
false
aolindahl/streaking
process_hdf5.py
1
46151
# -*- coding: utf-8 -*- """ Created on Mon Jun 8 15:37:51 2015 @author: Anton O Lindahl """ import h5py import argparse import matplotlib.pyplot as plt import numpy as np import time import os import sys import lmfit import warnings from aolPyModules import wiener, wavelet_filter import time_to_energy_conversion as ...
gpl-2.0
6,914,218,429,216,574,000
37.523372
79
0.554571
false
jds2001/ocp-checkbox
plainbox/plainbox/impl/providers/test_checkbox.py
1
1330
# This file is part of Checkbox. # # Copyright 2012, 2013 Canonical Ltd. # Written by: # Zygmunt Krynicki <zygmunt.krynicki@canonical.com> # # Checkbox 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 ...
gpl-3.0
-1,121,494,862,318,903,400
32.25
70
0.734586
false
tieu/balrog
auslib/test/admin/views/test_history.py
1
7025
import json from auslib.global_state import dbo from auslib.test.admin.views.base import ViewTest class TestHistoryView(ViewTest): def testFieldViewBadValuesBadTable(self): url = '/history/view/notatable/1/whatever' ret = self.client.get(url) self.assertStatusCode(ret, 400) self....
mpl-2.0
-1,618,251,931,530,158,600
36.169312
135
0.593452
false
kbaseapps/kb_phylogenomics
scripts/prepare_deploy_cfg.py
1
1496
import sys import os import os.path from jinja2 import Template try: from ConfigParser import ConfigParser # py2 except: from configparser import ConfigParser # py3 import StringIO if __name__ == "__main__": if len(sys.argv) != 3: print("Usage: <program> <deploy_cfg_template_file> <file_with_prop...
mit
-3,337,510,685,604,075,000
38.368421
101
0.601604
false
anthrotype/gobject-introspection
giscanner/msvccompiler.py
1
3827
# -*- Mode: Python -*- # GObject-Introspection - a framework for introspecting GObject libraries # Copyright (C) 2014 Chun-wei Fan # # 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; eithe...
gpl-2.0
5,496,914,266,710,373,000
36.891089
75
0.628691
false
oser-cs/oser-website
tests/test_projects/test_edition_api.py
1
2146
"""Editions API tests.""" from rest_framework import status from tests.utils import SimpleAPITestCase, logged_in from projects.factory import EditionFactory, EditionFormFactory class EditionEndpointsTest(SimpleAPITestCase): """Test access to the editions endpoints.""" factory = EditionFactory read_exp...
gpl-3.0
2,580,680,813,170,450,000
33.612903
75
0.653774
false
TiKunze/CanMics
src/python/01_SingleChannel/3pop/EIN/HeHiVariation/RUM_Detektor_HeHi_2ndversion_cluster.py
1
5917
# -*- coding: utf-8 -*- """ Created on Mon Jun 22 17:15:03 2015 @author: Tim Kunze Copyright (C) 2015, Tim Kunze. All rights reserved. This script is a modified version of the RUM Detector: instead of sweeping over He and Hi in every diagram, we sweep over lenge and intensity of the impulse (as in the actiation p...
gpl-3.0
4,919,975,346,268,894,000
29.979058
137
0.540984
false
junkcollector/PlexNMT-100
PlexNMT.py
1
3652
#!/usr/bin/env python """ PlexNMT Sources: PlexConnect: https://github.com/iBaa/PlexConnect/wiki inter-process-communication (queue): http://pymotw.com/2/multiprocessing/communication.html """ import sys, time from os import sep import socket from multiprocessing import Process, Pipe import signal, errno from Vers...
mit
-6,980,175,735,864,880,000
23.843537
91
0.592278
false
annelisebouyer/datawrapper
test/api.test.py
1
4387
# # test script for Datawrapper API # import requests import os import json from random import randint import yaml config = yaml.load(open('../config.yaml').read()) domain = 'http://' + config['domain'] if 'DATAWRAPPER_DOMAIN' in os.environ: domain = os.environ['DATAWRAPPER_DOMAIN'] endpoint = domain + '/api/...
mit
4,377,913,288,608,271,000
29.678322
82
0.569182
false
cfangmeier/UNL-Gantry-Encapsulation-Monitoring
Logs2JSON.py
1
10923
#!/usr/bin/env python3 import io import re import json import pydoc import zipfile import traceback import argparse import collections from datetime import datetime import urllib.request as request from itertools import count Vec3d = collections.namedtuple('Vec3d', 'x,y,z') Orient3d = collections.namedtuple('Orient3d'...
mit
165,149,412,829,744,670
35.654362
79
0.483017
false
philgyford/django-spectator
spectator/events/migrations/0042_auto_20200407_1039.py
1
1302
# Generated by Django 3.0.5 on 2020-04-07 10:39 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("spectator_events", "0041_event_ticket"), ] operations = [ migrations.AlterField( model_name="venue...
mit
-8,364,434,065,121,548,000
31.55
131
0.490015
false
spotify/cobbler
koan/app.py
1
71889
""" koan = kickstart over a network a tool for network provisioning of virtualization (xen,kvm/qemu,vmware) and network re-provisioning of existing Linux systems. used with 'cobbler'. see manpage for usage. Copyright 2006-2008 Red Hat, Inc and Others. Michael DeHaan <michael.dehaan AT gmail> This program is free s...
gpl-2.0
-3,040,904,404,183,310,000
38.412829
161
0.508103
false
Lazar-T/conference-crawler
openStack/spiders/openStackSpider.py
1
2023
# -*- coding: utf-8 -*- import urlparse from scrapy.http import Request from scrapy.loader import ItemLoader from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from scrapy.loader.processors import Compose, MapCompose from w3lib.html import replace_escape_chars, remove_tags fr...
mit
6,775,172,230,990,549,000
37.903846
93
0.659911
false
ClaudioNahmad/Servicio-Social
Parametros/CosmoMC/CosmoMC-master/python/deleteJobs.py
1
1785
from __future__ import absolute_import from __future__ import print_function import subprocess from paramgrid import batchjob_args, jobqueue Opts = batchjob_args.batchArgs('Delete running or queued jobs', importance=True, batchPathOptional=True) group = Opts.parser.add_mutually_exclusive_group() group.add_argument('-...
gpl-3.0
-3,567,789,519,922,405,400
43.625
112
0.716527
false