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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kebrister/lscat-blcontrols | pmac/mk_pgpmac_redis.py | 1 | 36959 | #! /usr/bin/python
# coding=utf-8
import sys
import iniParser
import datetime
if len(sys.argv) <= 1:
print >> sys.stderr, "Usage: %s headOfRedisVariableNames [prefIniFileName [hardIniFileName]]"
sys.exit(-1)
if len(sys.argv) > 1:
head = sys.argv[1]
if len(sys.argv) > 2:
pref_ini = sys.argv[2]
else:
... | gpl-3.0 | 2,189,701,493,260,907,300 | 47.952318 | 172 | 0.516572 | false | 2.69695 | false | false | false |
listen-lavender/webcrawl | webcrawl/queue/lib/queue.py | 1 | 8585 | """A multi-producer, multi-consumer queue."""
from time import time as _time
try:
import threading as _threading
except ImportError:
import dummy_threading as _threading
from collections import deque
import heapq
__all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue']
class Empty(Exception):
"... | mit | 4,989,844,749,189,693,000 | 34.184426 | 85 | 0.588818 | false | 4.409348 | false | false | false |
ptressel/sahana-eden-madpub | models/000_config.py | 1 | 14638 | # -*- coding: utf-8 -*-
"""
Deployment settings
All settings which are typically edited for a deployment should be done here
Deployers shouldn't typically need to edit any other files.
"""
# Remind admin to edit this file
FINISHED_EDITING_CONFIG_FILE = True # change to True after you finish editing this f... | mit | 1,233,628,247,905,388,000 | 39.325069 | 192 | 0.646331 | false | 3.877616 | false | false | false |
MirkoDziadzka/pyhkdf | src/hkdf.py | 1 | 3000 | """
This is a straight forward implementation of RFC 5869
HMAC-based Extract-and-Expand Key Derivation Function (HKDF)
http://tools.ietf.org/html/rfc5869
"""
import warnings
from Crypto.Hash import SHA512, HMAC
class HKDF:
"""
HMAC-based Extract-and-Expand Key Derivation Function (RFC 5869)
usage:
... | mit | -7,948,960,739,531,117,000 | 29.927835 | 98 | 0.609 | false | 3.821656 | false | false | false |
ninjin/contra | gtbtokenize.py | 1 | 12308 | #!/usr/bin/env python
# Implements a GENIA Treebank - like tokenization.
# This is a python translation of my GTB-tokenize.pl, which in turn
# draws in part on Robert MacIntyre's 1995 PTB tokenizer,
# (http://www.cis.upenn.edu/~treebank/tokenizer.sed) and Yoshimasa
# Tsuruoka's GENIA tagger tokenization (tokenize.cp... | isc | 1,279,164,132,318,494,200 | 37.704403 | 197 | 0.576129 | false | 3.052579 | false | false | false |
openmips/stbgui | lib/python/Components/Harddisk.py | 1 | 27772 | import os
import time
from Tools.CList import CList
from SystemInfo import SystemInfo
from Components.Console import Console
from boxbranding import getBoxType, getMachineBuild
import Task
def readFile(filename):
file = open(filename)
data = file.read().strip()
file.close()
return data
def getProcMounts():
try:
... | gpl-2.0 | 3,402,724,838,510,467,000 | 28.67094 | 155 | 0.662214 | false | 2.941015 | false | false | false |
localmed/django-assetfiles | assetfiles/filters/sass.py | 1 | 4949 | from __future__ import unicode_literals
import os
from django.conf import settings
from django.contrib.staticfiles.finders import find
from assetfiles.filters import BaseFilter, CommandMixin, ExtensionMixin
import assetfiles.settings
from assetfiles.exceptions import SassFilterError
class SassFilter(ExtensionMixin... | mit | 3,942,540,000,699,276,300 | 31.136364 | 81 | 0.589614 | false | 3.887667 | false | false | false |
greenbender/pynntp | nntp/iodict.py | 1 | 3453 | """
Case-insentitive ordered dictionary (useful for headers).
Copyright (C) 2013-2020 Byron Platt
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option)... | gpl-3.0 | 4,563,081,144,591,528,400 | 25.976563 | 75 | 0.585578 | false | 3.724919 | false | false | false |
InsightSoftwareConsortium/ITKExamples | src/Filtering/MathematicalMorphology/ErodeAGrayscaleImage/Code.py | 1 | 1553 | #!/usr/bin/env python
# Copyright NumFOCUS
#
# 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.txt
#
# Unless required by applicable law or ... | apache-2.0 | 1,056,718,304,177,390,500 | 27.759259 | 75 | 0.773342 | false | 3.413187 | false | false | false |
mganeva/mantid | scripts/Muon/GUI/Common/muon_data_context.py | 1 | 20168 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from __future__ import (absolute_import, div... | gpl-3.0 | 6,414,852,969,859,135,000 | 40.669421 | 136 | 0.61662 | false | 4.008746 | true | false | false |
andrewgailey/robogen | robogen/rgkit/backup bots/SfparI.py | 1 | 19116 | ##################################
## ##
## ____ __ ##
## / ___| / _|_ __ __ _ _ __ ##
## \___ \| |_| '_ \ / _` | '__| ##
## ___) | _| |_) | (_| | | ##
## |____/|_| | .__/ \__,_|_| ##
## |_| ##
## ##
## ... | unlicense | -6,406,700,526,533,794,000 | 38.172131 | 80 | 0.568372 | false | 3.755599 | false | false | false |
praekelt/malaria24-django | malaria24/settings/base.py | 1 | 8348 | """
Django settings for base malaria24.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
from os.path import abspath, dirname, join
from os import environ
from djan... | bsd-2-clause | -8,339,247,801,502,718,000 | 26.826667 | 81 | 0.65333 | false | 3.458161 | false | false | false |
litui/openparliament | parliament/default_settings.py | 1 | 5763 | import os
DEBUG = True
ADMINS = [
('Michael Mulley', 'michael@michaelmulley.com'),
]
MANAGERS = ADMINS
PROJ_ROOT = os.path.dirname(os.path.realpath(__file__))
CACHE_MIDDLEWARE_KEY_PREFIX = 'parl'
CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
# Set to True to disable functionality where user-provided data is saved
PA... | agpl-3.0 | 7,099,144,173,799,089,000 | 28.860104 | 105 | 0.639597 | false | 3.548645 | false | false | false |
matthiask/zivinetz | tests/testapp/test_changes.py | 1 | 1099 | from datetime import date
from django.test import TestCase
from testapp import factories
from zivinetz.models import AssignmentChange
class ChangesTestCase(TestCase):
def test_change_tracking(self):
assignment = factories.AssignmentFactory.create()
self.assertEqual(AssignmentChange.objects.cou... | mit | 6,544,142,790,884,116,000 | 27.921053 | 86 | 0.688808 | false | 4.309804 | true | false | false |
kozistr/Awesome-GANs | awesome_gans/magan/magan_train.py | 1 | 7449 | import time
import numpy as np
import tensorflow as tf
import awesome_gans.image_utils as iu
import awesome_gans.magan.magan_model as magan
from awesome_gans.datasets import CelebADataSet as DataSet
from awesome_gans.datasets import DataIterator
results = {'output': './gen_img/', 'model': './model/MAGAN-model.ckpt'}... | mit | 8,328,749,761,969,198,000 | 34.303318 | 118 | 0.470936 | false | 3.733835 | true | false | false |
napjon/moocs_solution | introcs-udacity/Search Engine(jonappsearch)/main.py | 1 | 1817 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | mit | -7,123,328,385,974,137,000 | 23.890411 | 79 | 0.628509 | false | 3.576772 | false | false | false |
IPVL/swift_test | swift/proxy/server.py | 1 | 2944 | from swift.ipvl.inspect_custom import whoami, whosdaddy
pass # (WIS) print __name__
required_filters = [
{'name': 'catch_errors'},
{'name': 'gatekeeper',
'after_fn': lambda pipe: (['catch_errors']
if pipe.startswith('catch_errors')
else [])... | mit | -6,019,711,509,896,874,000 | 39.328767 | 107 | 0.529891 | false | 4.010899 | false | false | false |
vnevoa/DiffTrike | SoapBox/sb_joystick.py | 1 | 2438 | #
# Copyright 2011 Vasco Nevoa.
#
# This file is part of DiffTrike.
#
# DiffTrike 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 la... | gpl-3.0 | -457,062,874,747,265,800 | 31.078947 | 127 | 0.653815 | false | 2.944444 | false | false | false |
Infinidat/lanister | manage.py | 1 | 7158 | #! /usr/bin/python
from __future__ import print_function
import os
import sys
import time
import random
import string
import subprocess
from _lib.bootstrapping import bootstrap_env, from_project_root, requires_env, from_env_bin
from _lib.ansible import ensure_ansible
bootstrap_env(["base"])
from _lib.params import ... | bsd-3-clause | -4,284,564,785,641,032,700 | 31.536364 | 176 | 0.637748 | false | 3.479825 | true | false | false |
ipeterov/convenient-rpc | task_server/lib/tasks.py | 1 | 3496 | import uuid
import time
from functools import partial
from collections import Counter
from threading import Thread
from queue import Queue, Empty
class TaskManager:
@staticmethod
def hash_task(task):
return hash(''.join(str(task.get(key, '')) for key in ('package', 'version', 'function')))
def __... | mit | 3,637,333,381,968,971,300 | 25.484848 | 98 | 0.543764 | false | 4.065116 | false | false | false |
acesonl/remotecare | remotecare/core/backends.py | 1 | 1343 | # -*- coding: utf-8 -*-
"""
The standard email backend is replaced by a custom
ModelBackend that supports getting the user based
on the stored hmac email value.
:subtitle:`Class definitions:`
"""
from django.contrib.auth.backends import ModelBackend
from apps.account.models import User
from django.contrib.auth.hashers... | gpl-3.0 | 3,425,033,322,685,303,300 | 30.97619 | 79 | 0.630678 | false | 4.95572 | false | false | false |
rukai/GameToy | timer.py | 1 | 1829 | class Timer:
def __init__(self, interrupts):
self.interrupts = interrupts
self.div = 0 # FF04
self.sub_div = 0
self.tima = 0 # FF05
self.sub_tima = 0
self.tma = 0 # FF06
# FF07 bits 2-0
self.timer_run = False
... | gpl-3.0 | -91,548,163,793,290,540 | 24.402778 | 77 | 0.503007 | false | 3.747951 | false | false | false |
icodemachine/Stem | stem/descriptor/tordnsel.py | 1 | 3950 | # Copyright 2013-2014, Damian Johnson and The Tor Project
# See LICENSE for licensing information
"""
Parsing for `TorDNSEL <https://www.torproject.org/projects/tordnsel.html.en>`_
exit list files.
::
TorDNSEL - Exit list provided by TorDNSEL
"""
import stem.util.connection
import stem.util.str_tools
import stem.... | lgpl-3.0 | -5,719,108,573,632,208,000 | 32.760684 | 133 | 0.661772 | false | 3.883972 | false | false | false |
our-city-app/oca-backend | src/rogerthat/pages/service_page.py | 1 | 7102 | # -*- coding: utf-8 -*-
# Copyright 2020 Green Valley Belgium NV
#
# 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 | 8,330,832,025,943,103,000 | 41.023669 | 134 | 0.689383 | false | 3.861881 | false | false | false |
edx/ecommerce | ecommerce/extensions/offer/migrations/0046_offerassignmentemailsentrecord.py | 1 | 1471 | # Generated by Django 2.2.16 on 2020-11-02 07:04
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
('offer', '0045_codeassignmentn... | agpl-3.0 | -4,716,142,410,958,759,000 | 44.96875 | 148 | 0.622706 | false | 4.326471 | false | false | false |
kzcashteam/kzcash | share/qt/extract_strings_qt.py | 1 | 1857 | #!/usr/bin/python
'''
Extract _("...") strings for translation and convert to Qt4 stringdefs so that
they can be picked up by Qt linguist.
'''
from subprocess import Popen, PIPE
import glob
import operator
import os
import sys
OUT_CPP="qt/kzcashstrings.cpp"
EMPTY=['""']
def parse_po(text):
"""
Parse 'po' form... | mit | 8,326,102,238,316,943,000 | 22.807692 | 79 | 0.581583 | false | 3.451673 | false | false | false |
ebeshero/Pittsburgh_Frankenstein | collateXPrep/python/Part9-allWitnessIM_collation_to_xml.py | 1 | 11044 | from collatex import *
from xml.dom import pulldom
import re
import glob
from datetime import datetime, date
# import pytz
# from tzlocal import get_localzone
# today = date.today()
# utc_dt = datetime(today, tzinfo=pytz.utc)
# dateTime = utc_dt.astimezone(get_localzone())
# strDateTime = str(dateTime)
now = datetime... | agpl-3.0 | -5,091,329,732,725,098,000 | 50.830986 | 188 | 0.631431 | false | 3.159702 | false | false | false |
mganeva/mantid | scripts/Muon/GUI/Common/utilities/xml_utils.py | 1 | 4492 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from __future__ import (absolute_import, divi... | gpl-3.0 | 2,430,794,358,631,994,000 | 35.819672 | 111 | 0.642698 | false | 3.637247 | false | false | false |
ZobairAlijan/osf.io | api_tests/base/test_serializers.py | 1 | 5406 | # -*- coding: utf-8 -*-
import httplib as http
from nose.tools import * # flake8: noqa
from tests.base import ApiTestCase, DbTestCase
from tests import factories
from tests.utils import make_drf_request
from api.base.settings.defaults import API_BASE
from api.base.serializers import JSONAPISerializer
from api.nodes... | apache-2.0 | -2,315,594,354,815,570,400 | 37.340426 | 101 | 0.620607 | false | 3.937363 | true | false | false |
fernandog/Medusa | ext/tornado/gen.py | 1 | 47881 | """``tornado.gen`` implements generator-based coroutines.
.. note::
The "decorator and generator" approach in this module is a
precursor to native coroutines (using ``async def`` and ``await``)
which were introduced in Python 3.5. Applications that do not
require compatibility with older versions of Pytho... | gpl-3.0 | 5,848,268,275,463,006,000 | 34.91973 | 93 | 0.60454 | false | 4.525187 | false | false | false |
parroyo/python_menu | python_menu/menu.py | 1 | 5783 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library ... | lgpl-3.0 | -3,854,620,723,446,406,000 | 30.950276 | 131 | 0.583434 | false | 3.915369 | false | false | false |
jserver/pagila | pagila/settings.py | 1 | 2178 | """
Django settings for pagila 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, ...)
imp... | bsd-3-clause | -8,704,175,519,857,630,000 | 21.926316 | 71 | 0.705234 | false | 3.275188 | false | false | false |
adamnew123456/jobmon | jobmon/ticker.py | 1 | 3108 | """
A tickers are responsible for calling into the supervisor periodically, and
getting it to handle restarts.
"""
import logging
import os
import select
import threading
import time
from jobmon import util
LOGGER = logging.getLogger('jobmon.ticker')
class Ticker(threading.Thread, util.TerminableThreadMixin):
""... | bsd-2-clause | 7,884,936,955,516,481,000 | 27.777778 | 78 | 0.559524 | false | 4.316667 | false | false | false |
lindemann09/pyForceDAQ | forceDAQ/data_handling/convert.py | 1 | 8601 | #!/usr/bin/env python
"""
Functions to convert force data
This module can be also executed.
"""
__author__ = 'Oliver Lindemann'
import os
import sys
import gzip
import numpy as np
from .read_force_data import read_raw_data, data_frame_to_text
PAUSE_CRITERION = 500
MSEC_PER_SAMPLES = 1
REF_SAMPLE_PROBE = 1000
MIN_D... | mit | -2,560,907,721,749,583,000 | 30.276364 | 99 | 0.58063 | false | 3.636786 | false | false | false |
Donkyhotay/MoonPy | twisted/protocols/sip.py | 1 | 41973 | # -*- test-case-name: twisted.test.test_sip -*-
# Copyright (c) 2001-2009 Twisted Matrix Laboratories.
# See LICENSE for details.
"""Session Initialization Protocol.
Documented in RFC 2543.
[Superceded by 3261]
This module contains a deprecated implementation of HTTP Digest authentication.
See L{twisted.cred.cred... | gpl-3.0 | -9,162,486,065,959,605,000 | 30.464018 | 119 | 0.565435 | false | 4.031988 | false | false | false |
pakpoomton/CellmodellerShadow | Models/Biofilm_g40.py | 1 | 2119 | import random
from CellModeller.Regulation.ModuleRegulator import ModuleRegulator
from CellModeller.Biophysics.BacterialModels.CLBacterium import CLBacterium
from CellModeller.GUI import Renderers
import numpy
import math
max_cells = 400000
#cell_colors = {0:[0.0, 1.0, 0.0],
# 1:[0.0, 0.0, 1.0],
# ... | bsd-3-clause | -3,343,838,500,989,668,000 | 29.271429 | 142 | 0.632374 | false | 2.584146 | false | false | false |
markokr/sysca | sysca/keys.py | 1 | 6591 | """Key handling
"""
import os
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric import ec, rsa, dsa
from cryptography.hazmat.primitives.hashes import SHA256, SHA384, SHA512
from cryptography.hazmat.primitives.serialization import (Encoding, PublicFormat)
from .ex... | isc | -4,393,379,388,745,196,000 | 29.655814 | 102 | 0.648308 | false | 3.23723 | false | false | false |
pendingchaos/WIP12 | scripts/update_extensions.py | 1 | 1594 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
extensions = os.listdir("../include/extensions")
try:
extensions.remove("extensions.h")
except ValueError:
pass
output = open("../src/extensions/extensions.cpp", "w")
output.write("""//Generated by update_extensions.py. Do not edit. Edit update_extensi... | gpl-3.0 | 6,310,849,901,766,840,000 | 24.709677 | 117 | 0.666876 | false | 3.239837 | false | false | false |
Adrimel/pdb-tools | pdb_fetch.py | 1 | 3126 | #!/usr/bin/env python
"""
Fetches a PDB file (optionally the biological unit) from the RCSB database.
usage: python pdb_fetch.py [-biounit] <pdb id>
example: python pdb_fetch.py 1CTF
Author: {0} ({1})
This program is part of the PDB tools distributed with HADDOCK
or with the HADDOCK tutorial. The utilities in this ... | mit | -5,713,528,853,672,365,000 | 28.214953 | 95 | 0.590531 | false | 3.408942 | false | false | false |
silly-wacky-3-town-toon/SOURCE-COD | toontown/toon/DistributedNPCSpecialQuestGiverAI.py | 1 | 8582 | from direct.task.Task import Task
from panda3d.core import *
from panda3d.direct import *
from DistributedNPCToonBaseAI import *
from toontown.quest import Quests
class DistributedNPCSpecialQuestGiverAI(DistributedNPCToonBaseAI):
def __init__(self, air, npcId, questCallback = None, hq = 0):
DistributedNPC... | apache-2.0 | -1,137,695,837,540,636,300 | 36.973451 | 119 | 0.62433 | false | 3.624155 | false | false | false |
munin/munin | utils/add_padding_script.py | 1 | 4569 | #!/usr/bin/python3
# This file is part of Munin.
# Munin 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.
# Munin is distributed in t... | gpl-2.0 | -1,024,861,984,553,755,300 | 36.760331 | 150 | 0.585905 | false | 3.456127 | false | false | false |
fedora-infra/gilmsg | setup.py | 1 | 1729 | # This file is part of gilmsg.
# Copyright (C) 2015 Red Hat, Inc.
#
# gilmsg 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 option) any later version.
#... | lgpl-2.1 | -1,347,992,148,444,289,300 | 28.305085 | 78 | 0.693464 | false | 3.57971 | false | false | false |
pydsigner/taskit | taskit/common.py | 1 | 4251 | import time
import json
import pickle
import sys
from .log import null_logger, ERROR
__all__ = ['DEFAULT_PORT', 'STOP', 'KILL', 'STATUS', 'bytes', 'basestring',
'show_err', 'FirstBytesCorruptionError', 'FirstBytesProtocol',
'JSONCodec', 'PickleCodec']
DEFAULT_PORT = 54543
if bytes is str:
... | lgpl-3.0 | -2,156,986,932,203,192,000 | 25.905063 | 80 | 0.530699 | false | 4.22145 | false | false | false |
xu2243051/easyui-menu | easyui/utils.py | 1 | 1633 | #coding:utf-8
'''
这个通用的自定义功能页面
'''
from django.conf.urls import patterns, url
def model_serialize(queryset, extra_fields=[], remove_fields = [], fields = []):
"""
@param queryset queryset
@return a list of dict [{}, {}]
自定义的json转换函数,跟extramixin中的get_fields密切相关
"""
return_list = []
for obje... | apache-2.0 | 5,187,833,718,034,250,000 | 30.854167 | 91 | 0.551341 | false | 3.580796 | false | false | false |
abramhindle/UnnaturalCodeFork | python/testdata/launchpad/lib/lp/services/mail/signedmessage.py | 1 | 6389 | # Copyright 2009-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Classes for simpler handling of PGP signed email messages."""
__metaclass__ = type
__all__ = [
'SignedMessage',
'signed_message_from_string',
'strip_pgp_signa... | agpl-3.0 | -9,070,205,200,195,638,000 | 36.804734 | 78 | 0.604633 | false | 4.458479 | false | false | false |
shichao-an/ctci | chapter9/question9.5.py | 1 | 1696 | from __future__ import print_function
"""
Write a method to compute all permutations of a string
"""
def get_permutations1(s):
"""
Append (or prepend) every character to each permutation of the
string which does not contain the current character
"""
if not s:
return ['']
else:
... | bsd-2-clause | 3,653,016,667,504,779,000 | 19.190476 | 74 | 0.527123 | false | 3.351779 | false | false | false |
jzrake/mara-tools | mara_tools/lic/lic.py | 1 | 1617 | import numpy as np
def lic_flow(vectors,len_pix=10):
vectors = np.asarray(vectors)
m,n,two = vectors.shape
if two!=2:
raise ValueError
result = np.zeros((2*len_pix+1,m,n,2),dtype=np.int32) # FIXME: int16?
center = len_pix
result[center,:,:,0] = np.arange(m)[:,np.newaxis]
result[ce... | gpl-2.0 | -3,010,048,274,979,160,600 | 25.95 | 73 | 0.30303 | false | 3.963235 | false | false | false |
SupayrPoney/RopeSkippingTimer | main.py | 1 | 7577 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
import PyQt5
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
import time
import math
import winsound
EXERCISETIME = 60
class MainWidget(QWidget):
freqChangeSignal = pyqtSignal(object)
togglerSignal = pyqtSignal()
"""... | mit | -8,393,405,739,307,940,000 | 30.702929 | 110 | 0.605649 | false | 3.93406 | false | false | false |
note286/lan-encryption-file-transfer | recvUI.py | 1 | 4152 | from tkinter.filedialog import *
import lan_ip
import tkinter as tk
from tkinter import ttk
from fileTransfer import *
from receiver import *
import _thread
from custom_function import *
from tkinter import messagebox
class RecvPage(tk.Frame):
def __init__(self, parent, root):
super().... | mit | -3,757,951,539,771,199,500 | 39.553191 | 119 | 0.574027 | false | 2.959818 | false | false | false |
NRGI/resource-contracts-etl | ocr-tests/ABBYY/AbbyyOnlineSdk.py | 1 | 3234 | #!/usr/bin/python
# Usage: process.py <input file> <output file> [-language <Language>] [-pdf|-txt|-rtf|-docx|-xml]
import argparse
import base64
import getopt
import MultipartPostHandler
import os
import re
import sys
import time
import urllib2
import urllib
import xml.dom.minidom
class ProcessingSettings:
Languag... | gpl-2.0 | -7,730,318,793,496,702,000 | 30.398058 | 112 | 0.717378 | false | 3.313525 | false | false | false |
google/tink | python/tink/hybrid/_hybrid_wrapper.py | 1 | 4204 | # Copyright 2019 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,839,068,032,982,058,000 | 37.568807 | 80 | 0.705519 | false | 3.992403 | false | false | false |
fintanr/hcup-stats | parse-hcup-results.py | 1 | 19302 | #!/usr/bin/python
#
# Extract data from the Wikipedia Heineken Cup Pool Stages
# and create a tidy data set for use in R
#
# A lot of this code handles corner cases and deals with variants
# in the wikipedia pages, and it hasn't been refactored
#
import re
import sys
import unicodedata
from urllib2 import urlopen
from... | apache-2.0 | 4,643,953,281,704,777,000 | 37.604 | 111 | 0.510258 | false | 3.910454 | false | false | false |
Emmunaf/WarmaneAutovote | Mlogin.py | 1 | 6146 | #!/usr/bin/python
# Thanks: Glusk for the GREAT help
# karapidiola for the base script
from socket import *
import hashlib
try:
import _srp as srp
except:
print("Need py_srp")
exit(1)
def generate_K(S):
"""Generate K from S with SHA1 Interleaved"""
s_bytes = srp.long_to_bytes(S)
# Has... | mit | -2,810,643,457,059,818,500 | 31.347368 | 109 | 0.522291 | false | 2.808958 | true | false | false |
DaMonkey/hankypanky | lazylibrarian/gr.py | 1 | 2378 | import time, threading, urllib, urllib2, sys
from xml.etree import ElementTree
from xml.etree.ElementTree import Element, SubElement
import lazylibrarian
from lazylibrarian import logger, formatter, database
class GoodReads:
# http://www.goodreads.com/api/
def __init__(self, name=None, type=None):
se... | gpl-3.0 | 303,320,833,390,499,000 | 36.15625 | 124 | 0.589151 | false | 3.817014 | false | false | false |
merlinpatt/py-trello | trello/board.py | 1 | 7269 | from __future__ import absolute_import
from .card import Card
from .list import List
from .member import Member
class Board(object):
"""
Class representing a Trello board. Board attributes are stored as normal
Python attributes; access to all sub-objects, however, is always
an API call (Lists, Cards)... | bsd-3-clause | -675,035,804,408,850,800 | 29.670886 | 116 | 0.551245 | false | 3.991763 | false | false | false |
waterblue13/tensor2tensor | tensor2tensor/data_generators/ptb.py | 1 | 5009 | # coding=utf-8
# Copyright 2017 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 | 6,008,215,858,963,581,000 | 27.622857 | 79 | 0.678978 | false | 3.495464 | false | false | false |
trabucayre/gnuradio | grc/core/blocks/dummy.py | 1 | 1190 | # Copyright 2016 Free Software Foundation, Inc.
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
from . import Block, register_build_in
from ._build import build_params
@register_build_in
class DummyBlock(Block):
is_dummy_block = True
label = 'Missing Block'
key = '_du... | gpl-3.0 | 8,029,031,467,999,280,000 | 26.045455 | 101 | 0.626891 | false | 3.695652 | false | false | false |
sagiss/sardana | test/test_ctrl/WaterPapCtrl_stat1.py | 1 | 4673 | import PyTango
import socket
import MotorController
class IcePapController(MotorController.MotorController):
MaxDevice = 6
def __init__(self,inst,props):
print "PYTHON -> IcePapController ctor for instance",inst
MotorController.MotorController.__init__(self,inst,props)
self.nb_call = ... | lgpl-3.0 | -6,052,067,277,264,365,000 | 31.908451 | 123 | 0.598973 | false | 3.60571 | false | false | false |
jmread/cerebro | cerebro/RTF.py | 1 | 3665 | from numpy import *
from functions import sigmoid
set_printoptions(precision=4)
class RTF():
'''
Recurrent Basis/Transformation Function
---------------------------------------
Turn x into \phi in a recurrent manner.
'''
W_hh = None
W_ih = None
z = None
def __init__(... | gpl-3.0 | -5,572,325,840,859,599,000 | 27.192308 | 151 | 0.505048 | false | 2.870008 | false | false | false |
benauthor/pykafka | pykafka/test/utils.py | 1 | 1395 | import time
import os
from pykafka.test.kafka_instance import KafkaInstance, KafkaConnection
def get_cluster():
"""Gets a Kafka cluster for testing, using one already running is possible.
An already-running cluster is determined by environment variables:
BROKERS, ZOOKEEPER, KAFKA_BIN. This is used prim... | apache-2.0 | -317,677,155,204,829,200 | 32.214286 | 104 | 0.630824 | false | 3.896648 | false | false | false |
ESA-VirES/eoxserver-magnetism | eoxsmagnetism/ows/wms/capabilitiesrenderer.py | 1 | 3134 | #-------------------------------------------------------------------------------
# $Id$
#
# Project: EOxServer <http://eoxserver.org>
# Authors: Fabian Schindler <fabian.schindler@eox.at>
#
#-------------------------------------------------------------------------------
# Copyright (C) 2011 EOX IT Services GmbH
#
# Per... | mit | 4,156,629,531,796,532,700 | 38.670886 | 80 | 0.659221 | false | 4.140026 | true | false | false |
psiwczak/openstack | nova/db/sqlalchemy/models.py | 1 | 38288 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Piston Cloud Computing, Inc.
# All Rights Reserved.
#
# Lic... | apache-2.0 | -8,264,634,571,435,047,000 | 34.951174 | 79 | 0.619385 | false | 4.154063 | false | false | false |
kyamagu/psd2svg | src/psd2svg/__main__.py | 1 | 1695 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import argparse
import logging
import os
from psd2svg import psd2svg
def main():
parser = argparse.ArgumentParser(description='Convert PSD file to SVG')
parser.add_argument(
'input', metavar='INPUT', type=str, help='Input ... | mit | 7,406,820,582,032,174,000 | 38.418605 | 78 | 0.637168 | false | 3.826185 | false | false | false |
phockett/ePSproc | epsproc/vol/setOptions.py | 1 | 3675 |
"""
ePSproc vol module setOptions
Functions to read & write default set of plotting options to file.
If run as main:
- Check existing file from passed arg, or in default location (epsproc/vol/plotOptions.json)
- Read file if exists.
- If file is missing, prompt to write defaults to file.
08/08/20 v1, dev. See ... | gpl-3.0 | -1,978,875,038,658,223,400 | 29.122951 | 242 | 0.626939 | false | 3.79257 | false | false | false |
jralls/gramps | gramps/gui/views/treemodels/flatbasemodel.py | 1 | 32063 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
# Copyright (C) 2009 Benny Malengier
# Copyright (C) 2010 Nick Hall
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... | gpl-2.0 | 737,878,693,955,550,700 | 36.32596 | 91 | 0.571781 | false | 4.108008 | false | false | false |
tensorflow/models | official/vision/beta/ops/box_ops.py | 1 | 24043 | # Copyright 2021 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,766,865,018,543,478,000 | 36.625978 | 80 | 0.655284 | false | 3.496655 | false | false | false |
jo-tez/aima-python | nlp.py | 1 | 21959 | """Natural Language Processing; Chart Parsing and PageRanking (Chapter 22-23)"""
from collections import defaultdict
from utils import weighted_choice
import urllib.request
import re
# ______________________________________________________________________________
# Grammars and Lexicons
def Rules(**rules):
"""C... | mit | 3,861,374,006,818,428,000 | 37.578207 | 114 | 0.515056 | false | 3.727458 | false | false | false |
w495/python-video-shot-detector | etc/experiments/test_pyav.py | 1 | 2469 | # -*- coding: utf8 -*-
from __future__ import absolute_import, division, print_function
import av
from av.video.frame import VideoFrame
from av.video.stream import VideoStream
# В этом списке будем хранить кадры в виде numpy-векторов.
array_list = []
# Откроем контейнер на чтение
input_container = av.open('input.mp... | bsd-3-clause | -1,050,391,235,802,443,000 | 31.241379 | 69 | 0.688235 | false | 1.956067 | false | false | false |
mburakergenc/Malware-Detection-using-Machine-Learning | cuckoo/analyzer/windows/modules/packages/ppt.py | 1 | 2066 | # Copyright (C) 2010-2013 Claudio Guarnieri.
# Copyright (C) 2014-2016 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
from _winreg import HKEY_CURRENT_USER
from lib.common.abstracts import Package
class PPT(Package):
"... | mit | 172,675,020,858,053,400 | 37.259259 | 84 | 0.56728 | false | 3.818854 | false | false | false |
freifunk-darmstadt/ffda-jarvis | willie/willie/modules/seen.py | 1 | 1825 | # coding=utf8
"""
seen.py - Willie Seen Module
Copyright 2008, Sean B. Palmer, inamidst.com
Copyright © 2012, Elad Alfassa <elad@fedoraproject.org>
Licensed under the Eiffel Forum License 2.
http://willie.dftba.net
"""
from __future__ import unicode_literals
import time
import datetime
from willie.tools import Identi... | mit | -5,590,594,171,366,750,000 | 33.415094 | 75 | 0.631579 | false | 3.428571 | false | false | false |
fedoraredteam/elem | setup.py | 1 | 1996 | from distutils.core import setup
from distutils.core import Command
import os
import sys
import unittest
import setuptools
class CleanPycCommand(Command):
user_options = []
def initialize_options(self):
"""Abstract method that is required to be overwritten"""
pass
def finalize_options(se... | gpl-3.0 | -1,796,376,005,776,839,000 | 33.413793 | 104 | 0.617735 | false | 3.655678 | false | false | false |
hipnusleo/laserjet | resource/pypi/cffi-1.9.1/cffi/verifier.py | 1 | 11834 | #
# DEPRECATED: implementation for ffi.verify()
#
import sys, os, binascii, shutil, io
from . import __version_verifier_modules__
from . import ffiplatform
if sys.version_info >= (3, 3):
import importlib.machinery
def _extension_suffixes():
return importlib.machinery.EXTENSION_SUFFIXES[:]
el... | apache-2.0 | -3,877,184,796,602,867,700 | 35.449367 | 86 | 0.533885 | false | 4.273745 | false | false | false |
termoshtt/unite-bibtex | src/unite_bibtex.py | 1 | 2073 | # -*- coding: utf-8 -*-
import os.path
from pybtex.database.input import bibtex
class unite_bibtex(object):
"""
Name space for unite_bibtex.vim
(not to pollute global name space)
"""
@staticmethod
def _read_file(filename):
parser = bibtex.Parser()
return parser.parse_file(fil... | mit | -5,800,734,522,061,089,000 | 31.904762 | 92 | 0.544139 | false | 3.831793 | false | false | false |
salvoventura/pyunsplash | pyunsplash/tests/documentation_test.py | 1 | 9927 | ###############################################################################
# Copyright (c) 2017 Salvatore Ventura <salvoventura@gmail.com>
#
# File: documentation_test.py
#
# Author: Salvatore Ventura <salvoventura@gmail.com>
# Date: 07 Sep 2017
# Purpose: Test examples in documentation
#
# Revi... | mit | -1,336,868,179,278,288,600 | 25.975543 | 80 | 0.652664 | false | 3.045092 | false | false | false |
xalt/xalt | py_src/xalt_extract_linker.py | 1 | 1691 | #-----------------------------------------------------------------------
# XALT: A tool that tracks users jobs and environments on a cluster.
# Copyright (C) 2013-2015 University of Texas at Austin
# Copyright (C) 2013-2015 University of Tennessee
#
# This library is free software; you can redistribute it and/or modif... | lgpl-2.1 | 7,246,546,160,335,109,000 | 36.577778 | 72 | 0.641632 | false | 3.79148 | false | false | false |
airbnb/caravel | superset/migrations/versions/6c7537a6004a_models_for_email_reports.py | 1 | 4101 | # 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 u... | apache-2.0 | -3,753,114,214,703,253,500 | 47.247059 | 119 | 0.691539 | false | 3.51113 | false | false | false |
silly-wacky-3-town-toon/SOURCE-COD | toontown/shtiker/OptionsPageGUI.py | 1 | 3792 | from direct.gui.DirectGui import DirectButton, DirectLabel
from panda3d.core import TextNode, Vec4
Preloaded = {}
def loadModels():
if Preloaded:
return
gui = loader.loadModel('phase_3.5/models/gui/fishingBook.bam')
Preloaded['tab1'] = gui.find('**/tabs/polySurface1')
Preloaded['tab2'] = gui.f... | apache-2.0 | -5,793,325,956,545,810,000 | 31.144068 | 111 | 0.554325 | false | 3.530726 | false | false | false |
ISISComputingGroup/EPICS-inst_servers | CollisionAvoidanceMonitor/configurations/config_larmor.py | 1 | 4210 | from math import radians
from CollisionAvoidanceMonitor.transform import Transformation
import os
# Config happens here:
# Colors for each body
colors = [(0.6, 0.6, 0.6), (1, 0, 1), (1, 1, 0), (0, 1, 1), (0, 1, 0), (1, 0.5, 0), (0.2, 0.2, 1), (1, 1, 1)]
# PV prefix
pv_prefix = os.environ["MYPVPREFIX"]
# PV prefix f... | bsd-3-clause | 8,660,980,917,994,422,000 | 27.255034 | 109 | 0.585273 | false | 2.683238 | false | false | false |
AndreasHeger/alignlib | python/tests/test_MultAlignment.py | 1 | 9238 | # alignlib - a library for aligning protein sequences
#
# $Id: test_Alignment.py,v 1.3 2004/01/23 17:34:58 aheger Exp $
#
# Copyright (C) 2004 Andreas Heger
#
# 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 Softw... | gpl-2.0 | -4,594,516,625,187,176,000 | 35.513834 | 88 | 0.582485 | false | 3.662966 | true | false | false |
sjTaylor/cmd_queue | client.py | 1 | 2997 | import socket
import select
import codes
import funs
import os
import subprocess
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('server_ip', type=str, help='address of the server (e.g. 198.123.1.3)')
parser.add_argument('--server_port', type=int, default=12345, required=False, help='port server... | mit | -2,199,648,740,256,074,200 | 36 | 113 | 0.575909 | false | 3.912533 | false | false | false |
jrconlin/server-key-exchange | keyexchange/util.py | 1 | 3643 | # ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (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.mozilla.org/MPL/
#
# Softwa... | mpl-2.0 | -8,685,065,241,772,336,000 | 29.613445 | 77 | 0.664562 | false | 3.830705 | false | false | false |
jddixon/bindex | setup.py | 1 | 1138 | #!/usr/bin/python3
# bindex/setup.py
""" Setuptools project configuration for bindex. """
from os.path import exists
from setuptools import setup
LONG_DESC = None
if exists('README.md'):
with open('README.md', 'r') as file:
LONG_DESC = file.read()
setup(name='bindex',
version='0.0.24',
autho... | mit | -3,196,861,824,986,049,500 | 29.756757 | 73 | 0.593146 | false | 3.965157 | false | false | false |
a2ialabelme/LabelMeAnnotationTool | toolBar.py | 1 | 1837 | #
# Copyright (C) 2011 Michael Pitidis, Hussein Abdulwahid.
#
# This file is part of Labelme.
#
# Labelme is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) ... | gpl-3.0 | 8,428,212,745,408,746,000 | 33.660377 | 79 | 0.684268 | false | 3.630435 | false | false | false |
patochectp/navitia | source/jormungandr/jormungandr/__init__.py | 1 | 3983 | # encoding: 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 mobilit... | agpl-3.0 | -1,356,667,356,695,377,400 | 30.611111 | 113 | 0.762491 | false | 3.358347 | true | false | false |
OSSESAC/odoopubarquiluz | addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 1 | 30074 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 3,142,552,518,188,816,400 | 50.320819 | 290 | 0.557093 | false | 3.930214 | false | false | false |
RuiNascimento/krepo | script.module.lambdascrapers/lib/lambdascrapers/sources_ lambdascrapers/pl/trt.py | 1 | 3892 | # -*- coding: UTF-8 -*-
#######################################################################
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# @Daddy_Blamo wrote this file. As long as you retain this notice you
# can do whatever you want wi... | gpl-2.0 | 2,059,342,441,990,086,000 | 37.92 | 146 | 0.460689 | false | 4.276923 | false | false | false |
rboman/progs | apps/pdf2ppt/pdf2ppt.py | 1 | 1429 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2017 Romain Boman
#
# 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
#
... | apache-2.0 | 2,452,702,609,578,649,000 | 30.733333 | 76 | 0.654062 | false | 3 | false | false | false |
danja/elfquake | prednet_/ingv_train.py | 1 | 3488 | '''
Train PredNet on INGV sequences.
'''
import os
import numpy as np
np.random.seed(123)
from six.moves import cPickle
from keras import backend as K
from keras.models import Model
from keras.layers import Input, Dense, Flatten
from keras.layers import LSTM
from keras.layers import TimeDistributed
from keras.callbac... | apache-2.0 | 4,245,735,531,598,125,000 | 42.061728 | 164 | 0.716456 | false | 3.033043 | false | false | false |
TariqEE/PrivEx | S2/S2-netified/exitListener.py | 1 | 5097 | from collections import defaultdict
from privexUtils import q, epoch, dc_start_delay, dc_reg_delay
from router import router
from tkgserver import tkgserver
from twisted.internet import reactor, protocol, task, ssl
from twisted.protocols import basic
import time
import json
import argparse
import pprint
parser = argpa... | bsd-3-clause | 1,234,578,571,938,410,000 | 30.85625 | 107 | 0.613106 | false | 3.698839 | false | false | false |
exp-publishing/cloudbot-plugins | plugins/tell.py | 1 | 5133 | """
tell.py
Created By:
- CloudBot IRC <https://github.com/ClodbotIRC>
Modified By:
- Josh Elsasser <https://github.com/jaelsasser>
License:
GNU General Public License (Version 3)
"""
import re
from datetime import datetime
from sqlalchemy import Table, Column, String, Boolean, DateTime
from sqlalchemy.s... | gpl-3.0 | -2,896,529,931,401,494,000 | 28.331429 | 91 | 0.591467 | false | 3.53756 | false | false | false |
talon-one/talon_one.py | test/test_set_discount_effect_props.py | 1 | 2126 | # coding: utf-8
"""
Talon.One API
The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. #... | mit | 7,183,432,051,782,559,000 | 36.964286 | 647 | 0.670273 | false | 4.011321 | true | false | false |
CanonicalLtd/subiquity | subiquity/models/identity.py | 1 | 1628 | # Copyright 2015 Canonical, Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distribute... | agpl-3.0 | 4,035,972,600,284,715,000 | 27.068966 | 74 | 0.665233 | false | 4.049751 | false | false | false |
open-craft/opencraft | instance/migrations/0002_auto_20150530_1255.py | 1 | 1562 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('instance', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='LogE... | agpl-3.0 | -7,473,166,844,276,405,000 | 35.325581 | 178 | 0.576184 | false | 4.30303 | false | false | false |
geotrellis/geotrellis-osm-elevation | ingest/src/main/python/geotrellis/osme/ingest/translate.py | 1 | 9548 | # 1. function create_object_links() gets a bucket path and returns a list of the link of each .img file
# 2. s3://azavea-datahub/emr/bootstrap.sh: install python2.7: sudo yum install -y python27;
# install gdal;
# install gdal_retile... | apache-2.0 | 8,990,720,175,938,981,000 | 33.348921 | 159 | 0.542417 | false | 3.85622 | false | false | false |
AutorestCI/azure-sdk-for-python | azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_listener.py | 1 | 1814 | # 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 | -2,108,547,658,817,203,000 | 42.190476 | 83 | 0.624587 | false | 4.058166 | false | false | false |
googleapis/googleapis-gen | google/cloud/ondemandscanning/v1/ondemandscanning-v1-py/google/cloud/ondemandscanning_v1/services/scanner_service/transports/base.py | 1 | 7756 | # -*- 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 | -98,890,217,601,211,180 | 40.037037 | 161 | 0.640923 | false | 4.411832 | false | false | false |
kevana/corpscores | dci_notify/database.py | 1 | 2185 | # -*- coding: utf-8 -*-
'''
Database module, including the SQLAlchemy database object and DB-related
utilities.
'''
from sqlalchemy.orm import relationship
from .extensions import db
# Alias common SQLAlchemy names
Column = db.Column
relationship = relationship
class CRUDMixin(object):
'''Mixin that adds conve... | bsd-3-clause | 5,581,491,092,407,811,000 | 26.658228 | 72 | 0.628375 | false | 4.138258 | false | false | false |
Symantec/py-statsd | pystatsd/pystatsagent.py | 1 | 2187 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import socket
import json
try:
import pystats_config
except ImportError:
import pystatsd.pystats_config as pystats_config
class UDPClient(object):
def __init__(self, server_ip, server_port):
"""Initalize client"""
self.server_ip = server_ip
... | apache-2.0 | 7,166,294,631,678,672,000 | 32.646154 | 76 | 0.581619 | false | 3.713073 | false | false | false |
lukovkin/ufcnn-keras | models/create_signals_bid_ask.py | 1 | 13710 | from __future__ import absolute_import
from __future__ import print_function
import sys
from copy import copy, deepcopy
import numpy as np
#import matplotlib.pyplot as plt
import pandas as pd
pd.set_option('display.width', 1000)
pd.set_option('display.max_rows', 1000)
from signals import *
def find_all_signals... | mit | 75,075,838,899,933,100 | 40.41994 | 139 | 0.515536 | false | 3.542636 | false | false | false |
ingadhoc/odoo-infrastructure | infrastructure/wizard/instance_update_add_instances.py | 1 | 1450 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in module root
# directory
##############################################################################
from openerp import models, fields, api
class in... | agpl-3.0 | -7,664,425,907,704,967,000 | 29.851064 | 78 | 0.536552 | false | 4.264706 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.