hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | 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 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a0df5b44100d80eaec45ea0e6a2b4184f13e915 | 934 | py | Python | tests/test-runners/subject/package/sub_package1/SubSomething1.py | jayvdb/Nuitka | 0ff702e065b1b53231ba0cae451385a3da0fe766 | [
"Apache-2.0"
] | 1 | 2019-03-31T09:56:11.000Z | 2019-03-31T09:56:11.000Z | tests/test-runners/subject/package/sub_package1/SubSomething1.py | jayvdb/Nuitka | 0ff702e065b1b53231ba0cae451385a3da0fe766 | [
"Apache-2.0"
] | 1 | 2019-03-01T11:33:40.000Z | 2019-03-01T11:33:40.000Z | tests/test-runners/subject/package/sub_package1/SubSomething1.py | jayvdb/Nuitka | 0ff702e065b1b53231ba0cae451385a3da0fe766 | [
"Apache-2.0"
] | 1 | 2019-03-26T16:56:21.000Z | 2019-03-26T16:56:21.000Z | # Copyright 2019, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Python test originally created or extracted from other peoples work. The
# parts from me are licensed as below. It is at least Free Software where
# it's copied from other people. In these cases, that will normally be
# indicated.
#
# L... | 40.608696 | 78 | 0.711991 |
4a0df671ba56b4dbe7c7b78865292dcbcfc7b455 | 4,642 | py | Python | neutron/plugins/brocade/db/models.py | ksshanam/neutron-dvr | c0854ea0d1023ab42e1ef861f9b6ff480e985ac5 | [
"Apache-2.0"
] | 3 | 2015-02-02T02:51:39.000Z | 2015-02-23T10:20:23.000Z | neutron/plugins/brocade/db/models.py | ksshanam/neutron-dvr | c0854ea0d1023ab42e1ef861f9b6ff480e985ac5 | [
"Apache-2.0"
] | 4 | 2015-02-23T10:21:11.000Z | 2015-03-04T09:28:20.000Z | neutron/plugins/brocade/db/models.py | ksshanam/neutron-dvr | c0854ea0d1023ab42e1ef861f9b6ff480e985ac5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Brocade Communications System, Inc.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... | 30.741722 | 79 | 0.672555 |
4a0df700b68eade1aa9dcdb363b83705fb8be0be | 5,081 | py | Python | conans/client/build/meson.py | datalogics-kam/conan | 7bf230cd5f8ef68eb804908777ebaad75e951b16 | [
"MIT"
] | null | null | null | conans/client/build/meson.py | datalogics-kam/conan | 7bf230cd5f8ef68eb804908777ebaad75e951b16 | [
"MIT"
] | null | null | null | conans/client/build/meson.py | datalogics-kam/conan | 7bf230cd5f8ef68eb804908777ebaad75e951b16 | [
"MIT"
] | null | null | null | import os
from conans import tools
from conans.client import join_arguments, defs_to_string
from conans.errors import ConanException
from conans.tools import args_to_string
from conans.util.files import mkdir, get_abs_path
class Meson(object):
def __init__(self, conanfile, backend=None, build_type=None):
... | 39.387597 | 100 | 0.635111 |
4a0df71ebd9cd51140ea272ede056d5b6ce012c7 | 40,688 | py | Python | python/ray/tune/ray_trial_executor.py | jianoaix/ray | 1701b923bc83905f8961c06a6a173e3eba46a936 | [
"Apache-2.0"
] | null | null | null | python/ray/tune/ray_trial_executor.py | jianoaix/ray | 1701b923bc83905f8961c06a6a173e3eba46a936 | [
"Apache-2.0"
] | null | null | null | python/ray/tune/ray_trial_executor.py | jianoaix/ray | 1701b923bc83905f8961c06a6a173e3eba46a936 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import copy
import inspect
import random
from collections import deque
from enum import Enum
from functools import partial
import logging
import os
import time
import traceback
from contextlib import contextmanager
from typing import (
Callable,
Dict,
Iterable,
List,
Optional,
Se... | 39.69561 | 88 | 0.590346 |
4a0df8b9a2422abaa28a6fc4ad9cc74b54ba98f1 | 4,204 | py | Python | tests/datatools/test_dataset.py | aya-miyazaki/XenonPy | 90971cc362402715ba15c63f5d75070f9680fd78 | [
"BSD-3-Clause"
] | 1 | 2021-01-29T04:43:45.000Z | 2021-01-29T04:43:45.000Z | tests/datatools/test_dataset.py | aya-miyazaki/XenonPy | 90971cc362402715ba15c63f5d75070f9680fd78 | [
"BSD-3-Clause"
] | null | null | null | tests/datatools/test_dataset.py | aya-miyazaki/XenonPy | 90971cc362402715ba15c63f5d75070f9680fd78 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2019. TsumiNa. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
from os import remove
from pathlib import Path
import joblib
import numpy as np
import pandas as pd
import pytest
from xenonpy.datatools import Dataset
@pytes... | 25.634146 | 100 | 0.627022 |
4a0df8d77d95007484b79850a48c9ba37441a170 | 2,423 | py | Python | di/_utils/state.py | adriangb/anydep | 6ab38c1d4befe8783431e0b954848488ea21eae2 | [
"MIT"
] | 5 | 2021-07-30T10:10:16.000Z | 2021-09-23T11:23:15.000Z | di/_utils/state.py | adriangb/anydep | 6ab38c1d4befe8783431e0b954848488ea21eae2 | [
"MIT"
] | 3 | 2021-07-26T06:22:09.000Z | 2021-09-24T16:11:08.000Z | di/_utils/state.py | adriangb/anydep | 6ab38c1d4befe8783431e0b954848488ea21eae2 | [
"MIT"
] | 1 | 2021-09-17T07:22:23.000Z | 2021-09-17T07:22:23.000Z | from __future__ import annotations
from contextlib import AsyncExitStack, ExitStack
from types import TracebackType
from typing import Any, Dict, Optional, Type, Union
from di._utils.scope_map import ScopeMap
from di._utils.types import FusedContextManager
from di.api.providers import DependencyProvider
from di.api.s... | 33.191781 | 115 | 0.674371 |
4a0df8e6008eeb7517728e4d446bc0cfa35ee25c | 1,762 | py | Python | lib/rucio/db/sqla/__init__.py | Pranay144/rucio | 40bd5e4458342736e5ca37f565f8cb7ae8cb0850 | [
"Apache-2.0"
] | null | null | null | lib/rucio/db/sqla/__init__.py | Pranay144/rucio | 40bd5e4458342736e5ca37f565f8cb7ae8cb0850 | [
"Apache-2.0"
] | null | null | null | lib/rucio/db/sqla/__init__.py | Pranay144/rucio | 40bd5e4458342736e5ca37f565f8cb7ae8cb0850 | [
"Apache-2.0"
] | null | null | null | # Copyright European Organization for Nuclear Research (CERN)
#
# 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
from sqlalchemy.sql.expression import... | 58.733333 | 145 | 0.638479 |
4a0df9bd1911568eb3a4b0ac866564fc33ac6483 | 267 | py | Python | src/common/video_recorder.py | brianmcera/DRL_ObservationalDropout | 2d6b7c88700b3de455cc2ca70ccde5fc7b52c490 | [
"MIT"
] | 1 | 2020-03-19T22:01:01.000Z | 2020-03-19T22:01:01.000Z | src/common/video_recorder.py | brianmcera/DRL_ObservationalDropout | 2d6b7c88700b3de455cc2ca70ccde5fc7b52c490 | [
"MIT"
] | null | null | null | src/common/video_recorder.py | brianmcera/DRL_ObservationalDropout | 2d6b7c88700b3de455cc2ca70ccde5fc7b52c490 | [
"MIT"
] | null | null | null | import cv2
def record_from_RGB_array(img_array, filepath, fps=60, width=256, height=256):
out = cv2.VideoWriter(filepath, cv2.VideoWriter_fourcc('MJPG'), fps, (width, height))
for i in range(len(img_array)):
out.write(img_array[i])
out.release()
| 33.375 | 89 | 0.700375 |
4a0dfa3248ac99941c9e8b376999dcdd14d245ae | 4,464 | py | Python | pyrobud/custom_modules/base.py | look416/pyrobud | 0387021963be4a145d812903db7faf048c7b39c2 | [
"MIT"
] | null | null | null | pyrobud/custom_modules/base.py | look416/pyrobud | 0387021963be4a145d812903db7faf048c7b39c2 | [
"MIT"
] | 15 | 2021-11-02T17:39:21.000Z | 2022-03-28T20:01:04.000Z | pyrobud/custom_modules/base.py | look416/pyrobud | 0387021963be4a145d812903db7faf048c7b39c2 | [
"MIT"
] | null | null | null | import asyncio
import io
from pathlib import PurePosixPath
from typing import IO
import dataclasses as dc
import copy
import telethon as tg
from telethon.tl.types import PeerUser, PeerChat, PeerChannel
import re
import decimal
from fxparser import ParserHelper
from .. import command, module, util, mt4
class BaseMo... | 39.157895 | 133 | 0.622312 |
4a0dfb98063d6ae4066c076c37f14fe15e355d66 | 1,792 | py | Python | tabnet/download_prepare_covertype.py | kiss2u/google-research | 2cd66234656f9e2f4218ed90a2d8aa9cf3139093 | [
"Apache-2.0"
] | 1 | 2020-02-10T12:50:17.000Z | 2020-02-10T12:50:17.000Z | tabnet/download_prepare_covertype.py | kiss2u/google-research | 2cd66234656f9e2f4218ed90a2d8aa9cf3139093 | [
"Apache-2.0"
] | 7 | 2021-08-25T16:15:53.000Z | 2022-02-10T03:26:55.000Z | tabnet/download_prepare_covertype.py | kiss2u/google-research | 2cd66234656f9e2f4218ed90a2d8aa9cf3139093 | [
"Apache-2.0"
] | 1 | 2021-02-11T06:11:31.000Z | 2021-02-11T06:11:31.000Z | # coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 34.461538 | 89 | 0.760045 |
4a0dfc9c9b6bb4c320d993cbd5d004b0dd026e83 | 444 | py | Python | django_react_notes/users/urls.py | RommelTJ/django_react_notes | 670f4d08cadd1b14bd8f2e47002bcf81874dd036 | [
"MIT"
] | null | null | null | django_react_notes/users/urls.py | RommelTJ/django_react_notes | 670f4d08cadd1b14bd8f2e47002bcf81874dd036 | [
"MIT"
] | 2 | 2019-04-06T03:30:03.000Z | 2019-04-06T23:11:04.000Z | django_react_notes/users/urls.py | RommelTJ/django_react_notes | 670f4d08cadd1b14bd8f2e47002bcf81874dd036 | [
"MIT"
] | null | null | null | from django.urls import path
from django_react_notes.users.views import (
user_list_view,
user_redirect_view,
user_update_view,
user_detail_view,
)
app_name = "users"
urlpatterns = [
path("", view=user_list_view, name="list"),
path("~redirect/", view=user_redirect_view, name="redirect"),
p... | 26.117647 | 66 | 0.70045 |
4a0e020a36979115a77b1f399b81482adf1b2efd | 1,857 | py | Python | tint/friends.py | bmuller/tint | e74a3e4c46f71dfcb2574920467ad791d29de6fe | [
"MIT"
] | 1 | 2015-02-18T18:33:44.000Z | 2015-02-18T18:33:44.000Z | tint/friends.py | 8468/tint | e74a3e4c46f71dfcb2574920467ad791d29de6fe | [
"MIT"
] | null | null | null | tint/friends.py | 8468/tint | e74a3e4c46f71dfcb2574920467ad791d29de6fe | [
"MIT"
] | null | null | null | from collections import namedtuple
from twisted.internet import defer
from tint.ssl.keymagic import PublicKey
from tint.log import Logger
from tint.resolution import KeyNotResolvedError
from tint.storage.addressing import Path
Friend = namedtuple('Friend', ['id', 'name', 'key'])
class FriendsList(object):
def ... | 30.95 | 76 | 0.642434 |
4a0e04d3956060fddd5d24f9cc75c8a1c1f14814 | 3,800 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/password_policy/tests/test_forms.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/password_policy/tests/test_forms.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/password_policy/tests/test_forms.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | """
Test password policy forms
"""
from unittest import mock
import pytest
from django.forms import ValidationError
from django.test import TestCase
from django.test.utils import override_settings
from openedx.core.djangoapps.password_policy.compliance import (
NonCompliantPasswordException, NonCompliantPasswordW... | 47.5 | 118 | 0.731842 |
4a0e0500fd3b17fc3702631bd49cacff063ead2f | 557 | py | Python | read text convert json.py | bbbirkan/txt_format_data_create_python_dict- | 71d5cd1b655c634e05a4597f1085d0b3c252ce45 | [
"MIT"
] | 1 | 2021-01-25T03:01:34.000Z | 2021-01-25T03:01:34.000Z | read text convert json.py | bbbirkan/txt_format_data_create_python_dict- | 71d5cd1b655c634e05a4597f1085d0b3c252ce45 | [
"MIT"
] | null | null | null | read text convert json.py | bbbirkan/txt_format_data_create_python_dict- | 71d5cd1b655c634e05a4597f1085d0b3c252ce45 | [
"MIT"
] | null | null | null | import json
import re
f = open("source code.txt", "r")
data = {}
for line in f:
try:
line = (line.replace("\"", "").replace("\n\n", "").replace("\n", "").strip().split(":"))
line[0] = re.sub("[^\w]+", "", line[0])
line[1] = re.sub("[^\w]+", " ", line[1])
data[line[0]] = line[1]
e... | 27.85 | 96 | 0.536804 |
4a0e060a47c8c2fe932a24689c08eec1e7af2fc0 | 274 | py | Python | emailauth/management/commands/cleanupemailauth.py | redvasily/django-emailauth | 1c3c977f361e63eb6e4bd2fa32f6d8af78f74f31 | [
"BSD-3-Clause"
] | 2 | 2015-01-25T01:47:03.000Z | 2016-05-09T14:08:50.000Z | emailauth/management/commands/cleanupemailauth.py | redvasily/django-emailauth | 1c3c977f361e63eb6e4bd2fa32f6d8af78f74f31 | [
"BSD-3-Clause"
] | null | null | null | emailauth/management/commands/cleanupemailauth.py | redvasily/django-emailauth | 1c3c977f361e63eb6e4bd2fa32f6d8af78f74f31 | [
"BSD-3-Clause"
] | null | null | null | from django.core.management.base import NoArgsCommand
from emailauth.models import UserEmail
class Command(NoArgsCommand):
help = "Delete expired UserEmail objects from the database"
def handle_noargs(self, **options):
UserEmail.objects.delete_expired()
| 24.909091 | 63 | 0.770073 |
4a0e0705f38160dd8f66d968ea384d4a618a7dba | 3,383 | py | Python | sphinx/source/docs/user_guide/examples/extensions_example_latex.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 1 | 2015-01-31T14:42:39.000Z | 2015-01-31T14:42:39.000Z | sphinx/source/docs/user_guide/examples/extensions_example_latex.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 2 | 2021-05-08T11:43:21.000Z | 2021-05-10T19:16:43.000Z | sphinx/source/docs/user_guide/examples/extensions_example_latex.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 1 | 2020-01-21T12:03:58.000Z | 2020-01-21T12:03:58.000Z | """ The LaTex example was derived from: http://matplotlib.org/users/usetex.html
"""
import numpy as np
from bokeh.models import Label
from bokeh.plotting import figure, show
from bokeh.util.compiler import TypeScript
TS_CODE = """
import * as p from "core/properties"
import {Label, LabelView} from "models/annotation... | 30.754545 | 108 | 0.67987 |
4a0e07d8edaf575e1c227948a892907e70574d9c | 23,688 | py | Python | core/migrations/0001_initial.py | bruno-zaccariello/sgeheroku | c3d1a0292a33ffc3296746838dc8324c1496ff7e | [
"Apache-2.0"
] | null | null | null | core/migrations/0001_initial.py | bruno-zaccariello/sgeheroku | c3d1a0292a33ffc3296746838dc8324c1496ff7e | [
"Apache-2.0"
] | 4 | 2020-02-11T23:12:36.000Z | 2021-11-15T17:47:44.000Z | core/migrations/0001_initial.py | bruno-zaccariello/sgeheroku | c3d1a0292a33ffc3296746838dc8324c1496ff7e | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.2 on 2018-10-31 16:13
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 48.048682 | 153 | 0.559313 |
4a0e07ff7440c2667500a1a36c7e3873c0037c6e | 16,701 | py | Python | network.py | Anat37/Parser-v1 | d40ef549f589af95aed2b86740bbfbb6ce7aa68c | [
"Apache-2.0"
] | null | null | null | network.py | Anat37/Parser-v1 | d40ef549f589af95aed2b86740bbfbb6ce7aa68c | [
"Apache-2.0"
] | null | null | null | network.py | Anat37/Parser-v1 | d40ef549f589af95aed2b86740bbfbb6ce7aa68c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2016 Timothy Dozat
#
# 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 ... | 40.243373 | 270 | 0.591222 |
4a0e0892d57a322211c53bbceef0c75d3b690ce5 | 3,477 | py | Python | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/__init__.py | xolve/azure-sdk-for-python | 9f5baa19c392f77f811d936ee43450e4ea524002 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/__init__.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/__init__.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 40.905882 | 94 | 0.722174 |
4a0e092a5adeea0194770bba6d783b1704a855ab | 3,375 | py | Python | homeassistant/components/weather/zamg.py | adolfoeliazat/voidhomecontrol | 6d733253811c553912e46e24debec818b28b0688 | [
"Apache-2.0"
] | 2 | 2017-02-25T00:27:06.000Z | 2017-02-25T03:09:30.000Z | homeassistant/components/weather/zamg.py | adolfoeliazat/voidhomecontrol | 6d733253811c553912e46e24debec818b28b0688 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/weather/zamg.py | adolfoeliazat/voidhomecontrol | 6d733253811c553912e46e24debec818b28b0688 | [
"Apache-2.0"
] | 2 | 2018-06-03T11:14:44.000Z | 2018-11-04T18:18:12.000Z | """
Sensor for data from Austrian "Zentralanstalt für Meteorologie und Geodynamik".
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/weather.zamg/
"""
import logging
import voluptuous as vol
from homeassistant.components.weather import (
WeatherEntit... | 31.25 | 79 | 0.694519 |
4a0e0a289f888bbc91a59dd4534ff8164b1952d4 | 3,747 | py | Python | SemanticSearch/settings.py | tkhang1999/Solr-SBERT-semantic-search | f805cd121b367f47706a024d67f456290bdfe346 | [
"MIT"
] | 3 | 2021-12-07T09:49:11.000Z | 2021-12-22T03:42:18.000Z | SemanticSearch/settings.py | tkhang1999/Solr-SBERT-semantic-search | f805cd121b367f47706a024d67f456290bdfe346 | [
"MIT"
] | 1 | 2022-01-15T00:59:50.000Z | 2022-01-15T00:59:50.000Z | SemanticSearch/settings.py | tkhang1999/Solr-SBERT-semantic-search | f805cd121b367f47706a024d67f456290bdfe346 | [
"MIT"
] | null | null | null | """
Django settings for SemanticSearch project.
Generated by 'django-admin startproject' using Django 3.2.4.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from ... | 27.152174 | 91 | 0.707766 |
4a0e0a2c5da0bafd63cdf7ccf93b4191e6d673bf | 9,265 | py | Python | lektor/build_programs.py | yagebu/lektor | a31d8e57a5b2f4b090072527269c26a65202c736 | [
"BSD-3-Clause"
] | 4,104 | 2015-11-16T18:37:51.000Z | 2022-03-28T14:28:24.000Z | lektor/build_programs.py | yagebu/lektor | a31d8e57a5b2f4b090072527269c26a65202c736 | [
"BSD-3-Clause"
] | 854 | 2015-12-05T12:19:02.000Z | 2022-03-31T16:47:27.000Z | lektor/build_programs.py | yagebu/lektor | a31d8e57a5b2f4b090072527269c26a65202c736 | [
"BSD-3-Clause"
] | 442 | 2015-11-21T10:18:02.000Z | 2022-03-29T19:55:17.000Z | import os
import shutil
from itertools import chain
from lektor.assets import Directory
from lektor.assets import File
from lektor.constants import PRIMARY_ALT
from lektor.db import Attachment
from lektor.db import Page
from lektor.exception import LektorException
class BuildError(LektorException):
pass
builti... | 34.0625 | 87 | 0.621371 |
4a0e0a68fcaba4fee271701a349bc8683c3188dd | 3,579 | py | Python | micropython/sensors/adxl345_upy.py | kesking82/thingflow-python | 4c00deafd1bf425ec90ef2159fc5f3ea2553ade8 | [
"Apache-2.0"
] | 38 | 2017-04-25T12:24:56.000Z | 2021-01-12T17:01:43.000Z | micropython/sensors/adxl345_upy.py | kesking82/thingflow-python | 4c00deafd1bf425ec90ef2159fc5f3ea2553ade8 | [
"Apache-2.0"
] | 4 | 2017-08-04T22:39:15.000Z | 2017-08-07T17:36:21.000Z | micropython/sensors/adxl345_upy.py | kesking82/thingflow-python | 4c00deafd1bf425ec90ef2159fc5f3ea2553ade8 | [
"Apache-2.0"
] | 14 | 2017-07-31T21:25:29.000Z | 2022-02-06T08:09:07.000Z | # ADXL345 Python library for Raspberry Pi
#
# author: Jonathan Williamson
# license: BSD, see LICENSE.txt included in this package
#
# This is a Raspberry Pi Python implementation to help you get started with
# the Adafruit Triple Axis ADXL345 breakout board:
# http://shop.pimoroni.com/products/adafruit-triple-axis-... | 29.825 | 104 | 0.581447 |
4a0e0a7e50c8a39cc2afdee7cd7c63510df885ab | 9,652 | py | Python | tests/beem/test_blockchain.py | anthonyadavisii/beem | 2ddb62073e608c78391de4517f24a7858c5d74db | [
"MIT"
] | 1 | 2020-04-27T09:18:35.000Z | 2020-04-27T09:18:35.000Z | tests/beem/test_blockchain.py | oldas1/beem | d0b9642bfe5f5df3004a59d4923ea497e3a944b3 | [
"MIT"
] | null | null | null | tests/beem/test_blockchain.py | oldas1/beem | d0b9642bfe5f5df3004a59d4923ea497e3a944b3 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from builtins import super
import unittest
from parameterized import parameterized
from datetime import datetime, timedelta
import pytz
import time
from pprint import ppri... | 40.725738 | 162 | 0.617281 |
4a0e0e3fb77bd4547fce9dad775b4fed7b278137 | 34,310 | py | Python | selfdrive/controls/controlsd.py | shake777/openpilot | df8e300057c9774f67b90a9a7a0172095ef2a0b9 | [
"MIT"
] | null | null | null | selfdrive/controls/controlsd.py | shake777/openpilot | df8e300057c9774f67b90a9a7a0172095ef2a0b9 | [
"MIT"
] | null | null | null | selfdrive/controls/controlsd.py | shake777/openpilot | df8e300057c9774f67b90a9a7a0172095ef2a0b9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import math
from numbers import Number
from cereal import car, log
from common.numpy_fast import clip, interp
from common.realtime import sec_since_boot, config_realtime_process, Priority, Ratekeeper, DT_CTRL
from common.profiler import Profiler
from common.params import Params, put_no... | 42.621118 | 154 | 0.710434 |
4a0e0e98f3d7f6445e23a4b9030ef7b33bc78eb4 | 19,546 | py | Python | pygmyhdl/pygmyhdl.py | xesscorp/pygmyhdl | c1c187dc97e1ba7551bda1944f727a4f35e2fac2 | [
"MIT"
] | 20 | 2017-09-01T16:08:30.000Z | 2020-12-12T22:19:19.000Z | pygmyhdl/pygmyhdl.py | devbisme/pygmyhdl | c1c187dc97e1ba7551bda1944f727a4f35e2fac2 | [
"MIT"
] | 3 | 2018-02-01T20:07:18.000Z | 2021-03-07T14:15:26.000Z | pygmyhdl/pygmyhdl.py | xesscorp/pygmyhdl | c1c187dc97e1ba7551bda1944f727a4f35e2fac2 | [
"MIT"
] | 5 | 2018-03-13T18:12:08.000Z | 2021-06-15T03:46:14.000Z | # -*- coding: utf-8 -*-
# MIT license
#
# Copyright (C) 2017 by XESS Corp.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | 36.39851 | 106 | 0.639261 |
4a0e0eacbe3139d4be66d723ab673feeed9cf05e | 10,715 | py | Python | scripts/datasets_to_h5/sleep_edf_in_bed/to_h5_no_lights.py | Dreem-Organization/RobustSleepNet | c8ff3f6f857299eb2bf2e9400483084d5ecd4106 | [
"MIT"
] | 16 | 2021-04-06T14:04:45.000Z | 2022-03-11T14:37:08.000Z | scripts/datasets_to_h5/sleep_edf_in_bed/to_h5_no_lights.py | Dreem-Organization/RobustSleepNet | c8ff3f6f857299eb2bf2e9400483084d5ecd4106 | [
"MIT"
] | null | null | null | scripts/datasets_to_h5/sleep_edf_in_bed/to_h5_no_lights.py | Dreem-Organization/RobustSleepNet | c8ff3f6f857299eb2bf2e9400483084d5ecd4106 | [
"MIT"
] | 4 | 2021-06-10T06:48:33.000Z | 2022-03-26T22:29:07.000Z | import json
import h5py
import pyedflib
from robust_sleep_net.utils.utils import standardize_signals_durations
import mne
import numpy as np
import pandas as pd
from dateutil import parser
stages_lookup = {
"Sleep stage 1": 1,
"Sleep stage 2": 2,
"Sleep stage 3": 3,
"Sleep stage 4": 3,
"Movement ... | 36.821306 | 99 | 0.558936 |
4a0e1093b0ebac0d1639abb3ce7e2068d6e80c1a | 136,318 | py | Python | jax/_src/api.py | fengwang/jax | 88f888d498ee5a063c7fbdf96ea593ab8bd01849 | [
"Apache-2.0"
] | null | null | null | jax/_src/api.py | fengwang/jax | 88f888d498ee5a063c7fbdf96ea593ab8bd01849 | [
"Apache-2.0"
] | 8 | 2022-01-03T16:09:12.000Z | 2022-03-24T14:18:05.000Z | jax/_src/api.py | zhangqiaorjc/jax | 5726be1a9e1d33d8e0052d09104501b19fb6efcf | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 43.138608 | 128 | 0.682815 |
4a0e118360d23fe4fdcb68049c8b7f5e36e9308e | 157 | py | Python | gym_cooking/__init__.py | atbolsh/gym-cooking | bbb207e12c5bfdf72bd7d473de4b79665c23984d | [
"MIT"
] | 124 | 2020-11-02T06:31:23.000Z | 2022-01-11T10:42:37.000Z | gym_cooking/__init__.py | atbolsh/gym-cooking | bbb207e12c5bfdf72bd7d473de4b79665c23984d | [
"MIT"
] | 7 | 2020-11-02T14:11:29.000Z | 2021-05-21T02:53:18.000Z | gym_cooking/__init__.py | atbolsh/gym-cooking | bbb207e12c5bfdf72bd7d473de4b79665c23984d | [
"MIT"
] | 24 | 2020-11-02T14:39:34.000Z | 2022-01-20T06:51:39.000Z | from gym.envs.registration import register
register(
id="overcookedEnv-v0",
entry_point="gym_cooking.envs:OvercookedEnvironment",
)
| 22.428571 | 61 | 0.694268 |
4a0e11cf1cff8843e3e5fd25d0f4174f1f7bbcd0 | 14,090 | py | Python | act/workers/attack.py | tomd/act-workers | ef42eaf26b14197a6bd1ac9ae12c4d39acc740c1 | [
"ISC"
] | 4 | 2018-10-17T21:19:07.000Z | 2020-08-12T09:55:18.000Z | act/workers/attack.py | tomd/act-workers | ef42eaf26b14197a6bd1ac9ae12c4d39acc740c1 | [
"ISC"
] | 13 | 2018-10-23T06:37:15.000Z | 2022-01-28T13:10:54.000Z | act/workers/attack.py | tomd/act-workers | ef42eaf26b14197a6bd1ac9ae12c4d39acc740c1 | [
"ISC"
] | 16 | 2018-10-23T06:16:23.000Z | 2022-01-27T11:36:41.000Z | #!/usr/bin/env python3
"""
Worker for Mitre ATT&CK, using the STIX implementation available here:
https://github.com/mitre/cti
ATT&CK Property STIX Object type ACT object
=========================================================
Technique attack-pattern technique
Gr... | 34.199029 | 135 | 0.582186 |
4a0e1255f9a897b7a4918f90f771d32cb30bd436 | 376 | py | Python | tests/conftest.py | guiloga/guirpc | fe740c4f318265df8b4331c682edb4cb7fe4bd89 | [
"MIT"
] | 3 | 2021-02-01T22:48:10.000Z | 2021-05-28T12:36:04.000Z | tests/conftest.py | guiloga/guirpc | fe740c4f318265df8b4331c682edb4cb7fe4bd89 | [
"MIT"
] | 1 | 2021-05-28T12:51:43.000Z | 2021-06-13T09:33:23.000Z | tests/conftest.py | guiloga/guirpc | fe740c4f318265df8b4331c682edb4cb7fe4bd89 | [
"MIT"
] | null | null | null | from pytest import fixture
from guirpc.amqp.utils import ClientConnector
@fixture(scope="session")
def connector():
return ClientConnector()
@fixture(scope="session")
def raw_obj():
return Foo()
class Foo:
def __init__(self):
self.name = "Foo"
self.likes = "Bars"
def __eq__(self,... | 16.347826 | 46 | 0.662234 |
4a0e13aa9f669b01d906d52d5af970f910200904 | 4,862 | py | Python | projects/scocen/data/covariance_matrices_for_comps_for_upload_to_the_journal.py | mikeireland/chronostar | fcf37614e1d145f3a5e265e54512bf8cd98051a0 | [
"MIT"
] | 4 | 2018-05-28T11:05:42.000Z | 2021-05-14T01:13:11.000Z | projects/scocen/data/covariance_matrices_for_comps_for_upload_to_the_journal.py | mikeireland/chronostar | fcf37614e1d145f3a5e265e54512bf8cd98051a0 | [
"MIT"
] | 13 | 2019-08-14T07:30:24.000Z | 2021-11-08T23:44:29.000Z | projects/scocen/data/covariance_matrices_for_comps_for_upload_to_the_journal.py | mikeireland/chronostar | fcf37614e1d145f3a5e265e54512bf8cd98051a0 | [
"MIT"
] | 4 | 2016-04-21T08:25:26.000Z | 2021-02-25T06:53:52.000Z | """
A table of covariance matrices for all Sco-Cen components.
For upload to the journal.
Actually, for completeness, unclude all the data from Table 1
and include covariance matrices.
"""
import numpy as np
from astropy.table import Table, Column
from astropy import units as u
from chronostar.component import Sphe... | 28.267442 | 108 | 0.621349 |
4a0e150df2a47272aecf9316913adde57cabb343 | 3,337 | py | Python | paper2/tests/test_bigEr.py | dfm/mapping_stellar_surfaces | 52d4ba1a726c65868e4a1290a801fe046fb2155f | [
"MIT"
] | 10 | 2021-01-21T17:03:26.000Z | 2021-12-19T17:49:28.000Z | paper2/tests/test_bigEr.py | dfm/mapping_stellar_surfaces | 52d4ba1a726c65868e4a1290a801fe046fb2155f | [
"MIT"
] | 10 | 2021-01-21T15:55:53.000Z | 2021-03-30T14:35:16.000Z | paper2/tests/test_bigEr.py | dfm/mapping_stellar_surfaces | 52d4ba1a726c65868e4a1290a801fe046fb2155f | [
"MIT"
] | 2 | 2021-01-21T15:41:58.000Z | 2021-01-25T16:26:15.000Z | import numpy as np
from scipy.integrate import quad
from scipy.special import legendre as P
def b(r, K=1000, s=0.0033, **kwargs):
"""
The sigmoid spot profile.
"""
theta = np.linspace(0, np.pi, K)
return 1 / (1 + np.exp((r - theta) / s)) - 1
def get_Bp(K=1000, lmax=5, eps=1e-9, sigma=15, **kwar... | 29.530973 | 79 | 0.566377 |
4a0e15ac52649fac04b077773c1df95401010867 | 13,751 | py | Python | scripts/dct/obj/ChipObj.py | ABM-Community-Ports/droidboot_device_planet-cosmocom | 4e157f7f3def69cc47e2c5c8fec5346feaea2a8c | [
"MIT"
] | 10 | 2020-07-17T14:51:36.000Z | 2022-03-12T03:35:42.000Z | scripts/dct/obj/ChipObj.py | ABM-Community-Ports/droidboot_device_planet-cosmocom | 4e157f7f3def69cc47e2c5c8fec5346feaea2a8c | [
"MIT"
] | 6 | 2020-07-23T19:33:25.000Z | 2021-02-23T18:21:59.000Z | scripts/dct/obj/ChipObj.py | ABM-Community-Ports/droidboot_device_planet-cosmocom | 4e157f7f3def69cc47e2c5c8fec5346feaea2a8c | [
"MIT"
] | 4 | 2020-11-12T03:07:39.000Z | 2022-03-23T19:30:20.000Z | #! /usr/bin/python
# -*- coding: utf-8 -*-
import os
import collections
import xml.dom.minidom
from GpioObj import GpioObj
from GpioObj import GpioObj_whitney
from GpioObj import GpioObj_MT6759
from GpioObj import GpioObj_MT6739
from GpioObj import GpioObj_MT6771
from GpioObj import GpioObj_MT6763
from EintObj import... | 31.040632 | 99 | 0.622064 |
4a0e15ebde96a66219c7b32ededca6b6707a1f35 | 538 | py | Python | server/lib/python/cartodb_services/cartodb_services/google/exceptions.py | digideskio/dataservices-api | 246ec135dbeaa3f9a52717fdac50a4ab040ce22b | [
"BSD-3-Clause"
] | 22 | 2016-03-11T17:33:31.000Z | 2021-02-22T04:00:43.000Z | server/lib/python/cartodb_services/cartodb_services/google/exceptions.py | digideskio/dataservices-api | 246ec135dbeaa3f9a52717fdac50a4ab040ce22b | [
"BSD-3-Clause"
] | 338 | 2016-02-16T16:13:13.000Z | 2022-03-30T15:50:17.000Z | server/lib/python/cartodb_services/cartodb_services/google/exceptions.py | CartoDB/dataservices-api | d0f28cc002ef11df9f371d5d1fd2d0901c245f97 | [
"BSD-3-Clause"
] | 14 | 2016-09-22T15:29:33.000Z | 2021-02-08T03:46:40.000Z | #!/usr/local/bin/python
# -*- coding: utf-8 -*-
import json
class InvalidGoogleCredentials(Exception):
pass
class BadGeocodingParams(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr('Bad geocoding params: ' + json.dumps(self.value))
class NoGeocod... | 22.416667 | 70 | 0.684015 |
4a0e16ac098fb0f5b0b56f6922b321c5075201f9 | 6,833 | py | Python | analysis.py | jkfids/forest-fire | c0555929725be55369aa508ef6582f9d3f97ca4b | [
"MIT"
] | 1 | 2021-04-09T04:02:01.000Z | 2021-04-09T04:02:01.000Z | analysis.py | jkfids/forest-fire | c0555929725be55369aa508ef6582f9d3f97ca4b | [
"MIT"
] | null | null | null | analysis.py | jkfids/forest-fire | c0555929725be55369aa508ef6582f9d3f97ca4b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 16 16:24:11 2021
@author: Fidel
"""
# Import standard libraries
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
from matplotlib import colors
from matplotlib.animation import FuncAnimation
from time import time
# Import ForestFire ... | 37.543956 | 96 | 0.63647 |
4a0e17b0923ba0f74bf85bc55ae59de364af6882 | 11,238 | py | Python | sdk/turing/ensembler.py | ashwinath/turing | dcaf3132cea4a511b4b2cd3466096cac3914b0a5 | [
"Apache-2.0"
] | 57 | 2020-10-21T10:36:11.000Z | 2022-03-11T17:50:25.000Z | sdk/turing/ensembler.py | ashwinath/turing | dcaf3132cea4a511b4b2cd3466096cac3914b0a5 | [
"Apache-2.0"
] | 82 | 2020-10-21T08:24:51.000Z | 2022-03-31T07:08:29.000Z | sdk/turing/ensembler.py | ashwinath/turing | dcaf3132cea4a511b4b2cd3466096cac3914b0a5 | [
"Apache-2.0"
] | 18 | 2020-10-21T08:07:50.000Z | 2022-03-20T18:20:54.000Z | import abc
from typing import Optional, Union, List, Any, Dict
import mlflow
import numpy
import pandas
import turing.generated.models
from turing.generated.models import EnsemblerType
from turing._base_types import ApiObject, ApiObjectSpec
from turing.batch import EnsemblingJob
from turing.batch.config import Ensembli... | 35.451104 | 100 | 0.644421 |
4a0e18631da8725fbc5035ca5b80b3936dd8761d | 1,012 | py | Python | vsts/vsts/core/v4_1/models/web_api_connected_service_ref.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | vsts/vsts/core/v4_1/models/web_api_connected_service_ref.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | vsts/vsts/core/v4_1/models/web_api_connected_service_ref.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 33.733333 | 94 | 0.466403 |
4a0e18d27a2421621712689ef4baf5f36721245c | 508 | py | Python | tests/conftest.py | w0rmr1d3r/cloner | a7c00f6006504119d764ab6bd0aa5830f1bc8779 | [
"MIT"
] | 5 | 2021-11-04T11:55:23.000Z | 2022-01-16T01:28:51.000Z | tests/conftest.py | w0rmr1d3r/cloner | a7c00f6006504119d764ab6bd0aa5830f1bc8779 | [
"MIT"
] | 1 | 2022-03-01T06:05:45.000Z | 2022-03-01T06:05:45.000Z | tests/conftest.py | w0rmr1d3r/cloner | a7c00f6006504119d764ab6bd0aa5830f1bc8779 | [
"MIT"
] | null | null | null | import queue
import threading
import pytest
from cloner.repository import Repository
@pytest.fixture
def random_repository(faker) -> Repository:
name = faker.first_name()
return Repository(
name=name,
clone_url=f"https://github.com/organization/{name}.git",
repo_id=faker.random_numbe... | 18.814815 | 64 | 0.714567 |
4a0e18ee5724a84fd408fe4ad8b3e51813a88761 | 700 | py | Python | examples/scripts/01_site.py | buildfail/frontera | 84f9e1034d2868447db88e865596c0fbb32e70f6 | [
"BSD-3-Clause"
] | 1,267 | 2015-04-15T04:47:12.000Z | 2022-03-29T07:55:15.000Z | examples/scripts/01_site.py | buildfail/frontera | 84f9e1034d2868447db88e865596c0fbb32e70f6 | [
"BSD-3-Clause"
] | 316 | 2015-04-14T21:28:26.000Z | 2021-05-31T05:31:15.000Z | examples/scripts/01_site.py | buildfail/frontera | 84f9e1034d2868447db88e865596c0fbb32e70f6 | [
"BSD-3-Clause"
] | 250 | 2015-04-20T07:15:10.000Z | 2022-03-28T15:17:15.000Z | """
Graph manager example with single site
"""
from frontera import graphs
SITE = [
("A", ["B", "C"]),
("B", ["D", "E"]),
("C", ["F", "G"]),
]
SITE_WITH_STATUS_CODES = [
((200, "A"), ["B", "C"]),
((404, "B"), ["D", "E"]),
((500, "C"), ["F", "G"]),
]
def test_site(site):
# Create graph
... | 18.421053 | 57 | 0.545714 |
4a0e194d35f4699266b824a64b66cfecd47a380b | 107 | py | Python | example/settings_file/app.py | rroden12/dynaconf | 9495fdd2145dfc93a9af700c104f7841e52221b2 | [
"MIT"
] | 2,293 | 2015-08-14T22:39:31.000Z | 2022-03-31T12:44:49.000Z | example/settings_file/app.py | rroden12/dynaconf | 9495fdd2145dfc93a9af700c104f7841e52221b2 | [
"MIT"
] | 676 | 2015-08-20T19:29:56.000Z | 2022-03-31T13:45:51.000Z | example/settings_file/app.py | rroden12/dynaconf | 9495fdd2145dfc93a9af700c104f7841e52221b2 | [
"MIT"
] | 255 | 2015-12-02T21:16:33.000Z | 2022-03-20T22:03:46.000Z | from dynaconf import settings
assert settings.MESSAGE == "Hello from tmp"
print(settings.MESSAGE) # noqa
| 21.4 | 43 | 0.775701 |
4a0e19cf3c23aa24f6a622613a501a62fb5b822c | 25,730 | py | Python | mvpa2/misc/support.py | thomastweets/PyMVPA | a9c05acd7569639bb636aed3c22a13b21559ca02 | [
"MIT"
] | 1 | 2016-08-23T05:04:09.000Z | 2016-08-23T05:04:09.000Z | mvpa2/misc/support.py | thomastweets/PyMVPA | a9c05acd7569639bb636aed3c22a13b21559ca02 | [
"MIT"
] | null | null | null | mvpa2/misc/support.py | thomastweets/PyMVPA | a9c05acd7569639bb636aed3c22a13b21559ca02 | [
"MIT"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the PyMVPA package for the
# copyright and license terms.
#
### ### ### ### ###... | 32.122347 | 98 | 0.587175 |
4a0e1a3377976a9363bfd72112c1f365814bb8e8 | 17,453 | py | Python | coverage/html.py | nascimento/coveragepy | 9adb80c9612d3d364362bd3b6551532fe9ec7d5f | [
"Apache-2.0"
] | null | null | null | coverage/html.py | nascimento/coveragepy | 9adb80c9612d3d364362bd3b6551532fe9ec7d5f | [
"Apache-2.0"
] | null | null | null | coverage/html.py | nascimento/coveragepy | 9adb80c9612d3d364362bd3b6551532fe9ec7d5f | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
"""HTML reporting for coverage.py."""
import collections
import datetime
import json
import os
import re
import shutil
import coverage
from coverage import env
fr... | 34.288802 | 97 | 0.566607 |
4a0e1a9be0e7e9fae83c2a8307a002029de78257 | 1,045 | py | Python | evaluate/evaluate_detrac_coco_api/centernet_config_detrac_test.py | yuanliangxie/YOLOv3_simple_baseline | 325e2963ae770e6f45912f3142941d3bddaf9d6e | [
"Apache-2.0"
] | 1 | 2022-02-26T10:13:08.000Z | 2022-02-26T10:13:08.000Z | evaluate/evaluate_detrac_coco_api/centernet_config_detrac_test.py | yuanliangxie/YOLOv3_simple_baseline | 325e2963ae770e6f45912f3142941d3bddaf9d6e | [
"Apache-2.0"
] | null | null | null | evaluate/evaluate_detrac_coco_api/centernet_config_detrac_test.py | yuanliangxie/YOLOv3_simple_baseline | 325e2963ae770e6f45912f3142941d3bddaf9d6e | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# project
# test
TEST = {
"device_id": 0,
"PROJECT_PATH": "/home/xyl/PycharmProjects/YOLOV3_SUPER",
"test_path": "../../data/detrac/test.txt",
"test_ignore_region": "../../data/detrac/test_ignore_region.txt",
"test_labels_path": "../../data/detrac/labels_test",
'DATA':{#"CLASSES":['car', 'bus', 'va... | 34.833333 | 149 | 0.747368 |
4a0e1af90c8104d462c8619d482e865c24cc3686 | 3,656 | py | Python | taskA.py | gvmossato/numerico-ep1 | 10b360e7ea4724ea90093f033718d0029afa28b6 | [
"MIT"
] | null | null | null | taskA.py | gvmossato/numerico-ep1 | 10b360e7ea4724ea90093f033718d0029afa28b6 | [
"MIT"
] | null | null | null | taskA.py | gvmossato/numerico-ep1 | 10b360e7ea4724ea90093f033718d0029afa28b6 | [
"MIT"
] | null | null | null | # ============================== #
# Módulo de execução da tarefa A #
# ============================== #
import numpy as np
import matplotlib.pyplot as plt
from EPLib import QR, gen_tridiagonal, gen_eign, print_table, ctext
# ================ #
# Executa a tarefa #
# ================ #
def run(epsilon, n_vals):
... | 32.353982 | 133 | 0.511761 |
4a0e1b38308e77155ddfeca1a59f2f2ab468d2ee | 12,505 | py | Python | src/metapath2vec.py | erdiolmezogullari/Metapath2vec-1 | d71e89d9beb3b888f0bc411e9d94eba7453b3619 | [
"MIT"
] | 1 | 2020-11-15T07:54:22.000Z | 2020-11-15T07:54:22.000Z | src/metapath2vec.py | erdiolmezogullari/loginaway_metapath2vec | d71e89d9beb3b888f0bc411e9d94eba7453b3619 | [
"MIT"
] | null | null | null | src/metapath2vec.py | erdiolmezogullari/loginaway_metapath2vec | d71e89d9beb3b888f0bc411e9d94eba7453b3619 | [
"MIT"
] | null | null | null | # coding: utf-8
import tensorflow as tf
import numpy as np
import argparse
from helper import getData, writeData, set_gpu
from random import choices
from time import time
class metapath2vec():
def load_data(self):
'''
Load data from files.
'''
self.node2id, self.type2set, self... | 41.407285 | 136 | 0.582327 |
4a0e1c554eb67a6e14a623dab443d8cb8f1fc37a | 654 | py | Python | setup.py | being24/TA7291P_driver | 4954f8cc3fca1e685a749b074699f1ed32cdd1e2 | [
"MIT"
] | null | null | null | setup.py | being24/TA7291P_driver | 4954f8cc3fca1e685a749b074699f1ed32cdd1e2 | [
"MIT"
] | null | null | null | setup.py | being24/TA7291P_driver | 4954f8cc3fca1e685a749b074699f1ed32cdd1e2 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="TA7291P_driver",
version="0.0.2",
author="being24",
author_email="being24@gmail.com",
description="TA7291P driver with pigpio and pca9685 on Raspberry pi",
install_requires=[
"... | 28.434783 | 73 | 0.669725 |
4a0e1cb8ed12b326a9e2150723da4a05f021fcc9 | 1,312 | py | Python | statistics.test.py | clean-code-craft-tcq-2/sense-py-kumarSudhirTCQ | 39731555be800cd9fb0518fa0f385b3b83ecb1eb | [
"MIT"
] | null | null | null | statistics.test.py | clean-code-craft-tcq-2/sense-py-kumarSudhirTCQ | 39731555be800cd9fb0518fa0f385b3b83ecb1eb | [
"MIT"
] | null | null | null | statistics.test.py | clean-code-craft-tcq-2/sense-py-kumarSudhirTCQ | 39731555be800cd9fb0518fa0f385b3b83ecb1eb | [
"MIT"
] | null | null | null | import unittest
import statistics
import math
from alerter import*
class StatsTest(unittest.TestCase):
def test_report_min_max_avg(self):
computedStats = statistics.calculateStats([1.5, 8.9, 3.2, 4.5])
epsilon = 0.001
self.assertAlmostEqual(computedStats["avg"], 4.525, delta=epsilon)
self.assertAlmos... | 37.485714 | 70 | 0.724085 |
4a0e1e17c3faa5ce3e058463e9163643afe0ba79 | 1,152 | py | Python | experiments/cifar10/parser.py | dwromero/att_gconvs | 872259cad49763fdcfa3e96e80b6b5c331adf084 | [
"MIT"
] | 53 | 2020-07-07T11:06:30.000Z | 2022-03-26T02:42:49.000Z | experiments/cifar10/parser.py | dwromero/att_gconvs | 872259cad49763fdcfa3e96e80b6b5c331adf084 | [
"MIT"
] | null | null | null | experiments/cifar10/parser.py | dwromero/att_gconvs | 872259cad49763fdcfa3e96e80b6b5c331adf084 | [
"MIT"
] | 2 | 2020-09-19T12:10:33.000Z | 2020-10-29T19:37:08.000Z | import argparse
def _get_parser():
# Running settings
parser = argparse.ArgumentParser(description='cifar10 experiments.')
# Parse
parser.add_argument('--model', type=str, default='p4_allcnnc', metavar='M', help='type of model to use.')
parser.add_argument('--lr', default=1e-3, type=float, metavar... | 48 | 143 | 0.697049 |
4a0e1e7851e1ced90bedde28bf56e55ace00c59a | 3,762 | py | Python | clustering.py | grypesc/graduateAdmissionsAnalysis | e236b218fa6b512a6022b519a9b2bd312c61f2a5 | [
"MIT"
] | 1 | 2019-06-11T14:53:47.000Z | 2019-06-11T14:53:47.000Z | clustering.py | grypesc/graduateAdmissions | e236b218fa6b512a6022b519a9b2bd312c61f2a5 | [
"MIT"
] | null | null | null | clustering.py | grypesc/graduateAdmissions | e236b218fa6b512a6022b519a9b2bd312c61f2a5 | [
"MIT"
] | null | null | null | from __future__ import division
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.decomposition import PCA
from sklearn.preprocessing import StandardScaler
from sklearn.cluster import KMeans, AgglomerativeClustering
from sklearn.mixture import GaussianMixture
wh ... | 35.828571 | 134 | 0.744285 |
4a0e1eac0196a69d04d49816d0c8d9f6f50adfd5 | 5,152 | py | Python | src/meshrefine/refine_and_export.py | mahyar-osn/meshrefine | 3bfdf35384c26487a794a6e0f2af8a715b5aa430 | [
"Apache-2.0"
] | null | null | null | src/meshrefine/refine_and_export.py | mahyar-osn/meshrefine | 3bfdf35384c26487a794a6e0f2af8a715b5aa430 | [
"Apache-2.0"
] | null | null | null | src/meshrefine/refine_and_export.py | mahyar-osn/meshrefine | 3bfdf35384c26487a794a6e0f2af8a715b5aa430 | [
"Apache-2.0"
] | null | null | null | """
A script to refine a given Zinc mesh and export it to Zinc and VTK file formats.
Requires: OpenCMISS-ZINC, OpenCMISS.utils, ScaffoldMaker.
"""
import os
import argparse
from opencmiss.zinc.context import Context as ZincContext
from opencmiss.utils.zinc.field import get_group_list
from scaffoldmaker.utils.meshref... | 40.25 | 124 | 0.637422 |
4a0e1ebf1f30f5dc0eba4762262e827a787552d2 | 48,932 | py | Python | airbyte-integrations/connectors/source-hubspot/source_hubspot/streams.py | alvaroqueiroz/airbyte | a9641ea32c4c9c78dd557f6f196c0b7ac07122c1 | [
"MIT"
] | null | null | null | airbyte-integrations/connectors/source-hubspot/source_hubspot/streams.py | alvaroqueiroz/airbyte | a9641ea32c4c9c78dd557f6f196c0b7ac07122c1 | [
"MIT"
] | null | null | null | airbyte-integrations/connectors/source-hubspot/source_hubspot/streams.py | alvaroqueiroz/airbyte | a9641ea32c4c9c78dd557f6f196c0b7ac07122c1 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
import sys
import time
import urllib.parse
from abc import ABC, abstractmethod
from functools import lru_cache, partial
from http import HTTPStatus
from typing import Any, Dict, Iterable, Iterator, List, Mapping, MutableMapping, Optional, Tuple, Union
impo... | 37.64 | 164 | 0.640481 |
4a0e1f052b0dee7b94a0529a193360fc43eeaf70 | 917 | py | Python | src/pywriter/file/sc_cr_filter.py | peter88213/PyWriter | 9d0cb2304f29f40fb305c35c547bf6f4f5adbea7 | [
"MIT"
] | 1 | 2020-09-04T08:20:38.000Z | 2020-09-04T08:20:38.000Z | src/pywriter/file/sc_cr_filter.py | peter88213/PyWriter | 9d0cb2304f29f40fb305c35c547bf6f4f5adbea7 | [
"MIT"
] | 19 | 2020-01-04T10:43:27.000Z | 2022-03-30T19:03:44.000Z | src/pywriter/file/sc_cr_filter.py | peter88213/PyWriter | 9d0cb2304f29f40fb305c35c547bf6f4f5adbea7 | [
"MIT"
] | null | null | null | """Provide a scene per character filter class for template-based file export.
Copyright (c) 2021 Peter Triesberger
For further information see https://github.com/peter88213/PyWriter
Published under the MIT License (https://opensource.org/licenses/mit-license.php)
"""
class ScCrFilter():
"""Filter Scene ... | 26.2 | 82 | 0.592148 |
4a0e206a5d2387580acba8d2324b8818681cd113 | 312 | py | Python | api_interview/ext/database.py | lfdivino/888-spectate-interview-project | 394d68fc3e97cdbc1c7786f4f9296b3a08e9c721 | [
"MIT"
] | 1 | 2020-11-24T15:43:06.000Z | 2020-11-24T15:43:06.000Z | api_interview/ext/database.py | lfdivino/888-spectate-interview-project | 394d68fc3e97cdbc1c7786f4f9296b3a08e9c721 | [
"MIT"
] | 12 | 2019-12-02T14:13:30.000Z | 2020-01-22T13:53:14.000Z | api_interview/ext/database.py | lfdivino/rest-api-interview-project | 394d68fc3e97cdbc1c7786f4f9296b3a08e9c721 | [
"MIT"
] | null | null | null | import os
from flask import Flask
from flask_pymongo import PyMongo
mongo = PyMongo()
def init_app(app: Flask):
mongo.init_app(app, uri=f"mongodb://{os.environ['MONGO_INITDB_ROOT_USERNAME']}:{os.environ['MONGO_INITDB_ROOT_PASSWORD']}@localhost:27017/{os.environ['MONGO_INITDB_DATABASE']}?authSource=admin")
| 28.363636 | 195 | 0.785256 |
4a0e20769e0655531c9ce1ec93f8612201fa496d | 2,267 | py | Python | release/stubs.min/Rhino/Geometry/__init___parts/SpaceMorph.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 182 | 2017-06-27T02:26:15.000Z | 2022-03-30T18:53:43.000Z | release/stubs.min/Rhino/Geometry/__init___parts/SpaceMorph.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 28 | 2017-06-27T13:38:23.000Z | 2022-03-15T11:19:44.000Z | release/stubs.min/Rhino/Geometry/__init___parts/SpaceMorph.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 67 | 2017-06-28T09:43:59.000Z | 2022-03-20T21:17:10.000Z | class SpaceMorph(object):
""" Represents a spacial,Euclidean morph. """
@staticmethod
def IsMorphable(geometry):
"""
IsMorphable(geometry: GeometryBase) -> bool
true if the geometry can be morphed by calling SpaceMorph.Morph(geometry)
"""
pass
def Morph(self,geometry):
"""
Morph(se... | 22.009709 | 92 | 0.691222 |
4a0e238addccb29368fc28c7b5f34130bd2cc862 | 1,678 | py | Python | do_Fib.py | CraneJen/Python-Study-Srouce-code | ff4bbb5025a4bf8d4ebef587f31929ad2ea84f29 | [
"Apache-2.0"
] | null | null | null | do_Fib.py | CraneJen/Python-Study-Srouce-code | ff4bbb5025a4bf8d4ebef587f31929ad2ea84f29 | [
"Apache-2.0"
] | null | null | null | do_Fib.py | CraneJen/Python-Study-Srouce-code | ff4bbb5025a4bf8d4ebef587f31929ad2ea84f29 | [
"Apache-2.0"
] | null | null | null | class Fib(object):
def __init__(self, max):
self.a, self.b = 0, 1
self.max = max
def __iter__(self):
return self
def __next__(self):
self.a, self.b = self.b, self.a + self.b
if self.a > self.max:
raise StopIteration()
return self.a
class Fib1(... | 18.644444 | 48 | 0.407628 |
4a0e24eb44ba5877791a7d8bdf7e8640e6579496 | 2,203 | py | Python | steps/run_psi4_calculations.py | jamesclark-Zapata/qe-psi4 | 2bd6aaff8e6d6bf3d6f7a33d420f49a67b10ba2c | [
"Apache-2.0"
] | 7 | 2020-04-16T23:27:15.000Z | 2021-11-17T11:37:52.000Z | steps/run_psi4_calculations.py | jamesclark-Zapata/qe-psi4 | 2bd6aaff8e6d6bf3d6f7a33d420f49a67b10ba2c | [
"Apache-2.0"
] | 13 | 2020-05-12T13:09:15.000Z | 2021-09-28T22:18:03.000Z | steps/run_psi4_calculations.py | jamesclark-Zapata/qe-psi4 | 2bd6aaff8e6d6bf3d6f7a33d420f49a67b10ba2c | [
"Apache-2.0"
] | 2 | 2021-01-15T23:28:37.000Z | 2021-07-28T14:32:17.000Z | import os, json
from qepsi4 import run_psi4 as _run_psi4
from zquantum.core.openfermion import save_interaction_operator, save_interaction_rdm
from zquantum.core.utils import SCHEMA_VERSION
def run_psi4(
basis,
method,
reference,
geometry,
freeze_core=False,
charge=0,
multiplicity=1,
s... | 26.865854 | 85 | 0.638675 |
4a0e25157fa6b768a5faeec0cc988be43f033d99 | 882 | py | Python | test/test_registered_faces_response.py | vtpl1/vtpl_api | d289c92254deb040de925205c583de69802a1c6b | [
"MIT"
] | null | null | null | test/test_registered_faces_response.py | vtpl1/vtpl_api | d289c92254deb040de925205c583de69802a1c6b | [
"MIT"
] | null | null | null | test/test_registered_faces_response.py | vtpl1/vtpl_api | d289c92254deb040de925205c583de69802a1c6b | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Engine api
Engine APIs # noqa: E501
The version of the OpenAPI document: 1.0.4
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import vtpl_api
from vtpl_api.models.registered_faces_response import RegisteredFacesResponse... | 22.05 | 99 | 0.716553 |
4a0e257d34cff78fb524977c887a613a2d78e44d | 4,666 | py | Python | tests/test_bad_batch_request.py | oreillymedia/django-batch-requests | ca3f126fdf1a9e7abb0d7de205fac2b6633de933 | [
"MIT"
] | 1 | 2019-03-03T08:46:13.000Z | 2019-03-03T08:46:13.000Z | tests/test_bad_batch_request.py | oreillymedia/django-batch-requests | ca3f126fdf1a9e7abb0d7de205fac2b6633de933 | [
"MIT"
] | null | null | null | tests/test_bad_batch_request.py | oreillymedia/django-batch-requests | ca3f126fdf1a9e7abb0d7de205fac2b6633de933 | [
"MIT"
] | 2 | 2019-02-26T03:21:35.000Z | 2021-08-03T06:17:35.000Z | '''
@author: Rahul Tanwani
@summary: Test cases to check the behavior when the batch request is
not constructed properly.
'''
import json
import mock
import pytest
from django.test import TestCase
from tests import ensure_text_content
class TestBadBatchRequest(TestCase):
'''
Check the behav... | 33.811594 | 130 | 0.539863 |
4a0e25b5e90cee73f77a3bf4bf782308d16cc0c6 | 399 | py | Python | oggm/core/gcm_climate.py | skachuck/oggm | b391e6923fb0c5269e10ea260f5199a26d5e1082 | [
"BSD-3-Clause"
] | 156 | 2015-10-11T16:38:43.000Z | 2022-03-24T04:19:16.000Z | oggm/core/gcm_climate.py | skachuck/oggm | b391e6923fb0c5269e10ea260f5199a26d5e1082 | [
"BSD-3-Clause"
] | 953 | 2015-10-11T16:26:14.000Z | 2022-03-27T23:19:19.000Z | oggm/core/gcm_climate.py | skachuck/oggm | b391e6923fb0c5269e10ea260f5199a26d5e1082 | [
"BSD-3-Clause"
] | 92 | 2015-10-19T08:53:23.000Z | 2022-03-28T08:00:17.000Z | """Climate data pre-processing"""
import warnings
warnings.warn('The module `oggm.core.gcm_climate` has moved to '
'oggm.shop.gcm_climate. This compatibility module will be '
'removed in future OGGM versions', FutureWarning)
from oggm.shop.gcm_climate import (process_gcm_data, process_cmip5_... | 49.875 | 73 | 0.684211 |
4a0e261810ca9faa6cb74e84a1f7e521e0631bb0 | 14,019 | py | Python | libraries/categories/models.py | chris-lawton/libraries_wagtail | 60c2484b137bb33763da2e49b191b1a380f3d56f | [
"ECL-2.0"
] | null | null | null | libraries/categories/models.py | chris-lawton/libraries_wagtail | 60c2484b137bb33763da2e49b191b1a380f3d56f | [
"ECL-2.0"
] | null | null | null | libraries/categories/models.py | chris-lawton/libraries_wagtail | 60c2484b137bb33763da2e49b191b1a380f3d56f | [
"ECL-2.0"
] | null | null | null | from django.conf import settings
from django.db import models
from django import forms
from django.shortcuts import redirect, render
from modelcluster.fields import ParentalKey
from wagtail.core.models import Page, Orderable
from wagtail.core.fields import RichTextField, StreamField
from wagtail.admin.edit_handlers i... | 31.933941 | 190 | 0.663742 |
4a0e26b7fa2e426b494eb4c30afc58e83db7dc7b | 1,140 | py | Python | twistedlilypad/packets/request_packet.py | flaminscotsman/TwistedLilypad | 3d43250af2663b33e3fef209a196920beaf696b7 | [
"MIT"
] | 1 | 2015-01-17T20:01:33.000Z | 2015-01-17T20:01:33.000Z | twistedlilypad/packets/request_packet.py | flaminscotsman/TwistedLilypad | 3d43250af2663b33e3fef209a196920beaf696b7 | [
"MIT"
] | null | null | null | twistedlilypad/packets/request_packet.py | flaminscotsman/TwistedLilypad | 3d43250af2663b33e3fef209a196920beaf696b7 | [
"MIT"
] | null | null | null | from struct import unpack_from, calcsize, pack
from .abstract_packet import AbstractPacket, AbstractPacketCodec
class PacketRequest(AbstractPacket):
opcode = 0x01
def __init__(self, sequence_id, request_id, payload):
self.sequenceID = sequence_id
self.requestID = request_id
self.payl... | 30 | 101 | 0.686842 |
4a0e2793aa826c9f3bf2ae0b03422b05b5a71af9 | 540 | py | Python | manage.py | didid08/flashcms-django | 471523168964c0124fb0091cccbda4f4b234be87 | [
"MIT"
] | null | null | null | manage.py | didid08/flashcms-django | 471523168964c0124fb0091cccbda4f4b234be87 | [
"MIT"
] | null | null | null | manage.py | didid08/flashcms-django | 471523168964c0124fb0091cccbda4f4b234be87 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'flashcms.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are... | 33.75 | 73 | 0.687037 |
4a0e28ade08bd5335f323778ed98d14b2ab68b28 | 2,551 | py | Python | tasksapi/tests/requests_tests/user_queue_permissions_requests_tests.py | mwiens91/saltant | 9e72175a896f5859ada304ad3ae4d84dfc3834db | [
"MIT"
] | 3 | 2018-12-08T01:18:29.000Z | 2018-12-14T23:18:42.000Z | tasksapi/tests/requests_tests/user_queue_permissions_requests_tests.py | saltant-org/saltant | db498a1186fc74221f8214ad1819dd03bf4b08ac | [
"MIT"
] | 3 | 2019-05-23T07:43:13.000Z | 2021-06-10T20:46:53.000Z | tasksapi/tests/requests_tests/user_queue_permissions_requests_tests.py | saltant-org/saltant | db498a1186fc74221f8214ad1819dd03bf4b08ac | [
"MIT"
] | 2 | 2019-03-13T22:31:09.000Z | 2019-05-03T00:18:30.000Z | """Contains requests tests for user queue permissions."""
from rest_framework import status
from rest_framework.test import APITestCase
# Put info about our fixtures data as constants here
NON_ADMIN_USER_AUTH_TOKEN = "02d205bc79d5e8f15f83e249ac227ef0085f953f"
NOT_USERS_PRIVATE_QUEUE_PK = 3
PUBLIC_INACTIVE_QUEUE_PK = ... | 31.8875 | 70 | 0.609957 |
4a0e29aa5f3bcf54b6d3c34e13dd38882b5ec3a7 | 3,103 | py | Python | achallonge/tournaments.py | retke/apychal | 04ed960610680959c3edab283ea7046bfb15ff53 | [
"BSD-2-Clause"
] | null | null | null | achallonge/tournaments.py | retke/apychal | 04ed960610680959c3edab283ea7046bfb15ff53 | [
"BSD-2-Clause"
] | null | null | null | achallonge/tournaments.py | retke/apychal | 04ed960610680959c3edab283ea7046bfb15ff53 | [
"BSD-2-Clause"
] | null | null | null | from achallonge import api
import asyncio
async def index(**params):
"""Retrieve a set of tournaments created with your account."""
return await api.fetch_and_parse("GET", "tournaments", **params)
async def create(name, url, tournament_type="single elimination", **params):
"""Create a new tournament."""... | 29.552381 | 87 | 0.680309 |
4a0e29c10ef1143a53fe49a820f48f639722633e | 1,876 | py | Python | tests/contract_tests/KT1Sc2dHqCRLQV9gWLmUndQyowVrv12AtcJi/test_sc2dhq_sendFunds.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 98 | 2019-02-07T16:33:38.000Z | 2022-03-31T15:53:41.000Z | tests/contract_tests/KT1Sc2dHqCRLQV9gWLmUndQyowVrv12AtcJi/test_sc2dhq_sendFunds.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 152 | 2019-05-20T16:38:56.000Z | 2022-03-30T14:24:38.000Z | tests/contract_tests/KT1Sc2dHqCRLQV9gWLmUndQyowVrv12AtcJi/test_sc2dhq_sendFunds.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 34 | 2019-07-25T12:03:51.000Z | 2021-11-11T22:23:38.000Z | from unittest import TestCase
from os.path import dirname, join
import json
from pytezos.michelson.program import MichelsonProgram
from pytezos.michelson.types.big_map import big_map_diff_to_lazy_diff
from pytezos.michelson.forge import forge_micheline, unforge_micheline
folder = 'dexter_usdtz_xtz'
entrypoint = 'remo... | 39.083333 | 112 | 0.722281 |
4a0e29e5680b3f1ba7e708db12e2ecb892aada81 | 2,189 | py | Python | code/models/SegHR_UperNet_OCR_DA.py | xueruoyao/FCN-pytorch | a5019da3943f47fa4f7baed3640cdbfeae2d677e | [
"MIT"
] | 1 | 2021-11-16T12:24:43.000Z | 2021-11-16T12:24:43.000Z | code/models/SegHR_UperNet_OCR_DA.py | xueruoyao/FCN-pytorch | a5019da3943f47fa4f7baed3640cdbfeae2d677e | [
"MIT"
] | null | null | null | code/models/SegHR_UperNet_OCR_DA.py | xueruoyao/FCN-pytorch | a5019da3943f47fa4f7baed3640cdbfeae2d677e | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Written by Ke Sun (sunk@mail.ustc.edu.cn), Jingyi Xie (hsfzxjy@gmail.com)
# ------------------------------------------------------------------------------
from __future__ impor... | 37.741379 | 104 | 0.622202 |
4a0e29ea135496b331260401275cb31a3106b4ce | 8,949 | py | Python | themes/default/base16-black-metal-bathory.config.py | pltanton/base16-qutebrowser | dff61f51e10906491034e15f6b78440ce06dbc1a | [
"MIT"
] | null | null | null | themes/default/base16-black-metal-bathory.config.py | pltanton/base16-qutebrowser | dff61f51e10906491034e15f6b78440ce06dbc1a | [
"MIT"
] | null | null | null | themes/default/base16-black-metal-bathory.config.py | pltanton/base16-qutebrowser | dff61f51e10906491034e15f6b78440ce06dbc1a | [
"MIT"
] | null | null | null | # base16-qutebrowser (https://github.com/theova/base16-qutebrowser)
# Base16 qutebrowser template by theova
# Black Metal (Bathory) scheme by metalelf0 (https://github.com/metalelf0)
base00 = "#000000"
base01 = "#121212"
base02 = "#222222"
base03 = "#333333"
base04 = "#999999"
base05 = "#c1c1c1"
base06 = "#999999"
bas... | 30.030201 | 95 | 0.771259 |
4a0e2a100d48173034d66cf381396e75cfb3c81e | 730 | py | Python | profiles_api/permissions.py | carlosmertens/profile-rest-api | ff217242e178c5f47ea162f4f0808326c37d1b5d | [
"MIT"
] | null | null | null | profiles_api/permissions.py | carlosmertens/profile-rest-api | ff217242e178c5f47ea162f4f0808326c37d1b5d | [
"MIT"
] | null | null | null | profiles_api/permissions.py | carlosmertens/profile-rest-api | ff217242e178c5f47ea162f4f0808326c37d1b5d | [
"MIT"
] | null | null | null | from rest_framework import permissions
class UpdateOwnProfile(permissions.BasePermission):
"""Allow users to edit their own profile"""
def has_object_permission(self, request, view, obj):
"""Check user is trying to edit own profile"""
if request.method in permissions.SAFE_METHODS:
... | 29.2 | 56 | 0.684932 |
4a0e2b1659cfb1733187c1ad465725883d0996b8 | 6,536 | py | Python | interactiveCycloidal/fusionUtils/__init__.py | kizmit99/cycloidal_generator | 93e1381c21c6ca9fe50165022072fc41706b07d1 | [
"Unlicense"
] | 89 | 2018-10-28T10:29:06.000Z | 2022-03-18T13:18:58.000Z | fusionUtils/__init__.py | colinmsnow/fusion_API_template | 009f2f5258fc0ffe452796002c31a1b146442c96 | [
"Unlicense"
] | 5 | 2019-07-25T06:53:05.000Z | 2021-11-19T01:57:34.000Z | fusionUtils/__init__.py | colinmsnow/fusion_API_template | 009f2f5258fc0ffe452796002c31a1b146442c96 | [
"Unlicense"
] | 24 | 2018-10-28T06:17:07.000Z | 2022-03-31T00:51:57.000Z | """ Utilities to handle the process of accepting inputs from Fusion.
The process is rather complicated and confusing so much of it has
been relocated here to prevent confusion """
import adsk.core
import adsk.fusion
import traceback
import math
class CommandExecuteHandler(adsk.core.CommandEventHandler):
... | 37.563218 | 118 | 0.650245 |
4a0e2be3e28a843dd72955de73e9f94f1ab23ff3 | 3,096 | py | Python | losses/loss.py | Tuxianeer/generalizationconfusion | e00e24d6fdf370f085c1c83b749d2560a0a0d89f | [
"MIT"
] | 4 | 2020-07-01T03:31:55.000Z | 2020-10-16T14:47:08.000Z | losses/loss.py | Tuxianeer/generalizationconfusion | e00e24d6fdf370f085c1c83b749d2560a0a0d89f | [
"MIT"
] | null | null | null | losses/loss.py | Tuxianeer/generalizationconfusion | e00e24d6fdf370f085c1c83b749d2560a0a0d89f | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from torch.nn import functional as F
class CrossEntropy():
def __init__(self):
self.crit = nn.CrossEntropyLoss()
def __call__(self, logits, targets, index, epoch, update_labels = True):
loss = self.crit(logits, targets)
return loss
... | 38.7 | 116 | 0.607881 |
4a0e2c7e7f70ae807faaaa3e3a29cfcdcb20cf93 | 3,343 | py | Python | napari/layers/shapes/_shapes_models/path.py | SaraLatif99/napari | b17235ee77d30e58492368a73d7c8d8189397fa4 | [
"BSD-3-Clause"
] | null | null | null | napari/layers/shapes/_shapes_models/path.py | SaraLatif99/napari | b17235ee77d30e58492368a73d7c8d8189397fa4 | [
"BSD-3-Clause"
] | null | null | null | napari/layers/shapes/_shapes_models/path.py | SaraLatif99/napari | b17235ee77d30e58492368a73d7c8d8189397fa4 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from xml.etree.ElementTree import Element
from .shape import Shape
from .._shapes_utils import create_box
class Path(Shape):
"""Class for a single path, which is a sequence of line segments.
Parameters
----------
data : np.ndarray
NxD array of vertices specifying the path.
... | 29.324561 | 79 | 0.572839 |
4a0e2d3a05e9112ea060f131251d3cd37c408737 | 9,810 | py | Python | app/recipe/tests/test_recipe_api.py | ido777/newish | 298a3d5babf411ba1eb777101eb6e8f70b9e495f | [
"MIT"
] | null | null | null | app/recipe/tests/test_recipe_api.py | ido777/newish | 298a3d5babf411ba1eb777101eb6e8f70b9e495f | [
"MIT"
] | null | null | null | app/recipe/tests/test_recipe_api.py | ido777/newish | 298a3d5babf411ba1eb777101eb6e8f70b9e495f | [
"MIT"
] | null | null | null | import tempfile
import os
from PIL import Image
from django.contrib.auth import get_user_model
from django.test import TestCase
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Recipe, Tag, Ingredient
from recipe.serializers import R... | 34.664311 | 78 | 0.646993 |
4a0e2d446e817694fb654a34f09a779fe9820647 | 245 | py | Python | benchmarks/DNNF-CIFAR-EQ/properties/global_targeted_diff_8_5.py | dlshriver/dnnv-benchmarks | 84b5bf1e046226d269da1cdbd7a7690fd90d024b | [
"MIT"
] | 1 | 2022-03-01T08:59:32.000Z | 2022-03-01T08:59:32.000Z | benchmarks/DNNF-CIFAR-EQ/properties/global_targeted_diff_8_5.py | dlshriver/dnnv-benchmarks | 84b5bf1e046226d269da1cdbd7a7690fd90d024b | [
"MIT"
] | null | null | null | benchmarks/DNNF-CIFAR-EQ/properties/global_targeted_diff_8_5.py | dlshriver/dnnv-benchmarks | 84b5bf1e046226d269da1cdbd7a7690fd90d024b | [
"MIT"
] | null | null | null | from dnnv.properties import *
import numpy as np
N1 = Network("N1")
N2 = Network("N2")
class_1 = 8
class_2 = 5
Forall(
x,
Implies(
(0 <= x <= 1),
(np.argmax(N1(x)) != class_1) | (np.argmax(N2(x)) != class_2),
),
)
| 14.411765 | 70 | 0.530612 |
4a0e2d74c9deebec4baee42f3c386844da67f6c1 | 3,414 | py | Python | src/utils/__init__.py | Beirdo/save_game_archiver | c2cf5c6f076d6de63fff696577c3d2d2bdee3c06 | [
"MIT"
] | null | null | null | src/utils/__init__.py | Beirdo/save_game_archiver | c2cf5c6f076d6de63fff696577c3d2d2bdee3c06 | [
"MIT"
] | null | null | null | src/utils/__init__.py | Beirdo/save_game_archiver | c2cf5c6f076d6de63fff696577c3d2d2bdee3c06 | [
"MIT"
] | null | null | null | import concurrent
import hashlib
import json
import logging
import os
import re
import sys
import time
from concurrent.futures import ALL_COMPLETED
from concurrent.futures.thread import ThreadPoolExecutor
logger = logging.getLogger(__name__)
def numToReadable(value):
prefixes = ["", "k", "M", "G", "T", "P"]
... | 31.036364 | 99 | 0.636497 |
4a0e2d7ce8ba71ea7f296a9cde809770d0d5563d | 858 | py | Python | ocean_lib/web3_internal/web3_overrides/http_provider.py | joshualyguessennd/ocean.py | 23274698df4aae078d53b12d768c721af16f6e80 | [
"Apache-2.0"
] | null | null | null | ocean_lib/web3_internal/web3_overrides/http_provider.py | joshualyguessennd/ocean.py | 23274698df4aae078d53b12d768c721af16f6e80 | [
"Apache-2.0"
] | 1 | 2021-02-16T18:31:53.000Z | 2021-02-16T18:31:53.000Z | ocean_lib/web3_internal/web3_overrides/http_provider.py | joshualyguessennd/ocean.py | 23274698df4aae078d53b12d768c721af16f6e80 | [
"Apache-2.0"
] | null | null | null | from ocean_lib.web3_internal.web3_overrides.request import make_post_request
from web3 import HTTPProvider
class CustomHTTPProvider(HTTPProvider):
"""
Override requests to control the connection pool to make it blocking.
"""
def make_request(self, method, params):
self.logger.debug(
... | 33 | 81 | 0.642191 |
4a0e2dd35fa9be6739ab061c091917586655e146 | 421 | py | Python | kits19cnn/io/__init__.py | Ramsha04/kits19-2d-reproduce | 66678f1eda3688d6dc64389e9a80ae0b754a3052 | [
"Apache-2.0"
] | 7 | 2019-12-19T01:10:09.000Z | 2021-07-05T07:35:39.000Z | kits19cnn/io/__init__.py | Ramsha04/kits19-2d-reproduce | 66678f1eda3688d6dc64389e9a80ae0b754a3052 | [
"Apache-2.0"
] | 5 | 2019-12-19T23:03:12.000Z | 2020-02-06T04:18:34.000Z | kits19cnn/io/__init__.py | Ramsha04/kits19-2d-reproduce | 66678f1eda3688d6dc64389e9a80ae0b754a3052 | [
"Apache-2.0"
] | 1 | 2021-03-20T06:28:37.000Z | 2021-03-20T06:28:37.000Z | from .dataset import SliceDataset, PseudoSliceDataset
from .test_dataset import VoxelDataset, TestVoxelDataset
from .preprocess import Preprocessor
from .resample import resample_patient
from .custom_transforms import CenterCrop
from .custom_augmentations import resize_data_and_seg, crop_to_bbox, \
... | 46.777778 | 78 | 0.80285 |
4a0e2f2dcb15381a1049066dd6f6362c837d2102 | 750 | py | Python | WideShot.py | tyomies123/asteroid-game | aa2b198fc6da88d3c988edec52cef372f893ae4d | [
"MIT"
] | 1 | 2019-12-17T18:42:20.000Z | 2019-12-17T18:42:20.000Z | WideShot.py | tyomies123/asteroid-game | aa2b198fc6da88d3c988edec52cef372f893ae4d | [
"MIT"
] | null | null | null | WideShot.py | tyomies123/asteroid-game | aa2b198fc6da88d3c988edec52cef372f893ae4d | [
"MIT"
] | null | null | null | import pygame
import time
from random import *
from pygame.locals import *
from PowerUp import PowerUp
from PiercingProjectile import PiercingProjectile
#WideShot powerup pickup (increased projectile width)
class WideShot(PowerUp):
def __init__(self, width, height, speed, screen, info_x):
PowerUp.__init__... | 31.25 | 92 | 0.690667 |
4a0e2f40295f85c3c93e614b14dd1a9644d49af8 | 3,712 | py | Python | tests/operators/test_dbt_deps.py | tomasfarias/airflow-dbt-python | 1cffdcafd8841b96ee622a49d9ae8f6716c55831 | [
"MIT"
] | 37 | 2021-06-15T23:23:28.000Z | 2022-03-22T08:16:49.000Z | tests/operators/test_dbt_deps.py | tomasfarias/airflow-dbt-python | 1cffdcafd8841b96ee622a49d9ae8f6716c55831 | [
"MIT"
] | 29 | 2021-06-01T21:03:39.000Z | 2022-03-12T15:09:33.000Z | tests/operators/test_dbt_deps.py | tomasfarias/airflow-dbt-python | 1cffdcafd8841b96ee622a49d9ae8f6716c55831 | [
"MIT"
] | 5 | 2021-08-04T08:48:31.000Z | 2022-02-07T19:14:56.000Z | """Unit test module for DbtDepsOperator."""
from unittest.mock import patch
import pytest
from airflow_dbt_python.hooks.dbt import DepsTaskConfig
from airflow_dbt_python.operators.dbt import DbtDepsOperator
condition = False
try:
from airflow_dbt_python.hooks.s3 import DbtS3Hook
except ImportError:
condition... | 29.935484 | 83 | 0.66945 |
4a0e2f554ee3f484a199e2b460b806f615f4411e | 5,984 | py | Python | src/ZODB/tests/testcrossdatabasereferences.py | pretagov/ZODB | 1fb097b41cae4ca863c8a3664414c9ec0e204393 | [
"ZPL-2.1"
] | 514 | 2015-01-01T17:20:57.000Z | 2022-03-29T18:27:04.000Z | src/ZODB/tests/testcrossdatabasereferences.py | pretagov/ZODB | 1fb097b41cae4ca863c8a3664414c9ec0e204393 | [
"ZPL-2.1"
] | 299 | 2015-01-11T15:47:11.000Z | 2022-03-18T16:37:32.000Z | src/ZODB/tests/testcrossdatabasereferences.py | pretagov/ZODB | 1fb097b41cae4ca863c8a3664414c9ec0e204393 | [
"ZPL-2.1"
] | 87 | 2015-01-10T22:51:45.000Z | 2021-12-28T09:18:16.000Z | ##############################################################################
#
# Copyright (c) 2005 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 29.477833 | 78 | 0.610461 |
4a0e31219b63aa4cd8848ed86130122fc646ee13 | 8,202 | py | Python | deep_CCA_model.py | zhaoaite/CorrMNN | f88a70a199b462e9f3648da3ffdc5ee80a3e5f02 | [
"MIT"
] | 1 | 2022-02-04T05:28:03.000Z | 2022-02-04T05:28:03.000Z | deep_CCA_model.py | zhaoaite/CorrMNN | f88a70a199b462e9f3648da3ffdc5ee80a3e5f02 | [
"MIT"
] | null | null | null | deep_CCA_model.py | zhaoaite/CorrMNN | f88a70a199b462e9f3648da3ffdc5ee80a3e5f02 | [
"MIT"
] | 1 | 2022-03-07T10:16:24.000Z | 2022-03-07T10:16:24.000Z | import math
from keras.layers import Dense
from keras.layers import merge as Merge
from keras.models import Sequential
from keras.optimizers import RMSprop, SGD
from keras.regularizers import l2
from keras import backend as K
import tensorflow as tf
def my_init_sigmoid(shape, dtype=None):
rnd = K.random_uniform(
... | 44.096774 | 129 | 0.610461 |
4a0e31fa1edd83585dda4b864e1e620a12ed3b5e | 488 | py | Python | hit_me_please/hitters/migrations/0001_initial.py | zkan/hit-me-please | 378bc8c666bc68fd1f84cb31e9208a794e3917c4 | [
"MIT"
] | null | null | null | hit_me_please/hitters/migrations/0001_initial.py | zkan/hit-me-please | 378bc8c666bc68fd1f84cb31e9208a794e3917c4 | [
"MIT"
] | 12 | 2019-12-04T23:05:18.000Z | 2022-02-10T08:05:37.000Z | hit_me_please/hitters/migrations/0001_initial.py | jayakornk/hit-me-please-old | b6358a8b6bddfe8d29ad796eb61884371308ad6f | [
"MIT"
] | null | null | null | # Generated by Django 2.2.1 on 2019-06-01 04:10
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Hitter',
fields=[
('id', models.AutoField(a... | 22.181818 | 114 | 0.57582 |
4a0e32887c386978aaa626a5551674f26db7ef5c | 4,316 | py | Python | contrib/devtools/logprint-scanner.py | IngenuityCoin/Ingenuity | 475289926e435a9939358c695f4f10d1503bfa0c | [
"MIT"
] | 4 | 2018-12-06T23:56:18.000Z | 2021-03-06T10:15:33.000Z | contrib/devtools/logprint-scanner.py | IngenuityCoin/Ingenuity | 475289926e435a9939358c695f4f10d1503bfa0c | [
"MIT"
] | null | null | null | contrib/devtools/logprint-scanner.py | IngenuityCoin/Ingenuity | 475289926e435a9939358c695f4f10d1503bfa0c | [
"MIT"
] | 5 | 2018-12-06T23:56:41.000Z | 2021-05-10T06:35:51.000Z | #!/usr/bin/env python
# Copyright (c) 2017-2018 The Ingenuity developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import os, sys
from subprocess import check_output
def countRelevantCommas(line):
openParensPosStack = [... | 41.902913 | 167 | 0.565107 |
4a0e33bff8f3545c0bb8820161c2592756f5b7df | 2,496 | py | Python | test/unit/util/test_inflection.py | rikeshi/galaxy | c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a | [
"CC-BY-3.0"
] | 1,085 | 2015-02-18T16:14:38.000Z | 2022-03-30T23:52:07.000Z | test/unit/util/test_inflection.py | rikeshi/galaxy | c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a | [
"CC-BY-3.0"
] | 11,253 | 2015-02-18T17:47:32.000Z | 2022-03-31T21:47:03.000Z | test/unit/util/test_inflection.py | rikeshi/galaxy | c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a | [
"CC-BY-3.0"
] | 1,000 | 2015-02-18T16:18:10.000Z | 2022-03-29T08:22:56.000Z | import pytest
from galaxy.util.inflection import Inflector
SINGULAR_TO_PLURAL = {
"search": "searches",
"switch": "switches",
"fix": "fixes",
"box": "boxes",
"process": "processes",
"address": "addresses",
"case": "cases",
"stack": "stacks",
"wish": "wishes",
"category": "cate... | 25.212121 | 65 | 0.589343 |
4a0e353ba0f6dfe791445a4de0d1a82463590d23 | 4,863 | py | Python | configs/hand/hrnetv2/onehand10k/hrnetv2_w18_onehand10k_256x256.py | jcwon0/BlurHPE | c97a57e92a8a7f171b0403aee640222a32513562 | [
"Apache-2.0"
] | null | null | null | configs/hand/hrnetv2/onehand10k/hrnetv2_w18_onehand10k_256x256.py | jcwon0/BlurHPE | c97a57e92a8a7f171b0403aee640222a32513562 | [
"Apache-2.0"
] | null | null | null | configs/hand/hrnetv2/onehand10k/hrnetv2_w18_onehand10k_256x256.py | jcwon0/BlurHPE | c97a57e92a8a7f171b0403aee640222a32513562 | [
"Apache-2.0"
] | null | null | null | log_level = 'INFO'
load_from = None
resume_from = None
dist_params = dict(backend='nccl')
workflow = [('train', 1)]
checkpoint_config = dict(interval=10)
evaluation = dict(
interval=10, metric=['PCK', 'AUC', 'EPE'], key_indicator='AUC')
optimizer = dict(
type='Adam',
lr=5e-4,
)
optimizer_confi... | 29.834356 | 80 | 0.551306 |
4a0e35a8944737979ef66074b0426471fbca6ed7 | 1,723 | py | Python | tests/thread_safety_tests.py | jstasiak/coalringbuf | c0720fe95121dab18ed084c528c836c7193682bf | [
"MIT"
] | 4 | 2017-08-08T17:15:07.000Z | 2021-12-18T01:55:27.000Z | tests/thread_safety_tests.py | jstasiak/coalringbuf | c0720fe95121dab18ed084c528c836c7193682bf | [
"MIT"
] | null | null | null | tests/thread_safety_tests.py | jstasiak/coalringbuf | c0720fe95121dab18ed084c528c836c7193682bf | [
"MIT"
] | 3 | 2019-12-23T04:37:24.000Z | 2020-06-27T12:03:38.000Z | import os
from threading import Thread
from nose.tools import eq_
from six.moves import xrange
from coalringbuf import CoalescingRingBuffer
POISON_PILL = -1
FIRST_BID = 3
SECOND_BID = 4
FIRST_ASK = 5
SECOND_ASK = 6
NUMBER_OF_INSTRUMENTS = 1 * 10 ** 6 if 'COALRINGBUF_FULL_TEST' in os.environ else 5 * 10 ** 4
def... | 25.716418 | 93 | 0.662217 |
4a0e363041e095845fd66a0704cca6392a88b93c | 21,224 | py | Python | image_recognition_tools.py | karlobermeyer/numeric-digit-recognition | 38bd332f1ab2bb8ad6b548a6957522a74e564031 | [
"MIT"
] | null | null | null | image_recognition_tools.py | karlobermeyer/numeric-digit-recognition | 38bd332f1ab2bb8ad6b548a6957522a74e564031 | [
"MIT"
] | null | null | null | image_recognition_tools.py | karlobermeyer/numeric-digit-recognition | 38bd332f1ab2bb8ad6b548a6957522a74e564031 | [
"MIT"
] | 1 | 2021-04-25T08:38:32.000Z | 2021-04-25T08:38:32.000Z | '''Tools for image recognition and classification projects.
Author: Karl J. Obermeyer
'''
# Scientific Computing and Visualization
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import cv2 # Image processing.
# ----- Image Processing -----
def rgb2gray(image, add_dege... | 34.232258 | 81 | 0.636779 |
4a0e363892bfa8ca28bc9b7fd42b909b4573ac26 | 2,819 | py | Python | detectors/medics/cnn2d/models/mmaction/mmaction/models/recognizers/TSN3D.py | zhampel/FakeFinder | 2891a8649acc1dabdef07554d6acb346dd23dbae | [
"Apache-2.0"
] | 48 | 2020-06-12T15:46:14.000Z | 2022-03-19T16:02:05.000Z | detectors/medics/cnn2d/models/mmaction/mmaction/models/recognizers/TSN3D.py | zhampel/FakeFinder | 2891a8649acc1dabdef07554d6acb346dd23dbae | [
"Apache-2.0"
] | 37 | 2021-03-11T18:44:08.000Z | 2022-03-30T02:47:53.000Z | detectors/medics/cnn2d/models/mmaction/mmaction/models/recognizers/TSN3D.py | zhampel/FakeFinder | 2891a8649acc1dabdef07554d6acb346dd23dbae | [
"Apache-2.0"
] | 17 | 2020-06-13T12:25:42.000Z | 2021-11-22T14:49:26.000Z | from .base import BaseRecognizer
from .. import builder
from ..registry import RECOGNIZERS
import torch
@RECOGNIZERS.register_module
class TSN3D(BaseRecognizer):
def __init__(self,
backbone,
flownet=None,
spatial_temporal_module=None,
segmental... | 29.061856 | 100 | 0.628237 |
4a0e3822f997fa8f57845b561e32c5cd9164e7d6 | 11,668 | py | Python | database_delivery_sdk/api/dbtask/list_dbversions_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | database_delivery_sdk/api/dbtask/list_dbversions_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | database_delivery_sdk/api/dbtask/list_dbversions_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: list_dbversions.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.prot... | 41.523132 | 950 | 0.7494 |
4a0e394d893ec46ca93d8f8a3789bc83faffad2c | 6,616 | py | Python | src/datadog_api_client/v1/model/widget_layout.py | DataDog/datadog-api-client-python | de2fc57dbde9acf4b8c8eef94ac29911227a62a2 | [
"Apache-2.0"
] | 32 | 2021-01-07T15:09:56.000Z | 2022-01-30T05:49:23.000Z | src/datadog_api_client/v1/model/widget_layout.py | DataDog/datadog-api-client-python | de2fc57dbde9acf4b8c8eef94ac29911227a62a2 | [
"Apache-2.0"
] | 228 | 2020-09-03T14:03:54.000Z | 2022-03-31T20:16:12.000Z | src/datadog_api_client/v1/model/widget_layout.py | DataDog/datadog-api-client-python | de2fc57dbde9acf4b8c8eef94ac29911227a62a2 | [
"Apache-2.0"
] | 12 | 2020-09-15T21:36:03.000Z | 2022-03-31T17:13:17.000Z | # Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from datadog_api_client.v1.model_utils import ( # noqa: F401
ApiTypeError,
Mo... | 40.341463 | 275 | 0.573156 |
4a0e39efca1226fb469bb1208fe9c2fef878b452 | 33,386 | py | Python | test/functional/test_framework/test_node.py | c1pzo/c1pzo | 51d395eacfb92bdf43564b01b508fa84b0636a7d | [
"MIT"
] | null | null | null | test/functional/test_framework/test_node.py | c1pzo/c1pzo | 51d395eacfb92bdf43564b01b508fa84b0636a7d | [
"MIT"
] | null | null | null | test/functional/test_framework/test_node.py | c1pzo/c1pzo | 51d395eacfb92bdf43564b01b508fa84b0636a7d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017-2020 The C1pzo Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Class for c1pzod node under test"""
import contextlib
import decimal
import errno
from enum import Enum
... | 44.69344 | 238 | 0.623675 |
4a0e3a0d10bb1ccb886298463bbe12de1e306adb | 882 | py | Python | comfy/moe.py | bmintz/python-snippets | 982861c173bf4bcd5d908514a9e8b1914a580a5d | [
"CC0-1.0"
] | 2 | 2018-11-12T10:33:13.000Z | 2019-02-24T05:01:40.000Z | comfy/moe.py | LyricLy/python-snippets | 9d868b7bbccd793ea1dc513f51290963584a1dee | [
"CC0-1.0"
] | null | null | null | comfy/moe.py | LyricLy/python-snippets | 9d868b7bbccd793ea1dc513f51290963584a1dee | [
"CC0-1.0"
] | 2 | 2018-11-24T08:16:59.000Z | 2019-02-24T04:41:30.000Z | import aiofiles
import aiohttp
import requests
session = requests.Session()
async def get_session():
"""avoids "ClientSession created outside of coroutine" :^)"""
global aio_session
aio_session = aiohttp.ClientSession()
async def upload_file(selected_file):
await get_session()
async with aiofiles.open(selecte... | 25.941176 | 84 | 0.71542 |
4a0e3b3e1d006637178c64ade7787dbedf35be5a | 8,239 | py | Python | src/tests/test_issue7.py | davidshinn/pymdptoolbox | 7c96789cc80e280437005c12065cf70266c11636 | [
"BSD-3-Clause"
] | 472 | 2015-01-09T06:30:05.000Z | 2022-03-29T21:05:36.000Z | src/tests/test_issue7.py | davidshinn/pymdptoolbox | 7c96789cc80e280437005c12065cf70266c11636 | [
"BSD-3-Clause"
] | 30 | 2015-01-01T06:40:14.000Z | 2021-03-25T11:36:14.000Z | src/tests/test_issue7.py | davidshinn/pymdptoolbox | 7c96789cc80e280437005c12065cf70266c11636 | [
"BSD-3-Clause"
] | 210 | 2015-03-02T07:13:41.000Z | 2022-03-31T23:42:25.000Z | # -*- coding: utf-8 -*-
import numpy as np
import scipy.sparse as sp
import mdptoolbox
class BaseTestIssue7(object):
discount = 0.9
P = [None] * 2
P[0] = np.array([
[ 0. , 0. , 0. , 0.64, 0. , 0. , 0.36, 0. , 0. ],
[ 0. , 0. , 0. , 0. , 0.93, 0. , 0. , 0.07, 0... | 37.280543 | 74 | 0.557956 |
4a0e3b40a39b117936db038f95cf7d1f15d99cbe | 1,327 | py | Python | bubulle-py/html_report/htmlparser_utils.py | Maxim-Costa/Bubulle-Norminette | 2801d2138ec58f7bb3626dc7c89f75adfdfaa0be | [
"MIT"
] | 52 | 2020-10-17T11:07:41.000Z | 2022-03-22T21:02:37.000Z | bubulle-py/html_report/htmlparser_utils.py | Maxim-Costa/Bubulle-Norminette | 2801d2138ec58f7bb3626dc7c89f75adfdfaa0be | [
"MIT"
] | 11 | 2020-12-05T22:46:10.000Z | 2022-03-22T21:17:21.000Z | bubulle-py/html_report/htmlparser_utils.py | Maxim-Costa/Bubulle-Norminette | 2801d2138ec58f7bb3626dc7c89f75adfdfaa0be | [
"MIT"
] | 7 | 2020-10-18T16:59:57.000Z | 2021-12-02T20:41:11.000Z | #
# Copyright (c) 2020 aureliancnx
#
# MIT LICENSE
#
# This project is part of aureliancnx.
# See https://github.com/aureliancnx/Bubulle-Norminette for further info.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), t... | 47.392857 | 80 | 0.767898 |
4a0e3bce079a3465d4aa4f44fd7ff94e452e5cfc | 1,739 | py | Python | zipline/utils/sqlite_utils.py | leonarduschen/zipline | 5e6c9fce7e0f812bd181024ad192ca2976d49667 | [
"Apache-2.0"
] | 14,525 | 2015-01-01T02:57:52.000Z | 2022-03-31T18:16:35.000Z | zipline/utils/sqlite_utils.py | leonarduschen/zipline | 5e6c9fce7e0f812bd181024ad192ca2976d49667 | [
"Apache-2.0"
] | 2,146 | 2015-01-01T13:03:44.000Z | 2022-02-22T03:25:28.000Z | zipline/utils/sqlite_utils.py | leonarduschen/zipline | 5e6c9fce7e0f812bd181024ad192ca2976d49667 | [
"Apache-2.0"
] | 4,517 | 2015-01-01T14:26:47.000Z | 2022-03-31T14:38:05.000Z | # Copyright 2016 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 28.983333 | 75 | 0.753882 |
4a0e3c8a745f0e5ed3a067c05b43160c938326b1 | 3,166 | py | Python | kachna/kachna/settings.py | miiila/kachna | e14821cce84d853986c3b4f10f0fc57cb6549147 | [
"MIT"
] | null | null | null | kachna/kachna/settings.py | miiila/kachna | e14821cce84d853986c3b4f10f0fc57cb6549147 | [
"MIT"
] | null | null | null | kachna/kachna/settings.py | miiila/kachna | e14821cce84d853986c3b4f10f0fc57cb6549147 | [
"MIT"
] | null | null | null | """
Django settings for kachna project.
Generated by 'django-admin startproject' using Django 2.1.5.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
# ... | 25.739837 | 91 | 0.695515 |
4a0e3cb6c73dbdcd199f83f3ef7d54afb1169a8b | 14,202 | py | Python | models/fatchord_version.py | begeekmyfriend/WaveRNN | 7e1d4032ae89244945b8eb1216852a48305b4e99 | [
"MIT"
] | 15 | 2019-06-10T06:36:28.000Z | 2022-03-31T12:21:11.000Z | models/fatchord_version.py | begeekmyfriend/WaveRNN | 7e1d4032ae89244945b8eb1216852a48305b4e99 | [
"MIT"
] | null | null | null | models/fatchord_version.py | begeekmyfriend/WaveRNN | 7e1d4032ae89244945b8eb1216852a48305b4e99 | [
"MIT"
] | 7 | 2019-07-09T09:57:12.000Z | 2020-12-01T03:49:25.000Z | import os
import torch
import torch.nn as nn
import torch.nn.functional as F
from utils.distribution import sample_from_discretized_mix_logistic
from utils.display import *
from utils.dsp import *
class ResBlock(nn.Module):
def __init__(self, dims):
super().__init__()
self.conv1 = nn.Conv1d(dims, ... | 34.304348 | 113 | 0.543093 |
4a0e3cf549af6958b69e37cf6513c54bed912f80 | 609 | py | Python | libs/garden/garden.mapview/examples/simple_mbtiles.py | kellpossible/Kivy_ATC_Simulator | 7ebac6c1561e8cf4ed9d50d15a0e057a27247b90 | [
"MIT"
] | null | null | null | libs/garden/garden.mapview/examples/simple_mbtiles.py | kellpossible/Kivy_ATC_Simulator | 7ebac6c1561e8cf4ed9d50d15a0e057a27247b90 | [
"MIT"
] | null | null | null | libs/garden/garden.mapview/examples/simple_mbtiles.py | kellpossible/Kivy_ATC_Simulator | 7ebac6c1561e8cf4ed9d50d15a0e057a27247b90 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
This example demonstrate how to use the MBTilesMapSource provider.
It supports v1.1 version of .mbtiles of Mapbox.
See more at http://mbtiles.org/
It currently require a Kivy version that can load data from a buffer. This
is not the case on every platform at 1.8.1, but we're going to fix it.
"""
im... | 27.681818 | 74 | 0.768473 |
4a0e3e85455577ac8369b3df3b52778263a3f10b | 1,826 | py | Python | sunpy/data/test/__init__.py | dodoextinct/sunpy | a87664106b67698c260b7f7127f56e49791464cc | [
"BSD-2-Clause"
] | null | null | null | sunpy/data/test/__init__.py | dodoextinct/sunpy | a87664106b67698c260b7f7127f56e49791464cc | [
"BSD-2-Clause"
] | null | null | null | sunpy/data/test/__init__.py | dodoextinct/sunpy | a87664106b67698c260b7f7127f56e49791464cc | [
"BSD-2-Clause"
] | null | null | null | """SunPy test data files"""
import os
import glob
import fnmatch
import re
from astropy.utils.data import get_pkg_data_filename
import sunpy
__all__ = ['rootdir', 'file_list', 'get_test_filepath', 'test_data_filenames']
rootdir = os.path.join(os.path.dirname(sunpy.__file__), "data", "test")
file_list = glob.glob(os... | 26.085714 | 79 | 0.63965 |
4a0e3ec173874179426fb08e39e64abf8efb33aa | 9,642 | py | Python | pysnmp/IANA-ITU-ALARM-TC-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/IANA-ITU-ALARM-TC-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/IANA-ITU-ALARM-TC-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module IANA-ITU-ALARM-TC-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/IANA-ITU-ALARM-TC-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:51:57 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (def... | 311.032258 | 5,501 | 0.729517 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.