hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
33b9b122b461349b9aebe3d06b2a2c0729f85b1e | 4,077 | py | Python | invenio_circulation/config.py | iGormilhit/invenio-circulation | 02e3a67a3bf491c0a180dae7a52b86d8cd37dc57 | [
"MIT"
] | null | null | null | invenio_circulation/config.py | iGormilhit/invenio-circulation | 02e3a67a3bf491c0a180dae7a52b86d8cd37dc57 | [
"MIT"
] | null | null | null | invenio_circulation/config.py | iGormilhit/invenio-circulation | 02e3a67a3bf491c0a180dae7a52b86d8cd37dc57 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2018 CERN.
# Copyright (C) 2018 RERO.
#
# Invenio-Circulation is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
"""Invenio module for the circulation of bibliographic items."""
from invenio_reco... | 30.654135 | 77 | 0.692421 |
33b9bd07365aac0f2990a87a7504eb4bb9ce7849 | 971 | py | Python | func_tests/pages/datasenderpage/data_sender_page.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | func_tests/pages/datasenderpage/data_sender_page.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | func_tests/pages/datasenderpage/data_sender_page.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | from pages.allsubjectspage.add_subject_page import AddSubjectPage
from pages.datasenderpage.data_sender_locator import SEND_IN_DATA_LINK, PROJECT_LIST, REGISTER_SUBJECT, SMARTPHONE_NAV
from pages.page import Page
from pages.smartphoneinstructionpage.smart_phone_instruction_page import SmartPhoneInstructionPage
from pag... | 38.84 | 118 | 0.786818 |
33b9d5368afb994056d018cba79a6d38fb214fd9 | 2,936 | py | Python | venv/lib/python3.8/site-packages/dateparser/data/date_translation_data/ln.py | yuta-komura/vishnu | 67173b674d5f4f3be189474103612447ef69ab44 | [
"MIT"
] | 1 | 2021-11-17T04:55:14.000Z | 2021-11-17T04:55:14.000Z | dateparser/data/date_translation_data/ln.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | dateparser/data/date_translation_data/ln.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
info = {
"name": "ln",
"date_order": "DMY",
"january": [
"sánzá ya yambo",
"yan"
],
"february": [
"sánzá ya míbalé",
"fbl"
],
"march": [
"sánzá ya mísáto",
"msi"
],
"april": [
"sánzá ya mínei",
"a... | 16.220994 | 34 | 0.288828 |
33ba1b87cb36292df5bc4d1bafdc068dd5855cbe | 2,897 | py | Python | visprotocol/server/24HrFitness.py | ClandininLab/vis-protocol | d4438dccea3987b8f21648d439fe1c1349940024 | [
"MIT"
] | null | null | null | visprotocol/server/24HrFitness.py | ClandininLab/vis-protocol | d4438dccea3987b8f21648d439fe1c1349940024 | [
"MIT"
] | null | null | null | visprotocol/server/24HrFitness.py | ClandininLab/vis-protocol | d4438dccea3987b8f21648d439fe1c1349940024 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from flystim.screen import Screen, SubScreen
from flystim.stim_server import StimServer
from flystim.dlpc350 import make_dlpc350_objects
from math import pi
# Define screen(s) for the rig
def get_subscreen(dir):
'''
Tuned for ballrig with "rotate left" in /etc/X1... | 35.329268 | 228 | 0.610287 |
33ba2d1abc48d812874f299ce90480fafcfa81ac | 5,433 | py | Python | app/service/callback_rest.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | 51 | 2016-04-03T23:36:17.000Z | 2022-03-21T20:04:52.000Z | app/service/callback_rest.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | 1,335 | 2015-12-15T14:28:50.000Z | 2022-03-30T16:24:27.000Z | app/service/callback_rest.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | 30 | 2016-01-08T19:05:32.000Z | 2021-12-20T16:37:23.000Z | from flask import Blueprint, jsonify, request
from sqlalchemy.exc import SQLAlchemyError
from app.dao.service_callback_api_dao import (
delete_service_callback_api,
get_service_callback_api,
reset_service_callback_api,
save_service_callback_api,
)
from app.dao.service_inbound_api_dao import (
delet... | 37.993007 | 109 | 0.730536 |
33ba61ec40921d957e38b3f6f11a841cfcfdc515 | 365 | py | Python | tests/pipe_proc_tests/null.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 150 | 2015-01-16T12:24:13.000Z | 2022-03-03T18:01:18.000Z | tests/pipe_proc_tests/null.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 129 | 2015-01-13T04:58:56.000Z | 2022-03-02T13:39:16.000Z | tests/pipe_proc_tests/null.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 88 | 2015-02-16T20:04:12.000Z | 2022-03-10T06:50:30.000Z | #! /usr/bin/env python
""" Create files for null unit test """
import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p
d, a = pipe.read("time_complex.fid")
d, a = p.null(d, a)
pipe.write("null1.glue", d, a, overwrite=True)
d, a = pipe.read("time_complex.fid")
d, a = p.null(d, a)
d, a = p.di(d, a)
pi... | 24.333333 | 46 | 0.665753 |
33ba65a2ba30d3e8021b7458e4776f439aa91a50 | 6,964 | py | Python | tensorBNN/likelihood.py | akgopan/TensorBNN | 44f0c02cd721c9e43e8f7ad4bbd2648969034e52 | [
"MIT"
] | null | null | null | tensorBNN/likelihood.py | akgopan/TensorBNN | 44f0c02cd721c9e43e8f7ad4bbd2648969034e52 | [
"MIT"
] | null | null | null | tensorBNN/likelihood.py | akgopan/TensorBNN | 44f0c02cd721c9e43e8f7ad4bbd2648969034e52 | [
"MIT"
] | null | null | null | import tensorflow as tf
import tensorflow_probability as tfp
from tensorBNN.BNN_functions import multivariateLogProb
tfd = tfp.distributions
class Likelihood(object):
def __init__(self, *argv, **kwargs):
"""
When declared, this constructor will be given keywords corresponding
t... | 38.905028 | 80 | 0.580414 |
33ba7bae14bff88a5dba2b26f226cb1589355dcb | 23,658 | py | Python | tests/weight_proof/test_weight_proof.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 7 | 2021-09-07T02:14:15.000Z | 2022-03-27T06:42:35.000Z | tests/weight_proof/test_weight_proof.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 1 | 2021-10-21T16:38:56.000Z | 2021-11-15T13:03:15.000Z | tests/weight_proof/test_weight_proof.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 3 | 2021-10-21T07:17:40.000Z | 2022-03-16T12:57:09.000Z | # flake8: noqa: F811, F401
import asyncio
import sys
from typing import Dict, List, Optional, Tuple
import aiosqlite
import pytest
from skynet.consensus.block_header_validation import validate_finished_header_block
from skynet.consensus.block_record import BlockRecord
from skynet.consensus.blockchain import Blockchai... | 42.322004 | 120 | 0.698115 |
33ba92a4dddd37fc63b303785b1d14703850b845 | 148,647 | py | Python | sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_path_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_path_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_path_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | 56.476824 | 152 | 0.689587 |
33babfdc31e3e514b1afc7cd715e2804da44713e | 3,079 | py | Python | src/change-analysis/azext_change_analysis/tests/latest/test_change_analysis.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | null | null | null | src/change-analysis/azext_change_analysis/tests/latest/test_change_analysis.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | null | null | null | src/change-analysis/azext_change_analysis/tests/latest/test_change_analysis.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | 1 | 2022-02-14T21:43:29.000Z | 2022-02-14T21:43:29.000Z | # --------------------------------------------------------------------------------------------
# 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 aaz-dev-tools
# --------------------------------... | 42.178082 | 150 | 0.582657 |
33bacb4cfbbe9d1d4ceaa0c5ad9d0be4e3e7f09a | 4,116 | py | Python | galaxyperlin.py | ElsaMJohnson/pythonprograms | 8bdc80bb5694cd4a912551d83d3047070f71ec3c | [
"MIT"
] | 1 | 2016-05-14T21:52:25.000Z | 2016-05-14T21:52:25.000Z | galaxyperlin.py | ElsaMJohnson/pythonprograms | 8bdc80bb5694cd4a912551d83d3047070f71ec3c | [
"MIT"
] | null | null | null | galaxyperlin.py | ElsaMJohnson/pythonprograms | 8bdc80bb5694cd4a912551d83d3047070f71ec3c | [
"MIT"
] | null | null | null | #!/home/elsa/Ureka/variants/common/bin/python
#Code to generate an image with perlin noise as background.
#Used in UO scientific computing course Spring 2016
#Perlin code and noise package is from Casey Duncan
#https://github.com/caseman/noise/examples/2dtexture.py
#Remaining code by Elsa M. Johnson
from noise impor... | 29.4 | 78 | 0.699951 |
33bae952456f4311e5e23c17279458226c5afbf3 | 13,573 | py | Python | msticpy/data/drivers/splunk_driver.py | GiuseppeLaurenza/msticpy | 37f96126b1e7ed06d3d140e340cdf86d6eee440b | [
"MIT"
] | 820 | 2019-05-16T07:24:34.000Z | 2022-03-31T09:18:10.000Z | msticpy/data/drivers/splunk_driver.py | GiuseppeLaurenza/msticpy | 37f96126b1e7ed06d3d140e340cdf86d6eee440b | [
"MIT"
] | 205 | 2019-06-24T19:24:19.000Z | 2022-03-30T23:13:46.000Z | msticpy/data/drivers/splunk_driver.py | GiuseppeLaurenza/msticpy | 37f96126b1e7ed06d3d140e340cdf86d6eee440b | [
"MIT"
] | 171 | 2019-06-23T13:53:12.000Z | 2022-03-29T18:22:46.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""Sp... | 34.892031 | 88 | 0.5911 |
33baed93f629ebed6bac830aab6d8613a4a94a54 | 9,095 | py | Python | pygaggle/run/evaluate_kaggle_highlighter.py | keleog/pygaggle | c53a63c22e58515951d7a11d824674329e13d809 | [
"Apache-2.0"
] | null | null | null | pygaggle/run/evaluate_kaggle_highlighter.py | keleog/pygaggle | c53a63c22e58515951d7a11d824674329e13d809 | [
"Apache-2.0"
] | null | null | null | pygaggle/run/evaluate_kaggle_highlighter.py | keleog/pygaggle | c53a63c22e58515951d7a11d824674329e13d809 | [
"Apache-2.0"
] | null | null | null | from typing import Optional, List
from pathlib import Path
import logging
from pydantic import BaseModel, validator
from transformers import (AutoModel,
AutoModelForQuestionAnswering,
AutoTokenizer,
BertForSequenceClassification)
import torc... | 40.968468 | 99 | 0.614953 |
33bb1f2cb4c087c53d4aa00f6cf191fe184981ca | 2,034 | py | Python | config/config.py | anandaswarup/TTS | 7325cf347b5295ffe28c11f37b738d90e98f5df8 | [
"MIT"
] | 5 | 2019-12-25T02:07:43.000Z | 2022-03-31T14:11:56.000Z | config/config.py | anandaswarup/TTS | 7325cf347b5295ffe28c11f37b738d90e98f5df8 | [
"MIT"
] | 1 | 2021-12-04T10:14:27.000Z | 2021-12-04T11:06:49.000Z | config/config.py | anandaswarup/TTS | 7325cf347b5295ffe28c11f37b738d90e98f5df8 | [
"MIT"
] | 1 | 2021-06-25T07:19:16.000Z | 2021-06-25T07:19:16.000Z | """Configuration Parameters"""
dataset = "LJSpeech" # The name of the dataset
text_processor = "en" # Currently supported -> english: "en"
text_tokenizer = "char" # Currently supported -> character: "char"
# Audio processing configuration
audio = {
"sampling_rate": 22050,
"max_db": 100,
"ref_db": 20,
... | 22.6 | 67 | 0.596362 |
33bb2440640df1f4d1375803d754bd6c039bc1c8 | 18,625 | py | Python | src/sage/rings/polynomial/polynomial_singular_interface.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | 3 | 2016-06-19T14:48:31.000Z | 2022-01-28T08:46:01.000Z | src/sage/rings/polynomial/polynomial_singular_interface.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/rings/polynomial/polynomial_singular_interface.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | 7 | 2021-11-08T10:01:59.000Z | 2022-03-03T11:25:52.000Z | """
Polynomial Interfaces to Singular
AUTHORS:
- Martin Albrecht <malb@informatik.uni-bremen.de> (2006-04-21)
- Robert Bradshaw: Re-factor to avoid multiple inheritance vs. Cython (2007-09)
- Syed Ahmad Lavasani: Added function field to _singular_init_ (2011-12-16)
Added non-prime finite fields to _singular_in... | 39.459746 | 184 | 0.573369 |
33bb2a225204eb38126b3376c9b55f104a465052 | 1,141 | py | Python | tests/unit/test_rect_size.py | Etiqa/bromine | cabf0931f5a06796c26fdc7fb9f7ecf147554fd5 | [
"BSD-2-Clause"
] | 2 | 2018-09-20T12:37:01.000Z | 2021-08-30T14:44:25.000Z | tests/unit/test_rect_size.py | Etiqa/bromine | cabf0931f5a06796c26fdc7fb9f7ecf147554fd5 | [
"BSD-2-Clause"
] | null | null | null | tests/unit/test_rect_size.py | Etiqa/bromine | cabf0931f5a06796c26fdc7fb9f7ecf147554fd5 | [
"BSD-2-Clause"
] | null | null | null | import pytest
from bromine.utils.geometry import RectSize
def test_adding_two_rect_sizes():
assert RectSize(1, 2) + RectSize(3, 4) == RectSize(4, 6)
def test_subtracting_two_rect_sizes():
assert RectSize(1, 2) - RectSize(1, 4) == RectSize(0, -2)
class TestRectSizeDecorator():
def test_undecorated_va... | 30.837838 | 80 | 0.743208 |
33bb41fd9defdab212cfbe63361851269c2d33c6 | 2,920 | py | Python | arxiv/vault/middleware.py | arXiv/arxiv-vault | dff077693b2ad860944d7c80c275a7c09927d0f4 | [
"MIT"
] | 4 | 2019-05-26T22:50:44.000Z | 2021-11-05T12:34:28.000Z | arxiv/vault/middleware.py | arXiv/arxiv-vault | dff077693b2ad860944d7c80c275a7c09927d0f4 | [
"MIT"
] | null | null | null | arxiv/vault/middleware.py | arXiv/arxiv-vault | dff077693b2ad860944d7c80c275a7c09927d0f4 | [
"MIT"
] | 3 | 2019-05-26T22:50:31.000Z | 2021-11-05T12:34:15.000Z | """Provides middleware for getting secrets from Vault."""
from typing import Callable, Dict, Tuple, Iterable, List, Optional, Mapping
from datetime import datetime, timedelta
from pytz import UTC
from functools import partial
import os
import warnings
import logging
from .core import Vault, Secret
from .manager impo... | 31.06383 | 84 | 0.644863 |
33bb7f0d61bb359c64ab675d16548304691cfac5 | 24,404 | py | Python | src/cactus/progressive/cactus_progressive.py | glennhickey/cactus | 045124e887a53f3bf2784e251949a134b2b1cf79 | [
"MIT-0"
] | 1 | 2019-08-15T05:15:26.000Z | 2019-08-15T05:15:26.000Z | src/cactus/progressive/cactus_progressive.py | glennhickey/cactus | 045124e887a53f3bf2784e251949a134b2b1cf79 | [
"MIT-0"
] | null | null | null | src/cactus/progressive/cactus_progressive.py | glennhickey/cactus | 045124e887a53f3bf2784e251949a134b2b1cf79 | [
"MIT-0"
] | 1 | 2020-02-11T14:29:09.000Z | 2020-02-11T14:29:09.000Z | #!/usr/bin/env python
#Copyright (C) 2011 by Glenn Hickey
#
#Released under the MIT license, see LICENSE.txt
#!/usr/bin/env python
"""Wrapper to run the cactus_workflow progressively, using the input species tree as a guide
tree.
"""
import os
import xml.etree.ElementTree as ET
from argparse import ArgumentParser... | 48.905812 | 214 | 0.666038 |
33bbc11525ab7070f0d00fe59cc91884e408accd | 2,000 | py | Python | bin/bed_generate_unique_ids.py | domonik/Peakhood | 2c04776bdb50e25053f1ac1298085f52673b44a7 | [
"MIT"
] | 2 | 2022-01-20T13:30:09.000Z | 2022-01-20T13:30:33.000Z | bin/bed_generate_unique_ids.py | domonik/Peakhood | 2c04776bdb50e25053f1ac1298085f52673b44a7 | [
"MIT"
] | 2 | 2021-10-11T14:35:51.000Z | 2022-01-17T11:27:06.000Z | bin/bed_generate_unique_ids.py | domonik/Peakhood | 2c04776bdb50e25053f1ac1298085f52673b44a7 | [
"MIT"
] | 1 | 2022-01-20T18:06:01.000Z | 2022-01-20T18:06:01.000Z | #!/usr/bin/env python3
import argparse
import os
################################################################################
def setup_argument_parser():
"""Setup argparse parser."""
help_description = """
Given a --in BED file (6-column), generate unique column 4 IDs,
output to STDOUT.
... | 29.850746 | 127 | 0.463 |
33bbccb96e67e80d325c7a3c0c8a8138f1db3008 | 3,287 | py | Python | sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 45.652778 | 125 | 0.690599 |
33bbfccaebbc21c526e2f2dcc29840788235d869 | 1,450 | py | Python | gaphor/services/tests/test_filemanager.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | gaphor/services/tests/test_filemanager.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | gaphor/services/tests/test_filemanager.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | import pytest
from gaphor.application import Application
@pytest.fixture
def application():
Application.init(
services=[
"event_manager",
"component_registry",
"file_manager",
"element_factory",
"properties",
"main_window",
... | 29.591837 | 83 | 0.625517 |
33bc014a45b93c54336225dfdd4d4cdaf2aa00ba | 7,154 | py | Python | gnnbench/data/preprocess.py | cvignac/gnn_statistics | 2115b54397ed25412f1bc4d8c93e0acdab348e34 | [
"MIT"
] | 3 | 2020-04-03T07:23:35.000Z | 2021-05-26T06:25:28.000Z | gnnbench/data/preprocess.py | cvignac/gnn_statistics | 2115b54397ed25412f1bc4d8c93e0acdab348e34 | [
"MIT"
] | 1 | 2022-02-09T23:36:48.000Z | 2022-02-09T23:36:48.000Z | gnnbench/data/preprocess.py | cvignac/gnn_statistics | 2115b54397ed25412f1bc4d8c93e0acdab348e34 | [
"MIT"
] | null | null | null | import numpy as np
import scipy.sparse as sp
from collections import Counter
from sklearn.preprocessing import MultiLabelBinarizer, LabelBinarizer, normalize
def to_binary_bag_of_words(features):
"""Converts TF/IDF features to binary bag-of-words features."""
features_copy = features.tocsr()
features_co... | 36.876289 | 110 | 0.692899 |
33bc103ea214fcef498e7dd62a4cde2d4f770d4b | 3,750 | py | Python | tests/unit/test_supermetrics.py | angelika233/viadot | 99a4c5b622ad099a44ab014a47ba932a747c0ae6 | [
"MIT"
] | 23 | 2021-05-04T13:28:30.000Z | 2022-02-16T18:51:24.000Z | tests/unit/test_supermetrics.py | angelika233/viadot | 99a4c5b622ad099a44ab014a47ba932a747c0ae6 | [
"MIT"
] | 142 | 2021-05-01T10:48:12.000Z | 2022-03-28T15:00:06.000Z | tests/unit/test_supermetrics.py | angelika233/viadot | 99a4c5b622ad099a44ab014a47ba932a747c0ae6 | [
"MIT"
] | 13 | 2021-05-14T18:28:10.000Z | 2022-03-17T10:17:17.000Z | import pytest
from viadot.sources import Supermetrics
RESPONSE_PIVOTED = {
"meta": {
"query": {
"fields": [
{
"id": "Date",
"field_id": "Date",
"field_name": "Date",
"field_type": "dim",
... | 30.737705 | 87 | 0.3744 |
33bc3377454b9c964901276bcbd63d290389a714 | 269 | py | Python | Easy/1920 Build Array from Permutation.py | raj713335/LeetCode | e60e145d90f45d37e148e8307a3d97f5f0741de0 | [
"Apache-2.0"
] | null | null | null | Easy/1920 Build Array from Permutation.py | raj713335/LeetCode | e60e145d90f45d37e148e8307a3d97f5f0741de0 | [
"Apache-2.0"
] | null | null | null | Easy/1920 Build Array from Permutation.py | raj713335/LeetCode | e60e145d90f45d37e148e8307a3d97f5f0741de0 | [
"Apache-2.0"
] | null | null | null | # https://leetcode.com/problems/build-array-from-permutation/
class Solution:
def buildArray(self, nums: List[int]) -> List[int]:
res = []
for i in range(0, len(nums)):
res.append(nums[nums[i]])
return res
| 24.454545 | 61 | 0.542751 |
33bc42bd56bab11e36df5b3f357a594940343702 | 955 | py | Python | quest/quest_gui.py | Fluorescence-Tools/quest | e17e5682f7686d1acc1fd8a22bdae33963bc16d6 | [
"MIT"
] | null | null | null | quest/quest_gui.py | Fluorescence-Tools/quest | e17e5682f7686d1acc1fd8a22bdae33963bc16d6 | [
"MIT"
] | 1 | 2019-08-14T08:01:26.000Z | 2019-08-15T22:59:05.000Z | quest/quest_gui.py | Fluorescence-Tools/quest | e17e5682f7686d1acc1fd8a22bdae33963bc16d6 | [
"MIT"
] | null | null | null | import tempfile
import sip
sip.setapi('QDate', 2)
sip.setapi('QDateTime', 2)
sip.setapi('QString', 2)
sip.setapi('QTextStream', 2)
sip.setapi('QTime', 2)
sip.setapi('QUrl', 2)
sip.setapi('QVariant', 2)
from PyQt5 import QtGui, QtWidgets
import lib
import lib.ui.rescource_rc
import sys
sys.tracebacklimit = 500
# After... | 22.209302 | 77 | 0.659686 |
33bc6fdcea6669a6dd13d6fdf1644f70abcd0733 | 2,393 | py | Python | alipay/aop/api/domain/AlipayOpenSearchBoxactivityBatchqueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayOpenSearchBoxactivityBatchqueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayOpenSearchBoxactivityBatchqueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayOpenSearchBoxactivityBatchqueryModel(object):
def __init__(self):
self._box_id = None
self._merchant_id = None
self._page_number = None
self._page_size = Non... | 27.825581 | 73 | 0.587965 |
33bc779447edb88ac3d4cb64ee2afece0f2b0d38 | 18,304 | py | Python | tests/rptminigameshub/network_test.py | ThisALV/RpT-Minigames-Hub | 1c7d0c780376588e88ae9e9af3224ec55fc66e4b | [
"MIT"
] | null | null | null | tests/rptminigameshub/network_test.py | ThisALV/RpT-Minigames-Hub | 1c7d0c780376588e88ae9e9af3224ec55fc66e4b | [
"MIT"
] | null | null | null | tests/rptminigameshub/network_test.py | ThisALV/RpT-Minigames-Hub | 1c7d0c780376588e88ae9e9af3224ec55fc66e4b | [
"MIT"
] | null | null | null | import unittest.mock
from rptminigameshub.network import *
import pytest
import asyncio
import websockets
class TestClientsListener:
"""Unit tests for ClientsListener class methods."""
@pytest.fixture
def mocked_client_connection(self, mocker, request):
"""Provides a mocked client connection wit... | 52.148148 | 139 | 0.706239 |
33bc7f26ef267c616617287fb75b494fa976b2f9 | 25,065 | py | Python | mathics/builtin/assignments/internals.py | rebcabin/mathics-core | 0cbf808fb9fb91e0a32d0aa9d1af1477d0258f41 | [
"Apache-2.0"
] | null | null | null | mathics/builtin/assignments/internals.py | rebcabin/mathics-core | 0cbf808fb9fb91e0a32d0aa9d1af1477d0258f41 | [
"Apache-2.0"
] | null | null | null | mathics/builtin/assignments/internals.py | rebcabin/mathics-core | 0cbf808fb9fb91e0a32d0aa9d1af1477d0258f41 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from mathics.algorithm.parts import walk_parts
from mathics.core.evaluation import MAX_RECURSION_DEPTH, set_python_recursion_limit
from mathics.core.expression import Expression
from mathics.core.rules import Rule
from mathics.core.symbols import (
Symbol,
SymbolN,
system_symbols,
... | 35.502833 | 88 | 0.644524 |
33bca1742ea3d2f9ff6cbcd2d443788ca5a3bcd9 | 2,295 | py | Python | var/spack/repos/builtin/packages/py-uproot/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/py-uproot/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/py-uproot/package.py | joequant/spack | e028ee0d5903045e1cdeb57550cbff61f2ffb2fa | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyUproot(PythonPackage):
"""ROOT I/O in pure Python and NumPy.
Uproot is a reader and... | 41.727273 | 96 | 0.705011 |
33bca95b76c2cfa771cf321f028124177c8fdfd9 | 25,178 | py | Python | tests/test_blackboard.py | hiradg/py_trees | b0025e7060ec4ec5f3f79b0e8405230e1a3635cd | [
"BSD-3-Clause"
] | null | null | null | tests/test_blackboard.py | hiradg/py_trees | b0025e7060ec4ec5f3f79b0e8405230e1a3635cd | [
"BSD-3-Clause"
] | null | null | null | tests/test_blackboard.py | hiradg/py_trees | b0025e7060ec4ec5f3f79b0e8405230e1a3635cd | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# License: BSD
# https://raw.githubusercontent.com/splintered-reality/py_trees/devel/LICENSE
#
##############################################################################
# Imports
##############################################################################
import nose
import py_trees
... | 41.963333 | 120 | 0.627294 |
33bd08bb9ad486f99a29d5f49584ea7db2e510c4 | 2,729 | py | Python | distributions.py | tmandel/ai-data-collection | 95701a5fa89c728974ae8288609d760301c654e3 | [
"MIT"
] | null | null | null | distributions.py | tmandel/ai-data-collection | 95701a5fa89c728974ae8288609d760301c654e3 | [
"MIT"
] | null | null | null | distributions.py | tmandel/ai-data-collection | 95701a5fa89c728974ae8288609d760301c654e3 | [
"MIT"
] | null | null | null |
import numpy
from scipy.stats import norm
# Simple class for a Normal (Gaussian) Distribution
#
# Parameters: mean (mu) and standard deviation (sigma)
class NormalDistribution(object):
def __init__(self, mean, stdDev):
self.mean = mean
self.stdDev = stdDev
#Draws a single sample from the dist... | 25.745283 | 110 | 0.648956 |
33bd15e0c9d31325e78830fa77b891cf07cd5bc0 | 839 | py | Python | examples/chat/chat_project/urls.py | jhannington/django-rt | 55abd4dbe7ab015039043a724f99aeaced557f37 | [
"BSD-3-Clause"
] | 1 | 2016-01-04T22:11:08.000Z | 2016-01-04T22:11:08.000Z | examples/chat/chat_project/urls.py | jhannington/django-rt | 55abd4dbe7ab015039043a724f99aeaced557f37 | [
"BSD-3-Clause"
] | null | null | null | examples/chat/chat_project/urls.py | jhannington/django-rt | 55abd4dbe7ab015039043a724f99aeaced557f37 | [
"BSD-3-Clause"
] | null | null | null | """chat_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/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')
Clas... | 32.269231 | 77 | 0.705602 |
33bd42ceebe7c4196017b27d9325773caa05e814 | 265 | py | Python | pni_customization/pni_customization/doctype/pni_reel_status/pni_reel_status.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | pni_customization/pni_customization/doctype/pni_reel_status/pni_reel_status.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | pni_customization/pni_customization/doctype/pni_reel_status/pni_reel_status.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Jigar Tarpara and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class PNIReelStatus(Document):
pass
| 24.090909 | 52 | 0.777358 |
33bd5afb17ff22fc2b5eb2e69f2fd4f47c49e174 | 2,789 | py | Python | sporco/prox/_l21.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 217 | 2016-06-13T16:41:26.000Z | 2022-03-22T06:31:05.000Z | sporco/prox/_l21.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 21 | 2016-06-13T23:28:35.000Z | 2022-02-17T23:20:01.000Z | sporco/prox/_l21.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 47 | 2016-12-14T13:08:33.000Z | 2021-12-12T01:59:49.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2015-2019 by Brendt Wohlberg <brendt@ieee.org>
# All rights reserved. BSD 3-clause License.
# This file is part of the SPORCO package. Details of the copyright
# and user license can be found in the 'LICENSE.txt' file distributed
# with the package.
r"""Compute the :math:`\ell_{... | 30.648352 | 74 | 0.633202 |
33bd6f2db0f96cc6640e5769b74db8b9aeb0575f | 4,592 | py | Python | intropyproject-classify-pet-images/get_pet_labels.py | varunkeerthy/udacity-image-classifier | 4b7fd67ee849277a0ceffcb25cbcd9592c36b23d | [
"MIT"
] | null | null | null | intropyproject-classify-pet-images/get_pet_labels.py | varunkeerthy/udacity-image-classifier | 4b7fd67ee849277a0ceffcb25cbcd9592c36b23d | [
"MIT"
] | 5 | 2021-03-19T02:57:55.000Z | 2022-03-11T23:56:35.000Z | intropyproject-classify-pet-images/get_pet_labels.py | varunkeerthy/udacity-image-classifier | 4b7fd67ee849277a0ceffcb25cbcd9592c36b23d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# */AIPND-revision/intropyproject-classify-pet-images/get_pet_labels.py
#
# PROGRAMMER: Varun Keerthy
# DATE CREATED: 19/08/2019
# REVISED DATE:
# PURPOSE: Create the function get_pet_labels that creates the pet labels from
# the image's filename. This function in... | 41.745455 | 137 | 0.656794 |
33bd8242e48b7e00541200b4b392ef1f9f6ca322 | 1,856 | py | Python | tests/ml/knn.py | tvatter/dsa | e5ae217e38441d90914a55103e23d86f5821dc2f | [
"MIT"
] | null | null | null | tests/ml/knn.py | tvatter/dsa | e5ae217e38441d90914a55103e23d86f5821dc2f | [
"MIT"
] | null | null | null | tests/ml/knn.py | tvatter/dsa | e5ae217e38441d90914a55103e23d86f5821dc2f | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
from numpy.random import default_rng
from scipy.spatial import KDTree
# from sklearn.metrics import mean_squared_error
from sklearn.model_selection import GridSearchCV, cross_val_score
from sklearn.neighbors import KNeighborsRegressor
# A simple implementation based ... | 28.121212 | 77 | 0.699353 |
33bdb087d0e8981ebdaff42d94e3e2bc86dc46f3 | 6,608 | py | Python | pangaea/download.py | ss-lab-cancerunit/pangaea | 1d186db6aba76674edc3826797decbf487b4f337 | [
"Unlicense"
] | null | null | null | pangaea/download.py | ss-lab-cancerunit/pangaea | 1d186db6aba76674edc3826797decbf487b4f337 | [
"Unlicense"
] | 1 | 2020-03-31T18:21:47.000Z | 2020-03-31T18:21:47.000Z | pangaea/download.py | ss-lab-cancerunit/pangaea | 1d186db6aba76674edc3826797decbf487b4f337 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
import argparse
import time
import re
import os
import sys
import json
import subprocess
from urllib3.exceptions import ProtocolError
import requests
SEARCH_URL = 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi'
FETCH_URL = 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi'... | 32.234146 | 108 | 0.624849 |
33bdb4c90025fb2804cf5d5f71273a169d76a799 | 9,734 | py | Python | pytorch_lightning_spells/optimizers.py | veritable-tech/pytorch-lightning-spells | 43036be8da6a8d0021e63015bcd7953984848114 | [
"Apache-2.0"
] | 5 | 2021-01-10T21:55:48.000Z | 2021-07-03T03:59:41.000Z | pytorch_lightning_spells/optimizers.py | veritable-tech/pytorch-lightning-spells | 43036be8da6a8d0021e63015bcd7953984848114 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning_spells/optimizers.py | veritable-tech/pytorch-lightning-spells | 43036be8da6a8d0021e63015bcd7953984848114 | [
"Apache-2.0"
] | 1 | 2022-02-18T10:40:10.000Z | 2022-02-18T10:40:10.000Z | import math
from collections import defaultdict
import torch
from torch.optim.optimizer import Optimizer, required
class RAdam(Optimizer):
"""RAdam optimizer, a theoretically sound variant of Adam.
Source: `LiyuanLucasLiu/RAdam <https://github.com/LiyuanLucasLiu/RAdam/blob/master/radam/radam.py>`_
Unde... | 41.245763 | 122 | 0.539449 |
33bdd8a56faa665cc81449f00453a25f1ff26f63 | 333 | py | Python | cryptopals/building_blocks/pad.py | kmanc/cryptopals | ac699942eec8625e160bdf1a3ae2e310617a2b8c | [
"MIT"
] | 1 | 2020-08-05T01:02:33.000Z | 2020-08-05T01:02:33.000Z | cryptopals/building_blocks/pad.py | kmanc/cryptopals | ac699942eec8625e160bdf1a3ae2e310617a2b8c | [
"MIT"
] | null | null | null | cryptopals/building_blocks/pad.py | kmanc/cryptopals | ac699942eec8625e160bdf1a3ae2e310617a2b8c | [
"MIT"
] | null | null | null | def pkcs_7_pad(input_bytes: bytes, length: int):
"""Takes in a byte string and an integer. Outputs a byte string padded to a block size of integer following PKCS#7 standards"""
size_needed = length - (len(input_bytes) % length)
padded_bytes = input_bytes + (bytes([size_needed]) * size_needed)
return pa... | 37 | 131 | 0.723724 |
33be2b26263f72c429e10ec7d58a3af3b1686371 | 75,625 | py | Python | master/rabbitvcs-master/rabbitvcs-master/rabbitvcs/vcs/git/gittyup/client.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/rabbitvcs-master/rabbitvcs-master/rabbitvcs/vcs/git/gittyup/client.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/rabbitvcs-master/rabbitvcs-master/rabbitvcs/vcs/git/gittyup/client.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | from __future__ import absolute_import
from __future__ import print_function
#
# client.py
#
import os, errno
import os.path
import re
import shutil
import fnmatch
import time
from datetime import datetime
from mimetypes import guess_type
import subprocess
import dulwich.errors
import dulwich.repo
import dulwich.por... | 34.81814 | 178 | 0.547319 |
33be6dfb906ed0759fb04281e5a04d1bf62bf72c | 2,595 | py | Python | Sign-Language-Recognition/code/predict_from_camera.py | lhvubtqn/Sign-Language-Recognition | 5623f0bdbfbcb2b9663b870ac8d1dec2d2ed78e4 | [
"MIT"
] | null | null | null | Sign-Language-Recognition/code/predict_from_camera.py | lhvubtqn/Sign-Language-Recognition | 5623f0bdbfbcb2b9663b870ac8d1dec2d2ed78e4 | [
"MIT"
] | null | null | null | Sign-Language-Recognition/code/predict_from_camera.py | lhvubtqn/Sign-Language-Recognition | 5623f0bdbfbcb2b9663b870ac8d1dec2d2ed78e4 | [
"MIT"
] | null | null | null | import os
import sys
import traceback
import logging
import cv2
from sklearn.externals import joblib
from common.config import get_config
from common.image_transformation import apply_image_transformation
from common.image_transformation import resize_image
logging_format = '[%(asctime)s||%(name)s||%(levelname)s]::... | 31.26506 | 120 | 0.631599 |
33be79617d8227ef2ad77d34f0cef616b6ec335a | 3,614 | py | Python | naz/ratelimiter.py | jwenjian/naz | 905ce81703e5bb0068915d48e72fc9dca8cda4ab | [
"MIT"
] | null | null | null | naz/ratelimiter.py | jwenjian/naz | 905ce81703e5bb0068915d48e72fc9dca8cda4ab | [
"MIT"
] | null | null | null | naz/ratelimiter.py | jwenjian/naz | 905ce81703e5bb0068915d48e72fc9dca8cda4ab | [
"MIT"
] | null | null | null | import abc
import time
import typing
import asyncio
import logging
from . import log
class BaseRateLimiter(abc.ABC):
"""
This is the interface that must be implemented to satisfy naz's rate limiting.
User implementations should inherit this class and
implement the :func:`limit <BaseRateLimiter.limit>... | 34.419048 | 118 | 0.604593 |
33bede4c8036902ac107aec00ebb96a9769b6b65 | 3,503 | py | Python | data/img2npy_temporal.py | yanlinqian/Temporal-Color-Constancy | ebd363962fa8ae0908252cabaf97355da3da8a80 | [
"MIT"
] | 8 | 2020-09-04T08:55:41.000Z | 2021-07-16T01:51:57.000Z | data/img2npy_temporal.py | yanlinqian/Temporal-Color-Constancy | ebd363962fa8ae0908252cabaf97355da3da8a80 | [
"MIT"
] | 3 | 2021-11-04T02:35:09.000Z | 2021-11-24T12:37:28.000Z | data/img2npy_temporal.py | yanlinqian/Temporal-Color-Constancy | ebd363962fa8ae0908252cabaf97355da3da8a80 | [
"MIT"
] | 1 | 2020-10-15T13:20:42.000Z | 2020-10-15T13:20:42.000Z | import os
import sys
import cv2
import numpy as np
import glob
BOARD_FILL_COLOR = 1e-5
def main():
benchmark='./data'
datadir_train=benchmark+'/train'
datadir_test =benchmark+'/test'
if not os.path.exists('./data/'):
os.mkdir('./data')
if not os.path.exists('./d... | 35.03 | 115 | 0.557522 |
33beeee0bc317a634df2f680795a98fe3e429e4a | 5,459 | py | Python | models/vae.py | shubham14/Fraud_Detection | 44880940c550d5abc0b1dd0cd0b14cc697f4c41f | [
"MIT"
] | null | null | null | models/vae.py | shubham14/Fraud_Detection | 44880940c550d5abc0b1dd0cd0b14cc697f4c41f | [
"MIT"
] | null | null | null | models/vae.py | shubham14/Fraud_Detection | 44880940c550d5abc0b1dd0cd0b14cc697f4c41f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Jul 19 21:45:11 2019
@author: Shubham
"""
from __future__ import print_function
import torch
import torch.utils.data
from torch import nn, optim
from torch.nn import functional as F
from torchvision import datasets, transforms
import sys
sys.path.append('C:\\Users\\Shubham\\... | 33.490798 | 83 | 0.595714 |
33bef122b5c63c40c2b5234dd05a6c9c5a45abd1 | 7,103 | py | Python | prediction.py | mato00/TFAN_HS_Segmentation | 21e95fdcbec8b2c06909bc8cb99cb87727a9da6f | [
"MIT"
] | 1 | 2021-07-14T01:36:38.000Z | 2021-07-14T01:36:38.000Z | prediction.py | mato00/TFAN_HS_Segmentation | 21e95fdcbec8b2c06909bc8cb99cb87727a9da6f | [
"MIT"
] | null | null | null | prediction.py | mato00/TFAN_HS_Segmentation | 21e95fdcbec8b2c06909bc8cb99cb87727a9da6f | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
np.set_printoptions(threshold=np.inf)
import os
import librosa
import tensorflow as tf
from prepare_dataset import read_sample
from segnet import SegNet
import heart_sound_preprocessing as hsp
import math
def correct(preds):
V = np.zeros_like(preds)
Idx = np.... | 37.781915 | 127 | 0.602422 |
33bef7b46e0dd653efcef593f89015bd1402f2e2 | 746 | py | Python | tests/test_utils.py | Cologler/sortrule-python | 97d7a9150d7548ebed6375d13c41e01cb3703f07 | [
"MIT"
] | null | null | null | tests/test_utils.py | Cologler/sortrule-python | 97d7a9150d7548ebed6375d13c41e01cb3703f07 | [
"MIT"
] | null | null | null | tests/test_utils.py | Cologler/sortrule-python | 97d7a9150d7548ebed6375d13c41e01cb3703f07 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (c) 2019~2999 - Cologler <skyoflw@gmail.com>
# ----------
#
# ----------
from pytest import raises
from sortrule.utils import MixDict
def test_mixdict_new():
md = MixDict()
assert not md
assert len(md) == 0
def test_mixdict_simple():
md = MixDict()
with rais... | 16.954545 | 56 | 0.544236 |
33bf3bd4c77ccfb46236b9fc6686726644d17c90 | 291 | py | Python | visualization/eolearn/visualization/__init__.py | atedstone/eo-learn | a05d132757ac9dcfd9e9504c74f1e565b8e0f20c | [
"MIT"
] | null | null | null | visualization/eolearn/visualization/__init__.py | atedstone/eo-learn | a05d132757ac9dcfd9e9504c74f1e565b8e0f20c | [
"MIT"
] | null | null | null | visualization/eolearn/visualization/__init__.py | atedstone/eo-learn | a05d132757ac9dcfd9e9504c74f1e565b8e0f20c | [
"MIT"
] | null | null | null | """
A collection of visualization utilities
"""
from .eoworkflow_visualization import EOWorkflowVisualization
from .eoexecutor_visualization import EOExecutorVisualization
try:
from .eopatch_visualization import EOPatchVisualization
except ImportError:
pass
__version__ = '0.7.1'
| 20.785714 | 61 | 0.817869 |
33bf548007ab709baa874187810a86069d283ad8 | 4,616 | py | Python | deepfake-detection/scripts/add_dataset_objective.py | yagosys/substra-examples | dee1b90a6ad6a5cdfce7e234621a353df564a8c0 | [
"Apache-2.0"
] | 8 | 2020-07-24T11:05:32.000Z | 2021-01-06T09:18:16.000Z | deepfake-detection/scripts/add_dataset_objective.py | yagosys/substra-examples | dee1b90a6ad6a5cdfce7e234621a353df564a8c0 | [
"Apache-2.0"
] | 4 | 2020-07-29T16:14:49.000Z | 2021-03-30T08:00:39.000Z | deepfake-detection/scripts/add_dataset_objective.py | yagosys/substra-examples | dee1b90a6ad6a5cdfce7e234621a353df564a8c0 | [
"Apache-2.0"
] | 3 | 2020-07-24T11:37:25.000Z | 2021-04-29T12:03:37.000Z | import json
import logging
import os
import zipfile
from contextlib import contextmanager
from types import SimpleNamespace
from tqdm import tqdm
import substra
default_stream_handler = logging.StreamHandler()
substra_logger = logging.getLogger('substra')
substra_logger.addHandler(default_stream_handler)
@contextm... | 32.055556 | 98 | 0.701473 |
33bfa27efc1cedef343fd457865abaad959013ab | 2,376 | py | Python | rl_rlbench/td3_model.py | Rxzh/DRL_MINES | bf46f049f3640e37884b04347f1a99e5de734c14 | [
"MIT"
] | null | null | null | rl_rlbench/td3_model.py | Rxzh/DRL_MINES | bf46f049f3640e37884b04347f1a99e5de734c14 | [
"MIT"
] | null | null | null | rl_rlbench/td3_model.py | Rxzh/DRL_MINES | bf46f049f3640e37884b04347f1a99e5de734c14 | [
"MIT"
] | null | null | null | import paddle.fluid as fluid
import parl
from parl import layers
import tensorflow as tf
import keras.backend as K
from keras.initializers import GlorotNormal
from keras.models import Model
from keras.optimizers import Adam
from keras.layers import Input, Dense, BatchNormalization, Activation, Lambda
class RLBenchM... | 27.952941 | 77 | 0.619108 |
33bfc57460e647810fe75cd020de0d7446d70580 | 2,832 | py | Python | daoliproxy/api/zones.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | daoliproxy/api/zones.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | daoliproxy/api/zones.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | import webob
from webob import exc
from oslo_config import cfg
from oslo_log import log as logging
from daoliproxy.api.base import BaseController
from daoliproxy.api.openstack import wsgi
from daoliproxy import exception
from daoliproxy.i18n import _
from daoliproxy import utils
CONF = cfg.CONF
LOG = logging.getLog... | 30.451613 | 69 | 0.625 |
33bfdac2d384b50002359bea75712476239dfa43 | 26,093 | py | Python | keystoneclient/tests/unit/v3/test_auth_saml2.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/lib/python2.7/site-packages/keystoneclient/tests/unit/v3/test_auth_saml2.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/lib/python2.7/site-packages/keystoneclient/tests/unit/v3/test_auth_saml2.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 41.815705 | 79 | 0.654237 |
33bff163233b97bd858d8a70e95761f49a91a2a8 | 19,987 | py | Python | oscar/apps/dashboard/catalogue/views.py | elliotthill/django-oscar | 5a71a1f896f2c14f8ed3e68535a36b26118a65c5 | [
"BSD-3-Clause"
] | 1 | 2015-08-02T05:36:11.000Z | 2015-08-02T05:36:11.000Z | oscar/apps/dashboard/catalogue/views.py | elliotthill/django-oscar | 5a71a1f896f2c14f8ed3e68535a36b26118a65c5 | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/dashboard/catalogue/views.py | elliotthill/django-oscar | 5a71a1f896f2c14f8ed3e68535a36b26118a65c5 | [
"BSD-3-Clause"
] | null | null | null | import six
from django.core.exceptions import ObjectDoesNotExist
from django.views import generic
from django.db.models import get_model, Q
from django.http import HttpResponseRedirect, Http404
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.utils.translation import ugettex... | 37.499062 | 79 | 0.639266 |
33bff95995ce9c58ebae0826c4e07919bf1e1f94 | 3,716 | py | Python | src/core.py | thequux/pylectronics | 7d806afb59e5172ae710a13eb370ac64afa77a6d | [
"MIT"
] | 1 | 2021-09-03T14:03:00.000Z | 2021-09-03T14:03:00.000Z | src/core.py | thequux/pylectronics | 7d806afb59e5172ae710a13eb370ac64afa77a6d | [
"MIT"
] | null | null | null | src/core.py | thequux/pylectronics | 7d806afb59e5172ae710a13eb370ac64afa77a6d | [
"MIT"
] | 1 | 2022-01-23T06:55:11.000Z | 2022-01-23T06:55:11.000Z | """Base classes for components and wires"""
from abc import ABCMeta, abstractmethod
from collections.abc import Iterator
from typing import List, Optional, Union
class Driver:
"""This class represents a voltage source or sink that might be tristated.
It drives some associated wire to some voltage level with... | 28.584615 | 125 | 0.608988 |
33c0127f792e58aaa0558a6ade50087428683b6e | 3,959 | py | Python | amatino/tests/derived/position.py | Amatino-Code/amatino-python | 6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f | [
"MIT"
] | 2 | 2018-07-20T20:00:33.000Z | 2020-10-08T15:49:06.000Z | amatino/tests/derived/position.py | Amatino-Code/amatino-python | 6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f | [
"MIT"
] | 1 | 2020-05-21T02:49:29.000Z | 2020-05-21T02:49:29.000Z | amatino/tests/derived/position.py | Amatino-Code/amatino-python | 6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f | [
"MIT"
] | 3 | 2018-09-03T09:31:31.000Z | 2020-05-21T05:30:00.000Z | """
Amatino API Python Bindings
Position Test Module
author: hugh@blinkybeach.com
"""
from amatino.tests.primary.account import AccountTest
from amatino import Account
from amatino import Transaction
from amatino import Position
from amatino import Entity
from amatino import GlobalUnit
from amatino import TreeNode
from... | 31.420635 | 72 | 0.56681 |
33c01514701a196506097bb8aa27f02e7b2ae6b5 | 11,672 | py | Python | services/traction/acapy_client/model/action_menu_fetch_result.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 12 | 2022-01-29T20:30:03.000Z | 2022-03-29T11:46:14.000Z | services/traction/acapy_client/model/action_menu_fetch_result.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 38 | 2021-11-22T17:52:50.000Z | 2022-03-31T17:52:00.000Z | services/traction/acapy_client/model/action_menu_fetch_result.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 9 | 2021-11-22T18:05:48.000Z | 2022-03-29T11:25:08.000Z | """
Aries Cloud Agent
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v0.7.2
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from acapy_cli... | 41.537367 | 129 | 0.561943 |
33c01a0efd13c8ff5c9aef205cce0fe23ed68106 | 33,181 | py | Python | gammapy/data/event_list.py | isu-veritas/gammapy | 715b041d7d3925bd51109dc9534634263a2f2d12 | [
"BSD-3-Clause"
] | null | null | null | gammapy/data/event_list.py | isu-veritas/gammapy | 715b041d7d3925bd51109dc9534634263a2f2d12 | [
"BSD-3-Clause"
] | null | null | null | gammapy/data/event_list.py | isu-veritas/gammapy | 715b041d7d3925bd51109dc9534634263a2f2d12 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import collections
import logging
import numpy as np
from astropy import units as u
from astropy.coordinates import AltAz, Angle, SkyCoord
from astropy.coordinates.angle_utilities import angular_separation
from astropy.table import Table
from astropy.table... | 32.214563 | 108 | 0.584039 |
33c022f72e6375d9dee014b90f45e026a347b98d | 3,224 | py | Python | native/bitcoin/__init__.py | pcsubirachs/ptpybtc | eb1571547c449fb5d7454a684140f67b871b7c04 | [
"MIT"
] | null | null | null | native/bitcoin/__init__.py | pcsubirachs/ptpybtc | eb1571547c449fb5d7454a684140f67b871b7c04 | [
"MIT"
] | null | null | null | native/bitcoin/__init__.py | pcsubirachs/ptpybtc | eb1571547c449fb5d7454a684140f67b871b7c04 | [
"MIT"
] | null | null | null | # Copyright (C) 2012-2018 The python-bitcoinlib developers
#
# This file is part of python-bitcoinlib.
#
# It is subject to the license terms in the LICENSE file found in the top-level
# directory of this distribution.
#
# No part of python-bitcoinlib, including this file, may be copied, modified,
# propagated, or dist... | 36.224719 | 94 | 0.649194 |
33c050a2d5b8490ee51c82b662d8a75aca1e7b53 | 10,756 | py | Python | pollination_sdk/models/dag_task.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 2 | 2020-01-30T23:28:59.000Z | 2020-05-06T16:43:47.000Z | pollination_sdk/models/dag_task.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 1 | 2020-10-02T18:00:25.000Z | 2020-10-02T18:00:25.000Z | pollination_sdk/models/dag_task.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | null | null | null | # coding: utf-8
"""
pollination-server
Pollination Server OpenAPI Definition # noqa: E501
The version of the OpenAPI document: 0.16.0
Contact: info@pollination.cloud
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from pollination_sdk.configu... | 30.643875 | 221 | 0.596225 |
33c0693aff0fda1a95a850f2542b80bfd57a8b35 | 814 | py | Python | src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/run/promote/test_pg_ctl.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 9 | 2018-04-20T03:31:01.000Z | 2020-05-13T14:10:53.000Z | src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/run/promote/test_pg_ctl.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 36 | 2017-09-21T09:12:27.000Z | 2020-06-17T16:40:48.000Z | src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/run/promote/test_pg_ctl.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 32 | 2017-08-31T12:50:52.000Z | 2022-03-01T07:34:53.000Z | """
Copyright (c) 2004-Present Pivotal Software, Inc.
This program and the accompanying materials are made available under
the terms of the 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.... | 37 | 73 | 0.79484 |
33c07b04161635bd13695211c75d038ae99b46a3 | 12,754 | py | Python | src/modules/seq2seq_decoder.py | pruksmhc/jiant | 02479be51e128abf5e4f8e0b7eb947de22818cf2 | [
"MIT"
] | null | null | null | src/modules/seq2seq_decoder.py | pruksmhc/jiant | 02479be51e128abf5e4f8e0b7eb947de22818cf2 | [
"MIT"
] | null | null | null | src/modules/seq2seq_decoder.py | pruksmhc/jiant | 02479be51e128abf5e4f8e0b7eb947de22818cf2 | [
"MIT"
] | null | null | null | # This is a slightly modified version of the AllenNLP SimpleSeq2Seq class:
# https://github.com/allenai/allennlp/blob/master/allennlp/models/encoder_decoders/simple_seq2seq.py # noqa
import logging as log
from typing import Dict
import torch
from allennlp.common.util import END_SYMBOL, START_SYMBOL
from allennlp.dat... | 45.877698 | 108 | 0.666928 |
33c0b92d61c01f60c937d5a4e7f68168c50b6072 | 14,761 | py | Python | src/osmclient/sol005/nsi.py | qarawlus/tng-sdk-benchmark | 692490cae343288b0f7c93e3753e92bcaafabdd9 | [
"Apache-2.0"
] | 2 | 2019-10-18T19:59:46.000Z | 2019-12-02T03:11:06.000Z | src/osmclient/sol005/nsi.py | qarawlus/tng-sdk-benchmark | 692490cae343288b0f7c93e3753e92bcaafabdd9 | [
"Apache-2.0"
] | 33 | 2019-07-08T13:56:27.000Z | 2022-02-11T13:57:25.000Z | src/osmclient/sol005/nsi.py | qarawlus/tng-sdk-benchmark | 692490cae343288b0f7c93e3753e92bcaafabdd9 | [
"Apache-2.0"
] | 5 | 2019-08-26T13:00:20.000Z | 2019-10-12T17:35:31.000Z | # Copyright 2018 Telefonica
#
# 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 ... | 42.909884 | 120 | 0.511347 |
33c0e066604d6ca627d34d75ab1239f618ce5c33 | 2,657 | py | Python | plotting/plot_pr_curve.py | wadpac/SleepStageClassification | 5b288995e62bbd66faa66bd932b06af8a65f8445 | [
"Apache-2.0"
] | 24 | 2019-04-15T09:18:51.000Z | 2022-03-05T14:09:34.000Z | plotting/plot_pr_curve.py | wadpac/SleepStageClassification | 5b288995e62bbd66faa66bd932b06af8a65f8445 | [
"Apache-2.0"
] | 2 | 2021-01-28T01:02:06.000Z | 2021-04-02T06:34:04.000Z | plotting/plot_pr_curve.py | wadpac/SleepStageClassification | 5b288995e62bbd66faa66bd932b06af8a65f8445 | [
"Apache-2.0"
] | 11 | 2019-05-30T19:27:39.000Z | 2021-06-19T02:41:53.000Z | import sys,os
import pandas as pd
import numpy as np
from scipy.signal import savgol_filter
from sklearn.metrics import precision_recall_curve, average_precision_score
from collections import Counter
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
plt.rcParams.update({'font.size': 16})
def mai... | 35.905405 | 123 | 0.630034 |
33c0e636f40b06806c8effaa94e868bcd9837882 | 2,648 | py | Python | salt/roster/flat.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | 1 | 2020-09-16T21:31:02.000Z | 2020-09-16T21:31:02.000Z | salt/roster/flat.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | null | null | null | salt/roster/flat.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Read in the roster from a flat file using the renderer system
'''
from __future__ import absolute_import
# Import python libs
import fnmatch
import re
# Import Salt libs
import salt.loader
from salt.template import compile_template
from salt.ext.six import string_types
from salt.roster imp... | 26.747475 | 76 | 0.57855 |
33c13760e6a883eae9cfec9187e95879256acceb | 12,340 | py | Python | backend/tests/fixtures.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | 2 | 2022-03-17T04:50:20.000Z | 2022-03-17T04:51:31.000Z | backend/tests/fixtures.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | backend/tests/fixtures.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | import contextlib
import logging
import os
import secrets
import time
import uuid
from concurrent.futures import ThreadPoolExecutor
from dataclasses import dataclass
from datetime import datetime, timedelta
from decimal import Decimal
from typing import Optional, Tuple
from unittest.mock import Mock
import web3
from b... | 33.623978 | 111 | 0.700243 |
33c1525e5b206f7b6b169994a489dba63a31c4cf | 29,428 | py | Python | ulysses/ulsbase.py | earlyuniverse/ulysses | 9b8bade6d2d6badf2f17bac37306ea7ebceeeb4a | [
"MIT"
] | 9 | 2020-07-21T17:08:18.000Z | 2022-02-05T18:52:56.000Z | ulysses/ulsbase.py | earlyuniverse/ulysses | 9b8bade6d2d6badf2f17bac37306ea7ebceeeb4a | [
"MIT"
] | 2 | 2020-07-23T03:24:57.000Z | 2021-05-17T23:17:12.000Z | ulysses/ulsbase.py | earlyuniverse/ulysses | 9b8bade6d2d6badf2f17bac37306ea7ebceeeb4a | [
"MIT"
] | 1 | 2021-09-16T16:20:58.000Z | 2021-09-16T16:20:58.000Z | from scipy.special import kn
import numpy as np
from odeintw import odeintw
import timeit
from numpy import linalg
import cmath
def fast_isPerturbative(y):
"""
Check perturbativity of Yukawas
"""
#limit of perturbativity for y
limit = np.power(4*np.pi,0.5)
#check if any element of column 1, 2 o... | 35.455422 | 248 | 0.509957 |
33c1549a38986a22c4f81bfcbfaa0cf45a685a36 | 3,391 | py | Python | yaksh/hook_evaluator.py | tyochans/online_test | 4eb754c2e71922819de7390d1b4993a21763de3e | [
"Python-2.0"
] | 1 | 2022-03-21T11:14:17.000Z | 2022-03-21T11:14:17.000Z | yaksh/hook_evaluator.py | tyochans/online_test | 4eb754c2e71922819de7390d1b4993a21763de3e | [
"Python-2.0"
] | null | null | null | yaksh/hook_evaluator.py | tyochans/online_test | 4eb754c2e71922819de7390d1b4993a21763de3e | [
"Python-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
import traceback
import os
import psutil
# Local imports
from .file_utils import copy_files, delete_files
from .base_evaluator import BaseEvaluator
from .grader import TimeoutException
from .error_messages import prettify_exceptions
class HookEvaluator(BaseEvaluator):
def __init_... | 36.462366 | 79 | 0.579475 |
33c174a47d1dfa5686278a8dd8b11602f1c33a40 | 23,356 | py | Python | Sklearn_scipy_numpy/source/sklearn/utils/extmath.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 1 | 2019-06-27T12:09:44.000Z | 2019-06-27T12:09:44.000Z | Sklearn_scipy_numpy/source/sklearn/utils/extmath.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | Sklearn_scipy_numpy/source/sklearn/utils/extmath.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | """
Extended math utilities.
"""
# Authors: Gael Varoquaux
# Alexandre Gramfort
# Alexandre T. Passos
# Olivier Grisel
# Lars Buitinck
# Stefan van der Walt
# Kyle Kastner
# Giorgio Patrini
# License: BSD 3 clause
from __future__ import division
from funct... | 30.020566 | 79 | 0.624379 |
33c185f5c02104f394b2e9d4760d88f08dd62888 | 2,774 | py | Python | examples/gymfc_nf/envs/ramp.py | xabierolaz/gymfc | 4cb95ac6a890843d5a85dc78bc485be9358b7faf | [
"MIT"
] | 270 | 2018-05-17T07:06:06.000Z | 2022-03-28T08:43:54.000Z | examples/gymfc_nf/envs/ramp.py | xabierolaz/gymfc | 4cb95ac6a890843d5a85dc78bc485be9358b7faf | [
"MIT"
] | 91 | 2018-05-24T05:51:50.000Z | 2022-03-26T03:49:50.000Z | examples/gymfc_nf/envs/ramp.py | xabierolaz/gymfc | 4cb95ac6a890843d5a85dc78bc485be9358b7faf | [
"MIT"
] | 96 | 2018-06-11T07:58:01.000Z | 2022-03-28T08:43:56.000Z | import math
import numpy as np
import gym
from gym import spaces
from gym.utils import seeding
from gymfc.envs.fc_env import FlightControlEnv
import time
from neuroflight_trainer.gyms.rewards import RewardEnv
class RampEnv(RewardEnv):
def __init__(self,
max_rate = 800,
max_sim... | 29.827957 | 82 | 0.569935 |
33c1864e080228f04b4ba8260decfdcbc5a7bfae | 2,428 | py | Python | examples/conformer/test.py | huylenguyen806/vnasrg | caee2e79d0eb9d1a997f5df8e2ba3ee7f0a1bcae | [
"Apache-2.0"
] | 83 | 2020-06-25T18:34:28.000Z | 2020-10-14T06:17:12.000Z | examples/conformer/test.py | huylenguyen806/vnasrg | caee2e79d0eb9d1a997f5df8e2ba3ee7f0a1bcae | [
"Apache-2.0"
] | 15 | 2020-06-10T06:54:33.000Z | 2020-10-12T22:22:43.000Z | examples/conformer/test.py | huylenguyen806/vnasrg | caee2e79d0eb9d1a997f5df8e2ba3ee7f0a1bcae | [
"Apache-2.0"
] | 12 | 2020-07-25T22:09:55.000Z | 2020-10-11T10:10:57.000Z | # Copyright 2020 Huy Le Nguyen (@usimarit)
#
# 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 t... | 34.197183 | 122 | 0.757414 |
33c19aeb9a40342551979a7b15d96b018989e563 | 1,683 | py | Python | whmcs_nutanix_module/nutanix/lib/nutanix/application.py | halsayed/whmcs-demo | da60d0b22a65fa79b31580838b0e23f35eb5f750 | [
"MIT"
] | null | null | null | whmcs_nutanix_module/nutanix/lib/nutanix/application.py | halsayed/whmcs-demo | da60d0b22a65fa79b31580838b0e23f35eb5f750 | [
"MIT"
] | null | null | null | whmcs_nutanix_module/nutanix/lib/nutanix/application.py | halsayed/whmcs-demo | da60d0b22a65fa79b31580838b0e23f35eb5f750 | [
"MIT"
] | null | null | null | from .httpClient import CalmClient
def list(params):
client = CalmClient(params)
result = client.application_list()
apps = []
for app in result:
apps.append({
'name': app['metadata']['name'],
'uuid': app['metadata']['uuid'],
'project': app['metadata']['proje... | 25.5 | 68 | 0.607249 |
33c1a35dfb259ec7474933be5843640e1290f303 | 2,499 | py | Python | jaffle/config/template_string.py | albert118/jaffle | 55da4d75ad3a9ca633af3865cc35b73e3406a4ef | [
"BSD-3-Clause"
] | 5 | 2018-06-13T14:10:43.000Z | 2020-04-26T20:48:59.000Z | jaffle/config/template_string.py | albert118/jaffle | 55da4d75ad3a9ca633af3865cc35b73e3406a4ef | [
"BSD-3-Clause"
] | 1 | 2018-05-02T02:31:24.000Z | 2018-05-02T02:31:24.000Z | jaffle/config/template_string.py | albert118/jaffle | 55da4d75ad3a9ca633af3865cc35b73e3406a4ef | [
"BSD-3-Clause"
] | 2 | 2021-05-17T16:27:16.000Z | 2022-02-09T09:06:12.000Z | # -*- coding: utf-8 -*-
from collections import Iterable
from functools import wraps
from mako.template import Template
from ..functions import functions
def _match_expand(func, match=None):
"""
Wraps a function to call it with expanding matched patterns
(e.g. ``\\1``, ``\\g<1>``, etc.).
"""
if... | 25.5 | 92 | 0.543417 |
33c1aec67d9f6bb5fbb0ef92ebbb964641653868 | 3,517 | py | Python | network_simulator/test/testDataframeSize.py | brokenax3/network-simulator-py | 8ce238219010046aaf1063d546b4b7232a38d2fa | [
"MIT"
] | null | null | null | network_simulator/test/testDataframeSize.py | brokenax3/network-simulator-py | 8ce238219010046aaf1063d546b4b7232a38d2fa | [
"MIT"
] | null | null | null | network_simulator/test/testDataframeSize.py | brokenax3/network-simulator-py | 8ce238219010046aaf1063d546b4b7232a38d2fa | [
"MIT"
] | null | null | null | from multiprocessing import Pool
from bokeh.plotting import figure, show, output_file
from bokeh.palettes import Category20 as palette
import itertools
import numpy as np
import tqdm
from network_simulator.components import simulator
from network_simulator.helpers import writeSimCache, readSimCache
def main():
ret... | 30.059829 | 157 | 0.578049 |
33c1c9f79f6c10f2d4c0489cc6d2551c0fa35f53 | 1,555 | py | Python | aviation_weather/components/time.py | StephenOrJames/aviation-weather | 35594cc1ba448acdea9123380cc47ac96d2107c8 | [
"MIT"
] | 2 | 2017-03-14T23:28:28.000Z | 2020-01-10T23:04:30.000Z | aviation_weather/components/time.py | aviationweather/aviation_weather | 35594cc1ba448acdea9123380cc47ac96d2107c8 | [
"MIT"
] | null | null | null | aviation_weather/components/time.py | aviationweather/aviation_weather | 35594cc1ba448acdea9123380cc47ac96d2107c8 | [
"MIT"
] | null | null | null | import re
from aviation_weather.components import Component
from aviation_weather.exceptions import TimeDecodeError
class Time(Component):
"""The Time class represents the time and date associated with the weather.
Attributes:
day (int): The day associated with the weather.
hour (int): The h... | 33.804348 | 96 | 0.602572 |
33c1d2ffdbc6e7c060e69c8e65a387d7db5e2c4e | 4,923 | py | Python | experiments/vitchyr/rig/push_easy_with_resets/relabeling_td3_vae.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | experiments/vitchyr/rig/push_easy_with_resets/relabeling_td3_vae.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/vitchyr/rig/push_easy_with_resets/relabeling_td3_vae.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | import rlkit.misc.hyperparameter as hyp
from multiworld.envs.mujoco.cameras import (
sawyer_pusher_camera_upright_v2,
sawyer_pusher_camera_top_down,
)
from multiworld.envs.mujoco.sawyer_xyz.sawyer_push_and_reach_env import (
SawyerPushAndReachXYEnv
)
from rlkit.launchers.launcher_util import run_experiment
... | 33.263514 | 79 | 0.523664 |
33c1e2e20c9cd27b42b6f5bfe36d6b27da9ab3b0 | 2,188 | py | Python | pytoon/tests/test_brick_connection.py | marcofinalist/pytoon | 2ae5e9e3f2e568b099084a6fcebaa57392598972 | [
"BSD-3-Clause"
] | 1 | 2019-04-04T13:19:05.000Z | 2019-04-04T13:19:05.000Z | pytoon/tests/test_brick_connection.py | marcofinalist/pytoon | 2ae5e9e3f2e568b099084a6fcebaa57392598972 | [
"BSD-3-Clause"
] | null | null | null | pytoon/tests/test_brick_connection.py | marcofinalist/pytoon | 2ae5e9e3f2e568b099084a6fcebaa57392598972 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_pytoon
----------------------------------
Tests for `pytoon` module.
"""
import unittest
from mock import patch, Mock
from tinkerforge.ip_connection import IPConnection
from tinkerforge.bricklet_hall_effect import HallEffect
from tinkerforge.bricklet_ambient_lig... | 34.730159 | 86 | 0.686015 |
33c1f7d09a09780a7d573d5196abcf3e9d253450 | 3,503 | py | Python | crop_subtract_png.py | gdurin/mokas | 57893d0191c988b241dcf5701d4213a3cbcf587a | [
"CC-BY-3.0"
] | null | null | null | crop_subtract_png.py | gdurin/mokas | 57893d0191c988b241dcf5701d4213a3cbcf587a | [
"CC-BY-3.0"
] | null | null | null | crop_subtract_png.py | gdurin/mokas | 57893d0191c988b241dcf5701d4213a3cbcf587a | [
"CC-BY-3.0"
] | null | null | null | import glob
import os
import skimage.io as io
import numpy as np
from PIL import Image
from scipy.ndimage import gaussian_filter
def process_image(array, crop=None, backgroundArray=None, inverted=False, gauss_radius=None, gray_level=(0, 255)):
gray_min, gray_max = gray_level
if(crop is not None):
ymin, xmin,... | 29.686441 | 126 | 0.719954 |
33c24b74862fc2de01d79fa3e63d5fa51ebd1465 | 34 | py | Python | btd6_memory_info/generated/System/Collections/Specialized/ListDictionary/NodeKeyValueCollection/node_key_value_collection.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/System/Collections/Specialized/ListDictionary/NodeKeyValueCollection/node_key_value_collection.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/System/Collections/Specialized/ListDictionary/NodeKeyValueCollection/node_key_value_collection.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class NodeKeyValueCollection: pass | 34 | 34 | 0.911765 |
33c2cae65188a5a6a3c7b9a3793c25e965679058 | 2,115 | py | Python | test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/models/_models.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/models/_models.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/models/_models.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 30.214286 | 99 | 0.590544 |
33c2ec145562551de3ab2a986fd5204e28864900 | 8,567 | py | Python | lenstronomy/Data/psf.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | lenstronomy/Data/psf.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | lenstronomy/Data/psf.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | import numpy as np
import lenstronomy.Util.kernel_util as kernel_util
import lenstronomy.Util.util as util
import warnings
__all__ = ['PSF']
class PSF(object):
"""
Point Spread Function class.
This class describes and manages products used to perform the PSF modeling (convolution for extended surface
... | 51.608434 | 146 | 0.658457 |
33c311b0deba014f9977e892130c869d87986dee | 34,311 | py | Python | odfdo/style.py | jdum/odfdo | 2494d0bed39f5a55974643206e9bafeed40f3a6b | [
"Apache-2.0"
] | 18 | 2018-04-19T08:30:48.000Z | 2022-02-14T11:00:27.000Z | odfdo/style.py | jdum/odfdo | 2494d0bed39f5a55974643206e9bafeed40f3a6b | [
"Apache-2.0"
] | 15 | 2018-04-22T00:52:41.000Z | 2021-07-05T10:16:38.000Z | odfdo/style.py | jdum/odfdo | 2494d0bed39f5a55974643206e9bafeed40f3a6b | [
"Apache-2.0"
] | 6 | 2018-04-22T00:14:12.000Z | 2021-12-06T01:42:07.000Z | # Copyright 2018-2020 Jérôme Dumonteil
# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
#
# 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/LI... | 32.186679 | 88 | 0.57314 |
33c33dc4754a8fc9a4184e8d366262796f879bba | 6,258 | py | Python | backend/api/rate.py | dyvenia/timesheets | 5120acd66cbeb3ce43bff5acfee4cd6b14882962 | [
"MIT"
] | 13 | 2021-09-27T14:53:15.000Z | 2022-02-15T05:48:01.000Z | backend/api/rate.py | dyvenia/timesheets | 5120acd66cbeb3ce43bff5acfee4cd6b14882962 | [
"MIT"
] | 45 | 2021-10-13T08:47:28.000Z | 2022-02-15T09:16:51.000Z | backend/api/rate.py | dyvenia/timesheets | 5120acd66cbeb3ce43bff5acfee4cd6b14882962 | [
"MIT"
] | null | null | null | from fastapi import APIRouter, Depends
from ..utils import engine, get_session, far_date, date_str_to_date
from sqlmodel import Session, select
from sqlalchemy.exc import NoResultFound
from ..models.rate import Rate
from datetime import datetime, timedelta
router = APIRouter(prefix="/api/rates", tags=["rate"])
@rout... | 28.445455 | 86 | 0.642538 |
33c35fa021855fd964d2c83e1c50260bd3b88bd8 | 4,149 | py | Python | arjuna/core/checks.py | ChandraMouliDisturbs/arjuna | 4965622fbb01a5e5b6459110c413accc5c483424 | [
"Apache-2.0"
] | null | null | null | arjuna/core/checks.py | ChandraMouliDisturbs/arjuna | 4965622fbb01a5e5b6459110c413accc5c483424 | [
"Apache-2.0"
] | null | null | null | arjuna/core/checks.py | ChandraMouliDisturbs/arjuna | 4965622fbb01a5e5b6459110c413accc5c483424 | [
"Apache-2.0"
] | null | null | null | # This file is a part of Arjuna
# Copyright 2015-2020 Rahul Verma
# Website: www.RahulVerma.net
# 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... | 27.117647 | 131 | 0.694384 |
33c3653e0c1f497ee28ca33ae184e03c55bdd2d4 | 3,353 | py | Python | tests/test_camera.py | FindingJohnny/simplisafe-python | e660938c8280dd47d5a90c49a39f77bba27e8a30 | [
"MIT"
] | null | null | null | tests/test_camera.py | FindingJohnny/simplisafe-python | e660938c8280dd47d5a90c49a39f77bba27e8a30 | [
"MIT"
] | null | null | null | tests/test_camera.py | FindingJohnny/simplisafe-python | e660938c8280dd47d5a90c49a39f77bba27e8a30 | [
"MIT"
] | null | null | null | """Define tests for the Camera objects."""
import aiohttp
import pytest
from simplipy import API
from .common import (
TEST_CAMERA_ID,
TEST_CAMERA_ID_2,
TEST_CLIENT_ID,
TEST_EMAIL,
TEST_PASSWORD,
TEST_SYSTEM_ID,
TEST_USER_ID,
)
@pytest.mark.asyncio
async def test_properties(aresponses, v... | 35.294737 | 100 | 0.614077 |
33c3dd8a5673af0b5d2bae623f952c44f627a48d | 1,771 | py | Python | txdav/common/datastore/podding/migration/sync_metadata.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | txdav/common/datastore/podding/migration/sync_metadata.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | txdav/common/datastore/podding/migration/sync_metadata.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | ##
# Copyright (c) 2015 Apple 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 by applicable law or... | 30.016949 | 89 | 0.72332 |
33c3eb30d7046c8d49debf6b4939194444dee380 | 4,946 | py | Python | lbrynet/schema/encoding.py | Leopere/lbry | af43b21ef6a5de5ce1fee21425bea6f8d6bf335f | [
"MIT"
] | null | null | null | lbrynet/schema/encoding.py | Leopere/lbry | af43b21ef6a5de5ce1fee21425bea6f8d6bf335f | [
"MIT"
] | null | null | null | lbrynet/schema/encoding.py | Leopere/lbry | af43b21ef6a5de5ce1fee21425bea6f8d6bf335f | [
"MIT"
] | null | null | null | import base64, binascii
from copy import deepcopy
from lbrynet.schema.address import decode_address, encode_address
from lbrynet.schema.schema import CLAIM_TYPES, CLAIM_TYPE, STREAM_TYPE, CERTIFICATE_TYPE
from lbrynet.schema.schema import SIGNATURE
from lbrynet.schema.error import DecodeError, InvalidAddress
from lbryn... | 54.351648 | 100 | 0.724222 |
33c3eb90562a5bf7778f9591ee0c2f3b260f8ae7 | 3,652 | py | Python | src/models/rnnsurv/create_model.py | data-modeler/rnn-surv | 83efaa319db7feaa40655033cb9cd423698a716f | [
"MIT"
] | 7 | 2020-01-25T15:22:05.000Z | 2021-12-31T06:11:49.000Z | src/models/rnnsurv/create_model.py | texchi2/rnn-surv | 132097bae8da677ffb532d0bfebad6fcb511d2cb | [
"MIT"
] | 6 | 2020-02-05T22:35:39.000Z | 2022-02-10T01:33:58.000Z | src/models/rnnsurv/create_model.py | texchi2/rnn-surv | 132097bae8da677ffb532d0bfebad6fcb511d2cb | [
"MIT"
] | 4 | 2019-12-26T20:16:02.000Z | 2020-12-10T15:10:38.000Z | '''
Create Model
-----
Creates the RNN-SURV model based on hyperparameters.
'''
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.models import Sequential, Model
from tensorflow.keras.layers import Dense, LSTM, Input, TimeDistributed, Dropout, Reshape, Flatten, Lambda
from .losses... | 31.756522 | 106 | 0.590088 |
33c40580d033df69d7e6b7572aef1bd18b582b3a | 10,267 | py | Python | qiskit_experiments/library/tomography/tomography_experiment.py | mriedem/qiskit-experiments | b40cb9887061136e26bffd62ee07d5afe79af2b0 | [
"Apache-2.0"
] | 1 | 2022-03-17T05:27:28.000Z | 2022-03-17T05:27:28.000Z | qiskit_experiments/library/tomography/tomography_experiment.py | dongcc/qiskit-experiments | 894dcf41ac69ace9e6a0a3c4800d4b6994ac3b5a | [
"Apache-2.0"
] | null | null | null | qiskit_experiments/library/tomography/tomography_experiment.py | dongcc/qiskit-experiments | 894dcf41ac69ace9e6a0a3c4800d4b6994ac3b5a | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 41.566802 | 98 | 0.64605 |
33c431454b50a4bac1f4567bcc7c14406527eb4f | 13,086 | py | Python | finrl_meta/env_stock_trading/env_stocktrading_A_sinawave3.py | war3gu/FinRL-Meta | c394511530c4a87d61436b2c0467d504849737d7 | [
"MIT"
] | 1 | 2022-02-21T11:20:59.000Z | 2022-02-21T11:20:59.000Z | finrl_meta/env_stock_trading/env_stocktrading_A_sinawave3.py | war3gu/FinRL-Meta | c394511530c4a87d61436b2c0467d504849737d7 | [
"MIT"
] | null | null | null | finrl_meta/env_stock_trading/env_stocktrading_A_sinawave3.py | war3gu/FinRL-Meta | c394511530c4a87d61436b2c0467d504849737d7 | [
"MIT"
] | 1 | 2022-03-03T06:51:46.000Z | 2022-03-03T06:51:46.000Z |
import numpy as np
import pandas as pd
from gym.utils import seeding
import gym
from gym import spaces
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import pickle
from stable_baselines3.common.vec_env import DummyVecEnv, SubprocVecEnv
from stable_baselines3.common.logger import Logger as log
... | 35.559783 | 136 | 0.520251 |
33c4484cf7e24ce429da533518f3344f71fafe79 | 1,013 | py | Python | setup.py | treeverse/boto-s3-router | 4990cb05e69c6e67086565520d1ca84a007fd163 | [
"Apache-2.0"
] | 14 | 2021-12-14T15:48:23.000Z | 2022-03-15T14:07:11.000Z | setup.py | treeverse/boto-s3-router | 4990cb05e69c6e67086565520d1ca84a007fd163 | [
"Apache-2.0"
] | 3 | 2021-12-16T14:00:51.000Z | 2022-03-01T18:52:08.000Z | setup.py | treeverse/boto-s3-router | 4990cb05e69c6e67086565520d1ca84a007fd163 | [
"Apache-2.0"
] | null | null | null | """
Boto S3 Router install script
"""
from setuptools import setup, find_packages
from pathlib import Path
import os
NAME = "boto-s3-router"
this_directory = Path(__file__).parent
LONG_DESCRIPTION = (this_directory / "README.md").read_text()
# To install the library, run the following
#
# python setup.py install
... | 25.325 | 87 | 0.706811 |
33c4552dd391124b75abf2abfcd0896fdf4f0b1d | 1,409 | py | Python | autogoal/datasets/dorothea.py | lorainemg/autogoal | a8731ec79e761d9cd01e2b8f24d53e29e2ae05e4 | [
"MIT"
] | 1 | 2021-07-11T01:28:52.000Z | 2021-07-11T01:28:52.000Z | autogoal/datasets/dorothea.py | lorainemg/autogoal | a8731ec79e761d9cd01e2b8f24d53e29e2ae05e4 | [
"MIT"
] | null | null | null | autogoal/datasets/dorothea.py | lorainemg/autogoal | a8731ec79e761d9cd01e2b8f24d53e29e2ae05e4 | [
"MIT"
] | null | null | null | # coding: utf-8
import os
import numpy as np
from scipy import sparse as sp
from autogoal.datasets import datapath, download
def load():
"""
Loads train and valid datasets from [DOROTHEA uci dataset](https://archive.ics.uci.edu/ml/datasets/dorothea).
##### Examples
```python
>>> X_train, y_trai... | 27.096154 | 113 | 0.625976 |
33c45577b954ec6c58ba2b66bedeb25e25fb49c2 | 9,098 | py | Python | alipay/aop/api/domain/AlipayPcreditHuabeiDiscountSolutionModifyModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayPcreditHuabeiDiscountSolutionModifyModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayPcreditHuabeiDiscountSolutionModifyModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.SubShopInfo import SubShopInfo
class AlipayPcreditHuabeiDiscountSolutionModifyModel(object):
def __init__(self):
self._activity_name = None
self._amount_budge... | 38.880342 | 109 | 0.637503 |
33c4703e9de8d011ccb2b09aa42d3c723795ee31 | 6,455 | py | Python | tests/trinity/core/p2p-proto/test_peer_block_body_validator_api.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 137 | 2017-03-17T11:37:51.000Z | 2022-03-07T07:51:28.000Z | tests/trinity/core/p2p-proto/test_peer_block_body_validator_api.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 102 | 2017-04-07T10:43:03.000Z | 2018-11-11T18:01:56.000Z | tests/trinity/core/p2p-proto/test_peer_block_body_validator_api.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 39 | 2017-03-17T11:38:52.000Z | 2021-02-18T23:05:17.000Z | import asyncio
import os
import random
import time
import pytest
import rlp
from eth_utils import (
big_endian_to_int,
keccak,
to_tuple,
)
from eth.db.trie import make_trie_root_and_nodes
from eth.rlp.headers import BlockHeader
from eth.rlp.transactions import BaseTransactionFields
from trinity.protoco... | 31.033654 | 99 | 0.729047 |
33c47fc428a9193e2d15a312f80508d7125d8584 | 1,038 | py | Python | src/sentry/plugins/base/structs.py | NetEaseGame/Sentry | b2804c3e4b7fea61294e12d9b608b5fbdeeac5a3 | [
"BSD-3-Clause"
] | 20 | 2016-10-01T04:29:24.000Z | 2020-10-09T07:23:34.000Z | src/sentry/plugins/base/structs.py | NetEaseGame/Sentry | b2804c3e4b7fea61294e12d9b608b5fbdeeac5a3 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/plugins/base/structs.py | NetEaseGame/Sentry | b2804c3e4b7fea61294e12d9b608b5fbdeeac5a3 | [
"BSD-3-Clause"
] | 7 | 2016-10-27T05:12:45.000Z | 2021-05-01T14:29:53.000Z | """
sentry.plugins.base.structs
~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function
__all__ = ('Annotation', 'Notification')
import warnings
class Annotation(... | 24.714286 | 87 | 0.618497 |
33c4bd91d459816845e8e9234ce20c701623cc9a | 270 | wsgi | Python | pythonbackend/my_flask_app.wsgi | LtGlahn/vegrefendring | a5cd7fef7cee6f1cef80c6a39399ac6f4408c9e4 | [
"MIT"
] | null | null | null | pythonbackend/my_flask_app.wsgi | LtGlahn/vegrefendring | a5cd7fef7cee6f1cef80c6a39399ac6f4408c9e4 | [
"MIT"
] | null | null | null | pythonbackend/my_flask_app.wsgi | LtGlahn/vegrefendring | a5cd7fef7cee6f1cef80c6a39399ac6f4408c9e4 | [
"MIT"
] | null | null | null | #! /usr/bin/python3.6
import logging
import sys
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0, '/home/jan/vegrefhistorikkproxy/vegrefendring/pythonbackend')
from my_flask_app import app as application
application.secret_key = 'tjolaHeiOgHoppSaSaFlygerMASSE'
| 30 | 80 | 0.82963 |
33c4d742b32a328eb21f666321835be74b79743f | 1,064 | py | Python | tools/log_udp_protobuf/messages.py | greck2908/robot-software | 2e1e8177148a089e8883967375dde7f8ed3d878b | [
"MIT"
] | 40 | 2016-10-04T19:59:22.000Z | 2020-12-25T18:11:35.000Z | tools/log_udp_protobuf/messages.py | greck2908/robot-software | 2e1e8177148a089e8883967375dde7f8ed3d878b | [
"MIT"
] | 209 | 2016-09-21T21:54:28.000Z | 2022-01-26T07:42:37.000Z | tools/log_udp_protobuf/messages.py | greck2908/robot-software | 2e1e8177148a089e8883967375dde7f8ed3d878b | [
"MIT"
] | 21 | 2016-11-07T14:40:16.000Z | 2021-11-02T09:53:37.000Z | """
Loads all protobuf messages for the project
"""
import os.path
import glob
import importlib
import sys
from google.protobuf.message import Message
msgdir = os.path.join(
os.path.abspath(os.path.dirname(__file__)),
"..",
"..",
"master-firmware",
"build",
"protobuf",
)
nanopbdir = os.path.jo... | 18.033898 | 77 | 0.620301 |
33c4da78e8d10102c1b53804281befabe5203b80 | 12,648 | py | Python | clients/client/python/ory_client/model/admin_create_identity_body.py | sproutfi/sdk | 5340b37d7b3e8f3c1b8f4c0c16ede05488498620 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/admin_create_identity_body.py | sproutfi/sdk | 5340b37d7b3e8f3c1b8f4c0c16ede05488498620 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/admin_create_identity_body.py | sproutfi/sdk | 5340b37d7b3e8f3c1b8f4c0c16ede05488498620 | [
"Apache-2.0"
] | null | null | null | """
Ory APIs
Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501
The version of the OpenAPI document: v0.0.1-alpha.71
Contact: support@ory.sh
Generated by: htt... | 45.333333 | 298 | 0.583808 |
33c4dd623b5f46c5b169326dd0c43dfd689cf049 | 785 | py | Python | app/core/admin.py | StanPeter/recipeApi | 23ae19b6eecef6ba02fb2262b833f50013fac035 | [
"MIT"
] | null | null | null | app/core/admin.py | StanPeter/recipeApi | 23ae19b6eecef6ba02fb2262b833f50013fac035 | [
"MIT"
] | null | null | null | app/core/admin.py | StanPeter/recipeApi | 23ae19b6eecef6ba02fb2262b833f50013fac035 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.utils.translation import gettext as _
from core import models
class UserAdmin(BaseUserAdmin):
ordering = ['id']
list_display = ['email', 'name']
fieldsets = ( # define sections
(None, {'... | 27.068966 | 65 | 0.565605 |
33c4ff5c3d1c0ddee3c45682595e015993ee57e6 | 33,245 | bzl | Python | tensorflow/tensorflow.bzl | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | 2 | 2020-05-04T03:59:25.000Z | 2021-07-16T03:09:22.000Z | tensorflow/tensorflow.bzl | amineferchichi/tensorflow | 4ac9c09d5ca57a03b8daa5fb9e295947b1619854 | [
"Apache-2.0"
] | null | null | null | tensorflow/tensorflow.bzl | amineferchichi/tensorflow | 4ac9c09d5ca57a03b8daa5fb9e295947b1619854 | [
"Apache-2.0"
] | 1 | 2022-01-22T05:39:49.000Z | 2022-01-22T05:39:49.000Z | # -*- Python -*-
# Given a source file, generate a test name.
# i.e. "common_runtime/direct_session_test.cc" becomes
# "common_runtime_direct_session_test"
def src_to_test_name(src):
return src.replace("/", "_").split(".")[0]
# Return the options to use for a C++ library or binary build.
# Uses the ":optmode" ... | 33.992843 | 93 | 0.571996 |
33c53cbd1b13f66c65f26567d92c164372fb141a | 865 | py | Python | tests/userapp/views.py | varche1/django-seo | 6291381bdc19d3b98a9aa971e205378bcc64a790 | [
"BSD-3-Clause"
] | 27 | 2015-05-08T08:29:43.000Z | 2021-08-02T01:58:06.000Z | tests/userapp/views.py | varche1/django-seo | 6291381bdc19d3b98a9aa971e205378bcc64a790 | [
"BSD-3-Clause"
] | 28 | 2015-05-14T06:25:31.000Z | 2021-09-22T18:54:56.000Z | tests/userapp/views.py | varche1/django-seo | 6291381bdc19d3b98a9aa971e205378bcc64a790 | [
"BSD-3-Clause"
] | 32 | 2015-05-08T09:41:01.000Z | 2021-09-23T05:55:02.000Z | # -*- coding: UTF-8 -*-
from __future__ import unicode_literals
from django.shortcuts import get_object_or_404, render
from .models import Page, Tag, Product
def page_detail(request, page_type):
page = get_object_or_404(Page, type=page_type)
return render(request, 'object_detail.html', {'object': page})
d... | 27.03125 | 69 | 0.721387 |
33c5409b3b145d527db9950d4a9b7976ac2f170b | 22,550 | py | Python | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2020-07-15T09:50:14.000Z | 2020-07-15T09:50:14.000Z | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright (C) 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | 44.653465 | 132 | 0.672151 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.