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
Jarrey/PiBBS
ascii.py
1
9780
#!/usr/bin/python # -*- coding: utf-8 -*- chars =[ 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, ...
mit
6,284,428,570,700,427,000
36.619231
37
0.526278
false
gamesun/MyTermforFCVS
icon16.py
1
2003
#---------------------------------------------------------------------- # This file was generated by E:\Projects\github\MyTerm\icon\img2py.py # from wx.lib.embeddedimage import PyEmbeddedImage icon16 = PyEmbeddedImage( "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAABB1J" "REFUWIXll11v00gU...
unlicense
-8,944,845,908,445,791,000
61.59375
78
0.838742
false
honeynet/beeswarm
beeswarm/shared/asciify.py
1
1725
# Parts of this code are taken from: https://gist.github.com/chris-hailstorm/4989643 # All credits go to the original author import unicodedata def _remove_accents(data): """ Changes accented letters to non-accented approximation, like Nestle """ return unicodedata.normalize('NFKD', data).encode('as...
gpl-3.0
-1,297,287,412,328,637,000
27.766667
84
0.591304
false
terranodo/django-osgeo-importer
osgeo_importer/geonode_apis.py
1
1360
import os from .api import ( # noqa: F401 UserResource, UploadedLayerResource, UserOwnsObjectAuthorization, UploadedDataResource, MultipartResource, UploadedFileResource ) from geonode.api.api import ProfileResource from geonode.geoserver.helpers import ogc_server_settings from tastypie.fields ...
gpl-3.0
6,555,169,954,289,598,000
34.789474
99
0.658088
false
donfaq/cnn-rnn
config.py
1
1288
import tensorflow as tf import os FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_integer('epoch', 1, 'Number of epoch') tf.app.flags.DEFINE_integer('esize', 50, 'Size of examples') tf.app.flags.DEFINE_integer('estep', 20, 'Length of step for grouping frames into examples') tf.app.flags.DEFINE_integer('height', 240, ...
mit
7,194,295,818,730,846,000
48.576923
97
0.734472
false
fusionapp/txdocumint
src/txdocumint/test/test_client.py
1
15276
import json from StringIO import StringIO from testtools import TestCase from testtools.matchers import ( AfterPreprocessing, ContainsDict, Equals, IsInstance, MatchesAll, MatchesListwise, MatchesStructure) from testtools.twistedsupport import failed, succeeded from treq.testing import StringStubbingResource, ...
mit
5,585,918,496,870,496,000
36.07767
79
0.513943
false
weiweihuanghuang/Glyphs-Scripts
Stylistic Sets/Create ssXX from layer.py
1
1166
#MenuTitle: Create .ssXX glyph from current layer # -*- coding: utf-8 -*- __doc__=""" Takes the currently opened layers and creates new glyphs with a .ssXX ending. Checks if the name is free. """ import GlyphsApp Font = Glyphs.font FirstMasterID = Font.masters[0].id allGlyphNames = [ x.name for x in Font.glyphs ] sel...
apache-2.0
-6,344,059,178,143,018,000
23.808511
77
0.745283
false
ybodnar/datagene
dist-count.py
1
2781
import logging import os from Queue import Queue import threading import argparse LOG = logging.getLogger(__name__) logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO) class LineCounterWorker(threading.Thread): def __init__(self, worker_id, processing_queue, result_queue):...
gpl-2.0
-1,638,717,782,786,126,600
32.914634
114
0.637181
false
dancsalo/TensorBase
tensorbase/data.py
1
5319
#!/usr/bin/env python """ Author: Dan Salo Initial Commit: 12/5/2016 Purpose: Class for MNIST Adapted from https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/learn/python/learn/datasets/mnist.py """ from .base import Data from shutil import copyfile import numpy as np import os import gzip import...
mit
3,016,097,054,632,173,000
39.915385
121
0.606505
false
aiorchestra/aiorchestra-openstack-plugin
setup.py
1
2341
# Author: Denys Makogon # # 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 t...
apache-2.0
3,291,491,262,194,808,300
35.015385
79
0.634344
false
phatina/lmishell
src/lmi/shell/obj/impl/ns.py
1
3200
from lmi.shell import obj QUERY_TYPE_CQL = 'DMTF:CQL' QUERY_TYPE_WQL = 'WQL' class LMINamespace(obj.LMIBase): ''' LMI class representing CIM namespace. ''' _SUPPORTED_NAMESPACES = [ u'root' + ns for ns in u'', u'/cimv2', u'/dcim', u'/interop', ...
gpl-2.0
-2,149,266,257,538,665,700
30.372549
79
0.57625
false
syl20bnr/testrail-api
python/testrail.py
1
2077
# # TestRail API binding for Python (API v2, available since TestRail 3.0) # # Learn more: # # http://docs.gurock.com/testrail-api2/start # http://docs.gurock.com/testrail-api2/accessing # # Copyright Gurock Software GmbH. See license.md for details. # import urllib2, json, base64 class APIClient: def __init__(self,...
mit
7,369,945,157,175,601,000
24.024096
74
0.620125
false
peterwilletts24/Monsoon-Python-Scripts
rain/land_sea_diurnal/rain_mask_save_lat_lon_west_southern_indian_ocean.py
1
7070
import os, sys import datetime import iris import iris.unit as unit import iris.analysis.cartography import numpy as np from iris.coord_categorisation import add_categorised_coord diag = 'avg.5216' cube_name_explicit='stratiform_rainfall_rate' cube_name_param='convective_rainfall_rate' pp_file_path='/projects/casc...
mit
-6,895,962,552,583,639,000
44.031847
197
0.654597
false
twilio/twilio-python
twilio/rest/ip_messaging/v2/service/binding.py
1
14162
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import serialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import...
mit
-5,625,618,278,813,193,000
31.631336
103
0.600621
false
kyubifire/softlayer-python
SoftLayer/CLI/file/order.py
1
4648
"""Order a file storage volume.""" # :license: MIT, see LICENSE for more details. import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import exceptions CONTEXT_SETTINGS = {'token_normalize_func': lambda x: x.upper()} @click.command(context_settings=CONTEXT_SETTINGS) @click.option...
mit
3,788,993,315,149,172,700
38.058824
96
0.591222
false
fossfreedom/cb_dev
coverart_entryview.py
1
10046
# -*- Mode: python; coding: utf-8; tab-width: 4; indent-tabs-mode: nil; -*- # # Copyright (C) 2012 - fossfreedom # Copyright (C) 2012 - Agustin Carrasco # # 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 Fou...
gpl-3.0
-1,016,717,941,151,101,700
36.485075
78
0.660462
false
mjuenema/python-TSIP
docs/examples/example2.py
1
9086
#!/usr/bin/env python """ More elaborate example trying to retrieve as much data as possible from a Trimble Copernicus II GPS. It shows how to a) Establish a connection to the GPS. b) Send request packets to the GPS. c) Read report packets from the GPS and extract data. Includes code inspired and co-written by Danie...
bsd-2-clause
7,181,874,790,834,013,000
34.081081
108
0.583865
false
darren-wang/gl
glance/common/property_utils.py
1
8299
# Copyright 2013 Rackspace # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
1,436,047,267,002,604,500
39.881773
79
0.54127
false
samouri/kinja-api
Preprocessing and Dataset Analysis/network_functions.py
1
9269
import networkx as nx import json import codecs import numpy as np import community import os.path POPULAR = 4 AVERAGE = 3 UNPOPULAR = 2 DATASET_FNAME = "../Dataset/Output/articles_labeled.json" # Used in each step of the Girvan-Newman clustering algorithm # Functionally equivalaent to networkx's edge_betweenness_ce...
mit
-977,955,662,081,096,800
24.963585
89
0.658863
false
corani/beancount-web
fava/api/budgets.py
1
2759
from collections import defaultdict, namedtuple from beancount.core.data import Custom from beancount.core.number import Decimal from fava.util.date import days_in_daterange, number_of_days_in_period Budget = namedtuple('Budget', 'account date_start period number currency') BudgetError = namedtuple('BudgetError', 's...
mit
4,650,383,985,711,415,000
33.061728
77
0.571221
false
sergeii/swat4stats.com
tracker/signals.py
1
9440
# -*- coding: utf-8 -*- from __future__ import (unicode_literals, absolute_import, division) import logging from datetime import datetime import six from django.dispatch import receiver, Signal from django.db.models import F from django.db.models.signals import pre_save, post_save from django.db import transaction, I...
mit
-3,782,167,431,929,711,000
40.769912
128
0.560064
false
johnnyslt/plugin.video.quasar
resources/site-packages/quasar/navigation.py
1
6038
import os import sys import urllib2 import xbmc import xbmcgui import xbmcplugin import socket import traceback from quasar.logger import log from quasar.config import QUASARD_HOST from quasar.addon import ADDON, ADDON_ID from quasar.util import notify, getLocalizedString, getLocalizedLabel, system_information try: ...
bsd-3-clause
6,440,026,434,462,497,000
36.503106
137
0.609308
false
mcloudv/fuel-ostf
fuel_health/tests/smoke/test_create_images.py
1
5571
# Copyright 2015 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 writing, s...
apache-2.0
5,185,431,868,042,213,000
41.853846
79
0.5972
false
TueVJ/RE-Europe_SimpleEnsembles
kernel_regression.py
1
3400
"""The :mod:`sklearn.kernel_regressor` module implements the Kernel Regressor. """ # Author: Jan Hendrik Metzen <janmetzen@mailbox.de> # Github link: https://github.com/jmetzen/kernel_regression/ # License: BSD 3 clause import numpy as np from sklearn.metrics.pairwise import pairwise_kernels from sklearn.base import ...
mit
-2,318,198,228,584,046,600
33.693878
79
0.622353
false
google-research/google-research
student_mentor_dataset_cleaning/training/loss/triplet_loss.py
1
7316
# 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
-9,144,044,782,884,564,000
37.104167
89
0.640514
false
eyaler/tensorpack
tensorpack/utils/gpu.py
1
1912
# -*- coding: utf-8 -*- # File: gpu.py import os from .utils import change_env from . import logger from .nvml import NVMLContext from .concurrency import subproc_call __all__ = ['change_gpu', 'get_nr_gpu', 'get_num_gpu'] def change_gpu(val): """ Returns: a context where ``CUDA_VISIBLE_DEVICES=val`...
apache-2.0
7,753,184,123,614,870,000
29.349206
89
0.613494
false
phantomas1234/fbaproject
ifba/bins/CombintoricalMediaSimulations.py
1
13720
#!/usr/bin/env python # encoding: utf-8 """ CombinatoricalMediaSimulations.py Simulates all possible minimal media compositions consisting of unique carbon, nitrogen, sulfate, phosphate sources. If a single compound provides multiple elemental sources it serves a the solely source for them. # TODO: Reformulate this K...
mit
-7,851,317,707,958,387,000
38.653179
165
0.591254
false
vvv-v13/backend-tools
python/asyncio/app.py
1
1997
import ujson import asyncio from aiohttp import web from aiopg.sa import create_engine import sqlalchemy as sa from sqlalchemy.dialects import postgresql metadata = sa.MetaData() models = sa.Table( 'models', metadata, sa.Column('id', sa.Integer, primary_key=True), sa.Column('uid', postgresql.UUID), ...
bsd-2-clause
5,000,754,358,622,015,000
26.356164
97
0.615423
false
apple/llvm-project
lldb/test/API/tools/lldb-server/commandline/TestStubSetSID.py
5
1837
import gdbremote_testcase import lldbgdbserverutils import os import select from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestStubSetSIDTestCase(gdbremote_testcase.GdbRemoteTestCaseBase): mydir = TestBase.compute_mydir(__file__) def ge...
apache-2.0
6,014,576,486,730,429,000
36.489796
152
0.691345
false
sjl767/woo
examples/old/concrete/uniax.py
1
8075
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import division from woo import utils,plot,pack,timing,eudoxos import time, sys, os, copy #import matplotlib #matplotlib.rc('text',usetex=True) #matplotlib.rc('text.latex',preamble=r'\usepackage{concrete}\usepackage{euler}') """ A fairly complex script perf...
gpl-2.0
932,157,397,639,213,700
42.869565
246
0.722002
false
kubaszostak/gdal-dragndrop
osgeo/apps/Python27/Lib/rfc822.py
2
34558
"""RFC 2822 message manipulation. Note: This is only a very rough sketch of a full RFC-822 parser; in particular the tokenizing of addresses does not adhere to all the quoting rules. Note: RFC 2822 is a long awaited update to RFC 822. This module should conform to RFC 2822, and is thus mis-named (it's not wort...
mit
1,946,531,974,478,585,600
32.01378
79
0.533046
false
rschnapka/bank-payment
account_banking_uk_hsbc/__openerp__.py
1
1969
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2011 credativ Ltd (<http://www.credativ.co.uk>). # All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Ge...
agpl-3.0
-431,308,417,658,095,800
36.865385
79
0.635348
false
ericspod/Eidolon
eidolon/ImageAlgorithms.py
1
35574
# Eidolon Biomedical Framework # Copyright (C) 2016-8 Eric Kerfoot, King's College London, all rights reserved # # This file is part of Eidolon. # # Eidolon 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, eit...
gpl-3.0
2,116,245,799,396,315,000
36.966916
153
0.669927
false
voidpp/vcp
vcp/cli_arguments_tree_parser.py
1
1964
class Storage(dict): def __getattr__(self, key): return self[key] def __setattr__(self, key, value): self[key] = value def __hasattr__(self, key): return key in self class CLIArgumentsTreeParser(object): def __init__(self, config, root_name, parser): self.parser = p...
mit
5,132,005,656,610,246,000
29.6875
75
0.52444
false
skosukhin/spack
lib/spack/spack/test/cmd/url.py
1
5814
############################################################################## # 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
-1,998,898,188,695,818,000
41.75
89
0.647403
false
timpalpant/calibre
src/calibre/ebooks/metadata/tag_mapper.py
1
5803
#!/usr/bin/env python2 # vim:fileencoding=utf-8 # License: GPLv3 Copyright: 2015, Kovid Goyal <kovid at kovidgoyal.net> from __future__ import (unicode_literals, division, absolute_import, print_function) import regex from collections import deque REGEX_FLAGS = regex.VERSION1 | regex.WORD | re...
gpl-3.0
9,012,120,951,977,764,000
34.820988
95
0.46924
false
amiv-eth/amivapi
amivapi/utils.py
1
10758
# -*- coding: utf-8 -*- # # license: AGPLv3, see LICENSE for details. In addition we strongly encourage # you to buy us beer if we meet and you like the software. """Utilities.""" from base64 import b64encode from contextlib import contextmanager from copy import deepcopy from email.mime.text import MIMEText...
agpl-3.0
3,240,022,960,988,052,000
32.514019
80
0.606618
false
brchiu/tensorflow
tensorflow/python/tools/api/generator/doc_srcs.py
1
3893
# 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
-3,609,910,699,973,776,400
42.255556
80
0.703571
false
heilaaks/snippy
tests/test_cli_create_reference.py
1
13607
# -*- coding: utf-8 -*- # # SPDX-License-Identifier: AGPL-3.0-or-later # # snippy - software development and maintenance notes manager. # Copyright 2017-2020 Heikki J. Laaksonen <laaksonen.heikki.j@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
agpl-3.0
-413,294,892,229,513,860
40.233333
185
0.578526
false
alexholcombe/MOTcircular
experiment_specific/transient_attention/helpersAOHtargetFinalCueLocatn.py
1
31372
from __future__ import print_function from __future__ import division __author__ = """Alex "O." Holcombe""" ## double-quotes will be silently removed, single quotes will be left, eg, O'Connor import numpy as np import itertools #to calculate all subsets from copy import deepcopy from math import atan, pi, cos, sin, sqr...
mit
2,057,507,305,768,190,500
67.949451
252
0.710442
false
twilio/twilio-python
tests/integration/trusthub/v1/trust_products/test_trust_products_channel_endpoint_assignment.py
1
8039
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class TrustProductsChannelEndpo...
mit
-2,089,020,192,557,204,000
43.661111
220
0.606667
false
jeremiahyan/odoo
addons/delivery/tests/test_delivery_cost.py
1
6946
# -*- coding: utf-8 -*- from odoo.tests import common, Form from odoo.tools import float_compare @common.tagged('post_install', '-at_install') class TestDeliveryCost(common.TransactionCase): def setUp(self): super(TestDeliveryCost, self).setUp() self.SaleOrder = self.env['sale.order'] se...
gpl-3.0
8,266,098,277,623,527,000
43.242038
155
0.585085
false
thaihungle/deepexp
gen-dnc/dual_dnc_dual.py
1
27930
import tensorflow as tf from tensorflow.python.ops.rnn_cell import LSTMStateTuple from memory import Memory import utility import os class Dual_DNC_Dual: def __init__(self, controller_class, input_size1, input_size2, output_size1, output_size2, memory_words_num = 256, memory_word_size = 64, memor...
mit
-7,976,692,918,551,946,000
44.490228
136
0.592159
false
jovanpacheco/todo-eureka
eureka/list/migrations/0001_initial.py
1
3538
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-06-12 18:41 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
gpl-3.0
4,283,701,551,172,856,300
42.679012
181
0.562182
false
jjdmol/LOFAR
CEP/PyBDSM/src/python/tc.py
1
21831
"""Defines some basic facilities for handling typed values. It's quite basic and limited implementation tailored specifically for use in the PyBDSM user-options and derived properties. For a user option, one can define a group that is used when listing the options to the screen. For a property (e.g., flux density), o...
gpl-3.0
-7,086,226,089,472,376,000
29.447699
77
0.566396
false
mjsauvinen/P4UL
pyLib/analysisTools.py
1
7453
import numpy as np import sys try: import scipy.stats as st # contains st.entropy except: pass ''' Description: Author: Mikko Auvinen mikko.auvinen@helsinki.fi University of Helsinki & Finnish Meteorological Institute ''' # =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* #========...
mit
199,732,515,015,913,570
28.227451
105
0.522743
false
geoanalytic/gpstracker
geodata/migrations/0002_gpslocation.py
1
1892
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-02 23:39 from __future__ import unicode_literals import datetime import django.contrib.gis.db.models.fields from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ...
mit
-8,466,845,147,874,807,000
44.047619
122
0.582452
false
danking/hail
hail/python/test/hail/matrixtable/test_grouped_matrix_table.py
1
12791
import unittest import hail as hl from ..helpers import * setUpModule = startTestHailContext tearDownModule = stopTestHailContext class Tests(unittest.TestCase): @staticmethod def get_groupable_matrix(): rt = hl.utils.range_matrix_table(n_rows=100, n_cols=20) rt = rt.annotate_globals(foo="f...
mit
6,599,485,141,882,924,000
56.358744
151
0.558127
false
SandStormHoldings/ScratchDocs
jsoncompare.py
1
3768
from __future__ import print_function from builtins import object # reborrowed from https://github.com/monsur/jsoncompare import json import sys import types TYPE = 'TYPE' PATH = 'PATH' VALUE = 'VALUE' # Borrowed from http://djangosnippets.org/snippets/2247/ # with some modifications. class Diff(object): def __init...
mit
3,032,788,543,684,818,000
30.932203
86
0.613854
false
AndrewPashkin/python-tempo
src/tempo/recurrentevent.py
1
7840
# coding=utf-8 """Provides RecurrentEvent class.""" import json from tempo.timeutils import delta, floor, add_delta # pylint: disable=unused-import from tempo.unit import Unit, ORDER, MIN, MAX, BASE, UNITS_MAX class RecurrentEvent(object): """An interval of time expressed in some 'unit' of time (second, week...
bsd-3-clause
-1,603,930,690,193,616,100
33.235808
78
0.567602
false
ArteliaTelemac/PostTelemac
PostTelemac/meshlayerlibs/tri/tripcolor.py
1
5567
from __future__ import print_function from matplotlib.collections import PolyCollection, TriMesh from matplotlib.colors import Normalize from matplotlib.tri.triangulation import Triangulation import numpy as np def tripcolor(ax, *args, **kwargs): """ Create a pseudocolor plot of an unstructured triangular gri...
gpl-3.0
-3,869,898,329,739,202,000
35.149351
114
0.641997
false
malvim/sublime_text_directional_duplicate_line
directional_duplicate_line.py
1
1168
import sublime, sublime_plugin class DirectionalDuplicateLineCommand(sublime_plugin.TextCommand): """ Duplicate line/selection before or after the current one. As it turns out, duplicating "before" just means restoring each selection to the state it was before duplication. """ def ...
mit
453,797,869,429,773,000
36.677419
84
0.592466
false
alvestrand/old-compare-codecs
lib/x264.py
1
2726
# Copyright 2014 Google. # # 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, softw...
apache-2.0
2,607,788,753,778,301,400
36.342466
79
0.632428
false
CursosVNQ/bulkymonkey
bulkymonkey/emailer/forms.py
1
5754
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Button, Field from crispy_forms.bootstrap import FormActions import floppyforms as forms from .models ...
bsd-3-clause
2,690,895,334,638,722,000
33.872727
132
0.566562
false
Bahus/easy_cache_async
tests/tests_miscellaneous.py
1
1895
from .tests_basic import ordinal_func, __name__ as __basic_name__ from .fixtures import User, __name__ as __test_name__ class TestMiscellaneous: def test_class_repr(self): assert repr(User.class_method_full_spec) == ( '<TaggedCached: ' 'callable="' + __test_name__ + '.User.class_m...
mit
-4,463,752,704,152,526,000
39.673913
97
0.516301
false
leighpauls/k2cro4
tools/perf/perf_tools/smoothness_benchmark_unittest.py
1
6445
# 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 telemetry import multi_page_benchmark from telemetry import multi_page_benchmark_unittest_base from perf_tools import smoothness_benchmark from tele...
bsd-3-clause
2,276,880,671,145,148,200
44.70922
80
0.685803
false
Slaveworx/Landduels
client.py
1
2271
import pygame import ConfigParser from events.eventlog import logger from events.dispatch import EventDispatcher from events.event import QuitEvent from events.event import TickEvent from events.command import Command from events.event import MVCChangeEvent from controllers.tick_controller import TickController from mo...
gpl-2.0
8,666,803,246,893,460,000
33.938462
94
0.699692
false
fparrel/vigicrues_tools
riverfromdb.py
1
1424
import pymongo from math import sin,cos,atan2,sqrt c = pymongo.MongoClient() print('Loading rivers from db...') rivers = list(c['wwsupdb']['osm'].find({},{'paths':True})) print('Loaded %d rivers'%len(rivers)) def GeodeticDistGreatCircle(lat1,lon1,lat2,lon2): "Compute distance between two points of the earth geoid...
gpl-3.0
1,259,118,203,142,699,500
33.731707
87
0.597612
false
martinpitt/cockpit
test/common/testlib.py
1
53623
# -*- coding: utf-8 -*- # This file is part of Cockpit. # # Copyright (C) 2013 Red Hat, Inc. # # Cockpit is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your...
lgpl-2.1
-4,625,834,238,252,430,000
35.702943
196
0.561494
false
8BitJosh/JukeBot
JukeBot/config.py
1
5800
import json import pprint class Config: def __init__(self): # Defaults for values # main self.webPort = 80 self.songcacheDir = "cache" self.logLength = 30 # player self.defaultVol = 100 # playlist self.skippingEnable = True self.vote...
mit
7,256,455,273,183,491,000
30.356757
109
0.563448
false
lmazuel/azure-sdk-for-python
azure-graphrbac/azure/graphrbac/models/user.py
1
4658
# 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
579,382,427,022,026,800
45.58
256
0.636539
false
vipints/genomeutils
utils/splice_site_search.py
1
3037
#!/usr/bin/env python """ Count the number of occurrences of a motif in drosophila introns near the splice sites (distance less than 200nt) The motif is YGCY where at least one Y has to be a T. [TGCC, TGCT, CGCT] """ import sys, re from Bio import SeqIO def intDB(intron_file): intdb = dict() fh = open(intron...
bsd-3-clause
-4,402,855,236,941,474,300
34.313953
113
0.44781
false
bobisjan/django-shanghai
shanghai/mixins/filter.py
1
1400
import inflection from shanghai.filters import filter_for class FilterMixin(object): def filter_collection(self, collection, **filters): raise NotImplementedError() def filter_parameters(self): filters = dict() for key, value in self.request.GET.items(): if not key.star...
mit
-2,547,349,877,380,844,500
25.923077
77
0.624286
false
mushorg/conpot
conpot/protocols/kamstrup/meter_protocol/command_responder.py
1
2610
# Copyright (C) 2014 Johnny Vestergaard <jkv@unixcluster.dk> # # 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 version. # # This...
gpl-2.0
-480,567,760,199,887,200
38.545455
109
0.656705
false
PaddlePaddle/Paddle
python/paddle/framework/random.py
1
3423
# Copyright (c) 2020 PaddlePaddle 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 app...
apache-2.0
-6,691,070,943,448,556,000
26.604839
129
0.644756
false
leighpauls/k2cro4
native_client/build/test_build.py
1
8322
#!/usr/bin/python # Copyright (c) 2011 The Native Client 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 optparse import OptionParser import os import subprocess import sys NATIVE_CLIENT_DIR = os.path.dirname(os.path.dirname(__...
bsd-3-clause
1,941,876,719,049,110,500
29.708487
79
0.633261
false
endlessm/chromium-browser
third_party/catapult/dashboard/dashboard/deprecate_tests.py
1
8780
# Copyright 2017 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. """Task queue which deprecates TestMetadata and kicks off jobs to delete old row data when tests stop sending data for an extended period of time. """ from _...
bsd-3-clause
4,137,298,411,665,103,400
31.518519
80
0.70877
false
qbazd/leo_pass_selector
predict_passes.py
1
3278
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging logging.basicConfig() #logging.debug("-- log message: ") from granule_utils import generate_avhrr_platform_passes_over_aoi, get_pass_for_granule,save_passes_as_shp, read_tle_from_file_db, get_tle_spacetrack import numpy as np import datetime from shapely....
mit
7,936,229,617,094,161,000
32.793814
157
0.708054
false
AntonelliLab/seqcap_processor
bin/aTRAM-master/lib/assemblers/base.py
1
11118
"""Base class for the various assembler wrappers.""" from os.path import basename, exists, getsize, join, splitext, abspath import datetime from subprocess import CalledProcessError from .. import db_atram from .. import log from .. import bio from .. import util class BaseAssembler: # pylint: disable=too-many-publ...
mit
9,139,719,403,340,895,000
37.470588
79
0.551538
false
MontpellierRessourcesImagerie/OMX-T
AndorSDK3-remote/AndorSDK3.py
1
9248
#!/usr/bin/python ################## # AndorCam.py # # Copyright David Baddeley, 2009 # d.baddeley@auckland.ac.nz # # 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 Licen...
gpl-3.0
2,696,824,594,058,127,400
30.246622
112
0.624243
false
adamfast/django-librarywatch
librarywatch/management/commands/check_for_updates.py
1
1270
import pip import xmlrpclib from django.conf import settings from django.core.management.base import BaseCommand, CommandError ''' originally based off of: https://gist.github.com/3555765 which was originally based off of: http://code.activestate.com/recipes/577708/ ''' class Command(BaseCommand):...
bsd-3-clause
3,981,747,130,392,024,600
35.285714
125
0.613386
false
ohspite/xatag
xatag/localrecoll.py
1
1194
# Copyright (c) 2013 Don March <don@ohspite.net> # 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. # This program is dis...
gpl-3.0
-678,353,045,055,167,600
36.3125
74
0.710218
false
harperj/KDTSpecializer
test/TestDiGraph.py
2
40801
import unittest from kdt import * from kdt import pyCombBLAS as pcb class DiGraphTests(unittest.TestCase): def initializeGraph(self, nvert, nedge, i, j, v=1): """ Initialize a graph with edge weights equal to one or the input value. """ iInd = ParVec(nedge) jInd = ParVec(ned...
bsd-3-clause
8,986,151,126,280,885,000
35.429464
90
0.587927
false
chop-dbhi/varify-data-warehouse
vdw/phenotypes/management/subcommands/load.py
1
12588
import re import logging from optparse import make_option from django.db import transaction, connections, DEFAULT_DB_ALIAS from django.core.management.base import BaseCommand from vdw.genes.models import Gene, GenePhenotype from vdw.literature.models import PubMed from vdw.phenotypes.models import Phenotype from vdw.va...
bsd-2-clause
-350,221,737,146,822,850
36.688623
96
0.491976
false
intel-hpdd/intel-manager-for-lustre
chroma_core/lib/storage_plugin/base_resource_attribute.py
1
3894
# Copyright (c) 2020 DDN. All rights reserved. # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. from chroma_core.models.storage_plugin import StorageResourceAttributeSerialized class BaseResourceAttribute(object): """Base class for declared attributes of Base...
mit
-1,159,394,484,938,782,000
39.14433
113
0.668978
false
PeterSurda/PyBitmessage
src/tests/test_api.py
1
6977
""" Tests using API. """ import base64 import json import time import xmlrpclib # nosec from test_process import TestProcessProto, TestProcessShutdown class TestAPIProto(TestProcessProto): """Test case logic for testing API""" _process_cmd = ['pybitmessage', '-t'] @classmethod def setUpClass(cls):...
mit
-8,888,647,028,124,587,000
34.416244
78
0.602551
false
3dfxsoftware/cbss-addons
hr_childrens/__openerp__.py
1
1751
# -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # # Copyright (c) 2012 Vauxoo - http://www.vauxoo.com/ # All Rights Reserved. # info Vauxoo (info@vauxoo.com) ####################################...
gpl-2.0
7,891,666,818,374,163,000
40.690476
78
0.523701
false
segafan/wme1_jankavan_tlc_edition-repo
src/scite/scite/scripts/commandsdoc.py
1
2404
# -*- coding: utf-8 -*- from __future__ import with_statement import os, sys scintillaDirectory = os.path.join("..", "..", "scintilla", "include") sys.path.append(scintillaDirectory) import Face def cell(s): return "<td>%s</td>" % s def faceFeatures(out): out.write("<h2>Scintilla key commands</h2>\...
mit
-6,977,244,265,334,709,000
31.859155
92
0.591098
false
froggleston/ena_search_django
ena/utils/aspera_connect_utils.py
1
2816
from __future__ import print_function import sys,os,argparse,csv,subprocess,urllib from channels import Channel, Group import logging, json from enaBrowserTools.python import readGet, utils from django.conf import settings from utils import ena_utils current_downloads = dict() def start_aspera(data, reply_channel): ...
mit
3,286,711,644,581,519,400
45.933333
196
0.603338
false
jlweand/DssVisualizer
app/plugins/datasource/mongodb/tsharkProtocol.py
1
4647
# Copyright (C) 2016 Jamie Acosta, Jennifer Weand, Juan Soto, Mark Eby, Mark Smith, Andres Olivas # # This file is part of DssVisualizer. # # DssVisualizer 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, eit...
gpl-3.0
-8,470,261,259,824,983,000
48.967742
119
0.738111
false
carquois/blobon
blobon/blogs/migrations/0039_auto__add_translation__add_language.py
1
18897
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Translation' db.create_table('blogs_translation', ( ('id', self.gf('django.db.mo...
mit
5,041,133,978,491,442,000
82.251101
182
0.540403
false
cderici/pycket
pycket/AST.py
1
4466
from pycket.util import snake_case from rpython.rlib import jit, objectmodel class Visitable(type): def __new__(cls, name, bases, dct): visit_method_name = "visit_" + snake_case(name) @objectmodel.specialize.argtype(1) def dispatch_visitor(self, visitor, *args): return getattr(...
mit
-5,257,308,553,851,432,000
31.59854
79
0.612181
false
Civa/Zenith
src/Backend/Distributed/hubs/vo/model/maps.py
1
1485
__author__ = 'civa' import os from shared.loaders import JsonDataLoader class FieldMapCollection(object): def __init__(self, providers): self.all_maps = [] for provider, val in providers.iteritems(): map = FieldMap(provider, val) self.all_maps.append(map) def get(sel...
gpl-3.0
-2,522,770,145,718,167,600
25.052632
90
0.544108
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/aio/operations/_express_route_cross_connections_operations.py
1
46681
# 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 may ...
mit
8,205,824,911,380,897,000
51.986379
277
0.659862
false
kiall/designate-py3
designate/objects/adapters/base.py
1
9240
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
-6,475,285,013,868,247,000
38.319149
78
0.523593
false
srgblnch/LinacGUI
ctli/widgets/linacstartupsynoptic.py
1
3336
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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. # # This program is distrib...
gpl-3.0
3,578,222,502,056,063,000
34.489362
74
0.594424
false
bsipocz/glue
glue/external/wcsaxes/coordinate_helpers.py
1
18539
""" This file defines the classes used to represent a 'coordinate', which includes axes, ticks, tick labels, and grid lines. """ import numpy as np from matplotlib.ticker import Formatter from matplotlib.transforms import Affine2D, ScaledTranslation from matplotlib.patches import PathPatch from .formatter_locator im...
bsd-3-clause
5,670,622,009,696,808,000
37.067762
113
0.561195
false
KristoferHellman/gimli
doc/tutorials/modelling/develop/plot_XX_mod_fv_laplace-2d.py
1
2869
#!/usr/bin/env python # -*- coding: utf-8 -*- """ """ import pygimli as pg import pygimli.solver as solver from pygimli.viewer import showMesh from pygimli.mplviewer import drawMesh, drawStreams from pygimli.meshtools import createMesh import matplotlib.pyplot as plt import numpy as np from solverFVM import solveFi...
gpl-3.0
6,422,610,871,155,879,000
27.989899
118
0.60474
false
KIAaze/bin_and_dotfiles_public
bins/public_bin/git-config-submitter.py
1
4492
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # <pep8-80 compliant> # .. todo:: global config? But then I wouldn't need this script. ;) # .. todo:: GUI for name selection? list of previously used name+mail pairs? -> could use pick module... import re import sys import argparse import textwrap import subprocess def...
gpl-3.0
2,248,513,882,517,703,200
29.97931
123
0.591941
false
sergioska/EvernoteSyntaxHighlight
evercode.py
1
2907
__author__ = 'Sergio Sicari' __email__ = "sergiosicari@gmail.com" from evernote.api.client import EvernoteClient import evernote.edam.type.ttypes as Types import evernote.edam.notestore.NoteStore as NoteStore import evernote.edam.userstore.UserStore as UserStore class EverCode: def __init__(self, Settings): ...
apache-2.0
-3,878,279,957,210,597,400
41.144928
96
0.605435
false
ggoblin/trello-sync-client
gtsc/__init__.py
1
1882
# -*- coding: utf-8 -*- import locale from dialog import Dialog from gtsc import api, goblinapi locale.setlocale(locale.LC_ALL, '') d = Dialog(dialog="dialog") BOARD_ID = '' def main(): import gtsc.api global BOARD_ID d.set_background_title("Goblin Trello Sync client") if gtsc.api.API_TOKEN == '': ...
apache-2.0
3,027,491,845,206,295,600
26.275362
74
0.518066
false
makelove/OpenCV-Python-Tutorial
Notebook/Blog/deep-learning-opencv深度学习dnn/deep_learning_with_opencv.py
1
2821
# USAGE ''' python deep_learning_with_opencv.py --image images/jemma.png \ --prototxt bvlc_googlenet.prototxt \ --model bvlc_googlenet.caffemodel --labels synset_words.txt python deep_learning_with_opencv.py --image images/traffic_light.png \ --prototxt bvlc_googlenet.prototxt \ --model bvlc_googlenet.caffemodel -...
mit
-692,876,233,722,591,900
35.166667
96
0.686281
false
guyzmo/git-repo
tests/integration/test_github.py
1
17070
#!/usr/bin/env python3 import os import sys import logging import pytest from unittest.mock import mock_open, patch ################################################################################# # Enable logging log = logging.getLogger('test.github') ############################################################...
gpl-2.0
-7,772,299,219,825,437,000
42.324873
142
0.497715
false
smallyear/linuxLearn
salt/salt/pillar/svn_pillar.py
1
5964
# -*- coding: utf-8 -*- ''' Clone a remote SVN repository and use the filesystem as a Pillar source This external Pillar source can be configured in the master config file like so: .. code-block:: yaml ext_pillar: - svn: trunk svn://svnserver/repo root=subdirectory The `root=` parameter is optional and us...
apache-2.0
1,084,564,189,793,038,000
29.428571
100
0.610832
false
tz70s/pro-sy-kuo
scripts/sgen.py
1
1518
#!/usr/bin/python # Generate original static file to another with new prefix # ./sgen index.html old_prefix static_index.html new_prefix import sys from os import walk, path, environ # File lists # The two file lists should be aligned. root = environ['TRAVIS_BUILD_DIR'] files = [] for (dirpath, dirname, filenames)...
mit
8,222,067,053,297,881,000
26.6
112
0.639657
false
kevinhikali/ml_kevin
tf/mnist_mlp/tf_mnist_mlp_train.py
1
2307
# -*- coding: utf-8 -*- """ @author: kevinhikali @email: hmingwei@gmail.com """ import tensorflow as tf import numpy as np import sys sys.path.append('../../res/') from mnist import import_mnist data, label = import_mnist() x_data = data.reshape(data.shape[0], 784) x_data /= 255 y_data = label if x_data.shape[0] > 0...
gpl-3.0
8,366,114,008,215,482,000
29.355263
77
0.618552
false
acidjunk/django-scrumboard
scrumtools/apps/utils/templatetags/get_objects.py
1
2238
# -*- coding: UTF-8 -*- from django.db import models from django import template register = template.Library() @register.tag def get_objects(parser, token): """ Gets a queryset of objects of the model specified by app and model names Usage: {% get_objects [<manager>.]<method> from <app_name>.<m...
gpl-3.0
-4,711,633,709,056,755,000
34.539683
187
0.623771
false
Clinical3PO/Platform
dev/Clinical3PO-Vagrant/files/testing/ugene_scripts/arff_oligos/runUgeneAppOligos.py
1
6141
#!/usr/bin/python import re import os import sys import datetime ### Input is Glasgow coma patients who are dead as command line argument. ### Data is collected 48 hours before their death occurance for some random patients ### From patients 48 hours data, Oligos file is created ### This file is splitted into individu...
apache-2.0
-6,465,829,641,590,132,000
47.738095
341
0.615209
false
bearstech/modoboa-admin
modoboa_admin/management/commands/_import.py
1
1477
import os.path import sys import csv from progressbar import ProgressBar, Percentage, Bar, ETA from modoboa.core.models import User from modoboa.lib import events from modoboa.lib.exceptions import Conflict from ... import lib def import_csv(filename, options): """Import objects from a CSV file.""" superadm...
mit
-1,151,431,898,169,330,000
26.867925
64
0.523358
false
alexei-matveev/ccp1gui
interfaces/tools.py
1
35557
# # This file is part of the CCP1 Graphical User Interface (ccp1gui) # # (C) 2002-2005 CCLRC Daresbury Laboratory # # 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 ...
gpl-2.0
-6,492,701,986,490,068,000
34.309831
115
0.576623
false