hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
795a70c0755c376feba74697bf3491d3bb6d58e8 | 15,826 | py | Python | tests/test_athena_csv.py | ibanmarco/aws-data-wrangler | e99937296075c671e5f8a0998b430879c808687d | [
"Apache-2.0"
] | 1 | 2020-11-10T12:37:08.000Z | 2020-11-10T12:37:08.000Z | tests/test_athena_csv.py | ibanmarco/aws-data-wrangler | e99937296075c671e5f8a0998b430879c808687d | [
"Apache-2.0"
] | null | null | null | tests/test_athena_csv.py | ibanmarco/aws-data-wrangler | e99937296075c671e5f8a0998b430879c808687d | [
"Apache-2.0"
] | null | null | null | import logging
import time
import boto3
import pandas as pd
import pytest
import awswrangler as wr
from ._utils import ensure_data_types_csv, get_df_csv
logging.getLogger("awswrangler").setLevel(logging.DEBUG)
@pytest.mark.parametrize("use_threads", [True, False])
@pytest.mark.parametrize("concurrent_partitioning... | 39.368159 | 119 | 0.652913 |
795a71555e363945b36c3696a00672c22fc516a3 | 3,978 | py | Python | cisco_aci/tests/test_cisco.py | tcpatterson/integrations-core | 3692601de09f8db60f42612b0d623509415bbb53 | [
"BSD-3-Clause"
] | 1 | 2021-12-15T22:45:14.000Z | 2021-12-15T22:45:14.000Z | cisco_aci/tests/test_cisco.py | tcpatterson/integrations-core | 3692601de09f8db60f42612b0d623509415bbb53 | [
"BSD-3-Clause"
] | null | null | null | cisco_aci/tests/test_cisco.py | tcpatterson/integrations-core | 3692601de09f8db60f42612b0d623509415bbb53 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2010-present
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import os
from copy import deepcopy
import pytest
from mock import MagicMock
from datadog_checks.base import AgentCheck
from datadog_checks.base.utils.containers import hash_mutable
from datadog_checks.cisco_a... | 38.25 | 120 | 0.718451 |
795a72719f66509be114338cc84f7f1949caff8e | 4,381 | py | Python | poetry/installation/authenticator.py | noamraph/poetry | 0d48fb669e42d2b662b8e0abef6af8c8bb9ab68a | [
"MIT"
] | 1 | 2020-08-19T19:51:22.000Z | 2020-08-19T19:51:22.000Z | poetry/installation/authenticator.py | noamraph/poetry | 0d48fb669e42d2b662b8e0abef6af8c8bb9ab68a | [
"MIT"
] | null | null | null | poetry/installation/authenticator.py | noamraph/poetry | 0d48fb669e42d2b662b8e0abef6af8c8bb9ab68a | [
"MIT"
] | 1 | 2021-11-16T13:29:42.000Z | 2021-11-16T13:29:42.000Z | from typing import TYPE_CHECKING
from poetry.utils._compat import urlparse
from poetry.utils.password_manager import PasswordManager
if TYPE_CHECKING:
from typing import Any
from typing import Optional
from typing import Tuple
from clikit.api.io import IO
from requests import Request # noqa
... | 32.69403 | 87 | 0.594157 |
795a72a1bfbdb03846e4796f5c3981f409050717 | 3,358 | py | Python | test/distributed/elastic/rendezvous/rendezvous_backend_test.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 60,067 | 2017-01-18T17:21:31.000Z | 2022-03-31T21:37:45.000Z | test/distributed/elastic/rendezvous/rendezvous_backend_test.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 66,955 | 2017-01-18T17:21:38.000Z | 2022-03-31T23:56:11.000Z | test/distributed/elastic/rendezvous/rendezvous_backend_test.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 19,210 | 2017-01-18T17:45:04.000Z | 2022-03-31T23:51:56.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
from abc import ABC, abstractmethod
from typing import Any, Callable, Optional, Tuple, cast
from torch.distribut... | 32.288462 | 97 | 0.699821 |
795a72e90423251835b9fbe90e8dcb4d5aec995b | 269 | py | Python | scripts/component_graph/far/__init__.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 3 | 2020-08-02T04:46:18.000Z | 2020-08-07T10:10:53.000Z | scripts/component_graph/far/__init__.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | scripts/component_graph/far/__init__.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 1 | 2020-08-07T10:11:49.000Z | 2020-08-07T10:11:49.000Z | #!/usr/bin/env python3
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""The FAR module provides support for parsing FAR files."""
import far.far_reader
| 29.888889 | 72 | 0.758364 |
795a74090d851905a6c18668ca7f8eee147d9a74 | 1,782 | py | Python | pie/scripts/tag_pipe.py | lascivaroma/PaPie | 260440d0ad27a853350bdc4cf2a77d1655e231f8 | [
"MIT"
] | 16 | 2019-01-17T08:15:41.000Z | 2021-11-12T15:17:41.000Z | pie/scripts/tag_pipe.py | lascivaroma/PaPie | 260440d0ad27a853350bdc4cf2a77d1655e231f8 | [
"MIT"
] | 64 | 2018-12-16T14:52:51.000Z | 2021-05-20T07:58:40.000Z | pie/scripts/tag_pipe.py | datatjej/pie | 0ca4311a57b2439994e5fcdc02f4d008ee268a9c | [
"MIT"
] | 4 | 2019-03-29T14:35:02.000Z | 2021-05-19T13:31:48.000Z |
# Can be run with python -m pie.scripts.tag_pipe
import sys
from pie import utils
from pie.tagger import Tagger, simple_tokenizer
def run(model_spec, device, batch_size, lower, beam_width, use_beam, tokenize):
with utils.shutup():
tagger = Tagger(device=device, batch_size=batch_size, lower=lower)
... | 33 | 79 | 0.640292 |
795a75671aa69e98d5c33cc93d7871e6af3e8895 | 7,504 | py | Python | pymatgen/optimization/linear_assignment.py | miaoliu/pymatgen | fe3c48ce3334924e6693f857aebc64b9714d1af2 | [
"MIT"
] | 1 | 2022-02-28T04:24:46.000Z | 2022-02-28T04:24:46.000Z | pymatgen/optimization/linear_assignment.py | miaoliu/pymatgen | fe3c48ce3334924e6693f857aebc64b9714d1af2 | [
"MIT"
] | null | null | null | pymatgen/optimization/linear_assignment.py | miaoliu/pymatgen | fe3c48ce3334924e6693f857aebc64b9714d1af2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
This module contains an algorithm to solve the Linear Assignment Problem
"""
from __future__ import division
__author__ = "Will Richards"
__copyright__ = "Copyright 2011, The Materials Project"
__version__ = "1.0"
__maintainer__ = "Will Richards"
__email__ = "wrichards@mit.edu"
__date__ = "... | 32.344828 | 78 | 0.541844 |
795a76450f81882f3ef1bec075ff44ad7a0bea41 | 19,306 | py | Python | sdk/python/pulumi_azure_native/network/v20191201/p2s_vpn_gateway.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20191201/p2s_vpn_gateway.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20191201/p2s_vpn_gateway.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # 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, overload
from ... import _utilities
fro... | 50.539267 | 2,705 | 0.681135 |
795a78b6e8232cd5b244db41fba7ce92da7f3c05 | 196 | py | Python | runserver.py | dongbum/flask-board | 7da191bea47184135ecf235b593e13ecf5793715 | [
"MIT"
] | null | null | null | runserver.py | dongbum/flask-board | 7da191bea47184135ecf235b593e13ecf5793715 | [
"MIT"
] | null | null | null | runserver.py | dongbum/flask-board | 7da191bea47184135ecf235b593e13ecf5793715 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from board import create_app
application = create_app()
if __name__ == '__main__':
print("starting test server...")
application.run(host='127.0.0.1', port=5000) | 19.6 | 48 | 0.658163 |
795a7963768701222eb88ce663883ff1212d34a9 | 3,029 | py | Python | isi_sdk_7_2/isi_sdk_7_2/models/sync_reports.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_7_2/isi_sdk_7_2/models/sync_reports.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_7_2/isi_sdk_7_2/models/sync_reports.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 2
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_7_2.models.sync_repo... | 26.33913 | 80 | 0.560911 |
795a79ff6e95b959a88968e45a61de536baeffd5 | 363 | py | Python | platform/hwconf_data/zgm13/modules/MODEM/MODEM_behavior.py | lenloe1/v2.7 | 9ac9c4a7bb37987af382c80647f42d84db5f2e1d | [
"Zlib"
] | null | null | null | platform/hwconf_data/zgm13/modules/MODEM/MODEM_behavior.py | lenloe1/v2.7 | 9ac9c4a7bb37987af382c80647f42d84db5f2e1d | [
"Zlib"
] | 1 | 2020-08-25T02:36:22.000Z | 2020-08-25T02:36:22.000Z | platform/hwconf_data/zgm13/modules/MODEM/MODEM_behavior.py | lenloe1/v2.7 | 9ac9c4a7bb37987af382c80647f42d84db5f2e1d | [
"Zlib"
] | 1 | 2020-08-25T01:56:04.000Z | 2020-08-25T01:56:04.000Z | from . import ExporterModel
from . import MODEM_model
from . import RuntimeModel
class MODEM(ExporterModel.Module):
def __init__(self, name=None):
if not name:
name = self.__class__.__name__
super(MODEM, self).__init__(name, visible=True, core=True)
self.model = MODEM_model
... | 25.928571 | 66 | 0.674931 |
795a7a34b8667531a8405374a6d2969b57c5cda3 | 2,600 | py | Python | lab6-04-delete-network-device-id-location.py | ralfraij/apicem-ll-sample-code | adb0988af7b506610b218db7136ec58354572f4b | [
"Apache-2.0"
] | 1 | 2018-06-28T00:11:16.000Z | 2018-06-28T00:11:16.000Z | lab6-04-delete-network-device-id-location.py | ralfraij/apicem-ll-sample-code | adb0988af7b506610b218db7136ec58354572f4b | [
"Apache-2.0"
] | null | null | null | lab6-04-delete-network-device-id-location.py | ralfraij/apicem-ll-sample-code | adb0988af7b506610b218db7136ec58354572f4b | [
"Apache-2.0"
] | null | null | null | import requests # We use Python "requests" module to do HTTP GET query
import json # Import JSON encoder and decode module
import sys
from operator import itemgetter
from apicem_config import * # APIC-EM IP is assigned in apicem_config.py
requests.packages.urllib3.disable_warnings() # Remove this line i... | 44.067797 | 128 | 0.636538 |
795a7a9cbf7ba6dcb3fcbd2b582abb24de74f26d | 2,090 | py | Python | voltcycle/peak_detection_fxn.py | MariaPoliti/voltcycle | cc67ae91103ac6bdc0c7995834865d8bcb176ec3 | [
"MIT"
] | null | null | null | voltcycle/peak_detection_fxn.py | MariaPoliti/voltcycle | cc67ae91103ac6bdc0c7995834865d8bcb176ec3 | [
"MIT"
] | null | null | null | voltcycle/peak_detection_fxn.py | MariaPoliti/voltcycle | cc67ae91103ac6bdc0c7995834865d8bcb176ec3 | [
"MIT"
] | null | null | null | """This module contains a function to determine the peaks in the specified
dataset, based on the y values (or current values). The function takes in the
specified y column of the dataframe and outputs a list consisting of the index
values of the peaks. This module calls the peakutils and numpy packages along
with t... | 39.433962 | 79 | 0.675598 |
795a7b483ea41a82238961f88dce62c117083703 | 4,169 | py | Python | dash_daq/Tank.py | yordiverbeeck/dash-daq | 7450d92f7c60d42a42f62dbaa0e5053f4432a3a1 | [
"MIT"
] | null | null | null | dash_daq/Tank.py | yordiverbeeck/dash-daq | 7450d92f7c60d42a42f62dbaa0e5053f4432a3a1 | [
"MIT"
] | null | null | null | dash_daq/Tank.py | yordiverbeeck/dash-daq | 7450d92f7c60d42a42f62dbaa0e5053f4432a3a1 | [
"MIT"
] | null | null | null | # AUTO GENERATED FILE - DO NOT EDIT
from dash.development.base_component import Component, _explicitize_args
class Tank(Component):
"""A Tank component.
A Tank component that fills to
a value between some range.
Keyword arguments:
- id (string; optional):
The ID used to identify this component in Dash call... | 36.570175 | 487 | 0.675941 |
795a7bcb251377e29027af7e55401dd7e5d4408a | 1,582 | py | Python | scripts/sent_enc_nli/train_nli.py | lukecq1231/sent_enc_nli_sick | e71e6f245591214168ee8ff1588d1e8b866d7e2c | [
"BSD-3-Clause"
] | 3 | 2017-10-11T21:00:55.000Z | 2019-02-12T16:41:00.000Z | scripts/sent_enc_nli/train_nli.py | lukecq1231/sent_enc_nli_sick | e71e6f245591214168ee8ff1588d1e8b866d7e2c | [
"BSD-3-Clause"
] | null | null | null | scripts/sent_enc_nli/train_nli.py | lukecq1231/sent_enc_nli_sick | e71e6f245591214168ee8ff1588d1e8b866d7e2c | [
"BSD-3-Clause"
] | null | null | null | import numpy
import os
from nli import train
if __name__ == '__main__':
model_name = os.path.basename(os.path.dirname(os.path.realpath(__file__)))
train(
saveto = './{}.npz'.format(model_name),
reload_ = False,
dim_word = 300,
dim = 300,
patience ... | 38.585366 | 90 | 0.529077 |
795a7d3140d84acc5d6ae0c35e5e706441210438 | 83 | py | Python | src/dependency_injector/__init__.py | kootoopas/python-dependency-injector | 47278030ce1b4e06b6d4b21af4d0ebbfa178c815 | [
"BSD-3-Clause"
] | null | null | null | src/dependency_injector/__init__.py | kootoopas/python-dependency-injector | 47278030ce1b4e06b6d4b21af4d0ebbfa178c815 | [
"BSD-3-Clause"
] | null | null | null | src/dependency_injector/__init__.py | kootoopas/python-dependency-injector | 47278030ce1b4e06b6d4b21af4d0ebbfa178c815 | [
"BSD-3-Clause"
] | null | null | null | """Top-level package."""
__version__ = '4.5.4'
"""Version number.
:type: str
"""
| 10.375 | 24 | 0.590361 |
795a7e64235facb0a785a1e877d5ed0e6982eece | 1,672 | py | Python | examples/sklearn_example.py | petehellyer/BayesianOptimization | b79d5f174b930e94d12a480e936f2029d9468ca7 | [
"MIT"
] | null | null | null | examples/sklearn_example.py | petehellyer/BayesianOptimization | b79d5f174b930e94d12a480e936f2029d9468ca7 | [
"MIT"
] | null | null | null | examples/sklearn_example.py | petehellyer/BayesianOptimization | b79d5f174b930e94d12a480e936f2029d9468ca7 | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import division
from sklearn.datasets import make_classification
from sklearn.cross_validation import cross_val_score
from sklearn.ensemble import RandomForestClassifier as RFC
from sklearn.svm import SVC
from bayes_opt import BayesianOptimization
# Load data set... | 38 | 84 | 0.572368 |
795a7f51aab69efedb248b9392679b2d9ca19fbf | 566 | py | Python | Silver/Silver_IV/1920.py | masterTyper/baekjoon_solved_ac | b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c | [
"MIT"
] | null | null | null | Silver/Silver_IV/1920.py | masterTyper/baekjoon_solved_ac | b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c | [
"MIT"
] | null | null | null | Silver/Silver_IV/1920.py | masterTyper/baekjoon_solved_ac | b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c | [
"MIT"
] | null | null | null | import sys
N = int(sys.stdin.readline())
A = list(map(int, sys.stdin.readline().split()))
M = int(sys.stdin.readline())
E = list(map(int, sys.stdin.readline().split()))
A.sort()
def binary_search(target):
start = 0
end = len(A) - 1
while start <= end:
mid = (start + end) // 2
if A[mi... | 16.171429 | 48 | 0.512367 |
795a821baec697441c80d18eb0ed8ad2a2fe4ed7 | 430 | py | Python | testkit/backend.py | mrhardikjoshi/neo4j-ruby-driver | b182011bbc3bca2c7c79e5917a87654bef0fbfde | [
"MIT"
] | null | null | null | testkit/backend.py | mrhardikjoshi/neo4j-ruby-driver | b182011bbc3bca2c7c79e5917a87654bef0fbfde | [
"MIT"
] | null | null | null | testkit/backend.py | mrhardikjoshi/neo4j-ruby-driver | b182011bbc3bca2c7c79e5917a87654bef0fbfde | [
"MIT"
] | null | null | null | """
Executed in Ruby driver container.
Assumes driver and backend has been built.
Responsible for starting the test backend.
"""
import os, subprocess
if __name__ == "__main__":
err = open("/artifacts/backenderr.log", "w")
out = open("/artifacts/backendout.log", "w")
subprocess.check_call(
['env', ... | 33.076923 | 125 | 0.690698 |
795a826cc420f2e82a3c31d9a539f8612a6e1aa3 | 26,667 | py | Python | flink-python/pyflink/table/tests/test_udf.py | zhangxiangyang/flink | e8ea52b90e3ac8cd30cb20a44394388a1ef21f0b | [
"Apache-2.0"
] | 2 | 2020-01-09T06:58:29.000Z | 2020-01-09T06:58:32.000Z | flink-python/pyflink/table/tests/test_udf.py | zhangxiangyang/flink | e8ea52b90e3ac8cd30cb20a44394388a1ef21f0b | [
"Apache-2.0"
] | 1 | 2020-05-19T08:20:26.000Z | 2020-05-19T08:20:26.000Z | flink-python/pyflink/table/tests/test_udf.py | zhangxiangyang/flink | e8ea52b90e3ac8cd30cb20a44394388a1ef21f0b | [
"Apache-2.0"
] | 1 | 2020-03-06T22:58:05.000Z | 2020-03-06T22:58:05.000Z | ################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this... | 45.045608 | 99 | 0.562305 |
795a83a9b9918a8db1196bbebad79714932c1d29 | 48,773 | py | Python | lib/masterd/instance.py | apyrgio/snf-ganeti | c59bb92f5bf4a98d90b4f10fb509a5a2f11c65b7 | [
"BSD-2-Clause"
] | null | null | null | lib/masterd/instance.py | apyrgio/snf-ganeti | c59bb92f5bf4a98d90b4f10fb509a5a2f11c65b7 | [
"BSD-2-Clause"
] | null | null | null | lib/masterd/instance.py | apyrgio/snf-ganeti | c59bb92f5bf4a98d90b4f10fb509a5a2f11c65b7 | [
"BSD-2-Clause"
] | null | null | null | #
#
# Copyright (C) 2010, 2011 Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of condition... | 29.205389 | 80 | 0.65157 |
795a85f01b375b0661c66c85963ba903125b88ce | 362 | py | Python | gcs_s3_transfer_service/schemas/load.py | ENCODE-DCC/gcs-s3-transfer-service | b402da5f202f5be17439213ddce4b98a0c7884cb | [
"MIT"
] | 1 | 2022-02-25T19:53:26.000Z | 2022-02-25T19:53:26.000Z | gcs_s3_transfer_service/schemas/load.py | ENCODE-DCC/gcs-s3-transfer-service | b402da5f202f5be17439213ddce4b98a0c7884cb | [
"MIT"
] | null | null | null | gcs_s3_transfer_service/schemas/load.py | ENCODE-DCC/gcs-s3-transfer-service | b402da5f202f5be17439213ddce4b98a0c7884cb | [
"MIT"
] | null | null | null | import json
from pathlib import Path
from typing import Any, Dict
def load_schema(schema_name: str) -> Dict[str, Any]:
if not schema_name.endswith(".json"):
schema_name = schema_name + ".json"
current_dir = Path(__file__).resolve()
schema_path = current_dir.parent / schema_name
with open(schem... | 27.846154 | 52 | 0.696133 |
795a865dd5c3b9052a6499ae8eb1d31ff0a4a3e1 | 7,295 | py | Python | python_modules/libraries/dagster-pagerduty/dagster_pagerduty/resources.py | bambielli-flex/dagster | 30b75ba7c62fc536bc827f177c1dc6ba20f5ae20 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-pagerduty/dagster_pagerduty/resources.py | bambielli-flex/dagster | 30b75ba7c62fc536bc827f177c1dc6ba20f5ae20 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-pagerduty/dagster_pagerduty/resources.py | bambielli-flex/dagster | 30b75ba7c62fc536bc827f177c1dc6ba20f5ae20 | [
"Apache-2.0"
] | null | null | null | import pypd
from dagster import resource, Dict, Field, String
class PagerDutyService:
'''Integrates with PagerDuty via the pypd library.
See:
https://v2.developer.pagerduty.com/docs/events-api-v2
https://v2.developer.pagerduty.com/docs/send-an-event-events-api-v2
https://support.page... | 43.422619 | 100 | 0.522276 |
795a86deadc9e13fcfacfb72646c451738774ac0 | 307 | py | Python | zang/domain/enums/call_direction.py | vlastikczech/zang-python | 980f5243071404d6838554500a6955ff7bc2a0c7 | [
"MIT"
] | null | null | null | zang/domain/enums/call_direction.py | vlastikczech/zang-python | 980f5243071404d6838554500a6955ff7bc2a0c7 | [
"MIT"
] | null | null | null | zang/domain/enums/call_direction.py | vlastikczech/zang-python | 980f5243071404d6838554500a6955ff7bc2a0c7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
zang.domain.enums.call_direction
~~~~~~~~~~~~~~~~~~~
Module containing `CallDirection` available options
"""
from enum import Enum
class CallDirection(Enum):
INBOUND = 'inbound'
OUTBOUND_API = 'outbound-api'
OUTBOUND_DIAL = 'outbound-dial'
UNKNOWN = 'unknown'
| 19.1875 | 51 | 0.651466 |
795a86fd90ed5cea3a38dc189b675e0f250d88ec | 2,171 | py | Python | utils.py | IHoldYA/urban_datasets | 46501cbbe3b21b0110f479fc71b123a664ed720f | [
"MIT"
] | 5 | 2021-04-17T13:03:16.000Z | 2021-04-20T14:55:52.000Z | utils.py | IHoldYA/urban_datasets | 46501cbbe3b21b0110f479fc71b123a664ed720f | [
"MIT"
] | null | null | null | utils.py | IHoldYA/urban_datasets | 46501cbbe3b21b0110f479fc71b123a664ed720f | [
"MIT"
] | 4 | 2021-04-19T01:21:10.000Z | 2021-08-31T12:08:08.000Z | import qgis
from qgis.core import *
# from PyQt4.QtGui import *
# from PyQt4.QtCore import *
def add_feature(_v, _pr, feature):
convexhull = feature.geometry().convexHull()
f = QgsFeature()
f.setGeometry(convexhull)
f.setAttributes(['1'])
_pr.addFeature(f)
_v.updateExtents()
_v.commitChanges()
QgsProject.insta... | 25.244186 | 66 | 0.69415 |
795a87911bb3da41b1b3593814cd06e20d90ac34 | 4,475 | py | Python | code/lambda/function/Auth/Register/app.py | Xchange-Taiwan/XChange-SSO-Architect | 0bb56bcf8a849cf3b5858f0597696b5bae00de58 | [
"Apache-2.0"
] | 1 | 2021-08-31T04:23:12.000Z | 2021-08-31T04:23:12.000Z | code/lambda/function/Auth/Register/app.py | Xchange-Taiwan/XChange-SSO-Architect | 0bb56bcf8a849cf3b5858f0597696b5bae00de58 | [
"Apache-2.0"
] | null | null | null | code/lambda/function/Auth/Register/app.py | Xchange-Taiwan/XChange-SSO-Architect | 0bb56bcf8a849cf3b5858f0597696b5bae00de58 | [
"Apache-2.0"
] | null | null | null | import json
import os
import logging
from aws import helper
from aws import federate
from aws.helper import DeveloperMode
logger = logging.getLogger()
logger.setLevel(logging.INFO)
USER_POOL_ID = os.environ["USER_POOL_ID"]
USER_TABLE_NAME = os.environ["USER_TABLE_NAME"]
@DeveloperMode(True)
def lambda_handler(even... | 36.382114 | 91 | 0.643799 |
795a87fe948b71dcac2e9aa8e2b1072905629fb0 | 12,892 | py | Python | returns/maybe.py | MichaelAOlson/returns | 56e0df46846890b1c33dd26216086f94269292ad | [
"BSD-2-Clause"
] | null | null | null | returns/maybe.py | MichaelAOlson/returns | 56e0df46846890b1c33dd26216086f94269292ad | [
"BSD-2-Clause"
] | null | null | null | returns/maybe.py | MichaelAOlson/returns | 56e0df46846890b1c33dd26216086f94269292ad | [
"BSD-2-Clause"
] | null | null | null | from abc import ABCMeta
from functools import wraps
from typing import (
Any,
Callable,
ClassVar,
NoReturn,
Optional,
Type,
TypeVar,
Union,
)
from typing_extensions import final
from returns.interfaces.specific.maybe import MaybeBased2
from returns.primitives.container import BaseConta... | 27.844492 | 79 | 0.5944 |
795a884f783bd2c8e015c0684f7a1eb5e5b514b6 | 2,710 | py | Python | cunt/types/blockchain_format/vdf.py | CallMeBrado/cunt-blockchain | 9b140b7e5541f3baffabe02a55b75d9aeb889999 | [
"Apache-2.0"
] | 7 | 2021-08-09T19:01:51.000Z | 2021-12-09T04:32:09.000Z | cunt/types/blockchain_format/vdf.py | CallMeBrado/cunt-blockchain | 9b140b7e5541f3baffabe02a55b75d9aeb889999 | [
"Apache-2.0"
] | 22 | 2021-08-17T04:12:11.000Z | 2022-03-29T04:10:38.000Z | cunt/types/blockchain_format/vdf.py | CallMeBrado/cunt-blockchain | 9b140b7e5541f3baffabe02a55b75d9aeb889999 | [
"Apache-2.0"
] | 4 | 2021-09-05T12:04:51.000Z | 2022-03-15T08:44:32.000Z | import logging
import traceback
from dataclasses import dataclass
from enum import IntEnum
from typing import Optional
from functools import lru_cache
from chiavdf import create_discriminant, verify_n_wesolowski
from cunt.consensus.constants import ConsensusConstants
from cunt.types.blockchain_format.classgroup impor... | 27.373737 | 90 | 0.673432 |
795a88a097dbd365fe7a55af55dc9b0fe6f11e08 | 4,359 | py | Python | nni/algorithms/hpo/medianstop_assessor.py | nbl97/nni | 1530339d3e964a5ea95a0afde1775ec9167cdcc0 | [
"MIT"
] | 2,305 | 2018-09-07T12:42:26.000Z | 2019-05-06T20:14:24.000Z | nni/algorithms/hpo/medianstop_assessor.py | nbl97/nni | 1530339d3e964a5ea95a0afde1775ec9167cdcc0 | [
"MIT"
] | 379 | 2018-09-10T10:19:50.000Z | 2019-05-06T18:04:46.000Z | nni/algorithms/hpo/medianstop_assessor.py | nbl97/nni | 1530339d3e964a5ea95a0afde1775ec9167cdcc0 | [
"MIT"
] | 314 | 2018-09-08T05:36:08.000Z | 2019-05-06T08:48:51.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from __future__ import annotations
import logging
from schema import Schema, Optional
from typing_extensions import Literal
from nni import ClassArgsValidator
from nni.assessor import Assessor, AssessResult
from nni.utils import extract_scalar... | 36.630252 | 108 | 0.645102 |
795a88b56d209b20aa30b5b34d5c8fc153397e0b | 580 | py | Python | graphql_jwt/refresh_token/managers.py | ibqn/django-graphql-jwt | dd92319071092bb517187904f3ac0610e8443edf | [
"MIT"
] | 24 | 2020-09-05T17:34:16.000Z | 2022-03-17T11:45:55.000Z | graphql_jwt/refresh_token/managers.py | ibqn/django-graphql-jwt | dd92319071092bb517187904f3ac0610e8443edf | [
"MIT"
] | 16 | 2020-09-05T16:55:49.000Z | 2022-03-20T16:44:25.000Z | graphql_jwt/refresh_token/managers.py | ibqn/django-graphql-jwt | dd92319071092bb517187904f3ac0610e8443edf | [
"MIT"
] | 12 | 2020-09-15T21:53:48.000Z | 2022-03-20T15:07:43.000Z | from django.db import models
from django.db.models import Case
from django.db.models import Value as V
from django.db.models import When
from django.utils import timezone
from ..settings import jwt_settings
class RefreshTokenQuerySet(models.QuerySet):
def expired(self):
expires = timezone.now() - jwt_se... | 27.619048 | 76 | 0.663793 |
795a8a1f7fa2de24a9dc525ced9ad2cbe7a4795b | 1,964 | py | Python | src/genie/libs/parser/nxos/tests/ShowBgpSessions/cli/equal/golden_output_1_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 204 | 2018-06-27T00:55:27.000Z | 2022-03-06T21:12:18.000Z | src/genie/libs/parser/nxos/tests/ShowBgpSessions/cli/equal/golden_output_1_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 468 | 2018-06-19T00:33:18.000Z | 2022-03-31T23:23:35.000Z | src/genie/libs/parser/nxos/tests/ShowBgpSessions/cli/equal/golden_output_1_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 309 | 2019-01-16T20:21:07.000Z | 2022-03-30T12:56:41.000Z |
expected_output = {
"total_peers": 3,
"total_established_peers": 2,
"local_as": 333,
"vrf": {
"default": {
"router_id": "10.106.0.6",
"neighbor": {
"10.106.102.4": {
"last_flap": "01:03:35",
"last_write": "00:00:09",... | 32.733333 | 49 | 0.362016 |
795a8a34ae82d60290c7038cc4879c1b1b1dce14 | 410 | py | Python | devops/girder/plugins/AnnotationPlugin/upenncontrast_annotation/test/conftest.py | zjniu/UPennContrast | 7924e68ab01088dd515ef99c0aff4134384b0701 | [
"Apache-2.0"
] | null | null | null | devops/girder/plugins/AnnotationPlugin/upenncontrast_annotation/test/conftest.py | zjniu/UPennContrast | 7924e68ab01088dd515ef99c0aff4134384b0701 | [
"Apache-2.0"
] | null | null | null | devops/girder/plugins/AnnotationPlugin/upenncontrast_annotation/test/conftest.py | zjniu/UPennContrast | 7924e68ab01088dd515ef99c0aff4134384b0701 | [
"Apache-2.0"
] | null | null | null | import pytest
from girder import events
def unbindGirderEventsByHandlerName(handlerName):
for eventName in events._mapping:
events.unbind(eventName, handlerName)
@pytest.fixture
def unbindLargeImage(db):
yield True
unbindGirderEventsByHandlerName('large_image')
@pytest.fixture
def unbindAnnot... | 19.52381 | 63 | 0.785366 |
795a8a7708cbea16df97b1d939046b88dab2cab2 | 121,448 | py | Python | sklearn/utils/estimator_checks.py | boricles/scikit-learn | 373946ec9e3c72116bfbf7fab051cf4797d13e0f | [
"BSD-3-Clause"
] | 1 | 2021-03-28T08:57:36.000Z | 2021-03-28T08:57:36.000Z | sklearn/utils/estimator_checks.py | abhinav2301/scikit-learn | 896d4fad106c8f1d745923d544b44a0707103aa2 | [
"BSD-3-Clause"
] | null | null | null | sklearn/utils/estimator_checks.py | abhinav2301/scikit-learn | 896d4fad106c8f1d745923d544b44a0707103aa2 | [
"BSD-3-Clause"
] | null | null | null | import types
import warnings
import sys
import traceback
import pickle
import re
from copy import deepcopy
from functools import partial, wraps
from inspect import signature
import numpy as np
from scipy import sparse
from scipy.stats import rankdata
import joblib
from . import IS_PYPY
from .. import config_context
f... | 38.665393 | 112 | 0.635935 |
795a8af0b6904153a9b4e1a41d7b803381874162 | 8,792 | py | Python | mmpose/models/necks/fpn.py | pallgeuer/mmpose | d3c17d5e6bdb9dbaca19f3bf53aa2802105355fd | [
"Apache-2.0"
] | null | null | null | mmpose/models/necks/fpn.py | pallgeuer/mmpose | d3c17d5e6bdb9dbaca19f3bf53aa2802105355fd | [
"Apache-2.0"
] | null | null | null | mmpose/models/necks/fpn.py | pallgeuer/mmpose | d3c17d5e6bdb9dbaca19f3bf53aa2802105355fd | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import torch.nn as nn
import torch.nn.functional as F
from mmcv.cnn import ConvModule, xavier_init
from mmcv.runner import auto_fp16
from ..builder import NECKS
@NECKS.register_module()
class FPN(nn.Module):
r"""Feature Pyramid Network.
This is an implementati... | 42.269231 | 79 | 0.568016 |
795a8ca034204dbf6d91d59e13c32e18d9f88d42 | 7,154 | py | Python | application/models.py | valr/lci | 82a9ced51d66e5fe3432ff1d54a864ec396e4217 | [
"MIT"
] | null | null | null | application/models.py | valr/lci | 82a9ced51d66e5fe3432ff1d54a864ec396e4217 | [
"MIT"
] | null | null | null | application/models.py | valr/lci | 82a9ced51d66e5fe3432ff1d54a864ec396e4217 | [
"MIT"
] | null | null | null | import enum
import uuid
from datetime import datetime
from decimal import Decimal
from time import time
import jwt
from flask import current_app
from flask_login import UserMixin
from sqlalchemy import types
from werkzeug.security import check_password_hash, generate_password_hash
from application import database
# ... | 31.377193 | 83 | 0.66676 |
795a8cde653f35f1ec300e920ebadb2d4959688a | 2,804 | py | Python | fuzzy_logic/fuzzy_operations.py | Mu-L/TheAlgorithmsOfPython | f9aa4c996f6a9f40195cc9d5448141049dfb75e4 | [
"MIT"
] | 6 | 2020-06-23T11:56:55.000Z | 2021-10-03T17:21:34.000Z | fuzzy_logic/fuzzy_operations.py | Avinash987/Python | 2d3d660155241113b23e4ed810e05479b2fc4bba | [
"MIT"
] | 3 | 2020-06-08T07:03:15.000Z | 2020-06-08T08:41:22.000Z | fuzzy_logic/fuzzy_operations.py | Avinash987/Python | 2d3d660155241113b23e4ed810e05479b2fc4bba | [
"MIT"
] | 2 | 2021-03-22T17:01:30.000Z | 2021-08-12T17:06:12.000Z | """README, Author - Jigyasa Gandhi(mailto:jigsgandhi97@gmail.com)
Requirements:
- scikit-fuzzy
- numpy
- matplotlib
Python:
- 3.5
"""
import numpy as np
import skfuzzy as fuzz
if __name__ == "__main__":
# Create universe of discourse in Python using linspace ()
X = np.linspace(start=0, stop=75, num=75... | 26.961538 | 82 | 0.616619 |
795a8cef4cab09edebcf0ed7a03a55b0050f9701 | 23,345 | py | Python | scripts/nxutils.py | sailfly/nuxeo | 24aa96d078be77ce09973b08b38ee1498c0903bf | [
"Apache-2.0"
] | null | null | null | scripts/nxutils.py | sailfly/nuxeo | 24aa96d078be77ce09973b08b38ee1498c0903bf | [
"Apache-2.0"
] | null | null | null | scripts/nxutils.py | sailfly/nuxeo | 24aa96d078be77ce09973b08b38ee1498c0903bf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
(C) Copyright 2012-2013 Nuxeo SA (http://nuxeo.com/) and contributors.
All rights reserved. This program and the accompanying materials
are made available under the terms of the GNU Lesser General Public License
(LGPL) version 2.1 which accompanies this distribution, and is available at
http:... | 39.567797 | 120 | 0.612123 |
795a8d295f17c93092538799177e206f9211bb32 | 22,182 | py | Python | api_core/google/api_core/bidi.py | erikwebb/google-cloud-python | 288a878e9a07239015c78a193eca1cc15e926127 | [
"Apache-2.0"
] | 3 | 2019-03-03T14:16:17.000Z | 2020-01-22T20:39:11.000Z | api_core/google/api_core/bidi.py | erikwebb/google-cloud-python | 288a878e9a07239015c78a193eca1cc15e926127 | [
"Apache-2.0"
] | 1 | 2021-04-30T20:46:36.000Z | 2021-04-30T20:46:36.000Z | api_core/google/api_core/bidi.py | erikwebb/google-cloud-python | 288a878e9a07239015c78a193eca1cc15e926127 | [
"Apache-2.0"
] | 1 | 2020-11-15T11:44:36.000Z | 2020-11-15T11:44:36.000Z | # Copyright 2017, Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 36.908486 | 86 | 0.617392 |
795a8e63478e2a931c91b82db36f0cead58578a9 | 1,437 | py | Python | jdcloud_sdk/services/starshield/apis/ListCertificatePacksRequest.py | jdcloud-apigateway/jdcloud-sdk-python | 0886769bcf1fb92128a065ff0f4695be099571cc | [
"Apache-2.0"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | jdcloud_sdk/services/starshield/apis/ListCertificatePacksRequest.py | jdcloud-apigateway/jdcloud-sdk-python | 0886769bcf1fb92128a065ff0f4695be099571cc | [
"Apache-2.0"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | jdcloud_sdk/services/starshield/apis/ListCertificatePacksRequest.py | jdcloud-apigateway/jdcloud-sdk-python | 0886769bcf1fb92128a065ff0f4695be099571cc | [
"Apache-2.0"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | 29.326531 | 86 | 0.702853 |
795a8f20b4cd0fcd05adc31bbb77b6c1dfe6b3fc | 620 | py | Python | larousse_api/larousse.py | quentin-dev/larousse_api | 620a907415b0473abd6229c5bb773674781c071e | [
"MIT"
] | 3 | 2020-12-13T21:57:56.000Z | 2022-02-03T22:45:15.000Z | larousse_api/larousse.py | elydev01/larousse_api | 620a907415b0473abd6229c5bb773674781c071e | [
"MIT"
] | 5 | 2019-10-09T14:40:37.000Z | 2020-03-31T08:19:05.000Z | larousse_api/larousse.py | elydev01/larousse_api | 620a907415b0473abd6229c5bb773674781c071e | [
"MIT"
] | 2 | 2021-02-28T11:15:32.000Z | 2021-11-12T09:37:18.000Z | import requests
import re
import unicodedata
from bs4 import BeautifulSoup
def get_definitions(word):
"""
:param word: The word whose definition you are looking for
:return: A list containing all the definitions of word
"""
url = "https://www.larousse.fr/dictionnaires/francais/" + word.lower()
... | 34.444444 | 108 | 0.66129 |
795a8f734257d6a65fc1f5d2097134b51d0d5e20 | 898 | py | Python | openbts-python/setup.py | cclauss/CommunityCellularManager | 4a4e951b03380dcf5f16091d33bc52afbb3eca21 | [
"BSD-3-Clause"
] | 84 | 2016-11-03T20:51:09.000Z | 2018-09-13T04:36:18.000Z | openbts-python/setup.py | cclauss/CommunityCellularManager | 4a4e951b03380dcf5f16091d33bc52afbb3eca21 | [
"BSD-3-Clause"
] | 79 | 2016-11-10T06:30:58.000Z | 2018-06-01T14:29:39.000Z | openbts-python/setup.py | vbohinc/CommunityCellularManager | ab330fcb1bc70ee3a8e9bcdac2846ab6c327f87c | [
"BSD-3-Clause"
] | 37 | 2016-11-03T22:53:22.000Z | 2018-09-07T15:32:16.000Z | """
Copyright (c) 2016-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
"""
"""The openbts-python packa... | 21.902439 | 75 | 0.687082 |
795a8fad2a55fc2516589db8e81dd3ee9ea8ec4d | 5,594 | py | Python | intersight/models/task_ucs_task5_ref.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 21 | 2018-03-29T14:20:35.000Z | 2021-10-13T05:11:41.000Z | intersight/models/task_ucs_task5_ref.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 14 | 2018-01-30T15:45:46.000Z | 2022-02-23T14:23:21.000Z | intersight/models/task_ucs_task5_ref.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 18 | 2018-01-03T15:09:56.000Z | 2021-07-16T02:21:54.000Z | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-961
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class TaskUcsTask5Ref(object):
"""
NOTE: This class... | 30.736264 | 580 | 0.595459 |
795a9001970a5ea4321f9a07be5d5977684a56e8 | 3,136 | py | Python | maml_examples/cluster_maml_trpo_cheetah.py | chi6/Model-based-meta-learning-rl | fda134dcbd87ef3e91f339ea2f836f28ec5f7784 | [
"MIT"
] | 2 | 2019-09-10T10:13:20.000Z | 2020-07-17T01:37:27.000Z | maml_examples/cluster_maml_trpo_cheetah.py | chi6/Model-based-meta-learning-rl | fda134dcbd87ef3e91f339ea2f836f28ec5f7784 | [
"MIT"
] | null | null | null | maml_examples/cluster_maml_trpo_cheetah.py | chi6/Model-based-meta-learning-rl | fda134dcbd87ef3e91f339ea2f836f28ec5f7784 | [
"MIT"
] | null | null | null |
from sandbox.rocky.tf.algos.maml_trpo import MAMLTRPO
from rllab.baselines.linear_feature_baseline import LinearFeatureBaseline
from rllab.baselines.gaussian_mlp_baseline import GaussianMLPBaseline
from rllab.envs.mujoco.half_cheetah_env_rand import HalfCheetahEnvRand
from rllab.envs.mujoco.half_cheetah_env_rand_direc... | 29.037037 | 174 | 0.678253 |
795a908ea18e039c94c742cc3feee5df15c3ceca | 2,949 | py | Python | chemicaltoolbox/mordred/mordred_descriptors.py | pavanvidem/galaxytools | 339363f6c9d817bc2c35997b4dfdd3ca99a37055 | [
"MIT"
] | null | null | null | chemicaltoolbox/mordred/mordred_descriptors.py | pavanvidem/galaxytools | 339363f6c9d817bc2c35997b4dfdd3ca99a37055 | [
"MIT"
] | null | null | null | chemicaltoolbox/mordred/mordred_descriptors.py | pavanvidem/galaxytools | 339363f6c9d817bc2c35997b4dfdd3ca99a37055 | [
"MIT"
] | null | null | null | import argparse
import numpy as np
from mordred import Calculator, descriptors
from rdkit import Chem
from rdkit.Chem.rdmolfiles import SDMolSupplier
def convert_errors_to_nan(el):
"""
Remove elements from the Mordred dataframe which are not
in float or int format
"""
if type(el) == bool:
... | 30.091837 | 88 | 0.630722 |
795a91537634b5ee6ffe59a10855e1afd271e9e9 | 1,543 | py | Python | sunpy/util/sphinx/changelog.py | tacaswell/sunpy | 1e06d75408d1a621749a5d4e743ae44a31886100 | [
"BSD-2-Clause"
] | null | null | null | sunpy/util/sphinx/changelog.py | tacaswell/sunpy | 1e06d75408d1a621749a5d4e743ae44a31886100 | [
"BSD-2-Clause"
] | null | null | null | sunpy/util/sphinx/changelog.py | tacaswell/sunpy | 1e06d75408d1a621749a5d4e743ae44a31886100 | [
"BSD-2-Clause"
] | null | null | null | import tempfile
from docutils import statemachine
from docutils.parsers.rst import Directive
from sunpy.util.towncrier import generate_changelog_for_docs
__all__ = ['ChangeLog']
class ChangeLog(Directive):
"""
Render the changelog for the current commit using towncrier.
This directive renders all the ... | 27.553571 | 91 | 0.701231 |
795a922c6c3a6a5d1c9b0a8249fec81256ffb0ab | 14,276 | py | Python | src/flask/sessions.py | wnz27/flask | 950801e4d37e44f35cf6d76c9b261d1b4ea6f356 | [
"BSD-3-Clause"
] | 1 | 2019-05-31T14:00:53.000Z | 2019-05-31T14:00:53.000Z | src/flask/sessions.py | thnee/flask | c791f6312b092678c2a152d0605e49c26831cb05 | [
"BSD-3-Clause"
] | null | null | null | src/flask/sessions.py | thnee/flask | c791f6312b092678c2a152d0605e49c26831cb05 | [
"BSD-3-Clause"
] | null | null | null | import hashlib
import warnings
from collections.abc import MutableMapping
from datetime import datetime
from itsdangerous import BadSignature
from itsdangerous import URLSafeTimedSerializer
from werkzeug.datastructures import CallbackDict
from .helpers import is_ip
from .json.tag import TaggedJSONSerializer
class S... | 36.984456 | 84 | 0.650743 |
795a9247526bfca92fa858910a15da39810d2e98 | 18,706 | py | Python | bin/lesson_check.py | shandongfx/NIMBioSENM | 1c39779791d9570b89ebf5b1d7f96ce682e16b26 | [
"CC-BY-4.0"
] | 2 | 2019-09-27T10:36:40.000Z | 2021-02-25T19:24:19.000Z | bin/lesson_check.py | shandongfx/NIMBioSENM | 1c39779791d9570b89ebf5b1d7f96ce682e16b26 | [
"CC-BY-4.0"
] | null | null | null | bin/lesson_check.py | shandongfx/NIMBioSENM | 1c39779791d9570b89ebf5b1d7f96ce682e16b26 | [
"CC-BY-4.0"
] | 2 | 2020-07-19T14:18:10.000Z | 2020-11-24T00:47:53.000Z | #!/usr/bin/env python3
"""
Check lesson files and their contents.
"""
import os
import glob
import re
from argparse import ArgumentParser
from util import (Reporter, read_markdown, load_yaml, check_unwanted_files,
require)
__version__ = '0.3'
# Where to look for source Markdown files.
SOURCE_DIR... | 34.07286 | 103 | 0.560355 |
795a934bd340a64090dbec5a2387a56d309adee2 | 2,761 | py | Python | src/sparseml/keras/datasets/registry.py | clementpoiret/sparseml | 8442a6ef8ba11fb02f5e51472dd68b72438539b9 | [
"Apache-2.0"
] | 922 | 2021-02-04T17:51:54.000Z | 2022-03-31T20:49:26.000Z | src/sparseml/keras/datasets/registry.py | clementpoiret/sparseml | 8442a6ef8ba11fb02f5e51472dd68b72438539b9 | [
"Apache-2.0"
] | 197 | 2021-02-04T22:17:21.000Z | 2022-03-31T13:58:55.000Z | src/sparseml/keras/datasets/registry.py | clementpoiret/sparseml | 8442a6ef8ba11fb02f5e51472dd68b72438539b9 | [
"Apache-2.0"
] | 80 | 2021-02-04T22:20:14.000Z | 2022-03-30T19:36:15.000Z | # Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 32.104651 | 80 | 0.624049 |
795a93929fb072cbdc0e711dbb1238260072c5de | 1,104 | py | Python | comet_plugin/comet/plugins/add_to_celery_queue.py | 4pisky/fourpisky-core | 1dc9c4f73dfef075e2a27c3c8453d811a5a99e58 | [
"BSD-2-Clause"
] | 2 | 2016-08-25T22:20:58.000Z | 2018-11-18T21:16:11.000Z | comet_plugin/comet/plugins/add_to_celery_queue.py | 4pisky/fourpisky-core | 1dc9c4f73dfef075e2a27c3c8453d811a5a99e58 | [
"BSD-2-Clause"
] | 2 | 2016-11-01T14:10:58.000Z | 2016-11-01T14:11:39.000Z | comet_plugin/comet/plugins/add_to_celery_queue.py | 4pisky/fourpisky-core | 1dc9c4f73dfef075e2a27c3c8453d811a5a99e58 | [
"BSD-2-Clause"
] | null | null | null | # Defines a plugin for the Comet broker.
# If top-level directory 'comet_plugin' is added to $PYTHONPATH then comet
# will detect this module at import-time.
import os
from zope.interface import implementer
from twisted.plugin import IPlugin
from comet.icomet import IHandler, IHasOptions
import comet.log as log
from ... | 30.666667 | 74 | 0.711957 |
795a9393037a0b3328e5e3c9c210c3b8c9ac79af | 1,354 | py | Python | pokershell/tests/eval/test_context.py | fblaha/pokershell | 36a3bfff6ead7fef175e430dfdb88ac6f6a31d1f | [
"Apache-2.0"
] | 6 | 2016-05-13T07:39:37.000Z | 2022-03-05T07:23:46.000Z | pokershell/tests/eval/test_context.py | fblaha/pokershell | 36a3bfff6ead7fef175e430dfdb88ac6f6a31d1f | [
"Apache-2.0"
] | 1 | 2017-12-18T09:08:28.000Z | 2017-12-31T01:48:32.000Z | pokershell/tests/eval/test_context.py | fblaha/pokershell | 36a3bfff6ead7fef175e430dfdb88ac6f6a31d1f | [
"Apache-2.0"
] | 5 | 2016-10-11T23:54:35.000Z | 2022-03-05T07:23:47.000Z | import unittest
import pokershell.model as model
import pokershell.tests.eval.common as common
class TestEvalContext(unittest.TestCase, common.TestUtilsMixin):
def setUp(self):
super().setUp()
self.ctx = self.create_context('2h 2c 2d 5h Jh Jc')
def test_rank_dict(self):
self.assertEq... | 41.030303 | 78 | 0.655835 |
795a93c3e5229eb4e6f5a5c3186553eb0052991f | 4,054 | py | Python | integrationtest/vm/virtualrouter/eip/test_2_eips.py | sherry546/zstack-woodpecker | 54a37459f2d72ce6820974feaa6eb55772c3d2ce | [
"Apache-2.0"
] | 1 | 2021-03-21T12:41:11.000Z | 2021-03-21T12:41:11.000Z | integrationtest/vm/virtualrouter/eip/test_2_eips.py | sherry546/zstack-woodpecker | 54a37459f2d72ce6820974feaa6eb55772c3d2ce | [
"Apache-2.0"
] | null | null | null | integrationtest/vm/virtualrouter/eip/test_2_eips.py | sherry546/zstack-woodpecker | 54a37459f2d72ce6820974feaa6eb55772c3d2ce | [
"Apache-2.0"
] | 1 | 2017-05-19T06:40:40.000Z | 2017-05-19T06:40:40.000Z | '''
Test create 2 EIPs for 2 Vms in same L3 Network. So 2 VIPs will be setup in same VR
, then check if 2 VM could use VIP to connect each other.
Test step:
1. Create 2 VMs
2. Create a EIP with VM's nic each
3. Check the 2 EIPs connectibility
4. Destroy VMs
@author: Youyk
'''
import zst... | 35.561404 | 84 | 0.681302 |
795a95e953e06912b18eb468361301249af57d5e | 202 | py | Python | text_to_speech.py | Atulbargotra/smart_driving | 7356b468260c1f102528df702c412f3e9cbd74d5 | [
"MIT"
] | 4 | 2020-02-21T18:25:38.000Z | 2021-11-14T20:23:15.000Z | text_to_speech.py | Atulbargotra/smart_driving | 7356b468260c1f102528df702c412f3e9cbd74d5 | [
"MIT"
] | 3 | 2020-02-21T17:58:58.000Z | 2020-02-21T17:58:59.000Z | text_to_speech.py | Atulbargotra/smart_driving | 7356b468260c1f102528df702c412f3e9cbd74d5 | [
"MIT"
] | 4 | 2020-02-21T18:25:43.000Z | 2021-01-13T10:04:20.000Z | from gtts import gTTS
import playsound
def speak(text_input,language='hi'):
tts = gTTS(text=text_input, lang=language)
tts.save("sounds/output.mp3")
playsound.playsound('sounds/output.mp3')
| 28.857143 | 46 | 0.737624 |
795a969aa3575ade5de46b5eee98a0286e6e4d22 | 193 | py | Python | 01_Fernando/input_hub/log/logging.py | mlobf/new_pandas_course | ecf0ea529b22422a7e97719b89ba9037d0fb2be7 | [
"BSD-3-Clause"
] | null | null | null | 01_Fernando/input_hub/log/logging.py | mlobf/new_pandas_course | ecf0ea529b22422a7e97719b89ba9037d0fb2be7 | [
"BSD-3-Clause"
] | null | null | null | 01_Fernando/input_hub/log/logging.py | mlobf/new_pandas_course | ecf0ea529b22422a7e97719b89ba9037d0fb2be7 | [
"BSD-3-Clause"
] | null | null | null | import logging
logging.warning('This is a warnning')
#basicConfig(filename='sample.log', level=logging.DEBUG)
#logger = logging.getLogger()
# Test logger
#logger.info("Our fist message")
| 14.846154 | 56 | 0.740933 |
795a96a562ee75433ad08c3ab972d381cc06c540 | 6,781 | py | Python | src/models/tsvgp_sites.py | AaltoML/t-SVGP | bfa6119ad071ca191d7a413e09b33811c18be533 | [
"MIT"
] | 4 | 2021-11-10T21:53:16.000Z | 2021-11-11T08:39:11.000Z | src/models/tsvgp_sites.py | AaltoML/t-SVGP | bfa6119ad071ca191d7a413e09b33811c18be533 | [
"MIT"
] | 1 | 2021-11-07T18:56:49.000Z | 2021-11-07T18:56:49.000Z | src/models/tsvgp_sites.py | AaltoML/t-SVGP | bfa6119ad071ca191d7a413e09b33811c18be533 | [
"MIT"
] | null | null | null | """
Module for the t-SVGP models with individual sites per data point.
"""
from typing import Optional
import numpy as np
import tensorflow as tf
from gpflow import default_jitter, kullback_leiblers
from gpflow.conditionals import conditional
from gpflow.covariances import Kuf, Kuu
from gpflow.models import GPModel
fr... | 35.317708 | 99 | 0.620557 |
795a9726cabaf8e22639fa8b878c30be4aa6d47f | 241 | py | Python | simple_flask/views/account.py | gavinliu4011/simple_flask | 31139e702b72f31e79f837413ce7bb53f53ce89f | [
"Apache-2.0"
] | null | null | null | simple_flask/views/account.py | gavinliu4011/simple_flask | 31139e702b72f31e79f837413ce7bb53f53ce89f | [
"Apache-2.0"
] | null | null | null | simple_flask/views/account.py | gavinliu4011/simple_flask | 31139e702b72f31e79f837413ce7bb53f53ce89f | [
"Apache-2.0"
] | null | null | null | from flask import Blueprint
from flask import render_template
from flask import request
account = Blueprint('account', __name__)
@account.route('/login.html', methods=['GET', "POST"])
def login():
return render_template('login.html')
| 21.909091 | 54 | 0.746888 |
795a996a31e95c116b11a47be8f982629158cf27 | 3,558 | py | Python | tests/util.py | lene/haeqs_ml | 572a69e6e93f262a1708d6c72ac64bec4af6f791 | [
"BSD-2-Clause"
] | null | null | null | tests/util.py | lene/haeqs_ml | 572a69e6e93f262a1708d6c72ac64bec4af6f791 | [
"BSD-2-Clause"
] | null | null | null | tests/util.py | lene/haeqs_ml | 572a69e6e93f262a1708d6c72ac64bec4af6f791 | [
"BSD-2-Clause"
] | null | null | null | from data_sets.images_labels_data_set import DataSetBase
from data_sets.data_sets import DataSets
import numpy
__author__ = 'Lene Preuss <lene.preuss@gmail.com>'
MINIMAL_INPUT_SIZE = 2
MINIMAL_LAYER_GEOMETRY = (2, 2)
MINIMAL_OUTPUT_SIZE = 2
MINIMAL_BATCH_SIZE = 2
def create_minimal_input_placeholder():
return ... | 31.486726 | 109 | 0.669758 |
795a9a24a2265068119948eca50bc7a8a5070c30 | 2,321 | py | Python | pwn/rop_emporium/03-callme/32-bit/exploit.py | An00bRektn/CTF | f009b8dee93dfc28a1e3f335f8997a74b2cad653 | [
"MIT"
] | null | null | null | pwn/rop_emporium/03-callme/32-bit/exploit.py | An00bRektn/CTF | f009b8dee93dfc28a1e3f335f8997a74b2cad653 | [
"MIT"
] | null | null | null | pwn/rop_emporium/03-callme/32-bit/exploit.py | An00bRektn/CTF | f009b8dee93dfc28a1e3f335f8997a74b2cad653 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from pwn import *
# Allows you to switch between local/GDB/remote from terminal
def start(argv=[], *a, **kw):
if args.GDB: # Set GDBscript below
return gdb.debug([exe] + argv, gdbscript=gdbscript, *a, **kw)
elif args.REMOTE: # ('server', 'port')
return remote(sys.argv[1], s... | 27.305882 | 98 | 0.609651 |
795a9af0307b379c3c302a945fd2048a78805144 | 715 | py | Python | python/packages/isce3/geometry/Geo2rdr.py | piyushrpt/isce3 | 1741af321470cb5939693459765d11a19c5c6fc2 | [
"Apache-2.0"
] | null | null | null | python/packages/isce3/geometry/Geo2rdr.py | piyushrpt/isce3 | 1741af321470cb5939693459765d11a19c5c6fc2 | [
"Apache-2.0"
] | null | null | null | python/packages/isce3/geometry/Geo2rdr.py | piyushrpt/isce3 | 1741af321470cb5939693459765d11a19c5c6fc2 | [
"Apache-2.0"
] | null | null | null | #-*- coding: utf-8 -*-
#
# Heresh Fattahi, Bryan Riel
# Copyright 2019-
# The extensions
from .. import isceextension
class Geo2rdr(isceextension.pyGeo2rdr):
"""
Wrapper for Geo2rdr
"""
pass
def geo2rdr_point(lonlatheight,
ellipsoid,
orbit,
doppler,
wav... | 19.861111 | 55 | 0.584615 |
795a9c93aee2c7573c24d437de7b58ace7a20c39 | 875 | py | Python | trac/notification/tests/__init__.py | clubturbo/Trac-1.4.2 | 254ce54a3c2fb86b4f31810ddeabbd4ff8b54a78 | [
"BSD-3-Clause"
] | null | null | null | trac/notification/tests/__init__.py | clubturbo/Trac-1.4.2 | 254ce54a3c2fb86b4f31810ddeabbd4ff8b54a78 | [
"BSD-3-Clause"
] | null | null | null | trac/notification/tests/__init__.py | clubturbo/Trac-1.4.2 | 254ce54a3c2fb86b4f31810ddeabbd4ff8b54a78 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2020 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://trac.edgewall.org/wiki/TracLicense.
#
# This soft... | 29.166667 | 68 | 0.709714 |
795a9d7ba286ea0359a3fd23df307d61380e61bc | 324 | py | Python | tests/system/brbeat.py | mlositsky/brbeat | b9858c3b2e7fbd689f8f043edfb876bfe6de7b9a | [
"Apache-2.0"
] | null | null | null | tests/system/brbeat.py | mlositsky/brbeat | b9858c3b2e7fbd689f8f043edfb876bfe6de7b9a | [
"Apache-2.0"
] | null | null | null | tests/system/brbeat.py | mlositsky/brbeat | b9858c3b2e7fbd689f8f043edfb876bfe6de7b9a | [
"Apache-2.0"
] | null | null | null | import sys
sys.path.append('../../vendor/github.com/elastic/beats/libbeat/tests/system')
from beat.beat import TestCase
class BaseTest(TestCase):
@classmethod
def setUpClass(self):
self.beat_name = "brbeat"
self.build_path = "../../build/system-tests/"
self.beat_path = "../../brbeat.te... | 27 | 77 | 0.660494 |
795a9e2edef673bb75564472c51a3d3dd00bf5a3 | 3,992 | py | Python | alipay/aop/api/request/AlipayDataIotdataDataDetailQueryRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayDataIotdataDataDetailQueryRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayDataIotdataDataDetailQueryRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"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.AlipayDataIotdataDataDetailQueryModel import AlipayDataIotdataDataDetailQueryModel
class AlipayDataIotdataDataDetailQueryRequest(obj... | 27.531034 | 148 | 0.646293 |
795a9e3661ec107f0ad658d721067a3093373064 | 107,486 | py | Python | libs/fitz/utils.py | rocketbot-cl/Pdf2Jpg | 2ea2b89af51ea77e73bbfe4f6b47d18028d8e2d8 | [
"MIT"
] | null | null | null | libs/fitz/utils.py | rocketbot-cl/Pdf2Jpg | 2ea2b89af51ea77e73bbfe4f6b47d18028d8e2d8 | [
"MIT"
] | null | null | null | libs/fitz/utils.py | rocketbot-cl/Pdf2Jpg | 2ea2b89af51ea77e73bbfe4f6b47d18028d8e2d8 | [
"MIT"
] | 1 | 2022-03-29T15:36:24.000Z | 2022-03-29T15:36:24.000Z | from __future__ import division
from fitz import *
import math
import os
import warnings
import io
"""
The following is a collection of functions to extend PyMupdf.
"""
def showPDFpage(
page,
rect,
src,
pno=0,
overlay=True,
keep_proportion=True,
rotate=0,
... | 36.734792 | 203 | 0.492287 |
795a9fcfcd2c53197c31c0c6904812fa36cba2a7 | 2,457 | py | Python | darts/tests/test_transformer.py | LeoTafti/darts | 210605fafb730de564e3d723ab3919ed94da42b9 | [
"Apache-2.0"
] | null | null | null | darts/tests/test_transformer.py | LeoTafti/darts | 210605fafb730de564e3d723ab3919ed94da42b9 | [
"Apache-2.0"
] | null | null | null | darts/tests/test_transformer.py | LeoTafti/darts | 210605fafb730de564e3d723ab3919ed94da42b9 | [
"Apache-2.0"
] | null | null | null | import unittest
import logging
import numpy as np
from sklearn.preprocessing import MinMaxScaler, StandardScaler
from ..preprocessing import ScalerWrapper
from ..utils import timeseries_generation as tg
class TransformerTestCase(unittest.TestCase):
__test__ = True
series1 = tg.random_walk_timeseries(length=... | 44.672727 | 109 | 0.726496 |
795a9fe6a8cbac736c6591b593f8010cd49119a3 | 22,210 | py | Python | leetcode-crawler.py | liuyang2356/leetcode-crawler | cdb9fca7e97fb00c00295c7db68d8bd6ff491461 | [
"MIT"
] | 35 | 2019-04-17T07:37:37.000Z | 2022-01-26T07:19:17.000Z | leetcode-crawler.py | liuyang2356/leetcode-crawler | cdb9fca7e97fb00c00295c7db68d8bd6ff491461 | [
"MIT"
] | 4 | 2020-04-07T15:22:21.000Z | 2022-01-23T21:41:39.000Z | leetcode-crawler.py | liuyang2356/leetcode-crawler | cdb9fca7e97fb00c00295c7db68d8bd6ff491461 | [
"MIT"
] | 18 | 2019-08-25T14:45:32.000Z | 2022-02-27T15:46:41.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sqlite3
import json
import traceback
import html2text
import os
import requests
from requests_toolbelt import MultipartEncoder
import random,time
import re
import argparse,sys
import threading
db_path = 'leetcode.db'
user_agent = r'Mozilla/5.0 (Windows NT 6.1; WOW... | 41.282528 | 187 | 0.492076 |
795aa14b199c3b47d6aa5b76caecfc3031f3d053 | 1,190 | py | Python | tests/test_rays.py | toku345/RayTracerChallenge_Python | 40ced097f92cc61b116d24c6d6c4f27d6b13029d | [
"MIT"
] | 1 | 2020-05-13T20:54:01.000Z | 2020-05-13T20:54:01.000Z | tests/test_rays.py | toku345/RayTracerChallenge_Python | 40ced097f92cc61b116d24c6d6c4f27d6b13029d | [
"MIT"
] | null | null | null | tests/test_rays.py | toku345/RayTracerChallenge_Python | 40ced097f92cc61b116d24c6d6c4f27d6b13029d | [
"MIT"
] | null | null | null | from raytracerchallenge_python.ray import Ray
from raytracerchallenge_python.transformations import translation, scaling
from raytracerchallenge_python.tuple import Point, Vector
def test_creating_and_querying_a_ray():
# Given
origin = Point(1, 2, 3)
direction = Vector(4, 5, 6)
# When
r = Ray(orig... | 25.319149 | 74 | 0.617647 |
795aa153df84bd95205ccc21208432b0e1e32e27 | 3,890 | py | Python | backoffice/web/grant_management/tests/helpers.py | uktrade/trade-access-program | 8fb565e96de7d7bb0bde31255aef0f291063e93c | [
"MIT"
] | 1 | 2021-03-04T15:24:12.000Z | 2021-03-04T15:24:12.000Z | backoffice/web/grant_management/tests/helpers.py | uktrade/trade-access-program | 8fb565e96de7d7bb0bde31255aef0f291063e93c | [
"MIT"
] | 7 | 2020-08-24T13:27:02.000Z | 2021-06-09T18:42:31.000Z | backoffice/web/grant_management/tests/helpers.py | uktrade/trade-access-program | 8fb565e96de7d7bb0bde31255aef0f291063e93c | [
"MIT"
] | 1 | 2021-05-20T07:40:00.000Z | 2021-05-20T07:40:00.000Z | from django.urls import reverse
from django.utils import timezone
from rest_framework.status import HTTP_200_OK
from web.grant_management.flows import GrantManagementFlow
from web.grant_management.models import GrantManagementProcess
class GrantManagementFlowTestHelper:
DEFAULT_TASK_PAYLOADS = {
'verify_... | 39.292929 | 88 | 0.648329 |
795aa1ff0722ed94c27600d2294b02735525a03d | 3,905 | py | Python | setup.py | Jacquelinevv0693/py-libp2p | e5f7aecce0eec78082d7bc8c439d57fbc93a693f | [
"Apache-2.0",
"MIT"
] | 315 | 2019-02-13T01:29:09.000Z | 2022-03-28T13:44:07.000Z | setup.py | Jacquelinevv0693/py-libp2p | e5f7aecce0eec78082d7bc8c439d57fbc93a693f | [
"Apache-2.0",
"MIT"
] | 249 | 2019-02-22T05:00:07.000Z | 2022-03-29T16:30:46.000Z | setup.py | Jacquelinevv0693/py-libp2p | e5f7aecce0eec78082d7bc8c439d57fbc93a693f | [
"Apache-2.0",
"MIT"
] | 77 | 2019-02-24T19:45:17.000Z | 2022-03-30T03:20:09.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import find_packages, setup
extras_require = {
"test": [
"pytest>=4.6.3,<5.0.0",
"pytest-xdist>=1.30.0",
"pytest-trio>=0.5.2",
"factory-boy>=2.12.0,<3.0.0",
],
"lint": [
"flake8==3.7.9", # flak... | 31.747967 | 98 | 0.616389 |
795aa2648dcf8a74f86b25c4a1ae2f927f202bc2 | 795 | py | Python | scripts/give_id_reduced.py | klaricch/Transposons2 | a0f216e7a3ad8c462706237953325ad0b13a5646 | [
"MIT"
] | 1 | 2018-04-17T16:48:04.000Z | 2018-04-17T16:48:04.000Z | scripts/give_id_reduced.py | klaricch/Transposons2 | a0f216e7a3ad8c462706237953325ad0b13a5646 | [
"MIT"
] | null | null | null | scripts/give_id_reduced.py | klaricch/Transposons2 | a0f216e7a3ad8c462706237953325ad0b13a5646 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import re
in_one="/lscr2/andersenlab/kml436/git_repos2/Transposons2/results/final_results/T_kin_C_matrix_full_reduced.txt"
OUT_ONE=open("/lscr2/andersenlab/kml436/git_repos2/Transposons2/results/final_results/T_kin_C_matrix_full_id_reduced.txt", 'w')
MASTER_ONE=open("/lscr2/andersenlab/kml436/gi... | 28.392857 | 134 | 0.733333 |
795aa4f158e93ed867a049daf24ec5d9aca3a097 | 6,126 | py | Python | python/gdata/tests/atom_tests/http_core_test.py | vlinhd11/vlinhd11-android-scripting | c90f04eb26a3746f025a6a0beab92bb6aa88c084 | [
"Apache-2.0"
] | 2,293 | 2015-01-02T12:46:10.000Z | 2022-03-29T09:45:43.000Z | python/gdata/tests/atom_tests/http_core_test.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 315 | 2015-05-31T11:55:46.000Z | 2022-01-12T08:36:37.000Z | python/gdata/tests/atom_tests/http_core_test.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 1,033 | 2015-01-04T07:48:40.000Z | 2022-03-24T09:34:37.000Z | #!/usr/bin/env python
#
# Copyright (C) 2009 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... | 40.039216 | 77 | 0.68446 |
795aa67248f66e72f8f772845c4ca5b2b1b06d3d | 42,643 | py | Python | tensorflow/python/kernel_tests/init_ops_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/kernel_tests/init_ops_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/kernel_tests/init_ops_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # Copyright 2015 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... | 39.484259 | 80 | 0.658373 |
795aa716de8a59aaf48ad8674900ae0e3b5bd283 | 133 | py | Python | sheet/urls.py | metadeng/LVTUBEN_CD_TOOLKIL | 217e78974b171276d69fcc8f75719be44c218c9d | [
"MIT"
] | null | null | null | sheet/urls.py | metadeng/LVTUBEN_CD_TOOLKIL | 217e78974b171276d69fcc8f75719be44c218c9d | [
"MIT"
] | 11 | 2020-02-12T00:14:11.000Z | 2022-03-11T23:46:37.000Z | sheet/urls.py | metadeng/LVTUBEN_CD_TOOLKIL | 217e78974b171276d69fcc8f75719be44c218c9d | [
"MIT"
] | null | null | null | from django.urls import path
from sheet import views
app_name = 'sheet'
urlpatterns = [
path('', views.index, name='index'),
]
| 14.777778 | 40 | 0.684211 |
795aa7ae04ef88c6b8c48e573fe43dc6312f65a9 | 3,991 | py | Python | tests/unit/sync/io/conftest.py | polyrize/neo4j-python-driver | 1ed96f94a7a59f49c473dadbb81715dc9651db98 | [
"Apache-2.0"
] | null | null | null | tests/unit/sync/io/conftest.py | polyrize/neo4j-python-driver | 1ed96f94a7a59f49c473dadbb81715dc9651db98 | [
"Apache-2.0"
] | null | null | null | tests/unit/sync/io/conftest.py | polyrize/neo4j-python-driver | 1ed96f94a7a59f49c473dadbb81715dc9651db98 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) "Neo4j"
# Neo4j Sweden AB [https://neo4j.com]
#
# This file is part of Neo4j.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2... | 25.420382 | 86 | 0.625658 |
795aa7cd6edd0197fe46cf8128288d33dff0951d | 1,428 | py | Python | setup.py | nodemash/safetyfirst | dab50ae7084e838d42a2617d94b83da958dcb615 | [
"MIT"
] | null | null | null | setup.py | nodemash/safetyfirst | dab50ae7084e838d42a2617d94b83da958dcb615 | [
"MIT"
] | null | null | null | setup.py | nodemash/safetyfirst | dab50ae7084e838d42a2617d94b83da958dcb615 | [
"MIT"
] | null | null | null | import setuptools
from safetyfirst.version import Version
install_requires = [
'pytest',
'pytest-cov',
'ndg-httpsclient',
'pyopenssl',
'pyasn1'
]
setuptools.setup(
name='safetyfirst',
version=Version('1.0.0').number,
description='Python SSL Checker',
long_description=open('README.m... | 30.382979 | 84 | 0.618347 |
795aa80d1fa73162de1cb85592f768632e048870 | 945 | py | Python | setup.py | copyit/AnyAPI | 528109878a16a29c4cf7ff20b2dfaee8d2234a13 | [
"MIT"
] | null | null | null | setup.py | copyit/AnyAPI | 528109878a16a29c4cf7ff20b2dfaee8d2234a13 | [
"MIT"
] | null | null | null | setup.py | copyit/AnyAPI | 528109878a16a29c4cf7ff20b2dfaee8d2234a13 | [
"MIT"
] | null | null | null | import pathlib
from setuptools import setup
# The directory containing this file
HERE = pathlib.Path(__file__).parent
# The text of the README file
README = (HERE / "README.md").read_text()
# This call to setup() does all the work
setup(
name="anyapi",
version="1.1.701",
description="An API Wrapper For E... | 29.53125 | 60 | 0.648677 |
795aa93e431a800f272e05a0f648f4fb868aae61 | 2,100 | py | Python | test/plugins/test_flake8_lint.py | borisbarath/python-language-server | b03f2d791e0ed66d5f1cc544869c0383cfdc3d9d | [
"MIT"
] | null | null | null | test/plugins/test_flake8_lint.py | borisbarath/python-language-server | b03f2d791e0ed66d5f1cc544869c0383cfdc3d9d | [
"MIT"
] | null | null | null | test/plugins/test_flake8_lint.py | borisbarath/python-language-server | b03f2d791e0ed66d5f1cc544869c0383cfdc3d9d | [
"MIT"
] | null | null | null | # Copyright 2019 Palantir Technologies, Inc.
import tempfile
import os
from test.test_utils import MockWorkspace
from mock import patch
from pyls import lsp, uris
from pyls.plugins import flake8_lint
from pyls.workspace import Document
DOC_URI = uris.from_fs_path(__file__)
DOC = """import pyls
t = "TEST"
def using_... | 30.434783 | 78 | 0.672857 |
795aa94402e3cf6ef1b52a545714917549c9886a | 1,394 | py | Python | web_console_v2/api/migrations/versions/1c9f8c908061_initial_migration.py | zhenv5/fedlearner | a8ff0eaef48e174d432a40d23d12c1f57e842ebd | [
"Apache-2.0"
] | null | null | null | web_console_v2/api/migrations/versions/1c9f8c908061_initial_migration.py | zhenv5/fedlearner | a8ff0eaef48e174d432a40d23d12c1f57e842ebd | [
"Apache-2.0"
] | null | null | null | web_console_v2/api/migrations/versions/1c9f8c908061_initial_migration.py | zhenv5/fedlearner | a8ff0eaef48e174d432a40d23d12c1f57e842ebd | [
"Apache-2.0"
] | null | null | null | """Initial migration.
Revision ID: 1c9f8c908061
Revises:
Create Date: 2020-11-25 16:57:46.699205
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1c9f8c908061'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto... | 30.977778 | 89 | 0.685079 |
795aa95db417c81433e90c183d0f6c2be14c92cc | 12,143 | py | Python | renku/core/management/migrate.py | TaoSunVoyage/renku-python | 858fe84ce2925a49d9b62638dc601f581e24353e | [
"Apache-2.0"
] | null | null | null | renku/core/management/migrate.py | TaoSunVoyage/renku-python | 858fe84ce2925a49d9b62638dc601f581e24353e | [
"Apache-2.0"
] | null | null | null | renku/core/management/migrate.py | TaoSunVoyage/renku-python | 858fe84ce2925a49d9b62638dc601f581e24353e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2017-2021 - Swiss Data Science Center (SDSC)
# A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and
# Eidgenössische Technische Hochschule Zürich (ETHZ).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in c... | 35.926036 | 120 | 0.688627 |
795aab1b23393cb1ec478a592131034f8ce34e08 | 1,946 | py | Python | benchmarks/perf-tool/okpt/io/config/parsers/base.py | martin-gaievski/k-NN | 77353512c1f15e0dc996428a982941a7ee3036fb | [
"Apache-2.0"
] | 44 | 2021-04-20T18:06:56.000Z | 2022-03-31T00:59:07.000Z | benchmarks/perf-tool/okpt/io/config/parsers/base.py | martin-gaievski/k-NN | 77353512c1f15e0dc996428a982941a7ee3036fb | [
"Apache-2.0"
] | 227 | 2021-04-21T12:21:46.000Z | 2022-03-31T22:43:04.000Z | benchmarks/perf-tool/okpt/io/config/parsers/base.py | martin-gaievski/k-NN | 77353512c1f15e0dc996428a982941a7ee3036fb | [
"Apache-2.0"
] | 31 | 2021-04-21T02:18:09.000Z | 2022-03-25T23:47:17.000Z | # SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
"""Base Parser class.
Classes:
BaseParser: Base class for config parsers.
Exceptions:
ConfigurationError: An error in... | 28.617647 | 82 | 0.715827 |
795aab52a3db8a7f3584a0057803cac3eb701128 | 7,417 | py | Python | mindspore/ops/_op_impl/_custom_op/fake_quant_perchannel_grad.py | i4oolish/mindspore | dac3be31d0f2c0a3516200f47af30980e566601b | [
"Apache-2.0"
] | 2 | 2020-08-12T16:14:40.000Z | 2020-12-04T03:05:57.000Z | mindspore/ops/_op_impl/_custom_op/fake_quant_perchannel_grad.py | dilingsong/mindspore | 4276050f2494cfbf8682560a1647576f859991e8 | [
"Apache-2.0"
] | null | null | null | mindspore/ops/_op_impl/_custom_op/fake_quant_perchannel_grad.py | dilingsong/mindspore | 4276050f2494cfbf8682560a1647576f859991e8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 41.903955 | 109 | 0.687205 |
795aabe00048f14b4cc81151100147c494a5b0cc | 272 | py | Python | rama_aluminium/config/serial_no_dashboard.py | ashish-greycube/rama_aluminium | 0eb1d39a16e79bb8a1a3e7c5b62252b916dad2ad | [
"MIT"
] | null | null | null | rama_aluminium/config/serial_no_dashboard.py | ashish-greycube/rama_aluminium | 0eb1d39a16e79bb8a1a3e7c5b62252b916dad2ad | [
"MIT"
] | null | null | null | rama_aluminium/config/serial_no_dashboard.py | ashish-greycube/rama_aluminium | 0eb1d39a16e79bb8a1a3e7c5b62252b916dad2ad | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from frappe import _
def get_data(data):
return {
'fieldname': 'serial_no',
'non_standard_fieldnames': {
'Daily Press':'die'
},
'transactions': [
{
'items': ['Daily Press']
},
]
} | 18.133333 | 39 | 0.569853 |
795aac98c56bff148027a0c082fc0d1efbe348f7 | 772 | py | Python | exer1/task4.py | farhad200013/machine_learning | 9ce27650f677246783e04299b1565d6f2106c3e6 | [
"MIT"
] | null | null | null | exer1/task4.py | farhad200013/machine_learning | 9ce27650f677246783e04299b1565d6f2106c3e6 | [
"MIT"
] | null | null | null | exer1/task4.py | farhad200013/machine_learning | 9ce27650f677246783e04299b1565d6f2106c3e6 | [
"MIT"
] | 1 | 2020-08-19T20:50:04.000Z | 2020-08-19T20:50:04.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Jan 12 15:25:14 2017
@author: aliTakin
"""
# this is task 4
from scipy.io import loadmat
import matplotlib.pyplot as plt
import numpy as np
mat = loadmat(r"C:\Users\aliTakin\Desktop\4.92\sgn_41007\twoClassData.mat")
print(mat.keys()) # Which variables mat contains?
X = ... | 20.315789 | 75 | 0.61658 |
795aad7a46b047e0255a38b5330184156872b484 | 11,903 | py | Python | swiss_army_keras/_model_r2_unet_2d.py | desmoteo/swiss-army-keras | 811d5991cb6d7d9808e57617a24b501479a78b86 | [
"MIT"
] | 1 | 2022-02-23T13:54:22.000Z | 2022-02-23T13:54:22.000Z | swiss_army_keras/_model_r2_unet_2d.py | waterviewsrl/swiss-army-keras | 49578f1a45761229756a8adbfcf692728039dc3b | [
"MIT"
] | null | null | null | swiss_army_keras/_model_r2_unet_2d.py | waterviewsrl/swiss-army-keras | 49578f1a45761229756a8adbfcf692728039dc3b | [
"MIT"
] | null | null | null |
from __future__ import absolute_import
from swiss_army_keras.layer_utils import *
from swiss_army_keras.activations import GELU, Snake
from tensorflow.keras.layers import Input
from tensorflow.keras.models import Model
def RR_CONV(X, channel, kernel_size=3, stack_num=2, recur_num=2, activation='ReLU', batch_norm=Fa... | 42.510714 | 126 | 0.625305 |
795ab08eb809edc62b5300b19cfdf01e5bee9c9d | 1,024 | py | Python | __init__.py | Ryize/it-news | a77f5ba37d665d902f229e6411145050db93e5c9 | [
"Apache-2.0"
] | 2 | 2021-12-20T16:57:41.000Z | 2021-12-20T17:00:19.000Z | __init__.py | Ryize/it-news | a77f5ba37d665d902f229e6411145050db93e5c9 | [
"Apache-2.0"
] | null | null | null | __init__.py | Ryize/it-news | a77f5ba37d665d902f229e6411145050db93e5c9 | [
"Apache-2.0"
] | null | null | null | from flask import Flask, flash, redirect, render_template, request, url_for, session, escape, make_response
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager, UserMixin
from flask_login import login_user, login_required, logout_user
from loguru import logger
from hashlib import md5
from email... | 32 | 107 | 0.801758 |
795ab0b7666874ff0199b44cef73460aad9dda81 | 213 | py | Python | airzus/urls.py | allenamusin/metadata-verifier | 7b2c61c231c49c722d1db9c9e83f157b6e2439f4 | [
"MIT"
] | null | null | null | airzus/urls.py | allenamusin/metadata-verifier | 7b2c61c231c49c722d1db9c9e83f157b6e2439f4 | [
"MIT"
] | 11 | 2020-02-12T03:26:35.000Z | 2022-02-10T12:01:00.000Z | airzus/urls.py | allenamusin/metadata-verifier | 7b2c61c231c49c722d1db9c9e83f157b6e2439f4 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('accounts/', include('allauth.urls')),
path('', include('pages.urls')),
]
| 23.666667 | 47 | 0.666667 |
795ab33683b1ef997151102034bf0e566cdaa2d3 | 22,126 | py | Python | sstar/cal_pvalue.py | admixVIE/sstar | 58db7647612cd6801a3570681e1f5a240d9c7050 | [
"Apache-2.0"
] | null | null | null | sstar/cal_pvalue.py | admixVIE/sstar | 58db7647612cd6801a3570681e1f5a240d9c7050 | [
"Apache-2.0"
] | null | null | null | sstar/cal_pvalue.py | admixVIE/sstar | 58db7647612cd6801a3570681e1f5a240d9c7050 | [
"Apache-2.0"
] | null | null | null | # Apache License Version 2.0
# Copyright 2022 Xin Huang
#
# 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... | 45.904564 | 329 | 0.688963 |
795ab3cd1e8b3e197c0f3913cce9aa11b2269378 | 183 | py | Python | toys/urls.py | Zoki92/DRF-toys | e0f59f5fecd94035eb0dc68dbd1e9e4591b344dc | [
"MIT"
] | null | null | null | toys/urls.py | Zoki92/DRF-toys | e0f59f5fecd94035eb0dc68dbd1e9e4591b344dc | [
"MIT"
] | null | null | null | toys/urls.py | Zoki92/DRF-toys | e0f59f5fecd94035eb0dc68dbd1e9e4591b344dc | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('toys/', views.toy_list, name="toy_list"),
path('toys/<int:pk>', views.toy_detail, name="toy_detail")
]
| 22.875 | 62 | 0.68306 |
795ab4c1cd6f5c2176a3699585b063847054041a | 1,624 | py | Python | openapi_core/schema/media_types/models.py | badcure/openapi-core | d369076bd135146c131cf0c92dab77f60d2571a5 | [
"BSD-3-Clause"
] | null | null | null | openapi_core/schema/media_types/models.py | badcure/openapi-core | d369076bd135146c131cf0c92dab77f60d2571a5 | [
"BSD-3-Clause"
] | null | null | null | openapi_core/schema/media_types/models.py | badcure/openapi-core | d369076bd135146c131cf0c92dab77f60d2571a5 | [
"BSD-3-Clause"
] | null | null | null | """OpenAPI core media types models module"""
from collections import defaultdict
from json import loads
from openapi_core.schema.media_types.exceptions import InvalidMediaTypeValue
from openapi_core.schema.schemas.exceptions import OpenAPISchemaError
MEDIA_TYPE_DESERIALIZERS = {
'application/json': loads,
}
c... | 30.641509 | 114 | 0.696429 |
795ab522e57fb2bcd9651e2a561bd85697d937b8 | 2,011 | py | Python | src/payload_venom.py | darkracer3010/Networcked | 8b7ce0d465e6818dc08f57e643b0cef43f314c0f | [
"MIT"
] | 1 | 2022-02-25T09:03:06.000Z | 2022-02-25T09:03:06.000Z | src/payload_venom.py | darkracer3010/Networcked | 8b7ce0d465e6818dc08f57e643b0cef43f314c0f | [
"MIT"
] | 1 | 2021-11-27T06:52:46.000Z | 2021-11-27T06:52:46.000Z | src/payload_venom.py | darkracer3010/Networcked | 8b7ce0d465e6818dc08f57e643b0cef43f314c0f | [
"MIT"
] | 4 | 2021-11-27T06:45:24.000Z | 2022-02-25T09:03:08.000Z | import os
from subprocess import PIPE, run
import time
def command(cmd):
return run(cmd, stdout=PIPE, stderr=PIPE, universal_newlines=True, shell=True)
payloads={
"linux":"msfvenom -p linux/x86/meterpreter/reverse_tcp",
"windows": "msfvenom -p windows/meterpreter/reverse_tcp ",
"mac":"msfvenom -p osx/x86/shell_rev... | 27.930556 | 83 | 0.622079 |
795ab563a1b7b0c6da4a6361c293b5ee79ccbc9b | 6,342 | py | Python | PyDSS/pyPlots/Plots/Table.py | dvaidhyn/PyDSS | 0d220d00900da4945e2ab6e7774de5edb58b36a9 | [
"BSD-3-Clause"
] | 21 | 2019-02-04T22:19:50.000Z | 2022-03-01T18:06:28.000Z | PyDSS/pyPlots/Plots/Table.py | dvaidhyn/PyDSS | 0d220d00900da4945e2ab6e7774de5edb58b36a9 | [
"BSD-3-Clause"
] | 33 | 2020-01-28T22:47:44.000Z | 2022-03-30T20:05:00.000Z | PyDSS/pyPlots/Plots/Table.py | dvaidhyn/PyDSS | 0d220d00900da4945e2ab6e7774de5edb58b36a9 | [
"BSD-3-Clause"
] | 11 | 2019-12-28T01:04:55.000Z | 2022-03-01T18:05:30.000Z | from PyDSS.pyPlots.pyPlotAbstract import PlotAbstract
from bokeh.plotting import figure, curdoc
from bokeh.io import output_file
from bokeh.models import ColumnDataSource, ColorBar, \
LinearColorMapper, HoverTool, BoxSelectTool, BoxZoomTool, \
PanTool, WheelZoomTool, ResetTool, SaveTool, Label
from bokeh.palet... | 42.851351 | 119 | 0.589089 |
795ab614a18a26e54d9f13a67016cc1b5f90f94d | 1,066 | py | Python | setup.py | arita37/fast-bert | f07782873031db440e60b2c55d5a9dbab53e01a9 | [
"Apache-2.0"
] | 1 | 2019-10-08T03:01:04.000Z | 2019-10-08T03:01:04.000Z | setup.py | alberduris/fast-bert | f07782873031db440e60b2c55d5a9dbab53e01a9 | [
"Apache-2.0"
] | null | null | null | setup.py | alberduris/fast-bert | f07782873031db440e60b2c55d5a9dbab53e01a9 | [
"Apache-2.0"
] | null | null | null | from io import open
from setuptools import setup, find_packages
# from pip.req import parse_requirements
with open('requirements.txt') as f:
install_requires = f.read().strip().split('\n')
setup(name='fast_bert',
version='1.4.2',
description='AI Library using BERT',
author='Kaushal Trivedi',
... | 38.071429 | 71 | 0.63227 |
795ab6f67f74be07bd98ad828b074f51b1615205 | 3,021 | py | Python | paloalto_wildfire/komand_paloalto_wildfire/actions/submit_url/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | null | null | null | paloalto_wildfire/komand_paloalto_wildfire/actions/submit_url/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2021-02-23T23:57:37.000Z | 2021-02-23T23:57:37.000Z | paloalto_wildfire/komand_paloalto_wildfire/actions/submit_url/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | null | null | null | import komand
from .schema import SubmitUrlInput, SubmitUrlOutput
# Custom imports below
from komand.exceptions import PluginException
import requests
import xmltodict
class SubmitUrl(komand.Action):
def __init__(self):
super(self.__class__, self).__init__(
name='submit_url',
... | 37.296296 | 143 | 0.53095 |
795ab81608916bd29341868a2b5dd55c44969d26 | 239 | py | Python | jython_ex.py | CenterLineM/PythonPon | ca6a29ec10b095684e90cfcfbf6e0ac1cb5eabe3 | [
"Apache-2.0"
] | null | null | null | jython_ex.py | CenterLineM/PythonPon | ca6a29ec10b095684e90cfcfbf6e0ac1cb5eabe3 | [
"Apache-2.0"
] | null | null | null | jython_ex.py | CenterLineM/PythonPon | ca6a29ec10b095684e90cfcfbf6e0ac1cb5eabe3 | [
"Apache-2.0"
] | null | null | null | __author__ = 'Administrator'
import java
from java import awt
def exit(e): java.lang.System.exit(0)
frame = awt.Frame('AWT Example', visible=1)
button = awt.Button('Close Me!', actionPerformed=exit)
frame.add(button, 'Center')
frame.pack() | 29.875 | 54 | 0.74477 |
795ab837e6ce3690a93ee4bd0861128438c59bcb | 388 | py | Python | _tbnf/fable_modules/fable_library/task.py | thautwarm/Typed-BNF | 897a4a2bd389dcb2ca16c6c773b28f0388336f63 | [
"MIT"
] | 38 | 2022-01-01T06:45:27.000Z | 2022-03-20T14:18:38.000Z | _tbnf/fable_modules/fable_library/task.py | thautwarm/typed-bnf | b5694a34fe21a064250f2ef88745d8ebad51eb33 | [
"MIT"
] | 7 | 2021-09-17T16:46:50.000Z | 2021-12-31T20:49:35.000Z | _tbnf/fable_modules/fable_library/task.py | thautwarm/typed-bnf | b5694a34fe21a064250f2ef88745d8ebad51eb33 | [
"MIT"
] | 3 | 2022-01-01T07:33:44.000Z | 2022-01-09T11:41:33.000Z | from typing import Awaitable, TypeVar, Any
import asyncio
T = TypeVar("T")
async def zero() -> None:
return
async def from_result(value: Any) -> Any:
return value
def get_awaiter(value: Awaitable[T]) -> Awaitable[T]:
return value
def get_result(value: Awaitable[T]) -> T:
return asyncio.run(valu... | 16.166667 | 62 | 0.677835 |
795ab990f2e60ef09bf1ab9b2edab34bc0866509 | 2,211 | py | Python | tmp_cfg/cfgs_cityscapes_resnet101os16.py | zhizhangxian/sssegmentation | 90613f6e0abf4cdd729cf382ab2a915e106d8649 | [
"MIT"
] | 1 | 2021-05-28T06:42:37.000Z | 2021-05-28T06:42:37.000Z | tmp_cfg/cfgs_cityscapes_resnet101os16.py | zhizhangxian/sssegmentation | 90613f6e0abf4cdd729cf382ab2a915e106d8649 | [
"MIT"
] | null | null | null | tmp_cfg/cfgs_cityscapes_resnet101os16.py | zhizhangxian/sssegmentation | 90613f6e0abf4cdd729cf382ab2a915e106d8649 | [
"MIT"
] | null | null | null | '''define the config file for cityscapes and resnet101os16'''
from .base_cfg import *
# modify dataset config
DATASET_CFG = DATASET_CFG.copy()
DATASET_CFG['train'].update(
{
'type': 'cityscapes',
'rootdir': 'data/CityScapes',
'aug_opts': [('Resize', {'output_size': (2048, 1024), 'keep_rati... | 32.514706 | 122 | 0.606061 |
795ab99dc2cb92e9a86411e8a4d83a0965fa9e14 | 1,059 | py | Python | google/ads/googleads/v6/services/services/user_interest_service/transports/__init__.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v6/services/services/user_interest_service/transports/__init__.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v6/services/services/user_interest_service/transports/__init__.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 29.416667 | 74 | 0.769594 |
795ab9b13215165462200a7216b80f27410e936d | 7,779 | py | Python | cnn_conv_pool.py | MasazI/DeepLearning | f0658aeddab9517db67f3d36ae831c6fed62aae9 | [
"MIT"
] | 1 | 2018-08-30T06:42:30.000Z | 2018-08-30T06:42:30.000Z | cnn_conv_pool.py | MasazI/DeepLearning | f0658aeddab9517db67f3d36ae831c6fed62aae9 | [
"MIT"
] | null | null | null | cnn_conv_pool.py | MasazI/DeepLearning | f0658aeddab9517db67f3d36ae831c6fed62aae9 | [
"MIT"
] | null | null | null | #coding: utf-8
import theano
import theano.tensor as T
from theano.tensor.nnet import conv
from theano.tensor.signal import downsample
from logistic_regression import load_data, LogisticRegression
from multilayer_perceptron import HiddenLayer
import function_util as func
import numpy as np
import timeit
import os
im... | 39.287879 | 204 | 0.662296 |
795abb3ab0475b8728bd43026538a2409edb8b5b | 10,876 | py | Python | brotli_file.py | youknowone/brotli-file | dd65e8cc15a0799dd19bd870658246ec666e2107 | [
"BSD-2-Clause-FreeBSD"
] | 5 | 2020-08-02T05:40:25.000Z | 2022-03-27T18:17:20.000Z | brotli_file.py | youknowone/brotli-file | dd65e8cc15a0799dd19bd870658246ec666e2107 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2020-08-02T05:40:13.000Z | 2020-08-02T05:48:16.000Z | brotli_file.py | youknowone/brotli-file | dd65e8cc15a0799dd19bd870658246ec666e2107 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2020-08-21T02:14:26.000Z | 2020-08-21T02:14:26.000Z | """Functions that read and write brotli files.
The user of the file doesn't have to worry about the compression,
but random access is not allowed."""
# forked from CPython 3.8.1 gzip.py which is
# based on Andrew Kuchling's minigzip.py distributed with the zlib module
import os
import io
import _compression
__all__... | 33.361963 | 81 | 0.586797 |
795abb6bd7d79a2a847a69277c80bbb662a022d6 | 1,286 | py | Python | app/extract_texts.py | sy-app/ll-now-extract-words | 6c3b49330741a8661b613990082ec99e6e595cd5 | [
"MIT"
] | 1 | 2021-11-24T10:42:40.000Z | 2021-11-24T10:42:40.000Z | app/extract_texts.py | sy-app/ll-now-extract-words | 6c3b49330741a8661b613990082ec99e6e595cd5 | [
"MIT"
] | 7 | 2022-02-08T07:58:24.000Z | 2022-03-27T08:15:51.000Z | app/extract_texts.py | sy-app/ll-now-extract-words | 6c3b49330741a8661b613990082ec99e6e595cd5 | [
"MIT"
] | null | null | null | import re
import boto3
import unicodedata
def extract_texts(tweets):
# 除去する単語をDynamoDBから取得
table = boto3.resource('dynamodb').Table('ll_now')
primary_key = {"primary": 'remove_word'}
res = table.get_item(Key=primary_key)
remove_words = res['Item']['word']
remove_words_pattern = '|'.join(remove... | 29.227273 | 77 | 0.557543 |
795abbd63e797f9ef9075891edcc5307ce12b9e0 | 11,133 | py | Python | beginner_source/transfer_learning_tutorial.py | jakec888/tutorials | 94cb6a3635b9b5ccb8a59c5346addba6901cd15d | [
"BSD-3-Clause"
] | 1 | 2020-06-07T02:30:10.000Z | 2020-06-07T02:30:10.000Z | beginner_source/transfer_learning_tutorial.py | pietern/tutorials | e0791cff1502df01719fb6cb29e817021c877d0e | [
"BSD-3-Clause"
] | null | null | null | beginner_source/transfer_learning_tutorial.py | pietern/tutorials | e0791cff1502df01719fb6cb29e817021c877d0e | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Transfer Learning Tutorial
==========================
**Author**: `Sasank Chilamkurthy <https://chsasank.github.io>`_
In this tutorial, you will learn how to train your network using
transfer learning. You can read more about the transfer learning at `cs231n
notes <https://cs231n.github.io/... | 33.035608 | 92 | 0.603431 |
795abcb805969bdf90b9b8811861d47bd44ce9aa | 2,049 | py | Python | src/train.py | kshannon/intracranial-hemorrhage-detection | fd65c44c487ab07faaed5d39cc238f70b95891bc | [
"MIT"
] | 7 | 2019-09-30T02:30:49.000Z | 2020-01-25T04:23:19.000Z | src/train.py | kshannon/intracranial-hemorrhage-detection | fd65c44c487ab07faaed5d39cc238f70b95891bc | [
"MIT"
] | 18 | 2019-09-28T18:41:46.000Z | 2019-11-10T21:42:02.000Z | src/train.py | kshannon/intracranial-hemorrhage-detection | fd65c44c487ab07faaed5d39cc238f70b95891bc | [
"MIT"
] | 4 | 2020-01-25T04:23:21.000Z | 2020-11-17T17:34:24.000Z | from datetime import datetime
from model import MyDeepModel, create_submission
from data_loader import read_testset, read_trainset, DataGenerator
import keras as K
from sklearn.model_selection import ShuffleSplit
# from K_applications.resnet import ResNet50
from keras.applications.inception_v3 import InceptionV3
fr... | 34.728814 | 89 | 0.752074 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.