hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1bb125fc740d034c7426baf1e225b7c858e4ea41 | 356 | py | Python | euphro_auth/api_urls.py | betagouv/euphrosyne | a67857a8716b5060cd9a2c6fa5f3d45c3fff435a | [
"MIT"
] | 1 | 2022-02-21T19:46:20.000Z | 2022-02-21T19:46:20.000Z | euphro_auth/api_urls.py | betagouv/euphrosyne | a67857a8716b5060cd9a2c6fa5f3d45c3fff435a | [
"MIT"
] | 37 | 2021-10-18T18:33:26.000Z | 2022-03-31T12:38:38.000Z | euphro_auth/api_urls.py | betagouv/euphrosyne | a67857a8716b5060cd9a2c6fa5f3d45c3fff435a | [
"MIT"
] | 2 | 2022-03-03T15:41:30.000Z | 2022-03-07T14:20:26.000Z | from django.urls import path
from rest_framework_simplejwt.views import TokenRefreshView
from .jwt.api_views import SessionTokenObtainPairView
urlpatterns = [
path(
"token/",
SessionTokenObtainPairView.as_view(),
name="token_obtain_pair",
),
path("token/refresh/", TokenRefreshView.... | 25.428571 | 77 | 0.72191 |
9b99fb38e6942d8d563c80dbf7ebda6ad4640cd3 | 2,374 | py | Python | judge.py | shin-sforzando/PAC2020-RPS | ccc65ee95c0d0e0ffce34f07d667f1fd0306d7c5 | [
"MIT"
] | null | null | null | judge.py | shin-sforzando/PAC2020-RPS | ccc65ee95c0d0e0ffce34f07d667f1fd0306d7c5 | [
"MIT"
] | 8 | 2020-08-18T11:51:19.000Z | 2020-08-18T21:42:45.000Z | judge.py | shin-sforzando/PAC2020-RPS | ccc65ee95c0d0e0ffce34f07d667f1fd0306d7c5 | [
"MIT"
] | null | null | null | from typing import Dict
from typing import TypeVar
from consequence import Consequence
from hand import Hand
from player import Player
from players.doraemon import Doraemon
from players.dorami import Dorami
from players.nobita import Nobita
from players.shizuka import Shizuka
from players.suneo import Suneo
TypePlaye... | 33.43662 | 89 | 0.655013 |
678c48f7c508dcd90c175c1cbe345f7e3c5ed0ff | 5,101 | py | Python | recipes/zlib/1.2.8/conanfile.py | cqjjjzr/conan-center-index | 1e1ecf6e0032ce3d341d49a10737f70d9bdb45dd | [
"MIT"
] | null | null | null | recipes/zlib/1.2.8/conanfile.py | cqjjjzr/conan-center-index | 1e1ecf6e0032ce3d341d49a10737f70d9bdb45dd | [
"MIT"
] | null | null | null | recipes/zlib/1.2.8/conanfile.py | cqjjjzr/conan-center-index | 1e1ecf6e0032ce3d341d49a10737f70d9bdb45dd | [
"MIT"
] | null | null | null | import os
import stat
import shutil
from conans import ConanFile, tools, CMake, AutoToolsBuildEnvironment
from conans.errors import ConanException, NotFoundException
class ZlibConan(ConanFile):
name = "zlib"
version = "1.2.8"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://z... | 45.954955 | 121 | 0.598902 |
bc029681620d289812865f87585a1f85faf6f5da | 24,030 | py | Python | graphik/solvers/trust_region.py | utiasSTARS/GraphIK | c2d05386bf9f9baf8ad146125bfebc3b73fccd14 | [
"MIT"
] | 1 | 2020-11-08T23:26:03.000Z | 2020-11-08T23:26:03.000Z | graphik/solvers/trust_region.py | utiasSTARS/GraphIK | c2d05386bf9f9baf8ad146125bfebc3b73fccd14 | [
"MIT"
] | null | null | null | graphik/solvers/trust_region.py | utiasSTARS/GraphIK | c2d05386bf9f9baf8ad146125bfebc3b73fccd14 | [
"MIT"
] | null | null | null | # References, taken from trustregions.m in manopt:
# Please cite the Manopt paper as well as the research paper:
# @Article{genrtr,
# Title = {Trust-region methods on {Riemannian} manifolds},
# Author = {Absil, P.-A. and Baker, C. G. and Gallivan, K. A.},
# Journal = {Foundations of Computa... | 40.05 | 91 | 0.546983 |
bcd5fdd6a249159d8e14cf58167b31c3685453b8 | 801 | py | Python | archivebox/cli/archivebox_shell.py | sarvex/ArchiveBox | 2427e6d3dc377c665f785f1d845da4e5a20b50a0 | [
"MIT"
] | 6,340 | 2018-12-20T21:12:13.000Z | 2020-11-23T02:39:32.000Z | archivebox/cli/archivebox_shell.py | sarvex/ArchiveBox | 2427e6d3dc377c665f785f1d845da4e5a20b50a0 | [
"MIT"
] | 388 | 2018-12-20T07:58:08.000Z | 2020-11-23T03:20:36.000Z | archivebox/cli/archivebox_shell.py | sarvex/ArchiveBox | 2427e6d3dc377c665f785f1d845da4e5a20b50a0 | [
"MIT"
] | 439 | 2018-12-21T21:51:47.000Z | 2020-11-21T21:21:35.000Z | #!/usr/bin/env python3
__package__ = 'archivebox.cli'
__command__ = 'archivebox shell'
import sys
import argparse
from typing import Optional, List, IO
from ..main import shell
from ..util import docstring
from ..config import OUTPUT_DIR
from ..logging_util import SmartFormatter, reject_stdin
@docstring(shell.__d... | 22.885714 | 100 | 0.696629 |
cf6b4ec2b16b5f226561359b41f748e0eb9850f2 | 2,837 | py | Python | Morphology/diameter_closing.py | Joevaen/Scikit-image_On_CT | e3bf0eeadc50691041b4b7c44a19d07546a85001 | [
"Apache-2.0"
] | null | null | null | Morphology/diameter_closing.py | Joevaen/Scikit-image_On_CT | e3bf0eeadc50691041b4b7c44a19d07546a85001 | [
"Apache-2.0"
] | null | null | null | Morphology/diameter_closing.py | Joevaen/Scikit-image_On_CT | e3bf0eeadc50691041b4b7c44a19d07546a85001 | [
"Apache-2.0"
] | null | null | null | # 执行图像的直径封闭。
#
# 直径关闭会删除图像的所有深色结构,最大扩展长度小于diameter_threshold。 最大扩展定义为边界框的最大扩展。 该运算符也称为边界框关闭。 在实践中,结果类似于形态学上的闭合,但是长而薄的结构没有被去除。
#
# 从技术上讲,此运算符基于图像的最大树表示。
import numpy as np
import matplotlib.pyplot as plt
from skimage.morphology import diameter_closing
from skimage import data
from skimage.morphology import closing
from... | 34.597561 | 110 | 0.621079 |
e08cac015225889b41a64cea277cdf893c53fbaa | 346 | py | Python | awsfabrictasks/ubuntu.py | newgene/awsfabrictasks | 7e0d014f9fd6f83ef24e9913eba8c1c17d67e4a4 | [
"BSD-3-Clause"
] | 37 | 2015-01-25T19:27:37.000Z | 2018-02-22T04:00:00.000Z | awsfabrictasks/ubuntu.py | newgene/awsfabrictasks | 7e0d014f9fd6f83ef24e9913eba8c1c17d67e4a4 | [
"BSD-3-Clause"
] | 4 | 2015-01-24T23:54:04.000Z | 2016-01-13T17:36:17.000Z | awsfabrictasks/ubuntu.py | newgene/awsfabrictasks | 7e0d014f9fd6f83ef24e9913eba8c1c17d67e4a4 | [
"BSD-3-Clause"
] | 13 | 2015-01-24T23:44:46.000Z | 2016-06-05T03:55:32.000Z | """
Ubuntu utilities.
"""
from fabric.api import sudo
def set_locale(locale='en_US'):
"""
Set locale to avoid the warnings from perl and others about locale
failures.
"""
sudo('locale-gen {locale}.UTF-8'.format(**vars()))
sudo('update-locale LANG={locale}.UTF-8 LC_ALL={locale}.UTF-8 LC_MESSAGES... | 26.615385 | 102 | 0.66474 |
f344b6d80e98e78e9bc3f04a5a41f74729d7087e | 16,063 | py | Python | pytransform3d/rotations/_utils.py | alek5k/pytransform3d | c6fb10b1d17713bd8a2d6becb928c4f6dcf611f9 | [
"BSD-3-Clause"
] | 304 | 2019-01-16T15:14:31.000Z | 2022-03-31T16:14:37.000Z | pytransform3d/rotations/_utils.py | alek5k/pytransform3d | c6fb10b1d17713bd8a2d6becb928c4f6dcf611f9 | [
"BSD-3-Clause"
] | 94 | 2018-12-07T14:54:05.000Z | 2022-03-19T22:38:20.000Z | pytransform3d/rotations/_utils.py | alek5k/pytransform3d | c6fb10b1d17713bd8a2d6becb928c4f6dcf611f9 | [
"BSD-3-Clause"
] | 37 | 2018-12-09T23:58:40.000Z | 2022-03-16T02:29:53.000Z | """Utility functions for rotations."""
import warnings
import math
import numpy as np
from ._constants import unitz, eps
def norm_vector(v):
"""Normalize vector.
Parameters
----------
v : array-like, shape (n,)
nd vector
Returns
-------
u : array, shape (n,)
nd unit vecto... | 27.64716 | 78 | 0.580776 |
83188cf5b40fb1fc1ae77bc96e7cc09bc2d41101 | 2,828 | py | Python | backend/signals.py | lucasmgana/Pharmacy-Light-weight | 9d6efe714d60b3a04f78f174e1e6c2a2ab98bd9a | [
"MIT"
] | 192 | 2020-08-14T22:17:34.000Z | 2022-03-29T05:56:26.000Z | backend/signals.py | lucasmgana/Pharmacy-Light-weight | 9d6efe714d60b3a04f78f174e1e6c2a2ab98bd9a | [
"MIT"
] | 9 | 2021-03-30T14:29:00.000Z | 2022-02-27T11:06:35.000Z | backend/signals.py | lucasmgana/Pharmacy-Light-weight | 9d6efe714d60b3a04f78f174e1e6c2a2ab98bd9a | [
"MIT"
] | 28 | 2020-08-15T08:26:34.000Z | 2022-03-17T01:15:52.000Z | from .models.publications import Publication
from .models.subscribers import Subscriber
from .utils import unique_slug_generator, smart_truncate, format_wpp_number
from django.db.models.signals import pre_save, post_save
from django.dispatch import receiver
from django.core.mail import EmailMultiAlternatives
from djang... | 36.727273 | 140 | 0.649929 |
b5d53046bd57bc7b4de62b8f94bb4b0e8cc5d5ed | 15,019 | py | Python | disnake/components.py | Enegg/disnake | 1d48cbf4e0dfec82fdfb65d7f58396767ce7c009 | [
"MIT"
] | 290 | 2021-11-03T12:33:16.000Z | 2022-03-31T19:30:19.000Z | disnake/components.py | Enegg/disnake | 1d48cbf4e0dfec82fdfb65d7f58396767ce7c009 | [
"MIT"
] | 200 | 2021-11-03T10:41:41.000Z | 2022-03-31T08:13:11.000Z | disnake/components.py | Enegg/disnake | 1d48cbf4e0dfec82fdfb65d7f58396767ce7c009 | [
"MIT"
] | 118 | 2021-11-03T18:27:09.000Z | 2022-03-25T22:00:45.000Z | """
The MIT License (MIT)
Copyright (c) 2015-2021 Rapptz
Copyright (c) 2021-present Disnake Development
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 limi... | 30.526423 | 104 | 0.612025 |
af2741cc6daf24b94a2227c3007a70a1a18d73ea | 358 | py | Python | pjproject_android/tests/pjsua/scripts-call/150_srtp_3_0.py | WachterJud/qaul.net_legacy | 9c2be0a38ad6e90fadc0d1150340e37d220997ae | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 4 | 2019-11-11T08:16:08.000Z | 2020-08-25T03:08:44.000Z | pjproject_android/tests/pjsua/scripts-call/150_srtp_3_0.py | WachterJud/qaul.net_legacy | 9c2be0a38ad6e90fadc0d1150340e37d220997ae | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2020-02-20T06:58:16.000Z | 2020-02-20T07:08:07.000Z | my_softphone/pjproject-2.9/tests/pjsua/scripts-call/150_srtp_3_0.py | sashkaseltsov1/reposCpp | 3ff5ce2a14a368a36b1758099ce4f3e8c4cdf11d | [
"Unlicense"
] | 5 | 2019-07-02T02:03:24.000Z | 2022-03-30T09:58:52.000Z | # $Id: 150_srtp_3_0.py 3334 2010-10-05 16:32:04Z nanang $
#
from inc_cfg import *
test_param = TestParam(
"Callee=optional (with duplicated offer) SRTP, caller=no SRTP",
[
InstanceParam("callee", "--null-audio --use-srtp=3 --srtp-secure=0 --max-calls=1"),
InstanceParam("caller", "--null-audio --use-srtp=0 --... | 29.833333 | 86 | 0.664804 |
8b01a0d91f93e82d9f69bee032db33e32409e5cf | 2,320 | py | Python | selfdrive/test/update_ci_routes.py | otaku/openpilot | 09283f4d6af839756e7ff49035d0b2251859aebe | [
"MIT"
] | 1 | 2021-04-10T09:14:43.000Z | 2021-04-10T09:14:43.000Z | selfdrive/test/update_ci_routes.py | otaku/openpilot | 09283f4d6af839756e7ff49035d0b2251859aebe | [
"MIT"
] | null | null | null | selfdrive/test/update_ci_routes.py | otaku/openpilot | 09283f4d6af839756e7ff49035d0b2251859aebe | [
"MIT"
] | 1 | 2021-04-10T09:14:45.000Z | 2021-04-10T09:14:45.000Z | #!/usr/bin/env python3
import tempfile
import shutil
import subprocess
from common.basedir import BASEDIR
from azure.storage.blob import BlockBlobService
from selfdrive.test.test_car_models import routes as test_car_models_routes, non_public_routes
from selfdrive.test.process_replay.test_processes import segments as r... | 31.780822 | 117 | 0.733621 |
883cb609785ee91af2548b8fbc67db5d621d7111 | 30,846 | py | Python | pyvaspflow/io/vasp_input.py | Zhiwei-Lu/pyvaspflow | b80eab3e8bfc52aed6a2459dd32655f1075d9058 | [
"MIT"
] | 1 | 2021-11-23T12:42:56.000Z | 2021-11-23T12:42:56.000Z | pyvaspflow/io/vasp_input.py | Zhiwei-Lu/pyvaspflow | b80eab3e8bfc52aed6a2459dd32655f1075d9058 | [
"MIT"
] | null | null | null | pyvaspflow/io/vasp_input.py | Zhiwei-Lu/pyvaspflow | b80eab3e8bfc52aed6a2459dd32655f1075d9058 | [
"MIT"
] | 1 | 2021-09-10T14:19:14.000Z | 2021-09-10T14:19:14.000Z | #!/usr/bin/env python3.6
# -*- coding: utf-8 -*-
from pyvaspflow.utils import str_delimited, clean_lines,zread,read_json
import re,math,json,seekpath
from os import path
import numpy as np
from enum import Enum
from pyvaspflow.utils import is_2d_structure
import itertools
class Incar(dict):
def __init__(self, p... | 40.964143 | 120 | 0.543377 |
719e9714bb7fc9d805ca413112bf15b410d9612b | 456 | py | Python | pdappend/gui.py | cnpls/pdappend | 9f00fea5d9df072ab90d74c96ebaffe8033eb572 | [
"MIT"
] | null | null | null | pdappend/gui.py | cnpls/pdappend | 9f00fea5d9df072ab90d74c96ebaffe8033eb572 | [
"MIT"
] | 10 | 2021-03-29T02:34:05.000Z | 2021-03-30T00:24:37.000Z | pdappend/gui.py | cnpls/pdappend | 9f00fea5d9df072ab90d74c96ebaffe8033eb572 | [
"MIT"
] | 1 | 2020-11-11T23:29:41.000Z | 2020-11-11T23:29:41.000Z | import os
from pdappend import pdappend, cli
from tkinter import filedialog
from tkinter import *
def main():
root = Tk()
root.withdraw()
# TODO: from pdappend.pdappend.FILE_TYPES
files = filedialog.askopenfilenames(
initialdir=os.getcwd(), filetypes=[(".xlsx .xls .csv", ".xlsx .xls .csv")]
... | 21.714286 | 82 | 0.66886 |
053715207de03dc7c72267367b804107ae464caa | 5,776 | py | Python | sdk/python/pulumi_azure_nextgen/web/v20201001/get_web_app_swift_virtual_network_connection_slot.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/web/v20201001/get_web_app_swift_virtual_network_connection_slot.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/web/v20201001/get_web_app_swift_virtual_network_connection_slot.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 39.027027 | 190 | 0.659453 |
8c9a653f2c96ebe2d5b9571ad132429bd4b7e5d3 | 7,351 | py | Python | test/unit/tasks/test_forecasting.py | Kwentar/FEDOT | 97a561698c0aa006aa627fc56965a0bc251a4ed8 | [
"BSD-3-Clause"
] | null | null | null | test/unit/tasks/test_forecasting.py | Kwentar/FEDOT | 97a561698c0aa006aa627fc56965a0bc251a4ed8 | [
"BSD-3-Clause"
] | null | null | null | test/unit/tasks/test_forecasting.py | Kwentar/FEDOT | 97a561698c0aa006aa627fc56965a0bc251a4ed8 | [
"BSD-3-Clause"
] | null | null | null | from random import seed
import numpy as np
import pytest
from sklearn.metrics import mean_squared_error, mean_absolute_error
from statsmodels.tsa.arima_process import ArmaProcess
from fedot.core.chains.chain import Chain
from fedot.core.chains.chain_ts_wrappers import out_of_sample_ts_forecast, \
in_sample_ts_for... | 33.56621 | 81 | 0.706162 |
344e90432f18f9807af80121018c3a4f92271304 | 36,969 | py | Python | scraper/expand/get_genbank_sequences.py | HobnobMancer/cazy_webscraper | 3f74492f46db2093f7e6cd91fffcb8347694e54e | [
"MIT"
] | 3 | 2020-10-22T08:31:29.000Z | 2021-05-19T13:13:12.000Z | scraper/expand/get_genbank_sequences.py | HobnobMancer/cazy_webscraper | 3f74492f46db2093f7e6cd91fffcb8347694e54e | [
"MIT"
] | 62 | 2020-11-30T11:29:20.000Z | 2022-03-28T13:50:30.000Z | scraper/expand/get_genbank_sequences.py | HobnobMancer/cazy_webscraper | 3f74492f46db2093f7e6cd91fffcb8347694e54e | [
"MIT"
] | 1 | 2021-03-10T16:30:11.000Z | 2021-03-10T16:30:11.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# (c) University of St Andrews 2020-2021
# (c) University of Strathclyde 2020-2021
# Author:
# Emma E. M. Hobbs
# Contact
# eemh1@st-andrews.ac.uk
# Emma E. M. Hobbs,
# Biomolecular Sciences Building,
# University of St Andrews,
# North Haugh Campus,
# St Andrews,
# KY16... | 42.250286 | 101 | 0.629068 |
e5038b2d43307a9172356d58f8b0bd022b7ddde0 | 6,527 | py | Python | 04 - Classes-inheritance-oops/53-classes-pickling-magic-methods.py | python-demo-codes/basics | 2a151bbff4b528cefd52978829c632fd087c8f20 | [
"DOC"
] | 2 | 2019-08-23T06:05:55.000Z | 2019-08-26T03:56:07.000Z | 04 - Classes-inheritance-oops/53-classes-pickling-magic-methods.py | python-lang-codes/basics | 2a151bbff4b528cefd52978829c632fd087c8f20 | [
"DOC"
] | null | null | null | 04 - Classes-inheritance-oops/53-classes-pickling-magic-methods.py | python-lang-codes/basics | 2a151bbff4b528cefd52978829c632fd087c8f20 | [
"DOC"
] | 4 | 2020-10-01T07:16:07.000Z | 2021-07-17T07:55:08.000Z | # HEAD
# Classes - Pickling Concept
# DESCRIPTION
# Describes the magic methods of classes
# getinitargs, getnewargs,
# getstate, setstate,
# reduce, reduce_ex
# RESOURCES
#
# https://rszalski.github.io/magicmethods/
# Pickling your own Objects
# Pickling isn't just for built-in types.
# It's f... | 63.368932 | 786 | 0.735254 |
51c8073449214e02e876fec13f4eafe26e17ae37 | 7,161 | py | Python | digits/dataset/generic/views.py | Linda-liugongzi/DIGITS-digits-py3 | 6df5eb6972574a628b9544934518ec8dfa9c7439 | [
"BSD-3-Clause"
] | null | null | null | digits/dataset/generic/views.py | Linda-liugongzi/DIGITS-digits-py3 | 6df5eb6972574a628b9544934518ec8dfa9c7439 | [
"BSD-3-Clause"
] | null | null | null | digits/dataset/generic/views.py | Linda-liugongzi/DIGITS-digits-py3 | 6df5eb6972574a628b9544934518ec8dfa9c7439 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
import os
# Find the best implementation available
try:
from io import StringIO, BytesIO
except ImportError:
from io import StringIO, BytesIO
from caffe.proto import caffe_pb2
import flask
import matplotlib as mpl
import matplotlib.pyplot a... | 32.55 | 98 | 0.647256 |
e0728e26e0dfda931a10a9fdb2417adf4af9bb16 | 15,775 | py | Python | FeatureExtraction/BroExtraction/ConnectionFeatures.py | frenky-strasak/HTTPSDetector | 2b0c8d171b345ec0051603fc3c2730b6e62a295e | [
"MIT"
] | 9 | 2020-02-06T18:39:58.000Z | 2022-02-04T12:14:20.000Z | FeatureExtraction/BroExtraction/ConnectionFeatures.py | frenky-strasak/HTTPSDetector | 2b0c8d171b345ec0051603fc3c2730b6e62a295e | [
"MIT"
] | 1 | 2018-03-30T08:47:27.000Z | 2019-04-30T09:08:23.000Z | FeatureExtraction/BroExtraction/ConnectionFeatures.py | frenky-strasak/HTTPSDetector | 2b0c8d171b345ec0051603fc3c2730b6e62a295e | [
"MIT"
] | 4 | 2018-07-13T16:31:11.000Z | 2021-01-07T07:58:05.000Z | import numpy
from Connection4tuple import Connection4tuple
class ConnectionFeatures(Connection4tuple):
def __init__(self, tuple_index):
super(ConnectionFeatures, self).__init__(tuple_index)
"""
---------- Get Feature -------------------
"""
# ---------------------------------------------... | 40.448718 | 176 | 0.607163 |
299d55f7ac04b9ef653d4f4d4d2251a531a84c51 | 11,688 | py | Python | evaluation/evalCorr/getResults.py | tim885/RANSAC-Flow | 4a10c204fbb8a1ea92826263661761f91c91839c | [
"MIT"
] | 1 | 2020-11-20T19:35:01.000Z | 2020-11-20T19:35:01.000Z | evaluation/evalCorr/getResults.py | ducha-aiki/RANSAC-Flow | 1cfa2707ac695ca29dab4011eca81e0e24807221 | [
"MIT"
] | null | null | null | evaluation/evalCorr/getResults.py | ducha-aiki/RANSAC-Flow | 1cfa2707ac695ca29dab4011eca81e0e24807221 | [
"MIT"
] | 1 | 2021-01-28T12:24:46.000Z | 2021-01-28T12:24:46.000Z | import numpy as np
import torch
import kornia.geometry as tgm
import pickle
import os
from PIL import Image
from torchvision import transforms
from torch.nn import functional as F
import cv2
from pathlib import Path
from tqdm import tqdm
import argparse
import pandas as pd
def alignmentError(wB, hB, wA, hA, XA, YA, ... | 39.620339 | 279 | 0.603183 |
7e323ef2bc2fa5d513d1a7e7d08266b2e7b533ac | 9,862 | py | Python | lib/reaction/direction.py | avcopan/mechdriver | 63069cfb21d6fdb6d0b091dfe204b1e09c8e10a1 | [
"Apache-2.0"
] | null | null | null | lib/reaction/direction.py | avcopan/mechdriver | 63069cfb21d6fdb6d0b091dfe204b1e09c8e10a1 | [
"Apache-2.0"
] | null | null | null | lib/reaction/direction.py | avcopan/mechdriver | 63069cfb21d6fdb6d0b091dfe204b1e09c8e10a1 | [
"Apache-2.0"
] | null | null | null | """
Functions to handle direction of a reaction
"""
import os
import automol
import autofile
import chemkin_io
from ioformat import remove_whitespace
# from routines.es._routines import geom
from lib.phydat import phycon
from lib.filesys.mincnf import min_energy_conformer_locators
from lib.filesys.inf import modify_o... | 34.725352 | 81 | 0.630298 |
f3efa8e8929c876d53708b87f1cb69958fc6633d | 4,311 | py | Python | vendor/tornado/tornado/win32_support.py | bopopescu/cc-2 | 37444fb16b36743c439b0d6c3cac2347e0cc0a94 | [
"Apache-2.0"
] | 12 | 2017-03-09T07:06:07.000Z | 2020-10-21T02:20:36.000Z | vendor/tornado/tornado/win32_support.py | bopopescu/cc-2 | 37444fb16b36743c439b0d6c3cac2347e0cc0a94 | [
"Apache-2.0"
] | 1 | 2020-08-02T15:40:49.000Z | 2020-08-02T15:40:49.000Z | vendor/tornado/tornado/win32_support.py | bopopescu/cc-2 | 37444fb16b36743c439b0d6c3cac2347e0cc0a94 | [
"Apache-2.0"
] | 8 | 2017-05-22T06:41:36.000Z | 2019-09-26T02:29:23.000Z | # NOTE: win32 support is currently experimental, and not recommended
# for production use.
import ctypes
import ctypes.wintypes
import os
import socket
import errno
# See: http://msdn.microsoft.com/en-us/library/ms738573(VS.85).aspx
ioctlsocket = ctypes.windll.ws2_32.ioctlsocket
ioctlsocket.argtypes = (ctypes.wintyp... | 34.766129 | 102 | 0.591046 |
29adcdadcc22f94d2caaee26d7818362d3e56f3c | 2,401 | py | Python | drain-service/drain3/template_miner_config.py | jameson-mcghee/opni-drain-service | 3f0a5bb962a740b7d78113f95c5e5db57e85180e | [
"Apache-2.0"
] | 3 | 2021-07-29T19:46:25.000Z | 2021-11-08T10:26:42.000Z | drain-service/drain3/template_miner_config.py | jameson-mcghee/opni-drain-service | 3f0a5bb962a740b7d78113f95c5e5db57e85180e | [
"Apache-2.0"
] | null | null | null | drain-service/drain3/template_miner_config.py | jameson-mcghee/opni-drain-service | 3f0a5bb962a740b7d78113f95c5e5db57e85180e | [
"Apache-2.0"
] | 3 | 2021-05-21T20:25:51.000Z | 2021-10-06T15:06:52.000Z | """
Adopted from https://github.com/IBM/Drain3
"""
# Standard Library
import ast
import configparser
import logging
logger = logging.getLogger(__name__)
class TemplateMinerConfig:
def __init__(self):
self.profiling_enabled = False
self.profiling_report_sec = 60
self.snapshot_interval_minu... | 33.816901 | 88 | 0.658892 |
01b7a1151dc091d9fc61daa71926c13883309816 | 4,438 | py | Python | app/customer/common_util/image.py | B-ROY/TESTGIT | 40221cf254c90d37d21afb981635740aebf11949 | [
"Apache-2.0"
] | 2 | 2017-12-02T13:58:30.000Z | 2018-08-02T17:07:59.000Z | app/customer/common_util/image.py | B-ROY/TESTGIT | 40221cf254c90d37d21afb981635740aebf11949 | [
"Apache-2.0"
] | null | null | null | app/customer/common_util/image.py | B-ROY/TESTGIT | 40221cf254c90d37d21afb981635740aebf11949 | [
"Apache-2.0"
] | null | null | null | import re
import os
import tencentyun
import hmac
import urllib2
import random
import time
import binascii
import base64
import hashlib
import json
__author__ = 'zen'
APPID = '10048692'
BUCKET = 'heydopic'
SECRET_ID = 'AKIDgknyBYkNKnpONeweTRwK9t6Nn0jn78yG'
SECRET_KEY = 'fBCXVJK1PpWPtYizb7vIGVMIJFm90GBa'
UPLOAD_TYPE_... | 28.818182 | 109 | 0.624606 |
ced017199ecd3464859f5bc89b3b52389b595aa0 | 335 | py | Python | tests/unit/ssg/test_checks.py | dhanushkar-wso2/scap-security-guide | e4134011d3274f828a0d2119e1fa24396ef73a1b | [
"BSD-3-Clause"
] | null | null | null | tests/unit/ssg/test_checks.py | dhanushkar-wso2/scap-security-guide | e4134011d3274f828a0d2119e1fa24396ef73a1b | [
"BSD-3-Clause"
] | null | null | null | tests/unit/ssg/test_checks.py | dhanushkar-wso2/scap-security-guide | e4134011d3274f828a0d2119e1fa24396ef73a1b | [
"BSD-3-Clause"
] | null | null | null | import pytest
import ssg.checks
def test_is_cce_valid():
icv = ssg.checks.is_cce_valid
assert icv("CCE-27191-6")
assert icv("CCE-7223-7")
assert not icv("not-valid")
assert not icv("1234-5")
assert not icv("12345-6")
assert not icv("TBD")
assert not icv("CCE-TBD")
assert not icv(... | 19.705882 | 33 | 0.641791 |
9d2a9c8e1690393903392dc689fc40ec06516364 | 900 | py | Python | tests/unit/conftest.py | sshink/testrail-api | 18bc28a0b76ae475974e5f9ed6f7f9d9da58f5bc | [
"MIT"
] | null | null | null | tests/unit/conftest.py | sshink/testrail-api | 18bc28a0b76ae475974e5f9ed6f7f9d9da58f5bc | [
"MIT"
] | null | null | null | tests/unit/conftest.py | sshink/testrail-api | 18bc28a0b76ae475974e5f9ed6f7f9d9da58f5bc | [
"MIT"
] | null | null | null | import os
from pathlib import Path
import pytest
import responses
from testrail_api import TestRailAPI
@pytest.fixture(scope='session')
def host():
yield 'https://example.testrail.com/'
@pytest.fixture(scope='session')
def base_path():
path = Path(__file__).absolute().parent
yield str(path)
@pytest.... | 19.148936 | 50 | 0.705556 |
5e9f7ff994fc157adc06bfc9e7d69d0c59d2e26f | 1,663 | py | Python | Game23/Game23.py | ttkaixin1998/pikachupythongames | 609a3a5a2be3f5a187c332c7980bb5bb14548f02 | [
"MIT"
] | 4,013 | 2018-06-16T08:00:02.000Z | 2022-03-30T11:48:14.000Z | Game23/Game23.py | pigbearcat/Games | b8c47ef1bcce9a9db3f3730c162e6e8e08b508a2 | [
"MIT"
] | 22 | 2018-10-18T00:15:50.000Z | 2022-01-13T08:16:15.000Z | Game23/Game23.py | pigbearcat/Games | b8c47ef1bcce9a9db3f3730c162e6e8e08b508a2 | [
"MIT"
] | 2,172 | 2018-07-20T04:03:14.000Z | 2022-03-31T14:18:29.000Z | '''
Function:
2048小游戏
Author:
Charles
微信公众号:
Charles的皮卡丘
'''
import cfg
import sys
import pygame
from modules import *
'''主程序'''
def main(cfg):
# 游戏初始化
pygame.init()
screen = pygame.display.set_mode(cfg.SCREENSIZE)
pygame.display.set_caption('2048 —— Charles的皮卡丘')
# 播放背景音乐
pygame.m... | 28.672414 | 145 | 0.615755 |
1f8f9e391109c41227336b2bb762cb77a40123c1 | 6,413 | py | Python | src/harvester.py | bmoxon/azfinsim | 3e203855410abd6c9636377b93ed5d33ac896c41 | [
"MIT"
] | 5 | 2021-02-24T19:10:34.000Z | 2022-02-24T21:11:24.000Z | src/harvester.py | bmoxon/azfinsim | 3e203855410abd6c9636377b93ed5d33ac896c41 | [
"MIT"
] | null | null | null | src/harvester.py | bmoxon/azfinsim | 3e203855410abd6c9636377b93ed5d33ac896c41 | [
"MIT"
] | 2 | 2021-05-03T11:57:31.000Z | 2021-12-09T10:24:29.000Z | #! /usr/bin/env python3
#-- harvest scheduler that runs on the compute pool nodes
import argparse
import time
import sys
import logging
import os
import psutil
from applicationinsights import TelemetryClient
from applicationinsights.logging import LoggingHandler
from getargs import getargs
import azlog
azlog.color=... | 34.478495 | 127 | 0.626072 |
088eb78bf81aa3056a55d7e3bfc584ab417cace2 | 746 | py | Python | generated-libraries/python/netapp/ntdtest/ntdtest_get_iter_key_td.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | 2 | 2017-03-28T15:31:26.000Z | 2018-08-16T22:15:18.000Z | generated-libraries/python/netapp/ntdtest/ntdtest_get_iter_key_td.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | null | null | null | generated-libraries/python/netapp/ntdtest/ntdtest_get_iter_key_td.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | null | null | null | from netapp.netapp_object import NetAppObject
class NtdtestGetIterKeyTd(NetAppObject):
"""
Key typedef for table ntdtest
"""
_key_0 = None
@property
def key_0(self):
"""
Field group
"""
return self._key_0
@key_0.setter
def key_0(self, val):
i... | 21.314286 | 87 | 0.536193 |
1c92be83eaadbc03a9d34c152a5679ffff17e3c7 | 1,140 | py | Python | exercises/0780-ReachingPoints/reaching_points_test.py | tqa236/leetcode-solutions | 556147981c43509a6e8a7f59f138d1ab027ebfd1 | [
"MIT"
] | 1 | 2020-09-26T15:09:25.000Z | 2020-09-26T15:09:25.000Z | exercises/0780-ReachingPoints/reaching_points_test.py | tqa236/leetcode-solutions | 556147981c43509a6e8a7f59f138d1ab027ebfd1 | [
"MIT"
] | null | null | null | exercises/0780-ReachingPoints/reaching_points_test.py | tqa236/leetcode-solutions | 556147981c43509a6e8a7f59f138d1ab027ebfd1 | [
"MIT"
] | null | null | null | import unittest
import hypothesis.strategies as st
from hypothesis import given
from reaching_points import Solution
class Test(unittest.TestCase):
def test_1(self):
solution = Solution()
self.assertEqual(solution.reachingPoints(1, 1, 3, 5), True)
def test_2(self):
solution = Solution... | 29.230769 | 85 | 0.636842 |
92dc1d67ee82c4dfcd1c585c9e3788f2ed9aa0cf | 2,216 | py | Python | benchmark/startPyquil1179.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil1179.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil1179.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=5
# total number=51
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(0) # number=3
pr... | 25.181818 | 64 | 0.544675 |
d1c7845cd68849fc528d3d6b1d983d996daa50d0 | 819 | py | Python | learn/django/tutorial01/first_site/first_site/urls.py | zhmz90/Daily | 25e13f6334c58d3a075b3fc502ecb34832392be7 | [
"MIT"
] | null | null | null | learn/django/tutorial01/first_site/first_site/urls.py | zhmz90/Daily | 25e13f6334c58d3a075b3fc502ecb34832392be7 | [
"MIT"
] | 25 | 2016-01-03T14:23:44.000Z | 2016-03-05T07:34:40.000Z | learn/django/tutorial01/first_site/first_site/urls.py | zhmz90/Daily | 25e13f6334c58d3a075b3fc502ecb34832392be7 | [
"MIT"
] | null | null | null | """first_site URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class... | 35.608696 | 79 | 0.699634 |
9e946d668fbac592a07601f97d6fb5a207ec5d83 | 236 | py | Python | src/pycamara/django_camara/management/commands/import_legislatures.py | msfernandes/pycamara | 01648ba95aa5ce780dd1aed32b4347684204e327 | [
"MIT"
] | null | null | null | src/pycamara/django_camara/management/commands/import_legislatures.py | msfernandes/pycamara | 01648ba95aa5ce780dd1aed32b4347684204e327 | [
"MIT"
] | 1 | 2017-07-24T19:35:48.000Z | 2017-07-25T20:21:13.000Z | src/pycamara/django_camara/management/commands/import_legislatures.py | msfernandes/pycamara | 01648ba95aa5ce780dd1aed32b4347684204e327 | [
"MIT"
] | null | null | null | from django.core.management.base import BaseCommand
from pycamara.django_camara.importers import legislatures
class Command(BaseCommand):
def handle(self, *args, **options):
legislatures.LegislatureImporter().save_data()
| 26.222222 | 57 | 0.779661 |
52a886b58bdc36a565dcc126a4bebd02475f0a3d | 7,265 | py | Python | util/pyclient/test_client.py | big-data-lab-umbc/concord-bft | 7061695406885604471a8a7bd5944e8d16d7280f | [
"Apache-2.0"
] | null | null | null | util/pyclient/test_client.py | big-data-lab-umbc/concord-bft | 7061695406885604471a8a7bd5944e8d16d7280f | [
"Apache-2.0"
] | null | null | null | util/pyclient/test_client.py | big-data-lab-umbc/concord-bft | 7061695406885604471a8a7bd5944e8d16d7280f | [
"Apache-2.0"
] | null | null | null | # Concord
#
# Copyright (c) 2019 VMware, Inc. All Rights Reserved.
#
# This product is licensed to you under the Apache 2.0 license (the "License").
# You may not use this product except in compliance with the Apache 2.0 License.
#
# This product may include a number of subcomponents with separate copyright
# notices a... | 35.965347 | 99 | 0.626428 |
881a3235e1cfc4f6d5a5bd15fa74442aa2d8ee8e | 2,307 | py | Python | messaging_script.py | fletchapin/camping-bot | 967cbacdba198b293720994d4a70ee085b296a73 | [
"MIT"
] | null | null | null | messaging_script.py | fletchapin/camping-bot | 967cbacdba198b293720994d4a70ee085b296a73 | [
"MIT"
] | null | null | null | messaging_script.py | fletchapin/camping-bot | 967cbacdba198b293720994d4a70ee085b296a73 | [
"MIT"
] | null | null | null | import time
import smtplib
import argparse
from email.message import EmailMessage
import camping_scraper as cs
def msg_alert(
subject,
body,
to=None,
email_addr=None,
app_pwd=None,
):
"""Send text message alerts to phone.
Check README for configuration instructions.
Parameters
---... | 28.481481 | 99 | 0.622453 |
7490430ec98adb51cfe07d13f6ff83665c9c4ff4 | 511 | py | Python | tests/client/test_helpers.py | geffy/ebonite | 2d85eeca44ac1799e743bafe333887712e325060 | [
"Apache-2.0"
] | 1 | 2019-11-27T14:33:45.000Z | 2019-11-27T14:33:45.000Z | tests/client/test_helpers.py | geffy/ebonite | 2d85eeca44ac1799e743bafe333887712e325060 | [
"Apache-2.0"
] | null | null | null | tests/client/test_helpers.py | geffy/ebonite | 2d85eeca44ac1799e743bafe333887712e325060 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from ebonite.client.helpers import create_model
from ebonite.ext.sklearn import SklearnModelWrapper
def test_create_model(sklearn_model_obj, pandas_data):
model = create_model(sklearn_model_obj, pandas_data)
assert model is not None
assert isinstance(model.wrapper, SklearnModelWrapper)... | 34.066667 | 78 | 0.786693 |
e93a910728d33f89c7bee2f991a37e99013a46f4 | 9,837 | py | Python | depthai_helpers/config_manager.py | wirthual/depthai | 9b3e987796b70fce3d4112f295cf64661d7986a0 | [
"MIT"
] | null | null | null | depthai_helpers/config_manager.py | wirthual/depthai | 9b3e987796b70fce3d4112f295cf64661d7986a0 | [
"MIT"
] | null | null | null | depthai_helpers/config_manager.py | wirthual/depthai | 9b3e987796b70fce3d4112f295cf64661d7986a0 | [
"MIT"
] | null | null | null | import os
import platform
import subprocess
from pathlib import Path
import cv2
import depthai as dai
import numpy as np
from depthai_helpers.cli_utils import cliPrint, PrintColors
from depthai_sdk.previews import Previews
DEPTHAI_ZOO = Path(__file__).parent.parent / Path(f"resources/nn/")
DEPTHAI_VIDEOS = Path(__fi... | 35.90146 | 153 | 0.605063 |
699043b73562bfe2fc09b8729625b24696260628 | 7,215 | py | Python | beatbrain/models_old/cvae_keras.py | tasercake/BeatBrain | 2d84e1021c509f6564223858c051394c6c8504bb | [
"MIT"
] | 5 | 2019-09-10T22:34:34.000Z | 2019-11-19T07:07:03.000Z | beatbrain/models_old/cvae_keras.py | tasercake/BeatBrain | 2d84e1021c509f6564223858c051394c6c8504bb | [
"MIT"
] | 35 | 2019-11-12T03:18:43.000Z | 2019-12-16T14:03:24.000Z | beatbrain/models_old/cvae_keras.py | tasercake/Beatbrain | 2d84e1021c509f6564223858c051394c6c8504bb | [
"MIT"
] | 3 | 2019-09-04T10:07:57.000Z | 2019-11-17T10:14:28.000Z | import os
import time
import numpy as np
import tensorflow as tf
from operator import mul
from functools import reduce
from pathlib import Path
from datetime import datetime
from tqdm import tqdm
from PIL import Image
from beatbrain.generator import data_utils
from beatbrain import default_config
tf.compat.v1.enable_... | 34.6875 | 111 | 0.685793 |
60448573d04556a655c31902f3df64a63b4700ab | 692 | py | Python | uwsgi_sloth/tests/test_structures.py | 365moods/uwsgi | 8097c08b1090aa08a0a241cb8772a803486e0759 | [
"Apache-2.0"
] | 127 | 2015-01-02T11:57:22.000Z | 2022-03-03T02:23:54.000Z | uwsgi_sloth/tests/test_structures.py | 365moods/uwsgi | 8097c08b1090aa08a0a241cb8772a803486e0759 | [
"Apache-2.0"
] | 8 | 2015-06-15T12:10:13.000Z | 2019-07-21T23:01:18.000Z | uwsgi_sloth/tests/test_structures.py | 365moods/uwsgi | 8097c08b1090aa08a0a241cb8772a803486e0759 | [
"Apache-2.0"
] | 20 | 2015-01-06T03:27:25.000Z | 2020-09-04T03:53:46.000Z | # -*- coding: utf-8 -*-
from uwsgi_sloth.structures import ValuesAggregation
def test_ValuesAggregation():
agr = ValuesAggregation()
agr.add_values(range(1, 101))
assert agr.get_result() == {'max': 100, 'avg': 50.5, 'min': 1}
assert agr.avg == 50.5
# Test merge with
agr1 = ValuesAggregation(va... | 32.952381 | 84 | 0.608382 |
32965b39fcb4b17b66cabd633652335a19b431f6 | 30,226 | py | Python | dumpflash/dumpjffs2.py | dmikushin/nandflasher | f5d99449c488d6a37955d84e40b1226ae90e3ac1 | [
"Unlicense"
] | null | null | null | dumpflash/dumpjffs2.py | dmikushin/nandflasher | f5d99449c488d6a37955d84e40b1226ae90e3ac1 | [
"Unlicense"
] | null | null | null | dumpflash/dumpjffs2.py | dmikushin/nandflasher | f5d99449c488d6a37955d84e40b1226ae90e3ac1 | [
"Unlicense"
] | null | null | null | # pylint: disable=invalid-name
# pylint: disable=line-too-long
import struct
import pprint
import os
import zlib
import shutil
from . import crc32
def main():
JFFS2_COMPR_NONE = 0x00
JFFS2_COMPR_ZERO = 0x01
JFFS2_COMPR_RTIME = 0x02
JFFS2_COMPR_RUBINMIPS = 0x03
JFFS2_COMPR_COPY = 0x04... | 42.873759 | 245 | 0.464071 |
d0332e9ed9f67052f52254b7869af388df1c5dfa | 372 | py | Python | orchestration/models/integration_type.py | dave-read/vdc | 0a331c0d4cde2a87df11e9ff4304a539f0a56692 | [
"MIT"
] | 1 | 2019-06-12T23:48:30.000Z | 2019-06-12T23:48:30.000Z | orchestration/models/integration_type.py | dave-read/vdc | 0a331c0d4cde2a87df11e9ff4304a539f0a56692 | [
"MIT"
] | 1 | 2019-04-17T00:11:59.000Z | 2019-04-17T00:11:59.000Z | orchestration/models/integration_type.py | dave-read/vdc | 0a331c0d4cde2a87df11e9ff4304a539f0a56692 | [
"MIT"
] | 2 | 2019-04-16T16:09:44.000Z | 2019-05-31T19:54:12.000Z | from enum import Enum
class IntegrationType(Enum):
BILLING_CLIENT_SDK=1
MANAGEMENT_GROUP_CLIENT_SDK=2
MANAGEMENT_LOCK_CLIENT_SDK=3
POLICY_CLIENT_SDK=4
RESOURCE_MANAGEMENT_CLIENT_SDK=5
SUBSCRIPTION_CLIENT_SDK=6
AAD_CLIENT_CLI=7
KEYVAULT_CLIENT_CLI=8
RBAC_CLIENT_CLI=9
RESOURCE_MAN... | 26.571429 | 37 | 0.798387 |
ce29b5e528b41c3d63927feb10d0d426bb2b5600 | 8,071 | py | Python | dss/video.py | terabit-software/dynamic-stream-server | 55988f8af7b49b28f446c61aeae8ecae40c7ade2 | [
"BSD-3-Clause"
] | 9 | 2015-08-06T20:36:21.000Z | 2021-09-08T19:49:46.000Z | dss/video.py | terabit-software/dynamic-stream-server | 55988f8af7b49b28f446c61aeae8ecae40c7ade2 | [
"BSD-3-Clause"
] | null | null | null | dss/video.py | terabit-software/dynamic-stream-server | 55988f8af7b49b28f446c61aeae8ecae40c7ade2 | [
"BSD-3-Clause"
] | 4 | 2015-08-21T22:00:11.000Z | 2019-10-26T15:31:15.000Z | from __future__ import division
import time
import warnings
try:
# Python 3
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen
from .config import config
from .providers import Providers
from .tools import process, thread, noxml
from .tools.show import Show
from .stats impo... | 28.72242 | 98 | 0.548755 |
0727a525625498b9ae4721d04aff0d2cf52d1505 | 9,104 | py | Python | serial/serialcli.py | jabdoa2/pyserial | 92d101613be41ecb2f2054c3f43a006fbe6f9966 | [
"BSD-3-Clause"
] | 1,118 | 2015-01-02T04:31:39.000Z | 2022-03-23T18:46:48.000Z | Thonny/Lib/site-packages/serial/serialcli.py | Pydiderot/pydiderotIDE | a42fcde3ea837ae40c957469f5d87427e8ce46d3 | [
"MIT"
] | 330 | 2015-01-03T04:38:18.000Z | 2022-02-14T12:47:51.000Z | Thonny/Lib/site-packages/serial/serialcli.py | Pydiderot/pydiderotIDE | a42fcde3ea837ae40c957469f5d87427e8ce46d3 | [
"MIT"
] | 296 | 2015-05-13T15:03:32.000Z | 2022-03-22T20:51:25.000Z | #! python
#
# Backend for .NET/Mono (IronPython), .NET >= 2
#
# This file is part of pySerial. https://github.com/pyserial/pyserial
# (C) 2008-2015 Chris Liechti <cliechti@gmx.net>
#
# SPDX-License-Identifier: BSD-3-Clause
import System
import System.IO.Ports
from serial.serialutil import *
# must invoke function ... | 36.126984 | 113 | 0.614455 |
45841e82593effcfc8fffbae5192ae95e20c3ae4 | 3,743 | py | Python | custom_components/wyzeapi/binary_sensor.py | morozsm/ha-wyzeapi | 9973c2bf81405bef097653542dfebf1cc2974de2 | [
"Apache-2.0"
] | null | null | null | custom_components/wyzeapi/binary_sensor.py | morozsm/ha-wyzeapi | 9973c2bf81405bef097653542dfebf1cc2974de2 | [
"Apache-2.0"
] | null | null | null | custom_components/wyzeapi/binary_sensor.py | morozsm/ha-wyzeapi | 9973c2bf81405bef097653542dfebf1cc2974de2 | [
"Apache-2.0"
] | null | null | null | import logging
import time
from datetime import timedelta
from typing import List
from homeassistant.const import ATTR_ATTRIBUTION
from wyzeapy.base_client import DeviceTypes, Device, AccessTokenError, PropertyIDs
from wyzeapy.client import Client
from homeassistant.components.binary_sensor import (
BinarySensorEn... | 29.472441 | 117 | 0.638792 |
71d7ae9081343c0ce11418130c73838282a12812 | 753 | py | Python | test/feature_extraction/character_length_test.py | tmhatton/MLinPractice | 759706e13181cec864d6aa8ece9ae7042f083e4c | [
"MIT"
] | null | null | null | test/feature_extraction/character_length_test.py | tmhatton/MLinPractice | 759706e13181cec864d6aa8ece9ae7042f083e4c | [
"MIT"
] | 1 | 2021-10-19T08:09:44.000Z | 2021-10-19T08:09:44.000Z | test/feature_extraction/character_length_test.py | tmhatton/MLinPractice | 759706e13181cec864d6aa8ece9ae7042f083e4c | [
"MIT"
] | null | null | null | import unittest
import pandas as pd
from code.util import COLUMN_TWEET
from code.feature_extraction.character_length import CharacterLength
class MyTestCase(unittest.TestCase):
def setUp(self) -> None:
self.INPUT_COLUM = COLUMN_TWEET
self.extractor = CharacterLength(self.INPUT_COLUM)
def t... | 26.892857 | 68 | 0.703851 |
f7c5a0f69494c901201d1d8cda9e65d10ffe2215 | 342 | py | Python | ycash_cli.py | nultinator/python_ycash | d0cd4753e2e00dc734896e82aeb31ca02c5cb543 | [
"Unlicense"
] | null | null | null | ycash_cli.py | nultinator/python_ycash | d0cd4753e2e00dc734896e82aeb31ca02c5cb543 | [
"Unlicense"
] | null | null | null | ycash_cli.py | nultinator/python_ycash | d0cd4753e2e00dc734896e82aeb31ca02c5cb543 | [
"Unlicense"
] | null | null | null | from bitcoinrpc.authproxy import AuthServiceProxy
user = input("user: ")
password = input("password: ")
port = input("port: ")
access = AuthServiceProxy("http://" + user + ":" + password + "@127.0.0.1:" + port)
getblockchaininfo = access.getblockchaininfo()
getnewaddress = access.getnewaddress()
getbestblockhash = acce... | 38 | 83 | 0.730994 |
5cf20d57761f03df8fc82b22670e7c3211b380b8 | 652 | py | Python | model/config.py | mateusap1/athenas | f48df6e05452be39c87479279be7eb378291c404 | [
"MIT"
] | null | null | null | model/config.py | mateusap1/athenas | f48df6e05452be39c87479279be7eb378291c404 | [
"MIT"
] | null | null | null | model/config.py | mateusap1/athenas | f48df6e05452be39c87479279be7eb378291c404 | [
"MIT"
] | null | null | null | path_files = {
"node_path": "/home/mateusap1/Documents/athena_core/node",
"account_path": "/home/mateusap1/Documents/athena_core/account"
}
id_config = {
"username_char_limit": 64,
"nonce_limit": 10**6,
"date_format": "%Y-%m-%d %H:%M:%S.%f",
"hash_difficulty": 2
}
contract_config = {
"mini... | 21.733333 | 67 | 0.656442 |
5a7f5fef9b23e069982151a367ca2c9ca5402fb2 | 3,619 | py | Python | viewer/settings.py | ThinkDone/viewer | 24afd5b7d246ca779f1a4a49ce5a0ef2021e85d2 | [
"Apache-2.0"
] | null | null | null | viewer/settings.py | ThinkDone/viewer | 24afd5b7d246ca779f1a4a49ce5a0ef2021e85d2 | [
"Apache-2.0"
] | null | null | null | viewer/settings.py | ThinkDone/viewer | 24afd5b7d246ca779f1a4a49ce5a0ef2021e85d2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Scrapy settings for viewer project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
# http://scrapy.readthedocs.org/en/latest/... | 34.141509 | 152 | 0.770655 |
0ed0ce6532629e75d27261e5eb3a6c278a37a737 | 3,559 | py | Python | model-optimizer/mo/utils/import_extensions.py | zhoub/dldt | e42c01cf6e1d3aefa55e2c5df91f1054daddc575 | [
"Apache-2.0"
] | 1 | 2021-02-20T21:48:36.000Z | 2021-02-20T21:48:36.000Z | model-optimizer/mo/utils/import_extensions.py | zhoub/dldt | e42c01cf6e1d3aefa55e2c5df91f1054daddc575 | [
"Apache-2.0"
] | null | null | null | model-optimizer/mo/utils/import_extensions.py | zhoub/dldt | e42c01cf6e1d3aefa55e2c5df91f1054daddc575 | [
"Apache-2.0"
] | 1 | 2021-02-19T01:06:12.000Z | 2021-02-19T01:06:12.000Z | """
Copyright (c) 2018-2019 Intel Corporation
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... | 34.553398 | 115 | 0.671818 |
82e26ba01763c708ef98f3b5588267759807ac19 | 22,886 | py | Python | src/ip-group/azext_ip_group/vendored_sdks/v2019_09_01/operations/_load_balancers_operations.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/ip-group/azext_ip_group/vendored_sdks/v2019_09_01/operations/_load_balancers_operations.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/ip-group/azext_ip_group/vendored_sdks/v2019_09_01/operations/_load_balancers_operations.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.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 ... | 46.327935 | 170 | 0.666914 |
090a1b1a7063321309c06ecbcf28a1f3b1fa5183 | 6,442 | py | Python | tests/unit/test_anonymize_files.py | colgate-cs-research/netconan | 310a9afcb0a3e6fdec39a3bd62cccdcb2069de49 | [
"Apache-2.0"
] | 1 | 2021-11-13T10:43:32.000Z | 2021-11-13T10:43:32.000Z | tests/unit/test_anonymize_files.py | colgate-cs-research/netconan | 310a9afcb0a3e6fdec39a3bd62cccdcb2069de49 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_anonymize_files.py | colgate-cs-research/netconan | 310a9afcb0a3e6fdec39a3bd62cccdcb2069de49 | [
"Apache-2.0"
] | null | null | null | """Test file anonymization."""
# Copyright 2018 Intentionet
#
# 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 ... | 35.01087 | 87 | 0.698386 |
53efb15e8f5384652a362dc6aab507dd0dafd0d3 | 3,111 | py | Python | tumn/utils/database.py | hatsu-koi/tumn-server | d425a1d3d59ca016e0424487ffa8fddb16b79e1c | [
"MIT"
] | null | null | null | tumn/utils/database.py | hatsu-koi/tumn-server | d425a1d3d59ca016e0424487ffa8fddb16b79e1c | [
"MIT"
] | null | null | null | tumn/utils/database.py | hatsu-koi/tumn-server | d425a1d3d59ca016e0424487ffa8fddb16b79e1c | [
"MIT"
] | null | null | null | class Database:
""" A dictionary that allows multiple keys for one value """
def __init__(self):
self.keys = {}
self.values = {}
def __getitem__(self, item): # <---SQL SELECT statement
values = self.keys[item]
if len(values) > 1:
return sorted(list(values))
... | 42.040541 | 86 | 0.535198 |
6a56095a85938df327f205cc35e6fc97d4b5c424 | 9,790 | py | Python | data/user_params.py | JulianoGianlupi/iu399sp19p017 | 89594c3a5ad5d84301772802a14d8905fad15cdc | [
"BSD-3-Clause"
] | null | null | null | data/user_params.py | JulianoGianlupi/iu399sp19p017 | 89594c3a5ad5d84301772802a14d8905fad15cdc | [
"BSD-3-Clause"
] | null | null | null | data/user_params.py | JulianoGianlupi/iu399sp19p017 | 89594c3a5ad5d84301772802a14d8905fad15cdc | [
"BSD-3-Clause"
] | null | null | null |
# This file is auto-generated from a Python script that parses a PhysiCell configuration (.xml) file.
#
# Edit at your own risk.
#
import os
from ipywidgets import Label,Text,Checkbox,Button,HBox,VBox,FloatText,IntText,BoundedIntText,BoundedFloatText,Layout,Box
class UserTab(object):
def __init__(self):
... | 46.842105 | 123 | 0.681001 |
36500818cca8fdf195f0801af57962e54e36489e | 4,281 | py | Python | reagent/samplers/frechet.py | JiayingClaireWu/ReAgent | 3f2365c5bab396b3e965f77cd8d4f0ac15ae2f7b | [
"BSD-3-Clause"
] | null | null | null | reagent/samplers/frechet.py | JiayingClaireWu/ReAgent | 3f2365c5bab396b3e965f77cd8d4f0ac15ae2f7b | [
"BSD-3-Clause"
] | null | null | null | reagent/samplers/frechet.py | JiayingClaireWu/ReAgent | 3f2365c5bab396b3e965f77cd8d4f0ac15ae2f7b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
from typing import Optional
import reagent.types as rlt
import torch
from reagent.core.configuration import resolve_defaults
from reagent.gym.types import Sampler
from torch.distributions import Gumbel
class FrechetSort(Sa... | 45.063158 | 94 | 0.662228 |
3e6415337fbd44a89c93eb73f8a20055bf50f994 | 344 | py | Python | metatransform/datawrapper.py | analyticsdept/py-metatransform | fa28cb25e85275563eef6a54ab409e46289fbaab | [
"MIT"
] | null | null | null | metatransform/datawrapper.py | analyticsdept/py-metatransform | fa28cb25e85275563eef6a54ab409e46289fbaab | [
"MIT"
] | null | null | null | metatransform/datawrapper.py | analyticsdept/py-metatransform | fa28cb25e85275563eef6a54ab409e46289fbaab | [
"MIT"
] | null | null | null | class MetaTransformDataWrapper():
def __init__(self, data=None, target=None):
self.data = data
self.target = target
self._dict = {
'data': self.data,
'target': self.target
}
def __repr__(self) -> dict:
return self.to_dict
def to_dict(self):
... | 24.571429 | 47 | 0.55814 |
6b2151d2de62f96a90e178c3fe27a05d9af628f6 | 7,888 | py | Python | src/scenic/simulators/carla/controller.py | shalinmehtalgsvl/Scenic | 7b90d0181e99870c8cade9004b8280ff6b03c49a | [
"BSD-3-Clause"
] | null | null | null | src/scenic/simulators/carla/controller.py | shalinmehtalgsvl/Scenic | 7b90d0181e99870c8cade9004b8280ff6b03c49a | [
"BSD-3-Clause"
] | null | null | null | src/scenic/simulators/carla/controller.py | shalinmehtalgsvl/Scenic | 7b90d0181e99870c8cade9004b8280ff6b03c49a | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) # Copyright (c) 2018-2020 CVC.
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
""" This module contains PID controllers to perform lateral and longitudinal control. """
from collections import deque
import math
import numpy as np
i... | 35.214286 | 127 | 0.612576 |
f9bc39a5bee669c860a21fc2dd49a59b022c5826 | 23,479 | py | Python | ai4good/webapp/cm_model_report_utils.py | macapakaz/model-server | db2451da7dfbe33f3e9cf481122b11551589b7c0 | [
"MIT"
] | null | null | null | ai4good/webapp/cm_model_report_utils.py | macapakaz/model-server | db2451da7dfbe33f3e9cf481122b11551589b7c0 | [
"MIT"
] | null | null | null | ai4good/webapp/cm_model_report_utils.py | macapakaz/model-server | db2451da7dfbe33f3e9cf481122b11551589b7c0 | [
"MIT"
] | null | null | null | import time
import numpy as np
import pandas as pd
from ai4good.models.cm.simulator import AGE_SEP
DIGIT_SEP = ' to ' # em dash to separate from minus sign
def timing(f):
def wrap(*args):
time1 = time.time()
ret = f(*args)
time2 = time.time()
print('%s function took %0.1f s' % (f... | 52.059867 | 176 | 0.636824 |
38d30593c68c7fab10ef5b262d796a2da2cfcd4c | 14,401 | py | Python | session-4/libs/dataset_utils.py | itamaro/CADL | b5de17485962577fc51156cd12da1b16d66dbb26 | [
"Apache-2.0"
] | 1,628 | 2016-07-19T22:21:56.000Z | 2022-02-27T15:19:45.000Z | session-4/libs/dataset_utils.py | itamaro/CADL | b5de17485962577fc51156cd12da1b16d66dbb26 | [
"Apache-2.0"
] | 75 | 2016-07-22T02:05:05.000Z | 2019-05-20T21:00:34.000Z | session-4/libs/dataset_utils.py | itamaro/CADL | b5de17485962577fc51156cd12da1b16d66dbb26 | [
"Apache-2.0"
] | 955 | 2016-07-22T00:10:52.000Z | 2022-02-24T15:06:09.000Z | """Utils for dataset creation.
Creative Applications of Deep Learning w/ Tensorflow.
Kadenze, Inc.
Copyright Parag K. Mital, June 2016.
"""
import os
import pickle
import numpy as np
import tensorflow as tf
from . import dft
from .utils import download_and_extract_tar
def create_input_pipeline(files, batch_size, n_... | 30.903433 | 79 | 0.586418 |
2db8e065217e8b802b1ec79fb86c015062335f3e | 3,742 | py | Python | src/reviews/utils.py | Talengi/phase | 60ff6f37778971ae356c5b2b20e0d174a8288bfe | [
"MIT"
] | 8 | 2016-01-29T11:53:40.000Z | 2020-03-02T22:42:02.000Z | src/reviews/utils.py | Talengi/phase | 60ff6f37778971ae356c5b2b20e0d174a8288bfe | [
"MIT"
] | 289 | 2015-03-23T07:42:52.000Z | 2022-03-11T23:26:10.000Z | src/reviews/utils.py | Talengi/phase | 60ff6f37778971ae356c5b2b20e0d174a8288bfe | [
"MIT"
] | 7 | 2015-12-08T09:03:20.000Z | 2020-05-11T15:36:51.000Z | from itertools import groupby
from django.core.cache import cache
from django.contrib.contenttypes.models import ContentType
from reviews.models import Review, ReviewMixin
def get_cached_reviews(revision):
"""Get all reviews for the given revision.
This method is intended to be used when one want to fetch ... | 33.115044 | 89 | 0.649118 |
d14743a84a11d66435ff7c7f43426c4c5111c668 | 1,801 | py | Python | weblog/urls.py | mmohajer9/Resumo | 625c279e71e98f0d461679d75c6c464f6afcf437 | [
"MIT"
] | 1 | 2019-07-28T10:09:26.000Z | 2019-07-28T10:09:26.000Z | weblog/urls.py | mmohajer9/Resumo | 625c279e71e98f0d461679d75c6c464f6afcf437 | [
"MIT"
] | 8 | 2021-04-08T22:03:32.000Z | 2022-02-10T09:35:46.000Z | weblog/urls.py | mmohajer9/resumo | 625c279e71e98f0d461679d75c6c464f6afcf437 | [
"MIT"
] | null | null | null | from django.urls import path , include
from . import views
app_name = 'weblog'
urlpatterns = [
path('' , views.home , name = 'home'),
path('register/' , views.register_form_view , name = 'register'),
path('register/additional/<str:username>/' , views.additional_info_form_view , name = 'additional_info'),
... | 64.321429 | 156 | 0.679622 |
7228dd445c0440e0a7a4f9fc414fc3002175d6c6 | 18,271 | py | Python | site/app/metroui.py | hehaoslj/globalhealth | 6df3ae643392c93eb2c380c25339c15e9a3e804c | [
"MIT"
] | null | null | null | site/app/metroui.py | hehaoslj/globalhealth | 6df3ae643392c93eb2c380c25339c15e9a3e804c | [
"MIT"
] | null | null | null | site/app/metroui.py | hehaoslj/globalhealth | 6df3ae643392c93eb2c380c25339c15e9a3e804c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-*- coding: utf-8 -*-
import random
color_templ="""black white lime green emerald teal blue cyan cobalt indigo violet pink magenta crimson red orange amber yellow brown olive steel mauve taupe gray dark darker darkBrown darkCrimson darkMagenta darkIndigo darkCyan darkCobalt darkTeal darkEm... | 35.47767 | 448 | 0.516283 |
f44c960b1c38d32187f7e51a2041748216a95b94 | 1,370 | py | Python | _unittests/ut_onnx_conv/test_rt_valid_model_lightgbm.py | xadupre/mlprodict | f82c8a26a60104948c67849b1c4af95ca812c153 | [
"MIT"
] | 1 | 2020-12-18T03:49:53.000Z | 2020-12-18T03:49:53.000Z | _unittests/ut_onnx_conv/test_rt_valid_model_lightgbm.py | xadupre/mlprodict | f82c8a26a60104948c67849b1c4af95ca812c153 | [
"MIT"
] | null | null | null | _unittests/ut_onnx_conv/test_rt_valid_model_lightgbm.py | xadupre/mlprodict | f82c8a26a60104948c67849b1c4af95ca812c153 | [
"MIT"
] | null | null | null | """
@brief test log(time=9s)
"""
import unittest
from logging import getLogger
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import ExtTestCase, skipif_circleci
from sklearn.exceptions import ConvergenceWarning
try:
from sklearn.utils._testing import ignore_warnings
except ImportError:
... | 31.860465 | 80 | 0.706569 |
a374b7206d02f2d0845b999a66b499151fa619f3 | 385 | py | Python | stubs/micropython-v1_11-esp32/ussl.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | stubs/micropython-v1_11-esp32/ussl.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | stubs/micropython-v1_11-esp32/ussl.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | """
Module: 'ussl' on micropython-v1.11-esp32
"""
# MCU: {'ver': 'v1.11', 'build': '', 'platform': 'esp32', 'port': 'esp32', 'machine': 'ESP32 module with ESP32', 'release': '1.11.0', 'nodename': 'esp32', 'name': 'micropython', 'family': 'micropython', 'sysname': 'esp32', 'version': '1.11.0'}
# Stubber: 1.5.4
from typi... | 35 | 243 | 0.6 |
50254deb8a36e240167f07b2c131880e856a6d52 | 40 | py | Python | start/Working with numbers/add/num2.py | codermoji-contrib/python | 764bffaf0e92270be196aa5728f255aaaf5b8150 | [
"MIT"
] | null | null | null | start/Working with numbers/add/num2.py | codermoji-contrib/python | 764bffaf0e92270be196aa5728f255aaaf5b8150 | [
"MIT"
] | null | null | null | start/Working with numbers/add/num2.py | codermoji-contrib/python | 764bffaf0e92270be196aa5728f255aaaf5b8150 | [
"MIT"
] | null | null | null | print(12345 + 98765)
print(12345 * 99)
| 10 | 20 | 0.675 |
4a725d86d40821b305677375c76f76c6f7bcf114 | 325 | py | Python | build/lib/pyggi/utils/helpers.py | s-marta/pyggi-bloa | aefe15eda32e713dc8402c9b8d4bcb7cb05b31c8 | [
"MIT"
] | 26 | 2018-01-30T13:07:51.000Z | 2021-08-01T13:41:48.000Z | build/lib/pyggi/utils/helpers.py | s-marta/pyggi-bloa | aefe15eda32e713dc8402c9b8d4bcb7cb05b31c8 | [
"MIT"
] | 9 | 2018-01-10T02:22:10.000Z | 2021-12-08T06:28:19.000Z | build/lib/pyggi/utils/helpers.py | s-marta/pyggi-bloa | aefe15eda32e713dc8402c9b8d4bcb7cb05b31c8 | [
"MIT"
] | 9 | 2019-02-11T19:00:52.000Z | 2021-12-30T07:48:52.000Z | import os
weighted_choice = lambda s : random.choice(sum(([v] * wt for v,wt in s),[]))
def get_file_extension(file_path):
"""
:param file_path: The path of file
:type file_path: str
:return: file extension
:rtype: str
"""
_, file_extension = os.path.splitext(file_path)
return file_exte... | 25 | 76 | 0.661538 |
d927eaefc5004586674b02e4c433d6bf0b7a695f | 1,235 | py | Python | playlist/inventories/json_inventory.py | hugoprudente/playlist-manager | 51ae833e717c8a814c6b86726c8b099ba2afce6a | [
"Apache-2.0"
] | 1 | 2020-12-28T15:50:41.000Z | 2020-12-28T15:50:41.000Z | playlist/inventories/json_inventory.py | hugoprudente/playlist-manager | 51ae833e717c8a814c6b86726c8b099ba2afce6a | [
"Apache-2.0"
] | 1 | 2021-06-13T15:02:51.000Z | 2021-06-13T15:02:51.000Z | playlist/inventories/json_inventory.py | hugoprudente/playlist-manager | 51ae833e717c8a814c6b86726c8b099ba2afce6a | [
"Apache-2.0"
] | null | null | null | import io
import json
import sys
from pathlib import Path
import jmespath
class JSONInventory:
def write_file(
self,
file_path,
data,
extra_data=None,
fields=None,
format=None,
merge=True,
):
# raw data
local_data = data
file_pa... | 26.847826 | 70 | 0.551417 |
60ed140be06ba7dd780f2d62692ba60ea17b68f7 | 3,304 | py | Python | eval.py | mehdidc/keras-yolo3 | 459b08438b13b6aacd1464960b1ad7d816a601d6 | [
"MIT"
] | null | null | null | eval.py | mehdidc/keras-yolo3 | 459b08438b13b6aacd1464960b1ad7d816a601d6 | [
"MIT"
] | null | null | null | eval.py | mehdidc/keras-yolo3 | 459b08438b13b6aacd1464960b1ad7d816a601d6 | [
"MIT"
] | null | null | null | from PIL import Image
import numpy as np
from collections import defaultdict
from skimage.transform import resize
from skimage.io import imread
from yolo3.yolo import YOLO
from clize import run
from joblib import dump
eps = 1e-12
iou_threshold = 0.45
def evaluate(data, model_path, anchors_path, classes_path):
yol... | 27.533333 | 93 | 0.517857 |
cb3c2781d56de0cd4998f91aa98ff7dd70fd8283 | 916 | py | Python | apps/home/quickstart.py | Fayzan-Bhatti/MY_Product | e7a2f3b64b3f3fb421f95bb779fa8e480c3c23a8 | [
"MIT"
] | null | null | null | apps/home/quickstart.py | Fayzan-Bhatti/MY_Product | e7a2f3b64b3f3fb421f95bb779fa8e480c3c23a8 | [
"MIT"
] | null | null | null | apps/home/quickstart.py | Fayzan-Bhatti/MY_Product | e7a2f3b64b3f3fb421f95bb779fa8e480c3c23a8 | [
"MIT"
] | null | null | null | from google.analytics.data_v1beta import BetaAnalyticsDataClient
from google.analytics.data_v1beta.types import DateRange
from google.analytics.data_v1beta.types import Dimension
from google.analytics.data_v1beta.types import Metric
from google.analytics.data_v1beta.types import RunReportRequest
def sample_run_report... | 36.64 | 75 | 0.744541 |
b89e9d33f72c30fa423ca1e71dcb171264f899c3 | 227 | py | Python | src/0121.best-time-to-buy-and-sell-stock/best-time-to-buy-and-sell-stock.py | lyphui/Just-Code | e0c3c3ecb67cb805080ff686e88522b2bffe7741 | [
"MIT"
] | 782 | 2019-11-19T08:20:49.000Z | 2022-03-25T06:59:09.000Z | src/0121.best-time-to-buy-and-sell-stock/best-time-to-buy-and-sell-stock.py | Heitao5200/Just-Code | 5bb3ee485a103418e693b7ec8e26dc84f3691c79 | [
"MIT"
] | 1 | 2021-03-04T12:21:01.000Z | 2021-03-05T01:23:54.000Z | src/0121.best-time-to-buy-and-sell-stock/best-time-to-buy-and-sell-stock.py | Heitao5200/Just-Code | 5bb3ee485a103418e693b7ec8e26dc84f3691c79 | [
"MIT"
] | 155 | 2019-11-20T08:20:42.000Z | 2022-03-19T07:28:09.000Z | class Solution:
def maxProfit(self, prices: List[int]) -> int:
min_p, max_v = float('inf'), 0
for p in prices:
min_p = min(min_p, p)
max_v = max(max_v, p - min_p)
return max_v | 32.428571 | 50 | 0.528634 |
e4b82e231c5c28a3b546edaf8076ea55fc30483a | 220 | py | Python | core/commands/owner/__init__.py | salvatorecalo/nebula8 | b63c0a1a98ccc955320449eb260b62f70ab5ce0a | [
"Apache-2.0"
] | 1 | 2021-09-28T00:37:36.000Z | 2021-09-28T00:37:36.000Z | core/commands/owner/__init__.py | salvatorecalo/nebula8 | b63c0a1a98ccc955320449eb260b62f70ab5ce0a | [
"Apache-2.0"
] | null | null | null | core/commands/owner/__init__.py | salvatorecalo/nebula8 | b63c0a1a98ccc955320449eb260b62f70ab5ce0a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright SquirrelNetwork
"""Import Files"""
__all__ = ["add_community","exit","broadcast","server_info","superban","test","whitelist"]
from core.commands.owner import * | 24.444444 | 90 | 0.690909 |
13baf448bca8776a5cbed486295710b7747f537d | 7,613 | py | Python | shellsploit/disassembly/Syscalls/linux_64.py | riusksk/shellsploit-library | 9c0e1fec2d510cc1195194ce18f5b6f0aeface9f | [
"MIT"
] | 10 | 2016-10-09T10:21:43.000Z | 2020-04-20T05:28:50.000Z | shellsploit/disassembly/Syscalls/linux_64.py | riusksk/shellsploit-library | 9c0e1fec2d510cc1195194ce18f5b6f0aeface9f | [
"MIT"
] | null | null | null | shellsploit/disassembly/Syscalls/linux_64.py | riusksk/shellsploit-library | 9c0e1fec2d510cc1195194ce18f5b6f0aeface9f | [
"MIT"
] | 7 | 2017-03-22T18:21:34.000Z | 2019-12-02T20:22:47.000Z | #------------------Bombermans Team------------------------------------------#
# Author : B3mB4m
# Concat : b3mb4m@protonmail.com
# Project : https://github.com/b3mb4m/shellsploit-library
# LICENSE : https://github.com/b3mb4m/shellsploit-library/blob/master/LICENSE
#---------------------------------------------------... | 22.657738 | 78 | 0.506371 |
a390c5a40a9be6efc34936ffbee9adbf36ba21bf | 3,652 | py | Python | tests/annotation/general/test_line_path.py | saltastroops/imephu | 0c302a73d01fe3ad018e7adf4b91e0beaecc6709 | [
"MIT"
] | null | null | null | tests/annotation/general/test_line_path.py | saltastroops/imephu | 0c302a73d01fe3ad018e7adf4b91e0beaecc6709 | [
"MIT"
] | 3 | 2022-02-02T20:51:05.000Z | 2022-02-03T21:13:27.000Z | tests/annotation/general/test_line_path.py | saltastroops/imephu | 0c302a73d01fe3ad018e7adf4b91e0beaecc6709 | [
"MIT"
] | null | null | null | import pytest
from astropy import units as u
from astropy.coordinates import SkyCoord
from imephu.annotation.general import CircleAnnotation, LinePathAnnotation
from imephu.finder_chart import FinderChart
def test_line_path_annotation(fits_file, check_finder):
"""Test line path annotations."""
finder_chart =... | 34.780952 | 85 | 0.672508 |
30c7f000491fb9e814029756fff40525a3ff2fe5 | 1,261 | py | Python | hood_app/migrations/0002_auto_20180807_1654.py | ephantuskaranja/hood_watch | 3d91e90d1a9c8c7b73d5dcea17cb7bb83e5b71ea | [
"MIT"
] | null | null | null | hood_app/migrations/0002_auto_20180807_1654.py | ephantuskaranja/hood_watch | 3d91e90d1a9c8c7b73d5dcea17cb7bb83e5b71ea | [
"MIT"
] | null | null | null | hood_app/migrations/0002_auto_20180807_1654.py | ephantuskaranja/hood_watch | 3d91e90d1a9c8c7b73d5dcea17cb7bb83e5b71ea | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-08-07 13:54
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hood_app', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
... | 31.525 | 151 | 0.580492 |
0990598171fe0d2ddc13b1b9d7c83a6b984de51f | 3,675 | py | Python | scripts/AnEn_CNN/DATA03_supplemental_refine.py | yingkaisha/rainbow | cee707e8fe29a6606041f0e26b33720793fe129b | [
"MIT"
] | 6 | 2021-02-17T20:47:51.000Z | 2021-03-20T05:27:38.000Z | scripts/AnEn_CNN/DATA03_supplemental_refine.py | yingkaisha/rainbow | cee707e8fe29a6606041f0e26b33720793fe129b | [
"MIT"
] | null | null | null | scripts/AnEn_CNN/DATA03_supplemental_refine.py | yingkaisha/rainbow | cee707e8fe29a6606041f0e26b33720793fe129b | [
"MIT"
] | 1 | 2021-03-10T06:08:05.000Z | 2021-03-10T06:08:05.000Z | import sys
import time
import os.path
from glob import glob
from datetime import datetime, timedelta
# data tools
import h5py
import numpy as np
# custom tools
sys.path.insert(0, '/glade/u/home/ksha/WORKSPACE/utils/')
sys.path.insert(0, '/glade/u/home/ksha/WORKSPACE/Analog_BC/')
sys.path.insert(0, '/glade/u/home/ksha... | 31.410256 | 84 | 0.595918 |
e04a3410ed2a786cff0271a02e36df3e7e901b38 | 52,147 | py | Python | sympy/core/mul.py | smichr/sympy | eda86926d98ab6cb7ec73e3cb8ea78ac15bddea3 | [
"BSD-3-Clause"
] | 7 | 2015-01-14T06:55:33.000Z | 2018-08-11T14:43:52.000Z | sympy/core/mul.py | smichr/sympy | eda86926d98ab6cb7ec73e3cb8ea78ac15bddea3 | [
"BSD-3-Clause"
] | 1 | 2018-02-19T04:56:04.000Z | 2018-02-19T04:56:04.000Z | sympy/core/mul.py | smichr/sympy | eda86926d98ab6cb7ec73e3cb8ea78ac15bddea3 | [
"BSD-3-Clause"
] | 1 | 2016-04-24T14:39:22.000Z | 2016-04-24T14:39:22.000Z | from collections import defaultdict
import operator
from sympy.core.sympify import sympify
from sympy.core.basic import Basic, C
from sympy.core.singleton import S
from sympy.core.operations import AssocOp
from sympy.core.cache import cacheit
from sympy.core.logic import fuzzy_not
from sympy.core.compatibility import ... | 32.962705 | 99 | 0.469576 |
aece8ed4851cf834f72d71cc94df55873fe590f3 | 4,362 | py | Python | watersheds/ws_anisotropic_distance_transform.py | constantinpape/watersheds | 9fde72b2df5aa0e3531969361b3a6c37be77ba8a | [
"BSD-3-Clause"
] | null | null | null | watersheds/ws_anisotropic_distance_transform.py | constantinpape/watersheds | 9fde72b2df5aa0e3531969361b3a6c37be77ba8a | [
"BSD-3-Clause"
] | null | null | null | watersheds/ws_anisotropic_distance_transform.py | constantinpape/watersheds | 9fde72b2df5aa0e3531969361b3a6c37be77ba8a | [
"BSD-3-Clause"
] | null | null | null | import vigra
import numpy as np
from wsdt import group_seeds_by_distance, iterative_inplace_watershed
def signed_anisotropic_dt(
pmap,
threshold,
anisotropy,
preserve_membrane_pmaps
):
binary_membranes = (pmap >= threshold).astype('uint32')
distance_to_membrane = vigra... | 36.049587 | 113 | 0.672627 |
fd2a67a4ec743ae51df4379da0bbae628be51ef7 | 860 | py | Python | util.py | hchang18/non-parametric-methods | 4e1eb168d0b0604dd0e84e0033916fa22cda05c6 | [
"MIT"
] | 1 | 2021-07-07T22:49:43.000Z | 2021-07-07T22:49:43.000Z | util.py | hchang18/non-parametric-methods | 4e1eb168d0b0604dd0e84e0033916fa22cda05c6 | [
"MIT"
] | 12 | 2021-06-06T06:41:25.000Z | 2021-07-06T23:59:05.000Z | util.py | hchang18/nonparametric-methods | 4e1eb168d0b0604dd0e84e0033916fa22cda05c6 | [
"MIT"
] | null | null | null | # util.py
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import numpy as np
def read_data(filename):
file = open(filename)
file_content = file.readlines()
# clean up to make it into list
file_content = [row.rstrip('\n').lstrip(' ').replace(' ', ' ').split(' ')
... | 24.571429 | 78 | 0.612791 |
6ede55b4a8fefe9b97e10dfece9b5feeb76102a3 | 6,803 | py | Python | param_stamp.py | i-supermario/Cifar100_CL | 6c22151ea2c4c3014a569112fdf8a549331b27c4 | [
"MIT"
] | 164 | 2020-08-13T08:24:59.000Z | 2022-03-29T07:09:10.000Z | param_stamp.py | i-supermario/Cifar100_CL | 6c22151ea2c4c3014a569112fdf8a549331b27c4 | [
"MIT"
] | 11 | 2020-09-21T11:28:13.000Z | 2021-07-17T11:36:13.000Z | param_stamp.py | i-supermario/Cifar100_CL | 6c22151ea2c4c3014a569112fdf8a549331b27c4 | [
"MIT"
] | 51 | 2020-08-17T05:40:27.000Z | 2022-03-29T07:09:28.000Z | from data.load import get_multitask_experiment
from utils import checkattr
def get_param_stamp_from_args(args):
'''To get param-stamp a bit quicker.'''
from define_models import define_autoencoder, define_classifier
# -get configurations of experiment
config = get_multitask_experiment(
name=a... | 49.656934 | 120 | 0.6137 |
a0ea958af62a88ceff2a8aa47526e06685de4a3a | 11,562 | py | Python | synapse/appservice/api.py | mlakkadshaw/synapse | 74a2365bd5066955567cc551e72632d6cece94b9 | [
"Apache-2.0"
] | null | null | null | synapse/appservice/api.py | mlakkadshaw/synapse | 74a2365bd5066955567cc551e72632d6cece94b9 | [
"Apache-2.0"
] | 2 | 2022-03-01T08:22:45.000Z | 2022-03-11T08:13:55.000Z | synapse/appservice/api.py | mlakkadshaw/synapse | 74a2365bd5066955567cc551e72632d6cece94b9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015, 2016 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 34.207101 | 91 | 0.57983 |
f7df5d9b0da8331a950bc49f23485c845f42b370 | 1,559 | py | Python | keylime/migrations/versions/f35cdd35eb83_move_v_tpm_policy_to_jsonpickletype.py | kkaarreell/keylime | e12658bb6dc945b694e298b8ac337a204ab86ed2 | [
"Apache-2.0"
] | 18 | 2016-10-19T13:57:32.000Z | 2019-01-12T21:35:43.000Z | keylime/migrations/versions/f35cdd35eb83_move_v_tpm_policy_to_jsonpickletype.py | kkaarreell/keylime | e12658bb6dc945b694e298b8ac337a204ab86ed2 | [
"Apache-2.0"
] | 72 | 2019-01-24T10:12:59.000Z | 2019-04-17T11:07:16.000Z | keylime/migrations/versions/f35cdd35eb83_move_v_tpm_policy_to_jsonpickletype.py | kkaarreell/keylime | e12658bb6dc945b694e298b8ac337a204ab86ed2 | [
"Apache-2.0"
] | 10 | 2017-03-27T20:58:08.000Z | 2018-07-30T12:59:27.000Z | """Move (v)tpm_policy to JSONPickleType
Revision ID: f35cdd35eb83
Revises: 7d5db1a6ffb0
Create Date: 2021-08-02 15:26:34.427156
"""
import sqlalchemy as sa
from alembic import op
import keylime
# revision identifiers, used by Alembic.
revision = "f35cdd35eb83"
down_revision = "7d5db1a6ffb0"
branch_labels = None
dep... | 23.621212 | 66 | 0.6517 |
203ea37759d1a16ce67bbbfd8bf746634463f5f9 | 723 | py | Python | root/scripts/set_share_list.py | DragonCrafted87/docker-alpine-nfs-server | bbe7da1779fea99e15091474d875304b419ebbc7 | [
"MIT"
] | null | null | null | root/scripts/set_share_list.py | DragonCrafted87/docker-alpine-nfs-server | bbe7da1779fea99e15091474d875304b419ebbc7 | [
"MIT"
] | null | null | null | root/scripts/set_share_list.py | DragonCrafted87/docker-alpine-nfs-server | bbe7da1779fea99e15091474d875304b419ebbc7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from pathlib import Path
from os import listdir
# Local Imports
from python_logger import create_logger #pylint: disable=import-error
def main():
logger = create_logger(Path(__file__).stem)
logger.info(f'{listdir("/nfs_share/")}')
base_directory = Path('/nfs_share')
nfs_permisions = '*(rw... | 28.92 | 93 | 0.724758 |
c90f3c18d4ea5c85b9611e03496dad8ee36a2ea9 | 2,247 | py | Python | bcs-ui/backend/templatesets/legacy_apps/instance/migrations/0002_instanceconfig.py | laodiu/bk-bcs | 2a956a42101ff6487ff521fb3ef429805bfa7e26 | [
"Apache-2.0"
] | 599 | 2019-06-25T03:20:46.000Z | 2022-03-31T12:14:33.000Z | bcs-ui/backend/templatesets/legacy_apps/instance/migrations/0002_instanceconfig.py | laodiu/bk-bcs | 2a956a42101ff6487ff521fb3ef429805bfa7e26 | [
"Apache-2.0"
] | 537 | 2019-06-27T06:03:44.000Z | 2022-03-31T12:10:01.000Z | bcs-ui/backend/templatesets/legacy_apps/instance/migrations/0002_instanceconfig.py | laodiu/bk-bcs | 2a956a42101ff6487ff521fb3ef429805bfa7e26 | [
"Apache-2.0"
] | 214 | 2019-06-25T03:26:05.000Z | 2022-03-31T07:52:03.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 46.8125 | 229 | 0.656431 |
6cb86a13deef32111663812ad4fb00eb3b14e702 | 60 | py | Python | uproot_tree_utils/__init__.py | masonproffitt/uproot_tree_utils | c51203dcd55d39c247e74d08be5d1ed38e338e68 | [
"MIT"
] | 6 | 2020-07-16T23:02:02.000Z | 2021-08-31T06:28:18.000Z | uproot_tree_utils/__init__.py | masonproffitt/uproot_tree_utils | c51203dcd55d39c247e74d08be5d1ed38e338e68 | [
"MIT"
] | 32 | 2020-07-11T10:01:43.000Z | 2020-10-06T18:48:34.000Z | uproot_tree_utils/__init__.py | masonproffitt/uproot_tree_utils | c51203dcd55d39c247e74d08be5d1ed38e338e68 | [
"MIT"
] | null | null | null | from .clone import clone_tree
from .write import write_tree
| 20 | 29 | 0.833333 |
fa5076b532b067e8c7d9014401bb4b16c8f2f018 | 2,589 | py | Python | app/app/api/endpoints/download.py | keegan337/ineth-music-share-api | 414c395271c68e64aa88f4ed87efc6d92b89b5d2 | [
"MIT"
] | 1 | 2021-01-11T09:31:35.000Z | 2021-01-11T09:31:35.000Z | app/app/api/endpoints/download.py | keegan337/inethi-music-share | 414c395271c68e64aa88f4ed87efc6d92b89b5d2 | [
"MIT"
] | null | null | null | app/app/api/endpoints/download.py | keegan337/inethi-music-share | 414c395271c68e64aa88f4ed87efc6d92b89b5d2 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from flask import request, json
from ...core import downloads
from ...models import database as db_model
from ...main import app
from ...core import database as db_methods
from flask_cors import CORS, cross_origin
from ...models import user as user_model
from ...models import store as store_model
co... | 34.986486 | 110 | 0.665508 |
3f8bc9e8980fa62c48a8048e1a3cb76c4c75d7e7 | 2,060 | py | Python | src/agstoolbox/core/cmdline.py | ericoporto/agstoolbox | 2a689e3c653a0c48211c55c59e03ced3c6a07d43 | [
"MIT"
] | 2 | 2022-02-06T16:00:00.000Z | 2022-03-11T18:58:36.000Z | src/agstoolbox/core/cmdline.py | ericoporto/agstoolbox | 2a689e3c653a0c48211c55c59e03ced3c6a07d43 | [
"MIT"
] | 17 | 2022-01-24T11:21:21.000Z | 2022-03-20T18:04:41.000Z | src/agstoolbox/core/cmdline.py | ericoporto/agstoolbox | 2a689e3c653a0c48211c55c59e03ced3c6a07d43 | [
"MIT"
] | null | null | null | from __future__ import annotations # for python 3.8
from sys import exit
import argparse
from agstoolbox import __title__, __version__, __copyright__, __license__
from agstoolbox.core.ags.get_game_projects import list_game_projects_in_dir
def at_cmd_list(args):
projects = list_game_projects_in_dir(args.Path)
... | 31.212121 | 108 | 0.691748 |
57330ca1f97beaee98a6ec5f3dd12812dd129623 | 224 | py | Python | tests/test_commands.py | stactools-packages/gnatsgo | 8e57e29bd4a5687866f6be0320e5e4a2fa89187b | [
"Apache-2.0"
] | null | null | null | tests/test_commands.py | stactools-packages/gnatsgo | 8e57e29bd4a5687866f6be0320e5e4a2fa89187b | [
"Apache-2.0"
] | 2 | 2022-02-24T16:28:52.000Z | 2022-02-24T16:29:03.000Z | tests/test_commands.py | stactools-packages/gnatsgo | 8e57e29bd4a5687866f6be0320e5e4a2fa89187b | [
"Apache-2.0"
] | null | null | null | from stactools.testing import CliTestCase
from stactools.gnatsgo.commands import create_gnatsgo_command
class CommandsTest(CliTestCase):
def create_subcommand_functions(self):
return [create_gnatsgo_command]
| 22.4 | 61 | 0.816964 |
9cdb62940ccfd8bc11a1aaa75da09e0ebb528eae | 2,836 | py | Python | tests/python/pants_test/integration/remote_cache_integration_test.py | rcuza/pants | 0429258b181986eed856ae45af93b776727774a0 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/integration/remote_cache_integration_test.py | rcuza/pants | 0429258b181986eed856ae45af93b776727774a0 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/integration/remote_cache_integration_test.py | rcuza/pants | 0429258b181986eed856ae45af93b776727774a0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pants.engine.internals.native_engine_pyo3 import PyExecutor, PyStubCAS
from pants.option.global_options import RemoteCacheWarningsBehavior
from pants.option.scope import GLOBAL_SCOPE_... | 37.813333 | 96 | 0.649506 |
ec15bd8814f8f28000018e0aaa9144a07d0bc5e8 | 97,731 | py | Python | hacker_python.py | SinaDashti/Hacker_Rank | 4aefd711379c9a5c6c7141bcdef1426e1bd86b33 | [
"MIT"
] | null | null | null | hacker_python.py | SinaDashti/Hacker_Rank | 4aefd711379c9a5c6c7141bcdef1426e1bd86b33 | [
"MIT"
] | null | null | null | hacker_python.py | SinaDashti/Hacker_Rank | 4aefd711379c9a5c6c7141bcdef1426e1bd86b33 | [
"MIT"
] | null | null | null | ################################################################################
#Q
################################################################################
# Read an integer N.
# Without using any string methods, try to print the following:
# 123...N
# Note that "..." repr... | 44.810179 | 272 | 0.285682 |
cd5a52bde50b515d4303f750ecfba5bad979a355 | 11,815 | py | Python | nislmigrate/facades/file_system_facade.py | ni/NI-SystemLink-Migration | dbce27627a2ea9b0121478ef64d9acfa2940a20d | [
"MIT"
] | null | null | null | nislmigrate/facades/file_system_facade.py | ni/NI-SystemLink-Migration | dbce27627a2ea9b0121478ef64d9acfa2940a20d | [
"MIT"
] | 9 | 2021-11-08T21:47:50.000Z | 2022-03-30T20:06:52.000Z | nislmigrate/facades/file_system_facade.py | ni/NI-SystemLink-Migration | dbce27627a2ea9b0121478ef64d9acfa2940a20d | [
"MIT"
] | null | null | null | """Handle file and directory operations."""
import json
import os
import shutil
import stat
import base64
from nislmigrate.logs.migration_error import MigrationError
from nislmigrate.migration_action import MigrationAction
from cryptography.fernet import Fernet
from cryptography.hazmat.primitives import hashes
from c... | 41.311189 | 115 | 0.644943 |
1fbf8e54a4f2000d696e17d5779e175fefa293ef | 82 | py | Python | ros_catkin_ws/src/causalrobot/scripts/NREM_cortex.py | Hockey86/causalrobot | 3871fe4431b3eaa79f7a1d1540334b99cb8ec769 | [
"MIT"
] | null | null | null | ros_catkin_ws/src/causalrobot/scripts/NREM_cortex.py | Hockey86/causalrobot | 3871fe4431b3eaa79f7a1d1540334b99cb8ec769 | [
"MIT"
] | null | null | null | ros_catkin_ws/src/causalrobot/scripts/NREM_cortex.py | Hockey86/causalrobot | 3871fe4431b3eaa79f7a1d1540334b99cb8ec769 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# MIT License
## Causal discovery and inference
# red LED
| 13.666667 | 33 | 0.719512 |
489ce9bff9e6b9188a02965614cecd92a42d88a0 | 204 | py | Python | apps/product/admin.py | phdevs1/CyberCaffe | bee989a6d8d59205ee2645e986b4b0f16d00bf05 | [
"Apache-2.0"
] | null | null | null | apps/product/admin.py | phdevs1/CyberCaffe | bee989a6d8d59205ee2645e986b4b0f16d00bf05 | [
"Apache-2.0"
] | 7 | 2021-03-19T08:39:34.000Z | 2022-03-12T00:15:38.000Z | apps/product/admin.py | pioh123/CyberCaffe | bee989a6d8d59205ee2645e986b4b0f16d00bf05 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import Product, Advertise, Promotion
# Register your models here.
admin.site.register(Product)
admin.site.register(Advertise)
admin.site.register(Promotion) | 25.5 | 49 | 0.818627 |
8422ebe1532c7d8c1b412eb97914d35baad5815f | 2,985 | py | Python | integration/test/__main__.py | dianarg/geopm | 846604c164e3f8fc50551e888297843701dec087 | [
"BSD-3-Clause"
] | null | null | null | integration/test/__main__.py | dianarg/geopm | 846604c164e3f8fc50551e888297843701dec087 | [
"BSD-3-Clause"
] | null | null | null | integration/test/__main__.py | dianarg/geopm | 846604c164e3f8fc50551e888297843701dec087 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2015 - 2021, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, thi... | 38.766234 | 114 | 0.740704 |
8f46fb8862eaa7d772baf1916d0707016f47397c | 5,842 | py | Python | tuna_service_sdk/model/ops_automation/jobs_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | tuna_service_sdk/model/ops_automation/jobs_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | tuna_service_sdk/model/ops_automation/jobs_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: jobs.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import... | 46.365079 | 669 | 0.763608 |
82cf4a09b0f60b8e05747db36b0d8255c97ebe55 | 51,619 | py | Python | python/ccxt/vcc.py | bifot/ccxt | ad4ae3cf79c315719b5b362443059782e0903152 | [
"MIT"
] | 1 | 2021-08-02T08:08:52.000Z | 2021-08-02T08:08:52.000Z | python/ccxt/vcc.py | bifot/ccxt | ad4ae3cf79c315719b5b362443059782e0903152 | [
"MIT"
] | null | null | null | python/ccxt/vcc.py | bifot/ccxt | ad4ae3cf79c315719b5b362443059782e0903152 | [
"MIT"
] | 1 | 2021-07-23T05:45:00.000Z | 2021-07-23T05:45:00.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import hashlib
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import Authenticati... | 41.594682 | 245 | 0.465759 |
47a8543b438944ff8edf4d9866bd563805a2a7db | 1,307 | py | Python | toThingspeak.py | ichsankurnia/BAMS.BBTA3 | 2c7aed514b66d8700f7f33a4b959a0aaf897868d | [
"MIT"
] | null | null | null | toThingspeak.py | ichsankurnia/BAMS.BBTA3 | 2c7aed514b66d8700f7f33a4b959a0aaf897868d | [
"MIT"
] | null | null | null | toThingspeak.py | ichsankurnia/BAMS.BBTA3 | 2c7aed514b66d8700f7f33a4b959a0aaf897868d | [
"MIT"
] | null | null | null | import time
import os
import sys
import urllib # URL functions
import urllib2 # URL functions
import random
################# Default Constants #################
# These can be changed if required
THINGSPEAKKEY = 'HCRR3NJG1RWYZ6CY'
THINGSPEAKURL = 'https://api.thingspeak.com/update'
def sendDat... | 25.134615 | 82 | 0.664116 |
ff4bb5601f14c3fa833a1bb836cfdcc459c7375a | 1,178 | py | Python | wallet/mywallet/forms.py | Shpilevskiy/automatic-couscous | e0ebbe9338884f017fbeae495a083bd27f6c9354 | [
"MIT"
] | null | null | null | wallet/mywallet/forms.py | Shpilevskiy/automatic-couscous | e0ebbe9338884f017fbeae495a083bd27f6c9354 | [
"MIT"
] | null | null | null | wallet/mywallet/forms.py | Shpilevskiy/automatic-couscous | e0ebbe9338884f017fbeae495a083bd27f6c9354 | [
"MIT"
] | null | null | null | from django import forms
from .models import Wallet
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Button
from crispy_forms.bootstrap import Field, FormActions
class AddOperationForm(forms.Form):
title = forms.CharField(label='Title', required=True)
sum = forms.FloatField(l... | 40.62069 | 74 | 0.696944 |
d8bfe09d7b0185aebd009c98380c574651bc8ad3 | 1,098 | py | Python | bootstrapvz/providers/ec2/tasks/host.py | null0000/bootstrap-vz | 003cdd9808bac90383b4c46738507bd7e1daa268 | [
"Apache-2.0"
] | null | null | null | bootstrapvz/providers/ec2/tasks/host.py | null0000/bootstrap-vz | 003cdd9808bac90383b4c46738507bd7e1daa268 | [
"Apache-2.0"
] | null | null | null | bootstrapvz/providers/ec2/tasks/host.py | null0000/bootstrap-vz | 003cdd9808bac90383b4c46738507bd7e1daa268 | [
"Apache-2.0"
] | null | null | null | from bootstrapvz.base import Task
from bootstrapvz.common import phases
from bootstrapvz.common.tasks import host
class AddExternalCommands(Task):
description = 'Determining required external commands for EC2 bootstrapping'
phase = phases.preparation
successors = [host.CheckExternalCommands]
@classmethod
def ru... | 28.153846 | 83 | 0.753188 |
f65842ddc7191f645c3ba495f2af225ae1296db1 | 1,006 | py | Python | model/base/enc_dec_network.py | tiagopms/fast-conversational-banking | b9d3ddfe3adb78522fafab91c2d20495db063dda | [
"MIT"
] | 2 | 2018-03-06T13:00:33.000Z | 2018-05-29T00:27:01.000Z | model/base/enc_dec_network.py | tiagopms/fast-conversational-banking | b9d3ddfe3adb78522fafab91c2d20495db063dda | [
"MIT"
] | null | null | null | model/base/enc_dec_network.py | tiagopms/fast-conversational-banking | b9d3ddfe3adb78522fafab91c2d20495db063dda | [
"MIT"
] | null | null | null | import random
import pickle
import torch
from torch import nn
class EncDecNetwork(nn.Module):
def __init__(self, encoder, decoder):
super(EncDecNetwork, self).__init__()
self.encoder = encoder
self.decoder = decoder
self._cuda = False
def full_forward(self):
raise Not... | 25.794872 | 115 | 0.662028 |
c602888b73b2a998d5762c4a47995b91cebfc2b5 | 802 | py | Python | tests/test_status.py | whalebot-helmsman/pykt-64 | ee5e0413cd850876d3abc438480fffea4f7b7517 | [
"BSD-3-Clause"
] | null | null | null | tests/test_status.py | whalebot-helmsman/pykt-64 | ee5e0413cd850876d3abc438480fffea4f7b7517 | [
"BSD-3-Clause"
] | null | null | null | tests/test_status.py | whalebot-helmsman/pykt-64 | ee5e0413cd850876d3abc438480fffea4f7b7517 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from setup_teardown import start_db, stop_db
from nose.tools import *
from pykt import KyotoTycoon, KTException
@raises(IOError)
def test_err_status():
db = KyotoTycoon()
db.status()
@with_setup(setup=start_db,teardown=stop_db)
def test_status():
db = KyotoTycoon()
db = db.open... | 21.675676 | 44 | 0.647132 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.