repo_name stringlengths 8 92 | path stringlengths 5 221 | copies stringclasses 10
values | size stringlengths 4 6 | content stringlengths 974 828k | license stringclasses 15
values | hash int64 -9,212,977,344,346,658,000 9,220,224,517B | line_mean float64 8.67 91.6 | line_max int64 15 966 | alpha_frac float64 0.29 0.86 | autogenerated bool 1
class | nl_text stringlengths 0 164k | nl_size int64 0 164k | nl_language stringclasses 17
values | nl_language_score float64 0.04 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lavalamp-/ws-backend-community | lib/debugging.py | 1 | 4429 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from uuid import uuid4
def clear_celery_queue():
"""
Clear out all tasks for the Web Sight Celery application.
:return: None
"""
from tasknode import websight_app
websight_app.control.purge()
def enqueue_database_debugging_task(... | gpl-3.0 | 6,063,669,412,163,870,000 | 33.874016 | 96 | 0.669677 | false | Clear out all tasks for the Web Sight Celery application.
:return: None
Create and enqueue a Celery task of the debugging_database_task type.
:param args: Positional arguments to pass to the task.
:param kwargs: Keyword arguments to pass to the task.
:return: None
Get a OrganizationNetworkService attached to the debugg... | 1,819 | en | 0.696593 |
GENETX/alpg | configs/example.py | 1 | 4948 | #!/usr/bin/python3
#Artifical load profile generator v1.1, generation of artificial load profiles to benchmark demand side management approaches
#Copyright (C) 2018 Gerwin Hoogsteen
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public Lic... | gpl-3.0 | 4,827,155,180,199,970,000 | 28.628743 | 126 | 0.760509 | false | !/usr/bin/python3 Artifical load profile generator v1.1, generation of artificial load profiles to benchmark demand side management approachesCopyright (C) 2018 Gerwin HoogsteenThis program is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe ... | 2,406 | en | 0.862926 |
woodem/woo | examples/perf/showPlots.py | 1 | 2971 | import numpy as np
from pprint import pprint
dd={}
for l in open('timings.txt'):
if l.startswith('#'): continue
ll=l[:-1].split()
if len(ll)==0: continue
tag,cores,nPar,nSteps=ll[0],int(ll[1]),int(ll[2]),int(ll[3])
t1,t,colliderRel=[float(i) for i in ll[4:]]
key=(tag,cores,nPar,nSteps)
data=... | gpl-2.0 | 5,512,987,470,357,769,000 | 33.952941 | 142 | 0.612252 | false | compute averages nn=set() for k in dd: nn.add((k[1],k[2]))refTag,cmpTag='par2_threadSafe','par3_oneMutex'refTag,cmpTag='par1','par3_oneMutex'refTag,cmpTag='orig','parBounds'refTag,cmpTag='noInvFast','par3_oneMutex'refTag,cmpTag='par1','par4_shortCircuit'refTag,cmpTag='par4_shortCircuit','parBounds'refTag,cmpTag='parBou... | 544 | en | 0.108045 |
schristakidis/p2ner | p2ner/components/serveroverlay/centralserver/centralserver/messages/messageobjects.py | 1 | 2833 | # -*- coding: utf-8 -*-
# Copyright 2012 Loris Corazza, Sakis Christakidis
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | apache-2.0 | -8,950,229,297,693,526,000 | 31.563218 | 98 | 0.692199 | false | -*- coding: utf-8 -*- Copyright 2012 Loris Corazza, Sakis Christakidis Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by ap... | 768 | en | 0.713315 |
dfehrenbach/Swen343_Human_Resources | hr/controllers/authentication.py | 1 | 1073 | """ This is the controller of the /confirm_login endpoint
The following functions are called from here: GET
"""
import logging
import requests
import employees
logging.basicConfig(filename='./log.txt',format='%(asctime)s :: %(name)s :: %(message)s')
logger = logging.getLogger(__name__)
def get(department="",token=... | mit | -5,626,718,884,545,181,000 | 36 | 109 | 0.65424 | false | This is the GET function that will return an object with an employee id if they are authenticated.
:param token:
:return: an object with employee_id
This is the controller of the /confirm_login endpoint
The following functions are called from here: GET | 253 | en | 0.90414 |
BiaDarkia/scikit-learn | sklearn/cluster/k_means_.py | 1 | 61736 | """K-means clustering"""
# Authors: Gael Varoquaux <gael.varoquaux@normalesup.org>
# Thomas Rueckstiess <ruecksti@in.tum.de>
# James Bergstra <james.bergstra@umontreal.ca>
# Jan Schlueter <scikit-learn@jan-schlueter.de>
# Nelle Varoquaux
# Peter Prettenhofer <peter.prettenh... | bsd-3-clause | 8,976,565,480,837,188,000 | 37.730238 | 81 | 0.611701 | false | K-Means clustering
Read more in the :ref:`User Guide <k_means>`.
Parameters
----------
n_clusters : int, optional, default: 8
The number of clusters to form as well as the number of
centroids to generate.
init : {'k-means++', 'random' or an ndarray}
Method for initialization, defaults to 'k-means++':
... | 29,649 | en | 0.784668 |
vaishaksuresh/udacity_data_analyst | P2/ProblemSets_2_to_4/P2_01.py | 1 | 1464 | import pandas
import pandasql
def num_rainy_days(filename):
'''
This function should run a SQL query on a dataframe of
weather data. The SQL query should return one column and
one row - a count of the number of days in the dataframe where
the rain column is equal to 1 (i.e., the number of days it... | gpl-2.0 | 7,580,475,719,071,482,000 | 38.567568 | 93 | 0.70082 | false | This function should run a SQL query on a dataframe of
weather data. The SQL query should return one column and
one row - a count of the number of days in the dataframe where
the rain column is equal to 1 (i.e., the number of days it
rained). The dataframe will be titled 'weather_data'. You'll
need to provide the SQL... | 1,087 | en | 0.8974 |
IvanRybakov/cachewarmer | cw.py | 1 | 3233 |
import urllib2 as ur
import re, traceback
import sys
import os
from scw.fetcher import Fetcher
from scw.app import App
class CacheWarmer():
def __init__(self, sitemap, processes = 100):
self.processes = processes
self.active_threads = []
self.app = App()
self.urls = []
self.updated_count = 0
self.fetch... | mit | -5,689,395,381,370,856,000 | 28.126126 | 109 | 0.67275 | false | update average page load time update stitistics by HTTP code update count of processed pages | 92 | en | 0.722895 |
t-neumann/slamdunk | slamdunk/contrib/RNASeqReadSimulator/src/gensimreads.py | 1 | 9905 | #!/usr/bin/env python
"""
This script generates simulated RNA-Seq reads (in .bed format) from known gene annotations.
USAGE
gensimreads.py {OPTIONS} <BED-File|->
PARAMETER
BED-File\tThe gene annotation file (in BED format). Use '-' for STDIN input
OPTIONS
-e/--expression [expression level file] \tSpecify ... | agpl-3.0 | 3,342,112,633,374,298,000 | 30.645367 | 292 | 0.651186 | false | This script generates simulated RNA-Seq reads (in .bed format) from known gene annotations.
USAGE
gensimreads.py {OPTIONS} <BED-File|->
PARAMETER
BED-File The gene annotation file (in BED format). Use '-' for STDIN input
OPTIONS
-e/--expression [expression level file] Specify the weight of each ... | 3,111 | en | 0.633098 |
APTrust/EarthDiver | dpnode/dpn/client/management/commands/accept_transfers.py | 1 | 1510 | """
'Contrary to what people may say, there is no upper limit to stupidity.'
- Stephen Colbert
"""
from optparse import make_option
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from dpn.data.models import Node
from dpn.client.tasks import... | apache-2.0 | -3,021,411,262,614,179,300 | 32.577778 | 78 | 0.59404 | false | 'Contrary to what people may say, there is no upper limit to stupidity.'
- Stephen Colbert | 106 | en | 0.912352 |
eduNEXT/edunext-ecommerce | ecommerce/courses/publishers.py | 1 | 6029 | from __future__ import absolute_import, unicode_literals
import json
import logging
import six
from django.utils.translation import ugettext_lazy as _
from edx_rest_api_client.exceptions import SlumberHttpBaseException
from oscar.core.loading import get_model
from ecommerce.core.constants import ENROLLMENT_CODE_SEAT... | agpl-3.0 | 152,557,083,518,754,620 | 40.294521 | 116 | 0.603914 | false | When validation errors occur during publication, the LMS is expected
to return an error message.
Arguments:
response (Response): A 'Response' object which contains json error message.
default_error_message (str) : default error message in case of exception.
Returns:
string: Returns the error message extr... | 1,249 | en | 0.768674 |
Nic30/HWToolkit | hwt/synthesizer/rtlLevel/netlist.py | 1 | 8089 | from typing import List, Optional, Union
from hdlConvertorAst.hdlAst._defs import HdlIdDef
from hdlConvertorAst.hdlAst._expr import HdlValueId
from hdlConvertorAst.hdlAst._structural import HdlModuleDec, HdlModuleDef, \
HdlCompInst
from hwt.code import If
from hwt.hdl.operatorDefs import AllOps
from hwt.hdl.types.... | mit | 2,040,947,391,428,766,200 | 37.160377 | 105 | 0.593769 | false | Hierarchical container for signals
:ivar ~.parent: optional parent for debug and late component inspection
:ivar ~.signals: set of all signals in this context
:ivar ~.statements: list of all statements which are connected to signals in this context
:ivar ~.subUnits: is set of all units in this context
:type ~.interfac... | 1,565 | en | 0.730783 |
EdinburghNLP/nematus | nematus/exponential_smoothing.py | 1 | 3493 | import tensorflow as tf
# How often to update smoothed variables (in terms of training steps).
DEFAULT_UPDATE_FREQUENCY = 5
class ExponentialSmoothing(object):
"""Defines TensorFlow variables and operations for exponential smoothing.
Following Marian [1], we maintain smoothed versions of all trainable
... | bsd-3-clause | 2,266,908,589,127,385,000 | 42.123457 | 79 | 0.608932 | false | Defines TensorFlow variables and operations for exponential smoothing.
Following Marian [1], we maintain smoothed versions of all trainable
variables. This class creates the smoothed variables (assuming that the
model has already been initialized) and provides operations that can be
run to update the variables and to ... | 1,476 | en | 0.859548 |
thakadu/Abraxas | scripts/load_feeds.py | 1 | 1986 | """Loads Feed data from a csv file into the feed table of the database"""
import logging
import csv
from optparse import OptionParser
from paste.deploy import appconfig
#from pylons import app_globals
from abraxas.config.environment import load_environment
from sqlalchemy import create_engine, MetaData, select
from... | bsd-3-clause | 1,864,919,659,832,746,000 | 27.782609 | 76 | 0.613797 | false | from pylons import app_globals Most likely loading a duplicate feed row | 71 | en | 0.759268 |
axiom-data-science/pyaxiom | pyaxiom/netcdf/sensors/dsg/timeseries/ir.py | 1 | 1602 | #!python
# coding=utf-8
from pyaxiom.netcdf import CFDataset
from pyaxiom import logger
class IndexedRaggedTimeseries(CFDataset):
@classmethod
def is_mine(cls, dsg):
try:
rvars = dsg.get_variables_by_attributes(cf_role='timeseries_id')
assert len(rvars) == 1
asser... | mit | 3,502,373,414,636,524,500 | 31.693878 | 94 | 0.601124 | false | !python coding=utf-8 Station dimension Allow for string variables 0 = single 1 = array of strings/ints/bytes/etc 2 = array of character arrays if df is None: df = self.to_dataframe(clean_cols=clean_cols, clean_rows=clean_rows) | 230 | en | 0.507523 |
andrewyoung1991/scons | QMTest/TestCommon.py | 1 | 27429 | """
TestCommon.py: a testing framework for commands and scripts
with commonly useful error handling
The TestCommon module provides a simple, high-level interface for writing
tests of executable commands and scripts, especially commands and scripts
that interact with the file system. All methods throw... | mit | 3,280,582,583,667,174,400 | 36.116373 | 88 | 0.580298 | false | Copyright 2000-2010 Steven Knight This module is free software, and you may redistribute it and/or modify it under the same terms as Python itself, so long as this copyright message and disclaimer are retained in their original form. IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INC... | 1,896 | en | 0.82488 |
Pikecillo/genna | external/PyXML-0.8.4/test/dom/test_entity.py | 1 | 1296 | from TestSuite import EMPTY_NAMESPACE
def test(tester):
tester.startGroup('Entity')
tester.startTest('Testing syntax')
try:
from xml.dom import Entity
from xml.dom.Entity import Entity
except:
tester.error('Error in syntax', 1)
tester.testDone()
tester.startTest('Crea... | gpl-2.0 | 7,661,269,185,216,156,000 | 24.411765 | 73 | 0.652778 | false | 0 | en | 0.110449 | |
opennode/waldur-mastermind | src/waldur_core/core/tests/test_admin.py | 1 | 4743 | from django.contrib.admin.sites import AdminSite
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase, override_settings
from reversion.models import Version
from waldur_core.core.admin import UserAdmin
from waldur_core.core.models import User
from waldur_core.core.tests.helpers ... | mit | 5,806,270,913,715,895,000 | 34.931818 | 83 | 0.654649 | false | 0 | en | 0.110449 | |
yro/veda_worker | veda_worker/generate_delivery.py | 1 | 5380 |
import boto
import boto.s3
from boto.s3.key import Key
import hashlib
import os
from os.path import expanduser
import sys
import shutil
from global_vars import *
from reporting import ErrorObject
from config import WorkerSetup
homedir = expanduser("~")
"""
Gets specified Video and Encode object, and delivers file t... | gpl-3.0 | 7,279,386,653,945,648,000 | 26.589744 | 90 | 0.512639 | false | Split file into chunks, upload chunks
NOTE: this should never happen, as your files should be much
smaller than this, but one never knows
Upload single part (under threshold in node_config)
node_config MULTI_UPLOAD_BARRIER
Get file particulars, upload to s3
file size hash sum Split File into chunks 5 part names of 5... | 355 | en | 0.919583 |
yeleman/ramed-desktop | ramed/static.py | 1 | 1980 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4 nu
import os
import sys
import platform
import json
import logging
IS_FROZEN = hasattr(sys, 'frozen')
WORKING_DIR = os.path.dirname(os.path.abspath(sys.executable
if IS_FROZEN
else ... | mit | 2,534,540,856,373,804,000 | 26.774648 | 79 | 0.616633 | false | !/usr/bin/env python -*- encoding: utf-8 -*- vim: ai ts=4 sts=4 et sw=4 nu assume path is either a str path or a list of components | 131 | en | 0.392871 |
SpaceGroupUCL/qgisSpaceSyntaxToolkit | esstoolkit/external/networkx/algorithms/isomorphism/ismags.py | 1 | 42775 | """
****************
ISMAGS Algorithm
****************
Provides a Python implementation of the ISMAGS algorithm. [1]_
It is capable of finding (subgraph) isomorphisms between two graphs, taking the
symmetry of the subgraph into account. In most cases the VF2 algorithm is
faster (at least on small graphs) than this im... | gpl-3.0 | -174,510,596,902,812,900 | 36.002595 | 88 | 0.56678 | false | Implements the ISMAGS subgraph matching algorith. [1]_ ISMAGS stands for
"Index-based Subgraph Matching Algorithm with General Symmetries". As the
name implies, it is symmetry aware and will only generate non-symmetric
isomorphisms.
Notes
-----
The implementation imposes additional conditions compared to the VF2
algor... | 15,850 | en | 0.847931 |
ngoix/OCRF | sklearn/datasets/fetch_ml_mieux.py | 1 | 13778 | from zipfile import ZipFile
from io import BytesIO
import logging
from os.path import exists, join
try:
from urllib2 import urlopen
except ImportError:
from urllib.request import urlopen
import numpy as np
from .base import get_data_home
from .base import Bunch
from .base import _pkl_filepath
from ..utils.fix... | bsd-3-clause | -8,359,151,599,805,482,000 | 31.495283 | 78 | 0.604369 | false | Load the adult dataset, downloading it if necessary.
Load the annthyroid dataset, downloading it if necessary.
Load the arrhythmia dataset, downloading it if necessary.
Load the internet_ads dataset, downloading it if necessary.
Load the pendigits dataset, downloading it if necessary.
Load the ... | 2,040 | en | 0.556829 |
capitalone/cloud-custodian | c7n/filters/vpc.py | 1 | 10368 | # Copyright 2016-2017 Capital One Services, LLC
# Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from c7n.exceptions import PolicyValidationError
from c7n.utils import local_session, type_schema
from .core import Filter, ValueFilter
from .related import RelatedResourceFilter
class Match... | apache-2.0 | -2,030,043,321,442,465,000 | 37.831461 | 97 | 0.558738 | false | Filter to resources in a default vpc.
On a network attached resource, determine intersection of
security-group attributes, subnet attributes, and resource attributes.
The use case is a bit specialized, for most use cases using `subnet`
and `security-group` filters suffice. but say for example you wanted to
verify that... | 1,171 | en | 0.878059 |
vmagamedov/pi | fixers/fix_imports.py | 1 | 2965 | import os.path
from lib2to3.pygram import python_symbols
from lib2to3.fixer_util import Name
from lib2to3.fixes.fix_imports import FixImports as BaseFixImports, alternates
PATH = '{}/../pi/_requires'.format(os.path.dirname(__file__))
LIBS = [i.rstrip('.py') for i in os.listdir(PATH)
if not i.startswith('_')... | bsd-3-clause | -102,682,145,929,447,380 | 41.357143 | 79 | 0.536931 | false | Find usages of module members in code e.g. thread.foo(bar) | 58 | en | 0.766998 |
swapnilsm/redis-rw-lock | setup.py | 1 | 1796 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
import io
from os.path import dirname
from os.path import join
from setuptools import setup
def read(*names, **kwargs):
return io.open(
join(dirname(__file__), *names),
en... | mit | 9,055,668,874,280,245,000 | 29.965517 | 90 | 0.603563 | false | !/usr/bin/env python -*- encoding: utf-8 -*- complete classifier list: http://pypi.python.org/pypi?%3Aaction=list_classifiers | 125 | en | 0.272019 |
rwatson/chromium-capsicum | webkit/tools/layout_tests/layout_package/platform_utils_mac.py | 1 | 5197 | # Copyright (c) 2008-2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This is the Mac implementation of the layout_package.platform_utils
package. This file should only be imported by that package."""
import os
... | bsd-3-clause | -4,367,166,175,675,160,000 | 34.59589 | 80 | 0.689051 | false | Returns the path to Apache config file
Returns the executable path to start Apache
Returns the list of directories to search for baselines/results, in
order of preference. Paths are relative to the top of the source tree.
Returns the number of cores on the machine. For hyperthreaded machines,
this will be double the nu... | 2,665 | en | 0.816417 |
mareknetusil/twist | demo/dynamic/flap.py | 1 | 1495 | from __future__ import print_function
__author__ = "Harish Narayanan"
__copyright__ = "Copyright (C) 2010 Simula Research Laboratory and %s" % __author__
__license__ = "GNU GPL Version 3 or any later version"
from cbc.twist import *
class Obstruction(Hyperelasticity):
def mesh(self):
n = 4
retur... | gpl-3.0 | -6,887,895,058,826,794,000 | 23.508197 | 86 | 0.599331 | false | material = StVenantKirchhoff([mu, lmbda]) Setup problem Solve problem | 69 | en | 0.579161 |
jinankjain/zamboni | mkt/api/paginator.py | 1 | 4202 | import urlparse
from django.core.paginator import EmptyPage, Page, PageNotAnInteger, Paginator
from django.http import QueryDict
from django.utils.http import urlencode
from rest_framework import pagination, serializers
class ESPaginator(Paginator):
"""
A better paginator for search results
The normal ... | bsd-3-clause | 899,639,658,611,445,600 | 36.185841 | 79 | 0.651832 | false | A better paginator for search results
The normal Paginator does a .count() query and then a slice. Since ES
results contain the total number of results, we can take an optimistic
slice and then adjust the count.
Serializer for the 'meta' dict holding pagination info that allows to stay
backwards-compatible with the wa... | 1,238 | en | 0.797849 |
hwen3/410-lab5 | todolist.py | 1 | 2612 | import sqlite3
from flask import Flask, render_template, g, request, session, flash, redirect, url_for, abort
DATABASE = 'test.db'
USERNAME = 'admin'
PASSWORD = 'admin'
SECRET_KEY = 'he who shall not be named'
app = Flask(__name__)
app.config.from_object(__name__)
@app.route('/')
def welcome():
return '<h1>Welco... | apache-2.0 | 7,709,553,751,303,551,000 | 27.402174 | 97 | 0.609495 | false | 0 | en | 0.110449 | |
Azure/azure-storage-python | samples/blob/block_blob_usage.py | 1 | 18393 | # coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------... | mit | 8,936,790,025,452,813,000 | 40.474041 | 120 | 0.618625 | false | 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. -------------------------------------------------------------------------- Basic ... | 3,665 | en | 0.827591 |
mbalazin/cse599c-17sp-projects | spark-advantage/pandasbench.py | 1 | 1488 |
# coding: utf-8
# In[1]:
import pandas as pd
import time
from sys import argv
logfile = argv[1]
filesize = argv[2]
# # Python Pandas Benchmark
# In[3]:
prefix = "file:////Users/tony/Dropbox/Projects/UW/cse599c-17sp-projects/spark-advantage/data/"
if(filesize == 'original'):
tairfname = "Tair_WA_nohead... | bsd-3-clause | -4,992,153,284,442,744,000 | 24.672414 | 108 | 0.623656 | false | coding: utf-8 In[1]: Python Pandas Benchmark In[3]: | 52 | en | 0.18775 |
openai/baselines | baselines/ppo1/run_atari.py | 1 | 1583 | #!/usr/bin/env python3
from mpi4py import MPI
from baselines.common import set_global_seeds
from baselines import bench
import os.path as osp
from baselines import logger
from baselines.common.atari_wrappers import make_atari, wrap_deepmind
from baselines.common.cmd_util import atari_arg_parser
def train(env_id, num_... | mit | -257,343,598,731,253,380 | 31.979167 | 87 | 0.670246 | false | !/usr/bin/env python3pylint: disable=W0613 | 42 | en | 0.292208 |
bptripp/it-cnn | tuning/clutter.py | 1 | 2870 | __author__ = 'bptripp'
import numpy as np
import matplotlib
matplotlib.rcParams['xtick.labelsize'] = 14
matplotlib.rcParams['ytick.labelsize'] = 14
import matplotlib.pyplot as plt
from cnn_stimuli import get_image_file_list
from alexnet import preprocess, load_net, load_vgg
def get_clutter_responses(remove_level):
... | mit | -5,060,137,306,948,743,000 | 35.341772 | 95 | 0.628223 | false | model = load_vgg(weights_path='../weights/vgg16_weights.h5', remove_level=remove_level) use_vgg = True n = 500 ind = range(n) if remove_level == 1: plt.xlabel('Angle from horizontal (radians)', fontsize=14) | 210 | en | 0.411232 |
amenonsen/ansible | lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_osu_provider.py | 1 | 13230 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | gpl-3.0 | -5,820,145,933,093,998,000 | 32.324937 | 155 | 0.552079 | false | !/usr/bin/python Copyright 2019 Fortinet, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in th... | 715 | en | 0.89458 |
icyflame/batman | pywikibot/families/wikibooks_family.py | 1 | 7244 | # -*- coding: utf-8 -*-
"""Family module for Wikibooks."""
from __future__ import absolute_import, unicode_literals
from pywikibot import family
__version__ = '$Id$'
# The Wikimedia family that is known as Wikibooks
class Family(family.SubdomainFamily, family.WikimediaFamily):
"""Family class for Wikibooks.""... | mit | -3,807,221,727,684,377,000 | 48.278912 | 157 | 0.628934 | false | Family class for Wikibooks.
Constructor.
Return the shared data repository for this family.
Family module for Wikibooks.
-*- coding: utf-8 -*- The Wikimedia family that is known as Wikibooks https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Afar_Wikibooks https://meta.wikimedia.org/wiki/Propo... | 4,638 | en | 0.405787 |
mpachas/django-monthfield | month/tests.py | 1 | 5197 | from django.test import TestCase
from month.models import Month
from example.models import Example
import datetime
# Create your tests here.
def TestMonthFunctions(TestCase):
def test_constructors(self):
m = Month(2010, 1)
self.assertEqual(m.year, 2010)
self.assertEqual(m.month, 1)
... | bsd-3-clause | 6,722,813,776,884,100,000 | 28.196629 | 84 | 0.552819 | false | Create your tests here. | 23 | en | 0.899389 |
brianjimenez/lightdock | bin/test/post/test_generate_glowworm_positions.py | 1 | 1125 | """Test for generate_glowworm_positions post script"""
import os
import filecmp
import shutil
from ..regression import RegressionTest
class TestGenerateGlowwormPositions(RegressionTest):
def setup(self):
self.path = os.path.dirname(os.path.realpath(__file__))
self.test_path = self.path + '/scrat... | gpl-3.0 | 7,381,194,362,340,665,000 | 37.793103 | 115 | 0.629333 | false | Test for generate_glowworm_positions post script | 48 | en | 0.223116 |
sh0ked/vmmaster | backend/queue_producer.py | 1 | 4076 | # coding: utf-8
import aioamqp
import uuid
import logging
from core.utils import async_wait_for
log = logging.getLogger(__name__)
class AsyncQueueProducer(object):
messages = {}
connection = None
channel = None
consumer_tag = None
responses_queue = None
commands_queue = None
def __init... | mit | 1,020,926,549,248,728,000 | 38.192308 | 117 | 0.626349 | false | coding: utf-8 | 13 | en | 0.832876 |
fsmMLK/inkscapeCircuitSymbols | 0.9x/drawRLC.py | 1 | 14781 | #!/usr/bin/python
import inkscapeMadeEasy_Base as inkBase
import inkscapeMadeEasy_Draw as inkDraw
class RLC(inkBase.inkscapeMadeEasy):
# ---------------------------------------------
def drawBipoleGeneral(self, parent, position=[0, 0], value='Z', label='Bipole', angleDeg=0, flagVolt=True,
... | gpl-3.0 | -5,235,465,511,251,690,000 | 48.767677 | 128 | 0.577633 | false | draws a generic bipole with a rectangle
parent: parent object
position: position [x,y]
value: string with resistor value. (default 'Z')
label: label of the object (it can be repeated)
angleDeg: rotation angle in degrees counter-clockwise (default 0)
flagVolt: indicates whether the voltage arrow must be drawn (default... | 3,610 | en | 0.376813 |
Iconoclasteinc/tgit | testing/drivers/track_list_tab_driver.py | 1 | 3521 | # -*- coding: utf-8 -*-
from PyQt5.QtWidgets import QMenu, QTableWidget
from hamcrest import contains, has_items, equal_to
from cute import gestures
from cute.matchers import named
from cute.widgets import MenuDriver, TableViewDriver
from tgit.ui.pages.track_list_tab import TrackListTab
from ._screen_driver import Scr... | gpl-3.0 | 5,953,029,582,942,851,000 | 33.184466 | 88 | 0.652655 | false | -*- coding: utf-8 -*- | 21 | en | 0.767281 |
nict-isp/scn-openflow-driver | src/ncps_openflow/protocols/application/tcp.py | 1 | 13729 | # -*- coding: utf-8 -*-
"""
protocols.application.tcp
~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: Copyright (c) 2015, National Institute of Information and Communications Technology.All rights reserved.
:license: GPL3, see LICENSE for more details.
"""
import logging
from protocols.application.application import Server
fro... | gpl-3.0 | 1,546,076,728,354,864,000 | 27.365702 | 134 | 0.571127 | false | Implements a basic TCP Server which handles raw TCP packets passed to it.
port is the port the TCPServer should listen for SYN packets on.
Called when it is ready to be removed. Removes the connection.
to be overriden
to be overriden
to be overriden
TODO
protocols.application.tcp
~~~~~~~~~~~~~~~~~~~~~~~~~
:copyrig... | 819 | en | 0.843081 |
csningli/MultiAgent | examples/avoid_static_obstacle/static_sim.py | 1 | 2287 |
# MultiAgent 2.0
# (c) 2017-2018, NiL, csningli@gmail.com
import sys, math
sys.path.append("../..")
from mas.multiagent import *
from mas.extension import ShowLabelObject
POS_ERROR = 5
SPIN_SPEED = math.pi / 6.0
class SpinModule(ObjectModule) :
def act(self, resp) :
resp.add_msg(Message(key = "avel", ... | apache-2.0 | -4,195,351,703,851,307,000 | 23.591398 | 108 | 0.589418 | false | run_sim(filename = None)
------------------------
filename : the name of the file to save the data; None by default.
MultiAgent 2.0 (c) 2017-2018, NiL, csningli@gmail.com create the oracle space create the context create the schedule for adding agents in the running add objects and agents to the context create the dr... | 400 | en | 0.554239 |
olivierverdier/sfepy | sfepy/mechanics/matcoefs.py | 1 | 12857 | # -*- coding: utf-8 -*-
from sfepy.base.base import *
##
# c: 22.07.2008
def youngpoisson_to_lame( young, poisson, plane = 'strain' ):
r"""
The relationship between Lame parameters and Young's modulus, Poisson's
ratio (see [1],[2]):
.. math::
\lambda = {\nu E \over (1+\nu)(1-2\nu)},\qquad \mu ... | bsd-3-clause | -4,280,246,495,239,971,000 | 33.371658 | 81 | 0.496227 | false | -*- coding: utf-8 -*- c: 22.07.2008 c: 22.07.2008 c: 22.07.2008 c: 10.08.2009 c: 10.08.2009 c: 10.08.2009 c: 10.08.2009 print sorted(self.relations.keys()) print len(self.relations) Choose the correct root manually. relations[('p_wave', 'young', 'poisson')] \ = (young - p_wave + (-10*p_wave*young + youn... | 730 | en | 0.357037 |
opennode/waldur-mastermind | src/waldur_mastermind/booking/processors.py | 1 | 4711 | from django.db import transaction
from django.utils import timezone
from django.utils.dateparse import datetime_re, parse_datetime
from django.utils.translation import ugettext_lazy as _
from rest_framework.serializers import ValidationError
from waldur_mastermind.booking.utils import (
get_offering_bookings,
... | mit | 1,439,147,289,079,598,300 | 37.933884 | 99 | 0.545956 | false | We check that the schedule is set. Check that the schedule is available for the offering. Check that there are no other bookings. Check that there are no other booking requests. | 177 | en | 0.95657 |
manz/python-mapnik | test/python_tests/sqlite_test.py | 1 | 20465 | #!/usr/bin/env python
from __future__ import print_function
from nose.tools import eq_, raises
from .utilities import execution_path, run_all
import os
import mapnik
def setup():
# All of the paths used are relative, if we run the tests
# from another directory we need to chdir()
os.chdir(execution_path(... | lgpl-2.1 | 4,323,102,137,931,213,300 | 39.766932 | 305 | 0.538334 | false | sqlite3 world.sqlite
attach database 'business.sqlite' as business;
select count(*) from world_merc INNER JOIN business on world_merc.iso3 = business.ISO3;
select count(*) from (select * from world_merc where 1=1) as world_merc INNER JOIN business on world_merc.iso3 = business.ISO3;
select count(*) from (select * from ... | 2,053 | en | 0.838668 |
frac/lettuce | tests/functional/output_features/success_table/success_table_steps.py | 1 | 1617 | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010> Gabriel Falcão <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, ei... | gpl-3.0 | 2,192,169,248,575,762,400 | 28.925926 | 71 | 0.686881 | false | -*- coding: utf-8 -*- <Lettuce - Behaviour Driven Development for python> Copyright (C) <2010> Gabriel Falcão <gabriel@nacaolivre.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3... | 745 | en | 0.879594 |
prculley/gramps | gramps/plugins/view/geofamily.py | 1 | 20779 | # -*- python -*-
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2011-2016 Serge Noiraud
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either ver... | gpl-2.0 | 6,691,864,510,758,257,000 | 40.39243 | 104 | 0.455893 | false | The view used to render family map.
Create all markers for each people's event in the database which has
a lat/lon.
Create all markers for one family : all event's places with a lat/lon.
Create all markers for the specified person.
Add an item to the popup menu.
Add specific entry to the navigation menu.
Specifies the ... | 3,099 | en | 0.713081 |
drjova/cds-demosite | tests/unit/test_provider.py | 1 | 2108 | # -*- coding: utf-8 -*-
#
# This file is part of CDS.
# Copyright (C) 2015, 2016 CERN.
#
# CDS 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 v... | gpl-2.0 | 496,742,994,712,681,000 | 35.982456 | 76 | 0.695446 | false | Test the CDS recid provider.
Test if providing a recid will cause an error.
Test access control package.
-*- coding: utf-8 -*- This file is part of CDS. Copyright (C) 2015, 2016 CERN. CDS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the F... | 1,021 | en | 0.911283 |
iScrE4m/RSES | tests/objects/test_stock.py | 1 | 2053 | # coding=utf-8
from pytest import raises
from rses.src.objects import stock
import rses_errors
def test_ingredient_type_create(ingredient_type_no_create):
ingredient_type = stock.IngredientType(name=ingredient_type_no_create)
assert ingredient_type.id
assert ingredient_type.name == ingredient_type_no_cre... | mit | 7,995,718,306,625,569,000 | 39.254902 | 75 | 0.651242 | false | In arguments, ingredient_type has to come before ingredient_no_create,
otherwise teardown of ingredient_type will come first and will cascade
delete ingredient_unit
coding=utf-8 | 179 | en | 0.696029 |
kimbauters/sparsepy | search_structure.py | 1 | 8409 | import textwrap # used for embellishing the Graphviz DOT file layout
class Node:
# since we will be using a lot of Node instances, optimise the memory use by relying on slots rather than a dict
__slots__ = ['problem', 'parent', 'action', 'effect', 'state', 'is_goal', 'children',
'visit... | mit | 5,978,570,223,246,047,000 | 68.663866 | 120 | 0.625996 | false | Internal method used in the creation of the Graphviz DOT file. This method will be called recursively,
and only helps to fill the body specifications of the DOT file.
Produce the contents for a Graphviz DOT file representing the search tree as starting from this node.
:param location: the location of where to save the... | 3,924 | en | 0.905444 |
alexanderganderson/Diffusion-Probabilistic-Models | regression.py | 1 | 8365 | """
Defines the function approximators
"""
import numpy as np
import theano.tensor as T
# from theano.tensor.signal import downsample
from blocks.bricks import Activation, MLP, Initializable, application, Identity
from blocks.bricks.conv import ConvolutionalActivation
from blocks.initialization import IsotropicGaussi... | mit | 2,050,625,259,363,093,200 | 42.341969 | 128 | 0.618649 | false | from theano.tensor.signal import downsample TODO IsotropicGaussian init will be wrong scale for some layers dense_nonlinearity = Tanh() for scale in range(self.num_scales-1, -1, -1): assume images are spatially smooth -- in which case output magnitude scales with filter pixels rather than square root of filter pixels... | 1,059 | en | 0.780758 |
downpoured/labs_coordinate_pictures | src/tools/ben_python_img/img_tests.py | 1 | 15862 |
import img_utils
import img_convert_resize
import img_resize_keep_exif
import PIL
from PIL import Image
import sys
sys.path.append('bn_python_common.zip')
from bn_python_common import *
def img_utils_testGetMarkFromFilename():
# tests splitting a filename that contains the "__MARKAS__" marker.
assertEq(('/tes... | gpl-3.0 | 5,360,751,421,662,296,000 | 48.26087 | 123 | 0.696129 | false | tests splitting a filename that contains the "__MARKAS__" marker. looks for files that do not have the given extension. common valid cases invalid spec cases not to resize. create initial files set an obscure tag that won't be transferred set a common tag that will be transferred run the resizes. resizeAllAndKeepExif r... | 1,330 | en | 0.925554 |
HoverHell/pyimapsmtpt | pyimapsmtpt/common.py | 1 | 3253 | # coding: utf8
import re
import logging
_log = logging.getLogger(__name__)
class EventProcessed(Exception):
""" A special exception to end the current event processing """
def to_bytes(val):
if isinstance(val, unicode):
return val.encode('utf-8')
return val
def get_html2text(config):
tr... | gpl-2.0 | -7,889,025,405,643,893,000 | 26.108333 | 78 | 0.597602 | false | coding: utf8 dummy replacement postprocess Default: 3 Default: 2 Default: 'utf-8' Library-independence for JIDs Probably an xmpp.protocol.JID or equivalent http://stackoverflow.com/a/1406200 - not perfectly strict but workable | 226 | en | 0.518544 |
sunweaver/ganetimgr | apply/urls/user.py | 1 | 2001 | # -*- coding: utf-8 -*- vim:fileencoding=utf-8:
# Copyright (C) 2010-2014 GRNET S.A.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any ... | gpl-3.0 | -2,009,622,974,093,488,000 | 54.583333 | 167 | 0.684658 | false | -*- coding: utf-8 -*- vim:fileencoding=utf-8: Copyright (C) 2010-2014 GRNET S.A. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.... | 690 | en | 0.901898 |
luisxiaomai/robotframework-anywherelibrary | src/AnywhereLibrary/base/logging.py | 1 | 1083 | import os
#from robot.variables import GLOBAL_VARIABLES
from robot.libraries.BuiltIn import BuiltIn
from robot.api import logger
from keywordgroup import KeywordGroup
class Logging(KeywordGroup):
# Private
def _debug(self, message):
logger.debug(message)
def _get_log_dir(self):
logfile =... | mit | -5,113,758,825,957,334,000 | 27.5 | 53 | 0.615882 | false | from robot.variables import GLOBAL_VARIABLES Private | 52 | en | 0.536965 |
regebro/hovercraft | hovercraft/generate.py | 1 | 8341 | import os
import re
import shutil
from lxml import etree, html
from pkg_resources import resource_string
from .parse import rst2xml, SlideMaker
from .position import position_slides
from .template import (
Template,
CSS_RESOURCE,
JS_RESOURCE,
JS_POSITION_HEADER,
JS_POSITION_BODY,
OTHER_RESOURCE... | mit | -971,954,912,299,686,000 | 33.754167 | 88 | 0.602686 | false | Generates the presentation and returns a list of files used
Read the infile First convert reST to XML Fix up the resulting XML so it makes sense Pick up CSS information from the tree: The "console" media is used to style the presenter console and does not need to be included in the header, but must be copied. So we a... | 1,239 | en | 0.855438 |
GluuFederation/cluster-tools | recovery/recovery.py | 1 | 10339 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright (c) 2016 Gluu
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limi... | mit | 5,439,546,729,971,558,000 | 31.309375 | 96 | 0.610697 | false | Adds DNS entry to weavedns.
:param container_id: ID of the container assigned by docker daemon.
:param hostname: Hostname that should be added into weavedns.
Checks whether a container exists.
:param container_id: ID of the container assigned by docker daemon.
Checks whether a container is stopped.
:param container_... | 3,033 | en | 0.825826 |
googleapis/google-cloud-cpp | google/cloud/storage/emulator/gcs/bucket.py | 1 | 18283 | # 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 agreed to in writing, s... | apache-2.0 | 2,046,264,609,927,782,400 | 37.9 | 98 | 0.587322 | false | Implement a class to simulate GCS buckets.
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... | 891 | en | 0.820071 |
mancoast/CPythonPyc_test | cpython/234_test_sax.py | 1 | 19309 | # regression test for SAX 2.0 -*- coding: iso-8859-1 -*-
# $Id: test_sax.py,v 1.24.16.1 2004/03/20 08:20:03 fdrake Exp $
from xml.sax import make_parser, ContentHandler, \
SAXException, SAXReaderNotAvailable, SAXParseException
try:
make_parser()
except SAXReaderNotAvailable:
# do... | gpl-3.0 | -2,254,858,870,572,087,000 | 26.782734 | 117 | 0.5702 | false | regression test for SAX 2.0 -*- coding: iso-8859-1 -*- $Id: test_sax.py,v 1.24.16.1 2004/03/20 08:20:03 fdrake Exp $ don't try to test this module if we cannot create a parser ===== Utilities Creating parsers several times in a row should succeed. Testing this because there have been failures of this kind be... | 1,791 | en | 0.568543 |
sio2project/oioioi | oioioi/szkopul/views.py | 1 | 2838 | import django
from django.conf import settings
from django.template.response import TemplateResponse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from oioioi.base.main_page import register_main_page_view
from oioioi.contests.controllers import submission_template_context
from ... | gpl-3.0 | -4,068,311,784,596,601,300 | 32.388235 | 87 | 0.686399 | false | TODO Add Portals main page to the menu: navbar_links_registry.register( name='portals', text=_("Portals"), ... ) limit queryset size, because filtering all submissions is slow | 187 | en | 0.390709 |
osuripple/pep.py | objects/chatFilters.py | 1 | 1250 | class chatFilters:
def __init__(self, fileName="filters.txt"):
"""
Initialize chat filters
:param fileName: name of the file containing filters. Default: filters.txt
"""
self.filters = {}
self.loadFilters(fileName)
def loadFilters(self, fileName="filters.txt"):
"""
Load filters from a file
:param... | agpl-3.0 | -5,941,986,136,163,623,000 | 22.148148 | 76 | 0.672 | false | Initialize chat filters
:param fileName: name of the file containing filters. Default: filters.txt
Replace forbidden words with filtered ones
:param message: normal message
:return: filtered message
Load filters from a file
:param fileName: name of the file containing filters. Default: filters.txt
:return:
Reset c... | 425 | en | 0.711685 |
jef-n/QGIS | tests/src/python/providertestbase.py | 1 | 52878 | # -*- coding: utf-8 -*-
"""QGIS Unit test utils for provider tests.
.. note:: 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.
"... | gpl-2.0 | -9,024,574,573,250,967,000 | 47.780443 | 221 | 0.604429 | false | This is a collection of tests for vector data providers and kept generic.
To make use of it, subclass it and set self.source to a provider you want to test.
Make sure that your provider uses the default dataset by converting one of the provided datasets from the folder
tests/testdata/provider to a dataset your provider... | 5,979 | en | 0.880684 |
Autostew/autostew | autostew_back/event_handlers/collision.py | 1 | 4077 | from autostew_back.event_handlers.base_event_handler import BaseEventHandler
from autostew_web_enums.models import EventType, ParticipantState
from autostew_web_session.models.event import Event
from autostew_web_session.models.participant import Participant
warn_at = 0.7
environment_crash_multiplier = 0.1
class Han... | agpl-3.0 | 1,326,310,007,162,899,000 | 49.333333 | 131 | 0.704194 | false | 0 | en | 0.110449 | |
47lining/nucleator-core | lib/nucleator/cli/cli.py | 1 | 5116 | # Copyright 2015 47Lining LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | apache-2.0 | 9,091,823,914,105,722,000 | 40.934426 | 146 | 0.585418 | false | Copyright 2015 47Lining LLC. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distrib... | 772 | en | 0.852164 |
robcarver17/pysystemtrade | sysobjects/production/roll_state.py | 1 | 2906 | from enum import Enum
from syscore.objects import named_object
RollState = Enum("RollState",(
"No_Roll",
"Passive",
"Force",
"Force_Outright",
"Roll_Adjusted"))
default_state = RollState.No_Roll
roll_adj_state = RollState.Roll_Adjusted
roll_explanations = {
RollState.No_Roll:"No rolling happ... | gpl-3.0 | 1,969,242,482,449,701,400 | 36.25641 | 179 | 0.681693 | false | Transition matrix: First option is recommended A 0 suffix indicates we have no position in the priced contract A 1 suffix indicates we do have a position in the priced contract | 176 | en | 0.88077 |
Bajoo/client-pc | bajoo/common/periodic_task.py | 1 | 5677 | # -*- coding: utf-8 -*-
import logging
from threading import Timer, Lock
from ..promise import Deferred, CancelledError
_logger = logging.getLogger(__name__)
class PeriodicTask(object):
"""Generic Thread-based service, executing a task at regular interval.
The task is executed first right after the call to... | gpl-3.0 | -4,949,742,910,043,404,000 | 33.198795 | 79 | 0.550114 | false | Generic Thread-based service, executing a task at regular interval.
The task is executed first right after the call to `start()`, in a new
thread.
After each execution, the next execution is scheduled after the specified
delay. The delay doesn't include the task's duration.
Attributes:
delay (int): delay between ... | 2,375 | en | 0.876463 |
spillai/procgraph | src/procgraph_mpl/plot_anim.py | 1 | 1093 |
__all__ = [
'PlotAnim',
]
class PlotAnim(object):
def __init__(self):
self.handle_line = {}
self.handle_text = {}
self.pylab = None
def set_pylab(self, pylab):
self.pylab = pylab
def assert_pylab_given(self):
if self.pylab is None:... | lgpl-3.0 | -8,553,758,529,945,379,000 | 26.325 | 65 | 0.511436 | false | 0 | en | 0.110449 | |
silasary/StackIt | StackIt/builder.py | 1 | 18659 | import os, sys, re
#Image manipulation
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
#Check input format
import mmap
#XML parsing
import xml.etree.ElementTree
#HTML parsing
from lxml import html
from StackIt import scraper, config, decklist, globals
from StackIt.globals import Card, spe... | mit | 3,783,695,594,269,186,600 | 37.235656 | 207 | 0.613109 | false | Image manipulationCheck input formatXML parsingHTML parsingensure that mana costs greater than 9 (Kozilek, Emrakul...) aren't misaligned Sizes Image Positioning Crops Colors Text Positioning Type Sizes Rotationsome position initializationstill need to check cost adjustment...reset the large mana cost markerslands have ... | 1,587 | en | 0.590383 |
superfluidity/RDCL3D | code/translator/hot/tosca/tests/test_tosca_autoscaling.py | 1 | 3440 | # 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 | -5,870,668,493,590,456,000 | 36.802198 | 78 | 0.566279 | false | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under th... | 546 | en | 0.872906 |
arseneyr/essentia | test/src/unittest/temporal/test_loudnessebur128.py | 1 | 6832 | #!/usr/bin/env python
# Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia 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 ... | agpl-3.0 | 2,107,436,726,347,414,000 | 46.453901 | 103 | 0.600117 | false | !/usr/bin/env python Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra This file is part of Essentia Essentia 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 (FSF), either version 3 ... | 1,360 | en | 0.736199 |
GregSilverman/cohort_rest_api | rest_api/build_atom.py | 1 | 14183 | #!/usr/bin/env python
from sqlalchemy import between
from sqlalchemy.sql import and_, label
from app import db, models
import htsql_methods as hsql
Clinical = models.ClinicalData
Attribute = models.Attribute
"""
Example SQL atomic query for modified nested model:
select *
from
clinical_data
(selec... | gpl-3.0 | -4,821,364,456,509,184,000 | 34.019753 | 131 | 0.476345 | false | !/usr/bin/env python assemble canonical atomic query using parsed components from URL payload atomic array of query elements entire data set with no constraints data need to have special characters removed for querying initialize lists create queries assemble base query grab the desired bucket grab bucket by attribute ... | 2,256 | en | 0.7776 |
Iconoclasteinc/tgit | tgit/tagging/embedded_containers.py | 1 | 1536 | # -*- coding: utf-8 -*-
#
# TGiT, Music Tagger for Professionals
# Copyright (C) 2013 Iconoclaste Musique 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 2
# of the License... | gpl-3.0 | 2,475,258,062,397,315,000 | 29.72 | 93 | 0.747396 | false | -*- coding: utf-8 -*- TGiT, Music Tagger for Professionals Copyright (C) 2013 Iconoclaste Musique 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 2 of the License, or (at your opti... | 808 | en | 0.880401 |
crakensio/django_training | lib/python2.7/site-packages/bpython/curtsiesfrontend/interaction.py | 1 | 4789 | import greenlet
import time
import curtsies.events as events
from bpython.repl import Interaction as BpythonInteraction
from bpython.curtsiesfrontend.manual_readline import char_sequences as rl_char_sequences
class StatusBar(BpythonInteraction):
"""StatusBar and Interaction for Repl
Passing of control back ... | cc0-1.0 | -3,079,365,304,622,484,500 | 37.007937 | 129 | 0.618083 | false | StatusBar and Interaction for Repl
Passing of control back and forth between calls that use interact api
(notify, confirm, file_prompt) like bpython.Repl.write2file and events
on the main thread happens via those calls and self.wait_for_request_or_notify.
Calling one of these three is required for the main thread to ... | 870 | en | 0.881618 |
cltrudeau/django-awl | awl/templatetags/awltags.py | 1 | 4065 | # awl.templatetags.awltags.py
from django import template
register = template.Library()
# ============================================================================
@register.filter
def getitem(dictionary, keyvar):
"""Custom django template filter that allows access to an item of a
dictionary through the ... | mit | -5,902,167,371,774,256,000 | 28.456522 | 78 | 0.512423 | false | This template tag is used to do complex nested attribute accessing of
an object. The first parameter is the object being accessed, subsequent
paramters are one of:
* a variable in the template context
* a literal in the template context
* either of the above surrounded in square brackets
For each variable or litera... | 1,998 | en | 0.558319 |
squidsrc/python-rocksdb | setup.py | 1 | 1079 | from setuptools import setup, find_packages
from distutils.extension import Extension
from Cython.Build import cythonize
extension_defaults = {
'extra_compile_args': [
'-std=gnu++11',
'-O3',
'-Wall',
'-Wextra',
'-Wconversion',
'-fno-strict-aliasing'
],
'langu... | bsd-3-clause | 5,162,525,097,040,509,000 | 21.479167 | 51 | 0.578313 | false | 0 | en | 0.110449 | |
nateprewitt/pipenv | pipenv/project.py | 1 | 17449 | # -*- coding: utf-8 -*-
import json
import os
import re
import sys
import base64
import hashlib
import contoml
import delegator
import pipfile
import toml
from .utils import (
mkdir_p, convert_deps_from_pip, pep423_name, recase_file,
find_requirements, is_file, is_vcs, python_version, cleanup_toml,
is_ins... | mit | 562,355,048,727,634,100 | 32.41954 | 101 | 0.562224 | false | docstring for Project
Returns a list of packages for pip-tools to consume.
Pipfile.lock divided by PyPI and external dependencies.
Pipfile divided by PyPI and external dependencies.
Adds a given index to the Pipfile.
Returns a list of all packages.
Creates the Pipfile, filled with juicy defaults.
Deletes the lockfile.
... | 3,262 | en | 0.811262 |
mrcslws/nupic.research | projects/dynamic_sparse/runs/run_test.py | 1 | 1756 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2019, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 | 5,158,335,504,190,792,000 | 31.518519 | 73 | 0.646925 | false | ---------------------------------------------------------------------- Numenta Platform for Intelligent Computing (NuPIC) Copyright (C) 2019, Numenta, Inc. Unless you have an agreement with Numenta, Inc., for a separate license for this software code, the following terms and conditions apply: This program is free soft... | 989 | en | 0.813147 |
wendlers/scratch-pynetsense | example-src/WrappedRemoteSensor.py | 1 | 2457 | ##
# This file is part of the Scratch Remote Sensor (SRS) Library project
#
# Copyright (C) 2012 Stefan Wendler <sw@kaltpost.de>
#
# The SRS Library is free software; you can redistribute
# it and/or modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; eith... | lgpl-2.1 | -1,918,675,807,934,093,300 | 26.606742 | 74 | 0.699634 | false | This example shows how to write a baic wrapped remote sensor. It reads
"/proc/meminfo" and parses out the values for "memtotal" and "memfree".
Each time one of this values changes, a sensor-update is send to the
server.
To start this sensor, pass it as a wrapper to the wrapper daemon:
source setenv.sh
python src/sc... | 1,663 | en | 0.780833 |
luotao1/Paddle | python/paddle/tensor/logic.py | 1 | 16431 | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | apache-2.0 | 1,783,713,438,296,025,000 | 35.676339 | 128 | 0.585296 | false | ${comment}
Args:
x(Tensor): ${input_comment}.
y(Tensor): ${other_comment}.
rtol(rtoltype, optional): The relative tolerance. Default: :math:`1e-5` .
atol(atoltype, optional): The absolute tolerance. Default: :math:`1e-8` .
equal_nan(equalnantype, optional): ${equal_nan_comment}.
name (str, opti... | 9,518 | en | 0.63125 |
alsrgv/tensorflow | tensorflow/python/ops/math_grad.py | 1 | 57271 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 2,105,415,834,781,362,400 | 33.54222 | 81 | 0.653891 | false | Returns grad * -1/sqrt(1-x^2).
Returns grad * 1/sinh(y).
Gradient for Add.
Copies the gradient to all inputs.
Returns -grad / (Im(x) + iRe(x))
Returns grad * 1/sqrt(1-x^2).
Returns grad * 1/cosh(y).
Returns grad * x / (x^2 + y^2), grad * -y / (x^2 + y^2).
Returns grad * 1/ (1 + x^2).
Returns grad * 1/ (1 - x^2).
Return... | 10,151 | en | 0.760426 |
robled/rocket-depot | setup.py | 1 | 2523 | import subprocess
from distutils.log import warn, info
from setuptools import setup
setup(
name='rocket-depot',
version='1.0.0',
scripts=['rocket-depot'],
# metadata for upload to PyPI
platforms='linux',
author='David Roble',
author_email='robled@electronsweatshop.com',
maintainer='Dav... | gpl-3.0 | 8,640,305,625,367,821,000 | 38.421875 | 70 | 0.604439 | false | metadata for upload to PyPI | 27 | en | 0.891551 |
mjcaley/aiospamc | tests/test_responses.py | 1 | 3390 | #!/usr/bin/env python3
import pytest
import zlib
from aiospamc.exceptions import *
from aiospamc.header_values import CompressValue
from aiospamc.incremental_parser import ResponseParser
from aiospamc.responses import Response
def test_init_version():
r = Response(version="4.2", status_code=0, message="EX_OK")... | mit | 6,483,868,723,979,816,000 | 24.111111 | 82 | 0.623009 | false | !/usr/bin/env python3 | 21 | fr | 0.448822 |
swegener/gruvi | lib/gruvi/address.py | 1 | 3675 | #
# This file is part of Gruvi. Gruvi is free software available under the
# terms of the MIT license. See the file "LICENSE" that was provided
# together with this source file for the licensing terms.
#
# Copyright (c) 2012-2014 the Gruvi authors. See the file "AUTHORS" for a
# complete list.
from __future__ import a... | mit | -7,268,691,083,574,085,000 | 34.336538 | 88 | 0.661224 | false | Resolve an Internet *node* name and *service* into a socket address.
The *family*, *socktype* and *protocol* are optional arguments that specify
the address family, socket type and protocol, respectively. The *flags*
argument allows you to pass flags to further modify the resolution process.
See the :func:`socket.geta... | 1,551 | en | 0.771728 |
harrystech/arthur-redshift-etl | python/etl/monitor.py | 1 | 36933 | """
Monitoring (and logging) for ETL steps.
This module provides a context for the ETL that allows to monitor
the start time of an ETL step along with its successful or
unsuccessful completion. Events for start, finish or failure
may be emitted to a persistence layer.
"""
import http.server
import itertools
import l... | mit | -3,399,315,863,732,583,000 | 38.123941 | 110 | 0.600601 | false | An instance of this thread will repeatedly try to run queries on a DynamoDB table.
Every time a query returns a result, this result is sent to a queue and the query will no
longer be tried.
Store ETL events in a DynamoDB table.
Note the table is created if it doesn't already exist when a payload needs to be stored.
C... | 7,226 | en | 0.877147 |
att-comdev/armada | armada/tests/unit/handlers/test_manifest.py | 1 | 19376 | # Copyright 2017 The Armada Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | apache-2.0 | 8,929,328,809,343,949,000 | 43.748268 | 79 | 0.658805 | false | Validate that attempting to build a manifest with missing
chart groups fails.
Validate that attempting to build a chart that points to
a missing dependency fails.
Validate that attempting to build a chart group document with
missing chart group fails.
Copyright 2017 The Armada Authors. Licensed under the Apache Licen... | 2,510 | en | 0.797595 |
linuxrocks123/MailTask | mt_chronos.py | 1 | 1986 | #! /usr/bin/env python
# MailTask Alpha: The Email Manager
# Copyright (C) 2015 Patrick Simmons
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your ... | gpl-3.0 | -4,021,911,731,758,143,000 | 37.192308 | 84 | 0.703424 | false | ! /usr/bin/env python MailTask Alpha: The Email Manager Copyright (C) 2015 Patrick Simmons This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any lat... | 1,280 | en | 0.815224 |
delcypher/klee-runner | tools/show-klee-dir.py | 1 | 5821 | #!/usr/bin/env python
# vim: set sw=4 ts=4 softtabstop=4 expandtab:
"""
Perform verification of a klee-runner result yaml file and associated working
directory.
"""
import argparse
from enum import Enum
import logging
import os
# pylint: disable=wrong-import-position
from load_klee_analysis import add_kleeanalysis_to_... | mit | -734,669,082,042,310,700 | 36.076433 | 92 | 0.633912 | false | Perform verification of a klee-runner result yaml file and associated working
directory.
!/usr/bin/env python vim: set sw=4 ts=4 softtabstop=4 expandtab: pylint: disable=wrong-import-position Report stuff about the KLEE directory Show the reason for early termination by count | 277 | en | 0.744876 |
codesy/codesy | payments/migrations/0001_initial.py | 1 | 1590 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-08-03 23:59
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migration... | agpl-3.0 | -4,125,141,983,997,128,000 | 38.75 | 118 | 0.597484 | false | -*- coding: utf-8 -*- Generated by Django 1.9.4 on 2016-08-03 23:59 | 67 | en | 0.734047 |
Dutchj/pbtweeter | pbtweeter/speedrun.py | 1 | 1678 | import config as cfg
import json
from datetime import datetime
from urllib2 import urlopen, quote
def get_lb():
try:
response = urlopen('http://www.speedrun.com/api_records.php?amount=999&game='+quote(cfg.game))
return json.load(response)
except Exception, e:
print datetime.now().strft... | gpl-2.0 | -8,179,702,171,126,471,000 | 37.136364 | 102 | 0.564958 | false | 0 | en | 0.110449 | |
wpoely86/easybuild-easyblocks | easybuild/easyblocks/r/rserve.py | 1 | 1691 | ##
# Copyright 2009-2016 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# Flemish Research Foundation ... | gpl-2.0 | -6,841,785,805,231,180,000 | 37.431818 | 101 | 0.740982 | false | Build and install Rserve R library.
Set LIBS environment variable correctly prior to building.
EasyBuild support for building and installing the Bioconductor R library, implemented as an easyblock
@author: Stijn De Weirdt (Ghent University)
@author: Dries Verdegem (Ghent University)
@author: Kenneth Hoste (Ghent Unive... | 1,408 | en | 0.803899 |
mjirik/lisa | lisa/vessels_segmentation.py | 1 | 3265 | #! /usr/bin/python
# -*- coding: utf-8 -*-
# import funkcí z jiného adresáře
import sys
import os.path
import io3d
path_to_script = os.path.dirname(os.path.abspath(__file__))
#import featurevector
import unittest
from loguru import logger
# logger = logging.getLogger()
# import apdb
# apdb.set_trace();
# import sc... | bsd-3-clause | -3,153,561,909,537,196,000 | 23.89313 | 94 | 0.616069 | false | ! /usr/bin/python -*- coding: utf-8 -*- import funkcí z jiného adresářeimport featurevector logger = logging.getLogger() import apdb apdb.set_trace(); import scipy.io ----------------- my scripts -------- logger = logging.getLogger() logger = logging.getLogger()logger.debug('input params') input parserelse:dcm_read_fro... | 1,130 | en | 0.306608 |
voilet/cmdb | assets/ztree/api.py | 1 | 11656 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# =============================================================================
# FileName: api.py
# Desc: 2015-15/4/16:下午5:54
# Author: 苦咖啡
# Email: voilet@qq.com
# HomePage: http://blog.kukafei520.net
# History:
# =======================... | agpl-3.0 | 1,779,326,221,662,780,700 | 34.814241 | 136 | 0.585927 | false | ztree 类
树请求验证
:param request:
:return:
树请求验证
:param request:
:return:
:param request:
:return:
树请求验证
:param request:
:return:
!/usr/bin/env python -*- coding: utf-8 -*- ============================================================================= FileName: api.py Desc: 2015-15/4/16:下午5:54 Author: 苦咖啡... | 624 | en | 0.457477 |
Cygnus-Inc/Cygnet-Adapter | docs/conf.py | 1 | 1240 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import sys
sys.path.append(os.path.abspath('src/cygnet_adapter'))
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
... | apache-2.0 | -935,034,756,308,814,500 | 27.181818 | 81 | 0.670161 | false | -*- coding: utf-8 -*- on_rtd is whether we are on readthedocs.org only import and set the theme if we're building docs locally | 126 | en | 0.871937 |
qpiel/python_estimation_source | Script/AllSourcesFit_Ctools.py | 1 | 3157 | import os,sys
from os.path import join
import ctools
from ctoolsAnalysis.config import get_config,get_default_config
from ctoolsAnalysis.LikeFit import CTA_ctools_analyser
from Common_Functions import *
Astropy = True
try :
import Coordinates.CoordHandler as CH
import Coordinates.CoordUtilities as CU
from ... | gpl-3.0 | -4,762,860,779,201,160,000 | 31.214286 | 98 | 0.638581 | false | define source name. This also allows to have the coordinate if you have astropysource = "AP Librae"default work and out path. Not use if you provide a config file in the command line setup : Time, Energy and IRFS. Not use if you provide a config file in the command linetmax = 3600irf = "South_0.5h"quentinfitsFile="/Use... | 996 | en | 0.5469 |
Aeronautics/aero | aero/commands/install.py | 1 | 1362 | # -*- coding: utf-8 -*-
from aero.__version__ import __version_info__
__author__ = 'nickl-'
from .base import CommandProcessor as CommandProcessor
class InstallCommand(CommandProcessor):
from .base import coroutine
package = ''
adapter = ''
def wiring(self):
self.out = self.write()
... | bsd-3-clause | -6,355,324,622,234,375,000 | 24.698113 | 101 | 0.556535 | false | -*- coding: utf-8 -*- | 21 | en | 0.767281 |
pmghalvorsen/gramps_branch | gramps/gui/editors/displaytabs/groupembeddedlist.py | 1 | 14240 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
# 2009 Benny Malengier
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; ei... | gpl-2.0 | -4,655,648,685,835,140,000 | 34.073892 | 86 | 0.523596 | false | This class provides the base class for all the list tabs that show
grouped data.
It maintains a Gtk.TreeView, including the selection and button sensitivity.
Create a new list, using the passed build_model to populate the list.
Return a path as [groupindex, index] of the row on x,y.
If no row, then a new line in the... | 4,655 | en | 0.798113 |
mdevaev/emonoda | emonoda/plugins/confetti/pushover.py | 1 | 3447 | """
Emonoda -- A set of tools to organize and manage your torrents
Copyright (C) 2015 Devaev Maxim <mdevaev@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either vers... | gpl-3.0 | 4,823,935,925,674,717,000 | 35.670213 | 128 | 0.577314 | false | Emonoda -- A set of tools to organize and manage your torrents
Copyright (C) 2015 Devaev Maxim <mdevaev@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or... | 774 | en | 0.897993 |
yusukemurayama/ppytrading | ppyt/filters/historical_filters.py | 1 | 1741 | # coding: utf-8
import logging
from sqlalchemy.sql import func
from ppyt.filters import FilterBase
from ppyt.models.orm import start_session, History
logger = logging.getLogger(__name__)
class AverageVolumeFilter(FilterBase):
"""平均出来形で銘柄を絞り込むクラスです。"""
_findkey = '平均出来高フィルタ' # フィルタを一意に特定できる名前をつけます。
def... | mit | -2,557,690,650,821,079,000 | 24.240741 | 79 | 0.567865 | false | 平均出来形で銘柄を絞り込むクラスです。
銘柄を絞り込みます。
絞り込み条件:
- 過去の平均出来高が規定の値を上回っている。
Args:
stocks: 絞り込み前の銘柄のリスト
Returns:
絞り込み後の銘柄のリスト
初期化処理を行います。
Args:
volume: 平均出来高の閾値
Raises:
ArgumentError: 引数チェックに引っかかった場合に発生します。
coding: utf-8 フィルタを一意に特定できる名前をつけます。 過去の平均出来高が規定値を上回っている場合、絞り込み後のリストに追加します。 | 294 | ja | 0.999656 |
Magic-Translater/Pwntools.Doc.In.Zh-cn | source/conf.py | 1 | 11053 | # -*- coding: utf-8 -*-
#
# pwntools documentation build configuration file, created by
# sphinx-quickstart on Wed May 28 15:00:52 2014.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | mit | -6,300,908,279,611,668,000 | 30.670487 | 156 | 0.689406 | false | -*- coding: utf-8 -*- pwntools documentation build configuration file, created by sphinx-quickstart on Wed May 28 15:00:52 2014. This file is execfile()d with the current directory set to its containing dir. Note that not all possible configuration values are present in this autogenerated file. All configuration values... | 6,823 | en | 0.676852 |
auready/django | tests/auth_tests/test_forms.py | 2 | 34292 | import datetime
import re
from unittest import mock
from django import forms
from django.contrib.auth.forms import (
AdminPasswordChangeForm, AuthenticationForm, PasswordChangeForm,
PasswordResetForm, ReadOnlyPasswordHashField, ReadOnlyPasswordHashWidget,
SetPasswordForm, UserChangeForm, UserCreationForm,
... | bsd-3-clause | -8,254,887,055,535,520,000 | 38.944056 | 119 | 0.616743 | false | Create a user and return a tuple (user_object, username, email).
The change form does not return the password value
To prevent almost identical usernames, visually identical but differing
by their unicode code points only, Unicode NFKC normalization should
make appear them equal to Django.
Inactive user cannot receive ... | 2,879 | en | 0.825822 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.