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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MarkWh1te/xueqiu_predict | crawler/stock.py | 1 | 2487 | from flask import Flask
from flask import render_template, request
from utils import Base,engine
from sqlalchemy.orm import scoped_session, sessionmaker
from models import Stock, StockDetail
from flask_bootstrap import Bootstrap
from flask import Blueprint
from flask_paginate import Pagination,get_page_args
from sqlalc... | mit | -7,122,884,169,626,361,000 | 32.608108 | 103 | 0.51347 | false | 4.295337 | false | false | false |
jsilter/scipy | scipy/linalg/special_matrices.py | 1 | 27627 | from __future__ import division, print_function, absolute_import
import math
import numpy as np
from scipy.lib.six import xrange
from scipy.lib.six import string_types
__all__ = ['tri', 'tril', 'triu', 'toeplitz', 'circulant', 'hankel',
'hadamard', 'leslie', 'all_mat', 'kron', 'block_diag', 'companion',
... | bsd-3-clause | 4,770,515,006,507,963,000 | 27.07622 | 79 | 0.508452 | false | 3.246798 | false | false | false |
rthouvenin/meteography | meteography/neighbors.py | 1 | 2176 | # -*- coding: utf-8 -*-
"""
Wrapper around sklearn k-neighbors estimators that can work in batches on
pytables arrays (or other disk-backed arrays that support slicing)
"""
import numpy as np
from sklearn.neighbors import NearestNeighbors as SKNN
from meteography.dataset import PIXEL_TYPE
class NearestNeighbors:
... | mit | 2,629,343,150,644,379,000 | 30.536232 | 78 | 0.554688 | false | 3.410658 | false | false | false |
nickretallack/babel | babel/messages/pofile.py | 1 | 17024 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2011 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software consists... | bsd-3-clause | 6,471,569,443,023,267,000 | 34.101031 | 84 | 0.520266 | false | 4.112077 | false | false | false |
IDNoise/NoiseIDE | NoiseIDEPython/idn_snippet_completer.py | 1 | 1650 | import os
from idn_completer import Completer
import core
import yaml
class SnippetCompleter(Completer):
def __init__(self, stc):
Completer.__init__(self, stc)
self.snippets = []
for path in [os.path.join(core.MainFrame.cwd, "data", "erlang", "ide_snippets.yaml"),
os.... | gpl-2.0 | 3,293,013,052,869,466,000 | 32 | 100 | 0.555152 | false | 3.810624 | false | false | false |
activityhistory/TracesVisualizer | dayview/scripts/extract.py | 1 | 8057 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# TESTING FILE made.by.a.fox. 12.2.15
# Updated by acrule 01.21.16
#FEATURE LIST
# Y connect to db
# Y write to file
# Y Write JSON format
# Accept input date parameter
#KNOWN ISSUES
# 2. no formatting or conversion of datetime stamps
import re
import os
i... | gpl-2.0 | -7,282,651,105,888,489,000 | 32.995781 | 363 | 0.52563 | false | 3.550903 | false | false | false |
solanolabs/rply | rply/parser.py | 1 | 2619 | from rply.errors import ParsingError
class LRParser(object):
def __init__(self, lr_table, error_handler):
self.lr_table = lr_table
self.error_handler = error_handler
def parse(self, tokenizer, state=None):
from rply.token import Token
lookahead = None
lookaheadstack =... | bsd-3-clause | 457,821,966,247,470,600 | 35.887324 | 80 | 0.450554 | false | 5.196429 | false | false | false |
cortesi/pry | libpry/explain.py | 1 | 3089 | """
A module for printing "nice" messages from assertion statements.
"""
import tokenize, parser
class _Wrap:
def __init__(self, *lines):
self.lines = list(lines)
def __call__(self):
if not self.lines:
raise StopIteration
else:
return self.lines.pop(0)
cla... | mit | 6,707,783,616,712,852,000 | 31.861702 | 80 | 0.471997 | false | 4.179973 | false | false | false |
ThomasMarcel/selection-naturelle | user/models.py | 1 | 1507 | import json
import logging
from google.appengine.ext import ndb
from lib import tools
default_permissions = {'reader': 0, 'administrator': 0}
class User(ndb.Model):
username = ndb.StringProperty()
email = ndb.StringProperty()
password=ndb.StringProperty()
first_name = ndb.StringProperty()
last_... | apache-2.0 | -5,442,921,198,355,938,000 | 28 | 75 | 0.624419 | false | 3.924479 | false | false | false |
viz4biz/PyDataNYC2015 | enaml/mpl_canvas.py | 1 | 2532 | #------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-------------------------------------------------... | apache-2.0 | -4,969,528,589,405,369,000 | 31.050633 | 87 | 0.600711 | false | 4.813688 | false | false | false |
LiGhT1EsS/cobra | cobra/scheduler/report.py | 1 | 4364 | # -*- coding: utf-8 -*-
"""
scheduler.report
~~~~~~~~~~~~~~~~
Implements automation report Cobra data
:author: Feei <feei@feei.cn>
:homepage: https://github.com/wufeifei/cobra
:license: MIT, see LICENSE for more details.
:copyright: Copyright (c) 2017 Feei. All rights reserved
"""
i... | mit | 8,891,019,861,325,576,000 | 29.405594 | 139 | 0.548298 | false | 3.844385 | true | false | false |
AlexStarov/Shop | applications/delivery2/migrations/0002_auto_20161124_2123.py | 1 | 4727 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import applications.delivery2.models
class Migration(migrations.Migration):
dependencies = [
('delivery2', '0001_initial'),
]
operations = [
migrations.CreateModel(
name=... | apache-2.0 | -7,083,899,874,331,063,000 | 50.380435 | 213 | 0.609477 | false | 3.357244 | false | false | false |
mammix2/ccoin-dev | contrib/pyminer/pyminer.py | 1 | 6435 | #!/usr/bin/python
#
# Copyright (c) 2011 The Bitcoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
import time
import json
import pprint
import hashlib
import struct
import re
import base64
import httplib
import... | mit | 8,596,083,419,467,708,000 | 24.535714 | 84 | 0.648951 | false | 2.83106 | false | false | false |
John-Lin/invoice-net | website.py | 1 | 1459 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from bottle import route, run, template, view
#from bottle import jinja2_view
from invoice_prize import *
@route('/hello')
def hello():
return "Hello World!"
@route('/invoice')
@view('invoice_template')
def invoive():
(results, date) = get_result()
date = date... | mit | 5,745,852,764,212,994,000 | 27.607843 | 62 | 0.655243 | false | 2.965447 | false | false | false |
jeonghoonkang/BerePi | apps/data.go.kr/get_public_micro_particle.py | 1 | 3613 | # -*- coding: utf-8 -*-
# Author : https://github.com/kmlee408
# https://github.com/jeonghoonkang
'''
부산 URL= http://openapi.airkorea.or.kr/openapi/services/rest/ArpltnInforInqireSvc/getCtprvnRltmMesureDnsty?serviceKey=fCRWi0DoCfoCPMHyDwai3trva10y4qb8mh9aysoHzvLKDWw6Q2bWOsvuM4%2BsRdvE4dPiKqBFD7vj7%2F... | bsd-2-clause | 2,974,692,860,236,816,000 | 36.134146 | 300 | 0.560601 | false | 1.979114 | false | false | false |
rowinggolfer/openmolar2 | src/lib_openmolar/admin/db_orm/admin_teeth_present.py | 1 | 3093 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
## ##
## Copyright 2010-2012, Neil Wallace <neil@openmolar.com> ##
## ... | gpl-3.0 | -1,188,628,920,479,698,700 | 41.369863 | 79 | 0.515681 | false | 4.52193 | false | false | false |
dormouse/read | database/models.py | 1 | 5390 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import datetime
from sqlalchemy import Column, ForeignKey
from sqlalchemy.dialects.sqlite import INTEGER, TEXT, DATETIME, BOOLEAN
from sqlalchemy.orm import column_property, relationship
from sqlalchemy.sql import func
from sqlalchemy import and_
from database.database im... | lgpl-3.0 | 7,813,540,119,064,889,000 | 27.839779 | 79 | 0.615134 | false | 3.536585 | false | false | false |
fengkaicnic/traffic | traffic/crypto.py | 1 | 12797 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | apache-2.0 | -3,505,826,213,502,774,300 | 34.64624 | 79 | 0.616238 | false | 3.684711 | false | false | false |
arpitmathur/CourseAvailabilityChecker | courseCheck.py | 1 | 1898 | __author__ = 'Arpit'
import find
import time
import sys
import gmailer
#initialize datastructures
courses = []
semester = []
email = []
flag = 0
#parse changeme
with open('CHANGEME.txt') as fp:
for line in fp:
if(line[0] == "\n" or line[0] == "#"):
continue
line = line.rstrip()
... | mit | 7,397,628,063,815,961,000 | 27.343284 | 186 | 0.494731 | false | 3.811245 | false | false | false |
argonnexraydetector/RoachFirmPy | Roach2DevelopmentTree/pyfiles/pca.py | 1 | 3520 | import numpy as np
from scipy import linalg
import random as rnd
import matplotlib
import matplotlib.pyplot
'''
execfile('pca.py')
p = pulseTrain(1000)
e = eigens(p)
plot(e['eigenvectors'][0])
plot(e['eigenvectors'][1])
testan(e,2);
'''
print 'running pca.py'
def makePulse(L=100.0,t1=10.0,t2=1.0,a1=1.0,a2=1.... | gpl-2.0 | -1,943,123,093,516,862,700 | 20.469512 | 75 | 0.537216 | false | 3.037101 | false | false | false |
why2pac/dp-tornado | dp_tornado/helper/io/image/__init__.py | 1 | 12413 | # -*- coding: utf-8 -*-
import tempfile
from dp_tornado.engine.helper import Helper as dpHelper
class ImageHelper(dpHelper):
def compare(self, i1, i2, error=0):
i1 = self.load(i1)
i2 = self.load(i2)
if not i1 or not i2:
return None
s1 = i1.size
s2 = i2.size... | mit | 5,356,887,573,378,849,000 | 29.649383 | 118 | 0.498107 | false | 4.183687 | false | false | false |
kgarrison343/recipe-site | polls/views.py | 1 | 1213 | from django.shortcuts import render, get_object_or_404
from django.http import HttpResponse, Http404, HttpResponseRedirect
from django.urls import reverse
from django.views import generic
from .models import Question, Choice
# Create your views here.
class IndexView(generic.ListView):
template_name = 'polls/inde... | mit | -1,490,559,948,873,557,200 | 30.921053 | 82 | 0.693322 | false | 3.912903 | false | false | false |
bobmcwhirter/drools | lib/utility-scripts/docbot-masseur.py | 1 | 2159 | #!/usr/bin/python
#
# This script will flatten out a folder based docbook manual into a docbot friendly "flat" structure
# (and update links in files accordingly)
# Author: Michael Neale
#
import os, sys, shutil
def flatten(root, output) :
if not os.path.isdir(output):
os.mkdir(output)
if not os.pa... | apache-2.0 | 6,316,199,486,616,234,000 | 31.223881 | 123 | 0.552571 | false | 3.628571 | false | false | false |
ristorantino/fiscalberry | Traductores/TraductorFiscal.py | 1 | 7099 | # -*- coding: utf-8 -*-
from Traductores.TraductorInterface import TraductorInterface
import math
class TraductorFiscal(TraductorInterface):
def dailyClose(self, type):
"Comando X o Z"
# cancelar y volver a un estado conocido
self.comando.cancelAnyDocument()
self.comando.start()
... | mit | -7,636,467,503,041,819,000 | 36.539683 | 133 | 0.552361 | false | 3.80633 | false | false | false |
k-j-m/Pyxon | pyxon/decode.py | 1 | 5564 | # Dict of the form:
# { cls: [propname]}
# cls: class that has been written with the @sprop annotation
# propname: name of the property
class_sprops = {}
# Dict of the form:
# {cls: {name:(fn, inv_fn)}}
# cls: class that has been written with @cprop annotations
# name: class attribute name
# fn: function to turn... | mit | 950,680,876,732,445,200 | 28.913978 | 102 | 0.663192 | false | 3.994257 | false | false | false |
twitter/pants | src/python/pants/subsystem/subsystem_client_mixin.py | 1 | 6246 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
from builtins import object
from twitter.common.collections import OrderedSet
from pant... | apache-2.0 | 7,956,763,797,131,338,000 | 36.401198 | 108 | 0.686519 | false | 4.087696 | false | false | false |
AutorestCI/azure-sdk-for-python | azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/virtual_machine_extension_images_operations.py | 1 | 10932 | # 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 | -586,315,393,133,818,900 | 43.620408 | 181 | 0.644621 | false | 4.440292 | true | false | false |
kamailio/kamcli | kamcli/commands/cmd_db.py | 1 | 28309 | import os
import sys
import click
from sqlalchemy import create_engine
from sqlalchemy.sql import text
from sqlalchemy.exc import SQLAlchemyError
from kamcli.cli import pass_context
from kamcli.ioutils import ioutils_dbres_print
from kamcli.ioutils import ioutils_formats_list
from kamcli.dbutils import dbutils_exec_sql... | gpl-2.0 | 5,029,327,672,222,936,000 | 26.863189 | 99 | 0.560528 | false | 3.357329 | true | false | false |
aidin36/beneath-a-binary-sky | src/actions/water_action.py | 1 | 2052 | # This file is part of Beneath a Binary Sky.
# Copyright (C) 2016, Aidin Gharibnavaz <aidin@aidinhut.com>
#
# Beneath a Binary Sky 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
# Lice... | gpl-3.0 | 8,472,158,464,183,048,000 | 35 | 93 | 0.679825 | false | 3.842697 | false | false | false |
mdsalman729/flexpret_project | emulator/concurrit-poplsyntax/concurrit-poplsyntax/bench/pfscan/inputs/in2/config/getpthreadfunctions.py | 1 | 1909 | ##
# getpthreadfunctions.py - outputs the pthread man page to mapthread.txt
# parses the latter, creates a dictionary with pairs
# (functionname, list of function args where last element is result type)
# marshals dictionary to pthreaddict file
#
# Author - Christos Stergiou (chster@eecs.berkeley.edu)
#
import os,re,... | bsd-3-clause | -8,134,398,863,236,522,000 | 33.709091 | 103 | 0.566789 | false | 3.735812 | false | false | false |
henaras/sahara | sahara/service/volumes.py | 1 | 8618 | # 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 | -8,491,081,074,740,166,000 | 34.465021 | 79 | 0.640752 | false | 3.840463 | false | false | false |
niboshi/chainer | chainerx/_docs/routines.py | 1 | 127367 | import chainerx
from chainerx import _docs
def set_docs():
_docs_creation()
_docs_evaluation()
_docs_indexing()
_docs_linalg()
_docs_logic()
_docs_loss()
_docs_manipulation()
_docs_math()
_docs_sorting()
_docs_statistics()
_docs_connection()
_docs_normalization()
_d... | mit | 5,753,944,707,664,617,000 | 31.275539 | 86 | 0.637194 | false | 3.433753 | false | false | false |
jeremiedecock/snippets | python/pygtk/python_gtk3_pygobject/tree_view_cellrender_text_ellipsize.py | 1 | 2818 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org)
"""
This is a simple Python GTK+3 TreeView CellRenderText snippet.
See: http://python-gtk-3-tutorial.readthedocs.org/en/latest/cellrenderers.html#cellrenderertext
"""
from gi.repository import Gtk as gtk
from gi... | mit | -8,133,782,412,095,077,000 | 39.228571 | 188 | 0.620384 | false | 3.537688 | false | false | false |
ikosenn/sms-log-handler | sms_log_handler/sms_handler.py | 1 | 2049 | import datetime
import logging
from typing import Dict
from .utils import import_from_string
class SMSHandler(logging.Handler):
def __init__(self, provider_config: Dict) -> None:
"""
Initializes the SMSHandler
params:
provider_config: The provider configurations.
... | mit | 6,605,223,552,672,128,000 | 33.728814 | 79 | 0.564178 | false | 4.04142 | true | false | false |
QLRace/minqlx-plugins | spec_delay.py | 1 | 2290 | # 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.
"""
Stops people spectating then quickly joining the 'free' team.
This ... | gpl-3.0 | 6,870,827,062,680,719,000 | 41.407407 | 103 | 0.653275 | false | 3.760263 | false | false | false |
cmancone/mygrations | tests/formats/mysql/definitions/test_database.py | 1 | 3304 | import unittest
from mygrations.formats.mysql.file_reader.database import database as database_reader
from mygrations.formats.mysql.file_reader.create_parser import create_parser
class test_database(unittest.TestCase):
def _get_sample_db(self):
strings = [
"""
CREATE TABLE `logs` (... | mit | 6,008,796,254,061,185,000 | 31.07767 | 85 | 0.521186 | false | 3.882491 | true | false | false |
Tsumiki-Chan/Neko-Chan | commands/purge.py | 1 | 1524 | from functions import search, logger
DESC = "Delete x messages"
USAGE="purge [*amount*] [*user* `optional`]"
async def init(bot):
chat=bot.message.channel
try:
if len(bot.args) == 0:
await bot.sendMessage( "Didn't receive any arguments! Usage: {}".format(USAGE))
return False
... | gpl-3.0 | -421,751,238,183,873,100 | 33.636364 | 92 | 0.509186 | false | 3.917738 | false | false | false |
mSOHU/http2 | test/benchmark2.py | 1 | 1422 | # -*- coding: utf-8 -*-
"""
copied from https://github.com/bdarnell/tornado_http2/blob/master/tornado_http2/test/benchmark.py
"""
import time
import logging
from tornado.ioloop import IOLoop
from tornado.options import define, options, parse_command_line, enable_pretty_logging
from http2 import SimpleAsyncHTTP2Cl... | apache-2.0 | -6,296,171,402,591,293,000 | 25.830189 | 97 | 0.658228 | false | 3.22449 | false | false | false |
masasin/advent_of_code_2015 | day_11.py | 1 | 3790 | """
http://adventofcode.com/day/10
--- Day 11: Corporate Policy ---
Santa's previous password expired, and he needs help choosing a new one.
To help him remember his new password after the old one expires, Santa has
devised a method of coming up with a password based on the previous one.
Corporate policy dictates th... | mit | 9,128,645,441,959,390,000 | 31.956522 | 80 | 0.683113 | false | 3.79 | false | false | false |
usc-isi/extra-specs | nova/api/openstack/compute/contrib/quotas.py | 1 | 3875 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/... | apache-2.0 | -5,099,529,885,917,966,000 | 33.598214 | 79 | 0.634065 | false | 4.162191 | false | false | false |
isotoma/alm.solrindex | alm/solrindex/schema.py | 1 | 2814 |
"""Parser of a Solr schema.xml"""
from alm.solrindex.interfaces import ISolrField
from alm.solrindex.interfaces import ISolrFieldHandler
from alm.solrindex.interfaces import ISolrSchema
from elementtree.ElementTree import parse
from zope.component import getUtility
from zope.component import queryUtility
from zope.in... | bsd-3-clause | 2,881,713,634,405,479,000 | 29.586957 | 75 | 0.569652 | false | 3.930168 | false | false | false |
yaukwankiu/armor | tests/modifiedMexicanHatTest5a.py | 1 | 2438 | # supplementing modifiedMexicanHatTest5.py
# outputing the charts, given the results
import numpy as np
import matplotlib.pyplot as plt
from armor import pattern
from armor import defaultParameters as dp
dbz = pattern.DBZ
DS = pattern.DBZstream
dataFolder = dp.root + "labLogs/2014-5-2-modifiedMexicanHatTest5/"
o... | cc0-1.0 | -1,526,503,526,948,186,400 | 38.967213 | 113 | 0.609516 | false | 3.101781 | false | false | false |
matthiaskrgr/cppcheck | addons/naming.py | 1 | 2383 | #!/usr/bin/env python
#
# cppcheck addon for naming conventions
#
# Example usage (variable name must start with lowercase, function name must start with uppercase):
# $ cppcheck --dump path-to-src/
# $ python addons/naming.py --var='[a-z].*' --function='[A-Z].*' path-to-src/*.dump
#
import cppcheckdata
import sys
imp... | gpl-3.0 | -6,974,778,811,751,254,000 | 34.567164 | 116 | 0.5577 | false | 3.849758 | false | false | false |
enthought/traitsgui | enthought/pyface/action/action_item.py | 1 | 4849 | #------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions describe... | bsd-3-clause | 2,791,425,329,490,104,300 | 32.673611 | 79 | 0.541761 | false | 4.849 | false | false | false |
simleo/pydoop-features | pyfeatures/app/deserialize.py | 1 | 2362 | # BEGIN_COPYRIGHT
#
# Copyright (C) 2014-2017 Open Microscopy Environment:
# - University of Dundee
# - CRS4
#
# 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/lice... | apache-2.0 | 2,729,805,358,433,821,700 | 29.675325 | 77 | 0.664691 | false | 3.413295 | false | false | false |
lakshmi-kannan/st2 | st2common/st2common/models/api/action.py | 1 | 24297 | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | apache-2.0 | 578,311,950,099,190,000 | 34.52193 | 100 | 0.503519 | false | 4.886766 | false | false | false |
cagriulas/algorithm-analysis-17 | w3/complexity_graphic.py | 1 | 3297 | import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import random
import time
def maxsubsumOn(vector):
max_ending_here = max_so_far = vector[0]
for x in vector[1:]:
max_ending_here = max(x, max_ending_here + x)
max_so_far = max(max_so_f... | unlicense | -8,398,150,691,713,920,000 | 25.376 | 58 | 0.533374 | false | 3.187621 | false | false | false |
maas/maas | src/maasserver/models/tests/test_filesystemgroup.py | 1 | 104094 | # Copyright 2015-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Tests for `FilesystemGroup`."""
import random
import re
from unittest import skip
from uuid import uuid4
from django.core.exceptions import PermissionDenied, ValidationE... | agpl-3.0 | 4,331,299,812,725,828,600 | 36.123395 | 79 | 0.574106 | false | 3.977456 | true | false | false |
MGEScan/mgescan | mgescan/utils.py | 1 | 1147 | import time
import os, errno
import subprocess as sub
def get_abspath(path):
try:
return os.path.abspath(path)
except:
# print [DEBUG] Failed to convert a path to an absolute path
return path
def create_directory(path, skipifexists=True):
if not os.path.exists(path):
os.mak... | gpl-3.0 | 8,974,377,971,734,298,000 | 25.674419 | 79 | 0.61116 | false | 3.7 | false | false | false |
edineicolli/daruma-exemplo-python | scripts/fiscal/ui_fiscal_icfefetuarpagamentoformatado.py | 1 | 4753 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_fiscal_icfefetuarpagamentoformatado.ui'
#
# Created: Mon Nov 24 22:25:42 2014
# by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
from pydaruma.py... | gpl-2.0 | 5,616,585,045,271,257,000 | 59.164557 | 214 | 0.764149 | false | 3.207152 | false | false | false |
zibawa/zibawa | zibawa/urls.py | 1 | 1400 | """zibawa URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | gpl-3.0 | -6,997,898,641,479,709,000 | 30.111111 | 83 | 0.681429 | false | 3.45679 | false | false | false |
plotly/plotly.py | packages/python/plotly/plotly/validators/_splom.py | 1 | 12883 | import _plotly_utils.basevalidators
class SplomValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="splom", parent_name="", **kwargs):
super(SplomValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
data_clas... | mit | 1,610,731,165,411,505,000 | 48.55 | 70 | 0.54731 | false | 5.084057 | false | false | false |
nakagami/reportlab | src/reportlab/platypus/flowables.py | 1 | 68383 | #Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/flowables.py
__version__=''' $Id: flowables.py 3959 2012-09-27 14:39:39Z robin $ '''
__doc__="""
A flowable is a "floating element" in a docum... | bsd-3-clause | -4,955,683,830,492,444,000 | 35.490395 | 152 | 0.553047 | false | 3.812399 | false | false | false |
stoilov/Programming101 | week3/HackBulgariaAPI/team_matcher.py | 1 | 2715 | import requests
import random
class MatchCourse:
def __init__(self):
self.url = "https://hackbulgaria.com/api/students/"
self.records = []
self.courses = None
def get_info(self):
self.records = requests.get(self.url, verify=False)
if self.records.status_code != 200:
... | mit | -4,352,641,921,128,700,400 | 30.569767 | 82 | 0.539963 | false | 4.12614 | false | false | false |
PnX-SI/GeoNature | backend/geonature/utils/module.py | 1 | 4711 | import os
import sys
from pathlib import Path
from importlib import import_module
from pkg_resources import load_entry_point, get_entry_info, iter_entry_points
from geonature.utils.utilstoml import load_and_validate_toml
from geonature.utils.config_schema import ManifestSchemaProdConf
from geonature.utils.env import G... | gpl-3.0 | 4,306,982,387,413,549,600 | 40.690265 | 120 | 0.680959 | false | 3.738889 | true | false | false |
alexanderfefelov/nav | python/nav/eventengine/topology.py | 1 | 7788 | #
# Copyright (C) 2012 UNINETT
#
# This file is part of Network Administration Visualized (NAV).
#
# NAV is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
# This program is distributed in the hope th... | gpl-2.0 | 4,639,183,928,962,233,000 | 31.45 | 79 | 0.626605 | false | 3.795322 | false | false | false |
MikeLaptev/sandbox_python | mera/unittest_example/generate_and_load_unittest_update_four.py | 1 | 4101 | '''
Created on Jul 30, 2015
@author: Mikhail
'''
import unittest
import re
from json_file_generator import MyOwnJSONProcessing as json_processing
from json_file_generator import __version__ as json_file_generator_version
from unittest.case import skip, skipIf
class GenerateAndLoadJSONTestUpdateFour(unittest.TestCase)... | apache-2.0 | -1,147,400,482,822,408,300 | 50.275 | 214 | 0.683248 | false | 3.890892 | true | false | false |
AutorestCI/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/express_route_circuits_routes_table_list_result.py | 1 | 1252 | # 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 | -8,715,857,573,506,023,000 | 35.823529 | 80 | 0.610224 | false | 4.173333 | false | false | false |
appleseedhq/cortex | python/IECoreScene/RemovePrimitiveVariables.py | 5 | 2937 | ##########################################################################
#
# Copyright (c) 2007-2010, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redis... | bsd-3-clause | 5,771,326,003,735,331,000 | 36.177215 | 102 | 0.677562 | false | 4.338257 | false | false | false |
eJRF/ejrf | questionnaire/migrations/0002_copy_question_text_to_export_label.py | 1 | 25463 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
"Write your forwards methods here."
for question in orm.question.objects.filter(export_label=''):
que... | bsd-3-clause | -352,401,073,382,339,500 | 88.031469 | 195 | 0.571535 | false | 3.747866 | false | false | false |
SaschaMester/delicium | tools/telemetry/telemetry/core/platform/profiler/java_heap_profiler.py | 1 | 3432 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import subprocess
import threading
from telemetry.core.platform import profiler
from telemetry.core import util
from telemetry.inte... | bsd-3-clause | 5,593,076,294,993,118,000 | 34.75 | 76 | 0.666084 | false | 3.734494 | false | false | false |
HaydenFaulkner/phd | tensorflow_code/word2vec_basic.py | 1 | 11354 | # Copyright 2015 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... | mit | 5,478,328,674,893,871,000 | 39.123675 | 91 | 0.59239 | false | 3.999296 | false | false | false |
jacob-meacham/chain-cli | chain/cli.py | 1 | 4526 | """CLI for chain.
This module is not intended to be used programmatically - if this is something you want, use chain.client instead.
"""
import click
from termcolor import colored
from chain.chain import ChainClient, Frequency, NoChainExistsException, ChainExistsException
# No docstrings for this file, as the functi... | mit | -6,670,421,807,501,067,000 | 35.208 | 114 | 0.67057 | false | 3.606375 | false | false | false |
DiCarloLab-Delft/PycQED_py3 | pycqed/analysis_v2/randomized_benchmarking_analysis.py | 1 | 94884 | import lmfit
from uncertainties import ufloat
import pandas as pd
from copy import deepcopy
from pycqed.analysis import analysis_toolbox as a_tools
from collections import OrderedDict
from pycqed.analysis import measurement_analysis as ma_old
import pycqed.analysis_v2.base_analysis as ba
import numpy as np
import loggi... | mit | 681,477,638,738,316,000 | 35.15968 | 88 | 0.494314 | false | 3.157294 | false | false | false |
mathstuf/ranger | ranger/gui/widgets/taskview.py | 1 | 2838 | # Copyright (C) 2009-2013 Roman Zimbelmann <hut@hut.pm>
# This software is distributed under the terms of the GNU GPL version 3.
"""The TaskView allows you to modify what the loader is doing."""
from . import Widget
from ranger.ext.accumulator import Accumulator
class TaskView(Widget, Accumulator):
old_lst = No... | gpl-3.0 | 602,735,406,371,060,500 | 29.516129 | 75 | 0.471811 | false | 3.789052 | false | false | false |
altsen/diandiyun-platform | common/lib/xmodule/xmodule/html_module.py | 1 | 11807 | import copy
from fs.errors import ResourceNotFoundError
import logging
import os
import sys
from lxml import etree
from path import path
from pkg_resources import resource_string
from xblock.fields import Scope, String, Boolean, List
from xmodule.editing_module import EditingDescriptor
from xmodule.html_checker import... | agpl-3.0 | -4,910,680,462,322,662,000 | 35.329231 | 123 | 0.621665 | false | 4.247122 | false | false | false |
euphi/homie-esp8266 | scripts/ota_updater/ota_updater.py | 1 | 6619 | #!/usr/bin/env python
from __future__ import division, print_function
import paho.mqtt.client as mqtt
import base64, sys, math
from hashlib import md5
# The callback for when the client receives a CONNACK response from the server.
def on_connect(client, userdata, flags, rc):
if rc != 0:
print("Connection ... | mit | 6,659,864,722,361,300,000 | 41.703226 | 109 | 0.610666 | false | 4.162893 | false | false | false |
Saluev/cocos2d-gui | cocosgui/css/__init__.py | 1 | 2523 | __all__ = [
'styles', 'Style', 'CSSNode',
'evaluate'
]
# importing basic names to publish them
from .style import styles, Style
from .node import CSSNode
# importing extensions
import border, borderimage, background, font
import rendering
def evaluate(window, element = None):
if element is None:
element = w... | mit | -5,700,135,919,683,113,000 | 29.768293 | 70 | 0.613555 | false | 3.337302 | false | false | false |
pclubuiet/website | home/views.py | 1 | 3396 | from django import views
from django.shortcuts import render, get_object_or_404
from django.views.generic import TemplateView
from django.views.generic.edit import CreateView
from .models import *
from .forms import *
import requests
import http
from django.urls import reverse_lazy
from django.views.decorators.csrf imp... | gpl-3.0 | -1,718,221,211,592,258,300 | 38.045977 | 170 | 0.620436 | false | 3.876712 | false | false | false |
brain-research/acai | lib/eval.py | 1 | 4490 | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 3,405,448,565,287,546,400 | 39.089286 | 79 | 0.688641 | false | 3.824532 | false | false | false |
bklakew/OpenAgClassifier | src/model/server.py | 1 | 6199 | """
# Copyright 2017 Foundation Center. All Rights Reserved.
#
# Licensed under the Foundation Center Public License, Version 1.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://gis.foundationcenter.org/licenses/LICENSE-... | mpl-2.0 | 8,984,252,178,927,677,000 | 33.786127 | 116 | 0.581812 | false | 3.591067 | false | false | false |
snipsco/snipsskills | snipsmanager/commands/setup/systemd/snipsmanager.py | 1 | 1887 | # -*-: coding utf-8 -*-
import os
import time
from ...base import Base
from ....utils.os_helpers import is_raspi_os, which
from ....utils.systemd import Systemd
from .... import DEFAULT_SNIPSFILE_PATH
from snipsmanagercore import pretty_printer as pp
class SystemdSnipsManagerException(Exception):
pass
class ... | mit | 9,124,192,898,552,893,000 | 36 | 185 | 0.711182 | false | 3.614943 | false | false | false |
haricot/djangocms-bs4forcascade | cmsplugin_bs4forcascade/bootstrap4/utils.py | 1 | 11099 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
from collections import OrderedDict
from django.forms import widgets
from cmsplugin_cascade import app_settings
from cmsplugin_cascade.plugin_base import CascadePluginBase
from cmsplugin_cascade.utils import compute_aspect_ratio, get_image... | mit | -605,115,729,172,687,700 | 45.422594 | 142 | 0.605588 | false | 3.688497 | false | false | false |
lcpt/xc | verif/tests/elements/shell/test_shell_mitc4_11.py | 1 | 3573 | # -*- coding: utf-8 -*-
''' Taken from example 2-005 of the SAP 2000 verification manual.'''
# The obtained error is near 1.8% it can be the aspect ratio
# of the element. See comments on page EXAMPLE 2-005 - 7
# in the SAP 2000 manual.
__author__= "Luis C. Pérez Tato (LCPT) and Ana Ortega (AOO)"
__copyright__= "Copyr... | gpl-3.0 | -1,432,100,207,234,984,400 | 26.060606 | 96 | 0.755879 | false | 2.710167 | false | false | false |
pdelsante/thug | thug/Analysis/virustotal/VirusTotal.py | 1 | 3786 | #!/usr/bin/env python
#
# VirusTotal.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY... | gpl-2.0 | 2,766,726,902,379,941,000 | 30.084746 | 107 | 0.591125 | false | 3.935551 | true | false | false |
vidartf/hyperspyUI | hyperspyui/uiprogressbar.py | 1 | 10235 | # -*- coding: utf-8 -*-
# Copyright 2014-2016 The HyperSpyUI developers
#
# This file is part of HyperSpyUI.
#
# HyperSpyUI 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
#... | gpl-3.0 | -3,904,834,961,505,757,700 | 34.538194 | 82 | 0.557792 | false | 4.311289 | false | false | false |
umax/diabetto2 | category/views.py | 1 | 1429 | # -*- coding: utf-8 -*-
from django.core.urlresolvers import reverse_lazy
from django.views.generic import (ListView, DetailView, CreateView,
DeleteView, UpdateView)
from . import forms
from . import models
__all__ = (
'CategoryIndexView',
'CategoryDetailView',
'Category... | gpl-2.0 | 5,028,435,370,511,008,000 | 25.962264 | 73 | 0.69909 | false | 3.99162 | false | false | false |
papedaniel/oioioi | oioioi/contests/handlers.py | 1 | 4452 | import json
import logging
import traceback
import pprint
import socket
import time
from smtplib import SMTPException
from django.core.mail import mail_admins
from django.db import transaction
from oioioi.contests.models import Contest, ProblemInstance, Submission, \
SubmissionReport, FailureReport
logger = lo... | gpl-3.0 | 4,431,240,814,176,651,300 | 29.703448 | 75 | 0.66442 | false | 3.964381 | true | false | false |
joaormatos/anaconda | mmfparser/data/checksum.py | 1 | 2357 | # Copyright (c) Mathias Kaerlev 2012.
# This file is part of Anaconda.
# Anaconda is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# ... | gpl-3.0 | 1,744,356,720,394,358,800 | 29.230769 | 83 | 0.647857 | false | 3.481536 | false | false | false |
mdraeger/gmapcatcher | gmapcatcher/widgets/widComboBoxEntry.py | 1 | 4319 | # -*- coding: utf-8 -*-
## @package gmapcatcher.widgets.widComboBoxEntry
# ComboBoxEntry widget used to collect data to search
import gtk
import re
from gmapcatcher.mapConst import *
## This widget is where we collect data to search
class ComboBoxEntry(gtk.ComboBoxEntry):
DEFAULT_TEXT = "Enter location here!"
... | gpl-2.0 | -1,651,217,596,343,355,100 | 38.623853 | 87 | 0.634869 | false | 3.772052 | false | false | false |
Som-Energia/somenergia-tomatic | tomatic_sandbox.py | 1 | 2204 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import click
import re
from consolemsg import warn, step, error, u
from datetime import datetime, timedelta
from shutil import copyfile
from pathlib import Path
from slugify import slugify
@click.command()
@click.help_option()
@click.option('-d', '--description',
hel... | gpl-3.0 | 4,193,262,625,800,079,000 | 31.411765 | 89 | 0.635662 | false | 3.8 | false | false | false |
kain88-de/mdanalysis | testsuite/MDAnalysisTests/test_failure.py | 1 | 1352 | # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# MDAnalysis --- http://www.mdanalysis.org
# Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
... | gpl-2.0 | 7,582,456,156,020,400,000 | 39.969697 | 79 | 0.701923 | false | 2.913793 | false | false | false |
hooram/ownphotos-backend | densecap/webcam/server2.py | 1 | 3086 | import argparse, random, os, time, json
from PIL import Image
from io import BytesIO
import base64
from flask import Flask, request
from flask.ext.cors import CORS
from flask_restful import Resource, Api
import ipdb
app = Flask(__name__)
app.config['DEBUG'] = True
ext2conttype2 = {
"jpg": "JPEG",
"jpeg": ... | mit | 3,539,640,382,857,798,700 | 25.152542 | 80 | 0.602722 | false | 3.269068 | false | false | false |
asntech/jaspar | portal/migrations/0002_auto_20170617_1217.py | 1 | 1491 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-06-17 12:17
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependenc... | bsd-3-clause | 3,353,032,720,810,922,000 | 35.365854 | 155 | 0.574782 | false | 4.26 | false | false | false |
gwind/YWeb | yweb/yweb/utils/translation/trans_real.py | 1 | 25606 | """Translation helper functions."""
from __future__ import unicode_literals
import locale
import os
import re
import sys
import gettext as gettext_module
from threading import local
import warnings
from yweb.utils.importlib import import_module
from yweb.utils.datastructures import SortedDict
from yweb.utils.encoding... | mit | 615,606,380,099,209,600 | 36.878698 | 143 | 0.573772 | false | 4.257732 | false | false | false |
john123951/SmartQQBot | MsgHandler.py | 1 | 6793 | # -*- coding: utf-8 -*-
# Code by Yinzo: https://github.com/Yinzo
# Origin repository: https://github.com/Yinzo/SmartQQBot
from Group import *
from Pm import *
from Sess import *
import threading
logging.basicConfig(
filename='smartqq.log',
level=logging.DEBUG,
format='%(asctime)s %(filename)s... | gpl-3.0 | -3,575,861,079,491,298,300 | 37.962733 | 109 | 0.545194 | false | 3.211982 | false | false | false |
zemon1/CrawfoSys | weather.py | 1 | 2138 | #!/usr/bin/env python2
#weather.py
#Original author: Josh McSavaney (mcsaucy@csh.rit.edu)
#Current maintainer: Jeff Haak (zemon1@csh.rit.edu)
#A script used to scrape and parse weather information
import urllib, re, argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Gets weather inf... | apache-2.0 | -8,801,125,068,099,630,000 | 25.395062 | 86 | 0.546305 | false | 3.522241 | false | false | false |
EachenKuang/PythonRepository | MedicineSCI/Tools/Dao.py | 1 | 1155 | # -*- coding: utf-8 -*-
import pymssql
class Dao:
def __init__(self):
self.conn = None
self.cur = None
def connect(self):
# 数据库连接信息
self.conn = pymssql.connect(host="localhost:59318", user="eachen", password="123456", database="mydata",
cha... | apache-2.0 | -7,258,135,829,876,773,000 | 23.795455 | 112 | 0.507791 | false | 3.420063 | false | false | false |
skycucumber/Messaging-Gateway | src/Command/HeartBeat.py | 1 | 1072 | '''
Created on 2013-8-12
@author: E525649
'''
from BaseCommand import CBaseCommand
from twisted.internet import threads
import BaseCommand
from DB import SBDB
class CHeartBeat(CBaseCommand):
'''
classdocs
'''
command_id=0x00000002
def __init__(self,data=None,protocol=None):
... | gpl-2.0 | -7,245,791,321,416,922,000 | 29.529412 | 137 | 0.60541 | false | 4.060606 | false | false | false |
martinggww/lucasenlights | MachineLearning/sklearn/mrjbq7-ta-lib-c553531/setup.py | 1 | 3712 | #!/usr/bin/env python
import sys
import os
import warnings
from distutils.dist import Distribution
display_option_names = Distribution.display_option_names + ['help', 'help-commands']
query_only = any('--' + opt in sys.argv for opt in display_option_names) or len(sys.argv) < 2 or sys.argv[1] == 'egg_info'
# Use set... | cc0-1.0 | -1,881,101,097,156,988,400 | 28.935484 | 122 | 0.60695 | false | 3.632094 | false | false | false |
endreszabo/pdnsapp | dns.py | 1 | 6190 | #!/usr/bin/env python
from sys import exit, stdin, stderr, argv, stdout
from inspect import stack
from config import *
import os
import csv
CONT=0
FINAL=1
default_ttl=60
loglevel=3
class istr(str):
def __eq__(self, text):
return str.__eq__(self.lower(), text.lower())
class qname(istr):
def __new__(c... | gpl-2.0 | 1,141,596,529,849,517,300 | 30.907216 | 137 | 0.485784 | false | 3.912769 | false | false | false |
nixingyang/Kaggle-Competitions | Face Verification/Extra/Cross Validation/Cross_Validation.py | 1 | 5595 | from joblib import Parallel, delayed
from sklearn.cross_validation import KFold
import numpy as np
import prepare_data
import pylab
import solution_basic
def inspect_final_data_set_without_labels(image_index_list, seed):
np.random.seed(seed)
image_index_array = np.array(image_index_list)
# Cross Validati... | mit | -2,729,778,496,074,134,000 | 36.3 | 143 | 0.611796 | false | 3.67367 | false | false | false |
DMSalesman/Nemris | modules/pkgutils.py | 1 | 3330 | """Module with functions for management of installed APK lists."""
import glob
import re
import subprocess
import apkutils # needed for AndroidManifest.xml dump
import utils # needed for sudo
# Creates a APK/path dictionary to avoid the sluggish "pm path"
def create_pkgdict():
"""Creates a dict for fast pa... | unlicense | -4,136,320,089,613,756,400 | 30.714286 | 194 | 0.606607 | false | 3.671444 | false | false | false |
zhongwcool/Muzei | web/handlers/backroomarthelper.py | 1 | 6229 | # Copyright 2014 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 or agreed to in writing, ... | apache-2.0 | 525,997,306,480,910,340 | 33.798883 | 98 | 0.67266 | false | 3.227461 | false | false | false |
realgam3/SubtitlesClient | SubtitlesClient.py | 1 | 3702 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
########################################################
# Name: Subtitles Client
# Site: http://RealGame.co.il
__author__ = 'RealGame (Tomer Zait)'
__license__ = 'GPL v3'
__version__ = '1.0'
__email__ = 'realgam3@gmail.com'
###################################################... | gpl-3.0 | 1,652,222,305,396,797,700 | 36.77551 | 118 | 0.537007 | false | 4.081588 | false | false | false |
eReuse/DeviceHub | ereuse_devicehub/resources/account/settings.py | 1 | 5490 | from ereuse_devicehub.resources.account.role import Role
from ereuse_devicehub.resources.resource import ResourceSettings
from ereuse_devicehub.resources.schema import Thing
from ereuse_devicehub.security.perms import DB_PERMS
from ereuse_devicehub.validation.validation import ALLOWED_WRITE_ROLE
class Account(Thing):... | agpl-3.0 | 5,062,361,657,323,126,000 | 32.680982 | 117 | 0.532058 | false | 4.184451 | false | false | false |
codedsk/hubcheck | hubcheck/pageobjects/widgets/groups_wiki_edit_form.py | 1 | 3453 | from hubcheck.pageobjects.widgets.groups_wiki_new_form import \
GroupsWikiNewForm1, GroupsWikiNewForm1_Locators_Base, \
GroupsWikiNewForm2, GroupsWikiNewForm2_Locators_Base, \
GroupsWikiNewForm3, GroupsWikiNewForm3_Locators_Base
from hubcheck.pageobjects.basepageelement import Link
class GroupsWikiEditFor... | mit | 2,063,670,874,993,383,400 | 27.073171 | 84 | 0.660875 | false | 4.015116 | false | false | false |
couchbaselabs/devguide-examples | python/cas.py | 1 | 1612 | from __future__ import print_function
from couchbase.bucket import Bucket
from couchbase.bucket import LOCKMODE_WAIT
from threading import Thread
from couchbase.exceptions import KeyExistsError
cb = Bucket('couchbase://10.0.0.31/default', lockmode=LOCKMODE_WAIT)
cb.upsert('a_list', [])
print('Will attempt concurr... | apache-2.0 | 2,503,954,480,258,937,300 | 26.322034 | 76 | 0.653226 | false | 3.192079 | false | false | false |
tanonev/codewebs | src/dataBaseTools/PrecomputeNN.py | 1 | 3695 | import sys
import os.path
sys.path.append(os.path.abspath('../../'))
sys.path.append(os.path.abspath('../../site/cwsite'))
import src.util.DBSetup
from src.util.MLClass import MLClass
from src.util.FileSystem import FileSystem
from src.util.AstNetwork import AstNetwork
from src.util.Assignment import Assignment
from m... | mit | -6,443,573,087,008,330,000 | 35.584158 | 89 | 0.540731 | false | 3.724798 | false | false | false |
zandao/stn3270 | stn3270/field.py | 1 | 1639 | # -*- coding: utf-8 -*-
"""
******************
Super TN3270 Field
******************
Super TN3270 Field - stn3270.field - implements the field
manipulation on a 3270 virtual screen: read, write, verify
and find fields.
"""
class Field:
"""It's a representation of a 3270 field, with a *start of field* sequence,
... | lgpl-2.1 | -6,518,581,165,051,224,000 | 31.78 | 92 | 0.597315 | false | 3.602198 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.