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
GregDMeyer/dynamite
dynamite/__init__.py
1
6677
import slepc4py from . import validate from ._backend import bbuild # handle global configuration class _Config: """ Package-wide configuration of dynamite. """ initialized = False mock_backend = False _L = None _shell = False _info_level = 0 _subspace = None _gpu = False ...
mit
3,520,938,126,432,504,000
30.200935
97
0.588438
false
ryfeus/lambda-packs
Tensorflow_Pandas_Numpy/source3.6/pandas/io/pytables.py
1
164197
""" High level interface to PyTables for reading and writing pandas data structures to disk """ # pylint: disable-msg=E1101,W0613,W0603 from datetime import datetime, date import time import re import copy import itertools import warnings import os from pandas.core.dtypes.common import ( is_list_like, is_cate...
mit
-3,299,304,000,866,598,000
33.094061
104
0.540753
false
kevinlee12/oppia
scripts/linters/test_files/invalid_pylint_id.py
4
1432
# coding: utf-8 # # 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 requi...
apache-2.0
-9,015,504,656,745,123,000
32.302326
78
0.695531
false
borysiasty/inasafe
safe/impact_statistics/postprocessor_manager.py
1
30787
# coding=utf-8 """ InaSAFE Disaster risk assessment tool by AusAid - **Postprocessor Manager** 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 Software Foundati...
gpl-3.0
-8,241,652,014,553,810,000
40.830163
79
0.507
false
andreimacavei/coala
coalib/settings/SectionFilling.py
2
4462
import os import copy from coalib.bears.BEAR_KIND import BEAR_KIND from coalib.collecting.Collectors import collect_bears from coalib.misc.Constants import Constants from coalib.output.printers.LOG_LEVEL import LOG_LEVEL from coalib.settings.Setting import Setting, path_list from coalib.misc.i18n import _ def fill_s...
agpl-3.0
-4,929,983,999,071,683,000
42.745098
79
0.565442
false
Ferreter/Udemy-Site-Hacker
Udemy_Hacker.py
1
8939
import time import webbrowser #Hacking courses only def hacking_courses(): webbrowser.open('https://www.udemy.com/payment/checkout/?boId=931384&boType=course&couponCode=JERRYBANFIELD') time.sleep(5) webbrowser.open_new_tab('https://www.udemy.com/payment/checkout/?boType=course&boId=687824&couponCode=freebee...
mit
-1,669,437,350,995,405,000
78.8125
134
0.770556
false
soliverr/hamster
src/hamster/lib/desktop.py
8
4767
# - coding: utf-8 - # Copyright (C) 2007-2012 Toms Baugis <toms.baugis@gmail.com> # This file is part of Project Hamster. # Project Hamster 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 o...
gpl-3.0
2,644,497,486,077,284,400
38.725
107
0.591987
false
google-research/ravens
ravens/models/resnet.py
1
10857
# coding=utf-8 # Copyright 2021 The Ravens Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-3,319,433,561,253,465,600
29.756374
80
0.587547
false
ivmech/iviny-scope
lib/xlsxwriter/test/comparison/test_chart_format03.py
1
2321
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013, John McNamara, jmcnamara@cpan.org # import unittest import os from ...workbook import Workbook from ..helperfunctions import _compare_xlsx_files class TestCompareXLSXFiles(unittest.TestC...
gpl-3.0
-3,642,761,734,929,751,600
25.375
79
0.479966
false
misha/cowbot
bot.py
2
2041
import praw import os import re import pymongo from cowpy import cow ''' Compile the pattern we use to find cowbot directives. ''' directive=re.compile('@cowbot(:(?P<actor>[A-Za-z]+))?') ''' Define the user-agent for this bot, as well as a link to our codebase. ''' agent='[```cowbot/1.0```](https://github.com/msolite...
mit
-7,368,207,890,317,146,000
30.890625
84
0.650171
false
tboyce1/home-assistant
homeassistant/components/notify/slack.py
9
6243
""" Slack platform for notify component. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.slack/ """ import logging import requests from requests.auth import HTTPBasicAuth from requests.auth import HTTPDigestAuth import voluptuous as vol import ho...
apache-2.0
7,360,571,032,604,720,000
36.383234
79
0.564793
false
Lambdanaut/crits
crits/vocabulary/objects.py
7
3684
from crits.vocabulary.vocab import vocab class ObjectTypes(vocab): """ Vocabulary for Object Types. """ ADJUST_TOKEN = "Adjust Token" API_KEY = "API Key" AS_NUMBER = "AS Number" AS_NAME = "AS Name" BASE64_ALPHA = "Base64 Alphabet" C2_URL = "C2 URL" CHECKSUM_CRC16 = "Checksum C...
mit
-7,601,617,736,197,083,000
31.315789
65
0.637622
false
AlexanderSavelyev/rdkit
rdkit/ML/files.py
4
2561
# copyright 2000 greg landrum """ Generic file manipulation stuff """ from __future__ import print_function import numpy import string,re class ReFile: """convenience class for dealing with files with comments blank (all whitespace) lines, and lines beginning with comment characters are skipped. anything...
bsd-3-clause
-1,793,390,775,726,278,700
22.495413
73
0.655994
false
spaceone/pyjs
pyjswidgets/pyjamas/Location.py
7
2412
from __pyjamas__ import JS def makeUrlDict(urlstring): dict = {} pairs = urlstring.split("&") for pair in pairs: if len(pair) < 3: continue kv = pair.split("=",1) dict[kv[0]] = kv[1] return dict def makeUrlStringFromDict(d): pairs = [] for k,v in d.iteritems(): ...
apache-2.0
-5,190,614,815,928,308,000
24.125
68
0.608624
false
0k/odoo
addons/website/models/website.py
1
34511
# -*- coding: utf-8 -*- import cStringIO import contextlib import datetime import hashlib import inspect import itertools import logging import math import mimetypes import unicodedata import os import re import urlparse from PIL import Image from sys import maxint import werkzeug # optional python-slugify import (ht...
agpl-3.0
4,824,467,224,223,267,000
40.084524
168
0.571615
false
yeyanchao/calibre
src/calibre/db/lazy.py
5
2408
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import weakref...
gpl-3.0
6,975,873,587,017,298,000
23.323232
79
0.600083
false
oliverodaa/cs184-final-proj
dwinelle/video/utils.py
1
17046
# This file is part of dwinelle-tools. # dwinelle-tools 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. # dwinelle-tools is distribut...
mit
-3,963,253,981,346,418,700
28.28866
113
0.547108
false
akretion/e-commerce
sale_automatic_workflow/automatic_workflow_job.py
2
6272
# -*- coding: utf-8 -*- ############################################################################### # # sale_automatic_workflow for OpenERP # Copyright (C) 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com> # Copyright 2013 Camptocamp SA (Guewen Baconnier) # # This program is free software: you ...
agpl-3.0
586,551,917,778,152,600
41.659864
79
0.610269
false
pwwang/pyppl
pipen/progressbar.py
1
3737
"""Provide the PipelinePBar and ProcPBar classes""" import enlighten from .utils import truncate_text # [12/02/20 12:44:06] I /main # pipeline: 100%| # | desc_len | PBAR_DESC_LEN = 14 class ProcPBar: """The progress bar for processes""" def __init__(self, manager: enlighten.Manager,...
apache-2.0
2,220,093,775,925,245,400
34.590476
78
0.609847
false
madprime/django_study_enrollment
django_study_enrollment/settings.py
2
2470
""" Django settings for django_study_enrollment project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(B...
mit
-7,560,393,665,942,917,000
25
71
0.727126
false
foursquare/pants
contrib/mypy/tests/python/pants_test/contrib/mypy/tasks/test_mypy_integration.py
1
1037
# coding=utf-8 # Copyright 2017 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals from pants_test.pants_run_integration_test import PantsRunIntegrationTest class MypyInt...
apache-2.0
1,149,860,308,679,381,900
37.407407
84
0.683703
false
akbargumbira/inasafe
safe/test/test_python_pep.py
2
3944
# coding=utf-8 import unittest import os import sys from subprocess import Popen, PIPE __copyright__ = "Copyright 2016, The InaSAFE Project" __license__ = "GPL version 3" __email__ = "info@inasafe.org" __revision__ = '$Format:%H$' class TestPythonPep(unittest.TestCase): def test_pep8(self): """Test if...
gpl-3.0
9,126,667,991,805,595,000
36.923077
78
0.525609
false
flyfj/deepmodels
deepmodels/tf/core/commons.py
1
8262
"""Shared definition for constants, classes. Only put those that might be accessed from different modules. Keep module specific definition isolated. """ # TODO(jiefeng): merge commons and update core code. import os import sys # add tensorflow model directory. cur_fn_dir = os.path.dirname(os.path.realpath(__file__)...
mit
-2,688,969,262,594,791,400
23.443787
79
0.637134
false
jeffbaumes/jeffbaumes-vtk
Examples/VisualizationAlgorithms/Python/warpComb.py
15
3241
#!/usr/bin/env python # This example demonstrates how to extract "computational planes" from # a structured dataset. Structured data has a natural, logical # coordinate system based on i-j-k indices. Specifying imin,imax, # jmin,jmax, kmin,kmax pairs can indicate a point, line, plane, or # volume of data. # # In this ...
bsd-3-clause
8,390,264,345,268,519,000
34.615385
70
0.784634
false
kiyukuta/chainer
chainer/datasets/tuple_dataset.py
7
1213
import six class TupleDataset(object): """Dataset of a tuple of datasets. It combines multiple datasets into one dataset. Each example is represented by a tuple whose ``i``-th item corresponds to the i-th dataset. Args: datasets: Underlying datasets. The ``i``-th one is used for the ...
mit
-1,437,035,660,840,853,200
30.102564
79
0.576257
false
nharraud/b2share
invenio/modules/accounts/bundles.py
8
1222
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
gpl-2.0
134,847,907,403,869,180
32.027027
79
0.716039
false
lyoniionly/django-friendship
friendship/templatetags/friendshiptags.py
3
1209
from django import template from friendship.models import Friend, Follow register = template.Library() @register.inclusion_tag('friendship/templatetags/friends.html') def friends(user): """ Simple tag to grab all friends """ return {'friends': Friend.objects.friends(user)} @register.inclusion_tag(...
bsd-3-clause
1,091,907,820,489,989,500
25.866667
78
0.718776
false
crossbario/crossbarexamples
authentication/anonymous/static/client.py
6
2392
############################################################################### ## ## Copyright (C) Tavendo GmbH and/or collaborators. All rights reserved. ## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are met: ## ## 1....
apache-2.0
-6,762,905,630,232,935,000
37.580645
80
0.688963
false
laperry1/android_external_chromium_org
chrome/browser/web_dev_style/html_checker.py
36
1536
# Copyright 2014 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. """ Presubmit for Chromium HTML resources. See chrome/browser/PRESUBMIT.py. """ import regex_check class HtmlChecker(object): def __init__(self, input_a...
bsd-3-clause
-6,793,059,578,308,884,000
31.680851
80
0.666667
false
gibbons/scikit-rf
skrf/io/tests/test_io.py
7
4700
import unittest import os import numpy as npy import skrf as rf class IOTestCase(unittest.TestCase): ''' ''' def setUp(self): ''' ''' self.test_dir = os.path.dirname(os.path.abspath(__file__))+'/' self.pickle_file = os.path.join(self.test_dir, 'pickled.p') self.hf...
bsd-3-clause
3,831,204,522,579,324,400
32.81295
93
0.587234
false
ibmsoe/tensorflow
tensorflow/tensorboard/backend/application_test.py
8
21222
# 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
-3,316,384,185,460,016,600
35.153322
80
0.648242
false
ewindisch/nova
nova/api/openstack/compute/schemas/v3/keypairs.py
16
1085
# Copyright 2013 NEC Corporation. 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 ...
apache-2.0
420,046,463,471,792,300
31.878788
78
0.619355
false
lbouma/Cyclopath
pyserver/item/attc/annotation.py
1
3673
# Copyright (c) 2006-2013 Regents of the University of Minnesota. # For licensing terms, see the file LICENSE. import conf import g from item import attachment from item import item_base from item import item_versioned from item.util.item_type import Item_Type from util_.streetaddress import ccp_stop_words log = g.l...
apache-2.0
-8,545,910,665,206,618,000
29.608333
79
0.596515
false
JFriel/honours_project
venv/lib/python2.7/site-packages/nltk/test/unit/test_corpora.py
15
6139
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import unittest from nltk.corpus import (sinica_treebank, conll2007, indian, cess_cat, cess_esp, floresta, ptb, udhr) from nltk.tree import Tree from nltk.test.unit.utils import skipIf class TestUdhr(unittest.Tes...
gpl-3.0
7,452,521,513,740,938,000
31.961749
120
0.438329
false
sklnet/opendroid-enigma2
lib/python/Components/SetupDevices.py
10
1533
from config import config, ConfigSelection, ConfigSubsection, ConfigOnOff, ConfigText from Components.Timezones import timezones from Components.Language import language from Components.Keyboard import keyboard def InitSetupDevices(): def timezoneNotifier(configElement): timezones.activateTimezone(configElement.in...
gpl-2.0
379,298,554,551,903,940
39.342105
126
0.813438
false
mileswwatkins/pupa
pupa/tests/scrape/test_jurisdiction_scrape.py
4
2226
from collections import defaultdict from pupa.scrape import Jurisdiction, Organization, JurisdictionScraper class FakeJurisdiction(Jurisdiction): division_id = 'ocd-division/test' classification = 'government' name = 'Test' url = 'http://example.com' parties = [{'name': 'Republican'}, {'name': 'De...
bsd-3-clause
1,337,960,877,708,002,800
29.493151
91
0.656783
false
CNR-Engineering/PyTelTools
cli/slf_max_over_files.py
2
5431
#!/usr/bin/env python """ Compute the max or min over some variables for a serie of files (which may contain several frames). This operation can be performed only on some zones defined by polygon(s). In this case the values in the area not covered by the polygons are set to the first file and first frame. The output fi...
gpl-3.0
836,083,437,393,772,400
40.458015
113
0.583318
false
xjzhou/flanker
flanker/mime/message/headers/encoding.py
9
2691
import email.message import flanker.addresslib.address import logging from collections import deque from email.header import Header from flanker.mime.message.headers import parametrized from flanker.utils import to_utf8 log = logging.getLogger(__name__) # max length for a header line is 80 chars # max recursion dept...
apache-2.0
7,874,496,131,330,229,000
27.62766
97
0.625418
false
gaqzi/django-emoji
emoji/models.py
1
7259
import os import re import struct from sys import version_info from django.contrib.staticfiles.storage import staticfiles_storage try: from ._unicode_characters import UNICODE_ALIAS except ImportError as exc: UNICODE_ALIAS = {} from . import settings __all__ = ('Emoji',) UNICODE_WIDE = True try: unic...
mit
-6,565,551,456,940,447,000
30.021368
79
0.584929
false
chujieyang/twemproxy
tests/test_redis/test_commands.py
40
2146
#!/usr/bin/env python #coding: utf-8 from common import * def test_linsert(): r = getconn() r.rpush('mylist', 'Hello') r.rpush('mylist', 'World') r.linsert('mylist', 'BEFORE', 'World', 'There') rst = r.lrange('mylist', 0, -1) assert(rst == ['Hello', 'There', 'World']) def test_lpush_lrange(...
apache-2.0
-1,152,089,097,067,568,900
21.589474
71
0.489282
false
mgrachten/cpomr
OMR/verticalSegment.py
1
6689
#!/usr/bin/env python # Copyright 2012, Maarten Grachten. # # This file is part of CPOMR. # # CPOMR 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 ...
gpl-3.0
3,603,906,014,315,880,000
37.442529
106
0.59112
false
SublimeText/AAAPackageDev
plugins/lib/weakmethod.py
1
1814
# https://code.activestate.com/recipes/81253/ from weakref import ref class _weak_callable: def __init__(self, obj, func): self._obj = obj self._meth = func def __call__(self, *args, **kws): if self._obj is not None: return self._meth(self._obj, *args, **kws) els...
mit
4,358,930,705,345,427,000
25.676471
65
0.513782
false
endlessm/chromium-browser
chrome/chrome_cleaner/tools/import_util.py
3
2747
# Copyright 2018 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. """Utilities for importing python proto modules.""" import os import sys _CURRENT_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) _ROOT_DIRECTORY = ...
bsd-3-clause
3,941,669,569,872,052,700
34.217949
80
0.718602
false
supermanheng21/twilio-python
twilio/rest/resources/__init__.py
14
1813
from .util import ( transform_params, format_name, parse_date, convert_boolean, convert_case, convert_keys, normalize_dates, UNSET_TIMEOUT ) from .base import ( Response, Resource, InstanceResource, ListResource, NextGenInstanceResource, NextGenListResource, make_request, make_twilio_request ) from ...
mit
8,473,616,571,238,306,000
23.173333
77
0.753447
false
cfcs/burst
burst/proxy.py
2
15824
import re import sys import traceback import socket import select import SocketServer import ssl import urlparse import threading import time from burst import alert, console from burst.http import Request, RequestSet, connect from burst.exception import BadStatusLine, UnableToConnect, NotConnected, \ ...
bsd-3-clause
4,948,098,679,131,809,000
34.882086
105
0.574002
false
heldergg/webpymail
webpymail/utils/config.py
1
3804
# -*- coding: utf-8 -*- # WebPyMail - IMAP python/django web mail client # Copyright (C) 2008 Helder Guerreiro # This file is part of WebPyMail. # # WebPyMail 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
3,740,022,770,042,299,000
31.512821
78
0.619348
false
jayceyxc/hue
desktop/core/ext-py/cryptography-1.3.1/src/cryptography/hazmat/primitives/kdf/hkdf.py
39
3675
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import six from cryptography import utils from cryptography.exceptions i...
apache-2.0
4,812,515,954,516,042,000
30.681034
79
0.62449
false
15th/simpleat
simpleat/conf/__init__.py
1
1404
#!/usr/bin/env python #coding=utf-8 # Filename: __init__.py ''' Settings and configuration for simpleat. @author: 15th @data: 2017.2.28 ''' import Queue import settings as usr_settings from . import global_settings class Settings(object): ''' 全局设定 ''' def __init__(self): # 更新全局变量值 for...
mit
-8,219,718,786,894,162,000
25.956522
84
0.593548
false
after12am/rhyme
dress/datasource.py
1
10277
# encoding: utf-8 import os, sys, re, subprocess, defs from config import get_config from abc import ABCMeta, abstractmethod from misc import dict2obj class DataSource(object): __metaclass__ = ABCMeta def __init__(self): self.conn = None self.cursor = None def __del__(self): ...
mit
6,552,875,177,548,945,000
31.833866
106
0.556485
false
T3CHNOLOG1C/Kurisu
addons/xkcdparse.py
1
2421
import discord import re import xkcd from discord.ext import commands from sys import argv from urllib.parse import urlparse class xkcdparse: """ xkcd parser. """ def __init__(self, bot): self.bot = bot print('Addon "{}" loaded'.format(self.__class__.__name__)) word_responses = { ...
apache-2.0
-6,274,183,012,492,293,000
35.134328
160
0.589426
false
40thoughts/Coin-QualCoin
qa/rpc-tests/test_framework/names.py
4
3616
#!/usr/bin/env python # Copyright (c) 2014 Daniel Kraft # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # General code for Namecoin tests. from test_framework import BitcoinTestFramework from util import assert_equal, sync_bl...
mit
7,677,458,431,868,546,000
31.872727
78
0.665929
false
onia/pygobject
gi/overrides/Pango.py
1
1980
# -*- Mode: Python; py-indent-offset: 4 -*- # vim: tabstop=4 shiftwidth=4 expandtab # # Copyright (C) 2010 Paolo Borelli <pborelli@gnome.org> # # 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 Foundat...
lgpl-2.1
-1,949,908,247,573,870,000
29.9375
71
0.699495
false
daviddesancho/mdtraj
mdtraj/utils/unit/quantity.py
9
27291
#!/bin/env python """ Module simtk.unit.quantity Physical quantities with units, intended to produce similar functionality to Boost.Units package in C++ (but with a runtime cost). Uses similar API as Scientific.Physics.PhysicalQuantities but different internals to satisfy our local requirements. In particular, there i...
lgpl-2.1
-451,412,571,518,727,230
38.324207
126
0.584442
false
mateoqac/unqTip
language/vgbs/common/i18n.py
1
27411
# coding:utf-8: # # Copyright (C) 2011, 2012 Pablo Barenbaum <foones@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later...
gpl-3.0
-7,343,840,923,607,439,000
39.570149
178
0.64734
false
davisjp1822/SMD_Control_Server
examples/back_and_forth.py
1
4512
#!/usr/bin/python import argparse import sys import telnetlib from socket import error as socket_error import time AMCI_HOST = "192.168.1.131" def main(arguments): # create an argparser object and get the arguments from the user parser = argparse.ArgumentParser(description="Uses the relativeMove command to move b...
mit
-6,808,338,435,124,970,000
28.880795
185
0.672429
false
kalikaneko/bitmask_client
src/leap/bitmask/logs/log_silencer.py
4
4366
# -*- coding: utf-8 -*- # log_silencer.py # Copyright (C) 2013 LEAP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
gpl-3.0
6,115,717,955,464,224,000
33.928
79
0.637197
false
HaebinShin/tensorflow
tensorflow/python/training/proximal_adagrad.py
7
4310
# 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
4,861,705,646,520,828,000
41.673267
109
0.682831
false
maas/maas
src/maasserver/websockets/handlers/tests/test_user.py
1
16021
# Copyright 2015-2020 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Tests for `maasserver.websockets.handlers.user`""" import datetime from django.contrib.auth.models import User from testtools.testcase import TestCase from maasserver.e...
agpl-3.0
662,697,051,575,489,300
33.904139
78
0.58467
false
kuckaogh/csclpp
csclpp/src/csclpp/dts/antlr4/ListTokenSource.py
1
5274
# # Copyright (c) 2012-2016 The ANTLR Project. All rights reserved. # Use of this file is governed by the BSD 3-clause license that # can be found in the LICENSE.txt file in the project root. # # # Provides an implementation of {@link TokenSource} as a wrapper around a list # of {@link Token} objects. # # <p>If the fi...
gpl-3.0
8,709,710,357,678,265,000
35.881119
105
0.599545
false
Eaglemania/TOL
pyglet/gl/wglext_nv.py
7
71763
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
gpl-2.0
4,625,527,457,117,481,000
77.947195
191
0.775748
false
zzzaaa12/stockcmd
world_index.py
1
6086
# -*- coding: utf-8 -*- import requests import re import json import traceback from datetime import datetime from datetime import timedelta from termcolor import colored # files in this project from setting import INDEX_LIST from setting import WORLD_INDEX_URL class WorldIndex: def __init__(self): self.q...
mit
-1,184,355,311,435,329,800
33.067416
146
0.449044
false
ryanraaum/african-mtdna
popdata_sources/pinto1996/process.py
1
1931
from oldowan.mtconvert import seq2sites, sites2seq, str2sites from string import translate import pandas as pd import numpy as np import sys sys.path.append('../../scripts') from utils import * ## load metadata metadata = pd.read_csv('metadata.csv', index_col=0) region = range2region(metadata.ix[0,'SeqRange']) with ...
cc0-1.0
-4,018,224,551,946,746,400
25.465753
74
0.620922
false
meles5/qutebrowser
tests/unit/misc/test_cmdhistory.py
9
5321
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015-2016 Alexander Cogneau (acogneau) <alexander.cogneau@gmail.com> # Copyright 2015-2016 Florian Bruhin (The-Compiler) <me@the-compiler.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # i...
gpl-3.0
-3,736,329,397,499,267,600
28.561111
80
0.679384
false
biodigital-inc/bdhuman-contentapi
python/flaskrun.py
1
1813
import optparse def flaskrun(app, default_host="127.0.0.1", default_port="5000"): """ Takes a flask.Flask instance and runs it. Parses command-line flags to configure the app. """ # Set up the command-line options parser = optparse.OptionParser() parser.add_option("-H",...
mit
3,308,004,727,309,973,500
32.592593
64
0.541092
false
akrherz/iem
htdocs/plotting/auto/scripts/p53.py
1
6097
"""Binned""" import datetime import calendar from pandas.io.sql import read_sql from pyiem.plot.use_agg import plt from pyiem.util import get_autoplot_context, get_dbconn from pyiem.exceptions import NoDataFound PDICT = {"tmpf": "Air Temperature", "dwpf": "Dew Point Temperature"} def get_description(): """ Retu...
mit
-3,092,771,297,836,869,600
27.096774
79
0.485813
false
nens/openradar
openradar/scripts/image.py
1
4534
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) Nelen & Schuurmans. GPL licensed, see LICENSE.rst. from openradar import arguments from openradar import config from openradar import images from openradar import loghelper from openradar import products from openradar import scans from openradar import utils def get_...
gpl-3.0
-8,142,041,009,451,428,000
38.086207
79
0.505293
false
Tayamarn/socorro
webapp-django/crashstats/monitoring/views.py
1
3479
import datetime import elasticsearch from django.shortcuts import render from django.conf import settings from django.utils import timezone from django.contrib.auth.models import Permission from django.core.cache import cache from crashstats.crashstats import utils from crashstats.crashstats.models import Crontabber...
mpl-2.0
4,008,904,424,418,944,500
29.787611
78
0.632366
false
ptomato/REP-instrumentation
rep/ocean_optics/spectrometers.py
2
3849
from .ocean_optics import (OceanOptics2k, OceanOptics4k, OceanOpticsNIRQuest, OceanOpticsMaya, OO_ERROR_MODEL_NOT_FOUND) import visa from pyvisa import vpp43 import struct def autodetect_spectrometer(resource_name, *args, **kwargs): """ Factory method which creates an appropriate instrument object, depend...
gpl-3.0
-2,453,788,326,916,172,300
26.492857
77
0.629774
false
infoxchange/barman
barman/process.py
1
5850
# Copyright (C) 2011-2017 2ndQuadrant Limited # # This file is part of Barman. # # Barman 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 versio...
gpl-3.0
-3,755,389,952,620,709,000
36.261146
79
0.582735
false
Yubico/yubiauth-dpkg
yubiauth/__init__.py
1
1849
# # Copyright (c) 2013 Yubico AB # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of condi...
bsd-2-clause
-7,692,048,702,720,014,000
35.254902
71
0.755544
false
pblottiere/QGIS
tests/src/python/test_provider_tabfile.py
14
5134
# -*- coding: utf-8 -*- """QGIS Unit tests for the OGR/MapInfo tab provider. .. 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 Software Foundation; either version 2 of the License, or (at your option) any later v...
gpl-2.0
-1,342,148,884,471,354,000
43.258621
138
0.673549
false
yarbelk/django-admin2
example/example/settings.py
2
5243
# Django settings for example project. import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'ex...
bsd-3-clause
5,312,888,760,727,939,000
30.590361
88
0.699218
false
anthraxx/pwndbg
pwndbg/commands/xor.py
2
2062
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import gdb import pwndbg.commands import pwndbg.memory def xor_memory(address, key, count): """ Helper function for xorring memory in gdb """ mem = pwndbg.memory.read(address, count, partial=True) for index, byte in enumerate(mem): ...
mit
-1,890,112,164,717,947,600
29.323529
96
0.650339
false
danielmorosan/Cactus
cactus/tests/test_context.py
9
1894
#coding:utf-8 import os from cactus.tests import SiteTestCase class TestSiteContext(SiteTestCase): """ Test that the proper context is provided to the pages Includes the built-in site context ('CACTUS'), and custom context. """ def setUp(self): super(TestSiteContext, self).setUp() ...
bsd-3-clause
6,914,779,774,268,361,000
27.712121
90
0.56811
false
simonerestelli/pystruct
zdict.py
1
3077
########################################################################### # Copyright 2014-2015 Simone Restelli # # 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/...
apache-2.0
-5,186,568,084,288,361,000
24.429752
91
0.653234
false
xjwanglab/pycog
paper/all.py
2
7452
#! /usr/bin/env python """ Reproduce every figure in the paper from scratch. Notes ----- * Running this script in its entirety will take some time. * We run a fair number of trials to get pretty psychometric curves, and this is done in one big chunk of memory. You may need to change this to run more trials, depend...
mit
5,024,713,344,785,181,000
30.576271
90
0.536098
false
chrisfilda/edx_platform
common/lib/xmodule/xmodule/modulestore/split_mongo/mongo_connection.py
23
4009
""" Segregation of pymongo functions from the data modeling mechanisms for split modulestore. """ import pymongo class MongoConnection(object): """ Segregation of pymongo functions from the data modeling mechanisms for split modulestore. """ def __init__( self, db, collection, host, port=27017,...
agpl-3.0
7,596,463,806,917,632,000
33.560345
97
0.5999
false
mitodl/open-discussions
channels/serializers/posts_test.py
1
1825
""" Tests for serializers for channel REST APIS """ from unittest.mock import Mock import pytest from rest_framework.exceptions import ValidationError from channels.serializers.posts import PostSerializer pytestmark = pytest.mark.django_db def test_post_validate_upvoted(): """upvoted must be a bool""" wit...
bsd-3-clause
-8,900,826,402,820,640,000
29.932203
81
0.656986
false
zrhans/pythonanywhere
.virtualenvs/django19/lib/python3.4/site-packages/pandas/tests/test_panelnd.py
13
3798
# -*- coding: utf-8 -*- from datetime import datetime import os import operator import nose import numpy as np from pandas.core import panelnd from pandas.core.panel import Panel import pandas.core.common as com from pandas import compat from pandas.util.testing import (assert_panel_equal, ...
apache-2.0
-4,395,388,496,706,366,000
33.216216
75
0.487625
false
mrkn/iTerm2
tests/esctest/tests/hvp.py
31
2658
import esccmd import escio from escutil import AssertEQ, AssertScreenCharsInRectEqual, GetCursorPosition, GetScreenSize, knownBug from esctypes import Point, Rect class HVPTests(object): def test_HVP_DefaultParams(self): """With no params, HVP moves to 1,1.""" esccmd.HVP(Point(6, 3)) position = GetCurso...
gpl-2.0
6,324,020,666,394,744,000
25.316832
102
0.646351
false
community-ssu/tracker
utils/services/service2rdf-xml.py
1
4162
import ConfigParser, os import sys import getopt def usage(): print "Usage: python service2rdf-xml.py --metadata=ONTOLOGY.metadata --service=ONTOLOGY.service [--uri=URI]" def main(): try: uri = "" metadataf = "" servicef = "" opts, args = getopt.getopt(sys.argv[1:], "hu:va:vm:vs:v", ["help", ...
gpl-2.0
6,512,376,530,339,386,000
37.897196
110
0.551658
false
analyst-collective/dbt
core/scripts/create_adapter_plugins.py
1
8235
#!/usr/bin/env python import argparse import sys from pathlib import Path PROJECT_TEMPLATE = ''' name: dbt_{adapter} version: {version} config-version: 2 macro-paths: ["macros"] ''' SETUP_PY_TEMPLATE = ''' #!/usr/bin/env python from setuptools import find_packages from setuptools import setup package_name = "dbt-{...
apache-2.0
-6,566,239,592,807,848,000
27.793706
79
0.605464
false
rghe/ansible
lib/ansible/modules/cloud/docker/docker_image.py
4
22378
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # 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': ['prev...
gpl-3.0
-107,879,694,010,405,420
35.50571
120
0.57704
false
ideaplat/Tback
data/ready_data.py
1
16566
# -*- coding: utf-8 -*- """ IPS __author__ = ideaplat __mtime__ = 2016/12/19 """ import pandas as pd import matplotlib.pyplot as plt import numpy as np import datetime, pylab import pandas_datareader.data as web from matplotlib.dates import DateFormatter, WeekdayLocator, DayLocator, MONDAY from matplotlib.f...
mit
7,854,191,398,266,409,000
49.975385
364
0.550525
false
lateshowlabs/flask-shopify
docs/conf.py
1
7150
# -*- coding: utf-8 -*- # # Flask-Shopify documentation build configuration file, created by # sphinx-quickstart on Sat Apr 30 13:50:13 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. #...
mit
5,926,032,386,484,610,000
31.207207
80
0.707832
false
manikTharaka/al-go-rithms
data_structures/dictionary/python/missionaries_and_cannibals_problem.py
9
3090
shore = {1:['m1','m2','m3','c1','c2','c3'],2:[]} boat = {1:True,2:False} boat_cap = 0 boat_hold = [] choice = 'y' count = 0 glob = 1 def pick(): print("Pick a person to put on boat/or press enter") return input() def check(person,flag,avail_p): if(person in shore[flag] or person == "" or person in boat_hold...
mit
2,637,795,080,849,306,000
29
69
0.445307
false
spthaolt/socorro
socorro/unittest/testlib/testutil.py
11
3424
# 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/. import socorro.unittest.testlib.util as tutil import os def testGetModuleFromFile(): os.path.sep = '/' testData = [...
mpl-2.0
-8,715,878,313,454,668
44.653333
92
0.517815
false
nwjs/chromium.src
chrome/test/chromedriver/log_replay/client_replay_unittest.py
2
16980
#!/usr/bin/env python # Copyright 2018 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. """Unit tests for the client_replay.CommandSequence class.""" import optparse import os import StringIO import sys import unittest im...
bsd-3-clause
3,385,345,834,901,876,000
39.817308
80
0.673322
false
scottbelden/coala
coalib/results/TextPosition.py
5
1086
from coala_decorators.decorators import ( enforce_signature, generate_ordering, generate_repr) @generate_repr("line", "column") @generate_ordering("line", "column") class TextPosition: @enforce_signature def __init__(self, line: (int, None)=None, column: (int, None)=None): """ Creates a n...
agpl-3.0
-3,727,195,621,052,690,400
31.909091
78
0.619705
false
kennethgillen/ansible
lib/ansible/modules/cloud/amazon/iam_role.py
21
13015
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
2,584,144,847,637,212,700
35.253482
156
0.644641
false
jgeewax/gclouddatastore
setup.py
1
1568
import sys from gclouddatastore import __version__ try: from setuptools import setup except ImportError: from distutils.core import setup if sys.version_info <= (2, 4): error = 'Requires Python Version 2.5 or above... exiting.' print >> sys.stderr, error sys.exit(1) setup(name='gclouddatastore', ...
apache-2.0
-700,508,902,889,907,300
32.361702
72
0.532526
false
Return0Software/Flix-with-Friends
src/gtk-gui/HeaderBar.py
1
4768
import gi gi.require_version("Gtk", "3.0") from gi.repository import Gtk, Gio, GObject from FriendDialog import FriendDialog from MovieDialog import MovieDialog class DataButton(Gtk.MenuButton): """Create a button for manipulating database data""" __gsignals__ = { "source-change": (GObject.SIGNAL_RU...
gpl-2.0
7,553,529,719,124,868,000
34.318519
148
0.645763
false
akretion/stock-logistics-workflow
stock_picking_deliver_uos/__openerp__.py
5
1476
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-15 Agile Business Group sagl (<http://www.agilebg.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Li...
agpl-3.0
3,108,415,134,150,236,700
37.842105
79
0.587398
false
wisechengyi/pants
tests/python/pants_test/tasks/test_changed_target_integration.py
2
6588
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os from contextlib import contextmanager from textwrap import dedent from pants.base.build_environment import get_buildroot from pants.testutil.git_util import initialize_repo from...
apache-2.0
3,747,171,771,604,828,000
43.214765
107
0.515331
false
ltongues/principles-of-computing-coursera
solitaire/poc_simpletest.py
4
1095
""" Lightweight testing class inspired by unittest from Pyunit https://docs.python.org/2/library/unittest.html Note that code is designed to be much simpler than unittest and does NOT replicate unittest functionality """ class TestSuite: """ Create a suite of tests similar to unittest """ def __init__(...
gpl-2.0
5,234,821,194,304,642,000
28.621622
61
0.557078
false
Southpaw-TACTIC/Team
src/python/Lib/site-packages/pythonwin/pywin/mfc/dialog.py
1
7949
""" \ Base class for Dialogs. Also contains a few useful utility functions """ # dialog.py # Python class for Dialog Boxes in PythonWin. import win32ui import win32con import window def dllFromDll(dllid): " given a 'dll' (maybe a dll, filename, etc), return a DLL object " if dllid==None: return None...
epl-1.0
-3,978,982,208,008,700,000
31.540084
82
0.651906
false
chemelnucfin/tensorflow
tensorflow/python/data/experimental/kernel_tests/snapshot_test.py
2
14904
# 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,987,806,694,482,421,000
35.891089
89
0.699678
false
phalcon/readthedocs.org
readthedocs/settings/sqlite.py
1
1149
import os.path from .base import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(SITE_ROOT, 'dev.db'), } } REDIS = { 'host': 'localhost', 'port': 6379, 'db': 0, } BROKER_URL = 'redis://localhost:6379/0' CELERY_RESULT_BACKEND = 'red...
mit
7,703,924,214,767,248,000
19.157895
66
0.666667
false
juanyaw/python
cpython/Lib/idlelib/SearchEngine.py
16
7485
'''Define SearchEngine for search dialogs.''' import re from tkinter import StringVar, BooleanVar, TclError import tkinter.messagebox as tkMessageBox def get(root): '''Return the singleton SearchEngine instance for the process. The single SearchEngine saves settings between dialog instances. If there is n...
bsd-3-clause
1,085,869,054,350,529,200
31.124464
81
0.543888
false
nuagenetworks/vspk-python
vspk/v6/fetchers/nuunderlays_fetcher.py
2
2107
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
bsd-3-clause
1,746,561,995,944,204,000
38.773585
86
0.724727
false