hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2170b680f68fce3813e9fd6fb3c3ab3781305ebc | 3,558 | py | Python | m2-modified/ims/common/agentless-system-crawler/crawler/plugins/environments/icp_environment.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | 108 | 2015-07-21T10:40:36.000Z | 2021-07-01T06:54:51.000Z | m2-modified/ims/common/agentless-system-crawler/crawler/plugins/environments/icp_environment.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | 320 | 2015-07-21T01:33:20.000Z | 2020-07-21T15:57:02.000Z | m2-modified/ims/common/agentless-system-crawler/crawler/plugins/environments/icp_environment.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | 61 | 2015-07-20T18:26:37.000Z | 2021-03-17T01:18:54.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import logging
import copy
import re
from runtime_environment import IRuntimeEnvironment
from utils.dockerutils import exec_dockerinspect
logger = logging.getLogger('crawlutils')
META_CONFIG = 'Config'
META_LABELS = 'Labels'
META_UUID = 'Id'
META_HOSTNAME = 'Hostn... | 37.452632 | 79 | 0.639685 |
2170c3f821295595c41abe75254b5d7ed8f2cf4f | 6,342 | py | Python | sky_map_a.py | ussserrr/starmap-northern-animation | 0c45deee144b6825faa8934dfbf56d7ca9538560 | [
"MIT"
] | 5 | 2019-10-11T07:31:28.000Z | 2022-03-09T14:22:33.000Z | sky_map_a.py | ussserrr/starmap-northern-animation | 0c45deee144b6825faa8934dfbf56d7ca9538560 | [
"MIT"
] | null | null | null | sky_map_a.py | ussserrr/starmap-northern-animation | 0c45deee144b6825faa8934dfbf56d7ca9538560 | [
"MIT"
] | 1 | 2022-01-11T02:34:22.000Z | 2022-01-11T02:34:22.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# TODO: different stars sizes dependending on their flux
# TODO: map where only FOV and center is a current 'polar star' analogue (zenith)
# TODO: case when not all stars were downloaded
# TODO: implement constellations as graphs
# TODO: implement map as custom a... | 29.091743 | 111 | 0.629454 |
2170de0cf96b4b46f6300c2623a00ae28f0edd5a | 576 | py | Python | urucrafters_fixlog.py | carlosplanchon/scripts | 9ddf447a3a3b1d111189de13ad3f9ab8107e51ac | [
"MIT"
] | 1 | 2016-06-20T05:42:33.000Z | 2016-06-20T05:42:33.000Z | urucrafters_fixlog.py | carlosplanchon/scripts | 9ddf447a3a3b1d111189de13ad3f9ab8107e51ac | [
"MIT"
] | null | null | null | urucrafters_fixlog.py | carlosplanchon/scripts | 9ddf447a3a3b1d111189de13ad3f9ab8107e51ac | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
HOUR_DIFFERENCE = 5
with open("latest.log", "r") as log:
with open("converted.log", "w") as converted:
for line in log.readlines():
if line[0] == "[":
hour = int(line[1: 3]) - HOUR_DIFFERENCE
if int(hour) < 0:
hour +=... | 24 | 56 | 0.428819 |
2170e570ead2dc76a5bde68929ec806db7974bcb | 4,954 | py | Python | test.py | vrtsig/hashsplit | ae4ec0395efc48b2bdc9543e44ce4a20102f9dc4 | [
"MIT"
] | null | null | null | test.py | vrtsig/hashsplit | ae4ec0395efc48b2bdc9543e44ce4a20102f9dc4 | [
"MIT"
] | null | null | null | test.py | vrtsig/hashsplit | ae4ec0395efc48b2bdc9543e44ce4a20102f9dc4 | [
"MIT"
] | null | null | null | import numpy as np
from numpy.random import RandomState
import pytest
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import cross_val_score
from sklearn.datasets import load_iris
from hashsplit import HashShuffleSplit, HashKFold
from hashsplit.hashsplit import ignore_overflow, HashSpl... | 36.160584 | 86 | 0.663101 |
2170faf35141cdd642a801185df9142979d1542d | 1,246 | py | Python | mainapp/views.py | maxreshetnik/portfolio | 9ee2d224a578d839ee8938c84b0e406a0636453c | [
"BSD-3-Clause"
] | null | null | null | mainapp/views.py | maxreshetnik/portfolio | 9ee2d224a578d839ee8938c84b0e406a0636453c | [
"BSD-3-Clause"
] | null | null | null | mainapp/views.py | maxreshetnik/portfolio | 9ee2d224a578d839ee8938c84b0e406a0636453c | [
"BSD-3-Clause"
] | null | null | null | from django.urls import reverse_lazy
from django.views.generic.edit import FormView
from django.contrib.messages.views import SuccessMessageMixin
from django.contrib.messages import get_messages, warning as msg_warning
from .models import Portfolio
from .forms import FeedbackForm
class HomePageView(SuccessMessageMix... | 35.6 | 78 | 0.67175 |
21710566f0e79cd64e05a8a090fa632692fdf787 | 262 | py | Python | mcache/tests/common.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | mcache/tests/common.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | mcache/tests/common.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2010-2017
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import os
PORT = 11211
SERVICE_CHECK = 'memcache.can_connect'
HOST = os.getenv('DOCKER_HOSTNAME', 'localhost')
USERNAME = 'testuser'
PASSWORD = 'testpass'
| 23.818182 | 53 | 0.748092 |
21711127b77fec0668d10e9b6dd757fa95a8c749 | 3,385 | py | Python | Tools/Scripts/libraries/webkitcorepy/webkitcorepy/string_utils.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/libraries/webkitcorepy/webkitcorepy/string_utils.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/libraries/webkitcorepy/webkitcorepy/string_utils.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2020 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | 32.864078 | 94 | 0.657016 |
217112d5ce751db09b6b4340d7f3087bfd8cae47 | 1,030 | py | Python | app/modules/attachments/schema.py | DsCodeStudio98m0f/DTia-Nugrahab | 218ef140727849206fe76f42f43a5a231cfda9d9 | [
"Apache-2.0"
] | 16 | 2020-03-26T13:21:15.000Z | 2021-07-25T18:49:05.000Z | app/modules/attachments/schema.py | DsCodeStudio98m0f/DTia-Nugrahab | 218ef140727849206fe76f42f43a5a231cfda9d9 | [
"Apache-2.0"
] | 13 | 2020-03-24T18:19:48.000Z | 2022-03-12T00:18:59.000Z | app/modules/attachments/schema.py | DsCodeStudio98m0f/DTia-Nugrahab | 218ef140727849206fe76f42f43a5a231cfda9d9 | [
"Apache-2.0"
] | 14 | 2020-03-31T01:02:38.000Z | 2021-09-17T01:10:36.000Z | """schema
Response Schema
PROJECT: BaoAI Backend
AUTHOR: henry <703264459@qq.com>
WEBSITE: http://www.baoai.co
COPYRIGHT: Copyright © 2016-2020 广州源宝网络有限公司 Guangzhou Yuanbao Network Co., Ltd. ( http://www.ybao.org )
LICENSE: Apache-2.0
"""
from flask_restplus_patched import ModelSchema
from flask_marshmallow import b... | 24.52381 | 103 | 0.741748 |
21712e30403c5a2b651d8312d40839434eb4d7a5 | 10,726 | py | Python | utilities/benchmarking.py | YifanQie/Deep_Learning_for_Manufacturing | 9ba19e41f69c561b04b8573ab9c52c0969f45bfd | [
"MIT"
] | 27 | 2019-10-31T15:16:13.000Z | 2022-03-29T03:56:57.000Z | utilities/benchmarking.py | YifanQie/Deep_Learning_for_Manufacturing | 9ba19e41f69c561b04b8573ab9c52c0969f45bfd | [
"MIT"
] | 4 | 2020-03-25T14:18:04.000Z | 2022-02-10T00:34:58.000Z | utilities/benchmarking.py | YifanQie/Deep_Learning_for_Manufacturing | 9ba19e41f69c561b04b8573ab9c52c0969f45bfd | [
"MIT"
] | 7 | 2020-02-23T22:12:37.000Z | 2021-12-08T20:14:41.000Z | """Benchmarking is used to test the 3D CNN model with standard machine learning models. The utility comes with existing models but the user can add, remove or tweak models based on his requirement. Refer scikit learn for more information about the models: https://scikit-learn.org/stable/supervised_learning.html#supervi... | 42.395257 | 335 | 0.788365 |
2171372ac444f292369b9e3bafeb65ad6cf2ddf4 | 616 | py | Python | api_app/models/domain/user_resource.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | api_app/models/domain/user_resource.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | api_app/models/domain/user_resource.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | from pydantic import Field
from models.domain.resource import Resource, ResourceType
class UserResource(Resource):
"""
Workspace service request
"""
workspaceId: str = Field("", title="Workspace ID", description="Service target Workspace id")
ownerId: str = Field("", title="Owner of the user reso... | 41.066667 | 133 | 0.732143 |
217142f6808a27a99d7803564c794b876822b614 | 1,127 | py | Python | agutil/src/active_timeout.py | agraubert/agutil | d9a568df01959ed985c9c8e77bdd501ac13bdbbf | [
"MIT"
] | 3 | 2017-06-05T15:46:22.000Z | 2019-05-22T21:26:54.000Z | agutil/src/active_timeout.py | agraubert/agutil | d9a568df01959ed985c9c8e77bdd501ac13bdbbf | [
"MIT"
] | 93 | 2016-06-22T18:57:47.000Z | 2022-02-14T10:50:27.000Z | agutil/src/active_timeout.py | agraubert/agutil | d9a568df01959ed985c9c8e77bdd501ac13bdbbf | [
"MIT"
] | null | null | null | from contextlib import contextmanager
from socket import timeout as sockTimeout
import time
class TimeoutExceeded(sockTimeout):
pass
class ActiveTimeout(object):
def __init__(self, t):
self.remainder = t
self.original = t
def __enter__(self):
self.reset()
return self
... | 24.5 | 67 | 0.622893 |
2171509dc491af76259ebe850274fad5a03bc25d | 11,234 | py | Python | augmentations/augmentations.py | shiyutang/CAG_UDA | c3eda799e2edbd2dd0b6ab6bd8b12727167c9c91 | [
"MIT"
] | 126 | 2019-10-30T00:58:02.000Z | 2022-01-26T06:29:10.000Z | augmentations/augmentations.py | shiyutang/CAG_UDA | c3eda799e2edbd2dd0b6ab6bd8b12727167c9c91 | [
"MIT"
] | 14 | 2019-11-05T15:10:22.000Z | 2022-02-08T09:05:53.000Z | augmentations/augmentations.py | shiyutang/CAG_UDA | c3eda799e2edbd2dd0b6ab6bd8b12727167c9c91 | [
"MIT"
] | 26 | 2019-12-02T09:41:11.000Z | 2022-01-29T10:46:41.000Z | # Adapted from https://github.com/ZijunDeng/pytorch-semantic-segmentation/blob/master/utils/joint_transforms.py
import math
import numbers
import random
import numpy as np
import torchvision.transforms.functional as tf
from PIL import Image, ImageOps
class Compose(object):
def __init__(self, augmentations):
... | 29.563158 | 111 | 0.509347 |
21717e9c9fae035f360d72f62f015b07de6b24ca | 23,774 | py | Python | cinder/volume/drivers/dell_emc/vnx/taskflows.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/dell_emc/vnx/taskflows.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/dell_emc/vnx/taskflows.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 39.689482 | 78 | 0.57525 |
21718c793610b6ebd8d185eb100f22f5e363f796 | 1,015 | py | Python | leetcode/2.add-two-numbers.py | schio/algorithm_test | c240faca428a9adb2970591338d4792b2f4fb7f3 | [
"MIT"
] | null | null | null | leetcode/2.add-two-numbers.py | schio/algorithm_test | c240faca428a9adb2970591338d4792b2f4fb7f3 | [
"MIT"
] | null | null | null | leetcode/2.add-two-numbers.py | schio/algorithm_test | c240faca428a9adb2970591338d4792b2f4fb7f3 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=2 lang=python3
#
# [2] Add Two Numbers
#
# @lc code=start
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode:
... | 22.555556 | 68 | 0.48867 |
2171d11c8a63bb321a2bb06de1d6d61a08fe2c51 | 365 | py | Python | setup.py | cstockton/py-emit | 3c240afb4a6159aa3a9a5930c0f6a606d41370b1 | [
"MIT"
] | null | null | null | setup.py | cstockton/py-emit | 3c240afb4a6159aa3a9a5930c0f6a606d41370b1 | [
"MIT"
] | null | null | null | setup.py | cstockton/py-emit | 3c240afb4a6159aa3a9a5930c0f6a606d41370b1 | [
"MIT"
] | 3 | 2017-08-29T22:59:25.000Z | 2020-02-21T19:13:41.000Z | from setuptools import setup, find_packages
setup(
name='emit',
version='0.4.0',
packages=find_packages(),
package_data={'': ['README.md', '*Makefile*', '*static/*']},
include_package_data=True,
install_requires=[
'requests',
'pika>=0.10.0',
'python-dateutil>=2.5.3'],
... | 24.333333 | 64 | 0.6 |
2171e0533991ea5dc15963ad90f5cc7ff5612ba0 | 6,233 | py | Python | scripts/loader3.py | FragLegs/mrnet | a05eb8902463cbcf88126c616911bd9f69d019df | [
"MIT"
] | 1 | 2021-06-18T08:16:01.000Z | 2021-06-18T08:16:01.000Z | scripts/loader3.py | FragLegs/mrnet | a05eb8902463cbcf88126c616911bd9f69d019df | [
"MIT"
] | null | null | null | scripts/loader3.py | FragLegs/mrnet | a05eb8902463cbcf88126c616911bd9f69d019df | [
"MIT"
] | null | null | null | import logging
import random
import numpy as np
import pandas as pd
import torch
import torch.nn.functional as F
import torch.utils.data as data
from torch.autograd import Variable
import torchvision.transforms.functional as FT
log = logging.getLogger(__name__)
INPUT_DIM = 224
MAX_PIXEL_VAL = 255
MEAN = 58.09
STDD... | 26.079498 | 78 | 0.572597 |
2171e49e299e75cd82ee1e852db48e90637ece39 | 5,296 | py | Python | Tools/Scripts/webkitpy/port/ios_device.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/port/ios_device.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/port/ios_device.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2014-2019 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and ... | 44.504202 | 191 | 0.713935 |
21720628d66570f963726705b4dad3eacba44bf1 | 3,005 | py | Python | apps/core/documents.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 19 | 2017-09-13T07:51:58.000Z | 2022-03-28T11:04:03.000Z | apps/core/documents.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 147 | 2017-09-14T13:45:30.000Z | 2022-03-14T15:54:09.000Z | apps/core/documents.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 5 | 2019-08-31T13:13:30.000Z | 2021-03-26T15:46:38.000Z | from django.conf import settings
from django_elasticsearch_dsl import Document, fields
from django_elasticsearch_dsl.registries import registry
from django.apps import apps
from elasticsearch_dsl import analyzer, tokenizer, Q
from elasticsearch_dsl.query import Query
from elasticsearch_dsl.analysis import token_filter
... | 28.349057 | 129 | 0.645923 |
217220bb6a51ab84f61896a79a5c2398ea1ede6d | 818 | py | Python | input_module.py | lllsavanlll/VirtualAssistant | b3065188d24baacff5b8df049dd3f4ae1c8935a2 | [
"MIT"
] | 1 | 2021-08-05T15:10:00.000Z | 2021-08-05T15:10:00.000Z | input_module.py | lllsavanlll/VirtualAssistant | b3065188d24baacff5b8df049dd3f4ae1c8935a2 | [
"MIT"
] | null | null | null | input_module.py | lllsavanlll/VirtualAssistant | b3065188d24baacff5b8df049dd3f4ae1c8935a2 | [
"MIT"
] | null | null | null | import speech_recognition as sr
from internet import internet_access
def TakeCommand():
r = sr.Recognizer()
with sr.Microphone() as source:
msg = ': Listening....'
print(msg, end='')
print('\b' * len(msg), end='', flush=True)
r.pause_threshold = 1
audio = r.listen(sour... | 22.108108 | 58 | 0.528117 |
217221c3219d830c28c6e5e914b7f804bb9efa3b | 3,164 | py | Python | lmd/prufer.py | yabirgb/DGIIM | b57c96016081434791d862f21dd2cefae7264e61 | [
"MIT"
] | null | null | null | lmd/prufer.py | yabirgb/DGIIM | b57c96016081434791d862f21dd2cefae7264e61 | [
"MIT"
] | null | null | null | lmd/prufer.py | yabirgb/DGIIM | b57c96016081434791d862f21dd2cefae7264e61 | [
"MIT"
] | null | null | null | from IPython.display import SVG, display, Image
import pydot
class Prufer():
"""
Clase que representa al código de Prüfer de un árbol.
Metodos:
- Construir: Cuando la clase toma una lista, representando
el código de Prüfer de un árbol, construye el árbol
y devuelve un svg.
- C... | 33.659574 | 85 | 0.583755 |
217232f27a04675f60043faecc8d187c8cd3992d | 1,145 | py | Python | go/src/infra/tools/vpython/testdata/test_handoff.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | go/src/infra/tools/vpython/testdata/test_handoff.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | go/src/infra/tools/vpython/testdata/test_handoff.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This empty vpython spec prevents the test_handoff.py script from ever
# having a vpython spec, even if this repo eventually adds one.
# [VPYTHON:BEGIN]
#
#... | 28.625 | 74 | 0.746725 |
21724076b01b0f5a6a4541ed7eeb546a22ad87b0 | 3,116 | py | Python | siliconcompiler/tools/sv2v/sv2v.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | null | null | null | siliconcompiler/tools/sv2v/sv2v.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | null | null | null | siliconcompiler/tools/sv2v/sv2v.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | null | null | null | import os
import subprocess
import re
import sys
import siliconcompiler
####################################################################
# Make Docs
####################################################################
def make_docs():
'''
sv2v converts SystemVerilog (IEEE 1800-2017) to Verilog
(IEEE 13... | 31.474747 | 88 | 0.59724 |
217248181ab55900eb0e2c1fe153663ce65c450b | 783 | py | Python | examples/src/python/example/python_distribution/hello/setup_requires/setup.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | examples/src/python/example/python_distribution/hello/setup_requires/setup.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | examples/src/python/example/python_distribution/hello/setup_requires/setup.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import os
from setuptools import setup, find_packages
# We require pycountry with setup_... | 30.115385 | 82 | 0.771392 |
217256cc8baa8e49cbaf4b4e01ad38d55c3da852 | 8,487 | py | Python | test_scalability.py | matthieu637/iroko | 3905caa46328a7c011762f8a96a15fbde9826899 | [
"Apache-2.0"
] | 56 | 2018-12-01T00:11:27.000Z | 2022-03-08T04:10:10.000Z | test_scalability.py | matthieu637/iroko | 3905caa46328a7c011762f8a96a15fbde9826899 | [
"Apache-2.0"
] | 33 | 2018-12-13T20:18:07.000Z | 2022-03-23T16:03:26.000Z | test_scalability.py | matthieu637/iroko | 3905caa46328a7c011762f8a96a15fbde9826899 | [
"Apache-2.0"
] | 17 | 2019-02-19T05:31:23.000Z | 2022-03-14T15:20:00.000Z | from __future__ import print_function
from __future__ import division # For Python 2
import numpy as np
import pandas as pd
from filelock import FileLock
import os
import logging
import time
import argparse
# Ray imports
import ray
from ray.rllib.agents.registry import get_agent_class
from ray.rllib.agents.agent impor... | 33.545455 | 76 | 0.638977 |
217271a14ddbd1eda60029164b9af60ce9741028 | 20,008 | py | Python | jax/interpreters/sharded_jit.py | rsepassi/jax | 33348b10f8e826c6ad25cb7055b5a351849777fb | [
"Apache-2.0"
] | 1 | 2020-12-07T14:55:41.000Z | 2020-12-07T14:55:41.000Z | jax/interpreters/sharded_jit.py | rsepassi/jax | 33348b10f8e826c6ad25cb7055b5a351849777fb | [
"Apache-2.0"
] | 6 | 2022-01-03T00:41:33.000Z | 2022-02-14T00:33:48.000Z | jax/interpreters/sharded_jit.py | rsepassi/jax | 33348b10f8e826c6ad25cb7055b5a351849777fb | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 42.752137 | 91 | 0.711715 |
21727353d43ddf9c168aaa1e9f961e93fdc420d8 | 3,094 | py | Python | panda/models/task_status.py | newsapps/panda | 7553fd8cbc9c9c92a1b8be2e073141ec1b2ef903 | [
"MIT"
] | 4 | 2015-07-28T19:01:03.000Z | 2018-12-21T01:57:03.000Z | panda/models/task_status.py | NUKnightLab/panda | c8b81151cad9f23ecd439e4354e86cca1eb49bb1 | [
"MIT"
] | null | null | null | panda/models/task_status.py | NUKnightLab/panda | c8b81151cad9f23ecd439e4354e86cca1eb49bb1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from celery import states
from celery.contrib.abortable import AbortableAsyncResult
from django.db import models
from django.utils.timezone import now
from djcelery.models import TASK_STATE_CHOICES
from panda.models.user_proxy import UserProxy
TASK_STATUS_CHOICES = TASK_STATE_CHOICES
TASK_STAT... | 30.333333 | 97 | 0.630252 |
21728d1a80dd018ef27061b6729f8871a9130d57 | 8,309 | py | Python | tests/unit/stateconf_test.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | null | null | null | tests/unit/stateconf_test.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | null | null | null | tests/unit/stateconf_test.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
import os
import os.path
import tempfile
# Import Salt Testing libs
from salttesting import TestCase
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../')
# Import Salt libs
import salt.loader
import salt.config... | 26.461783 | 85 | 0.56493 |
217294caba4ea91fd6ec476eddc733d7224a9a8d | 2,475 | py | Python | alipay/aop/api/domain/AlipayOverseasOpenAmountPreconsultModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayOverseasOpenAmountPreconsultModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayOverseasOpenAmountPreconsultModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.TuitionISVAgentInfoDTO import TuitionISVAgentInfoDTO
from alipay.aop.api.domain.TuitionMoneyDTO import TuitionMoneyDTO
class AlipayOverseasOpenAmountPreconsultModel(object):
... | 31.329114 | 81 | 0.639596 |
2172d742c1f63f97608aebf6e43bb1c5d725c445 | 630 | py | Python | demo/Spell_demo.py | snedelkoski/nulog | ef784b9976f35cf42832fb0c476f3fecbe551130 | [
"BSD-3-Clause"
] | 1 | 2021-08-05T06:40:02.000Z | 2021-08-05T06:40:02.000Z | demo/Spell_demo.py | XubinChencs/MyLogparser | e214ffbf5e3477af176dfb3f478e11c555bc292c | [
"MIT"
] | null | null | null | demo/Spell_demo.py | XubinChencs/MyLogparser | e214ffbf5e3477af176dfb3f478e11c555bc292c | [
"MIT"
] | 1 | 2022-01-20T11:01:43.000Z | 2022-01-20T11:01:43.000Z | #!/usr/bin/env python
import sys
sys.path.append('../')
from logparser import Spell
input_dir = '../logs/HDFS/' # The input directory of log file
output_dir = 'Spell_result/' # The output directory of parsing results
log_file = 'HDFS_2k.log' # The input log file name
log_format = '<Date> <Time> <Pid> <Level> <Co... | 42 | 103 | 0.707937 |
2172d9d0516ecb07264e16243f2fca114a128135 | 7,110 | py | Python | google/cloud/spanner_v1/batch.py | c24t/python-spanner | b5f977ebf61527914af3c8356aeeae9418114215 | [
"Apache-2.0"
] | null | null | null | google/cloud/spanner_v1/batch.py | c24t/python-spanner | b5f977ebf61527914af3c8356aeeae9418114215 | [
"Apache-2.0"
] | null | null | null | google/cloud/spanner_v1/batch.py | c24t/python-spanner | b5f977ebf61527914af3c8356aeeae9418114215 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Google LLC All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 34.019139 | 99 | 0.665682 |
2172e4e0367e3a39b04120233792cb9dcceb7c59 | 3,349 | py | Python | deepMOT/utils/io_utils.py | xieyujia/RWOC | ad1085b212aac85298317b681379997c14e340b3 | [
"MIT"
] | 1 | 2021-09-13T15:32:19.000Z | 2021-09-13T15:32:19.000Z | deepMOT/utils/io_utils.py | xieyujia/RWOC | ad1085b212aac85298317b681379997c14e340b3 | [
"MIT"
] | 1 | 2021-06-30T13:11:12.000Z | 2021-07-06T01:33:19.000Z | deepMOT/utils/io_utils.py | xieyujia/RWOC | ad1085b212aac85298317b681379997c14e340b3 | [
"MIT"
] | null | null | null | # ==========================================================================
#
# This file is a part of implementation for paper:
# DeepMOT: A Differentiable Framework for Training Multiple Object Trackers.
# This contribution is headed by Perception research team, INRIA.
#
# Contributor(s) : Yihong Xu
# INRIA contact ... | 32.514563 | 120 | 0.543147 |
21730f31bab8c9bc2767e6750dc5fc957ed20f0a | 3,316 | py | Python | goatools/cli/ncbi_gene_results_to_python.py | cinaljess/goatools | 8cd603df88fcb49da970e37c445cdb1bdd17ee01 | [
"BSD-2-Clause"
] | 1 | 2020-03-12T13:53:11.000Z | 2020-03-12T13:53:11.000Z | goatools/cli/ncbi_gene_results_to_python.py | cinaljess/goatools | 8cd603df88fcb49da970e37c445cdb1bdd17ee01 | [
"BSD-2-Clause"
] | null | null | null | goatools/cli/ncbi_gene_results_to_python.py | cinaljess/goatools | 8cd603df88fcb49da970e37c445cdb1bdd17ee01 | [
"BSD-2-Clause"
] | 1 | 2022-03-17T03:14:32.000Z | 2022-03-17T03:14:32.000Z | """Read a NCBI Gene gene_result.txt file and write a Python module.
Usage:
ncbi_gene_results_to_python.py [options]
Options:
-h --help show this help message and exit
-i <gene_result.txt> Read NCBI Gene file [default: gene_result.txt]
-o <gene_result.py> Write Python file... | 39.47619 | 92 | 0.614294 |
217312b4f161cd492ca42114ffa9211173c1c0de | 2,753 | py | Python | Tools/Scripts/webkitpy/tool/commands/commandtest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/tool/commands/commandtest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/tool/commands/commandtest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2009 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | 51.943396 | 218 | 0.749001 |
21732adbc1dad06a9732f8be4a3bc6b1fee47f80 | 923 | py | Python | pinax/apps/waitinglist/views.py | peiwei/pinax | 34f95b1df4318655fe9bd90dcda8fe824e0c4117 | [
"MIT"
] | 1 | 2019-02-12T04:45:09.000Z | 2019-02-12T04:45:09.000Z | pinax/apps/waitinglist/views.py | alex/pinax | 37e17ee2e2eb0e387d8809c12e55c20194a7118a | [
"MIT"
] | null | null | null | pinax/apps/waitinglist/views.py | alex/pinax | 37e17ee2e2eb0e387d8809c12e55c20194a7118a | [
"MIT"
] | 1 | 2019-02-12T04:45:40.000Z | 2019-02-12T04:45:40.000Z | from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.template import RequestContext
from django.shortcuts import render_to_response
from waitinglist.forms import WaitingListEntryForm
def list_signup(request, post_save_redirect=None):
if request.method == "POST":
... | 34.185185 | 70 | 0.704225 |
21732efaeaca7df062719e58441a4563a041656f | 2,585 | py | Python | sjtwo-c/toolchains/windows/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/lib/thumb/v8-m.main+fp/softfp/libstdc++.a-gdb.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | 2 | 2020-04-04T21:09:56.000Z | 2020-04-08T17:00:58.000Z | compiler/arm-none-eabi/lib/thumb/v8-m.main+fp/softfp/libstdc++.a-gdb.py | dacya/tfg1920-raspiOS | 1c7c4079bc0d24b009df3ded484f5a4a75709949 | [
"MIT"
] | 13 | 2020-04-11T21:50:57.000Z | 2020-04-19T03:19:48.000Z | sjtwo-c/toolchains/windows/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/lib/thumb/v8-m.main+fp/softfp/libstdc++.a-gdb.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | 4 | 2020-06-25T21:55:05.000Z | 2020-09-20T23:44:05.000Z | # -*- python -*-
# Copyright (C) 2009-2018 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later versio... | 41.693548 | 143 | 0.733075 |
217352230248d2fe87dc1a3a5787c67faae45004 | 336 | py | Python | reach/settings/development.py | nityaoberoi/reach | 78444afdf49baad702ebb09f3e72379763cbc709 | [
"MIT"
] | null | null | null | reach/settings/development.py | nityaoberoi/reach | 78444afdf49baad702ebb09f3e72379763cbc709 | [
"MIT"
] | 3 | 2015-04-29T22:56:50.000Z | 2015-06-15T17:56:54.000Z | reach/settings/development.py | joedoublej/reach | 78444afdf49baad702ebb09f3e72379763cbc709 | [
"MIT"
] | null | null | null | from settings import *
TEMPLATE_DEBUG = True
DEBUG = True
LOCAL = True
CELERY_ALWAYS_EAGER = True
DATABASES['default']['NAME'] = 'reach'
DATABASES['default']['USER'] = 'root'
DATABASES['default']['PASSWORD'] = ''
DEFAULT_LOGGER_DICT = {
'handlers': ['console'],
'level': 'DEBUG',
}
BUGSNAG['release_stage'] ... | 17.684211 | 40 | 0.669643 |
217378cdb28a16c6cab3909bc41dd6039ce99867 | 10,004 | py | Python | sasmodels/weights.py | zattala/sasmodels | a547aa73d43145b3bd34770b0ea27ba8882170a3 | [
"BSD-3-Clause"
] | null | null | null | sasmodels/weights.py | zattala/sasmodels | a547aa73d43145b3bd34770b0ea27ba8882170a3 | [
"BSD-3-Clause"
] | null | null | null | sasmodels/weights.py | zattala/sasmodels | a547aa73d43145b3bd34770b0ea27ba8882170a3 | [
"BSD-3-Clause"
] | null | null | null | """
SAS distributions for polydispersity.
"""
# TODO: include dispersion docs with the disperser models
from __future__ import division, print_function
from math import sqrt # type: ignore
from collections import OrderedDict
import numpy as np # type: ignore
from scipy.special import gammaln # type: ignore
# TODO... | 32.480519 | 82 | 0.611755 |
217381f7d9a169847a87f7f2e6213e96b1303e3c | 3,248 | py | Python | contrib/performance/benchmarks/find_calendars.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | contrib/performance/benchmarks/find_calendars.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | contrib/performance/benchmarks/find_calendars.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | ##
# Copyright (c) 2010-2015 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 31.533981 | 148 | 0.692426 |
2173e12d2dc6ceee5dfffba57a423b5662b4922d | 304,055 | py | Python | languages/pl.py | nursix/DRKCM | 09328289ff721c416494398aa751ff99906327cb | [
"MIT"
] | 3 | 2022-01-26T08:07:54.000Z | 2022-03-21T21:53:52.000Z | languages/pl.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | languages/pl.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | {
"'%s %%{row} deleted',nrows": "%s %%{row} usunięte',nrows",
"'%s %%{row} updated',nrows": "%s %%{row} zaktualizowane',nrows",
"'Cancel' will indicate an asset log entry did not occur": '„Anulowanie” spowoduje, że dodanie zasobu nie zostało wykonane',
"A location that specifies the geographic area for this region. Thi... | 54.305233 | 514 | 0.751946 |
2173f82402769fc73a9bec7871eb95221195b58e | 1,285 | py | Python | aops-utils/aops_utils/kafka/kafka_exception.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | aops-utils/aops_utils/kafka/kafka_exception.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | aops-utils/aops_utils/kafka/kafka_exception.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | #!/usr/bin/python3
# ******************************************************************************
# Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
# licensed under the Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a c... | 32.125 | 98 | 0.607782 |
21743f53017d64d4c181171375e2d4ecc2714516 | 9,466 | py | Python | trainer.py | zhaoyucs/vrd-fastrcnn | 1de24034583b3af558f68c614f519072ae180c35 | [
"MIT"
] | null | null | null | trainer.py | zhaoyucs/vrd-fastrcnn | 1de24034583b3af558f68c614f519072ae180c35 | [
"MIT"
] | null | null | null | trainer.py | zhaoyucs/vrd-fastrcnn | 1de24034583b3af558f68c614f519072ae180c35 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import os
from collections import namedtuple
import time
from torch.nn import functional as F
from model.utils.creator_tool import AnchorTargetCreator, ProposalTargetCreator
from torch import nn
import torch as t
from utils import array_tool as at
# from utils.vis_tool import Vis... | 36.548263 | 89 | 0.612085 |
21743fb3215e1e211f339d4129e5f7cb12067776 | 7,211 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/data/alt_format_49.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/data/alt_format_49.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/data/alt_format_49.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Auto-generated file, do not edit by hand. 49 metadata"""
from ..phonemetadata import NumberFormat
PHONE_ALT_FORMAT_49 = [NumberFormat(pattern='(\\d{2})(\\d{3})(\\d{3,4})', format='\\1/\\2 \\3', leading_digits_pattern=['3[02]|40|[68]9']), NumberFormat(pattern='(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})', format='\\... | 1,442.2 | 7,105 | 0.534877 |
21746d9dc2767010273da93a40e2505d17b873da | 402 | py | Python | tests/test_version.py | BookOps-CAT/bookops-worldcat | 879f91f9fe929246c0c07ed771979f31a59288b3 | [
"MIT"
] | 18 | 2020-05-01T13:35:12.000Z | 2022-03-25T15:16:12.000Z | tests/test_version.py | BookOps-CAT/bookops-worldcat | 879f91f9fe929246c0c07ed771979f31a59288b3 | [
"MIT"
] | 37 | 2020-04-15T00:24:18.000Z | 2022-03-31T14:07:24.000Z | tests/test_version.py | BookOps-CAT/bookops-worldcat | 879f91f9fe929246c0c07ed771979f31a59288b3 | [
"MIT"
] | 6 | 2020-04-27T23:25:15.000Z | 2020-10-05T23:35:07.000Z | # -*- coding: utf-8 -*-
from bookops_worldcat.__version__ import (
__version__,
__title__,
__author__,
__author_email__,
)
def test_version():
assert __version__ == "0.4.0"
def test_title():
assert __title__ == "bookops-worldcat"
def test_author():
assert __author__ == "Tomasz Kalata... | 15.461538 | 52 | 0.676617 |
217473845fa49aab196ede5d8f4960a43c2e476e | 4,972 | py | Python | zerver/webhooks/basecamp/view.py | gnprice/zulip | f29a1918f3cd3795f6ded3dc174472ef0fde3973 | [
"Apache-2.0"
] | null | null | null | zerver/webhooks/basecamp/view.py | gnprice/zulip | f29a1918f3cd3795f6ded3dc174472ef0fde3973 | [
"Apache-2.0"
] | 6 | 2020-09-05T21:07:41.000Z | 2021-12-02T17:56:37.000Z | zerver/webhooks/basecamp/view.py | gnprice/zulip | f29a1918f3cd3795f6ded3dc174472ef0fde3973 | [
"Apache-2.0"
] | 1 | 2021-01-07T23:27:52.000Z | 2021-01-07T23:27:52.000Z | import logging
import re
from typing import Any, Dict, Text
from django.http import HttpRequest, HttpResponse
from zerver.decorator import api_key_only_webhook_view
from zerver.lib.request import REQ, has_request_variables
from zerver.lib.response import json_error, json_success
from zerver.lib.webhooks.common import... | 38.246154 | 97 | 0.697506 |
217480c833114797c2a419553f2217fc87842077 | 23,194 | py | Python | justap_server_sdk_python/models/refund_extra_alipay_open_api_royalty_detail_info_pojo.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | justap_server_sdk_python/models/refund_extra_alipay_open_api_royalty_detail_info_pojo.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | justap_server_sdk_python/models/refund_extra_alipay_open_api_royalty_detail_info_pojo.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Justap API
欢迎阅读 Justap Api 文档 Justap 是为移动端应用和PC端应用打造的下一代聚合支付SAAS服务平台,通过一个 SDK 即可快速的支持各种形式的应用,并且一次接口完成多个不同支付渠道的接入。平台除了支持服务商子商户模式,同时还对商家自有商户(即自己前往微信、支付宝等机构开户)提供了完整的支持。 感谢您的支持,我们将不断探索,为您提供更优质的服务!如需技术支持可前往商户中心提交工单,支持工程师会尽快与您取得联系! # 文档说明 采用 REST 风格设计。所有接口请求地址都是可预期的以及面向资源的。使用规范的 HTTP 响应代码来表示请... | 41.344029 | 3,404 | 0.680305 |
21749a6e8a8a472ec675f04becc5952dfd1957c1 | 9,700 | py | Python | qiskit_acqua/iqpe/iqpe.py | silky/qiskit-acqua | 580573d88b65a78494f085f1ed576cf1cbb2e481 | [
"Apache-2.0"
] | 1 | 2019-06-27T11:26:57.000Z | 2019-06-27T11:26:57.000Z | qiskit_acqua/iqpe/iqpe.py | silky/qiskit-acqua | 580573d88b65a78494f085f1ed576cf1cbb2e481 | [
"Apache-2.0"
] | null | null | null | qiskit_acqua/iqpe/iqpe.py | silky/qiskit-acqua | 580573d88b65a78494f085f1ed576cf1cbb2e481 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018 IBM.
#
# 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 agre... | 38.955823 | 117 | 0.579175 |
2174a2dd0d330f409ef2f065bef60c74ad2a380e | 1,940 | py | Python | pccommon/pccommon/middleware.py | developmentseed/planetary-computer-apis | 174db793bfe9f572fff13b04e13bac1005d212fc | [
"MIT"
] | 36 | 2021-11-02T16:13:47.000Z | 2022-03-29T16:34:58.000Z | pccommon/pccommon/middleware.py | microsoft/planetary-computer-apis | 140248f1826f6799f17ace20367a487b31403e49 | [
"MIT"
] | 25 | 2021-11-01T15:27:40.000Z | 2022-03-29T17:53:05.000Z | pccommon/pccommon/middleware.py | developmentseed/planetary-computer-apis | 174db793bfe9f572fff13b04e13bac1005d212fc | [
"MIT"
] | 10 | 2021-11-02T16:09:58.000Z | 2022-03-25T18:32:15.000Z | import logging
from typing import Awaitable, Callable
from fastapi import HTTPException, Request, Response
from fastapi.applications import FastAPI
from starlette.middleware.base import BaseHTTPMiddleware
from starlette.types import Message
from pccommon.logging import get_custom_dimensions
from pccommon.tracing impo... | 30.3125 | 83 | 0.715464 |
2174d4652b10b0ae3ca20759b7c130f52924aef7 | 12,007 | py | Python | wrangle.py | scijava/javadoc-wrangler | f77b74171d405140e1f56e1694ac70dedc265454 | [
"Unlicense"
] | null | null | null | wrangle.py | scijava/javadoc-wrangler | f77b74171d405140e1f56e1694ac70dedc265454 | [
"Unlicense"
] | null | null | null | wrangle.py | scijava/javadoc-wrangler | f77b74171d405140e1f56e1694ac70dedc265454 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
#
# wrangle.py - Unpack javadoc JARs into a coherent multi-project structure.
#
import logging, os, re, subprocess, sys
from pathlib import Path
from typing import Sequence
from urllib import request
from xml.etree import ElementTree as ET
from zipfile import ZipFile
# -- Constants --
scriptDi... | 34.110795 | 94 | 0.61764 |
2174dd8aa536be6a286b4b1bd0ba1904ef959c77 | 4,571 | py | Python | pytealutils/blob/blob.py | gmcgoldr/pyteal-utils | 3716ff74312d5136df89456e3db711037edccdcb | [
"MIT"
] | 1 | 2021-12-06T21:58:47.000Z | 2021-12-06T21:58:47.000Z | pytealutils/blob/blob.py | gmcgoldr/pyteal-utils | 3716ff74312d5136df89456e3db711037edccdcb | [
"MIT"
] | null | null | null | pytealutils/blob/blob.py | gmcgoldr/pyteal-utils | 3716ff74312d5136df89456e3db711037edccdcb | [
"MIT"
] | null | null | null | from pyteal import *
pageSize = Int(127)
@Subroutine(TealType.bytes)
def intkey(i: TealType.uint64) -> Expr:
return Extract(Itob(i), Int(7), Int(1))
@Subroutine(TealType.bytes)
def safeSub(b: TealType.bytes, start: TealType.uint64, stop: TealType.uint64) -> Expr:
return (
If(b == Bytes(""))
... | 30.072368 | 88 | 0.431197 |
21753552f6a0a8a22903bd15173a600d40fc726c | 527 | py | Python | examples/example_opt.py | lcmd-epfl/Q-stack | c9f30bf0adc8cfbca33cbd4d991aafc315b6e000 | [
"MIT"
] | null | null | null | examples/example_opt.py | lcmd-epfl/Q-stack | c9f30bf0adc8cfbca33cbd4d991aafc315b6e000 | [
"MIT"
] | null | null | null | examples/example_opt.py | lcmd-epfl/Q-stack | c9f30bf0adc8cfbca33cbd4d991aafc315b6e000 | [
"MIT"
] | null | null | null | import os
from qstack import compound, fields,basis_opt
path = os.path.dirname(os.path.realpath(__file__))
mol = compound.xyz_to_mol(path+'/data/H2O.xyz', 'def2svp', charge=0, spin=0)
dm = fields.dm.get_converged_dm(mol,xc="pbe")
otpd, grid = fields.hf_otpd.hf_otpd(mol, dm, return_all = True )
opt_dict = {'atom':mol... | 37.642857 | 113 | 0.72296 |
21755f2c45dddf5150e338bc78dba2c38553b7fc | 939 | py | Python | recyclus_gateway/db.py | yarden-livnat/cyclus_gateway | 211410817a7d0c7cff98dc678624640fd54f92cd | [
"BSD-3-Clause"
] | null | null | null | recyclus_gateway/db.py | yarden-livnat/cyclus_gateway | 211410817a7d0c7cff98dc678624640fd54f92cd | [
"BSD-3-Clause"
] | null | null | null | recyclus_gateway/db.py | yarden-livnat/cyclus_gateway | 211410817a7d0c7cff98dc678624640fd54f92cd | [
"BSD-3-Clause"
] | null | null | null | from flask_sqlalchemy import SQLAlchemy, Model
class CRUDMixin(Model):
"""Mixin that adds convenience methods for CRUD (create, read, update, delete) operations."""
@classmethod
def create(cls, **kwargs):
"""Create a new record and save it the database."""
instance = cls(**kwargs)
... | 28.454545 | 97 | 0.616613 |
217570fddf0e4df7ab83d7ca080a1fd260ae735f | 2,615 | py | Python | pydemic/formulas/seir.py | PyDemic/pydemic | 7e748e4bbe5c1f7fb209271af0ff8afb8fbd4fd5 | [
"MIT"
] | 3 | 2020-05-10T23:52:41.000Z | 2021-08-31T14:38:24.000Z | pydemic/formulas/seir.py | PyDemic/pydemic | 7e748e4bbe5c1f7fb209271af0ff8afb8fbd4fd5 | [
"MIT"
] | 1 | 2020-09-27T03:26:51.000Z | 2022-03-30T12:18:08.000Z | pydemic/formulas/seir.py | PyDemic/pydemic | 7e748e4bbe5c1f7fb209271af0ff8afb8fbd4fd5 | [
"MIT"
] | 1 | 2020-10-01T04:07:39.000Z | 2020-10-01T04:07:39.000Z | import numpy as np
from . import sir
from .base import formula
IGNORE = tuple(x for x in sir.IGNORE if x != "sigma")
seir_formula = lambda ignore=(): formula("SEIR", ignore=(*ignore, *IGNORE))
R0 = sir.R0.register("SEIR")
beta = sir.beta.register("SEIR")
@seir_formula()
def R0_from_K(K, gamma, sigma) -> float:
... | 27.526316 | 81 | 0.642447 |
2175742fcdd98729b82c062b1ec48a3f0474a56b | 1,476 | py | Python | rbc/thrift/dispatcher.py | krunalkharat/rbc | f3a4665bde03d2cef6521dcea030f22236435f79 | [
"BSD-3-Clause"
] | null | null | null | rbc/thrift/dispatcher.py | krunalkharat/rbc | f3a4665bde03d2cef6521dcea030f22236435f79 | [
"BSD-3-Clause"
] | null | null | null | rbc/thrift/dispatcher.py | krunalkharat/rbc | f3a4665bde03d2cef6521dcea030f22236435f79 | [
"BSD-3-Clause"
] | null | null | null | """Dispatcher class implements RPC methods that are executed on the
server.
"""
# Author: Pearu Peterson
# Created: February 2019
import os
from .utils import resolve_includes
from ..utils import runcommand
class Dispatcher(object):
"""Default implementation of a dispatcher.
"""
def __init__(self, serve... | 28.941176 | 75 | 0.612466 |
21759cb7f520774f9fa36c5e933fb7811616c867 | 19,605 | py | Python | syft/generic/pointers/pointer_tensor.py | yeggasd/PySyft | cb71c978d1fb545f64daf71ac31ad12583fc0bc2 | [
"Apache-2.0"
] | null | null | null | syft/generic/pointers/pointer_tensor.py | yeggasd/PySyft | cb71c978d1fb545f64daf71ac31ad12583fc0bc2 | [
"Apache-2.0"
] | null | null | null | syft/generic/pointers/pointer_tensor.py | yeggasd/PySyft | cb71c978d1fb545f64daf71ac31ad12583fc0bc2 | [
"Apache-2.0"
] | null | null | null | from typing import List
from typing import Union
import syft
from syft.generic.frameworks.hook.hook_args import one
from syft.generic.frameworks.hook.hook_args import register_type_rule
from syft.generic.frameworks.hook.hook_args import register_forward_func
from syft.generic.frameworks.hook.hook_args import register_... | 37.994186 | 100 | 0.619383 |
2175abad7b51f16d78ffbb29bcfce5a7ccc2481b | 414 | py | Python | leetcode/496. Next Greater Element I/soln.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 3 | 2017-02-15T20:55:04.000Z | 2018-09-26T18:48:24.000Z | leetcode/496. Next Greater Element I/soln.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 4 | 2017-10-07T18:59:20.000Z | 2019-10-08T05:43:25.000Z | leetcode/496. Next Greater Element I/soln.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 1 | 2017-10-08T06:52:21.000Z | 2017-10-08T06:52:21.000Z | class Solution:
def nextGreaterElement(self, nums1: List[int], nums2: List[int]) -> List[int]:
res = {}
stack = []
for index, num in enumerate(nums2):
while stack and stack[-1] < num:
elePopped = stack.pop()
res[elePopped] = num
stack.a... | 34.5 | 82 | 0.52657 |
2175c94e54ee016f5f060709624e511937396a3e | 2,085 | py | Python | d2_api/views.py | cortical-iv/restit | f1082294059528fb5bf0a73f7a73bf563f96220d | [
"MIT"
] | 2 | 2017-11-30T05:45:53.000Z | 2017-12-26T06:21:30.000Z | d2_api/views.py | cortical-iv/restit | f1082294059528fb5bf0a73f7a73bf563f96220d | [
"MIT"
] | 3 | 2020-02-12T00:07:34.000Z | 2021-06-10T19:44:23.000Z | d2_api/views.py | cortical-iv/restit | f1082294059528fb5bf0a73f7a73bf563f96220d | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.contrib import messages
from .forms import SubmitUserName
from .models import User
#import utils #I have no idea why this doesn't work
from .utils import add_user
def index(requ... | 36.578947 | 107 | 0.667626 |
21760f55c6c2e31d07c844be2420bbe0e84b4a4f | 4,786 | py | Python | python/odml/examples/example_create_1.3.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/examples/example_create_1.3.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/examples/example_create_1.3.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | import odml
import os
from distutils.version import LooseVersion as CheckVer
if not CheckVer(odml.__version__) < CheckVer('1.4.0'):
print("odml version 1.3 or lesser required")
quit()
wdir = "/home/msonntag/Chaos/work/x_odml/tmp"
fn_base = "1.3.3_example.%s"
doc = odml.Document(author="author", date="2018-0... | 50.378947 | 119 | 0.664647 |
21765323110eefc66f08935fc16747771a9467d6 | 384 | py | Python | irc_hooky/webhook.py | byorgey/irc-hooky | e78942b7e13ce273c40815863d0384dddfa52243 | [
"MIT"
] | 19 | 2016-01-26T18:36:38.000Z | 2022-03-12T02:32:01.000Z | irc_hooky/webhook.py | byorgey/irc-hooky | e78942b7e13ce273c40815863d0384dddfa52243 | [
"MIT"
] | 3 | 2016-01-29T19:43:25.000Z | 2019-03-11T20:21:11.000Z | irc_hooky/webhook.py | byorgey/irc-hooky | e78942b7e13ce273c40815863d0384dddfa52243 | [
"MIT"
] | 2 | 2016-03-01T09:23:07.000Z | 2020-04-01T21:53:51.000Z | from abc import ABCMeta
from abc import abstractmethod
import logging
class Webhook(object):
__metaclass__ = ABCMeta
def __init__(self, event, context):
self.log = logging.getLogger("irchooky")
self.event = event
self.context = context
self.irc_message = ""
@abstractmetho... | 21.333333 | 48 | 0.661458 |
217662ec6d8f824e5187a02866eb11cafb9d0c1d | 3,724 | py | Python | experiments/ashvin/icml2020/hand/sparsity/bc/door_sparse1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/sparsity/bc/door_sparse1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/sparsity/bc/door_sparse1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | """
AWR + SAC from demo experiment
"""
from rlkit.demos.source.dict_to_mdp_stacked_path_loader import DictToMDPStackedPathLoader
from rlkit.launchers.experiments.awac.awac_rl import experiment, process_args
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.arglauncher import run_variants
from rlkit.torch.... | 29.792 | 89 | 0.563373 |
21769c4687a5ffc1d10e2064f4e5054c8f407660 | 5,831 | py | Python | pheasant/core/converter.py | timvink/pheasant | eb5b0a8b5473baad5ad4903984433fe763f5312e | [
"MIT"
] | 24 | 2018-05-25T15:23:30.000Z | 2021-06-09T10:56:52.000Z | pheasant/core/converter.py | timvink/pheasant | eb5b0a8b5473baad5ad4903984433fe763f5312e | [
"MIT"
] | 14 | 2019-04-30T10:51:01.000Z | 2020-09-16T20:37:30.000Z | pheasant/core/converter.py | timvink/pheasant | eb5b0a8b5473baad5ad4903984433fe763f5312e | [
"MIT"
] | 9 | 2019-06-12T10:54:18.000Z | 2022-01-15T21:19:05.000Z | import datetime
import os
from collections import OrderedDict
from contextlib import contextmanager
from dataclasses import field
from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional
from pheasant.core.base import Base
from pheasant.core.page import Page
from pheasant.core.parser import Parser
fr... | 29.00995 | 83 | 0.583776 |
2176a5ec355cb29a3ff605d43e2eeae382aa52e6 | 1,082 | py | Python | tests/test_provider_mrcrilly_awx.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | tests/test_provider_mrcrilly_awx.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | tests/test_provider_mrcrilly_awx.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # tests/test_provider_mrcrilly_awx.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:12:44 UTC)
def test_provider_import():
import terrascript.provider.mrcrilly.awx
def test_resource_import():
from terrascript.resource.mrcrilly.awx import awx_credential_azure_key_vault
from terrascript.... | 29.243243 | 80 | 0.774492 |
2176bbd445637a6774de30cf754a2e43fe37de2c | 1,805 | py | Python | auth_uuid/migrations/0001_initial.py | exolever/django-simple-user | 8c7f4e78b5da434cd3960e59d9b08cf69a636e0a | [
"MIT"
] | null | null | null | auth_uuid/migrations/0001_initial.py | exolever/django-simple-user | 8c7f4e78b5da434cd3960e59d9b08cf69a636e0a | [
"MIT"
] | 1 | 2019-09-02T15:41:57.000Z | 2019-09-02T15:41:57.000Z | auth_uuid/migrations/0001_initial.py | exolever/django-simple-user | 8c7f4e78b5da434cd3960e59d9b08cf69a636e0a | [
"MIT"
] | null | null | null | # Generated by Django 2.1.1 on 2018-10-04 09:29
import auth_uuid.manager
from django.db import migrations, models
import django.utils.timezone
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0009_alter_user_last_name_max_length'),
]
operations =... | 45.125 | 266 | 0.629363 |
2176d74fa0add9be37d8454a3df5dd6c51807e7b | 2,269 | py | Python | webservices/calendar.py | adborden/openFEC | 53a0a2b1a56292c5ca8e7a3185832baaed4a63d9 | [
"CC0-1.0"
] | 246 | 2015-01-07T16:59:42.000Z | 2020-01-18T20:35:05.000Z | webservices/calendar.py | adborden/openFEC | 53a0a2b1a56292c5ca8e7a3185832baaed4a63d9 | [
"CC0-1.0"
] | 2,532 | 2015-01-02T16:22:46.000Z | 2018-03-08T17:30:53.000Z | webservices/calendar.py | 18F/openFEC | ee7b7368e0934f50c391789fb55444f811c1a2f7 | [
"CC0-1.0"
] | 75 | 2015-02-01T00:46:56.000Z | 2021-02-14T10:51:34.000Z | import io
import csv
import datetime
import functools
import pytz
from icalendar import Event, Calendar
from marshmallow import Schema, fields
timezone = pytz.timezone('US/Eastern')
def render_date(value, fmt=True):
return (
value.isoformat()
if value and fmt
else value
)
def localiz... | 26.694118 | 80 | 0.65227 |
2176e196b96f6be63f7a7655abe1c8a603b4e615 | 2,575 | py | Python | TinderBot /app.py | wallaceleonel/Automatizando- | f8086f01f8c56041902b5f6b28accdac0f60ebe5 | [
"MIT"
] | 1 | 2021-10-06T22:58:46.000Z | 2021-10-06T22:58:46.000Z | TinderBot /app.py | wallaceleonel/Automatizando- | f8086f01f8c56041902b5f6b28accdac0f60ebe5 | [
"MIT"
] | 4 | 2021-09-24T16:03:28.000Z | 2021-11-24T01:13:53.000Z | TinderBot /app.py | wallaceleonel/Automatizando- | f8086f01f8c56041902b5f6b28accdac0f60ebe5 | [
"MIT"
] | null | null | null | from selenium import webdriver
from time import sleep
class TinderBot:
def __init__(self):
self.driver = webdriver.Chrome(executable_path='chromedriver.exe')
self.driver.get('https://www.tinder.com')
sleep(4)
def login(self):
botao_login = self.driver.find_element... | 32.594937 | 108 | 0.54835 |
2176f17be157049089e79fa38c4f9f59ed375cbb | 662 | py | Python | tests/metaworlds/test_logger.py | rlworkgroup/metaworlds | be03cfed9890a37b84283c597209b849e8a086cc | [
"MIT"
] | 5 | 2019-02-27T20:55:30.000Z | 2019-08-24T19:24:41.000Z | tests/metaworlds/test_logger.py | rlworkgroup/metaworlds | be03cfed9890a37b84283c597209b849e8a086cc | [
"MIT"
] | 8 | 2019-02-28T04:07:10.000Z | 2020-01-02T10:54:10.000Z | tests/metaworlds/test_logger.py | rlworkgroup/metaworlds | be03cfed9890a37b84283c597209b849e8a086cc | [
"MIT"
] | 1 | 2021-09-13T18:35:34.000Z | 2021-09-13T18:35:34.000Z | """
Auxiliary coverage test for logger.
This test covers snapshot and parameter logging.
"""
import os
from types import SimpleNamespace
import unittest
import matplotlib.pyplot as plt
import numpy as np
from metaworlds.misc import logger
class TestLogger(unittest.TestCase):
def test_logger(self):
args... | 23.642857 | 51 | 0.678248 |
2177063d4f340f3e2023f9cf414cd95229f5e721 | 2,191 | py | Python | example/exampleapp/tests.py | olivierdalang/django-computedfields | 13a5c107904e7596eeafe948ffc66c9702d95589 | [
"MIT"
] | null | null | null | example/exampleapp/tests.py | olivierdalang/django-computedfields | 13a5c107904e7596eeafe948ffc66c9702d95589 | [
"MIT"
] | null | null | null | example/exampleapp/tests.py | olivierdalang/django-computedfields | 13a5c107904e7596eeafe948ffc66c9702d95589 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
from .models import Foo, Bar, Baz
from computedfields.models import ComputedFieldsAdminModel, ComputedFieldsModelType
from computedfields.admin import ComputedModelsAdmin
from django.contrib.admin.sites import AdminSite
c... | 37.775862 | 86 | 0.697398 |
21771513bc9cd5b8bd261321b82cbb344d7fc380 | 8,098 | py | Python | appengine/monorail/framework/paginate.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | appengine/monorail/framework/paginate.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | appengine/monorail/framework/paginate.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 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 or at
# https://developers.google.com/open-source/licenses/bsd
"""Classes that help display pagination widgets for result sets."""
from __future__ import prin... | 39.696078 | 79 | 0.721289 |
2177789cac9d665bd1d9fcc41da09424678f8af9 | 4,747 | py | Python | leetcode_python/String/next-closest-time.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/String/next-closest-time.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/String/next-closest-time.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | """
# https://ttzztt.gitbooks.io/lc/content/string/next-closet-time.html
681. Next Closest Time
Medium
Given a time represented in the format "HH:MM", form the next closest time by reusing the current digits. There is no limit on how many times a digit can be reused.
You may assume the given input string is always ... | 30.625806 | 164 | 0.550664 |
2177a8ccfd97f02b5baf576034875391b8506136 | 807 | py | Python | CADMium/examples/Kohn_Sham/H_KS.py | wasserman-group/CADMium | 0d0e16f8965e0a3acfea9ea6ba5dd0d51f1bdc55 | [
"BSD-3-Clause"
] | null | null | null | CADMium/examples/Kohn_Sham/H_KS.py | wasserman-group/CADMium | 0d0e16f8965e0a3acfea9ea6ba5dd0d51f1bdc55 | [
"BSD-3-Clause"
] | 1 | 2021-05-12T17:24:27.000Z | 2021-05-12T17:24:27.000Z | CADMium/examples/Kohn_Sham/H_KS.py | VHchavez/CADMium | 39f3bd63ca69502a80c677855da72f9e691b57e2 | [
"BSD-3-Clause"
] | 2 | 2020-10-07T20:48:56.000Z | 2021-04-22T19:06:18.000Z | import numpy as np
from CADMium import Psgrid
from CADMium.kohnsham import scf
from CADMium import Kohnsham
#Distance of the nucley from grid center
a = 1.0
#Nuclear charges on centers AB
Za = 1
Zb = 0
#Set polaization. 1 Unpolarized, 2 Polarized
pol = 1
Nmo = [[1]]
N = [[1]]
optKS = {
"interaction_ty... | 20.175 | 57 | 0.662949 |
217800df77900d36264041efaf727b57f76005d2 | 3,126 | py | Python | next/api/resources/experiment.py | sumeetsk/NEXT-1 | c42badbcaeb0ab79ab1f74b6303ecc3864b1c7ee | [
"Apache-2.0"
] | null | null | null | next/api/resources/experiment.py | sumeetsk/NEXT-1 | c42badbcaeb0ab79ab1f74b6303ecc3864b1c7ee | [
"Apache-2.0"
] | null | null | null | next/api/resources/experiment.py | sumeetsk/NEXT-1 | c42badbcaeb0ab79ab1f74b6303ecc3864b1c7ee | [
"Apache-2.0"
] | null | null | null | from flask import Flask
from flask_restful import Resource, reqparse, request
import json
import random
import next.utils as utils
import next.broker.broker
from next.api.resource_manager import ResourceManager
from next.api.api_util import *
from next.api.api_util import APIArgument
resource_manager = ResourceManager... | 36.348837 | 137 | 0.65579 |
21783cee184b78ee0edcaf1d76873cd9f4139719 | 20,474 | py | Python | sharkdata_core/ices_xml_generator/export_ices_format.py | markusSMHI/sharkdata_py3 | 129a250e1729cfef10994f0778d1243a05f9cf8a | [
"MIT"
] | null | null | null | sharkdata_core/ices_xml_generator/export_ices_format.py | markusSMHI/sharkdata_py3 | 129a250e1729cfef10994f0778d1243a05f9cf8a | [
"MIT"
] | null | null | null | sharkdata_core/ices_xml_generator/export_ices_format.py | markusSMHI/sharkdata_py3 | 129a250e1729cfef10994f0778d1243a05f9cf8a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Copyright (c) 2013-present SMHI, Swedish Meteorological and Hydrological Institute
# License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit).
import codecs
from django.conf import settings
import sharkdata_core
class IcesXmlGenerator(obj... | 49.454106 | 135 | 0.492332 |
21783e10268def6c096f2c14ccb0abcf80f4773f | 8,157 | py | Python | src/lxrt/file_utils.py | muziyongshixin/pytorch_SSRP | e54b3098927ba2ff16bdc8f64f3a2bf46d1f72c5 | [
"MIT"
] | 1 | 2022-01-11T06:29:01.000Z | 2022-01-11T06:29:01.000Z | src/lxrt/file_utils.py | muziyongshixin/pytorch_SSRP | e54b3098927ba2ff16bdc8f64f3a2bf46d1f72c5 | [
"MIT"
] | null | null | null | src/lxrt/file_utils.py | muziyongshixin/pytorch_SSRP | e54b3098927ba2ff16bdc8f64f3a2bf46d1f72c5 | [
"MIT"
] | null | null | null | """
Utilities for working with the local dataset cache.
This file is adapted from the AllenNLP library at https://github.com/allenai/allennlp
Copyright by the AllenNLP authors.
"""
import json
import logging
import os
import shutil
import tempfile
from functools import wraps
from hashlib import sha256
import sys
from i... | 33.024291 | 125 | 0.655878 |
21786f0e765f5fbd839d312cdcfc232d1a3c742e | 744 | py | Python | contrib/go/src/python/pants/contrib/go/tasks/go_checkstyle.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 1 | 2021-05-05T18:58:28.000Z | 2021-05-05T18:58:28.000Z | contrib/go/src/python/pants/contrib/go/tasks/go_checkstyle.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | null | null | null | contrib/go/src/python/pants/contrib/go/tasks/go_checkstyle.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 3 | 2020-06-30T08:28:13.000Z | 2021-07-28T09:35:57.000Z | # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pants.base.exceptions import TaskError
from pants.task.lint_task_mixin import LintTaskMixin
from pants.contrib.go.tasks.go_fmt_task_base import GoFmtTaskBase
class GoCheckstyle(Lin... | 33.818182 | 80 | 0.711022 |
2178868afa29378ec7d63df9cd29055e6e4c7277 | 25,717 | py | Python | src/qtt/gui/live_plotting.py | eendebakpt/qtt | 40f002b9fb7345e0312bbe8769ab12ecb12a2606 | [
"MIT"
] | null | null | null | src/qtt/gui/live_plotting.py | eendebakpt/qtt | 40f002b9fb7345e0312bbe8769ab12ecb12a2606 | [
"MIT"
] | null | null | null | src/qtt/gui/live_plotting.py | eendebakpt/qtt | 40f002b9fb7345e0312bbe8769ab12ecb12a2606 | [
"MIT"
] | null | null | null | # %% Load packages
import time
import logging
import numpy as np
from functools import partial
import qtpy.QtWidgets as QtWidgets
import qtpy.QtCore as QtCore
from qtpy.QtCore import Signal
import pyqtgraph as pg
import pyqtgraph
import pyqtgraph.multiprocess as mp
import qcodes
import qtt
from qtt import pgeometry
imp... | 35.325549 | 117 | 0.552164 |
21789621d93c0888bf51c0c385ed98a8f9c58f80 | 31,111 | py | Python | app/repositories/ln_impl/protos/router_pb2_grpc.py | geco91/blitz_api | 42538a77b3de6a032bb6fdb60249433a0ad5ec56 | [
"MIT"
] | 9 | 2021-06-22T01:00:12.000Z | 2022-03-16T08:57:37.000Z | app/repositories/ln_impl/protos/router_pb2_grpc.py | geco91/blitz_api | 42538a77b3de6a032bb6fdb60249433a0ad5ec56 | [
"MIT"
] | 63 | 2021-07-17T19:42:12.000Z | 2022-03-30T16:41:24.000Z | app/repositories/ln_impl/protos/router_pb2_grpc.py | geco91/blitz_api | 42538a77b3de6a032bb6fdb60249433a0ad5ec56 | [
"MIT"
] | 5 | 2021-07-13T18:52:23.000Z | 2022-03-25T10:43:10.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import app.repositories.ln_impl.protos.lightning_pb2 as lightning__pb2
import app.repositories.ln_impl.protos.router_pb2 as router__pb2
class RouterStub(object... | 35.677752 | 94 | 0.642506 |
2178a2a0d24939a226df7b37c2511108c0bd2f57 | 1,174 | py | Python | RunGrinchShow.py | brucelowekamp/christmaslights | 6919fef55c6d3e5e8e2e6289a83fc66f47d2f9d9 | [
"MIT"
] | null | null | null | RunGrinchShow.py | brucelowekamp/christmaslights | 6919fef55c6d3e5e8e2e6289a83fc66f47d2f9d9 | [
"MIT"
] | null | null | null | RunGrinchShow.py | brucelowekamp/christmaslights | 6919fef55c6d3e5e8e2e6289a83fc66f47d2f9d9 | [
"MIT"
] | null | null | null | # run overall system
# note, beleive this is obsolete with showname being command line but confirm once we have the grinch show set up again
from ola.ClientWrapper import ClientWrapper
from Relays import Relays
from Show import Show
from Options import Options
import os
import sys
import time
pythonexec = sys.execut... | 21.345455 | 119 | 0.746167 |
2178d6df24de70bc1a1865c56a8db2d36cd60bb4 | 877 | py | Python | tests/test_schema.py | bulentozel/omdata | 693c1782f61527db6f73f396656556c161a93722 | [
"Apache-2.0"
] | null | null | null | tests/test_schema.py | bulentozel/omdata | 693c1782f61527db6f73f396656556c161a93722 | [
"Apache-2.0"
] | null | null | null | tests/test_schema.py | bulentozel/omdata | 693c1782f61527db6f73f396656556c161a93722 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""The unit testing suite for the class methods of :obj:`Schema`.
"""
import sys, os
sys.path.insert(0, os.path.abspath('../'))
from unittest import TestCase
from omdata.design import inspect
test_schema_file = "data/samples/omsurvey.schema"
params = ['fields-top', 'fields-all', 'fields-requi... | 30.241379 | 69 | 0.662486 |
2178e1935fcf8d1d7cfb0d292dce1d2141d4917b | 78,068 | py | Python | old_projects/bell.py | dezren39/manim | 80d7742446c588dc296bd3afb3465a63b63383db | [
"MIT"
] | 1 | 2020-07-05T12:56:31.000Z | 2020-07-05T12:56:31.000Z | old_projects/bell.py | elphasminyato/manim | 8488b621ef3367e6a911354d2765684321fed20e | [
"MIT"
] | 3 | 2021-09-08T02:19:38.000Z | 2022-03-12T00:41:00.000Z | old_projects/bell.py | dezren39/manim | 80d7742446c588dc296bd3afb3465a63b63383db | [
"MIT"
] | 1 | 2020-07-05T12:56:33.000Z | 2020-07-05T12:56:33.000Z | from big_ol_pile_of_manim_imports import *
from tqdm import tqdm as ProgressDisplay
from waves import *
#force_skipping
#revert_to_original_skipping_status
class PhotonPassesCompletelyOrNotAtAll(DirectionOfPolarizationScene):
CONFIG = {
"pol_filter_configs" : [{
"include_arrow_label" : False... | 31.593687 | 86 | 0.546933 |
2178eda1d0a6dcd28fae1acf4d28b315dfc89bd7 | 7,596 | py | Python | habitat_baselines/rl/ppo/policy.py | NicoGrande/habitat-api | baafd1c13c95043d4b31b910ffe4ecc1579dd75a | [
"MIT"
] | null | null | null | habitat_baselines/rl/ppo/policy.py | NicoGrande/habitat-api | baafd1c13c95043d4b31b910ffe4ecc1579dd75a | [
"MIT"
] | null | null | null | habitat_baselines/rl/ppo/policy.py | NicoGrande/habitat-api | baafd1c13c95043d4b31b910ffe4ecc1579dd75a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import abc
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from habitat_baselines... | 32.741379 | 87 | 0.62217 |
21790fe7fd29c1d087ce0fdd9d28bbb1f6b5fa88 | 12,991 | py | Python | panoptes_aggregation/tests/scripts_tests/test_reduce_csv.py | amyrebecca/aggregation-for-caesar | 5f0d884932312010f9caeb8ebfcfe358f490e41f | [
"Apache-2.0"
] | null | null | null | panoptes_aggregation/tests/scripts_tests/test_reduce_csv.py | amyrebecca/aggregation-for-caesar | 5f0d884932312010f9caeb8ebfcfe358f490e41f | [
"Apache-2.0"
] | null | null | null | panoptes_aggregation/tests/scripts_tests/test_reduce_csv.py | amyrebecca/aggregation-for-caesar | 5f0d884932312010f9caeb8ebfcfe358f490e41f | [
"Apache-2.0"
] | null | null | null | import unittest
from unittest.mock import patch, MagicMock, call
from io import StringIO
import os
import pandas
from pandas.util.testing import assert_frame_equal
import panoptes_aggregation.scripts.reduce_panoptes_csv as reduce_panoptes_csv
extracted_csv_question = '''classification_id,user_name,user_id,workflow_id,... | 48.655431 | 191 | 0.717189 |
21792a9f472c64d550e3f8ba5eef10a7b28b8010 | 421 | py | Python | flaskr/rss.py | Muhammad-R/flaskr | 16f33963653fa758c9402b91f2f4723ba3d7a6db | [
"MIT"
] | 2 | 2021-03-04T08:23:20.000Z | 2021-12-19T16:41:54.000Z | flaskr/rss.py | Muhammad-R/flaskr | 16f33963653fa758c9402b91f2f4723ba3d7a6db | [
"MIT"
] | null | null | null | flaskr/rss.py | Muhammad-R/flaskr | 16f33963653fa758c9402b91f2f4723ba3d7a6db | [
"MIT"
] | 2 | 2021-09-14T20:57:35.000Z | 2021-12-19T15:26:58.000Z | from flask import Blueprint, render_template
from flaskr.db import get_db
bp = Blueprint("rss", __name__)
@bp.route("/feed.rss")
def send_feed():
db = get_db()
posts = db.execute(
"SELECT p.id, p.title, p.created, u.username"
" FROM post p "
" JOIN user u ON p.author_id = u.id"
... | 23.388889 | 58 | 0.624703 |
2179635113d057bba711ea3e1ac0c48b8ecdeed3 | 2,269 | py | Python | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/13_ext_60_40/predict_5fold_2.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/13_ext_60_40/predict_5fold_2.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/13_ext_60_40/predict_5fold_2.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | import os, sys
#os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
#os.environ["CUDA_VISIBLE_DEVICES"]="1"
import numpy as np
import pandas as pd
from tqdm import tqdm
import numpy as np
import pandas as pd
eps = 0.004
desired = {
0: 0.36239782,
1: 0.043841336,
2: 0.075268817,
3: 0.059322034,
4: 0... | 24.663043 | 77 | 0.653592 |
21796820be23130c19f0f5a87e24514e97263ee7 | 596 | py | Python | pyro/contrib/epidemiology/__init__.py | themrzmaster/pyro | 10f2912a107e3bd32a67ccaef2bbbab425d23da7 | [
"Apache-2.0"
] | null | null | null | pyro/contrib/epidemiology/__init__.py | themrzmaster/pyro | 10f2912a107e3bd32a67ccaef2bbbab425d23da7 | [
"Apache-2.0"
] | null | null | null | pyro/contrib/epidemiology/__init__.py | themrzmaster/pyro | 10f2912a107e3bd32a67ccaef2bbbab425d23da7 | [
"Apache-2.0"
] | null | null | null | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
from .compartmental import CompartmentalModel
from .distributions import infection_dist
from .models import (RegionalSIRModel, SimpleSEIRModel, SimpleSIRModel, SparseSIRModel, SuperspreadingSEIRModel,
Superspreadin... | 29.8 | 112 | 0.75 |
2179728f5a4c46e18bd2b100c6c4af8e56d97a4f | 4,112 | py | Python | lewis_emulators/danfysik/interfaces/dfkps_8500.py | ISISComputingGroup/EPICS-DeviceEmulator | 026c2a14a16bb204ea7527e3765daa182cafa814 | [
"BSD-3-Clause"
] | 2 | 2020-10-20T16:49:13.000Z | 2021-02-19T10:41:44.000Z | lewis_emulators/danfysik/interfaces/dfkps_8500.py | ISISComputingGroup/EPICS-DeviceEmulator | 026c2a14a16bb204ea7527e3765daa182cafa814 | [
"BSD-3-Clause"
] | 9 | 2019-03-22T15:35:15.000Z | 2021-07-28T11:05:43.000Z | lewis_emulators/danfysik/interfaces/dfkps_8500.py | ISISComputingGroup/EPICS-DeviceEmulator | 026c2a14a16bb204ea7527e3765daa182cafa814 | [
"BSD-3-Clause"
] | 1 | 2020-10-21T17:02:44.000Z | 2020-10-21T17:02:44.000Z | """
Stream device for danfysik 8500
"""
from lewis.adapters.stream import StreamInterface
from lewis.core.logging import has_log
from lewis.utils.command_builder import CmdBuilder
from lewis.utils.replies import conditional_reply
from .dfkps_base import CommonStreamInterface
__all__ = ["Danfysik8500StreamInterface"]
... | 44.215054 | 112 | 0.622082 |
2179d66593b777116ca56277a3e1fd7a1e8f2793 | 2,891 | py | Python | google-cloud-sdk/lib/surface/service_management/remove_iam_policy_binding.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/surface/service_management/remove_iam_policy_binding.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/service_management/remove_iam_policy_binding.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 35.256098 | 76 | 0.755448 |
2179dd7d9a6313ee92621fd5af9c094b4626201b | 9,548 | py | Python | src/main_window.py | trip2eee/pycov | 255acef48e737688a5802f5318d7e61d16c21d00 | [
"MIT"
] | null | null | null | src/main_window.py | trip2eee/pycov | 255acef48e737688a5802f5318d7e61d16c21d00 | [
"MIT"
] | null | null | null | src/main_window.py | trip2eee/pycov | 255acef48e737688a5802f5318d7e61d16c21d00 | [
"MIT"
] | null | null | null | import os
import json
import shutil
from PyQt5.QtWidgets import QMainWindow, QAction, qApp
from PyQt5.QtWidgets import QTreeWidget, QTreeWidgetItem, QTreeWidgetItemIterator
from PyQt5.QtWidgets import QProgressBar, QFileDialog
from PyQt5.QtCore import QSize
from src.gcov_parser import GCOVParser
from src.code_window ... | 34.469314 | 109 | 0.577608 |
217a0faff46586d0bdb72365e69b91a4816e9ae1 | 6,494 | py | Python | packages/core/src/RPA/core/locators/database.py | pavelee/rpaframework | 30bf09eb7a3bb3b22f596690791013e0ff2f7b73 | [
"Apache-2.0"
] | null | null | null | packages/core/src/RPA/core/locators/database.py | pavelee/rpaframework | 30bf09eb7a3bb3b22f596690791013e0ff2f7b73 | [
"Apache-2.0"
] | null | null | null | packages/core/src/RPA/core/locators/database.py | pavelee/rpaframework | 30bf09eb7a3bb3b22f596690791013e0ff2f7b73 | [
"Apache-2.0"
] | null | null | null | import base64
import io
import json
import logging
import os
import re
from contextlib import contextmanager
from pathlib import Path
from RPA.core.locators import Locator, BrowserLocator, ImageLocator
@contextmanager
def open_stream(obj, *args, **kwargs):
"""Wrapper for built-in open(), which allows using
ex... | 29.518182 | 83 | 0.583616 |
217a2913eb16bc230e2e3172c6abe704cd5503a1 | 7,955 | py | Python | packages/valory/protocols/acn/custom_types.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 28 | 2021-10-31T18:54:14.000Z | 2022-03-17T13:10:43.000Z | packages/valory/protocols/acn/custom_types.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 66 | 2021-10-31T11:55:48.000Z | 2022-03-31T06:26:23.000Z | packages/valory/protocols/acn/custom_types.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 1 | 2022-03-15T12:34:03.000Z | 2022-03-15T12:34:03.000Z | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2021 aea
#
# 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
#
# ... | 35.355556 | 161 | 0.658077 |
217a455c330fb9b3f147fef94859d9e0a0df2e66 | 1,858 | py | Python | .leetcode/345.reverse-vowels-of-a-string.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/345.reverse-vowels-of-a-string.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/345.reverse-vowels-of-a-string.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=345 lang=python3
#
# [345] Reverse Vowels of a String
#
# https://leetcode.com/problems/reverse-vowels-of-a-string/description/
#
# algorithms
# Easy (45.78%)
# Likes: 1169
# Dislikes: 1580
# Total Accepted: 295.3K
# Total Submissions: 644.7K
# Testcase Example: '"hello"'
#
# Given a string... | 18.58 | 76 | 0.540366 |
217a5a34c4406e708524c0c130c021b1a5bc2398 | 45,544 | py | Python | va.py | teixeirafilipe/vibAnalysis | 27fd4eb17bf6d9a37884348f990d9af565a3573f | [
"MIT"
] | 8 | 2019-09-14T11:00:48.000Z | 2021-03-04T03:47:33.000Z | va.py | haoxy97/vibAnalysis | 9db1d20c63b020e7c6371410c515fdb5dc6592d5 | [
"MIT"
] | 1 | 2021-09-09T10:00:06.000Z | 2021-09-09T10:00:06.000Z | va.py | haoxy97/vibAnalysis | 9db1d20c63b020e7c6371410c515fdb5dc6592d5 | [
"MIT"
] | 6 | 2019-09-14T11:00:54.000Z | 2022-02-28T05:18:14.000Z | #! /usr/bin/env python3
# -*- coding: utf8 -*-
##########################################################################
# #
# Program: va.py Version 1.2.2 Date: 18/07/2019 #
# ... | 33.611808 | 759 | 0.622497 |
217a7a5254ac2d6dc82b55dc12b4c0db4adcd375 | 2,202 | py | Python | rlberry/utils/space_discretizer.py | akrouriad/rlberry | dde4e2cbafca05fdef1df07646bb6368059eeadf | [
"MIT"
] | null | null | null | rlberry/utils/space_discretizer.py | akrouriad/rlberry | dde4e2cbafca05fdef1df07646bb6368059eeadf | [
"MIT"
] | null | null | null | rlberry/utils/space_discretizer.py | akrouriad/rlberry | dde4e2cbafca05fdef1df07646bb6368059eeadf | [
"MIT"
] | null | null | null | import numpy as np
from gym.spaces import Box, Discrete
from rlberry.utils.binsearch import binary_search_nd
from rlberry.utils.binsearch import unravel_index_uniform_bin
class Discretizer:
def __init__(self, space, n_bins):
assert isinstance(
space, Box
), "Discretization is only impl... | 36.7 | 78 | 0.611717 |
217a8a77a35dd3ca4b863de87a6246d21f6c71bf | 3,298 | py | Python | alipay/aop/api/response/AlipayUserPassTemplateQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayUserPassTemplateQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayUserPassTemplateQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.TemplateEvoucherDTO import TemplateEvoucherDTO
from alipay.aop.api.domain.TemplateFileDTO import TemplateFileDTO
from alipay.aop.api.domain.TemplateImageDTO import Temp... | 32.98 | 108 | 0.672226 |
217ad90d262f68be4b4bd1d0eedba83a4eed9f7e | 23,716 | py | Python | fairseq/models/transformer_lm.py | shuo-git/fairseq-pretrain | ebcb8c617ebe65b08a3b5f87130a55bb4861fa47 | [
"MIT"
] | 1 | 2021-11-02T03:02:13.000Z | 2021-11-02T03:02:13.000Z | fairseq/models/transformer_lm.py | shuo-git/fairseq-pretrain | ebcb8c617ebe65b08a3b5f87130a55bb4861fa47 | [
"MIT"
] | null | null | null | fairseq/models/transformer_lm.py | shuo-git/fairseq-pretrain | ebcb8c617ebe65b08a3b5f87130a55bb4861fa47 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from dataclasses import dataclass, field
from typing import Optional
from fairseq import options, utils
from fairseq.dataclass import Choice... | 43.515596 | 129 | 0.700287 |
217ada5aeba0701a37260c72f1e64e646a7d5f0f | 5,376 | py | Python | mtp_noms_ops/urls.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-noms-ops | eb537fb8a8e3adc588d50af1b000402c957b32a7 | [
"MIT"
] | null | null | null | mtp_noms_ops/urls.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-noms-ops | eb537fb8a8e3adc588d50af1b000402c957b32a7 | [
"MIT"
] | null | null | null | mtp_noms_ops/urls.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-noms-ops | eb537fb8a8e3adc588d50af1b000402c957b32a7 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
from django.http import HttpResponse
from django.shortcuts import redirect
from django.template.response import TemplateResponse
from django.urls import reverse, reverse_lazy
from django.utils.tran... | 42 | 113 | 0.700893 |
217aefc3b09e865d445a3888d5618f15c8ed9eb2 | 605 | py | Python | melody/structure/melodic_frame.py | dpazel/music_rep | 2f9de9b98b13df98f1a0a2120b84714725ce527e | [
"MIT"
] | 1 | 2021-05-06T19:45:54.000Z | 2021-05-06T19:45:54.000Z | melody/structure/melodic_frame.py | dpazel/music_rep | 2f9de9b98b13df98f1a0a2120b84714725ce527e | [
"MIT"
] | null | null | null | melody/structure/melodic_frame.py | dpazel/music_rep | 2f9de9b98b13df98f1a0a2120b84714725ce527e | [
"MIT"
] | null | null | null |
class MelodicFrame(object):
def __init__(self, lite_score):
self.__score = lite_score
self.__motifs = list()
@property
def score(self):
return self.__score
@property
def motifs(self):
return self.__motifs
def add_motif(self, motif):
self.__motifs.ap... | 21.607143 | 56 | 0.616529 |
217b1f8f2f68ef2c2b1acffc392fd1f337ab646a | 3,780 | py | Python | misc/scripts/world_mlpg/binary_io2.py | npujcong/speaker_adaptation_voicenet | 24ae3ff41479e217aafa55e24d77a3e6c1357a60 | [
"Apache-2.0"
] | null | null | null | misc/scripts/world_mlpg/binary_io2.py | npujcong/speaker_adaptation_voicenet | 24ae3ff41479e217aafa55e24d77a3e6c1357a60 | [
"Apache-2.0"
] | null | null | null | misc/scripts/world_mlpg/binary_io2.py | npujcong/speaker_adaptation_voicenet | 24ae3ff41479e217aafa55e24d77a3e6c1357a60 | [
"Apache-2.0"
] | null | null | null | ################################################################################
# The Neural Network (NN) based Speech Synthesis System
# https://svn.ecdf.ed.ac.uk/repo/inf/dnn_tts/
#
# Centre for Speech Technology Research
# University of Edinburgh, UK
# ... | 43.448276 | 116 | 0.65873 |
217b2a590c75738fe1627d17ca612b35d9e6e6bb | 20,572 | py | Python | test/test_team.py | DanBenHa/pelita | 557c3a757a24e0f1abe25f7edf5c4ffee83a077e | [
"BSD-2-Clause"
] | null | null | null | test/test_team.py | DanBenHa/pelita | 557c3a757a24e0f1abe25f7edf5c4ffee83a077e | [
"BSD-2-Clause"
] | null | null | null | test/test_team.py | DanBenHa/pelita | 557c3a757a24e0f1abe25f7edf5c4ffee83a077e | [
"BSD-2-Clause"
] | null | null | null | import pytest
from pelita.layout import parse_layout, get_random_layout, initial_positions, layout_as_str
from pelita.game import run_game, setup_game, play_turn
from pelita.player.team import Team
from pelita.utils import setup_test_game
def stopping(bot, state):
return bot.position
def randomBot(bot, state):
... | 37.403636 | 132 | 0.554637 |
217b59660063a19478ba245e8cb831b849768470 | 1,204 | py | Python | troveclient/tests/test_utils.py | citrix-openstack-build/python-troveclient | 4a82591c79b622757dc2e6f1c89a65ca4064f9d3 | [
"Apache-2.0"
] | null | null | null | troveclient/tests/test_utils.py | citrix-openstack-build/python-troveclient | 4a82591c79b622757dc2e6f1c89a65ca4064f9d3 | [
"Apache-2.0"
] | null | null | null | troveclient/tests/test_utils.py | citrix-openstack-build/python-troveclient | 4a82591c79b622757dc2e6f1c89a65ca4064f9d3 | [
"Apache-2.0"
] | null | null | null | import os
from testtools import TestCase
from troveclient import utils
class UtilsTest(TestCase):
def test_add_hookable_mixin(self):
def func():
pass
hook_type = "hook_type"
mixin = utils.HookableMixin()
mixin.add_hook(hook_type, func)
self.assertTrue(hook_typ... | 29.365854 | 73 | 0.644518 |
217b735c81033cb728594dd26db30bedf78f2f67 | 127 | py | Python | data/__init__.py | itcosplay/cryptobot | 6890cfde64a631bf0e4db55f6873a2217212d801 | [
"MIT"
] | null | null | null | data/__init__.py | itcosplay/cryptobot | 6890cfde64a631bf0e4db55f6873a2217212d801 | [
"MIT"
] | null | null | null | data/__init__.py | itcosplay/cryptobot | 6890cfde64a631bf0e4db55f6873a2217212d801 | [
"MIT"
] | null | null | null | from .emoji import all_emoji
from .animation_sticker import sticker
from .config import group_chat
from .config import sms_chat | 31.75 | 38 | 0.850394 |
217b8a63d5ece62862391b852fd50bae421bca10 | 742 | py | Python | alipay/aop/api/response/AlipayCommerceYuntaskAgreementSignResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayCommerceYuntaskAgreementSignResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayCommerceYuntaskAgreementSignResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayCommerceYuntaskAgreementSignResponse(AlipayResponse):
def __init__(self):
super(AlipayCommerceYuntaskAgreementSignResponse, self).__init__()
self._form_data = N... | 28.538462 | 115 | 0.725067 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.