repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dylanh333/android-unmkbootimg | vendor/android-tools/toolbox/generate-input.h-labels.py | 4 | 2801 | #!/usr/bin/env python
#
# Copyright (C) 2015 The Android Open Source Project
#
# 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 req... | mit | -6,136,553,381,846,212,000 | 28.177083 | 74 | 0.622992 | false | 3.223245 | false | false | false |
lavalamp-/ws-backend-community | lib/debugging.py | 1 | 4429 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from uuid import uuid4
def clear_celery_queue():
"""
Clear out all tasks for the Web Sight Celery application.
:return: None
"""
from tasknode import websight_app
websight_app.control.purge()
def enqueue_database_debugging_task(... | gpl-3.0 | 6,063,669,412,163,870,000 | 33.874016 | 96 | 0.669677 | false | 3.675519 | false | false | false |
GENETX/alpg | configs/example.py | 1 | 4948 | #!/usr/bin/python3
#Artifical load profile generator v1.1, generation of artificial load profiles to benchmark demand side management approaches
#Copyright (C) 2018 Gerwin Hoogsteen
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public Lic... | gpl-3.0 | 4,827,155,180,199,970,000 | 28.628743 | 126 | 0.760509 | false | 3.065675 | false | false | false |
woodem/woo | examples/perf/showPlots.py | 1 | 2971 | import numpy as np
from pprint import pprint
dd={}
for l in open('timings.txt'):
if l.startswith('#'): continue
ll=l[:-1].split()
if len(ll)==0: continue
tag,cores,nPar,nSteps=ll[0],int(ll[1]),int(ll[2]),int(ll[3])
t1,t,colliderRel=[float(i) for i in ll[4:]]
key=(tag,cores,nPar,nSteps)
data=... | gpl-2.0 | 5,512,987,470,357,769,000 | 33.952941 | 142 | 0.612252 | false | 2.636202 | false | false | false |
schristakidis/p2ner | p2ner/components/serveroverlay/centralserver/centralserver/messages/messageobjects.py | 1 | 2833 | # -*- coding: utf-8 -*-
# Copyright 2012 Loris Corazza, Sakis Christakidis
#
# 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
#
# U... | apache-2.0 | -8,950,229,297,693,526,000 | 31.563218 | 98 | 0.692199 | false | 3.693611 | false | false | false |
dfehrenbach/Swen343_Human_Resources | hr/controllers/authentication.py | 1 | 1073 | """ This is the controller of the /confirm_login endpoint
The following functions are called from here: GET
"""
import logging
import requests
import employees
logging.basicConfig(filename='./log.txt',format='%(asctime)s :: %(name)s :: %(message)s')
logger = logging.getLogger(__name__)
def get(department="",token=... | mit | -5,626,718,884,545,181,000 | 36 | 109 | 0.65424 | false | 4.111111 | false | false | false |
BiaDarkia/scikit-learn | sklearn/cluster/k_means_.py | 1 | 61736 | """K-means clustering"""
# Authors: Gael Varoquaux <gael.varoquaux@normalesup.org>
# Thomas Rueckstiess <ruecksti@in.tum.de>
# James Bergstra <james.bergstra@umontreal.ca>
# Jan Schlueter <scikit-learn@jan-schlueter.de>
# Nelle Varoquaux
# Peter Prettenhofer <peter.prettenh... | bsd-3-clause | 8,976,565,480,837,188,000 | 37.730238 | 81 | 0.611701 | false | 4.148646 | false | false | false |
vaishaksuresh/udacity_data_analyst | P2/ProblemSets_2_to_4/P2_01.py | 1 | 1464 | import pandas
import pandasql
def num_rainy_days(filename):
'''
This function should run a SQL query on a dataframe of
weather data. The SQL query should return one column and
one row - a count of the number of days in the dataframe where
the rain column is equal to 1 (i.e., the number of days it... | gpl-2.0 | 7,580,475,719,071,482,000 | 38.567568 | 93 | 0.70082 | false | 3.904 | false | false | false |
IvanRybakov/cachewarmer | cw.py | 1 | 3233 |
import urllib2 as ur
import re, traceback
import sys
import os
from scw.fetcher import Fetcher
from scw.app import App
class CacheWarmer():
def __init__(self, sitemap, processes = 100):
self.processes = processes
self.active_threads = []
self.app = App()
self.urls = []
self.updated_count = 0
self.fetch... | mit | -5,689,395,381,370,856,000 | 28.126126 | 109 | 0.67275 | false | 3.058657 | false | false | false |
t-neumann/slamdunk | slamdunk/contrib/RNASeqReadSimulator/src/gensimreads.py | 1 | 9905 | #!/usr/bin/env python
"""
This script generates simulated RNA-Seq reads (in .bed format) from known gene annotations.
USAGE
gensimreads.py {OPTIONS} <BED-File|->
PARAMETER
BED-File\tThe gene annotation file (in BED format). Use '-' for STDIN input
OPTIONS
-e/--expression [expression level file] \tSpecify ... | agpl-3.0 | 3,342,112,633,374,298,000 | 30.645367 | 292 | 0.651186 | false | 3.055213 | false | false | false |
APTrust/EarthDiver | dpnode/dpn/client/management/commands/accept_transfers.py | 1 | 1510 | """
'Contrary to what people may say, there is no upper limit to stupidity.'
- Stephen Colbert
"""
from optparse import make_option
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from dpn.data.models import Node
from dpn.client.tasks import... | apache-2.0 | -3,021,411,262,614,179,300 | 32.577778 | 78 | 0.59404 | false | 4.494048 | false | false | false |
eduNEXT/edunext-ecommerce | ecommerce/courses/publishers.py | 1 | 6029 | from __future__ import absolute_import, unicode_literals
import json
import logging
import six
from django.utils.translation import ugettext_lazy as _
from edx_rest_api_client.exceptions import SlumberHttpBaseException
from oscar.core.loading import get_model
from ecommerce.core.constants import ENROLLMENT_CODE_SEAT... | agpl-3.0 | 152,557,083,518,754,620 | 40.294521 | 116 | 0.603914 | false | 4.426579 | false | false | false |
Nic30/HWToolkit | hwt/synthesizer/rtlLevel/netlist.py | 1 | 8089 | from typing import List, Optional, Union
from hdlConvertorAst.hdlAst._defs import HdlIdDef
from hdlConvertorAst.hdlAst._expr import HdlValueId
from hdlConvertorAst.hdlAst._structural import HdlModuleDec, HdlModuleDef, \
HdlCompInst
from hwt.code import If
from hwt.hdl.operatorDefs import AllOps
from hwt.hdl.types.... | mit | 2,040,947,391,428,766,200 | 37.160377 | 105 | 0.593769 | false | 3.783442 | false | false | false |
EdinburghNLP/nematus | nematus/exponential_smoothing.py | 1 | 3493 | import tensorflow as tf
# How often to update smoothed variables (in terms of training steps).
DEFAULT_UPDATE_FREQUENCY = 5
class ExponentialSmoothing(object):
"""Defines TensorFlow variables and operations for exponential smoothing.
Following Marian [1], we maintain smoothed versions of all trainable
... | bsd-3-clause | 2,266,908,589,127,385,000 | 42.123457 | 79 | 0.608932 | false | 4.371715 | false | false | false |
thakadu/Abraxas | scripts/load_feeds.py | 1 | 1986 | """Loads Feed data from a csv file into the feed table of the database"""
import logging
import csv
from optparse import OptionParser
from paste.deploy import appconfig
#from pylons import app_globals
from abraxas.config.environment import load_environment
from sqlalchemy import create_engine, MetaData, select
from... | bsd-3-clause | 1,864,919,659,832,746,000 | 27.782609 | 76 | 0.613797 | false | 4.336245 | false | false | false |
axiom-data-science/pyaxiom | pyaxiom/netcdf/sensors/dsg/timeseries/ir.py | 1 | 1602 | #!python
# coding=utf-8
from pyaxiom.netcdf import CFDataset
from pyaxiom import logger
class IndexedRaggedTimeseries(CFDataset):
@classmethod
def is_mine(cls, dsg):
try:
rvars = dsg.get_variables_by_attributes(cf_role='timeseries_id')
assert len(rvars) == 1
asser... | mit | 3,502,373,414,636,524,500 | 31.693878 | 94 | 0.601124 | false | 4.035264 | false | false | false |
andrewyoung1991/scons | QMTest/TestCommon.py | 1 | 27429 | """
TestCommon.py: a testing framework for commands and scripts
with commonly useful error handling
The TestCommon module provides a simple, high-level interface for writing
tests of executable commands and scripts, especially commands and scripts
that interact with the file system. All methods throw... | mit | 3,280,582,583,667,174,400 | 36.116373 | 88 | 0.580298 | false | 4.225046 | true | false | false |
Pikecillo/genna | external/PyXML-0.8.4/test/dom/test_entity.py | 1 | 1296 | from TestSuite import EMPTY_NAMESPACE
def test(tester):
tester.startGroup('Entity')
tester.startTest('Testing syntax')
try:
from xml.dom import Entity
from xml.dom.Entity import Entity
except:
tester.error('Error in syntax', 1)
tester.testDone()
tester.startTest('Crea... | gpl-2.0 | 7,661,269,185,216,156,000 | 24.411765 | 73 | 0.652778 | false | 4.088328 | true | false | false |
yro/veda_worker | veda_worker/generate_delivery.py | 1 | 5380 |
import boto
import boto.s3
from boto.s3.key import Key
import hashlib
import os
from os.path import expanduser
import sys
import shutil
from global_vars import *
from reporting import ErrorObject
from config import WorkerSetup
homedir = expanduser("~")
"""
Gets specified Video and Encode object, and delivers file t... | gpl-3.0 | 7,279,386,653,945,648,000 | 26.589744 | 90 | 0.512639 | false | 4.148034 | false | false | false |
SpaceGroupUCL/qgisSpaceSyntaxToolkit | esstoolkit/external/networkx/algorithms/isomorphism/ismags.py | 1 | 42775 | """
****************
ISMAGS Algorithm
****************
Provides a Python implementation of the ISMAGS algorithm. [1]_
It is capable of finding (subgraph) isomorphisms between two graphs, taking the
symmetry of the subgraph into account. In most cases the VF2 algorithm is
faster (at least on small graphs) than this im... | gpl-3.0 | -174,510,596,902,812,900 | 36.002595 | 88 | 0.56678 | false | 4.00365 | false | false | false |
ngoix/OCRF | sklearn/datasets/fetch_ml_mieux.py | 1 | 13778 | from zipfile import ZipFile
from io import BytesIO
import logging
from os.path import exists, join
try:
from urllib2 import urlopen
except ImportError:
from urllib.request import urlopen
import numpy as np
from .base import get_data_home
from .base import Bunch
from .base import _pkl_filepath
from ..utils.fix... | bsd-3-clause | -8,359,151,599,805,482,000 | 31.495283 | 78 | 0.604369 | false | 3.307249 | false | false | false |
capitalone/cloud-custodian | c7n/filters/vpc.py | 1 | 10368 | # Copyright 2016-2017 Capital One Services, LLC
# Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from c7n.exceptions import PolicyValidationError
from c7n.utils import local_session, type_schema
from .core import Filter, ValueFilter
from .related import RelatedResourceFilter
class Match... | apache-2.0 | -2,030,043,321,442,465,000 | 37.831461 | 97 | 0.558738 | false | 4.385787 | false | false | false |
vmagamedov/pi | fixers/fix_imports.py | 1 | 2965 | import os.path
from lib2to3.pygram import python_symbols
from lib2to3.fixer_util import Name
from lib2to3.fixes.fix_imports import FixImports as BaseFixImports, alternates
PATH = '{}/../pi/_requires'.format(os.path.dirname(__file__))
LIBS = [i.rstrip('.py') for i in os.listdir(PATH)
if not i.startswith('_')... | bsd-3-clause | -102,682,145,929,447,380 | 41.357143 | 79 | 0.536931 | false | 3.467836 | false | false | false |
swapnilsm/redis-rw-lock | setup.py | 1 | 1796 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
import io
from os.path import dirname
from os.path import join
from setuptools import setup
def read(*names, **kwargs):
return io.open(
join(dirname(__file__), *names),
en... | mit | 9,055,668,874,280,245,000 | 29.965517 | 90 | 0.603563 | false | 4.017897 | false | false | false |
rwatson/chromium-capsicum | webkit/tools/layout_tests/layout_package/platform_utils_mac.py | 1 | 5197 | # Copyright (c) 2008-2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This is the Mac implementation of the layout_package.platform_utils
package. This file should only be imported by that package."""
import os
... | bsd-3-clause | -4,367,166,175,675,160,000 | 34.59589 | 80 | 0.689051 | false | 3.665021 | true | false | false |
mareknetusil/twist | demo/dynamic/flap.py | 1 | 1495 | from __future__ import print_function
__author__ = "Harish Narayanan"
__copyright__ = "Copyright (C) 2010 Simula Research Laboratory and %s" % __author__
__license__ = "GNU GPL Version 3 or any later version"
from cbc.twist import *
class Obstruction(Hyperelasticity):
def mesh(self):
n = 4
retur... | gpl-3.0 | -6,887,895,058,826,794,000 | 23.508197 | 86 | 0.599331 | false | 3.300221 | false | false | false |
jinankjain/zamboni | mkt/api/paginator.py | 1 | 4202 | import urlparse
from django.core.paginator import EmptyPage, Page, PageNotAnInteger, Paginator
from django.http import QueryDict
from django.utils.http import urlencode
from rest_framework import pagination, serializers
class ESPaginator(Paginator):
"""
A better paginator for search results
The normal ... | bsd-3-clause | 899,639,658,611,445,600 | 36.185841 | 79 | 0.651832 | false | 4.26599 | false | false | false |
hwen3/410-lab5 | todolist.py | 1 | 2612 | import sqlite3
from flask import Flask, render_template, g, request, session, flash, redirect, url_for, abort
DATABASE = 'test.db'
USERNAME = 'admin'
PASSWORD = 'admin'
SECRET_KEY = 'he who shall not be named'
app = Flask(__name__)
app.config.from_object(__name__)
@app.route('/')
def welcome():
return '<h1>Welco... | apache-2.0 | 7,709,553,751,303,551,000 | 27.402174 | 97 | 0.609495 | false | 3.622746 | false | false | false |
Azure/azure-storage-python | samples/blob/block_blob_usage.py | 1 | 18393 | # coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------... | mit | 8,936,790,025,452,813,000 | 40.474041 | 120 | 0.618625 | false | 4.002832 | false | false | false |
mbalazin/cse599c-17sp-projects | spark-advantage/pandasbench.py | 1 | 1488 |
# coding: utf-8
# In[1]:
import pandas as pd
import time
from sys import argv
logfile = argv[1]
filesize = argv[2]
# # Python Pandas Benchmark
# In[3]:
prefix = "file:////Users/tony/Dropbox/Projects/UW/cse599c-17sp-projects/spark-advantage/data/"
if(filesize == 'original'):
tairfname = "Tair_WA_nohead... | bsd-3-clause | -4,992,153,284,442,744,000 | 24.672414 | 108 | 0.623656 | false | 2.695652 | false | false | false |
openai/baselines | baselines/ppo1/run_atari.py | 1 | 1583 | #!/usr/bin/env python3
from mpi4py import MPI
from baselines.common import set_global_seeds
from baselines import bench
import os.path as osp
from baselines import logger
from baselines.common.atari_wrappers import make_atari, wrap_deepmind
from baselines.common.cmd_util import atari_arg_parser
def train(env_id, num_... | mit | -257,343,598,731,253,380 | 31.979167 | 87 | 0.670246 | false | 3.061896 | false | false | false |
bptripp/it-cnn | tuning/clutter.py | 1 | 2870 | __author__ = 'bptripp'
import numpy as np
import matplotlib
matplotlib.rcParams['xtick.labelsize'] = 14
matplotlib.rcParams['ytick.labelsize'] = 14
import matplotlib.pyplot as plt
from cnn_stimuli import get_image_file_list
from alexnet import preprocess, load_net, load_vgg
def get_clutter_responses(remove_level):
... | mit | -5,060,137,306,948,743,000 | 35.341772 | 95 | 0.628223 | false | 2.937564 | false | false | false |
amenonsen/ansible | lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_osu_provider.py | 1 | 13230 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# 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 Lic... | gpl-3.0 | -5,820,145,933,093,998,000 | 32.324937 | 155 | 0.552079 | false | 4.308043 | false | false | false |
icyflame/batman | pywikibot/families/wikibooks_family.py | 1 | 7244 | # -*- coding: utf-8 -*-
"""Family module for Wikibooks."""
from __future__ import absolute_import, unicode_literals
from pywikibot import family
__version__ = '$Id$'
# The Wikimedia family that is known as Wikibooks
class Family(family.SubdomainFamily, family.WikimediaFamily):
"""Family class for Wikibooks.""... | mit | -3,807,221,727,684,377,000 | 48.278912 | 157 | 0.628934 | false | 3.023372 | false | false | false |
mpachas/django-monthfield | month/tests.py | 1 | 5197 | from django.test import TestCase
from month.models import Month
from example.models import Example
import datetime
# Create your tests here.
def TestMonthFunctions(TestCase):
def test_constructors(self):
m = Month(2010, 1)
self.assertEqual(m.year, 2010)
self.assertEqual(m.month, 1)
... | bsd-3-clause | 6,722,813,776,884,100,000 | 28.196629 | 84 | 0.552819 | false | 3.478581 | true | false | false |
sh0ked/vmmaster | backend/queue_producer.py | 1 | 4076 | # coding: utf-8
import aioamqp
import uuid
import logging
from core.utils import async_wait_for
log = logging.getLogger(__name__)
class AsyncQueueProducer(object):
messages = {}
connection = None
channel = None
consumer_tag = None
responses_queue = None
commands_queue = None
def __init... | mit | 1,020,926,549,248,728,000 | 38.192308 | 117 | 0.626349 | false | 3.82723 | false | false | false |
fsmMLK/inkscapeCircuitSymbols | 0.9x/drawRLC.py | 1 | 14781 | #!/usr/bin/python
import inkscapeMadeEasy_Base as inkBase
import inkscapeMadeEasy_Draw as inkDraw
class RLC(inkBase.inkscapeMadeEasy):
# ---------------------------------------------
def drawBipoleGeneral(self, parent, position=[0, 0], value='Z', label='Bipole', angleDeg=0, flagVolt=True,
... | gpl-3.0 | -5,235,465,511,251,690,000 | 48.767677 | 128 | 0.577633 | false | 3.762984 | false | false | false |
Iconoclasteinc/tgit | testing/drivers/track_list_tab_driver.py | 1 | 3521 | # -*- coding: utf-8 -*-
from PyQt5.QtWidgets import QMenu, QTableWidget
from hamcrest import contains, has_items, equal_to
from cute import gestures
from cute.matchers import named
from cute.widgets import MenuDriver, TableViewDriver
from tgit.ui.pages.track_list_tab import TrackListTab
from ._screen_driver import Scr... | gpl-3.0 | 5,953,029,582,942,851,000 | 33.184466 | 88 | 0.652655 | false | 3.622428 | false | false | false |
nict-isp/scn-openflow-driver | src/ncps_openflow/protocols/application/tcp.py | 1 | 13729 | # -*- coding: utf-8 -*-
"""
protocols.application.tcp
~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: Copyright (c) 2015, National Institute of Information and Communications Technology.All rights reserved.
:license: GPL3, see LICENSE for more details.
"""
import logging
from protocols.application.application import Server
fro... | gpl-3.0 | 1,546,076,728,354,864,000 | 27.365702 | 134 | 0.571127 | false | 3.753144 | false | false | false |
csningli/MultiAgent | examples/avoid_static_obstacle/static_sim.py | 1 | 2287 |
# MultiAgent 2.0
# (c) 2017-2018, NiL, csningli@gmail.com
import sys, math
sys.path.append("../..")
from mas.multiagent import *
from mas.extension import ShowLabelObject
POS_ERROR = 5
SPIN_SPEED = math.pi / 6.0
class SpinModule(ObjectModule) :
def act(self, resp) :
resp.add_msg(Message(key = "avel", ... | apache-2.0 | -4,195,351,703,851,307,000 | 23.591398 | 108 | 0.589418 | false | 3.314493 | false | false | false |
olivierverdier/sfepy | sfepy/mechanics/matcoefs.py | 1 | 12857 | # -*- coding: utf-8 -*-
from sfepy.base.base import *
##
# c: 22.07.2008
def youngpoisson_to_lame( young, poisson, plane = 'strain' ):
r"""
The relationship between Lame parameters and Young's modulus, Poisson's
ratio (see [1],[2]):
.. math::
\lambda = {\nu E \over (1+\nu)(1-2\nu)},\qquad \mu ... | bsd-3-clause | -4,280,246,495,239,971,000 | 33.371658 | 81 | 0.496227 | false | 3.13231 | false | false | false |
opennode/waldur-mastermind | src/waldur_mastermind/booking/processors.py | 1 | 4711 | from django.db import transaction
from django.utils import timezone
from django.utils.dateparse import datetime_re, parse_datetime
from django.utils.translation import ugettext_lazy as _
from rest_framework.serializers import ValidationError
from waldur_mastermind.booking.utils import (
get_offering_bookings,
... | mit | 1,439,147,289,079,598,300 | 37.933884 | 99 | 0.545956 | false | 4.846708 | false | false | false |
frac/lettuce | tests/functional/output_features/success_table/success_table_steps.py | 1 | 1617 | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010> Gabriel Falcão <gabriel@nacaolivre.org>
#
# 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, ei... | gpl-3.0 | 2,192,169,248,575,762,400 | 28.925926 | 71 | 0.686881 | false | 3.380753 | false | false | false |
prculley/gramps | gramps/plugins/view/geofamily.py | 1 | 20779 | # -*- python -*-
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2011-2016 Serge Noiraud
#
# 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 ver... | gpl-2.0 | 6,691,864,510,758,257,000 | 40.39243 | 104 | 0.455893 | false | 4.626809 | false | false | false |
iScrE4m/RSES | tests/objects/test_stock.py | 1 | 2053 | # coding=utf-8
from pytest import raises
from rses.src.objects import stock
import rses_errors
def test_ingredient_type_create(ingredient_type_no_create):
ingredient_type = stock.IngredientType(name=ingredient_type_no_create)
assert ingredient_type.id
assert ingredient_type.name == ingredient_type_no_cre... | mit | 7,995,718,306,625,569,000 | 39.254902 | 75 | 0.651242 | false | 3.725953 | false | false | false |
kimbauters/sparsepy | search_structure.py | 1 | 8409 | import textwrap # used for embellishing the Graphviz DOT file layout
class Node:
# since we will be using a lot of Node instances, optimise the memory use by relying on slots rather than a dict
__slots__ = ['problem', 'parent', 'action', 'effect', 'state', 'is_goal', 'children',
'visit... | mit | 5,978,570,223,246,047,000 | 68.663866 | 120 | 0.625996 | false | 4.255567 | false | false | false |
alexanderganderson/Diffusion-Probabilistic-Models | regression.py | 1 | 8365 | """
Defines the function approximators
"""
import numpy as np
import theano.tensor as T
# from theano.tensor.signal import downsample
from blocks.bricks import Activation, MLP, Initializable, application, Identity
from blocks.bricks.conv import ConvolutionalActivation
from blocks.initialization import IsotropicGaussi... | mit | 2,050,625,259,363,093,200 | 42.341969 | 128 | 0.618649 | false | 3.549003 | false | false | false |
downpoured/labs_coordinate_pictures | src/tools/ben_python_img/img_tests.py | 1 | 15862 |
import img_utils
import img_convert_resize
import img_resize_keep_exif
import PIL
from PIL import Image
import sys
sys.path.append('bn_python_common.zip')
from bn_python_common import *
def img_utils_testGetMarkFromFilename():
# tests splitting a filename that contains the "__MARKAS__" marker.
assertEq(('/tes... | gpl-3.0 | 5,360,751,421,662,296,000 | 48.26087 | 123 | 0.696129 | false | 3.27119 | true | false | false |
sunweaver/ganetimgr | apply/urls/user.py | 1 | 2001 | # -*- coding: utf-8 -*- vim:fileencoding=utf-8:
# 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 ... | gpl-3.0 | -2,009,622,974,093,488,000 | 54.583333 | 167 | 0.684658 | false | 3.403061 | false | false | false |
luisxiaomai/robotframework-anywherelibrary | src/AnywhereLibrary/base/logging.py | 1 | 1083 | import os
#from robot.variables import GLOBAL_VARIABLES
from robot.libraries.BuiltIn import BuiltIn
from robot.api import logger
from keywordgroup import KeywordGroup
class Logging(KeywordGroup):
# Private
def _debug(self, message):
logger.debug(message)
def _get_log_dir(self):
logfile =... | mit | -5,113,758,825,957,334,000 | 27.5 | 53 | 0.615882 | false | 3.909747 | false | false | false |
regebro/hovercraft | hovercraft/generate.py | 1 | 8341 | import os
import re
import shutil
from lxml import etree, html
from pkg_resources import resource_string
from .parse import rst2xml, SlideMaker
from .position import position_slides
from .template import (
Template,
CSS_RESOURCE,
JS_RESOURCE,
JS_POSITION_HEADER,
JS_POSITION_BODY,
OTHER_RESOURCE... | mit | -971,954,912,299,686,000 | 33.754167 | 88 | 0.602686 | false | 4.010096 | false | false | false |
GluuFederation/cluster-tools | recovery/recovery.py | 1 | 10339 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright (c) 2016 Gluu
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limi... | mit | 5,439,546,729,971,558,000 | 31.309375 | 96 | 0.610697 | false | 4.261748 | false | false | false |
mancoast/CPythonPyc_test | cpython/234_test_sax.py | 1 | 19309 | # regression test for SAX 2.0 -*- coding: iso-8859-1 -*-
# $Id: test_sax.py,v 1.24.16.1 2004/03/20 08:20:03 fdrake Exp $
from xml.sax import make_parser, ContentHandler, \
SAXException, SAXReaderNotAvailable, SAXParseException
try:
make_parser()
except SAXReaderNotAvailable:
# do... | gpl-3.0 | -2,254,858,870,572,087,000 | 26.782734 | 117 | 0.5702 | false | 3.682815 | true | false | false |
osuripple/pep.py | objects/chatFilters.py | 1 | 1250 | class chatFilters:
def __init__(self, fileName="filters.txt"):
"""
Initialize chat filters
:param fileName: name of the file containing filters. Default: filters.txt
"""
self.filters = {}
self.loadFilters(fileName)
def loadFilters(self, fileName="filters.txt"):
"""
Load filters from a file
:param... | agpl-3.0 | -5,941,986,136,163,623,000 | 22.148148 | 76 | 0.672 | false | 3.501401 | false | false | false |
Autostew/autostew | autostew_back/event_handlers/collision.py | 1 | 4077 | from autostew_back.event_handlers.base_event_handler import BaseEventHandler
from autostew_web_enums.models import EventType, ParticipantState
from autostew_web_session.models.event import Event
from autostew_web_session.models.participant import Participant
warn_at = 0.7
environment_crash_multiplier = 0.1
class Han... | agpl-3.0 | 1,326,310,007,162,899,000 | 49.333333 | 131 | 0.704194 | false | 3.908917 | false | false | false |
47lining/nucleator-core | lib/nucleator/cli/cli.py | 1 | 5116 | # Copyright 2015 47Lining LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | apache-2.0 | 9,091,823,914,105,722,000 | 40.934426 | 146 | 0.585418 | false | 4.324598 | false | false | false |
robcarver17/pysystemtrade | sysobjects/production/roll_state.py | 1 | 2906 | from enum import Enum
from syscore.objects import named_object
RollState = Enum("RollState",(
"No_Roll",
"Passive",
"Force",
"Force_Outright",
"Roll_Adjusted"))
default_state = RollState.No_Roll
roll_adj_state = RollState.Roll_Adjusted
roll_explanations = {
RollState.No_Roll:"No rolling happ... | gpl-3.0 | 1,969,242,482,449,701,400 | 36.25641 | 179 | 0.681693 | false | 3.45541 | false | false | false |
Bajoo/client-pc | bajoo/common/periodic_task.py | 1 | 5677 | # -*- coding: utf-8 -*-
import logging
from threading import Timer, Lock
from ..promise import Deferred, CancelledError
_logger = logging.getLogger(__name__)
class PeriodicTask(object):
"""Generic Thread-based service, executing a task at regular interval.
The task is executed first right after the call to... | gpl-3.0 | -4,949,742,910,043,404,000 | 33.198795 | 79 | 0.550114 | false | 4.593042 | false | false | false |
spillai/procgraph | src/procgraph_mpl/plot_anim.py | 1 | 1093 |
__all__ = [
'PlotAnim',
]
class PlotAnim(object):
def __init__(self):
self.handle_line = {}
self.handle_text = {}
self.pylab = None
def set_pylab(self, pylab):
self.pylab = pylab
def assert_pylab_given(self):
if self.pylab is None:... | lgpl-3.0 | -8,553,758,529,945,379,000 | 26.325 | 65 | 0.511436 | false | 3.717687 | false | false | false |
GregSilverman/cohort_rest_api | rest_api/build_atom.py | 1 | 14183 | #!/usr/bin/env python
from sqlalchemy import between
from sqlalchemy.sql import and_, label
from app import db, models
import htsql_methods as hsql
Clinical = models.ClinicalData
Attribute = models.Attribute
"""
Example SQL atomic query for modified nested model:
select *
from
clinical_data
(selec... | gpl-3.0 | -4,821,364,456,509,184,000 | 34.019753 | 131 | 0.476345 | false | 4.509698 | false | false | false |
crakensio/django_training | lib/python2.7/site-packages/bpython/curtsiesfrontend/interaction.py | 1 | 4789 | import greenlet
import time
import curtsies.events as events
from bpython.repl import Interaction as BpythonInteraction
from bpython.curtsiesfrontend.manual_readline import char_sequences as rl_char_sequences
class StatusBar(BpythonInteraction):
"""StatusBar and Interaction for Repl
Passing of control back ... | cc0-1.0 | -3,079,365,304,622,484,500 | 37.007937 | 129 | 0.618083 | false | 4.007531 | false | false | false |
cltrudeau/django-awl | awl/templatetags/awltags.py | 1 | 4065 | # awl.templatetags.awltags.py
from django import template
register = template.Library()
# ============================================================================
@register.filter
def getitem(dictionary, keyvar):
"""Custom django template filter that allows access to an item of a
dictionary through the ... | mit | -5,902,167,371,774,256,000 | 28.456522 | 78 | 0.512423 | false | 4.521691 | false | false | false |
squidsrc/python-rocksdb | setup.py | 1 | 1079 | from setuptools import setup, find_packages
from distutils.extension import Extension
from Cython.Build import cythonize
extension_defaults = {
'extra_compile_args': [
'-std=gnu++11',
'-O3',
'-Wall',
'-Wextra',
'-Wconversion',
'-fno-strict-aliasing'
],
'langu... | bsd-3-clause | 5,162,525,097,040,509,000 | 21.479167 | 51 | 0.578313 | false | 3.382445 | false | false | false |
nateprewitt/pipenv | pipenv/project.py | 1 | 17449 | # -*- coding: utf-8 -*-
import json
import os
import re
import sys
import base64
import hashlib
import contoml
import delegator
import pipfile
import toml
from .utils import (
mkdir_p, convert_deps_from_pip, pep423_name, recase_file,
find_requirements, is_file, is_vcs, python_version, cleanup_toml,
is_ins... | mit | 562,355,048,727,634,100 | 32.41954 | 101 | 0.562224 | false | 4.038194 | false | false | false |
mrcslws/nupic.research | projects/dynamic_sparse/runs/run_test.py | 1 | 1756 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2019, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 | 5,158,335,504,190,792,000 | 31.518519 | 73 | 0.646925 | false | 3.720339 | false | false | false |
wendlers/scratch-pynetsense | example-src/WrappedRemoteSensor.py | 1 | 2457 | ##
# This file is part of the Scratch Remote Sensor (SRS) Library project
#
# Copyright (C) 2012 Stefan Wendler <sw@kaltpost.de>
#
# The SRS 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; eith... | lgpl-2.1 | -1,918,675,807,934,093,300 | 26.606742 | 74 | 0.699634 | false | 3.450843 | false | false | false |
luotao1/Paddle | python/paddle/tensor/logic.py | 1 | 16431 | # Copyright (c) 2020 PaddlePaddle 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 app... | apache-2.0 | 1,783,713,438,296,025,000 | 35.676339 | 128 | 0.585296 | false | 3.685734 | false | false | false |
alsrgv/tensorflow | tensorflow/python/ops/math_grad.py | 1 | 57271 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 2,105,415,834,781,362,400 | 33.54222 | 81 | 0.653891 | false | 3.030212 | false | false | false |
robled/rocket-depot | setup.py | 1 | 2523 | import subprocess
from distutils.log import warn, info
from setuptools import setup
setup(
name='rocket-depot',
version='1.0.0',
scripts=['rocket-depot'],
# metadata for upload to PyPI
platforms='linux',
author='David Roble',
author_email='robled@electronsweatshop.com',
maintainer='Dav... | gpl-3.0 | 8,640,305,625,367,821,000 | 38.421875 | 70 | 0.604439 | false | 3.513928 | false | false | false |
swegener/gruvi | lib/gruvi/address.py | 1 | 3675 | #
# This file is part of Gruvi. Gruvi is free software available under the
# terms of the MIT license. See the file "LICENSE" that was provided
# together with this source file for the licensing terms.
#
# Copyright (c) 2012-2014 the Gruvi authors. See the file "AUTHORS" for a
# complete list.
from __future__ import a... | mit | -7,268,691,083,574,085,000 | 34.336538 | 88 | 0.661224 | false | 3.832117 | false | false | false |
harrystech/arthur-redshift-etl | python/etl/monitor.py | 1 | 36933 | """
Monitoring (and logging) for ETL steps.
This module provides a context for the ETL that allows to monitor
the start time of an ETL step along with its successful or
unsuccessful completion. Events for start, finish or failure
may be emitted to a persistence layer.
"""
import http.server
import itertools
import l... | mit | -3,399,315,863,732,583,000 | 38.123941 | 110 | 0.600601 | false | 4.132595 | true | false | false |
linuxrocks123/MailTask | mt_chronos.py | 1 | 1986 | #! /usr/bin/env python
# MailTask Alpha: The Email Manager
# Copyright (C) 2015 Patrick Simmons
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your ... | gpl-3.0 | -4,021,911,731,758,143,000 | 37.192308 | 84 | 0.703424 | false | 3.677778 | false | false | false |
codesy/codesy | payments/migrations/0001_initial.py | 1 | 1590 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-08-03 23:59
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migration... | agpl-3.0 | -4,125,141,983,997,128,000 | 38.75 | 118 | 0.597484 | false | 4.184211 | false | false | false |
Dutchj/pbtweeter | pbtweeter/speedrun.py | 1 | 1678 | import config as cfg
import json
from datetime import datetime
from urllib2 import urlopen, quote
def get_lb():
try:
response = urlopen('http://www.speedrun.com/api_records.php?amount=999&game='+quote(cfg.game))
return json.load(response)
except Exception, e:
print datetime.now().strft... | gpl-2.0 | -8,179,702,171,126,471,000 | 37.136364 | 102 | 0.564958 | false | 4.043373 | false | false | false |
mjirik/lisa | lisa/vessels_segmentation.py | 1 | 3265 | #! /usr/bin/python
# -*- coding: utf-8 -*-
# import funkcí z jiného adresáře
import sys
import os.path
import io3d
path_to_script = os.path.dirname(os.path.abspath(__file__))
#import featurevector
import unittest
from loguru import logger
# logger = logging.getLogger()
# import apdb
# apdb.set_trace();
# import sc... | bsd-3-clause | -3,153,561,909,537,196,000 | 23.89313 | 94 | 0.616069 | false | 3.238332 | false | false | false |
voilet/cmdb | assets/ztree/api.py | 1 | 11656 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# =============================================================================
# FileName: api.py
# Desc: 2015-15/4/16:下午5:54
# Author: 苦咖啡
# Email: voilet@qq.com
# HomePage: http://blog.kukafei520.net
# History:
# =======================... | agpl-3.0 | 1,779,326,221,662,780,700 | 34.814241 | 136 | 0.585927 | false | 3.702945 | false | false | false |
Cygnus-Inc/Cygnet-Adapter | docs/conf.py | 1 | 1240 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import sys
sys.path.append(os.path.abspath('src/cygnet_adapter'))
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
... | apache-2.0 | -935,034,756,308,814,500 | 27.181818 | 81 | 0.670161 | false | 2.966507 | false | true | false |
Aeronautics/aero | aero/commands/install.py | 1 | 1362 | # -*- coding: utf-8 -*-
from aero.__version__ import __version_info__
__author__ = 'nickl-'
from .base import CommandProcessor as CommandProcessor
class InstallCommand(CommandProcessor):
from .base import coroutine
package = ''
adapter = ''
def wiring(self):
self.out = self.write()
... | bsd-3-clause | -6,355,324,622,234,375,000 | 24.698113 | 101 | 0.556535 | false | 4.29653 | false | false | false |
pmghalvorsen/gramps_branch | gramps/gui/editors/displaytabs/groupembeddedlist.py | 1 | 14240 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
# 2009 Benny Malengier
#
# 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; ei... | gpl-2.0 | -4,655,648,685,835,140,000 | 34.073892 | 86 | 0.523596 | false | 4.143148 | false | false | false |
mdevaev/emonoda | emonoda/plugins/confetti/pushover.py | 1 | 3447 | """
Emonoda -- A set of tools to organize and manage your torrents
Copyright (C) 2015 Devaev Maxim <mdevaev@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either vers... | gpl-3.0 | 4,823,935,925,674,717,000 | 35.670213 | 128 | 0.577314 | false | 4.260816 | false | false | false |
yusukemurayama/ppytrading | ppyt/filters/historical_filters.py | 1 | 1741 | # coding: utf-8
import logging
from sqlalchemy.sql import func
from ppyt.filters import FilterBase
from ppyt.models.orm import start_session, History
logger = logging.getLogger(__name__)
class AverageVolumeFilter(FilterBase):
"""平均出来形で銘柄を絞り込むクラスです。"""
_findkey = '平均出来高フィルタ' # フィルタを一意に特定できる名前をつけます。
def... | mit | -2,557,690,650,821,079,000 | 24.240741 | 79 | 0.567865 | false | 2.325939 | false | false | false |
Magic-Translater/Pwntools.Doc.In.Zh-cn | source/conf.py | 1 | 11053 | # -*- coding: utf-8 -*-
#
# pwntools documentation build configuration file, created by
# sphinx-quickstart on Wed May 28 15:00:52 2014.
#
# 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 file.
#
# Al... | mit | -6,300,908,279,611,668,000 | 30.670487 | 156 | 0.689406 | false | 3.678203 | true | false | false |
stephenlienharrell/roster-dns-management | test/dnsrmacl_test.py | 1 | 8124 | #!/usr/bin/python
# Copyright (c) 2009, Purdue University
# 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 ... | bsd-3-clause | -5,292,346,615,663,352,000 | 39.217822 | 80 | 0.64094 | false | 3.32542 | true | false | false |
Camiloasc1/AstronomyUNAL | CelestialMechanics/orbits/test/test_ellipse.py | 1 | 4276 | import unittest
from astropy import constants as astroconst
from astropy import units as u
from astropy.time import Time
from CelestialMechanics.kepler import constants
from CelestialMechanics.orbits import ellipse
from CelestialMechanics.orbits.ellipse import delta_t_t0_aeangle
class MyTestCase(unittest.TestCase):... | mit | -1,451,791,043,087,483,000 | 40.115385 | 106 | 0.600094 | false | 2.709759 | true | false | false |
qtproject/qt3d | tools/utils/exporters/blender/qt3d_armature_export.py | 2 | 5606 | #############################################################################
##
## Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
## Contact: https://www.qt.io/licensing/
##
## This file is part of the Qt3D module of the Qt Toolkit.
##
## $QT_BEGIN_LICENSE:LGPL$
## Commercial License Usage
## Licensees holdin... | lgpl-3.0 | 1,695,850,950,272,810,000 | 32.568862 | 106 | 0.620407 | false | 3.890354 | false | false | false |
aroig/metadata-readers | libs/docmeta/utils.py | 1 | 2250 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# docmeta - A python module to extract metadata from document files
# Copyright 2012 Abdó Roig-Maranges <abdo.roig@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... | gpl-3.0 | 8,381,212,299,770,244,000 | 32.073529 | 84 | 0.618497 | false | 3.711221 | false | false | false |
jhamman/xray | xarray/backends/netCDF4_.py | 1 | 13873 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools
import operator
import numpy as np
from .. import Variable
from ..conventions import pop_to
from ..core import indexing
from ..core.utils import (FrozenOrderedDict, NdimSizeLenMixin,
... | apache-2.0 | -2,989,005,801,748,905,500 | 36.904372 | 79 | 0.579975 | false | 4.148624 | false | false | false |
mvtuong/mysite | v1/blog/migrations/0002_auto_20150708_1454.py | 1 | 1092 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='blog',
name='file',
... | apache-2.0 | 8,163,413,012,375,880,000 | 27 | 82 | 0.540293 | false | 4.368 | false | false | false |
arnikz/EMF_data_mining | DEA/mzscore.py | 1 | 12015 | #!/usr/bin/env python
#
# This script takes a database (SQLite) obtained from the PIQMIe service and populates
# additional tables/views to facilitate differential protein expression analyses based
# on standardized SILAC ratios.
#
# Note:
# z_score_{raw|norm}_ratio - column with canonical Z-score transformed raw/no... | gpl-3.0 | 7,526,957,426,108,315,000 | 33.426934 | 247 | 0.627549 | false | 2.870968 | false | false | false |
brando56894/Dungeon-Quest | player.py | 1 | 8551 | #!/usr/bin/python2
#
#~~Player Functions~~
from superRandom import superRandint, superChoice
from time import sleep
import actions
import monsters
class CreatePlayer(object):
def __init__(self, name):
self.health = 125
self.xp = 0 #TODO: use gained XP to gain levels
self.potions = 0
... | gpl-3.0 | 426,067,084,616,806,100 | 36.017316 | 105 | 0.535376 | false | 3.603456 | false | false | false |
adelina-t/compute-hyperv | hyperv/nova/serialproxy.py | 1 | 3962 | # Copyright 2015 Cloudbase Solutions Srl
# 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 r... | apache-2.0 | -2,187,697,925,085,981,000 | 31.47541 | 78 | 0.572438 | false | 4.232906 | false | false | false |
Auzzy/pyinq | pyinq/tests/test_results.py | 1 | 9565 | """
Copyright (c) 2012-2013, Austin Noto-Moniz (metalnut4@netscape.net)
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND... | isc | 8,524,622,938,886,892,000 | 30.883333 | 124 | 0.716675 | false | 3.599925 | true | false | false |
neogi/machine-learning | clustering_and_retrieval/gaussian_mixture_model/em-gmm.py | 1 | 11332 | # Imports
import sframe
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import multivariate_normal
import copy
from PIL import Image
from io import BytesIO
import matplotlib.mlab as mlab
import colorsys
def generate_MoG_data(num_data, means, covariances, weights):
data = []
for i in range(... | gpl-3.0 | 2,065,051,852,382,707,500 | 33.867692 | 119 | 0.623544 | false | 3.323167 | true | false | false |
xorpaul/check_mk | modules/automation.py | 1 | 45601 | #!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ /... | gpl-2.0 | -6,314,698,494,620,364,000 | 35.774194 | 120 | 0.551162 | false | 3.909465 | false | false | false |
nilmtk/nilmtk | nilmtk/dataset_converters/greend/convert_greend.py | 1 | 6684 | from os import listdir, getcwd
from os.path import join, isdir, isfile, dirname, abspath
import pandas as pd
import numpy as np
import datetime
import time
from nilmtk.datastore import Key
from nilmtk.measurement import LEVEL_NAMES
from nilm_metadata import convert_yaml_to_hdf5
import warnings
import numpy as np
from i... | apache-2.0 | 5,599,120,602,864,636,000 | 34.553191 | 111 | 0.565679 | false | 4.024082 | false | false | false |
CIGIHub/greyjay | greyjay/content_notes/apps.py | 1 | 1139 | from django.apps import AppConfig
class EndNotesAppConfig(AppConfig):
name = 'greyjay.content_notes'
label = 'content_notes'
verbose_name = "Wagtail end notes"
def ready(self):
from greyjay.articles.models import ArticlePage
from wagtail.wagtailadmin.edit_handlers import (
... | mit | 8,242,842,528,254,381,000 | 28.205128 | 69 | 0.507463 | false | 4.973799 | false | false | false |
rew4332/tensorflow | tensorflow/python/ops/array_ops.py | 1 | 94317 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 7,509,335,684,078,603,000 | 32.012601 | 86 | 0.633067 | false | 3.451674 | false | false | false |
kubeflow/pipelines | samples/core/parallel_join/parallel_join.py | 1 | 1802 | #!/usr/bin/env python3
# Copyright 2019 The Kubeflow 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 applica... | apache-2.0 | 2,698,934,252,417,545,000 | 30.614035 | 85 | 0.667037 | false | 3.412879 | false | false | false |
openstack/networking-odl | networking_odl/journal/journal.py | 1 | 10979 | # Copyright (c) 2015 OpenStack Foundation
# 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 ... | apache-2.0 | 8,686,914,835,769,035,000 | 35.596667 | 79 | 0.637034 | false | 3.726748 | false | false | false |
tgbugs/pyontutils | ilxutils/ilxutils/nltklib.py | 1 | 6030 | '''
nltk.download(['wordnet', 'stopwords', 'punkt']) if not already downloaded.
Should add to wordnet if you want more words to compare as reference to.
'''
from nltk import word_tokenize, pos_tag
from nltk.corpus import wordnet as wn
from nltk.corpus import stopwords
from fuzzywuzzy import fuzz, process
stop_words = s... | mit | -8,744,749,470,656,482,000 | 27.443396 | 147 | 0.587231 | false | 3.268293 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.