hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b4631189d6d2e11cc9e3587fbf8d89019ec14498 | 6,856 | py | Python | data_service/api/data_api.py | statisticsnorway/microdata-data-service | d477b7b75589d4c977771122558c948c040a1106 | [
"Apache-2.0"
] | null | null | null | data_service/api/data_api.py | statisticsnorway/microdata-data-service | d477b7b75589d4c977771122558c948c040a1106 | [
"Apache-2.0"
] | 7 | 2021-10-08T13:40:33.000Z | 2022-02-04T10:37:55.000Z | data_service/api/data_api.py | statisticsnorway/microdata-data-service | d477b7b75589d4c977771122558c948c040a1106 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import io
from fastapi import APIRouter, Depends, Header
from fastapi.responses import FileResponse, StreamingResponse
from fastapi import HTTPException, status
import pyarrow as pa
import pyarrow.parquet as pq
from data_service.api.query_models import (
InputTimePeriodQuery, InputTimeQue... | 35.708333 | 79 | 0.67605 | 0 | 0 | 0 | 0 | 6,125 | 0.893378 | 0 | 0 | 2,041 | 0.297695 |
b466221b457ff5136956aa01c99313e615519ec6 | 1,976 | py | Python | lib/parser/augur/Bonus.py | Innoviox/QuizDB | b26adf7134408e5b29ebc8b0b05601cbbf45667a | [
"MIT"
] | null | null | null | lib/parser/augur/Bonus.py | Innoviox/QuizDB | b26adf7134408e5b29ebc8b0b05601cbbf45667a | [
"MIT"
] | null | null | null | lib/parser/augur/Bonus.py | Innoviox/QuizDB | b26adf7134408e5b29ebc8b0b05601cbbf45667a | [
"MIT"
] | null | null | null | from utils import sanitize
class Bonus:
def __init__(self, number, leadin="", texts=None, answers=None,
category="", subcategory="",
tournament="", round=""):
self.number = number
self.leadin = leadin
self.texts = texts
self.answers = answers
... | 31.365079 | 75 | 0.522267 | 1,946 | 0.984818 | 0 | 0 | 0 | 0 | 0 | 0 | 169 | 0.085526 |
b466a703c7aeb3f1783bcb9b597f3efeb4eaec6e | 5,389 | py | Python | train_folds.py | wubinbai/argus-freesound | 662aa9570b31075fb1d9f18102bda89ed6bb0fc1 | [
"MIT"
] | 1 | 2019-12-12T02:37:57.000Z | 2019-12-12T02:37:57.000Z | train_folds.py | wubinbai/argus-freesound | 662aa9570b31075fb1d9f18102bda89ed6bb0fc1 | [
"MIT"
] | null | null | null | train_folds.py | wubinbai/argus-freesound | 662aa9570b31075fb1d9f18102bda89ed6bb0fc1 | [
"MIT"
] | null | null | null | import json
import argparse
from argus.callbacks import MonitorCheckpoint, \
EarlyStopping, LoggingToFile, ReduceLROnPlateau
from torch.utils.data import DataLoader
from src.datasets import FreesoundDataset, FreesoundNoisyDataset, RandomDataset
from src.datasets import get_corrected_noisy_data, FreesoundCorrecte... | 36.659864 | 92 | 0.594544 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 588 | 0.109111 |
b467f6301bdf6a68e1a4f160e420835a55b52e4b | 202 | py | Python | source_code/day001/input-exercise.py | MKutka/100daysofcode | e69c207956a1b16bb861e5831f0d66e75f16b31e | [
"MIT"
] | null | null | null | source_code/day001/input-exercise.py | MKutka/100daysofcode | e69c207956a1b16bb861e5831f0d66e75f16b31e | [
"MIT"
] | null | null | null | source_code/day001/input-exercise.py | MKutka/100daysofcode | e69c207956a1b16bb861e5831f0d66e75f16b31e | [
"MIT"
] | null | null | null | #Day 1.3 Exercise!!
#First way I thought to do it without help
name = input("What is your name? ")
print(len(name))
#Way I found to do it from searching google
print(len(input("What is your name? "))) | 25.25 | 43 | 0.70297 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 146 | 0.722772 |
b4695e99489bd38daaa6b9010e4ec8efec4ce4a7 | 3,524 | py | Python | pyvalidator/is_strong_password.py | theteladras/py.validator | 624ace7973552c8ac9353f48acbf96ec0ecc24a9 | [
"MIT"
] | 15 | 2021-11-01T14:14:56.000Z | 2022-03-17T11:52:29.000Z | pyvalidator/is_strong_password.py | theteladras/py.validator | 624ace7973552c8ac9353f48acbf96ec0ecc24a9 | [
"MIT"
] | 1 | 2022-03-16T13:39:16.000Z | 2022-03-17T09:16:00.000Z | pyvalidator/is_strong_password.py | theteladras/py.validator | 624ace7973552c8ac9353f48acbf96ec0ecc24a9 | [
"MIT"
] | null | null | null | from typing import TypedDict
from .utils.Classes.String import String
from .utils.assert_string import assert_string
from .utils.merge import merge
class _IsStrongPasswordOptions(TypedDict):
min_length: int
min_uppercase: int
min_lowercase: int
min_numbers: int
min_symbols: int
return_score: ... | 29.864407 | 92 | 0.652667 | 538 | 0.152667 | 0 | 0 | 0 | 0 | 0 | 0 | 862 | 0.244608 |
b46a7333f1fb95d927bac95badb76d52d1539743 | 1,691 | py | Python | boilerplate_app/serializers.py | taher-systango/DjangoUnboxed | 808ab771a44564458b897b6ec854c08f43cccf2a | [
"MIT"
] | null | null | null | boilerplate_app/serializers.py | taher-systango/DjangoUnboxed | 808ab771a44564458b897b6ec854c08f43cccf2a | [
"MIT"
] | null | null | null | boilerplate_app/serializers.py | taher-systango/DjangoUnboxed | 808ab771a44564458b897b6ec854c08f43cccf2a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
# Python imports.
import logging
import datetime
import calendar
# Django imports.
from django.db import transaction
# Rest Framework imports.
from rest_framework import serializers
# Third Party Library imports
# local imports.... | 25.621212 | 91 | 0.686576 | 1,310 | 0.77469 | 0 | 0 | 254 | 0.150207 | 0 | 0 | 350 | 0.206978 |
b46ebc3b01df0741b7690606a0b55aac51c6693f | 237 | py | Python | wagtail/wagtailadmin/blocks.py | patphongs/wagtail | 32555f7a1c599c139e0f26c22907c9612af2e015 | [
"BSD-3-Clause"
] | 3 | 2016-08-17T13:56:36.000Z | 2019-04-23T19:59:25.000Z | wagtail/wagtailadmin/blocks.py | patphongs/wagtail | 32555f7a1c599c139e0f26c22907c9612af2e015 | [
"BSD-3-Clause"
] | 11 | 2016-08-05T15:43:06.000Z | 2016-12-16T13:32:23.000Z | wagtail/wagtailadmin/blocks.py | patphongs/wagtail | 32555f7a1c599c139e0f26c22907c9612af2e015 | [
"BSD-3-Clause"
] | 2 | 2017-08-08T01:39:02.000Z | 2018-05-06T06:16:10.000Z | from __future__ import absolute_import, unicode_literals
import warnings
from wagtail.wagtailcore.blocks import * # noqa
warnings.warn("wagtail.wagtailadmin.blocks has moved to wagtail.wagtailcore.blocks", UserWarning, stacklevel=2)
| 29.625 | 111 | 0.827004 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 0.316456 |
b46ec93c5a888c6cb9e5eeda25bf96474de0d3f9 | 5,197 | py | Python | src/olympia/stats/management/commands/theme_update_counts_from_file.py | mstriemer/olympia | 2e700c20e0a8ed3f0dd389d1521c3798bf7ed7f7 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/stats/management/commands/theme_update_counts_from_file.py | mstriemer/olympia | 2e700c20e0a8ed3f0dd389d1521c3798bf7ed7f7 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/stats/management/commands/theme_update_counts_from_file.py | mstriemer/olympia | 2e700c20e0a8ed3f0dd389d1521c3798bf7ed7f7 | [
"BSD-3-Clause"
] | null | null | null | import codecs
from datetime import datetime, timedelta
from optparse import make_option
from os import path, unlink
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
import commonware.log
from olympia import amo
from olympia.addons.models import Addon, Persona
from ol... | 39.371212 | 79 | 0.583029 | 4,720 | 0.908216 | 0 | 0 | 0 | 0 | 0 | 0 | 1,820 | 0.350202 |
b470fed81935f91ffeef38325bad1336729439b2 | 663 | py | Python | KRR/Saved/Run 4/plot_all.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | 2 | 2018-10-10T09:32:34.000Z | 2019-03-28T08:42:31.000Z | KRR/Saved/Run 4/plot_all.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | null | null | null | KRR/Saved/Run 4/plot_all.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | null | null | null | import numpy as np
import pickle
import matplotlib.pyplot as plt
import os
import fnmatch
folder = "GP/"
ktype = "lin/"
matrices=os.listdir(folder+ktype)
for matrix in matrices:
if fnmatch.fnmatch(matrix, '*_val_*'):
with open(folder+ktype+matrix, "rb") as pickleFile:
results = pickle.load(pick... | 27.625 | 59 | 0.585219 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.135747 |
b4710f59abe4e45a9ec483665b621401e554ee1a | 5,919 | py | Python | FATERUI/common/camera/mindvision/camera_mindvision.py | LynnChan706/Fater | dde8e3baaac7be8b0c1f8bee0da628f6e6f2b772 | [
"MIT"
] | 4 | 2018-12-07T02:17:26.000Z | 2020-12-03T05:32:23.000Z | FATERUI/common/camera/mindvision/camera_mindvision.py | LynnChan706/Fater | dde8e3baaac7be8b0c1f8bee0da628f6e6f2b772 | [
"MIT"
] | null | null | null | FATERUI/common/camera/mindvision/camera_mindvision.py | LynnChan706/Fater | dde8e3baaac7be8b0c1f8bee0da628f6e6f2b772 | [
"MIT"
] | 1 | 2021-12-30T12:14:52.000Z | 2021-12-30T12:14:52.000Z | #!/usr/bin/env python2.7
# coding=utf-8
import logging
import traceback
import time
from FATERUI.common.camera.camera import Camera
from . import CameraMindVision
from FATERUI.common.camera.common_tools import *
import cv2
# from aoi.common.infraredcontrol import infraredcontrol
from time import sleep
import datetim... | 35.656627 | 112 | 0.58101 | 5,451 | 0.920933 | 0 | 0 | 0 | 0 | 0 | 0 | 517 | 0.087346 |
b4723dbed92e900ca2787cc70a21f796a78c3f12 | 2,307 | py | Python | tests/conftest.py | arosen93/jobflow | fbd5868394c6f4f6b4f2e0ccf4b7ff7d21fe7258 | [
"BSD-3-Clause-LBNL"
] | 10 | 2021-11-13T07:43:27.000Z | 2022-03-14T11:05:15.000Z | tests/conftest.py | arosen93/jobflow | fbd5868394c6f4f6b4f2e0ccf4b7ff7d21fe7258 | [
"BSD-3-Clause-LBNL"
] | 69 | 2021-08-31T13:15:54.000Z | 2022-03-31T21:43:56.000Z | tests/conftest.py | arosen93/jobflow | fbd5868394c6f4f6b4f2e0ccf4b7ff7d21fe7258 | [
"BSD-3-Clause-LBNL"
] | 5 | 2021-10-17T03:52:57.000Z | 2022-03-31T00:17:20.000Z | import pytest
@pytest.fixture(scope="session")
def test_data():
from pathlib import Path
module_dir = Path(__file__).resolve().parent
test_dir = module_dir / "test_data"
return test_dir.resolve()
@pytest.fixture(scope="session")
def database():
return "jobflow_test"
@pytest.fixture(scope="ses... | 20.236842 | 78 | 0.686606 | 0 | 0 | 530 | 0.229736 | 2,263 | 0.980928 | 0 | 0 | 152 | 0.065886 |
b472afbaafc9d44c866573f1e75db57304dcd9c2 | 2,142 | py | Python | src/utilities/download_file_from_zip.py | Bhaskers-Blu-Org2/arcticseals | 9e2629ca0ce7aadbe63118f39ff2da757d5dbc33 | [
"MIT"
] | 16 | 2019-05-21T20:08:01.000Z | 2021-11-23T22:34:00.000Z | src/utilities/download_file_from_zip.py | Bhaskers-Blu-Org2/arcticseals | 9e2629ca0ce7aadbe63118f39ff2da757d5dbc33 | [
"MIT"
] | 14 | 2018-07-18T17:14:30.000Z | 2019-04-14T14:40:12.000Z | src/utilities/download_file_from_zip.py | microsoft/arcticseals | 8adf8fbae679866373b9b5f981ceaa6ae9226c6a | [
"MIT"
] | 10 | 2019-05-10T20:56:47.000Z | 2022-01-26T13:16:40.000Z | # This script allows to download a single file from a remote ZIP archive
# without downloading the whole ZIP file itself.
# The hosting server needs to support the HTTP range header for it to work
import zipfile
import requests
import argparse
class HTTPIO(object):
def __init__(self, url):
self.url = url... | 38.945455 | 126 | 0.600373 | 1,189 | 0.555089 | 0 | 0 | 0 | 0 | 0 | 0 | 522 | 0.243697 |
b474450a8d01b6c6116bd09fee74ef2ac63927a9 | 5,928 | py | Python | cxphasing/CXFileReader.py | jbgastineau/cxphasing | a9847a0afb9a981d81f027e75c06c9bb2b531d33 | [
"MIT"
] | 3 | 2018-05-11T16:05:55.000Z | 2021-12-20T08:52:02.000Z | cxphasing/CXFileReader.py | jbgastineau/cxphasing | a9847a0afb9a981d81f027e75c06c9bb2b531d33 | [
"MIT"
] | null | null | null | cxphasing/CXFileReader.py | jbgastineau/cxphasing | a9847a0afb9a981d81f027e75c06c9bb2b531d33 | [
"MIT"
] | 2 | 2018-11-14T08:57:10.000Z | 2021-12-20T08:52:06.000Z | import Image
import readMDA
import h5py
import os
import numpy
from mmpad_image import open_mmpad_tif
import numpy as np
import scipy as sp
import sys
#import libtiff
from cxparams import CXParams as CXP
class CXFileReader(object):
"""
file_reader
A generic and configurable file reader.
The file r... | 29.20197 | 109 | 0.546896 | 5,720 | 0.964912 | 0 | 0 | 0 | 0 | 0 | 0 | 1,590 | 0.268219 |
b474f12be63300ba532e865b5aa405c132d39b80 | 1,881 | py | Python | homeassistant/components/notify/file.py | SKarthick5121995/karthickmaduraai | d5498dfb83e9bb57fff16db854ae3e15c1e15425 | [
"MIT"
] | null | null | null | homeassistant/components/notify/file.py | SKarthick5121995/karthickmaduraai | d5498dfb83e9bb57fff16db854ae3e15c1e15425 | [
"MIT"
] | null | null | null | homeassistant/components/notify/file.py | SKarthick5121995/karthickmaduraai | d5498dfb83e9bb57fff16db854ae3e15c1e15425 | [
"MIT"
] | null | null | null | """
Support for file notification.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/notify.file/
"""
import logging
import os
import homeassistant.util.dt as dt_util
from homeassistant.components.notify import (
ATTR_TITLE, DOMAIN, BaseNotificationSer... | 33 | 74 | 0.607656 | 1,007 | 0.535354 | 0 | 0 | 0 | 0 | 0 | 0 | 473 | 0.251462 |
b47686e7b028cb8a2b59a0aee1c9616fb72be5a0 | 2,561 | py | Python | app/eSignature/views/eg035_scheduled_sending.py | docusign/eg-03-python-auth-code-grant | e92913e25f753fb6b52fc3da6bc4b76c49c75b37 | [
"MIT"
] | 7 | 2019-05-09T05:17:35.000Z | 2020-05-06T14:27:51.000Z | app/eSignature/views/eg035_scheduled_sending.py | docusign/eg-03-python-auth-code-grant | e92913e25f753fb6b52fc3da6bc4b76c49c75b37 | [
"MIT"
] | 1 | 2019-06-25T23:06:34.000Z | 2019-06-25T23:06:34.000Z | app/eSignature/views/eg035_scheduled_sending.py | docusign/eg-03-python-auth-code-grant | e92913e25f753fb6b52fc3da6bc4b76c49c75b37 | [
"MIT"
] | 8 | 2019-06-21T23:57:48.000Z | 2020-02-11T18:58:34.000Z |
""" Example 035: Scheduled sending and delayed routing """
from os import path
from docusign_esign.client.api_exception import ApiException
from flask import render_template, session, Blueprint, request
from ..examples.eg035_scheduled_sending import Eg035ScheduledSendingController
from ...docusign import authentica... | 30.855422 | 106 | 0.681765 | 0 | 0 | 0 | 0 | 1,298 | 0.506833 | 0 | 0 | 1,046 | 0.408434 |
b476e08084c58f13ed7fa0dc7c045384b16ce2fe | 584 | py | Python | Informatik1/Finals Prep/HS20/1 Warmup/tally.py | Queentaker/uzh | 35cccaf910b95d15db21be80c8567eb427202591 | [
"MIT"
] | 8 | 2021-11-21T10:02:08.000Z | 2022-03-15T21:02:02.000Z | Informatik1/Finals Prep/HS20/1 Warmup/tally.py | Queentaker/uzh | 35cccaf910b95d15db21be80c8567eb427202591 | [
"MIT"
] | null | null | null | Informatik1/Finals Prep/HS20/1 Warmup/tally.py | Queentaker/uzh | 35cccaf910b95d15db21be80c8567eb427202591 | [
"MIT"
] | 3 | 2021-11-19T18:52:56.000Z | 2022-02-27T15:45:59.000Z | #-- THIS LINE SHOULD BE THE FIRST LINE OF YOUR SUBMISSION! --#
def tally(costs, discounts, rebate_factor):
cost = sum(costs)
discount = sum(discounts)
pre = (cost - discount) * rebate_factor
if pre < 0:
return 0
else:
return round(pre, 2)
#-- THIS LINE SHOULD BE THE LAST LINE OF ... | 29.2 | 74 | 0.623288 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 281 | 0.481164 |
b47710dd97089aa9a4dab16fd72a2e7d5d913aa8 | 2,450 | py | Python | linear_sequence_of_dominos/valid_sequence.py | bhpayne/domino_tile_floor | e5473081160e6f59c901fcc7563a984ef8c0a76d | [
"Apache-2.0"
] | null | null | null | linear_sequence_of_dominos/valid_sequence.py | bhpayne/domino_tile_floor | e5473081160e6f59c901fcc7563a984ef8c0a76d | [
"Apache-2.0"
] | 6 | 2020-12-31T03:33:44.000Z | 2021-01-01T01:46:56.000Z | linear_sequence_of_dominos/valid_sequence.py | bhpayne/domino_tile_floor | e5473081160e6f59c901fcc7563a984ef8c0a76d | [
"Apache-2.0"
] | 1 | 2018-03-15T19:30:11.000Z | 2018-03-15T19:30:11.000Z | #!/usr/bin/env python3
"""
Given a set of dominos, construct a linear sequence
For example, if the set of dominos is
[ (0,0) (1,0), (1,1)]
then a valid linear sequence of length four would be
(0,0),(0,1),(1,1),(1,0)
In this script we first create a set of dominos to sample from.
Then every permutation of that set is t... | 33.108108 | 73 | 0.490204 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,273 | 0.519592 |
b479184cf8fa1d0126f4741b48905617a0186570 | 3,418 | py | Python | Projects/Arena/old-version.py | hastysun/Python | b63921160fe13291dbfcbdcf821364e76d3164d5 | [
"Apache-2.0"
] | 1 | 2018-05-16T22:41:38.000Z | 2018-05-16T22:41:38.000Z | Projects/Arena/old-version.py | hastysun/Python | b63921160fe13291dbfcbdcf821364e76d3164d5 | [
"Apache-2.0"
] | null | null | null | Projects/Arena/old-version.py | hastysun/Python | b63921160fe13291dbfcbdcf821364e76d3164d5 | [
"Apache-2.0"
] | null | null | null | ## Unit 4 Project - Two Player Game
## Gavin Weiss - Computer Programming II
## The Elder Scrolls X
# A fan made 2 player game successor the The Elder Scrolls Series
# Two players start off in an arena
# Can choose starting items
# Can choose classes
## Libraries
import time # Self explanatory
import rand... | 21.098765 | 70 | 0.613517 | 1,293 | 0.378291 | 0 | 0 | 0 | 0 | 0 | 0 | 1,269 | 0.37127 |
b47a0c18a008deafead3e0074466d35091002570 | 6,689 | py | Python | chromium/tools/telemetry/telemetry/internal/image_processing/video.py | wedataintelligence/vivaldi-source | 22a46f2c969f6a0b7ca239a05575d1ea2738768c | [
"BSD-3-Clause"
] | 925 | 2015-11-06T03:04:46.000Z | 2017-09-16T19:08:43.000Z | chromium/tools/telemetry/telemetry/internal/image_processing/video.py | wedataintelligence/vivaldi-source | 22a46f2c969f6a0b7ca239a05575d1ea2738768c | [
"BSD-3-Clause"
] | 29 | 2015-11-09T17:37:28.000Z | 2017-08-16T17:50:11.000Z | chromium/tools/telemetry/telemetry/internal/image_processing/video.py | wedataintelligence/vivaldi-source | 22a46f2c969f6a0b7ca239a05575d1ea2738768c | [
"BSD-3-Clause"
] | 51 | 2015-11-08T07:06:38.000Z | 2017-08-21T07:27:19.000Z | # 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.
import subprocess
from catapult_base import cloud_storage
from telemetry.core import platform
from telemetry.util import image_util
from telemetry.util impo... | 38.889535 | 80 | 0.687995 | 6,292 | 0.940649 | 3,609 | 0.539543 | 0 | 0 | 0 | 0 | 2,901 | 0.433697 |
b47a8507030b3a977cb62f1a1969dd088038ec0e | 2,545 | py | Python | homeassistant/components/renault/renault_coordinator.py | basicpail/core | 5cc54618c5af3f75c08314bf2375cc7ac40d2b7e | [
"Apache-2.0"
] | 5 | 2019-02-24T11:46:18.000Z | 2019-05-28T17:37:21.000Z | homeassistant/components/renault/renault_coordinator.py | basicpail/core | 5cc54618c5af3f75c08314bf2375cc7ac40d2b7e | [
"Apache-2.0"
] | 77 | 2020-07-16T16:43:09.000Z | 2022-03-31T06:14:37.000Z | homeassistant/components/renault/renault_coordinator.py | Vaarlion/core | f3de8b9f28de01abf72c0f5bb0b457eb1841f201 | [
"Apache-2.0"
] | 7 | 2021-03-20T12:34:01.000Z | 2021-12-02T10:13:52.000Z | """Proxy to handle account communication with Renault servers."""
from __future__ import annotations
from collections.abc import Awaitable
from datetime import timedelta
import logging
from typing import Callable, TypeVar
from renault_api.kamereon.exceptions import (
AccessDeniedException,
KamereonResponseExc... | 34.863014 | 89 | 0.673477 | 2,032 | 0.798428 | 0 | 0 | 0 | 0 | 1,381 | 0.542633 | 738 | 0.28998 |
b47abe86e6343865f80d317d811f2885ba219aec | 122 | py | Python | Pacote Dowload/pythonProject/aula020.py | J297-hub/exercicios-de-python | cde355f9aeb43abce7890cd9879646bfe768190e | [
"MIT"
] | null | null | null | Pacote Dowload/pythonProject/aula020.py | J297-hub/exercicios-de-python | cde355f9aeb43abce7890cd9879646bfe768190e | [
"MIT"
] | null | null | null | Pacote Dowload/pythonProject/aula020.py | J297-hub/exercicios-de-python | cde355f9aeb43abce7890cd9879646bfe768190e | [
"MIT"
] | null | null | null | def soma (a,b):
print(f'A = {a} e B = {b}')
s=a+b
print(f'A soma A + B ={s}')
#Programa Principal
soma(4,5)
| 13.555556 | 31 | 0.491803 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.483607 |
b47bec3668d864394eed49330fbd6e060a5d6f09 | 2,270 | py | Python | docs/script/CLI_docker_image_uri_script.py | ai4eu/on-boarding | 6de8c323bb5f2d18612ba807b0caa8e5954bf8a8 | [
"Apache-2.0"
] | null | null | null | docs/script/CLI_docker_image_uri_script.py | ai4eu/on-boarding | 6de8c323bb5f2d18612ba807b0caa8e5954bf8a8 | [
"Apache-2.0"
] | 1 | 2021-06-15T10:45:35.000Z | 2021-06-15T10:45:35.000Z | docs/script/CLI_docker_image_uri_script.py | ai4eu/on-boarding | 6de8c323bb5f2d18612ba807b0caa8e5954bf8a8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# ===================================================================================
# Copyright (C) 2019 Fraunhofer Gesellschaft. All rights reserved.
# ===================================================================================
# This Acumos software file is distributed by Fraunhofer G... | 43.653846 | 133 | 0.640529 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,617 | 0.712335 |
b47d1e8ef224c2f61bfc09b6164ea7a99d634c35 | 1,169 | py | Python | zeus/networks/pytorch/backbones/getter.py | shaido987/vega | 14d5d49fb8bdf96bd1f3fcfac201ce6b6712c3b6 | [
"MIT"
] | 1 | 2021-05-08T07:47:44.000Z | 2021-05-08T07:47:44.000Z | zeus/networks/pytorch/backbones/getter.py | WholeG/vega | d1ccf1c3ce68a118bdb6775594ceed0f895911e7 | [
"MIT"
] | null | null | null | zeus/networks/pytorch/backbones/getter.py | WholeG/vega | d1ccf1c3ce68a118bdb6775594ceed0f895911e7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the MIT License.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the... | 43.296296 | 77 | 0.739093 | 537 | 0.459367 | 0 | 0 | 579 | 0.495295 | 0 | 0 | 552 | 0.472198 |
b47e174f27a9621be97952b2420f06f45e7e9776 | 836 | py | Python | pure_ee/lista.py | geosconsulting/gee_wapor | c3c451fcb21664172a74647fe5d9e56f312aa1df | [
"Apache-1.1"
] | 2 | 2017-11-30T18:45:59.000Z | 2018-04-08T16:47:43.000Z | pure_ee/lista.py | geosconsulting/gee_wapor | c3c451fcb21664172a74647fe5d9e56f312aa1df | [
"Apache-1.1"
] | null | null | null | pure_ee/lista.py | geosconsulting/gee_wapor | c3c451fcb21664172a74647fe5d9e56f312aa1df | [
"Apache-1.1"
] | 1 | 2021-09-09T06:03:44.000Z | 2021-09-09T06:03:44.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 20 08:40:22 2017
@author: fabio
"""
import ee
import ee.mapclient
ee.Initialize()
collection = ee.ImageCollection('MODIS/MCD43A4_NDVI')
lista = collection.toList(10)
#print lista.getInfo()
image = ee.Image('LC8_L1T/LC81910312016217LGN00')
#prin... | 19.904762 | 56 | 0.643541 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 277 | 0.33134 |
b47e5c3d3423860e078e6b322a1719db193870cb | 3,107 | py | Python | pkg/tests/helpers_test.py | hborawski/rules_pkg | 8d542763a3959db79175404758f46c7f3f385fa5 | [
"Apache-2.0"
] | null | null | null | pkg/tests/helpers_test.py | hborawski/rules_pkg | 8d542763a3959db79175404758f46c7f3f385fa5 | [
"Apache-2.0"
] | null | null | null | pkg/tests/helpers_test.py | hborawski/rules_pkg | 8d542763a3959db79175404758f46c7f3f385fa5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Bazel 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 applicable la... | 33.408602 | 77 | 0.700032 | 2,381 | 0.766334 | 0 | 0 | 0 | 0 | 0 | 0 | 956 | 0.307692 |
b47f33a5bfd7dd5f1e09089984f041a42647c888 | 177 | py | Python | atendimento/admin.py | alantinoco/django-crmsmart | f8bd3404e0dfdf4a2976ec8bbdaee27a012f9981 | [
"MIT"
] | null | null | null | atendimento/admin.py | alantinoco/django-crmsmart | f8bd3404e0dfdf4a2976ec8bbdaee27a012f9981 | [
"MIT"
] | null | null | null | atendimento/admin.py | alantinoco/django-crmsmart | f8bd3404e0dfdf4a2976ec8bbdaee27a012f9981 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Contato, Venda, FormaPagamento
admin.site.register(Contato)
admin.site.register(Venda)
admin.site.register(FormaPagamento)
| 25.285714 | 50 | 0.830508 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b47fefb3dba103290fb50268daa1c3e2fc5aec99 | 11,967 | py | Python | pome/models/transaction.py | pome-gr/pome | c6f4f9842cb7047dbd4e739e3be9b049a1887c58 | [
"MIT"
] | 3 | 2021-09-10T09:49:21.000Z | 2021-12-14T12:44:53.000Z | pome/models/transaction.py | pome-gr/pome | c6f4f9842cb7047dbd4e739e3be9b049a1887c58 | [
"MIT"
] | 2 | 2021-09-10T11:17:51.000Z | 2021-09-11T20:43:30.000Z | pome/models/transaction.py | pome-gr/pome | c6f4f9842cb7047dbd4e739e3be9b049a1887c58 | [
"MIT"
] | null | null | null | import os
import re
import urllib
from datetime import datetime
from pathlib import Path
from typing import Dict, List, Tuple, Union
from money.currency import Currency
from money.money import Money
from werkzeug.utils import secure_filename
from pome import g
from pome.models.encoder import PomeEncodable
RECORDED_T... | 37.164596 | 189 | 0.585694 | 11,575 | 0.967243 | 0 | 0 | 4,640 | 0.387733 | 0 | 0 | 1,838 | 0.153589 |
b4823115f908163488e925d3fd26ab3097c5417b | 4,350 | py | Python | site/external/moya.logins/py/oauth1.py | moyaproject/moya-techblog | 4f7d606b22773db40850b742945e83e328c63bb7 | [
"MIT"
] | 31 | 2015-11-19T04:47:05.000Z | 2021-12-29T19:10:58.000Z | site/external/moya.logins/py/oauth1.py | moyaproject/moya-techblog | 4f7d606b22773db40850b742945e83e328c63bb7 | [
"MIT"
] | 1 | 2015-11-19T14:28:52.000Z | 2015-11-24T00:14:25.000Z | site/external/moya.logins/py/oauth1.py | moyaproject/moya-techblog | 4f7d606b22773db40850b742945e83e328c63bb7 | [
"MIT"
] | 1 | 2021-08-10T15:09:01.000Z | 2021-08-10T15:09:01.000Z | from __future__ import unicode_literals
from __future__ import print_function
import moya
from moya.compat import text_type
from requests_oauthlib import OAuth1Session
def get_credentials(provider, credentials):
client_id = credentials.client_id or provider.get('client_id', None)
client_secret = credentials... | 38.157895 | 95 | 0.672184 | 0 | 0 | 0 | 0 | 3,928 | 0.902989 | 0 | 0 | 718 | 0.165057 |
b482963dac3d21247c020b102c3b4900ec667eba | 6,599 | py | Python | cgp.py | BakudanKame/CGPCatAndRat | 29a57b6bc5d00ef11acfe78afa4ff2b418d0b971 | [
"MIT"
] | null | null | null | cgp.py | BakudanKame/CGPCatAndRat | 29a57b6bc5d00ef11acfe78afa4ff2b418d0b971 | [
"MIT"
] | 1 | 2021-03-05T17:37:44.000Z | 2021-03-05T17:37:44.000Z | cgp.py | BakudanKame/CGPCatAndRat | 29a57b6bc5d00ef11acfe78afa4ff2b418d0b971 | [
"MIT"
] | 1 | 2021-03-04T19:47:42.000Z | 2021-03-04T19:47:42.000Z | """
Cartesian genetic programming
"""
import operator as op
import random
import copy
import math
from settings import VERBOSE, N_COLS, LEVEL_BACK
class Function:
"""
A general function
"""
def __init__(self, f, arity, name=None):
self.f = f
self.arity = arity
self.name = f.... | 31.879227 | 211 | 0.582513 | 5,245 | 0.794817 | 0 | 0 | 0 | 0 | 0 | 0 | 1,384 | 0.209729 |
b48444fb43f7b50ccaf1395f967f3216e0c9b14c | 824 | py | Python | historia/pops/logic/refiner.py | eranimo/historia | 5e0b047d4bcdd534f48f8b9bf19d425b0b31a3fd | [
"MIT"
] | 6 | 2016-04-26T18:39:36.000Z | 2021-09-01T09:13:38.000Z | historia/pops/logic/refiner.py | eranimo/historia | 5e0b047d4bcdd534f48f8b9bf19d425b0b31a3fd | [
"MIT"
] | null | null | null | historia/pops/logic/refiner.py | eranimo/historia | 5e0b047d4bcdd534f48f8b9bf19d425b0b31a3fd | [
"MIT"
] | 4 | 2016-04-10T23:47:23.000Z | 2021-08-15T11:40:28.000Z | from historia.pops.logic.logic_base import LogicBase
from historia.economy.enums.resource import Good
class RefinerLogic(LogicBase):
def perform(self):
bread = self.get_good(Good.bread)
tools = self.get_good(Good.tools)
iron_ore = self.get_good(Good.iron_ore)
if bread is None or i... | 32.96 | 52 | 0.601942 | 720 | 0.873786 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 0.092233 |
b484806f07273e81bf7d1386a37c1b227189ad08 | 2,386 | py | Python | image_processing/manual_features/extract-features.py | ColoredInsaneAsylums/PrivacySensitiveTranscription | 07cf8f8da222b606988e7b4dee6a6bffdd0b6fe6 | [
"BSD-3-Clause"
] | null | null | null | image_processing/manual_features/extract-features.py | ColoredInsaneAsylums/PrivacySensitiveTranscription | 07cf8f8da222b606988e7b4dee6a6bffdd0b6fe6 | [
"BSD-3-Clause"
] | 7 | 2021-03-18T20:23:36.000Z | 2022-03-11T23:16:18.000Z | image_processing/manual_features/extract-features.py | ColoredInsaneAsylums/Clustering-PrivacySensitiveTranscription | 07cf8f8da222b606988e7b4dee6a6bffdd0b6fe6 | [
"BSD-3-Clause"
] | 2 | 2017-11-29T21:36:31.000Z | 2018-10-13T01:45:03.000Z | import argparse
import cv2
import numpy as np
import os
import _pickle as pickle
from descriptors import HOG
#from skimage.morphology import skeletonize
# run image filtering and HOG feature extraction
def main(im_path, desc_name):
print('[INFO] Preparing to extract features for images in \'' + im_path + '\'')
... | 32.684932 | 114 | 0.611065 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 945 | 0.39606 |
b4854019f4acb3fc387347bdc98278a5e0867d2a | 363 | py | Python | src/exco/extractor_spec/spec_source.py | thegangtechnology/excel_comment_orm | b38156b406ccb3ce87737b8ed049bbf3b8a39050 | [
"MIT"
] | 2 | 2020-11-10T04:53:07.000Z | 2020-11-12T03:53:46.000Z | src/exco/extractor_spec/spec_source.py | thegangtechnology/excel_comment_orm | b38156b406ccb3ce87737b8ed049bbf3b8a39050 | [
"MIT"
] | 50 | 2020-11-09T06:30:31.000Z | 2022-01-06T05:00:50.000Z | src/exco/extractor_spec/spec_source.py | thegangtechnology/excel_comment_orm | b38156b406ccb3ce87737b8ed049bbf3b8a39050 | [
"MIT"
] | null | null | null | import abc
class SpecSource(abc.ABC):
@abc.abstractmethod
def describe(self) -> str:
"""
Returns:
str to print in case there is an error constructing extractor for tracing back
"""
raise NotImplementedError()
class UnknownSource(SpecSource):
def describe(sel... | 19.105263 | 90 | 0.62259 | 346 | 0.953168 | 0 | 0 | 219 | 0.603306 | 0 | 0 | 140 | 0.385675 |
b485f966490bf3490f3dba52ae21698a1d35eef4 | 265 | py | Python | app/admin.py | CS-Hunt/Get-Placed | f79f79f2dd37510405a24578b3a91acea00f9244 | [
"MIT"
] | 14 | 2021-08-28T04:05:55.000Z | 2022-02-20T07:03:16.000Z | app/admin.py | CS-Hunt/Get-Placed | f79f79f2dd37510405a24578b3a91acea00f9244 | [
"MIT"
] | null | null | null | app/admin.py | CS-Hunt/Get-Placed | f79f79f2dd37510405a24578b3a91acea00f9244 | [
"MIT"
] | 9 | 2021-08-28T04:06:03.000Z | 2021-09-26T16:45:28.000Z | from django.contrib import admin
from .models import Placement_Company_Detail,Profile,StudentBlogModel,ResorcesModel
admin.site.register(Placement_Company_Detail)
admin.site.register(Profile)
admin.site.register(StudentBlogModel)
admin.site.register(ResorcesModel) | 37.857143 | 83 | 0.875472 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b4860c44ee18b6902dd90728a523b3075912de35 | 3,730 | py | Python | data/mapping.py | wby1905/Graph-Transformer-SSPR | 4d9f2d3b950cde7e7b955247f58c0427f1dda6a1 | [
"MIT"
] | 2 | 2022-01-19T12:05:08.000Z | 2022-03-02T09:43:50.000Z | data/mapping.py | wby1905/Graph-Transformer | 4d9f2d3b950cde7e7b955247f58c0427f1dda6a1 | [
"MIT"
] | null | null | null | data/mapping.py | wby1905/Graph-Transformer | 4d9f2d3b950cde7e7b955247f58c0427f1dda6a1 | [
"MIT"
] | 2 | 2021-06-10T03:39:21.000Z | 2022-01-19T12:05:01.000Z | import torch as t
import torch_geometric.utils as utils
def qw_score(graph):
"""
未实现qw_score,采用度数代替
:param graph:
"""
score = utils.degree(graph.edge_index[0])
return score.sort()
def pre_processing(graph, m, score, trees):
score, indices = score
indices.squeeze_()
old_edges = gr... | 30.826446 | 92 | 0.521984 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 561 | 0.142314 |
b48654f076f939090f06530d0e1ff49e0fb32d65 | 5,463 | py | Python | .archived/snakecode/0460.py | gearbird/calgo | ab48357100de2a5ea47fda2d9f01ced6dc73fa79 | [
"MIT"
] | 4 | 2022-01-13T03:39:01.000Z | 2022-03-15T03:16:33.000Z | .archived/snakecode/0460.py | gearbird/calgo | ab48357100de2a5ea47fda2d9f01ced6dc73fa79 | [
"MIT"
] | null | null | null | .archived/snakecode/0460.py | gearbird/calgo | ab48357100de2a5ea47fda2d9f01ced6dc73fa79 | [
"MIT"
] | 1 | 2021-12-09T12:33:07.000Z | 2021-12-09T12:33:07.000Z | from typing import Optional, Any
class Node:
def __init__(self, key: int = 0, val: int = 0):
self.key: int = key
self.val: int = val
self.freq: int = 0
self.pre: Optional[Node] = None
self.next: Optional[Node] = None
class DLList:
def __init__(self):
self.size =... | 41.386364 | 683 | 0.513271 | 3,145 | 0.575691 | 0 | 0 | 0 | 0 | 0 | 0 | 2,131 | 0.390079 |
b48720b38e6ef7c7ce6bd71cd8a1fc79b8ad2a3a | 3,263 | py | Python | scripts/sha3.py | cidox479/ecc | da4091ff675d0fc757dc7d19bcdd4474a1388011 | [
"BSD-2-Clause"
] | null | null | null | scripts/sha3.py | cidox479/ecc | da4091ff675d0fc757dc7d19bcdd4474a1388011 | [
"BSD-2-Clause"
] | null | null | null | scripts/sha3.py | cidox479/ecc | da4091ff675d0fc757dc7d19bcdd4474a1388011 | [
"BSD-2-Clause"
] | 1 | 2020-09-28T03:06:38.000Z | 2020-09-28T03:06:38.000Z | #/*
# * Copyright (C) 2017 - This file is part of libecc project
# *
# * Authors:
# * Ryad BENADJILA <ryadbenadjila@gmail.com>
# * Arnaud EBALARD <arnaud.ebalard@ssi.gouv.fr>
# * Jean-Pierre FLORI <jean-pierre.flori@ssi.gouv.fr>
# *
# * Contributors:
# * Nicolas VIVET <nicolas.vivet@ssi.gouv.fr>
... | 32.63 | 97 | 0.62274 | 801 | 0.24548 | 0 | 0 | 0 | 0 | 0 | 0 | 657 | 0.201348 |
b48883d3a21bfcf226b4a43dc5ce8c081b237e69 | 3,332 | py | Python | lps/seeds.py | fernandoleira/lps-platform | 0d2ac2465c27444e184bbe5357553607b37790da | [
"MIT"
] | null | null | null | lps/seeds.py | fernandoleira/lps-platform | 0d2ac2465c27444e184bbe5357553607b37790da | [
"MIT"
] | null | null | null | lps/seeds.py | fernandoleira/lps-platform | 0d2ac2465c27444e184bbe5357553607b37790da | [
"MIT"
] | null | null | null | import csv
from pathlib import Path
from datetime import datetime
from lps.models import *
from lps.schemas import *
SEED_FOLDER_PATH = Path("db/seeds/")
def import_from_csv(csv_filename):
with open(SEED_FOLDER_PATH / csv_filename) as csv_file:
csv_read = csv.DictReader(csv_file, delimiter=',')
... | 30.851852 | 176 | 0.635054 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 819 | 0.245798 |
b48ab31d2b65a280be63bfbc1d367523dc945d6a | 141 | py | Python | Python/Least_Common_Multiple_for_large_numbers.py | DeathcallXD/DS-Algo-Point | 70bc4b98fa6648cdcb2e65bccaa8b30298f14d87 | [
"MIT"
] | null | null | null | Python/Least_Common_Multiple_for_large_numbers.py | DeathcallXD/DS-Algo-Point | 70bc4b98fa6648cdcb2e65bccaa8b30298f14d87 | [
"MIT"
] | null | null | null | Python/Least_Common_Multiple_for_large_numbers.py | DeathcallXD/DS-Algo-Point | 70bc4b98fa6648cdcb2e65bccaa8b30298f14d87 | [
"MIT"
] | null | null | null | def GCD(a,b):
if b == 0:
return a
else:
return GCD(b, a%b)
a = int(input())
b = int(input())
print(a*b//(GCD(a,b)))
| 14.1 | 26 | 0.460993 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b48b0aa9e22f7e6f7d8092e34b71578abf6b8004 | 2,121 | py | Python | matgendb/builders/examples/maxvalue_builder.py | Tinaatucsd/pymatgen-db | e1fc46b7df8bea8455e7290ae3eea6fd297a09f3 | [
"MIT"
] | null | null | null | matgendb/builders/examples/maxvalue_builder.py | Tinaatucsd/pymatgen-db | e1fc46b7df8bea8455e7290ae3eea6fd297a09f3 | [
"MIT"
] | null | null | null | matgendb/builders/examples/maxvalue_builder.py | Tinaatucsd/pymatgen-db | e1fc46b7df8bea8455e7290ae3eea6fd297a09f3 | [
"MIT"
] | null | null | null | """
Build a derived collection with the maximum
value from each 'group' defined in the source
collection.
"""
__author__ = 'Dan Gunter <dkgunter@lbl.gov>'
__date__ = '5/21/14'
from matgendb.builders import core
from matgendb.builders import util
from matgendb.query_engine import QueryEngine
_log = util.get_builder_lo... | 35.949153 | 72 | 0.614804 | 1,790 | 0.843942 | 0 | 0 | 0 | 0 | 0 | 0 | 897 | 0.422914 |
b48c5e302c25178ab826b1d7d13350ce7b179b8d | 184 | py | Python | dvc/dependency/ssh.py | yfarjoun/dvc | eaca7dc80c765dd3a8dbe4c8fb3b206656bbc5e2 | [
"Apache-2.0"
] | 2 | 2021-09-22T15:31:46.000Z | 2021-11-17T10:40:07.000Z | dvc/dependency/ssh.py | yfarjoun/dvc | eaca7dc80c765dd3a8dbe4c8fb3b206656bbc5e2 | [
"Apache-2.0"
] | null | null | null | dvc/dependency/ssh.py | yfarjoun/dvc | eaca7dc80c765dd3a8dbe4c8fb3b206656bbc5e2 | [
"Apache-2.0"
] | 1 | 2019-09-02T00:29:40.000Z | 2019-09-02T00:29:40.000Z | from __future__ import unicode_literals
from dvc.output.ssh import OutputSSH
from dvc.dependency.base import DependencyBase
class DependencySSH(DependencyBase, OutputSSH):
pass
| 20.444444 | 47 | 0.831522 | 56 | 0.304348 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b48eb31a18679e3dd6c7f6eeeaf59912e0ae7a93 | 1,775 | py | Python | multiscaleloss.py | praveeenbadimala/flow_unsupervised | 07385fd45e9213c06acacfd891e116f07993575e | [
"MIT"
] | null | null | null | multiscaleloss.py | praveeenbadimala/flow_unsupervised | 07385fd45e9213c06acacfd891e116f07993575e | [
"MIT"
] | null | null | null | multiscaleloss.py | praveeenbadimala/flow_unsupervised | 07385fd45e9213c06acacfd891e116f07993575e | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import optflow.compute_tvl1_energy as compute_tvl1_energy
def EPE(input_flow, target_flow, sparse=False, mean=True):
EPE_map = torch.norm(target_flow-input_flow,2,1)
if sparse:
EPE_map = EPE_map[target_flow != 0]
if mean:
return EPE_map.mean()
else:
... | 41.27907 | 101 | 0.652958 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 47 | 0.026479 |
81e7a0792251a7a66030d5e6a745a97158b8e55f | 8,070 | py | Python | object_detector/src/object_detector/object_detector.py | Ajapaik/ml-2021-ajapaik | 31e318f10329405237a5773a1d963b3ab867fa02 | [
"Apache-2.0"
] | null | null | null | object_detector/src/object_detector/object_detector.py | Ajapaik/ml-2021-ajapaik | 31e318f10329405237a5773a1d963b3ab867fa02 | [
"Apache-2.0"
] | 9 | 2021-11-12T16:54:24.000Z | 2021-12-12T14:13:49.000Z | object_detector/src/object_detector/object_detector.py | iharsuvorau/ml-2021-ajapaik | 31e318f10329405237a5773a1d963b3ab867fa02 | [
"Apache-2.0"
] | 1 | 2022-02-24T21:23:06.000Z | 2022-02-24T21:23:06.000Z | import numpy as np
import time
import cv2
import argparse
import sys
import os
import glob
import json
from pathlib import Path
class ObjectDetector:
def file_exist(file_names_list: list) -> bool:
if all(list(map(os.path.isfile,file_names_list))):
return True
else:
print("P... | 37.887324 | 153 | 0.580421 | 5,610 | 0.695167 | 0 | 0 | 0 | 0 | 0 | 0 | 2,491 | 0.308674 |
81e7bcf77b3d24a119c0b31470b009787721b442 | 15,921 | py | Python | pipeline/tests/engine/core/data/test_api.py | wkma/bk-sops | 8fb5609c0c4495c28d588fbafa9d9f5f2976929b | [
"Apache-2.0"
] | 2 | 2021-07-28T01:48:31.000Z | 2021-11-17T11:02:26.000Z | pipeline/tests/engine/core/data/test_api.py | wkma/bk-sops | 8fb5609c0c4495c28d588fbafa9d9f5f2976929b | [
"Apache-2.0"
] | null | null | null | pipeline/tests/engine/core/data/test_api.py | wkma/bk-sops | 8fb5609c0c4495c28d588fbafa9d9f5f2976929b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 43.381471 | 115 | 0.592174 | 14,992 | 0.940586 | 0 | 0 | 868 | 0.054458 | 0 | 0 | 1,873 | 0.117511 |
81e7fbeb1aa79861faba9578ed1ed05e2c7b8c74 | 5,669 | py | Python | pactools/mne_api.py | mathurinm/pactools | 2ad08061c69378368137a26e0519ce3ce6e5c7bd | [
"BSD-3-Clause"
] | null | null | null | pactools/mne_api.py | mathurinm/pactools | 2ad08061c69378368137a26e0519ce3ce6e5c7bd | [
"BSD-3-Clause"
] | null | null | null | pactools/mne_api.py | mathurinm/pactools | 2ad08061c69378368137a26e0519ce3ce6e5c7bd | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
def _check_mne(name):
"""Helper to check if h5py is installed"""
try:
import mne
except ImportError:
raise ImportError('Please install MNE-python to use %s.' % name)
return mne
def raw_to_mask(raw, ixs, events=None, tmin=None, tmax=None):
"""
A function to ... | 34.150602 | 79 | 0.599929 | 2,263 | 0.399189 | 1,046 | 0.184512 | 0 | 0 | 0 | 0 | 3,222 | 0.568354 |
81e833e9fa8dc0d32e6fa4d7181d790ea3b16866 | 508 | py | Python | 1101-1200/1152-Analyze User Website Visit Pattern/1152-Analyze User Website Visit Pattern.py | jiadaizhao/LeetCode | 4ddea0a532fe7c5d053ffbd6870174ec99fc2d60 | [
"MIT"
] | 49 | 2018-05-05T02:53:10.000Z | 2022-03-30T12:08:09.000Z | 1101-1200/1152-Analyze User Website Visit Pattern/1152-Analyze User Website Visit Pattern.py | jolly-fellow/LeetCode | ab20b3ec137ed05fad1edda1c30db04ab355486f | [
"MIT"
] | 11 | 2017-12-15T22:31:44.000Z | 2020-10-02T12:42:49.000Z | 1101-1200/1152-Analyze User Website Visit Pattern/1152-Analyze User Website Visit Pattern.py | jolly-fellow/LeetCode | ab20b3ec137ed05fad1edda1c30db04ab355486f | [
"MIT"
] | 28 | 2017-12-05T10:56:51.000Z | 2022-01-26T18:18:27.000Z | import collections
from itertools import combinations
from collections import Counter
class Solution:
def mostVisitedPattern(self, username: List[str], timestamp: List[int], website: List[str]) -> List[str]:
visit = collections.defaultdict(list)
for t, u, w in sorted(zip(timestamp, username, website... | 46.181818 | 109 | 0.673228 | 421 | 0.82874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
81eb1d6d6cc6e952fd1154195a1b71aa5f698462 | 870 | py | Python | src/tarot/magicEight.py | tjweldon/St_Germain | ab4114e71733ac4fc8cd835f8d1107340de5852f | [
"MIT"
] | null | null | null | src/tarot/magicEight.py | tjweldon/St_Germain | ab4114e71733ac4fc8cd835f8d1107340de5852f | [
"MIT"
] | null | null | null | src/tarot/magicEight.py | tjweldon/St_Germain | ab4114e71733ac4fc8cd835f8d1107340de5852f | [
"MIT"
] | null | null | null | import random
async def magicEightBall(ctx, message=True):
if message:
eightBall = random.randint(0, 19)
outlooks = [
"As I see it, yes.",
"Ask again later.",
"Better not tell you now.",
"Cannot predict now.",
"Concentrate and ask again."... | 29 | 57 | 0.452874 | 0 | 0 | 0 | 0 | 0 | 0 | 857 | 0.980549 | 397 | 0.454233 |
81eb4b0e294989b02c9358c7a2349765725c6844 | 970 | py | Python | app/mod_check/MySQL.py | RITC3/Hermes | 7df5cf1cbeaca949918ace9278b2d5c1138d4eac | [
"MIT"
] | 2 | 2018-03-06T03:39:00.000Z | 2018-03-06T04:31:39.000Z | app/mod_check/MySQL.py | RITC3/Hermes | 7df5cf1cbeaca949918ace9278b2d5c1138d4eac | [
"MIT"
] | 15 | 2018-01-01T20:55:22.000Z | 2018-06-09T21:37:39.000Z | app/mod_check/MySQL.py | RITC3/Hermes | 7df5cf1cbeaca949918ace9278b2d5c1138d4eac | [
"MIT"
] | null | null | null | import pymysql.cursors
from ..mod_check import app
@app.task
def check(host, port, username, password, db):
result = None
connection = None
try:
connection = pymysql.connect(host=host,
port=port,
user=username,
... | 29.393939 | 76 | 0.464948 | 0 | 0 | 0 | 0 | 916 | 0.94433 | 0 | 0 | 47 | 0.048454 |
81eb7f6fef6cc7597c7451eea8083a954d98940b | 2,087 | py | Python | src/adafruit-circuitpython-bundle-4.x-mpy-20190713/examples/hue_simpletest.py | mbaaba/solar_panel | 42059d8c61320494ad1298065dbc50cd9b3bd51e | [
"MIT"
] | 1 | 2020-04-13T16:10:53.000Z | 2020-04-13T16:10:53.000Z | infra/libs-400rc2-20190512/examples/hue_simpletest.py | jadudm/feather-isa | b7419e6698c3f64be4d8122656eb8124631ca859 | [
"MIT"
] | null | null | null | infra/libs-400rc2-20190512/examples/hue_simpletest.py | jadudm/feather-isa | b7419e6698c3f64be4d8122656eb8124631ca859 | [
"MIT"
] | null | null | null | import time
import board
import busio
from digitalio import DigitalInOut
from adafruit_esp32spi import adafruit_esp32spi
from adafruit_esp32spi import adafruit_esp32spi_wifimanager
import neopixel
# Import Philips Hue Bridge
from adafruit_hue import Bridge
# Get wifi details and more from a secrets.py file
... | 32.609375 | 84 | 0.712985 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 647 | 0.310014 |
81ebc1e0f8c3dd6fa15e9aec38b6811ca3958a6e | 2,081 | py | Python | examples/python-echo/src/echo.py | mdelete/kore | 481bb133a9307614dc7da6ca59453ef154696ce1 | [
"0BSD"
] | null | null | null | examples/python-echo/src/echo.py | mdelete/kore | 481bb133a9307614dc7da6ca59453ef154696ce1 | [
"0BSD"
] | null | null | null | examples/python-echo/src/echo.py | mdelete/kore | 481bb133a9307614dc7da6ca59453ef154696ce1 | [
"0BSD"
] | null | null | null | #
# Copyright (c) 2013-2018 Joris Vink <joris@coders.se>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUT... | 35.271186 | 74 | 0.655454 | 1,128 | 0.542047 | 0 | 0 | 0 | 0 | 612 | 0.294089 | 1,138 | 0.546852 |
81ec64fdd381f8390bb7b57ec0c4cafc99c38ae3 | 77 | py | Python | src/token/__init__.py | mingz2013/py.script | c7f637f41949d4992e11bb0f694d2dc6aa7bf112 | [
"Apache-2.0"
] | 1 | 2019-10-23T13:15:59.000Z | 2019-10-23T13:15:59.000Z | src/token/__init__.py | mingz2013/py.cond | c98bc81e2216136bf158177355a8fcc36e1d83a9 | [
"Apache-2.0"
] | null | null | null | src/token/__init__.py | mingz2013/py.cond | c98bc81e2216136bf158177355a8fcc36e1d83a9 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
"""
"""
__date__ = "14/12/2017"
__author__ = "zhaojm"
| 12.833333 | 23 | 0.545455 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 0.636364 |
81eca3ec2c7fb9bdc184a8e1b344b38081bdf451 | 3,710 | py | Python | pesto-cli/pesto/ws/service/process.py | CS-SI/pesto | 654a961d1064049578050d4c96e6f68f6a6dd770 | [
"Apache-2.0"
] | 25 | 2020-05-19T16:22:52.000Z | 2022-01-06T13:31:19.000Z | pesto-cli/pesto/ws/service/process.py | CS-SI/pesto | 654a961d1064049578050d4c96e6f68f6a6dd770 | [
"Apache-2.0"
] | 5 | 2020-10-12T09:30:20.000Z | 2021-12-13T12:49:06.000Z | pesto-cli/pesto/ws/service/process.py | CS-SI/pesto | 654a961d1064049578050d4c96e6f68f6a6dd770 | [
"Apache-2.0"
] | 5 | 2020-06-19T16:05:13.000Z | 2021-03-11T11:51:19.000Z | import asyncio
import logging
import traceback
import uuid
from typing import Optional, Tuple, Any, Callable
from pesto.ws.core.payload_parser import PayloadParser, PestoConfig
from pesto.ws.core.pesto_feature import PestoFeatures
from pesto.ws.core.utils import load_class, async_exec
from pesto.ws.features.algorithm_... | 37.857143 | 118 | 0.692453 | 2,747 | 0.740431 | 0 | 0 | 965 | 0.260108 | 216 | 0.058221 | 339 | 0.091375 |
81edcd97dcc8187e9a6274632556bdf350c16b63 | 1,858 | py | Python | migration_runner/helpers.py | beveradb/ecs-digital-interview-test | 7e2d18005263424be016281d3f3f344af4536971 | [
"MIT"
] | null | null | null | migration_runner/helpers.py | beveradb/ecs-digital-interview-test | 7e2d18005263424be016281d3f3f344af4536971 | [
"MIT"
] | 49 | 2019-02-14T01:52:14.000Z | 2021-11-15T17:48:17.000Z | migration_runner/helpers.py | beveradb/python-sql-migration-runner | 7e2d18005263424be016281d3f3f344af4536971 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
import os
import re
import sys
class Helpers:
def __init__(self, logger=None):
if logger is None:
self.logger = logging.getLogger(__name__)
else:
self.logger = logger
@staticmethod
def extract_sequence_num(filename):
s... | 30.459016 | 78 | 0.599031 | 1,785 | 0.96071 | 0 | 0 | 792 | 0.426265 | 0 | 0 | 129 | 0.069429 |
81ee84f6b82809aa8e7f47a4b2060161548b3aab | 1,353 | py | Python | sitri/providers/contrib/ini.py | Elastoo-Team/sitri | d5470d9a37d3c944c0976793fce80a630e5625b1 | [
"MIT"
] | 11 | 2020-12-16T07:00:29.000Z | 2021-05-25T16:24:50.000Z | sitri/providers/contrib/ini.py | Elastoo-Team/sitri | d5470d9a37d3c944c0976793fce80a630e5625b1 | [
"MIT"
] | 1 | 2021-06-30T05:42:46.000Z | 2021-09-03T11:45:56.000Z | sitri/providers/contrib/ini.py | Elastoo-Team/sitri | d5470d9a37d3c944c0976793fce80a630e5625b1 | [
"MIT"
] | null | null | null | import configparser
import os
import typing
from sitri.providers.base import ConfigProvider
class IniConfigProvider(ConfigProvider):
"""Config provider for Initialization file (Ini)."""
provider_code = "ini"
def __init__(
self,
ini_path: str = "./config.ini",
):
"""
... | 24.6 | 99 | 0.602365 | 1,257 | 0.929047 | 0 | 0 | 155 | 0.11456 | 0 | 0 | 364 | 0.269032 |
81efee60c11f653a60ba95f712d8bc50076b39ce | 9,512 | py | Python | xpanse/api/assets/v2/ip_range.py | PaloAltoNetworks/cortex-xpanse-python-sdk | 532d3fdb031a0e5943cc492222299f94ad93d030 | [
"0BSD"
] | 3 | 2021-09-02T16:05:04.000Z | 2021-09-10T01:10:48.000Z | xpanse/api/assets/v2/ip_range.py | PaloAltoNetworks/cortex-xpanse-python-sdk | 532d3fdb031a0e5943cc492222299f94ad93d030 | [
"0BSD"
] | 7 | 2021-08-31T17:43:33.000Z | 2021-12-01T00:36:48.000Z | xpanse/api/assets/v2/ip_range.py | PaloAltoNetworks/cortex-xpanse-python-sdk | 532d3fdb031a0e5943cc492222299f94ad93d030 | [
"0BSD"
] | null | null | null | from typing import Any, Dict, List
from xpanse.const import V2_PREFIX
from xpanse.endpoint import ExEndpoint
from xpanse.iterator import ExResultIterator
class IpRangeEndpoint(ExEndpoint):
"""
Part of the Assets v2 API for handling IP Ranges.
See: https://api.expander.expanse.co/api/v1/docs/
"""
... | 43.633028 | 197 | 0.58505 | 9,354 | 0.983389 | 0 | 0 | 0 | 0 | 0 | 0 | 7,658 | 0.805088 |
81f0008b1bc4b02d44062640b174c7fe2264f9eb | 8,337 | py | Python | polus-color-pyramid-builder-plugin/src/main.py | blowekamp/polus-plugins | 87f9c36647b4cf95cf107cfede3a5a1d749415a5 | [
"MIT"
] | null | null | null | polus-color-pyramid-builder-plugin/src/main.py | blowekamp/polus-plugins | 87f9c36647b4cf95cf107cfede3a5a1d749415a5 | [
"MIT"
] | 1 | 2020-08-02T23:20:46.000Z | 2020-08-02T23:20:46.000Z | polus-color-pyramid-builder-plugin/src/main.py | gauharbains/polus-plugins | 5e4d1e33bb61d7619d3a76fb7c115d475628a909 | [
"MIT"
] | null | null | null | from bfio import BioReader
import argparse, logging
import numpy as np
from pathlib import Path
import filepattern, multiprocessing, utils
from concurrent.futures import ThreadPoolExecutor
COLORS = ['red',
'green',
'blue',
'yellow',
'magenta',
'cyan',
'gray']... | 41.272277 | 130 | 0.578026 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,500 | 0.299868 |
81f05d1e9fcd11eb2b271dc4be5bcb49f68b18a0 | 1,175 | py | Python | kinetics/reaction_classes/general_rate_Law.py | wlawler45/kinetics | dd763ac27d7c0df8a9429419e911a22760ba5c5a | [
"MIT"
] | 13 | 2020-05-30T21:39:01.000Z | 2022-01-30T22:52:36.000Z | kinetics/reaction_classes/general_rate_Law.py | wlawler45/kinetics | dd763ac27d7c0df8a9429419e911a22760ba5c5a | [
"MIT"
] | 7 | 2019-06-15T13:16:31.000Z | 2021-12-09T11:16:53.000Z | kinetics/reaction_classes/general_rate_Law.py | willfinnigan/Kinetics | a607096f051c7721a7f2eac73a875366eaefef15 | [
"MIT"
] | 4 | 2019-09-23T09:46:11.000Z | 2022-03-18T20:30:03.000Z | from kinetics.reaction_classes.reaction_base_class import Reaction
class Generic(Reaction):
"""
This Reaction class allows you to specify your own rate equation.
Enter the parameter names in params, and the substrate names used in the reaction in species.
Type the rate equation as a string in rate_equa... | 33.571429 | 97 | 0.655319 | 1,107 | 0.942128 | 0 | 0 | 0 | 0 | 0 | 0 | 345 | 0.293617 |
81f0785b99135f37da39fd3dcab4612074c70aed | 718 | py | Python | examples/03-interception/api.py | nomadsinteractive/migi | 7ebcd0d362f642b889c309c20618ff36f1448c28 | [
"Apache-2.0"
] | 3 | 2022-01-09T10:09:55.000Z | 2022-01-11T03:37:55.000Z | examples/03-interception/api.py | nomadsinteractive/migi | 7ebcd0d362f642b889c309c20618ff36f1448c28 | [
"Apache-2.0"
] | null | null | null | examples/03-interception/api.py | nomadsinteractive/migi | 7ebcd0d362f642b889c309c20618ff36f1448c28 | [
"Apache-2.0"
] | null | null | null | from ctypes import *
from migi.decorators import stdcall
@stdcall('MessageBoxW', 'User32.dll', interceptable=True)
def _native_message_box_w(hwnd: c_void_p, content: c_wchar_p, title: c_wchar_p, flags: c_uint32) -> c_int32:
if wstring_at(content) == "I'm in":
return _native_message_box_w.call_original(hw... | 32.636364 | 108 | 0.763231 | 0 | 0 | 0 | 0 | 388 | 0.54039 | 0 | 0 | 43 | 0.059889 |
81f105c666f6335423e163de23faa2cc06bc611a | 1,002 | py | Python | adapters/heiman/HS1RC.py | russdan/domoticz-zigbee2mqtt-plugin | d47895eab44bc87fc19ce151698d2afe9554fadc | [
"MIT"
] | 146 | 2018-09-19T11:38:48.000Z | 2022-03-21T11:54:12.000Z | adapters/heiman/HS1RC.py | russdan/domoticz-zigbee2mqtt-plugin | d47895eab44bc87fc19ce151698d2afe9554fadc | [
"MIT"
] | 783 | 2018-09-28T17:07:14.000Z | 2022-03-31T10:18:27.000Z | adapters/heiman/HS1RC.py | russdan/domoticz-zigbee2mqtt-plugin | d47895eab44bc87fc19ce151698d2afe9554fadc | [
"MIT"
] | 147 | 2018-09-25T18:39:51.000Z | 2022-03-01T19:31:27.000Z | from adapters.adapter_with_battery import AdapterWithBattery
from devices.switch.selector_switch import SelectorSwitch
class HeimanAlarmRemoteAdapter(AdapterWithBattery):
def __init__(self):
super().__init__()
self.switch = SelectorSwitch('Remote', 'action')
self.switch.add_level('Off', No... | 38.538462 | 79 | 0.718563 | 879 | 0.877246 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 0.126747 |
81f14765ab4db0efd7fd86ef77889b6138ae6170 | 1,236 | py | Python | tennis_model_scraper/tennis_model_scraper/spiders/tennis_data_co_uk_spider.py | DrAndrey/tennis_model | f058becf41747111818599132b43b6147347a96c | [
"Apache-2.0"
] | null | null | null | tennis_model_scraper/tennis_model_scraper/spiders/tennis_data_co_uk_spider.py | DrAndrey/tennis_model | f058becf41747111818599132b43b6147347a96c | [
"Apache-2.0"
] | null | null | null | tennis_model_scraper/tennis_model_scraper/spiders/tennis_data_co_uk_spider.py | DrAndrey/tennis_model | f058becf41747111818599132b43b6147347a96c | [
"Apache-2.0"
] | 1 | 2019-01-21T14:59:34.000Z | 2019-01-21T14:59:34.000Z | # -*- coding: utf-8 -*-
"""
"""
import scrapy
from tennis_model.tennis_model_scraper.tennis_model_scraper import items
class TennisDataCoUkSpider(scrapy.Spider):
name = "tennis_data_co_uk"
allowed_domains = ["www.tennis-data.co.uk"]
start_urls = ["http://www.tennis-data.co.uk/alldata.php"]
custom_... | 31.692308 | 102 | 0.622977 | 1,073 | 0.868123 | 502 | 0.406149 | 0 | 0 | 0 | 0 | 334 | 0.270227 |
81f14ce563d81df9f3673772cac00a024e237a10 | 160 | py | Python | aoc20211219b.py | BarnabyShearer/aoc | 4feb66c668b068f0f42ad99b916e80732eba5a2d | [
"MIT"
] | null | null | null | aoc20211219b.py | BarnabyShearer/aoc | 4feb66c668b068f0f42ad99b916e80732eba5a2d | [
"MIT"
] | null | null | null | aoc20211219b.py | BarnabyShearer/aoc | 4feb66c668b068f0f42ad99b916e80732eba5a2d | [
"MIT"
] | null | null | null | from aoc20211219a import *
def aoc(data):
sensors, _ = slam(parse(data))
return max(sum(abs(x) for x in sub(a, b)) for a in sensors for b in sensors)
| 22.857143 | 80 | 0.6625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
81f32b032af68bf0f0fedb0195eda42a9e169769 | 2,739 | py | Python | pyhmy/rpc/request.py | difengJ/pyhmy | c0bdb7f53b56bf8e9f53d60da6fec61415cebf3f | [
"MIT"
] | 37 | 2020-05-24T20:09:33.000Z | 2022-03-28T00:59:00.000Z | pyhmy/rpc/request.py | economize/pyhmy | 668d7ef756e4fefe4621f435bb9a3e37cbeb82d9 | [
"MIT"
] | 12 | 2020-06-09T02:58:54.000Z | 2022-03-20T15:33:55.000Z | pyhmy/rpc/request.py | economize/pyhmy | 668d7ef756e4fefe4621f435bb9a3e37cbeb82d9 | [
"MIT"
] | 30 | 2020-03-14T03:58:24.000Z | 2022-02-19T18:19:00.000Z | import json
import requests
from .exceptions import (
RequestsError,
RequestsTimeoutError,
RPCError
)
_default_endpoint = 'http://localhost:9500'
_default_timeout = 30
def base_request(method, params=None, endpoint=_default_endpoint, timeout=_default_timeout) -> str:
"""
Basic RPC request
... | 23.410256 | 99 | 0.591457 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,386 | 0.506024 |
81f3a40d44b3887a0748b1060fddbf244a3d66a8 | 3,430 | py | Python | gaze_api/scripts/vidPub.py | ajdroid/tobii_ros | b103cb772604458d9822911494af75057902ebb1 | [
"Unlicense"
] | null | null | null | gaze_api/scripts/vidPub.py | ajdroid/tobii_ros | b103cb772604458d9822911494af75057902ebb1 | [
"Unlicense"
] | null | null | null | gaze_api/scripts/vidPub.py | ajdroid/tobii_ros | b103cb772604458d9822911494af75057902ebb1 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import socket
import threading
import rospy
from publisher import *
import cv2
import imagezmq
import numpy as np
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
def parse_sent_msg(msg):
ctr, frame_time = msg.split()
fra... | 32.666667 | 108 | 0.634111 | 1,187 | 0.346064 | 0 | 0 | 0 | 0 | 0 | 0 | 981 | 0.286006 |
81f5675fd7ed78cac4c0fcf799fa59f89177494a | 3,179 | py | Python | LAImapping_SNAP/snappy_backscatterLAI.py | dipankar05/aws4agrisar | f3307f0a90668f4586baf61ac4a322be4d32ea6a | [
"MIT"
] | 5 | 2021-08-20T05:21:02.000Z | 2021-08-22T09:43:54.000Z | Chapter05/Sec56/LAImapping_SNAP/snappy_backscatterLAI.py | dipankar05/springer-cropradar | b1f2fddab1bb60adafd8c9aba6c34538eb356988 | [
"MIT"
] | null | null | null | Chapter05/Sec56/LAImapping_SNAP/snappy_backscatterLAI.py | dipankar05/springer-cropradar | b1f2fddab1bb60adafd8c9aba6c34538eb356988 | [
"MIT"
] | 1 | 2021-07-06T03:18:26.000Z | 2021-07-06T03:18:26.000Z | import sys
import numpy
import numpy as np
from snappy import Product
from snappy import ProductData
from snappy import ProductIO
from snappy import ProductUtils
from snappy import FlagCoding
##############
import csv
###############MSVR
from sklearn.svm import SVR
from sklearn.preprocessing import StandardScaler
fro... | 28.383929 | 83 | 0.654608 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 634 | 0.199434 |
81f67189d5d5520037d53dd853b5b30e2b4a3514 | 23,097 | py | Python | test_fiona_issue383.py | thomasaarholt/fiona-wheels | 50ff76691ea4286052d552ffb67d83894742b00a | [
"MIT"
] | null | null | null | test_fiona_issue383.py | thomasaarholt/fiona-wheels | 50ff76691ea4286052d552ffb67d83894742b00a | [
"MIT"
] | null | null | null | test_fiona_issue383.py | thomasaarholt/fiona-wheels | 50ff76691ea4286052d552ffb67d83894742b00a | [
"MIT"
] | null | null | null | import fiona
d = {
"type": "Feature",
"id": "0",
"properties": {
"ADMINFORES": "99081600010343",
"REGION": "08",
"FORESTNUMB": "16",
"FORESTORGC": "0816",
"FORESTNAME": "El Yunque National Forest",
"GIS_ACRES": 55829.81,
"SHAPE_AREA": 0.0193062316937,... | 55.789855 | 61 | 0.50972 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 234 | 0.010131 |
81f80e27b98817c9ba8d1f9fbc633ce2a51ca059 | 850 | py | Python | pre_commit_hooks/forbid_crlf.py | henryiii/pre-commit-hooks | 93b709d9ca27610518f5435fa9a51d98f7ada18d | [
"MIT"
] | 62 | 2015-07-26T06:20:40.000Z | 2022-03-26T21:05:59.000Z | pre_commit_hooks/forbid_crlf.py | henryiii/pre-commit-hooks | 93b709d9ca27610518f5435fa9a51d98f7ada18d | [
"MIT"
] | 25 | 2015-07-24T08:34:52.000Z | 2022-03-10T20:22:45.000Z | pre_commit_hooks/forbid_crlf.py | henryiii/pre-commit-hooks | 93b709d9ca27610518f5435fa9a51d98f7ada18d | [
"MIT"
] | 30 | 2015-07-18T17:40:25.000Z | 2022-02-10T19:55:53.000Z | from __future__ import print_function
import argparse, sys
from .utils import is_textfile
def contains_crlf(filename):
with open(filename, mode='rb') as file_checked:
for line in file_checked.readlines():
if line.endswith(b'\r\n'):
return True
return False
def main(argv=Non... | 32.692308 | 76 | 0.682353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 93 | 0.109412 |
81f8404fe9a704d334f1bcd998cf63672186b71f | 55 | py | Python | backend/code/start.py | socek/iep | 793e35ca5304eef7b7dacb5dd8d486622f497759 | [
"Apache-2.0"
] | null | null | null | backend/code/start.py | socek/iep | 793e35ca5304eef7b7dacb5dd8d486622f497759 | [
"Apache-2.0"
] | null | null | null | backend/code/start.py | socek/iep | 793e35ca5304eef7b7dacb5dd8d486622f497759 | [
"Apache-2.0"
] | null | null | null | if __name__ == "__main__":
print("Nothing yet...")
| 18.333333 | 27 | 0.6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.472727 |
81f8ba9bf744d6a257f9ade3faa2ce783ae335eb | 2,317 | py | Python | vantage6/server/model/organization.py | jaspersnel/vantage6-server | 88ad40d23cc36eaba57c170929f7ccdd0011720a | [
"Apache-2.0"
] | 2 | 2020-10-19T08:59:08.000Z | 2022-03-07T10:30:21.000Z | vantage6/server/model/organization.py | jaspersnel/vantage6-server | 88ad40d23cc36eaba57c170929f7ccdd0011720a | [
"Apache-2.0"
] | 67 | 2020-04-15T09:43:31.000Z | 2022-03-18T08:29:17.000Z | vantage6/server/model/organization.py | jaspersnel/vantage6-server | 88ad40d23cc36eaba57c170929f7ccdd0011720a | [
"Apache-2.0"
] | 2 | 2021-01-21T15:09:26.000Z | 2021-04-19T14:58:10.000Z | import base64
from sqlalchemy import Column, String, LargeBinary
from sqlalchemy.orm import relationship
from sqlalchemy.ext.hybrid import hybrid_property
from sqlalchemy.orm.exc import NoResultFound
from vantage6.common.globals import STRING_ENCODING
from .base import Base, Database
class Organization(Base):
... | 30.893333 | 76 | 0.643073 | 2,026 | 0.874407 | 0 | 0 | 775 | 0.334484 | 0 | 0 | 585 | 0.252482 |
81f8d698a3ddfe36ef13f1113078ded3a3fb3cf5 | 865 | py | Python | checkov/terraform/checks/resource/aws/EKSSecretsEncryption.py | cclauss/checkov | 60a385fcaff1499cf00c2d0018575fe5ab71f556 | [
"Apache-2.0"
] | 1 | 2021-01-26T12:46:32.000Z | 2021-01-26T12:46:32.000Z | checkov/terraform/checks/resource/aws/EKSSecretsEncryption.py | cclauss/checkov | 60a385fcaff1499cf00c2d0018575fe5ab71f556 | [
"Apache-2.0"
] | 1 | 2021-06-02T02:53:31.000Z | 2021-06-02T02:53:31.000Z | checkov/terraform/checks/resource/aws/EKSSecretsEncryption.py | cclauss/checkov | 60a385fcaff1499cf00c2d0018575fe5ab71f556 | [
"Apache-2.0"
] | null | null | null | from checkov.common.models.enums import CheckResult, CheckCategories
from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck
class EKSSecretsEncryption(BaseResourceCheck):
def __init__(self):
name = "Ensure EKS Cluster has Secrets Encryption Enabled"
id = "CKV_AWS_58"
... | 39.318182 | 106 | 0.713295 | 676 | 0.781503 | 0 | 0 | 0 | 0 | 0 | 0 | 168 | 0.19422 |
81f9249901387ee78233d110ebdfbf78c9c6a8d9 | 46,176 | py | Python | analysis/models/nodes/analysis_node.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 5 | 2021-01-14T03:34:42.000Z | 2022-03-07T15:34:18.000Z | analysis/models/nodes/analysis_node.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 551 | 2020-10-19T00:02:38.000Z | 2022-03-30T02:18:22.000Z | analysis/models/nodes/analysis_node.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | null | null | null | """ AnalysisNode is the base class that all analysis nodes inherit from. """
import logging
import operator
from functools import reduce
from random import random
from time import time
from typing import Tuple, Sequence, List, Dict, Optional
from celery.canvas import Signature
from django.conf import settings
from dja... | 40.293194 | 128 | 0.652027 | 43,631 | 0.944885 | 0 | 0 | 6,973 | 0.151009 | 0 | 0 | 9,247 | 0.200256 |
81f9aae1477fdf2636841fe260c82468ac2cde52 | 2,077 | py | Python | lbrc_flask/standard_views.py | LCBRU/lbrc_flask_ui | 35dea4581bbd92e9b53134342052b2ce02f903d4 | [
"MIT"
] | null | null | null | lbrc_flask/standard_views.py | LCBRU/lbrc_flask_ui | 35dea4581bbd92e9b53134342052b2ce02f903d4 | [
"MIT"
] | null | null | null | lbrc_flask/standard_views.py | LCBRU/lbrc_flask_ui | 35dea4581bbd92e9b53134342052b2ce02f903d4 | [
"MIT"
] | null | null | null | import os
import traceback
from flask import render_template, send_from_directory, current_app, g
from .emailing import email
def init_standard_views(app):
@app.route("/favicon.ico")
def favicon():
return send_from_directory(
os.path.join(app.root_path, "static"),
"f... | 32.968254 | 93 | 0.604718 | 0 | 0 | 0 | 0 | 1,866 | 0.898411 | 0 | 0 | 765 | 0.36832 |
81fb080ba80dc6a4245823877af0ad4179c7b39d | 87 | py | Python | tests/data/program_analysis/PyAST2CAST/import/test_import_3.py | rsulli55/automates | 1647a8eef85c4f03086a10fa72db3b547f1a0455 | [
"Apache-2.0"
] | 17 | 2018-12-19T16:32:38.000Z | 2021-10-05T07:58:15.000Z | tests/data/program_analysis/PyAST2CAST/import/test_import_3.py | rsulli55/automates | 1647a8eef85c4f03086a10fa72db3b547f1a0455 | [
"Apache-2.0"
] | 183 | 2018-12-20T17:03:01.000Z | 2022-02-23T22:21:42.000Z | tests/data/program_analysis/PyAST2CAST/import/test_import_3.py | rsulli55/automates | 1647a8eef85c4f03086a10fa72db3b547f1a0455 | [
"Apache-2.0"
] | 5 | 2019-01-04T22:37:49.000Z | 2022-01-19T17:34:16.000Z | # 'from ... import ...' statement
from sys import exit
def main():
exit(0)
main() | 12.428571 | 33 | 0.597701 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.37931 |
81fb14b3776d226412fc52409bbe9c75a0f071a1 | 1,455 | py | Python | postmanparser/form_parameter.py | appknox/postmanparser | bef9581d1c81e111fe635e7ea851333e7b2261e5 | [
"Apache-2.0"
] | 5 | 2021-06-25T10:14:40.000Z | 2022-03-31T20:52:51.000Z | postmanparser/form_parameter.py | appknox/postmanparser | bef9581d1c81e111fe635e7ea851333e7b2261e5 | [
"Apache-2.0"
] | 4 | 2021-06-07T17:05:27.000Z | 2021-09-07T13:26:20.000Z | postmanparser/form_parameter.py | appknox/postmanparser | bef9581d1c81e111fe635e7ea851333e7b2261e5 | [
"Apache-2.0"
] | 2 | 2021-09-06T15:41:50.000Z | 2021-11-10T14:22:46.000Z | from dataclasses import dataclass
from typing import List
from typing import Union
from postmanparser.description import Description
from postmanparser.exceptions import InvalidObjectException
from postmanparser.exceptions import MissingRequiredFieldException
@dataclass
class FormParameter:
key: str
value: s... | 32.333333 | 81 | 0.620619 | 1,180 | 0.810997 | 0 | 0 | 1,191 | 0.818557 | 0 | 0 | 227 | 0.156014 |
81fd3d016f2f7329e2389892dcfbd3f365d1769d | 844 | py | Python | pip-check.py | Urucas/pip-check | 777d8208bb89f566b95885a6711c773580a9c80f | [
"MIT"
] | null | null | null | pip-check.py | Urucas/pip-check | 777d8208bb89f566b95885a6711c773580a9c80f | [
"MIT"
] | null | null | null | pip-check.py | Urucas/pip-check | 777d8208bb89f566b95885a6711c773580a9c80f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import pip
import os
import sys
def err(msg):
print "\033[31m✗ \033[0m%s" % msg
def ok(msg):
print "\033[32m✓ \033[0m%s" % msg
def main():
cwd = os.getcwd()
json_file = os.path.join(cwd, 'dependencies.json')
if os.path.isfile(json_file) =... | 23.444444 | 60 | 0.640995 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 223 | 0.262972 |
81fda8338c93f1b3783533f708ac76a777187c33 | 36,148 | py | Python | hxl/scripts.py | HXLStandard/libhxl-python | 8d32d32c8165ec2ef4f7d970c30ca037fcc46b35 | [
"Unlicense"
] | 30 | 2015-06-02T22:06:22.000Z | 2020-07-30T08:43:40.000Z | hxl/scripts.py | HXLStandard/libhxl-python | 8d32d32c8165ec2ef4f7d970c30ca037fcc46b35 | [
"Unlicense"
] | 262 | 2015-01-27T16:43:28.000Z | 2022-03-28T15:33:53.000Z | hxl/scripts.py | HXLStandard/libhxl-python | 8d32d32c8165ec2ef4f7d970c30ca037fcc46b35 | [
"Unlicense"
] | 9 | 2015-01-20T06:06:28.000Z | 2020-07-13T23:54:03.000Z | """
Console scripts
David Megginson
April 2015
This is a big, ugly module to support the libhxl
console scripts, including (mainly) argument parsing.
License: Public Domain
Documentation: https://github.com/HXLStandard/libhxl-python/wiki
"""
from __future__ import print_function
import argparse, json, logging, os, ... | 30.478921 | 231 | 0.628389 | 560 | 0.015492 | 0 | 0 | 0 | 0 | 0 | 0 | 12,894 | 0.3567 |
81fdb0e1136255e877c9ae2c151c33d3b0b0ee1d | 338 | py | Python | 1801-1900/1807.evaluate-thebracket-pairs-of-a-string.py | guangxu-li/leetcode-in-python | 8a5a373b32351500342705c141591a1a8f5f1cb1 | [
"MIT"
] | null | null | null | 1801-1900/1807.evaluate-thebracket-pairs-of-a-string.py | guangxu-li/leetcode-in-python | 8a5a373b32351500342705c141591a1a8f5f1cb1 | [
"MIT"
] | null | null | null | 1801-1900/1807.evaluate-thebracket-pairs-of-a-string.py | guangxu-li/leetcode-in-python | 8a5a373b32351500342705c141591a1a8f5f1cb1 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=1807 lang=python3
#
# [1807] Evaluate the Bracket Pairs of a String
#
# @lc code=start
import re
class Solution:
def evaluate(self, s: str, knowledge: list[list[str]]) -> str:
mapping = dict(knowledge)
return re.sub(r"\((\w+?)\)", lambda m: mapping.get(m.group(1), "?"), s)... | 18.777778 | 79 | 0.612426 | 196 | 0.579882 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 0.399408 |
81fdf45abe6a280ed6357190764ee304c85901c1 | 787 | py | Python | Math Functions/Uncategorized/Herons formula.py | adrikagupta/Must-Know-Programming-Codes | d403428bb9e619b855bde1ae9f46f41a2952b4fa | [
"MIT"
] | 13 | 2017-10-11T09:03:48.000Z | 2020-06-09T16:00:50.000Z | Math Functions/Uncategorized/Herons formula.py | adrikagupta/Must-Know-Programming-Codes | d403428bb9e619b855bde1ae9f46f41a2952b4fa | [
"MIT"
] | 4 | 2017-10-15T06:23:10.000Z | 2017-10-22T08:22:49.000Z | Math Functions/Uncategorized/Herons formula.py | adrikagupta/Must-Know-Programming-Codes | d403428bb9e619b855bde1ae9f46f41a2952b4fa | [
"MIT"
] | 23 | 2017-10-14T05:22:33.000Z | 2019-10-30T19:35:42.000Z | #Heron's formula#
import math
unit_of_measurement = "cm"
side1 = int(input("Enter the length of side A in cm: "))
side2 = int(input("Enter the length of side B in cm: "))
side3 = int(input("Enter the length of side C in cm: "))
braket1 = (side1 ** 2) * (side2**2) + (side1**2)*(side3**2) + (side2**2)*(side3**2)
brake... | 29.148148 | 84 | 0.672173 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 225 | 0.285896 |
81fe4dff84aff0d592f6a1cba826b336e24d2573 | 4,605 | py | Python | viewer/bitmap_from_array.py | TiankunZhou/dials | bd5c95b73c442cceb1c61b1690fd4562acf4e337 | [
"BSD-3-Clause"
] | 2 | 2021-03-17T11:25:46.000Z | 2021-11-18T04:20:54.000Z | viewer/bitmap_from_array.py | TiankunZhou/dials | bd5c95b73c442cceb1c61b1690fd4562acf4e337 | [
"BSD-3-Clause"
] | null | null | null | viewer/bitmap_from_array.py | TiankunZhou/dials | bd5c95b73c442cceb1c61b1690fd4562acf4e337 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, division, print_function
import numpy as np
import wx
from dials.array_family import flex
from dials_viewer_ext import rgb_img
class wxbmp_from_np_array(object):
def __init__(
self, lst_data_in, show_nums=True, palette="black2white", lst_data_mask_in=None
):
... | 33.369565 | 87 | 0.569381 | 4,433 | 0.962649 | 0 | 0 | 0 | 0 | 0 | 0 | 263 | 0.057112 |
81fea7350bf3a22df6647f4ff0e42232c0fd7743 | 191 | py | Python | spinesTS/utils/_validation.py | BirchKwok/spinesTS | b88ec333f41f58979e0570177d1fdc364d976056 | [
"Apache-2.0"
] | 2 | 2021-08-15T09:29:37.000Z | 2022-03-10T13:56:13.000Z | spinesTS/utils/_validation.py | BirchKwok/spinesTS | b88ec333f41f58979e0570177d1fdc364d976056 | [
"Apache-2.0"
] | null | null | null | spinesTS/utils/_validation.py | BirchKwok/spinesTS | b88ec333f41f58979e0570177d1fdc364d976056 | [
"Apache-2.0"
] | null | null | null | import numpy as np
def check_x_y(x, y):
assert isinstance(x, np.ndarray) and isinstance(y, np.ndarray)
assert np.ndim(x) <= 3 and np.ndim(y) <= 2
assert len(x) == len(y)
| 23.875 | 67 | 0.612565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
81feb43ec495c8683dc8e553db15a96568c7f33c | 34,772 | py | Python | sphinxsharp-pro/sphinxsharp.py | madTeddy/sphinxsharp-pro | e7a164214113cef33bca96e9fbbab3feafe16823 | [
"MIT"
] | 2 | 2019-04-22T12:59:26.000Z | 2021-07-30T21:32:44.000Z | sphinxsharp-pro/sphinxsharp.py | madTeddy/sphinxsharp-pro | e7a164214113cef33bca96e9fbbab3feafe16823 | [
"MIT"
] | null | null | null | sphinxsharp-pro/sphinxsharp.py | madTeddy/sphinxsharp-pro | e7a164214113cef33bca96e9fbbab3feafe16823 | [
"MIT"
] | null | null | null | """
CSharp (С#) domain for sphinx
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sphinxsharp Pro (with custom styling)
:copyright: Copyright 2021 by MadTeddy
"""
import re
import warnings
from os import path
from collections import defaultdict, namedtuple
from docutils import nodes
from docutils.parsers.rst import... | 38.085433 | 118 | 0.569884 | 30,805 | 0.885888 | 180 | 0.005176 | 2,271 | 0.065309 | 0 | 0 | 3,684 | 0.105944 |
81ff4f468611ece2f0ec909a6f48f5be0e5338fb | 404 | py | Python | articles/migrations/0003_article_published_at.py | mosalaheg/django3.2 | 551ecd0c8f633bcd9c37a95688e7bed958c0b91c | [
"MIT"
] | null | null | null | articles/migrations/0003_article_published_at.py | mosalaheg/django3.2 | 551ecd0c8f633bcd9c37a95688e7bed958c0b91c | [
"MIT"
] | null | null | null | articles/migrations/0003_article_published_at.py | mosalaheg/django3.2 | 551ecd0c8f633bcd9c37a95688e7bed958c0b91c | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-10-02 08:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('articles', '0002_auto_20211002_1019'),
]
operations = [
migrations.AddField(
model_name='article',
name='published_a... | 21.263158 | 62 | 0.608911 | 311 | 0.769802 | 0 | 0 | 0 | 0 | 0 | 0 | 105 | 0.259901 |
81ff80a60fb6d3f51394a723adeda192add9c640 | 5,622 | py | Python | kratos/mpi/tests/test_data_communicator_factory.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 778 | 2017-01-27T16:29:17.000Z | 2022-03-30T03:01:51.000Z | kratos/mpi/tests/test_data_communicator_factory.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 6,634 | 2017-01-15T22:56:13.000Z | 2022-03-31T15:03:36.000Z | kratos/mpi/tests/test_data_communicator_factory.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 224 | 2017-02-07T14:12:49.000Z | 2022-03-06T23:09:34.000Z | from KratosMultiphysics import ParallelEnvironment, IsDistributedRun
if IsDistributedRun():
from KratosMultiphysics.mpi import DataCommunicatorFactory
import KratosMultiphysics.KratosUnittest as UnitTest
import math
class TestDataCommunicatorFactory(UnitTest.TestCase):
def setUp(self):
self.registere... | 52.055556 | 155 | 0.730523 | 5,351 | 0.951797 | 0 | 0 | 4,671 | 0.830843 | 0 | 0 | 962 | 0.171113 |
81ffc4260214e21a8fbb8d247a68944ab547969b | 643 | py | Python | example/usage/example_kate.py | vodka2/vkaudiotoken-python | 5720e4cf77f5e1b20c3bf57f3df0717638a539e0 | [
"MIT"
] | 32 | 2020-07-21T18:32:59.000Z | 2022-03-20T21:16:11.000Z | example/usage/example_kate.py | vodka2/vkaudiotoken-python | 5720e4cf77f5e1b20c3bf57f3df0717638a539e0 | [
"MIT"
] | 1 | 2020-10-04T04:41:06.000Z | 2020-10-05T11:43:48.000Z | example/usage/example_kate.py | vodka2/vkaudiotoken-python | 5720e4cf77f5e1b20c3bf57f3df0717638a539e0 | [
"MIT"
] | 2 | 2021-09-21T01:17:05.000Z | 2022-03-17T10:17:22.000Z | from __future__ import print_function
try:
import vkaudiotoken
except ImportError:
import path_hack
from vkaudiotoken import supported_clients
import sys
import requests
import json
token = sys.argv[1]
user_agent = supported_clients.KATE.user_agent
sess = requests.session()
sess.headers.update({'User-Agent'... | 21.433333 | 75 | 0.715397 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 132 | 0.205288 |
c3013dccb7b2137642e33db7031ac540e1d949e4 | 811 | py | Python | create_order.py | behnam71/Crypto_P | 1196f06c611eac65dece323d62104233cf2386b1 | [
"MIT"
] | null | null | null | create_order.py | behnam71/Crypto_P | 1196f06c611eac65dece323d62104233cf2386b1 | [
"MIT"
] | null | null | null | create_order.py | behnam71/Crypto_P | 1196f06c611eac65dece323d62104233cf2386b1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
from pprint import pprint
root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(root + '/python')
import ccxt # noqa: E402
exchange = ccxt.binance({
'apiKey': 'SmweB9bNM2qpYkgl4zaQSFPpSzYpyoJ6B3BE9rCm0XYcAdIE0b7n6bm11e8j... | 27.033333 | 83 | 0.713933 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 372 | 0.458693 |
c301529eb7d8f8a6047d8e286ff806d7da8427d3 | 2,235 | py | Python | tools/testrunner/outproc/message.py | LancerWang001/v8 | 42ff4531f590b901ade0a18bfd03e56485fe2452 | [
"BSD-3-Clause"
] | 20,995 | 2015-01-01T05:12:40.000Z | 2022-03-31T21:39:18.000Z | tools/testrunner/outproc/message.py | Andrea-MariaDB-2/v8 | a0f0ebd7a876e8cb2210115adbfcffe900e99540 | [
"BSD-3-Clause"
] | 333 | 2020-07-15T17:06:05.000Z | 2021-03-15T12:13:09.000Z | tools/testrunner/outproc/message.py | Andrea-MariaDB-2/v8 | a0f0ebd7a876e8cb2210115adbfcffe900e99540 | [
"BSD-3-Clause"
] | 4,523 | 2015-01-01T15:12:34.000Z | 2022-03-28T06:23:41.000Z | # Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import itertools
import os
import re
from . import base
class OutProc(base.ExpectedOutProc):
def __init__(self, expected_outcomes, basepath, expected_... | 32.867647 | 72 | 0.648322 | 2,010 | 0.899329 | 0 | 0 | 0 | 0 | 0 | 0 | 561 | 0.251007 |
c3027f734157db362e121ea8ce2b5d36ad4e6075 | 604 | py | Python | gemtown/users/urls.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | gemtown/users/urls.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | 5 | 2020-09-04T20:13:39.000Z | 2022-02-17T22:03:33.000Z | gemtown/users/urls.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = "users"
urlpatterns = [
path("all/", view=views.UserList.as_view(), name="all_user"),
path("<int:user_id>/password/", view=views.ChangePassword.as_view(), name="change password"),
path("<int:user_id>/follow/", view=views.FollowUser.as_view(), name... | 50.333333 | 97 | 0.701987 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 208 | 0.344371 |
c302fe24cced11c5bc506098882205738bad2b79 | 3,132 | py | Python | Packs/Thycotic/Integrations/Thycotic/Thycotic_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Thycotic/Integrations/Thycotic/Thycotic_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Thycotic/Integrations/Thycotic/Thycotic_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
from Thycotic import Client, \
secret_password_get_command, secret_username_get_command, \
secret_get_command, secret_password_update_command, secret_checkout_command, secret_checkin_command, \
secret_delete_command, folder_create_command, folder_delete_command, folder_update_command
from tes... | 60.230769 | 120 | 0.814815 | 0 | 0 | 0 | 0 | 1,647 | 0.525862 | 0 | 0 | 379 | 0.121009 |
c3044c3a6846d86e6151eb00472156db75ba2d69 | 1,046 | py | Python | xml_to_csv.py | bhavdeepsingh33/blood-cell-detection | 1afe0ce7aba7c621eb13fc055cc706981fcf4962 | [
"MIT"
] | null | null | null | xml_to_csv.py | bhavdeepsingh33/blood-cell-detection | 1afe0ce7aba7c621eb13fc055cc706981fcf4962 | [
"MIT"
] | null | null | null | xml_to_csv.py | bhavdeepsingh33/blood-cell-detection | 1afe0ce7aba7c621eb13fc055cc706981fcf4962 | [
"MIT"
] | null | null | null | import os
import glob
import pandas as pd
import xml.etree.ElementTree as ET
def xml_to_csv(path):
xml_list = []
for xml_file in glob.glob(path + '/*.xml'):
tree = ET.parse(xml_file)
root = tree.getroot()
for member in root.findall('object'):
value = (root.find('filename').... | 29.885714 | 78 | 0.543977 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 154 | 0.147228 |
c304c12fe37620c738efd7817690de209aad07c4 | 1,190 | py | Python | src/pynnet/test.py | RalphMao/kaldi-pynnet | a8c050e976a138b43ff0c2ea2a1def72f51f9177 | [
"Apache-2.0"
] | null | null | null | src/pynnet/test.py | RalphMao/kaldi-pynnet | a8c050e976a138b43ff0c2ea2a1def72f51f9177 | [
"Apache-2.0"
] | null | null | null | src/pynnet/test.py | RalphMao/kaldi-pynnet | a8c050e976a138b43ff0c2ea2a1def72f51f9177 | [
"Apache-2.0"
] | null | null | null | import _nnet
import numpy as np
import IPython
net = _nnet.Nnet()
net.read('/home/maohz12/online_50h_Tsinghua/exp_train_50h/lstm_karel_bak/nnet/nnet_iter14_learnrate7.8125e-07_tr1.2687_cv1.6941')
# Test1
blobs = net.layers[0].get_params()
x = blobs[1].data.flatten()
x_test = np.fromfile('test/1.bin', 'f')
assert np.s... | 27.045455 | 129 | 0.715966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 229 | 0.192437 |
c304d7f7756e66ca85c0f39399c15dd4c7181588 | 1,329 | py | Python | collegiate-explorer-admin/cc_admin/cc_admin/test.py | Chit-Chaat/Collegiate_Explorer_APP | f30171d01fec62a836332b5508374144fbb487c7 | [
"MIT"
] | 3 | 2021-05-24T23:06:40.000Z | 2021-11-08T10:32:42.000Z | collegiate-explorer-admin/cc_admin/cc_admin/test.py | Chit-Chaat/Collegiate_Explorer_APP | f30171d01fec62a836332b5508374144fbb487c7 | [
"MIT"
] | 4 | 2020-10-12T03:00:43.000Z | 2020-11-17T01:47:56.000Z | collegiate-explorer-admin/cc_admin/cc_admin/test.py | Chit-Chaat/Collegiate_Explorer_APP | f30171d01fec62a836332b5508374144fbb487c7 | [
"MIT"
] | 2 | 2021-03-01T15:30:26.000Z | 2022-01-13T21:30:20.000Z | __author__ = 'Aaron Yang'
__email__ = 'byang971@usc.edu'
__date__ = '10/28/2020 4:52 PM'
# import re
#
#
# def format_qs_score(score_str):
# """
# help you generate a qs score
# 1 - 100 : 5
# 141-200 : 4
# =100: 4
# N/A 3
# :param score_str:
# :return:
# """
# score = 3
# if... | 26.058824 | 76 | 0.527464 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,243 | 0.93529 |
c306596434700224d0b28f389b38ad8d05d0205f | 4,311 | py | Python | djangocms_translations/utils.py | divio/djangocms-translations | 9bfde2fed91973160bbe50ccbd6b4e2a2f4ba07f | [
"BSD-3-Clause"
] | 3 | 2019-01-14T13:30:38.000Z | 2020-08-10T22:16:06.000Z | djangocms_translations/utils.py | divio/djangocms-translations | 9bfde2fed91973160bbe50ccbd6b4e2a2f4ba07f | [
"BSD-3-Clause"
] | 5 | 2018-12-20T13:56:47.000Z | 2021-07-20T07:13:01.000Z | djangocms_translations/utils.py | divio/djangocms-translations | 9bfde2fed91973160bbe50ccbd6b4e2a2f4ba07f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import json
from itertools import chain
from django.conf import settings
from django.contrib.sites.models import Site
from django.core.exceptions import ObjectDoesNotExist
from django.db.models import BooleanField
from django.forms import modelform_factory
from django.utils.lru_cache import lru... | 28.549669 | 98 | 0.68128 | 0 | 0 | 0 | 0 | 868 | 0.201345 | 0 | 0 | 386 | 0.089538 |
c3068d09ac63699b36a60bd71dd55030585fc665 | 597 | py | Python | bin/render_ingress.py | phplaboratory/madcore-ai | ea866334480d77b084ce971506cfdb285405c122 | [
"MIT"
] | null | null | null | bin/render_ingress.py | phplaboratory/madcore-ai | ea866334480d77b084ce971506cfdb285405c122 | [
"MIT"
] | null | null | null | bin/render_ingress.py | phplaboratory/madcore-ai | ea866334480d77b084ce971506cfdb285405c122 | [
"MIT"
] | null | null | null | import sys, os, json, jinja2, redis
from jinja2 import Template
r_server = redis.StrictRedis('127.0.0.1', db=2)
i_key = "owner-info"
json_data = r_server.get(i_key)
if json_data is not None:
data = json.loads(json_data)
main_domain = data['Hostname']
fqdn = sys.argv[1] + ".ext." + main_domain
config_template... | 35.117647 | 112 | 0.715243 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.184255 |
c307055a5d64c20c7212a67b032444ffbf9d764a | 569 | py | Python | Linear_Insertion_Sort.py | toppassion/python-master-app | 21d854186664440f997bfe53010b242f62979e7f | [
"MIT"
] | null | null | null | Linear_Insertion_Sort.py | toppassion/python-master-app | 21d854186664440f997bfe53010b242f62979e7f | [
"MIT"
] | null | null | null | Linear_Insertion_Sort.py | toppassion/python-master-app | 21d854186664440f997bfe53010b242f62979e7f | [
"MIT"
] | 1 | 2021-12-08T11:38:20.000Z | 2021-12-08T11:38:20.000Z | def Linear_Search(Test_arr, val):
index = 0
for i in range(len(Test_arr)):
if val > Test_arr[i]:
index = i+1
return index
def Insertion_Sort(Test_arr):
for i in range(1, len(Test_arr)):
val = Test_arr[i]
j = Linear_Search(Test_arr[:i], val)
Test_arr.pop(i)
... | 27.095238 | 64 | 0.616872 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 0.161687 |
c30749f6e672c3d0997217dae6e0ef97c37975d8 | 631 | py | Python | scripts/tests/snapshots/snap_keywords_test.py | Duroktar/Wolf | c192d5c27eb2098e440f7726eb1bff40ed004db5 | [
"Apache-2.0"
] | 105 | 2018-02-07T22:07:47.000Z | 2022-03-31T18:16:47.000Z | scripts/tests/snapshots/snap_keywords_test.py | Duroktar/Wolf | c192d5c27eb2098e440f7726eb1bff40ed004db5 | [
"Apache-2.0"
] | 57 | 2018-02-07T23:07:41.000Z | 2021-11-21T17:14:06.000Z | scripts/tests/snapshots/snap_keywords_test.py | Duroktar/Wolf | c192d5c27eb2098e440f7726eb1bff40ed004db5 | [
"Apache-2.0"
] | 10 | 2018-02-24T23:44:51.000Z | 2022-03-02T07:52:27.000Z | # -*- coding: utf-8 -*-
# snapshottest: v1 - https://goo.gl/zC4yUc
from __future__ import unicode_literals
from snapshottest import Snapshot
snapshots = Snapshot()
snapshots['test_keywords 1'] = '[{"lineno": 7, "source": [" a\\n"], "value": "1"}, {"lineno": 7, "source": [" a\\n"], "value": "2"}, {"lineno": 7,... | 57.363636 | 462 | 0.505547 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 513 | 0.812995 |
c307664c89867d683750f1b12c8b33f9be0a22ae | 443 | py | Python | pyside/lesson_10_main.py | LueyEscargot/pyGuiTest | c072fe29a7c94dc60ec54344a5d4a91253d25f3f | [
"MIT"
] | null | null | null | pyside/lesson_10_main.py | LueyEscargot/pyGuiTest | c072fe29a7c94dc60ec54344a5d4a91253d25f3f | [
"MIT"
] | null | null | null | pyside/lesson_10_main.py | LueyEscargot/pyGuiTest | c072fe29a7c94dc60ec54344a5d4a91253d25f3f | [
"MIT"
] | null | null | null | import sys
from PySide2.QtWidgets import QApplication, QMainWindow
from PySide2.QtCore import QFile
from lesson_10_mainWidget import Ui_MainWindow
class MainWindow(QMainWindow):
def __init__(self):
super(MainWindow, self).__init__()
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
if __name... | 23.315789 | 55 | 0.708804 | 161 | 0.363431 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.022573 |
c308e55ef9a8f6ca2122399901177b70c65eef30 | 1,208 | py | Python | test/test_everything.py | jameschapman19/Eigengame | 165d1bf35076fbfc6e65a987cb2e09a174776927 | [
"MIT"
] | null | null | null | test/test_everything.py | jameschapman19/Eigengame | 165d1bf35076fbfc6e65a987cb2e09a174776927 | [
"MIT"
] | null | null | null | test/test_everything.py | jameschapman19/Eigengame | 165d1bf35076fbfc6e65a987cb2e09a174776927 | [
"MIT"
] | null | null | null | import jax.numpy as jnp
import numpy as np
from jax import random
from algorithms import Game, GHA, Oja, Krasulina, Numpy
def test_pca():
"""
At the moment just checks they all run.
Returns
-------
"""
n = 10
p = 2
n_components = 2
batch_size = 2
epochs = 10
key = random... | 24.16 | 83 | 0.543874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 0.067053 |
c309029b235f5e5d51eecba38f135cf9e46dd8c7 | 971 | py | Python | script/python/result_get.py | yztong/LeNet_RTL | 0f714522dd7adc491bfbcf34b22f9f594e7442af | [
"MIT"
] | 29 | 2018-03-22T07:26:37.000Z | 2022-03-21T08:28:36.000Z | script/python/result_get.py | honorpeter/LeNet_RTL | 0f714522dd7adc491bfbcf34b22f9f594e7442af | [
"MIT"
] | 1 | 2021-04-12T13:28:46.000Z | 2021-04-21T10:00:53.000Z | script/python/result_get.py | honorpeter/LeNet_RTL | 0f714522dd7adc491bfbcf34b22f9f594e7442af | [
"MIT"
] | 9 | 2019-04-06T06:27:41.000Z | 2021-12-28T12:11:18.000Z | import numpy as np
from radix import radixConvert
c = radixConvert()
a = np.load("../../data/5/layer4.npy")
print(a.shape)
a = a*128
a = np.around(a).astype(np.int16)
print(a)
a = np.load('../../data/6.npy')
a = a*128
a = np.around(a).astype(np.int8)
print(a.shape)
for i in range(84):
print(i)
print(a[i])
''... | 23.682927 | 72 | 0.582904 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 695 | 0.715757 |
c309031e8b5363fdf7fbbe96607fc907a7dbcec7 | 541 | py | Python | anygraph/wrapper.py | gemerden/anygraph | c20cab82ad4a7f4117690a445e136c2b0e84f0f3 | [
"MIT"
] | 10 | 2020-06-11T14:11:58.000Z | 2021-12-31T11:59:26.000Z | anygraph/wrapper.py | gemerden/anygraph | c20cab82ad4a7f4117690a445e136c2b0e84f0f3 | [
"MIT"
] | null | null | null | anygraph/wrapper.py | gemerden/anygraph | c20cab82ad4a7f4117690a445e136c2b0e84f0f3 | [
"MIT"
] | null | null | null | class Wrapper(object):
wrapper_classes = {}
@classmethod
def wrap(cls, obj):
return cls(obj)
def __init__(self, wrapped):
self.__dict__['wrapped'] = wrapped
def __getattr__(self, name):
return getattr(self.wrapped, name)
def __setattr__(self, name, value):
set... | 19.321429 | 42 | 0.619224 | 537 | 0.992606 | 0 | 0 | 60 | 0.110906 | 0 | 0 | 9 | 0.016636 |
c3092b2cfa6e3e6a80652151da3eb7e1dffe233e | 1,237 | py | Python | saifooler/classifiers/image_net_classifier.py | sailab-code/SAIFooler | 76f91c33624273227d8ee2d974aa5b7b90ace5ac | [
"MIT"
] | null | null | null | saifooler/classifiers/image_net_classifier.py | sailab-code/SAIFooler | 76f91c33624273227d8ee2d974aa5b7b90ace5ac | [
"MIT"
] | null | null | null | saifooler/classifiers/image_net_classifier.py | sailab-code/SAIFooler | 76f91c33624273227d8ee2d974aa5b7b90ace5ac | [
"MIT"
] | null | null | null | from saifooler.classifiers.classifier import Classifier
import torch
import json
import os
class ImageNetClassifier(Classifier):
def __init__(self, model, *args, **kwargs):
super().__init__(model, *args, **kwargs)
self.std = torch.tensor([0.229, 0.224, 0.225], device=self.device)
self.mea... | 29.452381 | 104 | 0.600647 | 1,141 | 0.922393 | 0 | 0 | 0 | 0 | 0 | 0 | 235 | 0.189976 |
c3093f2af126d570c81bda760a6f55d8df7bb8fb | 12,130 | py | Python | bertsification-multi-lstm.py | linhd-postdata/alberti | 4006eb0b97fe9e9bf3d8d1b014b1080713496da1 | [
"Apache-2.0"
] | null | null | null | bertsification-multi-lstm.py | linhd-postdata/alberti | 4006eb0b97fe9e9bf3d8d1b014b1080713496da1 | [
"Apache-2.0"
] | null | null | null | bertsification-multi-lstm.py | linhd-postdata/alberti | 4006eb0b97fe9e9bf3d8d1b014b1080713496da1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# conda install pytorch>=1.6 cudatoolkit=10.2 -c pytorch
# wandb login XXX
import json
import logging
import os
import re
import sklearn
import time
from itertools import product
import numpy as np
import pandas as pd
import wandb
#from IPython import get_ipython
from keras.prepro... | 41.683849 | 170 | 0.639077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,424 | 0.364295 |
c309cc940b59cd3830a59d4a46d48907f9c3e32d | 515 | py | Python | go_server_app/views.py | benjaminaaron/simple-go-server | 0ebe6756f72f896fd014d060252c27c2907e7ae8 | [
"MIT"
] | 1 | 2017-11-29T22:39:05.000Z | 2017-11-29T22:39:05.000Z | go_server_app/views.py | benjaminaaron/simple-go-server | 0ebe6756f72f896fd014d060252c27c2907e7ae8 | [
"MIT"
] | 1 | 2017-11-09T18:41:41.000Z | 2017-11-09T19:14:08.000Z | go_server_app/views.py | benjaminaaron/simple-go-server | 0ebe6756f72f896fd014d060252c27c2907e7ae8 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from .models import GameMeta
def index(request):
return render(request, 'go_server_app/index.html')
def dashboard(request):
return render(request, 'go_server_app/dashboard.html', {'games_list': GameMeta.objects.all()})
def game(request, game_id):
game_meta = GameMe... | 24.52381 | 98 | 0.747573 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.258252 |