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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
629ed09a63ce2d3e3c056858a380037df443f9bc | 21,512 | py | Python | src/ggrc/views/converters.py | farcry4998/ggrc-core | c469039dabb55033c1b379850feb19e8dda2e2a1 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-01-04T10:55:14.000Z | 2019-01-04T10:55:14.000Z | src/ggrc/views/converters.py | farcry4998/ggrc-core | c469039dabb55033c1b379850feb19e8dda2e2a1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc/views/converters.py | farcry4998/ggrc-core | c469039dabb55033c1b379850feb19e8dda2e2a1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2018 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Main view functions for import and export pages.
This module handles all view related function to import and export pages
including the import/export api endponts.
"""
import re
from functools import w... | 32.544629 | 89 | 0.702306 |
629ed7a6fa35bba80c875c8e517db6c9cca9d88e | 4,380 | py | Python | alipay/aop/api/domain/BusRealtimeInfo.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/BusRealtimeInfo.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/BusRealtimeInfo.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 *
class BusRealtimeInfo(object):
def __init__(self):
self._line_id = None
self._line_name = None
self._seconds_left = None
self._station_id = None
self._station_le... | 30 | 75 | 0.584932 |
629ee4831934be866e8c5b081c2335c87b8ec8bf | 2,208 | py | Python | ExtentionPackages/pysnmp/hlapi/twisted/transport.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | null | null | null | ExtentionPackages/pysnmp/hlapi/twisted/transport.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | null | null | null | ExtentionPackages/pysnmp/hlapi/twisted/transport.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | null | null | null | #
# This file is part of pysnmp software.
#
# Copyright (c) 2005-2016, Ilya Etingof <ilya@glas.net>
# License: http://pysnmp.sf.net/license.html
#
import socket, sys
from pysnmp.carrier.twisted.dgram import udp
from pysnmp.hlapi.transport import AbstractTransportTarget
from pysnmp.error import PySnmpError
__all__ = ['... | 37.423729 | 135 | 0.645833 |
629f0bcf72c01019e64693b372f5cfaa6062421c | 4,850 | py | Python | tests/test_bsplump.py | snake-biscuits/bsp_tool | f2a1ab3ff502d0ca4ade97ff6e44823d2f8f5773 | [
"MIT"
] | 44 | 2018-07-06T04:44:02.000Z | 2022-03-27T02:18:37.000Z | tests/test_bsplump.py | snake-biscuits/bsp_tool | f2a1ab3ff502d0ca4ade97ff6e44823d2f8f5773 | [
"MIT"
] | 18 | 2018-07-25T23:19:17.000Z | 2022-03-16T23:59:36.000Z | tests/test_bsplump.py | snake-biscuits/bsp_tool | f2a1ab3ff502d0ca4ade97ff6e44823d2f8f5773 | [
"MIT"
] | 12 | 2019-09-13T21:52:51.000Z | 2022-03-22T18:04:21.000Z | import pytest
from bsp_tool import load_bsp, lumps
from bsp_tool.branches.id_software import quake, quake3
# TODO: use maplist.installed_games + tests/maps/*.bsp
global bsps
bsps = {"test2": load_bsp("tests/maps/test2.bsp"),
"upward": load_bsp("tests/maps/pl_upward.bsp"),
"bigbox": load_bsp("tests/map... | 43.693694 | 112 | 0.61299 |
629f11fc8fc4188034b65399b8b5756b6bff8ac3 | 2,774 | py | Python | pba/train.py | StephenChou0119/pba | 2ff67e668f0e2b3ea2448dd61644878b788688cc | [
"Apache-2.0"
] | 1 | 2019-09-26T13:09:54.000Z | 2019-09-26T13:09:54.000Z | pba/train.py | StephenChou0119/pba | 2ff67e668f0e2b3ea2448dd61644878b788688cc | [
"Apache-2.0"
] | null | null | null | pba/train.py | StephenChou0119/pba | 2ff67e668f0e2b3ea2448dd61644878b788688cc | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
"""Train and evaluate autoaugment using augmentation schedules."""
import os
import ray
from ray.tune import run_experiments
from ray.tune import Trainable
import tensorflow as tf
from pba.model import ModelT... | 31.168539 | 102 | 0.653929 |
629fb3e679e04f24c7e6cea87ff6ef626221cbf5 | 16,631 | py | Python | uqcsbot/advent.py | UQComputingSociety/uqcsbot-discord | f42c0f9153882dd47330974fa40e1ac049c72b5a | [
"MIT"
] | 7 | 2021-07-24T08:50:56.000Z | 2022-03-23T02:52:29.000Z | uqcsbot/advent.py | UQComputingSociety/uqcsbot-discord | f42c0f9153882dd47330974fa40e1ac049c72b5a | [
"MIT"
] | 22 | 2021-07-24T12:09:37.000Z | 2022-03-11T00:44:50.000Z | uqcsbot/advent.py | UQComputingSociety/uqcsbot-discord | f42c0f9153882dd47330974fa40e1ac049c72b5a | [
"MIT"
] | 5 | 2021-07-24T06:03:51.000Z | 2021-11-18T01:25:28.000Z | import discord
from discord.errors import InvalidArgument
from discord.ext import commands
from uqcsbot.bot import UQCSBot
from uqcsbot.utils.command_utils import loading_status
from uqcsbot.models import AOCWinner
from argparse import ArgumentParser, Namespace
from datetime import datetime, timedelta, timezone
from r... | 37.373034 | 150 | 0.606277 |
629fdd08aaa077f9d94178c27908d1785b3b9901 | 1,879 | py | Python | contxt/utils/persistent_contxt_config.py | ndustrialio/contxt-sdk-python-control | e87930eb65853a314eb118ea5cbc0386d2188db2 | [
"0BSD"
] | null | null | null | contxt/utils/persistent_contxt_config.py | ndustrialio/contxt-sdk-python-control | e87930eb65853a314eb118ea5cbc0386d2188db2 | [
"0BSD"
] | null | null | null | contxt/utils/persistent_contxt_config.py | ndustrialio/contxt-sdk-python-control | e87930eb65853a314eb118ea5cbc0386d2188db2 | [
"0BSD"
] | null | null | null | import os
from pathlib import Path
import logging
from .config import write_config_class_to_file, load_config_class_from_file
logger = logging.getLogger(__name__)
logging.basicConfig(format='[%(module)s %(levelname)s:%(asctime)s] %(message)s', level=logging.INFO)
class ContxtConfigurationError(Exception):
pass
... | 38.346939 | 110 | 0.699308 |
629ff795fe9ea742d141225f388f8661bd3260e2 | 344 | py | Python | Chapter04/scrapy/europython/europython/middlewares.py | yangwawa0323/Learning-Python-Networking-Second-Edition | 5460fe4fb6acc5d0df19bf36e52ac09e9a11eb8b | [
"MIT"
] | 52 | 2018-12-17T19:33:06.000Z | 2022-03-25T18:14:02.000Z | Chapter04/scrapy/europython/europython/middlewares.py | barretthugh/Learning-Python-Networking-Second-Edition | 0f00b8b20c1c85e76754e47113dff8ca9e99d5ca | [
"MIT"
] | null | null | null | Chapter04/scrapy/europython/europython/middlewares.py | barretthugh/Learning-Python-Networking-Second-Edition | 0f00b8b20c1c85e76754e47113dff8ca9e99d5ca | [
"MIT"
] | 38 | 2018-12-18T09:08:43.000Z | 2022-02-06T02:53:05.000Z | # Importing base64 library because we'll need it ONLY in case if the proxy we are going to use requires authentication
import base64
# Start your middleware class
class ProxyMiddleware(object):
# overwrite process request
def process_request(self, request, spider):
# Set the location of the proxy
req... | 34.4 | 118 | 0.744186 |
629ffd422c6a6f768dad0fb1db6eff713682b7f8 | 4,659 | py | Python | sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_check_virtual_network_subnet_usage_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_check_virtual_network_subnet_usage_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_check_virtual_network_subnet_usage_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # 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 ... | 45.676471 | 168 | 0.713029 |
62a00be69a358affcc246bcd70be403e97819e12 | 2,023 | py | Python | mc2pbrt/material.py | PbrtCraft/mc2pbrt | 145c844a7ec0fb3ee3c83dba67c2f8cdcf888ed4 | [
"MIT"
] | 3 | 2019-10-04T17:56:50.000Z | 2019-11-11T13:39:24.000Z | mc2pbrt/material.py | PbrtCraft/mc2pbrt | 145c844a7ec0fb3ee3c83dba67c2f8cdcf888ed4 | [
"MIT"
] | 8 | 2019-10-12T03:53:23.000Z | 2022-03-12T00:01:21.000Z | mc2pbrt/material.py | PbrtCraft/mc2pbrt | 145c844a7ec0fb3ee3c83dba67c2f8cdcf888ed4 | [
"MIT"
] | 1 | 2019-02-12T23:41:00.000Z | 2019-02-12T23:41:00.000Z | import biome
from pbrtwriter import PbrtWriter
class Foliage:
def __init__(self, block):
self.block = block
def write(self, pbrtwriter: PbrtWriter, face):
tex = face["texture"]
tint_color = biome.getFoliageColor(self.block.biome_id, 0)
pbrtwriter.material("translucent", "text... | 30.19403 | 82 | 0.586752 |
62a00ce56e1c007dd789cb09289aacabc043bbe6 | 3,222 | py | Python | rbac/common/sawtooth/rbac_payload.py | knagware9/sawtooth-next-directory | be80852e08d2b27e105d964c727509f2a974002d | [
"Apache-2.0"
] | null | null | null | rbac/common/sawtooth/rbac_payload.py | knagware9/sawtooth-next-directory | be80852e08d2b27e105d964c727509f2a974002d | [
"Apache-2.0"
] | null | null | null | rbac/common/sawtooth/rbac_payload.py | knagware9/sawtooth-next-directory | be80852e08d2b27e105d964c727509f2a974002d | [
"Apache-2.0"
] | 1 | 2018-12-07T10:55:08.000Z | 2018-12-07T10:55:08.000Z | # Copyright 2018 Contributors to Hyperledger Sawtooth
#
# 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 ... | 32.877551 | 87 | 0.676288 |
62a022b8860f77d02c9e3383e9ee4505606a5311 | 13,672 | py | Python | tda_mvc/view/main.py | jjjkkkjjj/cldvis-txtmodifier | 647c57cdba325d54229b3300f7d0b18baa7b0b74 | [
"MIT"
] | 3 | 2021-07-08T04:58:00.000Z | 2022-03-06T11:19:08.000Z | tda_mvc/view/main.py | jjjkkkjjj/cldvis-txtmodifier | 647c57cdba325d54229b3300f7d0b18baa7b0b74 | [
"MIT"
] | 22 | 2020-11-09T15:36:23.000Z | 2021-05-02T07:38:43.000Z | tda_mvc/view/main.py | jjjkkkjjj/cldvis-txtmodifier | 647c57cdba325d54229b3300f7d0b18baa7b0b74 | [
"MIT"
] | null | null | null | from PySide2.QtWidgets import *
from PySide2.QtGui import *
from PySide2.QtCore import *
from ..utils.funcs import check_instance, create_action, add_actions
from ..utils.modes import ShowingMode
from ..model import Model
from .leftdock import LeftDockView
from .central import CentralView
from .rightdock import RightD... | 43.820513 | 133 | 0.615053 |
62a034fd4e9ec4c764bec1939ff2a4b01fe1d84e | 524 | py | Python | satella/coding/fun_static.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 12 | 2019-12-13T10:17:38.000Z | 2022-01-05T09:01:36.000Z | satella/coding/fun_static.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 26 | 2016-04-01T11:55:26.000Z | 2021-12-30T17:03:59.000Z | satella/coding/fun_static.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 1 | 2021-05-31T08:45:22.000Z | 2021-05-31T08:45:22.000Z | import typing as tp
def static_var(var_name: str, starting_value: tp.Optional[tp.Any] = None):
"""
Declare a static variable for given function
Use it like:
>>> @static_var('counter', 2)
>>> def count():
>>> count.counter += 1
or:
>>> class MyClass:
>>> @static_var('cou... | 19.407407 | 74 | 0.562977 |
62a04f03963fb4d1ed6bcfc59b121b428540ee1a | 9,694 | py | Python | data/level/level135.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | null | null | null | data/level/level135.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 6 | 2020-07-04T02:53:08.000Z | 2022-03-11T23:53:14.000Z | data/level/level135.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 3 | 2019-12-31T11:42:59.000Z | 2021-03-28T20:06:13.000Z | data = {
'level_index': 135,
'move_count': 21,
'board_info': {
(0, 0): {
'base': (50, 1),
'cover': (64, 2),
'next': (0, 1),
'prev': (0, -1),
'fall_point': (0, -1)
},
(0, 1): {
'base': (50, 1),
'cover'... | 23.415459 | 33 | 0.199195 |
62a05dc6b105fd4e91b0fb561e07182c7808ac3d | 504 | py | Python | abc/abc010/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/abc010/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/abc010/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
import math
from collections import defaultdict, deque
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
INF = float('inf')
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
sx, sy, gx, gy, T, V = na()
N = ni()
for _ in range(N):
x, y = ... | 21 | 53 | 0.551587 |
62a06aa58a58cc9941e4b7d46c84dd123c4e33a8 | 12,891 | py | Python | python/thunder_streaming/shell/thunder_streaming_context.py | andrewosh/thunder-streaming | d37afb95550ee141ef841ac1c27c432e16e0b63f | [
"Apache-2.0"
] | null | null | null | python/thunder_streaming/shell/thunder_streaming_context.py | andrewosh/thunder-streaming | d37afb95550ee141ef841ac1c27c432e16e0b63f | [
"Apache-2.0"
] | null | null | null | python/thunder_streaming/shell/thunder_streaming_context.py | andrewosh/thunder-streaming | d37afb95550ee141ef841ac1c27c432e16e0b63f | [
"Apache-2.0"
] | null | null | null | from thunder_streaming.shell.analysis import Analysis
from thunder_streaming.shell.param_listener import ParamListener
from thunder_streaming.shell.message_proxy import MessageProxy
from thunder_streaming.shell.settings import *
from thunder_streaming.shell.converter import *
import signal
import re
import xml.etree.E... | 38.480597 | 131 | 0.626484 |
62a07741dca3d57af7c94d2a302fb8557d2f38bf | 5,018 | py | Python | asposewordscloud/models/requests/reject_all_revisions_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/requests/reject_all_revisions_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/requests/reject_all_revisions_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="reject_all_revisions_online_request.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obta... | 45.618182 | 170 | 0.663412 |
62a08ed05320c4f58863ec87392bb742d0c97111 | 236 | py | Python | python/year2018/tests/test_sol05.py | dhruvmanila/advent-of-code | 08bc035f1d605e3372b49375c4248fc2f827f99e | [
"MIT"
] | 2 | 2020-11-23T12:44:46.000Z | 2021-03-06T07:23:22.000Z | python/year2018/tests/test_sol05.py | dhruvmanila/advent-of-code | 08bc035f1d605e3372b49375c4248fc2f827f99e | [
"MIT"
] | null | null | null | python/year2018/tests/test_sol05.py | dhruvmanila/advent-of-code | 08bc035f1d605e3372b49375c4248fc2f827f99e | [
"MIT"
] | 1 | 2021-03-06T07:22:09.000Z | 2021-03-06T07:22:09.000Z | from year2018.sol05 import polymer_reaction, shortest_polymer
def test_polymer_reaction():
assert len(polymer_reaction("dabAcCaCBAcCcaDA")) == 10
def test_shortest_polymer():
assert shortest_polymer("dabAcCaCBAcCcaDA") == 4
| 23.6 | 61 | 0.783898 |
62a0adb559e6151260c5767a3f5e037b15c44837 | 49,804 | py | Python | sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_spark_job_definition_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_spark_job_definition_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_spark_job_definition_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# 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) AutoRe... | 43.345518 | 134 | 0.655951 |
62a0e34ce3c986bda9143815823c8ede3fa50bb9 | 13,145 | py | Python | ecl/virtual_network_appliance/v1/_proxy.py | shimisho/eclsdk | e171a63d5c3491bd235f802b3ad3a74f3fcea73c | [
"Apache-2.0"
] | 5 | 2017-04-07T06:23:04.000Z | 2019-11-19T00:52:34.000Z | ecl/virtual_network_appliance/v1/_proxy.py | shimisho/eclsdk | e171a63d5c3491bd235f802b3ad3a74f3fcea73c | [
"Apache-2.0"
] | 16 | 2018-09-12T11:14:40.000Z | 2021-04-19T09:02:44.000Z | ecl/virtual_network_appliance/v1/_proxy.py | shimisho/eclsdk | e171a63d5c3491bd235f802b3ad3a74f3fcea73c | [
"Apache-2.0"
] | 14 | 2017-05-11T14:26:26.000Z | 2021-07-14T14:00:06.000Z | # -*- coding: utf-8 -*-
from ecl.virtual_network_appliance.v1 \
import virtual_network_appliance as _virtual_network_appliance
from ecl.virtual_network_appliance.v1 \
import virtual_network_appliance_plan as _virtual_network_appliance_plan
from ecl.virtual_network_appliance.v1 import operation as _operation
fr... | 43.52649 | 79 | 0.639939 |
62a0e88a3cebfb03664eea89932baa1afef7c6ac | 4,792 | py | Python | isy-03/03_kmeans.py | bschurian/Interactive-Systems-Ben | f1a02a7150b154cd53806db190ebae5072ba74f1 | [
"MIT"
] | null | null | null | isy-03/03_kmeans.py | bschurian/Interactive-Systems-Ben | f1a02a7150b154cd53806db190ebae5072ba74f1 | [
"MIT"
] | null | null | null | isy-03/03_kmeans.py | bschurian/Interactive-Systems-Ben | f1a02a7150b154cd53806db190ebae5072ba74f1 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
import sys
############################################################
#
# KMEANS
#
############################################################
# implement distance metric - e.g. squared distances between pixels
def distance(a, b):
return np.linalg.norm(a - b... | 34.47482 | 135 | 0.645451 |
62a12d1deb00e8deee5a6f44e6367051a4b4290a | 4,200 | py | Python | applications/popart/bert/tests/regression/training_regression_test.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | 2 | 2020-04-07T23:46:17.000Z | 2021-12-05T10:29:34.000Z | applications/popart/bert/tests/regression/training_regression_test.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | 5 | 2020-01-28T23:13:33.000Z | 2022-02-10T00:34:57.000Z | applications/popart/bert/tests/regression/training_regression_test.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | 1 | 2020-04-07T23:46:29.000Z | 2020-04-07T23:46:29.000Z | # Copyright 2019 Graphcore Ltd.
import os
import json
import numpy as np
from pathlib import Path
import pytest
from typing import NamedTuple
import popart
import onnx
from bert import main
from bert_model import Bert, BertConfig
from bert_optimizer import ScheduledOptimizerFactory
from utils import parse_bert_args
... | 33.870968 | 86 | 0.682619 |
62a192146dc8c1f9bd8a39c4b06b588c3fb1ba33 | 247 | py | Python | chaoslib/discovery/__init__.py | dimaka-wix/chaostoolkit-lib | e5d88ab33ea08baaf06f59564392971c249887d1 | [
"Apache-2.0"
] | 73 | 2017-11-26T13:43:53.000Z | 2022-02-25T02:52:54.000Z | chaoslib/discovery/__init__.py | dimaka-wix/chaostoolkit-lib | e5d88ab33ea08baaf06f59564392971c249887d1 | [
"Apache-2.0"
] | 191 | 2017-10-09T14:33:12.000Z | 2022-03-23T16:23:06.000Z | chaoslib/discovery/__init__.py | dimaka-wix/chaostoolkit-lib | e5d88ab33ea08baaf06f59564392971c249887d1 | [
"Apache-2.0"
] | 48 | 2017-12-05T16:39:01.000Z | 2022-02-14T12:01:30.000Z | from chaoslib.discovery.discover import (
discover,
discover_actions,
discover_probes,
initialize_discovery_result,
)
__all__ = [
"discover",
"discover_actions",
"discover_probes",
"initialize_discovery_result",
]
| 17.642857 | 41 | 0.704453 |
62a1a33ba422568ba603de258a1ac005f041ac28 | 23,548 | py | Python | src/ckan_model/production.py | l27-0-0-1/sigma | f4796e4080f22aefcf6df8ac41748597859ccf4e | [
"Apache-2.0"
] | null | null | null | src/ckan_model/production.py | l27-0-0-1/sigma | f4796e4080f22aefcf6df8ac41748597859ccf4e | [
"Apache-2.0"
] | null | null | null | src/ckan_model/production.py | l27-0-0-1/sigma | f4796e4080f22aefcf6df8ac41748597859ccf4e | [
"Apache-2.0"
] | null | null | null | import random
import ckanapi
import string
import operator
import re
import uuid
sysadmin = ckanapi.RemoteCKAN("http://ckan.local",
"cd609119-9305-48bb-8b9c-5b3083252d80")
class Search:
def __init__(self, ckan: ckanapi.RemoteCKAN = None):
if ckan is None:
self.ck... | 31.272244 | 80 | 0.551087 |
62a1ab7fc307c3a76b891e7346599240d4aae300 | 3,065 | py | Python | Utils/SSIM.py | phicks22/HiCARN | 4df30b41ebc20722b9791f6eef0d4317250e7258 | [
"MIT"
] | 1 | 2021-12-02T17:45:34.000Z | 2021-12-02T17:45:34.000Z | Utils/SSIM.py | phicks22/HiCARN | 4df30b41ebc20722b9791f6eef0d4317250e7258 | [
"MIT"
] | null | null | null | Utils/SSIM.py | phicks22/HiCARN | 4df30b41ebc20722b9791f6eef0d4317250e7258 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from math import exp
def _toimg(mat):
m = torch.tensor(mat)
# convert to float and add channel dimension
return m.float()
def _tohic(mat):
mat.squeeze_()
return mat.numpy()#.astype(int)
def gaussian(width, sigma):
gauss = torc... | 33.315217 | 114 | 0.649266 |
62a1b3e09301883588762813143d5da37630190b | 8,112 | py | Python | src/_repobee/git.py | ShreyaDhananjay/repobee | da501606c351bdbeda3428b245072f1a2d6372b9 | [
"MIT"
] | null | null | null | src/_repobee/git.py | ShreyaDhananjay/repobee | da501606c351bdbeda3428b245072f1a2d6372b9 | [
"MIT"
] | null | null | null | src/_repobee/git.py | ShreyaDhananjay/repobee | da501606c351bdbeda3428b245072f1a2d6372b9 | [
"MIT"
] | null | null | null | """Wrapper functions for git commands.
.. module:: git
:synopsis: Wrapper functions for git CLI commands, such as push and clone.
.. moduleauthor:: Simon Larsén
"""
import asyncio
import os
import subprocess
import collections
import pathlib
import daiquiri
from typing import Iterable, List, Any, Callable
from _... | 30.382022 | 82 | 0.642382 |
62a21db60ffc2cba414db0df52fb374753af4406 | 419 | py | Python | tabFileProcessing/addIndexCol.py | linlifeng/llbio | 962f6abda8e8a576cb0bf4d73d3a5c4ef9b1a04b | [
"MIT"
] | null | null | null | tabFileProcessing/addIndexCol.py | linlifeng/llbio | 962f6abda8e8a576cb0bf4d73d3a5c4ef9b1a04b | [
"MIT"
] | null | null | null | tabFileProcessing/addIndexCol.py | linlifeng/llbio | 962f6abda8e8a576cb0bf4d73d3a5c4ef9b1a04b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
add an index column to the very beginning of the file.
1. file name
2. start from number (will be the first number, the rest will autoincrement)
'''
from sys import argv
try:
f = open(argv[1], 'r')
startNum = int(argv[2])
except:
exit(__doc__)
i = startNum
for l in f:
... | 18.217391 | 76 | 0.608592 |
62a251a3dc97e8a10203f7e60d49107084184d9a | 215 | py | Python | py/cidoc_crm_types/properties/p136i_supported_type_creation.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | py/cidoc_crm_types/properties/p136i_supported_type_creation.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | py/cidoc_crm_types/properties/p136i_supported_type_creation.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | from .p15i_influenced import P15iInfluenced
from dataclasses import dataclass
@dataclass
class P136iSupportedTypeCreation(P15iInfluenced):
URI = "http://erlangen-crm.org/current/P136i_supported_type_creation"
| 26.875 | 73 | 0.837209 |
62a251d89ccca1b5634dc356d70c7cec7010dbc0 | 7,727 | py | Python | app-tasks/rf/src/rf/models/scene.py | raster-foundry/raster-foundry | f637176afb201323d8c818813fe45f6b1011aafb | [
"Apache-2.0"
] | 112 | 2017-07-28T15:58:38.000Z | 2021-12-19T21:08:07.000Z | app-tasks/rf/src/rf/models/scene.py | raster-foundry/raster-foundry | f637176afb201323d8c818813fe45f6b1011aafb | [
"Apache-2.0"
] | 2,393 | 2017-07-28T15:15:41.000Z | 2022-03-15T18:00:35.000Z | app-tasks/rf/src/rf/models/scene.py | raster-foundry/raster-foundry | f637176afb201323d8c818813fe45f6b1011aafb | [
"Apache-2.0"
] | 34 | 2017-08-01T04:35:11.000Z | 2021-10-03T19:46:29.000Z | """Python class representation of a Raster Foundry Scene"""
import uuid
from requests.exceptions import HTTPError
import logging
from rf.models.base import BaseModel
from rf.models.thumbnail import Thumbnail
from rf.models.image import Image
from rf.models.footprint import Footprint
logger = logging.getLogger(__name... | 33.742358 | 88 | 0.597903 |
62a25e2ba9a11a0de3af1ae6b3933dc647571b29 | 5,170 | py | Python | experiments_transformers/preprocessing.py | wuhao55158/TimeSeriesForecasting-DeepLearning-master | 9f6a1aa388857b49881dcdadd2c353a66c2a5ce3 | [
"MIT"
] | 85 | 2020-08-07T09:21:53.000Z | 2022-02-10T09:23:42.000Z | experiments_transformers/preprocessing.py | wuhao55158/TimeSeriesForecasting-DeepLearning-master | 9f6a1aa388857b49881dcdadd2c353a66c2a5ce3 | [
"MIT"
] | 2 | 2021-04-07T14:16:13.000Z | 2022-01-16T19:12:44.000Z | experiments_transformers/preprocessing.py | wuhao55158/TimeSeriesForecasting-DeepLearning-master | 9f6a1aa388857b49881dcdadd2c353a66c2a5ce3 | [
"MIT"
] | 23 | 2021-03-10T04:28:50.000Z | 2022-03-31T09:09:12.000Z | import time
import numpy as np
from tqdm import tqdm
from multiprocessing import Pool
def read_ts_dataset(filename, delimiter=","):
"""
Function for reading csv dataset with multiple time series and storing them into an array
:param delimiter:
:param filename:
:retu... | 30.958084 | 101 | 0.609284 |
62a263ff002868da749b1e814526c06d19135c2f | 1,345 | py | Python | day18/day18_part2.py | Disi77/AdventOfCode2020 | aafe1b402e08976c2cade3c044ead811b67bcf71 | [
"WTFPL"
] | 1 | 2020-12-05T12:39:03.000Z | 2020-12-05T12:39:03.000Z | day18/day18_part2.py | Disi77/AdventOfCode2020 | aafe1b402e08976c2cade3c044ead811b67bcf71 | [
"WTFPL"
] | null | null | null | day18/day18_part2.py | Disi77/AdventOfCode2020 | aafe1b402e08976c2cade3c044ead811b67bcf71 | [
"WTFPL"
] | null | null | null | from math import prod
with open("day18_input.txt", encoding="utf-8", mode="r") as f:
input_data = f.readlines()
def evaluate_expression(expression):
result = 0
start = 0
end = len(expression) - 1
sub_expr = expression
while True:
if "(" not in sub_expr:
groups = sub_expr.... | 26.9 | 82 | 0.542751 |
62a27236fa1887c53099b8f619063ebedad46270 | 3,036 | py | Python | blueprint_generator.py | Antoni-Czaplicki/HA-SleepAsAndroid | 12d649c779604491574bb7d237a4222aa7927aea | [
"Apache-2.0"
] | null | null | null | blueprint_generator.py | Antoni-Czaplicki/HA-SleepAsAndroid | 12d649c779604491574bb7d237a4222aa7927aea | [
"Apache-2.0"
] | null | null | null | blueprint_generator.py | Antoni-Czaplicki/HA-SleepAsAndroid | 12d649c779604491574bb7d237a4222aa7927aea | [
"Apache-2.0"
] | null | null | null |
from io import StringIO
from custom_components.sleep_as_android.device_trigger import TRIGGERS, DOMAIN
import ruamel.yaml
yaml = ruamel.yaml.YAML()
yaml.preserve_quotes = True
def tagged_empty_scalar(tag, value):
return yaml.load('!' + tag + " " + value)
def single_quote_dump(raw_str):
changed_yaml = ru... | 28.641509 | 102 | 0.446311 |
62a272ffaab392d236731c4a2ea888fcfc00905e | 2,549 | py | Python | tests/test_wayne_health_human_services.py | noahkconley/city-scrapers | 37420ce3a9295c2aac68c0fb4a957ad41394a801 | [
"MIT"
] | null | null | null | tests/test_wayne_health_human_services.py | noahkconley/city-scrapers | 37420ce3a9295c2aac68c0fb4a957ad41394a801 | [
"MIT"
] | null | null | null | tests/test_wayne_health_human_services.py | noahkconley/city-scrapers | 37420ce3a9295c2aac68c0fb4a957ad41394a801 | [
"MIT"
] | null | null | null | from datetime import date, time
import pytest
# Adapted from test_chi_parks.py
from freezegun import freeze_time
from tests.utils import file_response
from city_scrapers.spiders.wayne_health_human_services import Wayne_health_human_servicesSpider
freezer = freeze_time('2018-03-27 12:00:01')
freezer.start()
test_res... | 27.117021 | 132 | 0.697921 |
62a27662794f015e7728de05253842dd520780aa | 1,636 | py | Python | examples/douban_spider.py | python-ruia/ruia-shell | b0488434dd11fd794178d46ef37924be52e6d08b | [
"Apache-2.0"
] | 1 | 2021-01-07T15:44:39.000Z | 2021-01-07T15:44:39.000Z | examples/douban_spider.py | python-ruia/ruia-shell | b0488434dd11fd794178d46ef37924be52e6d08b | [
"Apache-2.0"
] | null | null | null | examples/douban_spider.py | python-ruia/ruia-shell | b0488434dd11fd794178d46ef37924be52e6d08b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Created by howie.hu at 2021/1/9.
"""
from ruia import AttrField, Item, Spider, TextField
from ruia_shell import inspect_ruia
class DoubanItem(Item):
target_item = TextField(css_select="div.item")
title = TextField(css_select="span.title")
cover = AttrField(css_select="div.pic>a... | 29.214286 | 79 | 0.613081 |
62a28dae7ecd3ada9559764d40509a2f683e92d7 | 5,065 | gyp | Python | ui/chromeos/ui_chromeos.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | ui/chromeos/ui_chromeos.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | ui/chromeos/ui_chromeos.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'chromium_code': 1,
},
'targets': [
{
'target_name': 'ui_chromeos_resources',
'type': 'none',
'variables': {... | 36.178571 | 97 | 0.601185 |
62a2b91b4756c79c9026339d6ae681a3e2affd3c | 10,565 | py | Python | src/python/pants/backend/native/tasks/native_compile.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/native/tasks/native_compile.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | 1 | 2018-09-04T17:37:34.000Z | 2018-09-04T19:42:58.000Z | src/python/pants/backend/native/tasks/native_compile.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os
import subprocess
from abc import ABCMeta, abstractmethod
from collections import defaultdict
from dataclasses import dataclass
from typing import Any, Optional
from pants.backe... | 38.699634 | 103 | 0.719735 |
62a2e0010e6dfd3697ea3b945e40385c83a0dce4 | 12,389 | py | Python | biocrnpyler/parameter.py | murrayrm/BioCRNPyler | 2e7d4c521b1ebdf7cff6867b25cbee014e0ee1a3 | [
"BSD-3-Clause"
] | 1 | 2020-02-13T01:51:08.000Z | 2020-02-13T01:51:08.000Z | biocrnpyler/parameter.py | murrayrm/BioCRNPyler | 2e7d4c521b1ebdf7cff6867b25cbee014e0ee1a3 | [
"BSD-3-Clause"
] | null | null | null | biocrnpyler/parameter.py | murrayrm/BioCRNPyler | 2e7d4c521b1ebdf7cff6867b25cbee014e0ee1a3 | [
"BSD-3-Clause"
] | null | null | null | # parameter.py - parameter processing
# RMM, 19 Aug 2018
#
# This file contains the Parameter class that is used for representing
# parameters, as well as utility functions for manipulating
# parameters.
#
# Copyright (c) 2018, Build-A-Cell. All rights reserved.
# See LICENSE file in the project root directory for deta... | 51.83682 | 135 | 0.648317 |
62a2e5453e8cf89abace019e12e5abf521992729 | 3,675 | py | Python | misc.py | iamgroot42/permutation_invariant_network | 9076ccee0de3da55e9a0d7b9fe41e00dd92adc5e | [
"MIT"
] | null | null | null | misc.py | iamgroot42/permutation_invariant_network | 9076ccee0de3da55e9a0d7b9fe41e00dd92adc5e | [
"MIT"
] | null | null | null | misc.py | iamgroot42/permutation_invariant_network | 9076ccee0de3da55e9a0d7b9fe41e00dd92adc5e | [
"MIT"
] | null | null | null | import numpy as np
import torch as ch
from tqdm import tqdm
from typing import List, Tuple, Any
# Function to extract model parameters
def get_weight_layers(m: Any,
transpose: bool = True,
first_n: int = np.inf,
start_n: int = 0,
... | 31.956522 | 85 | 0.599456 |
62a32093d8fce58cc46c9f20f909ceb0d788b89a | 3,463 | py | Python | rflow/interface.py | otaviog/rflow | 8594b9c3e9e1da61382f80b66e749cf7b8a33676 | [
"MIT"
] | 6 | 2019-08-26T11:36:58.000Z | 2020-12-15T21:01:24.000Z | rflow/interface.py | otaviog/rflow | 8594b9c3e9e1da61382f80b66e749cf7b8a33676 | [
"MIT"
] | null | null | null | rflow/interface.py | otaviog/rflow | 8594b9c3e9e1da61382f80b66e749cf7b8a33676 | [
"MIT"
] | 1 | 2020-04-13T08:05:27.000Z | 2020-04-13T08:05:27.000Z | import inspect
from ._argument import ArgNamespace
from .node import Node
from ._reflection import hasmethod
# pylint: disable=no-member
class Interface(Node):
def __init__(self, resource=None, show=True):
evaluate_argspec = inspect.getfullargspec(self.evaluate)
if 'self' in evaluate_argspec.args... | 34.287129 | 76 | 0.569448 |
62a3265bd4a9a493cf21f8b57e0c550fb6b9b20d | 7,411 | py | Python | tf-faster-rcnn/tools/demo_modified.py | bernardcwj/FYP_2017 | a9c9f6c6f83de018f63f83d283a75f50742108f0 | [
"MIT"
] | null | null | null | tf-faster-rcnn/tools/demo_modified.py | bernardcwj/FYP_2017 | a9c9f6c6f83de018f63f83d283a75f50742108f0 | [
"MIT"
] | null | null | null | tf-faster-rcnn/tools/demo_modified.py | bernardcwj/FYP_2017 | a9c9f6c6f83de018f63f83d283a75f50742108f0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# --------------------------------------------------------
# Tensorflow Faster R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Xinlei Chen, based on code from Ross Girshick
# --------------------------------------------------------
"""
Demo script showing detections... | 36.15122 | 201 | 0.601403 |
62a33a6e72bad956b4153741765330481386209f | 31,562 | py | Python | venv/Lib/site-packages/nbdime/prettyprint.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | 2 | 2021-02-16T16:17:07.000Z | 2021-11-08T20:27:13.000Z | venv/Lib/site-packages/nbdime/prettyprint.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | null | null | null | venv/Lib/site-packages/nbdime/prettyprint.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | 4 | 2020-11-14T17:05:36.000Z | 2020-11-16T18:44:54.000Z | # -*- coding: utf-8 -*-
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import unicode_literals
from __future__ import print_function
from collections import namedtuple
import datetime
from difflib import unified_diff
import hashlib
import io
impor... | 31.562 | 100 | 0.612572 |
62a33bfff0aead08a271ba0d23f6200e537cbc9d | 21,344 | py | Python | appengine/findit/services/test/ci_failure_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | appengine/findit/services/test/ci_failure_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | appengine/findit/services/test/ci_failure_test.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.
import datetime
import logging
import mock
import os
from go.chromium.org.luci.buildbucket.proto import common_pb2
from go.chromium.org.luci.buildbucket.pro... | 35.573333 | 79 | 0.648004 |
62a34a405a1348fa7bacf50e1454375d8d18543f | 6,354 | py | Python | salt/states/rvm.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | 1 | 2015-10-06T22:25:22.000Z | 2015-10-06T22:25:22.000Z | salt/states/rvm.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | null | null | null | salt/states/rvm.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | null | null | null | '''
Managing Ruby installations and gemsets with Ruby Version Manager (RVM).
========================================================================
This module is used to install and manage ruby installations and
gemsets with RVM, the Ruby Version Manager. Different versions of ruby
can be installed and gemsets crea... | 26.585774 | 75 | 0.538086 |
62a38385217ff4f924fbc21158612c5e6ea3ce80 | 4,878 | py | Python | datasets/loader_factory.py | YLFF/2004P_Pytorch-Networks | 2d84fe1d904b17d0c55aa2a7a7dba82dea3dae05 | [
"MIT"
] | 454 | 2019-12-26T15:04:02.000Z | 2020-10-24T13:57:35.000Z | datasets/loader_factory.py | YLFF/2004P_Pytorch-Networks | 2d84fe1d904b17d0c55aa2a7a7dba82dea3dae05 | [
"MIT"
] | 1 | 2020-05-14T06:01:18.000Z | 2020-05-14T06:01:18.000Z | datasets/loader_factory.py | YLFF/2004P_Pytorch-Networks | 2d84fe1d904b17d0c55aa2a7a7dba82dea3dae05 | [
"MIT"
] | 17 | 2019-12-27T12:19:47.000Z | 2020-02-03T07:42:05.000Z | import numpy as np
import torchvision.transforms as transforms
import torch
import cv2
from . import cifar
from . import cub200_2011
LOADER_LUT = {
'cifar' : cifar.CIFARData,
'cub200_2011': cub200_2011.CUBData,
}
def get_loader(dataset_type, data_path, loader_type, label_path=None, cfg=None, logg... | 35.605839 | 109 | 0.608241 |
62a3967e1bb52040d8a9ea9170298d342526c80a | 5,893 | py | Python | lib/rucio/api/authentication.py | elichad/rucio | 0705e4124e18c853c4661f85e00238cb0c6bd750 | [
"Apache-2.0"
] | null | null | null | lib/rucio/api/authentication.py | elichad/rucio | 0705e4124e18c853c4661f85e00238cb0c6bd750 | [
"Apache-2.0"
] | null | null | null | lib/rucio/api/authentication.py | elichad/rucio | 0705e4124e18c853c4661f85e00238cb0c6bd750 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012-2018 CERN for the benefit of the ATLAS collaboration.
#
# 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... | 38.51634 | 109 | 0.737825 |
62a3a39ae69d45517487b04d494d3efed3e833c3 | 3,693 | py | Python | openapi_core/schema/parameters/models.py | grktsh/openapi-core | d4ada7bcbb9b13f5c5dd090988c35be7a0d141b7 | [
"BSD-3-Clause"
] | null | null | null | openapi_core/schema/parameters/models.py | grktsh/openapi-core | d4ada7bcbb9b13f5c5dd090988c35be7a0d141b7 | [
"BSD-3-Clause"
] | null | null | null | openapi_core/schema/parameters/models.py | grktsh/openapi-core | d4ada7bcbb9b13f5c5dd090988c35be7a0d141b7 | [
"BSD-3-Clause"
] | null | null | null | """OpenAPI core parameters models module"""
import logging
import warnings
from openapi_core.schema.parameters.enums import (
ParameterLocation, ParameterStyle,
)
from openapi_core.schema.parameters.exceptions import (
MissingRequiredParameter, MissingParameter, InvalidParameterValue,
EmptyParameterValue,
... | 31.564103 | 77 | 0.633902 |
62a3fcd90eb79c81a71e6def50684ab41578bb21 | 1,967 | py | Python | heartFEM/lcleeHeart/vtk_py/clipSurfacesForCutLVMesh.py | WeiXuanChan/heartFEM | 7f26c71434919c3141fac600f08685e5383e7137 | [
"MIT"
] | 3 | 2021-04-13T07:05:20.000Z | 2021-10-02T13:41:09.000Z | heartFEM/lcleeHeart/vtk_py/clipSurfacesForCutLVMesh.py | WeiXuanChan/heartFEM | 7f26c71434919c3141fac600f08685e5383e7137 | [
"MIT"
] | null | null | null | heartFEM/lcleeHeart/vtk_py/clipSurfacesForCutLVMesh.py | WeiXuanChan/heartFEM | 7f26c71434919c3141fac600f08685e5383e7137 | [
"MIT"
] | 2 | 2021-09-06T13:13:41.000Z | 2022-03-11T18:59:02.000Z | ########################################################################
import sys
import vtk
from heartFEM.lcleeHeart.vtk_py.mat_vec_tools import *
from heartFEM.lcleeHeart.vtk_py.readSTL import *
from heartFEM.lcleeHeart.vtk_py.writeSTL import *
#########################################################... | 32.783333 | 76 | 0.6182 |
62a40385bbd7f1179046ba4911d3e8237ac1cc18 | 17,903 | py | Python | hypixel/utils/functions.py | HypixelBot/bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 10 | 2020-06-06T13:57:46.000Z | 2021-11-08T09:27:42.000Z | hypixel/utils/functions.py | HypixelBot/Bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 7 | 2020-06-06T14:04:05.000Z | 2020-07-05T04:05:37.000Z | hypixel/utils/functions.py | HypixelBot/bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 14 | 2020-06-09T17:12:52.000Z | 2021-07-21T23:24:30.000Z | import re
from cogs.utils import context, time
import asyncio
import copy
import logging
import traceback
from cogs.utils.hypixel import Player
import asyncpg
from PIL import Image
from io import BytesIO
from uuid import uuid4
import time as t
import discord
from discord.ext import commands
class utils:
def __i... | 54.749235 | 190 | 0.567614 |
62a4097810d406f085c7481c96ff405ba3666e21 | 21,166 | py | Python | master/searx-master/tests/unit/engines/test_wikidata.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/searx-master/tests/unit/engines/test_wikidata.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/searx-master/tests/unit/engines/test_wikidata.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | # -*- coding: utf-8 -*-
from lxml.html import fromstring
from collections import defaultdict
import mock
from searx.engines import wikidata
from searx.testing import SearxTestCase
class TestWikidataEngine(SearxTestCase):
def test_request(self):
query = 'test_query'
dicto = defaultdict(dict)
... | 41.996032 | 113 | 0.451432 |
62a4175dd0690187a6f69227949c16f1475dd3fc | 9,648 | py | Python | cupy/random/generator.py | asrlabncku/RAP | 11fab37c8d98257ec0aed1b306aa9709a3a51328 | [
"MIT"
] | null | null | null | cupy/random/generator.py | asrlabncku/RAP | 11fab37c8d98257ec0aed1b306aa9709a3a51328 | [
"MIT"
] | null | null | null | cupy/random/generator.py | asrlabncku/RAP | 11fab37c8d98257ec0aed1b306aa9709a3a51328 | [
"MIT"
] | null | null | null | import atexit
import binascii
import operator
import os
import time
import numpy
import six
import cupy
from cupy import core
from cupy import cuda
from cupy.cuda import curand
class RandomState(object):
"""Portable container of a pseudo-random number generator.
An instance of this class holds the state o... | 33.154639 | 87 | 0.611422 |
62a44330f1ae8855c7474df76fcd58d2edd4b97d | 13,983 | py | Python | python/eggroll/core/proto/transfer_pb2.py | ZYKJShadow/eggroll | 02b845c46cfb7a67459c6d842fa9ef3a02ae60ba | [
"Apache-2.0"
] | 1 | 2020-10-23T03:18:54.000Z | 2020-10-23T03:18:54.000Z | python/eggroll/core/proto/transfer_pb2.py | ZYKJShadow/eggroll | 02b845c46cfb7a67459c6d842fa9ef3a02ae60ba | [
"Apache-2.0"
] | null | null | null | python/eggroll/core/proto/transfer_pb2.py | ZYKJShadow/eggroll | 02b845c46cfb7a67459c6d842fa9ef3a02ae60ba | [
"Apache-2.0"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: transfer.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.protobuf import reflection as _refl... | 42.372727 | 1,408 | 0.748838 |
62a454b8f4c1d2785a51b9e0e106aab9a2f7d09b | 53,922 | py | Python | tests/test_customer.py | trag-stripe/dj-stripe | 31fac752ab6540a917a554907d799e41ac3eba9c | [
"MIT"
] | null | null | null | tests/test_customer.py | trag-stripe/dj-stripe | 31fac752ab6540a917a554907d799e41ac3eba9c | [
"MIT"
] | null | null | null | tests/test_customer.py | trag-stripe/dj-stripe | 31fac752ab6540a917a554907d799e41ac3eba9c | [
"MIT"
] | null | null | null | """
Customer Model Tests.
"""
import decimal
from copy import deepcopy
from unittest.mock import ANY, patch
from django.contrib.auth import get_user_model
from django.test import TestCase
from django.utils import timezone
from stripe.error import InvalidRequestError
from djstripe import settings as djstripe_settings
... | 35.405121 | 88 | 0.674623 |
62a45d0954de8122f259965606a7244968acd7bf | 279 | py | Python | fitlins/__main__.py | jdkent/fitlins | 575bb589d1a99622f4cc2fb1c04671132d995091 | [
"Apache-2.0"
] | null | null | null | fitlins/__main__.py | jdkent/fitlins | 575bb589d1a99622f4cc2fb1c04671132d995091 | [
"Apache-2.0"
] | null | null | null | fitlins/__main__.py | jdkent/fitlins | 575bb589d1a99622f4cc2fb1c04671132d995091 | [
"Apache-2.0"
] | null | null | null | from .cli.run import main
if __name__ == '__main__':
import sys
from . import __name__
# `python -m <module>` typically displays the command as __main__.py
if '__main__.py' in sys.argv[0]:
sys.argv[0] = '%s -m %s' % (sys.executable, __name__)
main()
| 27.9 | 72 | 0.62724 |
62a484f1a243e52ab9d1bd74ede81213d26d7df8 | 9,859 | py | Python | 0x0C-python-almost_a_circle/tests/test_models/test_rectangle.py | flourishcodes/holbertonschool-higher_level_programming | 6fda5cca4ed960d7f3d40c26292ad55e1e7d3065 | [
"MIT"
] | null | null | null | 0x0C-python-almost_a_circle/tests/test_models/test_rectangle.py | flourishcodes/holbertonschool-higher_level_programming | 6fda5cca4ed960d7f3d40c26292ad55e1e7d3065 | [
"MIT"
] | null | null | null | 0x0C-python-almost_a_circle/tests/test_models/test_rectangle.py | flourishcodes/holbertonschool-higher_level_programming | 6fda5cca4ed960d7f3d40c26292ad55e1e7d3065 | [
"MIT"
] | 4 | 2018-05-01T05:04:15.000Z | 2020-04-28T22:22:54.000Z | #!/usr/bin/python3
"""
This module contains all unittest cases for
Base class
"""
import unittest
import pep8
from models.base import Base
from models.rectangle import Rectangle
import sys
from io import StringIO
import json
import os
class TestRectangle(unittest.TestCase):
"""
Class containing functions to r... | 33.534014 | 76 | 0.514555 |
62a48e0f5a020fd6f129437c9c518f9625e283d2 | 3,089 | py | Python | tests/test_acolyte.py | rabramley/frostgrave_acolyte | bb2901c617603cf463500abc086227c51a106bc8 | [
"MIT"
] | null | null | null | tests/test_acolyte.py | rabramley/frostgrave_acolyte | bb2901c617603cf463500abc086227c51a106bc8 | [
"MIT"
] | null | null | null | tests/test_acolyte.py | rabramley/frostgrave_acolyte | bb2901c617603cf463500abc086227c51a106bc8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Acolyte tests
"""
import os
import pytest
from bs4 import BeautifulSoup
import acolyte.importer
import acolyte.database
from acolyte.models import School, Spell
def test_missing_route(client):
"""Test that a non-existant route returns a 404
Arguments:
client {obj} -- ... | 26.401709 | 74 | 0.639042 |
62a491ce19c1c73b17b73d4922a8149371017ac3 | 30 | py | Python | src/test/resources/loaderTestData/dependencygraph/pythonproject/tests/test4.py | jacksonpradolima/comfort | 30b6d845716f9cd4ba8639b168a8520cb56c6f30 | [
"Apache-2.0"
] | 2 | 2020-05-25T15:19:57.000Z | 2020-12-07T07:58:19.000Z | src/test/resources/loaderTestData/dependencygraph/pythonproject/tests/test4.py | jacksonpradolima/comfort | 30b6d845716f9cd4ba8639b168a8520cb56c6f30 | [
"Apache-2.0"
] | 2 | 2020-05-25T16:44:15.000Z | 2020-05-25T17:44:18.000Z | src/test/resources/loaderTestData/dependencygraph/pythonproject/tests/test4.py | jacksonpradolima/comfort | 30b6d845716f9cd4ba8639b168a8520cb56c6f30 | [
"Apache-2.0"
] | 1 | 2020-05-25T16:44:57.000Z | 2020-05-25T16:44:57.000Z | from module.package1 import *
| 15 | 29 | 0.8 |
62a4c8ef5f9029d57e65b50d7bf57187a5a69b1f | 1,496 | py | Python | marqeta/response_models/withdrawal_request_model.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 21 | 2019-04-12T09:02:17.000Z | 2022-02-18T11:39:06.000Z | marqeta/response_models/withdrawal_request_model.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 1 | 2020-07-22T21:27:40.000Z | 2020-07-23T17:38:43.000Z | marqeta/response_models/withdrawal_request_model.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 10 | 2019-05-08T14:20:37.000Z | 2021-09-20T18:09:26.000Z | from datetime import datetime, date
from marqeta.response_models.card_acceptor_model import CardAcceptorModel
from marqeta.response_models.webhook import Webhook
from marqeta.response_models import datetime_object
import json
import re
class WithdrawalRequestModel(object):
def __init__(self, json_response):
... | 26.245614 | 108 | 0.696524 |
62a4d5091a94ef0f4dcae4c15d363cb42fe75e72 | 3,255 | py | Python | app/test/test_service/test_options_builder.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2019-07-25T21:15:05.000Z | 2019-07-25T21:15:05.000Z | app/test/test_service/test_options_builder.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 44 | 2019-08-05T15:24:00.000Z | 2022-01-31T23:11:31.000Z | app/test/test_service/test_options_builder.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2021-05-11T07:49:51.000Z | 2021-05-11T07:49:51.000Z | ''' Testes do formatador '''
import unittest
from service.qry_options_builder import QueryOptionsBuilder
class OptionsBuilderTest(unittest.TestCase):
''' Classe que testa a construção de options a partir dos parâmetros do request '''
def test_no_categories(self):
''' Verifica se o parâmetro obrigatório... | 31.911765 | 87 | 0.42427 |
62a4e92fae600a4db310e003482ae9aceaa68afc | 2,513 | py | Python | homecontrol/modules/time/module.py | jaipradeesh/HomeControl | 79ffe8a403fb53e3faf91f55f66d912bb62b4f5f | [
"MIT"
] | null | null | null | homecontrol/modules/time/module.py | jaipradeesh/HomeControl | 79ffe8a403fb53e3faf91f55f66d912bb62b4f5f | [
"MIT"
] | null | null | null | homecontrol/modules/time/module.py | jaipradeesh/HomeControl | 79ffe8a403fb53e3faf91f55f66d912bb62b4f5f | [
"MIT"
] | null | null | null | """Everything related with time"""
import math
import time
import asyncio
from homecontrol.dependencies.entity_types import Item
class Timer(Item):
"""A basic timer"""
float_remaining: float
last_time: (float, float) = (0, 0)
async def init(self):
"""Initialise the timer"""
await se... | 33.065789 | 74 | 0.612018 |
62a4ee8ac2d39c8ecd400560aa51485cab0410f2 | 13,853 | py | Python | src/cli_new/lib/cli/tests/base.py | adamburan/mesos | bc2f0626ce2b5ad85a7f6642c53be37a94719d44 | [
"Apache-2.0"
] | null | null | null | src/cli_new/lib/cli/tests/base.py | adamburan/mesos | bc2f0626ce2b5ad85a7f6642c53be37a94719d44 | [
"Apache-2.0"
] | null | null | null | src/cli_new/lib/cli/tests/base.py | adamburan/mesos | bc2f0626ce2b5ad85a7f6642c53be37a94719d44 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 32.749409 | 80 | 0.563199 |
62a52643481d5ec7b17f7b6d88cbf854a8f28b40 | 1,352 | py | Python | alipay/aop/api/domain/IsvSkillGroup.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/IsvSkillGroup.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/IsvSkillGroup.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 *
class IsvSkillGroup(object):
def __init__(self):
self._group_id = None
self._group_name = None
@property
def group_id(self):
return self._group_id
@group_id.setter... | 24.142857 | 71 | 0.578402 |
62a53b23a93dfc7127a2705bac2878d916fbd2a2 | 3,510 | py | Python | qstack/regression/regression.py | lcmd-epfl/Q-stack | c9f30bf0adc8cfbca33cbd4d991aafc315b6e000 | [
"MIT"
] | null | null | null | qstack/regression/regression.py | lcmd-epfl/Q-stack | c9f30bf0adc8cfbca33cbd4d991aafc315b6e000 | [
"MIT"
] | null | null | null | qstack/regression/regression.py | lcmd-epfl/Q-stack | c9f30bf0adc8cfbca33cbd4d991aafc315b6e000 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import numpy as np
import scipy
from sklearn.model_selection import train_test_split
from qstack.regression.kernel_utils import get_kernel, defaults
from qstack.tools import correct_num_threads
def regression(X, y, sigma=defaults.sigma, eta=defaults.eta, akernel=defaults.kernel, test_size=defau... | 57.540984 | 220 | 0.678632 |
62a54423b657669a99d5c85955c3cb8e6146ed4d | 11,502 | py | Python | reo/exceptions.py | NREL/REopt_API | fbc70f3b0cdeec9ee220266d6b3b0c5d64f257a6 | [
"BSD-3-Clause"
] | 7 | 2022-01-29T12:10:10.000Z | 2022-03-28T13:45:20.000Z | reo/exceptions.py | NREL/reopt_api | fbc70f3b0cdeec9ee220266d6b3b0c5d64f257a6 | [
"BSD-3-Clause"
] | 12 | 2022-02-01T18:23:18.000Z | 2022-03-31T17:22:17.000Z | reo/exceptions.py | NREL/REopt_API | fbc70f3b0cdeec9ee220266d6b3b0c5d64f257a6 | [
"BSD-3-Clause"
] | 3 | 2022-02-08T19:44:40.000Z | 2022-03-12T11:05:36.000Z | # *********************************************************************************
# REopt, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions a... | 44.238462 | 239 | 0.6498 |
62a564b7190a6ca26f8a5544ece5b13412954f28 | 1,593 | py | Python | src/graph_transpiler/webdnn/graph/operators/reduce.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | 1 | 2018-07-26T13:52:21.000Z | 2018-07-26T13:52:21.000Z | src/graph_transpiler/webdnn/graph/operators/reduce.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | src/graph_transpiler/webdnn/graph/operators/reduce.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | from abc import ABCMeta
from typing import Optional
from webdnn.graph import variable
from webdnn.graph.axis import Axis
from webdnn.graph.operator import Operator
from webdnn.graph.operators.attributes.tensorwise import Tensorwise
from webdnn.graph.order import Order
class Reduce(Operator, metaclass=ABCMeta):
"... | 27.947368 | 133 | 0.641557 |
62a5a4ca608fafc1020b954fb3e5fa454415ed75 | 342 | py | Python | examples/dbt_example/dbt_example/resources.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/dbt_example/dbt_example/resources.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/dbt_example/dbt_example/resources.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | from unittest.mock import MagicMock
import sqlalchemy
from dagster import resource
@resource(config_schema={"db_url": str})
def postgres(context):
engine = sqlalchemy.create_engine(context.resource_config["db_url"])
return engine
@resource(config_schema={"token": str})
def mock_slack_resource(_context):
... | 20.117647 | 72 | 0.769006 |
62a5b527809bc1266943c112657886db1137364f | 7,240 | py | Python | ddisearch/geo/tests.py | emory-libraries/ddi-search | 7b44660a467f0d8295f628108dc7093b2afb3c98 | [
"Apache-2.0"
] | null | null | null | ddisearch/geo/tests.py | emory-libraries/ddi-search | 7b44660a467f0d8295f628108dc7093b2afb3c98 | [
"Apache-2.0"
] | null | null | null | ddisearch/geo/tests.py | emory-libraries/ddi-search | 7b44660a467f0d8295f628108dc7093b2afb3c98 | [
"Apache-2.0"
] | null | null | null | # file ddisearch/geo/tests.py
#
# Copyright 2014 Emory University
#
# 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 appl... | 47.012987 | 107 | 0.677486 |
62a609deb9c062b1fbb02a7c468b1677de5da82a | 3,669 | py | Python | RDG/plot_RDG.py | JackCurragh/RDG | b37cc7a0e284e77af8facbeaf551d3b02e7df4a7 | [
"MIT"
] | 1 | 2022-02-03T11:19:28.000Z | 2022-02-03T11:19:28.000Z | RDG/plot_RDG.py | JackCurragh/RDG | b37cc7a0e284e77af8facbeaf551d3b02e7df4a7 | [
"MIT"
] | null | null | null | RDG/plot_RDG.py | JackCurragh/RDG | b37cc7a0e284e77af8facbeaf551d3b02e7df4a7 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import networkx as nx
from decision_graph import RDG, Node, Edge
from matplotlib.gridspec import GridSpec
def position_graphs_nodes(graph):
'''
determine the positioning of rdg nodes from graph structure.
This is a hacky method that determines Y axis by node key rather th... | 31.358974 | 137 | 0.61788 |
62a6197e804da4506a48a754bc0e252ff268ed90 | 2,976 | py | Python | contributed/handle_preds.py | zhvnibek/atty | a1e7f0a3c13d0a03913cf2da6056e5dacd94a44f | [
"MIT"
] | null | null | null | contributed/handle_preds.py | zhvnibek/atty | a1e7f0a3c13d0a03913cf2da6056e5dacd94a44f | [
"MIT"
] | 7 | 2019-12-16T22:18:36.000Z | 2022-02-10T00:33:02.000Z | contributed/handle_preds.py | zhvnibek/atty | a1e7f0a3c13d0a03913cf2da6056e5dacd94a44f | [
"MIT"
] | null | null | null | import pika
import json
import redis
import logging
logging.getLogger("pika").setLevel(logging.WARNING)
logging.basicConfig(level=logging.INFO, format='%(asctime)s %(name)s: %(levelname)s %(message)s')
def get_logger(name: str):
return logging.getLogger(name)
logger = get_logger("handle_preds")
rmq_host = 'loca... | 34.206897 | 97 | 0.583669 |
62a62bb133b5657efb0878826d05d7fa79646d49 | 2,611 | py | Python | setup.py | NyanKiyoshi/CryptoPaste | 103fab82fcf9b8f1abea9f7492f2f8571c3354df | [
"MIT"
] | 1 | 2017-01-09T20:00:29.000Z | 2017-01-09T20:00:29.000Z | setup.py | NyanKiyoshi/CryptoPaste | 103fab82fcf9b8f1abea9f7492f2f8571c3354df | [
"MIT"
] | null | null | null | setup.py | NyanKiyoshi/CryptoPaste | 103fab82fcf9b8f1abea9f7492f2f8571c3354df | [
"MIT"
] | null | null | null | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()
requires = [
'pyramid',
'pyramid_debugtoolbar',
'pyramid... | 34.813333 | 120 | 0.639985 |
62a63214dcd61b6ef9ae0a205987e1cc9946b91b | 418 | py | Python | toontown/toontowngui/Clickable2d.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/toontowngui/Clickable2d.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/toontowngui/Clickable2d.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from panda3d.core import Point3
from toontown.toontowngui.Clickable import Clickable
class Clickable2d(Clickable):
def setClickRegionFrame(self, left, right, bottom, top):
mat = self.contents.getNetTransform().getMat()
left, _, top = mat.xformPoint(Point3(left, 0, top))
right, _, bottom =... | 32.153846 | 67 | 0.700957 |
62a6553f7d646a84e66208fbd3808b56f438ff39 | 89,190 | py | Python | sdk/tables/azure-data-tables/tests/test_table_entity_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/tables/azure-data-tables/tests/test_table_entity_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/tables/azure-data-tables/tests/test_table_entity_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # 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.
# --------------------------------------------------------------------... | 40.467332 | 150 | 0.612726 |
62a65650199f0e6e22052c7fbeec13baa28bc408 | 5,549 | py | Python | scripts/configFunctions.py | proofiler/Code_Pr00filer | 471bb9cdb4ad1e839a8e5380cd5cebf0a3d0933d | [
"MIT"
] | 1 | 2021-07-28T13:20:40.000Z | 2021-07-28T13:20:40.000Z | scripts/configFunctions.py | proofiler/Code_Pr00filer | 471bb9cdb4ad1e839a8e5380cd5cebf0a3d0933d | [
"MIT"
] | null | null | null | scripts/configFunctions.py | proofiler/Code_Pr00filer | 471bb9cdb4ad1e839a8e5380cd5cebf0a3d0933d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#encoding: UTF-8
# This file is used to parse data within the config file.
# Those functions are moslty used to get informations.
def getConfigPathFile():
ConfigPathFile = "/opt/Code_Pr00filer/config"
return ConfigPathFile
def getVersion(ConfigPathFile):
"""
return the VERSIO... | 29.359788 | 93 | 0.601009 |
62a6795cc08e428b92b5044eeaf1ce1e7b59bd0c | 1,021 | py | Python | neural_sp/utils.py | Cescfangs/neural_sp | 2c12d25d2078d3dacdb80c5c367c2e90feba7b6c | [
"Apache-2.0"
] | null | null | null | neural_sp/utils.py | Cescfangs/neural_sp | 2c12d25d2078d3dacdb80c5c367c2e90feba7b6c | [
"Apache-2.0"
] | null | null | null | neural_sp/utils.py | Cescfangs/neural_sp | 2c12d25d2078d3dacdb80c5c367c2e90feba7b6c | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2018 Kyoto University (Hirofumi Inaguma)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""Unility functions for general purposes."""
import os
def mkdir_join(path, *dir_name):
"""Concatenate root path and 1 or more paths, and make a new ... | 28.361111 | 105 | 0.571988 |
62a68a83bdb3ecde52a97ae40aa068bdd383e8d7 | 4,654 | py | Python | dmg_settings.py | shootsoft/PlutoVideoSnapshoter | 20eb4bc9d4eb6f090c713dce23077173d7ed8e5e | [
"Apache-2.0"
] | 22 | 2018-04-30T23:16:20.000Z | 2021-12-30T02:21:24.000Z | dmg_settings.py | shootsoft/PlutoVidoeSnapshoter | 20eb4bc9d4eb6f090c713dce23077173d7ed8e5e | [
"Apache-2.0"
] | null | null | null | dmg_settings.py | shootsoft/PlutoVidoeSnapshoter | 20eb4bc9d4eb6f090c713dce23077173d7ed8e5e | [
"Apache-2.0"
] | 6 | 2018-05-06T02:35:32.000Z | 2021-03-06T11:37:51.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import biplist
import os.path
# Use like this: dmgbuild -s settings.py "Test Volume" test.dmg
# You can actually use this file for your own application (not just TextEdit)
# by doing e.g.
#
# dmgbuild -s settings.py -D app=/path/to/My.app "My Applicat... | 26.901734 | 80 | 0.633434 |
62a6bc48ffc9b9750b69e35d59b6dd494eb0663b | 6,691 | py | Python | sdks/python/appcenter_sdk/models/AutoProvisioningConfigRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/AutoProvisioningConfigRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/AutoProvisioningConfigRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class AutoProvisioni... | 40.065868 | 213 | 0.686146 |
62a6f03a83cd884fded2a8003b891ed6f671398b | 5,742 | py | Python | padertorch/contrib/jensheit/mask_estimator_example/modul.py | sibange/padertorch | 494692d877f04c66847c2943795b23aea488217d | [
"MIT"
] | 62 | 2019-12-22T08:30:29.000Z | 2022-03-22T11:02:59.000Z | padertorch/contrib/jensheit/mask_estimator_example/modul.py | sibange/padertorch | 494692d877f04c66847c2943795b23aea488217d | [
"MIT"
] | 47 | 2020-01-06T09:23:47.000Z | 2022-01-24T16:55:06.000Z | padertorch/contrib/jensheit/mask_estimator_example/modul.py | sibange/padertorch | 494692d877f04c66847c2943795b23aea488217d | [
"MIT"
] | 13 | 2019-12-16T08:12:46.000Z | 2021-11-08T14:37:06.000Z | import torch
from einops import rearrange
from torch.nn.utils.rnn import PackedSequence
import padertorch as pt
from padertorch.modules import fully_connected_stack
from padertorch.modules.normalization import Normalization
from padertorch.modules.recurrent import StatefulLSTM
from padertorch.ops import pack_sequence,... | 35.8875 | 82 | 0.624347 |
62a6f6e75ad159446db2c62837491ddd585e6675 | 426 | py | Python | LeetCode/easy - Array/605. Can Place Flowers/solution.py | vincent507cpu/Comprehensive-Algorithm-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | 4 | 2020-06-26T00:45:53.000Z | 2021-04-19T12:23:32.000Z | LeetCode/easy - Array/605. Can Place Flowers/solution.py | vincent507cpu/LeetCode-Comprehensive-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | null | null | null | LeetCode/easy - Array/605. Can Place Flowers/solution.py | vincent507cpu/LeetCode-Comprehensive-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/can-place-flowers/discuss/103890/Python-Straightforward-with-Explanation
class Solution:
def canPlaceFlowers(self, flowerbed: List[int], n: int) -> bool:
new = [0] + flowerbed + [0]
res = 0
for i in range(1, len(new)-1):
if new[i-1:i+2] ... | 32.769231 | 104 | 0.504695 |
62a74a438604db84a0ac1cc06ab32b7f6ba95b81 | 1,503 | py | Python | datacompare/tests/test_example.py | kitjosh1050/DataCompare | 2a410c69ef5a97b000a4eef254a41f44f2c53c4b | [
"MIT"
] | 3 | 2016-04-20T10:13:24.000Z | 2019-07-31T22:36:08.000Z | datacompare/tests/test_example.py | kitjosh1050/DataCompare | 2a410c69ef5a97b000a4eef254a41f44f2c53c4b | [
"MIT"
] | 1 | 2016-03-02T21:59:12.000Z | 2016-03-03T14:32:49.000Z | datacompare/tests/test_example.py | kitjosh1050/DataCompare | 2a410c69ef5a97b000a4eef254a41f44f2c53c4b | [
"MIT"
] | 1 | 2016-04-09T17:09:07.000Z | 2016-04-09T17:09:07.000Z | import datacompare as dc
import os
import pandas as pd
tests_folder = os.path.dirname(__file__)
# py.test -vv test_example.py
def test_compare_member_difference():
# ensure all functionality works as expected when primary key is not first in compared sets
result = dc.CompareDataFrame(
{"Chars": ["z",... | 36.658537 | 112 | 0.641384 |
62a75563320b83e7662a7c5b55ad7ffc8cd8670b | 3,061 | py | Python | tempest/api/compute/v3/test_quotas.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | tempest/api/compute/v3/test_quotas.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | tempest/api/compute/v3/test_quotas.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 43.112676 | 78 | 0.640967 |
62a767dafd9263c62331e1e82dddda4eb2b4cd58 | 2,948 | py | Python | packages/service-library/src/servicelib/rest_responses.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null | packages/service-library/src/servicelib/rest_responses.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | 2 | 2018-05-13T09:10:57.000Z | 2019-03-06T08:10:40.000Z | packages/service-library/src/servicelib/rest_responses.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null | """
FIXME: these are prototype! do not use in production
"""
from typing import Dict, Mapping, Tuple, Optional, List
import attr
from aiohttp import web
from .rest_models import LogMessageType
from .rest_codecs import jsonify, json
from .rest_models import ErrorItemType, ErrorType
ENVELOPE_KEYS = ('data', 'error')
... | 26.558559 | 84 | 0.658752 |
62a7ab0b00f06d85a4228ffa83af04cf8dec6712 | 380 | py | Python | src/olympia/search/migrations/0001_remove-es-use-classic-similarity-waffle-switch.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 843 | 2016-02-09T13:00:37.000Z | 2022-03-20T19:17:06.000Z | src/olympia/search/migrations/0001_remove-es-use-classic-similarity-waffle-switch.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 10,187 | 2016-02-05T23:51:05.000Z | 2022-03-31T15:24:44.000Z | src/olympia/search/migrations/0001_remove-es-use-classic-similarity-waffle-switch.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 551 | 2016-02-08T20:32:16.000Z | 2022-03-15T16:49:24.000Z | # Generated by Django 2.2.12 on 2020-05-05 13:39
from django.db import migrations
def remove_waffle_switch(apps, schema_editor):
Switch = apps.get_model('waffle', 'Switch')
Switch.objects.filter(name='es-use-classic-similarity').all().delete()
class Migration(migrations.Migration):
dependencies = []
... | 27.142857 | 74 | 0.742105 |
62a7c1bdbce6d2932e69441ec7ee1cddcddb0c2a | 11,115 | py | Python | src/onevision/datasets/div2k/div2kbicubicx2.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/datasets/div2k/div2kbicubicx2.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/datasets/div2k/div2kbicubicx2.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Div2K BiCubic X2 dataset and datamodule.
"""
from __future__ import annotations
import glob
import os
import random
from typing import Callable
from typing import Optional
import matplotlib.pyplot as plt
from onevision.cv import show_images
from onevision.cv import ... | 36.5625 | 95 | 0.576068 |
62a7cf29fcc3e6303b187de46d5aba5a5b2997a1 | 55 | py | Python | example/shop/orders/__init__.py | sakkada/django-shopkit | 35e6f8ac73bf6aa40887aa9b1b860d27db8b2975 | [
"BSD-3-Clause"
] | null | null | null | example/shop/orders/__init__.py | sakkada/django-shopkit | 35e6f8ac73bf6aa40887aa9b1b860d27db8b2975 | [
"BSD-3-Clause"
] | null | null | null | example/shop/orders/__init__.py | sakkada/django-shopkit | 35e6f8ac73bf6aa40887aa9b1b860d27db8b2975 | [
"BSD-3-Clause"
] | null | null | null | default_app_config = 'shop.orders.config.OrdersConfig'
| 27.5 | 54 | 0.836364 |
62a7dad446553134844b57f0e441c94626b1aad3 | 8,989 | py | Python | python/konduit/load.py | venkat-nidrive/konduit-serving | f0b829ec13e1fc3f675cfc6dbd85dec26f14defe | [
"Apache-2.0"
] | null | null | null | python/konduit/load.py | venkat-nidrive/konduit-serving | f0b829ec13e1fc3f675cfc6dbd85dec26f14defe | [
"Apache-2.0"
] | null | null | null | python/konduit/load.py | venkat-nidrive/konduit-serving | f0b829ec13e1fc3f675cfc6dbd85dec26f14defe | [
"Apache-2.0"
] | null | null | null | import json
import logging
import os
import yaml
from .inference import *
from .client import Client
from .server import Server
from .utils import to_unix_path, update_dict_with_unix_paths
USER_PATH = os.path.expanduser("~")
KONDUIT_BASE_DIR = os.path.join(USER_PATH, ".konduit")
KONDUIT_DIR = os.path.join(KONDUIT_BAS... | 33.793233 | 116 | 0.688842 |
62a80611b4c752673175ec11cb8ccffc5e574a95 | 32 | py | Python | btd6_memory_info/generated/SteamNative/HTML_UpdateToolTip_t/html_update_tool_tip_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/SteamNative/HTML_UpdateToolTip_t/html_update_tool_tip_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/SteamNative/HTML_UpdateToolTip_t/html_update_tool_tip_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class HTML_UpdateToolTip_t: pass | 32 | 32 | 0.90625 |
62a82b210a3f3ce6af75e96febec3b6c78a2514f | 1,189 | py | Python | src/zenml/steps/step_output.py | keppy/zenml | a2671d66201abfaf11894ef9010d7bb8619a63e7 | [
"Apache-2.0"
] | 1 | 2022-03-10T18:24:53.000Z | 2022-03-10T18:24:53.000Z | src/zenml/steps/step_output.py | keppy/zenml | a2671d66201abfaf11894ef9010d7bb8619a63e7 | [
"Apache-2.0"
] | null | null | null | src/zenml/steps/step_output.py | keppy/zenml | a2671d66201abfaf11894ef9010d7bb8619a63e7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) ZenML GmbH 2021. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41 | 78 | 0.70143 |
62a83c5e9b46aabb282bb43c876c30f0a5ec54a9 | 16,040 | py | Python | tests/unit/config_test.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | tests/unit/config_test.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | tests/unit/config_test.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | 3 | 2020-05-10T02:08:44.000Z | 2020-11-06T11:01:57.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)`
:copyright: © 2012-2013 by the SaltStack Team, see AUTHORS for more details
:license: Apache 2.0, see LICENSE for more details.
tests.unit.config_test
~~~~~~~~~~~~~~~~~~~~~~
'''
# Import python libs
import os
imp... | 41.554404 | 80 | 0.584352 |
62a843d2dd127067a766e4cfcd68b2eb39956849 | 2,564 | py | Python | BagModules/bag_digital_ec/inv_chain.py | xyabc/bag_digital_ec | 71b982fc0fbe275fc3901db2e25ab7ca62fb319f | [
"BSD-3-Clause"
] | null | null | null | BagModules/bag_digital_ec/inv_chain.py | xyabc/bag_digital_ec | 71b982fc0fbe275fc3901db2e25ab7ca62fb319f | [
"BSD-3-Clause"
] | null | null | null | BagModules/bag_digital_ec/inv_chain.py | xyabc/bag_digital_ec | 71b982fc0fbe275fc3901db2e25ab7ca62fb319f | [
"BSD-3-Clause"
] | 2 | 2019-06-30T07:03:02.000Z | 2020-01-07T04:55:21.000Z | # -*- coding: utf-8 -*-
from typing import Dict, Any
import os
import pkg_resources
from bag.design import Module
yaml_file = pkg_resources.resource_filename(__name__, os.path.join('netlist_info',
'inv_chain.yaml'))
# noinspection PyPep8Naming
cl... | 33.736842 | 98 | 0.545632 |
62a861c587bc3146d4f1216165712947478487a0 | 7,171 | py | Python | appengine/findit/pipelines/compile_failure/test/run_compile_try_job_pipeline_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/findit/pipelines/compile_failure/test/run_compile_try_job_pipeline_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/findit/pipelines/compile_failure/test/run_compile_try_job_pipeline_test.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.
import mock
from common import exceptions
from gae_libs.pipelines import pipeline
from libs import analysis_status
from model.wf_try_job import WfTryJob
fro... | 42.94012 | 80 | 0.716636 |
62a880f980c06f7830ab00bb017923e4f0832e3e | 4,118 | py | Python | model/dpc.py | jzhao004/UniTrack | e7a12721a6edac056ec54a781d522227347fdc08 | [
"MIT"
] | null | null | null | model/dpc.py | jzhao004/UniTrack | e7a12721a6edac056ec54a781d522227347fdc08 | [
"MIT"
] | null | null | null | model/dpc.py | jzhao004/UniTrack | e7a12721a6edac056ec54a781d522227347fdc08 | [
"MIT"
] | null | null | null | import sys
import torch
import torch.nn as nn
import torch.nn.functional as F
import math
sys.path.append('/home/junqi/videomontage/DPC/backbone')
from select_backbone import select_backbone
from convgru import ConvGRU
from roi_head import roi_head
from upsampler import Upsampler
class DPC(nn.Module):
def __in... | 39.596154 | 142 | 0.584507 |
62a8a2f708d90297d6caf16e7666a8b06ec33992 | 195 | py | Python | docs/source/plots/logical_systems/custom_zadeh.py | Parowicz/Yvain | e6caba0ef0c5bd030250a4ab67381aff4d653ba6 | [
"Apache-2.0"
] | null | null | null | docs/source/plots/logical_systems/custom_zadeh.py | Parowicz/Yvain | e6caba0ef0c5bd030250a4ab67381aff4d653ba6 | [
"Apache-2.0"
] | null | null | null | docs/source/plots/logical_systems/custom_zadeh.py | Parowicz/Yvain | e6caba0ef0c5bd030250a4ab67381aff4d653ba6 | [
"Apache-2.0"
] | null | null | null | from docs.source.examples.custom_zadeh import MyZadeh
from docs.source.plots.logical_systems.draw_logic import draw_system
if __name__ == '__main__':
draw_system(MyZadeh(), "Custom Zadeh")
| 27.857143 | 68 | 0.794872 |
62a8b80fbea94f10343e66f04f83247a626d5b4d | 6,961 | py | Python | clients/client/python/ory_client/model/ui_nodes.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/ui_nodes.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/ui_nodes.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | """
Ory APIs
Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501
The version of the OpenAPI document: v0.0.1-alpha.17
Contact: support@ory.sh
Generated by: htt... | 37.424731 | 194 | 0.575492 |
62a8e04f5ee2b81e3c8de1ef81fb6e056417a1d4 | 13,300 | py | Python | YAMLR/YAMLRGeneral.py | ViniGarcia/FlexibleNFV-RA | a7938c05be0d8ca64e281c94b2efbeaefeabdcd5 | [
"MIT"
] | 2 | 2021-05-10T16:28:50.000Z | 2021-12-15T04:03:34.000Z | YAMLR/YAMLRGeneral.py | ViniGarcia/FlexibleNFV-RA | a7938c05be0d8ca64e281c94b2efbeaefeabdcd5 | [
"MIT"
] | null | null | null | YAMLR/YAMLRGeneral.py | ViniGarcia/FlexibleNFV-RA | a7938c05be0d8ca64e281c94b2efbeaefeabdcd5 | [
"MIT"
] | null | null | null | ######## YAMLR GENERAL CLASS DESCRIPTION ########
#PROJECT: NFV FLERAS (FLExible Resource Allocation Service)
#CREATED BY: VINICIUS FULBER GARCIA
#CONTACT: vfulber@inf.ufsm.br
#RECEIVES A YAML REQUEST FILE WITH THE SFC
#DESCRIPTION AND THE REQUESTED OPERATIONS
#FOR THE NFV RESOURCE ALLOCATION EXECUTION.
#THE STATUS ... | 27.366255 | 176 | 0.675414 |
62a917a8619be440f13efe41fd2e1ae62cbd53e6 | 12,621 | py | Python | utils/network_config.py | magic2du/dlnn | 9a6fdd1e9e84826c402b564853673dd1c9cd12b9 | [
"Apache-2.0"
] | null | null | null | utils/network_config.py | magic2du/dlnn | 9a6fdd1e9e84826c402b564853673dd1c9cd12b9 | [
"Apache-2.0"
] | null | null | null | utils/network_config.py | magic2du/dlnn | 9a6fdd1e9e84826c402b564853673dd1c9cd12b9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Tianchuan Du University of Delaware
# 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
#
# THIS CODE IS PROVIDED *AS IS* BAS... | 46.744444 | 140 | 0.648918 |
62a91e873f40de070ca83f55fab2c7fd42257e33 | 3,104 | py | Python | combine_ppn_outputs.py | fmidev/fmippn-merge-output | 00867cc09547f89c2ee67e314fba954698819401 | [
"MIT"
] | null | null | null | combine_ppn_outputs.py | fmidev/fmippn-merge-output | 00867cc09547f89c2ee67e314fba954698819401 | [
"MIT"
] | null | null | null | combine_ppn_outputs.py | fmidev/fmippn-merge-output | 00867cc09547f89c2ee67e314fba954698819401 | [
"MIT"
] | null | null | null | import os
import h5py
import argparse
import numpy as np
# Tuuli Perttula 2020
# tuuli.perttula@fmi.fi
def combine_fmippn_h5_files(file1,file2):
""" This function combines two FMIPPN HDF5 output files.
Ensemble members from file2 are added to file1. The names of
ensemble members from file2 (of type "memb... | 38.320988 | 95 | 0.67268 |
62a92b91dd42daa1b7419da44447945a12e7a674 | 11,247 | py | Python | policing_detector.py | USC-NSL/policing-detection | 95dcfbd76875b23e26a57f1a5f4b82ea63916c99 | [
"Apache-2.0"
] | 13 | 2016-12-12T02:19:49.000Z | 2021-12-08T12:49:28.000Z | policing_detector.py | USC-NSL/policing-detection | 95dcfbd76875b23e26a57f1a5f4b82ea63916c99 | [
"Apache-2.0"
] | null | null | null | policing_detector.py | USC-NSL/policing-detection | 95dcfbd76875b23e26a57f1a5f4b82ea63916c99 | [
"Apache-2.0"
] | 3 | 2017-10-18T08:01:12.000Z | 2018-05-22T08:46:32.000Z | import dpkt
from tcp_endpoint import *
from tcp_flow import *
from tcp_util import *
# Minimum number of samples (data points) for each loss/pass category
# to enable detection of policing with confidence
MIN_NUM_SAMPLES = 15
# Minimum number of RTT slices seeing loss to enable detection
# of policing with confidenc... | 37.118812 | 99 | 0.70152 |
62a982f578da5cda1c2ee7e06b41880bf5313fd3 | 1,628 | py | Python | tests/common/test_op/resnet/fused_mul_div_rsqrt_mul_isfinite_red.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_op/resnet/fused_mul_div_rsqrt_mul_isfinite_red.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_op/resnet/fused_mul_div_rsqrt_mul_isfinite_red.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2020-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 34.638298 | 97 | 0.726658 |
62a989d3e8a39190a959f166adbb6c5fb7cbcc73 | 22,544 | py | Python | stage_1_disentangle/src_unis/solver.py | grtzsohalf/Audio-Phonetic-and-Semantic-Embedding | 1207cb61ec4587f38817b030a1e92cb315ebd178 | [
"MIT"
] | 2 | 2019-08-09T00:49:25.000Z | 2019-09-30T06:37:07.000Z | stage_1_disentangle/src_unis/solver.py | grtzsohalf/Audio-Phonetic-and-Semantic-Embedding | 1207cb61ec4587f38817b030a1e92cb315ebd178 | [
"MIT"
] | null | null | null | stage_1_disentangle/src_unis/solver.py | grtzsohalf/Audio-Phonetic-and-Semantic-Embedding | 1207cb61ec4587f38817b030a1e92cb315ebd178 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
import time
import os
import random
from datetime import datetime
from model import Audio2Vec
from utils import *
from collections import deque
from tqdm import tqdm
class Solver(object):
def __init__(self, model_type, stack_num, feat_dir, train_feat_scp, test_feat_scp, ... | 51.47032 | 123 | 0.575719 |
62a9d5e16ff2cb5d44222f2ae5ab69b895521038 | 38,475 | py | Python | rl/core.py | NunoEdgarGFlowHub/keras-rl | 544796e89a342b6a512aabacb3625cf1d215f11d | [
"MIT"
] | 3 | 2018-10-22T11:13:06.000Z | 2022-02-16T20:40:20.000Z | rl/core.py | NunoEdgarGFlowHub/keras-rl | 544796e89a342b6a512aabacb3625cf1d215f11d | [
"MIT"
] | null | null | null | rl/core.py | NunoEdgarGFlowHub/keras-rl | 544796e89a342b6a512aabacb3625cf1d215f11d | [
"MIT"
] | 5 | 2018-10-22T11:13:08.000Z | 2020-12-03T00:57:11.000Z | # -*- coding: utf-8 -*-
import warnings
from copy import deepcopy
from collections import deque
import os
import numpy as np
from keras.callbacks import History
import pickle
from rl.callbacks import (
CallbackList,
TestLogger,
TrainEpisodeLogger,
TrainIntervalLogger,
Visualizer,
FileLogger
)
... | 41.775244 | 202 | 0.579571 |
62a9df455f9baea371abc93b031dee2a9f59f5f0 | 1,702 | py | Python | config/settings/test.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null | config/settings/test.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null | config/settings/test.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null | """
With these settings, tests run faster.
"""
from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env(
"DJANGO_SECRET_KEY",
default="Z2OZuvXxc... | 32.730769 | 80 | 0.49765 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.