repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
evaimg/evaimg.github.com-src | fabfile.py | 1 | 1202 | from fabric.api import *
import fabric.contrib.project as project
import os
# Local path configuration (can be absolute or relative to fabfile)
env.deploy_path = 'output'
DEPLOY_PATH = env.deploy_path
# Remote server configuration
production = 'root@localhost:22'
dest_path = '/var/www'
def clean():
if os.path.is... | gpl-3.0 | 5,417,073,050,236,019,000 | 22.115385 | 73 | 0.638103 | false | 3.434286 | false | false | false |
Iconik/eve-suite | src/view/mainwindow/ui_main_window.py | 1 | 11751 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_main_window.ui'
#
# Created: Thu Mar 17 23:49:49 2011
# by: pyside-uic 0.2.7 running on PySide 1.0.0~rc1
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_MainWindow(object):
def... | gpl-3.0 | -2,131,063,382,454,420,000 | 55.768116 | 138 | 0.698068 | false | 3.797996 | false | false | false |
brews/tellervo-python | setup.py | 1 | 2727 | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
setup(
... | gpl-3.0 | -3,332,022,091,024,898,600 | 32.666667 | 85 | 0.669967 | false | 4.106928 | false | false | false |
zrathustra/mmap | ggh.py | 1 | 3730 | import random as rand
from sage.all import ZZ
from sage.rings.all import RR, QQ, PolynomialRing, Zmod
from sage.rings.arith import next_prime
from sage.functions.all import log, ceil, sqrt
from sage.misc.misc_c import prod
from sage.modules.free_module_element import vector, zero_vector
from sage.stats.distributions.d... | mit | 5,958,476,133,199,366,000 | 34.52381 | 113 | 0.57882 | false | 3.01536 | false | false | false |
autopkg/grahamgilbert-recipes | Puppetlabs/PuppetAgentProductsURLProvider.py | 1 | 3740 | #!/usr/bin/python
#
# Copyright 2015 Timothy Sutton, w/ insignificant contributions by Allister Banks
#
# 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/LI... | apache-2.0 | 4,626,130,896,801,874,000 | 35.31068 | 96 | 0.598396 | false | 3.974495 | false | false | false |
willyrv/ms-PSMC | ms2psmcfa.py | 1 | 1714 | #!/usr/bin/env python
import sys, argparse
parser = argparse.ArgumentParser(description="Converts the output of MS into \
psmcfa format (the input file of psmc)")
parser.add_argument("-s", "--bin_size", type=int, default=100,
help="The equivalent of bin_size in... | mit | 2,101,995,728,499,882,800 | 33.979592 | 78 | 0.63769 | false | 3.296154 | false | false | false |
sigurdga/nidarholm | accounts/forms.py | 1 | 2609 | from django.db import models
from django.contrib.auth.models import User, Group
from django.contrib.auth.forms import AuthenticationForm
from django import forms
from accounts.models import UserProfile
from django.forms.formsets import formset_factory
from django.forms.models import modelformset_factory, inlineformset_... | agpl-3.0 | 8,675,676,005,309,572,000 | 44.77193 | 205 | 0.658873 | false | 4.013846 | false | false | false |
storiesofsolidarity/story-database | stories/serializers.py | 1 | 5628 | from django.conf import settings
from rest_framework import serializers
from models import Location, Story
from localflavor.us.us_states import US_STATES
from people.models import Author
from people.serializers import AuthorSerializer
STORY_PREVIEW_MAX_COUNT = 3
STORY_PREVIEW_MAX_LENGTH = 100
# to remove
class Loca... | agpl-3.0 | -8,122,191,654,548,970,000 | 37.547945 | 112 | 0.653873 | false | 4.051836 | false | false | false |
noironetworks/group-based-policy | gbpservice/neutron/db/migration/alembic_migrations/versions/b6e301d5757f_application_policy_group.py | 1 | 1862 | # 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
# d... | apache-2.0 | 2,764,178,118,187,971,600 | 32.854545 | 78 | 0.65145 | false | 3.687129 | false | false | false |
olof/svtplay-dl | lib/svtplay_dl/service/cmore.py | 1 | 4971 | from __future__ import absolute_import
from __future__ import unicode_literals
import logging
import re
from urllib.parse import urljoin
from urllib.parse import urlparse
from svtplay_dl.error import ServiceError
from svtplay_dl.fetcher.hls import hlsparse
from svtplay_dl.service import Service
class Cmore(Service)... | mit | 6,163,772,104,817,491,000 | 36.37594 | 150 | 0.5689 | false | 3.760212 | true | false | false |
jacoblevine/PhenoGraph | phenograph/bruteforce_nn.py | 1 | 2423 | """
Compute k-nearest neighbors using brute force search in parallel
via scipy.spatial.distance.cdist and multiprocessing.Pool
psutil is used to evaluate available memory and minimize the number
of parallel jobs for the available resources
"""
import numpy as np
from scipy.spatial.distance import cdist
from multiproc... | mit | -1,221,271,518,629,119,200 | 26.224719 | 120 | 0.660751 | false | 3.914378 | false | false | false |
bitglue/shinysdr | shinysdr/plugins/ghpsdr.py | 1 | 6648 | # Copyright 2014, 2015, 2016 Kevin Reid <kpreid@switchb.org>
#
# This file is part of ShinySDR.
#
# ShinySDR 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 | 2,744,608,956,330,167,300 | 32.918367 | 90 | 0.603189 | false | 3.709821 | false | false | false |
idaholab/raven | framework/MessageHandler.py | 1 | 13476 | # Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 | -2,850,405,187,183,728,000 | 36.853933 | 127 | 0.675942 | false | 3.922002 | false | false | false |
ogonbat/django-shorty | shorty/admins.py | 2 | 1910 | from shorty.utils import url_encode
from django.contrib import admin
__author__ = 'cingusoft'
#admin section
class UrlAdmin(admin.ModelAdmin):
date_hierarchy = 'created'
list_display = ('url_field','show_slug','user','status','is_protected','created')
list_display_links = ('url_field',)
#list_editable... | lgpl-3.0 | 6,498,760,609,118,806,000 | 30.327869 | 89 | 0.610995 | false | 3.946281 | false | false | false |
ratnania/pigasus | python/multigrid/multilevel.py | 1 | 12450 | # -*- coding: UTF-8 -*-
"""Generic GMG solver"""
__docformat__ = "restructuredtext en"
from warnings import warn
import scipy
import numpy
__all__ = ['multilevel_solver']
class level:
"""Stores one level of the multigrid hierarchy
All level objects will have an 'A' attribute referencing the matrix
of... | mit | 5,843,988,426,219,080,000 | 29.589681 | 92 | 0.502892 | false | 3.720861 | false | false | false |
Lyrositor/moul-scripts | Python/ki/xMarkerBrainUser.py | 1 | 6335 | # -*- coding: utf-8 -*-
""" *==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, 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... | gpl-3.0 | 2,033,298,938,458,134,300 | 32.877005 | 99 | 0.640726 | false | 3.917749 | false | false | false |
plumgrid/plumgrid-nova | tools/xenserver/destroy_cached_images.py | 24 | 1946 | """
destroy_cached_images.py
This script is used to clean up Glance images that are cached in the SR. By
default, this script will only cleanup unused cached images.
Options:
--dry_run - Don't actually destroy the VDIs
--all_cached - Destroy all cached images instead of just unused cached
... | apache-2.0 | 8,075,085,348,729,097,000 | 27.202899 | 78 | 0.623844 | false | 3.678639 | false | false | false |
5225225/rtv | tests/test_terminal.py | 1 | 17690 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re
import os
import curses
import codecs
import six
import pytest
from rtv.docs import HELP, COMMENT_EDIT_FILE
from rtv.objects import Color
from rtv.exceptions import TemporaryFileError, MailcapEntryNotFound
try:
from unittest import mock
e... | mit | 6,218,785,795,478,843,000 | 31.408088 | 78 | 0.639421 | false | 3.582605 | true | false | false |
Ultimaker/Cura | plugins/DigitalLibrary/src/DigitalFactoryProjectModel.py | 1 | 2503 | # Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import List, Optional
from PyQt5.QtCore import Qt, pyqtSignal
from UM.Logger import Logger
from UM.Qt.ListModel import ListModel
from .DigitalFactoryProjectResponse import DigitalFactoryProjectResponse
PROJECT... | lgpl-3.0 | -117,025,161,842,275,890 | 38.109375 | 129 | 0.669596 | false | 4.011218 | false | false | false |
votervoice/openstates | openstates/ok/events.py | 1 | 1610 | import re
import datetime
import time
import pytz
import lxml.html
from pupa.scrape import Scraper, Event
class OKEventScraper(Scraper):
_tz = pytz.timezone('CST6CDT')
def scrape(self, chamber=None):
chambers = [chamber] if chamber is not None else ['upper']
for chamber in chambers:
... | gpl-3.0 | 6,088,113,025,590,962,000 | 33.255319 | 81 | 0.549689 | false | 3.252525 | false | false | false |
lilchurro/vent | vent/helpers/meta.py | 1 | 21703 | import datetime
import docker
import json
import math
import multiprocessing
import os
import pkg_resources
import platform
import re
import requests
from subprocess import check_output, Popen, PIPE
from vent.api.templates import Template
from vent.helpers.paths import PathDirs
from vent.helpers.logs import Logger
l... | apache-2.0 | -225,670,770,956,904,030 | 37.617438 | 125 | 0.492236 | false | 4.37737 | true | false | false |
kurtraschke/camelot | camelot/__init__.py | 1 | 1312 | # ============================================================================
#
# Copyright (C) 2007-2010 Conceptive Engineering bvba. All rights reserved.
# www.conceptive.be / project-camelot@conceptive.be
#
# This file is part of the Camelot Library.
#
# This file may be used under the terms of the GNU General... | gpl-2.0 | 3,956,184,204,709,217,000 | 42.733333 | 79 | 0.674543 | false | 4.087227 | false | false | false |
317070/kaggle-heart | configurations/je_test.py | 1 | 9741 | from deep_learning_layers import ConvolutionOver2DAxisLayer, MaxPoolOverAxisLayer, MaxPoolOver2DAxisLayer, \
MaxPoolOver3DAxisLayer, ConvolutionOver3DAxisLayer, ConvolutionOverAxisLayer
from default import *
import functools
import theano.tensor as T
from layers import MuLogSigmaErfLayer, CumSumLayer
import layers
... | mit | 2,966,186,508,157,458,400 | 40.987069 | 145 | 0.561955 | false | 3.50018 | false | false | false |
wuzheng-sjtu/FastFPN | libs/datasets/city.py | 1 | 5856 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import tensorflow as tf
import tensorflow.contrib.slim as slim
from tensorflow.python.lib.io.tf_record import TFRecordCompressionType
_FILE_PATTERN = 'city_%s_*.tfrecord'
SPLITS_TO_SIZES = {'train'... | apache-2.0 | -4,368,693,146,969,014,000 | 41.434783 | 121 | 0.678791 | false | 3.18088 | false | false | false |
umlfri/umlfri2 | umlfri2/ufl/types/structured/variablemetadata.py | 1 | 2846 | from ..base.type import UflType, UflAttributeDescription
class UflVariableMetadataType(UflType):
def __init__(self, metadata_type, underlying_type):
metadata = {}
for name, type in metadata_type.items():
metadata[name] = UflAttributeDescription(name, type)
next_type = ... | gpl-3.0 | -1,647,157,628,922,019,800 | 36.946667 | 125 | 0.64617 | false | 4.071531 | false | false | false |
anotherjesse/nova | nova/tests/glance/stubs.py | 1 | 1140 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 Citrix Systems, 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/LICE... | apache-2.0 | 5,501,775,592,373,386,000 | 29.810811 | 78 | 0.662281 | false | 3.838384 | false | false | false |
jonaskje/cchef-math | templates.py | 1 | 4062 | # vim: set tabstop=8 shiftwidth=8 expandtab:
types = dict (
double = dict(
name = 'double',
zero = '0.0',
one = '1.0',
sqrt = 'sqrt',
typeSuffix = 'd',
),
float = dict(
name = 'float',
... | mit | 1,239,360,678,374,717,200 | 17.547945 | 75 | 0.371738 | false | 2.97147 | false | false | false |
jsouza/pamtl | src/mtl/partl_regression.py | 1 | 6972 | from itertools import izip
import numpy as np
import scipy as sp
from sklearn.base import BaseEstimator, RegressorMixin
from sklearn.utils import check_array, extmath
__author__ = 'desouza'
class PARTLRegressor(BaseEstimator, RegressorMixin):
"""
Online Task Relationship Learning algorithm proposed by Sa... | mit | 4,134,933,629,266,708,000 | 28.294118 | 78 | 0.505307 | false | 3.480779 | false | false | false |
liumengjun/django-static-precompiler | static_precompiler/management/commands/compilestatic.py | 1 | 3299 | import os
import sys
import django
import django.contrib.staticfiles.finders
import django.core.files.storage
import django.core.management.base
from static_precompiler import exceptions, settings, utils
def get_scanned_dirs():
dirs = set()
if settings.STATIC_ROOT:
dirs.add(settings.STATIC_ROOT)
... | mit | -8,868,561,066,244,211,000 | 35.655556 | 98 | 0.543498 | false | 4.960902 | false | false | false |
agoose77/hivesystem | tutorial/layers/layer5/layershive.py | 2 | 3743 | # translation of layers.hivemap to hive system Python code
#find out where the hivemaps are
import os
import hivemaps
hivemapsdir = os.path.split(hivemaps.__file__)[0]
if not len(hivemapsdir): hivemapsdir = "."
action1hivemapfile = os.path.join(hivemapsdir, "action1.hivemap")
action2hivemapfile = os.path.join(hivemap... | bsd-2-clause | 970,173,458,782,025,300 | 27.572519 | 65 | 0.701309 | false | 2.965927 | false | false | false |
bongtrop/peach | peach/fuzzy/base.py | 6 | 4571 | ################################################################################
# Peach - Computational Intelligence for Python
# Jose Alexandre Nalon
#
# This file: fuzzy/fuzzy.py
# Fuzzy logic basic definitions
################################################################################
# Doc string, reStructur... | lgpl-2.1 | -3,479,241,759,327,574,000 | 28.688312 | 80 | 0.504266 | false | 4.571 | false | false | false |
ShaguptaS/faker | faker/providers/internet.py | 1 | 4044 | from __future__ import unicode_literals
from . import BaseProvider
import random
import re
from faker.providers.lorem import Provider as Lorem
class Provider(BaseProvider):
safe_email_tlds = ('org', 'com', 'net')
free_email_domains = ('gmail.com', 'yahoo.com', 'hotmail.com')
tlds = ('com', 'com', 'com', '... | mit | 4,615,283,915,182,011,000 | 31.878049 | 119 | 0.560089 | false | 3.45641 | false | false | false |
tanbro/exosip2ctypes | src/exosip2ctypes/utils.py | 1 | 2977 | # -*- coding: utf-8 -*-
"""
Some helper functions
"""
from __future__ import absolute_import, unicode_literals
import logging
__all__ = ['to_bytes', 'to_str', 'to_unicode', 'LoggerMixin']
if bytes != str: # Python 3
#: Define text string data type, same as that in Python 2.x.
unicode = str
... | gpl-3.0 | -2,007,577,341,453,639,200 | 29.336842 | 94 | 0.57306 | false | 3.494131 | false | false | false |
Erotemic/hotspotter | _graveyard/_broken/MainWindow.py | 2 | 17501 | from PyQt4 import QtCore, QtGui
from PyQt4.Qt import QObject, pyqtSignal, QFileDialog
from MainSkel import Ui_mainSkel
import multiprocessing
from PyQt4.Qt import QMainWindow, QTableWidgetItem, QMessageBox, \
QAbstractItemView, QWidget, Qt, pyqtSlot, pyqtSignal, \
QStandardItem, QStandardItemModel, QSt... | apache-2.0 | 2,173,761,121,248,932,400 | 41.581509 | 112 | 0.616708 | false | 3.337974 | false | false | false |
stackdump/txbitwrap | txbitwrap/storage/postgres.py | 1 | 5479 | from string import Template
from twisted.internet.defer import inlineCallbacks
from twisted.enterprise import adbapi
ProgrammingError = Exception # FIXME
TOKEN_MAX = 65536
def connect(**kwargs):
""" create new connection pool """
dbpool = adbapi.ConnectionPool(
"psycopg2",
cp_min=3,
c... | mit | -5,308,692,846,363,749,000 | 25.857843 | 85 | 0.566892 | false | 3.938893 | false | false | false |
edx/edx-val | edxval/transcript_utils.py | 1 | 3768 | """
A module containing transcripts utils.
"""
# pylint: disable=inconsistent-return-statements
import json
from pysrt import SubRipFile, SubRipItem, SubRipTime
from pysrt.srtexc import Error
from edxval.exceptions import TranscriptsGenerationException
class Transcript:
"""
Container for transcript methods... | agpl-3.0 | -1,132,600,385,978,478,500 | 29.885246 | 101 | 0.566348 | false | 4.131579 | false | false | false |
bgribble/mfp | mfp/builtins/biquad.py | 1 | 4401 | #! /usr/bin/env python
'''
biquad.py: Biquad filter implementation
Copyright (c) 2012 Bill Gribble <grib@billgribble.com>
'''
from mfp.processor import Processor
from ..mfp_app import MFPApp
from mfp import log
import math
from ..bang import Uninit
class Biquad(Processor):
doc_tooltip_obj = "Biquad filter (5-p... | gpl-2.0 | -6,339,842,470,302,742,000 | 32.59542 | 95 | 0.550557 | false | 3.008202 | false | false | false |
haup/totoro | totoro/app/main/errors.py | 1 | 1506 | from flask import render_template, request, jsonify
from . import main
@main.app_errorhandler(403)
def forbidden(e):
""" This function is called if there was a 403 error exception
and displays the related error page
Return: template of 403 error page
"""
if request.accept_mimetypes.accept... | gpl-3.0 | 3,314,742,504,159,151,600 | 31.73913 | 66 | 0.664011 | false | 4.327586 | false | false | false |
zencoders/pyircbot | plugins/karma_rate.py | 1 | 1474 | import time
from collections import defaultdict
class KarmaRateLimiter(object):
def __init__(self, timeout=60, penalty=3):
"""timeout in seconds - default 1 min"""
self.timeout = timeout
self.penalty = penalty
# http://goo.gl/ZFmFX
# http://stackoverflow.com/a/5900628
... | gpl-2.0 | -5,184,493,849,096,102,000 | 34.95122 | 91 | 0.559701 | false | 4.027322 | false | false | false |
arabenjamin/pybrain | pybrain/rl/environments/task.py | 26 | 3088 | __author__ = 'Tom Schaul, tom@idsia.ch'
from scipy import clip, asarray
from pybrain.utilities import abstractMethod
class Task(object):
""" A task is associating a purpose with an environment. It decides how to evaluate the
observations, potentially returning reinforcement rewards or fitness values.
Fur... | bsd-3-clause | 2,163,094,764,573,265,000 | 36.204819 | 116 | 0.595531 | false | 3.969152 | false | false | false |
gannetson/sportschooldeopenlucht | apps/fund/migrations/0003_remove_m2m_payments_on_order.py | 1 | 15520 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing M2M table for field payments on 'Order'
db.delete_table(db.shorten_name(u'fund_order_payments'))
... | bsd-3-clause | 4,318,038,385,452,015,600 | 81.558511 | 187 | 0.556637 | false | 3.640629 | false | false | false |
casebor/VisMol | VisMol3/visual/vismol_shaders.py | 1 | 25248 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# vismol_shaders.py
#
# Copyright 2016 Labio <labio@labio-XPS-8300>
#
# 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 o... | gpl-3.0 | 8,508,734,336,131,615,000 | 24.273273 | 107 | 0.651418 | false | 2.863559 | false | false | false |
sarareginaff/AutoencodersDeteccaoFalha | variationalAutoencoder.py | 1 | 8937 | ###################################### Variational Autoencoder ############################################
## Author: Sara Regina Ferreira de Faria
## Email: sarareginaff@gmail.com
#Needed libraries
import numpy
import matplotlib.pyplot as plt
import pandas
import math
import scipy.io as spio
import scipy.ndimage
fro... | mit | 8,103,235,079,007,856,000 | 32.223048 | 138 | 0.634665 | false | 3.041865 | true | false | false |
espenhgn/ViSAPy | examples/example_in_vitro_MEA/example_in_vitro_MEA.py | 1 | 11523 | #!/usr/bin/env python
'''do sims of cells, LFP, and output data'''
#import modules
import uuid
import numpy as np
import h5py
import os
from glob import glob
#workaround for plots on cluster
if not os.environ.has_key('DISPLAY'):
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from scipy.... | gpl-2.0 | -3,942,631,519,938,643,000 | 29.164921 | 90 | 0.567734 | false | 3.439701 | false | false | false |
kfsone/tinker | python/restful.py | 1 | 6005 | # Copyright (C) 2017 Oliver "kfsone" Smith <oliver@kfs.org>
# Provided under The MIT License -- see LICENSE.
from __future__ import absolute_import
from __future__ import with_statement
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
import requests
from ... | mit | -5,847,487,410,513,796,000 | 32.176796 | 79 | 0.561865 | false | 4.280114 | false | false | false |
alfeliz/ALEX-scope | tektronik.py | 1 | 8334 | #Version 18-03-2019
import os #Folder and files managment
import csv #To make the nice CSV output.
import re #Regular expresions use.
import numpy as np #Numerical work in Python. Yeah!!!
import scipy.integrate as inte #Numerical integration. YOU NEED TO INSTALL THE SCIPY PACKAGE.
#~ import matplotlib.pyplot as plt
imp... | gpl-3.0 | -2,498,187,895,155,513,300 | 33.725 | 107 | 0.674826 | false | 2.879751 | false | false | false |
burke-software/BSC-website | wiki/plugins/notifications/management/commands/wiki_notifications_create_defaults.py | 1 | 1907 | # -*- coding: utf-8 -*-
from optparse import make_option
from django.core.management.base import BaseCommand
from django.utils import translation
class Command(BaseCommand):
args = '[file-name.csv]'
help = 'Import and parse messages directly from a CSV file.' # @ReservedAssignment
def handle(self, *args... | gpl-3.0 | -8,975,310,130,230,468,000 | 45.536585 | 141 | 0.66387 | false | 4.60628 | false | false | false |
lynnlyc/droidbot | droidbot/utg.py | 1 | 9339 | import logging
import json
import os
import random
import datetime
import networkx as nx
from .utils import list_to_html_table
class UTG(object):
"""
UI transition graph
"""
def __init__(self, device, app, random_input):
self.logger = logging.getLogger(self.__class__.__name__)
self.d... | mit | -1,007,031,879,412,044,400 | 38.075314 | 119 | 0.545347 | false | 3.764208 | false | false | false |
wtsi-hgi/CoGS-Webapp | cogs/common/constants.py | 1 | 2559 | """
Copyright (c) 2017 Genome Research Ltd.
Authors:
* Christopher Harrison <ch12@sanger.ac.uk>
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your op... | agpl-3.0 | 103,027,100,164,038,820 | 35.042254 | 89 | 0.682298 | false | 3.763235 | false | false | false |
jrising/research-common | python/ripping.py | 1 | 1455 | import os, urllib2, csv
from bs4 import BeautifulSoup
from bs4.element import Tag
def get_soup(urlreq):
if type(urlreq) is str:
print urlreq
# Open the URL
reader = urllib2.urlopen(urlreq, timeout=30)
# Parse the HTML
return BeautifulSoup(reader, "lxml")
# Find all elements of a given kin... | mit | -7,632,673,079,982,886,000 | 33.642857 | 96 | 0.646735 | false | 3.900804 | false | false | false |
avalentino/gsdview | gsdview/gdalbackend/gdalexectools.py | 1 | 14797 | # GSDView - Geo-Spatial Data Viewer
# Copyright (C) 2008-2021 Antonio Valentino <antonio.valentino@tiscali.it>
#
# This module is free software you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation either version 2 of the License, or
... | gpl-2.0 | -403,949,074,283,058,700 | 31.167391 | 78 | 0.582753 | false | 4.157629 | true | false | false |
ganga-devs/ganga | ganga/GangaCore/Lib/Checkers/RootFileChecker.py | 1 | 6863 | ##########################################################################
# Ganga Project. http://cern.ch/ganga
#
##########################################################################
from GangaCore.GPIDev.Adapters.IPostProcessor import PostProcessException
from GangaCore.GPIDev.Adapters.IChecker import IFileChe... | gpl-2.0 | -378,378,038,954,568,200 | 41.364198 | 158 | 0.547137 | false | 4.524061 | false | false | false |
guillochon/FriendlyFit | mosfit/modules/seds/blackbody_cutoff.py | 5 | 4737 | """Definitions for the `BlackbodyCutoff` class."""
from math import pi
import numexpr as ne
import numpy as np
from astrocats.catalog.source import SOURCE
from astropy import constants as c
from astropy import units as u
from mosfit.constants import ANG_CGS, FOUR_PI
from mosfit.modules.seds.sed import SED
# Importa... | mit | 1,407,704,762,395,699,200 | 34.088889 | 78 | 0.528605 | false | 3.189899 | false | false | false |
TissueMAPS/TmDeploy | tmdeploy/log.py | 2 | 2888 | # TmDeploy - Automated deployment of TissueMAPS in the cloud.
# Copyright (C) 2016 Markus D. Herrmann, University of Zurich
# 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 ... | gpl-3.0 | 4,283,974,910,290,029,000 | 30.391304 | 75 | 0.690443 | false | 3.961591 | false | false | false |
rollos/PartyPlay | PartyPlay/views.py | 1 | 7664 | import json
from django.core import serializers
from django.forms import model_to_dict
from django.http import HttpResponseRedirect
from django.template.loader import render_to_string
from datetime import date, timedelta
from .helper_functions import *
from django.contrib import auth
from django.db.models import Co... | mit | 6,248,876,530,328,610,000 | 24.045752 | 101 | 0.658272 | false | 3.790307 | false | false | false |
anastue/netforce | netforce_product/netforce_product/models/product_custom_option.py | 4 | 1899 | # Copyright (c) 2012-2015 Netforce Co. Ltd.
#
# 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, modify, merge, publ... | mit | 6,331,416,349,369,496,000 | 43.162791 | 104 | 0.697736 | false | 4.11039 | false | false | false |
petertodd/python-opentimestamps | opentimestamps/tests/core/test_git.py | 2 | 6918 | # Copyright (C) 2016 The OpenTimestamps developers
#
# This file is part of python-opentimestamps.
#
# It is subject to the license terms in the LICENSE file found in the top-level
# directory of this distribution.
#
# No part of python-opentimestamps including this file, may be copied,
# modified, propagated, or distr... | lgpl-3.0 | 1,395,141,965,360,004,000 | 43.346154 | 152 | 0.623735 | false | 2.828291 | true | false | false |
bird-house/pyramid-phoenix | phoenix/tasks/utils.py | 1 | 3035 | import datetime
import json
from phoenix.oauth2 import oauth2_client_factory
from pyramid_celery import celery_app as app
from celery.utils.log import get_task_logger
LOGGER = get_task_logger(__name__)
def task_result(task_id):
return app.AsyncResult(task_id)
def wait_secs(run_step=-1):
secs_list = (2, 2... | apache-2.0 | 1,692,529,810,388,217,900 | 28.754902 | 98 | 0.592751 | false | 3.579009 | false | false | false |
lmazuel/azure-sdk-for-python | azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/alias_path_type.py | 4 | 1040 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 3,910,552,997,785,488,000 | 31.5 | 76 | 0.553846 | false | 4.315353 | false | false | false |
carlburch/hydra | server/py_template.py | 1 | 5720 | /*
* Copyright (c) 2014 Carl Burch
*
* 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, modify, merge, publish,... | mit | -6,534,231,385,856,816,000 | 37.133333 | 75 | 0.577098 | false | 3.507051 | true | false | false |
vicnet/weboob | modules/genericnewspaper/pages.py | 2 | 4881 | # -*- coding: utf-8 -*-
# Copyright(C) 2011 Julien Hebert
#
# This file is part of a weboob module.
#
# This weboob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the Licen... | lgpl-3.0 | 7,036,844,833,147,861,000 | 34.889706 | 115 | 0.612579 | false | 4.037221 | false | false | false |
bccp/nbodykit | nbodykit/tests/test_transform.py | 1 | 7209 | from runtests.mpi import MPITest
from nbodykit.lab import *
from nbodykit import setup_logging
from nbodykit.transform import ConstantArray
from numpy.testing import assert_allclose
import pytest
# debug logging
setup_logging("debug")
@MPITest([1, 4])
def test_sky_to_cartesian(comm):
cosmo = cosmology.Planck15
... | gpl-3.0 | -7,891,218,668,070,126,000 | 32.375 | 104 | 0.619642 | false | 2.884754 | true | false | false |
sequana/sequana | sequana/utils/datatables_js.py | 1 | 13957 | # coding: utf-8
#
# This file is part of Sequana software
#
# Copyright (c) 2016 - Sequana Development Team
#
# File author(s):
# Dimitri Desvillechabrol <dimitri.desvillechabrol@pasteur.fr>,
# <d.desvillechabrol@gmail.com>
#
# Distributed under the terms of the 3-clause BSD license.
# The full licen... | bsd-3-clause | 7,109,333,823,725,242,000 | 32.550481 | 101 | 0.556996 | false | 4.044335 | false | false | false |
c3nav/c3nav | src/c3nav/mapdata/migrations/0019_location_group_category.py | 1 | 2278 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-07-10 11:39
from __future__ import unicode_literals
import c3nav.mapdata.fields
from django.db import migrations, models
import django.db.models.deletion
def create_location_group_category(apps, schema_editor):
LocationGroupCategory = apps.get_model('m... | apache-2.0 | 7,975,349,540,934,128,000 | 39.678571 | 191 | 0.623354 | false | 4.298113 | false | false | false |
allista/GetIsolationSources | setup.py | 1 | 2142 | #!/usr/bin/python
# coding=utf-8
#
# Copyright (C) 2012 Allis Tauri <allista@gmail.com>
#
# indicator_gddccontrol 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... | mit | -1,124,134,146,727,466,500 | 34.7 | 90 | 0.696078 | false | 3.712305 | false | false | false |
dev-platypus/marche | marche/daemon.py | 1 | 6197 | # -*- coding: utf-8 -*-
# *****************************************************************************
# Marche - A server control daemon
# Copyright (c) 2015-2016 by the authors, see LICENSE
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public Licens... | gpl-2.0 | -4,068,841,360,695,524,400 | 36.557576 | 79 | 0.586736 | false | 4.336599 | true | false | false |
popcorn9499/chatBot | main.py | 1 | 7120 |
from concurrent.futures import ThreadPoolExecutor #async to sync
from modules import variables
from modules import mainBot
from modules import fileIO
from modules import youtube
from modules import discordBot
#used for the main program
import threading
import sys, os
#discord stuff imported
import discord #gets the... | gpl-3.0 | -9,078,400,756,142,802,000 | 36.277487 | 174 | 0.676545 | false | 3.7812 | true | false | false |
bsodhi/flipbrain | gae_app/flipbrain/trails.py | 1 | 10373 | """
Copyright 2017 Balwinder Sodhi
Licenced under MIT Licence as available here:
https://opensource.org/licenses/MIT
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.... | mit | 7,271,796,624,487,278,000 | 31.114551 | 94 | 0.539863 | false | 3.739366 | false | false | false |
esboych/shaker | shaker/engine/messaging.py | 1 | 1734 | # Copyright (c) 2015 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | apache-2.0 | -6,983,363,085,708,255,000 | 30.527273 | 69 | 0.603806 | false | 4.345865 | false | false | false |
kingfisher1337/tns | ising_ctm/plot.py | 1 | 2059 | import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import os
mpl.rcParams["text.usetex"] = True
mpl.rcParams["text.latex.preamble"] = "\usepackage{bm}"
for filename in sorted(os.listdir("output")):
if filename.startswith("sigmax_sigmaz_T_"):
print filename
T = []
m... | gpl-3.0 | 7,543,500,244,433,566,000 | 35.122807 | 102 | 0.48713 | false | 3.364379 | false | false | false |
arizona-phonological-imaging-lab/Autotrace | matlab-version/fixImages.py | 3 | 2423 | import os, sys, subprocess
import Image
import pygtk
pygtk.require('2.0')
import gtk, gobject
import gtk.glade
class ImageFixer:
def __init__(self, filenames):
self.gladefile = "LinguaViewer.glade"
self.wTree = gtk.glade.XML(self.gladefile, "resize")
self.window = self.wTree.get_widget("res... | mit | -5,566,361,319,025,989,000 | 29.670886 | 132 | 0.496079 | false | 3.864434 | false | false | false |
migasfree/migasfree | migasfree/server/models/status_log.py | 1 | 1086 | # -*- coding: utf-8 *-*
from django.db import models
from django.utils.translation import ugettext_lazy as _
from .computer import Computer
from .event import Event
class DomainStatusLogManager(models.Manager):
def scope(self, user):
qs = super(DomainStatusLogManager, self).get_queryset()
if not... | gpl-3.0 | -8,389,321,136,981,804,000 | 23.681818 | 70 | 0.626151 | false | 3.963504 | false | false | false |
danfleck/Class-Chord | network-client/src/gmu/chord/FingerEntry.py | 1 | 1208 | ''' Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
Created on Feb 24, 2014
@author: dfleck
'''
import math
class FingerEntry:
'''Represents an entry in the finger table.
Note: Finger indexes go from 0-->m-1 which is different than the
C... | apache-2.0 | 593,880,393,867,182,500 | 30.815789 | 112 | 0.580298 | false | 3.682927 | false | false | false |
LearningRegistry/LearningRegistry | LR/lr/util/validator.py | 2 | 5077 | # Copyright 2011 SRI International
# 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 a... | apache-2.0 | -7,235,573,686,780,789,000 | 41.316667 | 236 | 0.603506 | false | 3.663059 | false | false | false |
ihor-pyvovarnyk/oae-sound-processing-tool | app/ffmpeg/kernel.py | 1 | 1782 | import functools
from .services import CommandBuilderService
from .services import SchemaCompilerService
from .services import SchemasProviderService
class Kernel(object):
def __init__(self, ffmpeg_home_dir):
self.ffmpeg_home = ffmpeg_home_dir
self.command_builder_service = CommandBuilderService()... | bsd-2-clause | 2,849,927,385,072,746,000 | 40.44186 | 82 | 0.656566 | false | 4.183099 | false | false | false |
calancha/DIRAC | RequestManagementSystem/test/FileTests.py | 4 | 6001 | ########################################################################
# $HeadURL$
# File: FileTest.py
# Author: Krzysztof.Ciba@NOSPAMgmail.com
# Date: 2012/08/06 13:48:54
########################################################################
""" :mod: FileTest
=======================
.. module: FileTest
... | gpl-3.0 | 7,929,290,984,637,835,000 | 29.461929 | 128 | 0.617897 | false | 3.71349 | true | false | false |
artwr/airflow | airflow/ti_deps/deps/not_in_retry_period_dep.py | 20 | 2164 | # -*- coding: utf-8 -*-
#
# 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
#... | apache-2.0 | 4,834,235,920,958,033,000 | 39.830189 | 90 | 0.660351 | false | 4.285149 | false | false | false |
chapman-phys227-2016s/cw-2-classwork-team | read_2columns.py | 1 | 1894 | #! /usr/bin/env python
"""
File: read_2columns.py
Copyright (c) 2016 Taylor Patti
License: MIT
This module plots the points of two lists of data, as well as printing the maximum and minimum values of the generated arrays.
"""
import numpy as np
import matplotlib.pyplot as plt
def data_prep1(filename='xy.dat'):
... | mit | 8,645,625,074,339,591,000 | 31.101695 | 126 | 0.643611 | false | 3.167224 | true | false | false |
Letractively/timeside | timeside/encoder/flac.py | 2 | 2350 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2007-2009 Guillaume Pellerin <yomguy@parisson.com>
# This file is part of TimeSide.
# TimeSide 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 th... | gpl-2.0 | 4,481,031,754,363,007,000 | 28.375 | 89 | 0.66766 | false | 3.923205 | false | false | false |
mozilla-it/yammer | python/Yammer-ReadThread.py | 1 | 3150 | import time
import yampy
#Secrets scrubbed
client_id = ""
client_secret = ""
redirect_uri = ""
code = ""
access_token = ""
newestMsgID = 0
currentID = 0
MAX_MSG_LIMIT = 10000000000
currentPgLowerMsgID = MAX_MSG_LIMIT
users = dict()
moreToProcess = True
MAX_MSG_PER_PAGE = 20
restCall = 0 # Keep track of how many tim... | mpl-2.0 | -7,432,924,009,419,899,000 | 36.951807 | 120 | 0.685079 | false | 3.645833 | false | false | false |
AdamGagorik/pyrename | pyrename/apps/main.py | 1 | 4719 | """
Rename files or directories using regular expression.
Does nothing without the --force option.
example:
./pyrename.py '(.*)\.py' '\g<1>_renamed.py'
"""
import logging
import os
import re
from .. import logutils
from .. import options
from .. import utils
logutils.setup_logging()
def main(args=None):
wo... | mit | 1,729,102,449,597,880,800 | 26.283237 | 92 | 0.568341 | false | 3.824149 | false | false | false |
zaihui/wechatpy | wechatpy/client/api/message.py | 1 | 21520 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import re
import six
from optionaldict import optionaldict
from wechatpy.client.api.base import BaseWeChatAPI
from wechatpy.utils import random_string
class WeChatMessage(BaseWeChatAPI):
OPENID_RE = re.compile(r'^[\w\-]{28}$', re... | mit | 4,983,095,428,572,696,000 | 28.468599 | 92 | 0.512131 | false | 2.683284 | false | false | false |
PetrPPetrov/beautiful-capi | source/OverloadSuffixes.py | 1 | 4136 | #!/usr/bin/env python
#
# Beautiful Capi generates beautiful C API wrappers for your C++ classes
# Copyright (C) 2015 Petr Petrovich Petrov
#
# This file is part of Beautiful Capi.
#
# Beautiful Capi is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publis... | gpl-3.0 | -301,367,994,317,084,200 | 45.47191 | 115 | 0.646518 | false | 4.123629 | false | false | false |
ocontant/django_test | garderie/models.py | 1 | 2668 | from django.db import models
from django.utils.timezone import now
from datetime import date, datetime
#from django.core.validators import MaxValueValidator, MinValueValidator
# Create your models here.
class Children(models.Model):
#Children_ID = models.AutoField(primary_key=True)
Parents = models.ManyToManyField... | gpl-3.0 | -205,060,988,150,681,100 | 27.382979 | 84 | 0.682159 | false | 3.411765 | false | false | false |
quells/MarkdownToReport | MDToLatexTemplates.py | 1 | 2554 | #!/usr/bin/python
# -*- coding: utf-8 -*-
def BuildDocument(doctype):
if doctype == 'report':
doctype = 'article'
return '''\documentclass[11pt, oneside]{%s}
\usepackage[margin=1in]{geometry} \geometry{letterpaper}
\usepackage{setspace}
\usepackage[font=singlespacing,labelfont=bf]{caption}
\usepackage{indentfirs... | mit | 2,245,237,749,293,752,800 | 23.103774 | 101 | 0.639781 | false | 2.794311 | false | false | false |
hookehu/utility | max_rects_bin_pack.py | 1 | 22454 | #-*- coding:utf-8 -*-
import dircache, os, math, sys
from PIL import Image
from psd_tools import PSDImage
from psd_tools import Group
import json
class Rectangle:
x = 0
y = 0
width = 0
height = 0
offX = 0
offY = 0
origin_width = 0
origin_height = 0
arena = 0
def __init__(self):
self.name = ""... | gpl-2.0 | -6,912,823,985,310,934,000 | 32.880484 | 150 | 0.615299 | false | 3.047632 | false | false | false |
jasonleaster/LeetCode | Add_Binary/addBinary.py | 1 | 1213 | class Solution(object):
def addBinary(self, a, b):
"""
:type a: str
:type b: str
:rtype: str
"""
x = [int(a[i]) for i in xrange(len(a))]
y = [int(b[i]) for i in xrange(len(b))]
x = x[::-1]
y = y[::-1]
if len(x) > len(y):
... | gpl-2.0 | -8,802,240,305,176,711,000 | 21.886792 | 47 | 0.354493 | false | 3.416901 | false | false | false |
hivetech/hivy | setup.py | 1 | 1729 | import sys
import os
from setuptools import setup, find_packages
from hivy import __project__, __version__, __author__, __licence__
if sys.argv[-1] == 'test':
status = os.system('make tests')
sys.exit(1 if status > 127 else status)
# Needs also : apt-get install swig
requires = [
'Flask-RESTful>=0.2.11'... | apache-2.0 | 2,771,885,732,673,024,500 | 26.444444 | 68 | 0.585888 | false | 3.609603 | false | false | false |
Anthony25/python_tc_qos | pyqos/app.py | 1 | 5166 | #!/usr/bin/env python3
# Author: Anthony Ruhier
import argparse
import logging
import os
import subprocess
import sys
from pyqos.backend import tc
from pyqos.config import Config, ConfigAttribute
global_logger = logging.getLogger("pyqos")
_logger = logging.getLogger(__name__)
class PyQoS():
"""
Application... | bsd-2-clause | 1,324,399,131,611,814,000 | 30.888889 | 78 | 0.577042 | false | 3.910674 | true | false | false |
andrecunha/coh-metrix-dementia | coh/tools/tag/api.py | 1 | 4362 | # -*- coding: utf-8 -*-
# Coh-Metrix-Dementia - Automatic text analysis and classification for dementia.
# Copyright (C) 2014 Andre Luiz Verucci da Cunha
#
# 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 F... | gpl-3.0 | 136,833,219,321,596,450 | 33.346457 | 80 | 0.632967 | false | 4.042632 | false | false | false |
piyushc79/RedisClusterCache | setup.py | 1 | 1472 | from distutils.core import setup
setup(
name = 'dj_rcc',
version = '1.0.0',
packages = ['dj_rcc'],
description='Redis Cluster Cache library for redis 3.0.0 built on top of redis-py-cluster',
author = 'Piyush Chourasiya',
author_email = 'piyushc79@gmail.com',
maintainer='Piyush Chourasiya',
maintainer_em... | gpl-3.0 | 3,698,967,182,028,895,700 | 35.8 | 93 | 0.603261 | false | 3.643564 | false | false | false |
build18-fpga-on-the-web/server | scratch/foo.py | 1 | 3828 | import logging
import tornado.escape
import tornado.ioloop
import tornado.web
import os.path
import uuid
from tornado.concurrent import Future
from tornado import gen
from tornado.options import define, options, parse_command_line
define("port", default=8888, help="run on the given port", type=int)
define("debug", de... | mit | 2,735,976,283,617,163,000 | 30.9 | 78 | 0.618861 | false | 4.016789 | false | false | false |
EFForg/privacybadgerchrome | tests/selenium/clobbering_test.py | 2 | 3915 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import unittest
import pbtest
class ClobberingTest(pbtest.PBSeleniumTest):
def test_localstorage_clobbering(self):
LOCALSTORAGE_TESTS = [
# (test result element ID, expected stored, expected empty)
('get-item', "qwerty", "null"),
... | gpl-3.0 | 8,279,231,285,994,046,000 | 37.382353 | 97 | 0.551724 | false | 4.232432 | true | false | false |
ric2b/Vivaldi-browser | chromium/gpu/command_buffer/build_cmd_buffer_lib.py | 2 | 264144 | # Copyright (c) 2018 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.
"""Common code generator for command buffers."""
import errno
import itertools
import os
import os.path
import re
import platform
from subprocess import ... | bsd-3-clause | -5,548,171,058,463,492,000 | 33.578348 | 80 | 0.592681 | false | 3.373271 | true | false | false |
aewallin/openvoronoi | python_examples/arc/arc_2_draw_glyph.py | 1 | 5012 | # This script only draws a glyph, no VD is calculated
# truetype-tracer also outputs arcs, and we plot them orange
import truetypetracer as ttt # https://github.com/aewallin/truetype-tracer
import openvoronoi as ovd # https://github.com/aewallin/openvoronoi
import ovdvtk
import time
import vtk
def drawLine(myscree... | lgpl-2.1 | 7,714,759,631,097,631,000 | 27.971098 | 105 | 0.528132 | false | 3.050517 | false | false | false |
taikoa/wevolver-server | wevolve/home/migrations/0001_initial.py | 1 | 4539 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Category'
db.create_table(u'category', (
('id', self.gf('django.db.models.fields... | agpl-3.0 | -3,417,519,280,203,244,000 | 58.723684 | 186 | 0.561577 | false | 3.639936 | false | false | false |
FA810/My_Codes | [Python] championship simulation/calendar.py | 1 | 1427 | '''
Author: Fabio Rizzello
Functions to create fixtures for a provided list of teams.
'''
ghost_team = "___"
def create_fixtures(teams_list):
if(len(teams_list) == 0):
return []
home = 0
away = 0
rounds = []
teams_number = len(teams_list)
# check even or odd number of teams, use ghost team in latter case... | apache-2.0 | -3,161,538,729,572,276,000 | 25.425926 | 81 | 0.644709 | false | 2.859719 | false | false | false |
BrainComputationLab/ncs | python/samples/models/test/input_test.py | 1 | 1161 | #!/usr/bin/python
import math
import os,sys
ncs_lib_path = ('../../../../python/')
sys.path.append(ncs_lib_path)
import ncs
def run(argv):
sim = ncs.Simulation()
bursting_parameters = sim.addNeuron("bursting","izhikevich",
{
"a": 0.02,
"b": 0.3,
"c": -50.0,
"d": 4.0,
... | bsd-2-clause | -4,768,359,869,967,613,000 | 24.23913 | 88 | 0.523686 | false | 2.931818 | false | false | false |
vrpolak/slowsort | default_impl_mutable_binary_tree_laden_node.py | 1 | 1645 | """Module that provides the default implementation of MutableBinaryTreeLadenNode.
TODO: Delete as no search here uses this."""
from mutable_binary_tree_laden_node import MutableBinaryTreeLadenNode
class DefaultImplMutableBinaryTreeLadenNode(MutableBinaryTreeLadenNode):
"""Node of binary tree, carrying a payload... | agpl-3.0 | 124,697,273,611,737,150 | 33.270833 | 89 | 0.658359 | false | 4.196429 | false | false | false |
texastribune/scuole | config/urls.py | 1 | 3284 | # -*- coding: utf-8 -*-
"""
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based... | mit | 7,513,251,334,424,165,000 | 33.568421 | 86 | 0.670524 | false | 3.632743 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.