repo_name stringlengths 5 100 | path stringlengths 4 299 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1.03M | license stringclasses 15
values | hash int64 -9,223,351,895,964,839,000 9,223,297,778B | line_mean float64 3.17 100 | line_max int64 7 1k | alpha_frac float64 0.25 0.98 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
PhonologicalCorpusTools/PyAnnotationGraph | polyglotdb/query/base/query.py | 1 | 15416 | from .results import BaseQueryResults
from .func import Count
from ..base.helper import key_for_cypher, value_for_cypher
class BaseQuery(object):
query_template = '''{match}
{where}
{optional_match}
{with}
{return}'''
delete_template = '''DETACH DELETE {alias}'''
aggregate_template = ''... | mit | 7,027,644,700,880,472,000 | 32.733042 | 137 | 0.54411 | false |
tigersirvine/occtigerscricket | django/core/management/commands/reset.py | 78 | 2540 | from optparse import make_option
from django.core.management.base import AppCommand, CommandError
from django.core.management.color import no_style
from django.core.management.sql import sql_reset
from django.db import connections, transaction, DEFAULT_DB_ALIAS
class Command(AppCommand):
option_list = AppCommand.... | bsd-3-clause | -446,280,103,695,910,100 | 39.967742 | 168 | 0.633858 | false |
sheadovas/tools | misc/plotter.py | 1 | 1780 | #!/usr/bin/python
# created by shead
import sys
import numpy as np
import matplotlib.pyplot as plt
import pylab
"""
USAGE
============
./plotter.py [log]
./plotter.py my_log.log
REQUIRED DEPENDENCIES
============
* Python2
* Matplot http://matplotlib.org/users/installing.html
FILE FORMAT
============
[iterat... | mit | -7,161,643,909,423,687,000 | 15.64486 | 65 | 0.620225 | false |
compmech/meshless | meshless/espim/plate2d_add_k0s.py | 1 | 1946 | from meshless.espim.plate2d_add_k0s_cell_based import add_k0s as add_k0s_cell
from meshless.espim.plate2d_add_k0s_cell_based_no_smoothing import add_k0s as add_k0s_cell_no_smoothing
from meshless.espim.plate2d_add_k0s_edge_based import add_k0s as add_k0s_edge
def add_k0s(k0, mesh, prop_from_node, method='cell-based', ... | bsd-2-clause | -908,895,335,671,644,200 | 40.404255 | 110 | 0.692703 | false |
mrunge/horizon | openstack_dashboard/dashboards/admin/info/tables.py | 11 | 6531 | # 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 t... | apache-2.0 | -279,604,993,973,928,320 | 33.739362 | 78 | 0.593324 | false |
dcosentino/edx-platform | common/lib/xmodule/xmodule/modulestore/tests/test_modulestore_settings.py | 41 | 8713 | """
Tests for testing the modulestore settings migration code.
"""
import copy
import ddt
from tempfile import mkdtemp
from unittest import TestCase
from xmodule.modulestore.modulestore_settings import (
convert_module_store_setting_if_needed,
update_module_store_settings,
get_mixed_stores,
)
@ddt.ddt
cl... | agpl-3.0 | 4,642,001,015,288,036,000 | 41.296117 | 113 | 0.555951 | false |
kunthar/hustle | test/test_pipeline.py | 3 | 6724 | import unittest
from hustle.core.column_fn import ip_ntoa
from hustle.core.pipeline import SelectPipe, _get_sort_range
from hustle.core.marble import Marble
from operator import itemgetter
EMP_FIELDS = ("+@2id", "+$name", "+%2hire_date", "+@4salary", "+@2department_id")
DEPT_FIELDS = ("+@2id", "+%2name", "+%2building... | mit | -6,208,428,895,704,928,000 | 45.694444 | 131 | 0.594438 | false |
joshbruning/selenium | py/selenium/webdriver/phantomjs/service.py | 53 | 2587 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | 7,433,826,115,159,434,000 | 37.044118 | 96 | 0.657132 | false |
dushu1203/chromium.src | tools/perf/page_sets/simple_mobile_sites.py | 9 | 1794 | # Copyright 2014 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.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class SimplePage(page_module.Page):
def __init__(se... | bsd-3-clause | -7,571,003,238,398,807,000 | 31.618182 | 78 | 0.683946 | false |
maxdeliso/elevatorSim | Lib/test/test_iterlen.py | 59 | 7747 | """ Test Iterator Length Transparency
Some functions or methods which accept general iterable arguments have
optional, more efficient code paths if they know how many items to expect.
For instance, map(func, iterable), will pre-allocate the exact amount of
space required whenever the iterable can report its length.
T... | bsd-2-clause | 7,146,434,548,694,675,000 | 29.864542 | 78 | 0.669291 | false |
jbrahy/capstone | bindings/python/test_skipdata.py | 31 | 2425 | #!/usr/bin/env python
# Capstone Python bindings, by Nguyen Anh Quynnh <aquynh@gmail.com>
from __future__ import print_function
from capstone import *
import binascii
from xprint import to_x, to_hex, to_x_32
X86_CODE32 = b"\x8d\x4c\x32\x08\x01\xd8\x81\xc6\x34\x12\x00\x00\x00\x91\x92"
RANDOM_CODE = b"\xed\x00\x00\x0... | bsd-3-clause | -1,326,846,960,444,039,000 | 31.77027 | 177 | 0.578969 | false |
Stargrazer82301/CAAPR | CAAPR/CAAPR_AstroMagic/PTS/pts/magic/catalog/builder.py | 1 | 7693 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | mit | 1,450,032,999,793,707,000 | 30.917012 | 210 | 0.520671 | false |
foobarbazblarg/stayclean | stayclean-2017-march/participant.py | 60 | 1524 | import datetime
class Participant:
def __init__(self):
self.name = ""
self.isStillIn = True
self.hasCheckedIn = False
self.relapseDate = None
@property
def hasRelapsed(self):
return self.relapseDate is not None
def setFromLine(self, lineString):
# form... | mit | 4,730,820,464,951,085,000 | 30.102041 | 148 | 0.576115 | false |
nskinkel/oppy | oppy/tests/integration/cell/test_fixedlen.py | 1 | 12689 | import struct
import unittest
from collections import OrderedDict
from oppy.cell.fixedlen import (
FixedLenCell,
Create2Cell,
Created2Cell,
CreatedFastCell,
CreatedCell,
CreateFastCell,
CreateCell,
DestroyCell,
EncryptedCell,
NetInfoCell,
PaddingCell,
)
from oppy.cell.util ... | bsd-3-clause | -7,229,135,415,162,225,000 | 29.873479 | 107 | 0.651982 | false |
lnls-fac/apsuite | apsuite/commisslib/injsi_optimization.py | 1 | 3074 | """."""
import time as _time
import numpy as _np
from epics import PV
from apsuite.optimization import SimulAnneal
from siriuspy.devices import Tune, TuneCorr, CurrInfoSI
from ..utils import MeasBaseClass as _BaseClass, \
ParamsBaseClass as _ParamsBaseClass
class InjSIParams(_ParamsBaseClass):
"""."""
de... | mit | -4,653,552,106,490,319,000 | 33.155556 | 71 | 0.56799 | false |
alessandro-aglietti/git-repo | subcmds/abandon.py | 48 | 2034 | #
# Copyright (C) 2008 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | -6,098,478,468,732,730,000 | 28.057143 | 74 | 0.648476 | false |
apagac/cfme_tests | cfme/test_framework/config.py | 3 | 2560 | """
classes to manage the cfme test framework configuration
"""
import os
import warnings
import attr
import yaycl
class Configuration(object):
"""
holds the current configuration
"""
def __init__(self):
self.yaycl_config = None
def configure(self, config_dir, crypt_key_file=None):
... | gpl-2.0 | 1,778,776,388,008,612,600 | 27.444444 | 91 | 0.615234 | false |
YuriyIlyin/ansible-modules-core | files/find.py | 109 | 11313 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Ruggero Marchei <ruggero.marchei@daemonzone.net>
# (c) 2015, Brian Coca <bcoca@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#... | gpl-3.0 | -3,340,732,131,754,177,500 | 33.809231 | 115 | 0.56024 | false |
ecolitan/fatics | src/timer.py | 1 | 2084 | # Copyright (C) 2010 Wil Mahan <wmahan+fatics@gmail.com>
#
# This file is part of FatICS.
#
# FatICS is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your optio... | agpl-3.0 | 2,757,826,052,728,467,500 | 34.322034 | 77 | 0.668906 | false |
codrut3/tensorflow | tensorflow/python/kernel_tests/garbage_collection_test.py | 82 | 2102 | # Copyright 2017 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 | 8,607,779,374,031,355,000 | 32.365079 | 80 | 0.674596 | false |
CloudServer/cinder | cinder/volume/drivers/lvm.py | 1 | 30310 | # 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 | -7,004,652,998,710,291,000 | 40.864641 | 79 | 0.57034 | false |
LukeHoersten/ansible | lib/ansible/inventory/host.py | 9 | 3582 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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) an... | gpl-3.0 | 4,942,403,477,836,256,000 | 27.428571 | 85 | 0.600782 | false |
anedos/sqlalchemy-migrate-egg | migrate/changeset/databases/oracle.py | 6 | 3748 | """
Oracle database specific implementations of changeset classes.
"""
import sqlalchemy as sa
from sqlalchemy.databases import oracle as sa_base
from migrate import exceptions
from migrate.changeset import ansisql, SQLA_06
if not SQLA_06:
OracleSchemaGenerator = sa_base.OracleSchemaGenerator
else:
Oracle... | mit | 735,734,766,488,244,700 | 32.765766 | 80 | 0.633938 | false |
kevclarx/ansible | lib/ansible/module_utils/dellos9.py | 51 | 5696 | #
# (c) 2015 Peter Sprygada, <psprygada@ansible.com>
# (c) 2017 Red Hat, Inc
#
# Copyright (c) 2016 Dell Inc.
#
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamica... | gpl-3.0 | 4,789,225,412,063,048,000 | 38.013699 | 120 | 0.670997 | false |
mpenning/exscript | src/Exscript/util/weakmethod.py | 7 | 3634 | # Copyright (C) 2007-2010 Samuel Abels.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2, as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANT... | gpl-2.0 | -2,197,405,746,789,327,600 | 30.059829 | 80 | 0.625206 | false |
makermade/arm_android-21_arm-linux-androideabi-4.8 | lib/python2.7/distutils/tests/test_dist.py | 83 | 15708 | # -*- coding: utf8 -*-
"""Tests for distutils.dist."""
import os
import StringIO
import sys
import unittest
import warnings
import textwrap
from distutils.dist import Distribution, fix_help_options
from distutils.cmd import Command
import distutils.dist
from test.test_support import TESTFN, captured_stdout, run_unitt... | gpl-2.0 | 984,821,889,246,496,300 | 34.280899 | 77 | 0.545987 | false |
suneel0101/django-easyrest | setup.py | 1 | 1212 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright <2013> Suneel Chakravorty <suneel0101@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
... | mit | 160,302,950,986,840,640 | 35.727273 | 81 | 0.69802 | false |
loic/django | django/conf/locale/pt/formats.py | 504 | 1717 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'j \d\e F \d\e Y'
TIME_FORMAT = '... | bsd-3-clause | 6,750,704,937,212,569,000 | 40.853659 | 90 | 0.538462 | false |
wangjun/simDownloader | simDHT.py | 5 | 7047 | #!/usr/bin/env python
# encoding: utf-8
import socket
import threading
from hashlib import sha1
from random import randint
from struct import unpack
from socket import inet_ntoa
from threading import Timer, Thread
from time import sleep
from collections import deque
from bencode import bencode, bdecode
from Queue impo... | gpl-2.0 | 4,601,781,395,026,338,300 | 25.200743 | 107 | 0.496949 | false |
unreal666/outwiker | src/outwiker/pages/search/htmlreport.py | 3 | 2955 | # -*- coding: UTF-8 -*-
import html
from outwiker.gui.guiconfig import GeneralGuiConfig
from outwiker.core.system import getOS
class HtmlReport (object):
"""
Класс для генерации HTML-а, для вывода найденных страниц
"""
def __init__(self, pages, searchPhrase, searchTags, application):
"""
... | gpl-3.0 | -7,295,819,895,699,967,000 | 26.767677 | 85 | 0.534376 | false |
twitchyliquid64/misc-scripts | s3tool/boto/ec2/elb/__init__.py | 110 | 32520 | # Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# 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 wi... | mit | -5,693,845,129,955,167,000 | 41.902375 | 85 | 0.617589 | false |
pcameron/javafuse-read-only | fs/build/mx4j/tools/jython/jmxUtils.py | 7 | 5355 | """ Copyright (C) MX4J.
All rights reserved.
This software is distributed under the terms of the MX4J License version 1.0.
See the terms of the MX4J License in the documentation provided with this software.
author <a href="mailto:tibu@users.sourceforge.net">Carlos Quiroz</a>
version $Revision: 1.1 $
... | gpl-3.0 | -7,534,343,453,667,322,000 | 35.447552 | 95 | 0.646685 | false |
baidu/Paddle | python/paddle/fluid/tests/unittests/test_py_reader_push_pop.py | 7 | 3749 | # Copyright (c) 2018 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 appli... | apache-2.0 | -8,679,464,368,216,438,000 | 35.754902 | 75 | 0.568952 | false |
ronekko/chainer | tests/chainer_tests/functions_tests/math_tests/test_clip.py | 2 | 2885 | import unittest
import numpy
import chainer
from chainer.backends import cuda
from chainer import functions
from chainer import gradient_check
from chainer import testing
from chainer.testing import attr
@testing.parameterize(*testing.product({
'shape': [(3, 2), ()],
'dtype': [numpy.float16, numpy.float32, ... | mit | 1,562,327,920,186,700,000 | 29.691489 | 77 | 0.606586 | false |
reinout/django | tests/forms_tests/field_tests/test_datefield.py | 23 | 8167 | from datetime import date, datetime
from django.forms import (
DateField, Form, HiddenInput, SelectDateWidget, ValidationError,
)
from django.test import SimpleTestCase, override_settings
from django.utils import translation
class GetDate(Form):
mydate = DateField(widget=SelectDateWidget)
class DateFieldTe... | bsd-3-clause | 2,449,196,353,411,058,000 | 42.195767 | 94 | 0.587457 | false |
VishvajitP/readthedocs.org | readthedocs/rtd_tests/tests/test_redirects.py | 20 | 10441 | from django.test import TestCase
from django.test.utils import override_settings
from django_dynamic_fixture import get
from django_dynamic_fixture import fixture
from readthedocs.builds.constants import LATEST
from readthedocs.projects.models import Project
from readthedocs.redirects.models import Redirect
import l... | mit | -3,972,338,867,987,097,600 | 39.468992 | 110 | 0.617182 | false |
isi-nlp/bolinas | extractor_synsem/extractor_synsem.py | 2 | 14687 | from common.exceptions import InvocationException
from common.hgraph.hgraph import Hgraph
from common.cfg import NonterminalLabel
from lib.tree import Tree
import re
from collections import defaultdict as ddict
import itertools
from parser.vo_rule import Rule
import sys
DEFAULT_COMPOSITION_DEPTH = 3
class ExtractorSy... | mit | -7,124,554,008,113,863,000 | 30.382479 | 80 | 0.664261 | false |
apache/incubator-airflow | airflow/providers/cncf/kubernetes/sensors/spark_kubernetes.py | 5 | 4691 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | 4,549,095,830,007,906,000 | 39.791304 | 127 | 0.659774 | false |
mfm24/ChordViz | ChordViz.py | 1 | 20081 | # -*- coding: utf-8 -*-
"""
Created on Fri May 3 21:09:10 2013
@author: matt
# based on MyPlayer3_Callback (which is newer than MyPlayer3.py)
"""
from __future__ import division
import time, math, logging
import numpy as np
from threading import Lock, Thread
import itertools
# not sure I've added correct path in la... | mit | 4,261,677,554,815,853,000 | 34.667851 | 121 | 0.567053 | false |
pymedusa/SickRage | ext/boto/sdb/db/blob.py | 153 | 2437 | # Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy,... | gpl-3.0 | 7,653,667,183,352,438,000 | 31.065789 | 74 | 0.640952 | false |
pymedusa/SickRage | ext/boto/ec2/__init__.py | 22 | 3094 | # Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modi... | gpl-3.0 | -6,349,467,765,238,059,000 | 35.833333 | 77 | 0.712023 | false |
GunoH/intellij-community | python/helpers/py2only/docutils/parsers/rst/languages/de.py | 121 | 3465 | # -*- coding: utf-8 -*-
# $Id: de.py 7223 2011-11-21 16:43:06Z milde $
# Authors: Engelbert Gruber <grubert@users.sourceforge.net>;
# Lea Wiemann <LeWiemann@gmail.com>
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
# ... | apache-2.0 | -5,421,123,507,015,214,000 | 32.563107 | 105 | 0.599364 | false |
openfun/edx-platform | common/djangoapps/pipeline_mako/__init__.py | 140 | 2444 | from edxmako.shortcuts import render_to_string
from pipeline.conf import settings
from pipeline.packager import Packager
from pipeline.utils import guess_type
from static_replace import try_staticfiles_lookup
def compressed_css(package_name, raw=False):
package = settings.PIPELINE_CSS.get(package_name, {})
i... | agpl-3.0 | 2,685,088,027,618,464,300 | 29.17284 | 68 | 0.677987 | false |
takeshineshiro/horizon | openstack_dashboard/dashboards/project/networks/tests.py | 6 | 99697 | # Copyright 2012 NEC Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 | 6,345,434,674,920,206,000 | 43.191933 | 79 | 0.539053 | false |
cpg1111/kubernetes | cluster/juju/charms/trusty/kubernetes/unit_tests/lib/test_registrator.py | 96 | 2163 | #!/usr/bin/env python
# Copyright 2015 The Kubernetes 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
#
# Unle... | apache-2.0 | 398,718,075,530,056,960 | 35.05 | 275 | 0.662968 | false |
dubourg/openturns | python/test/t_DistFunc_noncentralchisquare.py | 8 | 2054 | #! /usr/bin/env python
from __future__ import print_function
from openturns import *
TESTPREAMBLE()
RandomGenerator.SetSeed(0)
try:
# NonCentralChiSquare related functions
# dNonCentralChiSquare
nuMin = 0.2
nuMax = 5.0
n1 = 5
lambdaMin = 0.2
lambdaMax = 5.0
n2 = 5
xMin = 0.1
x... | gpl-3.0 | -3,741,731,971,190,417,000 | 30.121212 | 123 | 0.510224 | false |
bopo/cookiecutter-django | {{cookiecutter.project_slug}}/config/settings/production.py | 2 | 11973 | # -*- coding: utf-8 -*-
"""
Production Configurations
- Use Amazon's S3 for storing static files and uploaded media
- Use mailgun to send emails
- Use Redis for cache
{% if cookiecutter.use_sentry_for_error_reporting == 'y' %}
- Use sentry for error logging
{% endif %}
{% if cookiecutter.use_opbeat == 'y' %}
- Use opb... | bsd-3-clause | -2,353,119,871,720,951,300 | 35.614679 | 117 | 0.602689 | false |
tukutela/Kay-Framework | kay/lib/werkzeug/contrib/atom.py | 25 | 14976 | # -*- coding: utf-8 -*-
"""
werkzeug.contrib.atom
~~~~~~~~~~~~~~~~~~~~~
This module provides a class called :class:`AtomFeed` which can be
used to generate feeds in the Atom syndication format (see :rfc:`4287`).
Example::
def atom_feed(request):
feed = AtomFeed("My Blog", feed... | bsd-3-clause | 2,204,160,742,799,888,600 | 42.661808 | 78 | 0.551482 | false |
fo2rist/infra-strike | backend/venv/Lib/site-packages/pip/_vendor/distlib/locators.py | 129 | 50493 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2015 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import gzip
from io import BytesIO
import json
import logging
import os
import posixpath
import re
try:
import threading
except Impo... | lgpl-3.0 | 4,091,003,129,755,938,300 | 38.946994 | 95 | 0.524489 | false |
crobby/sahara | sahara/tests/unit/plugins/cdh/test_config_helper.py | 11 | 1492 | # Copyright (c) 2014 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | apache-2.0 | -1,070,721,578,638,276,500 | 39.324324 | 74 | 0.69571 | false |
tsdgeos/snapcraft | snapcraft/tests/test_formatting_utils.py | 7 | 1952 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2015, 2016 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in... | gpl-3.0 | -4,966,179,277,543,992,000 | 36.538462 | 71 | 0.64293 | false |
nirvn/QGIS | tests/src/python/test_qgsvectorlayercache.py | 22 | 3911 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsVectorLayerCache.
.. 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 | 8,751,182,244,045,306,000 | 32.715517 | 156 | 0.611864 | false |
esakellari/root | interpreter/llvm/src/tools/clang/www/builtins.py | 99 | 6633 | #!/usr/bin/env python
import sys, fileinput
err=0
# Giant associative set of builtin->intrinsic mappings where clang doesn't
# implement the builtin since the vector operation works by default.
repl_map = {
'__builtin_ia32_addps': '_mm_add_ps',
'__builtin_ia32_addsd': '_mm_add_sd',
'__builtin_ia32_addpd': '_mm_add_... | lgpl-2.1 | -152,825,105,743,407,040 | 39.693252 | 132 | 0.662295 | false |
hamiltont/CouchPotatoServer | couchpotato/core/notifications/email/__init__.py | 7 | 1913 | from .main import Email
def start():
return Email()
config = [{
'name': 'email',
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'email',
'options': [
{
'name': 'enabled',
... | gpl-3.0 | 4,988,467,638,644,959,000 | 27.552239 | 79 | 0.263983 | false |
pleaseproject/python-for-android | python3-alpha/python3-src/Lib/test/test_structseq.py | 57 | 4010 | import os
import time
import unittest
from test import support
class StructSeqTest(unittest.TestCase):
def test_tuple(self):
t = time.gmtime()
self.assertIsInstance(t, tuple)
astuple = tuple(t)
self.assertEqual(len(t), len(astuple))
self.assertEqual(t, astuple)
# ... | apache-2.0 | -5,098,176,806,424,302,000 | 30.085271 | 82 | 0.540399 | false |
dgjustice/ansible | lib/ansible/modules/cloud/ovirt/ovirt_permissions_facts.py | 13 | 4468 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible 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
#... | gpl-3.0 | 815,344,931,991,338,400 | 31.143885 | 151 | 0.666517 | false |
karlcow/ymir | ymir/utils/make_post.py | 1 | 5023 | from datetime import datetime
from glob import glob
import locale
from pprint import pprint
import re
import sys
from textwrap import dedent
import mistune
from PIL import Image
ROOT = '/Users/karl/Sites/la-grange.net'
INDENTATION = re.compile(r'\n\s{2,}')
META = re.compile(r'^(\w+):([^\n]*)\n')
PATH = re.compile(r'... | mit | -107,159,644,344,080,420 | 27.867816 | 92 | 0.565598 | false |
alsrgv/tensorflow | tensorflow/contrib/distributions/python/ops/vector_laplace_linear_operator.py | 21 | 11027 | # Copyright 2017 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 | 851,180,430,821,488,500 | 35.392739 | 80 | 0.64995 | false |
xsynergy510x/android_external_chromium_org | tools/telemetry/telemetry/page/page_set_archive_info.py | 26 | 6409 | # Copyright 2013 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.
import json
import logging
import os
import re
import shutil
import tempfile
from telemetry.util import cloud_storage
class PageSetArchiveInfo(object):
... | bsd-3-clause | -2,591,528,340,399,150,600 | 38.319018 | 80 | 0.662194 | false |
kzky/python-online-machine-learning-library | pa/passive_aggressive_2.py | 1 | 6472 | import numpy as np
import scipy as sp
import logging as logger
import time
import pylab as pl
from collections import defaultdict
from sklearn.metrics import confusion_matrix
class PassiveAggressiveII(object):
"""
Passive Aggressive-II algorithm: squared hinge loss PA.
References:
- http://jmlr.o... | bsd-3-clause | -8,372,055,500,977,262,000 | 27.13913 | 87 | 0.502936 | false |
divergentdave/inspectors-general | inspectors/nea.py | 2 | 6711 | #!/usr/bin/env python
import datetime
import logging
import os
from urllib.parse import urljoin
from utils import utils, inspector, admin
# http://arts.gov/oig
archive = 2005
# options:
# standard since/year options for a year range to fetch from.
# report_id: only bother to process a single report
#
# Notes fo... | cc0-1.0 | 6,132,775,661,354,363,000 | 36.480447 | 95 | 0.688031 | false |
kiith-sa/QGIS | python/plugins/processing/admintools/httplib2/__init__.py | 43 | 70449 | # -*- coding: utf-8 -*-
"""
***************************************************************************
__init__.py
---------------------
Date : November 2006
Copyright : (C) 2012 by Joe Gregorio
Email : joe at bitworking dot org
***************************... | gpl-2.0 | -188,720,780,688,926,820 | 40.562832 | 235 | 0.579398 | false |
pulilab/django-collectform | docs/conf.py | 1 | 8195 | # -*- coding: utf-8 -*-
#
# complexity documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# 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.
#
# ... | bsd-3-clause | -3,650,898,579,533,927,400 | 31.26378 | 80 | 0.708359 | false |
0x90sled/catapult | third_party/beautifulsoup4/scripts/demonstrate_parser_differences.py | 73 | 2976 | """Demonstrate how different parsers parse the same markup.
Beautiful Soup can use any of a number of different parsers. Every
parser should behave more or less the same on valid markup, and
Beautiful Soup's unit tests make sure this is the case. But every
parser handles invalid markup differently. Even different vers... | bsd-3-clause | -5,007,886,513,142,338,000 | 30.326316 | 76 | 0.646841 | false |
rlaverde/scorecard_cps | performance_indicators_project/performance_indicators_project/urls.py | 1 | 2366 | from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.conf import settings
from django.views.generic import TemplateView
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^... | gpl-3.0 | -5,547,789,848,119,740,000 | 45.392157 | 106 | 0.684277 | false |
AlMikFox3/Ciphers | VignereCipher/vignere_cipher.py | 1 | 1867 | import time
import random
LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
def encrypt():
fname = input('Enter the name/path of the file to be encrypted : ')
f = open(fname, 'r')
msg = f.read()
f.close()
#key = input ('Enter Security Key (character string) for encryption :')
key = ''
kl = random.randint(10,17)... | mit | -3,632,193,124,106,009,000 | 21.961538 | 72 | 0.557043 | false |
lamdnhan/osf.io | website/addons/github/views/config.py | 37 | 2946 | # -*- coding: utf-8 -*-
import httplib as http
from flask import request
from framework.auth.decorators import must_be_logged_in
from framework.exceptions import HTTPError
from website.project.decorators import must_have_permission
from website.project.decorators import must_not_be_registration
from website.project... | apache-2.0 | 5,729,601,981,306,867,000 | 25.781818 | 70 | 0.61575 | false |
vk-brain/sketal | plugins/outsource/outsource_emotions_detector.py | 2 | 4569 | from handler.base_plugin import CommandPlugin
import aiohttp, json, time
class EmotionsDetectorPlugin(CommandPlugin):
__slots__ = ("key", "dirt", "clean_time", "requests_amount", "time_delta")
def __init__(self, *commands, prefixes=None, strict=False, key=None, time_delta=60, requests_amount=15):
""... | mit | -1,500,214,486,721,104,000 | 40.792079 | 150 | 0.551528 | false |
joerg84/arangodb | 3rdParty/V8/v5.7.0.0/tools/gyp/test/mac/gyptest-app.py | 34 | 4074 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that app bundles are built correctly.
"""
import TestGyp
import TestMac
import os
import plistlib
import subprocess
import sy... | apache-2.0 | -6,283,517,442,637,507,000 | 32.95 | 80 | 0.65513 | false |
georgestarcher/TA-SyncKVStore | bin/ta_synckvstore/solnlib/packages/splunklib/searchcommands/search_command.py | 4 | 38354 | # coding=utf-8
#
# Copyright © 2011-2015 Splunk, 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 ... | mit | -3,616,265,967,801,299,500 | 33.771532 | 131 | 0.58457 | false |
seankelly/buildbot | master/buildbot/test/fake/state.py | 10 | 1108 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-2.0 | -6,415,961,869,295,347,000 | 35.933333 | 79 | 0.737365 | false |
SatoshiNXSimudrone/sl4a-damon-clone | python-modules/pybluez/examples/advanced/inquiry-with-rssi.py | 20 | 5076 | # performs a simple device inquiry, followed by a remote name request of each
# discovered device
import os
import sys
import struct
import _bluetooth as bluez
def printpacket(pkt):
for c in pkt:
sys.stdout.write("%02x " % struct.unpack("B",c)[0])
print
def read_inquiry_mode(sock):
"""returns t... | apache-2.0 | -5,797,278,975,011,760,000 | 31.538462 | 77 | 0.61643 | false |
james4424/nest-simulator | pynest/nest/tests/test_sp/test_sp_manager.py | 8 | 4250 | # -*- coding: utf-8 -*-
#
# test_sp_manager.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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-2.0 | -6,459,008,892,099,325,000 | 35.016949 | 78 | 0.534588 | false |
tonybaloney/st2contrib | packs/networking_utils/actions/is_valid_ip.py | 4 | 2527 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | apache-2.0 | 5,450,980,193,425,089 | 39.758065 | 79 | 0.645429 | false |
XDestination/mongo-connector | mongo_connector/doc_managers/doc_manager_simulator.py | 2 | 6559 | # Copyright 2013-2014 MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | apache-2.0 | 2,279,154,945,056,189,200 | 32.984456 | 79 | 0.626467 | false |
shakamunyi/tensorflow | tensorflow/contrib/distributions/python/kernel_tests/gaussian_test.py | 5 | 5286 | # 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 | -8,212,078,274,667,906,000 | 36.489362 | 80 | 0.608778 | false |
digimarc/django | django/contrib/admin/migrations/0001_initial.py | 142 | 1657 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import django.contrib.admin.models
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('conten... | bsd-3-clause | 8,316,047,165,614,899,000 | 40.425 | 121 | 0.573929 | false |
KevinFasusi/supplychainpy | supplychainpy/_helpers/_config_file_paths.py | 1 | 2886 | # Copyright (c) 2015-2016, The Authors and Contributors
# <see AUTHORS file>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright n... | bsd-3-clause | 5,789,370,260,308,640,000 | 53.45283 | 118 | 0.761954 | false |
manasi24/tempest | tempest/api_schema/response/compute/v2_1/services.py | 23 | 2372 | # Copyright 2014 NEC Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | apache-2.0 | -3,718,721,133,452,647,400 | 35.492308 | 78 | 0.447302 | false |
cryptofun/honey | share/seeds/generate-seeds.py | 1 | 4185 | #!/usr/bin/python
# Copyright (c) 2014 Wladmir J. van der Laan
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the directory ... | mit | 2,950,685,174,326,540,300 | 30.946565 | 98 | 0.579211 | false |
githubutilities/LeetCode | Python/invert-binary-tree.py | 3 | 2242 | # Time: O(n)
# Space: O(h)
#
# Invert a binary tree.
#
# 4
# / \
# 2 7
# / \ / \
# 1 3 6 9
# to
# 4
# / \
# 7 2
# / \ / \
# 9 6 3 1
#
# Time: O(n)
# Space: O(w), w is the max number of the nodes of the levels.
# BFS solution.
class Queue:
def __init__(self):
... | mit | -2,893,924,365,451,776,000 | 22.354167 | 66 | 0.484835 | false |
RachellCalhoun/craftsite | crafts/migrations/0001_initial.py | 1 | 1079 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations ... | gpl-3.0 | 3,635,434,343,512,694,000 | 36.206897 | 114 | 0.600556 | false |
pombreda/formalchemy | formalchemy/tests/__init__.py | 2 | 13869 | # -*- coding: utf-8 -*-
import os
import glob
import logging
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
from BeautifulSoup import BeautifulSoup # required for html prettification
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative import declarative_base
loggin... | mit | -8,906,925,635,919,196,000 | 33.329208 | 126 | 0.641791 | false |
da4089/simplefix | simplefix/parser.py | 1 | 8483 | #! /usr/bin/env python
########################################################################
# SimpleFIX
# Copyright (C) 2016-2020, David Arnold.
#
# 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 S... | mit | -5,796,780,153,357,733,000 | 33.909465 | 79 | 0.585878 | false |
hoangminhitvn/flask | flask/lib/python2.7/site-packages/werkzeug/_compat.py | 448 | 6184 | import sys
import operator
import functools
try:
import builtins
except ImportError:
import __builtin__ as builtins
PY2 = sys.version_info[0] == 2
_identity = lambda x: x
if PY2:
unichr = unichr
text_type = unicode
string_types = (str, unicode)
integer_types = (int, long)
int_to_byte = c... | bsd-3-clause | 4,384,212,287,664,493,000 | 29.613861 | 83 | 0.594276 | false |
sogelink/ansible | lib/ansible/modules/network/layer3/net_vrf.py | 96 | 1854 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Ansible by Red Hat, inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | -6,503,136,363,621,961,000 | 22.175 | 93 | 0.648328 | false |
AOSP-S4-KK/platform_external_chromium_org | chrome/common/extensions/docs/server2/api_data_source_test.py | 23 | 10290 | #!/usr/bin/env python
# Copyright (c) 2012 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.
import json
import os
import sys
import unittest
from api_data_source import (_JSCModel,
_FormatValue... | bsd-3-clause | 2,553,276,532,594,382,000 | 33.646465 | 80 | 0.583771 | false |
jhawkesworth/ansible | lib/ansible/plugins/terminal/slxos.py | 177 | 1962 | #
# (c) 2018 Extreme Networks Inc.
#
# This file is part of Ansible
#
# Ansible 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.
#
# Ans... | gpl-3.0 | 7,101,720,302,800,315,000 | 35.333333 | 93 | 0.638124 | false |
LaoZhongGu/kbengine | kbe/res/scripts/common/Lib/ctypes/test/test_memfunctions.py | 50 | 3265 | import sys
import unittest
from ctypes import *
class MemFunctionsTest(unittest.TestCase):
## def test_overflow(self):
## # string_at and wstring_at must use the Python calling
## # convention (which acquires the GIL and checks the Python
## # error flag). Provoke an error and catch it; see al... | lgpl-3.0 | 6,215,118,023,051,450,000 | 40.329114 | 72 | 0.569678 | false |
kawamon/hue | desktop/core/ext-py/eventlet-0.24.1/tests/manual/greenio_memtest.py | 10 | 1872 | import eventlet
from eventlet import greenio
import os
__test__ = False
_proc_status = '/proc/%d/status' % os.getpid()
_scale = {'kB': 1024.0, 'mB': 1024.0 * 1024.0,
'KB': 1024.0, 'MB': 1024.0 * 1024.0}
def _VmB(VmKey):
'''Private.
'''
global _proc_status, _scale
# get pseudo file /proc/... | apache-2.0 | -7,237,980,189,321,866,000 | 21.554217 | 70 | 0.516026 | false |
unseenlaser/python-for-android | python3-alpha/python3-src/Lib/email/test/test_email_codecs.py | 50 | 3394 | # Copyright (C) 2002-2006 Python Software Foundation
# Contact: email-sig@python.org
# email package unit tests for (optional) Asian codecs
import unittest
from test.support import run_unittest
from email.test.test_email import TestEmailBase
from email.charset import Charset
from email.header import Header, decode_he... | apache-2.0 | 7,749,739,476,233,436,000 | 34.354167 | 79 | 0.625221 | false |
ryra/Personal | 3.secsif/All/cryptopals-solutions-master/set2/12/AES_128.py | 4 | 1929 | #! /usr/bin/env python
from Crypto.Cipher import AES
from binascii import a2b_base64
def pkcs_7_pad(data, final_len = None):
if final_len == None:
final_len = (len(data)/16 + 1)*16
padding_len = final_len - len(data)
return data + chr(padding_len)*padding_len
def pkcs_7_unpad(data):
padding_len = ord(dat... | agpl-3.0 | -8,326,404,363,105,725,000 | 28.227273 | 79 | 0.657854 | false |
sathnaga/avocado-vt | selftests/unit/test_installer.py | 8 | 2175 | #!/usr/bin/python
import unittest
import os
import sys
# simple magic for using scripts within a source tree
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if os.path.isdir(os.path.join(basedir, 'virttest')):
sys.path.append(basedir)
from virttest import installer
from virttest import cart... | gpl-2.0 | -8,299,031,636,746,632,000 | 30.071429 | 77 | 0.605057 | false |
FedoraScientific/salome-smesh | src/SMESH_SWIG/ex11_grid3partition.py | 1 | 3248 | # -*- coding: iso-8859-1 -*-
# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesse... | lgpl-2.1 | -4,072,128,741,821,675,000 | 24.777778 | 153 | 0.684421 | false |
neumerance/deploy | openstack_dashboard/dashboards/project/firewalls/views.py | 4 | 10365 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013, Big Switch Networks, 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/... | apache-2.0 | 2,162,242,117,870,831,900 | 35.368421 | 78 | 0.619103 | false |
windskyer/nova | nova/api/openstack/compute/legacy_v2/contrib/instance_usage_audit_log.py | 66 | 5751 | # Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | gpl-2.0 | -2,199,623,927,029,462,800 | 40.078571 | 79 | 0.565989 | false |
zamattiac/osf.io | framework/flask/__init__.py | 22 | 2444 | # -*- coding: utf-8 -*-
import os
from flask import (Flask, request, jsonify, render_template, # noqa
render_template_string, Blueprint, send_file, abort, make_response,
redirect as flask_redirect, url_for, send_from_directory, current_app
)
import furl
from website import settings
# Create app
app = Flask... | apache-2.0 | -2,965,007,858,645,296,000 | 30.333333 | 79 | 0.695172 | false |
potsmaster/cinder | cinder/tests/unit/keymgr/test_key.py | 18 | 1908 | # Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory
# 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/... | apache-2.0 | 6,872,491,349,620,654,000 | 27.477612 | 78 | 0.671384 | false |
arpan-chavda/rh_app | libs/venus/planet/vendor/html5lib/sanitizer.py | 3 | 14430 | import re
from xml.sax.saxutils import escape, unescape
from tokenizer import HTMLTokenizer
from constants import tokenTypes
class HTMLSanitizerMixin(object):
""" sanitization of XHTML+MathML+SVG and of inline style attributes."""
acceptable_elements = ['a', 'abbr', 'acronym', 'address', 'area',
'art... | gpl-3.0 | -4,867,528,023,247,370,000 | 54.930233 | 139 | 0.530631 | false |
aeroevan/snakebite | test/commandlineparser_test.py | 2 | 41119 | # -*- coding: utf-8 -*-
# Copyright (c) 2013 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 6,454,102,346,488,941,000 | 36.551598 | 114 | 0.582821 | false |
Subsets and Splits
Gradio Code Samples
Limits the results to entries containing the word 'gradio' in the repo_name, content, or path, providing a filtered subset of the dataset.