repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
philouc/pyhrf | python/pyhrf/rfir.py | 1 | 44573 | # -*- coding: utf-8 -*-
import numpy
import numpy as np
from numpy import array,int32, float32 ,fix, sqrt, eye, dot, linalg, kron, newaxis, log, array2string
from numpy import zeros
import scipy.stats
from time import time
from pyhrf.tools import array_summary
import pyhrf
from pyhrf.xmlio.xmlnumpy import NumpyXMLHa... | gpl-3.0 | 2,121,882,002,903,254,300 | 38.13345 | 183 | 0.512844 | false | 3.449122 | false | false | false |
piccolo-lang/piccolo | piccdbg/piccdebug.py | 2 | 3020 | #!/usr/bin/python3
import json
import os
import socket
import subprocess
import sys
import time
if len(sys.argv) != 4:
print("USAGE: %s <exec> <src.pi> <debugsymbols>" % (sys.argv[0],))
sys.exit(1)
executable = sys.argv[1]
with open(sys.argv[2]) as f:
src = f.read().split('\n')
# LOADING DEBUG EVENTS
db... | gpl-3.0 | 3,551,935,555,413,377,000 | 23.16 | 83 | 0.51457 | false | 3.467279 | false | false | false |
matus-chochlik/various | relfs/relfs/sftp_utils.py | 1 | 7770 | #coding utf8
# ------------------------------------------------------------------------------
import os
import sys
import errno
import logging
import contextlib
import paramiko # pip install paramiko
# ------------------------------------------------------------------------------
class SFTPSession(object):
# ------... | mit | 8,764,751,991,070,455,000 | 39.680628 | 80 | 0.415187 | false | 5.366022 | true | false | false |
maxrake/pc | PythonChallenge/level_4.py | 1 | 1233 | import requests
def level_4(nothing_value):
"""Given a starting value for the 'nothing' parameter, follow the chain.
The result text will be analyzed for the string pattern 'and the next nothing is'.
If that pattern is found, then the next nothing parameter will be assumed to be at
the en... | mit | 8,755,261,105,274,888,000 | 36.53125 | 90 | 0.600973 | false | 4.165541 | false | false | false |
cwi-dis/igor | helpers/dhcpleases/dhcpleases/api.py | 1 | 8573 | import datetime
import time
import bisect
import json
import sys
import subprocess
def parse_timestamp(raw_str):
tokens = raw_str.split()
if len(tokens) == 1:
if tokens[0].lower() == 'never':
return 'never';
else:
raise E... | mit | 3,287,608,723,916,397,000 | 28.061017 | 83 | 0.43777 | false | 4.495543 | false | false | false |
alfa-jor/addon | plugin.video.alfa/channels/eporner.py | 1 | 5495 | # -*- coding: utf-8 -*-
import re
import urlparse
from core import httptools
from core import scrapertools
from platformcode import logger
host = 'http://www.eporner.com'
def mainlist(item):
logger.info()
itemlist = []
itemlist.append(item.clone(title="Últimos videos", action="videos", url... | gpl-3.0 | 4,121,063,975,416,827,400 | 36.943262 | 119 | 0.582954 | false | 3.519872 | false | false | false |
cortesi/qtile | setup.py | 1 | 5580 | #!/usr/bin/env python
# Copyright (c) 2008 Aldo Cortesi
# Copyright (c) 2011 Mounier Florian
# Copyright (c) 2012 dmpayton
# Copyright (c) 2014 Sean Vig
# Copyright (c) 2014 roger
# Copyright (c) 2014 Pedro Algarvio
# Copyright (c) 2014-2015 Tycho Andersen
#
# Permission is hereby granted, free of charge, to any perso... | mit | 5,063,788,437,803,596,000 | 33.233129 | 89 | 0.632616 | false | 3.913043 | false | false | false |
tony-rasskazov/meteo | weewx/bin/weewx/drivers/wmr300.py | 1 | 40468 | #!/usr/bin/env python
# Copyright 2015 Matthew Wall
# See the file LICENSE.txt for your rights.
#
# Credits:
# Thanks to Benji for the identification and decoding of 7 packet types
#
# Thanks to Eric G for posting USB captures and providing hardware for testing
# https://groups.google.com/forum/#!topic/weewx-developm... | mit | -4,783,034,741,800,692,000 | 28.2822 | 87 | 0.536103 | false | 3.251486 | false | false | false |
hamzehd/edx-platform | openedx/core/lib/block_cache/tests/test_block_structure.py | 33 | 8848 | """
Tests for block_structure.py
"""
# pylint: disable=protected-access
from collections import namedtuple
from copy import deepcopy
import ddt
import itertools
from unittest import TestCase
from openedx.core.lib.graph_traversals import traverse_post_order
from ..block_structure import BlockStructure, BlockStructureM... | agpl-3.0 | -5,257,475,319,516,446,000 | 39.587156 | 142 | 0.600588 | false | 4.1058 | true | false | false |
kmolab/kmolab.github.io | theme/attila/fabfile.py | 2 | 2102 | from fabric.api import *
import fabric.contrib.project as project
import os
import shutil
import sys
import SocketServer
from pelican.server import ComplexHTTPRequestHandler
# Local path configuration (can be absolute or relative to fabfile)
env.deploy_path = 'output'
DEPLOY_PATH = env.deploy_path
# Remote server co... | agpl-3.0 | -3,655,662,838,872,935,000 | 26.671053 | 80 | 0.666984 | false | 3.51505 | false | false | false |
krosaen/ml-study | python-ml-book/ch02/adeline_sgd.py | 1 | 2135 | """
Implementation of ADAptive LInear NEuron (Adaline) algorithm from Chapter 2 of
"Python Machine Learning" adapted to use stochastic gradient descent instead of batch.
"""
import numpy as np
def train_adeline_sgd(observations, labels,
learning_rate=0.01, max_training_iterations=100,
... | mit | 6,908,317,109,385,309,000 | 37.125 | 87 | 0.64356 | false | 4.043561 | false | false | false |
crossroadchurch/paul | openlp/plugins/custom/forms/editcustomdialog.py | 1 | 7067 | # -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | gpl-2.0 | -1,372,808,540,439,344,400 | 60.452174 | 113 | 0.626716 | false | 4.1473 | false | false | false |
dzheng256/PittAPI | PittAPI/library.py | 2 | 3572 | """
The Pitt API, to access workable data of the University of Pittsburgh
Copyright (C) 2015 Ritwik Gupta
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 ... | gpl-2.0 | -3,684,167,430,192,647,700 | 32.383178 | 88 | 0.645017 | false | 3.626396 | false | false | false |
wangregoon/pydec | pydec/io/arrayio.py | 6 | 9348 | __all__ = ['read_array','write_array','read_header']
#from scipy.io import read_array,write_array
from scipy import shape,rank
import numpy
import scipy
import sys
class ArrayIOException(Exception):
def __init__(self,msg=''): self.msg = msg
def __str__(self): return self.msg
class FileFormatError(ArrayIOExc... | bsd-3-clause | -3,908,098,348,429,430,000 | 31.123711 | 136 | 0.570817 | false | 3.937658 | false | false | false |
miing/mci_migo_packages_gargoyle | docs/django_settings.py | 9 | 2903 | import os.path
import sys
# Django settings for example_project project.
DEBUG = True
TEMPLATE_DEBUG = True
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
INTERNAL_IPS = ('127.0.0.1',)
MANAGERS = ADMINS
PROJECT_ROOT = os.path.dirname(__file__)
sys.path.insert(0, os.path.abspath(os.path.join(PROJECT_RO... | apache-2.0 | -5,413,557,926,892,390,000 | 32.367816 | 122 | 0.665863 | false | 3.435503 | false | false | false |
turbokongen/home-assistant | tests/test_config.py | 2 | 38438 | """Test config utils."""
# pylint: disable=protected-access
from collections import OrderedDict
import copy
import os
from unittest import mock
from unittest.mock import AsyncMock, Mock, patch
import pytest
import voluptuous as vol
from voluptuous import Invalid, MultipleInvalid
import yaml
import homeassistant.confi... | apache-2.0 | -2,355,661,255,261,674,500 | 33.106477 | 119 | 0.593163 | false | 3.694185 | true | false | false |
asmeurer/Issue-Tools | google-code-in/2-pull_is_inserted.py | 1 | 2452 | #!/usr/bin/env python
"""
This script checks the issue tracker to see if comments about GCI task
are inserted.
The script reads the source table, checks if issue_id is present, and
updates column 'is_inserted'.
"""
from optparse import OptionParser
import logging
import os.path
import sys
from mako.template import ... | mit | 8,709,298,858,717,437,000 | 27.511628 | 140 | 0.655791 | false | 3.590044 | false | false | false |
rocktavious/DevToolsLib | DTL/api/version.py | 1 | 1679 | from DTL.api import BaseDict, Enum, apiUtils
VersionStatus = Enum('Alpha','Beta','Gold')
class Version(BaseDict):
def __init__(self, *args, **kwds):
self.__setitem__('major',0)
self.__setitem__('minor',0)
self.__setitem__('fix',0)
self.__setitem__('status',VersionStatus.Alpha)
... | mit | -1,056,033,809,803,657 | 37.159091 | 102 | 0.509827 | false | 4.50134 | false | false | false |
reyiyo/eventoL | eventol/manager/templatetags/filters.py | 2 | 5900 | import json
from django import forms, template
from django.utils.translation import ugettext_lazy as _
from vote.models import Vote
from manager.models import (
Activity,
Attendee,
Collaborator,
EventUser,
Installer,
Organizer,
Reviewer
)
register = template.Library()
@register.filter(n... | gpl-3.0 | 8,739,942,428,662,366,000 | 26.962085 | 91 | 0.693898 | false | 3.430233 | false | false | false |
gtko/CouchPotatoServer | couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/academicearth.py | 15 | 1070 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
class AcademicEarthCourseIE(InfoExtractor):
_VALID_URL = r'^https?://(?:www\.)?academicearth\.org/playlists/(?P<id>[^?#/]+)'
IE_NAME = 'AcademicEarth:Course'
def _real_extract(self, url):
m = re.match(self._VALID... | gpl-3.0 | 4,780,519,438,452,250,000 | 32.4375 | 84 | 0.539252 | false | 3.639456 | false | false | false |
areriff/pythonlearncanvas | Python Script Sample/backup_automater_services.py | 1 | 1685 | # Script Name : backup_automater_services.py
# Author : Craig Richards
# Created : 24th October 2012
# Last Modified :
# Version : 1.0
# Modifications :
# Description : This will go through and backup all my automator services workflows
import shutil # Load the library module
import datetime # Load the lib... | mit | 617,034,866,961,641,200 | 53.354839 | 153 | 0.722255 | false | 3.820862 | false | false | false |
idaholab/raven | tests/framework/unit_tests/Optimizers/testRankSelection.py | 1 | 3699 | # Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 | -333,314,825,250,109,440 | 32.026786 | 93 | 0.648554 | false | 3.466729 | false | false | false |
ringemup/satchmo | satchmo/apps/satchmo_store/shop/forms.py | 13 | 3080 | from decimal import Decimal
from django import forms
from django.contrib.sites.models import Site
from livesettings import config_value
from product.models import Product
from satchmo_store.shop.signals import satchmo_cart_details_query, satchmo_cart_add_complete
from satchmo_utils.numbers import RoundedDecimalError, r... | bsd-3-clause | 9,090,548,502,000,984,000 | 36.560976 | 97 | 0.559416 | false | 4.418938 | false | false | false |
lepinkainen/pyfibot | pyfibot/modules/module_spotify.py | 1 | 2523 | """
Parse spotify URLs
"""
from __future__ import unicode_literals, print_function, division
import re
import logging
import base64
import requests
log = logging.getLogger('spotify')
def get_token(client_id, client_secret):
token = client_id + ":" + client_secret
encoded_token = base64.b64encode(token)
... | bsd-3-clause | 3,175,134,844,761,980,400 | 31.346154 | 153 | 0.569956 | false | 3.185606 | false | false | false |
aolindahl/polarization-monitor | onlineDataCruncher.py | 1 | 34103 | import sys
import os.path
sys.path.append(
os.path.dirname(os.path.abspath(__file__)) +
'/aolPyModules')
from mpi4py import MPI
import arguments
#import matplotlib.pyplot as plt
#plt.ion()
import numpy as np
import time
import platform
from collections import deque
import importlib
impor... | gpl-2.0 | -1,211,327,939,643,571,500 | 34.413292 | 92 | 0.563088 | false | 3.680047 | true | false | false |
Nobay/SampleStore | restful-api/retail/models.py | 1 | 1597 | from django.contrib.auth.models import User
from django.db import models
from django.conf import settings
from django.db.models.signals import post_save
from django.dispatch import receiver
from rest_framework.authtoken.models import Token
UserStatus = (
('0', 'New'),
('1', 'Active'),
('2', 'Blocked'),
... | mit | 7,385,012,678,444,131,000 | 26.067797 | 70 | 0.684408 | false | 3.572707 | false | false | false |
atoponce/cardciphers | talon/crypto.py | 1 | 2342 | #!/usr/bin/python
import talon
import encoder
import argparse
parser = argparse.ArgumentParser(description='Python implementation of Talon')
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument('-d', '--decrypt', help='Decrypt a message')
group.add_argument('-e', '--encrypt', help='Encrypt a ... | gpl-3.0 | -4,739,454,065,420,504,000 | 26.552941 | 97 | 0.631085 | false | 3.575573 | false | false | false |
mickem/nscp | build/python/upload.py | 1 | 3117 | import os
import argparse
def create_token(id = None, user=None, password=None):
from github3 import authorize
from getpass import getuser, getpass
if not user:
user = getuser()
print "Enter github username [%s]:"%user,
tmp = raw_input()
if tmp:
user = tmp
... | gpl-2.0 | 2,654,916,235,065,221,000 | 32.526882 | 117 | 0.590953 | false | 3.886534 | false | false | false |
opendatateam/udata | udata/tests/api/test_reuses_api.py | 1 | 14276 | import pytest
from datetime import datetime
from flask import url_for
from udata.core.badges.factories import badge_factory
from udata.core.dataset.factories import DatasetFactory
from udata.core.user.factories import AdminFactory
from udata.core.reuse.factories import ReuseFactory
from udata.core.organization.facto... | agpl-3.0 | -4,998,490,769,305,842,000 | 35.045455 | 80 | 0.602284 | false | 3.893617 | true | false | false |
tectronics/brahms-md | analysisScripts/zConstraint/general/computeG_collectGD.py | 1 | 6142 | # This script is meant to be run from a facfAnalysisSetX directoy. It does the following:
# - integrate the force profile to get the free energy
# - output the file "GD.dat", containing free energies (G) and diffusion coefficients (D). This file is
# later used in by the rp program to compute the permeability
# - col... | gpl-3.0 | 9,026,798,161,766,736,000 | 26.918182 | 103 | 0.685607 | false | 2.700967 | false | false | false |
aldmbmtl/FloatingTools | tools/rest.py | 1 | 5007 | # python imports
import os
import sys
import imp
import json
import copy
import urllib
import traceback
import webbrowser
from threading import Thread
from functools import partial
# imports
import tools
# install requests and ssl required libs
tools.installPackage('requests')
tools.installPackage('urllib3')
# impor... | mit | -930,928,843,409,379,700 | 22.847619 | 109 | 0.616137 | false | 4.012019 | false | false | false |
exploreodoo/datStruct | odoo/openerp/addons/DatStruct/model/crm_lead.py | 1 | 2346 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | gpl-2.0 | -8,736,153,625,466,801,000 | 41.654545 | 125 | 0.482097 | false | 4.90795 | false | false | false |
744996162/mysite | mysite/view.py | 1 | 1181 | __author__ = 'Administrator'
from django.http import HttpResponse,Http404
import datetime
def hello(request):
return HttpResponse("hello zhangchao.")
def hours_ahead(request,offset):
try:
offset=int(offset)
except ValueError:
raise Http404()
dt=datetime.datetime.now()+datetime.timedel... | gpl-2.0 | 2,606,631,028,583,970,300 | 25.244444 | 81 | 0.633362 | false | 3.355114 | false | false | false |
MadeiraCloud/salt | sources/salt/client/__init__.py | 1 | 54694 | # -*- coding: utf-8 -*-
'''
The client module is used to create a client connection to the publisher
The data structure needs to be:
{'enc': 'clear',
'load': {'fun': '<mod.callable>',
'arg':, ('arg1', 'arg2', ...),
'tgt': '<glob or id>',
'key': '<read in the key file>'... | apache-2.0 | 4,381,035,527,667,828,000 | 34.492537 | 94 | 0.464822 | false | 4.648084 | false | false | false |
FacundoAcevedo/gondolero | gondolero/web/tests.py | 1 | 15549 | """Tests"""
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User, Group
from django.test import TestCase
from django.core.exceptions import ObjectDoesNotExist
from django.test.client import Client
from .models import Product, Brand, Component, Badge
from random import choice as ran... | gpl-3.0 | -3,181,520,310,996,554,000 | 33.173626 | 85 | 0.570905 | false | 4.204705 | true | false | false |
andrebellafronte/stoq | stoqlib/l10n/generic/generic.py | 3 | 2169 | # -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2012 Async Open Source
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or... | gpl-2.0 | 6,192,818,719,647,401,000 | 22.835165 | 75 | 0.680959 | false | 3.639262 | false | false | false |
theodotos/arena | ssh_exec.py | 1 | 2944 | #!/usr/bin/env python
#
# pylibssh2 - python bindings for libssh2 library
#
# Copyright (C) 2010 Wallix Inc.
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation; either version 2.1 of the Li... | gpl-3.0 | 5,785,366,942,749,820,000 | 29.040816 | 90 | 0.615829 | false | 3.925333 | false | false | false |
CCBatIIT/bayesian-itc | bitc/tests/test_experiments.py | 3 | 2823 | import unittest
class TestInjection(unittest.TestCase):
@unittest.expectedFailure
def test___init__(self):
# injection = Injection(number, volume, duration, spacing, filter_period, titrant_concentration)
assert False # TODO: implement your test here
@unittest.expectedFailure
def test_... | gpl-3.0 | -8,819,331,628,148,750,000 | 37.671233 | 106 | 0.692171 | false | 4.38354 | true | false | false |
bmarshallk/NAASC | annotated_scripts/QusarLowSNRScriptAnnotated.py | 1 | 4627 | #the following minsnr and gaincal tasks go into gaincal step
minsnr = 3.0
#this first gaincal is finding the gain differences between each spectral window by using the bandpass observation
#this is so the subsequent phase and amp solutions can be determined across all 4 windows combined
gaincal(vis = 'uid*.ms.spli... | gpl-3.0 | 5,146,722,617,475,952,000 | 56.123457 | 305 | 0.677977 | false | 3.372449 | false | false | false |
frouty/odoogoeen | addons/account_payment/report/payment_order.py | 54 | 2988 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -4,660,652,891,684,464,000 | 37.307692 | 154 | 0.5917 | false | 3.952381 | false | false | false |
canvasnetworks/canvas | website/canvas/management/commands/update_scores.py | 2 | 1656 | from datetime import datetime, timedelta
from time import time
from django.core.management.base import BaseCommand, CommandError
from django.db.models import Q
from canvas.browse import frontpage_algorithms
from canvas.models import Content, Comment, Category
class Command(BaseCommand):
args = ''
help = 'Up... | bsd-3-clause | 5,972,460,411,455,503,000 | 32.795918 | 105 | 0.628019 | false | 4.129676 | false | false | false |
sam-m888/gprime | gprime/filters/rules/_hasattributebase.py | 1 | 2236 | #
# gPrime - A web-based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
#
# 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 optio... | gpl-2.0 | 8,591,343,690,089,808,000 | 33.9375 | 79 | 0.53712 | false | 4.882096 | false | false | false |
letuananh/pydemo | oop/basic_oop.py | 2 | 3897 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
This script demonstrates how to use OOP in Python
Latest version can be found at https://github.com/dakside/pydemo
References:
Classes in Python:
https://docs.python.org/2/tutorial/classes.html
@author: Le Tuan Anh <tuananh.ke@gmail.com>
'''
# Copyright (c) 2015... | mit | 7,295,959,331,667,815,000 | 31.747899 | 101 | 0.59225 | false | 3.964395 | false | false | false |
savi-dev/nova | nova/scheduler/chance.py | 6 | 4430 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010 OpenStack, LLC.
# 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
# ... | apache-2.0 | 5,369,135,336,323,449,000 | 42.431373 | 79 | 0.595711 | false | 4.672996 | false | false | false |
macarthur-lab/xbrowse | xbrowse_server/base/management/commands/search_gene_across_projects.py | 1 | 13492 | from django.core.management.base import BaseCommand
from pprint import pprint
from django.db.models.query_utils import Q
from xbrowse import genomeloc
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
from xbrowse_server.analysis import project as project_analysis
from xbrowse.core.varian... | agpl-3.0 | 2,736,037,697,792,094,700 | 55.216667 | 207 | 0.539431 | false | 4.109656 | false | false | false |
sjdv1982/seamless | seamless/graphs/webgen/generate-webpage.py | 1 | 6244 | """Creates index.html and index.js from a webform generated by seamless2webform.py
Does not normally need to be modified
JSON parameters for components:
- file
If True, for every cell "c" that has this component,
add a property "c_FILENAME" to the Vue model
(in addition to Vue property "c", which is always added).... | mit | -2,185,459,385,607,673,000 | 29.758621 | 110 | 0.609865 | false | 3.598847 | true | false | false |
hebecked/DHT-displayNlog | pc/plot.py | 1 | 1469 | #!/usr/bin/python
import numpy as np
import time
import os, sys
import argparse
import matplotlib.pyplot as plt
from datetime import datetime
from dateutil import parser
parser_ = argparse.ArgumentParser(description='Script to plot temperature logs from the lab')
parser_.add_argument('-F', '--file', dest='FILE', act... | gpl-3.0 | -1,079,398,954,483,591,800 | 26.716981 | 200 | 0.670524 | false | 2.685558 | false | false | false |
wxgeo/geophar | wxgeometrie/modules/graphes/barre_outils_graphes.py | 1 | 5198 | # -*- coding: utf-8 -*-
##--------------------------------------##
# Barre d'outils pour la géométrie #
##--------------------------------------##
# WxGeometrie
# Dynamic geometry, graph plotter, and more for french mathematic teachers.
# Copyright (C) 2005-2013 Nicolas Pourcelot
... | gpl-2.0 | -2,794,583,856,762,301,000 | 45.918182 | 139 | 0.584577 | false | 3.355657 | false | false | false |
our-city-app/oca-backend | src/solutions/common/models/questions/__init__.py | 1 | 1611 | # -*- coding: utf-8 -*-
# Copyright 2020 Green Valley Belgium NV
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | apache-2.0 | -1,033,394,376,984,838,400 | 29.980769 | 111 | 0.723153 | false | 3.669704 | false | false | false |
EricssonResearch/calvin-base | calvin/actorstore/systemactors/io/FileWriter.py | 1 | 2895 | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 | -6,139,162,505,923,076,000 | 28.540816 | 85 | 0.630052 | false | 3.650694 | false | false | false |
woniukaibuick/DA-ML | src/com/valar/movierec/myRec.py | 1 | 7671 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
from numpy import *
import time
# import igraph.vendor.texttable
# from texttable import Texttable
# 协同过滤推荐算法主要分为:
# 1、基于用户。根据相邻用户,预测当前用户没有偏好的未涉及物品,计算得到一个排序的物品列表进行推荐
# 2、基于物品。如喜欢物品A的用户都喜欢物品C,那么可以知道物品A与物品C的相似度很高,而用户C喜欢物品A,那么可以推断出用户C也可能喜欢物品C。
# 不同的数据、不同的程序猿写出的协同过滤推荐算法不同,但其核心是一... | mit | -1,531,094,444,323,372,800 | 29.407767 | 74 | 0.531694 | false | 2.270025 | false | false | false |
EichlerLab/pacbio_variant_caller | scripts/variants_bed_to_vcf.py | 1 | 7070 | #!/usr/bin/env python
import argparse
import datetime
import numpy as np
import pandas as pd
import pysam
def calculate_variant_quality(variant):
try:
return int(min(100, round(-10 * np.log10(1 - (variant.contig_support / float(variant.contig_depth))) * np.log(variant.contig_depth), 0)))
except ZeroDi... | mit | -4,683,856,836,147,152,000 | 48.097222 | 263 | 0.552475 | false | 3.585193 | false | false | false |
SickGear/SickGear | lib/hachoir_py3/core/i18n.py | 2 | 3708 | """
Functions to manage internationalisation (i18n):
- initLocale(): setup locales and install Unicode compatible stdout and
stderr ;
- getTerminalCharset(): guess terminal charset ;
WARNING: Loading this module indirectly calls initLocale() which sets
locale LC_ALL to ''. This is needed to get user preferr... | gpl-3.0 | -7,153,804,691,493,687,000 | 25.652174 | 76 | 0.624796 | false | 3.43097 | false | false | false |
karstenw/nodebox-pyobjc | examples/Extended Application/matplotlib/examples/axisartist/demo_curvelinear_grid2.py | 1 | 2957 | """
======================
Demo Curvelinear Grid2
======================
Custom grid and ticklines.
This example demonstrates how to use GridHelperCurveLinear to define
custom grids and ticklines by applying a transformation on the grid.
As showcase on the plot, a 5x5 matrix is displayed on the axes.
"""
import nump... | mit | 427,233,558,862,683,100 | 26.896226 | 82 | 0.543794 | false | 3.659653 | false | false | false |
marklescroart/bvp | bvp/Classes/scene.py | 1 | 27297 | """
Class for scenes, composed of background, sky, object(s), [shadows], camera
+ misc scene parameters (frames, file name**)
** each SCENE can have a unique file name.
"""
# Imports
import copy
import json
import numpy as np
from .mapped_class import MappedClass
from .action import Action
from .camera import Camer... | bsd-2-clause | -5,079,145,064,806,694,000 | 45.423469 | 254 | 0.566289 | false | 3.945794 | false | false | false |
JonLerida/X-Serv-Practica-Aparcamientos | project/project/settings.py | 1 | 2735 | """
Django settings for project project.
Generated by 'django-admin startproject' using Django 1.8.14.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build pat... | apache-2.0 | 2,108,745,877,482,142,700 | 25.553398 | 71 | 0.693601 | false | 3.470812 | false | false | false |
Atlantic777/liberator-api | liberator/serializers/article.py | 1 | 2856 | from rest_framework import serializers
from liberator import models
class ArticleTitleSerializer(serializers.ModelSerializer):
"""
ArticleTitleSerializer
"""
class Meta:
model = models.ArticleTitle
fields = (
'article',
'title',
'language',
... | gpl-2.0 | -127,129,885,940,399,620 | 24.5 | 74 | 0.520308 | false | 4.924138 | false | false | false |
jeedom/plugin-blea | resources/blead/blead.py | 1 | 25860 | # This file is part of Jeedom.
#
# Jeedom 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.
#
# Jeedom is distributed in the hope that it... | gpl-2.0 | 7,022,584,030,178,226,000 | 42.682432 | 176 | 0.665584 | false | 3.318363 | false | false | false |
gundramleifert/exp_tf | models/lp/bdlstm_lp_v17.py | 1 | 14186 | '''
Author: Tobi and Gundram
'''
from __future__ import print_function
import tensorflow as tf
from tensorflow.python.ops import ctc_ops as ctc
from tensorflow.python.ops import rnn_cell
from tensorflow.python.ops.rnn import bidirectional_rnn
from util.LoaderUtil import read_image_list, get_list_vals
from random impo... | apache-2.0 | -5,708,914,394,251,686,000 | 40.849558 | 119 | 0.620612 | false | 2.975252 | false | false | false |
TUDelftGeodesy/Doris | prepare_stack/create_doris_input_xml.py | 1 | 6745 | import xml.etree.ElementTree as ET
import os
from datetime import datetime
class CreateDorisInputXml(object):
def __init__(self, input_file):
self.input_file_dict={}
self.dem_folder=''
if(len(input_file)==0):
self._create_xml()
else:
self._read_xml(input_fil... | gpl-3.0 | 1,779,931,599,055,520,800 | 40.380368 | 132 | 0.545145 | false | 4.038922 | false | false | false |
Jellby/ASEP-MD | Tests/scripts/moldy-conf.py | 1 | 1968 | #!/usr/bin/python
# Use with 2 or 3 arguments:
# 1 (read/write): moldy input file (ctr)
# 2: bare extension of the current run
# 3: extension of the previous save file
import sys
import re
import fileinput
import os.path
#=============================
# Get input arguments
try:
ctr_in... | gpl-3.0 | -5,330,261,948,817,141,000 | 21.62069 | 67 | 0.58689 | false | 3.113924 | false | false | false |
werbk/task-4.11 | tests_group/group_lib.py | 1 | 3293 | from sys import maxsize
class Group:
def __init__(self, group_name=None, group_header=None, group_footer=None, id=None):
self.group_name = group_name
self.group_header = group_header
self.group_footer = group_footer
self.id = id
def __repr__(self):
return '%s:%s' %(sel... | apache-2.0 | 5,543,961,807,129,850,000 | 31.60396 | 115 | 0.585181 | false | 3.412435 | false | false | false |
migue/voltdb | lib/python/voltcli/future.d/sql.py | 2 | 2418 | # This file is part of VoltDB.
# Copyright (C) 2008-2017 VoltDB 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, or (at your option) any later ver... | agpl-3.0 | 6,249,021,127,522,486,000 | 42.963636 | 87 | 0.621175 | false | 4.023295 | false | false | false |
meuhia/Simplann | Simplan/event/views.py | 1 | 24344 | # coding: utf-8
from django.core.mail.message import EmailMultiAlternatives
from django.core.urlresolvers import reverse
from django.http import Http404
from django.http.response import HttpResponseRedirect
from django.shortcuts import get_object_or_404
from django.template.context import Context
from django.template.l... | gpl-3.0 | 3,791,876,590,586,821,000 | 36.604328 | 208 | 0.538101 | false | 4.217369 | false | false | false |
RyoheiGoto/inverted_pendulum | simulator/src/simulator.py | 1 | 1278 | # -*- coding: utf-8 -*-
try:
import vrep
except:
print '--------------------------------------------------------------'
print '"vrep.py" could not be imported. This means very probably that'
print 'either "vrep.py" or the remoteApi library could not be found.'
print 'Make sure both are in the same ... | mit | -970,805,250,792,101,500 | 30.170732 | 104 | 0.576682 | false | 3.872727 | false | false | false |
tony-hong/roleo | wsvt/Rollenverteilung/src/lib/rv/structure/Tensor.py | 1 | 15605 | #!/usr/bin/python
import sys
import os
import pandas as pd
import numpy as np
import numpy.linalg as nla
import gc
def chunks(l, n):
""" Yield successive n-sized chunks from l.
"""
for i in xrange(0, len(l), n):
yield l[i:i+n]
class Tensor:
def __init__(self, hdfstore, tablename):
if ... | gpl-3.0 | -5,675,006,648,235,691,000 | 39.744125 | 138 | 0.609676 | false | 4.06804 | false | false | false |
zserg/iot_server | iot_storage/iot_storage/models.py | 1 | 1951 | from django.db import models
from django.contrib.postgres.fields import JSONField
# from rest_framework.reverse import reverse
from django.urls import reverse
import uuid
class DeviceManager(models.Manager):
def create_device(self, data):
# import ipdb; ipdb.set_trace()
device = self.create(dev_id... | mit | 4,957,947,521,306,471,000 | 33.839286 | 78 | 0.626345 | false | 3.781008 | false | false | false |
alexlo03/ansible | test/units/modules/network/f5/test_bigip_monitor_external.py | 8 | 3836 | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import json
import pytest
import sys
from nose.plugins.skip i... | gpl-3.0 | -103,282,934,916,927,470 | 30.442623 | 91 | 0.653806 | false | 4.012552 | true | false | false |
OpenISA/riscv-sbt | scripts/auto/config.py | 1 | 11556 | #!/usr/bin/env python3
from auto.utils import cat, chsuf, path, shell
import os
import subprocess
### config ###
class GlobalOpts:
def __init__(self):
#self.cc = "clang"
self.cc = "gcc"
#self.rvcc = "clang"
self.rvcc = "gcc"
self.mmx = False
self.thumb = True
... | mit | -6,205,526,325,433,517,000 | 27.185366 | 79 | 0.532537 | false | 3.007808 | false | false | false |
lnls-sirius/dev-packages | siriuspy/siriuspy/meas/liemit/csdev.py | 1 | 1455 | """Define PVs, constants and properties of LIEmitMeas IOC."""
from .. import csdev as _csdev
# --- Enumeration Types ---
class ETypes(_csdev.ETypes):
"""Local enumerate types."""
MEASURESTATE = ('Stopped', 'Measuring')
PLANE = ('Y', 'X')
_et = ETypes # syntactic sugar
# --- Const class ---
class Co... | gpl-3.0 | -7,484,862,660,517,608,000 | 28.693878 | 74 | 0.531271 | false | 3.583744 | false | false | false |
laurentgo/pants | tests/python/pants_test/backend/core/test_prep.py | 7 | 2997 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from six.... | apache-2.0 | 5,761,021,092,143,701,000 | 37.423077 | 95 | 0.627628 | false | 3.852185 | true | false | false |
ArthurGarnier/SickRage | lib/bs4/builder/_htmlparser.py | 22 | 11609 | """Use the HTMLParser library to parse HTML files that aren't too bad."""
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
__all__ = [
'HTMLParserTreeBuilder',
]
from HTMLParser import HTMLParser
try:
from HTMLParser import HTMLParseError
except Impor... | gpl-3.0 | -9,093,411,697,079,326,000 | 35.971338 | 318 | 0.584633 | false | 4.019737 | false | false | false |
rhyolight/nupic.son | app/soc/modules/gci/views/document.py | 1 | 5720 | # Copyright 2011 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | apache-2.0 | -8,989,784,324,859,121,000 | 30.086957 | 78 | 0.691783 | false | 3.680824 | false | false | false |
Stargrazer82301/CAAPR | CAAPR/CAAPR_AstroMagic/PTS/pts/modeling/plotting/photometry.py | 1 | 3589 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | mit | 7,107,009,451,290,464,000 | 24.090909 | 82 | 0.451505 | false | 4.468244 | false | false | false |
WebHare/sublime-package | RecommendedPackages.py | 1 | 6265 | """
Check and install WebHare recommended packages
"""
import sublime
import sublime_plugin
from package_control.package_disabler import PackageDisabler
from package_control.package_installer import PackageInstallerThread
from package_control.package_manager import PackageManager
from package_control.thread_progress i... | mit | 3,050,669,622,150,938,000 | 28.275701 | 119 | 0.568077 | false | 4.92919 | false | false | false |
bt3gl/Numerical-Methods-for-Physics | homework1_integration_differentiation/Q3/comp_simpsons_rule.py | 1 | 3066 | #########################################################################
# SIMPSON'S RULES
#
# This module (based on Mike Zingale's code)
# 1) calculates the integral of f(x) = sin (pi x) over the
# interval [0,1], using N = 3,7,15 and 31 slabs/i... | apache-2.0 | -2,339,342,410,559,309,000 | 22.584615 | 100 | 0.551207 | false | 2.968054 | false | false | false |
schwuk/trac-code-comments-plugin | code_comments/comment.py | 2 | 6342 | import re
import locale
import trac.wiki.formatter
from trac.mimeview.api import Context
from time import strftime, localtime
from code_comments import db
from trac.util import Markup
from trac.web.href import Href
from trac.test import EnvironmentStub, Mock, MockPerm
try:
import json
except ImportError:
impo... | gpl-2.0 | -8,266,073,112,406,506,000 | 36.526627 | 141 | 0.596026 | false | 3.700117 | false | false | false |
opennode/nodeconductor-openstack | src/waldur_openstack/openstack/migrations/0003_snapshot.py | 1 | 2730 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import waldur_core.logging.loggers
import django_fsm
import waldur_core.core.models
import django.db.models.deletion
import django.utils.timezone
import waldur_core.core.fields
import taggit.managers
import model_u... | mit | -6,514,763,288,642,049,000 | 54.714286 | 230 | 0.641026 | false | 3.945087 | false | false | false |
brodeau/aerobulk | python/misc/prepare_PAPA_forcing_aerobulk.py | 1 | 5756 | #!/usr/bin/env python
#
# L. Brodeau, August 2019
import sys
import numpy as nmp
from netCDF4 import Dataset
import string
from os.path import exists,basename
#cdir_in = '/home/laurent/PAPA_2012-2018'
cdir_in = '.'
fext='.cdf'
list_file = [ 'w50n145w_hr' , 'airt50n145w_hr' , 'rh50n145w_hr', 'lw50n145w_hr', 'rad50n1... | gpl-3.0 | 5,801,527,235,126,451,000 | 32.08046 | 131 | 0.5 | false | 2.828501 | false | false | false |
mvitr/titanium_mobile | support/common/markdown/extensions/abbr.py | 131 | 2899 | '''
Abbreviation Extension for Python-Markdown
==========================================
This extension adds abbreviation handling to Python-Markdown.
Simple Usage:
>>> import markdown
>>> text = """
... Some text with an ABBR and a REF. Ignore REFERENCE and ref.
...
... *[ABBR]: Abbreviation
... | apache-2.0 | -3,684,683,211,151,095,000 | 29.515789 | 151 | 0.583305 | false | 3.755181 | false | false | false |
cb1234/pynet-test | pyth_ansibel/class4/ex1_paramiko_me.py | 1 | 1507 | #!/usr/bin/env python
import paramiko
import time
MAX_BUFFER = 65535
def clear_buffer(remote_conn):
'''
Clear any data in the receive buffer
'''
#send_command(remote_conn, cmd='', delay=1)
if remote_conn.recv_ready():
return remote_conn.recv(MAX_BUFFER)
def disable_paging(remote_conn, cmd... | apache-2.0 | -7,928,434,388,083,266,000 | 24.116667 | 125 | 0.621765 | false | 3.425 | false | false | false |
MoRgUiJu/morguiju.repo | plugin.video.pelisalacarta/channels/inkapelis.py | 2 | 10618 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Canal para Inkapelis
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import re
from core import config
from core import logger
fro... | gpl-2.0 | -2,405,787,578,977,068,500 | 41.754032 | 120 | 0.593134 | false | 3.599117 | true | false | false |
woome/drivel | drivel/wsgi.py | 1 | 7883 | import errno
from functools import partial
import os
import socket
import sys
import traceback
import weakref
# third-party imports
import eventlet
from eventlet import greenthread
from eventlet import hubs
from eventlet import timeout
from eventlet.green import time
try:
import simplejson
except ImportError:
i... | gpl-3.0 | -7,454,966,583,249,706,000 | 38.024752 | 94 | 0.558924 | false | 4.441127 | false | false | false |
MShaker/python-graph-gui | GraphControlPanelGui.py | 1 | 11772 |
from PyQt5 import QtCore, QtGui, QtWidgets
''' Graph GUI
Author: Sharif Shaker
Date: 4/29/2017
Modified: 5/11/2017
Changes made: allowed control panel to run bellman ford algorithm
Description:
This file contains various classes and functions for displaying a graphical panel for... | gpl-3.0 | 5,986,951,404,604,769,000 | 54.791469 | 126 | 0.7009 | false | 3.790084 | false | false | false |
rlindner81/pyload | module/plugins/hoster/FshareVn.py | 1 | 3597 | # -*- coding: utf-8 -*-
import re
import time
import urlparse
from module.plugins.internal.SimpleHoster import SimpleHoster
def double_decode(m):
return m.group(1).decode('raw_unicode_escape')
class FshareVn(SimpleHoster):
__name__ = "FshareVn"
__type__ = "hoster"
__version__ = "0.25"
__status... | gpl-3.0 | 7,781,893,039,476,865,000 | 32.411215 | 126 | 0.511329 | false | 3.341121 | false | false | false |
inkmonk/flask-sqlalchemy-booster | flask_sqlalchemy_booster/model_booster/__init__.py | 1 | 6147 | from flask_sqlalchemy import Model
from sqlalchemy.ext.associationproxy import AssociationProxy, AssociationProxyInstance
from sqlalchemy.orm import class_mapper
from toolspy import all_subclasses
from ..query_booster import QueryBooster
from .queryable_mixin import QueryableMixin
from .dictizable_mixin import Dictizab... | mit | -8,617,914,726,802,109,000 | 34.125714 | 118 | 0.587929 | false | 3.897907 | false | false | false |
isis-ammo/ammo-gateway | AndroidGatewayPlugin/Testdriver/sendBadChecksum.py | 1 | 3284 | #!/usr/bin/env python
#Test driver for Android gateway plugin to test deserialization of messages.
import sys
import socket
import struct
import zlib
import AmmoMessages_pb2
class GatewayTestClient:
def __init__(self, host, port):
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.sock.con... | mit | 7,346,493,983,445,303,000 | 35.087912 | 94 | 0.707978 | false | 3.628729 | true | false | false |
JohnGarbutt/taskflow-1 | taskflow/patterns/ordered_flow.py | 1 | 11618 | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2012 Yahoo! Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# ... | apache-2.0 | 8,490,047,974,571,597,000 | 39.340278 | 79 | 0.578929 | false | 4.738173 | false | false | false |
LondoMundo/PythonMorseCode | morseGUI.py | 3 | 6211 | while 1==1:
want = raw_input("Do you want to encode[e] or decode[d]?")
if want == "e":
i = raw_input("What do you want to convert to morse code?")
numberOf = len(i)
f = open('output.txt', 'w')
for i in i:
if i == "a":
print ".-"
f.write... | gpl-2.0 | -3,826,420,355,588,592,000 | 31.348958 | 76 | 0.275801 | false | 4.461925 | false | false | false |
adamantoise/puzzle-tools | polyomino/polyomino.py | 1 | 16749 | """
Polyomino Solver
Copyright (c) 2012, Adam Rosenfield
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of cond... | mit | -1,220,731,696,833,799,700 | 39.554479 | 120 | 0.499791 | false | 3.736114 | false | false | false |
uclouvain/osis | education_group/views/achievement/create.py | 1 | 3386 | ############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core bu... | agpl-3.0 | -5,808,731,486,825,872,000 | 45.369863 | 114 | 0.700739 | false | 3.89977 | false | false | false |
hyflashstar/gupiao | src/配对股票搜索.py | 1 | 2355 | # -*- coding: utf-8 -*-
"""
Created on Mon Aug 28 17:06:52 2017
@author: 53771
"""
import loadStock as ls
import PairTrading as pairTrading
import tushare as ts
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
sz50s=ts.get_sz50s()
#industtry=ts.get_industry_classified()
pt=pairTrading.PairTradi... | apache-2.0 | 4,643,584,304,883,889,000 | 31.041667 | 163 | 0.613784 | false | 2.657834 | false | false | false |
JakeColtman/bartpy | tests/test_mutation.py | 1 | 1326 | import unittest
import pandas as pd
import numpy as np
from bartpy.data import Data, format_covariate_matrix
from bartpy.mutation import GrowMutation, PruneMutation
from bartpy.node import DecisionNode, LeafNode
from bartpy.split import Split
class TestMutation(unittest.TestCase):
def setUp(self):
self... | mit | -3,347,842,947,335,801,000 | 29.837209 | 81 | 0.645551 | false | 3.331658 | true | false | false |
lehinevych/smrs | project/lib/lda/lda_model.py | 1 | 2613 | import sys
import os
import gensim
from gensim.corpora import BleiCorpus
from gensim import corpora
#from gensim import corpora, models, similarities
class LDAModel:
def __init__(self,root_path):
self.__path = root_path + "/var/lda/"
self.__num_topics = 27
self.__modelName = 'smrs_lda'
... | mit | 3,293,141,388,264,709,000 | 32.5 | 137 | 0.601225 | false | 3.384715 | false | false | false |
paulcalabro/zato | code/zato-server/src/zato/server/service/internal/checks/__init__.py | 7 | 1887 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2013 Dariusz Suchojad <dsuch at zato.io>
Licensed under LGPLv3, see LICENSE.txt for terms and conditions.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
# stdlib
from json import dumps, loads
# Bunch
from bunch import bunchify
# lxm... | gpl-3.0 | 4,267,199,197,895,859,700 | 28.952381 | 89 | 0.63328 | false | 3.804435 | false | false | false |
sonymoon/algorithm | src/main/python/leetcode-python/easy/427.Construct Quad Tree.py | 1 | 2058 | # Definition for a QuadTree node.
class Node:
def __init__(self, val, isLeaf, topLeft, topRight, bottomLeft, bottomRight):
self.val = val
self.isLeaf = isLeaf
self.topLeft = topLeft
self.topRight = topRight
self.bottomLeft = bottomLeft
self.bottomRight = bottomRight
... | apache-2.0 | -5,623,741,860,466,983,000 | 40.16 | 101 | 0.488338 | false | 3.804067 | false | false | false |
synbiochem/synbiochem-py | synbiochem/utils/test/test_seq_utils.py | 1 | 5403 | '''
synbiochem (c) University of Manchester 2015
synbiochem is licensed under the MIT License.
To view a copy of this license, visit <http://opensource.org/licenses/MIT/>.
@author: neilswainston
'''
# pylint: disable=superfluous-parens
# pylint: disable=too-many-public-methods
import random
import unittest
from sy... | mit | 7,650,742,459,185,369,000 | 36.783217 | 79 | 0.531557 | false | 3.503891 | true | false | false |
trevordevore/livecode-sublimetext | notify_levure_app_of_save.py | 1 | 3614 | import sublime
import sublime_plugin
import re
import socket
import urllib
class LiveCodeNotifyOnSave(sublime_plugin.EventListener):
def on_activated_async(self, view):
if self.is_livecode(view):
query = {'command': 'open', 'filename': self.get_view_filename(view)}
self.tell_liveco... | mit | -6,937,892,488,537,222,000 | 39.606742 | 115 | 0.552573 | false | 4.261792 | false | false | false |
astroML/astroML | astroML/linear_model/kernel_regression.py | 2 | 1568 | import numpy as np
from sklearn.base import BaseEstimator
from sklearn.metrics import pairwise_kernels
class NadarayaWatson(BaseEstimator):
"""Nadaraya-Watson Kernel Regression
This is basically a gaussian-weighted moving average of points
Parameters
----------
kernel : string
kernel is ... | bsd-2-clause | -5,664,977,334,378,552,000 | 29.153846 | 79 | 0.594388 | false | 3.843137 | false | false | false |
spiralsyzygy/cloudbuster | inventory/models.py | 1 | 3094 | from django.db import models
from django.utils.translation import ugettext_lazy as _
from mptt.models import MPTTModel, TreeForeignKey
from ansible import utils
class BaseVar(models.Model):
key = models.CharField(max_length=255)
value = models.TextField(null=True, blank=True)
class Meta:
abstract =... | gpl-3.0 | 86,011,278,255,715,790 | 27.915888 | 93 | 0.646412 | false | 3.745763 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.