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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nyu-dl/WebNav | convert2emb.py | 1 | 2769 | '''
Convert article's text in the dataset to word embeddings using a pretrained word2vec dictionary.
'''
import h5py
import numpy as np
from nltk.tokenize import wordpunct_tokenize
import nltk
import utils
import cPickle as pkl
import os
import parameters as prm
import time
def compute_emb(pages_path_in, pages_path_ou... | bsd-3-clause | -5,497,543,181,166,937,000 | 34.5 | 179 | 0.558685 | false | 3.344203 | false | false | false |
SysTheron/adhocracy | src/adhocracy/lib/democracy/delegation_node.py | 1 | 13057 | from datetime import datetime
import logging
from sqlalchemy import or_
from adhocracy import model
from adhocracy.model import Delegation
log = logging.getLogger(__name__)
# REFACT: Rename: DelegationTraverser? Maybe thats also a new object
# that does the traversing in different ways
# That may become a Strategy ... | agpl-3.0 | -6,489,310,189,579,756,000 | 43.111486 | 107 | 0.630543 | false | 4.346538 | false | false | false |
theodi/signin-web | RFIDiot_Bits/odi-multiselect.py | 1 | 1846 | #!/usr/bin/python
# odi-multiselect.py - continuously read cards and post numbers to defined REST endpoint
#
# Adapted from multiselect.py, pacakaged as part of the RFIDiot library. (c) Adam Laurie
#
# This code is copyright (c) David Tarrant, 2013, All rights reserved.
# The following terms apply:
#
# This c... | mit | 8,844,806,863,099,645,000 | 28.301587 | 89 | 0.705309 | false | 3.314183 | false | false | false |
jprchlik/cms2_python_helpers | create_fit_plots_wrapper.py | 1 | 2144 | import sys, getopt
import create_fit_plots as cfp
def main(argv):
inargs1 = 'ht:c:o:f:l:'
snargs1 = inargs1[1:].split(':')
inargs2 = ['time','cmsdir','outdir','fitfile','loopfile']
helpinfo = "create_model_files_wrapper.py is a command line utility which calls the class create_model_files\n"
he... | mit | 7,184,129,804,112,462,000 | 30.529412 | 153 | 0.596082 | false | 3.329193 | false | false | false |
ContinuumIO/ashiba | enaml/enaml/qt/qt_frame.py | 1 | 2010 | #------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-------------------------------------------------... | bsd-3-clause | -79,735,812,177,728,620 | 28.558824 | 79 | 0.498507 | false | 4.785714 | false | false | false |
ukuleleplayer/pureples | setup.py | 1 | 1291 | from setuptools import setup
setup(
name='pureples',
version='0.0',
author='adrian, simon',
author_email='mail@adrianwesth.dk',
maintainer='simon, adrian',
maintainer_email='mail@adrianwesth.dk',
url='https://github.com/ukuleleplayer/pureples',
license="MIT",
description='HyperNEAT ... | mit | 1,199,683,710,172,937,200 | 43.517241 | 115 | 0.650658 | false | 3.774854 | false | false | false |
theanalyst/cinder | cinder/volume/drivers/vmware/error_util.py | 1 | 2271 | # Copyright (c) 2013 VMware, 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | apache-2.0 | 6,477,092,069,620,219,000 | 29.689189 | 78 | 0.721268 | false | 4.268797 | false | false | false |
parksandwildlife/wastd | wastd/contrib/sites/migrations/0001_initial.py | 1 | 1068 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import django.contrib.sites.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Site',
fields=[
... | mit | 6,190,446,289,729,111,000 | 32.375 | 117 | 0.522472 | false | 4.663755 | false | false | false |
gamernetwork/gn-django | tests/gn_django_tests/test_video.py | 1 | 6595 | import unittest
from itertools import chain
from gn_django.video import facebook, twitch, youtube
class TestFacebook(unittest.TestCase):
"""
Test cases for Facebook helper functions
"""
valid_urls = (
'https://www.facebook.com/watch/live/?v=1844067005728897',
'http://www.facebook.com/... | mit | -7,827,708,248,405,796,000 | 37.343023 | 101 | 0.621228 | false | 3.124112 | true | false | false |
MathYourLife/TSatPy-thesis | tex/sample_scripts/Controllers_05.py | 1 | 3623 |
import time
import numpy as np
import matplotlib.pyplot as plt
from TSatPy import Controller, State
from TSatPy import StateOperator as SO
from TSatPy.Clock import Metronome
from GradientDescent import GradientDescent
print("Test P - Attitude and Body Rate Control")
run_time = 60
speed = 20
c = Metronome()
c.set_spe... | mit | -975,508,984,488,423,700 | 23.815068 | 72 | 0.556169 | false | 2.621563 | true | false | false |
mcr/ietfdb | ietf/person/models.py | 1 | 6025 | # Copyright The IETF Trust 2007, All Rights Reserved
import datetime
from django.db import models
from django.contrib.auth.models import User
from ietf.person.name import name_parts, initials
class PersonInfo(models.Model):
time = models.DateTimeField(default=datetime.datetime.now) # When this Person recor... | bsd-3-clause | -5,651,668,828,004,410,000 | 37.621795 | 146 | 0.614606 | false | 3.919974 | false | false | false |
dash-dash/pyzmq-mdp | setup.py | 1 | 1319 | # -*- coding: utf-8 -*-
"""Module containing worker functionality for the MDP implementation.
For the MDP specification see: http://rfc.zeromq.org/spec:7
"""
__license__ = """
This file is part of MDP.
MDP is free software: you can redistribute it and/or modify
it under the terms of the GNU General Publ... | gpl-3.0 | -3,930,020,499,070,619,600 | 30.404762 | 72 | 0.662623 | false | 3.594005 | false | false | false |
Scandie/openprocurement.tender.esco | openprocurement/tender/esco/tests/tender.py | 1 | 3188 | # -*- coding: utf-8 -*-
import unittest
from openprocurement.tender.openeu.constants import TENDERING_DAYS
from openprocurement.tender.esco.tests.base import (
test_tender_data, test_lots, test_bids,
BaseESCOWebTest, BaseESCOEUContentWebTest,
)
from openprocurement.api.tests.base import snitch
from openprocure... | apache-2.0 | 2,218,055,869,105,780,500 | 32.914894 | 104 | 0.752823 | false | 3.197593 | true | false | false |
LukaszObara/LeNet5 | DataProcessing.py | 1 | 2677 | # DataProcessing.py
# Libraries
# Third-Party Libraries
import pandas as pd
import numpy as np
def augment(data: np.array, size: int) -> np.array:
import scipy.ndimage
augmented_data = data[np.random.randint(data.shape[0], size=size), :]
for i, aug in enumerate(augmented_data):
random_values = np.... | mit | 5,176,013,660,405,668,000 | 27.417582 | 70 | 0.627568 | false | 2.668993 | false | false | false |
examachine/pisi | pisi/archive.py | 1 | 12143 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005, TUBITAK/UEKAE
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option)
# any later version.
#
# Plea... | gpl-3.0 | 2,765,044,694,155,434,000 | 35.79697 | 107 | 0.555052 | false | 3.936143 | false | false | false |
lukovkin/ufcnn-keras | models/create_signals_bid_ask_multiplefiles.py | 1 | 15205 | from __future__ import absolute_import
from __future__ import print_function
import sys
import glob
from copy import copy, deepcopy
import numpy as np
# import matplotlib.pyplot as plt
import pandas as pd
pd.set_option('display.width', 1000)
pd.set_option('display.max_rows', 1000)
from signals import *
def find_... | mit | 1,587,396,667,713,151,700 | 38.596354 | 155 | 0.517659 | false | 3.582705 | false | false | false |
jacebrowning/gridcommand | gridcommand/routes/_formatters.py | 1 | 3337 | """Formats domain objects for route responses."""
from collections import OrderedDict
from flask import url_for
from ._bases import Formatter
# TODO: figure out a better way to serialize objects without parent objects
# pylint: disable=arguments-differ
class GameFormatter(Formatter):
"""Serializes games into... | lgpl-3.0 | -6,029,994,102,759,506,000 | 28.27193 | 80 | 0.596644 | false | 4.124845 | false | false | false |
5GExchange/mapping | hybrid/ResourceSharingStrategy.py | 1 | 8177 | # Copyright 2017 Balazs Nemeth, Mark Szalay, Janos Doka
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | -5,094,964,472,777,556,000 | 41.373057 | 144 | 0.633973 | false | 3.730383 | false | false | false |
awsdocs/aws-doc-sdk-examples | python/example_code/dynamodb/GettingStarted/MoviesItemOps03a.py | 1 | 1449 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Purpose
Shows how to update an item in an Amazon DynamoDB table that stores movies.
The update is performed in two steps:
1. The item is retrieved by using its primary and secondary keys.
2.... | apache-2.0 | 2,896,480,785,095,140,400 | 32.5 | 83 | 0.666667 | false | 3.595533 | false | false | false |
StartupsPoleEmploi/labonneboite | labonneboite/common/load_data.py | 1 | 8478 | import os
import pickle
import csv
import pandas as pd
import math
from functools import lru_cache, reduce
from collections import defaultdict
USE_ROME_SLICING_DATASET = False # Rome slicing dataset is not ready yet
if USE_ROME_SLICING_DATASET:
OGR_ROME_FILE = "rome_slicing_dataset/ogr_rome_mapping.csv"
ROM... | agpl-3.0 | -1,503,132,164,283,685,000 | 28.4375 | 134 | 0.607926 | false | 3.227255 | false | false | false |
timothydmorton/transit | setup.py | 1 | 4320 | #!/usr/bin/env python
# encoding: utf-8
import re
import os
try:
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext as _build_ext
except ImportError:
from distutils.core import setup, Extension
from distutils.command.build_ext import build_ext as _build_ext
de... | mit | -2,627,024,856,407,422,000 | 29.20979 | 76 | 0.577778 | false | 4.110371 | false | false | false |
utzig/rastreio | rastreio/rastreio.py | 1 | 3738 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os.path
import re
import sys
import requests
import gevent
try:
from html.parser import HTMLParser
except ImportError:
from HTMLParser import HTMLParser
COMMENT = "^\s*#"
class TableParser(HTMLParser):
"""
T... | mit | -4,670,546,664,483,328,000 | 28.179688 | 89 | 0.564926 | false | 3.788032 | false | false | false |
spgill/python-spgill | spgill/printer/modules/utility.py | 1 | 2449 | # stdlib imports
import math
# vendor imports
# local imports
from spgill.printer import commands
class UtilityModule:
"""Mixin for utility functions. Nuff said."""
def progress(self, n, caption=None, zeropad=False, width=None):
"""Write a progress bar with `n` from 0 to 100"""
width = widt... | mit | 6,182,663,993,454,536,000 | 22.32381 | 79 | 0.462638 | false | 3.969206 | false | false | false |
Passtechsoft/TPEAlpGen | blender/release/scripts/addons/render_auto_tile_size.py | 1 | 15195 | # BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed i... | gpl-3.0 | 1,330,872,926,750,225,400 | 34.502336 | 153 | 0.642777 | false | 3.609264 | false | false | false |
misli/cmsplugin-articles | cmsplugin_articles/models.py | 1 | 4565 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement
from cms.models import Page, CMSPlugin, PlaceholderField
from django.conf import settings
from django.core.exceptions import ValidationError
from django.core.urlresolve... | bsd-3-clause | -1,204,766,179,426,961,700 | 36.418033 | 125 | 0.631763 | false | 4.022026 | false | false | false |
splotz90/urh | src/urh/ui/ui_options.py | 1 | 25225 | # -*- coding: utf-8 -*-
#
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_DialogOptions(object):
def setupUi(self, DialogOptions):
DialogOptions.setObjectName("DialogOptions")
DialogOptions.resize(696, 653)
icon = QtGui.QIcon.fr... | gpl-3.0 | 2,843,582,473,850,296,000 | 71.485632 | 460 | 0.741328 | false | 4.043116 | false | false | false |
platinhom/ManualHom | Coding/Python/scipy-html-0.16.1/generated/scipy-signal-filtfilt-1.py | 1 | 2375 | # The examples will use several functions from `scipy.signal`.
from scipy import signal
import matplotlib.pyplot as plt
# First we create a one second signal that is the sum of two pure sine
# waves, with frequencies 5 Hz and 250 Hz, sampled at 2000 Hz.
t = np.linspace(0, 1.0, 2001)
xlow = np.sin(2 * np.pi * 5 * t)
... | gpl-2.0 | 3,619,175,486,744,199,000 | 31.986111 | 70 | 0.704421 | false | 2.817319 | false | false | false |
vrbagalkote/avocado-misc-tests-1 | io/disk/ssd/nvmetest.py | 1 | 8116 | #!/usr/bin/env python
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that ... | gpl-2.0 | 8,352,796,707,823,800,000 | 35.558559 | 78 | 0.576023 | false | 3.759148 | true | false | false |
xkjyeah/gdfmm | demo/demo_rgb_corr.py | 1 | 1988 | #!/usr/bin/env python
import cv2
import numpy as np
import matplotlib.pyplot as plt
import os
import gdfmm
missing_mask = (cv2.imread('missing_mask.png', cv2.CV_LOAD_IMAGE_UNCHANGED) == 0)
for i in xrange(100):
if os.path.isfile('images/rgb%d.png' % i) and \
os.path.isfile('images/dep%d.png' % i) and \
... | bsd-2-clause | -4,390,210,656,708,027,000 | 37.980392 | 87 | 0.527163 | false | 3.346801 | false | false | false |
GoogleCloudPlatform/appengine-python-standard | src/google/appengine/datastore/datastore_stub_util.py | 1 | 173757 | #!/usr/bin/env python
#
# Copyright 2007 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 632,228,481,035,689,100 | 30.409436 | 95 | 0.663829 | false | 3.791503 | false | false | false |
charityscience/csh-sms | modules/text_processor.py | 1 | 10816 | import logging
import string
from datetime import datetime
from django.utils import timezone
from django.core.exceptions import MultipleObjectsReturned
from management.models import Contact, Group, Message
from modules.texter import Texter
from modules.utils import quote, add_contact_to_group, keywords_without_word
f... | gpl-3.0 | 1,797,699,433,873,005,000 | 43.879668 | 146 | 0.571283 | false | 4.506667 | false | false | false |
yoseforb/lollypop | src/selectionlist.py | 1 | 13370 | #!/usr/bin/python
# Copyright (c) 2014-2015 Cedric Bellegarde <cedric.bellegarde@adishatz.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, either version 3 of the License, or
# (at your opti... | gpl-3.0 | 6,226,525,266,078,298,000 | 29.806452 | 77 | 0.553328 | false | 3.883241 | false | false | false |
MagiChau/ZonBot | extensions/util.py | 1 | 1563 | import asyncio
from discord.ext import commands
import checks
import discord
class Util():
def __init__(self, bot):
self.bot = bot
@commands.command(name='eval', pass_context=True)
@checks.is_owner()
async def eval(self, ctx, *, code : str):
"""Evaluates code
Usage: !eval <cod... | mit | -4,751,165,528,354,734,000 | 25.965517 | 73 | 0.523353 | false | 3.669014 | false | false | false |
vpv11110000/pyss | examples/1_example_3_15/1_example_3_15.py | 1 | 5595 | # #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
# Пример 3.15
Б.Я.Советов, Моделирование систем. Практикум: Учеб пособие для вузов/Б.Я. Советов, С.А. Яковлев.- 2-е изд., перераб. и доп.-М.:Высш. шк., 2003.-295 с.: ил.
Поток заявок поступает в накопитель с допустимой ёмкостью, равной 3 единицам, равномерно каждые 5+/... | mit | -7,208,947,746,968,788,000 | 29.666667 | 254 | 0.656071 | false | 2.348748 | false | false | false |
googleads/google-ads-python | google/ads/googleads/v8/services/types/detailed_demographic_service.py | 1 | 1267 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 829,231,411,696,871,400 | 31.487179 | 140 | 0.726914 | false | 3.874618 | false | false | false |
ortoloco/jordbruksmark | jordbruksmark/admin.py | 1 | 1460 | # -*- coding: utf-8 -*-
from django.contrib import admin, messages
from jordbruksmark.models import *
class ParzellenAdmin(admin.ModelAdmin):
list_display = ["__unicode__", "name"]
search_fields = ["id", "code", "name"]
class DuengungsstufenAdmin(admin.ModelAdmin):
list_display = ["__unicode__"]
... | gpl-3.0 | 5,250,728,470,260,427,000 | 32.953488 | 61 | 0.677397 | false | 2.973523 | false | false | false |
mirestrepo/voxels-at-lems | boxm/fill_internal_nodes.py | 1 | 1379 | import boxm_batch;
import os;
import optparse;
boxm_batch.register_processes();
boxm_batch.register_datatypes();
class dbvalue:
def __init__(self, index, type):
self.id = index # unsigned integer
self.type = type # string
print("Filling internal nodes");
#Parse inputs
parser = optparse.OptionParser... | bsd-2-clause | -807,465,746,511,493,400 | 24.537037 | 95 | 0.677302 | false | 3.05765 | false | false | false |
bdang2012/taiga-back-casting | taiga/base/exceptions.py | 1 | 6717 | # Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | agpl-3.0 | -6,705,860,471,032,478,000 | 29.247748 | 82 | 0.689352 | false | 4.124693 | false | false | false |
WZQ1397/automatic-repo | python/batch_url_alert/url_monitor/backend/smtpconnection.py | 1 | 2527 | #!/usr/bin/python
# -*- encoding: utf-8 -*-
import logging
import smtplib
from email.mime.text import MIMEText
from pony_monitor.conf import settings
class SMTPConnection(object):
"""
以后支持HTML的邮件
"""
def __init__(self, host=None, port=None, username=None, password=None,
use_tl... | lgpl-3.0 | -3,479,046,907,493,722,000 | 30.024691 | 82 | 0.559889 | false | 4.495528 | false | false | false |
Berserker66/omnitool | omnitool/Language/english.py | 1 | 3177 | __author__ = "Berserker66"
langversion = 1
langname = "English"
##updater
# text construct: "Version "+version+available+changelog
#example: Version 3 available, click here to download, or for changelog click here
available = " available, click here to download"
changelog = ", or for changelog click here"
##world ge... | mit | -2,946,727,446,511,887,000 | 19.235669 | 83 | 0.678628 | false | 2.6475 | false | false | false |
BestSonny/examples | center_loss/face_model.py | 1 | 1338 | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.model_zoo as model_zoo
from torchvision.models.resnet import BasicBlock, ResNet, model_urls
import math
class FaceModel(nn.Module):
def __init__(self,num_classes, pretrained=False, **kwargs):
super(FaceModel, self).__init... | bsd-3-clause | 1,860,480,812,853,672,400 | 35.162162 | 70 | 0.603886 | false | 3.170616 | false | false | false |
codedecde/ImageQA | Src/TheanoModel/Code/mlstm_theano.py | 1 | 19880 | #!/usr/bin/env python
import theano
import theano.tensor as T
import numpy
import numpy as np
import pickle as pkl
from collections import OrderedDict
import cPickle as pickle
from theano import config
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
floatX = config.floatX
def shared_to_cpu(sha... | mit | -1,631,124,483,685,562,000 | 37.15739 | 119 | 0.526408 | false | 3.095127 | false | false | false |
shahabsaf1/Python | plugins/torrents.py | 1 | 2317 | # -*- coding: utf-8 -*-
from __main__ import *
from utils import *
commands = [
'^torrent',
'^t ',
'^kickass'
]
parameters = {('query', True)}
description = 'Search Kickass Torrents. Results may be NSFW.'
action = 'typing'
def get_category_icon(category):
if category == 'Anime':
... | gpl-2.0 | 6,125,521,446,916,499,000 | 24.523256 | 175 | 0.495397 | false | 3.249288 | false | false | false |
LazerTrace/LazerTrace | vendor/openctm/bindings/python/openctm.py | 1 | 6310 | #------------------------------------------------------------------------------
# Product: OpenCTM
# File: openctm.py
# Description: Python API bindings (tested with Python 2.5.2 and Python 3.0)
#------------------------------------------------------------------------------
# Copyright (c) 2009-2010 Marcus G... | mit | 5,132,959,107,381,138,000 | 29.931373 | 111 | 0.750238 | false | 2.803199 | false | false | false |
harshavardhana/tweepy | tweepy/parsers.py | 1 | 2602 | # Tweepy
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
from models import ModelFactory
from common import import_simplejson
from error import TweepError
class Parser(object):
def parse(self, method, payload):
"""
Parse the response payload and return the result.
Retur... | apache-2.0 | -8,879,343,879,898,656,000 | 25.824742 | 107 | 0.604919 | false | 4.307947 | false | false | false |
shigh/dg-tinker | dg.py | 1 | 5209 |
import numpy as np
from numpy import newaxis
import scipy.sparse as sps
from scipy.sparse.linalg import spsolve
from pyfem.topo import Interval
from pyfem.poly import gll_points
from pyfem.sem import SEMhat
from pyfem.poly import eval_lagrange_d0 as eval_phi1d
from poly import eval_P
from utils import minmod
class ... | mit | -2,655,844,388,797,042,700 | 25.441624 | 77 | 0.489153 | false | 2.837146 | false | false | false |
kiall/designate-py3 | functionaltests/common/datagen.py | 1 | 4319 | """
Copyright 2015 Rackspace
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dist... | apache-2.0 | -2,687,240,077,220,593,000 | 30.525547 | 79 | 0.639963 | false | 3.566474 | false | false | false |
tschaume/ccsgp_get_started | ccsgp_get_started/examples/utils.py | 1 | 6069 | import sys, os, itertools, inspect, logging, math
import numpy as np
from uncertainties import ufloat
from uncertainties.umath import fsum
from decimal import Decimal
mass_titles = [ 'pi0', 'LMR', 'omphi', 'IMR' ]
eRanges = np.array([ Decimal(str(e)) for e in [ 0, 0.4, 0.75, 1.1, 3. ] ])
def getWorkDirs():
"""get in... | mit | 1,884,759,156,905,486,000 | 38.409091 | 86 | 0.605536 | false | 2.757383 | false | false | false |
borjam/exabgp | src/exabgp/configuration/neighbor/api.py | 3 | 4755 | # encoding: utf-8
"""
parse_process.py
Created by Thomas Mangin on 2015-06-05.
Copyright (c) 2009-2017 Exa Networks. All rights reserved.
License: 3-clause BSD. (See the COPYRIGHT file)
"""
import time
import copy
from collections import defaultdict
from exabgp.configuration.core import Section
from exabgp.configura... | bsd-3-clause | 2,026,195,772,931,803,600 | 23.384615 | 120 | 0.515037 | false | 3.989094 | false | false | false |
dschetel/counter | counter.py | 1 | 1557 | #!/usr/local/bin/python
# TimeTracking Program for Projects
from datetime import datetime
import time
from decimal import *
import sys
import os
import select
from termcolor import colored
os.system('cls' if os.name == 'nt' else 'clear')
# Set path for datafile
PATH='./tTrackData.txt'
getcontext().prec = 2
def o... | gpl-2.0 | -6,000,632,630,961,236,000 | 21.257143 | 73 | 0.647399 | false | 2.815552 | false | false | false |
imiolek-ireneusz/pysiogame | game_boards/game010.py | 1 | 11752 | # -*- coding: utf-8 -*-
import pygame
import random
import sys
from math import sqrt
import classes.board
import classes.extras as ex
import classes.game_driver as gd
import classes.level_controller as lc
import classes.simple_vector as sv
class Board(gd.BoardGame):
def __init__(self, mainloop, speaker, config,... | gpl-3.0 | 6,626,082,368,293,703,000 | 37.531148 | 119 | 0.509786 | false | 3.416279 | false | false | false |
yandex/mastermind | src/cocaine-app/jobs/tasks/minion_cmd.py | 1 | 2826 | import logging
import time
import elliptics
from tornado.httpclient import HTTPError
from infrastructure import infrastructure
from infrastructure_cache import cache
from jobs import TaskTypes, RetryError
from task import Task
logger = logging.getLogger('mm.jobs')
class MinionCmdTask(Task):
PARAMS = ('group'... | gpl-2.0 | 6,444,915,082,982,438,000 | 32.247059 | 92 | 0.57891 | false | 3.646452 | false | false | false |
coldeasy/python-driver | cassandra/cqltypes.py | 1 | 35173 | # Copyright 2013-2017 DataStax, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | apache-2.0 | 1,791,240,450,183,804,700 | 31.871963 | 201 | 0.618656 | false | 4.024371 | false | false | false |
augustog/ecrab | ECrab_Web/migrations/0002_auto_20161203_1518.py | 1 | 2107 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-12-03 18:18
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_depende... | gpl-3.0 | -4,112,987,239,918,332,000 | 37.309091 | 118 | 0.560987 | false | 4.335391 | false | false | false |
clones/django-coltrane | coltrane/templatetags/coltrane.py | 1 | 1800 | from django.db.models import get_model
from django import template
from django.contrib.comments.models import Comment, FreeComment
from template_utils.templatetags.generic_content import GenericContentNode
from coltrane.models import Entry, Link
register = template.Library()
class LatestFeaturedNode(GenericContent... | bsd-3-clause | 7,605,183,732,226,736,000 | 29 | 96 | 0.663333 | false | 3.947368 | false | false | false |
rizauddin/apgg | APGG.py | 1 | 2315 | #!/usr/bin/env python
'''
Generate a graph with weight using student id
with a fix predefined number of edges.
Draw a graph with matplotlib.
Must have matplotlib and NetworkX for this to work.
'''
__author__ = """Rizauddin Saian (rizauddin@perlis.uitm.edu.my)"""
try:
import matplotlib.pyplot as plt
import netw... | mit | -1,235,453,453,247,441,000 | 25.609195 | 79 | 0.587473 | false | 3.162568 | false | false | false |
iogf/candocabot | plugins/snarf/snarf.py | 1 | 1150 | import urllib
import urllib2
import re
from ircutils.ehp import *
from htmlentitydefs import name2codepoint as entity
MAX_SIZE = 262144
def chmsg(event, server):
nicka = event['nicka']
chan = event['channel']
msg = event['msg']
"""I need to make it handle other domains """
pointer = re.search('... | apache-2.0 | -1,255,561,008,929,268,200 | 24.577778 | 80 | 0.609565 | false | 3.402367 | false | false | false |
lpakula/django-ftp-deploy | ftp_deploy/server/views/service.py | 1 | 6971 | import json
from django.views.generic.base import View
from django.views.generic.detail import SingleObjectMixin
from django.views.generic import (ListView, UpdateView, DeleteView,
DetailView, CreateView)
from django.core.urlresolvers import reverse_lazy, reverse
from django.shortcuts... | mit | -8,609,571,675,612,642,000 | 33.004878 | 142 | 0.635203 | false | 4.343302 | false | false | false |
sluger/Restful-Django-Angular-Tutorial | formsettutorial/formsetapp/views.py | 1 | 5116 | from django.views.generic import CreateView, UpdateView
from django.shortcuts import redirect, render
from django.views.decorators.csrf import csrf_protect
from .models import Author, Book
from .forms import AuthorForm, BookFormSet, BookForm, AuthorFormSet
'''
Serverside Django views, not needed for restful services. ... | mit | 1,796,619,267,745,147,600 | 33.802721 | 86 | 0.632721 | false | 3.987529 | false | false | false |
jimsize/PySolFC | pysollib/gamedb.py | 1 | 29048 | #!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*-
# ---------------------------------------------------------------------------##
#
# Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
# Copyright (C) 2003 Mt. Hood Playing Card Co.
# Copyright (C) 2005-2009 Skomoroh
#
# This program is free so... | gpl-3.0 | 4,920,427,938,661,608,000 | 39.970381 | 79 | 0.499002 | false | 3.093504 | false | false | false |
ybenitezf/nstock | modules/app.py | 1 | 7648 | # coding: utf-8
from content_plugin import ContentPlugin
from z_whoosh import Whoosh
from gluon import current, URL
from gluon.storage import Storage
from gluon.cache import Cache
import perms
class Application(object):
def __init__(self):
super(Application, self).__init__()
# copy current conte... | mit | -3,492,867,501,608,093,000 | 31.683761 | 79 | 0.574922 | false | 3.558865 | false | false | false |
li-ma/homework | zookeeper/kazoo-pub.py | 1 | 1154 | import random
import kazoo
from kazoo.client import KazooClient
from kazoo.handlers.eventlet import SequentialEventletHandler
from kazoo.retry import KazooRetry
from kazoo.recipe.watchers import ChildrenWatch
from oslo_serialization import jsonutils
_handler = SequentialEventletHandler()
_retry = KazooRetry(max_tries=... | apache-2.0 | 1,515,694,696,601,710,000 | 31.055556 | 72 | 0.657712 | false | 3.287749 | false | false | false |
beeverycreative/BEEweb | src/octoprint/util/__init__.py | 1 | 34374 | # coding=utf-8
from __future__ import absolute_import
"""
This module bundles commonly used utility methods or helper classes that are used in multiple places withing
OctoPrint's source code.
"""
from __future__ import absolute_import, division, print_function
__author__ = "Gina Häußge <osd@foosel.net>"
__license__ =... | agpl-3.0 | -965,555,217,127,192,000 | 30.021661 | 158 | 0.678663 | false | 3.510212 | true | false | false |
D8TM/railtracker | mapfeed/fields.py | 1 | 17005 | # https://github.com/django-nonrel/djangotoolbox/blob/master/djangotoolbox/fields.py
# All fields except for BlobField written by Jonas Haag <jonas@lophus.org>
from django.core.exceptions import ValidationError
from django.utils.importlib import import_module
from django.db import models
from django.db.models.fields.s... | apache-2.0 | 6,344,079,010,264,808,000 | 37.735763 | 125 | 0.626874 | false | 4.394057 | false | false | false |
gberthou/raiders | components.py | 1 | 2144 | # Generated file: do not edit, use gen_comps.py instead
import ecs
class MovementTarget(ecs.Component):
def __init__(self, target):
self.target = target
class AttackTarget(ecs.Component):
def __init__(self, target, dt):
self.target = target
self.dt = dt
class Path(ecs.Component):
... | gpl-3.0 | -3,277,644,113,238,579,700 | 23.930233 | 55 | 0.621735 | false | 3.497553 | false | false | false |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-2.1/Lib/codeop.py | 1 | 2821 | """Utility to compile possibly incomplete Python source code."""
__all__ = ["compile_command"]
def compile_command(source, filename="<input>", symbol="single"):
r"""Compile a command and determine whether it is incomplete.
Arguments:
source -- the source string; may contain \n characters
filename --... | mit | 1,996,009,731,289,652,700 | 32.583333 | 79 | 0.65296 | false | 4.274242 | false | false | false |
smart-solution/icy | icy_partner_history/icy_partner_history.py | 2 | 13079 | # -*- coding: utf-8 -*-
###############################################
from osv import fields,osv
from tools.sql import drop_view_if_exists
class res_partner_history(osv.osv):
_name = "res_partner_history"
_description = "Partner History"
_auto = False
_columns = {
'date': fields.datetime('Datum', r... | lgpl-3.0 | -1,187,325,361,287,801,300 | 32.88342 | 146 | 0.706552 | false | 2.856301 | false | false | false |
simodalla/mezzanine_nowait | nowait/tests/test_forms.py | 1 | 1539 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.test import TestCase
from django.utils.timezone import now, timedelta
from .factories import BookingType30F, UserF
from ..models import Booking, SlotTime
from ..forms import BookingCreateForm
class BookingCreateFormTest(Tes... | bsd-3-clause | -8,847,872,106,724,114,000 | 35.642857 | 77 | 0.62833 | false | 3.92602 | true | false | false |
ondrokrc/gramps | gramps/gui/filters/sidebar/_citationsidebarfilter.py | 1 | 9120 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
# Copyright (C) 2011 Tim G L Lyons
#
# 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; eith... | gpl-2.0 | 7,421,645,341,716,028,000 | 39.896861 | 86 | 0.566996 | false | 3.880851 | false | false | false |
baifendian/harpc | python/bfd/harpc/zkclient.py | 1 | 1884 | # -*- coding: utf-8 -*-
# Copyright (C) 2015 Baifendian Corporation
#
# 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 | 7,831,133,068,014,573,000 | 36.68 | 117 | 0.640658 | false | 3.933194 | false | false | false |
Aloomaio/googleads-python-lib | examples/ad_manager/v201811/publisher_query_language_service/get_all_browsers.py | 1 | 1899 | #!/usr/bin/env python
#
# Copyright 2017 Google 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 | 7,414,707,478,289,868,000 | 33.527273 | 105 | 0.730384 | false | 4.066381 | false | false | false |
nsmoooose/csp | csp/tools/layout2/scripts/ui/CommandControlFactory.py | 1 | 5436 | import wx
from controls.OutputPane import OutputPane
class CommandControlMediator(object):
"""The purpose of this class is to hold a binding between a command
and several UI controls. This class is responsible for enabling and
disabling UI controls depending on if commands are available or not.
Call the apropria... | gpl-2.0 | 4,432,801,303,168,567,300 | 39.567164 | 198 | 0.744665 | false | 3.700477 | false | false | false |
nippoo/phy | phy/utils/_color.py | 1 | 2042 | # -*- coding: utf-8 -*-
"""Color routines."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import numpy as np
from random import uniform
from colorsys import hsv_to_rgb
#-------------------... | bsd-3-clause | 5,102,880,766,627,608,000 | 28.594203 | 79 | 0.358472 | false | 4.400862 | false | false | false |
murvet/dictionary | dictionary/topics/migrations/0005_auto_20160823_1357.py | 1 | 1924 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-08-23 13:57
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('topics', '0004_auto_2016082... | mit | 139,691,936,656,903,900 | 34.62963 | 133 | 0.598233 | false | 4.076271 | false | false | false |
lmtierney/watir-snake | nerodia/support/webserver.py | 1 | 3238 | import logging
import re
import socket
import threading
from os import path, chdir
try:
from urllib import request as urllib_request
except ImportError:
import urllib as urllib_request
try:
from http.server import HTTPServer, SimpleHTTPRequestHandler
from socketserver import ThreadingMixIn
except Impor... | mit | -7,264,690,536,604,879,000 | 30.134615 | 87 | 0.601915 | false | 4.067839 | false | false | false |
mlperf/training_results_v0.6 | NVIDIA/benchmarks/maskrcnn/implementations/pytorch/maskrcnn_benchmark/layers/roi_align.py | 1 | 2221 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
# Copyright (c) 2018-2019 NVIDIA CORPORATION. All rights reserved.
import torch
from torch import nn
from torch.autograd import Function
from torch.autograd.function import once_differentiable
from torch.nn.modules.utils import _pair
from maskrcnn... | apache-2.0 | 3,996,665,180,457,763,000 | 30.728571 | 85 | 0.606934 | false | 3.758037 | false | false | false |
diorcety/translate | translate/convert/test_ini2po.py | 1 | 5063 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from pytest import importorskip
from translate.convert import ini2po, test_convert
from translate.misc import wStringIO
importorskip("iniparse")
class TestIni2PO(object):
ConverterClass = ini2po.ini2po
def _convert(self, input_string, temp... | gpl-2.0 | -6,305,457,702,452,086,000 | 32.486667 | 79 | 0.605216 | false | 4.005582 | true | false | false |
YangXuefeng/SWEL | combine_dsm_wn_word.py | 1 | 6546 | # -*- coding: utf-8 -*-
"""
Created on Thu Sep 25 15:38:00 2014
@author: Yang Xuefeng
"""
from __future__ import division
import os
import numpy as np
import cPickle as cp
from collections import defaultdict as dd
def exist_number(w1,w2,s):
n = [1 for i in s if w1 in i and w2 in i]
return len(n)
#import gc
... | mit | -1,585,718,721,414,777,300 | 31.899497 | 95 | 0.480752 | false | 2.654501 | false | false | false |
nonZero/OpenCommunity | src/users/permissions.py | 1 | 2686 | from acl.default_roles import DefaultGroups, ALL_PERMISSIONS
"""
These functions work with anonymous users as well, and therefore are not a
part of the OCUser model.
"""
def load_community_permissions(user, community, committee=None):
from users.models import Membership
if user.is_authenticated():
tr... | bsd-3-clause | -4,073,170,830,451,126,000 | 29.522727 | 80 | 0.669769 | false | 4.183801 | false | false | false |
Motsai/neblina-python | neblinaUART.py | 1 | 2947 | #!/usr/bin/env python
###################################################################################
#
# Copyright (c) 2010-2016 Motsai
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Softwa... | mit | -3,687,489,549,640,990,000 | 34.939024 | 97 | 0.609433 | false | 4.424925 | false | false | false |
bgribble/mfp | mfp/scale.py | 1 | 1168 |
class Scale (object):
def __init__(self):
pass
class Tuning (object):
def __init__(self):
pass
class EqualTemper (Tuning):
def __init__(self, a4=440.0):
Tuning.__init__(self)
self.base_frequencies = [261.63, 277.18, 293.66, 311.13, 329.63,
... | gpl-2.0 | 6,901,891,649,023,727,000 | 24.955556 | 72 | 0.536815 | false | 3.165312 | false | false | false |
21strun/django-maintenancemode | maintenancemode/middleware.py | 1 | 2206 | #!/usr/bin/env python
# coding: utf-8
import re
import django
from django.conf import settings
from django.core import urlresolvers
from .models import MaintenanceMode
if django.VERSION[:2] <= (1, 3):
from django.conf.urls import defaults as urls
else:
from django.conf import urls
from maintenancemode.con... | bsd-3-clause | 3,300,159,293,919,983,600 | 32.938462 | 79 | 0.670444 | false | 4.162264 | false | false | false |
malon/presupuesto | budget_app/loaders/aragon_bulk_budget_loader.py | 1 | 24371 | # -*- coding: UTF-8 -*-
from budget_app.models import *
from collections import namedtuple
from decimal import *
import csv
import os
import re
class AragonBulkBudgetLoader:
BudgetId = namedtuple('BudgetId', 'entity_id year')
Uid = namedtuple('Uid', 'dimension is_expense is_actual chapter article concept subco... | gpl-2.0 | -1,430,959,750,375,316,000 | 48.299595 | 199 | 0.547261 | false | 4.227391 | false | false | false |
apache/airflow | airflow/example_dags/tutorial_taskflow_api_etl_virtualenv.py | 2 | 3481 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | -4,492,695,085,183,687,700 | 30.080357 | 97 | 0.675381 | false | 3.946712 | false | false | false |
borisd13/GridCompute | source/admin/database_management.py | 1 | 2862 | '''This module contains administrator functions for database management.'''
# Copyright 2014 Boris Dayma
#
# This file is part of GridCompute.
#
# GridCompute 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 Fo... | gpl-3.0 | -2,417,606,905,046,536,000 | 39.478261 | 114 | 0.662823 | false | 4.271642 | false | false | false |
NicolasLM/spinach | spinach/contrib/sentry_sdk_spinach.py | 1 | 2397 | from sentry_sdk.hub import Hub
from sentry_sdk.integrations import Integration
from spinach import signals
class SpinachIntegration(Integration):
"""Register the Sentry SDK integration.
Exceptions making jobs fail are sent to Sentry and performance
tracing of Spinach tasks is enabled.
:param send_r... | bsd-2-clause | 4,695,782,351,937,375,000 | 28.9625 | 76 | 0.659992 | false | 3.942434 | false | false | false |
fcurella/cookiejar | setup.py | 1 | 1555 | import os
import sys
from setuptools import setup, find_packages
def read(fname):
try:
with open(os.path.join(os.path.dirname(__file__), fname)) as fh:
return fh.read()
except IOError:
return ''
requirements = read('REQUIREMENTS').splitlines()
tests_requirements = read('TEST-REQU... | mit | -8,612,719,314,905,511,000 | 29.490196 | 72 | 0.639871 | false | 4.168901 | false | false | false |
ncbray/pystream | sandbox/interface_vec.py | 1 | 22906 | # Copyright 2011 Nicholas Bray
#
# 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 | 8,601,827,295,417,819,000 | 19.110623 | 134 | 0.671527 | false | 2.386788 | false | false | false |
p-l-/miasm | miasm2/jitter/jitload.py | 1 | 13521 | #!/usr/bin/env python
import logging
from functools import wraps
from collections import Sequence, namedtuple
from miasm2.jitter.csts import *
from miasm2.core.utils import *
from miasm2.core.bin_stream import bin_stream_vm
from miasm2.ir.ir2C import init_arch_C
hnd = logging.StreamHandler()
hnd.setFormatter(logging... | gpl-2.0 | 6,448,087,656,768,726,000 | 30.444186 | 80 | 0.586347 | false | 3.820571 | false | false | false |
freakboy3742/django | django/core/mail/message.py | 10 | 17291 | import mimetypes
from email import (
charset as Charset, encoders as Encoders, generator, message_from_string,
)
from email.errors import HeaderParseError
from email.header import Header
from email.headerregistry import Address, parser
from email.message import Message
from email.mime.base import MIMEBase
from emai... | bsd-3-clause | 3,841,961,167,435,941,400 | 37.339246 | 105 | 0.609739 | false | 4.317353 | false | false | false |
jason-neal/companion_simulations | simulators/tcm_module.py | 1 | 7702 | import logging
import os
import numpy as np
import pandas as pd
from logutils import BraceMessage as __
from tqdm import tqdm
import simulators
from mingle.models.broadcasted_models import two_comp_model
from mingle.utilities.chisqr import chi_squared
from mingle.utilities.phoenix_utils import load_starfish_spectrum
... | mit | 396,135,552,089,401,860 | 42.514124 | 113 | 0.611529 | false | 3.489805 | false | false | false |
ATRAN2/fureon | backend/fureon/exceptions.py | 1 | 1628 | from fureon.utils.logger import main_logger
class ExceptionWithLogger(Exception):
def __init__(self, message, logger, level='warning'):
super(ExceptionWithLogger, self).__init__(message)
exception_name = self.__class__.__name__
logger_message = u'{0}: {1}'.format(exception_name, message)
... | apache-2.0 | -6,531,733,261,743,192,000 | 35.177778 | 73 | 0.692875 | false | 4.174359 | false | false | false |
richrd/bx | logger.py | 1 | 2699 | # -*- coding: utf-8 -*-
"""
Logging capabilities for the IRC Bot.
"""
import time
from helpers import *
LOG_NORMAL = "norm"
LOG_INFO = "info"
LOG_WARNING = "warn"
LOG_ERROR = "error"
class colors:
BLACK = '\033[30m'
GRAY = '\033[37m'
GREEN = '\033[32m'
MAGENTA = '\033[95m'
VIOLET = '\033[95m'
... | apache-2.0 | -427,284,577,334,323,100 | 27.114583 | 81 | 0.545758 | false | 3.232335 | false | false | false |
psesh/Effective-Quadratures | equadratures/distributions/rayleigh.py | 1 | 3285 | """The Rayleigh distribution."""
from equadratures.distributions.template import Distribution
import numpy as np
from scipy.stats import rayleigh
RECURRENCE_PDF_SAMPLES = 8000
class Rayleigh(Distribution):
"""
The class defines a Rayleigh object. It is the child of Distribution.
:param double scale:
Scal... | mit | -6,373,363,622,737,242,000 | 35.098901 | 125 | 0.591781 | false | 3.938849 | false | false | false |
JaneliaSciComp/osgpyplusplus | examples/osggraphicscost.py | 1 | 2179 | #!/bin/env python
# This is a C++ example from the OpenSceneGraph source code, converted to python
# /* OpenSceneGraph example, osgterrain.
# *
# * 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 t... | bsd-3-clause | -790,878,742,279,204,200 | 38.618182 | 107 | 0.708123 | false | 3.919065 | false | false | false |
ricmoo/pycoind | pycoind/util/key.py | 1 | 3854 | # The MIT License (MIT)
#
# Copyright (c) 2014 Richard Moore
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, mod... | mit | -1,387,571,464,477,286,000 | 37.54 | 82 | 0.6863 | false | 3.357143 | false | false | false |
stevearc/dynamo3 | dynamo3/exception.py | 1 | 1948 | """ Exceptions and exception logic for DynamoDBConnection """
import sys
from pprint import pformat
import botocore
class DynamoDBError(botocore.exceptions.BotoCoreError):
""" Base error that we get back from Dynamo """
fmt = "{Code}: {Message}\nArgs: {args}"
def __init__(self, status_code, exc_info=N... | mit | 195,750,149,695,767,780 | 26.43662 | 76 | 0.684292 | false | 4.348214 | false | false | false |
kodiful/plugin.video.garapon.tv | resources/lib/item.py | 1 | 5427 | # -*- coding: utf-8 -*-
import datetime
import time
import re
import os
import sys
import io
from urllib.parse import urlencode
from PIL import Image
from sqlite3 import dbapi2 as sqlite
from resources.lib.common import Common
from resources.lib.genre import Genre
from resources.lib.request import Request
from reso... | gpl-2.0 | -6,783,332,626,776,033,000 | 36.464286 | 124 | 0.523546 | false | 3.364336 | false | false | false |
michaeljoseph/cookiecutter | cookiecutter/utils.py | 1 | 2734 | # -*- coding: utf-8 -*-
"""Helper functions used throughout Cookiecutter."""
from __future__ import unicode_literals
import contextlib
import errno
import logging
import os
import stat
import shutil
import sys
from cookiecutter.prompt import read_user_yes_no
logger = logging.getLogger(__name__)
def force_delete(f... | bsd-3-clause | 5,201,034,186,949,158,000 | 23.630631 | 86 | 0.631309 | false | 3.76066 | false | false | false |
ToAruShiroiNeko/revscoring | revscoring/features/feature.py | 1 | 7513 | """
.. autoclass:: revscoring.Feature
:members:
"""
from math import log as math_log
from ..dependencies import Dependent
# Sets up refences to overloaded function names
math_max = max
math_min = min
class Feature(Dependent):
"""
Represents a predictive feature.
:Parameters:
name : str
... | mit | 48,726,279,513,784,540 | 23.632787 | 78 | 0.593238 | false | 4.208964 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.