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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9377be355197ef94e7af853097e5f13b39041aa7 | 3,549 | py | Python | game.py | 1amG4bor/PySnake | 40499856ef4c711db46de38bc96040b57b2eddf3 | [
"MIT"
] | 1 | 2020-10-08T16:35:11.000Z | 2020-10-08T16:35:11.000Z | game.py | 1amG4bor/PySnake | 40499856ef4c711db46de38bc96040b57b2eddf3 | [
"MIT"
] | null | null | null | game.py | 1amG4bor/PySnake | 40499856ef4c711db46de38bc96040b57b2eddf3 | [
"MIT"
] | null | null | null | # PySnake - Python Game for fun and machine learning purposes for later
# Copyright (C) 2020 Gabor Tanacs
#
# The first version of a Snake game to try out pygame
# The upcoming versions will upgrade this to be able to run with a neural network.
#
# Gabor Tanacs
# gabor.tanacs@yahoo.com
"""
Main file that contains the ... | 30.333333 | 92 | 0.637644 |
9377c8adf8ce7d947123554d9c70d0c4b9d2dc1d | 524 | py | Python | conekt/forms/admin/build_coexpression_clusters.py | legumeinfo/CoNekT | 709a4980cfa255cafd456b268e274db2b4b1f5fb | [
"MIT"
] | 14 | 2018-08-20T03:07:21.000Z | 2021-11-04T11:15:31.000Z | conekt/forms/admin/build_coexpression_clusters.py | mutwil/CoNekT | f4a4496a87d14b15bcf587975b31a2edc24c6bf7 | [
"MIT"
] | 9 | 2018-07-17T15:30:47.000Z | 2021-07-05T13:11:54.000Z | conekt/forms/admin/build_coexpression_clusters.py | mutwil/CoNekT | f4a4496a87d14b15bcf587975b31a2edc24c6bf7 | [
"MIT"
] | 3 | 2019-08-05T09:16:34.000Z | 2019-12-04T23:59:28.000Z | from flask_wtf import FlaskForm
from wtforms.validators import InputRequired
from wtforms import StringField, SelectField
from conekt.models.expression.networks import ExpressionNetworkMethod
class BuildCoexpressionClustersForm(FlaskForm):
network_id = SelectField('Network', coerce=int)
description = StringF... | 34.933333 | 80 | 0.734733 |
9377f4c3d258410c5b4178b0adcf8564a9699db1 | 289 | py | Python | openstack-dashboard/openstack_dashboard/dashboards/project/laas/views.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/share/openstack-dashboard/openstack_dashboard/dashboards/project/laas/views.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/share/openstack-dashboard/openstack_dashboard/dashboards/project/laas/views.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | import json
import logging
from django.http import HttpResponse
from horizon.views import APIView
from horizon import exceptions
class IndexView(APIView):
template_name = 'project/laas/index.html'
def get_data(self, request, context, *args, **kwargs):
return context
| 19.266667 | 58 | 0.750865 |
9377fc030f82afc4e078451da57fbee61b3d97de | 1,228 | py | Python | tensorflow_similarity/__init__.py | phillips96/similarity | 3794f288f17f47f1f90b5368e5c0eeac1e81e10d | [
"Apache-2.0"
] | null | null | null | tensorflow_similarity/__init__.py | phillips96/similarity | 3794f288f17f47f1f90b5368e5c0eeac1e81e10d | [
"Apache-2.0"
] | null | null | null | tensorflow_similarity/__init__.py | phillips96/similarity | 3794f288f17f47f1f90b5368e5c0eeac1e81e10d | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The TensorFlow 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 or agreed to ... | 35.085714 | 74 | 0.741042 |
93780eb166836fc30f665b77211e4fc37e2feca2 | 473 | py | Python | alipay/aop/api/response/AlipayUserPeerpayprodAgreementModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayUserPeerpayprodAgreementModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayUserPeerpayprodAgreementModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayUserPeerpayprodAgreementModifyResponse(AlipayResponse):
def __init__(self):
super(AlipayUserPeerpayprodAgreementModifyResponse, self).__init__()
def parse_respons... | 29.5625 | 117 | 0.794926 |
93781f4d8d7b0a31b64ba37c5b114f9e5b025b84 | 22,388 | py | Python | ucscsdk/mometa/message/MessageEntry.py | CiscoUcs/ucscsdk | b582df77e3cf8bc4c48347e3d67f8cffa62f78c4 | [
"Apache-2.0"
] | 9 | 2016-12-22T08:39:25.000Z | 2019-09-10T15:36:19.000Z | ucscsdk/mometa/message/MessageEntry.py | CiscoUcs/ucscsdk | b582df77e3cf8bc4c48347e3d67f8cffa62f78c4 | [
"Apache-2.0"
] | 10 | 2017-01-31T06:59:56.000Z | 2021-11-09T09:14:37.000Z | ucscsdk/mometa/message/MessageEntry.py | CiscoUcs/ucscsdk | b582df77e3cf8bc4c48347e3d67f8cffa62f78c4 | [
"Apache-2.0"
] | 13 | 2016-11-14T07:42:58.000Z | 2022-02-10T17:32:05.000Z | """This module contains the general information for MessageEntry ManagedObject."""
from ...ucscmo import ManagedObject
from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta
from ...ucscmeta import VersionMeta
class MessageEntryConsts():
SEVERITY_ALERT = "alert"
SEVERITY_CRITICAL = "critical"
SE... | 226.141414 | 3,684 | 0.808826 |
9378216d3aaf74c00b24aa8fb46cff991b8c3de7 | 1,638 | py | Python | Pandas/Data Sciensist/series-temporales.py | Jovamih/PythonProyectos | cc87cc98001fba528c3a03fe9a0edd290b83ec60 | [
"MIT"
] | null | null | null | Pandas/Data Sciensist/series-temporales.py | Jovamih/PythonProyectos | cc87cc98001fba528c3a03fe9a0edd290b83ec60 | [
"MIT"
] | null | null | null | Pandas/Data Sciensist/series-temporales.py | Jovamih/PythonProyectos | cc87cc98001fba528c3a03fe9a0edd290b83ec60 | [
"MIT"
] | null | null | null | #/usr/bin/env python3
import numpy as np
import pandas as pd
def series():
#podemos hacer arrays numpy de tiempo np.array('2019-10-12',dtype=np.datetime64)
#para ello contamos con el paquete pandas de python
index=pd.DatetimeIndex(['2000-10-12','2000-10-24','2001-12-12'])
ser=pd.Series([12,54,6... | 43.105263 | 118 | 0.716728 |
93783f675f044725dc9a1fe8e1d623536f748ff2 | 41 | py | Python | tests/__init__.py | jvfe/wikidata2df | 155c419fd9f5d30cc692d1a0c0d8c83e02a1686c | [
"BSD-3-Clause"
] | 4 | 2020-08-09T00:57:07.000Z | 2020-08-11T18:41:07.000Z | tests/__init__.py | jvfe/wikidata2df | 155c419fd9f5d30cc692d1a0c0d8c83e02a1686c | [
"BSD-3-Clause"
] | null | null | null | tests/__init__.py | jvfe/wikidata2df | 155c419fd9f5d30cc692d1a0c0d8c83e02a1686c | [
"BSD-3-Clause"
] | null | null | null | """Unit test package for wikidata2df."""
| 20.5 | 40 | 0.707317 |
9378814dd884ce7d31d78194d5b146f2c81cfa14 | 4,764 | py | Python | data_capture/r10_spreadsheet_converter.py | connectthefuture/calc | 7f0dc01d9265f26a36c2b9b5ee779fe876e4a494 | [
"CC0-1.0"
] | null | null | null | data_capture/r10_spreadsheet_converter.py | connectthefuture/calc | 7f0dc01d9265f26a36c2b9b5ee779fe876e4a494 | [
"CC0-1.0"
] | 1 | 2021-06-10T23:13:04.000Z | 2021-06-10T23:13:04.000Z | data_capture/r10_spreadsheet_converter.py | connectthefuture/calc | 7f0dc01d9265f26a36c2b9b5ee779fe876e4a494 | [
"CC0-1.0"
] | null | null | null | import xlrd
from xlrd.book import XL_CELL_DATE
from xlrd.xldate import xldate_as_datetime
class Region10SpreadsheetConverter():
'''
Used to convert Region 10 database export XLS/X file to a CSV-like
collection of row objects
'''
sheet_index = 0
def __init__(self, xls_file):
self.xls... | 34.521739 | 79 | 0.582284 |
93789ff7083d134d743dedc8ae2c47602d6710a4 | 1,923 | py | Python | h/services/auth_token.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | null | null | null | h/services/auth_token.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | 4 | 2020-03-24T17:38:24.000Z | 2022-03-02T05:45:01.000Z | h/services/auth_token.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from h import models
from h.auth.tokens import Token
class AuthTokenService:
def __init__(self, session):
self._session = session
self._validate_cache = {}
def validate(self, token_str):
"""
Load and validate a ... | 28.279412 | 86 | 0.625585 |
9378adef0a58cf09d8eac7c212eea3cf0e0e5867 | 679 | py | Python | Python-code-snippets-201-300/288-pywebview-play-mp3.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | Python-code-snippets-201-300/288-pywebview-play-mp3.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | Python-code-snippets-201-300/288-pywebview-play-mp3.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | """Code snippets vol-58
Pywebview-Play mp3
Download all snippets so far:
https://wp.me/Pa5TU8-1yg
Blog: stevepython.wordpress.com
Requires:
---------
pip3 install pywebview
play_mp3.html file and test.mp3 in cwd.
Origin:
https://github.com/r0x0r/pywebview/tree/master/examples
"""
import webview
if __nam... | 26.115385 | 72 | 0.552283 |
9378b1db7245c0da3e8298e7dcd972491616b0cd | 6,018 | py | Python | tensorflow/compiler/tests/gather_nd_op_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/compiler/tests/gather_nd_op_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/compiler/tests/gather_nd_op_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.662162 | 80 | 0.639914 |
9378eb4e116cafb3101ce63cc58e9a9b16bb8926 | 1,381 | py | Python | docs/gen_class.py | ShinoYasx/tat | 12ccf9cde02d25fc071153cbf48d9f4675733f3a | [
"Apache-2.0"
] | null | null | null | docs/gen_class.py | ShinoYasx/tat | 12ccf9cde02d25fc071153cbf48d9f4675733f3a | [
"Apache-2.0"
] | null | null | null | docs/gen_class.py | ShinoYasx/tat | 12ccf9cde02d25fc071153cbf48d9f4675733f3a | [
"Apache-2.0"
] | 1 | 2021-06-28T15:41:09.000Z | 2021-06-28T15:41:09.000Z | #!/bin/env python
import os
import sys
from typing import List, Tuple
class RstGenerator:
def __init__(self, package_name) -> None:
self.package_name = package_name
def generate_class_rst(self, module_name: str, class_name: str) -> str:
s = class_name + os.linesep + len(class_name) * '=' + 2... | 35.410256 | 102 | 0.611875 |
9378f053c9c3b4498b0cd488cf1e2cb15198962e | 68 | py | Python | wsgi.py | 4lhc/internet_profundity | 5f1b9c36f7504b92b8097e801bec8380f6c9b73c | [
"MIT"
] | 2 | 2020-05-25T15:23:20.000Z | 2020-05-25T15:23:49.000Z | wsgi.py | 4lhc/internet_profundity | 5f1b9c36f7504b92b8097e801bec8380f6c9b73c | [
"MIT"
] | 5 | 2021-02-02T19:04:13.000Z | 2021-06-10T19:18:20.000Z | flask/wsgi.py | LRAbbade/web_frameworks_performance | b80228e43005e274dc9814f8d2ce9ed8fd5d92bb | [
"MIT"
] | 1 | 2021-11-20T10:47:55.000Z | 2021-11-20T10:47:55.000Z | from app.main import app
if __name__ == "__main__":
app.run()
| 11.333333 | 26 | 0.647059 |
9378f60d3e625e626b5fb17d29a9f0dcb7319f8e | 791 | py | Python | nicos_mlz/sans1/setups/wut-0-10-02.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/sans1/setups/wut-0-10-02.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/sans1/setups/wut-0-10-02.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | description = 'W&T Box * 0-10V * Nr. 2'
includes = []
_wutbox = 'wut-0-10-02'
_wutbox_dev = _wutbox.replace('-','_')
devices = {
_wutbox_dev +'_1': device('nicos_mlz.sans1.devices.wut.WutReadValue',
hostname = _wutbox + '.sans1.frm2',
port = 1,
description = 'input 1 voltage',
fmts... | 25.516129 | 73 | 0.522124 |
937914e2b17b1002e13b05cf059bfa7d8c16978a | 586 | py | Python | slavdict/dictionary/migrations/0007_example_audited_time.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | 1 | 2022-01-17T17:26:25.000Z | 2022-01-17T17:26:25.000Z | slavdict/dictionary/migrations/0007_example_audited_time.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | 8 | 2020-02-12T13:26:05.000Z | 2022-02-10T19:28:07.000Z | slavdict/dictionary/migrations/0007_example_audited_time.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dictionary', '0006_auto_20151018_1152'),
]
operations = [
migrations.AddField(
model_name='example',
name='audited_time',
field... | 27.904762 | 230 | 0.646758 |
937928e45c3cf464765455257dcbc13ea59df2b3 | 889 | py | Python | src/timeshap/wrappers/tf_wrappers.py | feedzai/timeshap | 0d56b3b86222d52fdc5a1e96f125513e0ed18e6c | [
"Apache-2.0"
] | 49 | 2022-03-25T14:35:52.000Z | 2022-03-31T18:05:51.000Z | src/timeshap/wrappers/tf_wrappers.py | feedzai/timeshap | 0d56b3b86222d52fdc5a1e96f125513e0ed18e6c | [
"Apache-2.0"
] | 1 | 2022-03-31T12:15:55.000Z | 2022-03-31T14:59:06.000Z | src/timeshap/wrappers/tf_wrappers.py | feedzai/timeshap | 0d56b3b86222d52fdc5a1e96f125513e0ed18e6c | [
"Apache-2.0"
] | 2 | 2022-03-28T04:32:35.000Z | 2022-03-28T06:39:24.000Z | # Copyright 2022 Feedzai
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 40.409091 | 78 | 0.746907 |
937929fdc813a0df8a03e7da5d1c71d433d10c01 | 3,942 | py | Python | tklife/constants.py | Aesonus/TkLife | 8e8f585be7f522134b9a5746b22185c2394d3d8d | [
"MIT"
] | null | null | null | tklife/constants.py | Aesonus/TkLife | 8e8f585be7f522134b9a5746b22185c2394d3d8d | [
"MIT"
] | 4 | 2021-05-02T17:33:19.000Z | 2021-05-16T18:53:51.000Z | tklife/constants.py | Aesonus/TkLife | 8e8f585be7f522134b9a5746b22185c2394d3d8d | [
"MIT"
] | null | null | null |
import re
import tkinter
#Entry arguments
EXPORTSELECTION = 'exportselection'
FG = 'fg'
FONT = 'font'
FOREGROUND = 'foreground'
HIGHLIGHTBACKGROUND = 'highlightbackground'
INSERTBORDERWIDTH = 'insertborderwidth'
INSERTOFFTIME = 'insertofftime'
INSERTONTIME = 'insertontime'
INSERTWIDTH = 'insertwidth'
SELECTBORDERWIDT... | 22.022346 | 43 | 0.749619 |
93797ce83dd4ab8c1991d618081d31024d3f8d69 | 2,816 | py | Python | alipay/aop/api/domain/ExpenseMerchantInfo.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/ExpenseMerchantInfo.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/ExpenseMerchantInfo.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 ExpenseMerchantInfo(object):
def __init__(self):
self._merchant_name = None
self._role_id = None
self._role_type = None
self._shop_id = None
self._shop_nam... | 27.881188 | 77 | 0.575994 |
9379bf5a92c47ed6b256c091b58c789a44f2da5b | 2,634 | py | Python | scripts/monitor.py | DeathsPirate/aws-ec2-docker-ssh-honeypot | 010f12c9c6febff0a1ba7e19af84acbe2ec162d7 | [
"Apache-2.0"
] | 5 | 2019-02-15T15:34:01.000Z | 2021-02-20T19:03:44.000Z | scripts/monitor.py | DeathsPirate/aws-ec2-docker-ssh-honeypot | 010f12c9c6febff0a1ba7e19af84acbe2ec162d7 | [
"Apache-2.0"
] | null | null | null | scripts/monitor.py | DeathsPirate/aws-ec2-docker-ssh-honeypot | 010f12c9c6febff0a1ba7e19af84acbe2ec162d7 | [
"Apache-2.0"
] | 3 | 2019-02-16T14:47:03.000Z | 2021-04-26T21:56:34.000Z | import sys
import docker
import logging
import threading
import os
import subprocess
import boto3
logging.basicConfig(filename='/var/log/docker_start.log', level=logging.INFO)
threads = []
sc = []
def cleanup(container):
container.stop()
_ = subprocess.call(["/usr/local/bin/honey-clean.sh", container.n... | 29.595506 | 116 | 0.607821 |
937a0c38d8ac99b0b989bbe6352ed9cfe1cfa497 | 1,425 | py | Python | py/97. Interleaving String.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | 3 | 2021-08-07T07:01:34.000Z | 2021-08-07T07:03:02.000Z | py/97. Interleaving String.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | null | null | null | py/97. Interleaving String.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/interleaving-string/
# Given strings s1, s2, and s3, find whether s3 is formed by an interleaving of s1
# and s2.
# An interleaving of two strings s and t is a configuration where they are divided
# into non-empty substrings such that:
# Note: a + b is the concatenation of strings a a... | 35.625 | 99 | 0.46807 |
937a617088a7e25674a9e2a4c6ab9d381d714435 | 13,377 | py | Python | fedot/utilities/ts_gapfilling.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 1 | 2021-11-09T10:24:38.000Z | 2021-11-09T10:24:38.000Z | fedot/utilities/ts_gapfilling.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | null | null | null | fedot/utilities/ts_gapfilling.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from scipy import interpolate
from fedot.core.data.data import InputData
from fedot.core.repository.dataset_types import DataTypesEnum
from fedot.core.repository.tasks import Task, TaskTypesEnum, TsForecastingParams
class SimpleGapFiller:
"""
Base class used for filling in the gaps in time... | 38.22 | 80 | 0.615086 |
937aae941a66d3517fe302c5db6a14405ee8d4e7 | 2,927 | py | Python | ice_validator/tests/test_env_parameters_defined_in_template.py | rohitagarwal0910/vvp-cnf-validation-scripts | 2825f9517f4f186b4f6cc733dc1f11f1414c438e | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2018-08-29T19:33:22.000Z | 2018-08-29T19:33:22.000Z | ice_validator/tests/test_env_parameters_defined_in_template.py | rohitagarwal0910/vvp-cnf-validation-scripts | 2825f9517f4f186b4f6cc733dc1f11f1414c438e | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | ice_validator/tests/test_env_parameters_defined_in_template.py | rohitagarwal0910/vvp-cnf-validation-scripts | 2825f9517f4f186b4f6cc733dc1f11f1414c438e | [
"Apache-2.0",
"CC-BY-4.0"
] | 2 | 2019-07-23T15:47:43.000Z | 2021-07-02T15:04:19.000Z | # -*- coding: utf8 -*-
# ============LICENSE_START=======================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2019 AT&T Intellectual Property. All rights reserved.
# ========================================... | 37.050633 | 82 | 0.636146 |
937ab95c9974c53b7e18c618417dd403a03c6895 | 1,065 | py | Python | produzione_scientifica/gbliometrics/migrations/0010_affiliation.py | FilippoBordogna/Tesi | 816726fe9f43fa60d3c33ba8843f34c699f6aa2f | [
"MIT"
] | null | null | null | produzione_scientifica/gbliometrics/migrations/0010_affiliation.py | FilippoBordogna/Tesi | 816726fe9f43fa60d3c33ba8843f34c699f6aa2f | [
"MIT"
] | null | null | null | produzione_scientifica/gbliometrics/migrations/0010_affiliation.py | FilippoBordogna/Tesi | 816726fe9f43fa60d3c33ba8843f34c699f6aa2f | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-12-09 00:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('gbliometrics', '0009_alter_agroup_table'),
]
operations = [
migrations.CreateModel(
name='Affiliation',
fields=[
... | 35.5 | 117 | 0.56338 |
937acb8fc288a23c5811ed8571227aa1f579e4db | 8,522 | py | Python | Src/latentSpaceExplore_Random.py | sanjeevmk/GLASS | 91c0954eab87d25d4866fea5c338f79fbca4f79e | [
"MIT"
] | 2 | 2022-03-22T17:36:14.000Z | 2022-03-27T05:03:39.000Z | Src/latentSpaceExplore_Random.py | sanjeevmk/glass | 91c0954eab87d25d4866fea5c338f79fbca4f79e | [
"MIT"
] | null | null | null | Src/latentSpaceExplore_Random.py | sanjeevmk/glass | 91c0954eab87d25d4866fea5c338f79fbca4f79e | [
"MIT"
] | null | null | null | import torch
torch.manual_seed(10)
torch.cuda.manual_seed_all(10)
import os
import numpy as np
from sklearn.metrics.pairwise import cosine_similarity as cs
import Energies
import Leapfrog
import Tangent
from Utils import writer,Off,Obj,Pts,rect_remesh
import header
from torch.autograd import Variable
def randomExplo... | 52.282209 | 225 | 0.691974 |
937aec8909593226deceb64afdad69226c15aa29 | 1,167 | py | Python | {{cookiecutter.project_slug}}/tests/populate_database.py | andredias/cookiecutter-fastapi | b5df6f80908d924e51a02fba34d1a01ccf4fc265 | [
"MIT"
] | 8 | 2021-06-12T10:11:03.000Z | 2022-03-23T13:27:23.000Z | {{cookiecutter.project_slug}}/tests/populate_database.py | andredias/cookiecutter-fastapi | b5df6f80908d924e51a02fba34d1a01ccf4fc265 | [
"MIT"
] | 12 | 2021-06-08T22:58:30.000Z | 2022-02-22T15:43:10.000Z | {{cookiecutter.project_slug}}/tests/populate_database.py | andredias/cookiecutter-fastapi | b5df6f80908d924e51a02fba34d1a01ccf4fc265 | [
"MIT"
] | 2 | 2021-08-10T22:55:49.000Z | 2021-08-10T23:05:29.000Z | from unittest.mock import patch
from databases import Database
from loguru import logger
from app import config
from app.resources import connect_database, create_db
test_db = Database(config.DATABASE_URL)
@patch('app.models.user.db', test_db)
async def populate_db():
from app.models.user import get_all
a... | 22.882353 | 59 | 0.641817 |
937baef1de18558737d9f08c3fec41f6c90b6541 | 3,668 | py | Python | intersight/models/ucsdconnector_sql_query_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/ucsdconnector_sql_query_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/ucsdconnector_sql_query_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class UcsdconnectorSqlQueryRef(object):
"""
NOTE: T... | 24.453333 | 77 | 0.5488 |
937bc32d8feeeefb36699f617da4f473e9d249bd | 7,165 | py | Python | deepsim/test/test_deepsim/core/test_plane.py | aws-deepracer/deepsim | cad2639f525c2f94ec5c03d8b855cc65b0b8ee55 | [
"Apache-2.0"
] | 1 | 2022-03-25T07:20:49.000Z | 2022-03-25T07:20:49.000Z | deepsim/test/test_deepsim/core/test_plane.py | aws-deepracer/deepsim | cad2639f525c2f94ec5c03d8b855cc65b0b8ee55 | [
"Apache-2.0"
] | null | null | null | deepsim/test/test_deepsim/core/test_plane.py | aws-deepracer/deepsim | cad2639f525c2f94ec5c03d8b855cc65b0b8ee55 | [
"Apache-2.0"
] | null | null | null | #################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"). ... | 32.568182 | 84 | 0.534124 |
937c01b0dd2f78335a0b23cf053328e57788762a | 3,505 | py | Python | autotest/gdrivers/rik.py | chambbj/gdal | 3d56aecb5b8e9890dae8f560acd099992e707d12 | [
"MIT"
] | 1 | 2015-02-16T16:51:38.000Z | 2015-02-16T16:51:38.000Z | autotest/gdrivers/rik.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | autotest/gdrivers/rik.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | #!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: RIK Testing.
# Author: Even Rouault <even dot rouault at mines dash paris dot org>
#
##############################################################################... | 34.029126 | 142 | 0.613124 |
937c11686972454a54ee2c9a38a604bd6052aae5 | 8,103 | py | Python | tests/python/pants_test/java/junit/test_junit_xml_parser.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/java/junit/test_junit_xml_parser.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/java/junit/test_junit_xml_parser.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import unittest
from pants.java.junit.junit_xml_parser import Test as JUnitTes... | 41.553846 | 100 | 0.65087 |
937c23ca564821c49ab9ea37e61200ea6874b70e | 5,249 | py | Python | metrics.py | andrewdoss/cse6250-project | 07d515545486e5da0c35d746eacc88014d7d632c | [
"MIT"
] | null | null | null | metrics.py | andrewdoss/cse6250-project | 07d515545486e5da0c35d746eacc88014d7d632c | [
"MIT"
] | null | null | null | metrics.py | andrewdoss/cse6250-project | 07d515545486e5da0c35d746eacc88014d7d632c | [
"MIT"
] | 2 | 2019-09-17T18:20:23.000Z | 2020-07-30T07:28:45.000Z | """Metrics to evaluate ICD-9 coding models.
"""
import pandas as pd
def basic_micro_metrics(true_labels, predictions, delimiter=';'):
'''Computes basic micro metrics (those not requiring scores).
Micro metrics are averaged across all predictions and labels.
Arguments
---------
true_labels : inte... | 32.602484 | 92 | 0.622214 |
937c2d98175a7eb9f3db4cf8e5d5ed8622db05ba | 1,763 | py | Python | tests/testutils.py | shouldsee/cathpy | 5f7fa1322434b2d254f0158c5840f029b12dbafe | [
"MIT"
] | 7 | 2019-04-15T19:18:44.000Z | 2022-02-07T20:43:45.000Z | tests/testutils.py | shouldsee/cathpy | 5f7fa1322434b2d254f0158c5840f029b12dbafe | [
"MIT"
] | 14 | 2019-04-24T11:47:38.000Z | 2021-06-09T08:43:14.000Z | tests/testutils.py | shouldsee/cathpy | 5f7fa1322434b2d254f0158c5840f029b12dbafe | [
"MIT"
] | 4 | 2019-04-15T16:32:12.000Z | 2021-03-05T02:54:51.000Z |
import logging
import unittest
from functools import wraps
def log_title(f):
@wraps(f)
def wrapper(*args, **kwargs):
hr = "=" * 80
log = logging.getLogger(f.__qualname__)
log.info("")
log.info(hr)
log.info(" {} ".format(f.__name__))
log.info(hr)
log.inf... | 30.929825 | 101 | 0.560976 |
937c7f1bc43b07b8f4e4fd3da9ba38702f8c04c4 | 1,276 | py | Python | analysis/rosetta/protein_utils.py | willshi88/scrambler | fd77c05824fc99e6965d204c4f5baa1e3b0c4fb3 | [
"MIT"
] | 19 | 2021-04-30T04:12:58.000Z | 2022-03-07T19:09:32.000Z | analysis/rosetta/protein_utils.py | willshi88/scrambler | fd77c05824fc99e6965d204c4f5baa1e3b0c4fb3 | [
"MIT"
] | 4 | 2021-07-02T15:07:27.000Z | 2021-08-01T12:41:28.000Z | analysis/rosetta/protein_utils.py | willshi88/scrambler | fd77c05824fc99e6965d204c4f5baa1e3b0c4fb3 | [
"MIT"
] | 4 | 2021-06-28T09:41:01.000Z | 2022-02-28T09:13:29.000Z | import string
import keras
from keras import backend as K
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib.colors as colors
import matplotlib as mpl
from matplotlib.text import TextPath
from matplotlib.patches import PathPatch, Rectangle
from mat... | 26.040816 | 79 | 0.731191 |
937cae1b56bdd3dc7e4e247ebbac5ed2001465b2 | 33,954 | py | Python | intersight/apis/resource_group_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/apis/resource_group_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/apis/resource_group_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from s... | 47.621318 | 818 | 0.600459 |
937cd02e44d78587c705c92e77c2e93cf3a41fb8 | 1,095 | py | Python | MainWindow.py | eshabisht/Face_Recognition_Attendance_System | 0194d918f24083a9455b33312a2dcf86a627685e | [
"MIT"
] | null | null | null | MainWindow.py | eshabisht/Face_Recognition_Attendance_System | 0194d918f24083a9455b33312a2dcf86a627685e | [
"MIT"
] | null | null | null | MainWindow.py | eshabisht/Face_Recognition_Attendance_System | 0194d918f24083a9455b33312a2dcf86a627685e | [
"MIT"
] | null | null | null | import sys
from PyQt5.uic import loadUi
#from PyQt5 import QtWidgets
from PyQt5.QtCore import pyqtSlot
from PyQt5.QtWidgets import QApplication, QMainWindow
# from model import Model
from OutputWindow import Ui_OutputWindow
class Ui_MainWindow(QMainWindow):
def __init__(self):
super(Ui_Ma... | 26.707317 | 66 | 0.624658 |
937cd738feb2d11d0c52ad9d708e15f88af444e3 | 8,719 | py | Python | env/magent/utility.py | KornbergFresnel/MAgentRender | cb2d4e3d9a528a88ecfccb6ec9ed74cae0f0af54 | [
"MIT"
] | 5 | 2018-04-21T04:15:11.000Z | 2019-12-26T09:58:13.000Z | env/magent/utility.py | KornbergFresnel/MAgentRender | cb2d4e3d9a528a88ecfccb6ec9ed74cae0f0af54 | [
"MIT"
] | null | null | null | env/magent/utility.py | KornbergFresnel/MAgentRender | cb2d4e3d9a528a88ecfccb6ec9ed74cae0f0af54 | [
"MIT"
] | null | null | null | """ some utilities """
import math
import collections
import platform
import numpy as np
import logging
import collections
import os
from env.magent.builtin.rule_model import RandomActor
class EpisodesBufferEntry:
"""Entry for episode buffer"""
def __init__(self):
self.views = []
self.featu... | 28.493464 | 122 | 0.561991 |
937cfb1f7e3f75c4cf0b7011d61f03f8ff326aa6 | 8,031 | py | Python | implementation/BuyerAgent.py | carlotacb/ECSDI_Practica | 6ef3a140e75f2f61e1474a316e68bf002c258db8 | [
"MIT"
] | null | null | null | implementation/BuyerAgent.py | carlotacb/ECSDI_Practica | 6ef3a140e75f2f61e1474a316e68bf002c258db8 | [
"MIT"
] | null | null | null | implementation/BuyerAgent.py | carlotacb/ECSDI_Practica | 6ef3a140e75f2f61e1474a316e68bf002c258db8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Esqueleto de agente usando los servicios web de Flask
/comm es la entrada para la recepcion de mensajes del agente
/Stop es la entrada que para el agente
Tiene una funcion AgentBehavior1 que se lanza como un thread concurrente
Asume que el agente de registro esta en el puerto 9000
"""
f... | 28.888489 | 148 | 0.680737 |
937d074e798affebf8e6534a0dddc87b29e3052c | 2,752 | py | Python | src/pydeequ/examples/basic_usage.py | margitaii/pydeequ | ca50132ac63d3be7f7ccc477b0d59db403e7d707 | [
"Apache-2.0"
] | 48 | 2020-05-03T09:29:00.000Z | 2021-12-20T03:10:34.000Z | src/pydeequ/examples/basic_usage.py | margitaii/pydeequ | ca50132ac63d3be7f7ccc477b0d59db403e7d707 | [
"Apache-2.0"
] | 13 | 2020-05-07T05:08:41.000Z | 2021-02-10T19:12:07.000Z | src/pydeequ/examples/basic_usage.py | margitaii/pydeequ | ca50132ac63d3be7f7ccc477b0d59db403e7d707 | [
"Apache-2.0"
] | 20 | 2020-05-24T07:44:48.000Z | 2022-02-11T13:02:31.000Z | #!/bin/bash python3
from pyspark.sql import SparkSession, DataFrame
from pydeequ.base import VerificationSuite
from pydeequ.checks import Check
from pydeequ.examples import test_data
def main():
# SparkSession startup
spark = (SparkSession
.builder
.master('local[*]')
... | 41.074627 | 76 | 0.478924 |
937d1874177b32435e3c9bd7b835182484002c6f | 3,095 | py | Python | src_retrieval_hindi/utils.py | AI-Swasthyam/fixMyPose | 37c668adcd54bca3f259f1bfee07588f77861bc1 | [
"MIT"
] | 7 | 2021-12-14T07:12:00.000Z | 2022-02-25T00:23:44.000Z | src_retrieval_hindi/utils.py | AI-Swasthyam/fixMyPose | 37c668adcd54bca3f259f1bfee07588f77861bc1 | [
"MIT"
] | 2 | 2021-11-22T15:27:38.000Z | 2021-12-01T13:29:29.000Z | src_retrieval_hindi/utils.py | hyounghk/FixMyPose | 1b31c7f9e25ade6ee929cbbdc56d50162a8c2218 | [
"MIT"
] | null | null | null | import pickle
import matplotlib.pyplot as plt
import torch.nn as nn
from torchvision import transforms
class LinearAct(nn.Module):
def __init__(self, fan_in, fan_out, act='linear', bias=True):
super().__init__()
self.fc = nn.Linear(fan_in, fan_out, bias)
if act == 'relu':
self.... | 29.198113 | 86 | 0.553473 |
937d2247739c01aaad98a44a2d0cdf361e6737a2 | 4,963 | py | Python | src/morphforge/traces/tags/tagselectorstringparser.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | 1 | 2021-01-21T11:31:59.000Z | 2021-01-21T11:31:59.000Z | src/morphforge/traces/tags/tagselectorstringparser.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | null | null | null | src/morphforge/traces/tags/tagselectorstringparser.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are m... | 23.410377 | 172 | 0.625428 |
937d34b532ce8ee27b67d2f8ef5221fe57b924fb | 1,395 | py | Python | cinderclient/v2/contrib/list_extensions.py | deepanshhu/python-cinderclient | 2c0f74c708fd09c5ae813255aaa671073f2fe250 | [
"Apache-1.1"
] | 74 | 2015-01-29T20:10:47.000Z | 2022-03-03T05:09:00.000Z | cinderclient/v2/contrib/list_extensions.py | deepanshhu/python-cinderclient | 2c0f74c708fd09c5ae813255aaa671073f2fe250 | [
"Apache-1.1"
] | 6 | 2015-08-10T10:23:42.000Z | 2022-02-16T02:28:22.000Z | cinderclient/v2/contrib/list_extensions.py | deepanshhu/python-cinderclient | 2c0f74c708fd09c5ae813255aaa671073f2fe250 | [
"Apache-1.1"
] | 125 | 2015-02-24T11:04:51.000Z | 2021-12-23T01:28:05.000Z | # Copyright (c) 2013 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 ... | 31 | 78 | 0.674552 |
937d4c61eaf4d5c11e9f4413d338b0ec30b93023 | 4,022 | py | Python | modeling/modules/seg/resnet_fpn.py | WenmuZhou/crnn.pytorch | bf7a7c62376eee93943ca7c68e88e3d563c09aa8 | [
"Apache-2.0"
] | 46 | 2018-05-29T08:01:10.000Z | 2022-02-14T21:47:40.000Z | modeling/modules/seg/resnet_fpn.py | WenmuZhou/crnn.pytorch | bf7a7c62376eee93943ca7c68e88e3d563c09aa8 | [
"Apache-2.0"
] | null | null | null | modeling/modules/seg/resnet_fpn.py | WenmuZhou/crnn.pytorch | bf7a7c62376eee93943ca7c68e88e3d563c09aa8 | [
"Apache-2.0"
] | 17 | 2018-11-14T09:17:00.000Z | 2021-08-06T04:05:07.000Z | #!/usr/bin/env python
# encoding: utf-8
'''
@author: zhoujun
@time: 2019/12/17 上午11:02
'''
import torch
from torch import nn
import torch.nn.functional as F
from modeling.basic import BasicConv
from modeling.modules.seg.resnet import *
class FPN(nn.Module):
def __init__(self, backbone_out_channels, inner_channel... | 40.626263 | 113 | 0.628046 |
937d5d1d7f951813c46557e570ef31f503c27f1c | 2,817 | py | Python | src/visions/core/model/dtypes/object_fix/object_dtype_mixin.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | src/visions/core/model/dtypes/object_fix/object_dtype_mixin.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | src/visions/core/model/dtypes/object_fix/object_dtype_mixin.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | import operator
import sys
import numpy as np
from pandas.core.arrays import ExtensionArray
class ObjectArrayMixin(ExtensionArray):
@property
def dtype(self):
"""The dtype for this extension array"""
return self._dtype
@classmethod
def _from_sequence(cls, scalars, dtype=None, copy=F... | 27.891089 | 102 | 0.608449 |
937d699f29de9bf65385d4f5c1da52e203206dc2 | 4,595 | py | Python | services/traction/acapy_wrapper/apis/wallet_api.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 12 | 2022-01-29T20:30:03.000Z | 2022-03-29T11:46:14.000Z | services/traction/acapy_wrapper/apis/wallet_api.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 38 | 2021-11-22T17:52:50.000Z | 2022-03-31T17:52:00.000Z | services/traction/acapy_wrapper/apis/wallet_api.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 9 | 2021-11-22T18:05:48.000Z | 2022-03-29T11:25:08.000Z | # coding: utf-8
from typing import Dict, List # noqa: F401
from fastapi import ( # noqa: F401
APIRouter,
Body,
Cookie,
Depends,
Form,
Header,
Path,
Query,
Request,
Response,
Security,
status,
)
from acapy_wrapper.models.extra_models import TokenModel # noqa: F401
fr... | 26.715116 | 171 | 0.666376 |
937db1315fbe889f14783afc9382e955eb4c49f2 | 2,081 | py | Python | influencer-detection/src/api/setup.py | luisblazquezm/influencer-detection | bd8aec83cbd8e5fbb3231824b5e274c47f491501 | [
"Apache-2.0"
] | 4 | 2021-05-22T16:33:41.000Z | 2021-11-22T23:44:40.000Z | influencer-detection/src/api/setup.py | Alburrito/influencer-detection | bd8aec83cbd8e5fbb3231824b5e274c47f491501 | [
"Apache-2.0"
] | null | null | null | influencer-detection/src/api/setup.py | Alburrito/influencer-detection | bd8aec83cbd8e5fbb3231824b5e274c47f491501 | [
"Apache-2.0"
] | 2 | 2021-05-21T16:34:14.000Z | 2021-09-29T12:59:49.000Z | #!/usr/bin/python3
# Copyright 2020 Luis Blazquez Miñambres (@luisblazquezm), Miguel Cabezas Puerto (@MiguelCabezasPuerto), Óscar Sánchez Juanes (@oscarsanchezj) and Francisco Pinto-Santos (@gandalfran)
# See LICENSE for details.
import io
from setuptools import setup, find_packages
def readme():
with io.open(... | 35.87931 | 183 | 0.674676 |
937dc68d75ae40bc7a16b89c2ab230989bec4042 | 374 | py | Python | cogbot/cogs/robo_mod/robo_mod_trigger_type.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 8 | 2016-12-26T14:10:38.000Z | 2021-01-02T03:50:05.000Z | cogbot/cogs/robo_mod/robo_mod_trigger_type.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 28 | 2016-12-12T04:06:53.000Z | 2020-04-23T06:18:55.000Z | cogbot/cogs/robo_mod/robo_mod_trigger_type.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 9 | 2017-06-03T00:33:57.000Z | 2020-10-29T18:16:02.000Z | from enum import Enum
class RoboModTriggerType(Enum):
MEMBER_JOINED = "MEMBER_JOINED"
MEMBER_LEFT = "MEMBER_LEFT"
MEMBER_BANNED = "MEMBER_BANNED"
MEMBER_UNBANNED = "MEMBER_UNBANNED"
MESSAGE = "MESSAGE"
MESSAGE_SENT = "MESSAGE_SENT"
MESSAGE_DELETED = "MESSAGE_DELETED"
MESSAGE_EDITED = "... | 26.714286 | 39 | 0.729947 |
937dea5df7bf2aba3a09287e20271b5e87d0085d | 6,924 | py | Python | scriptabit/configuration.py | luqiang21/scriptabit | 0d0cf71814e98954850891fa0887bdcffcf7147d | [
"Apache-2.0"
] | 9 | 2016-09-04T07:02:20.000Z | 2021-06-29T07:29:40.000Z | scriptabit/configuration.py | luqiang21/scriptabit | 0d0cf71814e98954850891fa0887bdcffcf7147d | [
"Apache-2.0"
] | 35 | 2016-07-30T01:03:15.000Z | 2022-02-12T20:27:37.000Z | scriptabit/configuration.py | luqiang21/scriptabit | 0d0cf71814e98954850891fa0887bdcffcf7147d | [
"Apache-2.0"
] | 8 | 2016-09-05T12:36:53.000Z | 2020-06-15T18:25:50.000Z | # -*- coding: utf-8 -*-
""" Configuration and command-line arguments
"""
# Ensure backwards compatibility with Python 2
from __future__ import (
absolute_import,
division,
print_function,
unicode_literals,
)
from builtins import *
import os
import shutil
from string import Template
import configargpar... | 29.338983 | 80 | 0.61193 |
937deeda21fa1ac2292925f8d77cf606e826ec3e | 3,415 | py | Python | logs_processing/cohen_kappa.py | varepsilon/cas-eval | 62503e0182f9c1057c787d2338147626eb06a984 | [
"Apache-2.0"
] | 78 | 2016-09-12T09:04:00.000Z | 2022-01-18T11:52:03.000Z | logs_processing/cohen_kappa.py | varepsilon/cas-eval | 62503e0182f9c1057c787d2338147626eb06a984 | [
"Apache-2.0"
] | null | null | null | logs_processing/cohen_kappa.py | varepsilon/cas-eval | 62503e0182f9c1057c787d2338147626eb06a984 | [
"Apache-2.0"
] | 23 | 2017-04-09T11:09:39.000Z | 2021-11-11T19:36:07.000Z | # Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 39.709302 | 98 | 0.595315 |
937e0abf7ac6e9f4a5b9795832aa96605e0ebd11 | 5,977 | py | Python | docs/conf.py | fmfi-svt-deadlock/libdeadcom | c8664948fda54e6b0dd69c7c7799a14a7893c9af | [
"MIT"
] | 1 | 2018-12-25T16:20:40.000Z | 2018-12-25T16:20:40.000Z | docs/conf.py | fmfi-svt-deadlock/libdeadcom | c8664948fda54e6b0dd69c7c7799a14a7893c9af | [
"MIT"
] | 2 | 2018-04-18T15:25:39.000Z | 2018-05-01T11:50:04.000Z | docs/conf.py | fmfi-svt-deadlock/libdeadcom | c8664948fda54e6b0dd69c7c7799a14a7893c9af | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Deadlock documentation build configuration file.
#
# This file is execfile()d with the current directory set to its
# containing dir.
import subprocess
import sys
import recommonmark
from recommonmark.transform import AutoStructify
from recommonmark.parser import Commo... | 31.792553 | 80 | 0.712398 |
937e12175ee2942169a26dfadf695cdd6f53659a | 2,571 | py | Python | src/osmclient/common/utils.py | qarawlus/tng-sdk-benchmark | 692490cae343288b0f7c93e3753e92bcaafabdd9 | [
"Apache-2.0"
] | 2 | 2019-10-18T19:59:46.000Z | 2019-12-02T03:11:06.000Z | src/osmclient/common/utils.py | qarawlus/tng-sdk-benchmark | 692490cae343288b0f7c93e3753e92bcaafabdd9 | [
"Apache-2.0"
] | 33 | 2019-07-08T13:56:27.000Z | 2022-02-11T13:57:25.000Z | src/osmclient/common/utils.py | qarawlus/tng-sdk-benchmark | 692490cae343288b0f7c93e3753e92bcaafabdd9 | [
"Apache-2.0"
] | 5 | 2019-08-26T13:00:20.000Z | 2019-10-12T17:35:31.000Z | # Copyright 2017 Sandvine
#
# 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 ap... | 28.252747 | 78 | 0.597044 |
937e254fa2b8e37886530bffb2c4e1778a511a16 | 1,998 | py | Python | scripts/dump_btree.py | 6un9-h0-Dan/python-idb | 649a12d6d2b7778f3def921a9acd045fb3286138 | [
"Apache-2.0"
] | 3 | 2018-01-16T11:11:37.000Z | 2019-10-13T14:52:40.000Z | scripts/dump_btree.py | 6un9-h0-Dan/python-idb | 649a12d6d2b7778f3def921a9acd045fb3286138 | [
"Apache-2.0"
] | null | null | null | scripts/dump_btree.py | 6un9-h0-Dan/python-idb | 649a12d6d2b7778f3def921a9acd045fb3286138 | [
"Apache-2.0"
] | 1 | 2019-02-21T04:28:41.000Z | 2019-02-21T04:28:41.000Z | #!/usr/bin/env python3
'''
some documentation
author: Willi Ballenthin
email: willi.ballenthin@gmail.com
'''
import sys
import logging
import hexdump
import argparse
import idb
import idb.netnode
logger = logging.getLogger(__name__)
def main(argv=None):
if argv is None:
argv = sys.argv[1:]
parse... | 27.369863 | 99 | 0.566567 |
937e2f7415cbf0ca466e06bcac8d01818ff118ca | 1,931 | py | Python | iterative_call.py | kirilenkobm/BDCSP | ca76880e98316ac7a8d4d95310b2d214a194d65a | [
"MIT"
] | null | null | null | iterative_call.py | kirilenkobm/BDCSP | ca76880e98316ac7a8d4d95310b2d214a194d65a | [
"MIT"
] | 1 | 2019-09-11T07:02:29.000Z | 2019-09-11T07:02:29.000Z | iterative_call.py | kirilenkobm/BDCSP | ca76880e98316ac7a8d4d95310b2d214a194d65a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Call CSP several times use previous best result.
A way to obtein the most precise result.
"""
import argparse
import subprocess
import sys
import os
import random
import string
MAX_ITER = 3
TEMP_DIR = "_temp"
CMD_TEMPLATE = "./CSP {} {} --sr {} -z -f -v 1"
TRUE_ANS = "The answer is:\nTrue"
F... | 24.75641 | 106 | 0.626618 |
937e46c6808b97f852d3a47dd9e72c07f503285a | 1,955 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/notify_chats.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/notify_chats.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/notify_chats.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 30.546875 | 103 | 0.626087 |
937e485b2676b2ce52037500f69a5365f2585f7b | 3,079 | py | Python | nbviewer/tests/test_security.py | SylvainCorlay/nbviewer | 3e187a7531060c924991f05555026142a5e53996 | [
"BSD-3-Clause-Clear"
] | 1 | 2020-04-01T07:17:27.000Z | 2020-04-01T07:17:27.000Z | nbviewer/tests/test_security.py | SylvainCorlay/nbviewer | 3e187a7531060c924991f05555026142a5e53996 | [
"BSD-3-Clause-Clear"
] | null | null | null | nbviewer/tests/test_security.py | SylvainCorlay/nbviewer | 3e187a7531060c924991f05555026142a5e53996 | [
"BSD-3-Clause-Clear"
] | 1 | 2021-09-10T17:18:44.000Z | 2021-09-10T17:18:44.000Z | # coding: utf-8
#-----------------------------------------------------------------------------
# Copyright (C) 2015 The Jupyter Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-------------------------------------... | 34.988636 | 142 | 0.638844 |
937e540fc45ceb0533afb18ba69d5a86a510db61 | 7,363 | py | Python | Salami/Player.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 15 | 2020-04-17T12:02:14.000Z | 2022-03-16T03:01:34.000Z | Salami/Player.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 9 | 2020-04-25T01:57:16.000Z | 2020-04-29T11:42:34.000Z | Salami/Player.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 55 | 2020-04-17T12:01:11.000Z | 2021-12-28T10:14:02.000Z |
import arcade
import math
import LevelGenerator
import Textures
import Sounds
from Constants import TILE_SIZE, ROOM_WIDTH, ROOM_HEIGHT
from Mob import Mob
from Projectile import Projectile
class Player(Mob):
def __init__(self, x, y, keyboard):
self.keyboard = keyboard
self.movespeed = 2.5
... | 34.568075 | 108 | 0.561184 |
937e5b225ab99e8e95f0b19fa6e97009e3a22f92 | 234 | py | Python | rassh/datatypes/__init__.py | rbricheno/rassh | 2a8406965bcbdc06b3e83f92ea449619e1b359aa | [
"MIT"
] | null | null | null | rassh/datatypes/__init__.py | rbricheno/rassh | 2a8406965bcbdc06b3e83f92ea449619e1b359aa | [
"MIT"
] | null | null | null | rassh/datatypes/__init__.py | rbricheno/rassh | 2a8406965bcbdc06b3e83f92ea449619e1b359aa | [
"MIT"
] | null | null | null | from .response_with_code import ResponseWithCode
from .valid_boolean import valid_boolean
from .valid_antenna_gain import valid_gain, valid_gain_as_string
from .grammar import Grammar
from .well_formed_command import WellFormedCommand | 46.8 | 64 | 0.888889 |
937e6c4fd8be6eead3663fcc5f7cfa8202dc0f3c | 2,030 | py | Python | py/0547.friend-circles.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | py/0547.friend-circles.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | py/0547.friend-circles.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=547 lang=python3
#
# [547] Friend Circles
#
# https://leetcode.com/problems/friend-circles/description/
#
# algorithms
# Medium (58.97%)
# Likes: 2158
# Dislikes: 149
# Total Accepted: 188.2K
# Total Submissions: 318.9K
# Testcase Example: '[[1,1,0],[1,1,0],[0,0,1]]'
#
# There are N stude... | 23.604651 | 79 | 0.616749 |
937ee3f9b4b32747a7986c4227abe3273a678388 | 1,957 | py | Python | monai/handlers/__init__.py | myron/MONAI | 6e7b2d6ad9688b0418eee21efeea196da2ad054f | [
"Apache-2.0"
] | 1 | 2021-07-13T00:34:41.000Z | 2021-07-13T00:34:41.000Z | monai/handlers/__init__.py | myron/MONAI | 6e7b2d6ad9688b0418eee21efeea196da2ad054f | [
"Apache-2.0"
] | null | null | null | monai/handlers/__init__.py | myron/MONAI | 6e7b2d6ad9688b0418eee21efeea196da2ad054f | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 - 2021 MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in wri... | 45.511628 | 113 | 0.844149 |
937ef9b2e3b90ea90d64caa5421058a3cc785d9d | 4,772 | py | Python | tests/wordvector/test_wordvector.py | ishine/cotk | 2242c16523830254b0ac509f7739b4cbcb03dea4 | [
"Apache-2.0"
] | 117 | 2019-03-14T15:06:42.000Z | 2022-02-28T07:06:34.000Z | tests/wordvector/test_wordvector.py | ishine/cotk | 2242c16523830254b0ac509f7739b4cbcb03dea4 | [
"Apache-2.0"
] | 149 | 2019-03-12T09:43:21.000Z | 2020-08-24T02:56:34.000Z | tests/wordvector/test_wordvector.py | ishine/cotk | 2242c16523830254b0ac509f7739b4cbcb03dea4 | [
"Apache-2.0"
] | 51 | 2019-03-14T15:12:48.000Z | 2021-08-09T03:37:48.000Z | import copy
import pytest
import numpy as np
from cotk.dataloader import LanguageGeneration, MSCOCO
from cotk.metric import MetricBase
from cotk.wordvector import WordVector, Glove
import logging
def setup_module():
import random
random.seed(0)
import numpy as np
np.random.seed(0)
class TestWordVector():
def ba... | 35.879699 | 106 | 0.725272 |
937efaa02deb9188529f96f0009c85f88d7934d3 | 236 | py | Python | db/Updater/classes_tests/atomic_structure_test.py | tecdatalab/biostructure | a30e907e83fa5bbfb934d951b7c663b622104fcc | [
"Apache-2.0"
] | null | null | null | db/Updater/classes_tests/atomic_structure_test.py | tecdatalab/biostructure | a30e907e83fa5bbfb934d951b7c663b622104fcc | [
"Apache-2.0"
] | 15 | 2019-06-17T16:13:39.000Z | 2022-02-27T05:23:59.000Z | db/Updater/classes_tests/atomic_structure_test.py | tecdatalab/biostructure | a30e907e83fa5bbfb934d951b7c663b622104fcc | [
"Apache-2.0"
] | null | null | null | '''
Created on 27 oct. 2019
@author: luis98
'''
from classes.atomic_structure import Atomic_structure
import pytest
from pytest_postgresql import factories # Import the ability to use postgresql
atomic_structure = Atomic_structure() | 21.454545 | 79 | 0.805085 |
937f687c3c5d08eddd618f2e203937e0c7dd3013 | 32 | py | Python | btd6_memory_info/generated/SteamNative/CheckFileSignature_t/check_file_signature_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/SteamNative/CheckFileSignature_t/check_file_signature_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/SteamNative/CheckFileSignature_t/check_file_signature_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class CheckFileSignature_t: pass | 32 | 32 | 0.90625 |
937f80fea77435da65e85a66849d5faecd39c431 | 6,535 | py | Python | test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_failure_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_failure_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_failure_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 40.092025 | 106 | 0.687376 |
937f952bc46e85b182d60f91ffe0cfb24aaa840b | 3,936 | py | Python | tests/xlfunctions/test_text.py | ckp95/xlcalculator | 8f3f04a2a0a2ecb12c3d5837a5b13519137ae427 | [
"MIT"
] | 54 | 2020-04-26T09:18:29.000Z | 2022-03-30T08:47:45.000Z | tests/xlfunctions/test_text.py | st-lo/xlcalculator | 19190ec90e948b7ab1eceb06448b96cc1728bc51 | [
"MIT"
] | 41 | 2020-05-04T04:12:36.000Z | 2022-01-31T02:41:05.000Z | tests/xlfunctions/test_text.py | st-lo/xlcalculator | 19190ec90e948b7ab1eceb06448b96cc1728bc51 | [
"MIT"
] | 21 | 2020-05-21T20:49:23.000Z | 2022-02-20T14:15:56.000Z | import unittest
from xlcalculator.xlfunctions import text, xl, xlerrors, func_xltypes
class TextModuleTest(unittest.TestCase):
def test_CONCAT(self):
self.assertEqual(
text.CONCAT("SPAM", " ", "SPAM"), 'SPAM SPAM')
self.assertEqual(
text.CONCAT(
"SPAM",
... | 32.8 | 75 | 0.5531 |
937f98812d092c800d4ce0788dce6ffd89ec67ff | 21,912 | py | Python | project.py | frankbroniewski/qgis-pag-plugin | c3c3c42e1e11065394789566307109f7efdb574d | [
"MIT"
] | null | null | null | project.py | frankbroniewski/qgis-pag-plugin | c3c3c42e1e11065394789566307109f7efdb574d | [
"MIT"
] | 108 | 2015-09-01T12:28:28.000Z | 2021-02-02T07:51:30.000Z | project.py | frankbroniewski/qgis-pag-plugin | c3c3c42e1e11065394789566307109f7efdb574d | [
"MIT"
] | 2 | 2018-12-04T09:57:07.000Z | 2021-10-14T06:32:14.000Z | '''
Created on 18 sept. 2015
@author: arxit
'''
import os.path
from collections import OrderedDict
from pyspatialite import dbapi2 as db
from qgis.core import *
from PyQt4.QtCore import QFileInfo, QVariant, QObject, pyqtSignal, QSettings
from PyQt4.QtGui import QMessageBox
import main
from PagLuxembourg.schema impo... | 32.223529 | 165 | 0.548969 |
937fb2fb7f7f9cd4efeabf7966566b613b37d47d | 94 | py | Python | premade_modules/2.79/2.79b/bpy/ops/cycles.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.79/2.79b/bpy/ops/cycles.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.79/2.79b/bpy/ops/cycles.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | def use_shading_nodes():
'''Enable nodes on a material, world or lamp
'''
pass
| 13.428571 | 49 | 0.606383 |
937fdd2b04743899e045463b8a1d742434992689 | 4,099 | py | Python | alipay/aop/api/request/AlipayMerchantPayforprivilegeCardbinactivityDeleteRequest.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/request/AlipayMerchantPayforprivilegeCardbinactivityDeleteRequest.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/request/AlipayMerchantPayforprivilegeCardbinactivityDeleteRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayMerchantPayforprivilegeCardbinactivityDeleteModel import AlipayMerchantPayforprivilegeCardbinactivityDeleteModel
class AlipayM... | 28.268966 | 148 | 0.65577 |
937fe8c80fc55cdefd67a82a417ce0db5ad53664 | 10,408 | py | Python | ginga/canvas/types/utils.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | ginga/canvas/types/utils.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | ginga/canvas/types/utils.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | #
# utils.py -- classes for special shapes added to Ginga canvases.
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
from ginga.canvas.CanvasObject import (CanvasObjectB... | 38.405904 | 90 | 0.527863 |
93800fc7a8fc427d66bb8bddbee27b629eec20a9 | 23,191 | py | Python | ddisearch/ddi/models.py | emory-libraries/ddi-search | 7b44660a467f0d8295f628108dc7093b2afb3c98 | [
"Apache-2.0"
] | null | null | null | ddisearch/ddi/models.py | emory-libraries/ddi-search | 7b44660a467f0d8295f628108dc7093b2afb3c98 | [
"Apache-2.0"
] | null | null | null | ddisearch/ddi/models.py | emory-libraries/ddi-search | 7b44660a467f0d8295f628108dc7093b2afb3c98 | [
"Apache-2.0"
] | null | null | null | # file ddisearch/ddi/models.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 app... | 40.685965 | 129 | 0.684705 |
9380447086db881fe9bbc720fd02b7597269ed92 | 8,020 | py | Python | hard-gists/3750774/snippet.py | dockerizeme/dockerizeme | 408f3fa3d36542d8fc1236ba1cac804de6f14b0c | [
"Apache-2.0"
] | 21 | 2019-07-08T08:26:45.000Z | 2022-01-24T23:53:25.000Z | hard-gists/3750774/snippet.py | dockerizeme/dockerizeme | 408f3fa3d36542d8fc1236ba1cac804de6f14b0c | [
"Apache-2.0"
] | 5 | 2019-06-15T14:47:47.000Z | 2022-02-26T05:02:56.000Z | hard-gists/3750774/snippet.py | dockerizeme/dockerizeme | 408f3fa3d36542d8fc1236ba1cac804de6f14b0c | [
"Apache-2.0"
] | 17 | 2019-05-16T03:50:34.000Z | 2021-01-14T14:35:12.000Z | # encoding: utf-8
"""Experimental Solr Grouping / Field Collapsing backend for Haystack 2.0"""
# NOTE: You must be running the latest Pysolr main - no PyPI release yet!
# See https://gist.github.com/3750774 for the current version of this code
# See http://wiki.apache.org/solr/FieldCollapsing for the Solr feature docum... | 39.70297 | 110 | 0.636409 |
938093dabd6a4672bc4d6493e1e8538d85e37a47 | 888 | py | Python | src/template.py | embo-press/traxiv | 61f09fc670f618ec8e6f198eedb727c6e9551e64 | [
"MIT"
] | 1 | 2021-10-02T23:25:34.000Z | 2021-10-02T23:25:34.000Z | src/template.py | embo-press/traxiv | 61f09fc670f618ec8e6f198eedb727c6e9551e64 | [
"MIT"
] | 1 | 2019-09-20T21:21:51.000Z | 2019-09-24T16:36:09.000Z | src/template.py | embo-press/traxiv | 61f09fc670f618ec8e6f198eedb727c6e9551e64 | [
"MIT"
] | null | null | null | """
This module makes available the template and links needed to generate hypothes.is posts by traxiv.
"""
from string import Template
banners = {}
banners['Molecular Systems Biology'] = "https://www.embopress.org/pb-assets/embo-site/images/RevCo_Transparency-MSB.jpg"
banners['The EMBO Journal'] = "https://w... | 52.235294 | 122 | 0.747748 |
9380aed814382eb8c21a911ad18df229d4508f51 | 1,219 | py | Python | Think Python/mypolygon.py | henry-zhuang/reading-lists | 128b71b24cd49e346df74bee8126d3d3ef0907df | [
"BSD-2-Clause"
] | 3 | 2017-11-06T06:28:07.000Z | 2021-12-28T07:04:57.000Z | Think Python/mypolygon.py | henry-zhuang/reading-lists | 128b71b24cd49e346df74bee8126d3d3ef0907df | [
"BSD-2-Clause"
] | null | null | null | Think Python/mypolygon.py | henry-zhuang/reading-lists | 128b71b24cd49e346df74bee8126d3d3ef0907df | [
"BSD-2-Clause"
] | null | null | null | from swampy.TurtleWorld import *
import math
#def polygon( t, length, n ):
#max_cir_angle = 360
#angle = max_cir_angle / n
#for i in range( n ):
#fd( t, length )
#lt( t, angle )
def polyline ( t, length, n, angle ):
"""
Draws n line segments with the given length and
angle betw... | 22.163636 | 57 | 0.57096 |
9380c3c6ded475f8c285d1d5ed496e0d179ba779 | 1,345 | py | Python | alipay/aop/api/domain/ZhimaCustomerJobworthPositionAddModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/ZhimaCustomerJobworthPositionAddModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/ZhimaCustomerJobworthPositionAddModel.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.constant.ParamConstants import *
from alipay.aop.api.domain.JobWorthPositionInfo import JobWorthPositionInfo
class ZhimaCustomerJobworthPositionAddModel(object):
def __init__(self):
self._jobworth_position_info = None
@pr... | 29.888889 | 95 | 0.688476 |
9380d176fe8fb333f3ee10c850d967528c794e51 | 23,450 | py | Python | spinup/gym_reachability/envs/zermelo_show.py | MrRubyRed/spinningup | 345a7e32e4fe1c700c591286d31c453f5116d5d2 | [
"MIT"
] | null | null | null | spinup/gym_reachability/envs/zermelo_show.py | MrRubyRed/spinningup | 345a7e32e4fe1c700c591286d31c453f5116d5d2 | [
"MIT"
] | null | null | null | spinup/gym_reachability/envs/zermelo_show.py | MrRubyRed/spinningup | 345a7e32e4fe1c700c591286d31c453f5116d5d2 | [
"MIT"
] | null | null | null | # Please contact the author(s) of this library if you have any questions.
# Authors: Kai-Chieh Hsu ( kaichieh@princeton.edu )
# Modified from `zermelo_kc.py`
# TODO: construct an environment to showcase Reach-Avoid RL > Lagrange RL
# - `target/safety margin` (done)
# - `target/constraint _set_boundary` (done)
# - `... | 35.21021 | 113 | 0.532239 |
93811b46fb97629d1e7768c63dd98c56b99c1773 | 7,805 | py | Python | doc/conf.py | Bob620/xraylarch | f8d38e6122cc0e8c990b0f024db3b503a5fbf057 | [
"BSD-2-Clause"
] | null | null | null | doc/conf.py | Bob620/xraylarch | f8d38e6122cc0e8c990b0f024db3b503a5fbf057 | [
"BSD-2-Clause"
] | null | null | null | doc/conf.py | Bob620/xraylarch | f8d38e6122cc0e8c990b0f024db3b503a5fbf057 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# larch documentation build configuration file, created by
# sphinx-quickstart on Fri Feb 12 01:10:08 2010.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All c... | 33.934783 | 97 | 0.700833 |
9381482b334c19cec0b5b9abdc02ef4c3924a7e0 | 6,803 | py | Python | up2b/up2b_lib/up2b_api/__init__.py | thep0y/timg | 15b9472c2407f0af4d3d9eaaee431da566881a95 | [
"MIT"
] | 4 | 2021-02-10T12:08:18.000Z | 2021-02-24T11:09:02.000Z | up2b/up2b_lib/up2b_api/__init__.py | thep0y/timg | 15b9472c2407f0af4d3d9eaaee431da566881a95 | [
"MIT"
] | 1 | 2021-03-16T01:25:28.000Z | 2021-03-16T02:20:25.000Z | up2b/up2b_lib/up2b_api/__init__.py | thep0y/timg | 15b9472c2407f0af4d3d9eaaee431da566881a95 | [
"MIT"
] | 1 | 2021-02-15T08:52:48.000Z | 2021-02-15T08:52:48.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: thepoy
# @Email: thepoy@aliyun.com
# @File Name: __init__.py
# @Created: 2021-02-13 09:02:21
# @Modified: 2021-07-25 23:27:47
import os
import sys
import json
import shutil
from io import BytesIO
from typing import Optional, List, Tuple, Dict
from PIL import Im... | 36.379679 | 120 | 0.559753 |
93815f487f82946da12394467bdb93da2112949c | 3,403 | py | Python | misc/kafka/scripts/backup.py | Ganasagar/migration-tools-repo | 73d78f1734ccd04f1475d70b48fa02c6d892524b | [
"Apache-2.0"
] | null | null | null | misc/kafka/scripts/backup.py | Ganasagar/migration-tools-repo | 73d78f1734ccd04f1475d70b48fa02c6d892524b | [
"Apache-2.0"
] | null | null | null | misc/kafka/scripts/backup.py | Ganasagar/migration-tools-repo | 73d78f1734ccd04f1475d70b48fa02c6d892524b | [
"Apache-2.0"
] | null | null | null | import logging as log
import json
import os
from utils import encoding, remove_prefix, run_cmd
# DCOS CLI
DCOS = os.getenv("DCOS_CLI", "dcos")
MARATHON_JSON = "marathon_app.json"
KAFKA_ENV_JSON = "kafka_env.json"
def _fetch_tasks_envs(app_id: str, task_count: int) -> dict:
"""Pulls task configuration"""
envs... | 41.5 | 116 | 0.650309 |
938175d211b08facd70e473cca0eb7d1432903bd | 19,404 | py | Python | bokeh/layouts.py | charliezhan/bokeh | 5b8263cd5281494326d2fcd57745a69a1c2e6d93 | [
"BSD-3-Clause"
] | 1 | 2020-02-06T05:27:53.000Z | 2020-02-06T05:27:53.000Z | bokeh/layouts.py | charliezhan/bokeh | 5b8263cd5281494326d2fcd57745a69a1c2e6d93 | [
"BSD-3-Clause"
] | null | null | null | bokeh/layouts.py | charliezhan/bokeh | 5b8263cd5281494326d2fcd57745a69a1c2e6d93 | [
"BSD-3-Clause"
] | null | null | null | ''' Functions for arranging bokeh Layout objects.
'''
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
from __future__ import absolute_import
from .core.enums import Location, SizingMode
from .model... | 39.2 | 116 | 0.600855 |
9381892373f6bb652f55e5b393904eff8aaf02c5 | 13,869 | py | Python | topsides/transectLineAPI.py | EasternEdgeRobotics/2019 | 19f833262e7bdd026fffc0ac894327369d6bb66f | [
"MIT"
] | 1 | 2020-07-24T20:40:49.000Z | 2020-07-24T20:40:49.000Z | topsides/transectLineAPI.py | EasternEdgeRobotics/2019 | 19f833262e7bdd026fffc0ac894327369d6bb66f | [
"MIT"
] | 9 | 2019-08-23T01:39:53.000Z | 2019-08-23T01:42:48.000Z | topsides/transectLineAPI.py | EasternEdgeRobotics/2019 | 19f833262e7bdd026fffc0ac894327369d6bb66f | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import math
import time
import colorsys
from detectCracks import detectCracks
import detectGridPosition
import topsidesComms
from TopsidesGlobals import GLOBALS
import sys
#camera and frame variables
cam = None
cam_connection = "udpsrc port=5004 ! application/x-rtp,encoding-name=H264,payl... | 36.497368 | 222 | 0.48749 |
93818b3203088c432fcbbd65a2e12905200abf8b | 9,118 | py | Python | habitat/datasets/object_nav/create/create_objectnav_dataset.py | Ram81/habitat-imitation-baselines | c6e11c8ebadbf1260e1bed58a5b8dfb7faf6a505 | [
"MIT"
] | null | null | null | habitat/datasets/object_nav/create/create_objectnav_dataset.py | Ram81/habitat-imitation-baselines | c6e11c8ebadbf1260e1bed58a5b8dfb7faf6a505 | [
"MIT"
] | null | null | null | habitat/datasets/object_nav/create/create_objectnav_dataset.py | Ram81/habitat-imitation-baselines | c6e11c8ebadbf1260e1bed58a5b8dfb7faf6a505 | [
"MIT"
] | null | null | null | import glob
import gzip
import json
import multiprocessing
import os
import os.path as osp
import numpy as np
import pydash
import tqdm
import habitat
import habitat_sim
from habitat.datasets.object_nav.create.object_nav_generator import (
build_goal,
generate_objectnav_episode,
)
from habitat_sim.utils.commo... | 43.009434 | 85 | 0.508774 |
9381a3ade7ca29a6cf125738593df74fd972d723 | 1,388 | py | Python | src/lib/reportlab/lib/pagesizes.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | 1 | 2018-06-15T09:42:22.000Z | 2018-06-15T09:42:22.000Z | src/lib/reportlab/lib/pagesizes.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | null | null | null | src/lib/reportlab/lib/pagesizes.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | null | null | null | #!/bin/env python
#Copyright ReportLab Europe Ltd. 2000-2004
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/pagesizes.py
"""This module defines a few common page sizes in points (1/72 inch).
To be expanded to include things like l... | 25.236364 | 106 | 0.605908 |
93820ee0ac97442a3f61986b7abbfd16529e941c | 417 | py | Python | packages/galapagos_v2/runners/run_calibrate.py | 100kimch/ros_galapagos | 8f92cb93246c263b61199aef113e43cefc5f3939 | [
"MIT"
] | 2 | 2020-10-26T05:01:35.000Z | 2022-02-14T10:37:17.000Z | packages/galapagos_v2/runners/run_calibrate.py | 100kimch/ros_galapagos | 8f92cb93246c263b61199aef113e43cefc5f3939 | [
"MIT"
] | null | null | null | packages/galapagos_v2/runners/run_calibrate.py | 100kimch/ros_galapagos | 8f92cb93246c263b61199aef113e43cefc5f3939 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import rospy
# from std_msgs.msg import String
from sensor_msgs.msg import CompressedImage, LaserScan
import viewer
from constants import PATH_RASPICAM, PATH_USBCAM, PATH_LIDAR, PATH_GALAPAGOS_STATE
rospy.Subscriber(PATH_USBCAM, CompressedImage,
viewer.calibrate_subcam, queue_s... | 32.076923 | 82 | 0.800959 |
93824f61d2a48c64ecec958f3acf7e5a8988b070 | 13,122 | py | Python | salt/states/win_network.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | 3 | 2015-04-16T18:42:35.000Z | 2017-10-30T16:57:49.000Z | salt/states/win_network.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | 16 | 2015-11-18T00:44:03.000Z | 2018-10-29T20:48:27.000Z | salt/states/win_network.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | 1 | 2017-01-27T21:33:36.000Z | 2017-01-27T21:33:36.000Z | # -*- coding: utf-8 -*-
'''
Configuration of network interfaces on Windows hosts
====================================================
.. versionadded:: 2014.1.0
This module provides the ``network`` state(s) on Windows hosts. DNS servers, IP
addresses and default gateways can currently be managed.
Below is an example... | 33.819588 | 102 | 0.528273 |
9382620a440121e80175823f79d8eb6ec765b3cd | 5,189 | py | Python | demo/webcam_demo.py | Fei-dong/SOLO_SORT | fbf3ee447694f5f769c575a463e40efda4a994fb | [
"BSD-2-Clause"
] | 2 | 2020-12-02T12:24:38.000Z | 2021-05-27T04:39:14.000Z | demo/webcam_demo.py | Fei-dong/SOLO_SORT | fbf3ee447694f5f769c575a463e40efda4a994fb | [
"BSD-2-Clause"
] | 1 | 2020-12-21T05:58:43.000Z | 2020-12-21T09:22:12.000Z | demo/webcam_demo.py | Fei-dong/SOLO_SORT | fbf3ee447694f5f769c575a463e40efda4a994fb | [
"BSD-2-Clause"
] | null | null | null | import argparse
import cv2
import torch
from scipy import ndimage
from mmdet.apis import inference_detector, init_detector, show_result, show_result_ins, result_ins_box,result_ins_box_mask
import mmcv
import numpy as np
import warnings
from deep_sort import preprocessing
from deep_sort import nn_matching
from deep_... | 37.330935 | 127 | 0.636153 |
93827453afc8b2ef9cbed593bd7939a47305ca7f | 19,097 | py | Python | evaluate/classification_evaluate.py | harddownloader/NeuralClassifier | 7da6944452df682244bb61b65d2670bb2ddb8d46 | [
"Apache-2.0"
] | null | null | null | evaluate/classification_evaluate.py | harddownloader/NeuralClassifier | 7da6944452df682244bb61b65d2670bb2ddb8d46 | [
"Apache-2.0"
] | null | null | null | evaluate/classification_evaluate.py | harddownloader/NeuralClassifier | 7da6944452df682244bb61b65d2670bb2ddb8d46 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#coding:utf8
# Provide function that calculate the precision, recall, F1-score
# and output confusion_matrix.
import json
import os
import numpy as np
from dataset.classification_dataset import ClassificationDataset as cDataset
class ClassificationEvaluator(object):
MACRO_AVERAGE = "m... | 44.206019 | 95 | 0.582029 |
9382910067c63e76ffa620d633b097f2b53453a5 | 499 | py | Python | SBaaS_LIMS/lims_acquisitionMethod_execute.py | dmccloskey/SBaaS_LIMS | 5dfd73689674953345d523178a67b8dda10e6d47 | [
"MIT"
] | null | null | null | SBaaS_LIMS/lims_acquisitionMethod_execute.py | dmccloskey/SBaaS_LIMS | 5dfd73689674953345d523178a67b8dda10e6d47 | [
"MIT"
] | null | null | null | SBaaS_LIMS/lims_acquisitionMethod_execute.py | dmccloskey/SBaaS_LIMS | 5dfd73689674953345d523178a67b8dda10e6d47 | [
"MIT"
] | null | null | null | from .lims_acquisitionMethod_io import lims_acquisitionMethod_io
class lims_acquisitionMethod_execute(lims_acquisitionMethod_io):
def execute_exportAcqusitionMethod(self,lc_method_I,ms_mode_I,ms_methodtype_I,filename_I):
'''export the current acqusition method'''
# get the data
amethod = []... | 45.363636 | 94 | 0.761523 |
9382a80c5985160f0b702ca65d79ca371a37d439 | 1,269 | py | Python | tests/test_ascii_art.py | radroid/the-ascii-art-project | 1648f5dc79ad9f580ac7b1c5db997271a7c736e7 | [
"MIT"
] | 1 | 2020-09-05T08:35:46.000Z | 2020-09-05T08:35:46.000Z | tests/test_ascii_art.py | radroid/the-ascii-art-project | 1648f5dc79ad9f580ac7b1c5db997271a7c736e7 | [
"MIT"
] | null | null | null | tests/test_ascii_art.py | radroid/the-ascii-art-project | 1648f5dc79ad9f580ac7b1c5db997271a7c736e7 | [
"MIT"
] | null | null | null | """This module tests code of the-ascii-art-project"""
import pytest
from ascii_art import ASCIIArt
import numpy
@pytest.fixture(scope='module')
def art():
art = ASCIIArt() # Create an object instance.
return art # 'yield' or 'return' object.
# if 'yield', do post completion clean-up.
def test_image_l... | 21.87931 | 53 | 0.70922 |
9382e857780b83464144a0dec0e9d191758efbe3 | 37 | py | Python | propagation/gen_guided_model/__init__.py | naivete5656/WSISPDR | 1dc4d1bf24a6ebf7efd3c75d3f1a9edbe849d38b | [
"MIT"
] | 37 | 2019-10-09T09:42:24.000Z | 2022-03-29T09:57:29.000Z | propagation/gen_guided_model/__init__.py | naivete5656/WSISPDR | 1dc4d1bf24a6ebf7efd3c75d3f1a9edbe849d38b | [
"MIT"
] | 4 | 2020-02-26T06:49:02.000Z | 2021-10-17T16:29:24.000Z | propagation/gen_guided_model/__init__.py | naivete5656/WSISPDR | 1dc4d1bf24a6ebf7efd3c75d3f1a9edbe849d38b | [
"MIT"
] | 4 | 2019-10-18T07:34:30.000Z | 2020-04-10T03:35:34.000Z | from .guided_model import GuidedModel | 37 | 37 | 0.891892 |
93831657e1aca5bfec760068057251dffa0b6fd7 | 27,046 | py | Python | dvc/stage.py | amisev/dvc | 025de9aeb509a539d5560f82caf47e851162f4a2 | [
"Apache-2.0"
] | null | null | null | dvc/stage.py | amisev/dvc | 025de9aeb509a539d5560f82caf47e851162f4a2 | [
"Apache-2.0"
] | null | null | null | dvc/stage.py | amisev/dvc | 025de9aeb509a539d5560f82caf47e851162f4a2 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
from dvc.utils.compat import str
import copy
import re
import os
import subprocess
import logging
from dvc.utils import relpath
from dvc.utils.compat import pathlib
from dvc.utils.fs import contains_symlink_up_to
from schema import Schema, SchemaError, Optional, Or, And
impor... | 30.560452 | 79 | 0.567699 |
938365460b80641769a1f3afb34a685d69f4e13c | 37,821 | py | Python | monai/data/utils.py | danieltudosiu/MONAI | 99bca69f26f9f6a76e60f2ce7848e83470547833 | [
"Apache-2.0"
] | null | null | null | monai/data/utils.py | danieltudosiu/MONAI | 99bca69f26f9f6a76e60f2ce7848e83470547833 | [
"Apache-2.0"
] | null | null | null | monai/data/utils.py | danieltudosiu/MONAI | 99bca69f26f9f6a76e60f2ce7848e83470547833 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 - 2021 MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in wri... | 39.85353 | 130 | 0.663362 |
9383771f5674fea96aa44f497d48b0b39564a10e | 1,386 | py | Python | keyrings/osx_keychain_keys/examples/backend_example.py | dany74q/keyrings.osx_keychain_keys | 5613d64344bd40ccd9df58a1d898d55f8903dfc5 | [
"MIT"
] | 2 | 2020-09-27T21:03:20.000Z | 2022-01-04T06:07:00.000Z | keyrings/osx_keychain_keys/examples/backend_example.py | dany74q/keyrings.osx_keychain_keys | 5613d64344bd40ccd9df58a1d898d55f8903dfc5 | [
"MIT"
] | 2 | 2021-03-08T09:18:53.000Z | 2022-02-17T22:54:44.000Z | keyrings/osx_keychain_keys/examples/backend_example.py | dany74q/keyrings.osx_keychain_keys | 5613d64344bd40ccd9df58a1d898d55f8903dfc5 | [
"MIT"
] | null | null | null | from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey
from keyrings.osx_keychain_keys.backend import (
OSXKeychainKeysBackend,
OSXKeychainKeyType,
)
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primi... | 30.8 | 86 | 0.74531 |
93838df1a05a276b470a4e6f5baf8fa24382810a | 1,050 | py | Python | dataset/prediction/masks/generate_expected.py | joeljunior05/microspheres-sbrt | b8a0d67b3346a280c9783d8c7599f17eec243145 | [
"MIT"
] | 1 | 2020-05-07T09:36:02.000Z | 2020-05-07T09:36:02.000Z | dataset/prediction/masks/generate_expected.py | joeljunior05/microspheres-sbrt | b8a0d67b3346a280c9783d8c7599f17eec243145 | [
"MIT"
] | null | null | null | dataset/prediction/masks/generate_expected.py | joeljunior05/microspheres-sbrt | b8a0d67b3346a280c9783d8c7599f17eec243145 | [
"MIT"
] | null | null | null | import os
from os.path import isfile, join
import json
import pandas as pd
import numpy as np
def remove_excess(csv_df, padding=10, size=480):
return csv_df[(csv_df.y > padding) & (csv_df.x > padding) & (csv_df.x < 480-padding) & (csv_df.y < 480 - padding)]
def to_dict(filename):
res = {}
res['fil... | 26.25 | 119 | 0.644762 |
9383b694c5075f03b8abe0bd751dbcabd2e1deeb | 5,398 | py | Python | TestFile.py | AlexLim-Pro/BitOQSim | bba41fe45df7c57aafa00f1110abc360f845cf4a | [
"Apache-2.0"
] | null | null | null | TestFile.py | AlexLim-Pro/BitOQSim | bba41fe45df7c57aafa00f1110abc360f845cf4a | [
"Apache-2.0"
] | null | null | null | TestFile.py | AlexLim-Pro/BitOQSim | bba41fe45df7c57aafa00f1110abc360f845cf4a | [
"Apache-2.0"
] | null | null | null | """
Test File
Applies various miscellaneous tests
Author: Alex Lim
Date of Initial Creation: October 19, 2021
"""
import numpy as np
from src.QuantumCircuitMatrix import QuantumCircuitMatrix as qcm
__author__ = "Alex Lim"
__credits__ = "Alex Lim"
__maintainer__ = "Alex Lim"
def print_tests(test_name... | 30.670455 | 76 | 0.603001 |
9383e18b2ec305246cfce065ed05015737280bcb | 2,381 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/run_command_document.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.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 ... | 38.403226 | 87 | 0.606048 |
9383f6f7dfa3ae620f0c1f02afc25c00fd9dee90 | 5,088 | py | Python | kite/app.py | pxuanqui/Edge-Assisted-Cart | 2edd1f7023ab0b02f5733e2e9204bac4623eeeac | [
"BSD-3-Clause"
] | 27 | 2019-10-28T05:03:18.000Z | 2021-06-09T00:16:22.000Z | kite/app.py | pxuanqui/Edge-Assisted-Cart | 2edd1f7023ab0b02f5733e2e9204bac4623eeeac | [
"BSD-3-Clause"
] | null | null | null | kite/app.py | pxuanqui/Edge-Assisted-Cart | 2edd1f7023ab0b02f5733e2e9204bac4623eeeac | [
"BSD-3-Clause"
] | 6 | 2019-10-28T05:03:24.000Z | 2020-11-25T02:54:58.000Z | from flask import Flask, render_template, request, redirect, url_for
app = Flask(__name__)
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from database_setup import Base, Book
# Connect to Database and create database session
engine = create_engine('sqlite:///books-collection.db')
Base.... | 32.615385 | 156 | 0.638365 |
93841b4110681972f1094130e1831e6a50a4b530 | 4,261 | py | Python | experiments/ashvin/icml2020/hand/sparse2/door_adapt1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/sparse2/door_adapt1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/sparse2/door_adapt1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | """
AWR + SAC from demo experiment
"""
from rlkit.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader
from rlkit.launchers.experiments.awac.awac_rl import experiment, process_args
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.arglauncher import run_variants
from rlkit.torch.sac.policies im... | 30.435714 | 77 | 0.571931 |
93842d851da908d49db1af3ae841588d827dbf98 | 384 | py | Python | bob_white/bwhite_01.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 3 | 2020-11-16T15:20:11.000Z | 2020-12-11T17:01:42.000Z | bob_white/bwhite_01.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | null | null | null | bob_white/bwhite_01.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 1 | 2020-12-13T04:42:44.000Z | 2020-12-13T04:42:44.000Z | from itertools import combinations
from math import prod
from typing import List
vals: List[int] = [
1721,
979,
366,
299,
675,
1456,
]
answers = [
next(
prod(p)
for p in combinations(map(int, open("day_01.input").readlines()), i)
if sum(p) == 2020
)
for i in... | 16.695652 | 76 | 0.5625 |
93844b990a6fcd83a0bee72d00108344bbd7c9d1 | 1,931 | py | Python | data/transcoder_evaluation_gfg/python/MAXIMUM_NUMBER_CHOCOLATES_DISTRIBUTED_EQUALLY_AMONG_K_STUDENTS.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 241 | 2021-07-20T08:35:20.000Z | 2022-03-31T02:39:08.000Z | data/transcoder_evaluation_gfg/python/MAXIMUM_NUMBER_CHOCOLATES_DISTRIBUTED_EQUALLY_AMONG_K_STUDENTS.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 49 | 2021-07-22T23:18:42.000Z | 2022-03-24T09:15:26.000Z | data/transcoder_evaluation_gfg/python/MAXIMUM_NUMBER_CHOCOLATES_DISTRIBUTED_EQUALLY_AMONG_K_STUDENTS.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 ( arr , n , k ) :
um , curr_rem , maxSum = { } , 0 , 0
sm = [ 0 ] * n
sm [ 0 ] = arr [ 0 ]
for i in r... | 44.906977 | 166 | 0.46349 |
93844de83ce00142fbc58b8e57a1dfec3f50a36f | 12,252 | py | Python | oscar/lib/python2.7/site-packages/dns/renderer.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/dns/renderer.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/dns/renderer.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (C) 2001-2007, 2009-2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PRO... | 37.127273 | 79 | 0.57256 |
93846f9fc668e3f3a291499148f5f6ad3394b5f1 | 2,285 | py | Python | evaluation/visualize.py | Blank-Wang/dcase2017_task4_cvssp | fc7b604dcea6d9ca4dbcde8a33da3346fdda271c | [
"MIT"
] | 151 | 2017-09-19T17:02:18.000Z | 2021-12-29T02:56:47.000Z | evaluation/visualize.py | MaigoAkisame/dcase2017_task4_cvssp | fc7b604dcea6d9ca4dbcde8a33da3346fdda271c | [
"MIT"
] | 11 | 2017-10-10T21:01:27.000Z | 2020-12-09T13:22:17.000Z | evaluation/visualize.py | yongxuUSTC/dcase2017_task4_cvssp | 97ab1e29709bc87c9c1f9459929fb3853e7fa664 | [
"MIT"
] | 57 | 2017-09-22T22:13:33.000Z | 2021-12-01T09:03:58.000Z | import numpy as np
import cPickle
import h5py
import time
import os
import gzip
import sys
import csv
from io_task4 import create_folder, get_my_open
from io_task4 import sed_read_prob_mat_list_to_csv
from io_task4 import sed_read_strong_gt_csv
def at_visualize(at_prob_mat_path, weak_gt_csv, lbs, out_path):
lb_to_... | 32.642857 | 90 | 0.578118 |
9384725cf44d1d8e1a1e6684d8dbf935550833ac | 462 | py | Python | larq/__init__.py | sbrugman/larq | b080d9452847e9403b3d2fafd9425b488be71567 | [
"Apache-2.0"
] | null | null | null | larq/__init__.py | sbrugman/larq | b080d9452847e9403b3d2fafd9425b488be71567 | [
"Apache-2.0"
] | null | null | null | larq/__init__.py | sbrugman/larq | b080d9452847e9403b3d2fafd9425b488be71567 | [
"Apache-2.0"
] | null | null | null | import larq.layers as layers
import larq.activations as activations
import larq.callbacks as callbacks
import larq.constraints as constraints
import larq.math as math
import larq.metrics as metrics
import larq.models as models
import larq.quantizers as quantizers
import larq.optimizers as optimizers
__all__ = [
"l... | 21 | 38 | 0.729437 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.