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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1d946314234524969a1122a0b6ac679800e9867c | 2,099 | py | Python | tests/test_Nion_reader.py | itsalexis962/SciFiReaders | 483b228d1f79aafac85cbadd4d0aea488b563902 | [
"MIT"
] | 8 | 2021-05-07T00:59:39.000Z | 2021-12-10T21:03:59.000Z | tests/test_Nion_reader.py | itsalexis962/SciFiReaders | 483b228d1f79aafac85cbadd4d0aea488b563902 | [
"MIT"
] | 31 | 2021-02-19T21:16:25.000Z | 2022-03-04T22:28:09.000Z | tests/test_Nion_reader.py | itsalexis962/SciFiReaders | 483b228d1f79aafac85cbadd4d0aea488b563902 | [
"MIT"
] | 6 | 2021-05-07T01:48:09.000Z | 2022-01-21T21:14:36.000Z | """
Test of Nion Reader of NION Swift files
part of SciFiReader, a pycroscopy package
author: Gerd Duscher, UTK
First Version 11/19/2021
"""
import unittest
import sys
import os
import wget
sys.path.append("../SciFiReaders/")
import SciFiReaders
data_path = os.path.join(os.path.dirname(__file__), '../data')
class... | 35.576271 | 110 | 0.694616 |
1d947d2b070f77e0c94622754a27840154caf12f | 1,671 | py | Python | src/gedml/core/collectors/epoch_collectors/_default_global_collector.py | wangck20/GeDML | 1f76ac2094d7b88be7fd4eb6145e5586e547b9ca | [
"MIT"
] | null | null | null | src/gedml/core/collectors/epoch_collectors/_default_global_collector.py | wangck20/GeDML | 1f76ac2094d7b88be7fd4eb6145e5586e547b9ca | [
"MIT"
] | null | null | null | src/gedml/core/collectors/epoch_collectors/_default_global_collector.py | wangck20/GeDML | 1f76ac2094d7b88be7fd4eb6145e5586e547b9ca | [
"MIT"
] | null | null | null | import torch
from tqdm import tqdm
class _DefaultGlobalCollector:
def __init__(
self,
dataloader_param={
"batch_size": 120,
"drop_last": False,
"shuffle": True,
"num_workers": 8
},
*args,
**kwargs
):
self.dataloade... | 31.528302 | 100 | 0.590066 |
1d9486e4ed86bc5e2a8a5798f3a788a84c5954ac | 10,154 | py | Python | src/morphforgeexamples/indev_working/indev_compare_neuro_ml_vtrace_detailed_new.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | 1 | 2021-01-21T11:31:59.000Z | 2021-01-21T11:31:59.000Z | src/morphforgeexamples/indev_working/indev_compare_neuro_ml_vtrace_detailed_new.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | null | null | null | src/morphforgeexamples/indev_working/indev_compare_neuro_ml_vtrace_detailed_new.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are m... | 28.602817 | 153 | 0.646248 |
1d94b7d090dd05e8a0b9f4c98097c0e2e2dc579a | 1,887 | py | Python | RAW/get_everylang.py | SLAB-NLP/Akk | baa07b0fdf8c7d8623fbd78508867c30a8a7ff6d | [
"MIT"
] | 5 | 2021-09-14T07:09:07.000Z | 2021-11-15T19:43:13.000Z | RAW/get_everylang.py | SLAB-NLP/Akk | baa07b0fdf8c7d8623fbd78508867c30a8a7ff6d | [
"MIT"
] | null | null | null | RAW/get_everylang.py | SLAB-NLP/Akk | baa07b0fdf8c7d8623fbd78508867c30a8a7ff6d | [
"MIT"
] | 1 | 2021-11-15T19:43:19.000Z | 2021-11-15T19:43:19.000Z | import pandas as pd
import json
import glob
import multiprocessing as mp
import threading
def get_files():
def get_catalog(lst: list, num: int = 5):
if num == 0:
return lst
lst += glob.glob(f"jsons_unzipped/{'*/'*num}/cata*.json", recursive=True)
return get_catalog(lst, num-1)
def get_file(l... | 25.5 | 106 | 0.607843 |
1d94b940a0ba35b033433aa59e1f471933e9c529 | 380 | py | Python | pyonepassword/op_items/password.py | pschelle/pyonepassword | 2258c0fa851ad6a63c4f959982a66c715706b654 | [
"MIT"
] | 12 | 2019-08-11T09:08:47.000Z | 2022-03-18T22:10:12.000Z | pyonepassword/op_items/password.py | pschelle/pyonepassword | 2258c0fa851ad6a63c4f959982a66c715706b654 | [
"MIT"
] | 23 | 2019-09-13T20:16:12.000Z | 2022-01-15T18:29:52.000Z | pyonepassword/op_items/password.py | pschelle/pyonepassword | 2258c0fa851ad6a63c4f959982a66c715706b654 | [
"MIT"
] | 10 | 2020-03-10T19:49:35.000Z | 2022-01-18T14:09:10.000Z | from ._op_item_type_registry import op_register_item_type
from ._op_items_base import OPAbstractItem
@op_register_item_type
class OPPasswordItem(OPAbstractItem):
TEMPLATE_ID = "005"
def __init__(self, item_dict):
super().__init__(item_dict)
@property
def password(self):
password = se... | 23.75 | 57 | 0.742105 |
1d94d48b8b91e4efbc1d069cf657b99fad86ae9c | 49,142 | py | Python | wvlib/wvlib.py | cambridgeltl/link-prediction_with_deep-learning | ff227fcc20ffa5e75ae456d1e8d533fd8204635d | [
"MIT"
] | 28 | 2017-11-17T16:36:23.000Z | 2022-01-06T12:30:47.000Z | wvlib/wvlib.py | cambridgeltl/link-prediction_with_deep-learning | ff227fcc20ffa5e75ae456d1e8d533fd8204635d | [
"MIT"
] | 2 | 2019-12-30T18:22:41.000Z | 2020-04-15T07:40:35.000Z | wvlib/wvlib.py | cambridgeltl/link-prediction_with_deep-learning | ff227fcc20ffa5e75ae456d1e8d533fd8204635d | [
"MIT"
] | 15 | 2018-06-07T13:09:53.000Z | 2021-03-07T07:27:33.000Z | #!/usr/bin/env python
"""Word vector library.
Provides functionality for reading and writing word vectors in various
formats and support for basic operations using word vectors such as
cosine similarity.
The word2vec binary and text formats are supported for input, and tar,
tar.gz and directory-based variants of the... | 33.092256 | 136 | 0.592914 |
1d94f840af0d38c0b2977db6bcafe91e21047f7f | 245 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/data/alt_format_506.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/data/alt_format_506.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/data/alt_format_506.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Auto-generated file, do not edit by hand. 506 metadata"""
from ..phonemetadata import NumberFormat
PHONE_ALT_FORMAT_506 = [NumberFormat(pattern='(\\d{4})(\\d{2})(\\d{2})', format='\\1 \\2 \\3', leading_digits_pattern=['[24-7]|8[3-9]'])]
| 49 | 138 | 0.653061 |
1d955508f2876d16a6fb446a89f423be15eb6166 | 508 | py | Python | controllers/__init__.py | govle-192-21-2/govle | f8c6200c915306968f4d2e8c92c3d03a1eced28a | [
"MIT"
] | null | null | null | controllers/__init__.py | govle-192-21-2/govle | f8c6200c915306968f4d2e8c92c3d03a1eced28a | [
"MIT"
] | null | null | null | controllers/__init__.py | govle-192-21-2/govle | f8c6200c915306968f4d2e8c92c3d03a1eced28a | [
"MIT"
] | null | null | null | from flask import Flask
from .api_gclass import gclass as gclass_api
from .api_moodle import moodle as moodle_api
from .api_settings import govle_settings as settings_api
from .api_weather import weather as weather_api
def init_api(app: Flask):
app.register_blueprint(gclass_api, url_prefix='/api/v1/google')
a... | 39.076923 | 67 | 0.797244 |
1d95aea2507fb8e653d30957cfcc7cb9d284bc5b | 474 | py | Python | Farmacia/apps/medicamentos/admin.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | 2 | 2018-11-06T04:05:20.000Z | 2020-05-28T23:19:23.000Z | Farmacia/apps/medicamentos/admin.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | null | null | null | Farmacia/apps/medicamentos/admin.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | 2 | 2018-11-06T04:12:17.000Z | 2019-11-21T18:34:26.000Z | from django.contrib import admin
from apps.medicamentos.models import Presentacion, Medicamentos
@admin.register(Presentacion)
class PresentacionAdmin(admin.ModelAdmin):
list_display = ('nombre', )
@admin.register(Medicamentos)
class MedicamentosAdmin(admin.ModelAdmin):
list_display = ('lote', 'presentacion', 'no... | 36.461538 | 154 | 0.774262 |
1d95e7076d1f5e391c988fa5e728819d42b4c02a | 2,113 | py | Python | doctr/datasets/generator/pytorch.py | Mindee/doctr | b9d8feb1b4a2206e4944ef2dea109acc19585074 | [
"Apache-2.0"
] | 628 | 2021-02-13T21:49:37.000Z | 2022-03-31T19:48:57.000Z | doctr/datasets/generator/pytorch.py | Mindee/doctr | b9d8feb1b4a2206e4944ef2dea109acc19585074 | [
"Apache-2.0"
] | 694 | 2021-02-08T15:23:38.000Z | 2022-03-31T07:24:59.000Z | doctr/datasets/generator/pytorch.py | Mindee/doctr | b9d8feb1b4a2206e4944ef2dea109acc19585074 | [
"Apache-2.0"
] | 90 | 2021-04-28T05:39:02.000Z | 2022-03-31T06:48:36.000Z | # Copyright (C) 2021, Mindee.
# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.
from torch.utils.data._utils.collate import default_collate
from .base import _CharacterGenerator, _WordGenerator
__all__ = ... | 38.418182 | 107 | 0.713204 |
1d95ecdaa40bab4d04d3c803943300358b2487e0 | 1,438 | py | Python | github/methods/activity/events/list_user_organization_events.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | 1 | 2022-03-16T21:33:37.000Z | 2022-03-16T21:33:37.000Z | github/methods/activity/events/list_user_organization_events.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | null | null | null | github/methods/activity/events/list_user_organization_events.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | 1 | 2022-03-16T21:28:06.000Z | 2022-03-16T21:28:06.000Z | from github.scaffold import Scaffold
from github.types import Response
from github.utils import utils
class ListUserOrganizationEvents(Scaffold):
"""
List organization events for the authenticated user
"""
def list_user_organization_events(
self,
*,
username: str,
... | 26.145455 | 102 | 0.522949 |
1d961c4c165f66b48a87629eb2023c3b8951133e | 13,116 | py | Python | tensormonk/plots/visplots.py | Tensor46/TensorMONK | 67617d3fdf8fde072ba9cab42de7d67c79b17494 | [
"MIT"
] | 29 | 2018-07-06T23:57:23.000Z | 2022-03-08T20:38:57.000Z | tensormonk/plots/visplots.py | sparupat/TensorMONK | 7a2699a28299a89b186e0eb17ed6e9feaea5429e | [
"MIT"
] | 3 | 2018-12-14T22:21:26.000Z | 2020-06-19T02:13:34.000Z | tensormonk/plots/visplots.py | sparupat/TensorMONK | 7a2699a28299a89b186e0eb17ed6e9feaea5429e | [
"MIT"
] | 8 | 2018-07-06T23:58:03.000Z | 2021-04-12T01:35:54.000Z | """ TensorMONK :: plots """
import torch
import torch.nn.functional as F
import torchvision.utils as tutils
import visdom
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import numpy as np
import matplotlib
from PIL import Image as ImPIL
from torchvision import transforms
matplotlib.use('Agg'... | 44.917808 | 79 | 0.474077 |
1d962625d0e038c4ae67bbbcaa5d1d8e47480cdd | 27,090 | py | Python | lib/data_process_encoder.py | ruanyyyyyyy/text2shape | 276379df22ffdbe4cb54f30a88d65cf87bf53243 | [
"Apache-2.0"
] | 72 | 2018-03-27T13:45:09.000Z | 2022-03-16T03:04:02.000Z | lib/data_process_encoder.py | ruanyyyyyyy/text2shape | 276379df22ffdbe4cb54f30a88d65cf87bf53243 | [
"Apache-2.0"
] | 9 | 2018-05-30T04:05:50.000Z | 2020-12-02T01:19:01.000Z | lib/data_process_encoder.py | ruanyyyyyyy/text2shape | 276379df22ffdbe4cb54f30a88d65cf87bf53243 | [
"Apache-2.0"
] | 23 | 2018-03-26T21:35:09.000Z | 2022-02-24T17:39:58.000Z | import numpy as np
import pickle
import random
from collections import Counter
from lib.config import cfg
from lib.data_process import DataProcess, print_error, kill_processes
from lib.preprocess import load_voxel
from lib.utils import get_unique_el_mapping, get_attr_from_cat
class CaptionDataProcess(DataProcess):
... | 43.905997 | 108 | 0.587412 |
1d962bbfcd6592d9906cdb272b21fc523ad0d5e6 | 2,115 | py | Python | utility/verification.py | screwyterror83/python_blockchain_learning_1 | 850135724fe811a841baf581814dfe69e0ac1fb7 | [
"MIT"
] | null | null | null | utility/verification.py | screwyterror83/python_blockchain_learning_1 | 850135724fe811a841baf581814dfe69e0ac1fb7 | [
"MIT"
] | null | null | null | utility/verification.py | screwyterror83/python_blockchain_learning_1 | 850135724fe811a841baf581814dfe69e0ac1fb7 | [
"MIT"
] | null | null | null | from utility.hash_util import hash_string_256, hash_block
from wallet import Wallet
class Verification:
@staticmethod
def valid_proof(transactions, last_hash, proof):
# Create a string with all the hash inputs
guess = (str([tx.to_ordered_dict for tx in transactions]) + str(last_hash) + str... | 37.105263 | 124 | 0.658156 |
1d963dff397729e2b403882d9515e4e7609fefa6 | 4,834 | py | Python | segmentation_models/decoders/unetpp.py | jmerkow/segmentation_models.pytorch | d33fb5ea4a66da1ed0006eaca4dbfa88aa986925 | [
"MIT"
] | null | null | null | segmentation_models/decoders/unetpp.py | jmerkow/segmentation_models.pytorch | d33fb5ea4a66da1ed0006eaca4dbfa88aa986925 | [
"MIT"
] | null | null | null | segmentation_models/decoders/unetpp.py | jmerkow/segmentation_models.pytorch | d33fb5ea4a66da1ed0006eaca4dbfa88aa986925 | [
"MIT"
] | 2 | 2019-07-25T16:52:29.000Z | 2019-08-19T17:44:46.000Z | # -*- coding: utf-8 -*-
from functools import partial
import torch
from torch import nn
from torch.nn import functional as F
from segmentation_models.base.model import Model
from segmentation_models.common.blocks import Conv2dReLU
from .hyper_columns import HyperColumnBlock
from .unet import CenterBlock
class UNet... | 38.062992 | 109 | 0.589367 |
1d96578c47daad0e474ed7e91e5b23f340618169 | 5,866 | py | Python | examples/haiku_vae.py | mblondel/jaxopt | b76db8d8015cddc4afb5e2e0e45d6918373e7652 | [
"Apache-2.0"
] | null | null | null | examples/haiku_vae.py | mblondel/jaxopt | b76db8d8015cddc4afb5e2e0e45d6918373e7652 | [
"Apache-2.0"
] | null | null | null | examples/haiku_vae.py | mblondel/jaxopt | b76db8d8015cddc4afb5e2e0e45d6918373e7652 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 DeepMind Technologies Limited
# Copyright 2021 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 requi... | 32.230769 | 80 | 0.695193 |
1d9675b190c61133404e6968fb4762ff024df996 | 904 | py | Python | workflow/get_mturk_hit_info.py | hschilling/data-collection-and-prep | b70ab54fd887592bad05d5748f492fc2f9ef0f6f | [
"Unlicense"
] | null | null | null | workflow/get_mturk_hit_info.py | hschilling/data-collection-and-prep | b70ab54fd887592bad05d5748f492fc2f9ef0f6f | [
"Unlicense"
] | 41 | 2021-01-01T14:01:30.000Z | 2021-01-27T20:17:21.000Z | workflow/get_mturk_hit_info.py | hschilling/data-collection-and-prep | b70ab54fd887592bad05d5748f492fc2f9ef0f6f | [
"Unlicense"
] | 5 | 2021-02-08T14:19:35.000Z | 2021-10-19T12:10:55.000Z | #!/usr/bin/env python
# coding: utf-8
"""
Get info about a single HIT given Id
"""
import sys
import argparse
import csv
import boto3
import xmltodict
import pandas as pd
from workflow_utilities import get_mturk_client
parser = argparse.ArgumentParser(prog=sys.argv[0],
description=... | 25.828571 | 95 | 0.727876 |
1d969487c4e0661516fee471d3a184c754b89025 | 9,345 | py | Python | dialogflow_v2/proto/validation_result_pb2.py | gertventer1970/dialogflow-python-client-v2 | e78b0e6765f94fb9ecbbc72c9fc30ce7245703e2 | [
"Apache-2.0"
] | 1 | 2020-10-14T07:43:19.000Z | 2020-10-14T07:43:19.000Z | dialogflow_v2/proto/validation_result_pb2.py | everydaycodings/dialogflow-python-client-v2 | c1c925d94726f49e549870e087ad79ee491056e2 | [
"Apache-2.0"
] | null | null | null | dialogflow_v2/proto/validation_result_pb2.py | everydaycodings/dialogflow-python-client-v2 | c1c925d94726f49e549870e087ad79ee491056e2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/dialogflow_v2/proto/validation_result.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import re... | 35.804598 | 887 | 0.66367 |
1d96981268051fe07796d9b08c37d0561452d91c | 1,338 | py | Python | data/services/cv19srv/cv19srv/utils/logger.py | TISTATechnologies/cv19 | 5200d20d51ee9e0f4f8cc6f0af0267a3670398ed | [
"Apache-2.0"
] | 2 | 2020-10-20T12:05:16.000Z | 2021-09-21T13:10:17.000Z | data/services/cv19srv/cv19srv/utils/logger.py | TISTATechnologies/cv19 | 5200d20d51ee9e0f4f8cc6f0af0267a3670398ed | [
"Apache-2.0"
] | 10 | 2020-07-01T16:40:39.000Z | 2022-01-19T21:37:47.000Z | data/services/cv19srv/cv19srv/utils/logger.py | TISTATechnologies/cv19 | 5200d20d51ee9e0f4f8cc6f0af0267a3670398ed | [
"Apache-2.0"
] | 1 | 2021-08-09T13:53:50.000Z | 2021-08-09T13:53:50.000Z | import datetime
import os
import sys
import logging
LOG_DEBUG = False
LOG_FILE = None
try:
from ..config import config
LOG_DEBUG = config.debug
LOG_FILE = config.log_file
except Exception:
pass
def get_logger(name: str):
log_fmt = '%(asctime)s [%(levelname)-5.5s] {%(name)-10.10s} %(message)s'
... | 32.634146 | 96 | 0.627055 |
1d96993ae91584f3480645057881297e55ef0af7 | 4,791 | py | Python | byconeer/variantsExporter.py | sofiapfund/bycon | d7993eaf99cfce46f3025718ab3aa3c0f812badd | [
"CC0-1.0"
] | null | null | null | byconeer/variantsExporter.py | sofiapfund/bycon | d7993eaf99cfce46f3025718ab3aa3c0f812badd | [
"CC0-1.0"
] | 1 | 2021-03-18T12:17:59.000Z | 2021-03-18T12:19:24.000Z | byconeer/variantsExporter.py | sofiapfund/bycon | d7993eaf99cfce46f3025718ab3aa3c0f812badd | [
"CC0-1.0"
] | null | null | null | #!/usr/local/bin/python3
import re, json, yaml
from os import path, environ, pardir
import sys, datetime
from isodate import date_isoformat
from pymongo import MongoClient
import argparse
import statistics
from progress.bar import Bar
# local
dir_path = path.dirname( path.abspath(__file__) )
pkg_path = path.join( dir... | 34.467626 | 160 | 0.533083 |
1d96a791022d8352d07d68adb4c63daaa6fc0b28 | 155 | py | Python | mmf/version.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | null | null | null | mmf/version.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | null | null | null | mmf/version.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | null | null | null | import sys
__version__ = "1.0.0rc3"
msg = "MMF is only compatible with Python 3.6 and newer."
if sys.version_info < (3, 6):
raise ImportError(msg)
| 15.5 | 57 | 0.683871 |
1d96b3d0625e9e9268bf35a891412a9e7b0105b1 | 34,433 | py | Python | tests/test_config.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | tests/test_config.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | tests/test_config.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Test config utils."""
# pylint: disable=protected-access
from collections import OrderedDict
import copy
import os
from unittest import mock
from unittest.mock import Mock
import asynctest
from asynctest import CoroutineMock, patch
import pytest
import voluptuous as vol
from voluptuous import Invalid, MultipleInval... | 33.658847 | 119 | 0.633636 |
1d96f87ddfd8ed5389ffb8652692b09063a78b6e | 2,042 | py | Python | downloadable-site-packages/cv2/__init__.py | ProjectZeroDays/Pyto | d5d77f3541f329bbb28142d18606b22f115b7df6 | [
"MIT"
] | 2 | 2020-08-25T13:55:00.000Z | 2020-08-25T16:36:03.000Z | downloadable-site-packages/cv2/__init__.py | ProjectZeroDays/Pyto | d5d77f3541f329bbb28142d18606b22f115b7df6 | [
"MIT"
] | null | null | null | downloadable-site-packages/cv2/__init__.py | ProjectZeroDays/Pyto | d5d77f3541f329bbb28142d18606b22f115b7df6 | [
"MIT"
] | null | null | null | try:
import sys
import importlib
from rubicon.objc import ObjCClass
ObjCClass("ExtensionsInitializer").alloc().init().initialize_cv2()
modname = "__cv2_cv2"
if modname not in sys.builtin_module_names:
sys.builtin_module_names += (modname,)
import __cv2_cv2 as cv2
from . import... | 30.939394 | 224 | 0.695397 |
1d9713dcec2398c423e8832255166d5c5290fdae | 9,549 | py | Python | api_app/service_bus/deployment_status_update.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | api_app/service_bus/deployment_status_update.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | api_app/service_bus/deployment_status_update.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | import json
import logging
import uuid
from azure.servicebus.aio import ServiceBusClient
from pydantic import ValidationError, parse_obj_as
from api.dependencies.database import get_db_client
from api.routes.resource_helpers import get_timestamp
from db.repositories.resource_templates import ResourceTemplateRepositor... | 43.60274 | 201 | 0.716201 |
1d97be3f0d7d06fb800f6d35a0d7d4d4cc101435 | 3,066 | py | Python | doks/shields.py | rec/doks | 8fb1c2779bb40cbae9427c3be357231543e89d54 | [
"MIT"
] | 1 | 2020-10-31T03:25:23.000Z | 2020-10-31T03:25:23.000Z | doks/shields.py | rec/doks | 8fb1c2779bb40cbae9427c3be357231543e89d54 | [
"MIT"
] | 15 | 2020-05-29T11:50:13.000Z | 2020-12-08T11:07:45.000Z | doks/shields.py | rec/doks | 8fb1c2779bb40cbae9427c3be357231543e89d54 | [
"MIT"
] | null | null | null | from .variables import default_variables, substitute
import os
import shlex
import yaml
__all__ = ('add_shields',)
_SHIELD_DATA = {}
_URL_ROOT = 'https://img.shields.io'
FILE = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'shields.yml')
PREFIX = '.. doks-shield'
def add_shields(lines, path):
yield f... | 26.431034 | 78 | 0.541422 |
1d97ecaeb3618ce0ae39e9c723afbe833f56ff80 | 1,060 | py | Python | array/kempyslots.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | array/kempyslots.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | array/kempyslots.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | # The idea is to use an array days[] to record each position's flower's
# blooming day. That means days[i] is the blooming day of the flower in position i+1.
# We just need to find a subarray days[left, left+1,..., left+k-1, right] which satisfies:
# for any i = left+1,..., left+k-1, we can have days[left] < days[i... | 35.333333 | 96 | 0.518868 |
1d981852cc6a57b304858771b42b89aa32130f91 | 36,661 | py | Python | gslib/wildcard_iterator.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 649 | 2015-01-08T01:50:15.000Z | 2022-03-31T08:33:38.000Z | gslib/wildcard_iterator.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 798 | 2015-01-02T07:46:09.000Z | 2022-03-31T20:37:19.000Z | gslib/wildcard_iterator.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 315 | 2015-01-02T10:26:53.000Z | 2022-03-27T02:18:58.000Z | # -*- coding: utf-8 -*-
# Copyright 2010 Google 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 require... | 44.27657 | 87 | 0.658984 |
1d981e31fc55e85aec48de078fa14d4937e5a16a | 1,788 | py | Python | tests/objects/test__service_group.py | vladimirs-git/fortigate-api | 7059fa1375feaa53ffcc19c7f48869727b854857 | [
"MIT"
] | 1 | 2022-01-31T02:07:49.000Z | 2022-01-31T02:07:49.000Z | tests/objects/test__service_group.py | vladimirs-git/fortigate-api | 7059fa1375feaa53ffcc19c7f48869727b854857 | [
"MIT"
] | null | null | null | tests/objects/test__service_group.py | vladimirs-git/fortigate-api | 7059fa1375feaa53ffcc19c7f48869727b854857 | [
"MIT"
] | 1 | 2022-02-17T07:04:50.000Z | 2022-02-17T07:04:50.000Z | """unittest objects/service_group.py"""
from __future__ import annotations
import unittest
from fortigate_api.service_group import ServiceGroup
from tests.helper__tst import NAME1, NAME2, NAME3
from tests.mock_fortigate import MockFortigate
class Test(MockFortigate):
"""unittest objects/service_group.py"""
... | 29.8 | 76 | 0.578859 |
1d9821a6d4e30e5f0fa34b398faaaf0a8ea8210e | 1,778 | py | Python | farmstand/urls.py | farmdrop-maine/bazaar | a39b62fc7ea1cac39aca2cb6cdcedd3fe6a873b1 | [
"BSD-3-Clause"
] | 3 | 2015-12-30T19:06:27.000Z | 2021-10-06T04:23:36.000Z | farmstand/urls.py | farmdrop-maine/bazaar | a39b62fc7ea1cac39aca2cb6cdcedd3fe6a873b1 | [
"BSD-3-Clause"
] | null | null | null | farmstand/urls.py | farmdrop-maine/bazaar | a39b62fc7ea1cac39aca2cb6cdcedd3fe6a873b1 | [
"BSD-3-Clause"
] | 4 | 2019-09-17T11:39:41.000Z | 2022-01-24T10:22:50.000Z | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView
from django.contrib import admin
admin.autodiscover()
from saleor.cart.urls import urlpatterns as cart_urls
from saleor.checkout.urls import urlpatterns as checkout_urls
from saleor.core.... | 43.365854 | 83 | 0.732283 |
1d983ea7bbdd3560b12388bd8bc59bfb91c38df0 | 4,724 | py | Python | tests/conftest.py | drorata/dvc | b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0 | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | drorata/dvc | b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0 | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | drorata/dvc | b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import mockssh
import pytest
import os
from git import Repo
from git.exc import GitCommandNotFound
from dvc.remote.config import RemoteConfig
from dvc.utils.compat import cast_bytes_py2
from dvc.remote.ssh.connection import SSHConnection
from dvc.repo import Repo as DvcRepo
from... | 27.465116 | 79 | 0.65326 |
1d9853af08ddfc9e55577c591132b3f3f4cd0ab4 | 7,668 | py | Python | auto_delete_nightly_test_data.py | khadas/android_external_toolchain-utils | 3690e025de8daaed03c4acb02d2b054e5c4c0dd5 | [
"BSD-3-Clause"
] | null | null | null | auto_delete_nightly_test_data.py | khadas/android_external_toolchain-utils | 3690e025de8daaed03c4acb02d2b054e5c4c0dd5 | [
"BSD-3-Clause"
] | null | null | null | auto_delete_nightly_test_data.py | khadas/android_external_toolchain-utils | 3690e025de8daaed03c4acb02d2b054e5c4c0dd5 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2
"""A crontab script to delete night test data."""
from __future__ import print_function
__author__ = 'shenhan@google.com (Han Shen)'
import argparse
import datetime
import os
import re
import sys
from cros_utils import command_executer
from cros_utils import constants
from cros_utils import m... | 34.38565 | 79 | 0.635629 |
1d9868e0b597e12049acd7b751c801fb22b740e5 | 1,478 | py | Python | scripts/augment_data.py | ludazhao/art_history_net | 396f7b99b3c4fe4f9da752d8f7eb0f3395752f57 | [
"MIT"
] | 15 | 2016-12-30T21:03:48.000Z | 2022-01-31T08:09:09.000Z | scripts/augment_data.py | ludazhao/SherlockNet | 396f7b99b3c4fe4f9da752d8f7eb0f3395752f57 | [
"MIT"
] | null | null | null | scripts/augment_data.py | ludazhao/SherlockNet | 396f7b99b3c4fe4f9da752d8f7eb0f3395752f57 | [
"MIT"
] | null | null | null | import random
import sys
from image_util import *
# TODO: move to constants.py
FLIP_PROB = 0.3
NUM_AUGS_PER = 3
NUM_EXISTING_AUGS_PER = 0
RANDOM_CROP = 25
RANDOM_SCALE = 25
RANDOM_BRIGHTNESS = 25
#PARENT_DIR = '../data/reorg3_img_aug'
subdirs = ['Animals', 'Architecture', 'Decorations', 'Diagrams', 'Landscapes', 'Map... | 37.897436 | 100 | 0.608254 |
1d987d6a6cd3b9b21c88167d1c42db48a18ed50f | 8,796 | py | Python | src/helper_functions.py | chenzhao2020/dsci-522_group-28 | 0ee292c286dd6c86e348ff0c44da8f8316a30121 | [
"MIT"
] | null | null | null | src/helper_functions.py | chenzhao2020/dsci-522_group-28 | 0ee292c286dd6c86e348ff0c44da8f8316a30121 | [
"MIT"
] | 26 | 2020-11-19T01:20:49.000Z | 2021-12-04T23:02:21.000Z | src/helper_functions.py | chenzhao2020/dsci-522_group-28 | 0ee292c286dd6c86e348ff0c44da8f8316a30121 | [
"MIT"
] | 4 | 2020-11-20T18:38:20.000Z | 2020-11-20T22:05:16.000Z | # author: Debananda Sarkar
# date: 2020-11-26
"""This script hosts all the helper function for the project.
This will be imported in other scripts as required.
The main function of this script can be used to test the helper functions.
Usage: helper_functions.py
Options:
None
"""
import pandas as pd
import nump... | 32.577778 | 108 | 0.587199 |
1d987e33be1637a310773bb731a3582b181e8cfc | 4,323 | py | Python | IPython/parallel/controller/mongodb.py | damianavila/ipython | 4481c323e0d261685ad350fc6f437494b889ab12 | [
"BSD-3-Clause-Clear"
] | 2 | 2020-11-30T14:04:30.000Z | 2021-11-08T11:29:05.000Z | IPython/parallel/controller/mongodb.py | RuSHi2381/ipython | 4481c323e0d261685ad350fc6f437494b889ab12 | [
"BSD-3-Clause-Clear"
] | null | null | null | IPython/parallel/controller/mongodb.py | RuSHi2381/ipython | 4481c323e0d261685ad350fc6f437494b889ab12 | [
"BSD-3-Clause-Clear"
] | 1 | 2020-11-19T05:18:41.000Z | 2020-11-19T05:18:41.000Z | """A TaskRecord backend using mongodb
Authors:
* Min RK
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2010-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of t... | 35.146341 | 100 | 0.582003 |
1d98b6e71d50c110aa1864a7930f17fe4e0bf211 | 3,480 | py | Python | read_current_weather.py | marissakotze/timDIMM | dde00a3bb6ca7c3d9b71e24f9363350a0e2a323f | [
"BSD-3-Clause"
] | 1 | 2021-06-06T15:26:36.000Z | 2021-06-06T15:26:36.000Z | read_current_weather.py | marissakotze/timDIMM | dde00a3bb6ca7c3d9b71e24f9363350a0e2a323f | [
"BSD-3-Clause"
] | null | null | null | read_current_weather.py | marissakotze/timDIMM | dde00a3bb6ca7c3d9b71e24f9363350a0e2a323f | [
"BSD-3-Clause"
] | 3 | 2015-07-29T15:16:35.000Z | 2017-12-01T13:02:36.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Nov 27 13:25:00 2013
@author: jpk
This script returns the current weather information which was written by the
WeatherPlot script. The average values for the current weather conditions are
returned, as well as warning flags set by the WeatherPlot script. Checks were
build ... | 36.25 | 122 | 0.55 |
1d98e85d77137cd8afb1ec130f93a11e4ab21e70 | 2,620 | py | Python | xmlUtils.py | tgadf/utils | e0176d4f8a5bed4ecc3b63cb4bf2ee1265840900 | [
"MIT"
] | null | null | null | xmlUtils.py | tgadf/utils | e0176d4f8a5bed4ecc3b63cb4bf2ee1265840900 | [
"MIT"
] | null | null | null | xmlUtils.py | tgadf/utils | e0176d4f8a5bed4ecc3b63cb4bf2ee1265840900 | [
"MIT"
] | null | null | null | from xml.etree import cElementTree as ElementTree
class XmlListConfig(list):
def __init__(self, aList):
for element in aList:
if element:
# treat like dict
if len(element) == 1 or element[0].tag != element[1].tag:
self.append(XmlDictConfig(ele... | 41.587302 | 76 | 0.54542 |
1d9915c9760043f41cb2127121032cb1b76be057 | 2,391 | py | Python | appcli/commands/debug_cli.py | david-homley/appcli | 08e336082fb5f4b79169b9c2cd7561bf489e28ac | [
"MIT"
] | 2 | 2019-12-06T00:17:07.000Z | 2021-07-23T10:52:34.000Z | appcli/commands/debug_cli.py | david-homley/appcli | 08e336082fb5f4b79169b9c2cd7561bf489e28ac | [
"MIT"
] | 172 | 2019-10-10T04:04:31.000Z | 2022-03-28T03:37:52.000Z | appcli/commands/debug_cli.py | david-homley/appcli | 08e336082fb5f4b79169b9c2cd7561bf489e28ac | [
"MIT"
] | 6 | 2019-10-04T02:56:35.000Z | 2021-05-07T02:10:27.000Z | #!/usr/bin/env python3
# # -*- coding: utf-8 -*-
"""
Common debug tasks.
________________________________________________________________________________
Created by brightSPARK Labs
www.brightsparklabs.com
"""
# standard library
from pprint import pprint
# vendor libraries
import click
# local libraries
from appcl... | 30.653846 | 104 | 0.549561 |
1d992415c3740b2a3808f0753a4572158352e681 | 6,366 | py | Python | tests/test_data.py | pbuslaev/freud | ed83bdc63ee8fddba78f070ce9ddf2a0021d67b8 | [
"BSD-3-Clause"
] | null | null | null | tests/test_data.py | pbuslaev/freud | ed83bdc63ee8fddba78f070ce9ddf2a0021d67b8 | [
"BSD-3-Clause"
] | null | null | null | tests/test_data.py | pbuslaev/freud | ed83bdc63ee8fddba78f070ce9ddf2a0021d67b8 | [
"BSD-3-Clause"
] | null | null | null | import freud
import unittest
import numpy.testing as npt
import numpy as np
from util import sort_rounded_xyz_array
class TestUnitCell(unittest.TestCase):
def test_square(self):
"""Test that the square lattice is correctly generated."""
box, points = freud.data.UnitCell.square().generate_system()
... | 40.291139 | 78 | 0.558593 |
1d995d0486ceb25531a4397f6d0234e02b6b1b27 | 2,758 | py | Python | test/azure/legacy/AcceptanceTests/test_zzz.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/azure/legacy/AcceptanceTests/test_zzz.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/azure/legacy/AcceptanceTests/test_zzz.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""),... | 38.305556 | 102 | 0.666788 |
1d9966e50b8e925dfe2d7b09c16e6c0b3c227bc6 | 9,170 | py | Python | boudams/model/linear.py | matgille/boudams | d253ff2ee124e13186b5782ebb3c2d9b4bedd942 | [
"MIT"
] | 5 | 2019-10-12T22:12:42.000Z | 2022-02-17T14:59:02.000Z | boudams/model/linear.py | matgille/boudams | d253ff2ee124e13186b5782ebb3c2d9b4bedd942 | [
"MIT"
] | 10 | 2019-06-08T09:31:19.000Z | 2021-05-16T09:27:14.000Z | boudams/model/linear.py | matgille/boudams | d253ff2ee124e13186b5782ebb3c2d9b4bedd942 | [
"MIT"
] | 2 | 2020-01-10T09:46:09.000Z | 2021-02-26T17:04:36.000Z | # https://github.com/bentrevett/pytorch-seq2seq/blob/master/3%20-%20Neural%20Machine%20Translation%20by%20Jointly%20Learning%20to%20Align%20and%20Translate.ipynb
import torch
import torch.nn as nn
import torch.nn.functional as F
import random
from .base import BaseSeq2SeqModel, pprint_2d, pprint_1d
from typing impo... | 32.51773 | 161 | 0.606652 |
1d997e9445d0021375b393ac8f9911a84a288e07 | 2,786 | py | Python | python/app/plugins/http/Struts2/S2_046.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 351 | 2020-02-26T05:23:26.000Z | 2022-03-26T12:39:19.000Z | python/app/plugins/http/Struts2/S2_046.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 15 | 2020-03-26T07:31:49.000Z | 2022-03-09T02:12:17.000Z | python/app/plugins/http/Struts2/S2_046.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 99 | 2020-02-28T07:30:46.000Z | 2022-03-16T16:41:09.000Z | #!/usr/bin/env python3
from app.lib.utils.request import request
from app.lib.utils.encode import urlencode, base64encode
from app.lib.utils.common import get_capta, parser_url, get_useragent
class S2_046_BaseVerify:
def __init__(self, url):
self.info = {
'name': 'S2-046漏洞,又名CVE-2017-5638漏洞',
... | 52.566038 | 839 | 0.610553 |
1d99833b052dd64a6edaff26d7c2d321f9de5093 | 231 | py | Python | image_reconstruction/reconstruction_algorithms/__init__.py | IPASC/standardised-image-reconstruction | 75d350a9f8da57413fabbd8dd5ed23fdfb35d4ed | [
"MIT"
] | 3 | 2021-09-07T10:44:48.000Z | 2021-12-15T10:51:39.000Z | image_reconstruction/reconstruction_algorithms/__init__.py | IPASC/standardised-image-reconstruction | 75d350a9f8da57413fabbd8dd5ed23fdfb35d4ed | [
"MIT"
] | 12 | 2021-11-14T23:01:28.000Z | 2022-03-29T19:08:13.000Z | image_reconstruction/reconstruction_algorithms/__init__.py | IPASC/standardised-image-reconstruction | 75d350a9f8da57413fabbd8dd5ed23fdfb35d4ed | [
"MIT"
] | null | null | null | """
SPDX-FileCopyrightText: 2021 International Photoacoustic Standardisation Consortium (IPASC)
SPDX-License-Identifier: MIT
"""
from .reconstruction_base import ReconstructionAlgorithm
from .back_projection import BackProjection
| 28.875 | 91 | 0.848485 |
1d999f69440fc22d1b79d4c9f4e5d9d8f4dd4c90 | 6,506 | py | Python | samples/client/petstore/python/PetApi.py | ceraslabs/swagger-codegen | fbbc5f9b7e5a4dad63f8718bb0b6f52e16faf79f | [
"Apache-2.0"
] | 2 | 2015-08-06T07:52:06.000Z | 2019-06-05T18:31:14.000Z | samples/client/petstore/python/PetApi.py | victorgit/swagger-codegen | 35c5f6b29c1e0537b714a16c462ec8786c80699c | [
"Apache-2.0"
] | 1 | 2020-07-28T08:20:07.000Z | 2020-07-28T08:20:07.000Z | samples/client/petstore/python/PetApi.py | victorgit/swagger-codegen | 35c5f6b29c1e0537b714a16c462ec8786c80699c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
WordAPI.py
Copyright 2012 Wordnik, 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 a... | 29.844037 | 107 | 0.560406 |
1d99a3a86615fde0641506b670a5221bd9b47346 | 4,133 | py | Python | examples/basic_tutorials/tutorial_mnist_mlp_static.py | OliverZijia/tensorlayer2 | 01113b53e84a3bbb298b9c35ebd53254e487350f | [
"Apache-2.0"
] | null | null | null | examples/basic_tutorials/tutorial_mnist_mlp_static.py | OliverZijia/tensorlayer2 | 01113b53e84a3bbb298b9c35ebd53254e487350f | [
"Apache-2.0"
] | null | null | null | examples/basic_tutorials/tutorial_mnist_mlp_static.py | OliverZijia/tensorlayer2 | 01113b53e84a3bbb298b9c35ebd53254e487350f | [
"Apache-2.0"
] | null | null | null | import time
import numpy as np
import tensorflow as tf
import tensorlayer as tl
from tensorlayer.layers import Dense, Dropout, Input
from tensorlayer.models import Model
## enable debug logging
tl.logging.set_verbosity(tl.logging.DEBUG)
## prepare MNIST data
X_train, y_train, X_val, y_val, X_test, y_te... | 42.608247 | 148 | 0.662957 |
1d99cd9ab6f8803c4332fc086d77d4a291be071f | 11,628 | py | Python | fairseq/tasks/speech_to_text_wav2vec_cif.py | dqqcasia/mosst | 0a5206b3ff88c33583ddf422b364134be2e95da6 | [
"MIT"
] | null | null | null | fairseq/tasks/speech_to_text_wav2vec_cif.py | dqqcasia/mosst | 0a5206b3ff88c33583ddf422b364134be2e95da6 | [
"MIT"
] | null | null | null | fairseq/tasks/speech_to_text_wav2vec_cif.py | dqqcasia/mosst | 0a5206b3ff88c33583ddf422b364134be2e95da6 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import logging
import os.path as op
from argparse import Namespace
from fairseq.data import Dictionary, encoders
from fairseq.data.audio.spee... | 41.234043 | 91 | 0.592105 |
1d99ecebe7269bd9827552caf3bb6b934463ac14 | 1,648 | py | Python | DeepLearning/DeepLearning/09_Deep_SongJW/ch3/dlfs_ch3_nn.py | ghost9023/DeepLearningPythonStudy | 4d319c8729472cc5f490935854441a2d4b4e8818 | [
"MIT"
] | 1 | 2019-06-27T04:05:59.000Z | 2019-06-27T04:05:59.000Z | DeepLearning/DeepLearning/09_Deep_SongJW/ch3/dlfs_ch3_nn.py | ghost9023/DeepLearningPythonStudy | 4d319c8729472cc5f490935854441a2d4b4e8818 | [
"MIT"
] | null | null | null | DeepLearning/DeepLearning/09_Deep_SongJW/ch3/dlfs_ch3_nn.py | ghost9023/DeepLearningPythonStudy | 4d319c8729472cc5f490935854441a2d4b4e8818 | [
"MIT"
] | null | null | null | import numpy as np
import sys, os
sys.path.append(os.pardir)
from common.activation_functions import sigmoid, identity_function
'''
신경망의 내적
간단한 레이어간의 내적 구현해보기
'''
# X=np.array([1,2])
# print(X.shape)
# W=np.array([[1,3,5],[2,4,6]])
# print(W)
# print(W.shape)
# Y=np.dot(X,W)
# print(Y)
'''
3층 신경망 구현하기
'''
# X=np.arr... | 19.388235 | 66 | 0.552184 |
1d99fc6591a2be55768b4bde550a69a4195acc44 | 27,099 | py | Python | libcloud/test/loadbalancer/test_nttcis.py | cheald/libcloud | 1a3ebe5d60de6475a8a2384d864475de0abd73cf | [
"Apache-2.0"
] | 4 | 2017-11-14T17:24:12.000Z | 2020-10-30T01:46:02.000Z | libcloud/test/loadbalancer/test_nttcis.py | cheald/libcloud | 1a3ebe5d60de6475a8a2384d864475de0abd73cf | [
"Apache-2.0"
] | 1 | 2018-11-02T12:41:54.000Z | 2018-11-05T07:57:45.000Z | libcloud/test/loadbalancer/test_nttcis.py | cheald/libcloud | 1a3ebe5d60de6475a8a2384d864475de0abd73cf | [
"Apache-2.0"
] | 1 | 2020-02-01T10:25:54.000Z | 2020-02-01T10:25:54.000Z | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 41.819444 | 159 | 0.602974 |
1d9a0827bf10af13f022aa2a397bfad42940e74f | 5,913 | py | Python | armi/nucDirectory/tests/test_thermalScattering.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | armi/nucDirectory/tests/test_thermalScattering.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | armi/nucDirectory/tests/test_thermalScattering.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 TerraPower, 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 or agreed to in writi... | 35.196429 | 97 | 0.641806 |
1d9a0c3938aafbd6489366e435e1e048072cdab8 | 4,473 | py | Python | alipay/aop/api/domain/AlipayCommerceEducateSceneUserSignModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayCommerceEducateSceneUserSignModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayCommerceEducateSceneUserSignModel.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 AlipayCommerceEducateSceneUserSignModel(object):
def __init__(self):
self._alipay_school_id = None
self._alipay_user_id = None
self._cert_no = None
self._cert_type... | 30.636986 | 83 | 0.593561 |
1d9a2ee075e1f98b155b6e84f90e612ca31b8e7b | 558 | py | Python | index.py | stelligent/aws-anchore-engine-scanner | 413dd0969e0ba4a71b5823ed2f3d0508772ebeb0 | [
"MIT"
] | 8 | 2019-11-13T17:48:14.000Z | 2021-06-03T20:19:38.000Z | index.py | stelligent/aws-anchore-engine-scanner | 413dd0969e0ba4a71b5823ed2f3d0508772ebeb0 | [
"MIT"
] | null | null | null | index.py | stelligent/aws-anchore-engine-scanner | 413dd0969e0ba4a71b5823ed2f3d0508772ebeb0 | [
"MIT"
] | 3 | 2021-02-04T15:44:36.000Z | 2021-08-03T07:21:58.000Z | '''
Create Anchore-Engine cloudformation templates
and Launches all stacks for Anchore-Engine
'''
from anchore.main import AnchoreEngine
CONFIGS = 'configs/configs.yml'
def main():
'''
Anchore-Engine stacks creation entrypoint
'''
anchore_engine = AnchoreEngine()
anchore_engine.create_vpc_template... | 24.26087 | 48 | 0.752688 |
1d9a4b5cfd0a810378debe3135ad35b47b180b51 | 1,111 | py | Python | backend/app/models.py | bcbecker/Datta-Dashboard | 14f77ce166500996888ebdc0e8d3f977fe060547 | [
"FTL"
] | null | null | null | backend/app/models.py | bcbecker/Datta-Dashboard | 14f77ce166500996888ebdc0e8d3f977fe060547 | [
"FTL"
] | null | null | null | backend/app/models.py | bcbecker/Datta-Dashboard | 14f77ce166500996888ebdc0e8d3f977fe060547 | [
"FTL"
] | null | null | null | from app import db, bcrypt
from datetime import datetime, timezone
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
public_id = db.Column(db.String(50), nullable=False, unique=True, index=True)
username = db.Column(db.String(50), nullable=False)
email = db.Column(db.String(75), nulla... | 31.742857 | 81 | 0.668767 |
1d9a65f23e2448484683705de72f18f3f039c411 | 1,265 | py | Python | src/testlinakdeskapp/__init__.py | nilp0inter/LinakDeskApp | 0cf287ee96002f5c270c087ba73b72c548baa8c5 | [
"MIT"
] | 121 | 2018-09-19T20:10:21.000Z | 2022-03-31T08:07:33.000Z | src/testlinakdeskapp/__init__.py | nilp0inter/LinakDeskApp | 0cf287ee96002f5c270c087ba73b72c548baa8c5 | [
"MIT"
] | 13 | 2020-02-19T15:58:37.000Z | 2022-03-05T03:20:42.000Z | src/testlinakdeskapp/__init__.py | nilp0inter/LinakDeskApp | 0cf287ee96002f5c270c087ba73b72c548baa8c5 | [
"MIT"
] | 12 | 2020-02-13T23:55:30.000Z | 2022-01-30T15:11:31.000Z | # MIT License
#
# Copyright (c) 2020 Arkadiusz Netczuk <dev.arnet@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# t... | 43.62069 | 81 | 0.768379 |
1d9a70383139bc411f82d42f3e2a86ab7b748406 | 3,410 | py | Python | tests/unit/test_clihelpers.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_clihelpers.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_clihelpers.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | null | null | null | import os
import subprocess
import tempfile
import mock
from . import utils
from hotsos.core.config import setup_config, HotSOSConfig
from hotsos.core.host_helpers import cli
class TestCLIHelpers(utils.BaseTestCase):
"""
NOTE: remember that data_root is configured so helpers will always
use fake_data_r... | 34.444444 | 75 | 0.616716 |
1d9a9caeab2ecde9583ffb5f454893cdaef0c0e0 | 240 | py | Python | project/lint/utils.py | yumike/djangolint | 249271739da6fb630587d83629ced5de10856f42 | [
"0BSD"
] | 4 | 2015-06-22T13:30:00.000Z | 2020-03-19T07:17:12.000Z | project/lint/utils.py | netoxico/djangolint | 249271739da6fb630587d83629ced5de10856f42 | [
"0BSD"
] | 3 | 2020-02-12T01:17:37.000Z | 2021-06-10T20:37:44.000Z | project/lint/utils.py | netoxico/djangolint | 249271739da6fb630587d83629ced5de10856f42 | [
"0BSD"
] | 1 | 2015-09-18T10:45:45.000Z | 2015-09-18T10:45:45.000Z | from django.utils.encoding import force_unicode, smart_str
from docutils.core import publish_parts
def rst2html(text):
parts = publish_parts(source=smart_str(text), writer_name='html4css1')
return force_unicode(parts['fragment'])
| 30 | 74 | 0.791667 |
1d9aaa84ade0998a35bd2134e51a7106b444db37 | 164 | py | Python | partools/test/gl.py | paularnaud2/PyTools | 09accc33e1dcfdde45671ad5962727554648b30c | [
"MIT"
] | null | null | null | partools/test/gl.py | paularnaud2/PyTools | 09accc33e1dcfdde45671ad5962727554648b30c | [
"MIT"
] | null | null | null | partools/test/gl.py | paularnaud2/PyTools | 09accc33e1dcfdde45671ad5962727554648b30c | [
"MIT"
] | null | null | null | from partools.utils import g
import partools.tools as to
TEST = 'partools/test/'
TEST_OUT = 'test/'
OUT_DUP_TMP = g.dirs['TMP'] + to.gl.TMP_FOLDER + to.gl.TMP_OUT
| 23.428571 | 62 | 0.72561 |
1d9ada88340e0e4e4856a5a01f4ba4fed36d2fd5 | 11,116 | py | Python | sample_app/simulate_notary.py | FPriv/factom-harmony-connect-python-sdk | b853596e7ca15205e1b431f0d8af6ba423365fc7 | [
"MIT"
] | 7 | 2019-03-27T16:20:57.000Z | 2019-04-15T18:20:41.000Z | sample_app/simulate_notary.py | FPriv/factom-harmony-connect-python-sdk | b853596e7ca15205e1b431f0d8af6ba423365fc7 | [
"MIT"
] | 11 | 2019-04-02T18:38:11.000Z | 2020-01-02T19:14:44.000Z | sample_app/simulate_notary.py | FPriv/factom-harmony-connect-python-sdk | b853596e7ca15205e1b431f0d8af6ba423365fc7 | [
"MIT"
] | 3 | 2019-04-06T04:45:45.000Z | 2019-08-03T12:26:17.000Z | import hashlib
import datetime
import json
import sample_app.configure
from factom_sdk import FactomClient
def calculate_state(identities_keys):
result = []
for item in identities_keys["active_keys"]:
if item["activated_height"] is None:
# "Pending and Replacement Pending" if activated_hei... | 48.541485 | 120 | 0.608942 |
1d9affb07f385a471b796eab1ee7f27df6940a04 | 212 | py | Python | app/home/routes.py | wjchicago/Flask_template_auth_with_Dash | f6350bf1f87ae46b8a954f7b417abb69502d67ae | [
"MIT"
] | 1 | 2019-12-21T05:03:39.000Z | 2019-12-21T05:03:39.000Z | app/home/routes.py | wjchicago/Flask_template_auth_with_Dash | f6350bf1f87ae46b8a954f7b417abb69502d67ae | [
"MIT"
] | null | null | null | app/home/routes.py | wjchicago/Flask_template_auth_with_Dash | f6350bf1f87ae46b8a954f7b417abb69502d67ae | [
"MIT"
] | null | null | null | from app.home import blueprint
from flask import render_template
from flask_login import login_required, current_user
@blueprint.route('/')
@login_required
def index():
return render_template('index.html')
| 21.2 | 52 | 0.79717 |
1d9b0903dd7160945e4e0eac98b587c2e1f067a6 | 1,893 | py | Python | vultr/v1_startupscript.py | nickruhl/python-vultr | de920c8b62d63a546a26afeb070dd2fc959121e9 | [
"MIT"
] | 117 | 2015-06-27T04:50:25.000Z | 2022-03-20T15:20:56.000Z | vultr/v1_startupscript.py | nickruhl/python-vultr | de920c8b62d63a546a26afeb070dd2fc959121e9 | [
"MIT"
] | 30 | 2015-03-21T22:09:11.000Z | 2021-08-10T13:51:31.000Z | vultr/v1_startupscript.py | wonseok0403/rain | d2c947932824e4b5060c05374a8de1b9ac9bce05 | [
"MIT"
] | 45 | 2015-03-17T08:11:45.000Z | 2021-11-26T11:11:15.000Z | '''Partial class to handle Vultr Startup Script API calls'''
from .utils import VultrBase, update_params
class VultrStartupScript(VultrBase):
'''Handles Vultr Startup Script API calls'''
def __init__(self, api_key):
VultrBase.__init__(self, api_key)
def create(self, name, script, params=None):
... | 34.418182 | 72 | 0.62916 |
1d9b09731be8edd8bcccf2cb0e6ce285ef883b8d | 5,008 | py | Python | jina/__init__.py | abellimz/jina | 010789331ce896ffcaea897402d698944f1a9d40 | [
"Apache-2.0"
] | null | null | null | jina/__init__.py | abellimz/jina | 010789331ce896ffcaea897402d698944f1a9d40 | [
"Apache-2.0"
] | null | null | null | jina/__init__.py | abellimz/jina | 010789331ce896ffcaea897402d698944f1a9d40 | [
"Apache-2.0"
] | null | null | null | """
Top-level module of Jina.
The primary function of this module is to import all of the public Jina
interfaces into a single place. The interfaces themselves are located in
sub-modules, as described below.
"""
import datetime as _datetime
import os as _os
import platform as _platform
import signal as _signal
impor... | 28.947977 | 122 | 0.713259 |
1d9b27389fb8302675e8ee2f398066b71819484d | 179 | py | Python | moneydog/lib/util.py | Falldog/moneydog | 86e7cab1c0b35f07d1fe42e699e1159f57f1bef5 | [
"Apache-2.0"
] | null | null | null | moneydog/lib/util.py | Falldog/moneydog | 86e7cab1c0b35f07d1fe42e699e1159f57f1bef5 | [
"Apache-2.0"
] | null | null | null | moneydog/lib/util.py | Falldog/moneydog | 86e7cab1c0b35f07d1fe42e699e1159f57f1bef5 | [
"Apache-2.0"
] | null | null | null | from datetime import date, datetime
def str2datetime(s):
return datetime.strptime(s, '%Y-%m-%d')
def str2date(s):
return datetime.strptime(s[:10], '%Y-%m-%d').date()
| 16.272727 | 55 | 0.648045 |
1d9b366ffae6015fa01c26ecdcdaf4071072ed03 | 3,189 | py | Python | nicu_los/src/preprocessing/obtain_normalization_statistics.py | bt-s/NICU-length-of-stay-prediction | 8ae2f72ba90996c552e17edce9b0bcddff43eb8f | [
"MIT"
] | 2 | 2020-06-25T20:34:30.000Z | 2021-10-09T09:30:32.000Z | nicu_los/src/preprocessing/obtain_normalization_statistics.py | bt-s/NICU-length-of-stay-prediction | 8ae2f72ba90996c552e17edce9b0bcddff43eb8f | [
"MIT"
] | null | null | null | nicu_los/src/preprocessing/obtain_normalization_statistics.py | bt-s/NICU-length-of-stay-prediction | 8ae2f72ba90996c552e17edce9b0bcddff43eb8f | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""obtain_normalization_statistics.py
Script to obtain statistics for timeseries normalization
"""
__author__ = "Bas Straathof"
import argparse, json, os
from sys import argv
from tqdm import tqdm
import pandas as pd
import numpy as np
import multiprocessing as mp
from itertools import repeat
... | 26.798319 | 81 | 0.634995 |
1d9b5e87a9230c368d20300778efc44d47b6754d | 79 | py | Python | python/16_numpy/04_concatenate.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | null | null | null | python/16_numpy/04_concatenate.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | null | null | null | python/16_numpy/04_concatenate.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | 3 | 2021-09-22T11:06:58.000Z | 2022-01-25T09:29:24.000Z | Solution to [Concatenate](https://www.hackerrank.com/challenges/np-concatenate) | 79 | 79 | 0.822785 |
1d9b94d23e3e9b952e70aa364d6e22c4c1a8c1fc | 1,768 | py | Python | Python_files/print_OD_pair_link_labels_ext.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | Python_files/print_OD_pair_link_labels_ext.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | Python_files/print_OD_pair_link_labels_ext.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
__author__ = "Jing Zhang"
__email__ = "jingzbu@gmail.com"
__status__ = "Development"
from util_data_storage_and_load import *
# create O-D pair labels
# create a dictionary mapping O-D pairs to labels
import json
n = 22 # number of nodes
OD_pair_label_dict = {}
OD_pair_label_dict_ = {}
la... | 29.466667 | 85 | 0.58371 |
1d9b9fdfffd9da007c4b29526189902c38184608 | 4,640 | py | Python | leetcode_python/Depth-First-Search/loud-and-rich.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Depth-First-Search/loud-and-rich.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Depth-First-Search/loud-and-rich.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | """
851. Loud and Rich
Medium
There is a group of n people labeled from 0 to n - 1 where each person has a different amount of money and a different level of quietness.
You are given an array richer where richer[i] = [ai, bi] indicates that ai has more money than bi and an integer array quiet where quiet[i] is the q... | 32 | 342 | 0.575862 |
1d9bb26a5df3dfb894157eaeb34896cb3e5fde7e | 2,135 | py | Python | pypykatz/lsadecryptor/packages/livessp/decryptor.py | retr0-13/pypykatz | 0d689fbd819c52ca46709737b2c063f40e302832 | [
"MIT"
] | 1 | 2018-08-19T11:53:30.000Z | 2018-08-19T11:53:30.000Z | pypykatz/lsadecryptor/packages/livessp/decryptor.py | retr0-13/pypykatz | 0d689fbd819c52ca46709737b2c063f40e302832 | [
"MIT"
] | null | null | null | pypykatz/lsadecryptor/packages/livessp/decryptor.py | retr0-13/pypykatz | 0d689fbd819c52ca46709737b2c063f40e302832 | [
"MIT"
] | 2 | 2019-08-04T23:16:05.000Z | 2019-12-05T10:41:50.000Z | #!/usr/bin/env python3
#
# Author:
# Tamas Jos (@skelsec)
#
import io
import logging
from pypykatz.lsadecryptor.package_commons import *
class LiveSspCredential:
def __init__(self):
self.credtype = 'livessp'
self.username = None
self.domainname = None
self.password = None
self.luid = None
def to_dict(se... | 30.5 | 104 | 0.734895 |
1d9bef467624343a7809e3be8ac3459e16fc80be | 4,659 | py | Python | Python/Cogs/Moderation/mod.py | pogrammar/Discord-multipurpose-bot | ccb06e8823f5cd893022ce317ba555ccf930cfb7 | [
"MIT"
] | 25 | 2022-01-18T15:04:30.000Z | 2022-03-31T03:28:16.000Z | Python/Cogs/Moderation/mod.py | pogrammar/Discord-multipurpose-bot | ccb06e8823f5cd893022ce317ba555ccf930cfb7 | [
"MIT"
] | 5 | 2022-01-19T06:59:16.000Z | 2022-03-14T15:13:44.000Z | Python/Cogs/Moderation/mod.py | pogrammar/Discord-multipurpose-bot | ccb06e8823f5cd893022ce317ba555ccf930cfb7 | [
"MIT"
] | 16 | 2022-01-19T02:06:05.000Z | 2022-03-28T22:24:07.000Z | import discord
from discord.ext import commands
from discord.commands import slash_command
from discord.commands import Option #Importing the packages
import datetime
import json
class Moderation(commands.Cog):
def __init__(self, bot):#to Initialise
self.bot = bot
@slash_command(guild_ids=[...])
... | 34.768657 | 146 | 0.626959 |
1d9c084a3c01789bd7b5f49b779c96be8afb56c1 | 2,726 | py | Python | demisto_sdk/commands/common/tests/pack_metadata_validator_test.py | cyrengmbh/demisto-sdk | 4d05532efd627a32b1af659e010540cf7ed3ebf3 | [
"MIT"
] | null | null | null | demisto_sdk/commands/common/tests/pack_metadata_validator_test.py | cyrengmbh/demisto-sdk | 4d05532efd627a32b1af659e010540cf7ed3ebf3 | [
"MIT"
] | null | null | null | demisto_sdk/commands/common/tests/pack_metadata_validator_test.py | cyrengmbh/demisto-sdk | 4d05532efd627a32b1af659e010540cf7ed3ebf3 | [
"MIT"
] | null | null | null | import io
import os
import pytest
from demisto_sdk.commands.common.hook_validations.base_validator import \
BaseValidator
from demisto_sdk.commands.common.hook_validations.pack_unique_files import \
PackUniqueFilesValidator
from demisto_sdk.commands.common.legacy_git_tools import git_path
class TestPackMetad... | 55.632653 | 110 | 0.643434 |
1d9c260a29c911a43144e593f5cd8abbc8ab9138 | 16,472 | py | Python | anymail/backends/sendgrid.py | bhumikapahariapuresoftware/django-anymail | 0252010fb3d4652c3c234fc6dba36d11c7602543 | [
"BSD-3-Clause"
] | 1,324 | 2016-03-10T04:57:52.000Z | 2022-03-31T15:14:58.000Z | anymail/backends/sendgrid.py | bhumikapahariapuresoftware/django-anymail | 0252010fb3d4652c3c234fc6dba36d11c7602543 | [
"BSD-3-Clause"
] | 208 | 2016-03-10T03:40:59.000Z | 2022-03-22T23:16:08.000Z | anymail/backends/sendgrid.py | bhumikapahariapuresoftware/django-anymail | 0252010fb3d4652c3c234fc6dba36d11c7602543 | [
"BSD-3-Clause"
] | 129 | 2016-03-10T09:24:52.000Z | 2022-02-07T05:37:24.000Z | import uuid
import warnings
from email.utils import quote as rfc822_quote
from requests.structures import CaseInsensitiveDict
from .base_requests import AnymailRequestsBackend, RequestsPayload
from ..exceptions import AnymailConfigurationError, AnymailWarning
from ..message import AnymailRecipientStatus
from ..utils ... | 47.744928 | 116 | 0.645216 |
1d9c41f7106b3ca337043e4e34509ea13349cb23 | 28,014 | py | Python | .leetcode/396.rotate-function.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/396.rotate-function.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/396.rotate-function.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=396 lang=python3
#
# [396] Rotate Function
#
# https://leetcode.com/problems/rotate-function/description/
#
# algorithms
# Medium (37.36%)
# Likes: 628
# Dislikes: 193
# Total Accepted: 53.8K
# Total Submissions: 143.1K
# Testcase Example: '[4,3,2,6]'
#
# You are given an integer array nums... | 237.40678 | 25,708 | 0.422003 |
1d9c649b30bfd94e40a378df064e1377c856d69d | 3,284 | py | Python | NBA Project/venv/Lib/site-packages/plotly/io/_sg_scraper.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 3 | 2020-02-04T21:39:20.000Z | 2020-11-17T19:07:07.000Z | NBA Project/venv/Lib/site-packages/plotly/io/_sg_scraper.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 12 | 2020-06-06T01:22:26.000Z | 2022-03-12T00:13:42.000Z | NBA Project/venv/Lib/site-packages/plotly/io/_sg_scraper.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 17 | 2019-11-21T14:11:29.000Z | 2019-11-21T15:26:23.000Z | # This module defines an image scraper for sphinx-gallery
# https://sphinx-gallery.github.io/
# which can be used by projects using plotly in their documentation.
import inspect, os
import plotly
from glob import glob
import shutil
plotly.io.renderers.default = "sphinx_gallery"
def plotly_sg_scraper(block, block_va... | 32.196078 | 85 | 0.670828 |
1d9c6aeff773ba5d7b8d6b108d63a90b0d973ffc | 4,411 | py | Python | app/settings.py | KansasLinuxFest/planner | b9bbbfe1e0eaba3526c91d3aabbd8f2f5f5ddc19 | [
"MIT"
] | 3 | 2020-08-05T11:21:28.000Z | 2020-09-29T09:03:47.000Z | app/settings.py | KansasLinuxFest/planner | b9bbbfe1e0eaba3526c91d3aabbd8f2f5f5ddc19 | [
"MIT"
] | null | null | null | app/settings.py | KansasLinuxFest/planner | b9bbbfe1e0eaba3526c91d3aabbd8f2f5f5ddc19 | [
"MIT"
] | null | null | null | # Django settings for the planner project.
from localsettings import *
ADMINS = (
('Dipanjan Mukherjee', 'dipanjan.mu@gmail.com'),
)
MANAGERS = ADMINS
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
SITE_ID... | 31.733813 | 88 | 0.708003 |
1d9c761f3c83798fd6723d0da3f054681695f01a | 5,417 | py | Python | Environment.py | zhangks93/ASPS | 02f1f8cd563cdccea01dedc950fa38c570dc996e | [
"MIT"
] | 2 | 2021-03-26T00:17:44.000Z | 2021-08-17T12:23:56.000Z | Environment.py | zhangks93/ASPS | 02f1f8cd563cdccea01dedc950fa38c570dc996e | [
"MIT"
] | null | null | null | Environment.py | zhangks93/ASPS | 02f1f8cd563cdccea01dedc950fa38c570dc996e | [
"MIT"
] | null | null | null | import influent as If
import reactor as Ra
import clarifier as Ca
import constant
import pandas as pd
import numpy as np
class WWTP():
def __init__(self):
self.Influent=If.influent('influent',0,'data/bsm1LT.xlsx')
self.A=Ra.bioreactor('Reactor1',0,1000)
self.B=Ra.bioreactor('Reactor2',0... | 55.845361 | 234 | 0.602363 |
1d9c8b3851125afbac230b37a4d925bc50b53dd3 | 8,698 | py | Python | src/appengine/libs/issue_management/monorail/__init__.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 3 | 2020-12-30T07:00:55.000Z | 2021-03-16T10:55:05.000Z | src/appengine/libs/issue_management/monorail/__init__.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 34 | 2020-08-18T18:47:00.000Z | 2021-07-14T07:47:35.000Z | src/appengine/libs/issue_management/monorail/__init__.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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 or agreed to in writing, ... | 27.525316 | 80 | 0.717291 |
1d9c9425ff79416ceace5b9eefe8d8abf2a5e22a | 9,026 | py | Python | onadata/apps/main/migrations/0001_initial.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 87 | 2015-02-10T23:36:28.000Z | 2022-01-31T00:51:10.000Z | onadata/apps/main/migrations/0001_initial.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 443 | 2015-04-28T18:50:25.000Z | 2022-03-31T03:29:43.000Z | onadata/apps/main/migrations/0001_initial.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 122 | 2015-01-13T16:27:44.000Z | 2022-01-24T09:35:56.000Z | # coding: utf-8
from django.db import migrations, models
import jsonfield.fields
from django.conf import settings
import onadata.apps.main.models.meta_data
class Migration(migrations.Migration):
dependencies = [
('logger', '0001_initial'),
('auth', '0006_require_contenttypes_0002'),
migra... | 141.03125 | 5,833 | 0.562708 |
1d9c94458fd15764b1fbfb26ef8254a0bdf29ac8 | 8,211 | py | Python | backend/api/admin/report.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 7 | 2018-05-20T08:56:08.000Z | 2022-03-11T15:50:54.000Z | backend/api/admin/report.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 2 | 2021-06-08T21:12:51.000Z | 2022-01-13T01:25:27.000Z | backend/api/admin/report.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 5 | 2016-10-09T14:52:09.000Z | 2020-12-25T01:04:35.000Z | import errors
import json
import logbook
import bottle
from model import autocommit, display, Customer
from api import get, post, AdminApi
from api.check_params import check_params
from api.admin.role import TokenManager
from api.cabinet.customer import DateHourBeforeNow
from memdb.report_cache import ReportCache, Repo... | 34.792373 | 119 | 0.602119 |
1d9ca8b138ed7dcc7bcb4e90e4683396ee0d35b9 | 38,933 | py | Python | mypy/constraints.py | fofoni/mypy | dd6d78615455fdd9895cff1691f2de6bb2893a48 | [
"PSF-2.0"
] | null | null | null | mypy/constraints.py | fofoni/mypy | dd6d78615455fdd9895cff1691f2de6bb2893a48 | [
"PSF-2.0"
] | null | null | null | mypy/constraints.py | fofoni/mypy | dd6d78615455fdd9895cff1691f2de6bb2893a48 | [
"PSF-2.0"
] | null | null | null | """Type inference constraints."""
from typing import TYPE_CHECKING, Iterable, List, Optional, Sequence
from typing_extensions import Final
from mypy.types import (
CallableType, Type, TypeVisitor, UnboundType, AnyType, NoneType, TypeVarType, Instance,
TupleType, TypedDictType, UnionType, Overloaded, ErasedTyp... | 46.963812 | 99 | 0.613053 |
1d9cb308a16abdd5dbfe20bdab65ebb54754b79f | 4,304 | py | Python | tests/test_dependency_analyze.py | cloudbutton/lithops-array | 5e74b881c7db95eccdccf986f1e3b0dc44603889 | [
"Apache-2.0"
] | null | null | null | tests/test_dependency_analyze.py | cloudbutton/lithops-array | 5e74b881c7db95eccdccf986f1e3b0dc44603889 | [
"Apache-2.0"
] | null | null | null | tests/test_dependency_analyze.py | cloudbutton/lithops-array | 5e74b881c7db95eccdccf986f1e3b0dc44603889 | [
"Apache-2.0"
] | null | null | null | import time
import random
from timeit import default_timer as timer
import string
from numpywren import compiler
from numpywren.matrix import BigMatrix
import numpy as np
from numpywren.matrix_init import shard_matrix
from numpywren.algs import *
from numpywren.compiler import lpcompile, walk_program, find_parents, fi... | 30.964029 | 83 | 0.666357 |
1d9ce9abed692af8263672bf8bfe72efda6ff54c | 2,679 | py | Python | google-cloud-sdk/.install/.backup/lib/surface/app/services/delete.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/surface/app/services/delete.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/app/services/delete.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2015 Google 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 ag... | 37.208333 | 80 | 0.685704 |
1d9d22a73f3869688e747f094509a21eb2928d32 | 1,066 | py | Python | mclumi/align/Write.py | cribbslab/mclumi | 3c38f1dd4de11f0f20121a4027f7e104c4059bbe | [
"MIT"
] | 3 | 2021-12-18T09:55:09.000Z | 2022-01-12T10:25:28.000Z | mclumi/align/Write.py | cribbslab/mclumi | 3c38f1dd4de11f0f20121a4027f7e104c4059bbe | [
"MIT"
] | null | null | null | mclumi/align/Write.py | cribbslab/mclumi | 3c38f1dd4de11f0f20121a4027f7e104c4059bbe | [
"MIT"
] | null | null | null | __version__ = "v1.0"
__copyright__ = "Copyright 2021"
__license__ = "MIT"
__lab__ = "Adam Cribbs lab"
import pysam
from mclumi.util.Console import console
class write(object):
def __init__(self, df, is_sv=False, verbose=False):
self.df = df
self._is_sv = is_sv
self.console = console()
... | 28.052632 | 82 | 0.595685 |
1d9d31a9ce88e418ca938be7781e38e2170badd6 | 24 | py | Python | btd6_memory_info/generated/UnityEngine/Windows/WebCam/VideoCapture/video_capture.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/UnityEngine/Windows/WebCam/VideoCapture/video_capture.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/UnityEngine/Windows/WebCam/VideoCapture/video_capture.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class VideoCapture: pass | 24 | 24 | 0.875 |
1d9d76d5ab13b59cf800b238d293849a69901c9b | 897 | py | Python | tests/pipe_proc_tests/ht.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 150 | 2015-01-16T12:24:13.000Z | 2022-03-03T18:01:18.000Z | tests/pipe_proc_tests/ht.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 129 | 2015-01-13T04:58:56.000Z | 2022-03-02T13:39:16.000Z | tests/pipe_proc_tests/ht.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 ht unit test """
import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p
d, a = pipe.read("1D_time_real.fid")
d, a = p.ht(d, a)
pipe.write("ht1.glue", d, a, overwrite=True)
d, a = pipe.read("1D_time_real.fid")
d, a = p.ht(d, a, td=True)
pipe.write("ht2.glu... | 26.382353 | 44 | 0.641026 |
1d9d7c00f0491d4002cadf3878b86d66b926a9dc | 18,449 | py | Python | msl/qt/prompt.py | rebeccahawke/msl-qt | 753ea28aa385a39a33827de2c229e9944a3b1cf3 | [
"MIT"
] | null | null | null | msl/qt/prompt.py | rebeccahawke/msl-qt | 753ea28aa385a39a33827de2c229e9944a3b1cf3 | [
"MIT"
] | null | null | null | msl/qt/prompt.py | rebeccahawke/msl-qt | 753ea28aa385a39a33827de2c229e9944a3b1cf3 | [
"MIT"
] | null | null | null | """
Convenience functions to prompt the user.
The following functions create a dialog window to either notify the user of an
event that happened or to request information from the user.
"""
import traceback
from . import QtWidgets, QtCore, application
def critical(message, title=None):
"""Display the critical `... | 38.677149 | 117 | 0.62502 |
1d9dbda443daae35a0c188c8b226468756fb9a6b | 34,225 | py | Python | modules/core/methods/organizer.py | nursix/DRKCM | 09328289ff721c416494398aa751ff99906327cb | [
"MIT"
] | 3 | 2022-01-26T08:07:54.000Z | 2022-03-21T21:53:52.000Z | modules/core/methods/organizer.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | modules/core/methods/organizer.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | """
Organizer (Calendar-based CRUD)
Copyright: 2018-2022 (c) Sahana Software Foundation
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including with... | 35.837696 | 98 | 0.483623 |
1d9df4dfbca0f97fb868cbd8d2f6d5aa0e5871e7 | 7,094 | py | Python | gym_acnportal/gym_acnsim/envs/tests/test_reward_functions.py | caltech-netlab/gym-acnportal | cacd2e4aa9159a3bf7f0b8e3db2dbb0832d76e46 | [
"BSD-3-Clause"
] | null | null | null | gym_acnportal/gym_acnsim/envs/tests/test_reward_functions.py | caltech-netlab/gym-acnportal | cacd2e4aa9159a3bf7f0b8e3db2dbb0832d76e46 | [
"BSD-3-Clause"
] | 3 | 2021-04-28T14:43:32.000Z | 2021-04-28T14:58:04.000Z | gym_acnportal/gym_acnsim/envs/tests/test_reward_functions.py | sunash/gym-acnportal | cacd2e4aa9159a3bf7f0b8e3db2dbb0832d76e46 | [
"BSD-3-Clause"
] | 1 | 2020-05-12T19:13:51.000Z | 2020-05-12T19:13:51.000Z | # coding=utf-8
""" Tests for reward functions. """
import unittest
from typing import Callable, Dict, List
from unittest.mock import create_autospec, Mock, patch
import numpy as np
from acnportal.acnsim import Simulator, ChargingNetwork, EVSE, Current, FiniteRatesEVSE
from acnportal.acnsim.network.sites import simple_... | 41.244186 | 88 | 0.669862 |
1d9e04c7e2e1fad392535445e8e1f43b3f678d8d | 2,076 | py | Python | new_component/_echos.py | iancleary/new-component | f287fb2afd34a5aa50e043c190bd35179e5816b9 | [
"MIT"
] | null | null | null | new_component/_echos.py | iancleary/new-component | f287fb2afd34a5aa50e043c190bd35179e5816b9 | [
"MIT"
] | 4 | 2022-02-02T06:57:06.000Z | 2022-02-05T01:05:52.000Z | new_component/_echos.py | iancleary/new-component | f287fb2afd34a5aa50e043c190bd35179e5816b9 | [
"MIT"
] | 1 | 2022-02-03T03:29:05.000Z | 2022-02-03T03:29:05.000Z | from pathlib import Path
import typer
def _create_new_component_echo(
component_name: str, path_to_component_directory: Path
) -> None:
"""
Echos the newly created component and directory.
"""
typer.echo("")
message_start = "✨ Creating a new "
component = typer.style(component_name, fg=t... | 31.454545 | 87 | 0.70183 |
1d9e587ee3722748a019faff3364ae8d91924f0c | 19,816 | py | Python | fhfinmath/SwapCurve/SwapCurve.py | dantas5/FinanceHub | 9691c9e10654c0608d1ca8c8798a5a26c227af87 | [
"MIT"
] | null | null | null | fhfinmath/SwapCurve/SwapCurve.py | dantas5/FinanceHub | 9691c9e10654c0608d1ca8c8798a5a26c227af87 | [
"MIT"
] | null | null | null | fhfinmath/SwapCurve/SwapCurve.py | dantas5/FinanceHub | 9691c9e10654c0608d1ca8c8798a5a26c227af87 | [
"MIT"
] | null | null | null | """
Authors: Vitor Eller (@Vfermat) and Liam Dunphy (@ldunphy98)
"""
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import datetime as dt
from scipy.interpolate import interp1d
from math import log, exp
from mpl_toolkits.mplot3d import Axes3D
from datetime import datetime
from Holidays.AnbimaH... | 37.744762 | 130 | 0.543904 |
1d9e5edf52f6be90041f9c89513da3da1322a2cd | 7,127 | py | Python | clients/client/python/ory_client/model/create_recovery_link.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/create_recovery_link.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/create_recovery_link.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"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.15
Contact: support@ory.sh
Generated by: htt... | 39.815642 | 211 | 0.58538 |
1d9e9103dee62f490b19f04743e4f36223628c3b | 6,617 | py | Python | experiments/shikhar/pointmass/multiobj_cvae2_untied.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/shikhar/pointmass/multiobj_cvae2_untied.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/shikhar/pointmass/multiobj_cvae2_untied.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from experiments.murtaza.multiworld.skew_fit.reacher.generate_uniform_dataset import generate_uniform_dataset_reacher
from multiworld.envs.mujoco.cameras import sawyer_init_camera_zoomed_in
from rlkit.launchers.launcher_util import run_experiment
# from rlkit.torch.grill.launcher... | 36.558011 | 117 | 0.580021 |
1d9ec16712055094dcc91e0d542aa38db4d6b9c6 | 11,694 | py | Python | scripts/TestHarness/testers/RavenFramework.py | greenwoodms06/raven | f8e789c3c58356cdeab53c057b940d3ee96cd0d6 | [
"Apache-2.0"
] | null | null | null | scripts/TestHarness/testers/RavenFramework.py | greenwoodms06/raven | f8e789c3c58356cdeab53c057b940d3ee96cd0d6 | [
"Apache-2.0"
] | null | null | null | scripts/TestHarness/testers/RavenFramework.py | greenwoodms06/raven | f8e789c3c58356cdeab53c057b940d3ee96cd0d6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Battelle Energy Alliance, 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 or agreed t... | 42.992647 | 100 | 0.665812 |
1d9ecb6c0ee8b8331197a311ce7770d268f15488 | 1,830 | py | Python | gaphor/tests/test_application.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | gaphor/tests/test_application.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | gaphor/tests/test_application.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | """Application service test cases."""
from gaphor.application import Application
from gaphor.application import init_services
class ServiceA:
pass
class ServiceB:
def __init__(self, service_a, other_arg=None):
self.service_a = service_a
class ServiceC:
def __init__(self, service_a, service_b)... | 26.142857 | 75 | 0.725137 |
1d9eef0747059c58257833806de56b29350617f2 | 20,338 | py | Python | jina/executors/__init__.py | liushuigs/jina | b3550e901b2a340924330b5ba2801603e493c933 | [
"Apache-2.0"
] | null | null | null | jina/executors/__init__.py | liushuigs/jina | b3550e901b2a340924330b5ba2801603e493c933 | [
"Apache-2.0"
] | 2 | 2021-02-15T01:40:38.000Z | 2021-02-15T02:00:21.000Z | jina/executors/__init__.py | liushuigs/jina | b3550e901b2a340924330b5ba2801603e493c933 | [
"Apache-2.0"
] | null | null | null | __copyright__ = 'Copyright (c) 2020 Jina AI Limited. All rights reserved.'
__license__ = 'Apache-2.0'
import os
import pickle
import tempfile
from datetime import datetime
from pathlib import Path
from types import SimpleNamespace
from typing import Dict, TypeVar, Type, List, Optional
from .decorators import (
as... | 33.450658 | 126 | 0.572918 |
1d9f0b683cb098d6f6a0d5c30de7ac2a235442c4 | 455 | py | Python | alipay/aop/api/response/AlipayOpenMiniInnerversionSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayOpenMiniInnerversionSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayOpenMiniInnerversionSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayOpenMiniInnerversionSyncResponse(AlipayResponse):
def __init__(self):
super(AlipayOpenMiniInnerversionSyncResponse, self).__init__()
def parse_response_content(se... | 28.4375 | 111 | 0.786813 |
1d9f2e6f0ff89f91a19bac91a285f010b966a415 | 1,494 | py | Python | bfgame/abilities/immolation.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | bfgame/abilities/immolation.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | bfgame/abilities/immolation.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | from bflib import units
from bfgame.abilities.base import Ability
from bfgame.effects.burning import Burning
from services.selection import CursorSelection, TargetSelectionSet
"""
Yes for anyone wondering, its a joke, for debug.
"""
class Immolation(Ability):
name = "Immolation"
target_selection = TargetSele... | 26.210526 | 66 | 0.647925 |
1d9f48b48f10d7a5c878b47af7938809a78959b1 | 3,358 | py | Python | servicex/resources/add_file_to_dataset.py | AndrewEckart/ServiceX_App | f15a004c0910b316f59e4fbad7f28c16bb5d2ae7 | [
"BSD-3-Clause"
] | null | null | null | servicex/resources/add_file_to_dataset.py | AndrewEckart/ServiceX_App | f15a004c0910b316f59e4fbad7f28c16bb5d2ae7 | [
"BSD-3-Clause"
] | null | null | null | servicex/resources/add_file_to_dataset.py | AndrewEckart/ServiceX_App | f15a004c0910b316f59e4fbad7f28c16bb5d2ae7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2019, IRIS-HEP
# 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 foll... | 44.184211 | 90 | 0.690887 |
1d9f69dd1df7b513a2f81aeb5c4f3da95514d8b5 | 1,658 | py | Python | asposewordscloud/models/responses/save_as_tiff_online_response.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/responses/save_as_tiff_online_response.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/responses/save_as_tiff_online_response.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="save_as_tiff_online_response.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a... | 48.764706 | 85 | 0.670688 |
1d9f7fe226bef8f1a5e260ec8b20fe0a782c4e14 | 1,061 | py | Python | src/guacscanner/ConnectionParameters.py | cisagov/guacamole-connection-scanner | 1252a9857b793cfd2050ace5b5d62a4cb56a1063 | [
"CC0-1.0"
] | 1 | 2021-12-22T12:14:38.000Z | 2021-12-22T12:14:38.000Z | src/guacscanner/ConnectionParameters.py | cisagov/guacamole-connection-scanner | 1252a9857b793cfd2050ace5b5d62a4cb56a1063 | [
"CC0-1.0"
] | 51 | 2021-11-04T02:41:10.000Z | 2022-03-29T17:31:16.000Z | src/guacscanner/ConnectionParameters.py | cisagov/guacscanner | 1252a9857b793cfd2050ace5b5d62a4cb56a1063 | [
"CC0-1.0"
] | null | null | null | """A dataclass container for Guacamole connection parameters."""
# Standard Python Libraries
from dataclasses import dataclass
@dataclass
class ConnectionParameters:
"""A dataclass container for Guacamole connection parameters."""
"""The slots for this dataclass."""
__slots__ = (
"private_ssh_k... | 27.205128 | 85 | 0.686145 |
1d9fa21ce5650aaf76dff298123a5e26027dc6ba | 4,368 | py | Python | geoq/maps/urls.py | kaydoh/geoq | 6f10818d0cc3cef4ba8113e8b047d27e79b2f8b0 | [
"MIT"
] | 471 | 2015-01-05T15:16:26.000Z | 2022-03-28T05:06:11.000Z | geoq/maps/urls.py | kaydoh/geoq | 6f10818d0cc3cef4ba8113e8b047d27e79b2f8b0 | [
"MIT"
] | 109 | 2015-01-06T20:00:58.000Z | 2022-03-11T23:17:53.000Z | geoq/maps/urls.py | kaydoh/geoq | 6f10818d0cc3cef4ba8113e8b047d27e79b2f8b0 | [
"MIT"
] | 100 | 2015-01-05T15:16:39.000Z | 2021-12-01T12:13:13.000Z | # -*- coding: utf-8 -*-
# This technical data was produced for the U. S. Government under Contract No. W15P7T-13-C-F600, and
# is subject to the Rights in Technical Data-Noncommercial Items clause at DFARS 252.227-7013 (FEB 2012)
from django.contrib.auth.decorators import login_required
from django.urls import path, i... | 36.099174 | 139 | 0.65087 |
1d9fb39713eb41dad1f4c64335e1a95e9a589ac0 | 219 | py | Python | twitter_game/posts/admin.py | ztaylor2/django-twitter-game | f58677ec22ef95d87d28fd784b13af635e5338bc | [
"MIT"
] | null | null | null | twitter_game/posts/admin.py | ztaylor2/django-twitter-game | f58677ec22ef95d87d28fd784b13af635e5338bc | [
"MIT"
] | null | null | null | twitter_game/posts/admin.py | ztaylor2/django-twitter-game | f58677ec22ef95d87d28fd784b13af635e5338bc | [
"MIT"
] | null | null | null | """Admin."""
from django.contrib import admin
from posts.models import UserProfile, Post, Like, Dislike
admin.site.register(UserProfile)
admin.site.register(Post)
admin.site.register(Like)
admin.site.register(Dislike)
| 24.333333 | 57 | 0.794521 |
1d9ffe75da274f953e65a06a7a63843079e501fe | 22,129 | py | Python | lib/boar/tests/test_workdir.py | serialhex/boar-with-shoes | 09aa931010d7416d6c3c75729ccb414f354f7a0a | [
"MIT"
] | 1 | 2015-11-05T23:57:22.000Z | 2015-11-05T23:57:22.000Z | lib/boar/tests/test_workdir.py | serialhex/boar-with-shoes | 09aa931010d7416d6c3c75729ccb414f354f7a0a | [
"MIT"
] | null | null | null | lib/boar/tests/test_workdir.py | serialhex/boar-with-shoes | 09aa931010d7416d6c3c75729ccb414f354f7a0a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2010 Mats Ekberg
#
# 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... | 40.45521 | 104 | 0.570699 |
1da04bdb790ad631642c782535f1ef2fe4d1422b | 3,038 | py | Python | src/kinematics/joint_factories.py | rgaensler/gcode | c6a6b617a04490dedefb2bae7b596a2e12ab4ab1 | [
"MIT"
] | null | null | null | src/kinematics/joint_factories.py | rgaensler/gcode | c6a6b617a04490dedefb2bae7b596a2e12ab4ab1 | [
"MIT"
] | 314 | 2020-02-26T12:37:17.000Z | 2021-08-02T00:32:32.000Z | src/kinematics/joint_factories.py | rgaensler/gcode | c6a6b617a04490dedefb2bae7b596a2e12ab4ab1 | [
"MIT"
] | 2 | 2020-11-12T16:07:48.000Z | 2020-11-16T09:14:48.000Z | from math import cos, sin
from typing import Optional
from src.kinematics.joints import BaseJoint, TranslationalJoint, BaseRotationalJoint, NoOffsetRotationalJoint, \
ParallelRotationalJoint, PerpendicularRotationalJoint, GeneralRotationalJoint, ParallelNoOffsetRotationalJoint, \
PerpendicularNoOffsetRotationa... | 43.4 | 117 | 0.663924 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.