repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | 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 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
GoogleCloudPlatform/declarative-resource-client-library | python/services/apigee/environment.py | 1 | 8322 | # Copyright 2021 Google LLC. 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 o... | apache-2.0 | -8,753,835,329,695,119,000 | 34.716738 | 86 | 0.66883 | false | 4.302999 | false | false | false |
igorcoding/asynctnt | asynctnt/exceptions.py | 1 | 4098 | import enum
class TarantoolError(Exception):
"""
Base Tarantool Exception class
"""
pass
class TarantoolSchemaError(TarantoolError):
"""
Exception is raised when any problems with schema occurred
"""
pass
class TarantoolDatabaseError(TarantoolError):
"""
Excepti... | apache-2.0 | 3,441,161,504,051,915,000 | 24.296296 | 67 | 0.624451 | false | 2.787755 | false | false | false |
wxdwfc/security_lab | exploit-template.py | 1 | 1889 | #!/usr/bin/python
import sys
import socket
import traceback
import urllib
import struct
####
## You might find it useful to define variables that store various
## stack or function addresses from the zookd / zookfs processes,
## which you can then use in build_exploit(); the following are just
## examples.
stack_buf... | mit | 4,728,255,385,788,143,000 | 24.186667 | 70 | 0.651668 | false | 3.415913 | false | false | false |
dochevviktor/coding_challenges | DFCL2-KeyFinder.py | 1 | 2118 | import time
import sys
"""
Goal here is to decrypt cipher by brute force
Using bytes seemed to improve speed to a certain degree
"""
cipher =[0x5499fa99, 0x1ee7d8da, 0x5df0b78b, 0x1cb0c18c, 0x10f09fc5, 0x4bb7fdae, 0x7fcb95ac,
0xe494fbae, 0x8f5d90a3, 0xc766fdd7, 0xb7399ecc, 0xbf4af592, 0xf35c9dc2, 0x272be2... | mit | 8,956,394,434,768,525,000 | 33.16129 | 112 | 0.629367 | false | 2.371781 | false | false | false |
eriklindernoren/Keras-GAN | pixelda/data_loader.py | 1 | 3259 | import scipy
from glob import glob
import numpy as np
from keras.datasets import mnist
from skimage.transform import resize as imresize
import pickle
import os
import urllib
import gzip
class DataLoader():
"""Loads images from MNIST (domain A) and MNIST-M (domain B)"""
def __init__(self, img_res=(128, 128)):
... | mit | -2,877,848,713,173,794,000 | 33.305263 | 115 | 0.562136 | false | 3.359794 | false | false | false |
ActiveState/code | recipes/Python/498106_Convert_formulstring_implied_multiplicatiproper_/recipe-498106.py | 1 | 1913 | def toProperFormula(s):
"""
Given formula string, returns a modified formula with missing
multiplication symbols and grouping symbols [],{} replaced by parentheses.
Only primitive error checking for mismatched grouping symbols is shown in
this recipe.
author: ernesto.adorio@gmail.com, ernie@... | mit | -3,109,650,680,688,000,000 | 32.561404 | 106 | 0.500261 | false | 3.707364 | false | false | false |
mattilyra/gensim | gensim/downloader.py | 1 | 14126 | """
This module is an API for downloading, getting information and loading datasets/models.
Give information about available models/datasets:
>>> import gensim.downloader as api
>>>
>>> api.info() # return dict with info about available models/datasets
>>> api.info("text8") # return dict with info about "text8" dat... | lgpl-2.1 | -6,188,187,554,405,224,000 | 30.53125 | 112 | 0.606116 | false | 3.829222 | false | false | false |
rycus86/docker-pygen | tests/test_generator.py | 1 | 4910 | import pygen
from unittest_helper import BaseDockerTestCase
class GeneratorTest(BaseDockerTestCase):
app = None
def tearDown(self):
super(GeneratorTest, self).tearDown()
if hasattr(self, 'app') and self.app:
self.app.api.close()
def test_generate(self):
test_containe... | mit | -8,002,882,736,790,479,000 | 45.761905 | 120 | 0.556823 | false | 3.953301 | true | false | false |
marcosfede/algorithms | tree/binary_tree/path_sum/path_sum/path_sum2.py | 1 | 1375 | def path_sum(root, sum):
if not root:
return []
res = []
DFS(root, sum, [], res)
return res
def DFS(root, sum, ls, res):
if not root.left and not root.right and root.val == sum:
ls.append(root.val)
res.append(ls)
if root.left:
DFS(root.left, sum - root.val, ls +... | gpl-3.0 | -5,353,832,707,150,959,000 | 26.5 | 83 | 0.537455 | false | 3.205128 | false | false | false |
alerta/python-alerta | alertaclient/commands/cmd_heartbeats.py | 1 | 5322 | import json
import click
from tabulate import tabulate
from alertaclient.models.heartbeat import Heartbeat
from alertaclient.utils import origin
@click.command('heartbeats', short_help='List heartbeats')
@click.option('--alert', is_flag=True, help='Alert on stale or slow heartbeats')
@click.option('--severity', '-s... | mit | -4,965,624,064,348,664,000 | 44.487179 | 117 | 0.511086 | false | 4.479798 | false | false | false |
repotvsupertuga/tvsupertuga.repository | script.module.streamtvsupertuga/lib/resources/lib/sources/en_debrid/rlsbb.py | 1 | 7811 | # -*- coding: utf-8 -*-
import re,urllib,urlparse
import traceback
from resources.lib.modules import log_utils, source_utils
from resources.lib.modules import client, rd_check
from resources.lib.modules import debrid, control
from resources.lib.sources import cfscrape
class source:
def __init__(self):
se... | gpl-2.0 | -5,736,061,815,632,537,000 | 38.852041 | 109 | 0.416592 | false | 4.45579 | false | false | false |
Dubrzr/golb | users/models.py | 1 | 1432 | from django.contrib.auth.base_user import BaseUserManager, AbstractBaseUser
from django.db import models
class UserManager(BaseUserManager):
def create_user(self, **user_data):
user = self.model()
print(dict(user_data))
user.set_password(user_data.pop('password'))
for key, value in... | mit | 1,415,178,026,668,730,400 | 31.545455 | 75 | 0.627793 | false | 3.653061 | false | false | false |
lino-framework/xl | lino_xl/lib/products/fixtures/furniture.py | 1 | 4427 | # -*- coding: UTF-8 -*-
# Copyright 2009-2019 Rumma & Ko Ltd
# License: GNU Affero General Public License v3 (see file COPYING for details)
from lino.utils.instantiator import Instantiator
from lino_xl.lib.products.choicelists import ProductTypes
from lino.api import dd, _
def objects():
productcat = Instantia... | bsd-2-clause | -2,917,680,532,478,270,000 | 42.643564 | 84 | 0.54696 | false | 3.56346 | false | false | false |
transt/cloud-init-0.7.5 | cloudinit/util.py | 1 | 58202 | # vi: ts=4 expandtab
#
# Copyright (C) 2012 Canonical Ltd.
# Copyright (C) 2012, 2013 Hewlett-Packard Development Company, L.P.
# Copyright (C) 2012 Yahoo! Inc.
#
# Author: Scott Moser <scott.moser@canonical.com>
# Author: Juerg Haefliger <juerg.haefliger@hp.com>
# Author: Joshua Harlow <harlowja@yaho... | gpl-3.0 | -5,898,552,899,357,104,000 | 29.063017 | 123 | 0.560221 | false | 3.752789 | false | false | false |
google/ldif | ldif/util/math_util.py | 1 | 3602 | # 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 agreed to in writing, ... | apache-2.0 | -8,889,287,189,012,497,000 | 39.022222 | 80 | 0.691838 | false | 3.391714 | false | false | false |
lundjordan/slaveapi | slaveapi/clients/bugzilla.py | 1 | 2329 | from ..global_state import bugzilla_client
import logging
import urllib
from requests import HTTPError
log = logging.getLogger(__name__)
class Bug(object):
def __init__(self, id_, loadInfo=True):
self.id_ = id_
self.data = {}
if loadInfo:
self.refresh()
def refresh(self):
... | mpl-2.0 | 151,448,738,641,104,300 | 29.246753 | 100 | 0.573637 | false | 3.65047 | false | false | false |
antoine-de/navitia | source/jormungandr/jormungandr/modules/v1_routing/v1_routing.py | 1 | 10328 | # coding=utf-8
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open p... | agpl-3.0 | -5,484,635,130,334,410,000 | 40.477912 | 100 | 0.512006 | false | 4.51596 | false | false | false |
Tocknicsu/nctuoj | backend/service/verdict.py | 1 | 5475 | from service.base import BaseService
from req import Service
from utils.form import form_validation
import os
import config
class VerdictService(BaseService):
def __init__(self, db, rs):
super().__init__(db, rs)
VerdictService.inst = self
def get_verdict_list(self, data={}):
# res = s... | mit | -6,884,955,607,823,547,000 | 35.019737 | 162 | 0.498265 | false | 3.518638 | false | false | false |
gynvael/stream | 017-osdev-06/build.py | 1 | 1266 | #!/usr/bin/python
import os
import subprocess
def fix_stage1_size():
stage2_size = os.stat("stage2").st_size
kernel_size = os.stat("kernel64").st_size
stage2_size = (stage2_size + kernel_size + 511) / 512
if stage2_size >= 255:
raise Exception("stage2 & kernel are too large")
with open(... | mit | -4,116,388,021,985,915,400 | 19.1 | 73 | 0.554502 | false | 2.825893 | false | false | false |
googleapis/python-dialogflow-cx | google/cloud/dialogflowcx_v3/types/entity_type.py | 1 | 13987 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 1,964,519,015,032,665,000 | 40.017595 | 109 | 0.645028 | false | 4.285233 | false | false | false |
opennode/nodeconductor | waldur_core/cost_tracking/tasks.py | 1 | 2343 | from celery import shared_task
from waldur_core.cost_tracking import CostTrackingRegister, models
from waldur_core.structure import models as structure_models
@shared_task(name='waldur_core.cost_tracking.recalculate_estimate')
def recalculate_estimate(recalculate_total=False):
""" Recalculate price of consumable... | mit | 8,238,126,947,783,257,000 | 47.8125 | 96 | 0.729834 | false | 4.379439 | false | false | false |
wodo/WebTool3 | webtool/server/models/event.py | 1 | 20122 | # -*- coding: utf-8 -*-
from django.db import models
from django.template.defaultfilters import date, time
from .reference import Reference
from .equipment import Equipment
from .approximate import Approximate
from .mixins import SeasonMixin, DescriptionMixin
from .time_base import TimeMixin
from . import fields
cla... | bsd-2-clause | -9,152,673,757,879,513,000 | 32.855219 | 113 | 0.564147 | false | 3.728908 | false | false | false |
deepmind/open_spiel | open_spiel/python/bots/is_mcts_test.py | 1 | 2548 | # Copyright 2019 DeepMind Technologies Ltd. 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 appl... | apache-2.0 | 1,481,365,194,119,847,400 | 35.4 | 80 | 0.68956 | false | 3.287742 | true | false | false |
googleinterns/contextual-adjectives | generate_noun_to_adj_list/noun_to_adj_gen.py | 1 | 4308 | """Code to generate noun to adjective dictionary"""
import nltk
from nltk.tokenize.treebank import TreebankWordTokenizer
from bert_setup import Bert
class NounToAdjGen:
"""Add adjectives for nouns in dictionary noun_to_adj.
Attributes:
noun_to_adj : Noun to adjective dictionary.
tokenizer : An... | apache-2.0 | 7,461,075,055,532,946,000 | 47.41573 | 90 | 0.600743 | false | 3.682051 | false | false | false |
globus-labs/ripple | ripple/observers/ipc/ipc_observer.py | 1 | 5264 | import os
import time
import subprocess
import sys
import uuid
import json
import re
from ripple.observers.base_observer import BaseObserver
from ripple import logger, RippleConfig
class IPCObserver(BaseObserver):
"""
Set up the polling IPC monitor. It will use the
"ipcs" command to query for shared memo... | apache-2.0 | -8,401,639,659,101,003,000 | 31.695652 | 86 | 0.492781 | false | 4.666667 | false | false | false |
Crowdcomputer/CroCoAPI | crocoapi/settings.py | 1 | 2668 | """
Django settings for CroCoAPI 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(BASE_DIR, ...)
i... | gpl-2.0 | 2,834,945,857,428,308,500 | 25.415842 | 75 | 0.718891 | false | 3.68 | false | false | false |
sbrodehl/HashCode | Final Round/best_solution_in_the_wuuuuuuurld.py | 1 | 19988 | from random import shuffle
from skimage.morphology import skeletonize, medial_axis
from tqdm import tqdm
from scipy import signal
import scipy.ndimage.filters as fi
import pickle
import glob
import bz2
import multiprocessing
from multiprocessing import Pool
from functools import partial
from IO import *
from Utilities... | apache-2.0 | 1,336,552,385,937,426,200 | 32.092715 | 120 | 0.537422 | false | 3.372364 | false | false | false |
dcondrey/scrapy-spiders | newenglandfilm/newengland/spiders/newenglandfilm.py | 1 | 1830 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from scrapy.spider import Spider
from scrapy.selector import Selector
from scrapy.crawler import Crawler
from scrapy.http import Request
from scrapy import signals
from scrapy.utils.project import get_project_settings
from my_settings import name_file, test_mode, diff... | mit | 808,298,491,493,015,200 | 37.826087 | 138 | 0.60929 | false | 3.376384 | false | false | false |
astrobin/astrobin | astrobin_apps_payments/api/views/pricing_view.py | 1 | 1570 | import logging
from braces.views import JSONResponseMixin
from django.conf import settings
from django.http import HttpResponseBadRequest
from django.views import View
from rest_framework.authtoken.models import Token
from astrobin_apps_payments.services.pricing_service import PricingService
log = logging.getLogger(... | agpl-3.0 | -8,189,497,786,092,724,000 | 41.432432 | 105 | 0.67707 | false | 4.077922 | false | false | false |
amitjamadagni/sympy | sympy/matrices/tests/test_sparse.py | 2 | 16649 | from sympy import S, Symbol, I, Rational, PurePoly
from sympy.matrices import Matrix, SparseMatrix, eye, zeros, ShapeError
from sympy.utilities.pytest import raises, XFAIL
def test_sparse_matrix():
def sparse_eye(n):
return SparseMatrix.eye(n)
def sparse_zeros(n):
return SparseMatrix.zeros(n)... | bsd-3-clause | -4,237,973,322,416,478,000 | 28.998198 | 79 | 0.417923 | false | 2.787843 | true | false | false |
TshepangRas/tshilo-dikotla | td_maternal/forms/antenatal_enrollment_form.py | 1 | 2783 | from dateutil.relativedelta import relativedelta
from django import forms
from edc_constants.constants import YES
from td_maternal.models.enrollment_helper import EnrollmentHelper
from ..models import AntenatalEnrollment, MaternalEligibility
from .base_enrollment_form import BaseEnrollmentForm
class AntenatalEnro... | gpl-2.0 | -5,039,070,942,179,587,000 | 46.169492 | 113 | 0.625943 | false | 4.48871 | true | false | false |
damoxc/vsmtpd | vsmtpd/daemon.py | 1 | 7764 | #
# vsmtpd/daemon.py
#
# Copyright (C) 2011 Damien Churchill <damoxc@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, or (at your option)
# any later version.
#
# T... | gpl-3.0 | -6,894,904,686,943,122,000 | 30.180723 | 102 | 0.577409 | false | 4.069182 | true | false | false |
zentralopensource/zentral | zentral/contrib/osquery/serializers.py | 1 | 5197 | from rest_framework import serializers
from zentral.contrib.inventory.models import EnrollmentSecret
from zentral.contrib.inventory.serializers import EnrollmentSecretSerializer
from .models import Configuration, Enrollment, Pack, Platform
class ConfigurationSerializer(serializers.ModelSerializer):
class Meta:
... | apache-2.0 | -9,080,164,344,115,751,000 | 44.587719 | 119 | 0.646527 | false | 4.181014 | false | false | false |
GreatSCT/GreatSCT | lib/common/orchestra.py | 1 | 8604 | '''
This is the conductor which controls everything
'''
import glob
import imp
import os
import readline
import sys
from lib.common import completer
from lib.common import helpers
from lib.common import messages
class Conductor:
def __init__(self, cli_stuff):
# Create dictionaries of supported modules... | gpl-3.0 | 3,642,661,304,942,000,600 | 40.565217 | 113 | 0.477569 | false | 4.941987 | false | false | false |
zultron/virt-manager | virtManager/domain.py | 1 | 61912 | #
# Copyright (C) 2006, 2013 Red Hat, Inc.
# Copyright (C) 2006 Daniel P. Berrange <berrange@redhat.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 2 of the License, or
# (... | gpl-2.0 | 5,290,043,022,076,482,000 | 32.375741 | 80 | 0.56443 | false | 3.997159 | false | false | false |
ccpgames/eve-metrics | web2py/gluon/contrib/fpdf/fpdf.py | 1 | 73164 | #!/usr/bin/env python
# -*- coding: latin-1 -*-
# ****************************************************************************
# * Software: FPDF for python *
# * Version: 1.7.1 *
# * Date: 2010-09-10 ... | mit | 6,015,571,498,540,385,000 | 36.10625 | 142 | 0.439847 | false | 3.823769 | false | false | false |
javiercantero/streamlink | src/streamlink/plugins/live_russia_tv.py | 1 | 1078 | import re
from streamlink.plugin import Plugin
from streamlink.plugin.api import http
from streamlink.stream import HLSStream
class LiveRussia(Plugin):
url_re = re.compile(r"https?://(?:www.)?live.russia.tv/index/index/channel_id/")
iframe_re = re.compile(r"""<iframe[^>]*src=["']([^'"]+)["'][^>]*>""")
stre... | bsd-2-clause | 8,933,361,089,661,961,000 | 31.69697 | 89 | 0.627087 | false | 3.411392 | false | false | false |
SVilgelm/CloudFerry | cloudferry/lib/utils/qemu_img.py | 1 | 6446 | # Copyright (c) 2014 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, so... | apache-2.0 | -2,317,633,674,190,102,500 | 37.831325 | 78 | 0.580205 | false | 4.054088 | false | false | false |
ruleant/buildtime-trend | generate_trend.py | 1 | 2619 | #!/usr/bin/env python
# vim: set expandtab sw=4 ts=4:
'''
Generates a trend (graph) from the buildtimes in buildtimes.xml
Usage : generate_trend.py -h --mode=native,keen
Copyright (C) 2014 Dieter Adriaenssens <ruleant@users.sourceforge.net>
This file is part of buildtime-trend
<https://github.com/ruleant/buildtime-t... | gpl-3.0 | -5,318,230,504,942,116,000 | 30.939024 | 78 | 0.71554 | false | 3.602476 | false | false | false |
Silvian/samaritan | samaritan/constants.py | 1 | 2682 | """
@author: Silvian Dragan
@Date: 05/05/2016
@Copyright: Copyright 2016, Samaritan CMA - Published under GNU General Public Licence v3
@Details: https://github.com/Silvian/samaritan
Main file for storing constants classes
"""
from django.conf import settings
from django.utils.timezone import now
class SettingsCons... | gpl-3.0 | 2,562,244,859,031,018,000 | 26.367347 | 89 | 0.645787 | false | 3.547619 | false | false | false |
AlexBaranosky/EmacsV2 | floobits/floo/common/migrations.py | 1 | 3449 | import os
import json
import errno
from collections import defaultdict
try:
from . import shared as G
from . import utils
except (ImportError, ValueError):
import shared as G
import utils
def rename_floobits_dir():
# TODO: one day this can be removed (once all our users have updated)
old_cola... | gpl-3.0 | -8,162,171,141,782,456,000 | 28.228814 | 112 | 0.554364 | false | 3.537436 | false | false | false |
tangentlabs/django-fancypages | fancypages/managers.py | 1 | 2544 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
import django
from django.db import models
from django.utils.translation import get_language
from .queryset import PageQuerySet
class PageManager(models.Manager):
def get_select_related_queryset(self):
"""
Get the ... | bsd-3-clause | -7,800,725,164,194,478,000 | 30.407407 | 78 | 0.632862 | false | 4.136585 | false | false | false |
alex/readthedocs.org | readthedocs/doc_builder/backends/sphinx.py | 1 | 5736 | import os
import shutil
from django.template.loader import render_to_string
from django.template import Template, Context
from django.contrib.auth.models import SiteProfileNotAvailable
from django.core.exceptions import ObjectDoesNotExist
from django.conf import settings
from doc_builder.base import BaseBuilder, rest... | mit | -7,620,218,241,863,675,000 | 36.246753 | 87 | 0.588389 | false | 4.12069 | false | false | false |
lukeroge/CloudbotX | stratus/loader/pluginloader.py | 1 | 16561 | import asyncio
import enum
import glob
import importlib
import inspect
import logging
import os
import re
import itertools
from stratus.event import Event, HookEvent
logger = logging.getLogger("stratus")
class HookType(enum.Enum):
"""
"""
on_start = 1,
on_stop = 2,
sieve = 3,
event = 4,
... | gpl-3.0 | 3,569,536,791,953,528,300 | 32.122 | 120 | 0.596522 | false | 4.048154 | false | false | false |
ddurieux/alignak | alignak/property.py | 1 | 11612 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- mode: python ; coding: utf-8 -*-
#
# Copyright (C) 2015-2015: Alignak team, see AUTHORS.txt file for contributors
#
# This file is part of Alignak.
#
# Alignak is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publi... | agpl-3.0 | 6,923,826,551,157,229,000 | 32.359195 | 90 | 0.617797 | false | 3.840225 | false | false | false |
mola/qgis | python/plugins/GdalTools/tools/doTranslate.py | 1 | 12011 | # -*- coding: utf-8 -*-
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *
from ui_widgetTranslate import Ui_GdalToolsWidget as Ui_Widget
from widgetBatchBase import GdalToolsBaseBatchWidget as BaseBatchWidget
from dialogSRS import GdalToolsSRSDialog as SRSDialog
import... | gpl-2.0 | 8,092,497,440,117,212,000 | 39.577703 | 171 | 0.650737 | false | 3.939324 | false | false | false |
kvirund/codingame | medium/network.cabling/solution.py | 1 | 1412 | #!/usr/bin/python
# Author: Anton Gorev aka Veei
# Date: 2014-11-06
import sys
n = int(raw_input())
ys = []
sum = 0
first = True
minx = maxx = 0
miny = maxy = 0
for i in xrange(n):
b = [int(a) for a in raw_input().split(" ")]
ys += [b[1]]
sum += b[1]
if first or minx > b[0]:
minx = b[0]
i... | mit | 5,430,850,358,133,231,000 | 21.0625 | 79 | 0.5 | false | 2.757813 | false | false | false |
heldergg/labs | lib/hc/draw.py | 1 | 8228 | # -*- coding: utf-8 -*-
'''
This module produces SVG files with hemicycles representations.
'''
##
# Imports
##
from pysvg.structure import svg, g, defs, use, title
from pysvg.builders import TransformBuilder, ShapeBuilder
from pysvg.shape import path
from pysvg.style import style
from math import sin, cos, pi, flo... | gpl-3.0 | -4,524,365,662,919,559,700 | 30.389313 | 264 | 0.544504 | false | 3.396943 | false | false | false |
DjangoUnchained-CRUD/python | tutorial/tutorial/tutorial/urls.py | 1 | 1193 | """tutorial URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-b... | mit | -8,288,057,378,176,101,000 | 36.28125 | 82 | 0.720872 | false | 3.582583 | false | false | false |
bburan/psiexperiment | psi/data/io/summarize_abr.py | 1 | 11625 | import argparse
from glob import glob
import os.path
import numpy as np
import pandas as pd
from psi.data.io import abr
columns = ['frequency', 'level', 'polarity']
def process_folder(folder, filter_settings=None):
glob_pattern = os.path.join(folder, '*abr*')
filenames = glob(glob_pattern)
process_fil... | mit | -145,646,216,243,829,300 | 36.140575 | 80 | 0.608516 | false | 3.800262 | false | false | false |
shootsoft/practice | lintcode/NineChapters/06/add-two-numbers.py | 1 | 1272 | __author__ = 'yinjun'
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
# @param l1: the first list
# @param l2: the second list
# @return: the sum list of l1 and l2
def addLists(self, l1, l2):
... | apache-2.0 | -7,880,751,064,825,004,000 | 23.461538 | 52 | 0.400943 | false | 3.494505 | false | false | false |
GoogleCloudPlatform/cloud-ops-sandbox | src/loadgenerator/sre_recipe_utils.py | 1 | 6473 | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 5,255,987,713,217,035,000 | 41.032468 | 164 | 0.591534 | false | 4.347213 | false | false | false |
suutari-ai/shoop | shuup/front/__init__.py | 2 | 2946 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from shuup.apps import AppConfig
from shuup.apps.settings import v... | agpl-3.0 | 1,166,574,447,828,370,000 | 43.636364 | 97 | 0.682281 | false | 3.668742 | true | false | false |
syl20bnr/i3ci | _deprecated/scripts/menu/i3_actions.py | 1 | 17882 | #!/usr/bin/env python
# author: syl20bnr (2013)
# goal: i3 actions module.
import os
from subprocess import Popen, PIPE
import i3
from Xlib import display
import i3ci_menu
from constants import DMENU_MAX_ROW, DMENU_FONT, DMENU_HEIGHT
from feeders import (cur_workspace,
cur_workspaces,
... | mit | 1,454,420,463,426,443,000 | 32.612782 | 79 | 0.552455 | false | 3.733974 | false | false | false |
ryanpetrello/draughtcraft | draughtcraft/tests/selenium/recipes/test_builder.py | 1 | 23046 | import time
from selenium.webdriver.support.ui import Select
from draughtcraft import model
from draughtcraft.tests.selenium import TestSeleniumApp
class TestAllGrainBuilder(TestSeleniumApp):
def setUp(self):
super(TestAllGrainBuilder, self).setUp()
model.Style(
name='American IPA'... | bsd-3-clause | 5,432,450,340,929,008,000 | 30.017497 | 79 | 0.525037 | false | 3.501899 | true | false | false |
DarkRedman/PyGet | pyget.py | 1 | 6109 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Filename: pydl.py #
# Authors: Brian Tomlinson <darthlukan@gmail.com> #
# Manuel Debaux <debaux.manual@gmail.com> #
# Brian Turner <archkaine@gmail.com> #
# URL: git@github.com:darthlukan/piddle.git #
# ... | gpl-2.0 | 544,684,471,682,824,060 | 38.921569 | 107 | 0.628193 | false | 3.763401 | false | false | false |
algorhythms/LeetCode | 934 Shortest Bridge.py | 1 | 2622 | #!/usr/bin/python3
"""
In a given 2D binary array A, there are two islands. (An island is a
4-directionally connected group of 1s not connected to any other 1s.)
Now, we may change 0s to 1s so as to connect the two islands together to form 1
island.
Return the smallest number of 0s that must be flipped. (It is guar... | mit | -2,098,768,741,559,814,000 | 26.3125 | 104 | 0.450801 | false | 3.045296 | false | false | false |
badele/home-assistant | homeassistant/components/zone.py | 1 | 4147 | """
homeassistant.components.zone
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Allows defintion of zones in Home Assistant.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/zone/
"""
import logging
from homeassistant.const import (
ATTR_HIDDEN, ATTR_ICON, ATTR_LATI... | mit | -537,197,058,929,668,000 | 29.270073 | 79 | 0.613456 | false | 4.081693 | true | false | false |
tkensiski/rexus | Rexus/device_poller/devices/device_loader.py | 1 | 1483 | import logging
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())
class DeviceLoader(object):
device_classes = {
# device_type : getattr(module, class_name)
}
def load_device_class(self, device_type, device_class):
logger.info('Loading class for device type: {d... | gpl-3.0 | 7,591,930,469,421,827,000 | 31.23913 | 90 | 0.641268 | false | 3.944149 | false | false | false |
t11e/werkzeug | werkzeug/serving.py | 1 | 18996 | # -*- coding: utf-8 -*-
"""
werkzeug.serving
~~~~~~~~~~~~~~~~
There are many ways to serve a WSGI application. While you're developing
it you usually don't want a full blown webserver like Apache but a simple
standalone one. From Python 2.5 onwards there is the `wsgiref`_ server in
the standa... | bsd-3-clause | -766,306,627,783,075,700 | 36.916168 | 80 | 0.58686 | false | 4.427972 | false | false | false |
artoonie/transcroobie | transcroobie/settings.py | 1 | 4966 | """
Django settings for transcroobie project.
Generated by 'django-admin startproject' using Django 1.10.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
impo... | gpl-3.0 | -2,759,039,616,634,398,700 | 28.384615 | 91 | 0.706404 | false | 3.237288 | false | false | false |
Dwii/Master-Thesis | implementation/Python/lbm_2d_3d_example/cylinder3d.py | 1 | 1909 | # Copyright (C) 2013 FlowKit Ltd
from numpy import *
from pylb import multi
from pylb import lbio
#def inivelfun(x, y, z, d):
# """ v_x(x,y) = uMax*(1+.2*sin(y/ly*2pi)+.2*sin(z/lz*2pi)). v_y(x,y) = v_y(x,y)= 0 """
# return (d==0) * uLB * (1.0 + 1e-2 * sin(y/ly *2*pi) +
# 1e-2 * si... | mit | 5,910,386,185,579,618,000 | 36.431373 | 94 | 0.510739 | false | 2.53183 | false | false | false |
SymbiFlow/symbiflow-arch-defs | utils/update_arch_timings.py | 1 | 9248 | #!/usr/bin/env python3
import lxml.etree as ET
import argparse
from sdf_timing import sdfparse
from sdf_timing.utils import get_scale_seconds
from lib.pb_type import get_pb_type_chain
import re
import os
import sys
# Adds output to stderr to track if timing data for a particular BEL was found
# in bels.json
DEBUG = Fa... | isc | -8,196,329,145,353,724,000 | 30.138047 | 79 | 0.566393 | false | 3.708099 | false | false | false |
esi-mineset/spark | python/pyspark/rdd.py | 1 | 96405 | #
# 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 | -443,223,749,307,125,300 | 37.48503 | 100 | 0.576277 | false | 4.034695 | false | false | false |
jawaidss/halalar-web | halalar/api/models.py | 1 | 5956 | from datetime import datetime, timedelta
from django_countries.fields import CountryField
import hashlib
import mailchimp
import os
import random
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.humanize.templatetags.humanize import naturaltime
from django.contrib.sites.... | mit | -1,104,692,743,606,615,800 | 32.846591 | 124 | 0.582942 | false | 3.946985 | false | false | false |
misko/neon | neon/data/image.py | 2 | 13051 | # ----------------------------------------------------------------------------
# Copyright 2015 Nervana Systems 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.o... | apache-2.0 | -4,210,209,415,006,743,600 | 36.610951 | 97 | 0.564401 | false | 3.763264 | false | false | false |
Kungbib/CIPAC | webapp/kortkatalogen/liljeson/migrations/0001_initial.py | 1 | 3484 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-06-29 12:44
from __future__ import unicode_literals
import django.contrib.postgres.indexes
import django.contrib.postgres.search
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = T... | apache-2.0 | -1,620,285,583,742,835,200 | 57.728814 | 219 | 0.624531 | false | 3.561151 | false | false | false |
ibm-cds-labs/simple-data-pipe-connector-flightstats | pixiedust_flightpredict/pixiedust_flightpredict/vizFeatures.py | 1 | 2619 | # -------------------------------------------------------------------------------
# Copyright IBM Corp. 2016
#
# 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/licens... | apache-2.0 | 2,142,105,694,167,402,800 | 39.9375 | 136 | 0.612829 | false | 3.6375 | false | false | false |
Axios-Engineering/audio-components | AudioSource/tests/test_AudioSource.py | 1 | 3739 | #!/usr/bin/env python
import unittest
import ossie.utils.testing
import os
from omniORB import any
class ComponentTests(ossie.utils.testing.ScaComponentTestCase):
"""Test for all component implementations in AudioSource"""
def testScaBasicBehavior(self):
###############################################... | lgpl-3.0 | -6,723,459,644,412,660,000 | 49.527027 | 133 | 0.553624 | false | 4.685464 | true | false | false |
Ultimaker/Uranium | tests/TestRenderBatch.py | 1 | 3618 | from unittest.mock import MagicMock, patch
import pytest
from UM.Math.Color import Color
from UM.Math.Matrix import Matrix
from UM.Mesh.MeshBuilder import MeshBuilder
from UM.Mesh.MeshData import MeshData
from UM.View.RenderBatch import RenderBatch
test_addItem_data = [
{"item": {"transformation": Matrix(), "me... | lgpl-3.0 | -4,333,633,561,524,502,000 | 37.913978 | 173 | 0.68325 | false | 3.519455 | true | false | false |
JSBCCA/pythoncode | exercises/exercise_10_18_16.py | 1 | 1586 | import sys
# open cust_info_login.txt
with open('cust_info_login.txt', 'r') as file:
customer_login = file.read().strip().split('\n')
cust_login = list(map(lambda c: c.split(' _ '), customer_login))
# save usernames and passwords to a list
users_and_passwords = []
for customer in cust_login:
unpw = [customer[2]... | mit | 1,050,089,105,675,520,000 | 37.682927 | 79 | 0.571248 | false | 3.572072 | false | false | false |
jonge-democraten/jdleden | jdleden/afdelingrondschuif.py | 1 | 4580 | import logging
from hemres.management.commands.janeus_unsubscribe import Command as CommandUnsub
from hemres.management.commands.janeus_subscribe import Command as CommandSub
from jdleden import ledenlijst
from jdleden import afdelingen
from jdleden import afdelingenoud
logger = logging.getLogger(__name__)
def mov... | mit | 244,635,679,448,980,670 | 39.530973 | 134 | 0.666376 | false | 3.4462 | false | false | false |
hip-odoo/odoo | addons/base_geolocalize/models/res_partner.py | 5 | 2828 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import json
import urllib2
from odoo import api, fields, models, tools, _
from odoo.exceptions import UserError
def geo_find(addr):
if not addr:
return None
url = 'https://maps.googleapis.com/maps/api/g... | agpl-3.0 | 6,065,413,060,464,888,000 | 38.830986 | 140 | 0.542079 | false | 4.41875 | false | false | false |
lisaglendenning/pypetri | source/pypetri/graph/graph.py | 1 | 5541 | # @copyright
# @license
import collections
import networkx as nx
import pypetri.trellis as trellis
#############################################################################
#############################################################################
class Graph(collections.Mapping, trellis.Component):
CH... | mit | 4,138,626,352,126,483,000 | 31.982143 | 84 | 0.495398 | false | 3.813489 | false | false | false |
mpi-sws-rse/datablox | blox/categorize_shard__1_0/b_categorize_shard.py | 1 | 1171 | from block import *
from shard import *
from logging import ERROR, WARN, INFO, DEBUG
import time
class categorize_shard(Shard):
@classmethod
def initial_configs(cls, config):
return [config for i in range(config["nodes"])]
@classmethod
def node_type(self):
return {"name": "Categorize", "input_port"... | apache-2.0 | 438,109,497,504,606,850 | 29.051282 | 102 | 0.652434 | false | 3.280112 | true | false | false |
stphivos/django-mock-queries | setup.py | 1 | 1603 | from setuptools import setup
def read_md(filename):
return open(filename).read()
def parse_requirements(filename):
reqs = []
with open(filename, 'r') as f:
reqs = f.read().splitlines()
if not reqs:
raise RuntimeError("Unable to read requirements from '%s'" % filename)
return reqs... | mit | 7,877,405,215,237,546,000 | 33.847826 | 88 | 0.631316 | false | 4.218421 | false | false | false |
jantman/awslimitchecker | awslimitchecker/alerts/base.py | 1 | 5566 | """
awslimitchecker/alerts/base.py
The latest version of this package is available at:
<https://github.com/jantman/awslimitchecker>
################################################################################
Copyright 2015-2019 Jason Antman <jason@jasonantman.com>
This file is part of awslimitchecker, also ... | agpl-3.0 | -9,175,748,815,709,389,000 | 38.197183 | 80 | 0.634567 | false | 4.852659 | false | false | false |
pkonink/complete-python-bootcamp | capstone.py | 1 | 7045 | # Capstone project for Jose Portilla's Complete Python Bootcamp course at udemy.com
# Project Idea: Inverted index - An Inverted Index is a data structure used to create full text search.
# Given a set of text files, implement a program to create an inverted index. Also create a
# user interface to do a search using t... | cc0-1.0 | 1,865,882,465,895,336,000 | 40.686391 | 133 | 0.555713 | false | 4.13439 | false | false | false |
bouthors/ZenPacks.MatthieuBouthors.pfSense | setup.py | 1 | 2450 | ################################
# These variables are overwritten by Zenoss when the ZenPack is exported
# or saved. Do not modify them directly here.
# NB: PACKAGES is deprecated
NAME = "ZenPacks.MatthieuBouthors.pfSense"
VERSION = "0.7.0"
AUTHOR = "Matthieu Bouthors"
LICENSE = "GPL v2"
NAMESPACE_PACKAGES = ['ZenPac... | gpl-2.0 | 913,829,869,681,725,400 | 36.121212 | 89 | 0.707347 | false | 3.640416 | false | false | false |
ZeromusSoftware/RPi3500 | big_data/adamant_algorithm/square_meter_price.py | 1 | 2747 | # -*- coding: utf-8 -*-
"""
Created on Tue Jul 26 11:25:06 2016
@author: william
"""
import urllib
import pygeoj
import unicodedata
import pandas as pd
sectors = {"Bouches-du-Rhône":[]}
file13 = pygeoj.load("Data/france-geojson/departements/13/communes.geojson")
for feature in file13:
s = feature.properties['no... | gpl-2.0 | -3,089,712,412,697,723,000 | 32.45122 | 113 | 0.549234 | false | 3.39777 | false | false | false |
Kediel/Violent-Python | Chapter 2/bruteKey.py | 1 | 2401 | import pexpect
import optparse
import os
from threading import *
maxConnections = 5
connection_lock = BoundedSemaphore(value = maxConnections)
Stop = False
Fails = 0
def connect(user, host, keyfile, release):
global Stop, Fails
try:
perm_denied = 'Permission denied'
ssh_newkey = 'Are you su... | mit | -5,777,584,655,809,432,000 | 25.097826 | 69 | 0.546022 | false | 3.968595 | false | false | false |
sfcta/TAutils | wrangler/TransitParser.py | 1 | 21183 | from simpleparse.common import numbers, strings, comments
from simpleparse import generator
from simpleparse.parser import Parser
from simpleparse.dispatchprocessor import *
import re
from .Linki import Linki
from .Logger import WranglerLogger
from .Node import Node
from .PNRLink import PNRLink
from .Supplink import S... | gpl-3.0 | -808,136,675,958,228,500 | 38.817669 | 165 | 0.514186 | false | 4.110012 | false | false | false |
summerzhangft/summer | article/models.py | 1 | 1104 | from django.db import models
from tag.models import Tag
from mistune import markdown
from django.utils import timezone
from django.contrib.auth.models import User
class Article(models.Model):
title = models.CharField(max_length=100)
raw_content = models.TextField(blank=True)
tags = models.ManyToManyField(T... | gpl-3.0 | -3,490,386,367,264,015,000 | 29.666667 | 73 | 0.669384 | false | 3.820069 | false | false | false |
etoki/0726_biginning | landingPage/bootstrap/settings.py | 1 | 3048 | import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
# SECURITY WARNING: keep the... | mit | -7,993,397,726,805,836,000 | 25.982301 | 91 | 0.678806 | false | 3.51963 | false | false | false |
liavkoren/djangoDev | tests/generic_views/urls.py | 1 | 12651 | from django.conf.urls import url
from django.views.decorators.cache import cache_page
from django.views.generic import TemplateView
from . import models
from . import views
urlpatterns = [
# TemplateView
url(r'^template/no_template/$',
TemplateView.as_view()),
url(r'^template/simple/(?P<foo>\w+)/... | bsd-3-clause | 3,350,932,227,050,310,700 | 47.471264 | 118 | 0.617343 | false | 3.024384 | false | false | false |
sbergot/python | efront/repo.py | 1 | 2666 | import logging
import re
import os
from efront import iohelpers as io
DEV_DIR = r"c:\dev4.1"
ROOTS = [
r"c:\svn",
r"c:\git",
]
def get_current_target():
regex = re.compile("<JUNCTION> +dev4\.1 \[(.*)\]")
matches = []
def get_match(line):
m = regex.search(str(line))
... | bsd-3-clause | 7,354,850,230,155,652,000 | 29.738095 | 110 | 0.582146 | false | 3.366162 | false | false | false |
hydrogo/hydropy | hydropy/baseflow.py | 1 | 2682 | # -*- coding: utf-8 -*-
"""
Hydropy package
@author: Stijn Van Hoey
"""
def get_baseflow_chapman(flowserie, recession_time):
"""
Parameters
----------
flowserie : pd.TimeSeries
River discharge flowserie
recession_time : float [0-1]
recession constant
Notes
------
$$Q... | bsd-2-clause | -665,022,005,729,298,800 | 25.048544 | 78 | 0.557047 | false | 3.058153 | false | false | false |
mvaled/sentry | src/sentry/south_migrations/0291_merge_legacy_releases.py | 1 | 100956 | # -*- coding: utf-8 -*-
import re
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import DataMigration
from django.db import IntegrityError, models, transaction
def is_full_sha(version):
# sha1 or md5
return bool(re.match(r'[a-f0-9]{40}$', version) or re.match(r'[a-f0... | bsd-3-clause | 510,566,170,111,118,700 | 35.953148 | 98 | 0.40688 | false | 4.680606 | false | false | false |
hacchy/MetaVelvet | scripts/scriptEstimatedCovMulti.py | 1 | 7954 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''Evaluate peaks of coverage from a kmer coverage file (e.g.
Graph2-stats.txt)'''
import sys
import math
# Define functions
def num(s):
'''Take a string representing and convert it to a number. Return
a float or int as appropriate. An exception is raised... | gpl-2.0 | 4,155,654,913,366,671,000 | 26.714286 | 78 | 0.544129 | false | 3.507055 | false | false | false |
balta2ar/coursera-dl | coursera/api.py | 1 | 18829 | # vim: set fileencoding=utf8 :
"""
This module contains implementations of different APIs that are used by the
downloader.
"""
import os
import json
import logging
from six import iterkeys, iteritems
from six.moves.urllib_parse import quote_plus
from .utils import (BeautifulSoup, make_coursera_absolute_url,
... | lgpl-3.0 | -3,989,550,405,040,123,400 | 35.244701 | 162 | 0.545691 | false | 4.291809 | false | false | false |
William-Hai/SimpleDemo-python | file/csv/demo_csv.py | 1 | 1083 | # encoding=utf-8
__author__ = 'Q-Whai'
'''
DESC: 与CSV文件操作相关测试Demo
Blog: http://blog.csdn.net/lemon_tree12138
Create Date: 2016/2/25
Last Modify: 2016/3/9
version: 0.0.1
'''
import csv
# ----------------------------------------- #
# 读取CSV文件中的内容 #
# ----------------------------------------- #... | gpl-3.0 | 102,617,643,984,817,540 | 25.179487 | 79 | 0.371205 | false | 3.103343 | false | false | false |
Fluent-networks/floranet | floranet/test/unit/floranet/test_netserver.py | 1 | 11517 | import os
import base64
import time
from random import randrange
from mock import patch, MagicMock
from twisted.trial import unittest
from twisted.internet.defer import inlineCallbacks, returnValue
from twisted.internet import reactor, protocol
from twisted.internet.udp import Port
from twistar.registry import Regis... | mit | 8,204,927,493,061,594,000 | 35.916667 | 91 | 0.60554 | false | 3.892193 | true | false | false |
npyoung/python-neo | neo/io/axonio.py | 1 | 32534 | # -*- coding: utf-8 -*-
"""
Classe for reading data from pCLAMP and AxoScope
files (.abf version 1 and 2), developed by Molecular device/Axon technologies.
- abf = Axon binary file
- atf is a text file based format from axon that could be
read by AsciiIO (but this file is less efficient.)
This code is ... | bsd-3-clause | -1,758,531,858,273,080,600 | 35.436133 | 79 | 0.507408 | false | 3.785432 | false | false | false |
savex/spectra | tools/salt_networks.py | 1 | 2298 | import re
import sys
import subprocess
import json
def shell(command):
_ps = subprocess.Popen(
command.split(),
stdout=subprocess.PIPE
).communicate()[0].decode()
return _ps
def cut_option(_param, _options_list):
_option = "n/a"
_result_list = []
if _param in _options_list:
... | apache-2.0 | -6,106,116,033,646,082,000 | 33.313433 | 77 | 0.483899 | false | 3.113821 | false | false | false |
nschloe/quadpy | src/quadpy/c1/_fejer.py | 1 | 1547 | import numpy as np
from ..helpers import article
from ._helpers import C1Scheme
source = article(
authors=["J. Waldvogel"],
title="Fast Construction of the Fejér and Clenshaw–Curtis Quadrature Rules",
journal="BIT Numerical Mathematics",
month="mar",
year="2006",
volume="46",
number="1",
... | mit | -6,587,747,661,665,124,000 | 21.647059 | 82 | 0.523377 | false | 2.66436 | false | false | false |
felixonmars/suds-ng | suds/bindings/document.py | 1 | 5736 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser 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 distributed in the hope that it will b... | lgpl-3.0 | 1,296,709,443,985,954,300 | 35.075472 | 90 | 0.584902 | false | 4.325792 | false | false | false |
davisd50/sparc.i18n | setup.py | 1 | 1392 | from setuptools import setup, find_packages
import os
version = '0.0.1'
setup(name='sparc.i18n',
version=version,
description="i18n components for the SPARC platform",
long_description=open("README.md").read() + "\n" +
open("HISTORY.txt").read(),
# Get more strings from
... | mit | 7,376,492,356,747,145,000 | 28.617021 | 60 | 0.54023 | false | 3.954545 | false | false | false |
pestefo/viz-youtube | data/check_id_in_different_days.py | 1 | 1547 | import csv
from collections import defaultdict
file1 = '/Users/pestefo/Sync/projects/information-visualization-course/proyecto/data/data.csv'
file2 = '/Users/pestefo/Sync/projects/information-visualization-course/proyecto/data/302.csv'
columns1 = defaultdict(list)
columns2 = defaultdict(list)
with open(file1, 'rU'... | mit | 8,330,908,455,000,977,000 | 29.96 | 94 | 0.725921 | false | 2.975 | false | false | false |
Petr-By/qtpyvis | qtgui/panels/logging.py | 1 | 14855 | """
File: logging.py
Author: Ulf Krumnack
Email: krumnack@uni-osnabrueck.de
Github: https://github.com/krumnack
"""
# standard imports
import logging
# Qt imports
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QWidget, QLabel, QPushButton
from PyQt5.QtWidgets import QCheckBox, QRadioButton, QButtonGroup
from... | mit | 4,858,607,966,636,792,000 | 34.538278 | 83 | 0.629754 | false | 4.303302 | false | false | false |
adobe-research/spark-gpu | data/generate_kmeans.py | 1 | 1745 | #!/home/ec2-user/anaconda/bin/python
###########################################################################
##
## Copyright (c) 2015 Adobe Systems Incorporated. All rights reserved.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the Lic... | apache-2.0 | 4,764,295,083,545,138,000 | 30.727273 | 75 | 0.597708 | false | 3.546748 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.