hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6eaae7a85946cf4eeb05f5aa07f5f31aa4bf545c | 19,273 | py | Python | yabee_libs/texture_processor.py | Maxwell175/YABEE | 5e105115881455f6c82b78ca230193604500167d | [
"MIT"
] | null | null | null | yabee_libs/texture_processor.py | Maxwell175/YABEE | 5e105115881455f6c82b78ca230193604500167d | [
"MIT"
] | null | null | null | yabee_libs/texture_processor.py | Maxwell175/YABEE | 5e105115881455f6c82b78ca230193604500167d | [
"MIT"
] | null | null | null | """ Part of the YABEE
"""
import bpy
import shutil
if __name__ != '__main__':
from .utils import convertFileNameToPanda, save_image
BAKE_TYPES = {'diffuse': ('TEXTURE', 'MODULATE'),
'normal': ('NORMALS', 'NORMAL'),
'gloss': ('SPEC_INTENSITY', 'GLOSS'),
'glow': ('EMIT', '... | 50.718421 | 121 | 0.43631 |
4af71ea92e05c5ff968833187add92400548ae98 | 29,742 | py | Python | mrpython/typechecking/prog_ast.py | walidsadat/MrPython | 6ccb1cadfe6eebb198a17944e6f860eae94443a0 | [
"PSF-2.0"
] | null | null | null | mrpython/typechecking/prog_ast.py | walidsadat/MrPython | 6ccb1cadfe6eebb198a17944e6f860eae94443a0 | [
"PSF-2.0"
] | null | null | null | mrpython/typechecking/prog_ast.py | walidsadat/MrPython | 6ccb1cadfe6eebb198a17944e6f860eae94443a0 | [
"PSF-2.0"
] | 1 | 2021-05-25T00:07:24.000Z | 2021-05-25T00:07:24.000Z | """The abstract syntax tree of programs."""
import ast
import tokenize
try:
from .type_ast import *
except ImportError:
from type_ast import *
try:
from .type_converter import *
except ImportError:
from type_converter import *
import os.path, sys
main_path = os.path.dirname(os.path.realpath(__file_... | 30.1643 | 128 | 0.579652 |
0ea6039512616fc447d4669b465b0f9399a9c9ef | 889 | py | Python | anaplanapi2/AnaplanConnection.py | response4amit/anaplanapi2 | d0a8efb0217b53081df0464f0d129111640dfc76 | [
"MIT"
] | null | null | null | anaplanapi2/AnaplanConnection.py | response4amit/anaplanapi2 | d0a8efb0217b53081df0464f0d129111640dfc76 | [
"MIT"
] | null | null | null | anaplanapi2/AnaplanConnection.py | response4amit/anaplanapi2 | d0a8efb0217b53081df0464f0d129111640dfc76 | [
"MIT"
] | null | null | null | #===============================================================================
# Created: 22 May 2019
# @author: AP (adapated from Jesse Wilson)
# Description: Class to contain Anaplan connection details required for all API calls
# Input: Authorization header string, workspace ID string, an... | 35.56 | 88 | 0.536558 |
d38f99c75176a528a05fb84d663dc7c91e71ab7b | 603 | py | Python | service/my_handler.py | mt5225/lambda_T | 82f041cda8c64bbcbddfa5b137630d4f19b84d8f | [
"MIT"
] | null | null | null | service/my_handler.py | mt5225/lambda_T | 82f041cda8c64bbcbddfa5b137630d4f19b84d8f | [
"MIT"
] | null | null | null | service/my_handler.py | mt5225/lambda_T | 82f041cda8c64bbcbddfa5b137630d4f19b84d8f | [
"MIT"
] | null | null | null | from http import HTTPStatus
from typing import Any, Dict
from aws_lambda_powertools.logging.logger import Logger
from aws_lambda_powertools.utilities.typing import LambdaContext
logger: Logger = Logger(service='my_service') # JSON output format, service name can be set by environment variable "POWERTOOLS_SERVICE_NAM... | 43.071429 | 142 | 0.774461 |
88f1cc4a53c237c2bae03b1b38b4108df889301c | 1,219 | py | Python | python/snapchecklocal.py | ksator/Junos-verifications-automation-with-Jsnapy | 69ec96ce5e4dd153c9ec7172c3338f48c9039bc7 | [
"MIT"
] | 13 | 2017-02-15T12:42:52.000Z | 2020-10-06T19:19:49.000Z | python/snapchecklocal.py | ksator/Junos-verifications-automation-with-Jsnapy | 69ec96ce5e4dd153c9ec7172c3338f48c9039bc7 | [
"MIT"
] | null | null | null | python/snapchecklocal.py | ksator/Junos-verifications-automation-with-Jsnapy | 69ec96ce5e4dd153c9ec7172c3338f48c9039bc7 | [
"MIT"
] | 4 | 2018-07-02T17:29:04.000Z | 2022-03-22T11:07:46.000Z | # usage of jsnapy python library without pyez.
# performing function similar to --snapcheck with --local in jsnapy command line tool
from jnpr.jsnapy import SnapAdmin
from pprint import pprint
# instanciate the class SnapAdmin
js = SnapAdmin()
# the variable config_file refers to the jsnapy configuration file
config... | 33.861111 | 85 | 0.757998 |
1b79b82f0bd4aa15bac5cb86bafd42b55a080ca8 | 5,421 | py | Python | python/tink/signature/_signature_wrapper.py | Baha-sk/tink | 285f7dd4f50d2870b3f8137291fda2def9212d63 | [
"Apache-2.0"
] | 12,366 | 2017-05-12T11:22:39.000Z | 2022-03-31T13:40:46.000Z | python/tink/signature/_signature_wrapper.py | Baha-sk/tink | 285f7dd4f50d2870b3f8137291fda2def9212d63 | [
"Apache-2.0"
] | 505 | 2017-05-18T20:54:30.000Z | 2022-03-30T19:51:56.000Z | python/tink/signature/_signature_wrapper.py | Baha-sk/tink | 285f7dd4f50d2870b3f8137291fda2def9212d63 | [
"Apache-2.0"
] | 1,179 | 2017-05-12T11:25:34.000Z | 2022-03-31T14:31:15.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 35.664474 | 80 | 0.739531 |
91b5d0b3c92f2a3dcc1e62b6d8e1fb66c195e14f | 2,197 | py | Python | server.py | Quantum238/bernie-broadcast | 205642ed5c8676d35b59bf178620a769f7369d2c | [
"MIT"
] | null | null | null | server.py | Quantum238/bernie-broadcast | 205642ed5c8676d35b59bf178620a769f7369d2c | [
"MIT"
] | null | null | null | server.py | Quantum238/bernie-broadcast | 205642ed5c8676d35b59bf178620a769f7369d2c | [
"MIT"
] | null | null | null | import web
import csv
import json
from local_settings import *
import requests
from urlparse import parse_qs
import random
urls = (
'/store_token/(.*)', 'store_token',
)
def get_long_token(short_token):
data = {
'grant_type':'fb_exchange_token',
'client_id': APP_ID,
'client_secret': APP_SECRET,
'fb_exchang... | 30.09589 | 92 | 0.741921 |
ea0ddb8ddf98cee0f9881ebab12ed0b7d92f7b27 | 2,350 | py | Python | setup.py | leohearts/volatility3 | f52bd8d74fc47e63ea2611d0171b63dc589d4fdf | [
"Linux-OpenIB"
] | null | null | null | setup.py | leohearts/volatility3 | f52bd8d74fc47e63ea2611d0171b63dc589d4fdf | [
"Linux-OpenIB"
] | null | null | null | setup.py | leohearts/volatility3 | f52bd8d74fc47e63ea2611d0171b63dc589d4fdf | [
"Linux-OpenIB"
] | null | null | null | # This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
#
import setuptools
from volatility3.framework import constants
with open("README.md", "r", encoding="utf-8") as fh:
long_descri... | 48.958333 | 116 | 0.531915 |
faa206c400eb65c9086c5a661782a058173068ee | 1,128 | py | Python | libs/yowsup/yowsup/yowsup/layers/protocol_groups/protocolentities/iq_groups_participants_remove.py | akshitpradhan/TomHack | 837226e7b38de1140c19bc2d478eeb9e379ed1fd | [
"MIT"
] | 22 | 2017-07-14T20:01:17.000Z | 2022-03-08T14:22:39.000Z | libs/yowsup/yowsup/yowsup/layers/protocol_groups/protocolentities/iq_groups_participants_remove.py | akshitpradhan/TomHack | 837226e7b38de1140c19bc2d478eeb9e379ed1fd | [
"MIT"
] | 6 | 2017-07-14T21:03:50.000Z | 2021-06-10T19:08:32.000Z | libs/yowsup/yowsup/yowsup/layers/protocol_groups/protocolentities/iq_groups_participants_remove.py | akshitpradhan/TomHack | 837226e7b38de1140c19bc2d478eeb9e379ed1fd | [
"MIT"
] | 13 | 2017-07-14T20:13:14.000Z | 2020-11-12T08:06:05.000Z | from yowsup.structs import ProtocolEntity, ProtocolTreeNode
from .iq_groups_participants import ParticipantsGroupsIqProtocolEntity
class RemoveParticipantsIqProtocolEntity(ParticipantsGroupsIqProtocolEntity):
'''
<iq type="set" id="{{id}}" xmlns="w:g2", to="{{group_jid}}">
<remove>
<partici... | 43.384615 | 121 | 0.698582 |
53b38499e3cd78f40f6501d3c068ec8bca2557f5 | 2,783 | py | Python | tests/models_tests.py | johnnoone/django-rayures | a839bd134e41175b32715901ffd46d129b255812 | [
"MIT"
] | null | null | null | tests/models_tests.py | johnnoone/django-rayures | a839bd134e41175b32715901ffd46d129b255812 | [
"MIT"
] | null | null | null | tests/models_tests.py | johnnoone/django-rayures | a839bd134e41175b32715901ffd46d129b255812 | [
"MIT"
] | null | null | null | import pytest
from rayures import models
from rayures import factories
@pytest.fixture
def stripe_id():
return "foo"
@pytest.fixture
def stripe_object(stripe_id):
return factories.CustomerFactory(id=stripe_id)
@pytest.mark.django_db
class TestDelete:
def test_is_hashable(self, stripe_object):
... | 31.988506 | 89 | 0.685232 |
49cdeb4007a9670c8fddb00ca2aac11e75d3ffb8 | 293 | py | Python | unit3/spiders/p5_handson/reddit_crawler/pipelines.py | nulearn3296/scrapy-training | 8981dbc33b68bd7246839eee34ca8266d5a0066f | [
"BSD-3-Clause"
] | 182 | 2017-04-05T23:39:22.000Z | 2022-02-22T19:49:52.000Z | unit3/spiders/p5_handson/reddit_crawler/pipelines.py | nulearn3296/scrapy-training | 8981dbc33b68bd7246839eee34ca8266d5a0066f | [
"BSD-3-Clause"
] | 3 | 2017-04-18T07:16:39.000Z | 2019-05-04T22:54:53.000Z | unit3/spiders/p5_handson/reddit_crawler/pipelines.py | nulearn3296/scrapy-training | 8981dbc33b68bd7246839eee34ca8266d5a0066f | [
"BSD-3-Clause"
] | 53 | 2017-04-07T03:25:54.000Z | 2022-02-21T21:51:01.000Z | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
class RedditCrawlerPipeline(object):
def process_item(self, item, spider):
return item
| 24.416667 | 65 | 0.716724 |
9f2eb4e55284abce3b2354485d930a9aa782870d | 10,776 | py | Python | src/torchprune/torchprune/util/datasets/voc.py | dani3l125/torchprune | f2589ec7514bd531ddaa7da3aed6388bb13712d3 | [
"MIT"
] | null | null | null | src/torchprune/torchprune/util/datasets/voc.py | dani3l125/torchprune | f2589ec7514bd531ddaa7da3aed6388bb13712d3 | [
"MIT"
] | null | null | null | src/torchprune/torchprune/util/datasets/voc.py | dani3l125/torchprune | f2589ec7514bd531ddaa7da3aed6388bb13712d3 | [
"MIT"
] | null | null | null | """Pascal VOC 2012 with augmented training data for segmentation."""
from abc import ABC, abstractmethod
import os
import shutil
import tarfile
import warnings
from urllib.request import URLError
from PIL import Image
import imagecorruptions
import numpy as np
import torchvision.datasets
from .download import downloa... | 33.156923 | 79 | 0.618782 |
19f354bfd94a5256901cbe1da8a8b18e68963062 | 4,728 | py | Python | venv/Lib/site-packages/pygame/tests/surflock_test.py | unbun/snake.ai | 0c017357608dc7c06af0ca3ca57d870641461207 | [
"MIT"
] | 3 | 2020-02-01T22:24:24.000Z | 2020-04-20T16:59:08.000Z | venv/Lib/site-packages/pygame/tests/surflock_test.py | unbun/snake.ai | 0c017357608dc7c06af0ca3ca57d870641461207 | [
"MIT"
] | 7 | 2021-06-18T00:10:09.000Z | 2022-03-28T21:10:20.000Z | venv/Lib/site-packages/pygame/tests/surflock_test.py | unbun/snake.ai | 0c017357608dc7c06af0ca3ca57d870641461207 | [
"MIT"
] | 4 | 2021-03-24T07:28:37.000Z | 2021-10-03T14:30:46.000Z | import unittest
import sys
import platform
import pygame
IS_PYPY = "PyPy" == platform.python_implementation()
@unittest.skipIf(IS_PYPY, "pypy skip known failure") # TODO
class SurfaceLockTest(unittest.TestCase):
def test_lock(self):
sf = pygame.Surface((5, 5))
sf.lock()
self.assertEqua... | 32.606897 | 72 | 0.601734 |
b65d3082b6c2f30e9ce483ab4ffc87f427dc32f0 | 3,616 | py | Python | kubernetes/client/models/v1_local_object_reference.py | henrywu2019/python | fb7214144395c05349e70a58ea129576f6b11fc4 | [
"Apache-2.0"
] | 4,417 | 2018-01-13T04:30:48.000Z | 2022-03-31T15:33:59.000Z | kubernetes/client/models/v1_local_object_reference.py | g1f1/python-1 | da6076070b2ada0e048e060943b94358213c414b | [
"Apache-2.0"
] | 1,414 | 2018-01-12T19:31:56.000Z | 2022-03-31T22:01:02.000Z | kubernetes/client/models/v1_local_object_reference.py | g1f1/python-1 | da6076070b2ada0e048e060943b94358213c414b | [
"Apache-2.0"
] | 2,854 | 2018-01-14T08:57:33.000Z | 2022-03-31T01:41:56.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.21
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | 29.398374 | 133 | 0.589878 |
5a8ad54f3167fb9b4c904a7a82a0706491c931ec | 1,430 | py | Python | ros/src/computing/perception/localization/packages/orb_localizer/src/analysis/trajectoryVisualizer.py | chinling/Autoware | fe6a9b05862cd724e5b4e1a430fa5af9f903fce7 | [
"BSD-3-Clause"
] | 9 | 2019-09-02T06:24:54.000Z | 2021-09-21T08:25:54.000Z | ros/src/computing/perception/localization/packages/orb_localizer/src/analysis/trajectoryVisualizer.py | chinling/Autoware | fe6a9b05862cd724e5b4e1a430fa5af9f903fce7 | [
"BSD-3-Clause"
] | null | null | null | ros/src/computing/perception/localization/packages/orb_localizer/src/analysis/trajectoryVisualizer.py | chinling/Autoware | fe6a9b05862cd724e5b4e1a430fa5af9f903fce7 | [
"BSD-3-Clause"
] | 11 | 2019-09-02T06:25:13.000Z | 2022-03-25T00:45:21.000Z | #!/usr/bin/python2.7
import rospy
import orbndt
from nav_msgs.msg import Path
import sys
from geometry_msgs.msg import \
Pose as gPose, \
PoseStamped
from std_msgs.msg import Header
def createGeomPose (pose):
cgPose = gPose()
cgPose.position.x = pose.x
cgPose.position.y = pose.y
cgPose.posit... | 26.481481 | 84 | 0.665734 |
be221e74761bcbc0dae9abf4161168c9ff864bb0 | 73,179 | py | Python | cvpysdk/backupset.py | jack1806/cvpysdk | 6aa0beb426a95de877cd531602234515723ccc94 | [
"Apache-2.0"
] | 1 | 2021-02-27T05:31:38.000Z | 2021-02-27T05:31:38.000Z | cvpysdk/backupset.py | jack1806/cvpysdk | 6aa0beb426a95de877cd531602234515723ccc94 | [
"Apache-2.0"
] | null | null | null | cvpysdk/backupset.py | jack1806/cvpysdk | 6aa0beb426a95de877cd531602234515723ccc94 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# --------------------------------------------------------------------------
# Copyright Commvault Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License a... | 38.760064 | 121 | 0.511253 |
3494f98f276fe0b50e120eb7b0ccd7bfc2b66047 | 881 | py | Python | awx/main/tests/unit/scheduler/test_dag_simple.py | mhurron/awx | 97a7eeb3c86ec4bc4b6303533207150cb1dbac9d | [
"Apache-2.0"
] | 1 | 2019-04-30T17:55:41.000Z | 2019-04-30T17:55:41.000Z | awx/main/tests/unit/scheduler/test_dag_simple.py | mhurron/awx | 97a7eeb3c86ec4bc4b6303533207150cb1dbac9d | [
"Apache-2.0"
] | null | null | null | awx/main/tests/unit/scheduler/test_dag_simple.py | mhurron/awx | 97a7eeb3c86ec4bc4b6303533207150cb1dbac9d | [
"Apache-2.0"
] | 2 | 2019-01-15T16:18:02.000Z | 2019-03-19T20:59:10.000Z | import pytest
from awx.main.scheduler.dag_simple import SimpleDAG
@pytest.fixture
def node_generator():
def fn():
return object()
return fn
@pytest.fixture
def simple_cycle_1(node_generator):
g = SimpleDAG()
nodes = [node_generator() for i in range(4)]
map(lambda n: g.add_node(n), nodes... | 20.488372 | 51 | 0.547106 |
e51d16bf0260c2488a8e9f0015c5dfc16ef6b092 | 2,161 | py | Python | examples/benchmarks/models/vgg16.py | mingxiaoh/chainer_for_rebase | 8c5ba24bf81d648402d388dac1df7591b2557712 | [
"MIT"
] | 1 | 2020-05-28T10:07:25.000Z | 2020-05-28T10:07:25.000Z | examples/benchmarks/models/vgg16.py | mingxiaoh/chainer_for_rebase | 8c5ba24bf81d648402d388dac1df7591b2557712 | [
"MIT"
] | null | null | null | examples/benchmarks/models/vgg16.py | mingxiaoh/chainer_for_rebase | 8c5ba24bf81d648402d388dac1df7591b2557712 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import chainer
import chainer.links as L
import chainer.functions as F
class VGG16(chainer.Chain):
"""
VGGNet
- It takes (224, 224, 3) sized image as imput
"""
insize = 224
def __init__(self):
super(VGG16, self).__init__(
con... | 31.318841 | 66 | 0.551134 |
53c203c74a5e06a7dd22475f67ab42c0bb2d9891 | 4,889 | py | Python | ucsmsdk/mometa/power/PowerPlacement.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/power/PowerPlacement.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/power/PowerPlacement.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for PowerPlacement ManagedObject."""
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class PowerPlacementConsts:
INT_ID_NONE = "none"
PEER_REQ_CONFLICT_FAIL_PLACEMENT = "fail-placement"
... | 61.1125 | 248 | 0.65719 |
9b370d4a0b34d8be36aae2b9f527c91a89b29f59 | 5,184 | py | Python | tf_agents/agents/ddpg/critic_network_test.py | FlorisHoogenboom/agents | 2cd5a61e1838b52012271f1fb8617c29a55279a9 | [
"Apache-2.0"
] | 2 | 2021-10-30T16:57:37.000Z | 2021-11-17T10:21:17.000Z | tf_agents/agents/ddpg/critic_network_test.py | FlorisHoogenboom/agents | 2cd5a61e1838b52012271f1fb8617c29a55279a9 | [
"Apache-2.0"
] | null | null | null | tf_agents/agents/ddpg/critic_network_test.py | FlorisHoogenboom/agents | 2cd5a61e1838b52012271f1fb8617c29a55279a9 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The TF-Agents Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 38.117647 | 79 | 0.734375 |
a93862faa70e5cd83473a0f62c9649e5ad9445ed | 1,858 | py | Python | src/hist/named.py | LovelyBuggies/Nino-Hist | b53305567336b49280c43a700524c0e3ab05997e | [
"MIT"
] | 1 | 2020-03-12T15:55:18.000Z | 2020-03-12T15:55:18.000Z | src/hist/named.py | LovelyBuggies/Nino-Hist | b53305567336b49280c43a700524c0e3ab05997e | [
"MIT"
] | 12 | 2020-03-07T12:09:26.000Z | 2020-05-19T02:01:19.000Z | src/hist/named.py | LovelyBuggies/Nino-hist | b53305567336b49280c43a700524c0e3ab05997e | [
"MIT"
] | null | null | null | from .core import BaseHist
import numpy as np
class NamedHist(BaseHist):
def fill(self, **args):
"""
Insert data into the histogram using names and return a \
NamedHist object. Params must contain the name\/s of the \
axis\/es. Note that this is only the fill metho... | 29.967742 | 70 | 0.465016 |
8fbcc41d3cae6694c829536f841a4997e1bbefd6 | 467 | py | Python | tests/test_database.py | cebel/pymsql_tools | 30cfa7a2b0faf7d3c00df811064273907c3764b8 | [
"Apache-2.0"
] | 1 | 2017-09-29T17:59:35.000Z | 2017-09-29T17:59:35.000Z | tests/test_database.py | cebel/pymsql_tools | 30cfa7a2b0faf7d3c00df811064273907c3764b8 | [
"Apache-2.0"
] | null | null | null | tests/test_database.py | cebel/pymsql_tools | 30cfa7a2b0faf7d3c00df811064273907c3764b8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
import pymysql_tools
host = 'localhost'
user = 'test_user_pymysql_tools'
passwd = 'testpasswd'
database = 'test_pymysql_tools'
class TestDatabases(unittest.TestCase):
def setUp(self):
self.pt = pymysql_tools.connect(host, user, passwd, database)
def test_dat... | 23.35 | 69 | 0.713062 |
a4e0f20307dc339e1647b6c1c39c4be016801862 | 29,454 | py | Python | BooksManager/views.py | CiganOliviu/MyLibrary | 1a4fb68b5cb41bcc423f8b69e09b4f73e2da0be4 | [
"Apache-2.0"
] | null | null | null | BooksManager/views.py | CiganOliviu/MyLibrary | 1a4fb68b5cb41bcc423f8b69e09b4f73e2da0be4 | [
"Apache-2.0"
] | null | null | null | BooksManager/views.py | CiganOliviu/MyLibrary | 1a4fb68b5cb41bcc423f8b69e09b4f73e2da0be4 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.http import Http404
from rest_framework import status
from rest_framework.views import APIView
from rest_framework.response import Response
from .serializers import *
from .models import *
def index(request):
template_name = 'views/index.html'
some_books = Bo... | 27.918483 | 99 | 0.65862 |
7aec5d9b868d3ae0d4c9155f61f26c2a3689bb9a | 3,914 | py | Python | box_utils.py | sephanguyen/face-recognize | 1855f67fc920182a789f5f7a87cd514ebb1b75a4 | [
"Unlicense"
] | null | null | null | box_utils.py | sephanguyen/face-recognize | 1855f67fc920182a789f5f7a87cd514ebb1b75a4 | [
"Unlicense"
] | null | null | null | box_utils.py | sephanguyen/face-recognize | 1855f67fc920182a789f5f7a87cd514ebb1b75a4 | [
"Unlicense"
] | null | null | null | import numpy as np
def area_of(left_top, right_bottom):
"""
Compute the areas of rectangles given two corners.
Args:
left_top (N, 2): left top corner.
right_bottom (N, 2): right bottom corner.
Returns:
area (N): return the area.
"""
hw = np.clip(right_bottom - left_top, ... | 36.924528 | 100 | 0.618038 |
e6993dd0f9a93fd195df6150af1e21d909ae0c46 | 44 | py | Python | topojson/__init__.py | ataalik/topojson.py | 111bfd80fd338ac5d951d8d5ada8ee1471e00a31 | [
"BSD-3-Clause"
] | null | null | null | topojson/__init__.py | ataalik/topojson.py | 111bfd80fd338ac5d951d8d5ada8ee1471e00a31 | [
"BSD-3-Clause"
] | null | null | null | topojson/__init__.py | ataalik/topojson.py | 111bfd80fd338ac5d951d8d5ada8ee1471e00a31 | [
"BSD-3-Clause"
] | null | null | null | from .conversion import convert as topojson
| 22 | 43 | 0.840909 |
e687fa1aab337abb11cf24210d36a27a5cb7f144 | 2,910 | py | Python | pyecharts/charts/basic_charts/radar.py | swuecho/pyecharts | ee659c991bcff9c7279402b0c42e48c3c91d8715 | [
"MIT"
] | 11,032 | 2017-12-21T01:21:38.000Z | 2022-03-31T23:02:38.000Z | pyecharts/charts/basic_charts/radar.py | swuecho/pyecharts | ee659c991bcff9c7279402b0c42e48c3c91d8715 | [
"MIT"
] | 1,687 | 2017-12-21T02:10:47.000Z | 2022-03-31T14:31:45.000Z | pyecharts/charts/basic_charts/radar.py | swuecho/pyecharts | ee659c991bcff9c7279402b0c42e48c3c91d8715 | [
"MIT"
] | 2,528 | 2017-12-21T07:57:52.000Z | 2022-03-30T15:34:51.000Z | from ... import options as opts
from ... import types
from ...charts.chart import Chart
from ...globals import ChartType
class Radar(Chart):
"""
<<< Radar >>>
Radar maps are mainly used to represent multivariable data.
"""
def add_schema(
self,
schema: types.Sequen... | 34.235294 | 83 | 0.541237 |
f5cbbc461ab033f35579c374dafea8f7e32a4490 | 1,209 | py | Python | src/app/board/service.py | ernur-eskermes/useful | 84f9dbce75bed84c0a774d9098ecb0a49577ef4e | [
"BSD-3-Clause"
] | null | null | null | src/app/board/service.py | ernur-eskermes/useful | 84f9dbce75bed84c0a774d9098ecb0a49577ef4e | [
"BSD-3-Clause"
] | null | null | null | src/app/board/service.py | ernur-eskermes/useful | 84f9dbce75bed84c0a774d9098ecb0a49577ef4e | [
"BSD-3-Clause"
] | null | null | null | from src.app.base.service_base import BaseService
from . import schemas
from .models import (
Category,
Toolkit,
Project,
Task,
CommentTask
)
class CategoryService(BaseService):
model = Category
create_schema = schemas.CreateCategory
update_schema = schemas.CreateCategory
get_schem... | 23.25 | 49 | 0.759305 |
4cc6b48c250066ebaaec7f20dd5e5a3f176eefe5 | 97,933 | py | Python | pysnmp/DES3028G-L2MGMT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/DES3028G-L2MGMT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/DES3028G-L2MGMT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module DES3028G-L2MGMT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DES3028G-L2MGMT-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:24:49 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default... | 147.711916 | 12,679 | 0.767984 |
f357b096cbced66ac013badc2bd793e840c0413f | 1,211 | py | Python | students/k3342/laboratory_works/Koshkareva_Maria/laboratory_work_2-3/my_project/my_project/urls.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 10 | 2020-03-20T09:06:12.000Z | 2021-07-27T13:06:02.000Z | students/k3342/laboratory_works/Koshkareva_Maria/laboratory_work_2-3/my_project/my_project/urls.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 134 | 2020-03-23T09:47:48.000Z | 2022-03-12T01:05:19.000Z | students/k3342/laboratory_works/Koshkareva_Maria/laboratory_work_2-3/my_project/my_project/urls.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 71 | 2020-03-20T12:45:56.000Z | 2021-10-31T19:22:25.000Z | """my_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-ba... | 36.69697 | 81 | 0.702725 |
ccf4cc9cb0922738e392d0153c1943bb124b4b94 | 2,321 | py | Python | aldryn_mailchimp/cms_plugins.py | fredd4/aldryn-mailchimp | b51b4c39fe842ed3f5a03d90f7fbb59ba6775eb3 | [
"BSD-3-Clause"
] | null | null | null | aldryn_mailchimp/cms_plugins.py | fredd4/aldryn-mailchimp | b51b4c39fe842ed3f5a03d90f7fbb59ba6775eb3 | [
"BSD-3-Clause"
] | null | null | null | aldryn_mailchimp/cms_plugins.py | fredd4/aldryn-mailchimp | b51b4c39fe842ed3f5a03d90f7fbb59ba6775eb3 | [
"BSD-3-Clause"
] | 1 | 2019-02-27T21:58:14.000Z | 2019-02-27T21:58:14.000Z | # -*- coding: utf-8 -*-
from django.conf.urls import url
from django.views.decorators.cache import never_cache
from django.utils.translation import ugettext_lazy as _
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from .views import SubscriptionView
from .models import Campaign, Sub... | 32.236111 | 96 | 0.7109 |
1372962b1f4872a8b7134f47285f15f46f762799 | 506 | py | Python | selenium_extras/additional_exceptions.py | allenjhuang/otl_timecard | 474e26e6ee561d795245462f640504bc112f3e00 | [
"MIT"
] | null | null | null | selenium_extras/additional_exceptions.py | allenjhuang/otl_timecard | 474e26e6ee561d795245462f640504bc112f3e00 | [
"MIT"
] | null | null | null | selenium_extras/additional_exceptions.py | allenjhuang/otl_timecard | 474e26e6ee561d795245462f640504bc112f3e00 | [
"MIT"
] | null | null | null | class Error(Exception):
"""Base class for exceptions within this module."""
pass
class BrowserNotExpected(Error):
"""Raised when an unexpected browser string is passed."""
pass
class IncorrectLoginDetails(Error):
"""Raised when failed to pass Oracle Single Sign On."""
pass
class MaxTriesRe... | 22 | 64 | 0.6917 |
eb384f9232cc8e8cb6e29a0becdd5deaa0ae54f6 | 50,779 | py | Python | steam/protobufs/steammessages_credentials_pb2.py | tjensen/steam | 061ca33842c9ec5aa7c0866d20cbeed0759d5ea5 | [
"MIT"
] | 1 | 2020-01-04T13:22:51.000Z | 2020-01-04T13:22:51.000Z | steam/protobufs/steammessages_credentials_pb2.py | tjensen/steam | 061ca33842c9ec5aa7c0866d20cbeed0759d5ea5 | [
"MIT"
] | null | null | null | steam/protobufs/steammessages_credentials_pb2.py | tjensen/steam | 061ca33842c9ec5aa7c0866d20cbeed0759d5ea5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: steammessages_credentials.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from g... | 49.395914 | 5,538 | 0.79653 |
ae602e9181bb97747afc7446c5bb9f458a004e17 | 5,673 | py | Python | art/attacks/inference/attribute_inference/white_box_lifestyle_decision_tree.py | meghana-sesetti/adversarial-robustness-toolbox | 6a5ce9e4142734ad9004e5c093ef8fa754ea6b39 | [
"MIT"
] | 1 | 2020-12-26T10:02:05.000Z | 2020-12-26T10:02:05.000Z | art/attacks/inference/attribute_inference/white_box_lifestyle_decision_tree.py | Tikquuss/adversarial-robustness-toolbox | 62ffe7c951d8a60d49a9ea6ac7b04aa4432a3fb7 | [
"MIT"
] | 33 | 2021-01-18T08:30:34.000Z | 2022-03-11T07:05:13.000Z | art/attacks/inference/attribute_inference/white_box_lifestyle_decision_tree.py | Tikquuss/adversarial-robustness-toolbox | 62ffe7c951d8a60d49a9ea6ac7b04aa4432a3fb7 | [
"MIT"
] | 1 | 2020-09-28T12:58:01.000Z | 2020-09-28T12:58:01.000Z | # MIT License
#
# Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2020
#
# 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
# r... | 42.654135 | 120 | 0.669663 |
7dce5fda22a0238adeb3ee59d801406c033bd72a | 534 | py | Python | bluebottle/projects/migrations/0032_default_task_manager.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 10 | 2015-05-28T18:26:40.000Z | 2021-09-06T10:07:03.000Z | bluebottle/projects/migrations/0032_default_task_manager.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 762 | 2015-01-15T10:00:59.000Z | 2022-03-31T15:35:14.000Z | bluebottle/projects/migrations/0032_default_task_manager.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 9 | 2015-02-20T13:19:30.000Z | 2022-03-08T14:09:17.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2017-08-11 06:39
from __future__ import unicode_literals
from django.db import migrations
from django.db.models import F
def set_task_manager_to_owner(apps, schema_editor):
Project = apps.get_model('projects', 'project')
Project.objects.update(task_manag... | 25.428571 | 56 | 0.713483 |
f19293b5ef1dc8b3def6e790d2955e5cf09b710a | 606,865 | py | Python | platform/python/MailChecker.py | choznerol/mailchecker | efd315cebe8849186d7b452e8fff427b2ab86bad | [
"MIT"
] | 1,369 | 2015-01-11T19:50:07.000Z | 2022-03-24T13:31:26.000Z | platform/python/MailChecker.py | choznerol/mailchecker | efd315cebe8849186d7b452e8fff427b2ab86bad | [
"MIT"
] | 268 | 2015-04-28T10:07:48.000Z | 2022-03-11T21:46:25.000Z | platform/python/MailChecker.py | choznerol/mailchecker | efd315cebe8849186d7b452e8fff427b2ab86bad | [
"MIT"
] | 270 | 2015-09-27T08:36:17.000Z | 2022-03-29T09:28:04.000Z | import re
import sys
if sys.version_info[0] >= 3:
xrange = range
class MailChecker(object):
blacklist = set(["0-00.usa.cc","0-attorney.com","0-mail.com","00.msk.ru","000777.info","001.igg.biz","0033.pl","0039.cf","0039.ga","0039.gq","0039.ml","007game.ru","00b2bcr51qv59xst2.cf","00b2bcr51qv59xst2.ga","00b2b... | 16,401.756757 | 604,937 | 0.765566 |
f7414c5cdc14bcacced574c16ecc971fff2e715b | 3,152 | py | Python | gameplan2/settings.py | aneesahmed/gameplan2 | 7f7acd9c02c951ee1b25131334199d5a72073b66 | [
"Apache-2.0"
] | null | null | null | gameplan2/settings.py | aneesahmed/gameplan2 | 7f7acd9c02c951ee1b25131334199d5a72073b66 | [
"Apache-2.0"
] | null | null | null | gameplan2/settings.py | aneesahmed/gameplan2 | 7f7acd9c02c951ee1b25131334199d5a72073b66 | [
"Apache-2.0"
] | null | null | null | """
Django settings for gameplan2 project.
Generated by 'django-admin startproject' using Django 1.8.18.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build p... | 25.626016 | 71 | 0.675444 |
25e042130ac93606326ee623f3c23091a6e333d0 | 7,616 | py | Python | examples/pwr_run/checkpointing/throughput/oracle/job31.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | examples/pwr_run/checkpointing/throughput/oracle/job31.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | examples/pwr_run/checkpointing/throughput/oracle/job31.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | """
#Trains a ResNet on the CIFAR10 dataset.
"""
from __future__ import print_function
import keras
from keras.layers import Dense, Conv2D, BatchNormalization, Activation
from keras.layers import AveragePooling2D, Input, Flatten
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint, LearningRa... | 32.686695 | 118 | 0.693015 |
3f67bd4d1aa8be036971d463f1bf230fc87f10fb | 13,378 | py | Python | PCP/pcp_scheduler.py | cgalleguillosm/cp_dispatchers | 51411c7960eb0c8eb2b2521eece95b84e20a2e38 | [
"MIT"
] | null | null | null | PCP/pcp_scheduler.py | cgalleguillosm/cp_dispatchers | 51411c7960eb0c8eb2b2521eece95b84e20a2e38 | [
"MIT"
] | null | null | null | PCP/pcp_scheduler.py | cgalleguillosm/cp_dispatchers | 51411c7960eb0c8eb2b2521eece95b84e20a2e38 | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2019 cgalleguillosm
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,... | 43.435065 | 197 | 0.58372 |
2163c816ed736ef8411920152f96be4a982199fb | 9,213 | py | Python | pytorch3d/renderer/implicit/raymarching.py | Len-Li/pytorch3d | 95029e7a1211904814b3919cf12fe9d1952fb415 | [
"BSD-3-Clause"
] | 1 | 2021-06-30T14:10:26.000Z | 2021-06-30T14:10:26.000Z | pytorch3d/renderer/implicit/raymarching.py | Len-Li/pytorch3d | 95029e7a1211904814b3919cf12fe9d1952fb415 | [
"BSD-3-Clause"
] | null | null | null | pytorch3d/renderer/implicit/raymarching.py | Len-Li/pytorch3d | 95029e7a1211904814b3919cf12fe9d1952fb415 | [
"BSD-3-Clause"
] | 1 | 2021-07-29T12:11:44.000Z | 2021-07-29T12:11:44.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import warnings
from typing import Optional, Tuple, Union
import torch
class EmissionAbsorptionRaymarcher(torch.nn.Module):
"""
Raymarch using the Emission-Absorption (EA) algorithm.
The algorithm independently renders each ray by a... | 40.585903 | 84 | 0.641593 |
0b0d3fec23b8ae522fa0bc441592cba440a2aca4 | 266 | py | Python | giico/quality_control_and_material_testing/doctype/physical_and_chemical_test/physical_and_chemical_test.py | thispl/giico | 14c5631639ab56a586a7962be9871d722c20e205 | [
"MIT"
] | null | null | null | giico/quality_control_and_material_testing/doctype/physical_and_chemical_test/physical_and_chemical_test.py | thispl/giico | 14c5631639ab56a586a7962be9871d722c20e205 | [
"MIT"
] | null | null | null | giico/quality_control_and_material_testing/doctype/physical_and_chemical_test/physical_and_chemical_test.py | thispl/giico | 14c5631639ab56a586a7962be9871d722c20e205 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2019, VHRS and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class PhysicalandChemicalTest(Document):
pass
| 24.181818 | 49 | 0.781955 |
07fa6ef06b43827b7ce75c85da2907ad33c3aab1 | 445 | py | Python | packageopt/services/agents/implementations/lob_agent.py | nspostnov/for-article-optimal-position-liquidation | 857152b0450c39cfcdb3d329e57ed07efe344356 | [
"MIT"
] | null | null | null | packageopt/services/agents/implementations/lob_agent.py | nspostnov/for-article-optimal-position-liquidation | 857152b0450c39cfcdb3d329e57ed07efe344356 | [
"MIT"
] | null | null | null | packageopt/services/agents/implementations/lob_agent.py | nspostnov/for-article-optimal-position-liquidation | 857152b0450c39cfcdb3d329e57ed07efe344356 | [
"MIT"
] | null | null | null | from ..abstract_base_classes.agent import Agent
__all__ = ['LOBAgent']
class LOBAgent(Agent):
def __init__(self, lobrepo, lobsolver):
self._lobrepo = lobrepo
self._lobsolver = lobsolver
def get(self, key):
lob = self._lobrepo.get(key)
if lob is None:
lob = self._... | 22.25 | 48 | 0.604494 |
b7052a18de00b3be13d88b643cf239f3e54d5f30 | 185 | py | Python | Source/Modules/RoleCheck.py | Dmunch04/IndiesBot | 684209cc640cad9fc13dcf8cf05fb4833142ac2a | [
"MIT"
] | 1 | 2019-07-01T10:07:34.000Z | 2019-07-01T10:07:34.000Z | Source/Modules/RoleCheck.py | Dmunch04/IndiesBot | 684209cc640cad9fc13dcf8cf05fb4833142ac2a | [
"MIT"
] | null | null | null | Source/Modules/RoleCheck.py | Dmunch04/IndiesBot | 684209cc640cad9fc13dcf8cf05fb4833142ac2a | [
"MIT"
] | null | null | null | import discord
def CheckRole (_User : discord.Member, _Role):
if _Role in [Role.name.lower () for Role in _User.roles]:
return True
else:
return False
| 20.555556 | 61 | 0.616216 |
c2da1983c3f6555b41ed03ef592b5b50d281eda9 | 1,651 | py | Python | asinstaller/menus.py | ArchStrike/archstrike-installer | 2f271c873794ceb7bb86613af8c1f84323b71ba3 | [
"MIT"
] | 8 | 2016-09-16T10:12:41.000Z | 2021-07-07T21:38:46.000Z | asinstaller/menus.py | ArchStrike/archstrike-installer | 2f271c873794ceb7bb86613af8c1f84323b71ba3 | [
"MIT"
] | 13 | 2016-07-16T22:23:04.000Z | 2020-12-01T01:57:36.000Z | asinstaller/menus.py | ArchStrike/archstrike-installer | 2f271c873794ceb7bb86613af8c1f84323b71ba3 | [
"MIT"
] | 5 | 2017-05-17T18:53:17.000Z | 2019-09-18T21:31:16.000Z | __all__ = ["start", "main", "partition_methods", "filesystems", "base", "locale", "gpus", "wm_de"]
start = {
'1': 'Start Installer',
'99': 'Exit'
}
main = {
'1': 'Checking UEFI Mode',
'2': 'Setting your keymap',
'3': 'Preparing hard drive to install ArchStrike',
'4': 'Partition Drive',
'5'... | 20.134146 | 98 | 0.505754 |
729e3578b55a907a381540bd22458b06d3c5500b | 1,701 | py | Python | app/core/migrations/0001_initial.py | holdmypotion/recipe-app-api | 758a59077aa29475cf70f2cbb102f9924cc24b66 | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | holdmypotion/recipe-app-api | 758a59077aa29475cf70f2cbb102f9924cc24b66 | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | holdmypotion/recipe-app-api | 758a59077aa29475cf70f2cbb102f9924cc24b66 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.3 on 2020-02-23 05:12
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0011_update_proxy_permissions'),
]
operations = [
migrations.CreateModel(
name='User',
f... | 50.029412 | 266 | 0.637272 |
17db636a6379bbd12c0a70be2e0433b5b33e0b0c | 22,052 | py | Python | gs_api_client/swagger/models/storage_backup_schedule_create.py | gridscale/gridscale_api_client_python | 755b8e8a017784a4f5c6b3a577338ff988c41a9a | [
"MIT"
] | 7 | 2019-07-12T13:59:45.000Z | 2021-03-16T08:46:20.000Z | gs_api_client/swagger/models/storage_backup_schedule_create.py | gridscale/gridscale_api_client_python | 755b8e8a017784a4f5c6b3a577338ff988c41a9a | [
"MIT"
] | 13 | 2020-01-23T07:50:29.000Z | 2022-03-21T14:32:40.000Z | gs_api_client/swagger/models/storage_backup_schedule_create.py | gridscale/gridscale_api_client_python | 755b8e8a017784a4f5c6b3a577338ff988c41a9a | [
"MIT"
] | null | null | null | # coding: utf-8
"""
API Specification
# Introduction Welcome to gridscales API documentation. A REST API is a programming interface that allows you to access and send data directly to our systems using HTTPS requests, without the need to use a web GUI. All the functionality you are already familiar with in y... | 82.59176 | 12,787 | 0.696354 |
d4a526d245e3f5666ab11d56a470dd6e1ad39337 | 2,748 | py | Python | mkt/reviewers/tests/test_helpers.py | clouserw/zamboni | c4a568b69c1613f27da41d46328b2975cbdc1c07 | [
"BSD-3-Clause"
] | null | null | null | mkt/reviewers/tests/test_helpers.py | clouserw/zamboni | c4a568b69c1613f27da41d46328b2975cbdc1c07 | [
"BSD-3-Clause"
] | null | null | null | mkt/reviewers/tests/test_helpers.py | clouserw/zamboni | c4a568b69c1613f27da41d46328b2975cbdc1c07 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from nose.tools import eq_
import mkt
import mkt.site.tests
from mkt.site.utils import app_factory, version_factory
from mkt.reviewers import helpers
class TestGetPosition(mkt.site.tests.TestCase):
def setUp(self):
# Add a public, reviewed app for measure. It took 4 days for this... | 34.35 | 77 | 0.61099 |
b2cb0ee4fd580b25f55beb7c3000fa156eed3c8f | 2,591 | py | Python | tests/test.py | redocnib/BitBooleanFlags | 189afe5cb188f26302df7c8c292f804703d9ae78 | [
"MIT"
] | 2 | 2021-03-25T08:44:33.000Z | 2021-04-17T12:49:35.000Z | tests/test.py | redocnib/BitBooleanFlags | 189afe5cb188f26302df7c8c292f804703d9ae78 | [
"MIT"
] | null | null | null | tests/test.py | redocnib/BitBooleanFlags | 189afe5cb188f26302df7c8c292f804703d9ae78 | [
"MIT"
] | null | null | null |
from BitBooleanFlags import BitBooleanFlags
import unittest
class TestBitBooleanFlagsMethods(unittest.TestCase):
def test_initialize(self):
bitBoolenFlags = BitBooleanFlags("create","read","update","delete")
self.assertEqual(type(bitBoolenFlags), BitBooleanFlags)
def test_add_flags(self):
bitB... | 39.257576 | 73 | 0.690467 |
157098d45fcec37ac79f89b1cc190e37da02582f | 386 | py | Python | problems/dp/Solution139.py | akalu/cs-problems-python | 9b1bd8e3932be62135a38a77f955ded9a766b654 | [
"MIT"
] | null | null | null | problems/dp/Solution139.py | akalu/cs-problems-python | 9b1bd8e3932be62135a38a77f955ded9a766b654 | [
"MIT"
] | null | null | null | problems/dp/Solution139.py | akalu/cs-problems-python | 9b1bd8e3932be62135a38a77f955ded9a766b654 | [
"MIT"
] | null | null | null | """
Given a non-empty string s and a dictionary wordDict containing a list of non-empty words,
determine if s can be segmented into a space-separated sequence of one or more dictionary words.
catsanddog
dict = [cat, cats, and, dog ]
catsanddog
/ \
san... | 22.705882 | 99 | 0.57513 |
2b9cc5b2670657b7de573cc8445c423444a262b7 | 1,807 | py | Python | saleor/graphql/payment/schema.py | victor-abz/saleor | f8e2b49703d995d4304d5a690dbe9c83631419d0 | [
"CC-BY-4.0"
] | 1 | 2021-08-23T09:23:43.000Z | 2021-08-23T09:23:43.000Z | saleor/graphql/payment/schema.py | victor-abz/saleor | f8e2b49703d995d4304d5a690dbe9c83631419d0 | [
"CC-BY-4.0"
] | 172 | 2021-05-03T04:34:37.000Z | 2022-03-28T04:41:53.000Z | saleor/graphql/payment/schema.py | victor-abz/saleor | f8e2b49703d995d4304d5a690dbe9c83631419d0 | [
"CC-BY-4.0"
] | 1 | 2021-12-28T18:02:49.000Z | 2021-12-28T18:02:49.000Z | import graphene
from ...core.permissions import OrderPermissions
from ..core.connection import create_connection_slice, filter_connection_queryset
from ..core.fields import FilterConnectionField
from ..core.utils import from_global_id_or_error
from ..decorators import permission_required
from .filters import PaymentFi... | 34.75 | 84 | 0.748201 |
6a20b386ce53b4fb1d1b3950824508c188ae38c6 | 23,153 | py | Python | papermerge/core/models/kvstore.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | null | null | null | papermerge/core/models/kvstore.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | null | null | null | papermerge/core/models/kvstore.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | 1 | 2020-11-17T16:20:05.000Z | 2020-11-17T16:20:05.000Z | import logging
from django.conf import settings
from django.db import models
from django.utils.translation import gettext as _
from .diff import Diff
from papermerge.core.utils import (
date_2int,
money_2int,
number_2int
)
"""
# KVStore / Key Value Store
####
Implementation of metadata associated with ... | 27.828125 | 79 | 0.545588 |
dd336b14756d4808126145181cd6943bb7e21793 | 1,227 | py | Python | script_for_jupyter_notebook/execute_notebook.py | jayant766/MIDAS-IIITD | 9a6085bff579a5846c58bac70264a736ed9da750 | [
"Apache-2.0"
] | 2 | 2021-05-04T11:43:20.000Z | 2021-05-21T18:10:39.000Z | script_for_jupyter_notebook/execute_notebook.py | jayant766/MIDAS-IIITD | 9a6085bff579a5846c58bac70264a736ed9da750 | [
"Apache-2.0"
] | null | null | null | script_for_jupyter_notebook/execute_notebook.py | jayant766/MIDAS-IIITD | 9a6085bff579a5846c58bac70264a736ed9da750 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import glob
if __name__=='__main__':
print('Searching for notebooks in the notebooks directory')
if(os.path.isdir('../notebooks')==False):
print('Notebook Directory not found! Exiting')
exit(0)
notebooks=glob.glob('../notebooks/*.ipynb')
if(len(notebooks)... | 40.9 | 155 | 0.633252 |
77e0839b2f7dbb230d14f0ba0119a5f30bae93ac | 8,807 | py | Python | sdk/python/pulumi_azure_native/network/v20200501/get_flow_log.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20200501/get_flow_log.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20200501/get_flow_log.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 36.849372 | 274 | 0.652436 |
132a13353c9129e9e44e0ccda4a9c4508c09259b | 1,650 | py | Python | apps/cart/cart.py | maxelite1520/multi-vendor-e-commerce | 98dfe5533a7f7ce33ef8e43ecb8669614d7298c5 | [
"MIT"
] | null | null | null | apps/cart/cart.py | maxelite1520/multi-vendor-e-commerce | 98dfe5533a7f7ce33ef8e43ecb8669614d7298c5 | [
"MIT"
] | 1 | 2021-09-01T15:21:10.000Z | 2021-09-01T15:21:10.000Z | apps/cart/cart.py | maxelite1520/multi-vendor-e-commerce | 98dfe5533a7f7ce33ef8e43ecb8669614d7298c5 | [
"MIT"
] | null | null | null | from config.settings.base import CART_SESSION_ID
from apps.products.models import Product
class Cart(object):
def __init__(self, request):
self.session = request.session
cart = self.session.get(CART_SESSION_ID)
if not cart:
cart = {}
self.cart = cart
def __iter__(... | 32.352941 | 91 | 0.602424 |
bde60b27d56d7edad6064cb73b1500d9e5971749 | 2,143 | py | Python | tests/utils.py | BrickSchema/brick-example-server | 2e184dd96ee14b4a4c14189b5bea9989a9befbbf | [
"BSD-3-Clause"
] | 3 | 2021-12-10T17:08:30.000Z | 2022-02-10T04:43:35.000Z | tests/utils.py | BrickSchema/brick-example-server | 2e184dd96ee14b4a4c14189b5bea9989a9befbbf | [
"BSD-3-Clause"
] | 13 | 2021-12-04T02:23:07.000Z | 2022-02-07T23:49:51.000Z | tests/utils.py | BrickSchema/brick-example-server | 2e184dd96ee14b4a4c14189b5bea9989a9befbbf | [
"BSD-3-Clause"
] | 4 | 2021-12-30T21:59:02.000Z | 2022-03-15T16:36:54.000Z | import asyncio
import arrow
import asyncpg
from fastapi_rest_framework.config import settings
from brick_server.minimal.interfaces.graphdb import GraphDB
from brick_server.minimal.models import User
def register_admin(user_id: str) -> User:
users = User.objects(user_id=user_id)
if not users:
user = ... | 26.134146 | 94 | 0.641624 |
e1ff871997f94eae16e135644bc73db37b846480 | 879 | py | Python | rear_camera.py | jbpacker/lolcam | aec2b6cb5cf7894ce27f62f5046e535186afd966 | [
"MIT"
] | null | null | null | rear_camera.py | jbpacker/lolcam | aec2b6cb5cf7894ce27f62f5046e535186afd966 | [
"MIT"
] | null | null | null | rear_camera.py | jbpacker/lolcam | aec2b6cb5cf7894ce27f62f5046e535186afd966 | [
"MIT"
] | null | null | null | from threading import Thread
import time
import logging
import cv2
import numpy as np
from camera import Camera
sleep_rate = 0.2
logging.basicConfig(level=logging.DEBUG, format='[%(levelname)s] (%(threadName)-10s) %(message)s',)
class RearCamera:
def __init__(self, rear_camera):
self.rear_camera = rear_ca... | 30.310345 | 99 | 0.626849 |
31d594a4c9d11961f6c4d324e71d5b6630b36a57 | 3,908 | py | Python | tests/tests.py | lavr/flask-emails | a1a47108ce7d109fe6c32b6f967445e62f7e5ef6 | [
"Apache-2.0"
] | 37 | 2015-03-07T22:49:00.000Z | 2022-03-24T21:03:53.000Z | tests/tests.py | lavr/flask-emails | a1a47108ce7d109fe6c32b6f967445e62f7e5ef6 | [
"Apache-2.0"
] | 10 | 2015-03-01T09:57:06.000Z | 2020-11-04T23:50:38.000Z | tests/tests.py | lavr/flask-emails | a1a47108ce7d109fe6c32b6f967445e62f7e5ef6 | [
"Apache-2.0"
] | 9 | 2016-04-20T14:03:11.000Z | 2019-10-03T11:25:06.000Z | # encoding: utf-8
from nose.plugins.skip import Skip, SkipTest
import string
import random
from flask import Flask
import emails
from flask_emails.config import EmailsConfig
import flask_emails
SAMPLE_MESSAGE = {'html': '<p>Test from flask_emails',
'mail_from': 's@lavr.me',
'mail_t... | 33.982609 | 97 | 0.652764 |
96f6353263b343fb93fe95f6a1715aa2e836f04d | 5,076 | py | Python | Chapter03/mysite/blog/views.py | auvipy/Django-4-by-example | ebe7ea0ac6998c03fe9d0f902655753297672d57 | [
"MIT"
] | 1 | 2022-02-08T09:43:23.000Z | 2022-02-08T09:43:23.000Z | Chapter03/mysite/blog/views.py | prathmesh-jagtap/Django-4-by-example | 8a9418f746117c1637db0900182e8f4454cdff5e | [
"MIT"
] | null | null | null | Chapter03/mysite/blog/views.py | prathmesh-jagtap/Django-4-by-example | 8a9418f746117c1637db0900182e8f4454cdff5e | [
"MIT"
] | null | null | null | from django.shortcuts import render, get_object_or_404, redirect
from .models import Post, Comment
from django.core.paginator import Paginator, EmptyPage, \
PageNotAnInteger
from django.views.generic import ListView
from django.contrib.postgres.search import SearchVector, \
... | 35.496503 | 74 | 0.566982 |
5fdd6febf15a7014acb48ee881a9c57dc5b25f16 | 2,402 | py | Python | setup.py | viotemp1/botorch | d8cbef9d645b40653d65a91309fd49d8ab883c89 | [
"MIT"
] | null | null | null | setup.py | viotemp1/botorch | d8cbef9d645b40653d65a91309fd49d8ab883c89 | [
"MIT"
] | null | null | null | setup.py | viotemp1/botorch | d8cbef9d645b40653d65a91309fd49d8ab883c89 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import sys
from setuptools import find_packages, setup
REQUIRED_MAJOR = 3
REQUIRED_MINOR = 6
# Check for ... | 27.930233 | 88 | 0.643214 |
d9387f14bca16f709d22226d1fd80db5c1a51f3b | 12,403 | py | Python | quetz/cli.py | wolfv/quetz | 9865d3a157aadaf9778091147c45a57dd5ef2ca7 | [
"BSD-3-Clause"
] | null | null | null | quetz/cli.py | wolfv/quetz | 9865d3a157aadaf9778091147c45a57dd5ef2ca7 | [
"BSD-3-Clause"
] | null | null | null | quetz/cli.py | wolfv/quetz | 9865d3a157aadaf9778091147c45a57dd5ef2ca7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2020 QuantStack
# Distributed under the terms of the Modified BSD License.
import json
import os
import random
import shutil
import uuid
from enum import Enum
from pathlib import Path
from typing import Dict, NoReturn
import typer
import uvicorn
from sqlalchemy.orm.session import Session
from quetz.confi... | 29.183529 | 88 | 0.607272 |
cf87d3ab33d87aa3564c074bf768528168a4c4e2 | 7,774 | py | Python | doc/conf.py | bioidiap/bob.db.cbsr_nir_vis_2 | 4b50b9ae3cbbc34dec7cf3336ce8ee0f33a56d64 | [
"BSD-3-Clause"
] | null | null | null | doc/conf.py | bioidiap/bob.db.cbsr_nir_vis_2 | 4b50b9ae3cbbc34dec7cf3336ce8ee0f33a56d64 | [
"BSD-3-Clause"
] | null | null | null | doc/conf.py | bioidiap/bob.db.cbsr_nir_vis_2 | 4b50b9ae3cbbc34dec7cf3336ce8ee0f33a56d64 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
import os
import sys
import glob
import pkg_resources
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = '1.3'
# Add any Sphinx extension module ... | 30.849206 | 80 | 0.719707 |
3b1f5a990ec463ea93851c37150734690a88949d | 11,621 | py | Python | app/database/board.py | MU-Software/bca_backend | 282db3908ee0b2c95c5e6bd6d6458077e941f343 | [
"MIT"
] | 6 | 2021-08-20T01:35:01.000Z | 2021-12-22T18:23:17.000Z | app/database/board.py | MU-Software/bca_backend | 282db3908ee0b2c95c5e6bd6d6458077e941f343 | [
"MIT"
] | null | null | null | app/database/board.py | MU-Software/bca_backend | 282db3908ee0b2c95c5e6bd6d6458077e941f343 | [
"MIT"
] | null | null | null | import app.database as db_module
import app.database.user as user_module
db = db_module.db
class Board(db_module.DefaultModelMixin, db.Model):
__tablename__ = 'TB_BOARD'
uuid = db.Column(db_module.PrimaryKeyType,
db.Sequence('SQ_Board_UUID'),
primary_key=True,
... | 45.932806 | 109 | 0.552878 |
60002382584322921dfb67642902b848531ff987 | 72 | py | Python | bronze5/2338_long_digit_count.py | LeeBumSeok/Practice_algorithm | c7a9bd760879af9326de3ad472d85a75e80657d1 | [
"MIT"
] | 2 | 2020-12-23T06:02:07.000Z | 2021-10-30T19:53:08.000Z | bronze5/2338_long_digit_count.py | LeeBumSeok/Practice_algorithm | c7a9bd760879af9326de3ad472d85a75e80657d1 | [
"MIT"
] | null | null | null | bronze5/2338_long_digit_count.py | LeeBumSeok/Practice_algorithm | c7a9bd760879af9326de3ad472d85a75e80657d1 | [
"MIT"
] | null | null | null | A = int(input())
B = int(input())
print(A + B, A - B, A * B, sep="\n")
| 14.4 | 36 | 0.458333 |
4fae321c006bc25d05c1a3488366d5f4e8d6fa51 | 3,623 | py | Python | naive-bayes/naive_bayes/naive_bayes_classifier.py | luisblazquezm/mii2-classification-models-study | 78b1bbb4985591b3d110787f40d2c720abdc2c64 | [
"MIT"
] | null | null | null | naive-bayes/naive_bayes/naive_bayes_classifier.py | luisblazquezm/mii2-classification-models-study | 78b1bbb4985591b3d110787f40d2c720abdc2c64 | [
"MIT"
] | null | null | null | naive-bayes/naive_bayes/naive_bayes_classifier.py | luisblazquezm/mii2-classification-models-study | 78b1bbb4985591b3d110787f40d2c720abdc2c64 | [
"MIT"
] | null | null | null | #!usr/bin/python3
# Copyright 2021 Luis Blazquez Miñambres (@luisblazquezm) and Francisco Pinto-Santos (@gandalfran)
# See LICENSE for details.
# Author: @luisblazquezm and @gandalfran
from math import sqrt, exp, pi
from random import seed, randrange
class NaiveBayesClassifier:
"""
This is a class
"""
def spl... | 31.504348 | 98 | 0.727298 |
c5fde14ad4bdbeed7f7c9009a75496eb9774e478 | 6,404 | py | Python | pilot/util/workernode.py | anisyonk/pilot2 | f06cbf903e3f235d6fc504b54faa02006b95256d | [
"Apache-2.0"
] | null | null | null | pilot/util/workernode.py | anisyonk/pilot2 | f06cbf903e3f235d6fc504b54faa02006b95256d | [
"Apache-2.0"
] | null | null | null | pilot/util/workernode.py | anisyonk/pilot2 | f06cbf903e3f235d6fc504b54faa02006b95256d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# 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
#
# Authors:
# - Paul Nilsson, paul.nilsson@cern.ch, 2017
import os
import re... | 27.965066 | 121 | 0.606027 |
0ef0636bc8b7cfdae843790cbcfee047b2855885 | 11,407 | py | Python | dev/Gems/CloudGemFramework/v1/AWS/common-code/ServiceClient_Python/test/test_unit_service_client_path.py | BadDevCode/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | dev/Gems/CloudGemFramework/v1/AWS/common-code/ServiceClient_Python/test/test_unit_service_client_path.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | dev/Gems/CloudGemFramework/v1/AWS/common-code/ServiceClient_Python/test/test_unit_service_client_path.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | #
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or th... | 42.883459 | 138 | 0.66617 |
c7cf4572796e450a8f746047c3e5a68a3e50895c | 473 | py | Python | code/docker/flask-redis/app.py | jiahao-yang/docker-k8s-lab | 881918daf72dfd7cb0736cb3fb52475381026430 | [
"Apache-2.0"
] | null | null | null | code/docker/flask-redis/app.py | jiahao-yang/docker-k8s-lab | 881918daf72dfd7cb0736cb3fb52475381026430 | [
"Apache-2.0"
] | null | null | null | code/docker/flask-redis/app.py | jiahao-yang/docker-k8s-lab | 881918daf72dfd7cb0736cb3fb52475381026430 | [
"Apache-2.0"
] | null | null | null | from flask import Flask
from redis import Redis
import os
import socket
app = Flask(__name__)
#redis = Redis(host=os.environ.get('REDIS_HOST', '127.0.0.1'), port=6379)
redis = Redis(host='redis', port=6379)
@app.route('/')
def hello():
redis.incr('hits')
return 'Hello Container World! I have been seen %s ti... | 23.65 | 129 | 0.678647 |
6f18b815055afa35bdac1c60851da423c3d74c20 | 5,405 | py | Python | tfx/components/example_gen/base_example_gen_executor_test.py | HassanDayoub/tfx | dc9221abbb8dad991d1ae22fb91876da1290efae | [
"Apache-2.0"
] | 2 | 2019-07-08T20:56:13.000Z | 2020-08-04T17:07:26.000Z | tfx/components/example_gen/base_example_gen_executor_test.py | HassanDayoub/tfx | dc9221abbb8dad991d1ae22fb91876da1290efae | [
"Apache-2.0"
] | null | null | null | tfx/components/example_gen/base_example_gen_executor_test.py | HassanDayoub/tfx | dc9221abbb8dad991d1ae22fb91876da1290efae | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC. 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... | 36.52027 | 79 | 0.666605 |
384c6e15ae17d196c583e5c6d8bec541379c5576 | 497 | py | Python | code/run_js/requests_html_run_js.py | napoler/run_crawler_test | 25056efc461354644abc29c27f48a23207640faf | [
"Apache-2.0"
] | null | null | null | code/run_js/requests_html_run_js.py | napoler/run_crawler_test | 25056efc461354644abc29c27f48a23207640faf | [
"Apache-2.0"
] | null | null | null | code/run_js/requests_html_run_js.py | napoler/run_crawler_test | 25056efc461354644abc29c27f48a23207640faf | [
"Apache-2.0"
] | null | null | null | from requests_html import HTMLSession
from requests_html import HTML
#session = HTMLSession()
doc = """<a href='https://httpbin.org'>"""
html = HTML(html=doc)
script = """
() => {
return {
width: document.documentElement.clientWidth,
height: document.documentElement.... | 26.157895 | 62 | 0.587525 |
46c253e845dc40efb3b7901287bd9ce00ac0bd95 | 45,582 | py | Python | sdk/python/pulumi_checkly/outputs.py | stack72/pulumi-checkly-1 | d63bdf5ea95b54a69a9ce07f42210bf3483491ba | [
"MIT"
] | 5 | 2022-02-16T01:28:17.000Z | 2022-02-16T14:56:56.000Z | sdk/python/pulumi_checkly/outputs.py | checkly/pulumi-chekly | 0e4b7f0e20e857765876fce2661e49bc8f197a20 | [
"MIT"
] | null | null | null | sdk/python/pulumi_checkly/outputs.py | checkly/pulumi-chekly | 0e4b7f0e20e857765876fce2661e49bc8f197a20 | [
"MIT"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... | 35.280186 | 235 | 0.620486 |
7dfa9317b61e8b492dde417cf8515ccbfae9a142 | 75,949 | py | Python | src/borg/repository.py | yzr95924/borg | fcf62872fb0028a43d103e9dc322642fe80334e9 | [
"BSD-3-Clause"
] | null | null | null | src/borg/repository.py | yzr95924/borg | fcf62872fb0028a43d103e9dc322642fe80334e9 | [
"BSD-3-Clause"
] | null | null | null | src/borg/repository.py | yzr95924/borg | fcf62872fb0028a43d103e9dc322642fe80334e9 | [
"BSD-3-Clause"
] | null | null | null | import errno
import mmap
import os
import shutil
import stat
import struct
import time
from binascii import hexlify, unhexlify
from collections import defaultdict
from configparser import ConfigParser
from datetime import datetime
from functools import partial
from itertools import islice
from .constants import * # N... | 47.676711 | 135 | 0.603313 |
ed331ef98cc8bd254fdcfbbe21ffcce11a1a5497 | 7,378 | py | Python | ms5837/ms5837.py | rgov/ms5837-python | ff2de6476c8f7e6fe9b3d8182e34b0f3dd2e65c8 | [
"MIT"
] | null | null | null | ms5837/ms5837.py | rgov/ms5837-python | ff2de6476c8f7e6fe9b3d8182e34b0f3dd2e65c8 | [
"MIT"
] | null | null | null | ms5837/ms5837.py | rgov/ms5837-python | ff2de6476c8f7e6fe9b3d8182e34b0f3dd2e65c8 | [
"MIT"
] | 1 | 2021-03-09T21:22:48.000Z | 2021-03-09T21:22:48.000Z | try:
import smbus
except:
print('Try sudo apt-get install python-smbus')
from time import sleep
# Models
MODEL_02BA = 0
MODEL_30BA = 1
# Oversampling options
OSR_256 = 0
OSR_512 = 1
OSR_1024 = 2
OSR_2048 = 3
OSR_4096 = 4
OSR_8192 = 5
# kg/m^3 convenience
DENSITY_FRESHWATER = 997
DENSITY_SALTWATER = 10... | 31.665236 | 118 | 0.552047 |
58ff621fe8aeb7bf2776ffdbe0de2b4288693d4c | 889 | py | Python | amime/modules/anime/MV-MENU.py | Myudi422/ccgnime_req | a0f7596ba101204539b4120dffa08912b6560efe | [
"MIT"
] | null | null | null | amime/modules/anime/MV-MENU.py | Myudi422/ccgnime_req | a0f7596ba101204539b4120dffa08912b6560efe | [
"MIT"
] | null | null | null | amime/modules/anime/MV-MENU.py | Myudi422/ccgnime_req | a0f7596ba101204539b4120dffa08912b6560efe | [
"MIT"
] | null | null | null | from typing import Union
from pyrogram import filters
from pyrogram.types import CallbackQuery, Message
from pyromod.helpers import ikb
from amime.amime import Amime
@Amime.on_message(filters.cmd(r"mv_menu$") & filters.private)
@Amime.on_callback_query(filters.regex(r"^mv_menu$"))
async def anime_menu(bot: Amime, u... | 28.677419 | 71 | 0.67829 |
e95d7e68486b9f42c2fb4e0c982880c1ba5a82b4 | 5,826 | py | Python | friendly/editors_helpers.py | MrGreenTea/friendly | 091f6af1d3c2be8fee078e52db6e16074d5518e5 | [
"MIT"
] | null | null | null | friendly/editors_helpers.py | MrGreenTea/friendly | 091f6af1d3c2be8fee078e52db6e16074d5518e5 | [
"MIT"
] | null | null | null | friendly/editors_helpers.py | MrGreenTea/friendly | 091f6af1d3c2be8fee078e52db6e16074d5518e5 | [
"MIT"
] | null | null | null | """
editors_helpers.py
------------------
The functions in this module have been created so that user editors/IDEs
could use Friendly without having to change the content of
their own programs.
None of these are part of the public API.
If you make use of any other function here, please file an issue so
it can be det... | 34.473373 | 97 | 0.682973 |
e0eef79a022ca764d80e3fdcda2307e92a15b4cf | 952 | py | Python | nova/db/sqlalchemy/api_migrations/migrate_repo/versions/052_request_specs_spec_mediumtext.py | lixiaoy1/nova | 357b8b38e88300948bb2e07d1bbaabd1e9d7b60e | [
"Apache-2.0"
] | 2 | 2021-10-11T04:56:25.000Z | 2022-02-16T08:49:29.000Z | nova/db/sqlalchemy/api_migrations/migrate_repo/versions/052_request_specs_spec_mediumtext.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 132 | 2017-03-27T11:31:52.000Z | 2022-03-30T08:45:02.000Z | nova/db/sqlalchemy/api_migrations/migrate_repo/versions/052_request_specs_spec_mediumtext.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 8 | 2017-03-27T07:50:38.000Z | 2020-02-14T16:55:56.000Z | # 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... | 36.615385 | 78 | 0.736345 |
40a0c02ad22b941af8159f65f284f536c99461a2 | 3,889 | py | Python | ink2canvas/GradientHelper.py | greipfrut/pdftohtml5canvas | bd4b829a5fd02b503e6b32c268b265daa92e92e5 | [
"MIT"
] | 4 | 2016-05-06T21:29:39.000Z | 2020-02-25T08:47:48.000Z | ink2canvas/GradientHelper.py | letw/pdftohtml5canvas | bd4b829a5fd02b503e6b32c268b265daa92e92e5 | [
"MIT"
] | null | null | null | ink2canvas/GradientHelper.py | letw/pdftohtml5canvas | bd4b829a5fd02b503e6b32c268b265daa92e92e5 | [
"MIT"
] | null | null | null | from ink2canvas.lib.simpletransform import parseTransform
class GradientHelper(object):
def __init__(self, abstractShape):
self.abstractShape = abstractShape
def hasGradient(self, key):
style = self.abstractShape.getStyle()
if key in style:
styleParamate... | 43.696629 | 141 | 0.609154 |
2815483a88346999f49d2188da9c1660614b7f04 | 6,264 | py | Python | tests/test_api.py | Parfyonator/exonum-python-client | 1481fa7de0d5ab2b347bea022799edf9536f7792 | [
"Apache-2.0"
] | null | null | null | tests/test_api.py | Parfyonator/exonum-python-client | 1481fa7de0d5ab2b347bea022799edf9536f7792 | [
"Apache-2.0"
] | null | null | null | tests/test_api.py | Parfyonator/exonum-python-client | 1481fa7de0d5ab2b347bea022799edf9536f7792 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=missing-docstring, protected-access
# type: ignore
import unittest
from unittest.mock import patch, Mock
import random
random.seed(0)
from exonum_client.api import Api, PublicApi, PrivateApi, ServiceApi
from .testing_utils import *
class TestApi(unittest.TestCase):
def setUp(self):
se... | 37.73494 | 108 | 0.70977 |
dd7919f1d2a294a72ef82cebb0d69eacac4df8d5 | 6,110 | py | Python | app/config.py | BrightID/brightid-nft-mint-relay | 7c7b467e6a908aba319fc0f648ba7977e372ec11 | [
"0BSD"
] | null | null | null | app/config.py | BrightID/brightid-nft-mint-relay | 7c7b467e6a908aba319fc0f648ba7977e372ec11 | [
"0BSD"
] | null | null | null | app/config.py | BrightID/brightid-nft-mint-relay | 7c7b467e6a908aba319fc0f648ba7977e372ec11 | [
"0BSD"
] | null | null | null | import os
CONTRACT_ABI = '[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"verifier","internalType":"address"},{"type":"bytes32","name":"context","internalType":"bytes32"},{"type":"string","name":"name_","internalType":"string"},{"type":"string","name":"symbol_","internalType":... | 190.9375 | 5,375 | 0.671358 |
af2ccf2ee6897b30ccb269b8f525b6aca992b3dc | 1,803 | py | Python | csw/CurrentState.py | tmtsoftware/csw-python | 7f6bd70aba48f365354d471a2a4b5b8e37640b20 | [
"Apache-2.0"
] | 2 | 2020-03-27T22:05:29.000Z | 2021-05-19T16:16:40.000Z | csw/CurrentState.py | tmtsoftware/csw-python | 7f6bd70aba48f365354d471a2a4b5b8e37640b20 | [
"Apache-2.0"
] | 5 | 2020-10-14T16:45:18.000Z | 2021-07-02T13:23:34.000Z | csw/CurrentState.py | tmtsoftware/csw-python | 7f6bd70aba48f365354d471a2a4b5b8e37640b20 | [
"Apache-2.0"
] | 1 | 2021-03-18T17:50:09.000Z | 2021-03-18T17:50:09.000Z | import traceback
from dataclasses import dataclass
from typing import List
from csw.Parameter import Parameter
from csw.Prefix import Prefix
@dataclass
class CurrentState:
"""
Represents the current state of a python based CSW component.
"""
prefix: Prefix
stateName: str
paramSet: List[Paramet... | 25.757143 | 79 | 0.559623 |
c49d95cd103e4cfe5f2989ff2795ef31d67cf585 | 7,538 | py | Python | ietf/secr/groups/tests.py | unofficial-mirror/ietfdb | ce54adb30dc7299c6eb4d42b9aa9d2c2929c1a81 | [
"BSD-3-Clause"
] | null | null | null | ietf/secr/groups/tests.py | unofficial-mirror/ietfdb | ce54adb30dc7299c6eb4d42b9aa9d2c2929c1a81 | [
"BSD-3-Clause"
] | null | null | null | ietf/secr/groups/tests.py | unofficial-mirror/ietfdb | ce54adb30dc7299c6eb4d42b9aa9d2c2929c1a81 | [
"BSD-3-Clause"
] | null | null | null | # Copyright The IETF Trust 2013-2019, All Rights Reserved
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from django.urls import reverse
from ietf.utils.test_utils import TestCase
from ietf.group.models import Group
from ietf.secr.groups.forms import get_parent_group... | 45.684848 | 106 | 0.595914 |
709df874358a17e7d312f4712cf1308b1606a944 | 1,538 | py | Python | live_graph_5.py | kingslair/MatPlotLib | 66d1accf1a049b901dece69d18edadafbf4b687f | [
"MIT"
] | null | null | null | live_graph_5.py | kingslair/MatPlotLib | 66d1accf1a049b901dece69d18edadafbf4b687f | [
"MIT"
] | null | null | null | live_graph_5.py | kingslair/MatPlotLib | 66d1accf1a049b901dece69d18edadafbf4b687f | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FixedLocator, FormatStrFormatter
import matplotlib, time
class plot3dClass( object ):
def __init__( self, systemSideLength, lowerCutoffLength )... | 36.619048 | 78 | 0.637841 |
dedc1fed201d4d40b3f1bde79387cbfd58256a08 | 162 | py | Python | portfolios/admin.py | layersony/awwwards | 1793dd3ad3c069b8ed73a36973dd071a6bb59b0d | [
"MIT"
] | 1 | 2021-07-19T21:31:38.000Z | 2021-07-19T21:31:38.000Z | portfolios/admin.py | layersony/awwwards | 1793dd3ad3c069b8ed73a36973dd071a6bb59b0d | [
"MIT"
] | null | null | null | portfolios/admin.py | layersony/awwwards | 1793dd3ad3c069b8ed73a36973dd071a6bb59b0d | [
"MIT"
] | null | null | null | from django.contrib import admin
from . import models
admin.site.register(models.Projects)
admin.site.register(models.Profile)
admin.site.register(models.Rate)
| 20.25 | 36 | 0.814815 |
2eaea5f79fd2b5d4784b8953e9f32b6d24ef771b | 5,291 | py | Python | plenum/test/node_catchup/test_catchup_not_triggered_if_another_in_progress.py | ken-ebert/indy-plenum | 7578798df456d06ffe24f488452fab3f1b3f00f1 | [
"Apache-2.0"
] | null | null | null | plenum/test/node_catchup/test_catchup_not_triggered_if_another_in_progress.py | ken-ebert/indy-plenum | 7578798df456d06ffe24f488452fab3f1b3f00f1 | [
"Apache-2.0"
] | null | null | null | plenum/test/node_catchup/test_catchup_not_triggered_if_another_in_progress.py | ken-ebert/indy-plenum | 7578798df456d06ffe24f488452fab3f1b3f00f1 | [
"Apache-2.0"
] | null | null | null | from logging import getLogger
from plenum.common.startable import Mode
from plenum.server.consensus.checkpoint_service import CheckpointService
from plenum.server.node import Node
from plenum.server.replica import Replica
from plenum.test import waits
from plenum.test.checkpoints.conftest import tconf, chkFreqPatched... | 47.666667 | 111 | 0.675865 |
0ebdbf2c0b6f23ccd2cb60106ae1d96e90219d2b | 685 | py | Python | tests/generators/fork_choice/main.py | fredriksvantes/consensus-specs | fff03a96d1a641824fc293a8f76cb110499ca7ab | [
"CC0-1.0"
] | null | null | null | tests/generators/fork_choice/main.py | fredriksvantes/consensus-specs | fff03a96d1a641824fc293a8f76cb110499ca7ab | [
"CC0-1.0"
] | null | null | null | tests/generators/fork_choice/main.py | fredriksvantes/consensus-specs | fff03a96d1a641824fc293a8f76cb110499ca7ab | [
"CC0-1.0"
] | null | null | null | from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators
from eth2spec.test.helpers.constants import PHASE0, ALTAIR, MERGE
if __name__ == "__main__":
phase_0_mods = {key: 'eth2spec.test.phase0.fork_choice.test_' + key for key in [
'get_head',
'on_block',
]}
# No additi... | 31.136364 | 84 | 0.705109 |
56f0c41c923ed6f253f10d532171dfb1e30c05c3 | 259 | py | Python | app/game/urls.py | jacastillol/game-of-drones | e0322bddaaa2c0120397a6e4c2ac4d0c4e2aa7f1 | [
"MIT"
] | null | null | null | app/game/urls.py | jacastillol/game-of-drones | e0322bddaaa2c0120397a6e4c2ac4d0c4e2aa7f1 | [
"MIT"
] | null | null | null | app/game/urls.py | jacastillol/game-of-drones | e0322bddaaa2c0120397a6e4c2ac4d0c4e2aa7f1 | [
"MIT"
] | null | null | null | from django.urls import path, include
from rest_framework.routers import DefaultRouter
from game import views
router = DefaultRouter()
router.register('players', views.PlayerViewSet)
app_name = 'game'
urlpatterns = [
path('', include(router.urls))
]
| 17.266667 | 48 | 0.756757 |
c35c3581d037b8a60abeb54b5f0de431793f024c | 14,229 | py | Python | MetropolisMonteCarlo.py | krishnapitike/nnModel | 874628fcd6051d09cbd883c9ac5bede0c7606735 | [
"MIT"
] | null | null | null | MetropolisMonteCarlo.py | krishnapitike/nnModel | 874628fcd6051d09cbd883c9ac5bede0c7606735 | [
"MIT"
] | null | null | null | MetropolisMonteCarlo.py | krishnapitike/nnModel | 874628fcd6051d09cbd883c9ac5bede0c7606735 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
#!/usr/bin/env python
#from IPython.core.display import display, HTML
#display(HTML("<style>.container { width:100% !important; }</style>"))
##Nearest neighbor model
##needs following files
#1) input file with energy matrix
#2) poscar file
#the following two lines is ... | 41.605263 | 183 | 0.604821 |
7b294b5de1723078688ab987a8e037a098ab211a | 8,949 | py | Python | main.py | jionmezc11/IOSDeviceManager | 983ae864838c8b6835b182f7b883405a54bdb26a | [
"MIT"
] | null | null | null | main.py | jionmezc11/IOSDeviceManager | 983ae864838c8b6835b182f7b883405a54bdb26a | [
"MIT"
] | null | null | null | main.py | jionmezc11/IOSDeviceManager | 983ae864838c8b6835b182f7b883405a54bdb26a | [
"MIT"
] | 1 | 2020-07-30T00:18:56.000Z | 2020-07-30T00:18:56.000Z | from __future__ import print_function
import argparse
import os
import shutil
import subprocess
import tempfile
import time
from collections import defaultdict
from concurrent.futures import ThreadPoolExecutor
from functools import partial
import requests
import tornado.web
from logzero import logger
from tornado imp... | 31.510563 | 76 | 0.562744 |
2fba5496ee38df928922080f5a5d51be77096961 | 73,905 | py | Python | python/ray/worker.py | bharatpn/ray | bac6f3b61e09c0647f0c6dcee18ff642e9958efc | [
"Apache-2.0"
] | null | null | null | python/ray/worker.py | bharatpn/ray | bac6f3b61e09c0647f0c6dcee18ff642e9958efc | [
"Apache-2.0"
] | null | null | null | python/ray/worker.py | bharatpn/ray | bac6f3b61e09c0647f0c6dcee18ff642e9958efc | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from contextlib import contextmanager
import colorama
import atexit
import faulthandler
import hashlib
import inspect
import json
import logging
import os
import redis
import signal
from six.moves import queue
... | 40.854063 | 82 | 0.643894 |
368368d83caba0209734f7fb226f0f6a87c85f35 | 1,574 | py | Python | lib/python/treadmill/spawn/__init__.py | krcooke/treadmill | 613008fee88a150f983ab12d8ef2e118fb77bb51 | [
"Apache-2.0"
] | 133 | 2016-09-15T13:36:12.000Z | 2021-01-18T06:29:13.000Z | lib/python/treadmill/spawn/__init__.py | krcooke/treadmill | 613008fee88a150f983ab12d8ef2e118fb77bb51 | [
"Apache-2.0"
] | 108 | 2016-12-28T23:41:27.000Z | 2020-03-05T21:20:37.000Z | lib/python/treadmill/spawn/__init__.py | krcooke/treadmill | 613008fee88a150f983ab12d8ef2e118fb77bb51 | [
"Apache-2.0"
] | 69 | 2016-09-23T20:38:58.000Z | 2020-11-11T02:31:21.000Z | """Treadmill spawn extension.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
BUCKETS = 256
MAX_PER_BUCKET = 1000
APPS_DIR = 'apps'
SVSCAN_TREE_DIR = os.path.join(APPS_DIR, 'svscan_tree')
JOBS_DIR = os... | 27.614035 | 78 | 0.671537 |
29faba8b5bae9f4c53f95bd305e4434e05d9289e | 397 | py | Python | products/migrations/0005_product_featured.py | anonshubh/eCommerce-rostores- | 7503e855d650556e216c42fc1c5b95a42bb9c501 | [
"Apache-2.0"
] | null | null | null | products/migrations/0005_product_featured.py | anonshubh/eCommerce-rostores- | 7503e855d650556e216c42fc1c5b95a42bb9c501 | [
"Apache-2.0"
] | null | null | null | products/migrations/0005_product_featured.py | anonshubh/eCommerce-rostores- | 7503e855d650556e216c42fc1c5b95a42bb9c501 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.12 on 2020-04-19 11:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0004_remove_product_featured'),
]
operations = [
migrations.AddField(
model_name='product',
name='featu... | 20.894737 | 53 | 0.609572 |
b16c81aa4a95c4199efb4c5f5295d48b154aae7f | 13,008 | py | Python | ansible/venv/lib/python2.7/site-packages/ansible/modules/network/fortios/fortios_firewall_multicast_address6.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/venv/lib/python2.7/site-packages/ansible/modules/network/fortios/fortios_firewall_multicast_address6.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/venv/lib/python2.7/site-packages/ansible/modules/network/fortios/fortios_firewall_multicast_address6.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | 32.438903 | 115 | 0.5625 |
de57d6eafae6fd1ee619f0c309b4dc237ec50500 | 2,945 | py | Python | ote_sdk/ote_sdk/usecases/exportable_code/demo/demo_package/utils.py | vyashina/training_extensions | e7aa33af94a1f8004d3ea2df259d99234dfca046 | [
"Apache-2.0"
] | null | null | null | ote_sdk/ote_sdk/usecases/exportable_code/demo/demo_package/utils.py | vyashina/training_extensions | e7aa33af94a1f8004d3ea2df259d99234dfca046 | [
"Apache-2.0"
] | null | null | null | ote_sdk/ote_sdk/usecases/exportable_code/demo/demo_package/utils.py | vyashina/training_extensions | e7aa33af94a1f8004d3ea2df259d99234dfca046 | [
"Apache-2.0"
] | null | null | null | """
Utils for demo
"""
# INTEL CONFIDENTIAL
#
# Copyright (C) 2021 Intel Corporation
#
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were provided to
# you ("License"). Unless the License provides otherwise, you may ... | 31.666667 | 90 | 0.726316 |
a8410f5882cc3ce343f9503a008095affb7bd4d7 | 8,813 | py | Python | alfred/utils/directory_tree.py | julienroyd/alfred | e77707bf1886ff238ec860cda363e4530d3d9433 | [
"MIT"
] | 2 | 2020-03-06T22:24:52.000Z | 2020-05-19T09:58:36.000Z | alfred/utils/directory_tree.py | julienroyd/alfred | e77707bf1886ff238ec860cda363e4530d3d9433 | [
"MIT"
] | null | null | null | alfred/utils/directory_tree.py | julienroyd/alfred | e77707bf1886ff238ec860cda363e4530d3d9433 | [
"MIT"
] | 1 | 2021-01-19T12:40:10.000Z | 2021-01-19T12:40:10.000Z | import os
import subprocess
from pathlib import Path
from collections import OrderedDict
def get_root(root=None):
return Path(root) if root is not None else Path(DirectoryTree.default_root)
class DirectoryTree(object):
"""
DirectoryTree is meant to encapsulate the entire tree defined by a storage_dir
... | 35.111554 | 121 | 0.626915 |
4cd7ff62c7c8150575da7df3a93e473c5a20fe26 | 28,261 | py | Python | external/bloodhound/ad/computer.py | yalonso7/ActiveDirectoryEnumeration | 976be32e0ce92be15d65d454b9b6bd158dd097e2 | [
"MIT"
] | 100 | 2020-03-15T22:42:50.000Z | 2022-03-23T19:46:36.000Z | external/bloodhound/ad/computer.py | yalonso7/ActiveDirectoryEnumeration | 976be32e0ce92be15d65d454b9b6bd158dd097e2 | [
"MIT"
] | 47 | 2020-03-05T18:50:16.000Z | 2022-03-29T13:01:25.000Z | external/bloodhound/ad/computer.py | yalonso7/ActiveDirectoryEnumeration | 976be32e0ce92be15d65d454b9b6bd158dd097e2 | [
"MIT"
] | 33 | 2020-04-08T05:51:15.000Z | 2022-03-07T22:34:59.000Z | ####################
#
# Copyright (c) 2018 Fox-IT
#
# 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... | 43.080793 | 136 | 0.545487 |
57078ce393bfd305c92e3cff90eaafa87345cf02 | 1,529 | py | Python | tests/internal/test_http.py | stekern/mopidy | 94509cf70f2bd35ebb13e746dde135bfbe35ce0e | [
"Apache-2.0"
] | 2 | 2019-02-13T15:16:55.000Z | 2019-02-18T08:47:29.000Z | tests/internal/test_http.py | stekern/mopidy | 94509cf70f2bd35ebb13e746dde135bfbe35ce0e | [
"Apache-2.0"
] | 40 | 2019-02-13T09:33:00.000Z | 2019-02-19T13:21:12.000Z | tests/internal/test_http.py | stekern/mopidy | 94509cf70f2bd35ebb13e746dde135bfbe35ce0e | [
"Apache-2.0"
] | 1 | 2021-10-01T17:26:30.000Z | 2021-10-01T17:26:30.000Z | from __future__ import absolute_import, unicode_literals
import mock
import pytest
import requests
import responses
from mopidy.internal import http
TIMEOUT = 1000
URI = 'http://example.com/foo.txt'
BODY = "This is the contents of foo.txt."
@pytest.fixture
def session():
return requests.Session()
@pytest... | 23.890625 | 77 | 0.731851 |
7e72da7df70c79903aa26ca331d5555d95033632 | 222 | py | Python | grumpy_inspect/checkers.py | CSC-IT-Center-for-Science/grumpy-inspect | 7c3496a8a4937324cbe76b0c086fe43fdcf8d49e | [
"MIT"
] | null | null | null | grumpy_inspect/checkers.py | CSC-IT-Center-for-Science/grumpy-inspect | 7c3496a8a4937324cbe76b0c086fe43fdcf8d49e | [
"MIT"
] | null | null | null | grumpy_inspect/checkers.py | CSC-IT-Center-for-Science/grumpy-inspect | 7c3496a8a4937324cbe76b0c086fe43fdcf8d49e | [
"MIT"
] | null | null | null | CPU_IDLE_THRESHOLD = 0.05
def always_idle(config):
return True
def always_active(config):
return False
def cpu_idle(sample):
if sample.kind == 'cpu_util':
return sample.value < CPU_IDLE_THRESHOLD
| 14.8 | 48 | 0.702703 |
fc255d1ec46f521f8823ef28ca97ea6771e6295c | 5,197 | py | Python | estimations/vehicles.py | iamalex5156/Vehicle-Indicator-Toolset | cfc46f408cf3cc04a4f0c0f8841189b9dc8ffc2c | [
"MIT"
] | 13 | 2021-03-22T15:37:29.000Z | 2021-11-02T08:20:57.000Z | estimations/vehicles.py | iamalex5156/Vehicle-Indicator-Toolset | cfc46f408cf3cc04a4f0c0f8841189b9dc8ffc2c | [
"MIT"
] | null | null | null | estimations/vehicles.py | iamalex5156/Vehicle-Indicator-Toolset | cfc46f408cf3cc04a4f0c0f8841189b9dc8ffc2c | [
"MIT"
] | 3 | 2021-03-23T06:24:24.000Z | 2021-03-24T09:52:29.000Z | import numpy as np
import os
import sys
import tensorflow as tf
import cv2
import imutils
import time
from sklearn.metrics import pairwise
from imutils.video import FPS
# sys.path.append('../../research')
from utils import ops as utils_ops
from utils import label_map_util
from utils import visualization_utils as vis... | 27.94086 | 151 | 0.706561 |
5889154772811c6b17b50f779e884b96fe6df695 | 24,664 | py | Python | pymc/backends/arviz.py | justindlwhite/pymc | 9c2ba7afc829fef5799068a0215a53b0f69da7c0 | [
"Apache-2.0"
] | 1 | 2022-03-23T00:24:29.000Z | 2022-03-23T00:24:29.000Z | pymc/backends/arviz.py | justindlwhite/pymc | 9c2ba7afc829fef5799068a0215a53b0f69da7c0 | [
"Apache-2.0"
] | null | null | null | pymc/backends/arviz.py | justindlwhite/pymc | 9c2ba7afc829fef5799068a0215a53b0f69da7c0 | [
"Apache-2.0"
] | null | null | null | """PyMC-ArviZ conversion code."""
import logging
import warnings
from typing import ( # pylint: disable=unused-import
TYPE_CHECKING,
Any,
Dict,
Iterable,
Mapping,
Optional,
Tuple,
Union,
)
import numpy as np
import xarray as xr
from aesara.graph.basic import Constant
from aesara.tens... | 36.922156 | 105 | 0.595564 |
4ba402828d667c92e376eedf5ef985a2621624e3 | 15,349 | py | Python | Jianyan_Data/Jianyanjigou.py | masonsxu/JiGou_PaChong | 4010e3d1a7d29ec8d3c5185d9834e18d7d72246c | [
"Apache-2.0"
] | 1 | 2022-03-26T09:41:33.000Z | 2022-03-26T09:41:33.000Z | Jianyan_Data/Jianyanjigou.py | masonsxu/JiGou_PaChong | 4010e3d1a7d29ec8d3c5185d9834e18d7d72246c | [
"Apache-2.0"
] | null | null | null | Jianyan_Data/Jianyanjigou.py | masonsxu/JiGou_PaChong | 4010e3d1a7d29ec8d3c5185d9834e18d7d72246c | [
"Apache-2.0"
] | null | null | null | import time #控制代码运行时间
import os #控制文件
import pytesseract #识别引擎
import requests #网页
import json #处理json数据
import pandas as pd #处理excel
from openpyxl import load_workbook #处理excel
from selenium import webdriver #控制浏览器进行自动化登陆
from PIL import Image #处理图片
from collections import defaultdict # 初始化像素字典为
from bs4 imp... | 34.108889 | 136 | 0.5444 |
8629aaf3eb851a532c7b1418b08cd6aa34f1880b | 2,701 | py | Python | python/datagit/graph/dmo/builder/openby_node_builder.py | jiportilla/ontology | 8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40 | [
"MIT"
] | null | null | null | python/datagit/graph/dmo/builder/openby_node_builder.py | jiportilla/ontology | 8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40 | [
"MIT"
] | null | null | null | python/datagit/graph/dmo/builder/openby_node_builder.py | jiportilla/ontology | 8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40 | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# -*- coding: UTF-8 -*-
from base import BaseObject
from datagit.graph.dmo.util import GraphNodeIdGenerator
from datagit.graph.dmo.util import GraphNodeDefGenerator
from datagit.graph.dmo.util import GraphTextSplitter
from datamongo import CendantRecordParser
class OpenByNodeBuilder(BaseObjec... | 37.513889 | 103 | 0.573491 |
0900c194f1907fe3e5cfdd4d4b4eea628b56d7a5 | 233 | py | Python | astroquery/sha/tests/setup_package.py | AlexaVillaume/astroquery | 85402770b9c0d4b98ce9ac451f41a6be1f838076 | [
"BSD-3-Clause"
] | 1 | 2021-03-20T00:07:01.000Z | 2021-03-20T00:07:01.000Z | astroquery/sha/tests/setup_package.py | AlexaVillaume/astroquery | 85402770b9c0d4b98ce9ac451f41a6be1f838076 | [
"BSD-3-Clause"
] | null | null | null | astroquery/sha/tests/setup_package.py | AlexaVillaume/astroquery | 85402770b9c0d4b98ce9ac451f41a6be1f838076 | [
"BSD-3-Clause"
] | 1 | 2021-03-20T00:07:05.000Z | 2021-03-20T00:07:05.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
def get_package_data():
paths = [os.path.join('data', '*.txt'),
os.path.join('data', '*.fits')]
return {'astroquery.sha.tests': paths}
| 23.3 | 63 | 0.622318 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.