hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
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
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c2da358466cdf6059f3a2649c3e957e2b02ec7a
1,606
py
Python
tests/asyncio/test_lifespan.py
justin0mcateer/hypercorn
c6df3becf73df7be03451d53f5685aaadd4bbd80
[ "MIT" ]
null
null
null
tests/asyncio/test_lifespan.py
justin0mcateer/hypercorn
c6df3becf73df7be03451d53f5685aaadd4bbd80
[ "MIT" ]
null
null
null
tests/asyncio/test_lifespan.py
justin0mcateer/hypercorn
c6df3becf73df7be03451d53f5685aaadd4bbd80
[ "MIT" ]
null
null
null
import asyncio from time import sleep from typing import Callable import pytest from hypercorn.asyncio.lifespan import Lifespan from hypercorn.config import Config from hypercorn.utils import LifespanFailure, LifespanTimeout from ..helpers import lifespan_failure, SlowLifespanFramework async def no_lifespan_app(sco...
34.170213
91
0.764633
import asyncio from time import sleep from typing import Callable import pytest from hypercorn.asyncio.lifespan import Lifespan from hypercorn.config import Config from hypercorn.utils import LifespanFailure, LifespanTimeout from ..helpers import lifespan_failure, SlowLifespanFramework async def no_lifespan_app(sco...
true
true
1c2da3c94d476fb4dd3196ed021713a45ff4e451
41,099
py
Python
Instrument_Turi_Project/venv/lib/python3.6/site-packages/mxnet/symbol/gen_contrib.py
fozoglu/instrument-recognition
8cc14a481c2736c4ba55f48f00794684271d82cd
[ "MIT" ]
null
null
null
Instrument_Turi_Project/venv/lib/python3.6/site-packages/mxnet/symbol/gen_contrib.py
fozoglu/instrument-recognition
8cc14a481c2736c4ba55f48f00794684271d82cd
[ "MIT" ]
null
null
null
Instrument_Turi_Project/venv/lib/python3.6/site-packages/mxnet/symbol/gen_contrib.py
fozoglu/instrument-recognition
8cc14a481c2736c4ba55f48f00794684271d82cd
[ "MIT" ]
null
null
null
# File content is auto-generated. Do not modify. # pylint: skip-file from ._internal import SymbolBase from ..base import _Null def CTCLoss(data=None, label=None, data_lengths=None, label_lengths=None, use_data_lengths=_Null, use_label_lengths=_Null, blank_label=_Null, name=None, attr=None, out=None, **kwargs): r"...
41.016966
416
0.649918
from ._internal import SymbolBase from ..base import _Null def CTCLoss(data=None, label=None, data_lengths=None, label_lengths=None, use_data_lengths=_Null, use_label_lengths=_Null, blank_label=_Null, name=None, attr=None, out=None, **kwargs): return (0,) def DeformableConvolution(data=None, offset=None, weight...
true
true
1c2da447b7adf5eb8f5afb463937b0be2ed115d1
190
py
Python
indonesian_dot/agents/agent.py
Ra-Ni/Indonesian-Dot-Solver
2baf507d23816b686f046f89d4c833728b25f2dc
[ "MIT" ]
null
null
null
indonesian_dot/agents/agent.py
Ra-Ni/Indonesian-Dot-Solver
2baf507d23816b686f046f89d4c833728b25f2dc
[ "MIT" ]
null
null
null
indonesian_dot/agents/agent.py
Ra-Ni/Indonesian-Dot-Solver
2baf507d23816b686f046f89d4c833728b25f2dc
[ "MIT" ]
1
2020-03-18T15:23:24.000Z
2020-03-18T15:23:24.000Z
class Agent: def g(self, n) -> int: raise NotImplementedError def h(self, n) -> int: raise NotImplementedError def __str__(self) -> str: return 'agent'
19
33
0.578947
class Agent: def g(self, n) -> int: raise NotImplementedError def h(self, n) -> int: raise NotImplementedError def __str__(self) -> str: return 'agent'
true
true
1c2da47e791d320267d90c36afc0ffe1389121c7
4,938
py
Python
pred/queries/predictionqueryparts.py
Duke-GCB/PredictionsDB
066278425890288d9e430a46096a347453301b08
[ "MIT" ]
null
null
null
pred/queries/predictionqueryparts.py
Duke-GCB/PredictionsDB
066278425890288d9e430a46096a347453301b08
[ "MIT" ]
57
2016-09-16T15:23:49.000Z
2021-09-07T15:20:22.000Z
pred/queries/predictionqueryparts.py
Duke-GCB/PredictionsDB
066278425890288d9e430a46096a347453301b08
[ "MIT" ]
1
2016-09-09T20:03:48.000Z
2016-09-09T20:03:48.000Z
from pred.queries.querybuilder import QueryPart RANGE_OPERATOR = '@>' # contains range - excludes predictions not completely inside gene TSS range def _query_part(sql): return QueryPart(sql, []) def set_search_path(schema): return QueryPart("SET search_path TO %s,public;", [schema]) def custom_range_lis...
27.131868
128
0.724382
from pred.queries.querybuilder import QueryPart RANGE_OPERATOR = '@>' def _query_part(sql): return QueryPart(sql, []) def set_search_path(schema): return QueryPart("SET search_path TO %s,public;", [schema]) def custom_range_list_query(list_id, model_name): return QueryPart("""select '' as name, 'ra...
true
true
1c2da523ab460b74b6fcc0dbaccbcf22925a498c
232
py
Python
tests/utils/http_utils.py
Sinkler/python-sdk-v2
a1ad7cc9900f8adf967ca4dec0bb05d8eddc2999
[ "MIT" ]
null
null
null
tests/utils/http_utils.py
Sinkler/python-sdk-v2
a1ad7cc9900f8adf967ca4dec0bb05d8eddc2999
[ "MIT" ]
null
null
null
tests/utils/http_utils.py
Sinkler/python-sdk-v2
a1ad7cc9900f8adf967ca4dec0bb05d8eddc2999
[ "MIT" ]
null
null
null
# coding: utf-8 import urllib3 from config import create_logger logger = create_logger(__name__) http = urllib3.PoolManager() def do_get(url): r = http.request('GET', url) logger.info("%s %s", r.status, r._request_url)
16.571429
50
0.702586
import urllib3 from config import create_logger logger = create_logger(__name__) http = urllib3.PoolManager() def do_get(url): r = http.request('GET', url) logger.info("%s %s", r.status, r._request_url)
true
true
1c2da67d0017c87f2d96b8ad92b048f1617fe228
6,814
py
Python
kubernetes/client/models/v1_replication_controller_list.py
fooka03/python
073cf4d89e532f92b57e8955b4efc3d5d5eb80cf
[ "Apache-2.0" ]
2
2020-07-02T05:47:41.000Z
2020-07-02T05:50:34.000Z
kubernetes/client/models/v1_replication_controller_list.py
fooka03/python
073cf4d89e532f92b57e8955b4efc3d5d5eb80cf
[ "Apache-2.0" ]
1
2021-03-25T23:44:49.000Z
2021-03-25T23:44:49.000Z
k8sdeployment/k8sstat/python/kubernetes/client/models/v1_replication_controller_list.py
JeffYFHuang/gpuaccounting
afa934350ebbd0634beb60b9df4a147426ea0006
[ "MIT" ]
1
2021-10-13T17:45:37.000Z
2021-10-13T17:45:37.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.15.6 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class V1Replicat...
34.414141
295
0.632962
import pprint import re import six class V1ReplicationControllerList(object): openapi_types = { 'api_version': 'str', 'items': 'list[V1ReplicationController]', 'kind': 'str', 'metadata': 'V1ListMeta' } attribute_map = { 'api_version': 'apiVersion', ...
true
true
1c2da6f171cae7cb1045a0bd7c00a1fd34426c95
5,120
py
Python
agents/DQN.py
manjavacas/drl-building
6aaa117c0d02b0349af227939460adf31d8d40d9
[ "MIT" ]
4
2021-03-22T20:04:38.000Z
2022-02-21T11:44:32.000Z
agents/DQN.py
manjavacas/drl-building
6aaa117c0d02b0349af227939460adf31d8d40d9
[ "MIT" ]
null
null
null
agents/DQN.py
manjavacas/drl-building
6aaa117c0d02b0349af227939460adf31d8d40d9
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import gym import energym import argparse import uuid import mlflow import numpy as np from energym.utils.callbacks import LoggerCallback, LoggerEvalCallback from energym.utils.wrappers import NormalizeObservation, LoggerWrapper from stable_baselines3 import DQN from stable_baselines3.common.call...
41.290323
118
0.67793
import gym import energym import argparse import uuid import mlflow import numpy as np from energym.utils.callbacks import LoggerCallback, LoggerEvalCallback from energym.utils.wrappers import NormalizeObservation, LoggerWrapper from stable_baselines3 import DQN from stable_baselines3.common.callbacks import EvalC...
true
true
1c2da91a4fcfe9df61ac196a1e59085d8e4a082e
549
py
Python
main.py
ivicel/steamkit-python
0a3f250e432cf890965db5e7245841aa512bca22
[ "Apache-2.0" ]
5
2018-11-16T08:59:41.000Z
2021-04-03T05:32:18.000Z
main.py
ivicel/steamkit-python
0a3f250e432cf890965db5e7245841aa512bca22
[ "Apache-2.0" ]
null
null
null
main.py
ivicel/steamkit-python
0a3f250e432cf890965db5e7245841aa512bca22
[ "Apache-2.0" ]
null
null
null
import logging from steam import SteamClient from steam.base.msg.emsg import EMsg logging.basicConfig(format="[%(levelname)s] %(asctime)s: %(name)s: %(message)s", level=logging.DEBUG) client = SteamClient() @client.on(EMsg.ClientAccountInfo) async def account_info(msg): print(msg.body) ...
18.931034
80
0.653916
import logging from steam import SteamClient from steam.base.msg.emsg import EMsg logging.basicConfig(format="[%(levelname)s] %(asctime)s: %(name)s: %(message)s", level=logging.DEBUG) client = SteamClient() @client.on(EMsg.ClientAccountInfo) async def account_info(msg): print(msg.body) ...
true
true
1c2da93f0a175cd6cc180de3072f3bbc7b671a6f
67,781
py
Python
tests/components/cast/test_media_player.py
gregsheremeta/core
8e39ba387d0fcbd8462fff76da4d64890bc4ec57
[ "Apache-2.0" ]
null
null
null
tests/components/cast/test_media_player.py
gregsheremeta/core
8e39ba387d0fcbd8462fff76da4d64890bc4ec57
[ "Apache-2.0" ]
4
2022-03-02T07:18:01.000Z
2022-03-31T07:09:30.000Z
tests/components/cast/test_media_player.py
gregsheremeta/core
8e39ba387d0fcbd8462fff76da4d64890bc4ec57
[ "Apache-2.0" ]
null
null
null
"""The tests for the Cast Media player platform.""" # pylint: disable=protected-access from __future__ import annotations import json from unittest.mock import ANY, AsyncMock, MagicMock, Mock, patch from uuid import UUID import attr import pychromecast from pychromecast.const import CAST_TYPE_CHROMECAST, CAST_TYPE_GR...
35.065184
118
0.695682
from __future__ import annotations import json from unittest.mock import ANY, AsyncMock, MagicMock, Mock, patch from uuid import UUID import attr import pychromecast from pychromecast.const import CAST_TYPE_CHROMECAST, CAST_TYPE_GROUP import pytest import yarl from homeassistant.components import media_player, tts ...
true
true
1c2dab50d42e019542081e038e89f7d1b6d275fd
1,912
py
Python
tests/conftest.py
jannikluhn/tlbc-monitor
9d54d40bfed48db5542fd6714946ea27684a918e
[ "MIT" ]
null
null
null
tests/conftest.py
jannikluhn/tlbc-monitor
9d54d40bfed48db5542fd6714946ea27684a918e
[ "MIT" ]
61
2019-04-08T20:13:47.000Z
2020-07-16T09:18:48.000Z
tests/conftest.py
jannikluhn/tlbc-monitor
9d54d40bfed48db5542fd6714946ea27684a918e
[ "MIT" ]
3
2019-02-22T14:15:27.000Z
2019-10-23T04:20:47.000Z
import math import pytest from eth_tester import EthereumTester from eth_keys import keys from web3 import EthereumTesterProvider, Web3 from eth_utils import int_to_big_endian, to_checksum_address from sqlalchemy import create_engine from monitor.db import BlockDB from monitor.validators import PrimaryOracle, Ep...
22.494118
86
0.736402
import math import pytest from eth_tester import EthereumTester from eth_keys import keys from web3 import EthereumTesterProvider, Web3 from eth_utils import int_to_big_endian, to_checksum_address from sqlalchemy import create_engine from monitor.db import BlockDB from monitor.validators import PrimaryOracle, Ep...
true
true
1c2dac728e9bb035d33003ba95e387686a62fb5b
17,495
py
Python
neutron/tests/unit/_test_extension_portbindings.py
sajuptpm/notification_neutron
45933f63c9eff0d2931a7209b040ff2dc69835c5
[ "Apache-2.0" ]
5
2015-10-20T07:56:53.000Z
2017-12-31T22:39:15.000Z
neutron/tests/unit/_test_extension_portbindings.py
sajuptpm/notification_neutron
45933f63c9eff0d2931a7209b040ff2dc69835c5
[ "Apache-2.0" ]
null
null
null
neutron/tests/unit/_test_extension_portbindings.py
sajuptpm/notification_neutron
45933f63c9eff0d2931a7209b040ff2dc69835c5
[ "Apache-2.0" ]
3
2015-05-08T22:36:28.000Z
2015-10-24T21:25:35.000Z
# Copyright 2013 NEC Corporation # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
46.405836
78
0.582338
import contextlib import httplib from oslo_config import cfg from webob import exc from neutron import context from neutron.extensions import portbindings from neutron import manager from neutron.tests.unit.db import test_db_base_plugin_v2 class PortBindingsTestCase(test_db_base_plugin_v2.NeutronDbPl...
true
true
1c2dade172981cc31aa1caf156e345e1669c48d6
1,533
py
Python
simulation/utils/machine_learning/data/rosbag_to_video.py
KITcar-Team/kitcar-gazebo-simulation
8a9438b5a24c288721ae0302889fe55e26046310
[ "MIT" ]
13
2020-06-30T17:18:28.000Z
2021-07-20T16:55:35.000Z
simulation/utils/machine_learning/data/rosbag_to_video.py
KITcar-Team/kitcar-gazebo-simulation
8a9438b5a24c288721ae0302889fe55e26046310
[ "MIT" ]
1
2020-11-10T20:15:42.000Z
2020-12-25T18:27:56.000Z
simulation/utils/machine_learning/data/rosbag_to_video.py
KITcar-Team/kitcar-gazebo-simulation
8a9438b5a24c288721ae0302889fe55e26046310
[ "MIT" ]
3
2020-07-20T09:09:08.000Z
2021-07-20T17:00:37.000Z
import argparse import os import shutil from simulation.utils.machine_learning.data.images_to_video import images_to_video from simulation.utils.machine_learning.data.rosbag_to_images import rosbag_to_images def rosbag_to_video(rosbag_dir: str, output_dir: str, image_topic: str): os.makedirs(output_dir, exist_ok...
32.617021
91
0.64775
import argparse import os import shutil from simulation.utils.machine_learning.data.images_to_video import images_to_video from simulation.utils.machine_learning.data.rosbag_to_images import rosbag_to_images def rosbag_to_video(rosbag_dir: str, output_dir: str, image_topic: str): os.makedirs(output_dir, exist_ok...
true
true
1c2dae3786cbef4c0e87da202d359b38ed6a331b
242
py
Python
application/templatetags/makeurl.py
amarlearning/Footstep
557beda097834a031fa2f114bad5de261c7daf95
[ "MIT" ]
null
null
null
application/templatetags/makeurl.py
amarlearning/Footstep
557beda097834a031fa2f114bad5de261c7daf95
[ "MIT" ]
2
2017-05-12T14:38:01.000Z
2017-05-18T13:25:35.000Z
application/templatetags/makeurl.py
amarlearning/Footstep
557beda097834a031fa2f114bad5de261c7daf95
[ "MIT" ]
null
null
null
from django import template register = template.Library() @register.filter def makeurl(value, args): string = value.replace("api.","") string = string.replace("repos/", "") string = string + '/tree/' +str(args) return string
24.2
41
0.661157
from django import template register = template.Library() @register.filter def makeurl(value, args): string = value.replace("api.","") string = string.replace("repos/", "") string = string + '/tree/' +str(args) return string
true
true
1c2daed7c883679b17d14291ec3c2b8b92f0c669
20,263
py
Python
sympy/functions/special/zeta_functions.py
ianmasc/sympy
f089bdc70cfa1e2aa6ecfdb6d568f37bd937bd5e
[ "BSD-3-Clause" ]
603
2020-12-23T13:49:32.000Z
2022-03-31T23:38:03.000Z
sympy/functions/special/zeta_functions.py
ianmasc/sympy
f089bdc70cfa1e2aa6ecfdb6d568f37bd937bd5e
[ "BSD-3-Clause" ]
387
2020-12-15T14:54:04.000Z
2022-03-31T07:00:21.000Z
sympy/functions/special/zeta_functions.py
ianmasc/sympy
f089bdc70cfa1e2aa6ecfdb6d568f37bd937bd5e
[ "BSD-3-Clause" ]
35
2021-03-26T03:12:04.000Z
2022-03-23T10:15:10.000Z
""" Riemann zeta and related function. """ from sympy.core import Function, S, sympify, pi, I from sympy.core.function import ArgumentIndexError from sympy.functions.combinatorial.numbers import bernoulli, factorial, harmonic from sympy.functions.elementary.exponential import log, exp_polar from sympy.functions.elemen...
29.452035
85
0.520061
from sympy.core import Function, S, sympify, pi, I from sympy.core.function import ArgumentIndexError from sympy.functions.combinatorial.numbers import bernoulli, factorial, harmonic from sympy.functions.elementary.exponential import log, exp_polar from sympy.functions.elementary.miscellaneous import sqrt
true
true
1c2daff473a571d5bdb482be512b46226cd28954
13,338
py
Python
assemblyline/common/backupmanager.py
spelcha/assemblyline-base
835446128664084c6a45ad2734a636669eca5ad1
[ "MIT" ]
39
2020-05-06T02:10:25.000Z
2022-02-22T00:33:52.000Z
assemblyline/common/backupmanager.py
spelcha/assemblyline-base
835446128664084c6a45ad2734a636669eca5ad1
[ "MIT" ]
186
2020-04-17T10:38:47.000Z
2022-03-30T13:20:52.000Z
assemblyline/common/backupmanager.py
spelcha/assemblyline-base
835446128664084c6a45ad2734a636669eca5ad1
[ "MIT" ]
22
2020-04-22T16:00:38.000Z
2022-02-09T03:06:55.000Z
from __future__ import annotations import json import os import random import time import threading import logging from typing import Any from multiprocessing import Process from assemblyline.common import forge from assemblyline.common.uid import get_random_id from assemblyline.odm.models.error import ERROR_TYPES fr...
36.442623
111
0.523992
from __future__ import annotations import json import os import random import time import threading import logging from typing import Any from multiprocessing import Process from assemblyline.common import forge from assemblyline.common.uid import get_random_id from assemblyline.odm.models.error import ERROR_TYPES fr...
true
true
1c2db06313afeebd3e8c41976a6c2e579de5ebdd
10,035
py
Python
tools_webrtc/libs/generate_licenses.py
wyshen2020/webrtc
b93e2240f1653b82e24553e092bbab84337774af
[ "BSD-3-Clause" ]
2
2022-03-10T01:47:56.000Z
2022-03-31T12:51:46.000Z
tools_webrtc/libs/generate_licenses.py
wyshen2020/webrtc
b93e2240f1653b82e24553e092bbab84337774af
[ "BSD-3-Clause" ]
null
null
null
tools_webrtc/libs/generate_licenses.py
wyshen2020/webrtc
b93e2240f1653b82e24553e092bbab84337774af
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env vpython3 # Copyright 2016 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. A...
37.58427
80
0.692875
import sys import argparse import json import logging import os import re import subprocess from html import escape LIB_TO_LICENSES_DICT = { 'abseil-cpp': ['third_party/abseil-cpp/LICENSE'], 'android_ndk': ['third_party/android_ndk/NOTICE'], 'android_sdk': ['third_party/android_sdk/LICENSE'], ...
true
true
1c2db11e6425644ddfb4ca0850b6f9cd5ad986e3
6,991
py
Python
A_pathfinding.py
Drake0306/a-_pathfinding
46cbfbc44b3e563f9bdc2ec2d4c7742beed6c416
[ "MIT" ]
null
null
null
A_pathfinding.py
Drake0306/a-_pathfinding
46cbfbc44b3e563f9bdc2ec2d4c7742beed6c416
[ "MIT" ]
null
null
null
A_pathfinding.py
Drake0306/a-_pathfinding
46cbfbc44b3e563f9bdc2ec2d4c7742beed6c416
[ "MIT" ]
null
null
null
import math import pygame from queue import PriorityQueue WIDTH = 800 WIN = pygame.display.set_mode((WIDTH,WIDTH)) pygame.display.set_caption('A* Path Finding Algoritham') RED = (255,0,0) GREEN = (0,225,0) BLUE = (0,225,0) YELLOW = (225,225,0) WHITE = (225,225,225) BLACK = (0,0,0) PURPLE = (128,0,128) ...
26.481061
101
0.51223
import math import pygame from queue import PriorityQueue WIDTH = 800 WIN = pygame.display.set_mode((WIDTH,WIDTH)) pygame.display.set_caption('A* Path Finding Algoritham') RED = (255,0,0) GREEN = (0,225,0) BLUE = (0,225,0) YELLOW = (225,225,0) WHITE = (225,225,225) BLACK = (0,0,0) PURPLE = (128,0,128) ...
true
true
1c2db146a81095258082a5e01445b3cddf1eab20
8,037
py
Python
users/models.py
moshthepitt/probsc
9b8cab206bb1c41238e36bd77f5e0573df4d8e2d
[ "MIT" ]
null
null
null
users/models.py
moshthepitt/probsc
9b8cab206bb1c41238e36bd77f5e0573df4d8e2d
[ "MIT" ]
null
null
null
users/models.py
moshthepitt/probsc
9b8cab206bb1c41238e36bd77f5e0573df4d8e2d
[ "MIT" ]
null
null
null
from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible from django.urls import reverse from django_extensions.db.models import TimeStampedModel from mptt.models import MPTTModel, TreeForeignKey ...
33.911392
79
0.630459
from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible from django.urls import reverse from django_extensions.db.models import TimeStampedModel from mptt.models import MPTTModel, TreeForeignKey ...
true
true
1c2db15793a6bd45d52b1845770cbdfdfae549a1
5,001
py
Python
cinder/tests/unit/api/contrib/test_volume_tenant_attribute.py
potsmaster/cinder
275c2acdfb4282b0ec0314c9875b759958c093f8
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/api/contrib/test_volume_tenant_attribute.py
potsmaster/cinder
275c2acdfb4282b0ec0314c9875b759958c093f8
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/api/contrib/test_volume_tenant_attribute.py
potsmaster/cinder
275c2acdfb4282b0ec0314c9875b759958c093f8
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 OpenStack Foundation # # 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.23913
77
0.641072
import json import uuid from lxml import etree from oslo_utils import timeutils import webob from cinder import context from cinder import test from cinder.tests.unit.api import fakes from cinder import volume PROJECT_ID = '88fd1da4-f464-4a87-9ce5-26f2f40743b9' def fake_volume_get(*args, **kwargs): ...
true
true
1c2db1f67a2d09b7d486f3f1ad5c389b9885d986
878
py
Python
mmtfPyspark/tests/datasets/test_polymerSequenceExtractor.py
sbliven/mmtf-pyspark
3d444178bdc0d5128aafdb1326fec12b5d7634b5
[ "Apache-2.0" ]
59
2018-01-28T06:50:56.000Z
2022-02-10T06:07:12.000Z
mmtfPyspark/tests/datasets/test_polymerSequenceExtractor.py
sbliven/mmtf-pyspark
3d444178bdc0d5128aafdb1326fec12b5d7634b5
[ "Apache-2.0" ]
101
2018-02-01T20:51:10.000Z
2022-01-24T00:50:29.000Z
mmtfPyspark/tests/datasets/test_polymerSequenceExtractor.py
sbliven/mmtf-pyspark
3d444178bdc0d5128aafdb1326fec12b5d7634b5
[ "Apache-2.0" ]
29
2018-01-29T10:09:51.000Z
2022-01-23T18:53:28.000Z
#!/usr/bin/env python import unittest from pyspark.sql import SparkSession from mmtfPyspark.io.mmtfReader import download_mmtf_files from mmtfPyspark.datasets import polymerSequenceExtractor from mmtfPyspark.mappers import StructureToPolymerChains class PolymerSequenceExtractorTest(unittest.TestCase): def setUp...
25.823529
75
0.666287
import unittest from pyspark.sql import SparkSession from mmtfPyspark.io.mmtfReader import download_mmtf_files from mmtfPyspark.datasets import polymerSequenceExtractor from mmtfPyspark.mappers import StructureToPolymerChains class PolymerSequenceExtractorTest(unittest.TestCase): def setUp(self): self....
true
true
1c2db35a10b0968fdc22b3acdada71c16fa39a8d
4,729
py
Python
api.py
Salva5297/WidocoServer
75e0170c2a644c4fbc3e1f673bd1c3ddc0d8fb73
[ "Apache-2.0" ]
null
null
null
api.py
Salva5297/WidocoServer
75e0170c2a644c4fbc3e1f673bd1c3ddc0d8fb73
[ "Apache-2.0" ]
null
null
null
api.py
Salva5297/WidocoServer
75e0170c2a644c4fbc3e1f673bd1c3ddc0d8fb73
[ "Apache-2.0" ]
null
null
null
import os from flask import Flask, render_template, request, send_file from flask_restful import Api, Resource, reqparse import tempfile from werkzeug.utils import secure_filename import zipfile import json app = Flask(__name__) api = Api(app) def zipdir(dirPath=None, zipFilePath=None, includeDirInZip=False): if...
31.317881
84
0.58469
import os from flask import Flask, render_template, request, send_file from flask_restful import Api, Resource, reqparse import tempfile from werkzeug.utils import secure_filename import zipfile import json app = Flask(__name__) api = Api(app) def zipdir(dirPath=None, zipFilePath=None, includeDirInZip=False): if...
true
true
1c2db3eb24f12d0a3f3016c599035d65b14f6ae1
51,413
py
Python
mmtbx/cablam/cablam_training.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
155
2016-11-23T12:52:16.000Z
2022-03-31T15:35:44.000Z
mmtbx/cablam/cablam_training.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
590
2016-12-10T11:31:18.000Z
2022-03-30T23:10:09.000Z
mmtbx/cablam/cablam_training.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
115
2016-11-15T08:17:28.000Z
2022-02-09T15:30:14.000Z
from __future__ import absolute_import, division, print_function # (jEdit options) :folding=explicit:collapseFolds=1: #This module contains the training/exploration components of cablam #It can be run stand-alone with many commandline options #It is intended for use in determining contours, motif fingerprints, etc for ...
41.562652
259
0.629549
from __future__ import absolute_import, division, print_function import os, sys from iotbx import pdb from mmtbx.cablam import cablam_res # geometric and probe measures and can look forward and backward in sequence from mmtbx.cablam import cablam_math #contains geometric measure calcu...
true
true
1c2db4051f1a13e119f743784e73c0796eecc5d3
15,892
py
Python
kolibri/core/auth/api.py
khangmach/kolibri
f4b89b8262effe68a407edc032a735d5a1b0b71b
[ "MIT" ]
null
null
null
kolibri/core/auth/api.py
khangmach/kolibri
f4b89b8262effe68a407edc032a735d5a1b0b71b
[ "MIT" ]
null
null
null
kolibri/core/auth/api.py
khangmach/kolibri
f4b89b8262effe68a407edc032a735d5a1b0b71b
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import time from django.contrib.auth import authenticate from django.contrib.auth import get_user from django.contrib.auth import login from django.contrib.auth import logout from django.contrib.auth i...
36.87239
102
0.67921
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import time from django.contrib.auth import authenticate from django.contrib.auth import get_user from django.contrib.auth import login from django.contrib.auth import logout from django.contrib.auth i...
true
true
1c2db46600b0b2fa6fff8480c70ee198eb0e8b1a
237
py
Python
bits_wilp/sumOfDigits.py
deepak5998/Py
5ae3bd9e8dcf3104a8ca7512911a1607f6c9ae20
[ "MIT" ]
726
2019-06-04T04:46:06.000Z
2022-03-31T17:54:00.000Z
bits_wilp/sumOfDigits.py
Ishajj/Python-Interview-Problems-for-Practice
12ece68be497757e2aad8a07c29399856de782da
[ "MIT" ]
12
2019-06-05T14:21:35.000Z
2021-04-17T05:11:01.000Z
bits_wilp/sumOfDigits.py
Ishajj/Python-Interview-Problems-for-Practice
12ece68be497757e2aad8a07c29399856de782da
[ "MIT" ]
118
2019-06-04T10:25:12.000Z
2022-02-04T22:31:12.000Z
def sumOfDigits(n): sum = 0 while n > 0: rem = n % 10 sum = sum + rem n = n // 10 return sum print("Please enter a number: ") num = int(input()) sod = sumOfDigits(num) print("The sum of digits for", num, "is", sod)
18.230769
46
0.56962
def sumOfDigits(n): sum = 0 while n > 0: rem = n % 10 sum = sum + rem n = n // 10 return sum print("Please enter a number: ") num = int(input()) sod = sumOfDigits(num) print("The sum of digits for", num, "is", sod)
true
true
1c2db4c46ce12cac94c3d473662f4b32112e937b
305
py
Python
src/core/factory/mysql/customer_factory.py
lucassaporetti/car-rental
6e37032df3a399b78ed3d7998a2cb31a2a84d033
[ "MIT" ]
1
2021-02-11T18:45:12.000Z
2021-02-11T18:45:12.000Z
src/core/factory/mysql/customer_factory.py
lucassaporetti/car-rental
6e37032df3a399b78ed3d7998a2cb31a2a84d033
[ "MIT" ]
null
null
null
src/core/factory/mysql/customer_factory.py
lucassaporetti/car-rental
6e37032df3a399b78ed3d7998a2cb31a2a84d033
[ "MIT" ]
null
null
null
from core.config.app_configs import AppConfigs from src.core.factory.mysql.mysql_factory import MySqlFactory class CustomerFactory(MySqlFactory): sql_template_file = "sql/mysql/ddl/customer_templates.properties" def __init__(self): super().__init__(CustomerFactory.sql_template_file)
25.416667
69
0.796721
from core.config.app_configs import AppConfigs from src.core.factory.mysql.mysql_factory import MySqlFactory class CustomerFactory(MySqlFactory): sql_template_file = "sql/mysql/ddl/customer_templates.properties" def __init__(self): super().__init__(CustomerFactory.sql_template_file)
true
true
1c2db5343cc59db58bf404f7bd56fa843789dea3
22,945
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_11_01/operations/_virtual_network_peerings_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
3
2020-06-23T02:25:27.000Z
2021-09-07T18:48:11.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_11_01/operations/_virtual_network_peerings_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
510
2019-07-17T16:11:19.000Z
2021-08-02T08:38:32.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_11_01/operations/_virtual_network_peerings_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
5
2019-09-04T12:51:37.000Z
2020-09-16T07:28:40.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
51.911765
250
0.67993
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
1c2db539dea968d76fd87b98ec5526bd68909b9e
48,324
py
Python
catkin_ws/simulation/rviz_tools_py-master/src/rviz_tools_py/rviz_tools.py
fontysrobotics/Blackboard_based_distributed_fleet_manager
a6b44738fe67f4948a69f8d45da58d981c6724e0
[ "BSD-3-Clause" ]
null
null
null
catkin_ws/simulation/rviz_tools_py-master/src/rviz_tools_py/rviz_tools.py
fontysrobotics/Blackboard_based_distributed_fleet_manager
a6b44738fe67f4948a69f8d45da58d981c6724e0
[ "BSD-3-Clause" ]
null
null
null
catkin_ws/simulation/rviz_tools_py-master/src/rviz_tools_py/rviz_tools.py
fontysrobotics/Blackboard_based_distributed_fleet_manager
a6b44738fe67f4948a69f8d45da58d981c6724e0
[ "BSD-3-Clause" ]
2
2018-09-04T06:44:21.000Z
2018-10-15T02:30:50.000Z
#!/usr/bin/env python # Copyright (c) 2015, Carnegie Mellon University # All rights reserved. # Authors: David Butterworth <dbworth@cmu.edu> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # - Redistributions of sour...
34.890975
131
0.601813
import numpy import random import roslib import rospy import tf from std_msgs.msg import Header, ColorRGBA from geometry_msgs.msg import Transform from geometry_msgs.msg import Pose from geometry_msgs.msg import Point, Point32 from geometry_msgs.msg import Vector3 from geometry_msgs....
true
true
1c2db61108d3ddcf50a9cebbf14fa96f71e52ba6
20,697
py
Python
vendor/github.com/elastic/beats/libbeat/tests/system/beat/beat.py
opheelia/Blockchainbeat
cf2b2ab5778bbc88bb0346ce7624a3dda4438f74
[ "Apache-2.0" ]
null
null
null
vendor/github.com/elastic/beats/libbeat/tests/system/beat/beat.py
opheelia/Blockchainbeat
cf2b2ab5778bbc88bb0346ce7624a3dda4438f74
[ "Apache-2.0" ]
null
null
null
vendor/github.com/elastic/beats/libbeat/tests/system/beat/beat.py
opheelia/Blockchainbeat
cf2b2ab5778bbc88bb0346ce7624a3dda4438f74
[ "Apache-2.0" ]
1
2019-08-23T11:02:35.000Z
2019-08-23T11:02:35.000Z
import subprocess import jinja2 import unittest import os import shutil import json import signal import sys import time import yaml import hashlib import re from datetime import datetime, timedelta from .compose import ComposeMixin BEAT_REQUIRED_FIELDS = ["@timestamp", "beat.name", "beat.ho...
32.90461
110
0.54119
import subprocess import jinja2 import unittest import os import shutil import json import signal import sys import time import yaml import hashlib import re from datetime import datetime, timedelta from .compose import ComposeMixin BEAT_REQUIRED_FIELDS = ["@timestamp", "beat.name", "beat.ho...
true
true
1c2db69ea1868e18381c8304ddbb18cbc4d74acc
3,381
py
Python
ldaptor/protocols/ldap/proxy.py
tv42/ldaptor
3f227602c8c021b9e943136a2dc8d7db44a11e50
[ "MIT" ]
1
2015-11-25T04:01:26.000Z
2015-11-25T04:01:26.000Z
ldaptor/protocols/ldap/proxy.py
tv42/ldaptor
3f227602c8c021b9e943136a2dc8d7db44a11e50
[ "MIT" ]
null
null
null
ldaptor/protocols/ldap/proxy.py
tv42/ldaptor
3f227602c8c021b9e943136a2dc8d7db44a11e50
[ "MIT" ]
2
2019-11-06T02:14:10.000Z
2022-01-10T08:34:11.000Z
"""LDAP protocol proxy server""" from twisted.internet import reactor, defer from ldaptor.protocols.ldap import ldapserver, ldapconnector, ldapclient from ldaptor.protocols import pureldap class Proxy(ldapserver.BaseLDAPServer): protocol = ldapclient.LDAPClient client = None waitingConnect = [] unbou...
30.736364
81
0.630287
from twisted.internet import reactor, defer from ldaptor.protocols.ldap import ldapserver, ldapconnector, ldapclient from ldaptor.protocols import pureldap class Proxy(ldapserver.BaseLDAPServer): protocol = ldapclient.LDAPClient client = None waitingConnect = [] unbound = False def __init__(self...
true
true
1c2db776e42abd808e2f2cbd7dd5ca11a3103424
7,930
py
Python
nailgun/nailgun/db/sqlalchemy/fixman.py
Axam/nsx-web
4f60d71c05e08740cbdf19b6c9bb0c4cb1e29ad5
[ "Apache-2.0" ]
1
2021-04-06T16:13:35.000Z
2021-04-06T16:13:35.000Z
nailgun/nailgun/db/sqlalchemy/fixman.py
Axam/nsx-web
4f60d71c05e08740cbdf19b6c9bb0c4cb1e29ad5
[ "Apache-2.0" ]
null
null
null
nailgun/nailgun/db/sqlalchemy/fixman.py
Axam/nsx-web
4f60d71c05e08740cbdf19b6c9bb0c4cb1e29ad5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
34.181034
79
0.533291
from datetime import datetime import itertools import jinja2 import os.path import Queue import StringIO import sys import yaml from sqlalchemy import orm import sqlalchemy.types from nailgun.db import db from nailgun.db.sqlalchemy import models from nailgun.logger import logger from nailgun import ob...
true
true
1c2db84513bb862f7de4e8448a426a3edf339f82
9,217
py
Python
community-content/tf_keras_text_classification_distributed_single_worker_gpus_with_gcloud_local_run_and_vertex_sdk/trainer/task.py
lclc19/vertex-ai-samples
1844df54a6fc3d7afff1110a6758afaf13181b19
[ "Apache-2.0" ]
null
null
null
community-content/tf_keras_text_classification_distributed_single_worker_gpus_with_gcloud_local_run_and_vertex_sdk/trainer/task.py
lclc19/vertex-ai-samples
1844df54a6fc3d7afff1110a6758afaf13181b19
[ "Apache-2.0" ]
null
null
null
community-content/tf_keras_text_classification_distributed_single_worker_gpus_with_gcloud_local_run_and_vertex_sdk/trainer/task.py
lclc19/vertex-ai-samples
1844df54a6fc3d7afff1110a6758afaf13181b19
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
31.565068
100
0.726701
import argparse import os import tensorflow as tf from tensorflow.keras import layers, losses from tensorflow.keras.layers.experimental.preprocessing import TextVectorization import distribution_utils import utils VOCAB_SIZE = 10000 MAX_SEQUENCE_LENGTH = 250 def parse_args(): parser = argparse.Arg...
true
true
1c2db91ba45746a7d95ab225a22bd3eb8692c5dc
2,592
py
Python
Prediction based on convolutional neural network/code/reference/mnist_train.py
Asurada2015/Test
14d92c9cb88d293340d76b20d31ca937052addb6
[ "Apache-2.0" ]
null
null
null
Prediction based on convolutional neural network/code/reference/mnist_train.py
Asurada2015/Test
14d92c9cb88d293340d76b20d31ca937052addb6
[ "Apache-2.0" ]
null
null
null
Prediction based on convolutional neural network/code/reference/mnist_train.py
Asurada2015/Test
14d92c9cb88d293340d76b20d31ca937052addb6
[ "Apache-2.0" ]
1
2018-11-16T03:46:14.000Z
2018-11-16T03:46:14.000Z
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import mnist_inference import os # 配置神经网络参数 BATCH_SIZE = 100 # 批处理数据大小 LEARNING_RATE_BASE = 0.8 # 基础学习率 LEARNING_RATE_DECAY = 0.99 # 学习率衰减速度 REGULARIZATION_RATE = 0.0001 # 正则化项 TRAINING_STEPS = 30000 # 训练次数 MOVING_AVERAGE_DECAY = 0...
40.5
116
0.710648
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import mnist_inference import os BATCH_SIZE = 100 LEARNING_RATE_BASE = 0.8 LEARNING_RATE_DECAY = 0.99 REGULARIZATION_RATE = 0.0001 TRAINING_STEPS = 30000 MOVING_AVERAGE_DECAY = 0.99 MODEL_SAVE_PATH = "MNIST_model/" MODEL_NA...
true
true
1c2db9e2ec179c8bdde9e3dc44d50955fbe6c743
15,111
py
Python
lib/jnpr/healthbot/swagger/models/rule_schema.py
minefuto/healthbot-py-client
bb81452c974456af44299aebf32a73abeda8a943
[ "Apache-2.0" ]
null
null
null
lib/jnpr/healthbot/swagger/models/rule_schema.py
minefuto/healthbot-py-client
bb81452c974456af44299aebf32a73abeda8a943
[ "Apache-2.0" ]
null
null
null
lib/jnpr/healthbot/swagger/models/rule_schema.py
minefuto/healthbot-py-client
bb81452c974456af44299aebf32a73abeda8a943
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Healthbot APIs API interface for Healthbot application # noqa: E501 OpenAPI spec version: 1.0.0 Contact: healthbot-hackers@juniper.net Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class RuleSchema(o...
31.679245
276
0.610615
import pprint import re import six class RuleSchema(object): swagger_types = { 'description': 'str', 'field': 'list[RuleSchemaField]', 'function': 'list[RuleSchemaFunction]', 'keys': 'list[str]', 'network_rule': 'list[ERRORUNKNOWN]', 'rule_frequency': 'str',...
true
true
1c2dbabee38b958cf582568343d598c8386b4440
286
py
Python
src/betterproto/compile/naming.py
DK99/python-betterproto
d213abca03c90d0690e5e4d23894d51751478098
[ "MIT" ]
708
2019-10-11T06:23:40.000Z
2022-03-31T09:39:08.000Z
src/betterproto/compile/naming.py
DK99/python-betterproto
d213abca03c90d0690e5e4d23894d51751478098
[ "MIT" ]
302
2019-11-11T22:09:21.000Z
2022-03-29T11:21:04.000Z
src/betterproto/compile/naming.py
DK99/python-betterproto
d213abca03c90d0690e5e4d23894d51751478098
[ "MIT" ]
122
2019-12-04T16:22:53.000Z
2022-03-20T09:31:10.000Z
from betterproto import casing def pythonize_class_name(name: str) -> str: return casing.pascal_case(name) def pythonize_field_name(name: str) -> str: return casing.safe_snake_case(name) def pythonize_method_name(name: str) -> str: return casing.safe_snake_case(name)
20.428571
44
0.755245
from betterproto import casing def pythonize_class_name(name: str) -> str: return casing.pascal_case(name) def pythonize_field_name(name: str) -> str: return casing.safe_snake_case(name) def pythonize_method_name(name: str) -> str: return casing.safe_snake_case(name)
true
true
1c2dbac173571edf8c02d33825652024a416aa0a
3,568
py
Python
huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/show_member_request.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/show_member_request.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/show_member_request.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class ShowMemberRequest: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key ...
25.485714
79
0.549888
import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class ShowMemberRequest: sensitive_list = [] openapi_types = { 'member_id': 'str', 'pool_id': 'str' } attribute_map = { 'member_id': 'member_id', 'pool_id': 'pool_i...
true
true
1c2dbb45650af032de5cca54d07f7432cdd8c925
60,536
py
Python
tests/test_xpath1_parser.py
linw1995/elementpath
3a1105a51295a0dc4410a0ac1231ca8700a54db1
[ "MIT" ]
null
null
null
tests/test_xpath1_parser.py
linw1995/elementpath
3a1105a51295a0dc4410a0ac1231ca8700a54db1
[ "MIT" ]
null
null
null
tests/test_xpath1_parser.py
linw1995/elementpath
3a1105a51295a0dc4410a0ac1231ca8700a54db1
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c), 2018-2019, SISSA (International School for Advanced Studies). # All rights reserved. # This file is distributed under the terms of the MIT License. # See the file 'LICENSE' in the root directory of the present # distribution, or http://opensource.org/lice...
50.029752
115
0.573989
import unittest import sys import io import math import pickle from decimal import Decimal from collections import namedtuple from xml.etree import ElementTree try: import lxml.etree as lxml_etree except ImportError: lxml_etree = None from elementpath import * from elementpath.namespaces...
true
true
1c2dbcfe1ac7e8d9f58c1afcd5a420bf678d47d8
22,118
py
Python
src/virtual-wan/azext_vwan/vendored_sdks/v2021_03_01/v2021_03_01/operations/_virtual_hub_ip_configuration_operations.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/virtual-wan/azext_vwan/vendored_sdks/v2021_03_01/v2021_03_01/operations/_virtual_hub_ip_configuration_operations.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/virtual-wan/azext_vwan/vendored_sdks/v2021_03_01/v2021_03_01/operations/_virtual_hub_ip_configuration_operations.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
802
2017-10-11T17:36:26.000Z
2022-03-31T22:24:32.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.040724
223
0.668008
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
1c2dbcfec9ff34a834ed87b4ac2e2111e2ff2a7a
2,348
py
Python
app/modules/core/tests/fixtures.py
nickmoreton/nhsx-website
2397d1308376c02b75323d30e6bc916af0daac9d
[ "MIT" ]
null
null
null
app/modules/core/tests/fixtures.py
nickmoreton/nhsx-website
2397d1308376c02b75323d30e6bc916af0daac9d
[ "MIT" ]
null
null
null
app/modules/core/tests/fixtures.py
nickmoreton/nhsx-website
2397d1308376c02b75323d30e6bc916af0daac9d
[ "MIT" ]
null
null
null
# 3rd party import json from typing import List import pytest from wagtail.core.models import Page from modules.core.models import SectionPage, ArticlePage from .blocks import RICHTEXT_BLOCK, PROMO, SMALL_PROMO pytestmark = pytest.mark.django_db def _create_section_page(title: str, parent: Page) -> SectionPage: ...
26.382022
78
0.691227
import json from typing import List import pytest from wagtail.core.models import Page from modules.core.models import SectionPage, ArticlePage from .blocks import RICHTEXT_BLOCK, PROMO, SMALL_PROMO pytestmark = pytest.mark.django_db def _create_section_page(title: str, parent: Page) -> SectionPage: p = Sectio...
true
true
1c2dbe4a08bd41bf72da14d26c0d265c7ca59c69
231
py
Python
11799/horror_dash.py
sc458/uHunt-solutions
37464e1db98c897995eab79caa6c70f379ad877a
[ "MIT" ]
null
null
null
11799/horror_dash.py
sc458/uHunt-solutions
37464e1db98c897995eab79caa6c70f379ad877a
[ "MIT" ]
null
null
null
11799/horror_dash.py
sc458/uHunt-solutions
37464e1db98c897995eab79caa6c70f379ad877a
[ "MIT" ]
null
null
null
num = int(input()) for i in range(0,num): arr = input() arr = arr.split(' ') ints = [] for j in range(0,len(arr)): ints.append(int(arr[j])) print('Case ' + str(i+1) + ': ' + str(max(ints)))
10.5
51
0.467532
num = int(input()) for i in range(0,num): arr = input() arr = arr.split(' ') ints = [] for j in range(0,len(arr)): ints.append(int(arr[j])) print('Case ' + str(i+1) + ': ' + str(max(ints)))
true
true
1c2dbed81b714154b35521eda4ccf58ad3c299db
496
py
Python
python/5.py
dpetker/project-euler
d232367d5f21821871c53d6ecc43c8d6af801d2c
[ "MIT" ]
null
null
null
python/5.py
dpetker/project-euler
d232367d5f21821871c53d6ecc43c8d6af801d2c
[ "MIT" ]
null
null
null
python/5.py
dpetker/project-euler
d232367d5f21821871c53d6ecc43c8d6af801d2c
[ "MIT" ]
null
null
null
# Soultion for Project Euler Problem #5 - https://projecteuler.net/problem=5 # (c) 2016 dpetker # Start with this as the problem states its the smallest value evenly divisible # by 1-10 test_val = 2520 def test_divisors(n): for i in range(1, 21): if n % i != 0: return False return True while True: t...
23.619048
120
0.705645
(n): for i in range(1, 21): if n % i != 0: return False return True while True: test_val += 20 if test_divisors(test_val): break print('The smallest positive number that is evenly divisible by all of the numbers from 1 to 20 is {}'.format(test_val))
true
true
1c2dbf0093f5b08eb9f80e323c62cbac7485263c
875
py
Python
tx_parse_xml/acl__prop_to_title.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
117
2015-12-18T07:18:27.000Z
2022-03-28T00:25:54.000Z
tx_parse_xml/acl__prop_to_title.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
8
2018-10-03T09:38:46.000Z
2021-12-13T19:51:09.000Z
tx_parse_xml/acl__prop_to_title.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
28
2016-08-02T17:43:47.000Z
2022-03-21T08:31:12.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' from pathlib import Path from bs4 import BeautifulSoup FILE_NAME_ACL = Path(r'C:\<...>\ads\<...>\src\<...>.xml') FILE_NAME_ACL_LOCALE = FILE_NAME_ACL.parent.parent / 'locale' / 'en' / ('mlb' + FILE_NAME_ACL.name) root_acl = BeautifulSoup(open(F...
25.735294
99
0.659429
__author__ = 'ipetrash' from pathlib import Path from bs4 import BeautifulSoup FILE_NAME_ACL = Path(r'C:\<...>\ads\<...>\src\<...>.xml') FILE_NAME_ACL_LOCALE = FILE_NAME_ACL.parent.parent / 'locale' / 'en' / ('mlb' + FILE_NAME_ACL.name) root_acl = BeautifulSoup(open(FILE_NAME_ACL, 'rb'), 'html.parser') root_acl_...
true
true
1c2dbf26a88b8fd1f7357b6ade26d3238a810da4
51,362
py
Python
detect_trucks/TruckDetector.py
hfisser/s2_trucks
323e73edb82e314e6695e8cf8d89c2de22f54b04
[ "MIT" ]
4
2021-06-17T07:44:16.000Z
2021-10-15T22:32:12.000Z
detect_trucks/TruckDetector.py
hfisser/s2_trucks
323e73edb82e314e6695e8cf8d89c2de22f54b04
[ "MIT" ]
null
null
null
detect_trucks/TruckDetector.py
hfisser/s2_trucks
323e73edb82e314e6695e8cf8d89c2de22f54b04
[ "MIT" ]
null
null
null
#################################################### # Author: Henrik Fisser, 2020 #################################################### from array_utils.plot import plot_img import os, warnings import pandas as pd import numpy as np import geopandas as gpd import xarray as xr from shapely.geometry import box from sci...
52.517382
134
0.580663
(metadata, dict): raise TypeError("'metadata' must be a dictionary") self.crs = metadata["crs"] try: self.lat, self.lon = metadata["lat"], metadata["lon"] except KeyError: try: self.lat, self.lon = lat_from_meta(metadata), lon_from_meta(metadat...
true
true
1c2dbf27ffce954a671517058c5126dc69927784
668
py
Python
__main__.py
cmgoffena13/Obelisk-Mint
2715bcc214c8d72a6b15bd549c5fcd1caee65c9a
[ "MIT" ]
1
2022-02-18T18:05:46.000Z
2022-02-18T18:05:46.000Z
__main__.py
cmgoffena13/Obelisk-Mint
2715bcc214c8d72a6b15bd549c5fcd1caee65c9a
[ "MIT" ]
null
null
null
__main__.py
cmgoffena13/Obelisk-Mint
2715bcc214c8d72a6b15bd549c5fcd1caee65c9a
[ "MIT" ]
null
null
null
# Runs entire Obelisk ETL process from Obelisk.mint.mint_extract import Mint_API import os file_path = os.path.abspath(os.path.dirname(__file__)) full_load = False if __name__ == '__main__': os.system(f"{file_path}\\venv\\Scripts\\activate") print('Starting Obelisk ETL') print('Starting Obel...
26.72
55
0.693114
from Obelisk.mint.mint_extract import Mint_API import os file_path = os.path.abspath(os.path.dirname(__file__)) full_load = False if __name__ == '__main__': os.system(f"{file_path}\\venv\\Scripts\\activate") print('Starting Obelisk ETL') print('Starting Obelisk Extracts') Mint = Mint_AP...
true
true
1c2dbf6bdda6a28c5754429390f06bef5c7536aa
394
py
Python
1_Basic/3_Operators/5_identity.py
hauntarl/real-python
6ffb535648bf5c79c90e2ed7def842078bc7807f
[ "MIT" ]
2
2020-12-15T18:11:00.000Z
2021-03-01T11:43:16.000Z
1_Basic/3_Operators/5_identity.py
hauntarl/real_python
6ffb535648bf5c79c90e2ed7def842078bc7807f
[ "MIT" ]
null
null
null
1_Basic/3_Operators/5_identity.py
hauntarl/real_python
6ffb535648bf5c79c90e2ed7def842078bc7807f
[ "MIT" ]
null
null
null
# Python provides two operators, is and is not, # that determine whether the given operands have the # same identity i.e. refer to the same object. # This is not the same thing as equality, which means # the two operands refer to objects that contain the # same data but are not necessarily the same object. x = 1001 y =...
35.818182
53
0.692893
x = 1001 y = 1000 print('x == y + 1 ?', x == y + 1) print('x is y + 1 ?', x is y + 1)
true
true
1c2dbfb659d1a96969b90a2470a0bb0aa4f4c5cc
1,669
py
Python
MNIST_NN_VS_SVM/plots.py
ahmednader10/Machine_Learning
fab0c7cd773b5e001b56c5349550085e34661e4d
[ "MIT" ]
null
null
null
MNIST_NN_VS_SVM/plots.py
ahmednader10/Machine_Learning
fab0c7cd773b5e001b56c5349550085e34661e4d
[ "MIT" ]
null
null
null
MNIST_NN_VS_SVM/plots.py
ahmednader10/Machine_Learning
fab0c7cd773b5e001b56c5349550085e34661e4d
[ "MIT" ]
null
null
null
import pandas as pd import sklearn from sklearn.neural_network import MLPClassifier, MLPRegressor from sklearn.model_selection import train_test_split from sklearn.svm import LinearSVC, SVC from sklearn.multiclass import OneVsRestClassifier from sklearn.tree import DecisionTreeClassifier from sklearn import prep...
37.931818
77
0.729778
import pandas as pd import sklearn from sklearn.neural_network import MLPClassifier, MLPRegressor from sklearn.model_selection import train_test_split from sklearn.svm import LinearSVC, SVC from sklearn.multiclass import OneVsRestClassifier from sklearn.tree import DecisionTreeClassifier from sklearn import prep...
true
true
1c2dc2471b76dea8ec3d401a10cdefe4721804b6
795
py
Python
employee/forms.py
FahadulShadhin/crudapp
cd82596a6261e15388c737e8399c3d20bb9c372a
[ "MIT" ]
null
null
null
employee/forms.py
FahadulShadhin/crudapp
cd82596a6261e15388c737e8399c3d20bb9c372a
[ "MIT" ]
1
2022-01-03T06:37:17.000Z
2022-01-03T13:09:11.000Z
employee/forms.py
FahadulShadhin/crudapp
cd82596a6261e15388c737e8399c3d20bb9c372a
[ "MIT" ]
1
2022-03-23T17:02:22.000Z
2022-03-23T17:02:22.000Z
from django import forms from django.forms import ModelForm from .models import Employee class EmployeeForm(ModelForm): class Meta: model = Employee fields = ('emp_name', 'emp_email', 'emp_contact', 'emp_role', 'emp_salary', 'image') widgets = { 'emp_name': forms.TextI...
46.764706
106
0.61761
from django import forms from django.forms import ModelForm from .models import Employee class EmployeeForm(ModelForm): class Meta: model = Employee fields = ('emp_name', 'emp_email', 'emp_contact', 'emp_role', 'emp_salary', 'image') widgets = { 'emp_name': forms.TextI...
true
true
1c2dc38c10e4fa3324ca5f1d9f5ae10cfed1dc0b
33,710
py
Python
cartridge/shop/models.py
AlexHill/cartridge
cb8599d43600442a223a484dc75726bfbbec68a0
[ "BSD-2-Clause" ]
null
null
null
cartridge/shop/models.py
AlexHill/cartridge
cb8599d43600442a223a484dc75726bfbbec68a0
[ "BSD-2-Clause" ]
null
null
null
cartridge/shop/models.py
AlexHill/cartridge
cb8599d43600442a223a484dc75726bfbbec68a0
[ "BSD-2-Clause" ]
null
null
null
from __future__ import division, unicode_literals from future.builtins import str, super from future.utils import with_metaclass from decimal import Decimal from functools import reduce from operator import iand, ior from django.core.urlresolvers import reverse from django.db import models, connection from django.db...
39.061414
79
0.625037
from __future__ import division, unicode_literals from future.builtins import str, super from future.utils import with_metaclass from decimal import Decimal from functools import reduce from operator import iand, ior from django.core.urlresolvers import reverse from django.db import models, connection from django.db...
true
true
1c2dc5337abd79b8f0b9228777e2f687113e494c
3,068
py
Python
TheDigger_src/lib/dns_handler.py
Jistrokz/TheDigger
d2831b0b8fdf75595c4049d885abb3e6a79b9a30
[ "MIT" ]
5
2021-06-20T16:49:06.000Z
2022-03-03T07:21:42.000Z
TheDigger_src/lib/dns_handler.py
Jistrokz/TheDigger
d2831b0b8fdf75595c4049d885abb3e6a79b9a30
[ "MIT" ]
null
null
null
TheDigger_src/lib/dns_handler.py
Jistrokz/TheDigger
d2831b0b8fdf75595c4049d885abb3e6a79b9a30
[ "MIT" ]
null
null
null
from dns import resolver from asyncio.subprocess import PIPE, create_subprocess_exec from requests.exceptions import ConnectionError from TheDigger_src.utils.help_utils import HelpUtilities from TheDigger_src.utils.exceptions import TheDiggerException from TheDigger_src.utils.logger import Logger from TheDigger_src.uti...
39.844156
118
0.610821
from dns import resolver from asyncio.subprocess import PIPE, create_subprocess_exec from requests.exceptions import ConnectionError from TheDigger_src.utils.help_utils import HelpUtilities from TheDigger_src.utils.exceptions import TheDiggerException from TheDigger_src.utils.logger import Logger from TheDigger_src.uti...
true
true
1c2dc589b65e5e2a15c250e688b9e52057911300
760
py
Python
dali/python/nvidia/dali/__init__.py
SamanthaFeidFischer/DALI
1c57da0a4ea210dad4219db2b217d04c319c308e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
dali/python/nvidia/dali/__init__.py
SamanthaFeidFischer/DALI
1c57da0a4ea210dad4219db2b217d04c319c308e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
dali/python/nvidia/dali/__init__.py
SamanthaFeidFischer/DALI
1c57da0a4ea210dad4219db2b217d04c319c308e
[ "ECL-2.0", "Apache-2.0" ]
1
2020-07-03T00:34:07.000Z
2020-07-03T00:34:07.000Z
# Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
34.545455
74
0.767105
from __future__ import absolute_import from . import ops from . import pipeline from . import tensor from . import tfrecord from . import types
true
true
1c2dc60dba7987b05d5eb2937f05b5bc2b7d68dd
400
py
Python
src/beanmachine/ppl/compiler/hint.py
rodrigodesalvobraz/beanmachine-1
1c0d5ffeb505167f581e518809ea1320861bdf18
[ "MIT" ]
1
2021-12-22T13:19:14.000Z
2021-12-22T13:19:14.000Z
src/beanmachine/ppl/compiler/hint.py
rodrigodesalvobraz/beanmachine-1
1c0d5ffeb505167f581e518809ea1320861bdf18
[ "MIT" ]
null
null
null
src/beanmachine/ppl/compiler/hint.py
rodrigodesalvobraz/beanmachine-1
1c0d5ffeb505167f581e518809ea1320861bdf18
[ "MIT" ]
null
null
null
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """Operations that are intended as hints to the Beanstalk compiler""" import math import torch def math_log1mexp(x): return math.log...
21.052632
69
0.72
import math import torch def math_log1mexp(x): return math.log(1.0 - math.exp(x)) def log1mexp(x): return torch.log(1.0 - torch.exp(x))
true
true
1c2dc82c5a5b3819257130d67fab3879c58e5685
10,090
py
Python
integrations/test_lightning.py
gagan3012/metrics
5a2388ccaa97cc3608b1fa28879f77436434a6d6
[ "Apache-2.0" ]
1
2021-09-14T23:34:48.000Z
2021-09-14T23:34:48.000Z
integrations/test_lightning.py
gagan3012/metrics
5a2388ccaa97cc3608b1fa28879f77436434a6d6
[ "Apache-2.0" ]
1
2021-10-16T05:02:56.000Z
2021-12-15T07:02:17.000Z
integrations/test_lightning.py
gagan3012/metrics
5a2388ccaa97cc3608b1fa28879f77436434a6d6
[ "Apache-2.0" ]
2
2021-10-16T05:02:43.000Z
2022-02-10T16:01:52.000Z
# Copyright The PyTorch Lightning team. # # 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 i...
31.433022
102
0.603865
from unittest import mock import pytest import torch from pytorch_lightning import LightningModule, Trainer from torch import tensor from torch.utils.data import DataLoader from integrations.lightning.boring_model import BoringModel, RandomDataset from tests.helpers import _LIGHTNING_GREATER_EQUAL_1_3 fr...
true
true
1c2dc85f5648ba0a8dd851c547d3b60121d6c46a
897
py
Python
flask/api/models/Event.py
mktung/tvgs-crm
be992a19b46f7d7eeaf90c9c9105a3630ff20292
[ "MIT" ]
1
2019-10-18T00:49:27.000Z
2019-10-18T00:49:27.000Z
flask/api/models/Event.py
mktung/tvgs-crm
be992a19b46f7d7eeaf90c9c9105a3630ff20292
[ "MIT" ]
null
null
null
flask/api/models/Event.py
mktung/tvgs-crm
be992a19b46f7d7eeaf90c9c9105a3630ff20292
[ "MIT" ]
null
null
null
from api.core import Mixin from .base import db class Event(Mixin, db.Model): """Person Table.""" __tablename__ = "event" id = db.Column(db.Integer, unique=True, primary_key=True) title = db.Column(db.String, nullable=False) date = db.Column(db.DATE, nullable=True) name_of_volunteer = db.Co...
29.9
98
0.656633
from api.core import Mixin from .base import db class Event(Mixin, db.Model): __tablename__ = "event" id = db.Column(db.Integer, unique=True, primary_key=True) title = db.Column(db.String, nullable=False) date = db.Column(db.DATE, nullable=True) name_of_volunteer = db.Column(db.String, nullable...
true
true
1c2dc8c1fbbbba6ba513d82076b677947a48c85e
7,325
py
Python
ci/test-suite/universal.py
tundranerd/FEBio
fb0ca6d04af51f005d933029df232058a30f1f8f
[ "MIT" ]
null
null
null
ci/test-suite/universal.py
tundranerd/FEBio
fb0ca6d04af51f005d933029df232058a30f1f8f
[ "MIT" ]
null
null
null
ci/test-suite/universal.py
tundranerd/FEBio
fb0ca6d04af51f005d933029df232058a30f1f8f
[ "MIT" ]
null
null
null
REMOTE_RELEASE_DIR = "/root/update2/FEBioStudio/" REMOTE_DEV_DIR = "/root/update2/FEBioStudioDev/" exemptTests = ['ri02', 'hi01'] longTests = ['sh24', 'fl37', 'fl36'] dataField = {'bp04': '2.5', 'bi24': '1', 'bp05': '0.1', 'bp07': '2', 'bp08': '2', 'bp09': '2', 'bp10':...
21.800595
49
0.275495
REMOTE_RELEASE_DIR = "/root/update2/FEBioStudio/" REMOTE_DEV_DIR = "/root/update2/FEBioStudioDev/" exemptTests = ['ri02', 'hi01'] longTests = ['sh24', 'fl37', 'fl36'] dataField = {'bp04': '2.5', 'bi24': '1', 'bp05': '0.1', 'bp07': '2', 'bp08': '2', 'bp09': '2', 'bp10':...
true
true
1c2dc95ab3a9dc14f9cb1d3e4fdf13d597524b8d
7,093
py
Python
mux_python/models/real_time_breakdown_value.py
moaazsidat/mux-python
3f03b9dd0761fa1a0cd5bdbeac85ccf4f326508c
[ "MIT" ]
36
2019-02-28T21:18:39.000Z
2022-03-04T19:58:45.000Z
mux_python/models/real_time_breakdown_value.py
moaazsidat/mux-python
3f03b9dd0761fa1a0cd5bdbeac85ccf4f326508c
[ "MIT" ]
7
2019-04-01T14:48:34.000Z
2022-03-04T16:31:34.000Z
mux_python/models/real_time_breakdown_value.py
moaazsidat/mux-python
3f03b9dd0761fa1a0cd5bdbeac85ccf4f326508c
[ "MIT" ]
9
2019-11-29T03:57:58.000Z
2022-03-02T17:29:25.000Z
# coding: utf-8 """ Mux API Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 The version of the OpenAPI document: v1 Contact: devex@mux.com Gener...
30.311966
204
0.621176
import inspect import pprint import re import six from mux_python.configuration import Configuration class RealTimeBreakdownValue(object): openapi_types = { 'value': 'str', 'negative_impact': 'int', 'metric_value': 'float', 'display_value': 'str', 'concurrent_viewer...
true
true
1c2dcb2cd8344904ed92b020972ac557bf1fb37a
1,379
py
Python
03 AccessWebData/JSONdataInAPI.py
blueicy/Python-achieve
cbe7a0f898bef5f1d951d69cef0c305a62faaaf8
[ "MIT" ]
null
null
null
03 AccessWebData/JSONdataInAPI.py
blueicy/Python-achieve
cbe7a0f898bef5f1d951d69cef0c305a62faaaf8
[ "MIT" ]
null
null
null
03 AccessWebData/JSONdataInAPI.py
blueicy/Python-achieve
cbe7a0f898bef5f1d951d69cef0c305a62faaaf8
[ "MIT" ]
null
null
null
import urllib.request, urllib.parse, urllib.error import json import ssl api_key = False #api_key = 'AIzaSy___IDByT70' # https://developers.google.com/maps/documentation/geocoding/intro if api_key is False: api_key = 42 serviceurl = 'http://py4e-data.dr-chuck.net/json?' else : serviceurl = 'https://maps....
20.279412
69
0.684554
import urllib.request, urllib.parse, urllib.error import json import ssl api_key = False if api_key is False: api_key = 42 serviceurl = 'http://py4e-data.dr-chuck.net/json?' else : serviceurl = 'https://maps.googleapis.com/maps/api/geocode/json?' ctx = ssl.create_default_context() ctx.check_hostname ...
true
true
1c2dccd0e95cc8419c1e9dad4a3fa248bfb5459c
441
py
Python
Get_pid.py
tokyohost/Download-Thz-Torrent
4f90cf710aaa143cab2e07e7348c625d34f9ad7c
[ "MIT" ]
4
2019-11-28T05:56:36.000Z
2021-12-25T01:48:21.000Z
Get_pid.py
tokyohost/get-Thz-Torrent-and-info
4f90cf710aaa143cab2e07e7348c625d34f9ad7c
[ "MIT" ]
null
null
null
Get_pid.py
tokyohost/get-Thz-Torrent-and-info
4f90cf710aaa143cab2e07e7348c625d34f9ad7c
[ "MIT" ]
2
2020-02-10T15:23:59.000Z
2020-02-29T13:11:26.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- import re def Get_pid(soup): #返回当前页面的唯一pid pid = soup.findAll('div', {'class': "pls"}) #匹配到指定容器 Get_pid = str(pid) # 转换成文本文档 p = re.compile(r'\d+') # 匹配数字也就是每个页面单独的 Pid pidnumber = p.findall(Get_pid) # print(pidnumber) # print("页面唯一pid为:"+pidnumber...
31.5
85
0.637188
import re def Get_pid(soup): pid = soup.findAll('div', {'class': "pls"}) Get_pid = str(pid) p = re.compile(r'\d+') pidnumber = p.findall(Get_pid)
true
true
1c2dcdc18755de16380093bc5feef68ea0db1a64
9,695
py
Python
tests/test_buffer_io.py
Infinidat/infi.instruct
69dfd8a35d17f8687581e838ea13e7554f7e5034
[ "BSD-3-Clause" ]
2
2015-01-12T21:16:06.000Z
2019-12-12T05:59:56.000Z
tests/test_buffer_io.py
Infinidat/infi.instruct
69dfd8a35d17f8687581e838ea13e7554f7e5034
[ "BSD-3-Clause" ]
4
2015-02-24T09:18:00.000Z
2021-06-16T12:55:19.000Z
tests/test_buffer_io.py
Infinidat/infi.instruct
69dfd8a35d17f8687581e838ea13e7554f7e5034
[ "BSD-3-Clause" ]
4
2015-01-07T12:37:54.000Z
2018-02-08T15:07:17.000Z
import random from bitarray import bitarray from infi.instruct._compat import range, PY2 from infi.unittest import TestCase from infi.instruct.buffer.io_buffer import BitView, BitAwareByteArray random.seed(0) class IOBufferTestCase(TestCase): def test_getitem__byte(self): buf = BitAwareByteArray(bytearra...
38.78
114
0.588345
import random from bitarray import bitarray from infi.instruct._compat import range, PY2 from infi.unittest import TestCase from infi.instruct.buffer.io_buffer import BitView, BitAwareByteArray random.seed(0) class IOBufferTestCase(TestCase): def test_getitem__byte(self): buf = BitAwareByteArray(bytearra...
true
true
1c2dce5bfdbcf0694685a6a9b512196a77735640
59
py
Python
hackerrank/contest/30-days-of-code/day-0.py
everyevery/programming_study
ff35e97e13953e4d7a26591f7cdb301d3e8e36c6
[ "MIT" ]
null
null
null
hackerrank/contest/30-days-of-code/day-0.py
everyevery/programming_study
ff35e97e13953e4d7a26591f7cdb301d3e8e36c6
[ "MIT" ]
null
null
null
hackerrank/contest/30-days-of-code/day-0.py
everyevery/programming_study
ff35e97e13953e4d7a26591f7cdb301d3e8e36c6
[ "MIT" ]
1
2017-04-01T21:34:23.000Z
2017-04-01T21:34:23.000Z
print("Hello World.") print("Welcome to 30 Days of Code.")
19.666667
36
0.694915
print("Hello World.") print("Welcome to 30 Days of Code.")
true
true
1c2dcf6bc1e94dd061c0dcbff3ca0362a7c8ab4f
48,202
bzl
Python
examples/checked_in_requirements_bzl/requirements.bzl
therc/rules_python
d2716fb59f8e60ccc2af347859ad162a067e6d13
[ "Apache-2.0" ]
1
2019-02-11T04:46:51.000Z
2019-02-11T04:46:51.000Z
examples/checked_in_requirements_bzl/requirements.bzl
therc/rules_python
d2716fb59f8e60ccc2af347859ad162a067e6d13
[ "Apache-2.0" ]
2
2018-02-22T11:09:50.000Z
2018-04-20T05:28:20.000Z
examples/checked_in_requirements_bzl/requirements.bzl
mirandaconrado/rules_python
670a7b7357024fb4803022a66c977931f12bac6c
[ "Apache-2.0" ]
null
null
null
# Install pip requirements. # # Generated from /home/lpeltonen/go/src/github.com/bazelbuild/rules_python/examples/checked_in_requirements_bzl/requirements.txt # Generated from /home/lpeltonen/go/src/github.com/bazelbuild/rules_python/examples/checked_in_requirements_bzl/requirements-2.txt load("@examples_checked_in_re...
68.081921
1,136
0.72775
load("@examples_checked_in_requirements_bzl//python:whl.bzl", "whl_library") _requirements = { "atomicwrites": "@examples_checked_in_requirements_bzl__atomicwrites_1_2_1//:pkg", "atomicwrites:dirty": "@examples_checked_in_requirements_bzl__atomicwrites_1_2_1_dirty//:pkg", "attrs": "@examples_checked_in_requ...
true
true
1c2dcf8e3706cc01b274591fa63e3b945e1e564e
7,149
py
Python
pyro/distributions/empirical.py
adam-coogan/pyro
6395b0f5f0b4744d3c822a39526027fb3fdb8b04
[ "MIT" ]
null
null
null
pyro/distributions/empirical.py
adam-coogan/pyro
6395b0f5f0b4744d3c822a39526027fb3fdb8b04
[ "MIT" ]
null
null
null
pyro/distributions/empirical.py
adam-coogan/pyro
6395b0f5f0b4744d3c822a39526027fb3fdb8b04
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function import math import numbers import torch from torch.distributions import constraints from pyro.distributions.torch import Categorical from pyro.distributions.torch_distribution import TorchDistribution from pyro.distributions.util import copy_docs_from,...
40.619318
102
0.638131
from __future__ import absolute_import, division, print_function import math import numbers import torch from torch.distributions import constraints from pyro.distributions.torch import Categorical from pyro.distributions.torch_distribution import TorchDistribution from pyro.distributions.util import copy_docs_from,...
true
true
1c2dcfe0288e9e98dc8564dd67eee1a75307cf99
165
py
Python
tests/model_control/detailed/transf_Quantization/model_control_one_enabled_Quantization_ConstantTrend_BestCycle_LSTM.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/model_control/detailed/transf_Quantization/model_control_one_enabled_Quantization_ConstantTrend_BestCycle_LSTM.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/model_control/detailed/transf_Quantization/model_control_one_enabled_Quantization_ConstantTrend_BestCycle_LSTM.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Quantization'] , ['ConstantTrend'] , ['BestCycle'] , ['LSTM'] );
41.25
87
0.757576
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Quantization'] , ['ConstantTrend'] , ['BestCycle'] , ['LSTM'] );
true
true
1c2dcfeff930260114a1a4a118ef0bf1cb482eaf
16,703
py
Python
openstack_dashboard/usage/quotas.py
ilay09/horizon
a362e4b767f7616d344545aa0f9205857d3900a4
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/usage/quotas.py
ilay09/horizon
a362e4b767f7616d344545aa0f9205857d3900a4
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/usage/quotas.py
ilay09/horizon
a362e4b767f7616d344545aa0f9205857d3900a4
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
36.469432
79
0.64695
from collections import defaultdict import itertools import logging from django.utils.translation import ugettext_lazy as _ from horizon import exceptions from horizon.utils.memoized import memoized from openstack_dashboard.api import base from openstack_dashboard.api import cinder from openstack_dashboa...
true
true
1c2dd03ed4752a62c2b24818fa3674ec47b4f620
11,122
py
Python
wagtail/wagtailimages/tests/test_image_operations.py
isabella232/wagtail
52bc8ae62719d3b955f1016efc9c691d4ac584e1
[ "BSD-3-Clause" ]
1
2021-09-21T00:06:52.000Z
2021-09-21T00:06:52.000Z
wagtail/wagtailimages/tests/test_image_operations.py
revsys/wagtail
52bc8ae62719d3b955f1016efc9c691d4ac584e1
[ "BSD-3-Clause" ]
1
2021-02-24T08:25:30.000Z
2021-02-24T08:25:30.000Z
wagtail/wagtailimages/tests/test_image_operations.py
isabella232/wagtail
52bc8ae62719d3b955f1016efc9c691d4ac584e1
[ "BSD-3-Clause" ]
1
2020-11-24T10:21:24.000Z
2020-11-24T10:21:24.000Z
import unittest from wagtail.wagtailimages import image_operations from wagtail.wagtailimages.exceptions import InvalidFilterSpecError from wagtail.wagtailimages.models import Image, Filter class WillowOperationRecorder(object): """ This class pretends to be a Willow image but instead, it records the ope...
31.241573
100
0.577864
import unittest from wagtail.wagtailimages import image_operations from wagtail.wagtailimages.exceptions import InvalidFilterSpecError from wagtail.wagtailimages.models import Image, Filter class WillowOperationRecorder(object): def __init__(self, start_size): self.ran_operations = [] self.start_...
true
true
1c2dd1c1e204abef3b610274e85d4878859d378e
77,002
py
Python
Lib/unittest/mock.py
adamwen829/cpython
0f1c7c760c6b2804f5d05cae9ca045d1fdf3d667
[ "PSF-2.0" ]
2
2017-05-05T02:07:59.000Z
2017-08-18T09:24:48.000Z
Lib/unittest/mock.py
adamwen829/cpython
0f1c7c760c6b2804f5d05cae9ca045d1fdf3d667
[ "PSF-2.0" ]
null
null
null
Lib/unittest/mock.py
adamwen829/cpython
0f1c7c760c6b2804f5d05cae9ca045d1fdf3d667
[ "PSF-2.0" ]
3
2016-04-21T07:58:27.000Z
2016-05-06T21:34:44.000Z
# mock.py # Test tools for mocking and patching. # Maintained by Michael Foord # Backport for other versions of Python available from # http://pypi.python.org/pypi/mock __all__ = ( 'Mock', 'MagicMock', 'patch', 'sentinel', 'DEFAULT', 'ANY', 'call', 'create_autospec', 'FILTER_DIR', ...
32.683362
85
0.609504
__all__ = ( 'Mock', 'MagicMock', 'patch', 'sentinel', 'DEFAULT', 'ANY', 'call', 'create_autospec', 'FILTER_DIR', 'NonCallableMock', 'NonCallableMagicMock', 'mock_open', 'PropertyMock', ) __version__ = '1.0' import inspect import pprint import sys import buil...
true
true
1c2dd28147cce5307dcfac0fa27383f178868eeb
2,046
py
Python
paddlespeech/server/restful/api.py
qingen/PaddleSpeech
657c424f6c679873118c4e94bc24a3ff00b58ae1
[ "Apache-2.0" ]
null
null
null
paddlespeech/server/restful/api.py
qingen/PaddleSpeech
657c424f6c679873118c4e94bc24a3ff00b58ae1
[ "Apache-2.0" ]
null
null
null
paddlespeech/server/restful/api.py
qingen/PaddleSpeech
657c424f6c679873118c4e94bc24a3ff00b58ae1
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
35.894737
74
0.706745
import sys from typing import List from fastapi import APIRouter from paddlespeech.cli.log import logger from paddlespeech.server.restful.asr_api import router as asr_router from paddlespeech.server.restful.cls_api import router as cls_router from paddlespeech.server.restful.text_api import router as tex...
true
true
1c2dd2b635c7b8fbba9234c5737e118e5d548eff
182
py
Python
main.py
Iampato/Smart-Meter
9531c860ca48a452212f5122a3c5d84965e4ce42
[ "MIT" ]
2
2020-11-20T12:29:42.000Z
2020-11-24T07:28:32.000Z
main.py
Iampato/Smart-Meter
9531c860ca48a452212f5122a3c5d84965e4ce42
[ "MIT" ]
1
2021-02-01T07:12:57.000Z
2021-02-01T07:12:57.000Z
main.py
Iampato/Smart-Meter
9531c860ca48a452212f5122a3c5d84965e4ce42
[ "MIT" ]
null
null
null
from config.connect import SmartMeterConfig def main(): smartMeterConfig = SmartMeterConfig() print(smartMeterConfig.database_user) if __name__ == "__main__": main()
16.545455
43
0.736264
from config.connect import SmartMeterConfig def main(): smartMeterConfig = SmartMeterConfig() print(smartMeterConfig.database_user) if __name__ == "__main__": main()
true
true
1c2dd3309b544c4e3f22b3bb0f618dee13a80a3c
54
py
Python
codingbat.com/Warmup-1/missing_char.py
ahmedelq/PythonicAlgorithms
ce10dbb6e1fd0ea5c922a932b0f920236aa411bf
[ "MIT" ]
null
null
null
codingbat.com/Warmup-1/missing_char.py
ahmedelq/PythonicAlgorithms
ce10dbb6e1fd0ea5c922a932b0f920236aa411bf
[ "MIT" ]
null
null
null
codingbat.com/Warmup-1/missing_char.py
ahmedelq/PythonicAlgorithms
ce10dbb6e1fd0ea5c922a932b0f920236aa411bf
[ "MIT" ]
null
null
null
def missing_char(str, n): return str[:n] + str[n+1:]
27
28
0.62963
def missing_char(str, n): return str[:n] + str[n+1:]
true
true
1c2dd48d13f791fc40091655352263415312c629
6,845
py
Python
sim_results/results/read_results.py
maxrudolph1/robotarium_mpe
025c182899c0092c95e1ed3c2a38117f257cbe25
[ "MIT" ]
null
null
null
sim_results/results/read_results.py
maxrudolph1/robotarium_mpe
025c182899c0092c95e1ed3c2a38117f257cbe25
[ "MIT" ]
null
null
null
sim_results/results/read_results.py
maxrudolph1/robotarium_mpe
025c182899c0092c95e1ed3c2a38117f257cbe25
[ "MIT" ]
null
null
null
import numpy as np from matplotlib import pyplot as plt import pandas as pd import seaborn as sb import matplotlib.patches as mpatches from scipy.stats import mannwhitneyu sb.set_theme(style="darkgrid") bcfc_rew = [] unif_rew = [] mono_rew = [] rand_rew = [] tasks = ['navigation','coverage','transport'] meths = ['exp...
32.595238
120
0.57195
import numpy as np from matplotlib import pyplot as plt import pandas as pd import seaborn as sb import matplotlib.patches as mpatches from scipy.stats import mannwhitneyu sb.set_theme(style="darkgrid") bcfc_rew = [] unif_rew = [] mono_rew = [] rand_rew = [] tasks = ['navigation','coverage','transport'] meths = ['exp...
true
true
1c2dd54f4917d6742cc724519b3825c068474f33
368
py
Python
pages/tests.py
waseidel/django
59b32cf9d0a9104976038015bcaea1243a8e48f9
[ "MIT" ]
null
null
null
pages/tests.py
waseidel/django
59b32cf9d0a9104976038015bcaea1243a8e48f9
[ "MIT" ]
null
null
null
pages/tests.py
waseidel/django
59b32cf9d0a9104976038015bcaea1243a8e48f9
[ "MIT" ]
null
null
null
# pages/tests.py from django.test import SimpleTestCase class PagesTests(SimpleTestCase): def test_home_page_status_code(self): response = self.client.get('/') self.assertEqual(response.status_code, 200) def test_about_page_status_code(self): response = self.client.get('/about/') ...
28.307692
51
0.714674
from django.test import SimpleTestCase class PagesTests(SimpleTestCase): def test_home_page_status_code(self): response = self.client.get('/') self.assertEqual(response.status_code, 200) def test_about_page_status_code(self): response = self.client.get('/about/') self.assertE...
true
true
1c2dd7bd6529ffac6d7aa07152e39823165fea30
52,799
py
Python
openprocurement/auctions/rubble/tests/blanks/migration_blanks.py
openprocurement/openprocurement.auctions.rubble
72369d411085fe50030f99320928636307b18426
[ "Apache-2.0" ]
1
2020-09-29T08:34:32.000Z
2020-09-29T08:34:32.000Z
openprocurement/auctions/rubble/tests/blanks/migration_blanks.py
openprocurement/openprocurement.auctions.rubble
72369d411085fe50030f99320928636307b18426
[ "Apache-2.0" ]
21
2018-06-06T12:45:49.000Z
2022-03-21T22:16:26.000Z
openprocurement/auctions/rubble/tests/blanks/migration_blanks.py
openprocurement/openprocurement.auctions.rubble
72369d411085fe50030f99320928636307b18426
[ "Apache-2.0" ]
8
2018-05-02T07:54:09.000Z
2019-03-06T14:31:12.000Z
# -*- coding: utf-8 -*- from copy import deepcopy from datetime import timedelta from uuid import uuid4 from openprocurement.auctions.core.utils import get_now # MigrateTestFrom1To2Bids def migrate_one_pending(self): auction = self.db.get(self.auction_id) award = { 'id': uuid4().hex, "date": ...
42.511272
170
0.645561
from copy import deepcopy from datetime import timedelta from uuid import uuid4 from openprocurement.auctions.core.utils import get_now def migrate_one_pending(self): auction = self.db.get(self.auction_id) award = { 'id': uuid4().hex, "date": get_now().isoformat(), "bid_id": auction...
true
true
1c2ddb1aa5471a29b28d3e92c036bb3198402c5f
186
py
Python
tests/test_loggers.py
DuinoDu/pl-extension
1ed8f3dd95aa569ee3493fcc69634d3ab9322430
[ "Apache-2.0" ]
null
null
null
tests/test_loggers.py
DuinoDu/pl-extension
1ed8f3dd95aa569ee3493fcc69634d3ab9322430
[ "Apache-2.0" ]
null
null
null
tests/test_loggers.py
DuinoDu/pl-extension
1ed8f3dd95aa569ee3493fcc69634d3ab9322430
[ "Apache-2.0" ]
null
null
null
from pl_extension.loggers import logging_logger def test_logginglogger(tmpdir): logger = logging_logger.LoggingLogger(tmpdir, prefix="ple") logger.info("hello, pl-extension!")
26.571429
63
0.774194
from pl_extension.loggers import logging_logger def test_logginglogger(tmpdir): logger = logging_logger.LoggingLogger(tmpdir, prefix="ple") logger.info("hello, pl-extension!")
true
true
1c2ddbf80da42ca685b9a2e8003bcc2cac058518
1,630
py
Python
lagou/lagou/pipelines.py
githubsuzhou/ScrapyLagou
1e505d584792046d47aea47d5b475fe3581cb51a
[ "Apache-2.0" ]
null
null
null
lagou/lagou/pipelines.py
githubsuzhou/ScrapyLagou
1e505d584792046d47aea47d5b475fe3581cb51a
[ "Apache-2.0" ]
null
null
null
lagou/lagou/pipelines.py
githubsuzhou/ScrapyLagou
1e505d584792046d47aea47d5b475fe3581cb51a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html import pymysql,json from scrapy.conf import settings class LagouPipeline(object): def process_item(self, item, spider): ...
46.571429
184
0.607362
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html import pymysql,json from scrapy.conf import settings class LagouPipeline(object): def process_item(self, item, spider): char=settings['CHARSET'] host = settings['MYSQL_HOST'] psd = settings['MYSQL_PASSWD'] db = ...
true
true
1c2ddc8f9a5d1ee3adbdbd7d0706246544cde6b7
5,748
py
Python
cloudbutton_geospatial/datafetch_utils/sentinel.py
berkevaroll/geospatial-usecase
d3db18607be0976badde073b3ee7c8b9613372e1
[ "Apache-2.0" ]
null
null
null
cloudbutton_geospatial/datafetch_utils/sentinel.py
berkevaroll/geospatial-usecase
d3db18607be0976badde073b3ee7c8b9613372e1
[ "Apache-2.0" ]
null
null
null
cloudbutton_geospatial/datafetch_utils/sentinel.py
berkevaroll/geospatial-usecase
d3db18607be0976badde073b3ee7c8b9613372e1
[ "Apache-2.0" ]
4
2021-03-29T09:03:52.000Z
2021-09-21T18:27:01.000Z
""" Este módulo contiene métodos de utilidad para la descarga de imágenes del satélite Sentinel-2. Los distintos tiles del sistema de coordenadas MGRS en que se divide España se pueden encontrar en esta web https://www.asturnatura.com/sinflac/utm-mgrs.php La documentación de la librería sentinelsat se puede consultar...
40.765957
124
0.705811
import collections import os import os.path import zipfile import sentinelsat SENT_USER = 'vmoreno' SENT_PASS = '12345678' BANDS_DIR = 'bands' ZIP_EXTENSION = ".zip" GRANULE_DIR = 'GRANULE' IMAGE_DATA_DIR = 'IMG_DATA' SAFE_EXTENSION = '.SAFE' JP2_EXTENSION = '.jp2' def download_products(tiles, start_date, end_da...
true
true
1c2ddde4c9264ef06c744be59061bedaa0f73663
926
py
Python
1.7.video_stream.py
enesonmez/opencv-learning
3cbefc16a8793b5f1c24cc9080c005b4f58714cd
[ "MIT" ]
null
null
null
1.7.video_stream.py
enesonmez/opencv-learning
3cbefc16a8793b5f1c24cc9080c005b4f58714cd
[ "MIT" ]
null
null
null
1.7.video_stream.py
enesonmez/opencv-learning
3cbefc16a8793b5f1c24cc9080c005b4f58714cd
[ "MIT" ]
null
null
null
import cv2 cap = cv2.VideoCapture(0) # 0 => pc kamerası, 1 => usb'ye bağlı kamera, 2 => # video'yu kaydetmek için fourcc = cv2.VideoWriter_fourcc(*'XVID') # 4 byte'lık video codec kodu alarak int veri döndürür. out = cv2.VideoWriter('img/output.avi', fourcc, 20.0, (640,480)) # video adı, codec code, fps, video size ...
40.26087
112
0.719222
import cv2 cap = cv2.VideoCapture(0) # video'yu kaydetmek için fourcc = cv2.VideoWriter_fourcc(*'XVID') out = cv2.VideoWriter('img/output.avi', fourcc, 20.0, (640,480)) # video adı, codec code, fps, video size while True: ret, frame = cap.read() # kameradan o anki görüntü okunuyor. ret => kamera çalışıp çalışm...
true
true
1c2dde7de9058c62d67b5be58652d6aa606b8599
1,509
py
Python
recursion-cellular/utils/logger.py
rebryk/kaggle
0c656f64ce681dd313ca5145f0ff834a1a6d822e
[ "MIT" ]
17
2019-01-11T01:57:29.000Z
2020-08-25T04:52:28.000Z
recursion-cellular/utils/logger.py
rebryk/kaggle
0c656f64ce681dd313ca5145f0ff834a1a6d822e
[ "MIT" ]
10
2020-01-28T23:01:43.000Z
2022-03-11T23:37:54.000Z
recursion-cellular/utils/logger.py
rebryk/kaggle
0c656f64ce681dd313ca5145f0ff834a1a6d822e
[ "MIT" ]
3
2019-01-11T03:12:04.000Z
2019-01-28T14:41:14.000Z
import logging import sys from pathlib import Path from typing import Union, Any from torch.utils.tensorboard import SummaryWriter class Logger(logging.Logger): """This class allows you to log information to the console, file and tensorboardX.""" LOG_FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(mess...
32.106383
89
0.603711
import logging import sys from pathlib import Path from typing import Union, Any from torch.utils.tensorboard import SummaryWriter class Logger(logging.Logger): LOG_FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s' DATE_FORMAT = '%m/%d/%Y %I:%M:%S %p' def __init__(self, n...
true
true
1c2de051eef67fd3e5e73674a713b6ba775d6631
4,282
py
Python
src/mbf_anysnake/util.py
IMTMarburg/mbf_anysnake
fab457a8058f74e5729fd6317393d126e0329f31
[ "MIT" ]
null
null
null
src/mbf_anysnake/util.py
IMTMarburg/mbf_anysnake
fab457a8058f74e5729fd6317393d126e0329f31
[ "MIT" ]
null
null
null
src/mbf_anysnake/util.py
IMTMarburg/mbf_anysnake
fab457a8058f74e5729fd6317393d126e0329f31
[ "MIT" ]
1
2021-04-15T06:44:15.000Z
2021-04-15T06:44:15.000Z
# -*- coding: future_fstrings -*- import re import requests import subprocess import time import shutil import time from pathlib import Path re_github = r"[A-Za-z0-9-]+\/[A-Za-z0-9]+" def combine_volumes(ro=[], rw=[]): d = dict() for (what, mode) in [(ro, "ro"), (rw, "rw")]: if isinstance(what, dict)...
30.368794
88
0.556049
import re import requests import subprocess import time import shutil import time from pathlib import Path re_github = r"[A-Za-z0-9-]+\/[A-Za-z0-9]+" def combine_volumes(ro=[], rw=[]): d = dict() for (what, mode) in [(ro, "ro"), (rw, "rw")]: if isinstance(what, dict): what = [what] ...
true
true
1c2de0769c358be38996bcb87d548b7c10da2a40
70
py
Python
test/test_cases/google_noqa.py
PFacheris/flake8-function-definition
74e7ee29dd3bccb08e5636603e60aaa4b7e505af
[ "MIT" ]
null
null
null
test/test_cases/google_noqa.py
PFacheris/flake8-function-definition
74e7ee29dd3bccb08e5636603e60aaa4b7e505af
[ "MIT" ]
1
2016-09-19T14:01:13.000Z
2016-09-20T00:36:41.000Z
test/test_cases/google_noqa.py
PFacheris/flake8-function-definition
74e7ee29dd3bccb08e5636603e60aaa4b7e505af
[ "MIT" ]
null
null
null
def foo( # noqa bar1, bar2, bar3, bar4 ): # noqa return
11.666667
21
0.514286
def foo( bar1, bar2, bar3, bar4 ): return
true
true
1c2de0ca36c4668ac520ad4379744e1b65453ae1
3,521
py
Python
app/wallet/permissions.py
HenriqueLR/payments
f2f7316fe12b683705e9a78813a86e43c08a2cf6
[ "MIT" ]
null
null
null
app/wallet/permissions.py
HenriqueLR/payments
f2f7316fe12b683705e9a78813a86e43c08a2cf6
[ "MIT" ]
9
2017-06-01T12:28:25.000Z
2017-10-26T11:21:37.000Z
app/wallet/permissions.py
HenriqueLR/payments
f2f7316fe12b683705e9a78813a86e43c08a2cf6
[ "MIT" ]
null
null
null
#encoding: utf-8 from django.db.models import Q from django.contrib.auth.decorators import login_required, user_passes_test from django.views.decorators.cache import never_cache from django.utils.decorators import method_decorator from django.http import Http404 from main.utils import apps_permissions, format_date ...
36.298969
91
0.664016
from django.db.models import Q from django.contrib.auth.decorators import login_required, user_passes_test from django.views.decorators.cache import never_cache from django.utils.decorators import method_decorator from django.http import Http404 from main.utils import apps_permissions, format_date class Permission...
true
true
1c2de10847f0ffbd5d32cfa1851e433c0275227d
1,654
py
Python
catalyst/utils/__init__.py
olgaiv39/catalyst
005a123482b0340c599a58856f396355a76a7db5
[ "Apache-2.0" ]
null
null
null
catalyst/utils/__init__.py
olgaiv39/catalyst
005a123482b0340c599a58856f396355a76a7db5
[ "Apache-2.0" ]
null
null
null
catalyst/utils/__init__.py
olgaiv39/catalyst
005a123482b0340c599a58856f396355a76a7db5
[ "Apache-2.0" ]
null
null
null
# flake8: noqa from .argparse import args_are_not_none, boolean_flag from .checkpoint import pack_checkpoint, unpack_checkpoint, \ save_checkpoint, load_checkpoint from .compression import pack, pack_if_needed, unpack, unpack_if_needed from .config import load_ordered_yaml, get_environment_vars, dump_environment, ...
47.257143
80
0.819831
from .argparse import args_are_not_none, boolean_flag from .checkpoint import pack_checkpoint, unpack_checkpoint, \ save_checkpoint, load_checkpoint from .compression import pack, pack_if_needed, unpack, unpack_if_needed from .config import load_ordered_yaml, get_environment_vars, dump_environment, \ parse_co...
true
true
1c2de16d36015f768686e1bdd57367d8a669bf1e
956
py
Python
setup.py
p-w/block-parser
180866de25f8133b412b15a022bd2dcad2ddef00
[ "Apache-2.0" ]
77
2016-02-23T04:42:53.000Z
2022-03-17T20:29:49.000Z
setup.py
p-w/block-parser
180866de25f8133b412b15a022bd2dcad2ddef00
[ "Apache-2.0" ]
6
2016-03-02T08:31:38.000Z
2020-02-28T13:06:53.000Z
setup.py
p-w/block-parser
180866de25f8133b412b15a022bd2dcad2ddef00
[ "Apache-2.0" ]
13
2016-02-24T11:32:04.000Z
2021-08-11T09:39:12.000Z
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='block-parser', version='1.0.0', description='A tool for parsing ...
31.866667
84
0.677824
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='block-parser', version='1.0.0', description='A tool for parsing ...
true
true
1c2de1ba4743e8b4b37bf5153ada3c6e67fdb3b9
688
py
Python
setup.py
vertiond/verthash-pospace
442c51b877f2c99327f6a2f8a946a210cb09f789
[ "MIT" ]
1
2021-05-23T23:55:43.000Z
2021-05-23T23:55:43.000Z
setup.py
vertiond/verthash-pospace
442c51b877f2c99327f6a2f8a946a210cb09f789
[ "MIT" ]
null
null
null
setup.py
vertiond/verthash-pospace
442c51b877f2c99327f6a2f8a946a210cb09f789
[ "MIT" ]
8
2020-09-05T02:48:13.000Z
2022-03-26T22:56:57.000Z
from setuptools import setup, Extension verthashsources = [ 'h2.c', 'tiny_sha3/sha3.c' ] verthashincludes = [ '.', './tiny_sha3' ] verthash_module = Extension('verthash', sources=verthashsources+['verthashmodule.c'], extra_compile_args=['-std=c99'], ...
27.52
74
0.603198
from setuptools import setup, Extension verthashsources = [ 'h2.c', 'tiny_sha3/sha3.c' ] verthashincludes = [ '.', './tiny_sha3' ] verthash_module = Extension('verthash', sources=verthashsources+['verthashmodule.c'], extra_compile_args=['-std=c99'], ...
true
true
1c2de21bd4edb67adc137df05213d1b1725e17c7
7,265
py
Python
slot/__init__.py
naqintosh/dl
3615b78b5fd7a7808a49bb0b9124b41842100a2e
[ "Apache-2.0" ]
null
null
null
slot/__init__.py
naqintosh/dl
3615b78b5fd7a7808a49bb0b9124b41842100a2e
[ "Apache-2.0" ]
null
null
null
slot/__init__.py
naqintosh/dl
3615b78b5fd7a7808a49bb0b9124b41842100a2e
[ "Apache-2.0" ]
null
null
null
import copy from core import Conf from ability import Ability, ability_dict from itertools import islice class Slot(object): att = 0 ele = 'none' wt = 'none' stype = 'slot' onele = 0 a = None mod = None conf = None def __init__(self): if not self.mod: self.mod =...
26.709559
119
0.494701
import copy from core import Conf from ability import Ability, ability_dict from itertools import islice class Slot(object): att = 0 ele = 'none' wt = 'none' stype = 'slot' onele = 0 a = None mod = None conf = None def __init__(self): if not self.mod: self.mod =...
true
true
1c2de30774589ca44009bc61cb6c73fe5ddc8883
2,464
py
Python
src/directional_clustering/transformations/smooth.py
arpastrana/directional_clustering
78fd39fe4ad207b2a639deddf4ba12d5580df5c6
[ "MIT" ]
6
2020-08-04T15:24:22.000Z
2022-02-02T21:34:33.000Z
src/directional_clustering/transformations/smooth.py
arpastrana/apc524_directional_clustering
9a53312c2ff983778253185f0f2946cd74e2bbd2
[ "MIT" ]
30
2020-11-12T17:13:30.000Z
2020-12-15T16:45:33.000Z
src/directional_clustering/transformations/smooth.py
arpastrana/directional_clustering
78fd39fe4ad207b2a639deddf4ba12d5580df5c6
[ "MIT" ]
3
2020-11-06T14:25:47.000Z
2020-11-07T15:03:05.000Z
from compas.geometry import add_vectors from compas.geometry import subtract_vectors from compas.geometry import scale_vector __all__ = ["smoothen_vector_field", "adjacent_vectors", "mean_vector", "smoothed_vector"] def smoothen_vector_field(vector_field, adjacency, iters, damping=0...
25.936842
80
0.648945
from compas.geometry import add_vectors from compas.geometry import subtract_vectors from compas.geometry import scale_vector __all__ = ["smoothen_vector_field", "adjacent_vectors", "mean_vector", "smoothed_vector"] def smoothen_vector_field(vector_field, adjacency, iters, damping=0...
true
true
1c2de324ee2d6f537bdcbce01218360cf5959274
8,551
py
Python
spytest/apis/system/logging.py
shubav/sonic-mgmt
0ff71b907a55489bb4ed7d17b1682380fd459bf2
[ "Apache-2.0" ]
132
2016-10-19T12:34:44.000Z
2022-03-16T09:00:39.000Z
spytest/apis/system/logging.py
shubav/sonic-mgmt
0ff71b907a55489bb4ed7d17b1682380fd459bf2
[ "Apache-2.0" ]
3,152
2016-09-21T23:05:58.000Z
2022-03-31T23:29:08.000Z
spytest/apis/system/logging.py
shubav/sonic-mgmt
0ff71b907a55489bb4ed7d17b1682380fd459bf2
[ "Apache-2.0" ]
563
2016-09-20T01:00:15.000Z
2022-03-31T22:43:54.000Z
# This file contains the list of API's which performs logging / Syslog operations. # Author : Prudvi Mangadu (prudvi.mangadu@broadcom.com) import re import json from spytest import st, putils import apis.system.connection as conf_obj import apis.system.switch_configuration as sc_obj import utilities.utils as utils ...
32.637405
110
0.652672
# Author : Prudvi Mangadu (prudvi.mangadu@broadcom.com) import re import json from spytest import st, putils import apis.system.connection as conf_obj import apis.system.switch_configuration as sc_obj import utilities.utils as utils from utilities.common import make_list log_files = [r'/var/log/syslog', r'/var/l...
true
true
1c2de8c8c223f883eb5c6e24df71e2795c55607e
45,417
py
Python
env/lib/python3.8/site-packages/pandas/tests/groupby/test_categorical.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
1,738
2017-09-21T10:59:12.000Z
2022-03-31T21:05:46.000Z
env/lib/python3.8/site-packages/pandas/tests/groupby/test_categorical.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
427
2017-09-29T22:54:36.000Z
2022-02-15T19:26:50.000Z
env/lib/python3.8/site-packages/pandas/tests/groupby/test_categorical.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
671
2017-09-21T08:04:01.000Z
2022-03-29T14:30:07.000Z
from datetime import datetime import numpy as np import pytest from pandas.compat import PY37 import pandas as pd from pandas import ( Categorical, CategoricalIndex, DataFrame, Index, MultiIndex, Series, qcut, ) import pandas._testing as tm def cartesian_product_for_groupers(result, arg...
32.934735
88
0.571592
from datetime import datetime import numpy as np import pytest from pandas.compat import PY37 import pandas as pd from pandas import ( Categorical, CategoricalIndex, DataFrame, Index, MultiIndex, Series, qcut, ) import pandas._testing as tm def cartesian_product_for_groupers(result, arg...
true
true
1c2dea0484ffeef999767ba4ebabb9f092c5771c
10,585
py
Python
desktop/core/ext-py/eventlet-0.21.0/eventlet/tpool.py
HSunboy/hue
caccd8c058eabb8f5899006a6566be46e3af871b
[ "Apache-2.0" ]
1
2021-06-06T04:10:44.000Z
2021-06-06T04:10:44.000Z
desktop/core/ext-py/eventlet-0.21.0/eventlet/tpool.py
HSunboy/hue
caccd8c058eabb8f5899006a6566be46e3af871b
[ "Apache-2.0" ]
null
null
null
desktop/core/ext-py/eventlet-0.21.0/eventlet/tpool.py
HSunboy/hue
caccd8c058eabb8f5899006a6566be46e3af871b
[ "Apache-2.0" ]
2
2019-06-17T11:51:56.000Z
2020-07-25T08:29:56.000Z
# Copyright (c) 2007-2009, Linden Research, Inc. # Copyright (c) 2007, IBM Corp. # # 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 re...
31.409496
83
0.649032
import atexit import imp import os import sys import traceback import eventlet from eventlet import event, greenio, greenthread, patcher, timeout from eventlet.support import six __all__ = ['execute', 'Proxy', 'killall', 'set_num_threads'] EXC_CLASSES = (Exception, timeout.Timeout) SYS_EXCS = (Genera...
true
true
1c2deb37c0ac62169875bd44d9a996130cb99911
1,205
py
Python
torch2trt_dynamic/converters/squeeze.py
jinfagang/pilgrim_torch2trt
27a8e6a195cbc3a83b16483ec4c0930da4aa77e6
[ "MIT" ]
20
2020-10-10T06:14:50.000Z
2021-09-22T08:50:16.000Z
torch2trt_dynamic/converters/squeeze.py
jinfagang/pilgrim_torch2trt
27a8e6a195cbc3a83b16483ec4c0930da4aa77e6
[ "MIT" ]
2
2020-11-02T11:45:24.000Z
2021-02-17T15:20:04.000Z
torch2trt_dynamic/converters/squeeze.py
jinfagang/pilgrim_torch2trt
27a8e6a195cbc3a83b16483ec4c0930da4aa77e6
[ "MIT" ]
4
2020-10-10T05:14:18.000Z
2020-10-27T01:47:30.000Z
from torch2trt_dynamic.torch2trt_dynamic import * from torch2trt_dynamic.module_test import add_module_test from .identity import * @tensorrt_converter('torch.Tensor.squeeze') @tensorrt_converter('torch.squeeze') def convert_squeeze(ctx): input = ctx.method_args[0] dim = get_arg(ctx, 'dim',...
36.515152
102
0.663071
from torch2trt_dynamic.torch2trt_dynamic import * from torch2trt_dynamic.module_test import add_module_test from .identity import * @tensorrt_converter('torch.Tensor.squeeze') @tensorrt_converter('torch.squeeze') def convert_squeeze(ctx): input = ctx.method_args[0] dim = get_arg(ctx, 'dim',...
true
true
1c2deb6095ef7a4cf2ee20f56169182f5e2efe48
35,086
py
Python
plugins/modules/dellemc_unity_smbshare.py
fobrice/ansible-unity
ad7271cf285ee07a18abdbb06e4490c091c936cb
[ "Apache-2.0" ]
null
null
null
plugins/modules/dellemc_unity_smbshare.py
fobrice/ansible-unity
ad7271cf285ee07a18abdbb06e4490c091c936cb
[ "Apache-2.0" ]
null
null
null
plugins/modules/dellemc_unity_smbshare.py
fobrice/ansible-unity
ad7271cf285ee07a18abdbb06e4490c091c936cb
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright: (c) 2020, DellEMC from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community' } DOCUMENTATION = r''' ...
40.94049
103
0.60745
from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community' } DOCUMENTATION = r''' --- module: dellemc_unity_smbshare version_adde...
true
true
1c2deb96868b2115a7d83bdec3c3e111743d28b1
13,072
py
Python
neutron/plugins/ml2/db.py
krissterckx/neutron
396deed808dc9b69d4641ffe16bcbe6655bc6cd5
[ "Apache-2.0" ]
null
null
null
neutron/plugins/ml2/db.py
krissterckx/neutron
396deed808dc9b69d4641ffe16bcbe6655bc6cd5
[ "Apache-2.0" ]
null
null
null
neutron/plugins/ml2/db.py
krissterckx/neutron
396deed808dc9b69d4641ffe16bcbe6655bc6cd5
[ "Apache-2.0" ]
1
2020-02-29T18:29:59.000Z
2020-02-29T18:29:59.000Z
# Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
38.110787
79
0.662255
from neutron_lib.api.definitions import portbindings from neutron_lib.callbacks import events from neutron_lib.callbacks import registry from neutron_lib.callbacks import resources from neutron_lib import constants as n_const from neutron_lib.db import api as db_api from neutron_lib.plugins import direct...
true
true
1c2deba39066dfdf0e1f993d8003d0900604f9f3
1,011
py
Python
tempest/services/volume/base/base_availability_zone_client.py
Hybrid-Cloud/hybrid-tempest
319e90c6fa6e46925b495c93cd5258f088a30ec0
[ "Apache-2.0" ]
3
2016-07-15T12:27:23.000Z
2021-04-23T04:41:10.000Z
tempest/services/volume/base/base_availability_zone_client.py
LIS/lis-tempest
8e6403b2d6de81c5d18ed867b4977385c8278b75
[ "Apache-2.0" ]
null
null
null
tempest/services/volume/base/base_availability_zone_client.py
LIS/lis-tempest
8e6403b2d6de81c5d18ed867b4977385c8278b75
[ "Apache-2.0" ]
12
2016-07-14T18:13:05.000Z
2017-07-08T18:45:42.000Z
# Copyright 2014 NEC Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
36.107143
78
0.733927
from oslo_serialization import jsonutils as json from tempest.lib.common import rest_client class BaseAvailabilityZoneClient(rest_client.RestClient): def list_availability_zones(self): resp, body = self.get('os-availability-zone') body = json.loads(body) self.expected_succ...
true
true
1c2dec8c24007e60bf500f4a92983eb7e68a347f
262
py
Python
charactertype.py
pawankumarsharm/Pythoncoding
f0e5f6c1d22b101e109088529640326dd5405a6a
[ "bzip2-1.0.6" ]
null
null
null
charactertype.py
pawankumarsharm/Pythoncoding
f0e5f6c1d22b101e109088529640326dd5405a6a
[ "bzip2-1.0.6" ]
null
null
null
charactertype.py
pawankumarsharm/Pythoncoding
f0e5f6c1d22b101e109088529640326dd5405a6a
[ "bzip2-1.0.6" ]
null
null
null
print('Durga786'.isalnum()) #True print('durga786'.isalpha())#False print('durga'.isalpha()) #True print('durga'.islower()) #True print('durga'.isupper()) #False print('Durga Software Solutions'.istitle()) #True print('Durga Software Solutions'.isspace()) #True
32.75
49
0.721374
print('Durga786'.isalnum()) print('durga786'.isalpha()) print('durga'.isalpha()) print('durga'.islower()) print('durga'.isupper()) print('Durga Software Solutions'.istitle()) print('Durga Software Solutions'.isspace())
true
true
1c2decf1c1c20da6ef2ec52b0d97bfc386723926
1,374
py
Python
face_recognition.py
Vargha-Kh/Face-Recognition
b0990be8b145e5529e138b31ba988710397fca6d
[ "CC-BY-3.0", "MIT" ]
2
2022-03-16T11:40:16.000Z
2022-03-18T12:38:16.000Z
face_recognition.py
Vargha-Kh/Face-Recognition
b0990be8b145e5529e138b31ba988710397fca6d
[ "CC-BY-3.0", "MIT" ]
null
null
null
face_recognition.py
Vargha-Kh/Face-Recognition
b0990be8b145e5529e138b31ba988710397fca6d
[ "CC-BY-3.0", "MIT" ]
null
null
null
from add_face import AddingFace from deepface import DeepFace import sys if __name__ == '__main__': while True: print(" ************ main menu ************") print('1. Add a new face') print('2. Recognize a face') print('3. Exit') database_path = '/home/vargha/Desktop/data...
36.157895
103
0.52984
from add_face import AddingFace from deepface import DeepFace import sys if __name__ == '__main__': while True: print(" ************ main menu ************") print('1. Add a new face') print('2. Recognize a face') print('3. Exit') database_path = '/home/vargha/Desktop/data...
true
true
1c2def4561651ae473540f97572120d8637b7556
431
py
Python
u3dunpack/file/serialized/SerializedFileHeader.py
smalls0098/u3d-studio
b5fb9875afdebaf457ee75c3ab42e4e828a88680
[ "MIT" ]
1
2020-07-27T03:43:47.000Z
2020-07-27T03:43:47.000Z
u3dunpack/file/serialized/SerializedFileHeader.py
smalls0098/u3d-assets-tools
b5fb9875afdebaf457ee75c3ab42e4e828a88680
[ "MIT" ]
null
null
null
u3dunpack/file/serialized/SerializedFileHeader.py
smalls0098/u3d-assets-tools
b5fb9875afdebaf457ee75c3ab42e4e828a88680
[ "MIT" ]
1
2021-10-03T11:23:14.000Z
2021-10-03T11:23:14.000Z
from ...streams import EndianBinaryReader class SerializedFileHeader: metadataSize: int fileSize: int version: int dataOffset: int endian: bytes reserved: bytes def __init__(self, reader: EndianBinaryReader): self.metadataSize = reader.readUInt() self.fileSi...
23.944444
52
0.651972
from ...streams import EndianBinaryReader class SerializedFileHeader: metadataSize: int fileSize: int version: int dataOffset: int endian: bytes reserved: bytes def __init__(self, reader: EndianBinaryReader): self.metadataSize = reader.readUInt() self.fileSi...
true
true
1c2defcad6eb30907b1195b71d0eb2c40d5b42ff
4,390
py
Python
analyses/utils.py
lukassnoek/MVCA
dd194140a5babb4605b9248d34508b9d9e4f799c
[ "MIT" ]
11
2018-03-29T09:39:28.000Z
2021-09-09T15:49:53.000Z
analyses/suppl_simulations/utils.py
lukassnoek/MVCA
dd194140a5babb4605b9248d34508b9d9e4f799c
[ "MIT" ]
2
2021-02-04T11:10:34.000Z
2022-03-07T14:41:54.000Z
analyses/suppl_simulations/utils.py
lukassnoek/MVCA
dd194140a5babb4605b9248d34508b9d9e4f799c
[ "MIT" ]
3
2018-04-12T09:11:31.000Z
2018-11-30T10:17:54.000Z
import numpy as np from scipy.special import hyp2f1, gammaln def get_r2(iv, dv, stack_intercept=True): """ Regress dv onto iv and return r-squared. Parameters ---------- iv : numpy array Array of shape N (samples) x K (features) dv : numpy array Array of shape N (samples) x 1 ...
29.463087
102
0.580182
import numpy as np from scipy.special import hyp2f1, gammaln def get_r2(iv, dv, stack_intercept=True): if iv.ndim == 1: iv = iv[:, np.newaxis] if stack_intercept: iv = np.hstack((np.ones((iv.shape[0], 1)), iv)) beta = np.linalg.lstsq(iv, dv)[0] dv_hat = iv.dot(b...
true
true
1c2df018e40f65e521e67b3ef8b247d491b3a2e4
1,628
py
Python
Tetris/events.py
Yatsuuw/Jeux-Python
3c9bce9f41b537897ea88ef1fe329be6820ab7aa
[ "MIT" ]
null
null
null
Tetris/events.py
Yatsuuw/Jeux-Python
3c9bce9f41b537897ea88ef1fe329be6820ab7aa
[ "MIT" ]
null
null
null
Tetris/events.py
Yatsuuw/Jeux-Python
3c9bce9f41b537897ea88ef1fe329be6820ab7aa
[ "MIT" ]
null
null
null
import pygame from sys import exit # écouter chaque événement et réagir def check_events(sqs, status, AI): for event in pygame.event.get(): if event.type == pygame.QUIT: exit() if event.type == pygame.KEYDOWN: key_down(sqs, event.key, status) if event.type == pygame....
29.071429
47
0.60688
import pygame from sys import exit def check_events(sqs, status, AI): for event in pygame.event.get(): if event.type == pygame.QUIT: exit() if event.type == pygame.KEYDOWN: key_down(sqs, event.key, status) if event.type == pygame.KEYUP: key_up(event.key,...
true
true
1c2df1ce4dc3ae3a428f9f69916080e0009f64ea
29,376
py
Python
sphinxcontrib/matlab.py
ilent2/matlabdomain
73776457ca0f81266de9ada227354e4322a92bbe
[ "BSD-2-Clause" ]
null
null
null
sphinxcontrib/matlab.py
ilent2/matlabdomain
73776457ca0f81266de9ada227354e4322a92bbe
[ "BSD-2-Clause" ]
null
null
null
sphinxcontrib/matlab.py
ilent2/matlabdomain
73776457ca0f81266de9ada227354e4322a92bbe
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ sphinxcontrib.matlab ~~~~~~~~~~~~~~~~~~~~ The MATLAB domain. :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import absolute_import, unicode_literals from . import mat_documenters as doc from ....
38.150649
92
0.542382
from __future__ import absolute_import, unicode_literals from . import mat_documenters as doc from . import mat_directives import re from docutils import nodes from docutils.parsers.rst import directives, Directive from sphinx import addnodes from sphinx.roles import XRefRole from sphinx.locale import _ from sphinx...
true
true
1c2df23cd27c41834a1e60dfbcd69a296561cd37
19,531
py
Python
boxUpdate/boxUpdate.py
bobofei/Mohou_Box-master
3d1c320a6258422406e2ba2f96ec7986beba1330
[ "Apache-2.0" ]
null
null
null
boxUpdate/boxUpdate.py
bobofei/Mohou_Box-master
3d1c320a6258422406e2ba2f96ec7986beba1330
[ "Apache-2.0" ]
null
null
null
boxUpdate/boxUpdate.py
bobofei/Mohou_Box-master
3d1c320a6258422406e2ba2f96ec7986beba1330
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- import sys reload(sys) sys.setdefaultencoding('utf8') #sys.path.append("/home/pi/oprint/lib/python2.7/site-packages/tornado-4.0.1-py2.7-linux-armv7l.egg/") #sys.path.append("/home/pi/oprint/lib/python2.7/site-packages/backports.ssl_match_hostname-3.4.0.2-py2.7.egg/") imp...
45.526807
176
0.584711
import sys reload(sys) sys.setdefaultencoding('utf8') import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web import uuid import hashlib import time import logging import os import urllib import httplib import json import md5 from tornado.httpclient import HTTPClient from tornad...
true
true
1c2df3dddda4b02ec9b4bef2f12046d3516e3362
358
py
Python
sboapp/migrations/0002_auto_20180504_0704.py
tmaunier/sboucru
c01c34f909fb89b9eb35c476ff4ac595116ad024
[ "MIT" ]
3
2020-11-18T10:11:40.000Z
2021-11-08T08:48:05.000Z
sboapp/migrations/0002_auto_20180504_0704.py
tmaunier/sboucru
c01c34f909fb89b9eb35c476ff4ac595116ad024
[ "MIT" ]
3
2020-06-05T18:42:49.000Z
2021-06-10T20:42:06.000Z
sboapp/migrations/0002_auto_20180504_0704.py
tmaunier/sboucru
c01c34f909fb89b9eb35c476ff4ac595116ad024
[ "MIT" ]
null
null
null
# Generated by Django 2.0.3 on 2018-05-04 07:04 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('sboapp', '0001_initial'), ] operations = [ migrations.RenameField( model_name='serum', old_name='birth_date', ne...
18.842105
47
0.578212
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('sboapp', '0001_initial'), ] operations = [ migrations.RenameField( model_name='serum', old_name='birth_date', new_name='birth_year', ), ]
true
true
1c2df4f095a2a8b079e34af579926a63403363c4
5,467
py
Python
tg/request_local.py
devilicecream/tg2
0aadc0d1595e7326b187deb7b0198de1715225b0
[ "MIT" ]
null
null
null
tg/request_local.py
devilicecream/tg2
0aadc0d1595e7326b187deb7b0198de1715225b0
[ "MIT" ]
null
null
null
tg/request_local.py
devilicecream/tg2
0aadc0d1595e7326b187deb7b0198de1715225b0
[ "MIT" ]
null
null
null
import hmac, base64, binascii, re from tg.support.objectproxy import TurboGearsObjectProxy from tg.support.registry import StackedObjectProxy, DispatchingConfig from tg.caching import cached_property try: import cPickle as pickle except ImportError: #pragma: no cover import pickle try: from hashlib import...
31.601156
115
0.674227
import hmac, base64, binascii, re from tg.support.objectproxy import TurboGearsObjectProxy from tg.support.registry import StackedObjectProxy, DispatchingConfig from tg.caching import cached_property try: import cPickle as pickle except ImportError: import pickle try: from hashlib import sha1 except Impo...
true
true
1c2df54ecc53525de3e6db310a0b230620103196
14,415
py
Python
tests/storage/test_client_ips.py
rhetenor/synapse
5154afc00d841c7685a97700be3cd1398e633e05
[ "Apache-2.0" ]
7
2020-07-03T13:51:31.000Z
2022-03-10T01:26:18.000Z
tests/storage/test_client_ips.py
rhetenor/synapse
5154afc00d841c7685a97700be3cd1398e633e05
[ "Apache-2.0" ]
69
2019-09-09T13:54:30.000Z
2022-03-23T10:45:15.000Z
tests/storage/test_client_ips.py
rhetenor/synapse
5154afc00d841c7685a97700be3cd1398e633e05
[ "Apache-2.0" ]
7
2020-04-24T17:04:40.000Z
2021-07-29T23:06:25.000Z
# Copyright 2016 OpenMarket Ltd # Copyright 2018 New Vector Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
31.405229
87
0.549636
from unittest.mock import Mock import synapse.rest.admin from synapse.http.site import XForwardedForRequest from synapse.rest.client import login from tests import unittest from tests.server import make_request from tests.test_utils import make_awaitable from tests.unittest import override_config cla...
true
true