repo_name stringlengths 7 65 | path stringlengths 5 185 | copies stringlengths 1 4 | size stringlengths 4 6 | content stringlengths 977 990k | license stringclasses 14
values | hash stringlengths 32 32 | line_mean float64 7.18 99.4 | line_max int64 31 999 | alpha_frac float64 0.25 0.95 | ratio float64 1.5 7.84 | autogenerated bool 1
class | config_or_test bool 2
classes | has_no_keywords bool 2
classes | has_few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mozilla/inventory | mozdns/soa/models.py | 2 | 9413 | from django.core.exceptions import ValidationError, ObjectDoesNotExist
from django.db import models
from django.db.models import Q, F
from mozdns.mixins import ObjectUrlMixin, DisplayMixin
from mozdns.validation import validate_ttl, validate_soa_serial, validate_name
from settings import MOZDNS_BASE_URL
from core.key... | bsd-3-clause | 82dc659a9130e4d18c31b76b3b376d4a | 34.790875 | 78 | 0.598109 | 4.069607 | false | false | false | false |
mozilla/inventory | vendor-local/src/django-extensions/django_extensions/management/commands/runserver_plus.py | 16 | 4895 | from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from optparse import make_option
import os
import sys
try:
from django.contrib.staticfiles.handlers import StaticFilesHandler
USE_STATICFILES = 'django.contrib.staticfiles' in settings.INSTALLED_APPS
except Impor... | bsd-3-clause | 3a5174b7087dd57601902b7fb70bf312 | 43.908257 | 161 | 0.60858 | 4.366637 | false | false | false | false |
mozilla/inventory | core/site/views.py | 2 | 1480 | from django.shortcuts import get_object_or_404
from django.shortcuts import render
from core.site.models import Site
from core.site.forms import SiteForm
from core.site.utils import get_vlans
from core.views import CoreDeleteView, CoreListView
from core.views import CoreCreateView, CoreUpdateView
class SiteView(obj... | bsd-3-clause | bcbf5b02d6c56f4a85adbdfd873f05ae | 26.407407 | 77 | 0.703378 | 3.490566 | false | false | false | false |
mozilla/inventory | vendor-local/src/django-piston/piston/oauth.py | 24 | 23013 | """
The MIT License
Copyright (c) 2007 Leah Culver
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publis... | bsd-3-clause | a4d95a65fe905496e369a063c0491194 | 34.406154 | 86 | 0.616087 | 4.345355 | false | false | false | false |
mozilla/inventory | vendor-local/src/django-tastypie/tests/core/tests/authorization.py | 14 | 5561 | from django.test import TestCase
from django.http import HttpRequest
from django.contrib.auth.models import User, Permission
from core.models import Note
from tastypie.authorization import Authorization, ReadOnlyAuthorization, DjangoAuthorization
from tastypie import fields
from tastypie.resources import Resource, Mode... | bsd-3-clause | b12e023b71dd592e428f55d2b63acdaa | 33.75625 | 95 | 0.664449 | 4.2418 | false | true | false | false |
mozilla/inventory | vendor-local/src/django-extensions/django_extensions/utils/dia2django.py | 44 | 10246 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
##Author Igor Támara igor@tamarapatino.org
##Use this little program as you wish, if you
#include it in your work, let others know you
#are using it preserving this note, you have
#the right to make derivative works, Use it
#at your own risk.
#Tested to work on(etch testing 13-... | bsd-3-clause | 4f3699a0734ce05b021fe2e66e3ef834 | 46.873832 | 149 | 0.445193 | 4.342942 | false | false | false | false |
mozilla/inventory | vendor-local/src/django-tastypie/tastypie/authentication.py | 14 | 16908 | import base64
import hmac
import time
import uuid
from django.conf import settings
from django.contrib.auth import authenticate
from django.core.exceptions import ImproperlyConfigured
from django.middleware.csrf import _sanitize_token, constant_time_compare
from django.utils.http import same_origin
from django.utils.t... | bsd-3-clause | ef6d748fb8311677ab42b885878ed689 | 32.41502 | 157 | 0.625148 | 4.559871 | false | false | false | false |
mozilla/inventory | mozdns/views.py | 2 | 2820 | from mozdns.utils import slim_form
from base.views import BaseListView, BaseDetailView, BaseCreateView
from base.views import BaseUpdateView, BaseDeleteView
class MozdnsListView(BaseListView):
""" """
template_name = 'mozdns/mozdns_list.html'
class MozdnsDetailView(BaseDetailView):
""" """
template_... | bsd-3-clause | fd3a566ec8af649624233f3b21d450f2 | 38.166667 | 79 | 0.606738 | 3.916667 | false | false | false | false |
mozilla/inventory | migrate_dns/inventory_build.py | 3 | 3602 | from migrate_dns.build_nics import *
from migrate_dns.utils import *
import ipaddr
import pprint
pp = pprint.PrettyPrinter(indent=2)
def generate_hostname(nic, site_name):
"""
Determine the correct fqdn from the nic's hostname key, site the name is
going into, and any other additional options in nic_met... | bsd-3-clause | 74bbc5f427614c8f56138945d645df98 | 34.663366 | 79 | 0.598279 | 4.038117 | false | false | false | false |
mozilla/inventory | scripts/output_d3_dns_tree.py | 2 | 1091 | __import__('inventory_context')
from mozdns.domain.models import Domain
import pprint
import simplejson as json
pp = pprint.PrettyPrinter(depth=4)
def emit_node(domain):
node = {}
node['name'] = domain.name
children = []
for child_domain in domain.domain_set.all():
children.append(emit_node... | bsd-3-clause | ef736df9efc6a6338ec421f1d7065694 | 21.729167 | 56 | 0.611366 | 3.624585 | false | false | false | false |
mozilla/inventory | mozdns/search_utils.py | 2 | 5530 | from django.db.models import Q
from django.core.exceptions import ObjectDoesNotExist
import mozdns
import core
def fqdn_search(fqdn, *args, **kwargs):
"""
Find any records that have a name that is the provided fqdn. This
name would show up on the left hand side of a zone file and in a PTR's
case the ... | bsd-3-clause | 75bb37d4fe5ec20f9227759ac2a155c1 | 36.364865 | 79 | 0.566727 | 3.859037 | false | false | false | false |
mozilla/inventory | mozdns/address_record/views.py | 3 | 2416 | from django.core.exceptions import ObjectDoesNotExist
from mozdns.address_record.forms import AddressRecordForm
from mozdns.address_record.models import AddressRecord
from mozdns.domain.models import Domain
from mozdns.views import MozdnsDeleteView, MozdnsDetailView
from mozdns.views import MozdnsCreateView, MozdnsUpd... | bsd-3-clause | 85462301ff4ea9c7a664e8c71dd5ead3 | 35.606061 | 75 | 0.639487 | 4.053691 | false | false | false | false |
mozilla/inventory | core/registration/static/migrations/0001_initial.py | 2 | 16955 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Remove StaticInterface
# XXX PLEASE uncomment this in production
from django.contrib.contenttypes.... | bsd-3-clause | cd56f2be463388f5e5a177d22e5bdeec | 75.373874 | 189 | 0.561781 | 3.593684 | false | false | false | false |
mozilla/inventory | migrate_dns/import_utils.py | 2 | 2950 | from migrate_dns.zone_migrate import populate_forward_dns, populate_reverse_dns
from dns import zone
from iscpy.iscpy_dns.named_importer_lib import MakeNamedDict
from mozdns.view.models import View
import settings
import os
# Add zones that should not be imported here
black_list = (
'svc.mozilla.com',
'servi... | bsd-3-clause | 7bd9df41033d39782a0f3b4a34231e14 | 33.705882 | 79 | 0.646441 | 3.398618 | false | false | false | false |
amperser/proselint | proselint/tools.py | 1 | 14182 | """General-purpose tools shared across linting checks."""
import copy
import dbm
import functools
import hashlib
import importlib
import inspect
import json
import os
import re
import shelve
import sys
import traceback
from warnings import showwarning as warn
from . import config
_cache_shelves = dict()
proselint_pa... | bsd-3-clause | c1e2b84a91f0ae83f881fb00ee799f60 | 27.291417 | 79 | 0.55496 | 3.78276 | false | false | false | false |
amperser/proselint | proselint/checks/misc/capitalization.py | 1 | 2517 | """Incorrect capitalization.
---
layout: post
source: Garner's Modern American Usage
source_url: http://bit.ly/1T4alrY
title: incorrect captalization
date: 2014-06-10 12:31:19
categories: writing
---
Incorrect capitalization.
"""
from proselint.tools import memoize, preferred_forms_check
@memoiz... | bsd-3-clause | 0ba58ffba33fa19888cddc90d6e147ad | 26.358696 | 79 | 0.501788 | 3.500695 | false | false | false | false |
ros-infrastructure/rosdep | src/rosdep2/platforms/openembedded.py | 1 | 3382 | # Copyright (c) 2019, LG Electronics, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of con... | bsd-3-clause | 9ed9cfa30d9dde013b7530f2ad9a8b4c | 42.922078 | 92 | 0.743347 | 4.154791 | false | false | false | false |
ros-infrastructure/rosdep | src/rosdep2/__init__.py | 1 | 5238 | # Copyright (c) 2009, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of cond... | bsd-3-clause | c29849f2f35ad8fd169ee7aeec0d9617 | 38.089552 | 120 | 0.737495 | 4.092188 | false | false | false | false |
ros-infrastructure/rosdep | src/rosdep2/platforms/gentoo.py | 2 | 4726 | # Copyright (c) 2009, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of cond... | bsd-3-clause | 662116ae6647590292f9b7f4949e3ebb | 35.921875 | 101 | 0.720694 | 3.938333 | false | false | false | false |
ros-infrastructure/rosdep | src/rosdep2/rep3.py | 1 | 3213 | # Copyright (c) 2012, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of cond... | bsd-3-clause | aef17b0d4769f393dd271b2f11bfb3f5 | 43.625 | 104 | 0.724556 | 4.28972 | false | false | false | false |
mozilla/make.mozilla.org | vendor-local/lib/python/chardet/constants.py | 238 | 1484 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | bsd-3-clause | acd5503abf95a1a9db4812507159a89b | 30.574468 | 69 | 0.68531 | 4.156863 | false | false | false | false |
mozilla/make.mozilla.org | vendor-local/lib/python/celery/utils/compat.py | 14 | 8928 | # -*- coding: utf-8 -*-
"""
celery.utils.compat
~~~~~~~~~~~~~~~~~~~
Backward compatible implementations of features
only available in newer Python versions.
:copyright: (c) 2009 - 2012 by Ask Solem.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
#####... | bsd-3-clause | b90847f02bac3ada1577d096877413f9 | 32.189591 | 79 | 0.566756 | 4.376471 | false | false | false | false |
mozilla/make.mozilla.org | vendor-local/lib/python/requests/packages/urllib3/filepost.py | 41 | 2663 | # urllib3/filepost.py
# Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import codecs
import mimetypes
try:
from mimetools import choose_boundary
except ImportEr... | bsd-3-clause | 1702de564debac710ef2ac6cad6689a3 | 29.261364 | 80 | 0.623357 | 3.887591 | false | false | false | false |
mozilla/make.mozilla.org | vendor-local/lib/python/south/modelsinspector.py | 1 | 17995 | """
Like the old south.modelsparser, but using introspection where possible
rather than direct inspection of models.py.
"""
import datetime
import re
import decimal
from south.utils import get_attribute, auto_through
from django.db import models
from django.db.models.base import ModelBase, Model
from django.db.model... | bsd-3-clause | ff2080481c17d1e4c795d015fb893b33 | 37.698925 | 202 | 0.593443 | 4.091633 | false | false | false | false |
mozilla/make.mozilla.org | make_mozilla/projects/admin.py | 1 | 1204 | from django.contrib.gis import admin
from make_mozilla.projects import models
class ProjectStepInline(admin.TabularInline):
model = models.ProjectStep
class ProjectAdmin(admin.ModelAdmin):
list_display = ('name', 'featured', 'contributor', )
list_editable = ('featured', )
list_filter = ('contributor... | bsd-3-clause | 3ad123b71d2ad5228ad1bc2d00ad1038 | 22.607843 | 80 | 0.655316 | 3.716049 | false | false | false | false |
mozilla/make.mozilla.org | vendor-local/lib/python/celery/task/http.py | 14 | 6477 | # -*- coding: utf-8 -*-
"""
celery.task.http
~~~~~~~~~~~~~~~~
Task webhooks implementation.
:copyright: (c) 2009 - 2012 by Ask Solem.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import sys
import urllib2
from urllib import urlencode
from urlparse impo... | bsd-3-clause | 2acfab5d09c876de26c5b08a18649a84 | 28.711009 | 77 | 0.618187 | 4.048125 | false | false | false | false |
mozilla/make.mozilla.org | vendor-local/lib/python/requests/packages/urllib3/connectionpool.py | 8 | 18316 | # urllib3/connectionpool.py
# Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import logging
import socket
from socket import error as SocketError, timeout as Socket... | bsd-3-clause | 10912bd082cf8cf77538b09652e82bc5 | 34.15547 | 80 | 0.593197 | 4.552821 | false | false | false | false |
mozilla/make.mozilla.org | vendor-local/lib/python/celery/security/__init__.py | 14 | 2610 | from __future__ import absolute_import
from __future__ import with_statement
from kombu.serialization import registry
from .. import current_app
from ..exceptions import ImproperlyConfigured
from .serialization import register_auth
SSL_NOT_INSTALLED = """\
You need to install the pyOpenSSL library to use the auth s... | bsd-3-clause | e18db53abe8d1702b6ad4ce6e5dc54b7 | 32.037975 | 77 | 0.709579 | 4.278689 | false | true | false | false |
ets-labs/python-dependency-injector | setup.py | 1 | 4134 | """`Dependency injector` setup script."""
import os
import re
from setuptools import setup, Extension
# Defining setup variables:
defined_macros = dict()
defined_macros["CYTHON_CLINE_IN_TRACEBACK"] = 0
# Getting description:
with open("README.rst") as readme_file:
description = readme_file.read()
# Getting re... | bsd-3-clause | 5f75ac7c179e44d6625af614eac36184 | 32.885246 | 77 | 0.552008 | 4.283938 | false | false | false | false |
ets-labs/python-dependency-injector | tests/unit/containers/test_traversal_py3.py | 3 | 1606 | """Container traversing tests."""
from dependency_injector import containers, providers
class Container(containers.DeclarativeContainer):
obj_factory = providers.DelegatedFactory(
dict,
foo=providers.Resource(
dict,
foo="bar"
),
bar=providers.Resource(
... | bsd-3-clause | 0b1b217fded7b9906ecac22ae51471d2 | 29.301887 | 72 | 0.693649 | 4.128535 | false | true | false | false |
pbrod/numdifftools | src/numdifftools/tests/test_fornberg.py | 1 | 4538 | from __future__ import absolute_import, print_function
import numpy as np
from numpy.testing import assert_allclose # @UnresolvedImport
from hypothesis import given, note, settings, strategies as st #, reproduce_failure
from numdifftools.example_functions import function_names, get_function
from numdifftools.fornb... | bsd-3-clause | e6f9f1e511715c2a71a4f692b9087954 | 28.089744 | 85 | 0.524901 | 3.043595 | false | false | false | false |
pbrod/numdifftools | src/numdifftools/limits.py | 1 | 18529 | """
Created on 27. aug. 2015
@author: pab
Author: John D'Errico
e-mail: woodchips@rochester.rr.com
Release: 1.0
Release date: 5/23/2008
"""
from __future__ import absolute_import, division, print_function
from collections import namedtuple
from functools import partial
import warnings
import numpy as np
from numdifft... | bsd-3-clause | 572b97d43cb38b9b7d1b0467a4cda417 | 34.632692 | 96 | 0.601166 | 3.507952 | false | false | false | false |
ets-labs/python-dependency-injector | examples/providers/provided_instance_complex.py | 3 | 1080 | """Complex example of the injecting of provided instance attributes and items."""
from dependency_injector import containers, providers
class Service:
def __init__(self, value):
self.value = value
def get_value(self):
return self.value
class Container(containers.DeclarativeContainer):
... | bsd-3-clause | c3dee473225e6745db54eeefa9fa6d5f | 22.478261 | 81 | 0.556481 | 4.268775 | false | false | false | false |
ets-labs/python-dependency-injector | examples/providers/dict_non_string_keys.py | 3 | 1243 | """`Dict` provider with non-string keys example."""
import dataclasses
from typing import Dict
from dependency_injector import containers, providers
class Command:
...
class CommandA(Command):
...
class CommandB(Command):
...
class Handler:
...
class HandlerA(Handler):
...
class Handle... | bsd-3-clause | b1730d2e2af8cc7eb83ec7cef650aecf | 18.421875 | 74 | 0.655672 | 4.227891 | false | false | false | false |
ets-labs/python-dependency-injector | tests/unit/providers/test_aggregate_py2_py3.py | 2 | 8430 | """Aggregate provider tests."""
from dependency_injector import providers, errors
from pytest import fixture, mark, raises
class Example:
def __init__(self, init_arg1=None, init_arg2=None, init_arg3=None, init_arg4=None):
self.init_arg1 = init_arg1
self.init_arg2 = init_arg2
self.init_arg... | bsd-3-clause | 7acf4cd872059600907a2ec254ba2172 | 27.869863 | 95 | 0.672716 | 3.490683 | false | true | false | false |
ets-labs/python-dependency-injector | examples/miniapps/movie-lister/movies/finders.py | 3 | 1326 | """Movie finders module."""
import csv
import sqlite3
from typing import Callable, List
from .entities import Movie
class MovieFinder:
def __init__(self, movie_factory: Callable[..., Movie]) -> None:
self._movie_factory = movie_factory
def find_all(self) -> List[Movie]:
raise NotImplemente... | bsd-3-clause | 4c847e86359c9512628b5a02c88923a0 | 25.52 | 73 | 0.58371 | 4.030395 | false | false | false | false |
sphinx-gallery/sphinx-gallery | examples/plot_1_exp.py | 3 | 1109 | # -*- coding: utf-8 -*-
"""
Plotting the exponential function
=================================
This example demonstrates how to import a local module and how images are
stacked when two plots are created in one code block. The variable ``N`` from
the example 'Local module' (file ``local_module.py``) is imported in th... | bsd-3-clause | 2fd76bcd194e9c73f1e745434cd3e539 | 24.744186 | 78 | 0.64047 | 3.548077 | false | false | false | false |
rlpy/rlpy | tests/gibbs_policy.py | 1 | 1578 | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import range
from rlpy.Domains import GridWorld
from rlpy.Representations import Tabul... | bsd-3-clause | 7b3bfb55526350ea5b11a45d3f134497 | 34.066667 | 77 | 0.647655 | 3.522321 | false | false | false | false |
rlpy/rlpy | examples/blocksworld/ggq-indep.py | 1 | 1623 | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from rlpy.Domains import BlocksWorld
from rlpy.Agents import Greedy_GQ
from rlpy.Representations imp... | bsd-3-clause | 8e8a575513b4d1ab5bfcbedf66f74cbc | 32.8125 | 98 | 0.672212 | 3.305499 | false | false | false | false |
rlpy/rlpy | examples/cartpole_orig/kifdd_gauss.py | 1 | 3023 | """
Cart-pole balancing with continuous / Kernelized iFDD
"""
from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from past.utils import old_div
from rl... | bsd-3-clause | 20043d281bcf920b4bddd8a235cab80e | 37.75641 | 112 | 0.643401 | 3.482719 | false | false | false | false |
rlpy/rlpy | examples/gridworld/trajectory_based_value_iteration.py | 1 | 1513 | #!/usr/bin/env python
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
__author__ = "William Dabney"
from rlpy.Domains import GridWorld
from rlpy.M... | bsd-3-clause | a79c95c7fa761e9bc49be8688def6a3a | 29.26 | 72 | 0.709187 | 3.879487 | false | false | false | false |
oauthlib/oauthlib | oauthlib/oauth1/rfc5849/signature.py | 1 | 32076 | """
This module is an implementation of `section 3.4`_ of RFC 5849.
**Usage**
Steps for signing a request:
1. Collect parameters from the request using ``collect_parameters``.
2. Normalize those parameters using ``normalize_parameters``.
3. Create the *base string URI* using ``base_string_uri``.
4. Create the *signa... | bsd-3-clause | 1d2b99f3c82f423dfa422c10658b2aee | 36.647887 | 80 | 0.650549 | 3.769213 | false | false | false | false |
oauthlib/oauthlib | oauthlib/oauth1/rfc5849/utils.py | 5 | 2613 | """
oauthlib.utils
~~~~~~~~~~~~~~
This module contains utility methods used by various parts of the OAuth
spec.
"""
import urllib.request as urllib2
from oauthlib.common import quote, unquote
UNICODE_ASCII_CHARACTER_SET = ('abcdefghijklmnopqrstuvwxyz'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
... | bsd-3-clause | 70a5fc94dc6d8b5133088ee9439eab19 | 30.481928 | 79 | 0.649445 | 3.94713 | false | false | false | false |
oauthlib/oauthlib | setup.py | 1 | 2203 | # Hack because logging + setuptools sucks.
try:
import multiprocessing
except ImportError:
pass
from os.path import dirname, join
from setuptools import find_packages, setup
import oauthlib
def fread(fn):
with open(join(dirname(__file__), fn), 'r') as f:
return f.read()
rsa_require = ['crypto... | bsd-3-clause | 82260ee9837d0d28dea11578d2bb746f | 32.892308 | 104 | 0.624603 | 4.027422 | false | false | false | false |
oasis-open/cti-python-stix2 | stix2/test/v20/test_datastore_filters.py | 1 | 19219 | import pytest
from stix2 import parse
from stix2.datastore.filters import Filter, apply_common_filters
from stix2.utils import STIXdatetime, parse_into_datetime
stix_objs = [
{
"created": "2017-01-27T13:49:53.997Z",
"description": "\n\nTITLE:\n\tPoison Ivy",
"id": "malware--fdd60b30-b67c-4... | bsd-3-clause | 346d9391635c9e518e6a6f8cab1dc58c | 39.039583 | 131 | 0.626984 | 3.056457 | false | true | false | false |
oasis-open/cti-python-stix2 | stix2/test/test_utils_type_checks.py | 1 | 6467 | import pytest
import stix2.utils
###
# Tests using types/behaviors common to STIX 2.0 and 2.1.
###
@pytest.mark.parametrize("stix_version", ["2.0", "2.1"])
@pytest.mark.parametrize(
"type_", [
"attack-pattern",
"campaign",
"course-of-action",
"identity",
"indicator",
... | bsd-3-clause | aee3f62f34e9df22f521abf529503315 | 23.683206 | 69 | 0.592392 | 2.753086 | false | true | false | false |
dask/dask | dask/dataframe/rolling.py | 2 | 21493 | import datetime
import inspect
from numbers import Integral
import pandas as pd
from pandas.api.types import is_datetime64_any_dtype
from pandas.core.window import Rolling as pd_Rolling
from dask.array.core import normalize_arg
from dask.base import tokenize
from dask.blockwise import BlockwiseDepDict
from dask.dataf... | bsd-3-clause | 1492f6f373b82aa7a6f9210fcf0795a1 | 30.149275 | 93 | 0.56972 | 4.049934 | false | false | false | false |
dask/dask | dask/array/wrap.py | 2 | 6870 | from functools import partial
from itertools import product
import numpy as np
from tlz import curry
from dask.array.backends import array_creation_dispatch
from dask.array.core import Array, normalize_chunks
from dask.array.utils import meta_from_array
from dask.base import tokenize
from dask.blockwise import blockw... | bsd-3-clause | 9b52abed3dcdf3753b02d41b0137049f | 27.625 | 87 | 0.619068 | 3.448795 | false | false | false | false |
dask/dask | dask/array/core.py | 2 | 190420 | from __future__ import annotations
import contextlib
import math
import operator
import os
import pickle
import re
import sys
import traceback
import uuid
import warnings
from bisect import bisect
from collections.abc import (
Collection,
Hashable,
Iterable,
Iterator,
Mapping,
MutableMapping,
)... | bsd-3-clause | 5cad56ae8e5ac4859e78364827e91c18 | 31.73409 | 115 | 0.578244 | 3.863578 | false | false | false | false |
dask/dask | dask/diagnostics/profile_visualize.py | 2 | 15882 | import random
import warnings
from bisect import bisect_left
from itertools import cycle
from operator import add, itemgetter
from tlz import accumulate, groupby, pluck, unique
from dask.core import istask
from dask.utils import apply, funcname, import_required
def BOKEH_VERSION():
import bokeh
from packagi... | bsd-3-clause | eadeadcd77296c97d930ce09911b628a | 29.838835 | 87 | 0.545649 | 3.699511 | false | false | false | false |
rapidpro/casepro | casepro/cases/migrations/0007_outgoing.py | 2 | 1351 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("orgs", "0008_org_timezone"),
("ca... | bsd-3-clause | 0aac434667d0d4f673b4bb6cd805b583 | 33.641026 | 118 | 0.510733 | 4.67474 | false | false | false | false |
rapidpro/casepro | casepro/msgs/views.py | 1 | 25232 | import logging
from collections import defaultdict
import iso639
from dash.orgs.views import OrgObjPermsMixin, OrgPermsMixin
from el_pagination.paginators import LazyPaginator
from smartmin.csv_imports.models import ImportTask
from smartmin.mixins import NonAtomicMixin
from smartmin.views import (
SmartCreateView,... | bsd-3-clause | 67011f3564cca7682998b47963849f04 | 34.994294 | 119 | 0.589093 | 4.130976 | false | false | false | false |
autoreject/autoreject | examples/plot_autoreject_workflow.py | 1 | 9018 | """
.. _plot_autoreject_workflow:
===================================================
Preprocessing workflow with ``autoreject`` and ICA
===================================================
This example demonstrates how to visualize data when preprocessing
with :mod:`autoreject` and discusses decisions about when and ... | bsd-3-clause | 0d47db086fd2d4c72fae4367eace67d1 | 38.726872 | 78 | 0.719783 | 3.522656 | false | false | false | false |
scrapinghub/dateparser | dateparser/utils/__init__.py | 1 | 6766 | import calendar
import logging
import types
import unicodedata
from datetime import datetime
import regex as re
from tzlocal import get_localzone
from pytz import UTC, timezone, UnknownTimeZoneError
from collections import OrderedDict
from dateparser.timezone_parser import _tz_offsets, StaticTzInfo
def strip_braces... | bsd-3-clause | fb414e05b03ff00731d89d260858e646 | 27.428571 | 97 | 0.603311 | 3.715541 | false | false | false | false |
scrapinghub/dateparser | dateparser/__init__.py | 1 | 2631 | __version__ = '1.1.3'
from .date import DateDataParser
from .conf import apply_settings
_default_parser = DateDataParser()
@apply_settings
def parse(date_string, date_formats=None, languages=None, locales=None,
region=None, settings=None, detect_languages_function=None):
"""Parse date and time from gi... | bsd-3-clause | 575330ea79fc2d0fbe345c0be4aef790 | 40.109375 | 118 | 0.685671 | 4.264182 | false | false | false | false |
bokeh/bokeh | examples/advanced/extensions/putting_together.py | 1 | 2758 | from bokeh.core.properties import Instance, Required, String
from bokeh.io import show
from bokeh.layouts import column
from bokeh.models import Slider, UIElement
from bokeh.util.compiler import TypeScript
CODE = """
import {UIElement, UIElementView} from "models/ui/ui_element"
import {Slider} from "models/widgets/sli... | bsd-3-clause | 326709927df1625e1cf76d91feb74847 | 26.858586 | 82 | 0.680928 | 3.657825 | false | false | false | false |
bokeh/bokeh | src/bokeh/models/expressions.py | 1 | 9495 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 2bfa8384fb5ae3fa5ce2bbb0117aa545 | 30.233553 | 84 | 0.566087 | 4.754632 | false | false | false | false |
bokeh/bokeh | src/bokeh/core/property/either.py | 1 | 4204 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 31cb43af092f05c9f1607c1b45e41df2 | 31.338462 | 141 | 0.423406 | 5.17734 | false | false | false | false |
bokeh/bokeh | src/bokeh/models/textures.py | 1 | 2827 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 54addef839f84941890521cd0c64bf87 | 28.757895 | 78 | 0.348426 | 6.410431 | false | false | false | false |
bokeh/bokeh | tests/support/plugins/file_server.py | 1 | 5929 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 5aaa997d3eefcb7e2ef20daa80b56ed2 | 34.502994 | 153 | 0.511385 | 4.716786 | false | false | false | false |
bokeh/bokeh | src/bokeh/models/annotations/html/labels.py | 1 | 10444 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 11492fda8138c30cb3bee2f651861c53 | 29.899408 | 91 | 0.569514 | 4.54878 | false | false | false | false |
bokeh/bokeh | src/bokeh/plotting/_plot.py | 1 | 6594 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | bccfcac91fd603f7e3e3703b37d89bd3 | 34.262032 | 121 | 0.50364 | 4.582349 | false | false | false | false |
bokeh/bokeh | examples/topics/pie/donut.py | 1 | 1735 | ''' A donut chart populated with browser market share percentages. This example
demonstrates the low-level |bokeh.models| API.
.. bokeh-example-metadata::
:apis: bokeh.models.AnnularWedge, bokeh.models.Legend
:refs: :ref:`ug_topics_pie`
:keywords: pandas, donut, wedge
'''
from math import pi
from bokeh.i... | bsd-3-clause | 8ce29f23bdacfc28bb86bc347a53b5aa | 29.982143 | 79 | 0.672046 | 3.098214 | false | false | false | false |
bokeh/bokeh | src/bokeh/models/ui/dialogs.py | 1 | 2548 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 4499c548e3436081400f05e00ba0f933 | 28.287356 | 87 | 0.311617 | 6.601036 | false | false | false | false |
bokeh/bokeh | src/bokeh/util/deprecation.py | 1 | 3286 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | e49a440d8ada0d06b52e7abc4de2d813 | 35.511111 | 98 | 0.406573 | 5.588435 | false | false | false | false |
bokeh/bokeh | src/bokeh/sampledata/autompg.py | 1 | 3038 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 3641d586703fe5f204fb232b1bbd39e4 | 30.978947 | 78 | 0.378868 | 4.435036 | false | false | false | false |
bokeh/bokeh | src/bokeh/core/property/alias.py | 1 | 3462 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | add012b09c13c9b58302e15a2828c4c0 | 31.35514 | 78 | 0.410456 | 6.193202 | false | false | false | false |
bokeh/bokeh | tests/integration/widgets/test_slider.py | 1 | 9860 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#---------------------------------------------------... | bsd-3-clause | 9ad5d21185b089ec9b992b26c9063d8d | 35.928839 | 124 | 0.585801 | 3.58937 | false | true | false | false |
bokeh/bokeh | examples/models/toolbars.py | 1 | 1774 | import numpy as np
from bokeh.layouts import column, row
from bokeh.plotting import figure, show
N = 1000
x = np.random.random(size=N) * 100
y = np.random.random(size=N) * 100
radii = np.random.random(size=N) * 1.5
colors = ["#%02x%02x%02x" % (int(r), int(g), 150) for r, g in zip(50+2*x, 30+2*y)]
TOOLS="hover,crossh... | bsd-3-clause | 9197a318c4cbd8ee471a53fb40ab7e57 | 37.565217 | 122 | 0.6646 | 2.527066 | false | false | false | false |
bokeh/bokeh | tests/support/defaults.py | 1 | 4753 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | b3835c0da27cab91046854a974f09b82 | 35.844961 | 121 | 0.478224 | 5.376697 | false | false | false | false |
bokeh/bokeh | src/bokeh/models/callbacks.py | 1 | 5629 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | ad55389059595709a3ee3ea062f2081b | 32.706587 | 133 | 0.504708 | 4.882047 | false | false | false | false |
bokeh/bokeh | examples/server/app/clustering/main.py | 1 | 6278 | ''' A `k-nearest neighbors`_ (KNN) chart using datasets from scikit-learn. This
example demonstrates solving both classification and regression problems.
.. note::
This example needs the scikit-learn package to run.
.. _k-nearest neighbors: https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm
'''
import n... | bsd-3-clause | 56224b85611a9af757f9771061ff0d60 | 30.707071 | 84 | 0.601147 | 4.024359 | false | false | false | false |
bokeh/bokeh | tests/unit/bokeh/util/test_hex.py | 1 | 3875 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | f2a79eb8e1a364c91846be3ea4f544b5 | 33.90991 | 78 | 0.349677 | 3.378378 | false | true | false | false |
bokeh/bokeh | examples/reference/models/checkbox_button_server.py | 1 | 1529 | ## Bokeh server for checkbox button group
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import CategoricalColorMapper, CheckboxButtonGroup, ColumnDataSource
from bokeh.palettes import RdBu3
from bokeh.plotting import figure
x=[3,4,6,12,10,1]
y=[7,1,3,4,1,6]
z=['red','red','red','blue','b... | bsd-3-clause | 009c8b52058a0f3f7ec58790f2515aa1 | 32.977778 | 101 | 0.711576 | 3.288172 | false | false | false | false |
bokeh/bokeh | examples/models/sliders.py | 1 | 2741 | '''Demonstrates the use of many Bokeh sliders with examples such as a numerical slider, a disabled slider, a date picker,
and a color picker.
.. bokeh-example-metadata::
:apis: bokeh.models.Column, bokeh.models.CustomJS, bokeh.models.DateRangeSlider, bokeh.models.DateSlider, bokeh.models.Div, bokeh.models.RangeSli... | bsd-3-clause | e42e9bc8824d04ee160309feb1b193f5 | 34.141026 | 264 | 0.657059 | 3.150575 | false | false | false | false |
bokeh/bokeh | tests/unit/bokeh/models/test_callbacks__models.py | 1 | 2139 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 11f5c6726e1e485145e6e2d0f8f44da8 | 34.65 | 78 | 0.275362 | 7.350515 | false | true | false | false |
bokeh/bokeh | examples/topics/graph/interaction_nodeslinkededges.py | 1 | 1283 | import networkx as nx
from bokeh.models import (BoxSelectTool, Circle, HoverTool, MultiLine,
NodesAndLinkedEdges, Plot, Range1d, TapTool)
from bokeh.palettes import Spectral4
from bokeh.plotting import from_networkx, show
G = nx.karate_club_graph()
plot = Plot(width=400, height=400,
... | bsd-3-clause | c2bde51f2e7358786e8d0ab1f9a54223 | 40.387097 | 98 | 0.755261 | 2.942661 | false | false | true | false |
bokeh/bokeh | src/bokeh/models/filters.py | 1 | 8487 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | b2ffed5e75fbe53b808d8540ce8987bc | 32.812749 | 107 | 0.537881 | 4.855263 | false | false | false | false |
bokeh/bokeh | examples/advanced/extensions/tool.py | 1 | 2169 | from bokeh.core.properties import Instance
from bokeh.models import ColumnDataSource, Tool
from bokeh.plotting import figure, show
from bokeh.util.compiler import TypeScript
CODE = """
import {GestureTool, GestureToolView} from "models/tools/gestures/gesture_tool"
import {ColumnDataSource} from "models/sources/column_... | bsd-3-clause | da6776ba87189dfaf5c0437717b225c2 | 23.931034 | 79 | 0.680037 | 3.266566 | false | false | false | false |
bokeh/bokeh | src/bokeh/sampledata/daylight.py | 1 | 2648 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | b1f27b7faec06b662595c9b07c75eaea | 31.691358 | 103 | 0.36216 | 5.471074 | false | false | false | false |
bokeh/bokeh | examples/server/api/flask_gunicorn_embed.py | 1 | 2551 | import asyncio
from threading import Thread
from flask import Flask, render_template
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
from bokeh.application import Application
from bokeh.application.handlers import FunctionHandler
from bokeh.embed import server_document
from bokeh.layouts i... | bsd-3-clause | 7af6bb896f949cddaff89545c70e77e4 | 31.291139 | 96 | 0.704822 | 3.598025 | false | false | false | false |
bokeh/bokeh | tests/conftest.py | 1 | 1759 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 60f976418b420bf5a52880ac8f70e1af | 34.18 | 142 | 0.630472 | 4.081206 | false | true | false | false |
bokeh/bokeh | src/bokeh/client/connection.py | 1 | 16222 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | ef171acb786da0cad0b451c917a24d9d | 37.169412 | 139 | 0.555912 | 4.73635 | false | false | false | false |
bokeh/bokeh | examples/server/app/gapminder/main.py | 1 | 2885 | ''' A gapminder chart using a population, life expectancy, and fertility dataset.
This example shows the data visualization capability of Bokeh to recreate charts.
'''
import pandas as pd
from bokeh.io import curdoc
from bokeh.layouts import layout
from bokeh.models import (Button, CategoricalColorMapper, ColumnDataS... | bsd-3-clause | 829aea602bfbb70c74fa94adf9574e68 | 29.913978 | 102 | 0.680348 | 3.197998 | false | false | false | false |
bokeh/bokeh | src/bokeh/sphinxext/bokeh_sitemap.py | 1 | 3792 | # -----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
# -----------------------------------------------------------------... | bsd-3-clause | b56691ce5087da11dd8688f08a687c7b | 31.410256 | 138 | 0.444884 | 5.002639 | false | false | false | false |
bokeh/bokeh | src/bokeh/protocol/message.py | 1 | 11833 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 2a8fd597cee12b8cf8f8bddf7ff1bdc0 | 27.651332 | 102 | 0.538156 | 4.819959 | false | false | false | false |
bokeh/bokeh | examples/server/app/image_blur.py | 1 | 1415 | ''' An image blurring example. This sample shows the capability
of Bokeh to transform images to have certain effects.
.. note::
This example needs the scipy package to run.
'''
import numpy as np
import scipy.misc
try:
from numba import njit
except ImportError:
import warnings
warnings.warn("numba is... | bsd-3-clause | f44157d6373d2be36cdd3c10caff4972 | 26.745098 | 81 | 0.650177 | 3.08952 | false | false | false | false |
bokeh/bokeh | examples/topics/timeseries/missing_dates.py | 1 | 1389 | ''' A `Candlestick chart`_ based on stock price data. This example demonstrates
possible technique for handling missing dates.
.. bokeh-example-metadata::
:sampledata: stocks
:apis: bokeh.plotting.figure.segment, bokeh.plotting.figure.vbar
:keywords: candlestick
.. _Candlestick chart: https://en.wikipedia... | bsd-3-clause | 697e42f8afbc36afcf8b2bb0c1f259a3 | 29.866667 | 79 | 0.696184 | 2.899791 | false | false | false | false |
bokeh/bokeh | src/bokeh/sampledata/browsers.py | 1 | 3112 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 7ddcc735d7113614510351dc5622042a | 33.577778 | 97 | 0.404242 | 5.051948 | false | false | false | false |
bokeh/bokeh | src/bokeh/sphinxext/bokeh_directive.py | 1 | 2725 | # -----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
# -----------------------------------------------------------------... | bsd-3-clause | 49d743dc7b11dc97f0b8f4a797dccf34 | 33.0625 | 79 | 0.328073 | 6.293303 | false | false | false | false |
bokeh/bokeh | tests/unit/bokeh/test___init__.py | 1 | 4614 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 1c54b6ade97e737f07ff15d200cfdc6d | 38.435897 | 85 | 0.531643 | 5.267123 | false | true | false | false |
bokeh/bokeh | src/bokeh/core/enums.py | 1 | 16407 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | fa726da78d6bdfa83d94371133464bd4 | 29.66729 | 140 | 0.602609 | 3.94399 | false | false | false | false |
bokeh/bokeh | examples/server/app/server_auth/auth.py | 1 | 2288 | '''
Bokeh server authentication hooks are building blocks that can be used by
experienced users to implement any authentication flow they require. This
example is a "toy" example that is only intended to demonstrate how those
building blocks fit together. It should not be used as-is for "production"
use. Users looking... | bsd-3-clause | 0c1e5b45e1aa282424e05f6716a54c44 | 32.15942 | 80 | 0.658217 | 4.10772 | false | false | false | false |
bokeh/bokeh | src/bokeh/server/auth_provider.py | 1 | 9657 | ''' Provide a hook for supplying authorization mechanisms to a Bokeh server.
'''
#-----------------------------------------------------------------------------
# Boilerplate
#-----------------------------------------------------------------------------
from __future__ import annotations
import logging # isort:skip
l... | bsd-3-clause | f861a8296be9223b59e724cd7163cf71 | 28.622699 | 119 | 0.567257 | 4.631655 | false | false | false | false |
bokeh/bokeh | docs/bokeh/docserver.py | 1 | 2689 | # -----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
# -----------------------------------------------------------------... | bsd-3-clause | 6154199bd9913ef152d83b7ad9bc56dc | 25.106796 | 79 | 0.671253 | 3.766106 | false | false | false | false |
bokeh/bokeh | src/bokeh/util/version.py | 1 | 2944 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 99638c92cdbd1582785472f98bc8ce2f | 34.047619 | 78 | 0.388587 | 5.995927 | false | false | false | false |
bokeh/bokeh | src/bokeh/sphinxext/bokeh_enum.py | 1 | 4423 | # -----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
# -----------------------------------------------------------------... | bsd-3-clause | edb9bde6e36579a66a407e74b348345d | 30.147887 | 124 | 0.474791 | 5.173099 | false | false | false | false |
bokeh/bokeh | src/bokeh/__init__.py | 1 | 3755 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 1dd085b7e4d2fe60679652b2128d4694 | 32.828829 | 81 | 0.498269 | 5.74159 | false | false | false | false |
bokeh/bokeh | examples/reference/models/MultiPolygons.py | 1 | 1399 | from bokeh.io import curdoc, show
from bokeh.models import ColumnDataSource, Grid, LinearAxis, MultiPolygons, Plot
xs_dict = [
[ {'exterior': [1, 1, 2, 2], 'holes': [ ]} ],
[ {'exterior': [1, 1, 3], 'holes': [ [1.5, 1.5, 2] ]} ],
[ {'exterior': [2, 2, 4, 4],... | bsd-3-clause | bd9ddd84a76a2bcb653a6df96d295cfd | 33.121951 | 80 | 0.494639 | 2.664762 | false | false | false | false |
bokeh/bokeh | src/bokeh/application/handlers/function.py | 1 | 4966 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 77644a70f9bc48e6933f4260b0bb9752 | 30.630573 | 82 | 0.444825 | 5.701493 | false | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.