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
f7421c61dc4a9f2905083616a76cf5c9a110855b
4,688
py
Python
main.py
Davidswinkels/DownloadWalkingRoutes
9ceaee0b96507149086aef7081790a09ab6b3653
[ "Apache-2.0" ]
null
null
null
main.py
Davidswinkels/DownloadWalkingRoutes
9ceaee0b96507149086aef7081790a09ab6b3653
[ "Apache-2.0" ]
null
null
null
main.py
Davidswinkels/DownloadWalkingRoutes
9ceaee0b96507149086aef7081790a09ab6b3653
[ "Apache-2.0" ]
null
null
null
from scripts.downloader import * import fiona from shapely.geometry import shape import geopandas as gpd import matplotlib.pyplot as plt from pprint import pprint import requests import json import time import os # Constant variables input_min_lat = 50.751797561 input_min_lon = 5.726110232 input_max_lat = 50.938216069...
53.272727
133
0.588097
from scripts.downloader import * import fiona from shapely.geometry import shape import geopandas as gpd import matplotlib.pyplot as plt from pprint import pprint import requests import json import time import os input_min_lat = 50.751797561 input_min_lon = 5.726110232 input_max_lat = 50.938216069 input_max_lon = 6.1...
true
true
f7421d81349d859b4d67819456d7204314191856
5,095
py
Python
elyra/elyra_app.py
lresende/elyra
d62f6933003887449686610967111d2a3fd115aa
[ "Apache-2.0" ]
null
null
null
elyra/elyra_app.py
lresende/elyra
d62f6933003887449686610967111d2a3fd115aa
[ "Apache-2.0" ]
null
null
null
elyra/elyra_app.py
lresende/elyra
d62f6933003887449686610967111d2a3fd115aa
[ "Apache-2.0" ]
null
null
null
# # Copyright 2018-2021 Elyra Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
45.491071
115
0.750736
import os from jupyter_server.extension.application import ExtensionApp from jupyter_server.extension.application import ExtensionAppJinjaMixin from elyra._version import __version__ from elyra.api.handlers import YamlSpecHandler from elyra.contents.handlers import ContentHandler from elyra.metadata.ha...
true
true
f7421d98eda4f2491161fc476f629a50e65d92cc
8,051
py
Python
RGBDFace/utils/face.py
liggest/RGBDFace
75768b1848f03d3e9d53913546b19cce0b1ada67
[ "MIT" ]
1
2021-06-10T16:08:18.000Z
2021-06-10T16:08:18.000Z
RGBDFace/utils/face.py
liggest/RGBDFace
75768b1848f03d3e9d53913546b19cce0b1ada67
[ "MIT" ]
null
null
null
RGBDFace/utils/face.py
liggest/RGBDFace
75768b1848f03d3e9d53913546b19cce0b1ada67
[ "MIT" ]
null
null
null
import numpy as np # import open3d as o3d import face_recognition # import cv2 from skimage import draw #,morphology # from .depth import depthPreprocess from .image import getConvexHullMask,getMaskedImg2, maskClosing,maskDilation,maskErosion def faceLandmarks(image): ''' 人脸边框+特征点 ''' image=np.as...
37.273148
112
0.70985
import numpy as np import face_recognition from skimage import draw from .image import getConvexHullMask,getMaskedImg2, maskClosing,maskDilation,maskErosion def faceLandmarks(image): image=np.asarray(image) locations=face_recognition.face_locations(image) if not locations: return None,None ...
true
true
f7421e409e1a14805af9c1bfa029d410c0aecf02
2,238
py
Python
Classifier_shah.py
meetshah91/Class-Identifier
ab215ef685164ac450996844a8d0a56c34d013e6
[ "MIT" ]
null
null
null
Classifier_shah.py
meetshah91/Class-Identifier
ab215ef685164ac450996844a8d0a56c34d013e6
[ "MIT" ]
null
null
null
Classifier_shah.py
meetshah91/Class-Identifier
ab215ef685164ac450996844a8d0a56c34d013e6
[ "MIT" ]
null
null
null
import math import sys import pandas as pd from decison_tree import decision_btree from file_healper import file_operation def classify_validation_data(cls_validation_data): classification_result = list() for idx in cls_validation_data.index: if cls_validation_data["TailLn"][idx]<=9.0: if cls_validati...
30.243243
75
0.655049
import math import sys import pandas as pd from decison_tree import decision_btree from file_healper import file_operation def classify_validation_data(cls_validation_data): classification_result = list() for idx in cls_validation_data.index: if cls_validation_data["TailLn"][idx]<=9.0: if cls_validati...
true
true
f7421e9f56ec9815ff71cff91744f89c3fb3f15f
3,530
py
Python
utils.py
defensetongxue/pyGAT
5677b15be986b0650b883cdd20dbfb1bb486d6f5
[ "MIT" ]
null
null
null
utils.py
defensetongxue/pyGAT
5677b15be986b0650b883cdd20dbfb1bb486d6f5
[ "MIT" ]
null
null
null
utils.py
defensetongxue/pyGAT
5677b15be986b0650b883cdd20dbfb1bb486d6f5
[ "MIT" ]
null
null
null
import numpy as np import scipy.sparse as sp import torch import json as js import pandas as pd def encode_onehot(labels): # The classes must be sorted before encoding to enable static class encoding. # In other words, make sure the first class always maps to index 0. classes = sorted(list(set(labels))) ...
37.553191
142
0.652125
import numpy as np import scipy.sparse as sp import torch import json as js import pandas as pd def encode_onehot(labels): classes = sorted(list(set(labels))) classes_dict = {c: np.identity(len(classes))[i, :] for i, c in enumerate(classes)} labels_onehot = np.array(list(map(classes_dict.get, lab...
true
true
f7421f87a99a927a6118a3682dbbc37b720d089c
614
py
Python
sgmon/nr.py
relistan/singularity-monitor
ddb1dcd1d43d6d901ff367850198f4a141f01c0d
[ "MIT" ]
null
null
null
sgmon/nr.py
relistan/singularity-monitor
ddb1dcd1d43d6d901ff367850198f4a141f01c0d
[ "MIT" ]
1
2019-10-15T21:10:01.000Z
2019-11-14T16:25:18.000Z
sgmon/nr.py
relistan/singularity-monitor
ddb1dcd1d43d6d901ff367850198f4a141f01c0d
[ "MIT" ]
1
2019-10-16T10:10:21.000Z
2019-10-16T10:10:21.000Z
import os import logging import newrelic.agent as agent from sgmon.log import get_logger logger = get_logger(__name__) def init_newrelic_agent(): try: _ = os.environ["NEW_RELIC_LICENSE_KEY"] except KeyError: logger.info("Agent will not report data to New Relic APM") else: config_...
27.909091
66
0.692182
import os import logging import newrelic.agent as agent from sgmon.log import get_logger logger = get_logger(__name__) def init_newrelic_agent(): try: _ = os.environ["NEW_RELIC_LICENSE_KEY"] except KeyError: logger.info("Agent will not report data to New Relic APM") else: config_...
true
true
f7421faefdbb37474b33a7e9ab63a0e6a6b978d3
5,975
py
Python
test/functional/rpc_users.py
zzcasper/JNita-Coin-Sources
bbe8b5d647d993611021cc12d79c4e509dae5a78
[ "MIT" ]
null
null
null
test/functional/rpc_users.py
zzcasper/JNita-Coin-Sources
bbe8b5d647d993611021cc12d79c4e509dae5a78
[ "MIT" ]
null
null
null
test/functional/rpc_users.py
zzcasper/JNita-Coin-Sources
bbe8b5d647d993611021cc12d79c4e509dae5a78
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test multiple RPC users.""" from test_framework.test_framework import BitcoinTestFramework from test_f...
38.798701
129
0.613556
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import str_to_b64str, assert_equal import os import http.client import urllib.parse class HTTPBasicsTest (BitcoinTestFramework): def set_test_params(self): self.num_nodes = 2 def setup_chain(self): su...
true
true
f7421fc599e53f32dad63efa64c062d82c605e44
3,124
py
Python
Project/make_post.py
JonnyPugh/WordpostBot
3fcd485edf594a9098e210790b22f0a9caa9933d
[ "MIT" ]
null
null
null
Project/make_post.py
JonnyPugh/WordpostBot
3fcd485edf594a9098e210790b22f0a9caa9933d
[ "MIT" ]
null
null
null
Project/make_post.py
JonnyPugh/WordpostBot
3fcd485edf594a9098e210790b22f0a9caa9933d
[ "MIT" ]
null
null
null
#!/usr/bin/env python from extensions import * from config import * from sets import Set from re import match def get_wordnik_json(route, extra_params): params = { "limit": 1, "api_key": wordnik_key } params.update(extra_params) request_json = [] while not request_json: request_json = get_request_json("htt...
42.216216
432
0.709347
from extensions import * from config import * from sets import Set from re import match def get_wordnik_json(route, extra_params): params = { "limit": 1, "api_key": wordnik_key } params.update(extra_params) request_json = [] while not request_json: request_json = get_request_json("https://api.wordnik.com/...
true
true
f7422123c4ff2af193eb05d8808126b771bddc6a
2,719
py
Python
idfy_rest_client/models/packaging.py
dealflowteam/Idfy
fa3918a6c54ea0eedb9146578645b7eb1755b642
[ "MIT" ]
null
null
null
idfy_rest_client/models/packaging.py
dealflowteam/Idfy
fa3918a6c54ea0eedb9146578645b7eb1755b642
[ "MIT" ]
null
null
null
idfy_rest_client/models/packaging.py
dealflowteam/Idfy
fa3918a6c54ea0eedb9146578645b7eb1755b642
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ idfy_rest_client.models.packaging This file was automatically generated for Idfy by APIMATIC v2.0 ( https://apimatic.io ) """ import idfy_rest_client.models.pades_settings class Packaging(object): """Implementation of the 'Packaging' model. TODO: type model ...
34.417722
172
0.638838
import idfy_rest_client.models.pades_settings class Packaging(object): _names = { "signature_package_formats":'signaturePackageFormats', "pades_settings":'padesSettings' } def __init__(self, signature_package_formats=None, pades_setti...
true
true
f742212e7d3764151798805df46cf2ba8e7c0d01
7,778
py
Python
official/projects/yt8m/dataloaders/yt8m_input_test.py
wnorris/models
a5e4965d1f4e4b02d51aa344336b6fff53af7c17
[ "Apache-2.0" ]
1
2020-09-14T10:46:07.000Z
2020-09-14T10:46:07.000Z
official/projects/yt8m/dataloaders/yt8m_input_test.py
wnorris/models
a5e4965d1f4e4b02d51aa344336b6fff53af7c17
[ "Apache-2.0" ]
null
null
null
official/projects/yt8m/dataloaders/yt8m_input_test.py
wnorris/models
a5e4965d1f4e4b02d51aa344336b6fff53af7c17
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.887179
80
0.700437
import os from absl import logging from absl.testing import parameterized import numpy as np import tensorflow as tf from official.core import input_reader from official.projects.yt8m.configs import yt8m as yt8m_configs from official.projects.yt8m.dataloaders import utils from official.projects.yt8m.dat...
true
true
f74221b001745c7f5c3c8a00f32e750084d8c97c
6,577
py
Python
sgsclient/__init__.py
stratumgs/stratum-client-libs
5bbc52036860535316d0fe833315c7b53af4ee01
[ "MIT" ]
null
null
null
sgsclient/__init__.py
stratumgs/stratum-client-libs
5bbc52036860535316d0fe833315c7b53af4ee01
[ "MIT" ]
null
null
null
sgsclient/__init__.py
stratumgs/stratum-client-libs
5bbc52036860535316d0fe833315c7b53af4ee01
[ "MIT" ]
null
null
null
""" .. module sgsclient This module contains the client library code. In general, a client should subclass ``StratumGSClientInstance`` and call the ``main`` function. """ import json import socket import sys version = "0.1.0" class StratumGSClient(object): def __init__(self, settings, client_instance_constru...
33.050251
89
0.590695
import json import socket import sys version = "0.1.0" class StratumGSClient(object): def __init__(self, settings, client_instance_constructor): self._settings = settings self._socket = None self._socket_readfile = None self._socket_writefile = None self._client_instanc...
true
true
f7422296ebefa821653e07a5f93e36b497c20bbe
27,260
py
Python
cvat/apps/dataset_manager/task.py
gitibharatibiswal/cvat-adas-team
a33c1ae38d79ed6e35a61a97b74cd2978853e4c2
[ "Intel", "MIT" ]
2
2022-03-13T03:45:15.000Z
2022-03-13T03:46:19.000Z
cvat/apps/dataset_manager/task.py
nav13n/cvat
9bdcc7f8f2d86a763ab5f306ea049ce1432da557
[ "Intel", "MIT" ]
9
2021-07-15T13:42:33.000Z
2021-09-22T12:43:07.000Z
cvat/apps/dataset_manager/task.py
nav13n/cvat
9bdcc7f8f2d86a763ab5f306ea049ce1432da557
[ "Intel", "MIT" ]
41
2020-12-16T05:52:41.000Z
2021-09-23T08:45:16.000Z
# Copyright (C) 2019-2021 Intel Corporation # # SPDX-License-Identifier: MIT from collections import OrderedDict from enum import Enum from django.conf import settings from django.db import transaction from django.utils import timezone from cvat.apps.engine import models, serializers from cvat.apps.engine.plugins i...
35.494792
110
0.617498
from collections import OrderedDict from enum import Enum from django.conf import settings from django.db import transaction from django.utils import timezone from cvat.apps.engine import models, serializers from cvat.apps.engine.plugins import plugin_decorator from cvat.apps.profiler import silk_profile from ....
true
true
f742240ea53e33fcd737210f6c04b29b16bb4de3
413
py
Python
build/lib/admintool_command/command.py
jayvdb/django-admintool-command
aee5f8f003b5956e3a3e7df4957c5b839ffd8341
[ "MIT" ]
3
2019-08-07T23:33:19.000Z
2021-03-26T11:08:12.000Z
build/lib/admintool_command/command.py
jayvdb/django-admintool-command
aee5f8f003b5956e3a3e7df4957c5b839ffd8341
[ "MIT" ]
6
2020-04-27T13:09:42.000Z
2020-08-16T06:36:02.000Z
build/lib/admintool_command/command.py
jayvdb/django-admintool-command
aee5f8f003b5956e3a3e7df4957c5b839ffd8341
[ "MIT" ]
1
2020-08-07T05:52:46.000Z
2020-08-07T05:52:46.000Z
from abc import ABC, abstractmethod from django import forms from django.core.management import BaseCommand class AdminCommand(BaseCommand, ABC): name = None template = "admintool_command/command.html" class Form(forms.Form): pass def init_context(self, request=None, **kwargs): retu...
20.65
51
0.7046
from abc import ABC, abstractmethod from django import forms from django.core.management import BaseCommand class AdminCommand(BaseCommand, ABC): name = None template = "admintool_command/command.html" class Form(forms.Form): pass def init_context(self, request=None, **kwargs): retu...
true
true
f74224205c7c48e01dd834f9755a26c8ba344dd8
5,727
py
Python
demo/yolo.py
ruoxinx/site-dust-detect
f1b4c71f3ce5c325b25e26e9d663e3c1f7096ce7
[ "MIT" ]
4
2021-03-30T00:42:49.000Z
2022-02-10T00:25:08.000Z
demo/yolo.py
ruoxinx/site-dust-detect
f1b4c71f3ce5c325b25e26e9d663e3c1f7096ce7
[ "MIT" ]
null
null
null
demo/yolo.py
ruoxinx/site-dust-detect
f1b4c71f3ce5c325b25e26e9d663e3c1f7096ce7
[ "MIT" ]
null
null
null
import colorsys import os import numpy as np from keras import backend as K from keras.layers import Input from keras.models import load_model from PIL import Image, ImageDraw, ImageFont from nets.yolo3 import yolo_body, yolo_eval from utils.utils import letterbox_image class YOLO(object): _defaults = { ...
38.695946
112
0.573948
import colorsys import os import numpy as np from keras import backend as K from keras.layers import Input from keras.models import load_model from PIL import Image, ImageDraw, ImageFont from nets.yolo3 import yolo_body, yolo_eval from utils.utils import letterbox_image class YOLO(object): _defaults = { ...
true
true
f74224c79bf42c2d191df6e2d2f0e86a94c04fe9
7,611
py
Python
teacher_miniImageNet/datasets/cifar_few_shot.py
MuawizChaudhary/STARTUP
03f39b34a4ec232f132173b4a1e67ea04165e52b
[ "MIT" ]
184
2020-01-21T22:18:38.000Z
2022-03-23T21:42:31.000Z
datasets/cifar_few_shot.py
marzi-heidari/cdfsl-benchmark
5cfa6694a4ffa6ffd3cc22deceb4626fd008ee83
[ "Apache-2.0" ]
43
2020-01-29T12:15:36.000Z
2022-01-31T16:51:21.000Z
datasets/cifar_few_shot.py
marzi-heidari/cdfsl-benchmark
5cfa6694a4ffa6ffd3cc22deceb4626fd008ee83
[ "Apache-2.0" ]
41
2020-02-02T21:06:55.000Z
2022-01-05T04:10:53.000Z
# This code is modified from https://github.com/facebookresearch/low-shot-shrink-hallucinate import torch from PIL import Image import numpy as np import torchvision.transforms as transforms import additional_transforms as add_transforms from abc import abstractmethod from torchvision.datasets import CIFAR100, CIFAR10...
36.946602
123
0.607673
import torch from PIL import Image import numpy as np import torchvision.transforms as transforms import additional_transforms as add_transforms from abc import abstractmethod from torchvision.datasets import CIFAR100, CIFAR10 identity = lambda x:x class SimpleDataset: def __init__(self, mode, dataset, transform...
true
true
f74225b1057045a8ea00bca650a6c895a650fbab
2,745
py
Python
Scripts/training_mask_detection_model.py
thadanipaarth/Non-Invasive-Public-Safety-Detection-System
760b79c295e31003c7d0e826fe9214a73245c344
[ "MIT" ]
null
null
null
Scripts/training_mask_detection_model.py
thadanipaarth/Non-Invasive-Public-Safety-Detection-System
760b79c295e31003c7d0e826fe9214a73245c344
[ "MIT" ]
null
null
null
Scripts/training_mask_detection_model.py
thadanipaarth/Non-Invasive-Public-Safety-Detection-System
760b79c295e31003c7d0e826fe9214a73245c344
[ "MIT" ]
null
null
null
from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.applications import MobileNetV2 from tensorflow.keras.layers import AveragePooling2D from tensorflow.keras.layers import Dropout from tensorflow.keras.layers import Flatten from tensorflow.keras.layers import Dense from tensorflow...
36.118421
71
0.798543
from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.applications import MobileNetV2 from tensorflow.keras.layers import AveragePooling2D from tensorflow.keras.layers import Dropout from tensorflow.keras.layers import Flatten from tensorflow.keras.layers import Dense from tensorflow...
true
true
f74226d24cb5318ab4668e10bc2cb3276a388bc2
1,635
py
Python
src/saltext/vmware/utils/vmc_constants.py
kdsalvy/salt-ext-modules-vmware-1
9fdc941692e4c526f575f33b2ce23c1470582934
[ "Apache-2.0" ]
10
2021-11-02T20:24:44.000Z
2022-03-11T05:54:27.000Z
src/saltext/vmware/utils/vmc_constants.py
cmcmarrow/salt-ext-modules-vmware
c546a9f9ae121b7399dabae82f714117d0ab558d
[ "Apache-2.0" ]
83
2021-10-01T15:13:02.000Z
2022-03-31T16:22:40.000Z
src/saltext/vmware/utils/vmc_constants.py
cmcmarrow/salt-ext-modules-vmware
c546a9f9ae121b7399dabae82f714117d0ab558d
[ "Apache-2.0" ]
15
2021-09-30T23:17:27.000Z
2022-03-23T06:54:22.000Z
CSP_AUTHORIZATION_URL = "csp/gateway/am/api/auth/api-tokens/authorize" HTTPS_URL_PREFIX = "https://" URL_SUFFIX = "/" REFRESH_TOKEN = "refresh_token" CONTENT_TYPE = "Content-Type" ACCESS_TOKEN = "access_token" APPLICATION_JSON = "application/json" CSP_AUTH_TOKEN = "csp-auth-token" ERROR = "error" ERROR_MSG = "error_mes...
38.023256
100
0.769419
CSP_AUTHORIZATION_URL = "csp/gateway/am/api/auth/api-tokens/authorize" HTTPS_URL_PREFIX = "https://" URL_SUFFIX = "/" REFRESH_TOKEN = "refresh_token" CONTENT_TYPE = "Content-Type" ACCESS_TOKEN = "access_token" APPLICATION_JSON = "application/json" CSP_AUTH_TOKEN = "csp-auth-token" ERROR = "error" ERROR_MSG = "error_mes...
true
true
f7422731979ad4853b3ed8984d505258dff7f132
24,927
py
Python
pybind/nos/v7_0_1b/interface/port_channel/ip/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/nos/v7_0_1b/interface/port_channel/ip/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/nos/v7_0_1b/interface/port_channel/ip/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
72.885965
584
0.741565
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
true
true
f74227c47e5910246a5bc7d4c5075bdecbcb498d
44,612
py
Python
lib/galaxy/datatypes/data.py
BalthazarPavot/galaxy_project_reports
aa397de11a9a3425f85c701087af4c5d165b571f
[ "CC-BY-3.0" ]
1
2019-07-03T08:13:57.000Z
2019-07-03T08:13:57.000Z
lib/galaxy/datatypes/data.py
LainOldAccound/galaxy_project_reports
aa397de11a9a3425f85c701087af4c5d165b571f
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/datatypes/data.py
LainOldAccound/galaxy_project_reports
aa397de11a9a3425f85c701087af4c5d165b571f
[ "CC-BY-3.0" ]
null
null
null
import logging import mimetypes import os import shutil import tempfile import zipfile from cgi import escape from inspect import isclass import metadata from galaxy import util from galaxy.datatypes.metadata import MetadataElement # import directly to maintain ease of use in Datatype class definitions from galaxy.ut...
43.823183
206
0.611607
import logging import mimetypes import os import shutil import tempfile import zipfile from cgi import escape from inspect import isclass import metadata from galaxy import util from galaxy.datatypes.metadata import MetadataElement from galaxy.util import inflector from galaxy.util.bunch import Bunch from galaxy.uti...
true
true
f7422894886f612777bc1518c8fe57d0e0a3eb4f
4,053
py
Python
google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/combined_audience_service/transports/base.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
7
2021-02-21T10:39:41.000Z
2021-12-07T07:31:28.000Z
google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/combined_audience_service/transports/base.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
6
2021-02-02T23:46:11.000Z
2021-11-15T01:46:02.000Z
google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/combined_audience_service/transports/base.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
4
2021-01-28T23:25:45.000Z
2021-08-30T01:55:16.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
36.1875
79
0.66716
import abc import typing import pkg_resources import google.auth from google.api_core import gapic_v1 from google.api_core import retry as retries from google.auth import credentials as ga_credentials from google.ads.googleads.v7.resources.types import combined_audience from google.ads.google...
true
true
f74228b96d1ad4d9e23a8482267deb5aae07cb1c
1,503
py
Python
Back End Projects/P5-SWISH_TOURNAMENT/create_character_database.py
UndreamtMayhem/Back-End-Dev
742849277303a379947706bc39295c1897f66c85
[ "MIT" ]
null
null
null
Back End Projects/P5-SWISH_TOURNAMENT/create_character_database.py
UndreamtMayhem/Back-End-Dev
742849277303a379947706bc39295c1897f66c85
[ "MIT" ]
null
null
null
Back End Projects/P5-SWISH_TOURNAMENT/create_character_database.py
UndreamtMayhem/Back-End-Dev
742849277303a379947706bc39295c1897f66c85
[ "MIT" ]
null
null
null
""" Character database schema """ from sqlalchemy import Column, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import create_engine base = declarative_base() class Character(base): """ Character database schema """ __tablename__ = 'character' id = Column(Integ...
30.673469
63
0.64338
from sqlalchemy import Column, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import create_engine base = declarative_base() class Character(base): __tablename__ = 'character' id = Column(Integer, primary_key=True) name = Column(String(250), nullable=False) s...
true
true
f742291935372790290d1e94edc2a9daaf0f1ad9
595
py
Python
kvdroid/jclass/__init__.py
wilsenmuts/Kvdroid
9ab29c54e761ce4cfaa9d8f847257c4a975fbe0f
[ "MIT" ]
27
2021-03-09T21:39:43.000Z
2022-01-25T22:55:34.000Z
kvdroid/jclass/__init__.py
kengoon/Kvdroid
a47ab614079b70f81031c2e16a2a04fba1d39677
[ "MIT" ]
10
2021-03-22T20:38:17.000Z
2021-12-23T21:06:40.000Z
kvdroid/jclass/__init__.py
kengoon/Kvdroid
a47ab614079b70f81031c2e16a2a04fba1d39677
[ "MIT" ]
7
2021-03-23T07:55:47.000Z
2021-12-17T09:32:35.000Z
from jnius import autoclass, JavaException def _class_call(cls, args: tuple, instantiate: bool): if not args: return cls() if instantiate else cls else: return cls(*args) def _browserx_except_cls_call(namespace: str, args: tuple, instantiate: bool): try: return _class_call(autocl...
31.315789
105
0.680672
from jnius import autoclass, JavaException def _class_call(cls, args: tuple, instantiate: bool): if not args: return cls() if instantiate else cls else: return cls(*args) def _browserx_except_cls_call(namespace: str, args: tuple, instantiate: bool): try: return _class_call(autocl...
true
true
f74229a10411559ea2f0bcfe44b35a0fb5a31916
4,863
py
Python
examples/02_Example_WaterwaySearch/dubinsUAV.py
jaywilhelm/OpenUxAS
76b08d94c4c51ca51d9f79c9db03d7344e9d6552
[ "NASA-1.3" ]
null
null
null
examples/02_Example_WaterwaySearch/dubinsUAV.py
jaywilhelm/OpenUxAS
76b08d94c4c51ca51d9f79c9db03d7344e9d6552
[ "NASA-1.3" ]
3
2019-06-10T06:10:52.000Z
2020-07-21T16:10:41.000Z
examples/02_Example_WaterwaySearch/dubinsUAV.py
jaywilhelm/OpenUxAS
76b08d94c4c51ca51d9f79c9db03d7344e9d6552
[ "NASA-1.3" ]
1
2021-01-12T02:45:46.000Z
2021-01-12T02:45:46.000Z
from matplotlib import pyplot as plt from shapely.geometry import Point from shapely.geometry.polygon import Polygon #from lineSegmentAoE import * import numpy as np import sys class dubinsUAV(): def __init__(self, position, velocity, heading, dt=0.1): self.velocity = velocity self.turnRateLimite...
32.637584
169
0.539173
from matplotlib import pyplot as plt from shapely.geometry import Point from shapely.geometry.polygon import Polygon import numpy as np import sys class dubinsUAV(): def __init__(self, position, velocity, heading, dt=0.1): self.velocity = velocity self.turnRateLimited = True self.v = vel...
true
true
f7422ac4ee31436492783881d897dc14998a4159
722
py
Python
app/core/migrations/0006_auto_20200413_0905.py
SkroX/TravelAlly-Backend
cb46204d44e71e39f4de1f593c91285677822a38
[ "MIT" ]
null
null
null
app/core/migrations/0006_auto_20200413_0905.py
SkroX/TravelAlly-Backend
cb46204d44e71e39f4de1f593c91285677822a38
[ "MIT" ]
null
null
null
app/core/migrations/0006_auto_20200413_0905.py
SkroX/TravelAlly-Backend
cb46204d44e71e39f4de1f593c91285677822a38
[ "MIT" ]
null
null
null
# Generated by Django 3.0.4 on 2020-04-13 09:05 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0005_trip'), ] operations = [ migrations.AlterField( m...
27.769231
136
0.641274
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0005_trip'), ] operations = [ migrations.AlterField( model_name='trip', name='extra_peopl...
true
true
f7422bb099822402bc498ed27403c18b2eeec166
614
py
Python
dim/dim/errors.py
D3luxee/dim
14226db6006a14bddb6f6027f33f26a241bcb348
[ "MIT" ]
null
null
null
dim/dim/errors.py
D3luxee/dim
14226db6006a14bddb6f6027f33f26a241bcb348
[ "MIT" ]
null
null
null
dim/dim/errors.py
D3luxee/dim
14226db6006a14bddb6f6027f33f26a241bcb348
[ "MIT" ]
null
null
null
class DimError(Exception): code = 1 error_types = dict( InvalidPoolError=2, InvalidIPError=3, InvalidVLANError=4, InvalidStatusError=5, InvalidPriorityError=6, InvalidGroupError=7, InvalidUserError=8, InvalidAccessRightError=9, InvalidZoneError=10, InvalidViewError=11, ...
23.615385
61
0.710098
class DimError(Exception): code = 1 error_types = dict( InvalidPoolError=2, InvalidIPError=3, InvalidVLANError=4, InvalidStatusError=5, InvalidPriorityError=6, InvalidGroupError=7, InvalidUserError=8, InvalidAccessRightError=9, InvalidZoneError=10, InvalidViewError=11, ...
true
true
f7422c1ec6a44f76adbbbf2f72cc38ba90ad2fb4
5,393
py
Python
Windows_v1.py
e-bookd/e-BookD
850d9e8ef3a2752224ed0a1886359bc52579af8a
[ "Apache-2.0" ]
3
2021-04-03T16:02:21.000Z
2021-04-06T09:32:39.000Z
Windows_v1.py
rrosajp/webPDFsaver
36100c378500ab1c773b37487b55685a6c006165
[ "Apache-2.0" ]
1
2021-04-05T06:56:08.000Z
2021-04-05T06:59:18.000Z
Windows_v1.py
rrosajp/webPDFsaver
36100c378500ab1c773b37487b55685a6c006165
[ "Apache-2.0" ]
3
2021-03-31T11:32:55.000Z
2021-04-10T08:01:34.000Z
# Web PDF Saver (Standard GUI-Windows). Liscensed under Apache License 2.0. # Release v1.0 # Not in standard library- img2pdf, pyautogui, PIL import img2pdf import time import tkinter as tk from PIL import ImageGrab import pyautogui import os #Main window creation # Top level window frame = tk.Tk() ...
25.083721
175
0.683293
import img2pdf import time import tkinter as tk from PIL import ImageGrab import pyautogui import os frame = tk.Tk() frame.title("Screenshot PDF maker") frame.geometry('400x400') frame.wm_attributes('-alpha',1) def makeTrans(): frame.update() frame.wm_attributes('-alpha',0.3) frame.upda...
true
true
f7422cb93d22840b78c03976591b22aeaae716be
1,030
py
Python
stackoverflowRecommender/apps.py
frozencure/recommender-website
33d2863c91ee15b007143d71c6d7db8d6918b4fa
[ "Apache-2.0" ]
null
null
null
stackoverflowRecommender/apps.py
frozencure/recommender-website
33d2863c91ee15b007143d71c6d7db8d6918b4fa
[ "Apache-2.0" ]
null
null
null
stackoverflowRecommender/apps.py
frozencure/recommender-website
33d2863c91ee15b007143d71c6d7db8d6918b4fa
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os from django.apps import AppConfig class StackoverflowrecommenderConfig(AppConfig): name = 'stackoverflowRecommender' def __init__(self, app_name, app_module): super(StackoverflowrecommenderConfig, self).__init__(app_name, app_mo...
38.148148
114
0.664078
from __future__ import unicode_literals import os from django.apps import AppConfig class StackoverflowrecommenderConfig(AppConfig): name = 'stackoverflowRecommender' def __init__(self, app_name, app_module): super(StackoverflowrecommenderConfig, self).__init__(app_name, app_module) ...
true
true
f7422cbf0a0214cf992c3b5195fa542f32bdf022
3,816
py
Python
telesurscraper/spiders/articles.py
dreglad/telesur-scraper
3a2ba8d8c2b89ded24cb34e3f06f8ef88b3823f8
[ "MIT" ]
1
2020-03-21T22:45:37.000Z
2020-03-21T22:45:37.000Z
telesurscraper/spiders/articles.py
dreglad/telesur-scraper
3a2ba8d8c2b89ded24cb34e3f06f8ef88b3823f8
[ "MIT" ]
null
null
null
telesurscraper/spiders/articles.py
dreglad/telesur-scraper
3a2ba8d8c2b89ded24cb34e3f06f8ef88b3823f8
[ "MIT" ]
null
null
null
from datetime import datetime from html import unescape import logging from dateutil.parser import parse as parse_date import htmlmin from scrapy import Request from scrapy.spiders import Spider, CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from scrapy.loader.processors import TakeFirst, MapCompos...
34.378378
135
0.690514
from datetime import datetime from html import unescape import logging from dateutil.parser import parse as parse_date import htmlmin from scrapy import Request from scrapy.spiders import Spider, CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from scrapy.loader.processors import TakeFirst, MapCompos...
true
true
f7422db374b82c26cb0141b5f92ca781c4f23d19
24,148
py
Python
tests/fib/test_fib.py
stephengao-ragilenetworks/sonic-mgmt
b7ce8f6592f12ee8a7a0daca9a4337d5eaf9313f
[ "Apache-2.0" ]
1
2020-10-15T05:52:17.000Z
2020-10-15T05:52:17.000Z
tests/fib/test_fib.py
stephengao-ragilenetworks/sonic-mgmt
b7ce8f6592f12ee8a7a0daca9a4337d5eaf9313f
[ "Apache-2.0" ]
null
null
null
tests/fib/test_fib.py
stephengao-ragilenetworks/sonic-mgmt
b7ce8f6592f12ee8a7a0daca9a4337d5eaf9313f
[ "Apache-2.0" ]
null
null
null
import time import json import logging import tempfile import random from datetime import datetime import pytest import requests from tests.common.fixtures.ptfhost_utils import run_icmp_responder # lgtm[py/unused-import] from tests.common.fixtures.ptfhost_utils import copy_ptftests_directory # lgtm[py/u...
41.278632
150
0.586343
import time import json import logging import tempfile import random from datetime import datetime import pytest import requests from tests.common.fixtures.ptfhost_utils import run_icmp_responder from tests.common.fixtures.ptfhost_utils import copy_ptftests_directory from tests.common.fixtures.ptfhost...
true
true
f7422dd9b332918b8e4e4d575042b64014d82f5f
49,058
py
Python
Lib/threading.py
Ian-Foote/cpython
793cf3da645cc67989ee7376c66b7859005dd938
[ "PSF-2.0" ]
1
2015-10-15T01:25:33.000Z
2015-10-15T01:25:33.000Z
Lib/threading.py
Ian-Foote/cpython
793cf3da645cc67989ee7376c66b7859005dd938
[ "PSF-2.0" ]
null
null
null
Lib/threading.py
Ian-Foote/cpython
793cf3da645cc67989ee7376c66b7859005dd938
[ "PSF-2.0" ]
null
null
null
"""Thread module emulating a subset of Java's threading model.""" import sys as _sys import _thread from time import monotonic as _time from traceback import format_exc as _format_exc from _weakrefset import WeakSet from itertools import islice as _islice try: from _collections import deque as _deque except Impor...
35.992663
101
0.624873
import sys as _sys import _thread from time import monotonic as _time from traceback import format_exc as _format_exc from _weakrefset import WeakSet from itertools import islice as _islice try: from _collections import deque as _deque except ImportError: from collections import deque as _deque # Jav...
true
true
f74230076b952b4e8ac5d38d2184e3461ad32237
521
py
Python
proj/models.py
lucasviei/Projeto-Estagio
bbceb65305b6c8b28d301be4e7fcd3455a279fcf
[ "MIT" ]
null
null
null
proj/models.py
lucasviei/Projeto-Estagio
bbceb65305b6c8b28d301be4e7fcd3455a279fcf
[ "MIT" ]
null
null
null
proj/models.py
lucasviei/Projeto-Estagio
bbceb65305b6c8b28d301be4e7fcd3455a279fcf
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import User # Create your models here. class Acervo(models.Model): tipoObra = models.CharField(max_length=11) tituloObra = models.CharField(max_length=20) description = models.TextField() begin_date = models.DateField(auto_now_add=True) a...
27.421053
60
0.71977
from django.db import models from django.contrib.auth.models import User class Acervo(models.Model): tipoObra = models.CharField(max_length=11) tituloObra = models.CharField(max_length=20) description = models.TextField() begin_date = models.DateField(auto_now_add=True) active = models.BooleanFiel...
true
true
f74231ee4316ebf339b9a91a03df0d307485d59f
6,249
py
Python
sacd/agent/sacd.py
lucifer2859/sac-discrete-pytorch
c6f367d95bdc5cee8b3d6e5a01172bb99af5b171
[ "MIT" ]
null
null
null
sacd/agent/sacd.py
lucifer2859/sac-discrete-pytorch
c6f367d95bdc5cee8b3d6e5a01172bb99af5b171
[ "MIT" ]
null
null
null
sacd/agent/sacd.py
lucifer2859/sac-discrete-pytorch
c6f367d95bdc5cee8b3d6e5a01172bb99af5b171
[ "MIT" ]
1
2021-01-11T11:48:31.000Z
2021-01-11T11:48:31.000Z
import os import numpy as np import torch from torch.optim import Adam from .base import BaseAgent from sacd.model import TwinnedQNetwork, CategoricalPolicy from sacd.utils import disable_gradients # If you want to use Prioritized Experience Replay(PER), N-step return # or Dueling Networks, change use_per, multi_ste...
40.843137
79
0.649384
import os import numpy as np import torch from torch.optim import Adam from .base import BaseAgent from sacd.model import TwinnedQNetwork, CategoricalPolicy from sacd.utils import disable_gradients class SacdAgent(BaseAgent): def __init__(self, env, test_env, log_dir, num_steps=100000, batch_size=64, ...
true
true
f7423216377ad5bfde584d5cb77fe45743ddf5a1
1,683
py
Python
vocoder/inference_wavrnn.py
freenowill/autoVC-WavRNN
871a7ae5671e81fe4396cbc6f89a90009b01049b
[ "MIT" ]
null
null
null
vocoder/inference_wavrnn.py
freenowill/autoVC-WavRNN
871a7ae5671e81fe4396cbc6f89a90009b01049b
[ "MIT" ]
null
null
null
vocoder/inference_wavrnn.py
freenowill/autoVC-WavRNN
871a7ae5671e81fe4396cbc6f89a90009b01049b
[ "MIT" ]
null
null
null
from vocoder.models.fatchord_version import WaveRNN from vocoder import hparams as hp import torch _model = None # type: WaveRNN def load_model(weights_fpath, verbose=True): global _model if verbose: print("Building Wave-RNN") _model = WaveRNN( rnn_dims=hp.voc_rnn_dims...
28.525424
95
0.636364
from vocoder.models.fatchord_version import WaveRNN from vocoder import hparams as hp import torch _model = None def load_model(weights_fpath, verbose=True): global _model if verbose: print("Building Wave-RNN") _model = WaveRNN( rnn_dims=hp.voc_rnn_dims, fc_di...
true
true
f7423283e8d6adb0a506f11ddfb9c00e612ebd41
1,292
py
Python
Discount_bracket_replenishment.py
Peyo-Supp/Master-Production-Planning-Algorithm
c91bf9304bcf1ad7ecdf6729ee483a6e3de45a38
[ "Apache-2.0" ]
null
null
null
Discount_bracket_replenishment.py
Peyo-Supp/Master-Production-Planning-Algorithm
c91bf9304bcf1ad7ecdf6729ee483a6e3de45a38
[ "Apache-2.0" ]
null
null
null
Discount_bracket_replenishment.py
Peyo-Supp/Master-Production-Planning-Algorithm
c91bf9304bcf1ad7ecdf6729ee483a6e3de45a38
[ "Apache-2.0" ]
null
null
null
import pandas as pd import math as m import numpy as np """ algorithm that calculate the best alternative from supplier order bracket based on data provided. """ #input data here! # demand_in_cases = # order_cost = # cost_per_case = # bracket_cost = [] # bracket_minimum = [] # holding_rate = EOQ0 = np.sqrt((2*deman...
21.898305
127
0.654025
import pandas as pd import math as m import numpy as np EOQ0 = np.sqrt((2*demand_in_cases*order_cost)/(cost_per_case*holding_rate)) ATCEOQ = demand_in_cases/EOQ0*order_cost + EOQ0/2*holding_rate*cost_per_case + demand_in_cases*cost_per_case BM = np.array(bracket_minimum) dfBM = pd.DataFrame({'1':[BM[0]],'...
true
true
f742334f16399d13e2548e5571fc98e6737c5f53
3,157
py
Python
app/ml.py
teamcfe/AI-as-an-API
a291fc0e6ec380139599a948f2efd58923c70784
[ "Apache-2.0" ]
28
2021-10-01T13:31:43.000Z
2022-03-31T04:54:56.000Z
app/ml.py
teamcfe/AI-as-an-API
a291fc0e6ec380139599a948f2efd58923c70784
[ "Apache-2.0" ]
null
null
null
app/ml.py
teamcfe/AI-as-an-API
a291fc0e6ec380139599a948f2efd58923c70784
[ "Apache-2.0" ]
20
2021-10-01T22:41:20.000Z
2022-03-22T14:05:56.000Z
import json import numpy as np from typing import Optional, List from pathlib import Path from dataclasses import dataclass # pip install dataclasses from tensorflow.keras.models import load_model from tensorflow.keras.preprocessing.sequence import pad_sequences from tensorflow.keras.preprocessing.text import tokeniz...
34.692308
86
0.657586
import json import numpy as np from typing import Optional, List from pathlib import Path from dataclasses import dataclass from tensorflow.keras.models import load_model from tensorflow.keras.preprocessing.sequence import pad_sequences from tensorflow.keras.preprocessing.text import tokenizer_from_json from . impo...
true
true
f74233e7b27970a034f2ae6f52f054db35117435
5,020
py
Python
asclepias_broker/metadata/api.py
ChiaraBi/asclepias-broker
793e2634591eed926000b19bd342f044b29bedcc
[ "BSD-3-Clause" ]
null
null
null
asclepias_broker/metadata/api.py
ChiaraBi/asclepias-broker
793e2634591eed926000b19bd342f044b29bedcc
[ "BSD-3-Clause" ]
null
null
null
asclepias_broker/metadata/api.py
ChiaraBi/asclepias-broker
793e2634591eed926000b19bd342f044b29bedcc
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2018 CERN. # # Asclepias Broker is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Metadata functions.""" from datetime import datetime from typing import List import idutils from flask impor...
42.542373
123
0.622908
from datetime import datetime from typing import List import idutils from flask import current_app from invenio_db import db from ..core.models import Identifier, Relation, Relationship from ..graph.api import get_group_from_id, get_or_create_groups from ..graph.models import GroupRelationship, GroupType from...
true
true
f74233f0663a42e0a75a02023a9c7f25a16bc80e
2,190
py
Python
modules/manifest.py
MeridianPY/SIVA
e3506e61edc550bef6f246ddfcaf80db27f8a790
[ "MIT" ]
11
2019-07-09T16:07:13.000Z
2020-06-11T16:02:37.000Z
modules/manifest.py
MeridianPY/SIVA
e3506e61edc550bef6f246ddfcaf80db27f8a790
[ "MIT" ]
7
2019-07-09T14:42:21.000Z
2019-12-07T13:58:39.000Z
modules/manifest.py
MeridianPY/SIVA
e3506e61edc550bef6f246ddfcaf80db27f8a790
[ "MIT" ]
2
2020-12-14T10:41:38.000Z
2020-12-14T16:31:47.000Z
import zipfile, os, sys, aiohttp, json, requests from modules.manifest_reader import ManifestReader class Manifest: def __init__(self, directory, headers=None): self.headers = headers self.directory = directory self.manifests = { 'en': '', 'fr': '', 'es': '', 'de': '', 'it': '', 'ja': '', ...
30.416667
112
0.652055
import zipfile, os, sys, aiohttp, json, requests from modules.manifest_reader import ManifestReader class Manifest: def __init__(self, directory, headers=None): self.headers = headers self.directory = directory self.manifests = { 'en': '', 'fr': '', 'es': '', 'de': '', 'it': '', 'ja': '', ...
true
true
f742341ef3c3228bdff507e631be9ccfb6a20704
44,436
py
Python
nemo/collections/asr/data/audio_to_text.py
dynasty-com/NeMo
1ac828df423fbcec1b34c650b3a20266bb133dde
[ "Apache-2.0" ]
null
null
null
nemo/collections/asr/data/audio_to_text.py
dynasty-com/NeMo
1ac828df423fbcec1b34c650b3a20266bb133dde
[ "Apache-2.0" ]
null
null
null
nemo/collections/asr/data/audio_to_text.py
dynasty-com/NeMo
1ac828df423fbcec1b34c650b3a20266bb133dde
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020, 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 appli...
41.259053
124
0.629377
import io import os from typing import Callable, Dict, List, Optional, Union import braceexpand import torch import webdataset as wd from torch.nn import functional as F from nemo.collections.asr.data import vocabs from nemo.collections.asr.parts import collections, parsers from nemo.collections.asr.part...
true
true
f7423441cca353ef062350181a27894dee3e3c72
1,987
py
Python
tests/test_format.py
jedie/python-fastjsonschema
32476cfd4d97f92cae52d686eb471361503bf4ba
[ "BSD-3-Clause" ]
null
null
null
tests/test_format.py
jedie/python-fastjsonschema
32476cfd4d97f92cae52d686eb471361503bf4ba
[ "BSD-3-Clause" ]
null
null
null
tests/test_format.py
jedie/python-fastjsonschema
32476cfd4d97f92cae52d686eb471361503bf4ba
[ "BSD-3-Clause" ]
null
null
null
import datetime import re import pytest from fastjsonschema import JsonSchemaValueException exc = JsonSchemaValueException('data must be date-time', value='{data}', name='data', definition='{definition}', rule='format') @pytest.mark.parametrize('value, expected', [ ('', exc), ('bla', exc), ('2018-02-05T...
34.258621
131
0.617514
import datetime import re import pytest from fastjsonschema import JsonSchemaValueException exc = JsonSchemaValueException('data must be date-time', value='{data}', name='data', definition='{definition}', rule='format') @pytest.mark.parametrize('value, expected', [ ('', exc), ('bla', exc), ('2018-02-05T...
true
true
f74234636424ab51376e43ed4319ce0c6ca918f4
1,050
py
Python
UICPC/21/nwerc2020all/islandtour/submissions/accepted/per_lazy.py
MilladMuhammadi/Competitive-Programming
9f84a2d2734a5efe0e1fde0062e51782cd5af2c6
[ "MIT" ]
null
null
null
UICPC/21/nwerc2020all/islandtour/submissions/accepted/per_lazy.py
MilladMuhammadi/Competitive-Programming
9f84a2d2734a5efe0e1fde0062e51782cd5af2c6
[ "MIT" ]
null
null
null
UICPC/21/nwerc2020all/islandtour/submissions/accepted/per_lazy.py
MilladMuhammadi/Competitive-Programming
9f84a2d2734a5efe0e1fde0062e51782cd5af2c6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 n = int(input()) d = list(map(int, input().split())) t = [list(map(int, input().split())) for _ in range(3)] ivals = [[[0]*n for _ in range(n)] for _ in range(3)] for p in range(3): for i in range(n): curt = 0 for j in range(n): ivals[p][i][(i+j)%n] = (curt, curt...
26.923077
66
0.419048
n = int(input()) d = list(map(int, input().split())) t = [list(map(int, input().split())) for _ in range(3)] ivals = [[[0]*n for _ in range(n)] for _ in range(3)] for p in range(3): for i in range(n): curt = 0 for j in range(n): ivals[p][i][(i+j)%n] = (curt, curt+t[p][(i+j)%n]) ...
true
true
f74234ef28243d7ae7b6cc09f9a474e39ce16234
3,203
py
Python
mla/rbm.py
31337mbf/MLAlgorithms
3892a9bf20dcae0b6f9fc7798f60ceaef345256a
[ "MIT" ]
9,715
2016-10-22T14:37:02.000Z
2022-03-31T10:39:18.000Z
mla/rbm.py
ghnreigns/MLAlgorithms
3c8e16b8de3baf131395ae57edd479e59566a7c6
[ "MIT" ]
73
2016-11-13T22:51:17.000Z
2022-01-31T08:54:52.000Z
mla/rbm.py
ghnreigns/MLAlgorithms
3c8e16b8de3baf131395ae57edd479e59566a7c6
[ "MIT" ]
1,793
2016-11-03T21:31:48.000Z
2022-03-29T16:59:36.000Z
# coding:utf-8 import logging import numpy as np from scipy.special import expit from mla.base import BaseEstimator from mla.utils import batch_iterator np.random.seed(9999) sigmoid = expit """ References: A Practical Guide to Training Restricted Boltzmann Machines https://www.cs.toronto.edu/~hinton/absps/guideTR.p...
35.988764
113
0.63222
import logging import numpy as np from scipy.special import expit from mla.base import BaseEstimator from mla.utils import batch_iterator np.random.seed(9999) sigmoid = expit class RBM(BaseEstimator): y_required = False def __init__(self, n_hidden=128, learning_rate=0.1, batch_size=10, max_epochs=100): ...
true
true
f742352c6347257443b598406a9615c272ee5b53
356
py
Python
Problem85.py
Cleancode404/ProjectEuler
2f93b256b107bfb6a395b8aa197cfeacc599b00b
[ "MIT" ]
null
null
null
Problem85.py
Cleancode404/ProjectEuler
2f93b256b107bfb6a395b8aa197cfeacc599b00b
[ "MIT" ]
null
null
null
Problem85.py
Cleancode404/ProjectEuler
2f93b256b107bfb6a395b8aa197cfeacc599b00b
[ "MIT" ]
null
null
null
""" Cuboid route """ if __name__ == '__main__': res, m, n = 0, 0, 0 for i in range(1, int(2000000 ** 0.5)): for j in range(i, int(2000000 ** 0.5)): s = i * (i + 1) * j * (j + 1) // 4 if abs(res - 2000000) > abs(s - 2000000): res, m, n = s, i, j print("m = ", m...
32.363636
55
0.412921
if __name__ == '__main__': res, m, n = 0, 0, 0 for i in range(1, int(2000000 ** 0.5)): for j in range(i, int(2000000 ** 0.5)): s = i * (i + 1) * j * (j + 1) // 4 if abs(res - 2000000) > abs(s - 2000000): res, m, n = s, i, j print("m = ", m, ", n = ", n, ", sol...
true
true
f7423591371bb8e8589512b4a18522650a053735
1,560
py
Python
calendareshop/calendareshop/migrations/0017_staticpage.py
Kaarhai/calendar-eshop
4ba4141034fe0042f0b3eec6194efd4b5c815f66
[ "BSD-3-Clause" ]
1
2016-09-20T22:01:05.000Z
2016-09-20T22:01:05.000Z
calendareshop/calendareshop/migrations/0017_staticpage.py
Kaarhai/calendar-eshop
4ba4141034fe0042f0b3eec6194efd4b5c815f66
[ "BSD-3-Clause" ]
6
2016-10-08T09:57:49.000Z
2022-03-11T23:16:41.000Z
calendareshop/calendareshop/migrations/0017_staticpage.py
Kaarhai/calendar-eshop
4ba4141034fe0042f0b3eec6194efd4b5c815f66
[ "BSD-3-Clause" ]
2
2016-10-03T21:47:55.000Z
2019-10-17T07:56:09.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import autoslug.fields import ckeditor_uploader.fields class Migration(migrations.Migration): dependencies = [ ('calendareshop', '0016_project_image_translation'), ] operations = [ m...
44.571429
143
0.627564
from __future__ import unicode_literals from django.db import migrations, models import autoslug.fields import ckeditor_uploader.fields class Migration(migrations.Migration): dependencies = [ ('calendareshop', '0016_project_image_translation'), ] operations = [ migrations.CreateModel( ...
true
true
f742360b3fa90ea8572b0ae14ee3037af3a5a470
9,969
py
Python
split_cl.py
tomrittervg/depot_tools
ad7b2d79aab0737e285ff120c1ed0bef0ab6c0b6
[ "BSD-3-Clause" ]
4
2022-03-21T15:21:13.000Z
2022-03-23T16:31:20.000Z
split_cl.py
tomrittervg/depot_tools
ad7b2d79aab0737e285ff120c1ed0bef0ab6c0b6
[ "BSD-3-Clause" ]
1
2022-01-11T07:21:02.000Z
2022-01-11T07:21:02.000Z
split_cl.py
tomrittervg/depot_tools
ad7b2d79aab0737e285ff120c1ed0bef0ab6c0b6
[ "BSD-3-Clause" ]
4
2020-03-15T13:28:11.000Z
2021-12-13T08:57:39.000Z
#!/usr/bin/env python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Splits a branch into smaller branches and uploads CLs.""" from __future__ import print_function import collections import os impor...
36.119565
80
0.694653
from __future__ import print_function import collections import os import re import subprocess2 import sys import tempfile import gclient_utils import git_footers import scm import git_common as git # numbers of CLs generated by `git cl split` have caused infrastructure issues # in the past. CL_SPLIT_FORCE...
true
true
f7423610704cf0a3c3106e229a3671c1aca8324c
4,523
py
Python
igcapi/api.py
schlerp/igcapi
33f22f6fad0af0e4ba19beea397eb025c5dfc608
[ "MIT" ]
null
null
null
igcapi/api.py
schlerp/igcapi
33f22f6fad0af0e4ba19beea397eb025c5dfc608
[ "MIT" ]
null
null
null
igcapi/api.py
schlerp/igcapi
33f22f6fad0af0e4ba19beea397eb025c5dfc608
[ "MIT" ]
null
null
null
import requests import json from urllib.parse import urljoin class IGCAPI(object): '''an object for intereacting with an instance of IGC via json API''' def __init__(self, uname, passwd, host, port=9443, api_path='/ibm/iis/igc-rest/v1/'): self.api_host = host self.api_port = port self...
35.896825
94
0.529074
import requests import json from urllib.parse import urljoin class IGCAPI(object): def __init__(self, uname, passwd, host, port=9443, api_path='/ibm/iis/igc-rest/v1/'): self.api_host = host self.api_port = port self.api_path = api_path self.api_base_url = urljoin('{}:{}'.format(ho...
true
true
f742362e97a43745fe98b43f31eb5be1043fd12e
8,774
py
Python
jointSBM.py
kurtmaia/JointSBM
516daa6249694118cca4db2a4a92e0ef7164166f
[ "Apache-2.0" ]
7
2019-07-22T12:54:24.000Z
2021-05-06T15:23:40.000Z
jointSBM.py
kurtmaia/JointSBM
516daa6249694118cca4db2a4a92e0ef7164166f
[ "Apache-2.0" ]
null
null
null
jointSBM.py
kurtmaia/JointSBM
516daa6249694118cca4db2a4a92e0ef7164166f
[ "Apache-2.0" ]
null
null
null
import numpy as np import scipy as sp from numpy.linalg import inv, cholesky from scipy.linalg import eig from sklearn.metrics.cluster import normalized_mutual_info_score as nmi from sklearn.metrics.cluster import adjusted_rand_score as ari from sklearn.metrics.cluster import contingency_matrix from sklearn.cluster i...
34.81746
226
0.561318
import numpy as np import scipy as sp from numpy.linalg import inv, cholesky from scipy.linalg import eig from sklearn.metrics.cluster import normalized_mutual_info_score as nmi from sklearn.metrics.cluster import adjusted_rand_score as ari from sklearn.metrics.cluster import contingency_matrix from sklearn.cluster i...
true
true
f74237717cb2d18d66f51a5116e8ac265e1a3168
9,819
py
Python
nox/tasks.py
cs01/nox
04f768c16751ea33ad8a8a27570d0fea2b25925d
[ "Apache-2.0" ]
1
2020-01-18T23:14:56.000Z
2020-01-18T23:14:56.000Z
nox/tasks.py
cs01/nox
04f768c16751ea33ad8a8a27570d0fea2b25925d
[ "Apache-2.0" ]
null
null
null
nox/tasks.py
cs01/nox
04f768c16751ea33ad8a8a27570d0fea2b25925d
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Alethea Katherine Flowers # # 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...
31.983713
137
0.653834
import importlib import io import json import os from colorlog.escape_codes import parse_colors import nox from nox import _options from nox import registry from nox.logger import logger from nox.manifest import Manifest def load_nox_module(global_config): try: g...
true
true
f74238a353bf905a6fc0a5f51b05013392db1ccd
7,320
py
Python
score_2021.py
DeepPSP/cpsc2021
165790be750421eb0e0f0fe3129d03dddc250ada
[ "MIT" ]
5
2021-12-07T11:44:34.000Z
2021-12-24T06:49:43.000Z
score_2021.py
DeepPSP/cpsc2021
165790be750421eb0e0f0fe3129d03dddc250ada
[ "MIT" ]
null
null
null
score_2021.py
DeepPSP/cpsc2021
165790be750421eb0e0f0fe3129d03dddc250ada
[ "MIT" ]
5
2021-11-13T07:30:59.000Z
2021-12-20T12:40:53.000Z
#!/usr/bin/env python3 import numpy as np import json import os import sys import scipy.io as sio import wfdb """ Written by: Xingyao Wang, Chengyu Liu School of Instrument Science and Engineering Southeast University, China chengyu@seu.edu.cn """ R = np.array([[1, -1, -0.5],...
32.972973
88
0.543443
import numpy as np import json import os import sys import scipy.io as sio import wfdb R = np.array([[1, -1, -0.5], [-2, 1, 0], [-1, 0, 1]]) class RefInfo: def __init__(self, sample_path): self.sample_path = sample_path ( self.fs, self.len_sig, self.beat_lo...
true
true
f74238c61cee902f633f2809efc5fa0e3755cf9c
821
py
Python
snippets/admin.py
xarg/snippify
b692a941a7a46959df9aff064b7ad056d0125484
[ "MIT" ]
2
2016-08-19T06:24:02.000Z
2021-05-11T00:08:24.000Z
snippets/admin.py
xarg/snippify
b692a941a7a46959df9aff064b7ad056d0125484
[ "MIT" ]
5
2021-05-01T15:03:07.000Z
2021-05-01T15:03:08.000Z
snippets/admin.py
xarg/snippify
b692a941a7a46959df9aff064b7ad056d0125484
[ "MIT" ]
null
null
null
from django.contrib import admin from snippify.snippets.models import Snippet, SnippetComment, SnippetVersion class SnippetAdmin(admin.ModelAdmin): exclude = ('author',) list_display = ('title', 'lexer', 'created_date', 'author') list_filter = ('lexer', 'author', ) search_fields = ('title', 'body', ) ...
34.208333
76
0.713764
from django.contrib import admin from snippify.snippets.models import Snippet, SnippetComment, SnippetVersion class SnippetAdmin(admin.ModelAdmin): exclude = ('author',) list_display = ('title', 'lexer', 'created_date', 'author') list_filter = ('lexer', 'author', ) search_fields = ('title', 'body', ) ...
true
true
f7423a676f97ccf97a0966319e79f285599faa02
5,769
py
Python
process_sentence.py
kamal-rahimi/SentenceCorrection
19138ebbdf1073f070a1982d3991de063c0d27d7
[ "MIT" ]
3
2019-08-01T11:26:43.000Z
2021-04-25T09:36:29.000Z
process_sentence.py
kamal-rahimi/SentenceCorrection
19138ebbdf1073f070a1982d3991de063c0d27d7
[ "MIT" ]
null
null
null
process_sentence.py
kamal-rahimi/SentenceCorrection
19138ebbdf1073f070a1982d3991de063c0d27d7
[ "MIT" ]
null
null
null
""" Estimates the likihood of an input senetnce and finds an order of words that is most likely in the longuage model """ import os import argparse import pickle from keras.models import load_model from keras.preprocessing.sequence import pad_sequences from keras import backend as k import numpy as np from itertool...
40.626761
139
0.700468
import os import argparse import pickle from keras.models import load_model from keras.preprocessing.sequence import pad_sequences from keras import backend as k import numpy as np from itertools import permutations from nlp_tools import strip_punctuations def analyze_sequence(model, words_id_order, max_sentence_...
true
true
f7423ade01c4fcfa0728490698cb14266420aa09
6,948
py
Python
bb/master/master.py
aukhina/infrastructure
1ef8fde36b4890b94831bd9f240aeee5c03686dc
[ "MIT" ]
null
null
null
bb/master/master.py
aukhina/infrastructure
1ef8fde36b4890b94831bd9f240aeee5c03686dc
[ "MIT" ]
2
2019-07-26T07:28:41.000Z
2019-08-27T14:36:41.000Z
bb/master/master.py
aukhina/infrastructure
1ef8fde36b4890b94831bd9f240aeee5c03686dc
[ "MIT" ]
null
null
null
# Copyright (c) 2020 Intel Corporation # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, d...
40.395349
97
0.660334
import sys import pathlib from buildbot.changes.gitpoller import GitPoller from buildbot.plugins import schedulers, util, worker, reporters sys.path.append(str(pathlib.Path(__file__).resolve().parents[2])) import bb.master.config as config import bb.utils c = BuildmasterConfig = {} c["workers"...
true
true
f7423af8d9f569329234e61543b9964287d2c748
6,170
py
Python
my_scripts/10_03/different_memory_access/plot.py
wjwyyjr/Gem5_task_graph
0e233b5053d6dcd518a2ad6fddd23eaeb9c3a8ee
[ "BSD-3-Clause" ]
null
null
null
my_scripts/10_03/different_memory_access/plot.py
wjwyyjr/Gem5_task_graph
0e233b5053d6dcd518a2ad6fddd23eaeb9c3a8ee
[ "BSD-3-Clause" ]
null
null
null
my_scripts/10_03/different_memory_access/plot.py
wjwyyjr/Gem5_task_graph
0e233b5053d6dcd518a2ad6fddd23eaeb9c3a8ee
[ "BSD-3-Clause" ]
null
null
null
from io import SEEK_CUR from os import name from types import FunctionType import matplotlib.pyplot as plt from matplotlib.pyplot import legend, plot, xticks ## class for plot function class PlotFunction(): """Make Data visualization Easier !""" def __init__(self, y_data, x_label, y_label, x_ticklabels=[], x_t...
34.858757
135
0.555592
from io import SEEK_CUR from os import name from types import FunctionType import matplotlib.pyplot as plt from matplotlib.pyplot import legend, plot, xticks def __init__(self, y_data, x_label, y_label, x_ticklabels=[], x_ticks=[], title=''): self.y_data=y_data self.x_label=x_label self.y_lab...
true
true
f7423b0a48ff12789305b2ed1088ceadc6224af7
390
py
Python
hw_asr/datasets/__init__.py
ADrozdova/ASR
9a3e2f045e0a86f560665e791301e961e3ef6cad
[ "MIT" ]
null
null
null
hw_asr/datasets/__init__.py
ADrozdova/ASR
9a3e2f045e0a86f560665e791301e961e3ef6cad
[ "MIT" ]
null
null
null
hw_asr/datasets/__init__.py
ADrozdova/ASR
9a3e2f045e0a86f560665e791301e961e3ef6cad
[ "MIT" ]
null
null
null
from hw_asr.datasets.custom_audio_dataset import CustomAudioDataset from hw_asr.datasets.custom_dir_audio_dataset import CustomDirAudioDataset from hw_asr.datasets.librispeech_dataset import LibrispeechDataset from hw_asr.datasets.lj_speech_dataset import LJSpeechDataset __all__ = [ "LibrispeechDataset", "Cust...
32.5
74
0.838462
from hw_asr.datasets.custom_audio_dataset import CustomAudioDataset from hw_asr.datasets.custom_dir_audio_dataset import CustomDirAudioDataset from hw_asr.datasets.librispeech_dataset import LibrispeechDataset from hw_asr.datasets.lj_speech_dataset import LJSpeechDataset __all__ = [ "LibrispeechDataset", "Cust...
true
true
f7423b32f836533f423db5213d66833c2f8ae6b5
6,312
py
Python
test/functional/feature_dersig.py
kronik187/BTCGPU
a6434f058fa5ba12ce4479d5023196929223b352
[ "MIT" ]
null
null
null
test/functional/feature_dersig.py
kronik187/BTCGPU
a6434f058fa5ba12ce4479d5023196929223b352
[ "MIT" ]
null
null
null
test/functional/feature_dersig.py
kronik187/BTCGPU
a6434f058fa5ba12ce4479d5023196929223b352
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test BIP66 (DER SIG). Test that the DERSIG soft-fork activates at (regtest) height 1251. """ from tes...
43.232877
145
0.673796
from test_framework.blocktools import create_coinbase, create_block, create_transaction from test_framework.messages import msg_block from test_framework.mininode import mininode_lock, P2PInterface from test_framework.script import CScript from test_framework.test_framework import BitcoinTestFramework from test_fr...
true
true
f7423b6880f58658d5206e6db64f56cdb1b740ca
310
py
Python
tests/conftest.py
shramov/tll-sqlite
6f604e5cd3ebf36bf9cf52ff26d7da5c34d5c501
[ "MIT" ]
null
null
null
tests/conftest.py
shramov/tll-sqlite
6f604e5cd3ebf36bf9cf52ff26d7da5c34d5c501
[ "MIT" ]
null
null
null
tests/conftest.py
shramov/tll-sqlite
6f604e5cd3ebf36bf9cf52ff26d7da5c34d5c501
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # vim: sts=4 sw=4 et import pytest import pathlib import tempfile version = tuple([int(x) for x in pytest.__version__.split('.')[:2]]) if version < (3, 9): @pytest.fixture def tmp_path(): with tempfile.TemporaryDirectory() as tmp: yield pathlib.Path(tmp)
19.375
68
0.648387
import pytest import pathlib import tempfile version = tuple([int(x) for x in pytest.__version__.split('.')[:2]]) if version < (3, 9): @pytest.fixture def tmp_path(): with tempfile.TemporaryDirectory() as tmp: yield pathlib.Path(tmp)
true
true
f7423bb2328305cfd72b5fe485a4cef4fed1c217
2,041
py
Python
editor/attributes/player/player_attribute_wb_acceleration.py
PeterC10/COFPES-OF-Editor-6
0a9c9b75fada8264634bdc968c9da209c44b29e2
[ "MIT" ]
1
2022-03-11T12:25:57.000Z
2022-03-11T12:25:57.000Z
editor/attributes/player/player_attribute_wb_acceleration.py
PeterC10/COFPES-OF-Editor-6
0a9c9b75fada8264634bdc968c9da209c44b29e2
[ "MIT" ]
null
null
null
editor/attributes/player/player_attribute_wb_acceleration.py
PeterC10/COFPES-OF-Editor-6
0a9c9b75fada8264634bdc968c9da209c44b29e2
[ "MIT" ]
null
null
null
from editor.attributes.player.player_attribute import ( PlayerAttribute, PlayerAttributeTypes, ) from editor.attributes.player.player_attribute_wb import ( PlayerAttributeWb, ) from editor.attributes.player.player_attribute_acceleration import ( PlayerAttributeAcceleration, ) from editor.attributes.p...
26.166667
84
0.693778
from editor.attributes.player.player_attribute import ( PlayerAttribute, PlayerAttributeTypes, ) from editor.attributes.player.player_attribute_wb import ( PlayerAttributeWb, ) from editor.attributes.player.player_attribute_acceleration import ( PlayerAttributeAcceleration, ) from editor.attributes.p...
true
true
f7423c61a1a07c353dcb2afba579932fba571fde
5,925
py
Python
utils/graph_funcs.py
ruihan0495/EfficientDet
f61b77343a9782d85747ced6704c35a49528934a
[ "Apache-2.0" ]
null
null
null
utils/graph_funcs.py
ruihan0495/EfficientDet
f61b77343a9782d85747ced6704c35a49528934a
[ "Apache-2.0" ]
null
null
null
utils/graph_funcs.py
ruihan0495/EfficientDet
f61b77343a9782d85747ced6704c35a49528934a
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf ############################################################ # Miscellenous Graph Functions ############################################################ def trim_zeros_graph(boxes, name='trim_zeros'): """Often boxes are represented with matrices of shape [N, 4] and are padded with zero...
40.582192
77
0.623122
import tensorflow as tf
true
true
f7423c870ce51c9055e65921a9615c265b5f55bb
43,590
py
Python
AVR_Miner.py
guddunain/duino-coin
1bb5ce171d952ab378a04777ed9eb75eefb4721f
[ "MIT" ]
null
null
null
AVR_Miner.py
guddunain/duino-coin
1bb5ce171d952ab378a04777ed9eb75eefb4721f
[ "MIT" ]
null
null
null
AVR_Miner.py
guddunain/duino-coin
1bb5ce171d952ab378a04777ed9eb75eefb4721f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ########################################## # Duino-Coin Python AVR Miner (v2.5.7) # https://github.com/revoxhere/duino-coin # Distributed under MIT license # © Duino-Coin Community 2019-2021 ########################################## # Import libraries import sys from configparser import ConfigPa...
35.26699
79
0.395825
use the Minimal-PC_Miner.') install('requests') try: from colorama import Back, Fore, Style, init except ModuleNotFoundError: print( now().strftime('%H:%M:%S ') + 'Colorama is not installed. ' + 'Miner will try to install it. ' + 'If it fails, please manually install ...
true
true
f7423e8cec6aefb0730171f1547c5d6f1339e56a
2,072
py
Python
sdk/python/kfp/containers_tests/testdata/main.py
Strasser-Pablo/pipelines
a1d513eb412f3ffd44edf82af2fa7edb05c3b952
[ "Apache-2.0" ]
1
2021-08-23T19:09:56.000Z
2021-08-23T19:09:56.000Z
sdk/python/kfp/containers_tests/testdata/main.py
Strasser-Pablo/pipelines
a1d513eb412f3ffd44edf82af2fa7edb05c3b952
[ "Apache-2.0" ]
2
2021-06-01T10:02:51.000Z
2021-06-07T07:19:14.000Z
sdk/python/kfp/containers_tests/testdata/main.py
Strasser-Pablo/pipelines
a1d513eb412f3ffd44edf82af2fa7edb05c3b952
[ "Apache-2.0" ]
3
2022-01-10T13:40:24.000Z
2022-03-21T08:46:14.000Z
# Copyright 2021 The Kubeflow Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
38.37037
75
0.764479
from typing import NamedTuple from kfp import components from kfp.dsl import artifact from kfp.dsl import ontology_artifacts def test_func( test_param: str, test_artifact: components.InputArtifact('Dataset'), test_output1: components.OutputArtifact('Model') ) -> NamedTuple('Outputs', [('test_...
true
true
f7423efad2d4efa804ff2ac88fa303d0265cf384
48,876
py
Python
test/test_database_size.py
greenpau/py_insightvm_sdk
bd881f26e14cb9f0f9c47927469ec992de9de8e6
[ "Apache-2.0" ]
2
2019-03-15T16:05:54.000Z
2020-07-19T18:37:50.000Z
test/test_database_size.py
greenpau/py_insightvm_sdk
bd881f26e14cb9f0f9c47927469ec992de9de8e6
[ "Apache-2.0" ]
1
2021-03-26T04:46:12.000Z
2021-03-26T04:51:23.000Z
test/test_database_size.py
greenpau/py_insightvm_sdk
bd881f26e14cb9f0f9c47927469ec992de9de8e6
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ InsightVM API # Overview This guide documents the InsightVM Application Programming Interface (API) Version 3. This API supports the Representation State Transfer (REST) design pattern. Unless noted otherwise this API accepts and produces the `application/json` media type. This API uses ...
1,192.097561
48,045
0.49022
from __future__ import absolute_import import unittest import py_insightvm_sdk from py_insightvm_sdk.models.database_size import DatabaseSize from py_insightvm_sdk.rest import ApiException class TestDatabaseSize(unittest.TestCase): def setUp(self): pass def tearDown(self): pass ...
true
true
f7423f2002c383f6b47acc070e348326d1d67b9d
1,734
py
Python
parl/env/tests/continuous_wrappers_test.py
lp2333/PARL
e4bde1f5b7e69c5f8d3ee3a90a647dfe12204bd3
[ "ECL-2.0", "Apache-2.0" ]
3,172
2018-05-22T02:02:29.000Z
2022-03-31T09:14:56.000Z
parl/env/tests/continuous_wrappers_test.py
BKBK00/PARL
f508bc6085420431b504441c7ff129e64826603e
[ "Apache-2.0" ]
422
2018-05-17T16:58:45.000Z
2022-03-31T02:03:25.000Z
parl/env/tests/continuous_wrappers_test.py
BKBK00/PARL
f508bc6085420431b504441c7ff129e64826603e
[ "Apache-2.0" ]
794
2018-05-21T18:33:19.000Z
2022-03-30T13:38:09.000Z
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
31.527273
75
0.685121
import gym import numpy as np import unittest from parl.env.continuous_wrappers import ActionMappingWrapper class MockEnv(gym.Env): def __init__(self, low, high): self.action_space = gym.spaces.Box(low=low, high=high, shape=(3, )) self._max_episode_steps = 1000 def step(self, ac...
true
true
f7423f38267c448739df64d9da381619bf45f028
20,386
py
Python
sympy/matrices/tests/test_solvers.py
utkarshdeorah/sympy
dcdf59bbc6b13ddbc329431adf72fcee294b6389
[ "BSD-3-Clause" ]
1
2020-09-09T20:40:17.000Z
2020-09-09T20:40:17.000Z
sympy/matrices/tests/test_solvers.py
utkarshdeorah/sympy
dcdf59bbc6b13ddbc329431adf72fcee294b6389
[ "BSD-3-Clause" ]
14
2018-02-08T10:11:03.000Z
2019-04-16T10:32:46.000Z
sympy/matrices/tests/test_solvers.py
utkarshdeorah/sympy
dcdf59bbc6b13ddbc329431adf72fcee294b6389
[ "BSD-3-Clause" ]
1
2022-02-04T13:50:29.000Z
2022-02-04T13:50:29.000Z
from sympy.core.function import expand_mul from sympy.core.numbers import (I, Rational) from sympy.core.singleton import S from sympy.core.symbol import (Symbol, symbols) from sympy.core.sympify import sympify from sympy.simplify.simplify import simplify from sympy.matrices.matrices import (ShapeError, NonSquareMatrixE...
36.081416
127
0.474247
from sympy.core.function import expand_mul from sympy.core.numbers import (I, Rational) from sympy.core.singleton import S from sympy.core.symbol import (Symbol, symbols) from sympy.core.sympify import sympify from sympy.simplify.simplify import simplify from sympy.matrices.matrices import (ShapeError, NonSquareMatrixE...
true
true
f7423f9d781c3b466983a205f925a9cff2fc68be
13,590
py
Python
replaceme/seeder/crawl_store.py
zcomputerwiz/replaceme-blockchain
b6dfc3ff502e0cb6b7b5fbc566c7fb9ae559757a
[ "Apache-2.0" ]
null
null
null
replaceme/seeder/crawl_store.py
zcomputerwiz/replaceme-blockchain
b6dfc3ff502e0cb6b7b5fbc566c7fb9ae559757a
[ "Apache-2.0" ]
null
null
null
replaceme/seeder/crawl_store.py
zcomputerwiz/replaceme-blockchain
b6dfc3ff502e0cb6b7b5fbc566c7fb9ae559757a
[ "Apache-2.0" ]
null
null
null
import asyncio import dataclasses import ipaddress import logging import random import time from typing import List, Dict import aiosqlite from replaceme.seeder.peer_record import PeerRecord, PeerReliability log = logging.getLogger(__name__) class CrawlStore: crawl_db: aiosqlite.Connection last_timestamp: ...
37.645429
118
0.5844
import asyncio import dataclasses import ipaddress import logging import random import time from typing import List, Dict import aiosqlite from replaceme.seeder.peer_record import PeerRecord, PeerReliability log = logging.getLogger(__name__) class CrawlStore: crawl_db: aiosqlite.Connection last_timestamp: ...
true
true
f7423fc3c3838697c67f81f2239fdb387f249384
11,526
py
Python
tapas/experiments/table_retriever_experiment.py
apurvak/tapas
7884280be78d2f58ad9c125504d710ef89f49f9a
[ "Apache-2.0" ]
816
2020-03-31T15:15:56.000Z
2022-03-31T19:28:02.000Z
tapas/experiments/table_retriever_experiment.py
Fgerald/tapas
2987658c3b65c5ab6e698d6c57823dc30d3d0f96
[ "Apache-2.0" ]
155
2020-05-02T15:45:42.000Z
2022-03-31T08:35:23.000Z
tapas/experiments/table_retriever_experiment.py
Fgerald/tapas
2987658c3b65c5ab6e698d6c57823dc30d3d0f96
[ "Apache-2.0" ]
173
2020-05-01T02:39:38.000Z
2022-03-30T06:43:29.000Z
# coding=utf-8 # Copyright 2019 The Google AI Language Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
35.795031
80
0.71317
import csv import functools import os import traceback from typing import Text, Optional from absl import app from absl import flags from tapas.models import table_retriever_model from tapas.scripts import eval_table_retriever_utils from tapas.utils import experiment_utils import tensorflow.compat.v1...
true
true
f7424014c21116e17ba897dc6417dff904559584
3,263
py
Python
python/paddle/fluid/tests/unittests/mkldnn/test_stack_mkldnn_op.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
8
2016-08-15T07:02:27.000Z
2016-08-24T09:34:00.000Z
python/paddle/fluid/tests/unittests/mkldnn/test_stack_mkldnn_op.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
2
2019-07-26T04:06:05.000Z
2019-07-29T04:25:24.000Z
python/paddle/fluid/tests/unittests/mkldnn/test_stack_mkldnn_op.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
5
2021-12-10T11:20:06.000Z
2022-02-18T05:18:12.000Z
# Copyright (c) 2021 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...
28.12931
87
0.666258
import unittest import numpy as np from paddle.fluid.tests.unittests.op_test import OpTest, OpTestTool, skip_check_grad_ci import paddle import paddle.fluid as fluid import paddle.fluid.core as core @OpTestTool.skip_if_not_cpu() class TestStack2DOneDNNOp(OpTest): def initDefaultParameters(self): ...
true
true
f742415541f1c06b9b53be8bb2afe74fa6525e6c
5,702
py
Python
ci/tools/ci_tags.py
openeuler-mirror/infrastructure
07c3f1128eb0e4dcca1fb2f203c8fefe4e74fb87
[ "Apache-2.0" ]
null
null
null
ci/tools/ci_tags.py
openeuler-mirror/infrastructure
07c3f1128eb0e4dcca1fb2f203c8fefe4e74fb87
[ "Apache-2.0" ]
1
2021-03-26T03:24:54.000Z
2021-03-26T03:24:54.000Z
ci/tools/ci_tags.py
openeuler-mirror/infrastructure
07c3f1128eb0e4dcca1fb2f203c8fefe4e74fb87
[ "Apache-2.0" ]
1
2021-08-18T09:26:02.000Z
2021-08-18T09:26:02.000Z
import requests import sys class Check(): def __init__(self, owner, repo, number, access_token): self.owner = owner self.repo = repo self.number = number self.access_token = access_token def add_processing_tag(self): url = 'https://gitee.com/api/v5/repos/{}/{}/pulls/{}...
40.439716
114
0.482112
import requests import sys class Check(): def __init__(self, owner, repo, number, access_token): self.owner = owner self.repo = repo self.number = number self.access_token = access_token def add_processing_tag(self): url = 'https://gitee.com/api/v5/repos/{}/{}/pulls/{}...
true
true
f742416c47a2a5394fae38869c1d44c9fb005298
374
py
Python
tests/test_cli.py
brain461/ar_too
ef4c3cfa9e836c4fa30e479fc4eec4d864b16175
[ "Apache-2.0" ]
null
null
null
tests/test_cli.py
brain461/ar_too
ef4c3cfa9e836c4fa30e479fc4eec4d864b16175
[ "Apache-2.0" ]
null
null
null
tests/test_cli.py
brain461/ar_too
ef4c3cfa9e836c4fa30e479fc4eec4d864b16175
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ test_cli ---------------------------------- Tests for `cli` module. """ # thirdparty libraies import pytest # This package from ar_too import cli class TestCli: def test_cli(self, cli_runner): result = cli_runner.invoke(cli.cli, ['--help']) assert result.exit_code ==...
17
55
0.585561
import pytest from ar_too import cli class TestCli: def test_cli(self, cli_runner): result = cli_runner.invoke(cli.cli, ['--help']) assert result.exit_code == 0 assert result.output.startswith('Usage:')
true
true
f74242fb7af377eebbd576e541afda6d02620765
10,147
py
Python
search/search_quality/scoring_model.py
Polas/omim
03558b418b338f506fbf3aa72ddf15187a2005ee
[ "Apache-2.0" ]
null
null
null
search/search_quality/scoring_model.py
Polas/omim
03558b418b338f506fbf3aa72ddf15187a2005ee
[ "Apache-2.0" ]
null
null
null
search/search_quality/scoring_model.py
Polas/omim
03558b418b338f506fbf3aa72ddf15187a2005ee
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 from math import exp, log from scipy.stats import pearsonr, t from sklearn import svm from sklearn.model_selection import GridSearchCV, KFold from sklearn.utils import resample import argparse import collections import itertools import numpy as np import pandas as pd import random import sys M...
30.563253
108
0.618409
from math import exp, log from scipy.stats import pearsonr, t from sklearn import svm from sklearn.model_selection import GridSearchCV, KFold from sklearn.utils import resample import argparse import collections import itertools import numpy as np import pandas as pd import random import sys MAX_DISTANCE_METERS = 2...
true
true
f74246e6fe05e6777911217dfde4a1b0d5eebf66
326
py
Python
.history/my_classes/FirstClassFunctions/callables_20210706005111.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/FirstClassFunctions/callables_20210706005111.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/FirstClassFunctions/callables_20210706005111.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
""" Callables What are callables? Any object that can be called using the () # operator always return a value -> like functions and methods -> but it goes beyond these two... Many other objects in Python are also callable To see if an object is callable, we can use the builtin function: callable ...
29.636364
153
0.696319
true
true
f74247352c7264de72013c5abdc0a5d31a3a92f8
747
py
Python
Problems/Euler Project 28.py
vishwas-21/Project-Euler
ecc6cd843425647582488bcaaaa1815439251d56
[ "MIT" ]
null
null
null
Problems/Euler Project 28.py
vishwas-21/Project-Euler
ecc6cd843425647582488bcaaaa1815439251d56
[ "MIT" ]
null
null
null
Problems/Euler Project 28.py
vishwas-21/Project-Euler
ecc6cd843425647582488bcaaaa1815439251d56
[ "MIT" ]
null
null
null
n = 1001 arr = [[0 for _ in range(n)] for _ in range(n)] i = j = n // 2 k = 1 num = 2 arr[i][j] = 1 while i != 0 or j != n - 1: if i == 0: while j != n - 1: arr[i][j + 1] = num num += 1 j += 1 break # Right for l in range(k): arr[i][j + 1] = num ...
18.675
47
0.368139
n = 1001 arr = [[0 for _ in range(n)] for _ in range(n)] i = j = n // 2 k = 1 num = 2 arr[i][j] = 1 while i != 0 or j != n - 1: if i == 0: while j != n - 1: arr[i][j + 1] = num num += 1 j += 1 break for l in range(k): arr[i][j + 1] = num n...
true
true
f7424839fc39de6f483c5e3722b37f7010918131
1,165
py
Python
temp/views.py
mentoriacompartilhada/helenamagaldi-v0
d26e5b4ae887382b02c00092c2487437bc9ffb78
[ "MIT" ]
1
2021-08-19T02:38:47.000Z
2021-08-19T02:38:47.000Z
temp/views.py
mentoriacompartilhada/helenamagaldi-v0
d26e5b4ae887382b02c00092c2487437bc9ffb78
[ "MIT" ]
null
null
null
temp/views.py
mentoriacompartilhada/helenamagaldi-v0
d26e5b4ae887382b02c00092c2487437bc9ffb78
[ "MIT" ]
null
null
null
# from django.shortcuts import render from meuapp.models import Pessoa from django.http import HttpResponse from rest_framework.generics import ListAPIView, CreateAPIView, UpdateAPIView, DestroyAPIView, RetrieveAPIView from .serializers import PessoaSerializer def hello_world(request): return HttpResponse('Hell...
27.093023
110
0.799142
from meuapp.models import Pessoa from django.http import HttpResponse from rest_framework.generics import ListAPIView, CreateAPIView, UpdateAPIView, DestroyAPIView, RetrieveAPIView from .serializers import PessoaSerializer def hello_world(request): return HttpResponse('Hello world') class PessoaView(ListAPIV...
true
true
f742485d753a189fa69f576d39b16fcb138761fd
1,644
py
Python
cfgov/cfgov/settings/test.py
HealthStarInformatics/cfgov-refresh
5c38515cbeef826c09125a5cb34c1abb24a724cf
[ "CC0-1.0" ]
null
null
null
cfgov/cfgov/settings/test.py
HealthStarInformatics/cfgov-refresh
5c38515cbeef826c09125a5cb34c1abb24a724cf
[ "CC0-1.0" ]
null
null
null
cfgov/cfgov/settings/test.py
HealthStarInformatics/cfgov-refresh
5c38515cbeef826c09125a5cb34c1abb24a724cf
[ "CC0-1.0" ]
1
2019-12-28T14:04:07.000Z
2019-12-28T14:04:07.000Z
from .local import * # A test database may be specified through use of the TEST_DATABASE_URL # environment variable. If not provided, unit tests will be run against an # in-memory SQLite database. TEST_DATABASE_URL = os.getenv('TEST_DATABASE_URL') if TEST_DATABASE_URL: TEST_DATABASE = dj_database_url.parse(TEST_D...
26.95082
77
0.704988
from .local import * TEST_DATABASE_URL = os.getenv('TEST_DATABASE_URL') if TEST_DATABASE_URL: TEST_DATABASE = dj_database_url.parse(TEST_DATABASE_URL) else: TEST_DATABASE = { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', 'TEST': { 'NAME': ':memory:', ...
true
true
f7424888f4867dd28e7ce7d8700e778ed3a7127c
19,931
py
Python
cyder/settings/base.py
jwasinger/cyder
de3e61ca47b71ac28d0a36568f250f4bc2617f22
[ "BSD-3-Clause" ]
null
null
null
cyder/settings/base.py
jwasinger/cyder
de3e61ca47b71ac28d0a36568f250f4bc2617f22
[ "BSD-3-Clause" ]
null
null
null
cyder/settings/base.py
jwasinger/cyder
de3e61ca47b71ac28d0a36568f250f4bc2617f22
[ "BSD-3-Clause" ]
null
null
null
# This is Cyder's main settings file. If you need to override a setting # locally, use cyder/settings/local.py import glob import itertools import logging import os import socket import sys from django.utils.functional import lazy from lib.path_utils import ROOT, path ########################## # copied from funfact...
31.486572
79
0.647986
# locally, use cyder/settings/local.py import glob import itertools import logging import os import socket import sys from django.utils.functional import lazy from lib.path_utils import ROOT, path ########################## # copied from funfactory # ########################## SLAVE_DATABASES = [] DATABASE_ROUTER...
true
true
f742498e17163a8369ecc2560a45514362c00283
21,838
py
Python
www/tests/test_generators.py
raspberrypieman/brython
2cc23d1da6acda604d4a56b4c9d464eb7e374eda
[ "BSD-3-Clause" ]
null
null
null
www/tests/test_generators.py
raspberrypieman/brython
2cc23d1da6acda604d4a56b4c9d464eb7e374eda
[ "BSD-3-Clause" ]
null
null
null
www/tests/test_generators.py
raspberrypieman/brython
2cc23d1da6acda604d4a56b4c9d464eb7e374eda
[ "BSD-3-Clause" ]
null
null
null
# examples from http://linuxgazette.net/100/pramode.html def foo(): yield 1 yield 2 g = foo() assert next(g)==1 assert next(g)==2 def foo(): return yield 1 assert [x for x in foo()]==[] def foo(n): for i in range(2): if (n < 3): yield 1 else: return ...
18.553951
107
0.515615
def foo(): yield 1 yield 2 g = foo() assert next(g)==1 assert next(g)==2 def foo(): return yield 1 assert [x for x in foo()]==[] def foo(n): for i in range(2): if (n < 3): yield 1 else: return yield 2 assert [x for x in foo(2)]==[1, 2, 1, 2] ass...
true
true
f7424a0c31152cd60e64576847316cd4b09e2640
173
py
Python
Curso_Python/Secao2-Python-Basico-Logica-Programacao/24_documentacao_e_buit_in/24_documentação_e_buit_in.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao2-Python-Basico-Logica-Programacao/24_documentacao_e_buit_in/24_documentação_e_buit_in.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao2-Python-Basico-Logica-Programacao/24_documentacao_e_buit_in/24_documentação_e_buit_in.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
num1 = input('Digite um numero: ') num2 = input('Digite outro numero: ') try: num1 = float(num1) num2 = float(num2) print(num1 + num2) except: print('Error')
21.625
37
0.618497
num1 = input('Digite um numero: ') num2 = input('Digite outro numero: ') try: num1 = float(num1) num2 = float(num2) print(num1 + num2) except: print('Error')
true
true
f7424a1eca32ad1f86ce7b52a33d3703dda74442
3,393
py
Python
test/conftest.py
alimoabd2127/pystardog
fc131db119737b0f7cf0e991c5ff8184ae0cbb6d
[ "Apache-2.0" ]
null
null
null
test/conftest.py
alimoabd2127/pystardog
fc131db119737b0f7cf0e991c5ff8184ae0cbb6d
[ "Apache-2.0" ]
null
null
null
test/conftest.py
alimoabd2127/pystardog
fc131db119737b0f7cf0e991c5ff8184ae0cbb6d
[ "Apache-2.0" ]
null
null
null
import pytest import stardog.content as content import stardog.content_types as content_types import os # STARDOG_ENDPOINT = os.environ.get('STARDOG_ENDPOINT', None) STARDOG_HOSTNAME_NODE_1 = os.environ.get("STARDOG_HOSTNAME_NODE_1", None) STARDOG_HOSTNAME_CACHE = os.environ.get("STARDOG_HOSTNAME_CACHE", None) STARDOG...
30.026549
118
0.655172
import pytest import stardog.content as content import stardog.content_types as content_types import os STARDOG_HOSTNAME_NODE_1 = os.environ.get("STARDOG_HOSTNAME_NODE_1", None) STARDOG_HOSTNAME_CACHE = os.environ.get("STARDOG_HOSTNAME_CACHE", None) STARDOG_HOSTNAME_STANDBY = os.environ.get("STARDOG_HOSTNAME_STANDBY"...
true
true
f7424a716aa69fbe512f6083f8666af4778c2d75
1,351
py
Python
dreamuserdb/api1/urls.py
dreamplatform/dream-userdb
5cc448cbcc3f17fd29eb6c38aadb67dc55715f70
[ "BSD-3-Clause" ]
null
null
null
dreamuserdb/api1/urls.py
dreamplatform/dream-userdb
5cc448cbcc3f17fd29eb6c38aadb67dc55715f70
[ "BSD-3-Clause" ]
null
null
null
dreamuserdb/api1/urls.py
dreamplatform/dream-userdb
5cc448cbcc3f17fd29eb6c38aadb67dc55715f70
[ "BSD-3-Clause" ]
null
null
null
import logging from django.conf.urls.defaults import * from piston.resource import Resource as R from piston.authentication import HttpBasicAuthentication import handlers l = logging.getLogger(__name__) class Auth(HttpBasicAuthentication): def is_authenticated(self, request): user = super(Auth, self).is_authen...
31.418605
66
0.635085
import logging from django.conf.urls.defaults import * from piston.resource import Resource as R from piston.authentication import HttpBasicAuthentication import handlers l = logging.getLogger(__name__) class Auth(HttpBasicAuthentication): def is_authenticated(self, request): user = super(Auth, self).is_authen...
true
true
f7424a91ee2c22ceaf996065e96eda2c83e4b76e
235
py
Python
restart.py
GregTCLTK/Amme
3daa5d70a036ee5843a1a65666b6fccfff2f6c78
[ "Apache-2.0" ]
null
null
null
restart.py
GregTCLTK/Amme
3daa5d70a036ee5843a1a65666b6fccfff2f6c78
[ "Apache-2.0" ]
null
null
null
restart.py
GregTCLTK/Amme
3daa5d70a036ee5843a1a65666b6fccfff2f6c78
[ "Apache-2.0" ]
1
2018-03-07T18:47:32.000Z
2018-03-07T18:47:32.000Z
import os import platform import time import sys time.sleep(3) if platform.system() == "Linux": os.system("screen -L -S Amme java -jar DiscordBot.jar -restart") else: os.system("java -jar Amaya-1.0-SNAPSHOT.jar") sys.exit(0)
18.076923
68
0.697872
import os import platform import time import sys time.sleep(3) if platform.system() == "Linux": os.system("screen -L -S Amme java -jar DiscordBot.jar -restart") else: os.system("java -jar Amaya-1.0-SNAPSHOT.jar") sys.exit(0)
true
true
f7424bf328b87e9014d193dcd80a846fe7eb982e
723
py
Python
emailer/auth.py
marcdurham/emailer
e33becfad00507984010df98091b4d9e1e423d3b
[ "MIT" ]
null
null
null
emailer/auth.py
marcdurham/emailer
e33becfad00507984010df98091b4d9e1e423d3b
[ "MIT" ]
null
null
null
emailer/auth.py
marcdurham/emailer
e33becfad00507984010df98091b4d9e1e423d3b
[ "MIT" ]
null
null
null
import google.oauth2.credentials import google_auth_oauthlib.flow as oauth_flow def fetch_new_creds(config): return oauth_flow.InstalledAppFlow.from_client_config( config, scopes=[ 'https://www.googleapis.com/auth/gmail.send', 'https://www.googleapis.com/auth/spreadsheets.readonly', ...
27.807692
68
0.710927
import google.oauth2.credentials import google_auth_oauthlib.flow as oauth_flow def fetch_new_creds(config): return oauth_flow.InstalledAppFlow.from_client_config( config, scopes=[ 'https://www.googleapis.com/auth/gmail.send', 'https://www.googleapis.com/auth/spreadsheets.readonly', ...
true
true
f7424c446a4baa3b3a75eaafd42cac674e3398f8
1,731
py
Python
genevieve_client/migrations/0004_auto_20160328_1526.py
madprime/Genevieve
0aff79f60310491a72ea9655de6696068a0a816a
[ "MIT" ]
12
2017-03-21T19:51:16.000Z
2022-03-15T22:29:49.000Z
genevieve_client/migrations/0004_auto_20160328_1526.py
madprime/Genevieve
0aff79f60310491a72ea9655de6696068a0a816a
[ "MIT" ]
15
2017-03-09T19:04:37.000Z
2021-06-10T18:01:49.000Z
genevieve_client/migrations/0004_auto_20160328_1526.py
madprime/Genevieve
0aff79f60310491a72ea9655de6696068a0a816a
[ "MIT" ]
2
2017-03-09T17:45:44.000Z
2018-11-10T10:00:34.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-28 15:26 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependen...
36.0625
121
0.608319
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('genevieve_client', '0003_varia...
true
true
f7424d3934b979eb791ca5fbe63229557fe49d3e
5,161
py
Python
networkx/linalg/modularitymatrix.py
AaronOpfer/networkx
f04ca835c3503f04f9b3e933270575980e44205b
[ "BSD-3-Clause" ]
1
2020-05-13T01:08:42.000Z
2020-05-13T01:08:42.000Z
networkx/linalg/modularitymatrix.py
AaronOpfer/networkx
f04ca835c3503f04f9b3e933270575980e44205b
[ "BSD-3-Clause" ]
1
2019-11-28T21:08:50.000Z
2019-11-28T21:08:50.000Z
networkx/linalg/modularitymatrix.py
AaronOpfer/networkx
f04ca835c3503f04f9b3e933270575980e44205b
[ "BSD-3-Clause" ]
1
2021-01-27T12:09:05.000Z
2021-01-27T12:09:05.000Z
"""Modularity matrix of graphs. """ # Copyright (C) 2004-2019 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. import networkx as nx from networkx.utils import not_implemented_for __author__ = "\n".join(['Aric...
30.358824
94
0.61926
import networkx as nx from networkx.utils import not_implemented_for __author__ = "\n".join(['Aric Hagberg <aric.hagberg@gmail.com>', 'Pieter Swart (swart@lanl.gov)', 'Dan Schult (dschult@colgate.edu)', 'Jean-Gabriel Young (Jean.gabriel.young...
true
true
f7424ddd58d49942b92833abce13ff4b4b8a0968
16,296
py
Python
texar/data/data_decoders.py
Holmeswww/Text_Infilling
f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3
[ "Apache-2.0" ]
25
2019-01-03T09:15:20.000Z
2022-02-12T04:20:59.000Z
texar/data/data_decoders.py
Holmeswww/Text_Infilling
f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3
[ "Apache-2.0" ]
4
2019-03-28T11:02:20.000Z
2022-02-15T04:57:33.000Z
texar/data/data_decoders.py
Holmeswww/Text_Infilling
f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3
[ "Apache-2.0" ]
9
2019-01-03T02:20:37.000Z
2022-02-12T04:20:50.000Z
# -*- coding: utf-8 -*- # """ Helper functions and classes for decoding text data which are used after reading raw text data. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np import tensorflow a...
36.133038
80
0.6196
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np import tensorflow as tf from tensorflow.contrib.slim.python.slim.data import data_decoder from texar.data.vocabulary import SpecialTokens __al...
true
true
f7424ec0c228b84cd12298e031fd278b50250e6f
2,836
py
Python
zuul.d/octavia/policies/healthmonitor.py
yi-cloud/octavia
b7f5cfa4c3c454925a90c24984049539228806d7
[ "Apache-2.0" ]
null
null
null
zuul.d/octavia/policies/healthmonitor.py
yi-cloud/octavia
b7f5cfa4c3c454925a90c24984049539228806d7
[ "Apache-2.0" ]
null
null
null
zuul.d/octavia/policies/healthmonitor.py
yi-cloud/octavia
b7f5cfa4c3c454925a90c24984049539228806d7
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Rackspace, US Inc. # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
41.101449
79
0.61354
from oslo_policy import policy from octavia.common import constants rules = [ policy.DocumentedRuleDefault( '{rbac_obj}{action}'.format(rbac_obj=constants.RBAC_HEALTHMONITOR, action=constants.RBAC_GET_ALL), constants.RULE_API_READ, ...
true
true
f7425056ae920150494264872c50f735fe327596
13,336
py
Python
generate-tests.py
cta-wave/dpctf-tests
44ada3fc46237ff0ac00d90e00d106fbd82fff60
[ "BSD-3-Clause" ]
1
2020-09-14T12:06:03.000Z
2020-09-14T12:06:03.000Z
generate-tests.py
cta-wave/dpctf-tests
44ada3fc46237ff0ac00d90e00d106fbd82fff60
[ "BSD-3-Clause" ]
76
2020-11-16T14:03:53.000Z
2022-03-22T20:41:51.000Z
generate-tests.py
cta-wave/dpctf-tests
44ada3fc46237ff0ac00d90e00d106fbd82fff60
[ "BSD-3-Clause" ]
1
2021-09-30T13:12:53.000Z
2021-09-30T13:12:53.000Z
#!/usr/bin/python import sys import os import shutil, errno from pathlib import Path import hashlib import json import urllib.request import re from xml.dom.minidom import parseString from python_lib.gweis.isoduration import parse_duration TYPE_AUDIO = "audio" TYPE_VIDEO = "video" if len(sys.argv) < 3: print("Pl...
36.140921
113
0.62485
import sys import os import shutil, errno from pathlib import Path import hashlib import json import urllib.request import re from xml.dom.minidom import parseString from python_lib.gweis.isoduration import parse_duration TYPE_AUDIO = "audio" TYPE_VIDEO = "video" if len(sys.argv) < 3: print("Please provide a CS...
true
true
f74250b4efd42ec92a7d17d91910c3d315f0731c
2,806
py
Python
tests/test_asyncio_transport.py
yvdlima/python-zeep
aae3def4385b0f8922e0e83b9cdcd68b2263f739
[ "MIT" ]
3
2017-04-01T16:05:52.000Z
2019-07-26T14:32:26.000Z
tests/test_asyncio_transport.py
yvdlima/python-zeep
aae3def4385b0f8922e0e83b9cdcd68b2263f739
[ "MIT" ]
1
2020-08-24T19:21:29.000Z
2020-08-24T19:24:40.000Z
tests/test_asyncio_transport.py
yvdlima/python-zeep
aae3def4385b0f8922e0e83b9cdcd68b2263f739
[ "MIT" ]
2
2020-11-18T09:49:46.000Z
2021-07-08T14:02:03.000Z
import aiohttp import pytest from aioresponses import aioresponses from lxml import etree from pretend import stub from zeep import asyncio, exceptions from zeep.cache import InMemoryCache @pytest.mark.requests def test_no_cache(event_loop): transport = asyncio.AsyncTransport(loop=event_loop) assert transpor...
29.229167
82
0.701711
import aiohttp import pytest from aioresponses import aioresponses from lxml import etree from pretend import stub from zeep import asyncio, exceptions from zeep.cache import InMemoryCache @pytest.mark.requests def test_no_cache(event_loop): transport = asyncio.AsyncTransport(loop=event_loop) assert transpor...
true
true
f742513ee50f4ff7001c6a3f3a6698b1e7280970
3,421
py
Python
tests/gmprocess/metrics/imt/fas_arithmetic_mean_test.py
meramossepu1/groundmotion-processing
5cc19023b94e5b5b718590ce8cd05a22a4088a67
[ "Unlicense" ]
54
2019-01-12T02:05:38.000Z
2022-03-29T19:43:56.000Z
tests/gmprocess/metrics/imt/fas_arithmetic_mean_test.py
meramossepu1/groundmotion-processing
5cc19023b94e5b5b718590ce8cd05a22a4088a67
[ "Unlicense" ]
700
2018-12-18T19:44:31.000Z
2022-03-30T20:54:28.000Z
tests/gmprocess/metrics/imt/fas_arithmetic_mean_test.py
meramossepu1/groundmotion-processing
5cc19023b94e5b5b718590ce8cd05a22a4088a67
[ "Unlicense" ]
41
2018-11-29T23:17:56.000Z
2022-03-31T04:04:23.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # stdlib imports import os.path import re # third party imports import numpy as np import pandas as pd import pkg_resources # Local imports from gmprocess.metrics.station_summary import StationSummary from gmprocess.core.stationstream import StationStream from gmprocess....
33.539216
82
0.556855
import os.path import re import numpy as np import pandas as pd import pkg_resources from gmprocess.metrics.station_summary import StationSummary from gmprocess.core.stationstream import StationStream from gmprocess.core.stationtrace import StationTrace def test_fas(): ddir = os.path.join("data", "testdat...
true
true
f7425197a782c24528f23825384d93345f77726e
2,043
py
Python
ros/src/twist_controller/stability_controller.py
aero5566/Final-System-Integrated
fbaecbd7e99ff4dd39a2dd27cb325a58880f7c85
[ "MIT" ]
null
null
null
ros/src/twist_controller/stability_controller.py
aero5566/Final-System-Integrated
fbaecbd7e99ff4dd39a2dd27cb325a58880f7c85
[ "MIT" ]
11
2020-01-28T22:58:00.000Z
2022-03-11T23:58:23.000Z
ros/src/twist_controller/stability_controller.py
winterslong/CarND-Capstone-wlong
0cffd22256417890188bace5074f6c481e58891b
[ "MIT" ]
2
2019-10-06T07:45:23.000Z
2019-10-08T06:16:58.000Z
# import rospy from math import atan2, pi, sqrt from pid import PID GAS_DENSITY = 2.858 ONE_MPH = 0.44704 class TwistController(object): def __init__(self, max_angular_velocity, accel_limit, decel_limit): self.max_angular_velocity = max_angular_velocity self.accel_limit = accel_limit self....
34.627119
111
0.581498
from math import atan2, pi, sqrt from pid import PID GAS_DENSITY = 2.858 ONE_MPH = 0.44704 class TwistController(object): def __init__(self, max_angular_velocity, accel_limit, decel_limit): self.max_angular_velocity = max_angular_velocity self.accel_limit = accel_limit self.decel_limit = ...
true
true
f74252377db9d6fa8eeb07059e4b49ddfc329441
1,766
py
Python
samples/snippets/quickstart/quickstart.py
glaswasser/python-vision
706c314a86b8f35c313bb3e907ae84317dca1a0b
[ "Apache-2.0" ]
null
null
null
samples/snippets/quickstart/quickstart.py
glaswasser/python-vision
706c314a86b8f35c313bb3e907ae84317dca1a0b
[ "Apache-2.0" ]
null
null
null
samples/snippets/quickstart/quickstart.py
glaswasser/python-vision
706c314a86b8f35c313bb3e907ae84317dca1a0b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
32.703704
163
0.734994
def run_quickstart(): import io import os from google.cloud import vision client = vision.ImageAnnotatorClient() file_name = os.path.abspath('resources/wakeupcat.jpg') with io.open(file_name, 'rb') as image_file: content =...
true
true
f74252611c7f875d5199feecf3c1cd85f059c301
4,190
py
Python
tenable_io/api/users.py
skrtu/Tenable.io-SDK-for-Python
fde8871ba558666609183ac8702149ecf08421b5
[ "MIT" ]
null
null
null
tenable_io/api/users.py
skrtu/Tenable.io-SDK-for-Python
fde8871ba558666609183ac8702149ecf08421b5
[ "MIT" ]
null
null
null
tenable_io/api/users.py
skrtu/Tenable.io-SDK-for-Python
fde8871ba558666609183ac8702149ecf08421b5
[ "MIT" ]
1
2018-07-29T02:55:16.000Z
2018-07-29T02:55:16.000Z
from json import loads from tenable_io.api.base import BaseApi, BaseRequest from tenable_io.api.models import User, UserKeys, UserList class UsersApi(BaseApi): def get(self, user_id): response = self._client.get('users/%(user_id)s', {'user_id': user_id}) return User.from_json(response.text) ...
32.48062
103
0.617422
from json import loads from tenable_io.api.base import BaseApi, BaseRequest from tenable_io.api.models import User, UserKeys, UserList class UsersApi(BaseApi): def get(self, user_id): response = self._client.get('users/%(user_id)s', {'user_id': user_id}) return User.from_json(response.text) ...
true
true
f74253e858e992afdc6dba948d54da6793a65c2b
932
py
Python
var/spack/repos/builtin/packages/xxd-standalone/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2,360
2017-11-06T08:47:01.000Z
2022-03-31T14:45:33.000Z
var/spack/repos/builtin/packages/xxd-standalone/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
13,838
2017-11-04T07:49:45.000Z
2022-03-31T23:38:39.000Z
var/spack/repos/builtin/packages/xxd-standalone/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1,793
2017-11-04T07:45:50.000Z
2022-03-30T14:31:53.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os from spack import * class XxdStandalone(MakefilePackage): """xxd creates a hex dump of a given file or st...
32.137931
98
0.696352
import os from spack import * class XxdStandalone(MakefilePackage): homepage = "https://www.vim.org/" url = "https://github.com/vim/vim/archive/v8.2.1201.tar.gz" maintainers = ['haampie'] build_targets = ['-C', os.path.join('src', 'xxd')] provides('xxd') version('8.2.1201', sha2...
true
true
f7425426bef76593f5f9e640968179448ad18a4a
7,620
py
Python
oil_lang/expr_parse.py
msingle/oil
5623c58d4558d37cd43e6274574d94a0e547f192
[ "Apache-2.0" ]
null
null
null
oil_lang/expr_parse.py
msingle/oil
5623c58d4558d37cd43e6274574d94a0e547f192
[ "Apache-2.0" ]
null
null
null
oil_lang/expr_parse.py
msingle/oil
5623c58d4558d37cd43e6274574d94a0e547f192
[ "Apache-2.0" ]
null
null
null
""" expr_parse.py """ from __future__ import print_function import sys from _devbuild.gen.syntax_asdl import token from _devbuild.gen.id_kind_asdl import Id, Kind from _devbuild.gen.types_asdl import lex_mode_e from core import meta from core import util #from core.util import log from pgen2 import parse from typin...
29.534884
83
0.64147
from __future__ import print_function import sys from _devbuild.gen.syntax_asdl import token from _devbuild.gen.id_kind_asdl import Id, Kind from _devbuild.gen.types_asdl import lex_mode_e from core import meta from core import util from pgen2 import parse from typing import TYPE_CHECKING, IO, Dict, Tuple if TYPE_...
true
true
f742548f7709d418a35ffa086a6ce4f7cf75236d
6,820
py
Python
acr_module/acr/preprocessing/doc2vec_adressa.py
romybu22/chameleon-smart-sampling
d0f0588ed9d38e9c133482a68e84379c21892080
[ "MIT" ]
1
2021-03-01T17:44:04.000Z
2021-03-01T17:44:04.000Z
acr_module/acr/preprocessing/doc2vec_adressa.py
romybu22/chameleon-smart-sampling
d0f0588ed9d38e9c133482a68e84379c21892080
[ "MIT" ]
null
null
null
acr_module/acr/preprocessing/doc2vec_adressa.py
romybu22/chameleon-smart-sampling
d0f0588ed9d38e9c133482a68e84379c21892080
[ "MIT" ]
null
null
null
import argparse import pandas as pd import numpy as np import re import nltk from sklearn.preprocessing import LabelEncoder from ..utils import serialize from .tokenization import tokenize_articles, nan_to_str, convert_tokens_to_int, get_words_freq from gensim.models.doc2vec import Doc2Vec, TaggedDocument from nltk....
39.651163
214
0.698827
import argparse import pandas as pd import numpy as np import re import nltk from sklearn.preprocessing import LabelEncoder from ..utils import serialize from .tokenization import tokenize_articles, nan_to_str, convert_tokens_to_int, get_words_freq from gensim.models.doc2vec import Doc2Vec, TaggedDocument from nltk....
true
true
f74255cf7fc2d99163290e2320d9fbec96ea0ef7
17,282
py
Python
analysis/benchmark_results.py
ajrox090/fuzzbench
d4bb0122e2ed39ea59ca703fe8eb56ee61216756
[ "Apache-2.0" ]
4
2021-11-08T06:17:02.000Z
2022-02-28T06:34:57.000Z
analysis/benchmark_results.py
ajrox090/fuzzbench
d4bb0122e2ed39ea59ca703fe8eb56ee61216756
[ "Apache-2.0" ]
16
2020-09-22T05:04:31.000Z
2021-03-29T08:31:33.000Z
analysis/benchmark_results.py
ajrox090/fuzzbench
d4bb0122e2ed39ea59ca703fe8eb56ee61216756
[ "Apache-2.0" ]
4
2022-02-08T05:11:08.000Z
2022-03-14T05:15:33.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
38.835955
80
0.663233
import os import functools from analysis import data_utils from analysis import coverage_data_utils from analysis import stat_tests from common import benchmark_utils class BenchmarkResults: def __init__(self, benchmark_name, experiment_df, coverage_dict, output_directory, plotte...
true
true
f7425649b6f5100d136d19714cec4a6ee93a7128
849
py
Python
tests/validate/test_async_run_repository_checks.py
racelandshop/integration
424057dcad30f20ed0276aec07d28b48b2b187be
[ "MIT" ]
null
null
null
tests/validate/test_async_run_repository_checks.py
racelandshop/integration
424057dcad30f20ed0276aec07d28b48b2b187be
[ "MIT" ]
null
null
null
tests/validate/test_async_run_repository_checks.py
racelandshop/integration
424057dcad30f20ed0276aec07d28b48b2b187be
[ "MIT" ]
null
null
null
import pytest from custom_components.racelandshop.share import SHARE from custom_components.racelandshop.validate import ( async_initialize_rules, async_run_repository_checks, ) @pytest.mark.asyncio async def test_async_initialize_rules(racelandshop): await async_initialize_rules() @pytest.mark.asynci...
28.3
81
0.799764
import pytest from custom_components.racelandshop.share import SHARE from custom_components.racelandshop.validate import ( async_initialize_rules, async_run_repository_checks, ) @pytest.mark.asyncio async def test_async_initialize_rules(racelandshop): await async_initialize_rules() @pytest.mark.asynci...
true
true
f742575f2c2577a74f855843f18c09e875eedb03
4,649
py
Python
ui/events/ozone/evdev/capture_device_capabilities.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
575
2015-06-18T23:58:20.000Z
2022-03-23T09:32:39.000Z
ui/events/ozone/evdev/capture_device_capabilities.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
113
2015-05-04T09:58:14.000Z
2022-01-31T19:35:03.000Z
ui/events/ozone/evdev/capture_device_capabilities.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
52
2015-07-14T10:40:50.000Z
2022-03-15T01:11:49.000Z
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Code generator DeviceCapabilities literal.""" import argparse import ctypes import glob import evdev import os import sys TEST_DA...
31.62585
78
0.665735
import argparse import ctypes import glob import evdev import os import sys TEST_DATA_GROUP_SIZE = 64 def bits_to_groups(bits): return (bits + TEST_DATA_GROUP_SIZE - 1) // TEST_DATA_GROUP_SIZE def serialize_bitfield(bitfield, max_bit): result = "" group_count = bits_to_groups(max_bit) for group i...
true
true
f74257e01cbe43653e26d5cb07641fae4382dd36
453
py
Python
submissions/abc117/d.py
m-star18/atcoder
08e475810516602fa088f87daf1eba590b4e07cc
[ "Unlicense" ]
1
2021-05-10T01:16:28.000Z
2021-05-10T01:16:28.000Z
submissions/abc117/d.py
m-star18/atcoder
08e475810516602fa088f87daf1eba590b4e07cc
[ "Unlicense" ]
3
2021-05-11T06:14:15.000Z
2021-06-19T08:18:36.000Z
submissions/abc117/d.py
m-star18/atcoder
08e475810516602fa088f87daf1eba590b4e07cc
[ "Unlicense" ]
null
null
null
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) n, k, *a = map(int, read().split()) v = 0 ans = 0 for i in range(40, -1, -1): cnt = 0 for aa in a: if (aa >> i) & 1: cnt += 1 if n - cnt > c...
21.571429
43
0.496689
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) n, k, *a = map(int, read().split()) v = 0 ans = 0 for i in range(40, -1, -1): cnt = 0 for aa in a: if (aa >> i) & 1: cnt += 1 if n - cnt > c...
true
true
f7425853119483c6e71a417ecdbaeeb469f18ca1
4,407
py
Python
src/bytesparse/__init__.py
TexZK/bytesparse
cdb1e58e9e6a6911efd72697c1cb812bc85025c8
[ "BSD-2-Clause" ]
null
null
null
src/bytesparse/__init__.py
TexZK/bytesparse
cdb1e58e9e6a6911efd72697c1cb812bc85025c8
[ "BSD-2-Clause" ]
13
2021-11-15T02:27:19.000Z
2022-02-17T00:13:08.000Z
src/bytesparse/__init__.py
TexZK/bytesparse
cdb1e58e9e6a6911efd72697c1cb812bc85025c8
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2020-2022, Andrea Zoppi. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions ...
36.725
82
0.570683
__version__ = '0.0.4' from .inplace import Memory from .inplace import bytesparse from .inplace import collapse_blocks
true
true
f742587dc715674022c1a125da9de67af190bf36
11,909
py
Python
notebooks/__code/radial_profile/event_handler.py
mabrahamdevops/python_notebooks
6d5e7383b60cc7fd476f6e85ab93e239c9c32330
[ "BSD-3-Clause" ]
null
null
null
notebooks/__code/radial_profile/event_handler.py
mabrahamdevops/python_notebooks
6d5e7383b60cc7fd476f6e85ab93e239c9c32330
[ "BSD-3-Clause" ]
null
null
null
notebooks/__code/radial_profile/event_handler.py
mabrahamdevops/python_notebooks
6d5e7383b60cc7fd476f6e85ab93e239c9c32330
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import pyqtgraph as pg from qtpy import QtGui from __code._utilities.parent import Parent from __code.radial_profile.display import Display class EventHandler(Parent): def file_index_changed(self): file_index = self.parent.ui.slider.value() live_image = self.parent.get_selecte...
35.338279
112
0.585943
import numpy as np import pyqtgraph as pg from qtpy import QtGui from __code._utilities.parent import Parent from __code.radial_profile.display import Display class EventHandler(Parent): def file_index_changed(self): file_index = self.parent.ui.slider.value() live_image = self.parent.get_selecte...
true
true
f74259843496a4f4a5b9701ef7797e24fcfbbe58
1,072
py
Python
draugr/visualisation/matplotlib_utilities/styles/cyclers.py
pything/draugr
2fda662f2fa97236e4495a6af2b8237516fa428b
[ "Apache-2.0" ]
null
null
null
draugr/visualisation/matplotlib_utilities/styles/cyclers.py
pything/draugr
2fda662f2fa97236e4495a6af2b8237516fa428b
[ "Apache-2.0" ]
16
2021-02-15T07:58:01.000Z
2022-02-20T15:16:23.000Z
draugr/visualisation/matplotlib_utilities/styles/cyclers.py
pything/draugr
2fda662f2fa97236e4495a6af2b8237516fa428b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "Christian Heider Nielsen" __doc__ = r""" Created on 18-02-2021 """ __all__ = [ "monochrome_hatch_cycler", "simple_hatch_cycler", "monochrome_line_no_marker_cycler", "monochrome_line_cycler", ] from matplotlib import c...
22.808511
71
0.689366
__author__ = "Christian Heider Nielsen" __doc__ = r""" Created on 18-02-2021 """ __all__ = [ "monochrome_hatch_cycler", "simple_hatch_cycler", "monochrome_line_no_marker_cycler", "monochrome_line_cycler", ] from matplotlib import cycler from draugr.visualisation.matplotlib_u...
true
true
f7425a2778150b3d0ca699fd4d0e7b23f749eff4
3,064
py
Python
sdk/python/pulumi_oci/apigateway/get_api_validation.py
EladGabay/pulumi-oci
6841e27d4a1a7e15c672306b769912efbfd3ba99
[ "ECL-2.0", "Apache-2.0" ]
5
2021-08-17T11:14:46.000Z
2021-12-31T02:07:03.000Z
sdk/python/pulumi_oci/apigateway/get_api_validation.py
pulumi-oci/pulumi-oci
6841e27d4a1a7e15c672306b769912efbfd3ba99
[ "ECL-2.0", "Apache-2.0" ]
1
2021-09-06T11:21:29.000Z
2021-09-06T11:21:29.000Z
sdk/python/pulumi_oci/apigateway/get_api_validation.py
pulumi-oci/pulumi-oci
6841e27d4a1a7e15c672306b769912efbfd3ba99
[ "ECL-2.0", "Apache-2.0" ]
2
2021-08-24T23:31:30.000Z
2022-01-02T19:26:54.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
31.265306
142
0.668407
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs __all__ = [ 'GetApiValidationResult', 'AwaitableGetApiValidationResult', 'get_api_validation', ] @pulumi.output_type class GetApiVali...
true
true