repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
robios/PyTES | pytes/Util.py | 1 | 32573 | import warnings
import numpy as np
import time
from struct import unpack
from scipy.stats import norm
from scipy.signal import tukey
from Filter import median_filter
import Analysis, Filter, Constants
def savefits(data, filename, vmax=1.0, sps=1e6, bits=14, noise=False, clobber=True):
"""
Save pulse/noise to F... | mit | -7,457,606,929,335,083,000 | 37.053738 | 178 | 0.500414 | false |
MrSenko/Nitrate | tcms/profiles/views.py | 1 | 5280 | # -*- coding: utf-8 -*-
from django import http
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse
from django.db.models import Q
from django.shortcuts import render_to_... | gpl-2.0 | 6,507,435,651,455,088,000 | 32.630573 | 84 | 0.631061 | false |
mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/eggs/kombu-3.0.13-py2.7.egg/kombu/transport/virtual/__init__.py | 1 | 27656 | """
kombu.transport.virtual
=======================
Virtual transport implementation.
Emulates the AMQ API for non-AMQ transports.
"""
from __future__ import absolute_import, unicode_literals
import base64
import socket
import sys
import warnings
from array import array
from itertools import count
from multiproces... | gpl-3.0 | -512,856,187,888,683,650 | 31.384075 | 79 | 0.58631 | false |
jmontgom10/Mimir_pyPol | oldCode/04b_avgBAABditherHWPimages.py | 1 | 17054 | # -*- coding: utf-8 -*-
"""
Combines all the images for a given (TARGET, FILTER, HWP) combination to
produce a single, average image.
Estimates the sky background level of the on-target position at the time of the
on-target observation using a bracketing pair of off-target observations through
the same HWP polaroid ro... | mit | 8,825,268,214,327,681,000 | 38.93911 | 92 | 0.599977 | false |
lanius/hunk | hunk/production.py | 1 | 1206 | # -*- coding: utf-8 -*-
"""
hunk.production
~~~~~~~~~~~~~~~
Provides a class to configure production environment.
"""
import importlib
import os
import sys
from ._compat import urljoin, urlunsplit
class ProductionEnvironment(object):
"""Holds information for a production environment to dispatch to it."""
... | mit | 6,803,922,273,237,640,000 | 23.612245 | 75 | 0.577944 | false |
humbhenri/Sudoku_Poliglota | python/test_sudoku.py | 1 | 2125 | import unittest
from .sudoku import *
from copy import deepcopy
SUDOKU_SAMPLE = [
[2, 0, 0, 0, 0, 0, 0, 6, 0],
[0, 0, 0, 0, 7, 5, 0, 3, 0],
[0, 4, 8, 0, 9, 0, 1, 0, 0],
[0, 0, 0, 3, 0, 0, 0, 0, 0],
[3, 0, 0, 0, 1, 0, 0, 0, 9],
[0, 0, 0, 0, 0, 8, 0... | mit | -2,668,265,004,219,262,500 | 28.929577 | 104 | 0.475294 | false |
igou/rt-thread | tools/building.py | 1 | 31441 | #
# File : building.py
# This file is part of RT-Thread RTOS
# COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
#
# 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... | apache-2.0 | 5,002,511,252,790,817,000 | 32.662741 | 139 | 0.569988 | false |
petrushev/txplaya | txplayagui/librarywidget.py | 1 | 4653 | import json
from PyQt5.QtCore import pyqtSlot, pyqtSignal, QModelIndex, Qt
from PyQt5.QtWidgets import QWidget, QSpacerItem, QSizePolicy, QShortcut
from PyQt5.QtGui import QKeySequence
from txplayagui.ui.library import Ui_LibraryWidget
from txplayagui.library import LibraryModel
from txplayagui.utilities import unwra... | gpl-3.0 | 4,239,913,198,082,620,000 | 32.47482 | 89 | 0.675693 | false |
Sotera/aggregate-micro-paths | hive-streaming/AggregateMicroPath.py | 1 | 9018 | # Copyright 2016 Sotera Defense Solutions 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 agre... | apache-2.0 | -3,639,512,613,828,618,000 | 35.216867 | 174 | 0.685074 | false |
Multiscale-Genomics/mg-process-fastq | process_mnaseseq.py | 1 | 6459 | #!/usr/bin/env python
"""
.. See the NOTICE file distributed with this work for additional information
regarding copyright ownership.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
... | apache-2.0 | 3,740,831,671,159,047,700 | 32.640625 | 85 | 0.593281 | false |
jldbc/pybaseball | pybaseball/standings.py | 1 | 3820 | from typing import List, Optional
import pandas as pd
import requests
from bs4 import BeautifulSoup, Comment, PageElement, ResultSet
from . import cache
from .utils import most_recent_season
def get_soup(year: int) -> BeautifulSoup:
url = f'http://www.baseball-reference.com/leagues/MLB/{year}-standings.shtml'
... | mit | -5,694,633,745,706,730,000 | 37.585859 | 120 | 0.567801 | false |
schnittstabil/findd | tests/utils/test_path.py | 1 | 2655 | from os import pathsep
from os.path import basename
from os.path import dirname
from os.path import join
from mock import patch
from mock import Mock
from .. import TestCase
import findd.utils.path as sut
class Parents(TestCase):
def test_should_work_with_empty_paths(self):
self.assertEqual(list(sut.par... | mit | -8,470,010,795,901,828,000 | 33.038462 | 74 | 0.580791 | false |
lalanne/SmallServers | py/common/ResponseBuilder.py | 1 | 1947 |
def build_base_message(msisdn, result):
message = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>' + \
'<msg>' + \
'<header action=\"1\" id=\"1111\"/>' + \
'<resp>' + \
'<op>rslt_comp_promo</op>' + \
'<msisdn>' + str(msisdn) + '</msisdn>' + \
'<result>' + str(result... | gpl-3.0 | -1,142,242,387,639,306,000 | 36.442308 | 79 | 0.473549 | false |
giginet/django-generic-tagging | generic_tagging/templatetags/tagging.py | 1 | 1210 | from django import template
from django.contrib.contenttypes.models import ContentType
from django.template.loader import render_to_string
from ..models import TaggedItem, Tag
register = template.Library()
@register.assignment_tag
def get_tagged_items_for(object):
'''retrieve tagged items which relative with the... | mit | -6,690,174,776,541,348,000 | 29.25 | 81 | 0.731405 | false |
framon/samba | source3/selftest/tests.py | 1 | 27373 | #!/usr/bin/python
# This script generates a list of testsuites that should be run as part of
# the Samba 3 test suite.
# The output of this script is parsed by selftest.pl, which then decides
# which of the tests to actually run. It will, for example, skip all tests
# listed in selftest/skip or only run a subset durin... | gpl-3.0 | -7,841,901,599,258,862,000 | 63.711584 | 322 | 0.654258 | false |
watsonpy/watson-filters | tests/watson/filters/test_string.py | 1 | 1528 | # -*- coding: utf-8 -*-
from datetime import datetime
from watson.filters.string import Trim, RegEx, Numbers, Upper, Lower, StripTags, HtmlEntities, Date
class TestTrim(object):
def test_trim_string(self):
filter = Trim()
assert filter(' Test') == 'Test'
assert filter('Test') == 'Test'
... | bsd-3-clause | -9,199,935,339,708,211,000 | 20.828571 | 99 | 0.594895 | false |
python-security/pyt | pyt/core/module_definitions.py | 1 | 4715 | """This module handles module definitions
which basically is a list of module definition."""
import ast
# Contains all project definitions for a program run
# Only used in framework_adaptor.py, but modified here
project_definitions = dict()
class ModuleDefinition():
"""Handling of a definition."""
module_... | gpl-2.0 | -1,520,086,408,947,189,200 | 32.204225 | 98 | 0.549523 | false |
abramhindle/UnnaturalCodeFork | python/testdata/launchpad/lib/lp/registry/xmlrpc/softwarecenteragent.py | 1 | 1672 | # Copyright 2010-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""XMLRPC APIs for person set."""
__metaclass__ = type
__all__ = [
'SoftwareCenterAgentAPI',
]
from zope.component import getUtility
from zope.interface import impl... | agpl-3.0 | -5,981,905,476,566,045,000 | 31.153846 | 74 | 0.70634 | false |
BrainTech/openbci | obci/analysis/csp/MLogit.py | 1 | 11792 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
"""This is a class for Multinomial Logit Regression
Class uses scipy.optimize package for minimalization of a cost function.
The gradient of the cost function is passed to the minimizer.
Piotr Milanowski, November 2011, Warsaw
"""
from scipy.optimize import fmin_ncg, fmin_... | gpl-3.0 | 8,049,711,342,250,478,000 | 33.17971 | 100 | 0.498474 | false |
jeremiahyan/odoo | odoo/addons/base/populate/res_company.py | 1 | 1638 | import collections
import logging
from odoo import models, Command
from odoo.tools import populate
_logger = logging.getLogger(__name__)
class Partner(models.Model):
_inherit = "res.company"
_populate_sizes = {
'small': 5,
'medium': 10,
'large': 50,
}
def _populate_factorie... | gpl-3.0 | 6,156,147,578,605,164,000 | 39.95 | 148 | 0.608669 | false |
alperyeg/elephant | elephant/test/test_spike_train_generation.py | 1 | 42885 | # -*- coding: utf-8 -*-
"""
Unit tests for the spike_train_generation module.
:copyright: Copyright 2014-2016 by the Elephant team, see `doc/authors.rst`.
:license: Modified BSD, see LICENSE.txt for details.
"""
from __future__ import division
import os
import sys
import unittest
import warnings
import neo
import n... | bsd-3-clause | -8,141,108,870,692,667,000 | 40.434783 | 79 | 0.55938 | false |
eshook/Forest | test_forest.py | 1 | 1438 | """
Copyright (c) 2017 Eric Shook. All rights reserved.
Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
@author: eshook (Eric Shook, eshook@gmail.edu)
@contributors: <Contribute and add your name here!>
"""
# Begin coverage testing
import coverage
cov = coverage.covera... | bsd-3-clause | 6,569,984,685,676,343,000 | 35.871795 | 124 | 0.752434 | false |
CiscoSystems/jujucharm-n1k | charms/precise/juju-gui/server/guiserver/auth.py | 1 | 15759 | # This file is part of the Juju GUI, which lets users view and manage Juju
# environments within a graphical interface (https://launchpad.net/juju-gui).
# Copyright (C) 2013 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public Lice... | apache-2.0 | -2,644,264,445,183,722,000 | 35.144495 | 79 | 0.588235 | false |
chiefspace/udemy-rest-api | udemy_rest_api_section6/resources/item.py | 1 | 2149 | from flask_restful import Resource, reqparse
from flask_jwt import jwt_required
from models.item import ItemModel
class Item(Resource):
parser = reqparse.RequestParser()
parser.add_argument('price',
type=float,
required=True,
help='This field cannot be left blank!'
)
parser.add_... | gpl-2.0 | 4,751,284,133,216,453,000 | 30.617647 | 140 | 0.585854 | false |
dariansk/python_training | fixture/db.py | 1 | 1487 | #import pymysql.cursors
import mysql.connector
from model.group import Group
from model.contact import Contact
class Dbfixture:
def __init__(self, host, name, user, password):
self.host = host
self.name = name
self.user = user
self.password = password
#self.connection = py... | apache-2.0 | 1,064,092,637,281,715,000 | 32.818182 | 116 | 0.607935 | false |
jmlong1027/multiscanner | storage/file.py | 1 | 2965 | import codecs
import gzip
import json
import storage
class File(storage.Storage):
DEFAULTCONF = {
'ENABLED': True,
'path': 'report.json',
'gzip': False,
'files-per-line': 1
}
def setup(self):
if self.config['gzip'] is True:
self.file_handle = gzip.open... | mpl-2.0 | 6,322,562,406,190,201,000 | 38.533333 | 88 | 0.455312 | false |
kdeldycke/meta-package-manager | meta_package_manager/tests/test_cli_cleanup.py | 1 | 1262 | # Copyright Kevin Deldycke <kevin@deldycke.com> and contributors.
# All Rights Reserved.
#
# 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) ... | gpl-2.0 | 2,003,288,471,618,735,400 | 34.055556 | 77 | 0.744057 | false |
thomas-schmid-ubnt/avocado | selftests/functional/test_replay_basic.py | 1 | 8628 | import glob
import os
import tempfile
import shutil
import unittest
from avocado.core import exit_codes
from avocado.utils import process
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..')
basedir = os.path.abspath(basedir)
AVOCADO = os.environ.get("UNITTEST_AVOCADO_CMD", "./scripts/avoc... | gpl-2.0 | -3,376,472,881,774,201,300 | 39.130233 | 86 | 0.55911 | false |
zhangyongfei/StudySkia | gm/rebaseline_server/compare_rendered_pictures_test.py | 1 | 3997 | #!/usr/bin/python
"""
Copyright 2014 Google Inc.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
Test compare_rendered_pictures.py
TODO(epoger): Create a command to update the expected results (in
self._output_dir_expected) when appropriate. For now, you should:
1.... | bsd-3-clause | 8,735,846,097,272,002,000 | 32.588235 | 80 | 0.659495 | false |
glyph/imaginary | imaginary/test/test_look.py | 1 | 8911 | """
Tests for L{imaginary.action.LookAt} and L{imaginary.action.LookAround}.
"""
from __future__ import print_function
from textwrap import dedent
from twisted.trial.unittest import TestCase
from zope.interface import implementer
from characteristic import attributes as has_attributes
from axiom import store, item, ... | mit | -8,315,533,436,899,921,000 | 27.560897 | 86 | 0.590282 | false |
wengole/nasman | nasman/snapshots/utils/base.py | 1 | 2714 | import pathlib
import abc
import chardet
from django.utils.timezone import get_default_timezone_name, now
def decode_from_filesystem(path):
"""
Decode a given Path object to unicode by detecting its encoding
:param path: The Path object to decode
:type path: pathlib.Path
:return: Tuple of the str... | bsd-3-clause | 1,686,565,572,457,612,000 | 23.232143 | 79 | 0.609064 | false |
DoWhileGeek/slice | setup.py | 1 | 1915 | import contextlib
import json
import os
import re
import subprocess
from setuptools import setup
VERSION_FILE = os.path.join(os.path.dirname(__file__), "version.json")
def _get_git_description():
try:
return subprocess.check_output(["git", "describe"]).decode("utf-8").strip()
except subprocess.Calle... | mit | -1,291,465,778,683,663,000 | 26.357143 | 98 | 0.571279 | false |
aioworkers/aioworkers | aioworkers/core/context.py | 1 | 17806 | import asyncio
import contextlib
import inspect
import logging.config
import os
from collections import OrderedDict
from functools import wraps
from typing import (
Awaitable,
Callable,
FrozenSet,
Iterable,
List,
Mapping,
MutableMapping,
Optional,
Sequence,
Set,
Tuple,
Ty... | apache-2.0 | -4,187,825,927,766,260,700 | 29.385666 | 79 | 0.53701 | false |
dreyou/ebstarter | reciever.py | 1 | 3846 | #!/usr/bin/env python
import pika
import sys
import signal
import json
import logging
from optparse import OptionParser
import eblocal
def createApplication(command):
res = eblocal.createApp(command["name"], command["source"])
if res is None:
logging.error("Can't create application")
return
... | mit | 3,224,260,323,385,512,400 | 34.943925 | 144 | 0.687207 | false |
heynemann/generator-python-package | app/templates/_setup.py | 1 | 2004 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of <%= package.name %>.
# <%= package.url %>
# Licensed under the <%= package.license %> license:
# http://www.opensource.org/licenses/<%= package.license%>-license
# Copyright (c) <%= package.created.year %>, <%= package.author.name %> <<%= package.au... | mit | 3,471,423,137,697,981,000 | 29.830769 | 101 | 0.558882 | false |
chaluemwut/smcdemo | demo_filter.py | 1 | 2602 | import pickle
from feature_process import FeatureMapping
import feature_process
from text_processing import TextProcessing
from sklearn.cross_validation import train_test_split
is_not_important = {9:0,
13:0,
18:0,
19:0,
23:0,
28:0,
29:0,
33:0,
34:0,
37:0,
40:0,
44:0,
46:0,
50:0,
55:0,
59:0,
61:0,
62:0,
63:0,
72:0,
73:... | apache-2.0 | -8,363,025,862,040,982,000 | 28.247191 | 137 | 0.586088 | false |
philanthropy-u/edx-platform | common/djangoapps/philu_commands/management/commands/sync_users_with_mailchimp.py | 1 | 5558 | """
A command to collect users data and sync with mailchimp learner's list
"""
from logging import getLogger
from django.conf import settings
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand
from django.db import connection
from lms.djangoapps.certificates import api as ... | agpl-3.0 | -108,782,005,858,378,560 | 37.867133 | 102 | 0.549478 | false |
jtackaberry/stagehand | external/metadata/video/ogm.py | 1 | 11299 | # -*- coding: iso-8859-1 -*-
# -----------------------------------------------------------------------------
# ogm.py - ogm/ogg file parser
# -----------------------------------------------------------------------------
# $Id$
#
# -----------------------------------------------------------------------------
# kaa-Metad... | mit | -2,468,706,676,499,654,000 | 35.214744 | 79 | 0.500044 | false |
uw-it-aca/myuw | myuw/test/views/lti/test_photo_list.py | 1 | 2563 | # Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
from unittest import skipIf
from django.urls import reverse
from django.test.utils import override_settings
from django.test import RequestFactory
from myuw.views.lti.photo_list import LTIPhotoList
from myuw.test.api import missing_... | apache-2.0 | 6,827,296,497,645,506,000 | 36.144928 | 76 | 0.622708 | false |
rsheftel/pandas_market_calendars | pandas_market_calendars/exchange_calendars_mirror.py | 1 | 1912 | """
Imported calendars from the exchange_calendars project
GitHub: https://github.com/gerrymanoim/exchange_calendars
"""
from datetime import time
from .market_calendar import MarketCalendar
import exchange_calendars
class TradingCalendar(MarketCalendar):
def __init__(self, open_time=None, close_time=None):
... | mit | -652,348,878,407,477,200 | 25.555556 | 107 | 0.642782 | false |
algorhythms/LeetCode | 917 Reverse Only Letters.py | 1 | 1071 | #!/usr/bin/python3
"""
Given a string S, return the "reversed" string where all characters that are not
a letter stay in the same place, and all letters reverse their positions.
Example 1:
Input: "ab-cd"
Output: "dc-ba"
Example 2:
Input: "a-bC-dEf-ghIj"
Output: "j-Ih-gfE-dCba"
Example 3:
Input: "Test1ng-Leet=code-Q... | mit | -6,603,716,623,650,046,000 | 20.42 | 90 | 0.518207 | false |
zpincus/celltool | celltool/numerics/pca.py | 1 | 5436 | # Copyright 2007 Zachary Pincus
# This file is part of CellTool.
#
# CellTool is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
import bisect, numpy
from . import utility_tools
def pca(data):
... | gpl-2.0 | -3,262,440,634,524,808,000 | 45.87069 | 124 | 0.666667 | false |
Vagab0nd/SiCKRAGE | lib3/feedparser/__init__.py | 1 | 2256 | # Copyright 2010-2020 Kurt McKee <contactme@kurtmckee.org>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
# This file is part of feedparser.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistribut... | gpl-3.0 | 2,770,024,409,418,123,000 | 43.235294 | 84 | 0.77305 | false |
chris-statzer/knuckle-python | contrib/knuckle/window.py | 1 | 3176 | import logging
import time
import sdl2
logging.basicConfig(level=logging.INFO)
class Window(sdl2.Window):
def __init__(self, width, height, title):
super(Window, self).__init__(width, height, title)
self.log = logging.getLogger('Windw')
self.log.info('++ Creating new window object ({},{... | mit | -2,090,749,535,695,830,000 | 33.150538 | 79 | 0.505038 | false |
ufal/neuralmonkey | neuralmonkey/tf_utils.py | 1 | 7163 | """A set of helper functions for TensorFlow."""
from typing import Callable, Iterable, List, Optional, Tuple, Union
import numpy as np
import tensorflow as tf
from neuralmonkey.logging import debug, debug_enabled
# pylint: disable=invalid-name
ShapeSpec = List[int]
# pylint: enable=invalid-name
def _get_current_exp... | bsd-3-clause | 2,182,295,244,979,045,600 | 29.480851 | 78 | 0.62069 | false |
marcua/qurk_experiments | qurkexp/estimation/models.py | 1 | 3728 | from django.db import models
# The kind of item we are estimating properties of
class Kind(models.Model):
name = models.TextField(unique=True)
def __str__(self):
return self.name
# Items whose properties we are estimating
class Item(models.Model):
kind = models.ForeignKey(Kind, related_name="item... | bsd-3-clause | -2,217,554,870,715,888,600 | 36.656566 | 89 | 0.705204 | false |
latinproject/booktype-latin | lib/booki/editor/management/commands/reportweekly.py | 1 | 9125 | # This file is part of Booktype.
# Copyright (c) 2012 Aleksandar Erkalovic <aleksandar.erkalovic@sourcefabric.org>
#
# Booktype 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 Li... | agpl-3.0 | -2,722,611,690,856,461,000 | 34.23166 | 258 | 0.558027 | false |
gdsfactory/gdsfactory | pp/components/spiral_inner_io.py | 1 | 10100 | """ bends with grating couplers inside the spiral
maybe: need to add grating coupler loopback as well
"""
from typing import Optional, Tuple
import numpy as np
import pp
from pp.component import Component
from pp.components.bend_circular import bend_circular, bend_circular180
from pp.components.bend_euler import bend... | mit | 8,192,973,652,620,932,000 | 32.114754 | 99 | 0.606535 | false |
edx/ecommerce | ecommerce/extensions/analytics/migrations/0001_initial.py | 1 | 3904 | # -*- coding: utf-8 -*-
from decimal import Decimal
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
... | agpl-3.0 | 7,615,743,578,111,717,000 | 46.609756 | 139 | 0.566342 | false |
tensorflow/lucid | tests/recipes/activation_atlas.py | 1 | 1157 | import pytest
from lucid.modelzoo.aligned_activations import NUMBER_OF_AVAILABLE_SAMPLES
from lucid.modelzoo.vision_models import AlexNet, InceptionV1
from lucid.recipes.activation_atlas import activation_atlas, aligned_activation_atlas
from lucid.misc.io import save
# Run test with just 1/10th of available samples
s... | apache-2.0 | -632,716,793,019,300,900 | 34.060606 | 107 | 0.733794 | false |
JeanMarieMineau/ISN-s-Cube | Bouton.py | 1 | 5185 | '''
Created on 5 mai 2017
Copyright 2017 Jean-Marie Mineau, Maxime Keller
This file is part of "ISN's Cube".
"ISN's Cube" 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 Licen... | gpl-3.0 | 6,007,718,002,931,933,000 | 33.278146 | 83 | 0.479614 | false |
kcyu1993/ML_course_kyu | projects/project1/scripts/model.py | 1 | 19450 | from __future__ import absolute_import
from abc import ABCMeta, abstractmethod
import copy
from data_utils import build_k_indices
from learning_model import *
from regularizer import *
from helpers import save_numpy_array
import numpy as np
class Model(object):
"""
Author: Kaicheng Yu
Machine learning mo... | mit | -8,262,903,813,467,478,000 | 39.352697 | 120 | 0.54437 | false |
msimet/Stile | devel/make_simple_catalog.py | 1 | 1417 | import galsim
import numpy
use_noise = True
extent_degrees = 1. # Create galaxies within a box of this side length
n_galaxies_per_sq_arcmin = 20
z_min = 0.1
z_max = 2.0
z_powerlaw_slope = 2.0
z_lens = 0.2
def make_safe_shear(g):
if g[0]>1:
g[0] = 1
if g[1]>1:
g[1] = 1
mag = numpy.sqrt(g[0]... | bsd-3-clause | -3,160,015,060,232,329,000 | 30.488889 | 90 | 0.568102 | false |
kdart/pycopia | core/pycopia/inet/rfc2822.py | 1 | 15042 | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# 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
... | apache-2.0 | -7,377,451,585,483,826,000 | 25.069324 | 80 | 0.569672 | false |
alehander42/hatlog | hatlog/prolog.py | 1 | 1202 | def generate_prolog(x, name, file):
header = '''\
:- initialization main.
:- use_module(pythonTypeSystem).
:- use_module(prettyTypes).
'''
fun = generate_fun(x, name)
m = '''main :-
open('%s.txt', write, Stream),
(
f(%s, Z0, Z1),
unvar(Z0, Z1, Z2, Z3, Z4), %% replace free vars wit... | apache-2.0 | -7,209,554,794,224,571,000 | 23.530612 | 111 | 0.476705 | false |
spl0k/supysonic | supysonic/cli.py | 1 | 15855 | # This file is part of Supysonic.
# Supysonic is a Python implementation of the Subsonic server API.
#
# Copyright (C) 2013-2021 Alban 'spl0k' Féron
#
# Distributed under terms of the GNU AGPLv3 license.
import argparse
import cmd
import getpass
import shlex
import sys
import time
from pony.orm import db_session, sel... | agpl-3.0 | -8,150,175,091,305,038,000 | 33.615721 | 103 | 0.563959 | false |
laszlokiraly/OffenesParlament | offenesparlament/op_scraper/scraper/parlament/spiders/administrations.py | 2 | 6360 | # -*- coding: utf-8 -*-
import scrapy
from ansicolor import red
from ansicolor import cyan
from ansicolor import green
from ansicolor import blue
from django.db.models import Q
from urllib import urlencode
from parlament.settings import BASE_HOST
from parlament.spiders.persons import PersonsSpider
from parlament.re... | bsd-2-clause | -3,958,473,203,963,082,000 | 33.945055 | 99 | 0.522327 | false |
Heufneutje/PyHeufyBot | heufybot/modules/util/urlfollow.py | 1 | 6495 | from twisted.plugin import IPlugin
from heufybot.channel import IRCChannel
from heufybot.moduleinterface import BotModule, IBotModule
from heufybot.utils.dummycontextmanager import DummyContextManager
from heufybot.utils.signaltimeout import TimeoutException
from zope.interface import implements
from bs4 import Beautif... | mit | -6,007,415,784,132,476,000 | 40.903226 | 110 | 0.578907 | false |
bygloam/yapf | yapf/yapflib/format_decision_state.py | 1 | 14929 | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | 7,459,060,827,545,288,000 | 35.68059 | 80 | 0.681224 | false |
alisaifee/djlimiter | djlimiter/middleware.py | 1 | 5065 | import importlib
import logging
from django.conf import settings
from django.core.urlresolvers import resolve
from limits.storage import storage_from_string
from limits.strategies import STRATEGIES
from limits.errors import ConfigurationError
from limits.util import parse_many
import six
from .decorators import DECOR... | mit | 5,413,957,004,182,898,000 | 35.438849 | 110 | 0.604738 | false |
PROGRAM-IX/pystroke | event_engine.py | 1 | 1542 | import pygame
from pygame.locals import *
class EventEngine:
"""
Reads the event queue and passes events to other engines
@author: James Heslin (PROGRAM_IX)
"""
def __init__(self, i_e):
"""
Takes an InputEngine and passes all relevant events to it
@type i_... | mit | -9,049,769,703,569,404,000 | 26.553571 | 70 | 0.527237 | false |
yamaneko1212/webpay-python | webpay/model/charge.py | 1 | 1090 | from webpay.model.card import Card
from .model import Model
class Charge(Model):
def __init__(self, client, data):
Model.__init__(self, client, data)
def _instantiate_field(self, key, value):
if key == 'card':
return Card(self._client, value)
else:
return Mode... | mit | 7,699,900,737,573,877,000 | 30.142857 | 78 | 0.6 | false |
nagisa/Feeds | gdist/gschemas.py | 1 | 2161 | import glob
import os
from distutils.dep_util import newer
from distutils.core import Command
from distutils.spawn import find_executable
from distutils.util import change_root
class build_gschemas(Command):
"""build message catalog files
Build message catalog (.mo) files from .po files using xgettext
... | gpl-2.0 | -1,919,019,431,533,698,800 | 28.60274 | 80 | 0.63628 | false |
tobspr/LUI | Demos/B_BlockText.py | 1 | 2782 |
from DemoFramework import DemoFramework
from LUILabel import LUILabel
from LUIBlockText import LUIBlockText
from LUIScrollableRegion import LUIScrollableRegion
import random
f = DemoFramework()
f.prepare_demo("LUIBlockText")
# Constructor
f.add_constructor_parameter("text", "u'Label'")
f.add_constructor_parameter... | mit | 2,860,236,933,385,525,000 | 29.23913 | 242 | 0.734723 | false |
weblyzard/ewrt | src/eWRT/ws/yahoo/__init__.py | 1 | 7712 | #!/usr/bin/env python
""" @package eWRT.ws.yahoo
support for the yahoo! search
@remarks
this module is based on yahoo's boss search service
"""
from __future__ import print_function
# (C)opyrights 2008-2010 by Albert Weichselbraun <albert@weichselbraun.net>
# Heinz Peter L... | gpl-3.0 | 4,068,139,572,960,566,300 | 34.869767 | 159 | 0.58584 | false |
edison7500/dugong | apps/images/migrations/0001_initial.py | 1 | 1994 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2018-12-25 06:14
from __future__ import unicode_literals
import apps.images.handlers
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependen... | gpl-3.0 | 708,031,775,955,651,500 | 30.650794 | 78 | 0.427282 | false |
bawaaaaah/Phoenix | tools/xml2sqlite.py | 1 | 4763 |
'''
This file is used to combine multiple no-intro xml files into one
sqlite file. This is used for checksum lookups to set up the artwork scraper.
'''
import xml.etree.ElementTree as ET
import sqlite3
import os
import sys
import getopt
UNKNOWN_VALUE = ""
TABLE_VALUE = "NOINTRO"
VERSION_FILE = "console_database_vers... | gpl-2.0 | 3,116,799,969,403,964,000 | 31.401361 | 126 | 0.498425 | false |
codelucas/shorten.tv | bg.py | 1 | 2146 | #!/usr/bin/env python2.7
"""
Here is shorten.tv's main background task to re-load
and cache popular youtube videos so users have less
wait time when using the webapp.
"""
import requests
import string
import backend
import urllib
letters = list(string.lowercase) # a, b, c ... z
popular = ["Rihanna", "Usher", "Katy P... | mit | 6,145,333,782,905,389,000 | 28.805556 | 76 | 0.609972 | false |
google-research/language | language/xsp/data_preprocessing/compute_asql_coverage_spider.py | 1 | 3106 | # coding=utf-8
# Copyright 2018 The Google AI Language Team 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 ... | apache-2.0 | 7,636,582,483,069,318,000 | 33.511111 | 79 | 0.720541 | false |
io7m/jcalcium | io7m-jcalcium-blender/src/main/resources/__init__.py | 1 | 3191 | #
# Copyright © 2016 <code@io7m.com> http://io7m.com
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTH... | isc | 2,586,711,796,754,689,500 | 32.229167 | 133 | 0.708464 | false |
joelfrederico/SciSalt | scisalt/qt/mplwidget.py | 1 | 13557 | from PyQt4 import QtGui
from PyQt4 import QtCore
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as _FigureCanvas
from matplotlib.backends.backend_qt4 import NavigationToolbar2QT as _NavigationToolbar
import matplotlib as _mpl
import numpy as _np
from .Rectangle import Rectangle
import pdb
import tra... | mit | 2,374,705,656,295,155,700 | 33.234848 | 119 | 0.570628 | false |
wangyixiaohuihui/spark2-annotation | python/pyspark/streaming/flume.py | 1 | 6047 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may n... | apache-2.0 | 7,494,810,654,128,690,000 | 41.192857 | 99 | 0.61915 | false |
Alwnikrotikz/hooke | mfp_igor_scripts/FMjoin.py | 1 | 1503 | #!/usr/bin/env python
'''
FMjoin.py
Copies all .ibw files contained in a folder and its subfolders into a single folder. Useful for force maps.
Usage:
python FMjoin.py origindir destdir
Alberto Gomez-Casado (c) 2010, University of Twente (The Netherlands)
This program is released under the GNU General Public Licen... | lgpl-3.0 | 1,506,326,221,968,323,600 | 24.913793 | 107 | 0.69328 | false |
vtexier/duniter-python-api | duniterpy/key/encryption_key.py | 1 | 1634 | """
duniter public and private keys
@author: inso
"""
import libnacl.public
from pylibscrypt import scrypt
from .base58 import Base58Encoder
from .signing_key import _ensure_bytes
SEED_LENGTH = 32 # Length of the key
crypto_sign_BYTES = 64
SCRYPT_PARAMS = {'N': 4096,
'r': 16,
'p':... | gpl-3.0 | 311,690,063,143,170,500 | 29.259259 | 100 | 0.626683 | false |
mr-ice/pipython | InteractiveProgramming/concentration.py | 1 | 7657 | # implementation of card game - Memory
# I originally coded this with timers for hiding the cards instead of hiding them
# on a mouse click. And I removed cards that matched instead of leaving them face up.
# I thought it worked pretty well but it didn't meet the requirements of the grading
# rubrick, so I had to mak... | mit | -5,153,897,072,801,018,000 | 33.031111 | 90 | 0.55113 | false |
sbates130272/fio-stuff | tools/cpuperf.py | 1 | 3479 | #!/usr/bin/env python
from __future__ import print_function
from __future__ import unicode_literals
import os
import sys
import subprocess as sp
import time
def get_ps_data(options):
try:
data = sp.check_output(["ps", "-C", options.command, "-o" "%cpu=,%mem="])
if options.multithread:
... | apache-2.0 | -2,514,603,688,911,155,000 | 30.342342 | 90 | 0.542685 | false |
huggingface/transformers | tests/test_generation_flax_utils.py | 1 | 9361 | # Copyright 2021 The HuggingFace Team. 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 applicabl... | apache-2.0 | -3,464,626,777,610,894,000 | 36.898785 | 101 | 0.657622 | false |
freestyle4568/Clothes-match | feature_analysis/src/fp_growth.py | 1 | 6357 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Created on Sep 20, 2015
@author: freestyle4568
'''
"""
this progarm is to test fp-growth algorithm
user guide: result_list, support_data_dict = fptree(dataset, min_support)
该函数返回列表格式的result_list, 元素为列表, [[1元素项集], [2元素项集]]
子列表元素为固定集合 -- frozenset({, , ,})
support_data... | apache-2.0 | 1,722,359,019,118,294,500 | 31.65625 | 117 | 0.58223 | false |
Ripley6811/TAIMAU | src/frames/po/prodselectf.py | 1 | 12013 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import Tix
import tkMessageBox
from utils import settings
from utils import calendar_tixradiobutton as date_picker
from utils.symbols import U_TOOLS, U_TRUCK
def main(_):
"""List products for creating orders.
Enter prices and order amounts and save as a multiple... | gpl-2.0 | -777,012,589,930,521,900 | 36.557994 | 95 | 0.523662 | false |
UoMCS/syllabus-visualisation | add_initial_data.py | 1 | 5971 | #!/usr/bin/python
from __future__ import print_function
import sys
import os
import glob
import itertools
import argparse
from flask import Flask
import openpyxl
import requests
from server.app import app
from server.models import *
from server.api import get_categories
# Expected spreadsheet headers
HEADERS = [('... | mit | 251,148,890,609,220,740 | 30.930481 | 96 | 0.577123 | false |
Alignak-monitoring-contrib/alignak-webui | alignak_webui/plugins/grafana/grafana.py | 1 | 1479 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2015-2018:
# Frederic Mohier, frederic.mohier@alignak.net
#
# This file is part of (WebUI).
#
# (WebUI) 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 F... | agpl-3.0 | -8,554,429,625,518,574,000 | 28 | 77 | 0.677485 | false |
thombashi/pingparsing | pingparsing/_cmd_maker.py | 1 | 7021 | import abc
import math
from typing import List, Optional
import humanreadable as hr
from subprocrunner.typing import Command
from typepy import Integer
from ._typing import PingAddOpts
DEFAULT_DEADLINE = 3
class PingCmdMaker(metaclass=abc.ABCMeta):
def __init__(
self,
count: Optional[int] = No... | mit | -7,431,909,046,708,519,000 | 25.79771 | 87 | 0.572995 | false |
sammyt/p3 | tests/p3_select_all_vows.py | 1 | 3512 | from p3 import P3
from pyvows import Vows, expect
import lxml
from lxml.etree import ElementBase
from lxml.html import builder as E
from lxml.html import fromstring, tostring
from lxml.cssselect import CSSSelector
@Vows.batch
class SelectionSelectAll(Vows.Context):
class SelectBody(Vows.Context):
"""se... | mit | -8,578,119,077,014,492,000 | 26.661417 | 62 | 0.50541 | false |
hickerson/bbn | fable/fable_sources/libtbx/lzw.py | 1 | 25535 | """
A stream friendly, simple compression library, built around
iterators. See L{compress} and L{decompress} for the easiest way to
get started.
After the TIFF implementation of LZW, as described at
U{http://www.fileformat.info/format/tiff/corion-lzw.htm}
In an even-nuttier-shell, lzw compresses input bytes with int... | mit | 1,155,717,195,959,556,600 | 29.728039 | 336 | 0.590601 | false |
esdalmaijer/PyGaze | pygaze/_logfile/baselogfile.py | 1 | 3346 | # -*- coding: utf-8 -*-
#
# This file is part of PyGaze - the open-source toolbox for eye tracking
#
# PyGaze is a Python module for easily creating gaze contingent experiments
# or other software (as well as non-gaze contingent experiments/software)
# Copyright (C) 2012-2013 Edwin S. Dalmaijer
#
# ... | gpl-3.0 | -8,973,384,145,879,688,000 | 26.615385 | 79 | 0.586372 | false |
nicupavel/wifi | wifi/scan.py | 1 | 5377 | from __future__ import division
import re
import textwrap
import wifi.subprocess_compat as subprocess
from wifi.utils import db2dbm
from wifi.exceptions import InterfaceError
class Cell(object):
"""
Presents a Python interface to the output of iwlist.
"""
def __init__(self):
self.bitrates =... | bsd-2-clause | 2,011,359,066,396,564,200 | 29.551136 | 103 | 0.539706 | false |
piotrb5e3/ComfyMS-backend | posts/tests/test_views/test_unpublish.py | 1 | 1710 | from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from rest_framework import status
from rest_framework.test import APITestCase
from rest_framework_jwt import utils
from posts.models import Post
from posts.tests.factory import create_post
class TestPost(APITestCase):
unpu... | apache-2.0 | -7,291,558,331,520,212,000 | 32.529412 | 77 | 0.693567 | false |
titienmiami/mmc.repository | plugin.video.tvalacarta/servers/modovideo.py | 1 | 2571 | # -*- coding: iso-8859-1 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector para modovideo
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import re, urlparse, urllib, urllib2
import os
from ... | gpl-2.0 | 8,743,703,862,752,684,000 | 33.756757 | 154 | 0.60949 | false |
rockho-team/shuup-shipping-table | shuup_shipping_table_tests/settings.py | 1 | 3686 | # -*- coding: utf-8 -*-
import os
import tempfile
SECRET_KEY = "x"
INSTALLED_APPS = (
# django
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.messages',
'django.contrib.sessions',
'django.contrib.staticfiles',
# shuup themes
'shuup.th... | agpl-3.0 | 7,859,239,709,768,708,000 | 26.303704 | 75 | 0.639718 | false |
tomik/akimot | other/tagui/board_widget.py | 1 | 6768 | from PyQt4 import QtGui
from PyQt4 import QtCore
import sys
sys.path.append('..')
from aei import board
ANIMATE_ONE = 0.2
DIRECTIONS = {'n' : -8, 'w' : -1, 'e' : 1, 's': 8}
MAX_MOVE_INTERVAL = 1500
STEP_INTERVAL = 300
ERROR = -1
BSIDE = 8
BSIZE = 64
COL_EMPTY = 2
COLORS = ['Gold', 'Silver', '']
PIECE_EMPTY_STR... | gpl-3.0 | -2,530,082,398,558,692,000 | 33.886598 | 116 | 0.566785 | false |
kch8qx/osf.io | website/project/views/contributor.py | 1 | 27505 | # -*- coding: utf-8 -*-
import httplib as http
from flask import request
from modularodm.exceptions import ValidationError, ValidationValueError
from framework import forms
from framework import status
from framework.auth import cas
from framework.auth import User, get_user
from framework.auth.core import generate_c... | apache-2.0 | -4,826,059,229,403,738,000 | 37.148405 | 120 | 0.641702 | false |
DailyActie/Surrogate-Model | 01-codes/numpy-master/numpy/polynomial/polynomial.py | 1 | 52763 | """
Objects for dealing with polynomials.
This module provides a number of objects (mostly functions) useful for
dealing with polynomials, including a `Polynomial` class that
encapsulates the usual arithmetic operations. (General information
on how this module represents and works with polynomial objects is in
the do... | mit | 7,113,472,882,553,631,000 | 31.055286 | 79 | 0.592044 | false |
BGCECSE2015/CADO | PYTHON/Extraction/WorkUnstructuredGrid/Ugrid_to_Python.py | 1 | 2002 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
print "Start"
from vtk import *
from vtk.util.numpy_support import vtk_to_numpy
import itertools as it
import cPickle
import getopt,sys
import numpy as np
# The source file: INPUT
print "Starting the Input reading"
try:
opts, args = getopt.getopt(sys.argv[1:], "ho:v", ... | bsd-3-clause | 2,013,413,984,805,884,000 | 23.716049 | 88 | 0.686813 | false |
ajyoon/brown | tests/test_models/test_beat.py | 1 | 3692 | import unittest
from fractions import Fraction
import pytest
from brown.models.beat import Beat
class TestBeat(unittest.TestCase):
def test_init_from_numerator_denominator(self):
dur = Beat(1, 4)
assert(dur.numerator == 1)
assert(dur.denominator == 4)
def test_init_from_existing_be... | gpl-3.0 | -2,079,806,630,731,497,200 | 30.827586 | 71 | 0.555796 | false |
edx/edxanalytics | src/util/playback.py | 1 | 1385 | import logging, logging.handlers
import sys
logging.handlers.HTTPHandler('','',method='GET')
logger = logging.getLogger('simple_example')
# http_handler = logging.handlers.HTTPHandler('127.0.0.1:9022', '/event', method='GET')
http_handler = logging.handlers.HTTPHandler('127.0.0.1:9999', '/httpevent', method='GET')
... | agpl-3.0 | 3,481,797,778,094,698,000 | 25.634615 | 90 | 0.651264 | false |
souravbadami/oppia | core/domain/visualization_registry_test.py | 1 | 4415 | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | apache-2.0 | 1,712,787,996,328,616,000 | 37.72807 | 80 | 0.62333 | false |
m-housh/asyncio-utils | tests/test_asyncio_utils.py | 1 | 3526 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_asyncio_utils
----------------------------------
Tests for ``asyncio_utils`` module.
"""
import pytest
import collections
from asyncio_utils import *
pytestmark = pytest.mark.asyncio
async def test_aiter():
async def gen():
yield 1
async fo... | mit | -1,500,201,346,956,063,200 | 20.5 | 67 | 0.596143 | false |
luken/pcitweak | pcitweak/devices.py | 1 | 5490 | import os, re
from config import PCIConfigSpace, PCIConfigSpaceAccess
class PCIDeviceAddress:
def __init__(self, domain=None, bus=None, device=None, func=None):
self.domain = domain
self.bus = bus
self.device = device
self.func = func
def __str__(self):
return "%04x:%02... | mit | 2,341,546,812,742,394,400 | 32.680982 | 95 | 0.517304 | false |
100Shapes/wagtail | wagtail/contrib/wagtailroutablepage/tests.py | 1 | 3029 | from django.test import TestCase
from wagtail.wagtailcore.models import Page
from wagtail.tests.models import RoutablePageTest, routable_page_external_view
class TestRoutablePage(TestCase):
def setUp(self):
self.home_page = Page.objects.get(id=2)
self.routable_page = self.home_page.add_child(inst... | bsd-3-clause | -6,121,028,005,318,583,000 | 35.939024 | 107 | 0.663915 | false |
WeblateOrg/weblate | weblate/accounts/notifications.py | 1 | 25871 | #
# Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <https://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lice... | gpl-3.0 | 4,587,541,232,653,189,600 | 31.294632 | 88 | 0.613847 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.