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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79736a5d2d437b7d4d2091b58f2fa377e2bccfeb | 2,655 | py | Python | python/pynq/board/switch.py | AEW2015/PYNQ_PR_Overlay | 2c685d2d76d04e579beecdbdfd8d0919b3dfa71c | [
"BSD-3-Clause"
] | 16 | 2017-03-14T20:28:40.000Z | 2021-11-02T12:45:15.000Z | python/pynq/board/switch.py | xupsh/PYNQ_PR_Overlay | 2c685d2d76d04e579beecdbdfd8d0919b3dfa71c | [
"BSD-3-Clause"
] | 2 | 2017-12-04T05:46:35.000Z | 2018-11-30T21:40:45.000Z | python/pynq/board/switch.py | xupsh/PYNQ_PR_Overlay | 2c685d2d76d04e579beecdbdfd8d0919b3dfa71c | [
"BSD-3-Clause"
] | 8 | 2017-03-30T22:00:43.000Z | 2020-09-08T12:49:39.000Z | # Copyright (c) 2016, Xilinx, 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 ... | 36.369863 | 79 | 0.668173 |
797382884101bfddb963fd641a2fb0c2fb738fb6 | 5,127 | py | Python | gpMgmt/bin/lib/gplogextract.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 9 | 2018-04-20T03:31:01.000Z | 2020-05-13T14:10:53.000Z | gpMgmt/bin/lib/gplogextract.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 36 | 2017-09-21T09:12:27.000Z | 2020-06-17T16:40:48.000Z | gpMgmt/bin/lib/gplogextract.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 32 | 2017-08-31T12:50:52.000Z | 2022-03-01T07:34:53.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
gplogextract.py [options] file ...
General Options:
-? | --help show this help message and exit
-v | --version show the program's version number and exit
Options:
-o | --output DIRECTORY output directory
'''
# ====================... | 32.04375 | 78 | 0.420324 |
7973a7be798b9855d43acd39f92f8f8f379d2005 | 512 | py | Python | tron/Hub/Reply/Decoders/ReplyDecoder.py | sdss/tron | 886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322 | [
"BSD-3-Clause"
] | null | null | null | tron/Hub/Reply/Decoders/ReplyDecoder.py | sdss/tron | 886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322 | [
"BSD-3-Clause"
] | null | null | null | tron/Hub/Reply/Decoders/ReplyDecoder.py | sdss/tron | 886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322 | [
"BSD-3-Clause"
] | null | null | null | __all__ = ['ReplyDecoder']
from tron import Misc
class ReplyDecoder(Misc.Object):
""" Base class for decoders for incoming replies.
"""
def __init__(self, **argv):
Misc.Object.__init__(self, **argv)
self.name = argv.get('name', 'unnamed')
self.nubID = None
def setNub(self,... | 20.48 | 83 | 0.605469 |
7973d62c454c70e30b8f26a3cc91a39486dad918 | 3,624 | py | Python | src/nitpick/style/fetchers/__init__.py | camresp/nitpick | c922dcde1c1e650234343e03bb872cac6500e7b1 | [
"MIT"
] | null | null | null | src/nitpick/style/fetchers/__init__.py | camresp/nitpick | c922dcde1c1e650234343e03bb872cac6500e7b1 | [
"MIT"
] | null | null | null | src/nitpick/style/fetchers/__init__.py | camresp/nitpick | c922dcde1c1e650234343e03bb872cac6500e7b1 | [
"MIT"
] | null | null | null | """Style fetchers with protocol support."""
from dataclasses import dataclass, field
from functools import lru_cache
from pathlib import Path
from typing import TYPE_CHECKING, Optional, Tuple
from urllib.parse import urlparse, uses_netloc, uses_relative
from cachy import CacheManager, Repository
from nitpick.generic ... | 33.247706 | 118 | 0.67936 |
7973fccda43d7fd3462eb21aefbe48eb3f6db6a7 | 1,062 | py | Python | codility/caterpillar/catterpillar.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 3 | 2017-02-15T20:55:04.000Z | 2018-09-26T18:48:24.000Z | codility/caterpillar/catterpillar.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 4 | 2017-10-07T18:59:20.000Z | 2019-10-08T05:43:25.000Z | codility/caterpillar/catterpillar.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 1 | 2017-10-08T06:52:21.000Z | 2017-10-08T06:52:21.000Z | # Each position of the caterpillar will represent a dierent contiguous subsequence in which
# the total of the elements is not greater than s. Let’s initially set the caterpillar on the first
# element. Next we will perform the following steps:
# • if we can, we move the right end (front) forward and increase the size ... | 50.571429 | 99 | 0.691149 |
79749da14615cfca0b26b1934753d3fcd20eabfd | 7,398 | py | Python | tests/components/auth/test_init.py | Natrinicle/home-assistant | 7bb53449428b0787cca1d0c986c93a458401e6fb | [
"Apache-2.0"
] | null | null | null | tests/components/auth/test_init.py | Natrinicle/home-assistant | 7bb53449428b0787cca1d0c986c93a458401e6fb | [
"Apache-2.0"
] | null | null | null | tests/components/auth/test_init.py | Natrinicle/home-assistant | 7bb53449428b0787cca1d0c986c93a458401e6fb | [
"Apache-2.0"
] | null | null | null | """Integration tests for the auth component."""
from datetime import timedelta
from unittest.mock import patch
from homeassistant.auth.models import Credentials
from homeassistant.components.auth import RESULT_TYPE_USER
from homeassistant.setup import async_setup_component
from homeassistant.util.dt import utcnow
from... | 32.590308 | 79 | 0.659367 |
7974c611c0693a9ff243c7b445c06cbea23c65cf | 435 | py | Python | test/editdata_testJarvis.py | mdvandamme/PoussePousseEditData | 1864cd7ddad7002c050c2296b2d90ea817e12f57 | [
"MIT"
] | null | null | null | test/editdata_testJarvis.py | mdvandamme/PoussePousseEditData | 1864cd7ddad7002c050c2296b2d90ea817e12f57 | [
"MIT"
] | null | null | null | test/editdata_testJarvis.py | mdvandamme/PoussePousseEditData | 1864cd7ddad7002c050c2296b2d90ea817e12f57 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
"""
from sampleConvexHull_Jarvis import convexe
T = [[1,3],[4,1],[6,4],[5,5],[2,2],[2,1]]
X = [1,4,6,5,2,2]
Y = [3,1,4,5,2,1]
N = 6
ptmax = 6
env = convexe(X, Y, N, ptmax)
print (env)
#indices = []
#Ne = len(env)
#for e in range(0, int(Ne/2)):
# x = env[0::2][e]
# y = env[1::2][e... | 16.730769 | 43 | 0.482759 |
7974d76700ea90d959f2fd0df19c0fa73d670329 | 1,703 | py | Python | configs/swin/swin_l_upper_w_jitter_inference.py | jozhang97/mmsegmentation | aecdf14de912be9a10be9346d7749cbd3cf70e4a | [
"Apache-2.0"
] | null | null | null | configs/swin/swin_l_upper_w_jitter_inference.py | jozhang97/mmsegmentation | aecdf14de912be9a10be9346d7749cbd3cf70e4a | [
"Apache-2.0"
] | null | null | null | configs/swin/swin_l_upper_w_jitter_inference.py | jozhang97/mmsegmentation | aecdf14de912be9a10be9346d7749cbd3cf70e4a | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../_base_/models/upernet_swin.py', '../_base_/datasets/uvo_inference.py',
'../_base_/default_runtime.py', '../_base_/schedules/schedule_160k.py'
]
model = dict(
pretrained='PATH/TO/YOUR/swin_large_patch4_window12_384_22k.pth',
backbone=dict(
pretrain_img_size=384,
embed_dims... | 28.383333 | 78 | 0.642396 |
7974f0b1b028e6ff0f9c0bd04e2f69114ae1522c | 16,080 | py | Python | tofu/data/_inversions_comp.py | WinstonLHS/tofu | c95b2eb6aedcf4bac5676752b9635b78f31af6ca | [
"MIT"
] | 6 | 2016-09-15T17:01:19.000Z | 2017-03-06T22:53:10.000Z | tofu/data/_inversions_comp.py | WinstonLHS/tofu | c95b2eb6aedcf4bac5676752b9635b78f31af6ca | [
"MIT"
] | 9 | 2016-09-14T17:23:52.000Z | 2017-04-13T07:30:07.000Z | tofu/data/_inversions_comp.py | Didou09/tofu | 4a4e1f058bab8e7556ed9d518f90807cec605476 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Built-in
import time
# Common
import numpy as np
import scipy.sparse as scpsp
# tofu
from . import _generic_check
from . import _inversions_checks
from . import _inversions_algos
tomotok2tofu = _inversions_checks.tomotok2tofu
__all__ = ['get_available_inversions_algo']
# ############... | 26.061588 | 79 | 0.434142 |
7974f22816bfcfe3081180f7d192027f07af9113 | 1,197 | py | Python | lymph/utils/gpool.py | MislavStipetic/lymph | aa36a688380e5665fdea31fda76b4a0cf35b6fc0 | [
"Apache-2.0"
] | 89 | 2015-03-01T11:39:55.000Z | 2022-01-31T22:00:15.000Z | lymph/utils/gpool.py | MislavStipetic/lymph | aa36a688380e5665fdea31fda76b4a0cf35b6fc0 | [
"Apache-2.0"
] | 214 | 2015-01-02T23:48:49.000Z | 2020-01-14T10:47:37.000Z | lymph/utils/gpool.py | MislavStipetic/lymph | aa36a688380e5665fdea31fda76b4a0cf35b6fc0 | [
"Apache-2.0"
] | 36 | 2015-01-13T13:44:15.000Z | 2021-09-15T17:55:41.000Z | from gevent.pool import Pool, Group
from lymph.exceptions import ResourceExhausted
class RejectExcecutionError(ResourceExhausted):
pass
class NonBlockingPool(Pool):
"""A gevent pool that when exhausted will wait for a given timeout
for resources to be freed before rejecting the job by raising
exc:`... | 32.351351 | 90 | 0.685046 |
7975053511625a1fc31571504ceb51297faf2d7c | 1,870 | py | Python | src/python/ch04/sec05.py | zhuyuanxiang/Dive-into-Deep-Learning | 1237dfe2744aaa1cd42a83961b9516c01b960b83 | [
"MIT"
] | null | null | null | src/python/ch04/sec05.py | zhuyuanxiang/Dive-into-Deep-Learning | 1237dfe2744aaa1cd42a83961b9516c01b960b83 | [
"MIT"
] | null | null | null | src/python/ch04/sec05.py | zhuyuanxiang/Dive-into-Deep-Learning | 1237dfe2744aaa1cd42a83961b9516c01b960b83 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
@Author : zYx.Tom
@Contact : 526614962@qq.com
@site : https://zhuyuanxiang.github.io
---------------------------
@Software : PyCharm
@Project : Dive-into-Deep-Learning
@File : sec0202.py
@Version : v0.1
@Time : 2020-12-27 9:25
@License ... | 22.804878 | 72 | 0.525134 |
797515419d1c7f33ea5778932e949a776a64622e | 302 | py | Python | napari/_qt/widgets/qt_activity_dock.py | pranathivemuri/napari | 7a7f824b686a276dc6cdc8013d8f437e3c3b03e1 | [
"BSD-3-Clause"
] | 1 | 2021-05-16T19:31:42.000Z | 2021-05-16T19:31:42.000Z | napari/_qt/widgets/qt_activity_dock.py | 0x00b1/napari | 01c24e320dc3d8daaae80a383f95fc0587c98ee4 | [
"BSD-3-Clause"
] | null | null | null | napari/_qt/widgets/qt_activity_dock.py | 0x00b1/napari | 01c24e320dc3d8daaae80a383f95fc0587c98ee4 | [
"BSD-3-Clause"
] | null | null | null | """Provides an Activity Dock that allows the user to view running progress bars
"""
from qtpy.QtWidgets import QVBoxLayout, QWidget
class QtActivityDock(QWidget):
def __init__(
self,
) -> None:
super().__init__()
layout = QVBoxLayout()
self.setLayout(layout)
| 21.571429 | 79 | 0.65894 |
79756f14745e7a795e165148809909ebc0e8a1ee | 52,703 | py | Python | unit_tests/payloads2.py | LandRegistry/validation-api | f24930236622de7b481bbd378138ab1d6b5345b4 | [
"MIT"
] | null | null | null | unit_tests/payloads2.py | LandRegistry/validation-api | f24930236622de7b481bbd378138ab1d6b5345b4 | [
"MIT"
] | null | null | null | unit_tests/payloads2.py | LandRegistry/validation-api | f24930236622de7b481bbd378138ab1d6b5345b4 | [
"MIT"
] | 1 | 2021-04-11T05:24:47.000Z | 2021-04-11T05:24:47.000Z | simple_charge = {
"schema-version": "2.0",
"geometry": {
"type": "FeatureCollection",
"features": [
{
"geometry": {
"type": "Polygon",
"coordinates": [[[291267.338, 93516.097],
[291267.912, 9... | 34.491492 | 67 | 0.458949 |
7975a88656a27eaf5c48100d99c40311fddab3fe | 3,540 | py | Python | improver_tests/synthetic_data/test_utilities.py | owena11/improver | ff658db31364c0bdf3af3940736c260e10544705 | [
"BSD-3-Clause"
] | 77 | 2017-04-26T07:47:40.000Z | 2022-03-31T09:40:49.000Z | improver_tests/synthetic_data/test_utilities.py | owena11/improver | ff658db31364c0bdf3af3940736c260e10544705 | [
"BSD-3-Clause"
] | 1,440 | 2017-03-29T10:04:15.000Z | 2022-03-28T10:11:29.000Z | improver_tests/synthetic_data/test_utilities.py | MoseleyS/improver | ca028e3a1c842e3ff00b188c8ea6eaedd0a07149 | [
"BSD-3-Clause"
] | 72 | 2017-03-17T16:53:45.000Z | 2022-02-16T09:41:37.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2021 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 40.227273 | 90 | 0.708757 |
7975aac9fa0042b77ac1f1c4e7e93e1a5900e628 | 10,514 | py | Python | tests/frontend/artifact_delete.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | tests/frontend/artifact_delete.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | tests/frontend/artifact_delete.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) 2019 Codethink Limited
#
# 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... | 40.129771 | 112 | 0.711527 |
7975ceaa61d10c25747e48b8598686d88f8ff90d | 10,636 | py | Python | pollination_sdk/models/function_boolean_input.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 2 | 2020-01-30T23:28:59.000Z | 2020-05-06T16:43:47.000Z | pollination_sdk/models/function_boolean_input.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 1 | 2020-10-02T18:00:25.000Z | 2020-10-02T18:00:25.000Z | pollination_sdk/models/function_boolean_input.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | null | null | null | # coding: utf-8
"""
pollination-server
Pollination Server OpenAPI Definition # noqa: E501
The version of the OpenAPI document: 0.16.0
Contact: info@pollination.cloud
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from pollination_sdk.configu... | 33.031056 | 243 | 0.63003 |
7975fa9afa6c8cc5fb778a3e7fde442be667668a | 11,449 | py | Python | rasa_core/remote.py | fdevillard/rasa_core | 0d0c2f9d6bb3c0c5b0c1e83dab2d9d8b6819303d | [
"Apache-2.0"
] | 1 | 2019-02-22T11:26:18.000Z | 2019-02-22T11:26:18.000Z | rasa_core/remote.py | fdevillard/rasa_core | 0d0c2f9d6bb3c0c5b0c1e83dab2d9d8b6819303d | [
"Apache-2.0"
] | null | null | null | rasa_core/remote.py | fdevillard/rasa_core | 0d0c2f9d6bb3c0c5b0c1e83dab2d9d8b6819303d | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import io
import json
import logging
import os
import time
import requests
from future.moves.urllib.parse import quote_plus
from requests.exceptions import RequestExcept... | 37.537705 | 80 | 0.570705 |
797656a56a30fa6d8dd20aa7e9beeddff7e1d199 | 1,638 | py | Python | pygame/pong/pong06.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | pygame/pong/pong06.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | pygame/pong/pong06.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Este programa es sólo el comienzo de un ping-pong muy simple
pong02.py
'''
# Imports generales
import pygame
import sys
from pygame.locals import *
# Inicialización entorno
pygame.init()
# Definiciones de colores
BLANCO = (255,255,255)
NEGRO = (0,0,0)
# Inicializac... | 21.552632 | 62 | 0.638584 |
797659bb7f40ae941928f7731abaf167d7d0a7f3 | 1,151 | py | Python | Task2F.py | Ericsong2333/partia-flood-warning-system | 545a257f601535c62b3341059fdf2203e06c8e17 | [
"MIT"
] | null | null | null | Task2F.py | Ericsong2333/partia-flood-warning-system | 545a257f601535c62b3341059fdf2203e06c8e17 | [
"MIT"
] | null | null | null | Task2F.py | Ericsong2333/partia-flood-warning-system | 545a257f601535c62b3341059fdf2203e06c8e17 | [
"MIT"
] | null | null | null | import datetime
import matplotlib.pyplot as plt
from floodsystem.datafetcher import fetch_latest_water_level_data, fetch_measure_levels
from floodsystem.flood import stations_highest_rel_level
from floodsystem.plot import plot_water_level_with_fit
from floodsystem.stationdata import build_station_list, update_wate... | 30.289474 | 101 | 0.719374 |
797665eac809448245894d89cd23d5b8e9f5cd8d | 5,748 | py | Python | RP1210 and Python/RP1210ReceiveMessages.py | jeremy-daily/Teensy-Crash-EDR | 736e958161124e3c1423da24b29054d7ca2dd53f | [
"MIT"
] | 2 | 2017-10-21T03:04:11.000Z | 2018-08-10T08:38:12.000Z | RP1210 and Python/RP1210ReceiveMessages.py | jeremy-daily/Teensy-Crash-EDR | 736e958161124e3c1423da24b29054d7ca2dd53f | [
"MIT"
] | 1 | 2017-04-17T16:25:09.000Z | 2017-04-17T16:25:09.000Z | RP1210 and Python/RP1210ReceiveMessages.py | jeremy-daily/Teensy-Crash-EDR | 736e958161124e3c1423da24b29054d7ca2dd53f | [
"MIT"
] | 2 | 2016-09-18T23:58:44.000Z | 2018-04-12T02:41:08.000Z | # RP1210 Hello World
# Dr. Jeremy Daily
# Associate Professor of Mechanical Engineering
# The University of Tulsa
# 800 S. Tucker Dr.
# Tulsa, OK 74104
#
# This is a minimal program that tests to see if you can connect to an RP1210 device.
#
# This is hard coded for a Nexiq USB-Link
import struct
import sys
import os
... | 42.577778 | 140 | 0.643876 |
7976ac2eaabed4d1cf4797d80969be89147d0eec | 19,194 | py | Python | flexget/plugins/metainfo/imdb_lookup.py | BrainDamage/Flexget | 50f75bdad64ce023daaff334df8478319ddb9f64 | [
"MIT"
] | null | null | null | flexget/plugins/metainfo/imdb_lookup.py | BrainDamage/Flexget | 50f75bdad64ce023daaff334df8478319ddb9f64 | [
"MIT"
] | null | null | null | flexget/plugins/metainfo/imdb_lookup.py | BrainDamage/Flexget | 50f75bdad64ce023daaff334df8478319ddb9f64 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
import logging
from datetime import datetime, timedelta
from sqlalchemy import Table, Column, Integer, Float, String, Unicode, Boolean, DateTime, delete
from sqlalchemy.schema import ForeignKey, Index
from sqlalchemy.orm import relation, joinedload
fr... | 38.933063 | 120 | 0.606544 |
7976e30b218b2ba7a1ee75bb27cc20a64e9ef810 | 7,425 | py | Python | higra/hierarchy/constrained_connectivity_hierarchy.py | deisemaia/Higra | 82cb78b606a383f3961faa882457a9a987f802e0 | [
"CECILL-B"
] | 64 | 2019-08-18T19:23:23.000Z | 2022-03-21T04:15:04.000Z | higra/hierarchy/constrained_connectivity_hierarchy.py | deisemaia/Higra | 82cb78b606a383f3961faa882457a9a987f802e0 | [
"CECILL-B"
] | 120 | 2019-08-16T09:10:35.000Z | 2022-03-17T09:42:58.000Z | higra/hierarchy/constrained_connectivity_hierarchy.py | deisemaia/Higra | 82cb78b606a383f3961faa882457a9a987f802e0 | [
"CECILL-B"
] | 12 | 2019-10-04T07:35:55.000Z | 2021-01-10T19:59:11.000Z | ############################################################################
# Copyright ESIEE Paris (2018) #
# #
# Contributor(s) : Benjamin Perret #
# ... | 54.19708 | 172 | 0.664377 |
7976f6f8d7561065d069d8d50131d0c6196f3296 | 1,080 | py | Python | alipay/aop/api/response/AlipayFinanceQuotationQuotetradeTradedaystateBatchqueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayFinanceQuotationQuotetradeTradedaystateBatchqueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayFinanceQuotationQuotetradeTradedaystateBatchqueryResponse.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
from alipay.aop.api.domain.TradePeriodDTO import TradePeriodDTO
class AlipayFinanceQuotationQuotetradeTradedaystateBatchqueryResponse(AlipayResponse):
def __init__(self):
super(Ali... | 32.727273 | 136 | 0.681481 |
7977029826b09616fbb08f4b6540f1c9543ec05d | 4,108 | py | Python | venv/Lib/site-packages/pybtex/backends/markdown.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/pybtex/backends/markdown.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | null | null | null | venv/Lib/site-packages/pybtex/backends/markdown.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | 4 | 2020-11-14T17:05:36.000Z | 2020-11-16T18:44:54.000Z | # -*- coding: utf8 -*-
#
# Copyright (c) 2006-2019 Andrey Golovigin
# Copyright (c) 2014 Jorrit Wronski
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# wi... | 33.129032 | 95 | 0.629503 |
797744a712c8baa51d740abeaad63d5bb5a004fe | 24,952 | py | Python | data/transcoder_evaluation_gfg/python/ROW_WISE_COMMON_ELEMENTS_TWO_DIAGONALS_SQUARE_MATRIX.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 241 | 2021-07-20T08:35:20.000Z | 2022-03-31T02:39:08.000Z | data/transcoder_evaluation_gfg/python/ROW_WISE_COMMON_ELEMENTS_TWO_DIAGONALS_SQUARE_MATRIX.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 49 | 2021-07-22T23:18:42.000Z | 2022-03-24T09:15:26.000Z | data/transcoder_evaluation_gfg/python/ROW_WISE_COMMON_ELEMENTS_TWO_DIAGONALS_SQUARE_MATRIX.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 71 | 2021-07-21T05:17:52.000Z | 2022-03-29T23:49:28.000Z | # Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
def f_gold ( mat , n ) :
res = 0
for i in range ( n ) :
if mat [ i ] [ i ] == mat [ i ] [ n - i - 1 ] :
... | 733.882353 | 9,524 | 0.423052 |
797746dfd3afc01253af82609c068c3285182d72 | 3,631 | py | Python | Kaggle/DecMeg2014/Python/sampleBench.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 1 | 2019-02-13T12:02:26.000Z | 2019-02-13T12:02:26.000Z | Kaggle/DecMeg2014/Python/sampleBench.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 1 | 2018-08-13T15:58:33.000Z | 2018-08-13T15:58:33.000Z | Kaggle/DecMeg2014/Python/sampleBench.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 2 | 2017-08-10T20:01:29.000Z | 2021-07-01T08:39:13.000Z | """DecMeg2014 example code.
Simple prediction of the class labels of the test set by:
- pooling all the triaining trials of all subjects in one dataset.
- Extracting the MEG data in the first 500ms from when the
stimulus starts.
- Using a linear classifier (logistic regression).
"""
import numpy as np
from sklearn.li... | 29.762295 | 120 | 0.64087 |
7977786969dc41fd8c493ee32037202b0c0afe1c | 9,834 | py | Python | mediapipe/util/tracking/motion_saliency_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 5 | 2021-01-01T11:02:41.000Z | 2022-03-11T19:44:29.000Z | mediapipe/util/tracking/motion_saliency_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | null | null | null | mediapipe/util/tracking/motion_saliency_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 1 | 2021-04-12T05:59:46.000Z | 2021-04-12T05:59:46.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mediapipe/util/tracking/motion_saliency.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf imp... | 55.875 | 1,087 | 0.770185 |
797779ce31dbc035ff1a0a825a64c262e463cf87 | 782 | py | Python | src/ggrc_risks/migrations/versions/20141128185952_44d5969c897b_add_missing_columns_to_risks.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-03-30T11:28:48.000Z | 2018-03-30T11:28:48.000Z | src/ggrc_risks/migrations/versions/20141128185952_44d5969c897b_add_missing_columns_to_risks.py | trevordonnelly/ggrc-core | 499cf0d3cce70737b080991b12c203ec22015cea | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2018-07-06T00:04:23.000Z | 2021-02-26T21:13:20.000Z | src/ggrc_risks/migrations/versions/20141128185952_44d5969c897b_add_missing_columns_to_risks.py | zidarsk8/ggrc-core | 2509c989eddf434249d3bef50c21e08dbf56c1a4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-11-11T22:16:56.000Z | 2017-11-11T22:16:56.000Z | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""add missing columns to risks
Revision ID: 44d5969c897b
Revises: 1347acbb4dc2
Create Date: 2014-11-28 18:59:52.290005
"""
# revision identifiers, used by Alembic.
revision = '44d5969c897b'
down_revision... | 26.066667 | 85 | 0.713555 |
7977949a7fa02e9aa564dfc3e3d2e17016e583df | 15,368 | py | Python | composer/datasets/cifar.py | hanlint/composer | 83d96b7efde533cbc2fff7dd7e0769da2b177807 | [
"Apache-2.0"
] | null | null | null | composer/datasets/cifar.py | hanlint/composer | 83d96b7efde533cbc2fff7dd7e0769da2b177807 | [
"Apache-2.0"
] | null | null | null | composer/datasets/cifar.py | hanlint/composer | 83d96b7efde533cbc2fff7dd7e0769da2b177807 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 MosaicML. All Rights Reserved.
"""CIFAR image classification dataset.
The CIFAR datasets are a collection of labeled 32x32 colour images. Please refer to the `CIFAR dataset
<https://www.cs.toronto.edu/~kriz/cifar.html>`_ for more details.
"""
import logging
import os
import textwrap
from dataclasses... | 51.397993 | 178 | 0.639771 |
7977df41d14095108edff22b9f9ca153e7092796 | 12,123 | py | Python | yggdrasil/examples/__init__.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | null | null | null | yggdrasil/examples/__init__.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | null | null | null | yggdrasil/examples/__init__.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | null | null | null | """Tools for accessing examples from python."""
import os
import glob
import logging
from yggdrasil import tools, languages, serialize, constants
# TODO: This can be generated from the drivers
ext_map = dict(constants.LANG2EXT, executable='',
make='.cpp', cmake='.cpp', function='',
osr='... | 39.747541 | 85 | 0.562732 |
7977ef120a34cc844f231bcbfcc79c6d6aa97916 | 1,180 | py | Python | examples/rosenbrock_cma-es.py | zhanglei1172/bbobenchmark | 841bffdddc1320ac2676e378d20f8b176a7e6cf7 | [
"MIT"
] | 2 | 2021-09-06T02:06:22.000Z | 2021-12-09T10:46:56.000Z | examples/rosenbrock_cma-es.py | zhanglei1172/bbobenchmark | 841bffdddc1320ac2676e378d20f8b176a7e6cf7 | [
"MIT"
] | null | null | null | examples/rosenbrock_cma-es.py | zhanglei1172/bbobenchmark | 841bffdddc1320ac2676e378d20f8b176a7e6cf7 | [
"MIT"
] | null | null | null | import numpy as np
# import matplotlib.pyplot as plt
from xbbo.search_space.fast_example_problem import build_space_hard, rosenbrock_2d_hard
from xbbo.search_algorithm.cma_optimizer import CMAES
if __name__ == "__main__":
MAX_CALL = 1000
rng = np.random.RandomState(42)
# define black box function
b... | 30.25641 | 87 | 0.676271 |
7977f4015d637b127ab3a71959f9474595b1b8bd | 2,526 | py | Python | gam/spearman_distance.py | CentreInnovationLevio/global-attribution-mapping | 068ce6071003433ef4a8381ae4dc0f54da4aa06e | [
"Apache-2.0"
] | null | null | null | gam/spearman_distance.py | CentreInnovationLevio/global-attribution-mapping | 068ce6071003433ef4a8381ae4dc0f54da4aa06e | [
"Apache-2.0"
] | null | null | null | gam/spearman_distance.py | CentreInnovationLevio/global-attribution-mapping | 068ce6071003433ef4a8381ae4dc0f54da4aa06e | [
"Apache-2.0"
] | null | null | null | """
Implementation of Spearman's Rho squared as a pairwise distance metric
Base on
http://www.plhyu.com/administrator/components/com_jresearch/files/publications/Mixtures_of_weighted_distance-based_models_for_ranking_data_with_applications_in_political_studies.pdf
TODO:
- add tests
"""
from sklearn.metrics import pai... | 29.034483 | 181 | 0.674188 |
7977fe32500fc5990b63f5e0b6b20b2dc73255d7 | 5,336 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 38.948905 | 133 | 0.659483 |
797815f08ef6277c28031fb272d1ad47d3850ddc | 1,554 | py | Python | resources/register/tests.py | Yogev911/sms-service | 18e5c6ba55d354ea59bc0eceed31a0e01ecb5ebb | [
"MIT"
] | null | null | null | resources/register/tests.py | Yogev911/sms-service | 18e5c6ba55d354ea59bc0eceed31a0e01ecb5ebb | [
"MIT"
] | null | null | null | resources/register/tests.py | Yogev911/sms-service | 18e5c6ba55d354ea59bc0eceed31a0e01ecb5ebb | [
"MIT"
] | null | null | null | import unittest
from unittest.mock import patch
from resources.register.service import register, is_phone_valid, register_new_user
import json
class Request:
def __init__(self):
self.data = '{}'
self.remote_addr = 'Unittest'
class TestRegisterMethods(unittest.TestCase):
def test_no_data(s... | 34.533333 | 108 | 0.620978 |
79781d9888c58cf11ee616398c246cfdda8f5a95 | 5,243 | py | Python | aries-cloudagent-python/aries_cloudagent/protocols/issue_credential/v1_0/handlers/tests/test_credential_offer_handler.py | sed-szeged/IndyPerf | 68bb48c7c651cae113cf30696110825ff3267ccc | [
"CC0-1.0"
] | null | null | null | aries-cloudagent-python/aries_cloudagent/protocols/issue_credential/v1_0/handlers/tests/test_credential_offer_handler.py | sed-szeged/IndyPerf | 68bb48c7c651cae113cf30696110825ff3267ccc | [
"CC0-1.0"
] | null | null | null | aries-cloudagent-python/aries_cloudagent/protocols/issue_credential/v1_0/handlers/tests/test_credential_offer_handler.py | sed-szeged/IndyPerf | 68bb48c7c651cae113cf30696110825ff3267ccc | [
"CC0-1.0"
] | 1 | 2022-02-02T17:05:27.000Z | 2022-02-02T17:05:27.000Z | from asynctest import mock as async_mock, TestCase as AsyncTestCase
from ......messaging.request_context import RequestContext
from ......messaging.responder import MockResponder
from ......transport.inbound.receipt import MessageReceipt
from ...messages.credential_offer import CredentialOffer
from .. import credent... | 45.198276 | 84 | 0.688346 |
7978382277fc1926cae41cd4f900b711ad759e15 | 3,438 | py | Python | src/crawl/unicrawl/spiders/hers_courses.py | VictorLeP/Education4Climate | 7d419c96c759da2215504ac9051dd6f61d940b96 | [
"MIT"
] | 4 | 2021-09-24T16:17:57.000Z | 2022-01-31T17:32:16.000Z | src/crawl/unicrawl/spiders/hers_courses.py | VictorLeP/Education4Climate | 7d419c96c759da2215504ac9051dd6f61d940b96 | [
"MIT"
] | 23 | 2021-08-02T07:38:47.000Z | 2022-02-11T14:16:56.000Z | src/crawl/unicrawl/spiders/hers_courses.py | VictorLeP/Education4Climate | 7d419c96c759da2215504ac9051dd6f61d940b96 | [
"MIT"
] | 3 | 2021-11-20T06:06:44.000Z | 2022-03-11T07:44:43.000Z | # -*- coding: utf-8 -*-
from abc import ABC
from pathlib import Path
import pandas as pd
import scrapy
from src.crawl.utils import cleanup
from settings import YEAR, CRAWLING_OUTPUT_FOLDER
BASE_URl = "http://progcours.hers.be/cocoon/cours/{}.html"
PROG_DATA_PATH = Path(__file__).parent.absolute().joinpath(
f'../... | 38.2 | 113 | 0.58726 |
79783b991380f3ba2e5b67e4907c8b92ad4e4d3b | 340 | py | Python | seamo/support/df_to_sql.py | amandalynne/Seattle-Mobility-Index | f21d2fa6913ce9474aedc298e9e4a6e7c9390e64 | [
"MIT"
] | 3 | 2018-08-20T18:34:03.000Z | 2018-10-02T23:41:52.000Z | seamo/support/df_to_sql.py | amandalynne/Seattle-Mobility-Index | f21d2fa6913ce9474aedc298e9e4a6e7c9390e64 | [
"MIT"
] | null | null | null | seamo/support/df_to_sql.py | amandalynne/Seattle-Mobility-Index | f21d2fa6913ce9474aedc298e9e4a6e7c9390e64 | [
"MIT"
] | 1 | 2018-10-02T23:42:24.000Z | 2018-10-02T23:42:24.000Z | import init
import sqlite3
import sys
import re
import os
import sqlalchemy
import constants as cn
def df_to_sql(df, table_name):
db_file = os.path.join(cn.DB_DIR, str(table_name) + '.db')
conn = sqlite3.connect(db_file)
df.to_sql(table_name, conn, schema=None, if_exists='fail', index=False)
conn.commi... | 24.285714 | 75 | 0.723529 |
797856dc8cb571d8e8aaa7adf4be31e0b9eeecb2 | 398 | py | Python | sample_request.py | sikhoalieng/job-recommendation-engine | aff0ee06f94daf4bc1fda2feba7cb3b38c522666 | [
"MIT"
] | null | null | null | sample_request.py | sikhoalieng/job-recommendation-engine | aff0ee06f94daf4bc1fda2feba7cb3b38c522666 | [
"MIT"
] | null | null | null | sample_request.py | sikhoalieng/job-recommendation-engine | aff0ee06f94daf4bc1fda2feba7cb3b38c522666 | [
"MIT"
] | null | null | null | import requests
# Initialize the Keras REST API endpoint URL along with the input
url = "http://localhost:5000/predict"
data = {
"major_input": "Accounting",
"degree_type_input": "Bachelor's",
"managed_others_input": "No",
"years_exp_input": 2,
"k": 50}
# Submit the request
response = requests.post(url, hea... | 24.875 | 93 | 0.711055 |
797889c971c09b791a46101c101c2cf6912814f8 | 3,866 | py | Python | tools/monitoring.py | OladeleO/lookyloo | f1f9cab2a946639332fd0526be361e1b43d094e4 | [
"BSD-3-Clause"
] | null | null | null | tools/monitoring.py | OladeleO/lookyloo | f1f9cab2a946639332fd0526be361e1b43d094e4 | [
"BSD-3-Clause"
] | 41 | 2021-09-30T00:44:34.000Z | 2022-03-28T01:02:07.000Z | tools/monitoring.py | OladeleO/lookyloo | f1f9cab2a946639332fd0526be361e1b43d094e4 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
from typing import List, Tuple
from redis import Redis
from redis.exceptions import ConnectionError
from rich.console import Console
from rich.padding import Padding
from lookyloo.helpers import get_socket_path, splash_status
from lookyloo.abstract... | 35.145455 | 130 | 0.629333 |
7978a44e6235568eb7f5b777cfe9ddd366bf790d | 4,396 | py | Python | SCRAPE/Lib/site-packages/twisted/trial/_asyncrunner.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 4,612 | 2015-01-01T12:57:23.000Z | 2022-03-30T01:08:23.000Z | SCRAPE/Lib/site-packages/twisted/trial/_asyncrunner.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,243 | 2015-01-23T17:23:59.000Z | 2022-03-28T13:46:17.000Z | SCRAPE/Lib/site-packages/twisted/trial/_asyncrunner.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,236 | 2015-01-13T14:41:26.000Z | 2022-03-17T07:12:36.000Z | # -*- test-case-name: twisted.trial.test -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Infrastructure for test running and suites.
"""
import doctest
import gc
import unittest as pyunit
from zope.interface import implementer
from twisted.python import components
from twisted.trial... | 25.264368 | 88 | 0.66515 |
7978a70e048af8782247eee196a6ba3119688dc1 | 4,143 | py | Python | docs/source/conf.py | derikk/ExoRad2-public | 034406bfd8237670f0796f9c95ab2fa5d609bc95 | [
"BSD-3-Clause"
] | null | null | null | docs/source/conf.py | derikk/ExoRad2-public | 034406bfd8237670f0796f9c95ab2fa5d609bc95 | [
"BSD-3-Clause"
] | null | null | null | docs/source/conf.py | derikk/ExoRad2-public | 034406bfd8237670f0796f9c95ab2fa5d609bc95 | [
"BSD-3-Clause"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 30.463235 | 79 | 0.64615 |
7978b54ccf3222ef1559f49a50820d751c418eda | 45,183 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/operations/_webhooks_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/operations/_webhooks_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/operations/_webhooks_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 43.445192 | 233 | 0.670673 |
7978c4b205e994f9f2fa5ed2bb64c88912985687 | 2,933 | py | Python | scripts/tool_shed/show_tool_dependency_installation_dir_contents.py | tdans1/Use-Galaxy | e9f05cb1b11db20a729ac73520f886ee619c6b90 | [
"CC-BY-3.0"
] | 4 | 2018-10-29T18:34:38.000Z | 2021-09-29T23:30:42.000Z | scripts/tool_shed/show_tool_dependency_installation_dir_contents.py | tdans1/Use-Galaxy | e9f05cb1b11db20a729ac73520f886ee619c6b90 | [
"CC-BY-3.0"
] | 1 | 2019-02-04T16:21:27.000Z | 2019-02-04T16:45:17.000Z | scripts/tool_shed/show_tool_dependency_installation_dir_contents.py | chambm/galaxy | fd1926767996a161cd2fc8bd184e6835fd688765 | [
"CC-BY-3.0"
] | 3 | 2020-02-12T15:22:24.000Z | 2021-08-19T10:27:39.000Z | import argparse
import os
import sys
sys.path.insert(1, os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, 'lib'))
import galaxy.config as galaxy_config
import galaxy.model
import galaxy.model.tool_shed_install.mapping as install_mapper
class CleanUpDependencyApplication(object):
"""Application that ... | 39.635135 | 113 | 0.662462 |
7978c918a22636965af6e68798263bf0533bd12f | 292 | py | Python | exceptions.py | gongchengshi/aws | d04d42739e026d2e99936dd046be05293e063e08 | [
"MIT"
] | null | null | null | exceptions.py | gongchengshi/aws | d04d42739e026d2e99936dd046be05293e063e08 | [
"MIT"
] | null | null | null | exceptions.py | gongchengshi/aws | d04d42739e026d2e99936dd046be05293e063e08 | [
"MIT"
] | null | null | null | class AwsErrorCodes:
SqsNonExistentQueue = 'AWS.SimpleQueueService.NonExistentQueue'
class NonExistantSqsQueueException(Exception):
def __init__(self, queue_name):
self.queue_name = queue_name
Exception.__init__(self, "SQS Queue '%s' no longer exists" % queue_name)
| 32.444444 | 80 | 0.75 |
7978d6f3a4a811ce838f982c90270703450b40b0 | 21,527 | py | Python | tensorflow_probability/python/mcmc/diagnostic.py | timudk/probability | 8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/mcmc/diagnostic.py | timudk/probability | 8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/mcmc/diagnostic.py | timudk/probability | 8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 40.925856 | 104 | 0.663818 |
7978d8c2a2bf9d51263db21ac4bf2bbf9f9423de | 1,118 | py | Python | tests/data/expected/parser/openapi/openapi_parser_parse_additional_properties/with_import.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 891 | 2019-07-23T04:23:32.000Z | 2022-03-31T13:36:33.000Z | tests/data/expected/parser/openapi/openapi_parser_parse_additional_properties/with_import.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 663 | 2019-07-23T09:50:26.000Z | 2022-03-29T01:56:55.000Z | tests/data/expected/parser/openapi/openapi_parser_parse_additional_properties/with_import.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 108 | 2019-07-23T08:50:37.000Z | 2022-03-09T10:50:22.000Z | from __future__ import annotations
from typing import Dict, List, Optional
from pydantic import BaseModel, Extra
class Pet(BaseModel):
id: int
name: str
tag: Optional[str] = None
class Pets(BaseModel):
__root__: List[Pet]
class User(BaseModel):
class Config:
extra = Extra.allow
id:... | 16.686567 | 52 | 0.666369 |
7978e3854f937679790d3e27f34d8eafbfe9c0c1 | 6,133 | py | Python | tests/python/contrib/test_hexagon/topi/test_reduce.py | pfk-beta/tvm | 5ecb8c384a66933fec8c7f033cba03337eb1a726 | [
"Apache-2.0"
] | 90 | 2021-11-30T11:58:10.000Z | 2022-03-31T02:24:04.000Z | tests/python/contrib/test_hexagon/topi/test_reduce.py | pfk-beta/tvm | 5ecb8c384a66933fec8c7f033cba03337eb1a726 | [
"Apache-2.0"
] | 64 | 2021-11-22T23:58:23.000Z | 2022-03-31T03:19:22.000Z | tests/python/contrib/test_hexagon/topi/test_reduce.py | pfk-beta/tvm | 5ecb8c384a66933fec8c7f033cba03337eb1a726 | [
"Apache-2.0"
] | 27 | 2021-12-09T22:39:27.000Z | 2022-03-24T23:21:48.000Z | # 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... | 36.945783 | 93 | 0.641937 |
79791571ae69c9c2e8649bc4b92805190b88632f | 2,027 | py | Python | pypykatz/lsadecryptor/packages/livessp/templates.py | retr0-13/pypykatz | 0d689fbd819c52ca46709737b2c063f40e302832 | [
"MIT"
] | 1 | 2018-08-19T11:53:30.000Z | 2018-08-19T11:53:30.000Z | pypykatz/lsadecryptor/packages/livessp/templates.py | retr0-13/pypykatz | 0d689fbd819c52ca46709737b2c063f40e302832 | [
"MIT"
] | null | null | null | pypykatz/lsadecryptor/packages/livessp/templates.py | retr0-13/pypykatz | 0d689fbd819c52ca46709737b2c063f40e302832 | [
"MIT"
] | 2 | 2019-08-04T23:16:05.000Z | 2019-12-05T10:41:50.000Z | #!/usr/bin/env python3
#
# Author:
# Tamas Jos (@skelsec)
#
import io
import logging
from minidump.win_datatypes import *
from pypykatz.commons.common import *
from pypykatz.commons.win_datatypes import *
from pypykatz.lsadecryptor.package_commons import *
class LiveSspTemplate(PackageTemplate):
def __init__(self):
... | 28.549296 | 61 | 0.764677 |
797921bb312cb94759500d4af78cab2091535d8a | 52,776 | py | Python | pyds.py | m-a-rahal/Beleif-functions | 1672cb4fab3eedc9059c7273158cef7a28558a2b | [
"BSD-3-Clause"
] | 86 | 2015-03-07T21:14:33.000Z | 2022-03-16T00:37:23.000Z | pyds.py | m-a-rahal/Beleif-functions | 1672cb4fab3eedc9059c7273158cef7a28558a2b | [
"BSD-3-Clause"
] | 6 | 2016-11-10T07:05:48.000Z | 2021-05-16T13:49:04.000Z | pyds.py | m-a-rahal/Beleif-functions | 1672cb4fab3eedc9059c7273158cef7a28558a2b | [
"BSD-3-Clause"
] | 40 | 2015-11-03T17:53:38.000Z | 2022-03-16T00:37:40.000Z | """
A framework for performing computations in the Dempster-Shafer theory.
"""
from __future__ import print_function
from itertools import chain, combinations
from functools import partial, reduce
from operator import mul
from math import log, fsum, sqrt
from random import random, shuffle, uniform
import sys
try:
... | 45.22365 | 172 | 0.599212 |
797930850c7a505d4d1e55a6d2269dc0a263fde6 | 4,885 | py | Python | app/views/contexts/hub_context.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | app/views/contexts/hub_context.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | app/views/contexts/hub_context.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | from typing import List, Mapping, Union
from flask import url_for
from flask_babel import lazy_gettext
from app.data_model.progress_store import CompletionStatus
from app.views.contexts.context import Context
class HubContext(Context):
HUB_CONTENT_STATES = {
"COMPLETE": {
"title": lazy_gett... | 34.892857 | 88 | 0.566633 |
797933a79a3328cc6d7b1458968728a9423bfd37 | 4,964 | py | Python | mitri_van/day_06.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 3 | 2020-11-16T15:20:11.000Z | 2020-12-11T17:01:42.000Z | mitri_van/day_06.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | null | null | null | mitri_van/day_06.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 1 | 2020-12-13T04:42:44.000Z | 2020-12-13T04:42:44.000Z | '''
--- Day 6: Custom Customs ---
As your flight approaches the regional airport where you'll switch to a much larger plane, customs declaration forms are distributed to the passengers.
The form asks a series of 26 yes-or-no questions marked a through z. All you need to do is identify the questions for which any... | 32.444444 | 271 | 0.682917 |
79793435625989b71fc5094e45b354c7bbd77218 | 7,305 | py | Python | homeassistant/components/fan/__init__.py | mbs-technologie/home-assistant | 71fc446425cbb1c0d4670c261ce8ea3bfd83a73d | [
"MIT"
] | 13 | 2017-02-01T13:25:34.000Z | 2022-01-26T01:30:39.000Z | homeassistant/components/fan/__init__.py | 1Forward1Back/home-assistant | ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6 | [
"MIT"
] | 9 | 2017-07-26T18:05:32.000Z | 2021-12-05T14:16:34.000Z | homeassistant/components/fan/__init__.py | 1Forward1Back/home-assistant | ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6 | [
"MIT"
] | 21 | 2017-07-26T17:09:40.000Z | 2022-03-27T22:37:22.000Z | """
Provides functionality to interact with fans.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/fan/
"""
import logging
import os
import voluptuous as vol
from homeassistant.components import group
from homeassistant.config import load_yaml_config_fi... | 29.574899 | 78 | 0.65065 |
79793e39467ec8a5ea8316267fe626347fca50eb | 4,961 | py | Python | plan2explore/tools/overshooting.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 189 | 2020-05-13T01:12:03.000Z | 2022-03-23T01:38:56.000Z | plan2explore/tools/overshooting.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 13 | 2020-05-12T22:51:07.000Z | 2022-03-12T00:28:47.000Z | plan2explore/tools/overshooting.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 24 | 2020-05-14T03:47:50.000Z | 2021-09-26T04:20:36.000Z | # Copyright 2019 The Dreamer Authors. Copyright 2020 Plan2Explore Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE... | 36.748148 | 95 | 0.687563 |
79794663b946b99b167e0f9f093c9146a3b8fbde | 7,028 | py | Python | test/database/testFirestoreAccessor.py | AutoDash/AutoDash | 3924795a04159f80ea3b65b2172747babd15f35f | [
"Apache-2.0"
] | 3 | 2020-02-12T01:24:46.000Z | 2020-02-13T00:50:46.000Z | test/database/testFirestoreAccessor.py | AutoDash/AutoDash | 3924795a04159f80ea3b65b2172747babd15f35f | [
"Apache-2.0"
] | 32 | 2020-02-20T10:20:56.000Z | 2022-02-10T01:42:46.000Z | test/database/testFirestoreAccessor.py | AutoDash/AutoDash | 3924795a04159f80ea3b65b2172747babd15f35f | [
"Apache-2.0"
] | 1 | 2020-02-22T02:47:19.000Z | 2020-02-22T02:47:19.000Z | import pytest
import firebase_admin
from firebase_admin import credentials, firestore
from unittest.mock import MagicMock, ANY
from src.database.FirestoreAccessor import FirestoreAccessor, QueryFilter
from src.database.iDatabase import NotExistingException
from ..test_helper import sample_mdi_dict, sample_mdi
from src.... | 31.657658 | 101 | 0.704041 |
79799ff91e2ad3ba0b56af0b6fa6db7b04d62c47 | 1,510 | py | Python | 2020/day_19/solution_lark.py | dandiez/AdventOfCode | 99ebe6991964290ede87b144c8692c8f6b31030d | [
"MIT"
] | null | null | null | 2020/day_19/solution_lark.py | dandiez/AdventOfCode | 99ebe6991964290ede87b144c8692c8f6b31030d | [
"MIT"
] | null | null | null | 2020/day_19/solution_lark.py | dandiez/AdventOfCode | 99ebe6991964290ede87b144c8692c8f6b31030d | [
"MIT"
] | null | null | null | from lark import Lark
import re
import networkx as nx
from parse import *
import copy
from collections import defaultdict
import itertools
import numpy as np
from math import cos, sin, pi
import contextlib
from unittest import TestCase
def read_input(filename="input.txt"):
with open(filename) as f:
top, b... | 25.166667 | 76 | 0.617881 |
7979ba5f55fd3893470d1ace21903d456cec0815 | 2,071 | py | Python | alphabetsoup/common.py | joelb123/alphabetsoup | 19cba7094a8e5cb4db4a617f5334308f3abfe584 | [
"BSD-3-Clause"
] | null | null | null | alphabetsoup/common.py | joelb123/alphabetsoup | 19cba7094a8e5cb4db4a617f5334308f3abfe584 | [
"BSD-3-Clause"
] | 112 | 2020-02-06T12:14:11.000Z | 2021-07-29T12:18:58.000Z | alphabetsoup/common.py | joelb123/alphabetsoup | 19cba7094a8e5cb4db4a617f5334308f3abfe584 | [
"BSD-3-Clause"
] | 1 | 2021-06-24T02:40:50.000Z | 2021-06-24T02:40:50.000Z | # -*- coding: utf-8 -*-
# imports
from pathlib import Path
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
# global variables
PROGRAM_NAME = 'alphabetsoup'
DUP_NAME = 'Dups'
SUBSTRING_NAME = 'Substr'
GRAPH_TYPES = [DUP_NAME, SUBSTRING_NAME]
AMBIG_NAME = 'Ambig%'
SHORT_NAME = 'Short'
FILESMAL... | 25.8875 | 76 | 0.507484 |
7979cc665960fdff3fe9d6157a82cd3fbc07897b | 1,666 | py | Python | migrations/0002_add_initial_data.py | RonquilloAeon/fastapi-migrations | 524de15635cd92ed129a9a7d9d66cabf211a491c | [
"MIT"
] | null | null | null | migrations/0002_add_initial_data.py | RonquilloAeon/fastapi-migrations | 524de15635cd92ed129a9a7d9d66cabf211a491c | [
"MIT"
] | null | null | null | migrations/0002_add_initial_data.py | RonquilloAeon/fastapi-migrations | 524de15635cd92ed129a9a7d9d66cabf211a491c | [
"MIT"
] | 1 | 2020-10-03T22:13:54.000Z | 2020-10-03T22:13:54.000Z | import json
from typing import Generator, TextIO
def get_quotes(f: TextIO) -> Generator[dict, None, None]:
data = json.load(f)
for quote in data:
yield {
"author": quote["Author"],
"category": quote["Category"],
"content": quote["Quote"],
}
sources = {}
c... | 26.870968 | 84 | 0.590036 |
7979dfdc398f7fe80f2e7c336f3dc96ba02d91e2 | 3,409 | py | Python | unittests/test_dataset_creation/test_read_from_csv.py | imsb-uke/ecarenet | ffbf24e740d9154312d02b9f775816ed4b3d4691 | [
"MIT"
] | 1 | 2022-01-25T09:49:45.000Z | 2022-01-25T09:49:45.000Z | unittests/test_dataset_creation/test_read_from_csv.py | imsb-uke/ecarenet | ffbf24e740d9154312d02b9f775816ed4b3d4691 | [
"MIT"
] | null | null | null | unittests/test_dataset_creation/test_read_from_csv.py | imsb-uke/ecarenet | ffbf24e740d9154312d02b9f775816ed4b3d4691 | [
"MIT"
] | null | null | null | import pandas as pd
import unittest
import os
from dataset_creation.read_from_csv import create_img_and_label_series
def get_csv():
csv_file = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'unittest_data/train.csv'))
return csv_file
class TestReadFromCsv(unittest.TestCase):
def t... | 48.7 | 110 | 0.62335 |
797a0a6f28167d44191c3db630f7af27d132bad1 | 5,294 | py | Python | www/work/chromehooks.py | sergeychernyshev/webpagetest | d53fba00bc0941cbfc9c15cb27944c1ba052f345 | [
"BSD-3-Clause"
] | 1 | 2020-11-25T21:10:57.000Z | 2020-11-25T21:10:57.000Z | www/work/chromehooks.py | sergeychernyshev/webpagetest | d53fba00bc0941cbfc9c15cb27944c1ba052f345 | [
"BSD-3-Clause"
] | null | null | null | www/work/chromehooks.py | sergeychernyshev/webpagetest | d53fba00bc0941cbfc9c15cb27944c1ba052f345 | [
"BSD-3-Clause"
] | 1 | 2021-03-09T13:54:30.000Z | 2021-03-09T13:54:30.000Z | #!/usr/bin/env python
# Copyright 2017 Google Inc. All rights reserved.
# Use of this source code is governed by the Apache 2.0 license that can be
# found in the LICENSE file.
"""Chrome PDB fetch and parser"""
import os
import platform
import re
import subprocess
import urllib
import pdbparse
def get_pdb(signature):
... | 34.154839 | 96 | 0.560824 |
797a10a60759e3183e204ad264a25a743928fb19 | 2,099 | py | Python | krippendorf_library_sample.py | joshmiller17/icr | 9ae27ef5c67307cb18895d6870cfc263d6549883 | [
"MIT"
] | null | null | null | krippendorf_library_sample.py | joshmiller17/icr | 9ae27ef5c67307cb18895d6870cfc263d6549883 | [
"MIT"
] | null | null | null | krippendorf_library_sample.py | joshmiller17/icr | 9ae27ef5c67307cb18895d6870cfc263d6549883 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import krippendorff
import numpy as np
def main():
print("Example from http://en.wikipedia.org/wiki/Krippendorff's_Alpha")
print()
reliability_data_str = (
"* * * * * 3 4 1 2 1 1 3 3 * 3", # coder A
"1 * 2 1 3 ... | 41.156863 | 114 | 0.409242 |
797a1f0eb729224168d5892450cd860d5de10a57 | 200 | py | Python | server/songhelper/words_preprocessor.py | mezidia/song-helper | 059d02f4e5e4758bef04322ee53d1f1e815ba08b | [
"MIT"
] | 6 | 2021-02-10T10:50:18.000Z | 2021-08-21T10:44:37.000Z | server/songhelper/words_preprocessor.py | mezgoodle/song-helper | 059d02f4e5e4758bef04322ee53d1f1e815ba08b | [
"MIT"
] | 116 | 2021-02-10T08:09:03.000Z | 2022-03-30T01:50:02.000Z | server/songhelper/words_preprocessor.py | mezgoodle/song-helper | 059d02f4e5e4758bef04322ee53d1f1e815ba08b | [
"MIT"
] | 1 | 2021-08-16T14:31:13.000Z | 2021-08-16T14:31:13.000Z | class WordPreprocessor:
"""
Class for preprocessing some text for future use
"""
# Basic function to clean the text
def clean_text(self, text):
return text.strip().lower()
| 25 | 52 | 0.65 |
797a601dfe07c9fa320defab3a1e338cbbd22b29 | 7,417 | py | Python | binja_xtensa/__init__.py | zackorndorff/binja-xtensa | b2a9ef3c84ab21047e88e7fe41d9fc8fd6e4c5d4 | [
"MIT"
] | 7 | 2021-08-17T05:38:15.000Z | 2021-12-28T13:08:14.000Z | binja_xtensa/__init__.py | zackorndorff/binja-xtensa | b2a9ef3c84ab21047e88e7fe41d9fc8fd6e4c5d4 | [
"MIT"
] | null | null | null | binja_xtensa/__init__.py | zackorndorff/binja-xtensa | b2a9ef3c84ab21047e88e7fe41d9fc8fd6e4c5d4 | [
"MIT"
] | null | null | null | """
Binary Ninja Xtensa (and ESP8266) support
This package offers several features:
Xtensa (little-endian):
* correct length decoding for nearly all instructions
* correct mnemonic decoding for nearly all instructions
* fully correct disassembly for most instructions you'll see. In some places
there... | 38.630208 | 96 | 0.646488 |
797a6762d2e3b03c3b6250ba6f76dcf7c91c5bc5 | 206 | py | Python | colors.py | micheleFraccaroli/autokeras | 4c0e36dc0a5418355952dd74f74b2b6e7e87ebf1 | [
"Apache-2.0"
] | 1 | 2021-08-24T12:11:34.000Z | 2021-08-24T12:11:34.000Z | colors.py | micheleFraccaroli/autokeras | 4c0e36dc0a5418355952dd74f74b2b6e7e87ebf1 | [
"Apache-2.0"
] | null | null | null | colors.py | micheleFraccaroli/autokeras | 4c0e36dc0a5418355952dd74f74b2b6e7e87ebf1 | [
"Apache-2.0"
] | 2 | 2022-02-02T23:49:52.000Z | 2022-03-13T21:05:15.000Z | class colors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
MAGENTA = '\033[1;35m'
CYAN = '\033[1;36m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
| 20.6 | 26 | 0.509709 |
797a72a10666b8be91f520cb75375e946d509749 | 65 | py | Python | sksound/tests/__init__.py | DominicD-823543/scikit-sound | be0429a1ebe98efc2bfc55bcaa0966421c937c0c | [
"BSD-3-Clause"
] | 6 | 2018-06-09T18:54:37.000Z | 2020-09-24T12:38:46.000Z | sksound/tests/__init__.py | DominicD-823543/scikit-sound | be0429a1ebe98efc2bfc55bcaa0966421c937c0c | [
"BSD-3-Clause"
] | 1 | 2020-05-28T17:41:44.000Z | 2020-07-03T13:17:47.000Z | sksound/tests/__init__.py | DominicD-823543/scikit-sound | be0429a1ebe98efc2bfc55bcaa0966421c937c0c | [
"BSD-3-Clause"
] | 3 | 2019-09-23T18:24:17.000Z | 2021-04-06T16:36:23.000Z | import sys
import os
sys.path.insert(0, os.path.abspath('..'))
| 10.833333 | 41 | 0.676923 |
797addad2400467a7cd2167c8571f99e3a44e284 | 3,170 | py | Python | Libraries/mymath.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | Libraries/mymath.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | Libraries/mymath.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import math
import sys
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
# 線分
def segment(x1, y1, x2, y2):
return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
# 3角形の面積
def heron(x1, y1, x2, y2, x3, y3):
def segment(x1, y1, x2, y2):
return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
AB = segment(x1, ... | 22.971014 | 75 | 0.498738 |
797ae610c7dbaeb72dc9b1b809bd419bb86c1a00 | 2,027 | py | Python | tests/models/WDL_test.py | limingdata/DeepCTR | 9569a171f2d1aa400e15175c09fea49cdd7ab5b7 | [
"MIT"
] | 2 | 2019-04-10T09:39:33.000Z | 2019-04-10T09:39:35.000Z | tests/models/WDL_test.py | mis1205/DeepCTR | 024da0a763ecd623bbccc1976b34b1b17dce4b88 | [
"MIT"
] | null | null | null | tests/models/WDL_test.py | mis1205/DeepCTR | 024da0a763ecd623bbccc1976b34b1b17dce4b88 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
from deepctr.models import WDL
from ..utils import check_model,SingleFeat
@pytest.mark.parametrize(
'sparse_feature_num,wide_feature_num',
[(1, 0), (1, 2), (2, 0), (2, 1)
]
)
def test_WDL(sparse_feature_num, wide_feature_num):
model_name = "WDL"
sample_size = 64
... | 38.980769 | 111 | 0.616182 |
797af3482746da044d29ae957a663b81e5eb40f2 | 1,125 | py | Python | punic/graph.py | jeremy-w/punic | 8a487f67853b2781db5a230fc353671341c9ce8e | [
"MIT"
] | 1 | 2020-02-04T20:34:32.000Z | 2020-02-04T20:34:32.000Z | punic/graph.py | 3drobotics/punic | 1131050098fdc014f596beea7fe6a8a8effc35c7 | [
"MIT"
] | null | null | null | punic/graph.py | 3drobotics/punic | 1131050098fdc014f596beea7fe6a8a8effc35c7 | [
"MIT"
] | 1 | 2020-05-01T21:07:30.000Z | 2020-05-01T21:07:30.000Z |
import click
import networkx as nx
import os
import logging
import sys
from punic.errors import *
from punic.utilities import *
from punic.config import *
from punic.runner import *
def make_graph(punic, open):
try:
with error_handling():
graph = punic.graph()
logging.info('Writ... | 32.142857 | 105 | 0.603556 |
797af825da706133bd40c094c37a2bee4b5a1ac3 | 10,552 | py | Python | dace/library.py | manuelburger/dace | a55f41dbb2a523229361bd161ba38b37d25af86d | [
"BSD-3-Clause"
] | null | null | null | dace/library.py | manuelburger/dace | a55f41dbb2a523229361bd161ba38b37d25af86d | [
"BSD-3-Clause"
] | null | null | null | dace/library.py | manuelburger/dace | a55f41dbb2a523229361bd161ba38b37d25af86d | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
import inspect
import sys
import types
from typing import Set, List
import contextlib
import networkx as nx
import dace.properties
from dace.sdfg.nodes import LibraryNode
from dace.transformation.transformation import (Transformation,
... | 41.543307 | 115 | 0.678165 |
797b06272f52f472b13d77033cc906f3bd09650c | 1,041 | py | Python | tests/outlook/test_graph_mail.py | domdinicola/Office365-REST-Python-Client | c64adb6c3fdc2786e0c9529e8b0f4c3ee207d2a0 | [
"MIT"
] | null | null | null | tests/outlook/test_graph_mail.py | domdinicola/Office365-REST-Python-Client | c64adb6c3fdc2786e0c9529e8b0f4c3ee207d2a0 | [
"MIT"
] | null | null | null | tests/outlook/test_graph_mail.py | domdinicola/Office365-REST-Python-Client | c64adb6c3fdc2786e0c9529e8b0f4c3ee207d2a0 | [
"MIT"
] | null | null | null | from tests.graph_case import GraphTestCase
class TestGraphMail(GraphTestCase):
def test1_send_mail_json(self):
message_json = {
"Message": {
"Subject": "Meet for lunch?",
"Body": {
"ContentType": "Text",
"Content": "The n... | 31.545455 | 83 | 0.407301 |
797b069e8cb6eecb01c2abbeeb08c7b0a158687e | 12,964 | py | Python | tests/test_config.py | weijia/couchapp | 83a1b5c0754f9c205179f4c7d6b0f95e9632ae77 | [
"Apache-2.0"
] | 224 | 2015-01-03T13:35:56.000Z | 2022-02-13T14:27:17.000Z | tests/test_config.py | weijia/couchapp | 83a1b5c0754f9c205179f4c7d6b0f95e9632ae77 | [
"Apache-2.0"
] | 79 | 2015-03-11T15:28:00.000Z | 2022-02-17T13:53:46.000Z | tests/test_config.py | weijia/couchapp | 83a1b5c0754f9c205179f4c7d6b0f95e9632ae77 | [
"Apache-2.0"
] | 56 | 2015-01-03T13:37:22.000Z | 2022-01-11T08:33:38.000Z | # -*- coding: utf-8 -*-
from couchapp.config import Config
from couchapp.errors import AppError
from mock import Mock, patch
from nose.tools import raises, with_setup
@patch('couchapp.config.util.findcouchapp', return_value=None)
@patch('couchapp.config.util.rcpath', return_value=['/mock/couchapp.conf'])
def test_c... | 33.15601 | 81 | 0.592487 |
797b0f706b147158d7c917c5e67a7e392db5df50 | 5,228 | py | Python | notebook_invoke/invoke_py.py | michalgregor/notebook_invoke | b64abbad56491d3c2f5d41d7f19bb8250333d2c7 | [
"BSD-3-Clause"
] | 1 | 2021-10-30T09:56:10.000Z | 2021-10-30T09:56:10.000Z | notebook_invoke/invoke_py.py | michalgregor/notebook_invoke | b64abbad56491d3c2f5d41d7f19bb8250333d2c7 | [
"BSD-3-Clause"
] | null | null | null | notebook_invoke/invoke_py.py | michalgregor/notebook_invoke | b64abbad56491d3c2f5d41d7f19bb8250333d2c7 | [
"BSD-3-Clause"
] | 1 | 2021-10-30T09:56:12.000Z | 2021-10-30T09:56:12.000Z | import json
import types
from weakref import ref, WeakMethod
from .encoder import NumpyEncoder
_jupyter_javascript_callbacks = globals()['_jupyter_javascript_callbacks'] = {}
def register_callback(callback_id, callback):
if isinstance(callback, types.MethodType):
_jupyter_javascript_callbacks[callback_id] ... | 34.394737 | 113 | 0.583206 |
797b0fd550a641f75238f98a0af9957ce7e03a16 | 2,842 | py | Python | dhis2_core/src/dhis2/code_list/cli.py | dhis2/dhis2-python | 45a17e174b15243fa829e8186715c080cad7696c | [
"BSD-3-Clause"
] | 7 | 2020-10-15T08:54:50.000Z | 2021-12-19T14:37:49.000Z | dhis2_core/src/dhis2/code_list/cli.py | dhis2/dhis2-python | 45a17e174b15243fa829e8186715c080cad7696c | [
"BSD-3-Clause"
] | 3 | 2016-08-12T14:11:14.000Z | 2021-03-08T17:06:29.000Z | dhis2_core/src/dhis2/code_list/cli.py | dhis2/dhis2-python | 45a17e174b15243fa829e8186715c080cad7696c | [
"BSD-3-Clause"
] | 4 | 2016-02-10T23:03:08.000Z | 2020-12-28T13:18:49.000Z | import json
import logging
import sys
import click
from dhis2.core.inventory import resolve_one
from dhis2.core.utils import parse_file
from . import svcm
from .icd11 import fetch_icd11_dhis2_option_sets
from .icd10 import fetch_icd10_dhis2_option_sets
log = logging.getLogger(__name__)
@click.group("code-list")
de... | 24.5 | 89 | 0.665728 |
797b10fb3aaa2a72228c6ceb192363670f092195 | 2,264 | py | Python | heroku_config.py | Ahmad99Ahmad/PaYtHoNMeMbEr | fc2b97e9a0826123b938d56d9ce405bef3560d55 | [
"MIT"
] | null | null | null | heroku_config.py | Ahmad99Ahmad/PaYtHoNMeMbEr | fc2b97e9a0826123b938d56d9ce405bef3560d55 | [
"MIT"
] | null | null | null | heroku_config.py | Ahmad99Ahmad/PaYtHoNMeMbEr | fc2b97e9a0826123b938d56d9ce405bef3560d55 | [
"MIT"
] | null | null | null | import os
class Var(object):
APP_ID = int(os.environ.get("APP_ID", 6))
# 6 is a placeholder
API_HASH = os.environ.get("API_HASH", "057ecc4d8f91dd6f0038cd409f477918")
STRING_SESSION = os.environ.get("STRING_SESSION", None)
DB_URI = os.environ.get("DATABASE_URL", None)
TEMP_DOWNLOAD_DIRECTORY = o... | 49.217391 | 134 | 0.713339 |
797b14b5ab28fef54ab5090101448617cc552f2c | 69,502 | py | Python | chat_downloader/sites/youtube.py | Takayamashi/chat-downloader | 4283443e6bd328b9f68ba89eef73a7d3f65c497b | [
"MIT"
] | null | null | null | chat_downloader/sites/youtube.py | Takayamashi/chat-downloader | 4283443e6bd328b9f68ba89eef73a7d3f65c497b | [
"MIT"
] | null | null | null | chat_downloader/sites/youtube.py | Takayamashi/chat-downloader | 4283443e6bd328b9f68ba89eef73a7d3f65c497b | [
"MIT"
] | null | null | null |
from .common import (
BaseChatDownloader,
Chat,
Remapper as r,
Image
)
from ..errors import (
ChatDownloaderError,
NoChatReplay,
ChatDisabled,
NoContinuation,
ParsingError,
VideoUnavailable,
LoginRequired,
VideoUnplayable,
InvalidParameter,
UserNotFound,
NoV... | 37.127137 | 177 | 0.537898 |
797b29220fbe951d348149e71a669a2733acd149 | 10,285 | py | Python | tensorflow_federated/python/research/baseline_fedavg/simple_fedavg_test.py | xueyuuu/federated | ad617401324c133eb838e4e0af7442a4dfa71d6e | [
"Apache-2.0"
] | null | null | null | tensorflow_federated/python/research/baseline_fedavg/simple_fedavg_test.py | xueyuuu/federated | ad617401324c133eb838e4e0af7442a4dfa71d6e | [
"Apache-2.0"
] | null | null | null | tensorflow_federated/python/research/baseline_fedavg/simple_fedavg_test.py | xueyuuu/federated | ad617401324c133eb838e4e0af7442a4dfa71d6e | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2019, The TensorFlow Federated Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | 32.964744 | 112 | 0.705882 |
797b42dda4870536ce9e6dd6b5ae66fae9555c55 | 10,488 | py | Python | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_automatic_tuning_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 ... | 41.619048 | 209 | 0.690122 |
797b4913c0eed9a916c2bd254597ff33e8dd48d3 | 13,155 | py | Python | Server/integrations/fido2/Fido2ExternalAuthenticator.py | trochaeli/oxAuth | c8fe50fc8108131cba5f75b422053970baeccb8e | [
"MIT"
] | 380 | 2015-01-08T23:28:43.000Z | 2022-03-07T20:19:51.000Z | Server/integrations/fido2/Fido2ExternalAuthenticator.py | trochaeli/oxAuth | c8fe50fc8108131cba5f75b422053970baeccb8e | [
"MIT"
] | 1,292 | 2015-01-08T23:24:14.000Z | 2022-03-31T21:43:58.000Z | Server/integrations/fido2/Fido2ExternalAuthenticator.py | HomeMeCEO/oxAuth | e391298e55e34f0f732c7ecd199bffe42289992b | [
"MIT"
] | 172 | 2015-01-10T09:48:21.000Z | 2022-02-24T03:01:59.000Z | # oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
# Copyright (c) 2018, Gluu
#
# Author: Yuriy Movchan
#
from javax.ws.rs.core import Response
from org.jboss.resteasy.client import ClientResponseFailure
from org.jboss.resteasy.client.exception import ResteasyClie... | 45.362069 | 199 | 0.644926 |
797b9d102835ff0fc3b2edc08c436f1b35f774be | 1,469 | py | Python | backdoors2electricboogaloo/ssbdserver.py | binarioGH/minihacktools | 664e72ccc54089baa3b4d2ddc28bdcddbfdd1833 | [
"MIT"
] | null | null | null | backdoors2electricboogaloo/ssbdserver.py | binarioGH/minihacktools | 664e72ccc54089baa3b4d2ddc28bdcddbfdd1833 | [
"MIT"
] | null | null | null | backdoors2electricboogaloo/ssbdserver.py | binarioGH/minihacktools | 664e72ccc54089baa3b4d2ddc28bdcddbfdd1833 | [
"MIT"
] | null | null | null | #-*-coding: utf-8-*-
from pyautogui import screenshot
from socket import *
from smtplib import SMTP
from email.mime.multipart import MIMEMultipart
from email.mime.image import MIMEImage
from email.mime.text import MIMEText
from datetime import datetime
if __name__ == '__main__':
sock = socket(AF_INET, SOCK_STREAM)
... | 30.604167 | 114 | 0.646698 |
797b9d182727e9371914f2796d9d7e66db909681 | 3,121 | py | Python | oscar/lib/python2.7/site-packages/IPython/core/tests/test_extension.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/core/tests/test_extension.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/core/tests/test_extension.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | import os.path
import nose.tools as nt
import IPython.testing.tools as tt
from IPython.utils.syspathcontext import prepended_to_syspath
from IPython.utils.tempdir import TemporaryDirectory
ext1_content = """
def load_ipython_extension(ip):
print("Running ext1 load")
def unload_ipython_extension(ip):... | 32.175258 | 75 | 0.560397 |
797ba3742bcfd38a51ae79612a11c5fbdfc04e56 | 3,508 | py | Python | examples/horizon2.py | richjoyce/stader | 24811178026fe057a51c279ec99e79aae733659f | [
"BSD-3-Clause"
] | null | null | null | examples/horizon2.py | richjoyce/stader | 24811178026fe057a51c279ec99e79aae733659f | [
"BSD-3-Clause"
] | null | null | null | examples/horizon2.py | richjoyce/stader | 24811178026fe057a51c279ec99e79aae733659f | [
"BSD-3-Clause"
] | null | null | null | import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
from matplotlib.patches import Polygon
import numpy as np
import stader
d = stader.load_aircraft('b747_flight_condition2')
ac = stader.Aircraft(d)
msec = 15
dt = msec/1000
show_state = False
if show_state:
fig = plt.figure(figsize=(1... | 29.728814 | 101 | 0.583238 |
797ba7ebc5aeb9d026219502fe4071927bbbdfba | 2,383 | py | Python | in-develop/src/autobridge/Opt/GlobalRouting.py | Blaok/AutoBridge | e296a6d5ffe96ddf7ee35bd239ce1cd4a41f3670 | [
"MIT"
] | null | null | null | in-develop/src/autobridge/Opt/GlobalRouting.py | Blaok/AutoBridge | e296a6d5ffe96ddf7ee35bd239ce1cd4a41f3670 | [
"MIT"
] | null | null | null | in-develop/src/autobridge/Opt/GlobalRouting.py | Blaok/AutoBridge | e296a6d5ffe96ddf7ee35bd239ce1cd4a41f3670 | [
"MIT"
] | null | null | null | import logging
class GlobalRouting:
def __init__(self, floorplan, top_rtl_parser, slot_manager):
self.floorplan = floorplan
self.top_rtl_parser = top_rtl_parser
self.slot_manager = slot_manager
self.v2s = floorplan.getVertexToSlot()
self.s2e = floorplan.getSlotToEdges()
self.e_name2path = {}... | 34.042857 | 139 | 0.624843 |
797bb741380cba73663f015a1d03b88fafc293a3 | 5,059 | py | Python | dags/mapping_dag.py | danieldjewell/starthinker | 3327d5874f01d7563603b8a82c1ecd6615b9768d | [
"Apache-2.0"
] | 1 | 2020-12-04T17:13:35.000Z | 2020-12-04T17:13:35.000Z | dags/mapping_dag.py | hgrias/starthinker | b9ed33e23b4ffd72565a31ebb8a8041d346bfca2 | [
"Apache-2.0"
] | null | null | null | dags/mapping_dag.py | hgrias/starthinker | b9ed33e23b4ffd72565a31ebb8a8041d346bfca2 | [
"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/l... | 29.758824 | 145 | 0.521842 |
797bc6fde59c6d98da25329a3475db1e51e04c75 | 119,239 | py | Python | renpy/display/core.py | swaggyp-14/renpy-7.4.4-sdk | 43a26d67d35fd345c40550f367a1ab0c389ab9dc | [
"Apache-2.0"
] | null | null | null | renpy/display/core.py | swaggyp-14/renpy-7.4.4-sdk | 43a26d67d35fd345c40550f367a1ab0c389ab9dc | [
"Apache-2.0"
] | null | null | null | renpy/display/core.py | swaggyp-14/renpy-7.4.4-sdk | 43a26d67d35fd345c40550f367a1ab0c389ab9dc | [
"Apache-2.0"
] | null | null | null | # Copyright 2004-2021 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, m... | 29.720588 | 175 | 0.569654 |
797bdbd49c9abcd7a58da259d882d6acba36832a | 10,825 | py | Python | pytest_inobject/plugin.py | alfredodeza/pytest-inobject | 8ae09e74d9cfcaf84fda9660231a3a02f9643062 | [
"MIT"
] | 1 | 2020-11-21T19:23:51.000Z | 2020-11-21T19:23:51.000Z | pytest_inobject/plugin.py | alfredodeza/pytest-inobject | 8ae09e74d9cfcaf84fda9660231a3a02f9643062 | [
"MIT"
] | null | null | null | pytest_inobject/plugin.py | alfredodeza/pytest-inobject | 8ae09e74d9cfcaf84fda9660231a3a02f9643062 | [
"MIT"
] | null | null | null | from difflib import SequenceMatcher, Differ, IS_CHARACTER_JUNK
from difflib import get_close_matches as difflib_close_matches
def ndiff(a, b, linejunk=None, charjunk=IS_CHARACTER_JUNK):
return FullContextDiffer(linejunk, charjunk).compare(a, b)
def get_close_matches(left, right):
if isinstance(right, (str, ... | 36.204013 | 93 | 0.578661 |
797c213bd9e2437a1154fb20f32d467d7a81beea | 2,236 | py | Python | test/conftest.py | etcher-be/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | 4 | 2018-06-24T14:03:44.000Z | 2019-01-21T01:20:02.000Z | test/conftest.py | etcher-be/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | 106 | 2018-06-24T13:59:52.000Z | 2019-11-26T09:05:14.000Z | test/conftest.py | theendsofinvention/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
Pytest config file
"""
import os
import sys
from pathlib import Path
import pytest
# from esst import core
def pytest_configure(config):
"""
Runs at tests startup
Args:
config: pytest config args
"""
print('pytest args: ', config.args)
os.environ['DCS_PATH'] = 't... | 23.536842 | 73 | 0.66458 |
797c3f82a457128dcf908efffb867e8325737a34 | 9,465 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/_compute_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/_compute_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/_compute_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 62.682119 | 526 | 0.781828 |
797c59a7d7b24152b9741caae9124296ff0a1fb5 | 2,777 | py | Python | datalad/support/tests/test_repo_save.py | christinerogers/datalad | 8b91f3767b45371e213aa7ade146a290a13c00f2 | [
"MIT"
] | 1 | 2021-06-11T19:54:19.000Z | 2021-06-11T19:54:19.000Z | datalad/support/tests/test_repo_save.py | christinerogers/datalad | 8b91f3767b45371e213aa7ade146a290a13c00f2 | [
"MIT"
] | 1 | 2019-08-30T14:45:33.000Z | 2019-08-30T14:45:33.000Z | datalad/support/tests/test_repo_save.py | christinerogers/datalad | 8b91f3767b45371e213aa7ade146a290a13c00f2 | [
"MIT"
] | null | null | null | # ex: set sts=4 ts=4 sw=4 noet:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
"""Test saveds fuct... | 28.336735 | 79 | 0.616133 |
797c68dbb2e84ce7cc94b45e57f42edd2303121f | 3,318 | py | Python | egs/babel/s5d/local/data_select/doc2vec_textselection.py | charlesliucn/LanMIT | 537dab22335a21285699776ce66d95cb14c3db52 | [
"Apache-2.0"
] | 17 | 2019-07-08T08:34:50.000Z | 2021-11-19T13:39:29.000Z | egs/babel/s5d/local/data_select/doc2vec_textselection.py | charlesliucn/kaldi-lm | 537dab22335a21285699776ce66d95cb14c3db52 | [
"Apache-2.0"
] | null | null | null | egs/babel/s5d/local/data_select/doc2vec_textselection.py | charlesliucn/kaldi-lm | 537dab22335a21285699776ce66d95cb14c3db52 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
from gensim import models
import os, sys
import numpy as np
import collections
def docs_reader(directory_name, file_num):
# read in all the documents as training corpus
print("---------------------------------")
print("Read all the documents as corpus")
print("------------------------------... | 31.009346 | 66 | 0.528029 |
797c8339ae51df9e2b6c448bc21500d5f1b25a75 | 2,316 | py | Python | codes/projects/advection_diffusion_2d/utils_project/construct_prior_dict.py | hwangoh/uq-vae | 382548e6f6dd7f9d72feff0e0752beec871db348 | [
"MIT"
] | 2 | 2021-07-28T16:47:18.000Z | 2021-08-03T00:53:58.000Z | codes/projects/test_discrete_parameter/utils_project/construct_prior_dict.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | null | null | null | codes/projects/test_discrete_parameter/utils_project/construct_prior_dict.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | 2 | 2021-09-29T08:31:46.000Z | 2021-11-07T10:26:45.000Z | '''Constructs project specific dictionary containing prior model related objects
To construct the dictionary, the code will create an instance of the PriorHandler
class. Utilizing the methods of this class then loads the covariance related
objects.
Inputs:
- hyperp: dictionary storing set hyperparameter values
... | 38.6 | 91 | 0.698187 |
797c84394b5165528cf5a21d852dd9857bb17c58 | 7,455 | py | Python | main.py | dragaosemchama/faceswap | 5c6f9370a18f1a1ca1e2d0175c9c9abfd405ab87 | [
"MIT"
] | 1 | 2019-02-23T13:15:24.000Z | 2019-02-23T13:15:24.000Z | main.py | dragaosemchama/faceswap | 5c6f9370a18f1a1ca1e2d0175c9c9abfd405ab87 | [
"MIT"
] | null | null | null | main.py | dragaosemchama/faceswap | 5c6f9370a18f1a1ca1e2d0175c9c9abfd405ab87 | [
"MIT"
] | 2 | 2016-10-07T00:55:15.000Z | 2021-01-01T18:06:46.000Z | # coding: utf-8
import cv2
import numpy
import time
from PIL import Image, ImageOps, ImageDraw, ImageEnhance
def detect(img, classifier):
"""Função de detecção de padrão
Entrada:
img: uma imagem
classifier: o classificador representando qual padrão deve ser
... | 36.014493 | 79 | 0.625218 |
797c9837138d933c89d33638b53c064f3f51862b | 732 | py | Python | client/verta/verta/_swagger/_public/modeldb/model/ModeldbLogAttribute.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 835 | 2017-02-08T20:14:24.000Z | 2020-03-12T17:37:49.000Z | client/verta/verta/_swagger/_public/modeldb/model/ModeldbLogAttribute.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 651 | 2019-04-18T12:55:07.000Z | 2022-03-31T23:45:09.000Z | client/verta/verta/_swagger/_public/modeldb/model/ModeldbLogAttribute.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 170 | 2017-02-13T14:49:22.000Z | 2020-02-19T17:59:12.000Z | # THIS FILE IS AUTO-GENERATED. DO NOT EDIT
from verta._swagger.base_type import BaseType
class ModeldbLogAttribute(BaseType):
def __init__(self, id=None, attribute=None):
required = {
"id": False,
"attribute": False,
}
self.id = id
self.attribute = attribute
for k, v in required.item... | 23.612903 | 62 | 0.637978 |
797cb8cdb24cda6bf71ebd5267513847f1cca25a | 2,295 | py | Python | tool/RefactorHeaderIncludes.py | Naftoreiclag/Cpp-Project-Template | 6471f05266d01365f545062272ba9f403119c763 | [
"Apache-2.0"
] | null | null | null | tool/RefactorHeaderIncludes.py | Naftoreiclag/Cpp-Project-Template | 6471f05266d01365f545062272ba9f403119c763 | [
"Apache-2.0"
] | null | null | null | tool/RefactorHeaderIncludes.py | Naftoreiclag/Cpp-Project-Template | 6471f05266d01365f545062272ba9f403119c763 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 James Fong
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 35.307692 | 77 | 0.650109 |
797cc61bcb96912d6ec86a66a4e573f8c3ec8c6c | 855 | py | Python | profiles_api/serializers.py | IsaiahAim/profiles-rest-api | 933aed151647c0aabbb9fc8b0d1480bb782ae503 | [
"MIT"
] | null | null | null | profiles_api/serializers.py | IsaiahAim/profiles-rest-api | 933aed151647c0aabbb9fc8b0d1480bb782ae503 | [
"MIT"
] | null | null | null | profiles_api/serializers.py | IsaiahAim/profiles-rest-api | 933aed151647c0aabbb9fc8b0d1480bb782ae503 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from profiles_api import models
class HelloSerializer(serializers.Serializer):
"""Serializes a name field for testing our APIView"""
name =serializers.CharField(max_length=10)
class UserProfileSerializer(serializers.ModelSerializer):
"""Serializes a user profile o... | 26.71875 | 57 | 0.639766 |
797ce0da73acefb3d0fbfd9a4833c1fab11174cc | 3,180 | py | Python | SumTree.py | danthe42/drlnd_p1 | 2c04835b487d5cea232aa452fbc8ee25dad2caeb | [
"MIT"
] | null | null | null | SumTree.py | danthe42/drlnd_p1 | 2c04835b487d5cea232aa452fbc8ee25dad2caeb | [
"MIT"
] | null | null | null | SumTree.py | danthe42/drlnd_p1 | 2c04835b487d5cea232aa452fbc8ee25dad2caeb | [
"MIT"
] | null | null | null | #
#
# Binary Tree implementation for Prioritized replay buffers, based on the code:
# https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/blob/master/contents/5.2_Prioritized_Replay_DQN/RL_brain.py
#
#
import numpy as np
class SumTree(object):
"""
This SumTree code is a modified version and ... | 39.75 | 166 | 0.568553 |
797cfd97dd5487a139429bf6a90241b7da03d770 | 4,914 | py | Python | zerver/views/report.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | 1 | 2021-02-13T20:43:29.000Z | 2021-02-13T20:43:29.000Z | zerver/views/report.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | 9 | 2021-02-08T20:22:36.000Z | 2022-03-11T23:22:45.000Z | zerver/views/report.py | tobby2002/zulip | 66e7c455759f9368bae16b9a604cf63f8e3524cd | [
"Apache-2.0"
] | 1 | 2021-04-09T05:50:23.000Z | 2021-04-09T05:50:23.000Z | from __future__ import absolute_import
from typing import Any
from django.conf import settings
from django.http import HttpRequest, HttpResponse
from zerver.decorator import authenticated_json_post_view, has_request_variables, REQ, \
to_non_negative_int
from zerver.lib.response import json_success
from zerver.lib... | 43.875 | 131 | 0.683557 |
797d4ff7220c5672c61eb665194704c3ae545ad0 | 1,826 | py | Python | src/_repobee/ext/defaults/genreviews.py | ShreyaDhananjay/repobee | da501606c351bdbeda3428b245072f1a2d6372b9 | [
"MIT"
] | null | null | null | src/_repobee/ext/defaults/genreviews.py | ShreyaDhananjay/repobee | da501606c351bdbeda3428b245072f1a2d6372b9 | [
"MIT"
] | null | null | null | src/_repobee/ext/defaults/genreviews.py | ShreyaDhananjay/repobee | da501606c351bdbeda3428b245072f1a2d6372b9 | [
"MIT"
] | null | null | null | """The default implementation of generate_review_allocations.
.. module:: genreviews
:synopsis: The default implementation of generate_review_allocations
.. moduleauthor:: Simon Larsén
"""
import random
import itertools
from typing import List
import repobee_plug as plug
@plug.repobee_hook
def generate_review_... | 32.035088 | 75 | 0.671961 |
797d52cec58996a0fa2c65742af921aae0482800 | 2,187 | py | Python | alipay/aop/api/domain/BrandInfos.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/BrandInfos.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/BrandInfos.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.SearchBrandBoxInfo import SearchBrandBoxInfo
class BrandInfos(object):
def __init__(self):
self._box_exclusive_info = None
self._brand_id = None
self.... | 29.16 | 87 | 0.618198 |
797d662940869fae4a37d169c92f6271d915ca4c | 2,241 | py | Python | flatpack_pieces.py | spgill/flatpack | 9a108efd64c1c7f84333e4468fe7b4745c0d96bf | [
"MIT"
] | null | null | null | flatpack_pieces.py | spgill/flatpack | 9a108efd64c1c7f84333e4468fe7b4745c0d96bf | [
"MIT"
] | null | null | null | flatpack_pieces.py | spgill/flatpack | 9a108efd64c1c7f84333e4468fe7b4745c0d96bf | [
"MIT"
] | null | null | null | import tkinter
import tkinter.ttk
import yaml
import flatpack
import scrolled
import storage
def piece_tk(registry, parent, element, kwargs):
title = kwargs.pop('title', 'tk')
icon = kwargs.pop('iconphoto', None)
resize = kwargs.pop('resizable', None)
root = tkinter.Tk(**kwargs)
root.update()
... | 24.358696 | 72 | 0.689871 |
797d883e0c483ce2e553bc5690afa55e10860a77 | 10,534 | py | Python | quilt/db.py | jayvdb/python-quilt | f09799e28ac3ced07dff91b1b677b3db00781ae9 | [
"MIT"
] | 4 | 2016-12-28T23:28:02.000Z | 2022-03-15T02:46:10.000Z | quilt/db.py | jayvdb/python-quilt | f09799e28ac3ced07dff91b1b677b3db00781ae9 | [
"MIT"
] | 17 | 2017-02-24T09:16:14.000Z | 2019-04-08T08:37:17.000Z | quilt/db.py | jayvdb/python-quilt | f09799e28ac3ced07dff91b1b677b3db00781ae9 | [
"MIT"
] | 2 | 2017-01-03T00:55:59.000Z | 2019-03-28T15:42:12.000Z | # vim: fileencoding=utf-8 et sw=4 ts=4 tw=80:
# python-quilt - A Python implementation of the quilt patch system
#
# Copyright (C) 2012 - 2017 Björn Ricks <bjoern.ricks@gmail.com>
#
# See LICENSE comming with the source of python-quilt for details.
from __future__ import print_function
import getopt
import os.path
i... | 31.444776 | 80 | 0.591133 |
797dcffacff6b5fcf7e24612f22d9ce0522a0d13 | 91,332 | py | Python | venv/Lib/site-packages/tensorflow/compiler/tf2xla/ops/gen_xla_ops.py | rexliu3/StockTradingBotCloud | 46b732b9c05f73bc0e856a3c4a16854b6d12e18e | [
"MIT"
] | null | null | null | venv/Lib/site-packages/tensorflow/compiler/tf2xla/ops/gen_xla_ops.py | rexliu3/StockTradingBotCloud | 46b732b9c05f73bc0e856a3c4a16854b6d12e18e | [
"MIT"
] | null | null | null | venv/Lib/site-packages/tensorflow/compiler/tf2xla/ops/gen_xla_ops.py | rexliu3/StockTradingBotCloud | 46b732b9c05f73bc0e856a3c4a16854b6d12e18e | [
"MIT"
] | 1 | 2020-06-28T11:47:47.000Z | 2020-06-28T11:47:47.000Z | """Python wrappers around TensorFlow ops.
This file is MACHINE GENERATED! Do not edit.
Original C++ source file: gen_xla_ops.cc
"""
import collections
from tensorflow.python import pywrap_tfe as pywrap_tfe
from tensorflow.python.eager import context as _context
from tensorflow.python.eager import core as _core
from ... | 42.579021 | 232 | 0.69036 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.