repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apyrgio/synnefo | snf-astakos-app/astakos/api/util.py | 6 | 6738 | # Copyright (C) 2010-2014 GRNET S.A.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed i... | gpl-3.0 | 8,798,754,084,800,237,000 | 29.627273 | 79 | 0.667112 | false | 4.020286 | false | false | false |
nieklinnenbank/bouwer | source/bouwer/plugins/ProgressBar.py | 1 | 2841 | #
# Copyright (C) 2012 Niek Linnenbank
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed... | gpl-3.0 | 2,782,745,559,287,731,700 | 33.646341 | 107 | 0.583597 | false | 4.184094 | false | false | false |
sandersnewmedia/django-fogbugz-gadget | django_fogbugz_gadget/utils.py | 1 | 3182 | from django.conf import settings
from django.core import exceptions
from django.core.cache import cache
from pyquery import PyQuery as pq
from urllib2 import HTTPError, URLError, Request, urlopen, quote
from urllib import urlencode
conf = {}
class GadgetError(Exception):
def __init__(self, msg):
self.msg... | mit | -7,714,947,979,779,037,000 | 24.66129 | 87 | 0.59868 | false | 3.885226 | false | false | false |
CBien/django-alert | alert/migrations/0001_initial.py | 1 | 7531 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Alert'
db.create_table('alert_alert', (
('id', self.gf('django.db.models.field... | mit | -2,943,198,966,531,534,000 | 65.061404 | 182 | 0.573895 | false | 3.792044 | false | false | false |
BirkbeckCTP/janeway | src/journal/migrations/0001_initial.py | 1 | 7158 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2017-07-11 12:03
from __future__ import unicode_literals
import django.core.files.storage
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import journal.models
class Migration(migrations.Migration):
in... | agpl-3.0 | -4,119,311,126,828,057,000 | 54.921875 | 236 | 0.593043 | false | 4.359318 | false | false | false |
zillolo/vsut-python | vsut/unit.py | 1 | 2431 | from collections import namedtuple
from enum import Enum
from math import floor, log10
from sys import stdout
from time import clock
from vsut.assertion import AssertResult
class Unit():
"""A unit is a group of tests, that are run at once.
Every method of this class, that starts with 'test' will be run autom... | mit | -6,015,725,794,670,264,000 | 32.763889 | 127 | 0.547923 | false | 4.881526 | true | false | false |
bavardage/statsmodels | statsmodels/genmod/families/family.py | 4 | 36622 | '''
The one parameter exponential family distributions used by GLM.
'''
#TODO: quasi, quasibinomial, quasipoisson
#see http://www.biostat.jhsph.edu/~qli/biostatistics_r_doc/library/stats/html/family.html
# for comparison to R, and McCullagh and Nelder
import numpy as np
from scipy import special
from scipy.stats impor... | bsd-3-clause | -8,825,799,312,798,299,000 | 28.321057 | 107 | 0.547922 | false | 4.00153 | false | false | false |
udoyen/pythonlearning | 1-35/ex26.py | 1 | 2284 | def break_words(stuff):
"""This function will break up words for us."""
words = stuff.split(' ')
return words
def sort_words(words):
"""Sorts the words."""
return sorted(words)
def print_first_word(words):
"""Prints the first word after popping it off."""
word = words.pop(0)
print word... | mit | -921,647,685,885,816,600 | 23.826087 | 83 | 0.681699 | false | 3.212377 | false | false | false |
FrederichRiver/neutrino | applications/saturn/saturn/dev.py | 1 | 12577 | #!/usr/bin/python3
from abc import ABCMeta, abstractmethod
from venus.stock_base import StockEventBase, StockBase
from venus import stock_base
import pandas
import datetime
import numpy as np
from jupiter.utils import TIME_FMT
"""
趋势跟踪法
所有的择时法,最终都输出一个stock list
所有的风控,都实时输出signal
所有的选股法,最终也输出一个stock list
1.当90日线位于250日线... | bsd-3-clause | 7,995,254,481,442,483,000 | 29.328431 | 112 | 0.58466 | false | 3.477515 | false | false | false |
KleeTaurus/luojilab_toolbox | llt/url.py | 1 | 1642 | # -*- coding: utf-8 -*-
from urlparse import urlparse, urlunparse
import hashlib
from .utils import smart_str
def format_url(params):
"""
将字典对象转换为url字符串(采用utf8编码)
:param params: 字典对象
:return: url字符串
"""
return '&'.join(['%s=%s' % (smart_str(k), smart_str(params[k])) for k in sorted(params)])
... | apache-2.0 | 7,041,231,253,622,957,000 | 24.672727 | 94 | 0.623938 | false | 2.430293 | false | false | false |
kjagoo/wger_stark | wger/utils/resources.py | 2 | 1338 | # This file is part of wger Workout Manager.
#
# wger Workout Manager is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# wger W... | agpl-3.0 | -4,364,026,597,023,908,000 | 35.162162 | 78 | 0.7287 | false | 4.52027 | false | false | false |
quasipedia/googios | googios/calendars.py | 1 | 3716 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
'''
Interface with Google calendar service.
The module should really be called "calendar", not "calendars", but due to how
[poorly] imports are done by Google python API, that would generate an name
conflict.
'''
import datetime
from collections import namedtuple
from ut... | gpl-3.0 | 1,010,868,637,582,418,600 | 35.07767 | 79 | 0.593918 | false | 4.070099 | false | false | false |
samfu1994/cs838webpage | code/read.py | 1 | 4816 | import re
import csv
from os import listdir
from os.path import isfile, join
from extra_neg import extra_negative_instances
def hasNumbers(inputString):
return any(char.isdigit() for char in inputString)
def main():
mypath = "/Users/fuhao/Development/cs838webpage/textFile/"
files = [f for f in listdir(mypath) if ... | mit | 9,044,423,941,146,742,000 | 34.153285 | 150 | 0.557724 | false | 2.771001 | false | false | false |
openprocurement/openprocurement.buildout | aws_startup.py | 1 | 1609 | import argparse
import urlparse
import os
import ConfigParser
import subprocess
from requests import Session
ZONE_TO_ID = {
'eu-west-1a': 'a',
'eu-west-1b': 'b',
'eu-west-1c': 'c'
}
cur_dir = os.path.dirname(__file__)
parser = argparse.ArgumentParser(description='------ AWS Startup Script ------')
parser.... | apache-2.0 | -726,926,914,793,573,000 | 34.755556 | 90 | 0.585457 | false | 3.490239 | true | false | false |
odoo-arg/odoo_l10n_ar | l10n_ar_account_payment/__manifest__.py | 1 | 1740 | # -*- coding: utf-8 -*-
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the L... | agpl-3.0 | 6,252,213,929,818,221,000 | 27.52459 | 78 | 0.572989 | false | 3.892617 | false | false | false |
lmotta/gimpselectionfeature_plugin | json2html.py | 1 | 1475 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
Name : Json2HTML
Description : Function to get dictionary(json) and create HTML how a list
Date : June, 2018
copyright : (C) 2018 by Luiz Motta
email ... | gpl-2.0 | -8,841,037,792,462,765,000 | 45.09375 | 82 | 0.360678 | false | 5.363636 | false | false | false |
Eppie/sse-popcount | scripts/report.py | 1 | 6707 | import os
import os.path
import data
from table import Table
from codecs import open
from collections import OrderedDict
TIME_PATTERN = '%0.5f'
class Report(object):
def __init__(self, options):
self.options = options
with open(options.input, 'rt') as f:
self.data = data.ExperimentDa... | bsd-2-clause | -4,509,866,872,130,011,600 | 24.697318 | 86 | 0.513642 | false | 3.931419 | false | false | false |
COSMOGRAIL/COSMOULINE | pipe/5_pymcs_psf_scripts/2b_facult_applymasks_NU.py | 1 | 2336 | # We look for the ds9 region files, read them, and mask corresponding regions in the sigma images.
execfile("../config.py")
from kirbybase import KirbyBase, KBError
from variousfct import *
import cosmics # used to read and write the fits files
import ds9reg
import glob
import numpy as np
import star
psfstars = star.... | gpl-3.0 | -2,536,765,267,724,173,000 | 29.337662 | 148 | 0.679366 | false | 2.956962 | false | false | false |
ErasRasmuson/LA | LogPrep/LogPrep.py | 1 | 15749 | # -*- coding: cp1252 -*-
"""
###############################################################################
HEADER: LogPrep.py
AUTHOR: Esa Heikkinen
DATE: 24.10.2014
DOCUMENT: -
VERSION: "$Id$"
REFERENCES: -
PURPOSE:
CHANGES: "$Log$"
########################################################... | gpl-3.0 | -3,477,721,811,518,574,000 | 29.462282 | 139 | 0.621246 | false | 2.838681 | false | false | false |
dnguyen0304/mfit_service | mfit/mfit/__init__.py | 2 | 3612 | # -*- coding: utf-8 -*-
import datetime
import json
import logging.config
import os
import pytz
import redis
from . import protos
from . import enumerations
from . import models
__all__ = ['configuration', 'enumerations', 'models', 'protos']
def get_configuration(application_name):
configuration_file_path = ... | mit | -3,276,830,519,192,619,000 | 27.440945 | 77 | 0.63732 | false | 4.067568 | true | false | false |
eng-tools/sfsimodels | docs/conf.py | 1 | 6217 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# sfsimodels documentation build configuration file, created by
# sphinx-quickstart on Wed May 23 10:38:42 2018.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
#... | mit | -3,832,521,086,501,274,600 | 29.47549 | 106 | 0.671707 | false | 3.807103 | true | false | false |
a10networks/a10sdk-python | a10sdk/core/slb/slb_server_port_stats.py | 2 | 6162 | from a10sdk.common.A10BaseClass import A10BaseClass
class Stats(A10BaseClass):
"""This class does not support CRUD Operations please use parent.
:param es_resp_invalid_http: {"description": "Total non-http response", "format": "counter", "type": "number", "oid": "19", "optional": true, "size": "8"}
... | apache-2.0 | -7,141,457,283,060,898,000 | 56.588785 | 209 | 0.591366 | false | 3.352557 | false | false | false |
dahakawang/svn-helper | common.py | 1 | 4418 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import types
import sys
from subprocess import call
from tempfile import NamedTemporaryFile
from abc import ABCMeta, abstractmethod
class STYLE:
NORMAL = "NORMAL"
BOLD = "BOLD"
UNDERLINE = "UNDERLINE"
class ANSICOLOR:
BLACK = "BLACK"
RED = "RED"
G... | mit | 2,177,035,599,657,675,500 | 25.878049 | 70 | 0.508621 | false | 3.697987 | false | false | false |
sminez/ripl | ripl/prelude.py | 1 | 4320 | '''
Common LISPy / Haskelly functions to use inside RIPL
Std Lib Functional stuff:
https://docs.python.org/3.4/library/itertools.html
https://docs.python.org/3.4/library/functools.html
https://docs.python.org/3.4/library/operator.html
Some info on what haskell does:
https://wiki.haskell.org/Fold
http://learnyouahaske... | gpl-3.0 | 4,372,563,448,669,054,500 | 24.714286 | 73 | 0.590972 | false | 3.461538 | false | false | false |
MikeTheGreat/GLT | glt/Constants.py | 1 | 1906 | """File contains constants (like EnvOptions)"""
from enum import Enum
INSTRUCTOR_FEEDBACK_TAG_MSG = "Tag left here so the instructor's scripts know when feedback was uploaded"
class EnvOptions(str, Enum):
"""This lists the keys for the rcfile and command line arguments.
Note that this is a 'mix-in' enum, whi... | gpl-3.0 | 6,785,624,960,861,628,000 | 29.741935 | 105 | 0.680483 | false | 3.497248 | false | false | false |
resmo/ansible | lib/ansible/modules/network/check_point/cp_mgmt_run_script.py | 20 | 2681 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Ansible module to manage Check Point Firewall (c) 2019
#
# Ansible 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 o... | gpl-3.0 | -5,036,465,472,737,189,000 | 25.81 | 118 | 0.680343 | false | 3.852011 | false | false | false |
fishroot/nemoa | nemoa/base/env.py | 1 | 24590 | # -*- coding: utf-8 -*-
"""Environmentan information and functions for filesystem operations.
.. References:
.. _appdirs:
http://github.com/ActiveState/appdirs
.. TODO::
* Add get_file for 'user_package_log', 'temp_log' etc.
"""
__author__ = 'Patrick Michl'
__email__ = 'frootlab@gmail.com'
__license__ = 'GP... | gpl-3.0 | 3,866,459,277,916,991,000 | 32.224324 | 80 | 0.647238 | false | 4.324714 | false | false | false |
blckshrk/Weboob | weboob/applications/webcontentedit/webcontentedit.py | 1 | 6946 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Romain Bignon
#
# 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 | 7,499,032,155,930,786,000 | 35.366492 | 133 | 0.547653 | false | 4.295609 | false | false | false |
fbradyirl/home-assistant | tests/components/history_graph/test_init.py | 4 | 1171 | """The tests the Graph component."""
import unittest
from homeassistant.setup import setup_component
from tests.common import init_recorder_component, get_test_home_assistant
class TestGraph(unittest.TestCase):
"""Test the Google component."""
def setUp(self): # pylint: disable=invalid-name
"""Set... | apache-2.0 | -1,391,276,814,122,048,000 | 31.527778 | 88 | 0.611443 | false | 4.010274 | true | false | false |
timkofu/gitstars | stars/models.py | 1 | 1223 |
from django.db import models
class ProgrammingLanguage(models.Model):
name = models.CharField(max_length=64)
def __str__(self):
return self.name
class Meta:
indexes = [models.Index(fields=['name'])]
verbose_name_plural = "Programming Languages"
class Project(models.Model):
... | mit | -5,217,552,569,242,024,000 | 26.795455 | 78 | 0.604252 | false | 3.845912 | false | false | false |
chop-dbhi/prov-extractor | prov_extractor/sources/filesystem.py | 1 | 3692 | import os
import fnmatch
from datetime import datetime
from . import base
DATETIME_FORMAT = '%Y-%m-%dT%H:%M:%S'
class Client(base.Client):
name = 'Directory'
description = '''
Generator for a filesystem.
'''
options = {
'required': ['path'],
'properties': {
'pa... | bsd-2-clause | 3,052,093,645,219,340,000 | 29.262295 | 97 | 0.489166 | false | 4.541205 | false | false | false |
bcso/351SYDE | neko.py | 1 | 2216 | from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
from math import tan, cos, sin, pi
from scipy.integrate import odeint, simps, cumtrapz
##############
## y0 = yk
## y1 = theta
## y2 = px
## y3 = py
##############
def model(y, t):
yk, theta, vx, vy = y
# constants
m... | mit | -332,666,820,275,739,650 | 23.910112 | 108 | 0.622744 | false | 2.752795 | false | false | false |
peteashton/symbionts.org | tools/importGenomes.py | 1 | 4415 | import os
from pymongo import MongoClient
import argparse
parser = argparse.ArgumentParser(description="Python script for going through steps of adding a new genome to the Symbionts database.")
# STEP 1: Before running this script download .gb files from NCBI. If there are any plasmids concatenate these with main c... | mit | 4,802,950,537,591,274,000 | 42.712871 | 158 | 0.680861 | false | 3.529177 | false | false | false |
lightopa/Aiopa-Battles | lib/raven/breadcrumbs.py | 2 | 11256 | from __future__ import absolute_import
import time
import logging
from types import FunctionType
from raven._compat import iteritems, get_code, text_type, string_types
from raven.utils import once
special_logging_handlers = []
special_logger_handlers = {}
logger = logging.getLogger('raven')
def event_payload_co... | mit | -3,019,579,466,877,571,600 | 29.923077 | 79 | 0.593106 | false | 4.120059 | false | false | false |
operatorequals/gatheros | gatheros/execute/command_function.py | 1 | 2703 | import socket
import paramiko
import os, sys
import getpass
from time import sleep
client = None
ssh = None
address = None
def runSocketCommand( comm ) :
canc_rand = os.urandom(4).encode('hex')
compl_rand = os.urandom(4).encode('hex')
command = ' ' + comm + ' && echo %s || echo %s \n' % ( compl_rand, canc_rand... | bsd-3-clause | -5,620,650,275,908,728,000 | 23.807339 | 92 | 0.670736 | false | 3.061155 | false | false | false |
BoldingBruggeman/gotm | gui.py/xmlplot/data/hdf4.py | 1 | 7559 | import numpy
import xmlstore.util
import xmlplot.common
datatypes = {3:numpy.ubyte,
4:numpy.byte,
5:numpy.float32,
6:numpy.float64,
20:numpy.int8,
21:numpy.uint8,
22:numpy.int16,
23:numpy.uint16,
24:numpy.int32,
... | gpl-2.0 | 8,525,952,295,102,005,000 | 42.448276 | 147 | 0.566477 | false | 4.399884 | false | false | false |
bmmalone/pymisc-utils | pyllars/hyperparameter_utils.py | 1 | 3377 | """
This module contains very high-level helpers for selecting hyperparameters
for machine learning models using a train-validation-test strategy. Typical
usage looks as follows:
```
# create the hyperparameter grid
hp_grid = sklearn.model_selection.ParameterGrid({
...
})
# create an iterator over the hyperparame... | mit | -5,544,677,781,735,353,000 | 25.390625 | 83 | 0.674859 | false | 3.569767 | true | false | false |
sbinet-staging/pyrame | bus/cmd_serial/get_dev_linux.py | 1 | 3233 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Frédéric Magniette, Miguel Rubio-Roy
# This file is part of Pyrame.
#
# Pyrame is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, ei... | lgpl-3.0 | 4,265,908,501,331,774,500 | 33.37234 | 135 | 0.641597 | false | 3.283537 | false | false | false |
ajurcevic/calibre-web | cps/web.py | 1 | 121607 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from pydrive.auth import GoogleAuth
from googleapiclient.errors import HttpError
gdrive_support = True
except ImportError:
gdrive_support = False
import mimetypes
import logging
from logging.handlers import RotatingFileHandler
import textwrap
from flas... | gpl-3.0 | -8,819,939,616,448,573,000 | 43.092821 | 172 | 0.597984 | false | 3.660436 | true | false | false |
mcs07/mongodb-chemistry | mchem/postgres.py | 1 | 6525 | # -*- coding: utf-8 -*-
"""
mchem.postgres
~~~~~~~~~~~~~~
Functions to build and benchmark PostgreSQL database for comparison.
:copyright: Copyright 2014 by Matt Swain.
:license: MIT, see LICENSE file for more details.
"""
from __future__ import print_function
from __future__ import unicode_literals
from __future__ ... | mit | 5,491,135,645,863,577,000 | 44.950704 | 284 | 0.656398 | false | 3.126497 | false | false | false |
toastdriven/alligator | alligator/backends/sqlite_backend.py | 1 | 4414 | import sqlite3
import time
class Client(object):
def __init__(self, conn_string):
"""
A SQLite-based ``Client``.
Args:
conn_string (str): The DSN. The host/port/db are parsed out of it.
Should be of the format ``sqlite:///path/to/db/file.db``
"""
... | bsd-3-clause | 9,057,854,631,460,570,000 | 27.849673 | 78 | 0.500453 | false | 4.060718 | false | false | false |
RylanGotto/web-dash | websterton/user_manager/views.py | 1 | 2711 | # -*- coding: utf-8 -*-
from flask import (Blueprint, request, render_template, flash, url_for,
redirect, session)
from flask.ext.login import login_required
from websterton.user.models import User
from random import randint
from forismatic import Forismatic
import os
import praw
import json
SITE_... | bsd-3-clause | -1,981,855,954,654,157,800 | 25.067308 | 86 | 0.687938 | false | 2.99558 | false | false | false |
chungjjang80/FRETBursts | fretbursts/dataload/pytables_array_list.py | 2 | 3688 | #
# FRETBursts - A single-molecule FRET burst analysis toolkit.
#
# Copyright (C) 2014 Antonino Ingargiola <tritemio@gmail.com>
#
"""
This module implements a list of arrays stored into a file with pytables.
The list is created empty (if the file does not exist) and must be populated
with the `append()` method.
If th... | gpl-2.0 | 4,568,916,660,779,588,000 | 35.524752 | 78 | 0.596258 | false | 3.915074 | false | false | false |
jdeligt/Genetics | FixFreebayesHeader.py | 3 | 1824 | #!/usr/local/bin/python
#fix freebayes header
import os
import glob
from optparse import OptionParser
# -------------------------------------------------
parser = OptionParser()
parser.add_option("--vcfdir", dest="vcfdir", help="Path to directory containing VCF files", default=False)
(options, args) = parser.parse_ar... | mit | -654,241,141,323,404,800 | 35.48 | 474 | 0.609101 | false | 2.937198 | false | false | false |
ddico/odoo | addons/resource/models/res_company.py | 29 | 1286 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
class ResCompany(models.Model):
_inherit = 'res.company'
resource_calendar_ids = fields.One2many(
'resource.calendar', 'company_id', 'Working Hours')
resourc... | agpl-3.0 | -3,491,781,130,162,775,000 | 36.823529 | 97 | 0.641524 | false | 4.06962 | false | false | false |
smartcities-livinglab-udg/IOT-SensorNetwork | PythonMQTT/sendMetadata.py | 1 | 2316 | #!/usr/bin/env python
'''
* Description: This code is a bridge between Arduino and Linux in an Intel Galileo Gen 1 board
used for send data via MQTT. The user must specify the host and topic in order to send data.
* Author: Gustavo Adrián Jiménez González (Ruxaxup)
* Date:... | lgpl-2.1 | -2,066,873,295,816,355,000 | 33.014706 | 116 | 0.579767 | false | 3.067639 | false | false | false |
cshallue/models | research/object_detection/models/ssd_mobilenet_v1_ppn_feature_extractor.py | 2 | 3250 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 5,200,068,533,454,063,000 | 37.690476 | 80 | 0.667077 | false | 4.037267 | false | false | false |
burzumishi/XCompWMaker | CompMgrs/compton/bin/compton-convgen.py | 1 | 3785 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fileencoding=utf-8
import math, argparse
class CGError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
class CGBadArg(CGError): pass
class CGInternal(CGError): pass
def mbuild(width, height):
"""Build a... | gpl-2.0 | -4,534,203,917,627,179,000 | 27.674242 | 139 | 0.658388 | false | 2.950117 | false | false | false |
WillCusick/HashRace | analyzer.py | 1 | 4267 | import pika
import json
import redis
from datetime import timedelta, datetime
from consumer import HRConsumer
red = None
expiryTTL = timedelta(minutes=5)
candidate_dict = None
party_dict = None
def callback(ch, method, properties, body):
data = json.loads(body)
geoCoords = None
if 'coordinates' in da... | apache-2.0 | -5,391,561,238,380,275,000 | 39.254717 | 89 | 0.515585 | false | 3.925483 | false | false | false |
wmaciel/mbtc-api | mbtcapi/public.py | 1 | 3394 | # -*- coding: utf-8 *-*
import httplib
import json
import common
def getTicker(coin):
""" Return the ticker information of the current state of the exchange.
The ticker contains a summary of the current state of the exchange for a
given coin.
This information is given as a dict in the following arra... | mit | -7,228,638,762,171,353,000 | 30.137615 | 76 | 0.63789 | false | 3.923699 | false | false | false |
sysopfb/Malware_Scripts | qakbot/blzpack.py | 1 | 2649 | """
Example using brieflz
I have another example on a fork of BriefLz with test python scripts here: https://github.com/sysopfb/brieflz
"""
from ctypes import *
import binascii
import zlib
import struct
try:
brieflz = cdll.LoadLibrary('./blzpack_lib.so')
except OSError:
brieflz = cdll.LoadLibrary('./qakbot/blzpack... | mit | -6,509,980,660,653,067,000 | 31.703704 | 169 | 0.697244 | false | 2.953177 | false | false | false |
Cnidarias/al-go-rithms | graphsearch/topological_sorting/python/topological_sorting.py | 5 | 1347 | graph_tasks = { "wash the dishes" : ["have lunch"],
"cook food" : ["have lunch"],
"have lunch" : [],
"wash laundry" : ["dry laundry"],
"dry laundry" : ["fold laundry"],
"fold laundry" : [] }
def dfs_topsort(graph): # recursive dfs... | mit | 6,308,431,731,876,907,000 | 30.325581 | 68 | 0.481069 | false | 3.516971 | false | false | false |
silveregg/moto | tests/test_rds/test_rds.py | 2 | 10465 | from __future__ import unicode_literals
import boto.rds
import boto.vpc
from boto.exception import BotoServerError
import sure # noqa
from moto import mock_ec2, mock_rds
from tests.helpers import disable_on_py3
@disable_on_py3()
@mock_rds
def test_create_database():
conn = boto.rds.connect_to_region("us-west-2... | apache-2.0 | -9,063,545,334,461,242,000 | 34.11745 | 105 | 0.693454 | false | 2.878955 | true | false | false |
jayhetee/dask | dask/imperative.py | 2 | 9914 | import operator
from functools import partial, wraps
from itertools import chain, count
from collections import Iterator
from toolz import merge, unique, curry
from .optimize import cull, fuse
from .utils import concrete
from . import base
from .compatibility import apply
from . import threaded
__all__ = ['compute',... | bsd-3-clause | -7,175,269,820,245,830,000 | 27.164773 | 79 | 0.58029 | false | 3.511867 | false | false | false |
koduj-z-klasa/python101 | docs/podstawy/przyklady/06_slownik_csv.py | 1 | 2677 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
import os # moduł udostępniający funkcję isfile()
import csv # moduł do obsługi formatu csv
slownik = {} # pusty słownik
sFile = "slownik.csv" # nazwa pliku zawierającego wyrazy i ich tłumaczenia
def otworz(plik):
if os.path.isfile(sFile): # czy istnieje plik... | mit | -2,994,548,995,392,500,700 | 31.395062 | 77 | 0.587652 | false | 2.418433 | false | false | false |
bruceyou/NewsBlur | apps/profile/forms.py | 1 | 8675 | # -*- encoding: utf-8 -*-
import re
import requests
from django import forms
from vendor.zebra.forms import StripePaymentForm
from django.utils.safestring import mark_safe
from django.contrib.auth import authenticate
from django.contrib.auth.models import User
from apps.profile.models import change_password, blank_auth... | mit | -5,822,965,316,974,157,000 | 39.558252 | 109 | 0.555356 | false | 4.028447 | false | false | false |
rbarrois/django-runtests | doc/conf.py | 1 | 8326 | # -*- coding: utf-8 -*-
#
# Python Lib Template documentation build configuration file, created by
# sphinx-quickstart on Mon Aug 6 19:31:34 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated f... | mit | -317,534,893,427,430,600 | 31.635294 | 80 | 0.697789 | false | 3.762206 | true | false | false |
mzc/restapi | restapi/oauth_conn.py | 1 | 3075 | # Copyright 2011 Max Z. Chao
#
# 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 | 4,999,563,005,065,049,000 | 38.423077 | 105 | 0.657561 | false | 3.819876 | false | false | false |
ttm/gmaneLegacy | tests/taggerTrain.py | 1 | 4092 | import nltk as k, pickle
tagger=k.data.load('taggers/maxent_treebank_pos_tagger/english.pickle')
# levou muito tempo, retornou:
# tagger.evaluate(k.corpus.brown.tagged_sents())
# 0.5952331741865255
# pq as tags não são as mesmas?
# Receita do Brill na própria classe do nltk
from nltk.tbl.template import Template
fro... | unlicense | -2,526,869,134,886,263,000 | 40.30303 | 122 | 0.691612 | false | 2.66558 | true | false | false |
dionysio/django_upwork_portfolio | base/migrations/0001_initial.py | 1 | 1282 | # Generated by Django 2.0.2 on 2018-02-23 04:36
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Project',
fields=[
('project_id', models.Au... | mit | 2,744,757,639,075,758,600 | 29.52381 | 84 | 0.478159 | false | 5.087302 | false | false | false |
willingc/oh-mainline | mysite/customs/management/commands/customs_debugger.py | 15 | 3664 | # This file is part of OpenHatch.
# Copyright (C) 2010 Jack Grigg
# Copyright (C) 2010 OpenHatch, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, o... | agpl-3.0 | -4,301,763,859,955,644,000 | 39.263736 | 105 | 0.637828 | false | 3.816667 | false | false | false |
Haunter17/MIR_SU17 | exp4/exp4_rnn.py | 1 | 6465 | '''
A Recurrent Neural Network (LSTM) implementation example using TensorFlow library.
This example is using the MNIST database of handwritten digits (http://yann.lecun.com/exdb/mnist/)
Long Short Term Memory paper: http://deeplearning.cs.cmu.edu/pdfs/Hochreiter97_lstm.pdf
Author: Aymeric Damien
Project: https://github... | mit | -3,723,938,204,682,870,300 | 34.521978 | 98 | 0.59768 | false | 3.283393 | false | false | false |
rbuffat/pyidf | tests/test_hvactemplatezoneunitary.py | 1 | 7994 | import os
import tempfile
import unittest
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
from pyidf.hvac_templates import HvactemplateZoneUnitary
log = logging.getLogger(__name__)
class TestHvactemplateZoneUnitary(unittest.TestCase):
def setUp(self):
self.fd, self... | apache-2.0 | -8,063,789,658,988,243,000 | 62.452381 | 177 | 0.734176 | false | 3.325291 | false | false | false |
frederic-michaud/chibre | bin/base_jeu/donne.py | 1 | 2455 | # coding: utf8
from rang import *
from couleur import *
import numpy as np
from hand import *
from joueur import *
class donne:
def __init__(self,partie):
"""fonction qui commence une nouvelle donne en distribuant les cartes et en choississant l'atout"""
carte_jouee = []
self.partie = partie
self.distribue()
... | gpl-3.0 | -8,207,348,853,094,176,000 | 34.985294 | 101 | 0.716796 | false | 2.364251 | false | false | false |
KWARC/mwetoolkit | bin/libs/base/word.py | 1 | 20032 | #!/usr/bin/python
# -*- coding:UTF-8 -*-
################################################################################
#
# Copyright 2010-2014 Carlos Ramisch, Vitor De Araujo, Silvio Ricardo Cordeiro,
# Sandra Castellanos
#
# word.py is part of mwetoolkit
#
# mwetoolkit is free software: you can redistribute it and... | gpl-3.0 | 4,862,443,331,162,582,000 | 44.01573 | 102 | 0.534295 | false | 4.598714 | false | false | false |
Rademade/taiga-back | tests/integration/resources_permissions/test_projects_choices_resources.py | 3 | 80358 | from django.core.urlresolvers import reverse
from taiga.base.utils import json
from taiga.projects import choices as project_choices
from taiga.projects import serializers
from taiga.users.serializers import RoleSerializer
from taiga.permissions.permissions import MEMBERS_PERMISSIONS
from tests import factories as f
... | agpl-3.0 | -8,109,246,578,482,246,000 | 41.028243 | 113 | 0.652343 | false | 3.490033 | true | false | false |
jdevera/imex | src/imex/metadataeditor.py | 1 | 10950 | import imex
from imex.metadata import Tag, ImageMetadata
class MetadataEditor(object):
def __init__(self, rules, keep_timestamps = True, **kwargs):
"""
Supported keyword arguments:
* debug
* dry_run
"""
self._keep_timestamps = keep_timestamps
s... | mit | 4,928,579,276,155,820,000 | 50.408451 | 127 | 0.458813 | false | 4.828042 | false | false | false |
jonnybazookatone/adsws | adsws/api/discoverer/views.py | 1 | 3273 | from flask import request, current_app
from flask.ext.restful import Resource
from flask.ext.consulate import ConsulService
from urlparse import urljoin
import requests
import json
class ProxyView(Resource):
"""Proxies a request to a remote webservice"""
def __init__(self, endpoint, service_uri, deploy_path)... | gpl-2.0 | -7,048,274,146,685,120,000 | 34.193548 | 139 | 0.606172 | false | 4.261719 | false | false | false |
digris/openbroadcast.org | website/apps/statistics/utils/xls_output_label.py | 2 | 4859 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
import calendar
import xlsxwriter
from django.utils import timezone
from django.conf import settings
SITE_URL = getattr(settings, "SITE_URL")
ISRC_HINT_TEXT = """Please be aware that collecting societies only will distribute the earnings... | gpl-3.0 | -7,084,791,290,015,005,000 | 33.707143 | 135 | 0.512657 | false | 4.009076 | false | false | false |
spcs/synaps | synaps/db/__init__.py | 1 | 33852 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2012, 2013 Samsung SDS Co., LTD
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http:/... | apache-2.0 | 4,337,725,965,951,864,300 | 39.785542 | 81 | 0.502363 | false | 4.577688 | false | false | false |
minj/foxtrick | maintainer/locale/Hattrick/Parsers/CHPPHolderParser.py | 1 | 2538 | #/Club/Players/?TeamID=818875
import sys
if sys.version > '3':
import html.parser as HTMLParser
else:
import HTMLParser
import re
# Parses chpp holders
# CatzHoek
class CHPPHolderParser(HTMLParser.HTMLParser):
def __init__(self):
HTMLParser.HTMLParser.__init__(self)
self.users = []
self.currentU... | gpl-3.0 | 3,078,703,800,076,418,000 | 25.715789 | 81 | 0.648542 | false | 3.168539 | false | false | false |
untitaker/python-webuntis | tests/utils/test_remote.py | 2 | 1228 | import webuntis
import mock
from webuntis.utils.third_party import json
from .. import WebUntisTestCase, BytesIO
class BasicUsage(WebUntisTestCase):
def test_parse_result(self):
x = webuntis.utils.remote._parse_result
a = {'id': 2}
b = {'id': 3}
self.assertRaisesRegex(webuntis.err... | bsd-3-clause | 2,690,891,607,397,577,000 | 31.315789 | 67 | 0.527687 | false | 3.721212 | false | false | false |
FlannelFox/FlannelFox | flannelfox/datasources/common.py | 1 | 4132 | #-------------------------------------------------------------------------------
# Name: Settings
# Purpose: Contains the settings for the application and threads
#
# TODO: Move the reading of config xml into this file
# Move some setting into external xml file
# Move the config files to ~/.flannelfox
#------------... | mit | -8,668,762,496,566,740,000 | 26.364238 | 125 | 0.694095 | false | 3.663121 | true | false | false |
Conan-Kudo/bodhi | bodhi/server/graphql_schemas.py | 2 | 2055 | # Copyright © 2020 Red Hat Inc., and others.
#
# This file is part of Bodhi.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later ve... | gpl-2.0 | 5,457,646,105,845,578,000 | 32.129032 | 98 | 0.718111 | false | 4.2881 | false | false | false |
sitn/crdppf_core | crdppf/views/ogcproxy.py | 2 | 1321 | # -*- coding: UTF-8 -*-
from pyramid.response import Response
from pyramid.view import view_config
import httplib2
from urllib.parse import urlencode
from urllib.parse import urlparse
from crdppf.lib.wfsparsing import is_get_feature, limit_featurecollection
@view_config(route_name='ogcproxy', renderer='j... | gpl-3.0 | 2,165,775,917,155,989,800 | 22.018182 | 74 | 0.614686 | false | 3.806916 | false | false | false |
deepmind/open_spiel | open_spiel/python/examples/response_graph_ucb_2x2_game.py | 1 | 2279 | # Copyright 2019 DeepMind Technologies Ltd. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | apache-2.0 | -9,097,289,864,187,538,000 | 32.028986 | 74 | 0.709961 | false | 3.228045 | false | false | false |
berndporr/comedi2py | Thermocouple.py | 1 | 3656 | import sys
from PyQt4 import Qt
import PyQt4.Qwt5 as Qwt
import PyQt4.Qwt5.anynumpy as np
# Thermocouple application: channel 0 has the thermocouple
# connected to and channel 1 receives the temperture of the cold junction
# check out http://www.linux-usb-daq.co.uk/howto2/thermocouple/
class DAQThermo(Qt.QWidget):
... | gpl-2.0 | -8,846,850,269,125,298,000 | 26.283582 | 91 | 0.650438 | false | 3.305606 | false | false | false |
kzfm/ashioto | ashioto/nameserver.py | 1 | 2682 | # -*- encoding:utf-8 -*-
from datetime import datetime
import socket
import re
from twython import Twython
import os
import json
home = os.path.expanduser("~")
twitter_conf_file = os.path.join(home, '.ashioto', 'twitter.json')
tc = json.load(open(twitter_conf_file))
CONSUMER_KEY = tc["CONSUMER_KEY"]
CONSUMER_SECRET = ... | mit | -4,532,109,098,526,120,000 | 29.11236 | 81 | 0.553358 | false | 3.597315 | false | false | false |
openstack/powervc-driver | common-powervc/powervc/common/netutils.py | 1 | 2910 | # Copyright 2013 IBM Corp.
import json
import socket
import urllib2
import urlparse
def is_ipv4_address(ip_or_host):
"""Determines if a netloc is an IPv4 address.
:param ip_or_host: the host/ip to check
"""
try:
socket.inet_aton(ip_or_host)
return True
except:
return Fals... | apache-2.0 | 6,568,505,798,722,032,000 | 26.196262 | 75 | 0.591409 | false | 3.745174 | false | false | false |
MicrosoftGenomics/LEAP | leap/regression/leapUtils.py | 1 | 5785 | import numpy as np
from optparse import OptionParser
import scipy.linalg as la
import scipy.linalg.blas as blas
import csv
import time
import fastlmm.util.VertexCut as vc
from pysnptools.snpreader.bed import Bed
import pysnptools.util as pstutil
import pysnptools.util.pheno as phenoUtils
np.set_printoptions(precision=3... | apache-2.0 | 3,901,861,025,153,968,000 | 29.771277 | 122 | 0.700605 | false | 2.668358 | false | false | false |
delfick/bespin | bespin/option_spec/deployment_check.py | 2 | 6720 | from bespin.errors import BadDeployment, BadStack, BadOption
from bespin import helpers as hp
from input_algorithms.spec_base import NotSpecified
from input_algorithms.dictobj import dictobj
import requests
import fnmatch
import logging
log = logging.getLogger("bespin.option_spec.deployment")
class UrlChecker(dictob... | mit | 468,202,991,382,302,340 | 44.405405 | 168 | 0.625149 | false | 4.327109 | false | false | false |
ghxandsky/zstack-utility | virtualrouter/virtualrouter/virtualrouter.py | 3 | 3204 | '''
@author: Frank
'''
from zstacklib.utils import plugin
from zstacklib.utils import log
from zstacklib.utils import http
from zstacklib.utils import jsonobject
from zstacklib.utils import shell
from zstacklib.utils import daemon
from zstacklib.utils import iptables
import os.path
import traceback
impo... | apache-2.0 | 5,194,251,650,686,618,000 | 25.637931 | 94 | 0.597066 | false | 3.747368 | false | false | false |
ritchiewilson/majormajor | tests/ot/test_expand_deletion_range.py | 1 | 4109 | # MajorMajor - Collaborative Document Editing Library
# Copyright (C) 2013 Ritchie Wilson
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option)... | gpl-3.0 | 4,469,329,829,727,452,700 | 37.401869 | 77 | 0.558287 | false | 2.650968 | false | false | false |
heartsucker/diceware | cli.py | 1 | 4963 | #!/usr/bin/env python3
# -*- encoding: utf-8 -*-
import argparse
import os
from diceware_cli import subcommands
from diceware_cli.persistence import word_states
from os import path
from sys import argv
diceware_dir = path.dirname(path.abspath(__file__))
os.chdir(diceware_dir)
def get_args(cli_args):
parser = ar... | mit | -1,152,191,218,769,473,500 | 45.383178 | 108 | 0.408624 | false | 5.880332 | false | false | false |
ThunderDynamics/tdic | forms.py | 1 | 3566 | import os
from sys import getsizeof
import models
from flask_wtf import Form
from wtforms import StringField, PasswordField, TextAreaField, BooleanField, FileField
from wtforms.validators import ValidationError, DataRequired, regexp, Email, EqualTo, Length
from flask_bcrypt import check_password_hash
if 'HEROKU' in ... | apache-2.0 | -6,980,047,512,911,187,000 | 27.301587 | 118 | 0.581884 | false | 4.317191 | false | false | false |
pmonta/GNSS-DSP-tools | gnsstools/glonass/p.py | 1 | 1030 | # GLONASS P code construction
#
# Copyright 2014 Peter Monta
import numpy as np
chip_rate = 5110000
code_length = 5110000
def glonass_p_shift(x):
return [x[24]^x[2]] + x[0:24]
def make_glonass_p():
n = code_length
x = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
y = np.zeros(n)
for i in range(n):
... | mit | 6,232,927,010,712,315,000 | 17.070175 | 57 | 0.595146 | false | 2.263736 | false | false | false |
bmwiedemann/linuxcnc-mirror | lib/python/gladevcp/hal_gremlin.py | 1 | 11812 | #!/usr/bin/env python
# vim: sts=4 sw=4 et
# GladeVcp Widgets
#
# Copyright (c) 2010 Pavel Shramov <shramov@mexmat.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the... | lgpl-2.1 | 1,227,178,718,324,151,000 | 44.083969 | 121 | 0.526414 | false | 3.729713 | false | false | false |
rajegannathan/grasp-lift-eeg-cat-dog-solution-updated | python-packages/mne-python-0.10/examples/preprocessing/plot_xdawn_denoising.py | 8 | 2719 | """
================
XDAWN Denoising
================
XDAWN filters are trained from epochs, signal is projected in the sources
space and then projected back in the sensor space using only the first two
XDAWN components. The process is similar to an ICA, but is
supervised in order to maximize the signal to signal + n... | bsd-3-clause | 5,871,426,801,680,955,000 | 32.9875 | 79 | 0.69327 | false | 3.143353 | false | false | false |
lbt/boss-launcher-webhook | src/webhook_launcher/app/models.py | 1 | 20150 | # Copyright (C) 2013 Jolla Ltd.
# Contact: Islam Amer <islam.amer@jollamobile.com>
# All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or ... | gpl-2.0 | 3,786,978,616,088,420,000 | 28.807692 | 79 | 0.548486 | false | 4.351112 | false | false | false |
gengwg/leetcode | 099_recover_bst.py | 1 | 2263 | # -*- coding: utf-8 -*-
"""
99. Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake.
Recover the tree without changing its structure.
Note:
A solution using O(n) space is pretty straight forward. Could you devise a constant space solution?
"""
# Definition for a binary tree ... | apache-2.0 | -6,397,628,704,604,629,000 | 23.3875 | 99 | 0.536135 | false | 2.747887 | false | false | false |
desihub/desisim | py/desisim/scripts/pixsim.py | 1 | 4345 | """
desisim.scripts.pixsim
======================
This is a module.
"""
from __future__ import absolute_import, division, print_function
import os,sys
import os.path
import shutil
import random
from time import asctime
import numpy as np
import desimodel.io
from desiutil.log import get_logger
import desispec.io
fr... | bsd-3-clause | -9,126,274,683,811,697,000 | 32.945313 | 87 | 0.640046 | false | 3.599834 | false | false | false |
tBaxter/tango-admin | tango_admin/admin_actions.py | 1 | 4475 | from django.contrib import admin
from django.contrib.contenttypes.models import ContentType
from django.contrib.sessions.models import Session
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render
from .forms import BlacklistForm
from .models import Blacklist
def nuke_users(m... | mit | -4,542,085,057,113,488,400 | 44.20202 | 144 | 0.570503 | false | 4.720464 | false | false | false |
Onager/plaso | tests/cli/helpers/analysis_plugins.py | 2 | 2103 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the analysis plugins CLI arguments helper."""
import argparse
import unittest
from plaso.cli import tools
from plaso.cli.helpers import analysis_plugins
from plaso.lib import errors
from tests.cli import test_lib as cli_test_lib
class AnalysisPluginsArgum... | apache-2.0 | 3,826,347,112,232,595,000 | 28.619718 | 78 | 0.700903 | false | 4.206 | true | false | false |
coolharsh55/hdd-indexer | movie_metadata/organize.py | 1 | 9443 | """organizer
organize movies by:
release date:
current decade - by year: 2015, 2014, 2013...
previous decards - by decade: 2000, 1990, 1980
imdb rating:
5.0 and below
7.0 and below
7.5, 8.0, 8.5 ... (0.5 increments)
"""
# TODO: propogate error to browser if thread fails... | mit | 4,160,380,292,026,635,000 | 28.509375 | 74 | 0.618024 | false | 3.954355 | false | false | false |
carolinux/QGIS | python/plugins/processing/algs/taudem/TauDEMUtils.py | 21 | 4504 | # -*- coding: utf-8 -*-
"""
***************************************************************************
TauDEMUtils.py
---------------------
Date : October 2012
Copyright : (C) 2012 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
*************... | gpl-2.0 | -1,296,424,911,571,098,400 | 35.032 | 81 | 0.547069 | false | 4.273245 | true | false | false |
kvalo/pwcli | cmdtests/cmdtestlib.py | 1 | 6311 | #!/usr/bin/env python3
#
# Copyright (c) 2016, The Linux Foundation.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notic... | bsd-3-clause | -531,545,003,178,729,100 | 30.08867 | 95 | 0.636666 | false | 3.881304 | true | false | false |
thusoy/pwm | pwm/encoding.py | 1 | 3106 | from ._compat import ord_byte
import math
import string
from logging import getLogger
_logger = getLogger('pwm.encoding')
# 'full' repeats digits twice, to increase the probablity of a digit appearing in a default 16
# character password, for sites that suck at estimating entropy and requires digits to be present
PR... | mit | 5,288,213,428,455,828,000 | 31.020619 | 97 | 0.597875 | false | 3.867995 | false | false | false |
dwang159/oncall | src/oncall/app.py | 1 | 5191 | # Copyright (c) LinkedIn Corporation. All rights reserved. Licensed under the BSD-2 Clause license.
# See LICENSE in the project root for license information.
from __future__ import absolute_import
from urllib import unquote_plus
from importlib import import_module
import falcon
import re
from beaker.middleware impo... | bsd-2-clause | -2,143,582,619,884,856,300 | 30.846626 | 119 | 0.647467 | false | 3.828171 | true | false | false |
mrunge/horizon | openstack_dashboard/dashboards/admin/info/tables.py | 11 | 6531 | # 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 | -279,604,993,973,928,320 | 33.739362 | 78 | 0.593324 | false | 4.403911 | false | false | false |
450W16/MODACT | src/characters/enemy.py | 1 | 4046 | import pygame
from directions import Directions
from utils import *
class Enemy(pygame.sprite.Sprite):
def __init__(self, width, height, x, y):
pygame.sprite.Sprite.__init__(self)
if width <= BLOCK_WIDTH:
#print "WARNING WIDTH MAY CAUSE PROBLEMS"
pass
self.image = pygame.Surface((width, height))
self... | apache-2.0 | 3,313,382,168,279,339,500 | 25.973333 | 88 | 0.6478 | false | 2.841292 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.