repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
gercordero/va_de_vuelta | src/general.py | 1 | 5566 | import pilas
import json
from pilas.escena import Base
class General(Base):
def __init__(self):
Base.__init__(self)
def iniciar(self):
self.sonido_boton = pilas.sonidos.cargar("data/audio/boton.ogg")
archivo = open("data/archivos/usuarios.json","r")
self.datos_usuarios = json.load(archivo)
a... | gpl-3.0 | -4,664,300,107,919,250,000 | 49.555556 | 147 | 0.716493 | false | 2.370528 | false | false | false |
ningirsu/taemin | taemin/plugins/nicebot/plugin.py | 1 | 2107 | #!/usr/bin/env python2
# -*- coding: utf8 -*-
import re
import requests
from bs4 import BeautifulSoup
from taemin import plugin
class TaeminNiceBot(plugin.TaeminPlugin):
def __init__(self, taemin):
plugin.TaeminPlugin.__init__(self, taemin)
self.mapping = [
(r"""((?:http[s]?://)?(?:www... | mit | 2,202,534,158,624,675,600 | 24.670732 | 129 | 0.542993 | false | 3.59215 | false | false | false |
vqw/frappe | frappe/async.py | 5 | 5715 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
import os
import time
import redis
from functools import wraps
from frappe.utils import get_site_path
from frappe import... | mit | 5,247,314,299,616,891,000 | 28.765625 | 167 | 0.704812 | false | 3.006312 | false | false | false |
benfinke/ns_python | nssrc/com/citrix/netscaler/nitro/resource/config/sc/scparameter.py | 3 | 4863 | #
# Copyright (c) 2008-2015 Citrix 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.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | 6,373,430,240,629,254,000 | 33.985612 | 377 | 0.720337 | false | 3.618304 | false | false | false |
ubc/compair | alembic/versions/4670092712d7_add_lti_course_offering_and_section_ids.py | 1 | 1201 | """Add LTI course offering and section ids
Revision ID: 4670092712d7
Revises: 59646d2ad22c
Create Date: 2018-10-05 19:10:51.882637
"""
# revision identifiers, used by Alembic.
revision = '4670092712d7'
down_revision = '59646d2ad22c'
from alembic import op
import sqlalchemy as sa
from compair.models import conventi... | gpl-3.0 | -8,161,839,396,225,169,000 | 35.424242 | 109 | 0.732723 | false | 3.143979 | false | false | false |
cmccoy/peasel | setup.py | 1 | 1728 | import os.path
from setuptools import Extension, setup, Distribution
try:
from Cython.Distutils import build_ext
has_cython = True
except ImportError:
has_cython = False
compile_args = ['-std=gnu99', '-O3', '-fomit-frame-pointer',
'-malign-double', '-fstrict-aliasing', '-msse2',
... | gpl-3.0 | 4,414,595,009,274,852,000 | 33.56 | 89 | 0.612269 | false | 2.851485 | false | false | false |
tushortz/PokerHand.py | PokerHand/Card.py | 1 | 1928 | # By Taiwo Kareem <taiwo.kareem36@gmail.com>
# Github <https://github.com/tushortz>
# Last updated (08-February-2016)
# Card class
class Card:
# Initialize necessary field variables
def __init__(self, *code):
# Accept two character arguments
if len(code) == 2:
rank = code[0]
suit = code[1]
# Can also ac... | mit | -3,421,401,250,486,518,000 | 19.741935 | 58 | 0.641079 | false | 2.770115 | false | false | false |
joelliusp/SpaceHabit | SpaceHabitRPG/Tests/Frontend/PlaygroundLoad.py | 1 | 1193 | from SpaceUnitTest import SpaceUnitTest
from selenium import webdriver
import SpaceHabitServer
import threading
import cherrypy
import time
import requests
import DatabaseLayer
import DatabaseTestSetupCleanup as dbHelp
class Test_PlaygroundLoad(SpaceUnitTest):
@classmethod
def setUpClass(cls):
DatabaseLayer.i... | mit | 8,719,637,877,731,123,000 | 24.382979 | 66 | 0.691534 | false | 3.963455 | true | false | false |
trigunshin/mtgo_vortex | src/prices.py | 1 | 8388 | from codecs import open
from urllib2 import urlopen
from datetime import datetime
import json
import re
from itertools import groupby
from functools import partial
from pymongo import MongoClient
######## some internet hack i need to put into a lib and import
# from http://effbot.org/zone/unicode-convert.htm
import u... | mit | -5,452,461,411,739,017,000 | 31.511628 | 125 | 0.594182 | false | 3.375453 | false | false | false |
rakshit-agrawal/sonnet | sonnet/python/modules/clip_gradient.py | 1 | 3540 | # Copyright 2017 The Sonnet 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 applicable l... | apache-2.0 | 4,359,277,316,294,628,400 | 36.659574 | 80 | 0.70791 | false | 3.794212 | false | false | false |
AlmostBetterNetwork/pinecast | sites/migrations/0015_auto_20171203_1747.py | 3 | 1179 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-12-03 17:47
from __future__ import unicode_literals
import assets.fields
from django.db import migrations
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('assets', '0008_auto_20171202_2118'),
('s... | apache-2.0 | -3,312,408,725,223,694,000 | 34.727273 | 163 | 0.619169 | false | 3.742857 | false | false | false |
marekpetrik/RAAM | examples/sampling_robust/counter_modes.py | 1 | 4643 | """
A simple example adapted from ``raam.examples.counter``
"""
import random
import itertools
import raam
import numpy as np
class CounterModes(raam.simulator.Simulator):
"""
A simple chain counter class with different modes. The modes differ in their
transition probabilties. Modes can be changed but a... | mit | 8,402,842,464,487,485,000 | 32.402878 | 85 | 0.569459 | false | 4.48166 | false | false | false |
sgubianpm/pygensa | sdaopt/benchmark/suttonchen.py | 3 | 2045 | # Copyright (c) 2017 Sylvain Gubian <sylvain.gubian@pmi.com>,
# Yang Xiang <yang.xiang@pmi.com>
# Author: Sylvain Gubian, PMP S.A.
# -*- coding: utf-8 > -*-
import numpy as np
import numpy.testing as npt
try:
from scipy.optimize import sda
except:
from sdaopt import sda
__author__ = "Sylvain Gubian"
__copyright... | bsd-2-clause | 2,094,206,119,473,556,500 | 30.461538 | 73 | 0.578973 | false | 2.437426 | false | false | false |
hivesolutions/netius | src/netius/base/errors.py | 1 | 5193 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Hive Netius System
# Copyright (c) 2008-2020 Hive Solutions Lda.
#
# This file is part of Hive Netius System.
#
# Hive Netius System is free software: you can redistribute it and/or modify
# it under the terms of the Apache License as published by the Apache
# Foun... | apache-2.0 | -6,128,106,209,019,315,000 | 26.36612 | 76 | 0.649201 | false | 4.247954 | false | false | false |
google/resultstoreui | resultstoreui/resultstoreapi/cloud/devtools/resultstore_v2/proto/resultstore_file_download_pb2_grpc.py | 2 | 3536 | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from resultstoreapi.cloud.devtools.resultstore_v2.proto import resultstore_file_download_pb2 as google_dot_cloud_dot_devtools_dot_resultstore__v2_dot_proto_dot_resultstore__file__download__pb2
class ResultStoreFileDownloadStub(object):... | apache-2.0 | 6,577,499,341,524,844,000 | 46.783784 | 192 | 0.744061 | false | 3.806243 | false | false | false |
mozman/ezdxf | profiling/bspline_interpolation.py | 1 | 1511 | # Copyright (c) 2020, Manfred Moitzi
# License: MIT License
from typing import Iterable
import time
import ezdxf
from pathlib import Path
import math
from ezdxf.math import global_bspline_interpolation, BoundingBox, linspace, BSpline
from ezdxf.render import random_3d_path
DIR = Path('~/Desktop/Outbox').expanduser()
... | mit | -6,967,679,482,294,186,000 | 29.836735 | 95 | 0.696889 | false | 3.08998 | false | false | false |
NicovincX2/Python-3.5 | Statistiques/Science des données/Exploration de données/incremental_pca.py | 1 | 1102 | # -*- coding: utf-8 -*-
import os
# Authors: Kyle Kastner
# License: BSD 3 clause
import numpy as np
import matplotlib.pyplot as plt
from sklearn.datasets import load_iris
from sklearn.decomposition import PCA, IncrementalPCA
iris = load_iris()
X = iris.data
y = iris.target
n_components = 2
ipca = IncrementalPCA(... | gpl-3.0 | 4,124,127,522,141,868,500 | 25.238095 | 75 | 0.627042 | false | 2.962366 | false | false | false |
charlesmastin/django-simple-cms | simple_cms/contrib/translated_model/middleware/__init__.py | 2 | 2263 | from django.http import HttpResponseRedirect
from django.utils.translation.trans_real import parse_accept_lang_header
from django.conf import settings
from simple_cms.contrib.translated_model.models import Language
def detect_language(request):
language_code = settings.DEFAULT_LANGUAGE
language = None
try... | mit | 2,734,251,609,953,514,500 | 37.372881 | 97 | 0.570924 | false | 4.995585 | false | false | false |
pdelsante/thug | thug/DOM/W3C/HTML/HTMLFormElement.py | 1 | 1861 | #!/usr/bin/env python
import logging
from .HTMLElement import HTMLElement
from .HTMLFormControlsCollection import HTMLFormControlsCollection
from .attr_property import attr_property
log = logging.getLogger("Thug")
class HTMLFormElement(HTMLElement):
name = attr_property("name")
acceptCharset = att... | gpl-2.0 | 4,893,768,234,087,182,000 | 32.232143 | 91 | 0.632993 | false | 4.08114 | false | false | false |
andrewjpage/plasmidtron | plasmidtron/KmcFilter.py | 2 | 3043 | import os
import logging
import tempfile
import subprocess
import shutil
from plasmidtron.FastqReadNames import FastqReadNames
'''Given a kmer database extract filter a FASTQ file for a sample'''
class KmcFilter:
def __init__(self,sample, output_directory, threads,result_database, verbose, min_kmers_per_read, match_... | gpl-3.0 | 2,294,827,827,217,553,000 | 43.75 | 250 | 0.741045 | false | 3.114637 | false | false | false |
JuezUN/INGInious | inginious/frontend/plugins/statistics/pages/api/admin/best_submissions_by_verdict.py | 1 | 3127 | import web
import os
from .admin_api import AdminApi
class BestSubmissionsByVerdictApi(AdminApi):
def get_best_statistics_by_verdict(self, course):
course_id = course.get_id()
admins = list(set(course.get_staff() + self.user_manager._superadmins))
best_statistics_by_verdict = self.databa... | agpl-3.0 | -1,199,020,392,580,424,400 | 31.915789 | 100 | 0.427247 | false | 4.473534 | false | false | false |
madflow/seahub | seahub/profile/forms.py | 6 | 1227 | # encoding: utf-8
from django import forms
from django.utils.translation import ugettext_lazy as _
from seahub.profile.models import Profile, DetailedProfile
class ProfileForm(forms.Form):
nickname = forms.CharField(max_length=64, required=False)
intro = forms.CharField(max_length=256, required=False)
de... | apache-2.0 | -1,004,567,766,734,315,100 | 36.181818 | 80 | 0.691117 | false | 3.983766 | false | false | false |
chin123/clarity | Clarity/Clarity/settings.py | 1 | 3279 | """
Django settings for Clarity project.
Generated by 'django-admin startproject' using Django 1.10.3.
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/
"""
import os... | gpl-3.0 | 2,375,885,321,789,797,000 | 25.232 | 91 | 0.68893 | false | 3.473517 | false | false | false |
Pulgama/supriya | etc/pending_ugens/KeyState.py | 1 | 3720 | import collections
from supriya.enums import CalculationRate
from supriya.ugens.UGen import UGen
class KeyState(UGen):
"""
::
>>> key_state = supriya.ugens.KeyState.ar(
... keycode=0,
... lag=0.2,
... maxval=1,
... minval=0,
... )
>... | mit | 756,500,675,737,510,300 | 20.50289 | 58 | 0.418817 | false | 4.008621 | false | false | false |
befelix/SafeMDP | examples/mars/plot_utilities.py | 1 | 6416 | import matplotlib.pyplot as plt
import numpy as np
from matplotlib import rcParams
from matplotlib.colors import ColorConverter
def paper_figure(figsize, subplots=None, **kwargs):
"""Define default values for font, fontsize and use latex"""
def cm2inch(cm_tupl):
"""Convert cm to inches"""
inc... | mit | -2,982,222,230,062,323,700 | 28.163636 | 83 | 0.581983 | false | 3.496458 | false | false | false |
davidhrbac/spacewalk | spacecmd/src/lib/repo.py | 5 | 9863 | #
# Licensed under the GNU General Public License Version 3
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This p... | gpl-2.0 | -4,164,891,385,606,342,000 | 25.728997 | 84 | 0.592822 | false | 3.81695 | false | false | false |
apmichaud/vitess-apm | test/queryservice_tests/stream_tests.py | 1 | 5098 | import json
import threading
import time
import traceback
import urllib
from vtdb import cursor
from vtdb import dbexceptions
import framework
class TestStream(framework.TestCase):
def tearDown(self):
self.env.conn.begin()
self.env.execute("delete from vtocc_big")
self.env.conn.commit()
# UNION quer... | bsd-3-clause | 5,642,567,119,096,291,000 | 36.211679 | 366 | 0.582581 | false | 3.439946 | true | false | false |
hardbyte/python-can | can/io/asc.py | 1 | 15246 | """
Contains handling of ASC logging files.
Example .asc files:
- https://bitbucket.org/tobylorenz/vector_asc/src/47556e1a6d32c859224ca62d075e1efcc67fa690/src/Vector/ASC/tests/unittests/data/CAN_Log_Trigger_3_2.asc?at=master&fileviewer=file-view-default
- under `test/data/logfile.asc`
"""
from typing import c... | lgpl-3.0 | -3,838,201,424,560,694,300 | 37.210526 | 193 | 0.531287 | false | 4.02057 | false | false | false |
dpressel/baseline | addons/reader_conllcased.py | 1 | 4410 | from baseline.reader import CONLLSeqReader
import numpy as np
from collections import Counter
import codecs
import io
import os
import re
import baseline.data
class CONLLSeqMixedCaseReader(CONLLSeqReader):
def __init__(self, max_sentence_length=-1, max_word_length=-1, word_trans_fn=None,
vec_all... | apache-2.0 | -241,211,557,665,942,300 | 36.058824 | 124 | 0.507937 | false | 3.727811 | false | false | false |
EmreAtes/spack | lib/spack/spack/test/cmd/url.py | 1 | 5856 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | -7,614,107,478,900,847,000 | 41.434783 | 89 | 0.648566 | false | 3.562044 | true | false | false |
citiususc/citius-invaders | python/game.py | 1 | 6825 | # -*- coding: utf-8 -*-
# pylint: disable=
"""
Created on Sat May 7 11:50:42 2016
@author: T. Teijeiro
"""
import sge
import objects
import evolution
import time
from pygame.time import Clock
#Resolution constants
RESX = 960
RESY = 540
#Objects position
PLAYER_YOFFSET = 50
PLAYER_SPEED = 4
BULLET_START_SPEED = 20
W... | mit | 684,756,637,905,276,200 | 38.224138 | 90 | 0.526886 | false | 3.699187 | false | false | false |
teuben/pyASC | www/js/lib/js9-3.5/tests/threeways/threeways.py | 2 | 2871 | import pyjs9
import time
import sys
timeout = 2
loadTimeout = 1
maxIter = 10
id = "threeJS9"
if len(sys.argv) > 1:
id = sys.argv[1]
def waitLoad():
iter = 0
done = False
while done == False:
x = j.GetLoadStatus()
if x == "complete":
done = True
else:
it... | mit | -2,169,031,480,439,290,000 | 29.870968 | 163 | 0.614768 | false | 2.711048 | false | false | false |
rlucio/cinder-violin-driver-havana | cinder/volume/drivers/violin/vxg/core/response.py | 1 | 5419 | #!/usr/bin/env python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Violin Memory, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# ... | apache-2.0 | -8,629,624,814,067,579,000 | 34.188312 | 79 | 0.534416 | false | 4.233594 | false | false | false |
cagdass/afshan-bot | bot.py | 1 | 6608 | #!/usr/bin/env python
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
import logging
from time import time, sleep
import os, sys, types
import urllib2
import json
import string
from bs4 import BeautifulSoup
import requests
from pymongo import MongoClient
from telegram.error import (TelegramEr... | mit | -2,947,030,279,929,269,000 | 25.861789 | 125 | 0.554933 | false | 3.791165 | false | false | false |
jonathanslenders/python-prompt-toolkit | tests/test_history.py | 1 | 3064 | import asyncio
from prompt_toolkit.history import FileHistory, InMemoryHistory, ThreadedHistory
def _call_history_load(history):
"""
Helper: Call the history "load" method and return the result as a list of strings.
"""
result = []
async def call_load():
async for item in history.load():... | bsd-3-clause | -4,782,370,754,134,797,000 | 29.336634 | 86 | 0.663838 | false | 3.727494 | true | false | false |
arpitn30/open-event-orga-server | app/views/super_admin/messages.py | 8 | 1114 | from flask import Blueprint
from flask import redirect, request, url_for
from flask import render_template
from app.helpers.data import DataManager
from app.helpers.data_getter import DataGetter
from app.helpers.system_mails import MAILS
from app.helpers.system_notifications import NOTIFS
from app.views.super_admin im... | gpl-3.0 | 3,123,715,750,490,804,000 | 30.828571 | 86 | 0.739677 | false | 3.676568 | false | false | false |
sserrot/champion_relationships | venv/Lib/site-packages/prompt_toolkit/output/conemu.py | 1 | 1707 | from typing import Any, Optional, TextIO
from prompt_toolkit.data_structures import Size
from prompt_toolkit.renderer import Output
from .color_depth import ColorDepth
from .vt100 import Vt100_Output
from .win32 import Win32Output
__all__ = [
"ConEmuOutput",
]
class ConEmuOutput:
"""
ConEmu (Windows) o... | mit | 867,648,306,179,710,100 | 30.036364 | 88 | 0.650849 | false | 3.686825 | false | false | false |
aufrank/VisualWorld | src/visualworld2/Measure/instrument.py | 1 | 1271 | from time import time, clock
class Instrument(object):
"""Base class for instruments used to measure particpant responses.
"""
def __init__(self):
"""
"""
self.start_time = None
self.stop_time = None
self.start_clock = None
self.stop_clock = None
... | gpl-3.0 | -5,488,140,863,116,556,000 | 20.183333 | 71 | 0.47915 | false | 4.605072 | false | false | false |
trungpv88/sparrow | utils/filters.py | 1 | 7127 | __author__ = 'User'
import cv2
import numpy
import utils
def recolor_rc(src, dst):
"""Simulate conversion from BGR to RC (red, cyan).
(b, g, r) -> (0.5b + 0.5g, 0.5b + 0.5g, r)
"""
b, g, r = cv2.split(src)
cv2.addWeighted(b, 0.5, g, 0.5, b)
cv2.merge((b, b, r), dst)
def recolor_rgv(src, ... | gpl-2.0 | 961,107,217,048,083,100 | 35.927461 | 82 | 0.537533 | false | 3.07596 | false | false | false |
pombredanne/milksets | milksets/yeast/yeast.py | 2 | 1392 | # -*- coding: utf-8 -*-
# Copyright (C) 2009-2010, Luis Pedro Coelho <luis@luispedro.org>
# Software Distributed under the MIT License
import numpy as np
from os.path import dirname
import gzip
from ..vtypes import *
from ..utils import standard_properties, standard_classification_loader
__all__ = ['load'] + standar... | mit | -2,478,882,948,074,887,700 | 32.142857 | 98 | 0.698994 | false | 3.135135 | false | false | false |
popazerty/e2-gui | lib/python/Plugins/Extensions/FilebrowserVTi/FileListmod.py | 1 | 17967 | #######################################################################
#
# Filelistmod for VU+ by markusw and schomi (c) 2013
# www.vuplus-support.org
#
# This plugin is licensed under the Creative Commons
# Attribution-NonCommercial-ShareAlike 3.0 Unported License.
# To view a copy of this license, visit http://creat... | gpl-2.0 | 22,770,181,530,444,956 | 33.551923 | 351 | 0.681082 | false | 3.124152 | true | false | false |
damasko/editor-de-mapas-pygame | src/pincel.py | 1 | 8620 | import pygame
from tile_editor import Tile
from enemigo_editor import Enemigo
class Pincel(pygame.sprite.Sprite):
def __init__(self):
super(Pincel, self).__init__()
self.surface = pygame.image.load("res/pincel.png").convert_alpha()
self.surface_1 = pygame.image.load("res/pincel.png").conv... | gpl-2.0 | 1,232,512,815,276,167,700 | 38.181818 | 171 | 0.470766 | false | 3.789011 | false | false | false |
lukasjuhrich/pycroft | web/blueprints/facilities/__init__.py | 1 | 20206 | # -*- coding: utf-8 -*-
# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
"""
web.blueprints.facilities
~~~~~~~~~~~~~~
This module defines view funct... | apache-2.0 | 3,460,808,330,484,939,000 | 36.467532 | 122 | 0.616291 | false | 3.517067 | false | false | false |
mcianfrocco/Appion_freehand | freeHand_xmipp_ali.py | 1 | 10437 | #!/usr/bin/env python
import optparse
from sys import *
import os,sys,re
from optparse import OptionParser
import glob
import subprocess
from os import system
import linecache
#=========================
def setupParserOptions():
parser = optparse.OptionParser()
parser.set_usage("%prog -u <untilted sta... | mit | 5,131,177,710,097,390,000 | 27.438692 | 249 | 0.576698 | false | 2.89354 | false | false | false |
jdukes/ilwrathi | ilwrathi/iac.py | 1 | 7369 | #!/usr/bin/env python
from ._common import IACBase
class IdempotentAccessor(IACBase):
"""The IdempotentAccessor base class is an idempotent store for values.
This class acts like a dictionary. When a key is referenced, the
IdempotentAccessor will check for the key in it's current state,
optionally ch... | gpl-3.0 | 5,933,064,422,907,386,000 | 32.958525 | 123 | 0.595603 | false | 4.015804 | false | false | false |
vergl4s/instarecon | src/network.py | 1 | 1554 | import sys
import ipaddress as ipa # https://docs.python.org/3/library/ipaddress.html
from . import lookup
class Network(object):
"""
Subclass of Host that represents an IP network to be scanned.
Keywork arguments:
cidr -- ipa.IPv4Network object
related_hosts -- set of valid Hosts found by sca... | mit | 2,318,826,039,725,084,700 | 27.777778 | 87 | 0.561133 | false | 4.036364 | false | false | false |
zultron/virt-manager | virtinst/cli.py | 1 | 57786 | #
# Utility functions for the command line drivers
#
# Copyright 2006-2007, 2013 Red Hat, Inc.
# Jeremy Katz <katzj@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... | gpl-2.0 | 8,342,569,272,708,001,000 | 29.302045 | 119 | 0.56749 | false | 3.821067 | false | false | false |
wlach/treeherder | tests/etl/test_buildbot.py | 1 | 62483 | import pytest
from treeherder.etl import buildbot
slow = pytest.mark.slow
buildernames = [
('Android 2.2 Armv6 mozilla-inbound build',
{'build_type': 'opt',
'job_type': 'build',
'name': {'group_name': 'unknown',
'group_symbol': '?',
'name': 'Build',
'... | mpl-2.0 | 6,807,473,673,618,558,000 | 38.772756 | 96 | 0.44937 | false | 3.434642 | true | false | false |
emitrom/integra-openstack-ui | jobs/tables.py | 1 | 1394 | from django.utils.translation import ugettext_lazy as _
from horizon import tables
from openstack_dashboard.dashboards.integra.jobs import utils
class DeleteTableData(tables.DeleteAction):
data_type_singular = _("Job")
data_type_plural = _("Jobs")
def delete(self, request, obj_id):
utils.deleteJ... | apache-2.0 | 4,613,610,858,494,726,000 | 28.041667 | 61 | 0.595409 | false | 4.35625 | false | false | false |
userzimmermann/robotframework-python3 | src/robot/running/runkwregister.py | 1 | 2077 | # Copyright 2008-2014 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | 8,498,460,304,100,299,000 | 35.438596 | 75 | 0.645161 | false | 3.875 | false | false | false |
lneuhaus/pyrpl | pyrpl/acquisition_module.py | 1 | 21707 | """
Everything involving asynchronicity in acquisition instruments is in this file.
In particular, this includes getting curves and continuously averaging curves.
Using the coroutine syntax introduced in python 3.4+ would make the code
more elegant, but it would not be compatible with python 2.7. Hence we have
chosen... | gpl-3.0 | 5,576,430,211,411,562,000 | 38.253165 | 181 | 0.616806 | false | 4.321521 | false | false | false |
amirfefer/Cyber-Camera | cloud.py | 1 | 1042 | import dropbox
class DropObj(object):
def __init__(self, conf):
self.app_key = 'ck2ifx3agl50908'
self.app_secret = 'w95xtn3ouucj6ru'
self.token = conf.get('Cloud')['token']
if self.token != 'none':
self.client = dropbox.Dropbox(self.token)
else:
... | gpl-3.0 | -8,140,651,490,932,606,000 | 32.8 | 97 | 0.558541 | false | 3.593103 | false | false | false |
tzulberti/entrenamiento-arqueria | alembic/versions/016_arco_recurvado.py | 1 | 1902 | """arco recurvado
Revision ID: 015
Revises: 015
Create Date: 2014-05-27 22:36:06.936698
"""
# revision identifiers, used by Alembic.
revision = '016'
down_revision = '015'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table('arco_recurvado',
sa.Column('id', sa.Integer, sa.For... | mit | 8,549,167,772,033,783,000 | 39.468085 | 91 | 0.645636 | false | 2.908257 | false | false | false |
sbg/sevenbridges-python | sevenbridges/models/compound/tasks/batch_by.py | 1 | 1518 | from sevenbridges.meta.resource import Resource
# noinspection PyUnresolvedReferences,PyProtectedMember
class BatchBy(Resource, dict):
"""
Task batch by resource.
"""
_name = 'batch_by'
# noinspection PyMissingConstructor
def __init__(self, **kwargs):
self.parent = kwargs.pop('_parent... | apache-2.0 | -9,052,511,591,267,828,000 | 26.6 | 77 | 0.519763 | false | 3.862595 | false | false | false |
junctionapps/3E | new_client.py | 1 | 4190 | # Copyright 2017 Junction Applications Limited
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merg... | mit | -6,832,159,837,198,456,000 | 47.880952 | 190 | 0.70716 | false | 3.854646 | false | false | false |
serginator/coursera-interactivepython | guess-the-number.py | 1 | 1466 | import math
import simplegui
import random
num_range = 100
attempts = 7
random_choice = 0
def get_random_number(range):
return random.randint(0, range - 1)
def new_game():
global num_range, attempts, random_choice
random_choice = get_random_number(num_range)
if num_range == ... | mit | -5,815,991,647,163,218,000 | 21.645161 | 70 | 0.576398 | false | 3.558252 | false | false | false |
matthijsvk/multimodalSR | code/Experiments/neon-master/examples/char_rnn.py | 2 | 2551 | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2015-2016 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
#... | mit | 9,182,318,724,445,776,000 | 31.291139 | 92 | 0.713446 | false | 3.66523 | false | false | false |
dasbruns/netzob | src/netzob/Common/C_Extensions/WrapperMessage.py | 1 | 3013 | # -*- coding: utf-8 -*-
#+---------------------------------------------------------------------------+
#| 01001110 01100101 01110100 01111010 01101111 01100010 |
#| |
#| Netzob : Inferring communication protocol... | gpl-3.0 | -5,167,725,628,724,514,000 | 51.789474 | 78 | 0.40545 | false | 4.998339 | false | false | false |
Stanford-Online/edx-ora2 | setup.py | 1 | 1829 | #!/usr/bin/env python
from setuptools import find_packages, setup
def is_requirement(line):
"""
Return True if the requirement line is a package requirement;
that is, it is not blank, a comment, or editable.
"""
# Remove whitespace at the start/end of the line
line = line.strip()
# Skip b... | agpl-3.0 | 6,158,918,537,516,412,000 | 30 | 93 | 0.624932 | false | 4.253488 | false | false | false |
crunchmail/munch-core | src/munch/apps/transactional/policies/relay/headers.py | 1 | 1622 | import logging
from django.conf import settings
from slimta.policy import RelayPolicy
from munch.core.mail.utils import UniqueEmailAddressParser
log = logging.getLogger(__name__)
return_path_parser = UniqueEmailAddressParser(
domain=lambda: settings.RETURNPATH_DOMAIN, prefix='return-')
class RewriteReturnPath... | agpl-3.0 | 1,480,876,067,844,674,600 | 40.589744 | 90 | 0.602959 | false | 4.191214 | false | false | false |
tri2sing/PyOO | patterns/abstractfactory/products.py | 1 | 2615 | '''
Created on Nov 30, 2015
@author: Sameer Adhikari
'''
import abc
class AbstractDateFormatter(object):
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def format_date(self, year, month, day):
''' Sub class has to implement this function '''
class FranceDateFormatter(AbstractDateFormatter):
... | gpl-2.0 | 4,785,107,860,414,111,000 | 27.725275 | 57 | 0.535017 | false | 3.456349 | false | false | false |
ychen820/microblog | y/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/tee.py | 8 | 1329 | #!/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... | bsd-3-clause | 8,498,708,206,381,434,000 | 25.58 | 76 | 0.676448 | false | 3.671271 | false | false | false |
imofftoseethewizard/nnkit | src/examples/ex02_bestfit.py | 1 | 6037 | '''
This example demonstrates supervised backpropagation training in a simple network which approximates
the training set.
'''
# add the main source directory to the path for the imports below
import os, sys
sys.path.append(os.path.abspath(os.path.join(os.getcwd(), '../..', )))
# external libraries
import cv2
import ... | gpl-3.0 | 5,236,726,763,154,776,000 | 40.068027 | 122 | 0.644194 | false | 3.847674 | false | false | false |
jefftc/changlab | scripts/download_tcga.py | 1 | 33158 | #!/usr/bin/env python
import os
import re
from genomicode import genefinder, timer, Matrix, matrixlib
from genomicode import parselib, filelib, arrayannot
# retrieve_all_dates
# retrieve_diseases
# Not quite a good idea.
datatype_match = {
'RSEM_genes' : (
'Merge_rnaseqv2__illuminahiseq_rnaseqv2__unc_edu... | mit | -883,528,743,924,307,500 | 34.425214 | 119 | 0.584535 | false | 3.224232 | false | false | false |
zhangjunli177/sahara | sahara/tests/unit/service/validation/test_cluster_delete_validation.py | 2 | 2143 | # Copyright (c) 2013 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 writ... | apache-2.0 | 5,742,627,410,493,921,000 | 38.685185 | 76 | 0.666822 | false | 3.917733 | true | false | false |
JohnLunzer/flexx | flexx/ui/widgets/_canvas.py | 1 | 3374 | """
"""
from ... import event
from ...pyscript import window
from .. import Widget
perf_counter = None # exists in PyScript, time.perf_counter only in Python 3.3+
class CanvasWidget(Widget):
""" A widget that provides an HTML5 canvas. The canvas is scaled with
the available space.
"""
CSS = ""... | bsd-2-clause | 3,459,157,462,093,790,000 | 38.232558 | 87 | 0.537344 | false | 4.222778 | false | false | false |
miltonsarria/dsp-python | calc-circ/solPar2.py | 1 | 2642 | #Milton Orlando Sarria Paja
#USC 2017
#solucion parcial 2
import numpy as np
import math
from sympy import *
import control as ctrl
import matplotlib.pyplot as plt
from scipy import signal
def text2numbers(lines):
x=[]
numID=[]
for line in lines:
#leer el dato de cada linea e ignorar el cambio de... | mit | -4,838,082,607,586,395,000 | 19.968254 | 69 | 0.466313 | false | 2.807651 | false | false | false |
Ameriks/velo.lv | velo/results/migrations/0001_initial.py | 2 | 16745 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-26 18:43
from __future__ import unicode_literals
import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import easy_thumbnails.fields
import velo.results.models
class Migration(migratio... | gpl-3.0 | -7,294,597,139,939,372,000 | 69.616034 | 221 | 0.610062 | false | 4.020178 | false | false | false |
phspagiari/paaws | paaws/resources/iam.py | 1 | 1256 | # -*- coding: utf-8 -*-
from boto import iam
from boto.exception import BotoServerError
def get(name, platform, env):
connection = iam.connect_to_region('universal')
iam_role_name = "iam-%s-%s-%s" % (name, platform, env)
try:
instance_profile = connection.get_instance_profile(iam_role_name)
e... | apache-2.0 | -6,032,506,597,266,990,000 | 42.310345 | 144 | 0.695064 | false | 4.091205 | false | false | false |
mwweinberg/guofa-scraper | fullbody.py | 1 | 1049 | from bs4 import BeautifulSoup
import urllib
#csv is for the csv writer
import csv
#initiates the dictionary to hold the output
holder = []
#this is the target URL
target_url = "http://www.gov.cn/zhengce/content/2016-12/02/content_5142197.htm"
data = []
filename = "fullbody.html"
target = open(filename, 'w')
def b... | mit | -356,746,839,973,633,000 | 22.311111 | 79 | 0.689228 | false | 3.267913 | false | false | false |
anderdl/test3repo | setup.py | 1 | 1816 | #/usr/bin/env python
import os
from setuptools import setup, find_packages
import photologue
ROOT_DIR = os.path.dirname(__file__)
SOURCE_DIR = os.path.join(ROOT_DIR)
def get_requirements(requirements_file):
with open(requirements_file) as f:
required = [line.split('#')[0] for line in f.read().splitlines(... | bsd-3-clause | -7,451,919,381,419,659,000 | 41.232558 | 93 | 0.625551 | false | 4.09009 | false | false | false |
zhmcclient/python-zhmcclient | zhmcclient/_user_role.py | 1 | 15490 | # Copyright 2017 IBM Corp. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | apache-2.0 | -7,345,563,378,509,130,000 | 34.691244 | 81 | 0.617172 | false | 4.574719 | false | false | false |
pkimber/hatherleigh_net | project/views.py | 1 | 1192 | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import get_object_or_404
from django.views.generic import (
DetailView,
TemplateView,
)
from django.views.generic.dates import MonthArchiveView
from base.view_utils import BaseMixin
from pump.models import (
get_home_... | apache-2.0 | 2,293,719,498,059,440,000 | 21.923077 | 73 | 0.661913 | false | 3.701863 | false | false | false |
liberation/sesql | sesql/orm/django/core.py | 1 | 2960 | # -*- coding: utf-8 -*-
# Copyright (c) Pilot Systems and Libération, 2010-2012
# This file is part of SeSQL.
# SeSQL 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
# (a... | gpl-2.0 | -1,705,135,708,763,448,600 | 28.009804 | 78 | 0.616087 | false | 4.167606 | false | false | false |
jitsi/jitsi-meet-torture | scripts/bwe-benchmark.py | 1 | 2681 | #!/usr/bin/env python2.7
#
# Copyright @ 2018 Atlassian Pty Ltd
#
# 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 appli... | apache-2.0 | 8,825,535,057,794,216,000 | 29.816092 | 84 | 0.673629 | false | 3.389381 | false | false | false |
girish946/python3-R305 | R305/Img2Tz.py | 1 | 1693 | from R305 import generateHeader, header, address
identifire = {1:"command packet",
2: "data packet",
7:"acknokedge packet",
8:"end of data packte"}
confirmation_codes = {0:"generate character file complete",
1:"error while reciving packet",
... | gpl-3.0 | -7,288,488,179,427,131,000 | 30.943396 | 78 | 0.544595 | false | 3.59448 | false | false | false |
mahak/neutron | neutron/db/models/metering.py | 2 | 2094 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 | -4,897,133,726,646,996,000 | 42.625 | 79 | 0.660458 | false | 3.980989 | false | false | false |
jcespinosa/EcoGlasses | matchers/FlannMatcher.py | 1 | 5324 | #!/usr/bin/python
########################################################################
# 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... | gpl-3.0 | -4,392,084,372,052,730,400 | 30.317647 | 102 | 0.489669 | false | 3.325422 | false | false | false |
julianhille/mongomock | mongomock/filtering.py | 4 | 5000 | import operator
import re
import warnings
from six import iteritems, string_types
from sentinels import NOTHING
from .helpers import ObjectId, RE_TYPE
def filter_applies(search_filter, document):
"""
This function implements MongoDB's matching strategy over documents in the find() method and other
related... | bsd-3-clause | -6,760,399,167,098,305,000 | 32.333333 | 110 | 0.5694 | false | 3.636364 | false | false | false |
adobe-type-tools/robofont-scripts | Anchors/DeleteAnchors.py | 1 | 2286 | """
Takes in an anchors file plus one (or more) UFOs and deletes
the anchors that match the 'glyph_name<tab>anchor_name' lines.
The anchors' coordinates are ignored.
"""
from __future__ import print_function
import os
import sys
from defcon import Font
def readFile(filePath):
file = open(filePath, 'r')
file... | mit | -1,695,768,402,818,161,700 | 24.4 | 108 | 0.6028 | false | 3.803661 | false | false | false |
theiviaxx/Frog | frog/views/gallery.py | 1 | 13974 | ##################################################################################################
# Copyright (c) 2012 Brett Dixon
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without r... | mit | -9,145,374,737,810,629,000 | 29.378261 | 98 | 0.585659 | false | 4.129433 | false | false | false |
fishilico/shared | python/crypto/rsa_tests.py | 1 | 37061 | #!/usr/bin/env python
# -*- coding:UTF-8 -*-
# Copyright (c) 2017-2018 Nicolas Iooss
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the ri... | mit | 7,971,053,825,885,280,000 | 41.452463 | 118 | 0.595694 | false | 3.262699 | true | false | false |
leihaha/Django-By-Example_demo | bookmarks/images/models.py | 1 | 1137 | from django.db import models
from django.conf import settings
from django.utils.text import slugify
from django.core.urlresolvers import reverse
# Create your models here.
class Image(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL,
related_name='image_created')
ti... | gpl-2.0 | 5,667,697,816,695,402,000 | 36.933333 | 66 | 0.608619 | false | 4.119565 | false | false | false |
ljvmiranda921/pyswarms | tests/backend/conftest.py | 1 | 2113 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Fixtures for tests"""
# Import modules
import numpy as np
import pytest
# Import from pyswarms
# Import from package
from pyswarms.backend.swarms import Swarm
@pytest.fixture
def swarm():
"""A contrived instance of the Swarm class at a certain timestep"""
at... | mit | 2,219,472,515,883,378,400 | 20.13 | 71 | 0.415523 | false | 2.555018 | true | false | false |
croxis/Panda-Core-Technology | NotAsOldPlanet/surface_mesh.py | 1 | 7281 | from panda3d.core import Geom, GeomNode, GeomTriangles, GeomVertexData
from panda3d.core import GeomVertexFormat, GeomVertexWriter
from panda3d.core import Material, NodePath, Shader, Texture, TextureStage
from panda3d.core import VBase4, Vec3
def myNormalize(myVec):
myVec.normalize()
return myVec
format = G... | mit | 6,128,889,123,176,535,000 | 34.004808 | 106 | 0.60912 | false | 3.244652 | false | false | false |
stanfordnqp/spins-b | spins/invdes/problem_graph/creator_function.py | 1 | 2077 | from typing import Callable, Dict, List, Optional, Tuple, Union
import numpy as np
from spins.invdes import problem
from spins.invdes.problem_graph import optplan
from spins.invdes.problem_graph import workspace
@optplan.register_node(optplan.Parameter)
def create_parameter(params: optplan.Parameter,
... | gpl-3.0 | 6,723,279,007,052,739,000 | 36.763636 | 80 | 0.719307 | false | 3.526316 | false | false | false |
hxu/boomerang | setup.py | 1 | 1186 | from setuptools import setup, find_packages
README = open('README.rst').read()
setup(
name="Boomerang",
version='0.1.0',
packages=find_packages(),
description='Boomerang is a toolset for dispatching discrete R processing jobs to Amazon AWS'
'services then automatically returning the re... | mit | -1,593,136,230,562,599,000 | 29.435897 | 103 | 0.594435 | false | 4.220641 | false | false | false |
helixyte/TheLMA | thelma/repositories/rdb/schema/tables/isorequest.py | 1 | 1417 | """
This file is part of the TheLMA (THe Laboratory Management Application) project.
See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.
ISO request table.
"""
from sqlalchemy import CheckConstraint
from sqlalchemy import Column
from sqlalchemy import Integer
from sqlalchemy import String
from... | mit | -2,587,609,158,742,355,000 | 32.738095 | 80 | 0.556104 | false | 4.73913 | false | false | false |
kevinarpe/kevinarpe-rambutan3 | rambutan3/container/frozendict.py | 1 | 1270 |
# Ref: http://code.activestate.com/recipes/414283/
# Ref: http://legacy.python.org/dev/peps/pep-0416/
# noinspection PyPep8Naming
class frozendict(dict):
# noinspection PyMethodParameters,PyPropertyDefinition
@property
def _blocked_attribute(self):
raise AttributeError("A frozendict cannot be mod... | gpl-3.0 | -4,735,051,013,940,872,000 | 30.75 | 108 | 0.602362 | false | 4.006309 | false | false | false |
NaturalHistoryMuseum/ckanext-gbif | setup.py | 1 | 1387 | #!/usr/bin/env python
# encoding: utf-8
#
# This file is part of ckanext-gbif
# Created by the Natural History Museum in London, UK
from setuptools import find_packages, setup
__version__ = '2.0.0'
with open('README.md', 'r') as f:
__long_description__ = f.read()
setup(
name='ckanext-gbif',
version=__ve... | gpl-2.0 | -4,944,065,435,515,866,000 | 29.152174 | 75 | 0.614996 | false | 3.55641 | false | true | false |
sserrot/champion_relationships | venv/Lib/site-packages/prompt_toolkit/key_binding/bindings/basic.py | 1 | 7193 | # pylint: disable=function-redefined
from prompt_toolkit.application.current import get_app
from prompt_toolkit.filters import (
Condition,
emacs_insert_mode,
has_selection,
in_paste_mode,
is_multiline,
vi_insert_mode,
)
from prompt_toolkit.key_binding.key_processor import KeyPress, KeyPressEven... | mit | 2,047,978,954,298,408,400 | 27.543651 | 79 | 0.590574 | false | 3.215467 | false | false | false |
jan25/code_sorted | leetcode/weekly163/3_sum_divisible_threes.py | 1 | 1210 | '''
https://leetcode.com/contest/weekly-contest-163/problems/greatest-sum-divisible-by-three/
'''
class Solution:
def maxSumDivThree(self, nums: List[int]) -> int:
# put nums into sorted remainder buckets
b = [[] for _ in range(3)]
nums.sort()
for n in nums:
b[n % 3].appe... | unlicense | -4,056,663,790,558,266,000 | 32.638889 | 89 | 0.457025 | false | 3.063291 | false | false | false |
Srisai85/scipy | scipy/weave/examples/functional.py | 100 | 2878 | # C:\home\eric\wrk\scipy\weave\examples>python functional.py
# desired: [2, 3, 4]
# actual: [2, 3, 4]
# actual2: [2, 3, 4]
# python speed: 0.039999961853
# SCXX speed: 0.0599999427795
# speed up: 0.666666666667
# c speed: 0.0200001001358
# speed up: 1.99998807913
fr... | bsd-3-clause | 4,146,712,784,523,336,000 | 26.673077 | 78 | 0.52745 | false | 3.226457 | false | false | false |
QualiSystems/vCenterShell | package/cloudshell/tests/test_commands/test_command_orchestrator.py | 1 | 12763 | from unittest import TestCase
from cloudshell.cp.core.models import DeployApp, DeployAppParams, AppResourceInfo, DeployAppDeploymentInfo, DeployAppResult
from freezegun import freeze_time
import jsonpickle
from cloudshell.api.cloudshell_api import ResourceInfo
from cloudshell.cp.vcenter.commands.command_orchestrator ... | apache-2.0 | -2,730,234,429,828,126,700 | 52.62605 | 123 | 0.57698 | false | 4.464148 | true | false | false |
xiangke/pycopia | mibs/pycopia/mibs/CISCO_SWITCH_CGMP_MIB.py | 1 | 4168 | # python
# This file is generated by a program (mib2py). Any edits will be lost.
from pycopia.aid import Enum
import pycopia.SMI.Basetypes
Range = pycopia.SMI.Basetypes.Range
Ranges = pycopia.SMI.Basetypes.Ranges
from pycopia.SMI.Objects import ColumnObject, MacroObject, NotificationObject, RowObject, ScalarObject, N... | lgpl-2.1 | -585,467,105,581,326,600 | 31.061538 | 155 | 0.734405 | false | 2.642993 | false | false | false |
mdworks2016/work_development | Python/10_Second_Python3_Django2/05_Django_BootStrap/djangoApp/djangoApp/forms.py | 1 | 1033 | from django import forms
from django.forms import Form, CharField, URLField,TextInput
class PageForm(Form):
title = CharField(label="title",max_length=256)
description = CharField(label="description",max_length=1024)
href = URLField(label="herf",max_length=2084)
id = CharField()
class FeedForm(Form):
... | apache-2.0 | -3,637,555,251,437,902,300 | 25.864865 | 64 | 0.615307 | false | 3.234528 | false | false | false |
rainest/fluff | wiredness/viewer.py | 1 | 2857 | import analyze
import numpy
import copy
class Viewer(object):
def __init__(self, log, bincount):
self.log = log
self.bincount = bincount
self.bins = numpy.zeros((bincount,1))
self.personBins = self.populate()
def map(self, instant):
"""Return which bin a given instant s... | bsd-2-clause | -5,391,537,094,533,883,000 | 29.72043 | 81 | 0.60098 | false | 3.63949 | false | false | false |
kuza/civhelper-II | civ/forms.py | 1 | 9358 | from django import forms
from django.utils.translation import gettext as _
class RoundForms(forms.Form):
ERAS = (
(0, _('Ancient')),
(1, _('Medieval')),
(2, _('Gunpowder/Industrial')),
(3, _('Modern')),
)
era = forms.ChoiceField(choices=ERAS, label=_('Era'), initial=0, ... | bsd-3-clause | -8,441,988,956,860,932,000 | 64.908451 | 235 | 0.609318 | false | 3.186244 | false | false | false |
eirmag/weboob | weboob/applications/pastoob/pastoob.py | 1 | 3794 | # -*- coding: utf-8 -*-
# Copyright(C) 2011 Laurent Bachelier
#
# This file is part of weboob.
#
# weboob 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 ... | agpl-3.0 | 9,148,512,802,061,839,000 | 31.991304 | 111 | 0.608593 | false | 4.053419 | false | false | false |
francois-contat/scapy | scapy/arch/common.py | 1 | 5030 | # This file is part of Scapy
# See http://www.secdev.org/projects/scapy for more information
# Copyright (C) Philippe Biondi <phil@secdev.org>
# This program is published under a GPLv2 license
"""
Functions common to different architectures
"""
import ctypes
import os
import socket
import struct
import subprocess
imp... | gpl-2.0 | -2,052,628,734,180,068,400 | 27.100559 | 98 | 0.605765 | false | 3.424098 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.