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
Pehrsons/boxee-tv4play
tests/testApi4.py
1
4782
#encoding:utf-8 # Must be run from same folder for relative import path to work! # Run with python 2.4 for full boxee compatibility import sys sys.path.append("../tv.boxeeplay.tv4play2/") from api4 import Api4Client as ApiClient from api4_mc import category_to_list_item, show_to_list_item, episode_to_list_item, episod...
mit
3,438,662,765,736,854,000
36.952381
113
0.659557
false
xccui/flink
flink-python/pyflink/table/tests/test_calc.py
3
8853
################################################################################ # 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...
apache-2.0
-9,219,673,020,569,421,000
47.911602
92
0.533604
false
himanshuo/osf.io
website/addons/s3/tests/test_view.py
1
17088
import mock from nose.tools import * # noqa import httplib as http from boto.exception import S3ResponseError from framework.auth import Auth from tests.base import OsfTestCase from tests.factories import ProjectFactory, AuthUserFactory from website.addons.s3.utils import validate_bucket_name from website.util impo...
apache-2.0
5,513,185,094,296,701,000
39.301887
115
0.631086
false
bmander/dancecontraption
django/db/models/__init__.py
7
1441
from django.conf import settings from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured from django.db import connection from django.db.models.loading import get_apps, get_app, get_models, get_model, register_models from django.db.models.query import Q from django.db.models.expressions import F fro...
bsd-3-clause
3,226,490,769,852,274,700
41.382353
128
0.762665
false
RyanBeatty/Steer-Clear-Backend
steerclear/login/views.py
3
5706
from flask import ( Blueprint, render_template, url_for, redirect, current_app, session, request ) from flask.ext.login import ( login_user, logout_user, login_required, current_user ) from flask.ext.principal import ( Principal, Identity, AnonymousIdentit...
mit
7,406,559,695,176,259,000
29.031579
95
0.657729
false
atvKumar/open-tamil
tamil/txt2ipa/unicode2ipa.py
4
1851
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################## # # # (C) 2014 Arulalan.T <arulalant@gmail.com> # # Date : 02.08.2014 ...
mit
-3,898,577,033,305,444,400
46.461538
81
0.440303
false
rohitw1991/smarttailorfrappe
frappe/api.py
20
3228
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt import json import frappe import frappe.handler import frappe.client import frappe.widgets.reportview from frappe.utils.response import build_response from frappe import _ def handle(): """ /api/method/{methodname...
mit
3,654,877,232,835,149,300
28.081081
92
0.67596
false
orashi/PaintsPytorch
train_ft.py
1
13323
import argparse import os import random import scipy.stats as stats import torch.backends.cudnn as cudnn import torch.optim as optim import torchvision.utils as vutils from tensorboardX import SummaryWriter from torch.autograd import grad from data.finetune import CreateDataLoader from models.standard import * parse...
mit
-3,202,663,539,232,369,700
40.504673
114
0.589507
false
eggmaster/tempest
tempest/api/compute/servers/test_servers_negative.py
3
21167
# Copyright 2012 OpenStack Foundation # 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 requ...
apache-2.0
8,747,659,404,350,897,000
40.832016
78
0.617376
false
HewlettPackard/python-hpOneView
tests/unit/image_streamer/resources/test_deployment_groups.py
2
2767
# -*- coding: utf-8 -*- ### # (C) Copyright (2012-2017) Hewlett Packard Enterprise Development LP # # 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 limi...
mit
-5,970,541,325,618,006,000
38.528571
81
0.716661
false
andmos/ansible
lib/ansible/modules/network/f5/bigip_iapp_template.py
9
18993
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
-8,706,995,137,844,186,000
31.916811
105
0.612384
false
LUTAN/tensorflow
tensorflow/python/ops/image_ops_test.py
10
100947
# Copyright 2015 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
6,134,911,788,405,626,000
35.561753
81
0.591578
false
deanmalmgren/textract
tests/test_exceptions.py
1
2187
import unittest import os import subprocess import uuid from . import base class ExceptionTestCase(base.GenericUtilities, unittest.TestCase): """This class contains a bunch of tests to make sure that textract fails in expected ways. """ def test_unsupported_extension_cli(self): """Make sure ...
mit
-4,080,433,351,844,123,600
37.368421
77
0.665752
false
django-inplaceedit/django-inplaceedit-bootstrap
testing/testing/settings.py
1
8477
# -*- coding: utf-8 -*- # Copyright (c) 2013 by Pablo Martín <goinnn@gmail.com> # # This program 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) an...
lgpl-3.0
484,212,716,362,200,060
34.024793
123
0.694195
false
googleinterns/risr
risr-app/risr_proj/manage.py
1
1298
#!/usr/bin/env python # 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 # # https: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
7,190,333,930,604,592,000
33.157895
74
0.701849
false
ver228/tierpsy-tracker
tierpsy/analysis/contour_orient/correctVentralDorsal.py
2
3779
import json import os import numpy as np import tables import warnings from tierpsy.analysis.ske_filt.getFilteredSkels import _h_calAreaSignedArray from tierpsy.helper.params import read_ventral_side, single_db_ventral_side VALID_CNT = ['clockwise', 'anticlockwise', 'unknown'] def _add_ventral_side(skeletons_file, ...
mit
-2,725,099,786,554,675,700
38.364583
240
0.626885
false
alephu5/Soundbyte
statistics/cusum.py
1
1395
#! ../environment/bin/python3.3 #This test looks at the maximum excursion from 0 of the random walk #defined by the cumulative sum of adjusted -1, +1 digits in the sequence. #The cumulative sum may be considered as a random walk and for a random #sequence this should be near 0. from scipy.stats import norm from numpy...
gpl-3.0
-8,565,042,846,497,327,000
30
73
0.576344
false
Elnatan/js-symbolic-executor
cvc3/java/run_tests.py
5
31160
#!/usr/bin/env python import sys, os, re, math, time #, signal #import resource # Alexander Fuchs # update of run_test: # - works also under windows # - measures cpu time, not wall clock time, per test case # - works also for smtlib directories # BROKEN: # doesn't work as intended, due to problems on windows. # so t...
apache-2.0
8,003,328,896,713,322,000
34.011236
136
0.554108
false
gioman/QGIS
python/plugins/processing/gui/RectangleMapTool.py
2
3957
# -*- coding: utf-8 -*- """ *************************************************************************** RectangleMapTool.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **********************...
gpl-2.0
-8,270,287,371,011,833,000
34.017699
81
0.566844
false
baibaichen/eagle
eagle-external/hadoop_jmx_collector/lib/kafka-python/test/fixtures.py
21
8637
import logging import os import os.path import shutil import subprocess import tempfile from six.moves import urllib import uuid from six.moves.urllib.parse import urlparse # pylint: disable-msg=E0611 from test.service import ExternalService, SpawnedService from test.testutil import get_open_port class Fixture(objec...
apache-2.0
-2,447,545,740,143,481,000
35.597458
113
0.575431
false
hang-qi/models
neural_gpu/data_utils.py
17
16158
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
6,475,924,398,456,513,000
34.356674
80
0.563622
false
rosswhitfield/mantid
scripts/Muon/GUI/Common/difference_table_widget/difference_widget_presenter.py
3
1902
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2019 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from...
gpl-3.0
-3,301,874,080,768,597,500
40.347826
110
0.719243
false
atztogo/phono3py
phono3py/other/isotope.py
1
13495
# Copyright (C) 2015 Atsushi Togo # All rights reserved. # # This file is part of phono3py. # # 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 # noti...
bsd-3-clause
516,168,749,323,169,340
37.557143
77
0.543905
false
s20121035/rk3288_android5.1_repo
cts/apps/CameraITS/tests/scene1/test_yuv_plus_raw.py
2
2377
# Copyright 2014 The Android Open Source Project # # 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...
gpl-3.0
-5,577,174,279,939,786,000
37.33871
79
0.648296
false
foxdog-studios/pyddp
ddp/pubsub/ponger.py
1
1178
# -*- coding: utf-8 -*- # Copyright 2014 Foxdog Studios # # 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 l...
apache-2.0
-2,490,839,697,122,580,000
31.722222
74
0.720713
false
anistark/mozillians
mozillians/phonebook/tests/test_profile_edit.py
2
10910
from django.core.urlresolvers import reverse from mock import patch from nose.tools import eq_, ok_ from requests import ConnectionError from mozillians.common.tests import TestCase from mozillians.geo.models import Country from mozillians.geo.tests import CountryFactory, RegionFactory, CityFactory from mozillians.ph...
bsd-3-clause
2,644,026,904,069,464,600
41.286822
98
0.589918
false
VenturaDelMonte/socialnetworks
lessons/lab/exp2.py
1
2096
#!/usr/bin/python import sys import math from lesson1 import randomGraph, diameter, averageClustering from lesson2 import * eps = 1e-12 rep = int(sys.argv[1]) #number of repetitions nodes = int(sys.argv[2]) #number of nodes sep = float(sys.argv[3]) #experiments for p = sep, 2sep, 3sep, ..., 1 k_threshold...
mit
2,672,493,682,791,091,000
28.405797
79
0.634542
false
UO-CIS-322/proj6-mongo
memos/flask_main.py
2
3498
""" Flask web app connects to Mongo database. Keep a simple list of dated memoranda. Representation conventions for dates: - We use Arrow objects when we want to manipulate dates, but for all storage in database, in session or g objects, or anything else that needs a text representation, we use ISO date ...
artistic-2.0
-6,580,291,621,084,850,000
22.32
78
0.624643
false
gannetson/sportschooldeopenlucht
apps/love/fields.py
1
1426
from django.contrib.contenttypes.generic import GenericRelation from django.contrib.contenttypes.models import ContentType from django.db.models import Q from django.utils.functional import lazy class LoveDeclarationRelation(GenericRelation): """ A :class:`~django.contrib.contenttypes.generic.GenericRelation`...
bsd-3-clause
8,221,373,981,416,151,000
31.409091
111
0.650771
false
thorwhalen/ut
pplot/date_ticks.py
1
3936
import numpy as np from datetime import datetime as dt unit_str_to_unit_in_seconds = { 'day': 3600 * 24, 'hour': 3600, 'h': 3600, 'minute': 60, 'mn': 60, 'second': 1, 's': 1, 'millisecond': 0.001, 'ms': 0.001, 'microsecond': 1e-6, 'us': 1e-6, } unit_in_seconds = np.array([ ...
mit
152,808,976,147,584,480
29.045802
118
0.565549
false
sencha/chromium-spacewalk
tools/valgrind/asan/asan_symbolize.py
17
1357
#!/usr/bin/env python # Copyright (c) 2012 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. from third_party import asan_symbolize import os import re import sys def fix_filename(file_name): for path_to_cut in sys.argv...
bsd-3-clause
-3,872,403,566,249,856,500
26.14
74
0.665438
false
sarthak-srivastava/chat
chat_app/chat/settings.py
1
1164
from django.conf import settings NOTIFY_USERS_ON_ENTER_OR_LEAVE_ROOMS = getattr(settings, 'NOTIFY_USERS_ON_ENTER_OR_LEAVE_ROOMS', True) MSG_TYPE_MESSAGE = 0 # For standard messages MSG_TYPE_WARNING = 1 # For yellow messages MSG_TYPE_ALERT = 2 # For red & dangerous alerts MSG_TYPE_MUTED = 3 # For just OK informati...
mit
6,726,885,924,615,262,000
40.571429
102
0.562715
false
TanakritBenz/leetcode-adventure
friend_circles.py
1
1532
def buildGraph(friends): """ Helper function to build a graph representation from the 'friends' matrix For Example: if input 'friends' = ['YYNN', 'YYYN', 'NYYN', 'NNNY'] Output will be 'vertices' = set([0, 1, 2, 3]) 'edges' = {0: set([0, 1]), ...
gpl-2.0
-5,092,389,222,722,884,000
33.044444
89
0.511097
false
Byron/bcore
src/python/bapp/schema.py
1
1166
#-*-coding:utf-8-*- """ @package bapp.schema @brief All environment schemas used in the pipeline core @author Sebastian Thiel @copyright [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl.html) """ from __future__ import unicode_literals __all__ = [] from butility import Path from bkvstore import (...
lgpl-3.0
1,726,759,208,677,361,000
30.513514
86
0.422813
false
stannynuytkens/youtube-dl
youtube_dl/extractor/motherless.py
4
7867
from __future__ import unicode_literals import datetime import re from .common import InfoExtractor from ..compat import compat_urlparse from ..utils import ( ExtractorError, InAdvancePagedList, orderedSet, str_to_int, unified_strdate, ) class MotherlessIE(InfoExtractor): _VALID_URL = r'http...
unlicense
8,019,355,362,960,142,000
37.37561
102
0.509724
false
Ignoble61/service.smartish.widgets
serviceFunctions.py
1
54962
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2012 Team-XBMC # # 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...
gpl-2.0
-7,838,391,187,766,050,000
47.467372
947
0.549962
false
ichuang/sympy
sympy/polys/tests/test_polyclasses.py
2
11852
"""Tests for OO layer of several polynomial representations. """ from sympy.polys.polyclasses import ( DMP, init_normal_DMP, DMF, init_normal_DMF, ANP, init_normal_ANP, ) from sympy.polys.domains import ZZ, QQ from sympy.polys.specialpolys import f_4 from sympy.polys.polyerrors import ( ExactQuotient...
bsd-3-clause
-6,849,658,554,011,959,000
22.751503
98
0.444904
false
hatchetation/freeipa
ipapython/platform/fedora16.py
1
9991
# Author: Alexander Bokovoy <abokovoy@redhat.com> # # Copyright (C) 2011 Red Hat # see file 'COPYING' for use and warranty information # # 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 ...
gpl-3.0
-5,763,098,073,647,504,000
45.686916
110
0.687919
false
elliotthill/django-oscar
oscar/apps/address/migrations/0006_auto__add_unique_useraddress_hash_user.py
16
7096
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from oscar.core.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME class Migration(SchemaMigration): def forwards(self, orm): # Adding unique constraint on 'UserAddress', fie...
bsd-3-clause
-1,272,559,203,242,485,000
75.301075
182
0.557074
false
5GExchange/escape
test/testframework/testcases/perf.py
2
5795
# Copyright 2017 Janos Czentye # # 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, s...
apache-2.0
1,511,885,670,726,187,000
38.965517
77
0.641933
false
jiahaoliang/group-based-policy
gbpservice/neutron/services/grouppolicy/common/exceptions.py
1
11892
# 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
5,639,468,632,870,441,000
35.478528
79
0.707198
false
Microvellum/Fluid-Designer
win64-vc/2.78/scripts/addons/io_import_dxf/dxfgrabber/sections.py
5
2357
# Purpose: handle dxf sections # Created: 21.07.2012, taken from my ezdxf project # Copyright (C) 2012, Manfred Moitzi # License: MIT License from __future__ import unicode_literals __author__ = "mozman <mozman@gmx.at>" from .codepage import toencoding from .defaultchunk import DefaultChunk, iterchunks from .headersec...
gpl-3.0
-5,671,919,442,779,845,000
32.671429
81
0.627068
false
stackdio/stackdio
stackdio/core/serializers.py
2
16330
# -*- coding: utf-8 -*- # Copyright 2017, Digital Reasoning # # 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
2,464,084,715,326,547,500
33.451477
100
0.625597
false
SinZ163/EdisonSandbox
twitter.py
1
3749
# coding=UTF8 from __future__ import absolute_import, print_function #Twitter API from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream from tweepy import API #Python API import json import time import mraa #Intel API import requests #My API from I2cLCDRGBBackLit impo...
mit
8,585,144,835,983,826,000
34.704762
123
0.606828
false
pescobar/easybuild-framework
test/framework/sandbox/easybuild/easyblocks/generic/modulerc.py
2
1464
## # Copyright 2009-2020 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
-6,024,385,575,238,901,000
30.826087
96
0.728142
false
Tomsod/gemrb
gemrb/GUIScripts/iwd2/SPParty2.py
3
1253
# GemRB - Infinity Engine Emulator # Copyright (C) 2003 The GemRB Project # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later versi...
gpl-2.0
3,578,537,500,143,461,000
32.864865
81
0.743017
false
allenlavoie/tensorflow
tensorflow/contrib/signal/python/kernel_tests/spectral_ops_test.py
25
14294
# Copyright 2017 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
-2,508,023,253,568,214,000
42.054217
80
0.635441
false
edcast-inc/edx-platform-edcast
lms/djangoapps/instructor_task/tasks.py
29
11526
""" This file contains tasks that are designed to perform background operations on the running state of a course. At present, these tasks all operate on StudentModule objects in one way or another, so they share a visitor architecture. Each task defines an "update function" that takes a module_descriptor, a particula...
agpl-3.0
3,658,851,030,294,172,700
44.377953
112
0.735207
false
wlx2015/dstat
plugins/dstat_vz_io.py
4
2736
### Author: Dag Wieers <dag@wieers.com> ### Example content for /proc/bc/<veid>/ioacct # read 2773011640320 # write 2095707136000 # dirty 4500342390784 # cancel 4080624041984 # missed ...
gpl-2.0
-150,684,117,891,641,200
39.835821
98
0.472588
false
willingc/oh-mainline
vendor/packages/scrapy/scrapy/tests/test_utils_response.py
28
3908
import os import unittest import urlparse from scrapy.http import Response, TextResponse, HtmlResponse from scrapy.utils.response import body_or_str, response_httprepr, open_in_browser, \ get_meta_refresh __doctests__ = ['scrapy.utils.response'] class ResponseUtilsTest(unittest.TestCase): dummy_response = Te...
agpl-3.0
-6,672,220,744,340,988,000
44.976471
117
0.635107
false
infobloxopen/infoblox-netmri
infoblox_netmri/api/broker/v2_10_0/event_broker.py
16
42430
from ..broker import Broker class EventBroker(Broker): controller = "events" def index(self, **kwargs): """Lists the available events. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of the various ways to query lists, using this method is most efficient. ...
apache-2.0
8,320,916,558,051,046,000
46.144444
510
0.577587
false
redhat-openstack/glance_store
glance_store/location.py
3
6035
# Copyright 2011 OpenStack Foundation # 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 requ...
apache-2.0
-1,717,081,614,566,471,400
34.292398
79
0.658824
false
axltxl/zenfig
zenfig/kit.py
1
1974
# -*- coding: utf-8 -*- """ zenfig.kit ~~~~~~~~ Kit interface :copyright: (c) 2016 by Alejandro Ricoveri :license: MIT, see LICENSE for more details. """ import os import re from . import log from .util import autolog from .kits import git, local, KitException from .kits.git import GitRepoKit @autolog def get_k...
mit
4,460,714,536,449,111,000
28.029412
79
0.633739
false
100sms/yibai-python-sdk
demo/YibaiClientTest.py
1
1483
# encoding=utf8 import json from yibai.api import * server_url = 'https://sms.100sms.cn/api' #此处为你的apikey,可登录https://web.100sms.cn/ 查看你的apikey apikey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' client = YibaiClient(server_url, apikey) def test_sms_batch_submit(): try: response = client.sms_batch_submit([ ...
mit
-6,034,683,769,823,462,000
30.133333
95
0.645967
false
tigerneil/chainer
tests/chainer_tests/functions_tests/math_tests/test_sum.py
11
2009
import unittest import numpy import chainer from chainer import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr from chainer.testing import condition class TestSum(unittest.TestCase): def setUp(self): self.x = numpy.rand...
mit
1,990,287,462,342,079,700
27.7
77
0.627178
false
ksiomelo/cubix
semantics/search.py
1
10275
#from org.openrdf.model import * #from org.openrdf.query import * #from org.openrdf.repository import * #from org.openrdf.rio import * #from org.openrdf.repository.sail import * #from org.openrdf.repository.manager import RemoteRepositoryManager #from org.openrdf.query.resultio import * ##from org.openrdf.repository.sa...
apache-2.0
-8,049,403,118,015,015,000
34.801394
114
0.511533
false
leopoul/ncclient
ncclient/operations/session.py
6
1434
# Copyright 2009 Shikhar Bhushan # # 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 writin...
apache-2.0
-8,597,631,695,114,993,000
31.590909
98
0.699442
false
snegovick/bcam
bcam/tool_op_offset_follow.py
1
8940
from __future__ import absolute_import, division, print_function import math from bcam.tool_operation import ToolOperation, TOEnum from bcam.tool_abstract_follow import TOAbstractFollow from bcam.generalized_setting import TOSetting from bcam.calc_utils import (find_vect_normal, mk_vect, normalize, vect_sum, ...
gpl-3.0
-2,979,988,364,097,858,600
37.869565
136
0.482662
false
opennode/waldur-mastermind
src/waldur_mastermind/invoices/handlers.py
1
6194
import datetime import logging from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.db import transaction from django.db.models import Q from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from rest_framework.exceptions import Validati...
mit
-8,756,834,033,047,450,000
29.97
87
0.642073
false
TheTimmy/spack
lib/spack/spack/cmd/url.py
2
12655
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
-4,598,628,802,133,864,400
31.87013
78
0.59194
false
dotunolafunmiloye/spark
python/pyspark/files.py
10
1896
# # 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 us...
apache-2.0
6,849,211,554,122,222,000
33.472727
80
0.694093
false
dpmatthews/cylc
lib/cylc/subprocpool.py
2
14792
#!/usr/bin/env python3 # THIS FILE IS PART OF THE CYLC SUITE ENGINE. # Copyright (C) 2008-2019 NIWA & British Crown (Met Office) & Contributors. # # 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...
gpl-3.0
1,397,070,487,950,449,200
39.526027
79
0.591333
false
onurozuduru/graph-of-likes
generate_graph.py
1
7131
################################################################################## #File: generate_graph.py #Author: Onur Ozuduru # e-mail: onur.ozuduru { at } gmail.com # github: github.com/onurozuduru # twitter: twitter.com/OnurOzuduru # #License: The MIT License (MIT) # # Copyright (c) 2016 Onur Ozuduru # ...
mit
3,990,361,394,095,999,000
43.018519
200
0.653765
false
jianghuaw/nova
nova/tests/unit/api/openstack/compute/test_instance_usage_audit_log.py
9
8866
# Copyright (c) 2012 OpenStack Foundation # 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 ...
apache-2.0
8,930,285,025,171,244,000
40.624413
79
0.634897
false
Lujeni/ansible
test/units/modules/source_control/gitlab/test_gitlab_deploy_key.py
13
4137
# -*- coding: utf-8 -*- # Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import import pytest from ansible.modules.source_control.gitlab.gitlab_deploy_key import GitLabDeployKey ...
gpl-3.0
-8,097,522,561,245,702,000
37.663551
122
0.665216
false
alikins/virt-who
event.py
2
12960
""" Loop for reading events from libvirt, based on example from libvirt-python. """ ################################################################################# # Start off by implementing a general purpose event loop for anyones use ##############################################################################...
gpl-2.0
130,258,314,230,258,900
32.83812
91
0.59892
false
Changaco/oh-mainline
vendor/packages/gdata/tests/gdata_tests/gauth_test.py
16
30751
#!/usr/bin/env python # # Copyright (C) 2009 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 ...
agpl-3.0
-3,943,616,419,657,142,300
45.172673
83
0.687295
false
yasserglez/pytiger2c
packages/pytiger2c/ast/__init__.py
1
4014
# -*- coding: utf-8 -*- """ Definición de los nodos del árbol de sintáxis abstracta. """ from pytiger2c.ast.assignmentnode import AssignmentNode from pytiger2c.ast.ifthenstatementnode import IfThenStatementNode from pytiger2c.ast.whilestatementnode import WhileStatementNode from pytiger2c.ast.forstatementnode import...
mit
-3,014,361,298,434,665,500
44.067416
89
0.84717
false
Ultimaker/Cura
scripts/line_length_checker.py
1
2386
import re import sys def getValue(line: str, key: str, default = None): """Convenience function that finds the value in a line of g-code. When requesting key = x from line "G1 X100" the value 100 is returned. """ if not key in line or (';' in line and line.find(key) > line.find(';')): return de...
lgpl-3.0
-3,099,304,207,897,882,000
33.085714
104
0.533529
false
lnielsen/invenio
invenio/legacy/goto/webinterface.py
2
3517
## This file is part of Invenio. ## Copyright (C) 2012, 2013, 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) any later versio...
gpl-2.0
7,060,681,742,422,500,000
42.419753
88
0.610179
false
wutron/dlcoal
dlcoal/deps/rasmus/textdraw.py
4
2080
# python libs import sys # rasmus libs from rasmus import util class TextCanvas: """Draw ascii art on a automatically growing matrix""" def __init__(self, default=' '): self.mat = util.Dict(dim=2, default=default) self.default = default def set(self, x, y, char): se...
gpl-2.0
1,567,965,880,281,946,000
25.329114
64
0.402885
false
hub-cap/lady-rainicorn
rainicorn/openstack/common/loopingcall.py
1
4681
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may #...
apache-2.0
-6,199,461,647,888,024,000
30.85034
78
0.58919
false
jonasjberg/autonameow
tests/devscripts/test_find_todo_comments.py
1
21275
# -*- coding: utf-8 -*- # Copyright(c) 2016-2020 Jonas Sjöberg <autonameow@jonasjberg.com> # Source repository: https://github.com/jonasjberg/autonameow # # This file is part of autonameow. # # autonameow is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public L...
gpl-2.0
-4,907,480,109,364,437,000
37.678182
90
0.598505
false
LinuxChristian/home-assistant
homeassistant/components/fan/isy994.py
2
4317
""" Support for ISY994 fans. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/fan.isy994/ """ import logging from typing import Callable from homeassistant.components.fan import (FanEntity, DOMAIN, SPEED_OFF, SPEE...
apache-2.0
6,836,543,730,617,045,000
31.216418
79
0.615474
false
zmywahrheit/PPB
PPB_calculate.py
2
1499
###############Plasma Protein Binding (PPB) Prediction ################### #Author:Mengyuan Zhu, Binghe Wang #Email: mzhu7@gsu.edu #Department of Chemistry #Georgia State University #Usage: python PPB_calculate.py filename ########################################################################## import pybel from c...
gpl-2.0
636,421,285,610,724,700
22.793651
74
0.643763
false
mscherer/ansible
plugins/inventory/vagrant.py
37
3660
#!/usr/bin/env python """ Vagrant external inventory script. Automatically finds the IP of the booted vagrant vm(s), and returns it under the host group 'vagrant' Example Vagrant configuration using this script: config.vm.provision :ansible do |ansible| ansible.playbook = "./provision/your_playbook.yml" ...
gpl-3.0
-3,744,634,004,048,204,000
26.727273
94
0.644809
false
jonyroda97/redbot-amigosprovaveis
lib/numpy/lib/tests/test_mixins.py
13
6856
from __future__ import division, absolute_import, print_function import numbers import operator import sys import numpy as np from numpy.testing import ( TestCase, run_module_suite, assert_, assert_equal, assert_raises) PY2 = sys.version_info.major < 3 # NOTE: This class should be kept as an exact copy of the...
gpl-3.0
4,439,336,615,723,455,500
30.449541
78
0.580951
false
mcoder/private-set-intersection
simulate_psi.py
1
3466
__author__ = 'Milinda Perera' import random as pyrandom from time import time from modules.psi_3_round_paillier import PSI3RoundPaillier from modules.psi_2_round_paillier import PSI2RoundPaillier from modules.psi_2_round_elgamal import PSI2RoundElGamal def timer(func, *pargs, **kargs): """ Measures the time...
mit
-263,777,740,500,042,850
38.850575
167
0.675995
false
JioCloud/puppet-contrail
contrail/files/enable_kernel_core.py
4
1719
import re import tempfile class ExtList (list): def findex(self, fun): for i, x in enumerate(self): if fun(x): return i raise LookupError('No matching element in list') # end def findex # end class ExtList def enable_kernel_core(): ''' enable_kernel_c...
apache-2.0
-1,208,264,068,724,775,000
30.254545
69
0.484002
false
noroutine/ansible
lib/ansible/modules/network/iosxr/iosxr_system.py
5
8085
#!/usr/bin/python # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'support...
gpl-3.0
6,248,513,036,235,833,000
30.705882
92
0.634879
false
mohamedhagag/community-addons
document_sftp/document_sftp_server.py
1
1792
# -*- coding: utf-8 -*- # © 2016 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from paramiko import AUTH_SUCCESSFUL, AUTH_FAILED,\ OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED, OPEN_SUCCEEDED,\ RSAKey, ServerInterface from paramiko.py3compat import decodebytes from o...
agpl-3.0
-4,122,523,796,936,543,700
35.55102
75
0.594082
false
freedv/codec2
octave/fskdemodgui.py
1
5574
#!/usr/bin/env python # # fsk_demod Statistics GUI # Accepts the stats output from fsk_demod on stdin, and plots it. # # Mark Jessop 2016-03-13 <vk5qi@rfhead.net> # # NOTE: This is intended to be run on a 'live' stream of samples, and hence expects # updates at about 10Hz. Anything faster will fill up the input queue a...
lgpl-2.1
9,091,397,421,565,328,000
29.79558
151
0.693936
false
handroissuazo/tensorflow
tensorflow/contrib/distributions/python/ops/gumbel.py
2
7559
# 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,956,107,652,797,558,000
33.20362
92
0.653129
false
geimer/easybuild-easyblocks
easybuild/easyblocks/t/tbb.py
4
3733
## # Copyright 2009-2013 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (htt...
gpl-2.0
4,316,174,890,114,890,000
37.484536
111
0.657112
false
efforia/django-feedly
feedly/urls.py
1
1126
#!/usr/bin/python # # This file is part of django-feedly project. # # Copyright (C) 2011-2020 William Oliveira de Lagos <william.lagos@icloud.com> # # Feedly is free software: you can redistribute it and/or modify # it under the terms of the Lesser GNU General Public License as published by # the Free Software ...
lgpl-3.0
2,359,775,990,932,228,000
32.121212
78
0.698046
false
ChromiumWebApps/chromium
tools/telemetry/examples/telemetry_perf_test.py
4
1325
#!/usr/bin/env python # Copyright (c) 2012 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 os import sys import time sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir)) from telemetry.core import b...
bsd-3-clause
-7,114,342,853,813,830,000
27.191489
72
0.653585
false
benrudolph/commcare-hq
custom/bihar/calculations/utils/calculations.py
4
1986
from casexml.apps.case.models import CommCareCase def get_actions(case, action_filter=lambda a: True, reverse=False): ordered = reversed if reverse else lambda x: x for action in ordered(case.actions): if action_filter(action): yield action def get_forms(case, action_filter=lambda a: Tru...
bsd-3-clause
-5,385,246,741,038,561,000
33.258621
95
0.636959
false
stevenliuit/3vilTwinAttacker
Modules/deauth_func.py
1
15164
from PyQt4.QtGui import * from PyQt4.QtCore import * from subprocess import Popen,PIPE from scapy.all import * from Dns_Func import frm_dhcp_Attack import threading from os import popen,system,getuid,path,makedirs from re import search,compile,match from Core.Settings import frm_Settings from Modules.fuc_airodump impo...
mit
-4,174,787,915,079,112,000
42.449857
145
0.512662
false
loads/molotov
molotov/util.py
1
5526
from io import StringIO import traceback import sys import functools import json import os import asyncio import time import threading import platform from aiohttp import ClientSession, __version__ # this lib works for CPython 3.7+ if platform.python_implementation() == "PyPy" or sys.version_info.minor < 7: impor...
apache-2.0
4,590,278,566,154,839,600
23.669643
86
0.621245
false
hb9kns/PyBitmessage
dev/ssltest.py
1
3263
import os import select import socket import ssl import sys import traceback HOST = "127.0.0.1" PORT = 8912 def sslProtocolVersion(): # sslProtocolVersion if sys.version_info >= (2,7,13): # this means TLSv1 or higher # in the future change to # ssl.PROTOCOL_TLS1.2 return ssl.PR...
mit
8,244,031,066,322,237,000
33.712766
262
0.611401
false
ilastikdev/ilastik
ilastik/plugins_default/vigra_objfeats_skeleton.py
4
3155
############################################################################### # ilastik: interactive learning and segmentation toolkit # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/or # mod...
gpl-3.0
-2,984,747,932,094,494,000
36.559524
159
0.636767
false
chromium/chromium
third_party/protobuf/python/google/protobuf/internal/extension_dict.py
20
8443
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
bsd-3-clause
3,795,216,932,513,353,700
38.638498
79
0.710648
false
dymkowsk/mantid
scripts/Interface/reduction_gui/widgets/output.py
3
1650
from __future__ import (absolute_import, division, print_function) from PyQt4 import QtGui from reduction_gui.reduction.output_script import Output from reduction_gui.widgets.base_widget import BaseWidget import ui.ui_hfir_output class OutputWidget(BaseWidget): """ Widget that presents the transmission op...
gpl-3.0
1,884,327,385,509,955,600
30.132075
80
0.625455
false
TimeWz667/Kamanian
example/OOP/O2.2 SS, CTBN.py
1
1302
import complexism as cx import epidag as dag __author__ = 'TimeWz667' # Create a new blueprint of CTBN bp = cx.BlueprintCTBN('Test') # Add microstates bp.add_microstate('A', ['N', 'Y']) bp.add_microstate('B', ['N', 'Y']) # Name combinations of microstates as states bp.add_state('A', A='Y') bp.add_state('a', A='N') ...
mit
-1,086,134,380,534,202,600
21.842105
54
0.64977
false
virtualopensystems/neutron
neutron/plugins/bigswitch/plugin.py
1
51020
# Copyright 2012 Big Switch Networks, 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...
apache-2.0
-4,382,929,999,179,187,700
43.481255
79
0.575853
false
vmindru/ansible
lib/ansible/modules/network/aci/aci_switch_leaf_selector.py
12
10381
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_...
gpl-3.0
-2,787,632,725,632,114,000
29.442815
153
0.610731
false
taynaud/sparkit-learn
splearn/preprocessing/tests/test_data.py
2
1915
# -*- coding: utf-8 -*- """ """ from numpy.testing import assert_array_almost_equal from sklearn.preprocessing import StandardScaler from splearn.preprocessing.data import SparkStandardScaler from splearn.utils.testing import SplearnTestCase class TestSparkStandardScaler(SplearnTestCase): def test_same_fit_tran...
apache-2.0
4,894,530,815,103,312,000
32.596491
61
0.661619
false
alexgorban/models
research/delf/delf/python/examples/extract_boxes.py
1
8602
# Copyright 2017 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 applicab...
apache-2.0
4,637,331,231,244,665,000
32.733333
80
0.622646
false
pierreberthet/local-scripts
anova2.py
1
7624
import numpy as np import json import matplotlib #matplotlib.use('Agg') import pylab as pl import sys import pprint as pp import difflib #from difflib_data import * # Plot the different figures for the merged spikes and voltages recordings. # This file, as the MergeSpikefiles.py should be one level up than Test/..., th...
gpl-2.0
-2,175,607,239,564,980,700
28.099237
104
0.586044
false
duduniao85/fundbi
PythonBasic/helper/meta_01.py
1
1777
#!/usr/bin/env python # coding: utf-8 #http://python-3-patterns-idioms-test.readthedocs.org/en/latest/Metaprogramming.html class Event(object): events = [] # static def __init__(self, action, time): self.action = action self.time = time Event.events.append(self) def __cmp__ (self,...
gpl-3.0
6,692,018,167,835,117,000
32.54717
84
0.599887
false