hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
acfd6da096b94ef9904be8bcf945fbc761f09828 | 6,657 | py | Python | clients/client/python/ory_client/model/ui_node_image_attributes.py | simoneromano96/sdk | a6113d0daefbbb803790297e4b242d4c7cbbcb22 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/ui_node_image_attributes.py | simoneromano96/sdk | a6113d0daefbbb803790297e4b242d4c7cbbcb22 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/ui_node_image_attributes.py | simoneromano96/sdk | a6113d0daefbbb803790297e4b242d4c7cbbcb22 | [
"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.9
Contact: support@ory.sh
Generated by: http... | 38.929825 | 194 | 0.585849 |
acfd6df649ede5f992cae534018c1d49e0a855b8 | 17,019 | py | Python | research/object_detection/anchor_generators/multiple_grid_anchor_generator.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | 1 | 2019-09-11T09:41:11.000Z | 2019-09-11T09:41:11.000Z | research/object_detection/anchor_generators/multiple_grid_anchor_generator.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | null | null | null | research/object_detection/anchor_generators/multiple_grid_anchor_generator.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 49.618076 | 81 | 0.651625 |
acfd6e0eee8269f1b2e1306ae0246fddbbec1146 | 626 | py | Python | env/lib/python3.8/site-packages/plotly/validators/scatterternary/marker/line/_coloraxis.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | env/lib/python3.8/site-packages/plotly/validators/scatterternary/marker/line/_coloraxis.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | env/lib/python3.8/site-packages/plotly/validators/scatterternary/marker/line/_coloraxis.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import _plotly_utils.basevalidators
class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator):
def __init__(
self,
plotly_name="coloraxis",
parent_name="scatterternary.marker.line",
**kwargs
):
super(ColoraxisValidator, self).__init__(
plotly... | 31.3 | 75 | 0.589457 |
acfd6effa7c65cb049ddce6d44a55428975befca | 539 | py | Python | cinema_environment/server_monolith/server_app/migrations/0017_auto_20200227_2127.py | AndrewMalitchuk/cinema-server-monolith | 0002f672c3389f187c4668b7f87e9ea7273900a7 | [
"Apache-2.0"
] | null | null | null | cinema_environment/server_monolith/server_app/migrations/0017_auto_20200227_2127.py | AndrewMalitchuk/cinema-server-monolith | 0002f672c3389f187c4668b7f87e9ea7273900a7 | [
"Apache-2.0"
] | null | null | null | cinema_environment/server_monolith/server_app/migrations/0017_auto_20200227_2127.py | AndrewMalitchuk/cinema-server-monolith | 0002f672c3389f187c4668b7f87e9ea7273900a7 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.0.2 on 2020-02-27 19:27
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('server_app', '0016_ticket_timeline_id'),
]
operations = [
migrations.RemoveField(
model_name='ticket',
name='cinema_id',
... | 20.730769 | 50 | 0.543599 |
acfd7061c93b89eb63d705916e6a4047f1f3b060 | 1,140 | py | Python | basic_elements/class_and_static_methods.py | ppinko/python_knowledge_library | 089348c80e3f49a4a56839bfb921033e5386f07e | [
"Apache-2.0"
] | null | null | null | basic_elements/class_and_static_methods.py | ppinko/python_knowledge_library | 089348c80e3f49a4a56839bfb921033e5386f07e | [
"Apache-2.0"
] | null | null | null | basic_elements/class_and_static_methods.py | ppinko/python_knowledge_library | 089348c80e3f49a4a56839bfb921033e5386f07e | [
"Apache-2.0"
] | null | null | null | """
This script show an example presenting use of @staticmethod and @classmethod
"""
class MyClass:
def method(self):
return 'instance method called', self
@classmethod
def classmethod(cls):
return 'class method called', cls
@staticmethod
def staticmethod():
return 'static... | 21.923077 | 76 | 0.589474 |
acfd711ebe988cd8915dadcb5994456479c7e421 | 4,819 | py | Python | how-to-use-azureml/ml-frameworks/tensorflow/training/train-tensorflow-resume-training/tf_mnist_with_checkpoint.py | mnozary/MachineLearningNotebooks | f5c2ccccdc3177d47f3cc7886f99f82b09f55898 | [
"MIT"
] | 1 | 2019-12-29T00:29:34.000Z | 2019-12-29T00:29:34.000Z | how-to-use-azureml/ml-frameworks/tensorflow/training/train-tensorflow-resume-training/tf_mnist_with_checkpoint.py | mnozary/MachineLearningNotebooks | f5c2ccccdc3177d47f3cc7886f99f82b09f55898 | [
"MIT"
] | null | null | null | how-to-use-azureml/ml-frameworks/tensorflow/training/train-tensorflow-resume-training/tf_mnist_with_checkpoint.py | mnozary/MachineLearningNotebooks | f5c2ccccdc3177d47f3cc7886f99f82b09f55898 | [
"MIT"
] | 1 | 2020-07-30T13:30:18.000Z | 2020-07-30T13:30:18.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import numpy as np
import argparse
import os
import re
import tensorflow as tf
import glob
from azureml.core import Run
from utils import load_data
print("TensorFlow version:", tf.VERSION)
parser = argparse.ArgumentParser(... | 36.78626 | 111 | 0.671716 |
acfd72291a78b67d9058d1e796ef6957309f9ef1 | 92 | py | Python | demo2/demo2_app/apps.py | mpasternak/pytest-django-pytest-splinter-test | 843577e05a91545e4ff1d687b3fd56f25e0e22d3 | [
"Unlicense"
] | null | null | null | demo2/demo2_app/apps.py | mpasternak/pytest-django-pytest-splinter-test | 843577e05a91545e4ff1d687b3fd56f25e0e22d3 | [
"Unlicense"
] | null | null | null | demo2/demo2_app/apps.py | mpasternak/pytest-django-pytest-splinter-test | 843577e05a91545e4ff1d687b3fd56f25e0e22d3 | [
"Unlicense"
] | null | null | null | from django.apps import AppConfig
class Demo2AppConfig(AppConfig):
name = 'demo2_app'
| 15.333333 | 33 | 0.76087 |
acfd72df39a39dc4804cfb04bf6ec4ed74abe59a | 1,077 | py | Python | cambiaahora/configuracion/migrations/0002_logoapoyan.py | shiminasai/plataforma_FADCANIC | 14831525e4104da7f05ce87e59238f1e4193c184 | [
"MIT"
] | null | null | null | cambiaahora/configuracion/migrations/0002_logoapoyan.py | shiminasai/plataforma_FADCANIC | 14831525e4104da7f05ce87e59238f1e4193c184 | [
"MIT"
] | null | null | null | cambiaahora/configuracion/migrations/0002_logoapoyan.py | shiminasai/plataforma_FADCANIC | 14831525e4104da7f05ce87e59238f1e4193c184 | [
"MIT"
] | 2 | 2015-05-19T20:50:41.000Z | 2015-05-19T20:51:04.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import sorl.thumbnail.fields
from django.conf import settings
import cambiaahora.utils
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL... | 33.65625 | 146 | 0.624884 |
acfd730c17d5584c2b0075914baf5b4835c76276 | 67 | py | Python | blesuite/replay/btsnoop/android/__init__.py | jreynders/BLESuite-1 | 1c3c15fc2d4e30c3f9c1a15e0268cae84685784b | [
"MIT"
] | 198 | 2016-08-04T05:45:38.000Z | 2022-02-17T08:30:58.000Z | blesuite/replay/btsnoop/android/__init__.py | jreynders/BLESuite-1 | 1c3c15fc2d4e30c3f9c1a15e0268cae84685784b | [
"MIT"
] | 13 | 2018-02-04T14:16:16.000Z | 2020-10-09T02:16:24.000Z | blesuite/replay/btsnoop/android/__init__.py | jreynders/BLESuite-1 | 1c3c15fc2d4e30c3f9c1a15e0268cae84685784b | [
"MIT"
] | 57 | 2016-08-08T04:24:04.000Z | 2022-01-24T08:43:02.000Z | from . import executor
from . import phone
from . import snoopphone | 22.333333 | 24 | 0.791045 |
acfd7386dd9b39cbe964add9b30d0613bb6f3fa0 | 5,898 | py | Python | needlestack/servicers/settings.py | needlehaystack/needlestack | e00529a2a7c2d85059936a85f54dfb55e515b6ef | [
"Apache-2.0"
] | 3 | 2019-10-03T22:15:21.000Z | 2022-02-08T09:05:41.000Z | needlestack/servicers/settings.py | cungtv/needlestack | e00529a2a7c2d85059936a85f54dfb55e515b6ef | [
"Apache-2.0"
] | 1 | 2021-04-30T21:08:47.000Z | 2021-04-30T21:08:47.000Z | needlestack/servicers/settings.py | cungtv/needlestack | e00529a2a7c2d85059936a85f54dfb55e515b6ef | [
"Apache-2.0"
] | 2 | 2019-08-02T19:13:09.000Z | 2019-10-25T01:47:17.000Z | from typing import List, Optional
import grpc
from grpc import ServerCredentials, ChannelCredentials
class BaseConfig(object):
"""Base configuration for gRPC services
Attributes:
DEBUG: Attach a stream handler to console for logger
DEBUG_LOG_FORMAT: Format string for debug logger
LOG... | 33.896552 | 107 | 0.676331 |
acfd74b4187205b67451a1973ccaff3b95a332e6 | 3,378 | py | Python | iast/views/api_route_related_request.py | luzhongyang/DongTai-webapi | f07b2b1bc1222999d0bb7e3300e65c953ee966f5 | [
"Apache-2.0"
] | 6 | 2021-09-01T07:37:37.000Z | 2022-02-10T08:28:47.000Z | iast/views/api_route_related_request.py | luzhongyang/DongTai-webapi | f07b2b1bc1222999d0bb7e3300e65c953ee966f5 | [
"Apache-2.0"
] | 51 | 2021-11-09T09:19:05.000Z | 2022-02-10T02:37:04.000Z | iast/views/api_route_related_request.py | luzhongyang/DongTai-webapi | f07b2b1bc1222999d0bb7e3300e65c953ee966f5 | [
"Apache-2.0"
] | 21 | 2021-09-01T06:32:19.000Z | 2022-03-03T03:23:37.000Z | ######################################################################
# @author : bidaya0 (bidaya0@$HOSTNAME)
# @file : api_route_related_request
# @created : Saturday Aug 21, 2021 13:54:14 CST
#
# @description :
######################################################################
from dongtai.model... | 42.225 | 158 | 0.625222 |
acfd756432936301a9d95da63d2b71ea9f2b3fe9 | 7,716 | py | Python | pythalesians/market/loaders/lowlevel/bbg/loaderbbg.py | PauloRui/pythalesians | a32f884a83476a6a6e7e77aa1a3f5f53468bad66 | [
"Apache-2.0"
] | 1 | 2021-07-05T13:21:28.000Z | 2021-07-05T13:21:28.000Z | pythalesians/market/loaders/lowlevel/bbg/loaderbbg.py | PauloRui/pythalesians | a32f884a83476a6a6e7e77aa1a3f5f53468bad66 | [
"Apache-2.0"
] | null | null | null | pythalesians/market/loaders/lowlevel/bbg/loaderbbg.py | PauloRui/pythalesians | a32f884a83476a6a6e7e77aa1a3f5f53468bad66 | [
"Apache-2.0"
] | null | null | null | __author__ = 'saeedamen' # Saeed Amen / saeed@thalesians.com
#
# Copyright 2015 Thalesians Ltd. - http//www.thalesians.com / @thalesians
#
# 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://... | 38.19802 | 121 | 0.665759 |
acfd7708339cc1c0fb3fee5701925edd3602d27d | 540,131 | py | Python | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/subTLVs/subTLVs_/link_delay/state/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 64 | 2016-10-20T15:47:18.000Z | 2021-11-11T11:57:32.000Z | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/subTLVs/subTLVs_/link_delay/state/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 126 | 2016-10-05T10:36:14.000Z | 2019-05-15T08:43:23.000Z | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/subTLVs/subTLVs_/link_delay/state/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 63 | 2016-11-07T15:23:08.000Z | 2021-09-22T14:41:16.000Z | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | 67.949553 | 42,480 | 0.489903 |
acfd7719399c86cfe4ae0c3228226eff656e54f8 | 6,196 | py | Python | core/minecraft/hypixel/request.py | vcokltfre/Myaer | 8e2a57f26635781e19716b47028f465617defa75 | [
"MIT"
] | null | null | null | core/minecraft/hypixel/request.py | vcokltfre/Myaer | 8e2a57f26635781e19716b47028f465617defa75 | [
"MIT"
] | null | null | null | core/minecraft/hypixel/request.py | vcokltfre/Myaer | 8e2a57f26635781e19716b47028f465617defa75 | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2020 MyerFire
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
to use, copy, modify, merge, publi... | 49.174603 | 118 | 0.705455 |
acfd77e69cfbcd4012356b9999566b7227e10673 | 40,117 | py | Python | codalab/lib/worksheet_util.py | millerjohnp/codalab-worksheets | d6fc37864e7a8966380fc9d73865b10e434d6678 | [
"Apache-2.0"
] | null | null | null | codalab/lib/worksheet_util.py | millerjohnp/codalab-worksheets | d6fc37864e7a8966380fc9d73865b10e434d6678 | [
"Apache-2.0"
] | null | null | null | codalab/lib/worksheet_util.py | millerjohnp/codalab-worksheets | d6fc37864e7a8966380fc9d73865b10e434d6678 | [
"Apache-2.0"
] | null | null | null | """
worksheet_util contains the following public functions:
- request_lines: pops up an editor to allow for full-text editing of a worksheet.
- parse_worksheet_form: takes those lines and generates a set of items (triples)
- interpret_items: takes those triples and returns a structure that interprets all the directives... | 38.797872 | 130 | 0.558541 |
acfd78d454d509971c277e97d471031eed926f8e | 2,240 | py | Python | configs/lane_detection/resa/resnet18_tusimple.py | voldemortX/DeeplabV3_PyTorch1.3_Codebase | d22d23e74800fafb58eeb61d6649008745c1a287 | [
"BSD-3-Clause"
] | 1 | 2020-09-17T06:21:39.000Z | 2020-09-17T06:21:39.000Z | configs/lane_detection/resa/resnet18_tusimple.py | voldemortX/pytorch-segmentation | 9c62c0a721d11c8ea6bf312ecf1c7b238a54dcda | [
"BSD-3-Clause"
] | null | null | null | configs/lane_detection/resa/resnet18_tusimple.py | voldemortX/pytorch-segmentation | 9c62c0a721d11c8ea6bf312ecf1c7b238a54dcda | [
"BSD-3-Clause"
] | null | null | null | from importmagician import import_from
with import_from('./'):
# Data pipeline
from configs.lane_detection.common.datasets.tusimple_seg import dataset
from configs.lane_detection.common.datasets.train_level0_360 import train_augmentation
from configs.lane_detection.common.datasets.test_360 import test_a... | 25.168539 | 90 | 0.662054 |
acfd790ac4d72a6c7863ffd147db0c2293d79105 | 1,865 | py | Python | Link_prediction_model/logger.py | amazon-research/gnn-tail-generalization | 1ff49e62b8a2e2a7273c50dce59167ea9d9161fb | [
"Apache-2.0"
] | 15 | 2021-11-03T22:06:16.000Z | 2022-03-26T06:56:48.000Z | Link_prediction_model/logger.py | amazon-research/gnn-tail-generalization | 1ff49e62b8a2e2a7273c50dce59167ea9d9161fb | [
"Apache-2.0"
] | 1 | 2022-02-22T16:11:27.000Z | 2022-03-01T07:09:35.000Z | Link_prediction_model/logger.py | amazon-research/gnn-tail-generalization | 1ff49e62b8a2e2a7273c50dce59167ea9d9161fb | [
"Apache-2.0"
] | 3 | 2022-01-08T09:58:15.000Z | 2022-03-21T22:43:16.000Z | # -*- coding: utf-8 -*-
import torch
import sys
class Logger(object):
def __init__(self, runs, info=None):
self.info = info
self.results = [[] for _ in range(runs)]
def add_result(self, run, result):
# assert len(result) == 2
assert run >= 0 and run < len(self.results)
... | 39.680851 | 89 | 0.50134 |
acfd7972c6a709e5d84d86fdba5bd727abb4ce14 | 1,472 | py | Python | solutions/19. Remove Nth Node From End of List.py | JacopoPan/leetcode-top100-liked-questions | 03dc05f087d05805d54b7585ce740338f3128833 | [
"MIT"
] | null | null | null | solutions/19. Remove Nth Node From End of List.py | JacopoPan/leetcode-top100-liked-questions | 03dc05f087d05805d54b7585ce740338f3128833 | [
"MIT"
] | null | null | null | solutions/19. Remove Nth Node From End of List.py | JacopoPan/leetcode-top100-liked-questions | 03dc05f087d05805d54b7585ce740338f3128833 | [
"MIT"
] | null | null | null | """
Runtime: 32 ms, faster than 92.79% of Python3 online submissions for Remove Nth Node From End of List.
Memory Usage: 13.9 MB, less than 60.85% of Python3 online submissions for Remove Nth Node From End of List.
"""
from typing import List
from typing import Optional
class ListNode:
def __init__(self, val=0, ne... | 28.862745 | 107 | 0.514946 |
acfd799ddb8aeeb5eb7edee4622bf95ba165ebe9 | 4,930 | py | Python | post_engine.py | shinux/tears | 4ec3d362692bcf5563ecdb0bc10c83d7f236ecce | [
"MIT"
] | 6 | 2016-04-11T02:03:46.000Z | 2019-08-26T06:12:55.000Z | post_engine.py | shinux/tears | 4ec3d362692bcf5563ecdb0bc10c83d7f236ecce | [
"MIT"
] | null | null | null | post_engine.py | shinux/tears | 4ec3d362692bcf5563ecdb0bc10c83d7f236ecce | [
"MIT"
] | 1 | 2018-12-28T17:11:59.000Z | 2018-12-28T17:11:59.000Z | import os
import sys
import yaml
import pymongo
from os import listdir
from tears import basedir
client = pymongo.MongoClient("localhost", 27017)
db = client.tears
post_collection = db.posts
category_collection = db.categories
tag_collection = db.tags
about_collection = db.about
link_collection = db.link
basedir +=... | 32.434211 | 95 | 0.543205 |
acfd7b2c56f59ae2bccde54311fbe6ae0dc49223 | 2,710 | py | Python | validator.py | tivaliy/cloudwatch_importer | 46704a4001642a3d00ab1281bf11a4a8dbb900d4 | [
"Apache-2.0"
] | 2 | 2017-04-26T19:22:14.000Z | 2018-07-09T09:15:37.000Z | validator.py | tivaliy/cloudwatch_importer | 46704a4001642a3d00ab1281bf11a4a8dbb900d4 | [
"Apache-2.0"
] | null | null | null | validator.py | tivaliy/cloudwatch_importer | 46704a4001642a3d00ab1281bf11a4a8dbb900d4 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2017 Vitalii Kulanov
#
# 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 ... | 29.456522 | 78 | 0.598155 |
acfd7b6c5b7abc86665ac10667275b5ab10f4f21 | 18,892 | py | Python | blimp_env/tests/envs/test_planar_navigate_env.py | robot-perception-group/AutonomousBlimpDRL | a10a88b2e9c9f9a83435cff2e4bc7e16e83cfeee | [
"MIT"
] | 8 | 2021-11-21T20:47:37.000Z | 2022-03-15T09:50:06.000Z | blimp_env/tests/envs/test_planar_navigate_env.py | robot-perception-group/AutonomousBlimpDRL | a10a88b2e9c9f9a83435cff2e4bc7e16e83cfeee | [
"MIT"
] | null | null | null | blimp_env/tests/envs/test_planar_navigate_env.py | robot-perception-group/AutonomousBlimpDRL | a10a88b2e9c9f9a83435cff2e4bc7e16e83cfeee | [
"MIT"
] | null | null | null | import pytest
from blimp_env.envs import PlanarNavigateEnv
from blimp_env.envs.common.gazebo_connection import GazeboConnection
from stable_baselines3.common.env_checker import check_env
import copy
import numpy as np
ENV = PlanarNavigateEnv
env_kwargs = {
"DBG": True,
"simulation": {
"auto_start_simu... | 29.657771 | 88 | 0.596178 |
acfd7be48b490ed2361e44c049acff97981a4ebe | 32,658 | py | Python | CiscoWebexTeams.py | marksull/err-backend-cisco-webex-teams | cb81edab9c06ffe23ffe78456df81aaf57a80c19 | [
"MIT"
] | 21 | 2018-08-28T05:49:45.000Z | 2022-01-26T04:09:21.000Z | CiscoWebexTeams.py | marksull/err-backend-cisco-webex-teams | cb81edab9c06ffe23ffe78456df81aaf57a80c19 | [
"MIT"
] | 17 | 2018-08-28T06:34:54.000Z | 2021-07-30T09:41:45.000Z | CiscoWebexTeams.py | marksull/err-backend-cisco-webex-teams | cb81edab9c06ffe23ffe78456df81aaf57a80c19 | [
"MIT"
] | 6 | 2018-10-08T02:14:08.000Z | 2021-07-29T14:49:20.000Z | import sys
import json
import uuid
import string
import random
import asyncio
import copyreg
import logging
import websockets
from copy import copy
from enum import Enum
from base64 import b64encode
from markdown import markdown
from errbot.core import ErrBot
from errbot.backends.base import (
Message,
Person... | 31.132507 | 124 | 0.588677 |
acfd7bf3dde64b47a8131de3c6a975dfac129a67 | 725 | py | Python | portfolio/urls.py | Toluhunter/portfolio | 79ab350f1f218b64ab8ebacaa1dc54f42c4b73a1 | [
"Apache-2.0"
] | 3 | 2021-11-21T11:48:49.000Z | 2022-03-24T20:32:24.000Z | portfolio/urls.py | Toluhunter/portfolio | 79ab350f1f218b64ab8ebacaa1dc54f42c4b73a1 | [
"Apache-2.0"
] | null | null | null | portfolio/urls.py | Toluhunter/portfolio | 79ab350f1f218b64ab8ebacaa1dc54f42c4b73a1 | [
"Apache-2.0"
] | null | null | null | """portfolio URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-bas... | 34.52381 | 77 | 0.702069 |
acfd7d1ebd55b81f2d1b740a67a7da9ecc2f5dfe | 1,975 | py | Python | Assets/Python/BUG/BugHelp.py | macaurther/DOCUSA | 40586727c351d1b1130c05c2d4648cca3a8bacf5 | [
"MIT"
] | 93 | 2015-11-20T04:13:36.000Z | 2022-03-24T00:03:08.000Z | Assets/Python/BUG/BugHelp.py | macaurther/DOCUSA | 40586727c351d1b1130c05c2d4648cca3a8bacf5 | [
"MIT"
] | 206 | 2015-11-09T00:27:15.000Z | 2021-12-04T19:05:18.000Z | Assets/Python/BUG/BugHelp.py | dguenms/Dawn-of-Civilization | 1c4f510af97a869637cddb4c0859759158cea5ce | [
"MIT"
] | 117 | 2015-11-08T02:43:46.000Z | 2022-02-12T06:29:00.000Z | ## BugHelp
##
## Opens BUG's help file, "BUG Mod Help.chm", or the online version, for the user's language.
##
## TODO:
## Move to configuration XML
## Support multiple help files and shortcuts
##
## Copyright (c) 2008 The BUG Mod.
##
## Author: EmperorFool
from CvPythonExtensions import *
import Popu... | 30.384615 | 104 | 0.69519 |
acfd7d2a93b46d4647b96f6e0eed8ae997bd12b2 | 408 | py | Python | umusicfy/umusicfy/celery.py | CarlosMart626/umusicfy | 97e2166fe26d1fbe36df6bea435044ef3d367edf | [
"Apache-2.0"
] | null | null | null | umusicfy/umusicfy/celery.py | CarlosMart626/umusicfy | 97e2166fe26d1fbe36df6bea435044ef3d367edf | [
"Apache-2.0"
] | 8 | 2020-06-05T18:08:05.000Z | 2022-01-13T00:44:30.000Z | umusicfy/umusicfy/celery.py | CarlosMart626/umusicfy | 97e2166fe26d1fbe36df6bea435044ef3d367edf | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
import os
from celery import Celery
from django.conf import settings
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "umusicfy.settings.prd")
app = Celery('umusicfy')
# Using a string here means the worker will not have to
# pickle the object when using Windows.
app.config_from... | 29.142857 | 72 | 0.813725 |
acfd7d470378175a182d58732102c9ecf8819452 | 15,825 | py | Python | pgmpy/factors/FactorSet.py | predictive-analytics-lab/pgmpy | 6c2a31641adc72793acd130d007190fdb1632271 | [
"MIT"
] | null | null | null | pgmpy/factors/FactorSet.py | predictive-analytics-lab/pgmpy | 6c2a31641adc72793acd130d007190fdb1632271 | [
"MIT"
] | null | null | null | pgmpy/factors/FactorSet.py | predictive-analytics-lab/pgmpy | 6c2a31641adc72793acd130d007190fdb1632271 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from pgmpy.extern.six.moves import filter, reduce
from pgmpy.factors.base import BaseFactor
from pgmpy.extern import six
class FactorSet(object):
r"""
Base class of *DiscreteFactor Sets*.
A factor set provides a compact representation of higher dimensional factor
:math:`\phi_... | 41.426702 | 118 | 0.600885 |
acfd7dc850f9f04cb23a8cfe6f92c52a5d2d32db | 1,499 | py | Python | azext_iot/sdk/digitaltwins_arm/models/error_definition.py | harunpehlivan/azure-iot-cli-extension | ddf4f0beb510551999fc97dc5af7f4c7ed2d202f | [
"MIT"
] | null | null | null | azext_iot/sdk/digitaltwins_arm/models/error_definition.py | harunpehlivan/azure-iot-cli-extension | ddf4f0beb510551999fc97dc5af7f4c7ed2d202f | [
"MIT"
] | null | null | null | azext_iot/sdk/digitaltwins_arm/models/error_definition.py | harunpehlivan/azure-iot-cli-extension | ddf4f0beb510551999fc97dc5af7f4c7ed2d202f | [
"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 ... | 31.893617 | 77 | 0.582388 |
acfd7e60597bf6a28d4997d2ec549c24fa065053 | 22,757 | py | Python | theano/tests/test_printing.py | mdda/Theano | 6ca7b2b65000e371f009b617d41bc5a90f022d38 | [
"BSD-3-Clause"
] | null | null | null | theano/tests/test_printing.py | mdda/Theano | 6ca7b2b65000e371f009b617d41bc5a90f022d38 | [
"BSD-3-Clause"
] | null | null | null | theano/tests/test_printing.py | mdda/Theano | 6ca7b2b65000e371f009b617d41bc5a90f022d38 | [
"BSD-3-Clause"
] | null | null | null | """
Tests of printing functionality
"""
from __future__ import print_function
import logging
from nose.plugins.skip import SkipTest
import numpy
from six.moves import StringIO
import theano
import theano.tensor as tensor
from theano.printing import min_informative_str, debugprint
def test_pydotprint_cond_highligh... | 32.279433 | 78 | 0.474096 |
acfd7eaffbf560558276c50376ac09fcdc9a0764 | 52,038 | py | Python | acme/acme/client_test.py | realkcn/certbot | 2b1cb9037b1c908a2fdf73d5faca4db6b79d9214 | [
"Apache-2.0"
] | null | null | null | acme/acme/client_test.py | realkcn/certbot | 2b1cb9037b1c908a2fdf73d5faca4db6b79d9214 | [
"Apache-2.0"
] | null | null | null | acme/acme/client_test.py | realkcn/certbot | 2b1cb9037b1c908a2fdf73d5faca4db6b79d9214 | [
"Apache-2.0"
] | null | null | null | """Tests for acme.client."""
import copy
import datetime
import json
import unittest
from six.moves import http_client # pylint: disable=import-error
import josepy as jose
import mock
import OpenSSL
import requests
from acme import challenges
from acme import errors
from acme import jws as acme_jws
from acme import... | 43.692695 | 98 | 0.663035 |
acfd7ed5969f6a252f4d2bd7db089adec5b09081 | 199 | py | Python | geo_search.py | mfranklin128/places-exploration | bedf49db0c08c98ba606b8a09ce0d25b38ed103b | [
"Apache-2.0"
] | null | null | null | geo_search.py | mfranklin128/places-exploration | bedf49db0c08c98ba606b8a09ce0d25b38ed103b | [
"Apache-2.0"
] | null | null | null | geo_search.py | mfranklin128/places-exploration | bedf49db0c08c98ba606b8a09ce0d25b38ed103b | [
"Apache-2.0"
] | null | null | null | increment = 0.0012
starting_lat = 40.7066128
starting_long = -74.0129726
for i in range(50):
for j in range(10):
print str((starting_lat + increment*i)) + " " + str((starting_long + increment*j))
| 28.428571 | 84 | 0.698492 |
acfd7f787f2aa2aba9e07c30956c3f73be440645 | 1,680 | py | Python | sphinx-sources/Examples/AiryBeam/AiryBeam2D_selfhealing_II.py | opticspy/lightpipes-python | dbd66e46ca8263a6e9bf7690e5f2b2551f93f4cb | [
"BSD-3-Clause"
] | null | null | null | sphinx-sources/Examples/AiryBeam/AiryBeam2D_selfhealing_II.py | opticspy/lightpipes-python | dbd66e46ca8263a6e9bf7690e5f2b2551f93f4cb | [
"BSD-3-Clause"
] | null | null | null | sphinx-sources/Examples/AiryBeam/AiryBeam2D_selfhealing_II.py | opticspy/lightpipes-python | dbd66e46ca8263a6e9bf7690e5f2b2551f93f4cb | [
"BSD-3-Clause"
] | null | null | null | """
Self healing Airy beam
"""
from LightPipes import *
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import numpy as np
wavelength = 2.3*um
size = 30*mm
N = 500
x0=y0=1*mm
a1=a2=0.1/mm
#z=900*cm
w=1*mm
z= 0 *cm
dz = 2 *cm
fig, ax = plt.subplots(); ax.axis('off')
ims =[]
F0=Begin(size,wave... | 26.666667 | 95 | 0.526786 |
acfd80516befdaf2bff603286a97f624bfc4db28 | 11,341 | py | Python | vendor/packages/translate-toolkit/translate/convert/pot2po.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | 2 | 2019-08-19T17:08:47.000Z | 2019-10-05T11:37:02.000Z | vendor/packages/translate-toolkit/translate/convert/pot2po.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | null | null | null | vendor/packages/translate-toolkit/translate/convert/pot2po.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2004-2009 Zuza Software Foundation
#
# This file is part of translate.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either versio... | 43.619231 | 158 | 0.701878 |
acfd80541410aac72caa08cad19716094edb8e82 | 1,433 | py | Python | src/NN1.py | patelotech/genetic_deep_learning | 04d418a35a5adcb2f201dba657b6248263596eed | [
"MIT"
] | 5 | 2019-01-15T13:56:20.000Z | 2019-11-15T12:57:51.000Z | src/NN1.py | IAARhub/genetic_deep_learning | bd45298d330c117f895d6873c8e36b8f40d0dc10 | [
"MIT"
] | null | null | null | src/NN1.py | IAARhub/genetic_deep_learning | bd45298d330c117f895d6873c8e36b8f40d0dc10 | [
"MIT"
] | 1 | 2019-01-14T21:18:02.000Z | 2019-01-14T21:18:02.000Z | import numpy as np
from nn_utils import sigmoid
learning_rate = 0.001
class NN1:
def __init__(
self,
train_x,
train_y,
test_x,
test_y,
epochs,
w=None,
print_step=None):
self.l1_error = 0
if w is None:
... | 28.098039 | 75 | 0.465457 |
acfd80aa69dfb07945b994b3750d49cb0ead00a6 | 18,469 | py | Python | far_ws/src/follow_ahead_rl/scripts/MCTS.py | alik604/ra | 6058a9adb47db93bb86bcb2c224930c5731d663d | [
"Unlicense"
] | null | null | null | far_ws/src/follow_ahead_rl/scripts/MCTS.py | alik604/ra | 6058a9adb47db93bb86bcb2c224930c5731d663d | [
"Unlicense"
] | 5 | 2021-03-26T01:30:13.000Z | 2021-04-22T22:19:03.000Z | far_ws/src/follow_ahead_rl/scripts/MCTS.py | alik604/ra | 6058a9adb47db93bb86bcb2c224930c5731d663d | [
"Unlicense"
] | 1 | 2021-05-05T00:57:43.000Z | 2021-05-05T00:57:43.000Z | import pickle
import os
import random
import math
import gym
import gym_gazeboros_ac
from time import sleep
from collections import deque
import numpy as np
import matplotlib.pyplot as plt
from sklearn.preprocessing import PolynomialFeatures
from sklearn.linear_model import LinearRegression
from DDQN_Discrete impor... | 47.723514 | 314 | 0.672532 |
acfd81f55399c91cca1e9a8563443c9b9657c595 | 389 | py | Python | Geekie/Geekie/wsgi.py | 1ricardo66/Django2.0 | e29afefc908723525d60ea40da353a7ab5b27d1c | [
"Apache-2.0"
] | 1 | 2018-08-21T12:26:02.000Z | 2018-08-21T12:26:02.000Z | Geekie/Geekie/wsgi.py | 1ricardo66/Django2.0 | e29afefc908723525d60ea40da353a7ab5b27d1c | [
"Apache-2.0"
] | null | null | null | Geekie/Geekie/wsgi.py | 1ricardo66/Django2.0 | e29afefc908723525d60ea40da353a7ab5b27d1c | [
"Apache-2.0"
] | null | null | null | """
WSGI config for Geekie project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTIN... | 22.882353 | 78 | 0.784062 |
acfd8219fc20464b62ce88556f542fa6c1015ce8 | 14,974 | py | Python | .history/src/Simulador_20200710164625.py | eduardodut/Trabalho_final_estatistica_cd | fbedbbea6bdd7a79e1d62030cde0fab4e93fc338 | [
"MIT"
] | null | null | null | .history/src/Simulador_20200710164625.py | eduardodut/Trabalho_final_estatistica_cd | fbedbbea6bdd7a79e1d62030cde0fab4e93fc338 | [
"MIT"
] | null | null | null | .history/src/Simulador_20200710164625.py | eduardodut/Trabalho_final_estatistica_cd | fbedbbea6bdd7a79e1d62030cde0fab4e93fc338 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from Matriz_esferica import Matriz_esferica
from Individuo import Individuo, Fabrica_individuo
import random
from itertools import permutations
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from scipy.sparse import csr_matrix, lil_matrix
class S... | 41.710306 | 135 | 0.664018 |
acfd83d6e2fee29bddc9baf61931ceb9498a1db6 | 19,000 | py | Python | discord/utils.py | sirmammingtonham/discord.py | 4a23c713e9eae46fd351d3abb44d04d795c96e9f | [
"MIT"
] | null | null | null | discord/utils.py | sirmammingtonham/discord.py | 4a23c713e9eae46fd351d3abb44d04d795c96e9f | [
"MIT"
] | null | null | null | discord/utils.py | sirmammingtonham/discord.py | 4a23c713e9eae46fd351d3abb44d04d795c96e9f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2015-2020 Rapptz
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 to u... | 29.874214 | 130 | 0.619789 |
acfd870d6269ee9976f9cb282e69a0655e79c4ff | 304 | py | Python | netmiko/brocade/__init__.py | mostau1/netmiko | 5b5463fb01e39e771be553281748477a48c7391c | [
"MIT"
] | null | null | null | netmiko/brocade/__init__.py | mostau1/netmiko | 5b5463fb01e39e771be553281748477a48c7391c | [
"MIT"
] | 8 | 2020-02-05T14:17:32.000Z | 2021-09-23T23:27:46.000Z | netmiko/brocade/__init__.py | mostau1/netmiko | 5b5463fb01e39e771be553281748477a48c7391c | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from netmiko.brocade.brocade_nos_ssh import BrocadeNosSSH
from netmiko.brocade.brocade_fastiron_ssh import BrocadeFastironSSH
from netmiko.brocade.brocade_netiron_ssh import BrocadeNetironSSH
__all__ = ['BrocadeNosSSH', 'BrocadeFastironSSH', 'BrocadeNetironSSH']
| 43.428571 | 70 | 0.871711 |
acfd873e49e604b9b28876c9446bad48e9ae45c0 | 5,614 | py | Python | samples/basic/crud/models/cisco-ios-xr/Cisco-IOS-XR-clns-isis-cfg/nc-create-xr-clns-isis-cfg-54-ydk.py | maccioni/ydk-py-samples | d1758694bef97327c5477e65649326c7595ce499 | [
"Apache-2.0"
] | 1 | 2021-07-08T14:02:12.000Z | 2021-07-08T14:02:12.000Z | samples/basic/crud/models/cisco-ios-xr/Cisco-IOS-XR-clns-isis-cfg/nc-create-xr-clns-isis-cfg-54-ydk.py | maccioni/ydk-py-samples | d1758694bef97327c5477e65649326c7595ce499 | [
"Apache-2.0"
] | null | null | null | samples/basic/crud/models/cisco-ios-xr/Cisco-IOS-XR-clns-isis-cfg/nc-create-xr-clns-isis-cfg-54-ydk.py | maccioni/ydk-py-samples | d1758694bef97327c5477e65649326c7595ce499 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2016 Cisco Systems, 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 applicab... | 38.986111 | 79 | 0.723905 |
acfd8761a83b021585f391bc0cdb123880b135f3 | 1,700 | py | Python | mylocation/migrations/0005_auto_20160216_1419.py | chadgates/locmaster | 2a607341d3444996e24b048bfb5245174aedd45d | [
"BSD-3-Clause"
] | null | null | null | mylocation/migrations/0005_auto_20160216_1419.py | chadgates/locmaster | 2a607341d3444996e24b048bfb5245174aedd45d | [
"BSD-3-Clause"
] | null | null | null | mylocation/migrations/0005_auto_20160216_1419.py | chadgates/locmaster | 2a607341d3444996e24b048bfb5245174aedd45d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-16 14:19
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mylocation', '0004_delete_portterminal'),
]
operations = [
migrations.Rename... | 30.357143 | 77 | 0.570588 |
acfd8797ebbd165e9a2b4d1e3746008c70480a5d | 77,862 | py | Python | gpMgmt/bin/gppylib/operations/test/unit/test_unit_backup_utils.py | henglabs/gpdb | 09a8cc05ac90d63c64c6d432ca35179b55a461b2 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | gpMgmt/bin/gppylib/operations/test/unit/test_unit_backup_utils.py | henglabs/gpdb | 09a8cc05ac90d63c64c6d432ca35179b55a461b2 | [
"PostgreSQL",
"Apache-2.0"
] | 6 | 2018-08-04T07:51:37.000Z | 2018-11-26T07:09:44.000Z | gpMgmt/bin/gppylib/operations/test/unit/test_unit_backup_utils.py | henglabs/gpdb | 09a8cc05ac90d63c64c6d432ca35179b55a461b2 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
#
# Copyright (c) Greenplum Inc 2016. All Rights Reserved.
#
import os
import shutil
import unittest
from gppylib.commands.base import CommandResult
from gppylib.gparray import GpArray, GpDB
from gppylib.operations.backup_utils import *
from . import setup_fake_gparray
from mock import patch, M... | 57.251471 | 208 | 0.743482 |
acfd88cbffd122a6b42a5ea0cd085f6d9bd1492f | 210 | py | Python | test/tests/test_dcp1/test_single_file_to_single_dir.py | sjtbham/mpifileutils | 4ec784108d066abe5060ebb197c1dba83e88bd7d | [
"BSD-3-Clause"
] | 97 | 2016-10-10T20:25:27.000Z | 2021-10-04T15:47:35.000Z | test/tests/test_dcp1/test_single_file_to_single_dir.py | sjtbham/mpifileutils | 4ec784108d066abe5060ebb197c1dba83e88bd7d | [
"BSD-3-Clause"
] | 389 | 2016-10-10T17:44:05.000Z | 2022-03-25T09:54:15.000Z | test/tests/test_dcp1/test_single_file_to_single_dir.py | sjtbham/mpifileutils | 4ec784108d066abe5060ebb197c1dba83e88bd7d | [
"BSD-3-Clause"
] | 39 | 2016-11-21T18:35:42.000Z | 2022-03-03T05:21:45.000Z | #!/usr/bin/env python2
from subprocess import call
def test_dcp1_single_file_to_single_dir():
rc = call("~/mpifileutils/test/legacy/dcp1_tests/test_dcp1_single_file_to_single_dir/test.sh", shell=True)
| 35 | 114 | 0.790476 |
acfd89545e3581ea39c1c1699c03353453ef4279 | 4,375 | py | Python | hw4/code/test_autoencoder_noisy.py | stegnerw/intelligent_systems | 46f70dd598666d5236773b137a268075105281a8 | [
"MIT"
] | null | null | null | hw4/code/test_autoencoder_noisy.py | stegnerw/intelligent_systems | 46f70dd598666d5236773b137a268075105281a8 | [
"MIT"
] | 1 | 2021-02-27T13:32:26.000Z | 2021-02-27T13:32:26.000Z | hw4/code/test_autoencoder_noisy.py | stegnerw/intelligent_systems | 46f70dd598666d5236773b137a268075105281a8 | [
"MIT"
] | null | null | null | ###############################################################################
# Imports
###############################################################################
# Custom imports
from autoencoder import Autoencoder
from settings import *
# External imports
import numpy as np
import pathlib
import matpl... | 33.143939 | 94 | 0.642743 |
acfd8aba19d1cc5b5a0f4bbe835815c1f6f45664 | 3,361 | py | Python | src/cfnlint/formatters/__init__.py | obobrova/cfn-python-lint | 42c0cd89577a39e903e5ef8a337926cc7ff6822c | [
"MIT-0"
] | null | null | null | src/cfnlint/formatters/__init__.py | obobrova/cfn-python-lint | 42c0cd89577a39e903e5ef8a337926cc7ff6822c | [
"MIT-0"
] | 1 | 2020-04-15T16:36:10.000Z | 2020-04-15T16:36:10.000Z | src/cfnlint/formatters/__init__.py | obobrova/cfn-python-lint | 42c0cd89577a39e903e5ef8a337926cc7ff6822c | [
"MIT-0"
] | 1 | 2020-01-05T01:05:55.000Z | 2020-01-05T01:05:55.000Z | """
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""
import json
from cfnlint.rules import Match
class BaseFormatter(object):
"""Base Formatter class"""
def _format(self, match):
"""Format the specific match"""
def print_matches(self, mat... | 28.483051 | 71 | 0.479917 |
acfd8b9451b6f9e95644104e088d6b47fd3131a3 | 3,042 | py | Python | try.py | jlarrieux/CryptoPriceLambdaCommons | 8b0cfb00c596125be49788f2d3567b78c4153dc7 | [
"Apache-2.0"
] | null | null | null | try.py | jlarrieux/CryptoPriceLambdaCommons | 8b0cfb00c596125be49788f2d3567b78c4153dc7 | [
"Apache-2.0"
] | null | null | null | try.py | jlarrieux/CryptoPriceLambdaCommons | 8b0cfb00c596125be49788f2d3567b78c4153dc7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 33.8 | 196 | 0.707101 |
acfd8d263d6ba73027264a6efe84c311a5edab2c | 5,684 | py | Python | storyboard/api/v1/validations.py | Sitcode-Zoograf/storyboard | 5833f87e20722c524a1e4a0b8e1fb82206fb4e5c | [
"Apache-2.0"
] | null | null | null | storyboard/api/v1/validations.py | Sitcode-Zoograf/storyboard | 5833f87e20722c524a1e4a0b8e1fb82206fb4e5c | [
"Apache-2.0"
] | null | null | null | storyboard/api/v1/validations.py | Sitcode-Zoograf/storyboard | 5833f87e20722c524a1e4a0b8e1fb82206fb4e5c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 27.326923 | 71 | 0.613476 |
acfd8d595924a541972df94e11a6b45f843311c8 | 64,824 | py | Python | edb/server/server.py | Xen0byte/edgedb | 9d8e020503793609547ffa0455e6c2fd8dff5a4d | [
"Apache-2.0"
] | null | null | null | edb/server/server.py | Xen0byte/edgedb | 9d8e020503793609547ffa0455e6c2fd8dff5a4d | [
"Apache-2.0"
] | null | null | null | edb/server/server.py | Xen0byte/edgedb | 9d8e020503793609547ffa0455e6c2fd8dff5a4d | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2016-present MagicStack Inc. and the EdgeDB authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http... | 35.853982 | 79 | 0.584274 |
acfd8e119d81eb59ad75842370d40be24705decb | 1,293 | py | Python | sickbeard/lib/guessit/transfo/guess_website.py | Branlala/docker-sickbeardfr | 3ac85092dc4cc8a4171fb3c83e9682162245e13e | [
"MIT"
] | null | null | null | sickbeard/lib/guessit/transfo/guess_website.py | Branlala/docker-sickbeardfr | 3ac85092dc4cc8a4171fb3c83e9682162245e13e | [
"MIT"
] | null | null | null | sickbeard/lib/guessit/transfo/guess_website.py | Branlala/docker-sickbeardfr | 3ac85092dc4cc8a4171fb3c83e9682162245e13e | [
"MIT"
] | 1 | 2021-08-29T18:32:43.000Z | 2021-08-29T18:32:43.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2012 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free ... | 32.325 | 74 | 0.730085 |
acfd8e9997ee375d26d5da554edcb26dbc670e3e | 4,172 | py | Python | tests/core/cmds/test_wallet.py | Chinilla/chinilla-blockchain | 59bebcf94e65b74fbb53ad4929bbd79cb28be619 | [
"Apache-2.0"
] | null | null | null | tests/core/cmds/test_wallet.py | Chinilla/chinilla-blockchain | 59bebcf94e65b74fbb53ad4929bbd79cb28be619 | [
"Apache-2.0"
] | null | null | null | tests/core/cmds/test_wallet.py | Chinilla/chinilla-blockchain | 59bebcf94e65b74fbb53ad4929bbd79cb28be619 | [
"Apache-2.0"
] | null | null | null | from typing import Any, Dict, Optional, Tuple
import pytest
from chinilla.cmds.wallet_funcs import print_offer_summary
from chinilla.types.blockchain_format.sized_bytes import bytes32
from chinilla.util.ints import uint32
TEST_DUCKSAUCE_ASSET_ID = "1000000000000000000000000000000000000000000000000000000000000001"
TE... | 33.376 | 110 | 0.740892 |
acfd8f25c4b55f44802663c5a6f903b61d51f5cc | 70,259 | py | Python | barista-scan/tools/scancode-toolkit/src/cluecode/copyrights.py | vsurge/barista | 391069988cf77353246c59a55b97dc8622a1128b | [
"Apache-2.0"
] | 55 | 2020-01-25T00:29:01.000Z | 2022-02-04T04:52:35.000Z | barista-scan/tools/scancode-toolkit/src/cluecode/copyrights.py | vsurge/barista | 391069988cf77353246c59a55b97dc8622a1128b | [
"Apache-2.0"
] | 231 | 2020-01-27T21:33:23.000Z | 2022-03-23T21:27:24.000Z | barista-scan/tools/scancode-toolkit/src/cluecode/copyrights.py | vsurge/barista | 391069988cf77353246c59a55b97dc8622a1128b | [
"Apache-2.0"
] | 18 | 2020-01-27T17:14:11.000Z | 2022-03-09T02:33:40.000Z | # -*- coding: utf-8 -*-
#
# Copyright (c) 2018 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
# ScanCode is a trademark of nexB ... | 34.289409 | 175 | 0.583014 |
acfd8fc793c4c17a9556a150ad348425fd43413b | 14,987 | py | Python | global_resources/forms.py | Stephen-X/grumblr-microblogging | a01a22d31d9d4d37bce8acd092880ef2ed3f1e1e | [
"MIT"
] | 1 | 2020-02-19T23:58:41.000Z | 2020-02-19T23:58:41.000Z | global_resources/forms.py | Stephen-X/grumblr-microblogging | a01a22d31d9d4d37bce8acd092880ef2ed3f1e1e | [
"MIT"
] | 7 | 2020-02-11T21:44:51.000Z | 2021-09-07T23:36:39.000Z | global_resources/forms.py | Stephen-X/grumblr-microblogging | a01a22d31d9d4d37bce8acd092880ef2ed3f1e1e | [
"MIT"
] | null | null | null | """
Forms used by the site for validating user input.
Author: Stephen Xie <[redacted]@cmu.edu>
Version: 1.2.0
"""
from django import forms
from django.contrib.auth.models import User
from .models import Message, UserExtended, Comment
class UserLoginForm(forms.Form):
"""
Form for validating user login inform... | 40.179625 | 112 | 0.475746 |
acfd92c46fd4fffe7a4f8fed504480889df0b235 | 1,843 | py | Python | capirca/utils/config.py | google-admin/capirca | 8c9e66456fedb3c0fc1c641dbefc41793e5c68d5 | [
"Apache-2.0"
] | 604 | 2015-08-08T22:44:25.000Z | 2022-03-30T11:51:23.000Z | capirca/utils/config.py | google-admin/capirca | 8c9e66456fedb3c0fc1c641dbefc41793e5c68d5 | [
"Apache-2.0"
] | 213 | 2015-08-04T20:11:22.000Z | 2022-03-30T18:08:15.000Z | capirca/utils/config.py | google-admin/capirca | 8c9e66456fedb3c0fc1c641dbefc41793e5c68d5 | [
"Apache-2.0"
] | 207 | 2015-08-07T10:55:00.000Z | 2022-03-02T17:07:34.000Z | """A module to handle merging file configurations with CLI configs for Capirca."""
import yaml
defaults = {
'base_directory': './policies',
'definitions_directory': './def',
'policy_file': None,
'output_directory': './',
'optimize': False,
'recursive': True,
'debug': False,
'verbose': ... | 23.935065 | 82 | 0.672816 |
acfd936c7df1fe7694735969415fde1fe1aaa882 | 1,102 | py | Python | leetcode/ds_string_longest_substring_without_repeat_chs.py | ngovindaraj/Python | edbcd302533bef81aa0c01e902e6081df58f383c | [
"MIT"
] | null | null | null | leetcode/ds_string_longest_substring_without_repeat_chs.py | ngovindaraj/Python | edbcd302533bef81aa0c01e902e6081df58f383c | [
"MIT"
] | null | null | null | leetcode/ds_string_longest_substring_without_repeat_chs.py | ngovindaraj/Python | edbcd302533bef81aa0c01e902e6081df58f383c | [
"MIT"
] | null | null | null | # @file Longest Substring Without Repeating Characters
# @brief Given a string, find the length of the longest substring without repeating characters.
# https://leetcode.com/problems/longest-substring-without-repeating-characters/
'''
Given a string, find the length of the longest substring without repeating charac... | 26.238095 | 99 | 0.678766 |
acfd940f129269a1a264dc07e4bcb77e0f86171a | 6,360 | py | Python | pybamm/models/full_battery_models/lithium_ion/spme.py | DrSOKane/PyBaMM | 903b4a05ef5a4f91633e990d4aec12c53df723a2 | [
"BSD-3-Clause"
] | null | null | null | pybamm/models/full_battery_models/lithium_ion/spme.py | DrSOKane/PyBaMM | 903b4a05ef5a4f91633e990d4aec12c53df723a2 | [
"BSD-3-Clause"
] | null | null | null | pybamm/models/full_battery_models/lithium_ion/spme.py | DrSOKane/PyBaMM | 903b4a05ef5a4f91633e990d4aec12c53df723a2 | [
"BSD-3-Clause"
] | null | null | null | #
# Single Particle Model with Electrolyte (SPMe)
#
import pybamm
from .base_lithium_ion_model import BaseModel
class SPMe(BaseModel):
"""Single Particle Model with Electrolyte (SPMe) of a lithium-ion battery, from
[1]_.
Parameters
----------
options : dict, optional
A dictionary of optio... | 36.136364 | 88 | 0.609748 |
acfd947c2676d02f09893e2055e48139bc8e635d | 5,796 | py | Python | tests/hazmat/primitives/test_block.py | derwolfe/cryptography | a6112133d6797313ea8fe741daf25178b2abe25c | [
"Apache-2.0"
] | null | null | null | tests/hazmat/primitives/test_block.py | derwolfe/cryptography | a6112133d6797313ea8fe741daf25178b2abe25c | [
"Apache-2.0"
] | null | null | null | tests/hazmat/primitives/test_block.py | derwolfe/cryptography | a6112133d6797313ea8fe741daf25178b2abe25c | [
"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
# distributed under the... | 29.876289 | 71 | 0.61715 |
acfd9532d436f12eda6f151e514a68cafe371f22 | 511 | py | Python | PyMOTW/source/configparser/configparser_read_many.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 1 | 2019-01-04T05:47:50.000Z | 2019-01-04T05:47:50.000Z | PyMOTW/source/configparser/configparser_read_many.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 1 | 2020-07-18T03:52:03.000Z | 2020-07-18T04:18:01.000Z | PyMOTW/source/configparser/configparser_read_many.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 2 | 2021-03-06T04:28:32.000Z | 2021-03-06T04:59:17.000Z | #!/usr/bin/env python3
# encoding: utf-8
#
# Copyright (c) 2010 Doug Hellmann. All rights reserved.
#
"""Reading a configuration file.
"""
#end_pymotw_header
from configparser import ConfigParser
import glob
parser = ConfigParser()
candidates = ['does_not_exist.ini', 'also-does-not-exist.ini',
'simple... | 21.291667 | 62 | 0.704501 |
acfd957b01ce1889601fa7e28d9e177764c1ae9c | 639 | py | Python | api_site/src/api_x/zyt/evas/weixin_pay/entry/commons.py | webee/pay | b48c6892686bf3f9014bb67ed119506e41050d45 | [
"W3C"
] | 1 | 2019-10-14T11:51:49.000Z | 2019-10-14T11:51:49.000Z | api_site/src/api_x/zyt/evas/weixin_pay/entry/commons.py | webee/pay | b48c6892686bf3f9014bb67ed119506e41050d45 | [
"W3C"
] | null | null | null | api_site/src/api_x/zyt/evas/weixin_pay/entry/commons.py | webee/pay | b48c6892686bf3f9014bb67ed119506e41050d45 | [
"W3C"
] | null | null | null | # coding=utf-8
from __future__ import unicode_literals
from functools import wraps
from flask import request
from . import notify_response
from ..api_access import parse_and_verify_request_data
from ...error import *
def parse_and_verify(f):
@wraps(f)
def wrapper(*args, **kwargs):
try:
p... | 26.625 | 76 | 0.679186 |
acfd9583f3d4cfea7ad5f86b1ec241b4f17eaccf | 2,066 | py | Python | openpyxl/chart/tests/test_marker.py | sekcheong/openpyxl | e1ba037f171efa348f75431c35a50de5ca277b78 | [
"MIT"
] | null | null | null | openpyxl/chart/tests/test_marker.py | sekcheong/openpyxl | e1ba037f171efa348f75431c35a50de5ca277b78 | [
"MIT"
] | null | null | null | openpyxl/chart/tests/test_marker.py | sekcheong/openpyxl | e1ba037f171efa348f75431c35a50de5ca277b78 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
# Copyright (c) 2010-2017 openpyxl
import pytest
from openpyxl.xml.functions import fromstring, tostring
from openpyxl.tests.helper import compare_xml
@pytest.fixture
def Marker():
from ..marker import Marker
return Marker
class TestMarker:
def test_ctor(self, Ma... | 23.747126 | 84 | 0.521297 |
acfd95aa9698e7a67c0c93b65ff798489551f2d7 | 1,102 | py | Python | find.py | wesselb/catalogue | 88790504dcee8505f60efe559fd75fa81a948b60 | [
"MIT"
] | null | null | null | find.py | wesselb/catalogue | 88790504dcee8505f60efe559fd75fa81a948b60 | [
"MIT"
] | null | null | null | find.py | wesselb/catalogue | 88790504dcee8505f60efe559fd75fa81a948b60 | [
"MIT"
] | 1 | 2018-10-25T17:41:01.000Z | 2018-10-25T17:41:01.000Z | import argparse
import catalogue.alfred
import catalogue.bin
import catalogue.utils
from config import config
def main(args):
query = " ".join(args.query)
if args.json:
extensions = [".json"]
else:
extensions = [".pdf", ".djvu", ".epub"]
if args.content:
files = catalogue.bin.... | 30.611111 | 86 | 0.65608 |
acfd96165ec9ddcf4f3f3500c8c461da5f03c6a7 | 828 | py | Python | BlogProject/blog/models.py | ninninninja/Blog_DjangoDRF | aa88c1dfe5a3bc0f79f366b3a10172c44df5ddd3 | [
"MIT"
] | null | null | null | BlogProject/blog/models.py | ninninninja/Blog_DjangoDRF | aa88c1dfe5a3bc0f79f366b3a10172c44df5ddd3 | [
"MIT"
] | null | null | null | BlogProject/blog/models.py | ninninninja/Blog_DjangoDRF | aa88c1dfe5a3bc0f79f366b3a10172c44df5ddd3 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Article(models.Model):
title = models.CharField(max_length = 100)
content = models.TextField()
tag = models.CharField(max_length = 50)
created = models.DateTimeField(auto_now_add=True)
modified = models.DateTimeField(auto_now=True)
i... | 33.12 | 68 | 0.68599 |
acfd9635453d707d7b9fc7a094e95edebbf6568d | 26 | py | Python | exercises/tournament/tournament.py | RJTK/python | f9678d629735f75354bbd543eb7f10220a498dae | [
"MIT"
] | 1 | 2021-05-15T19:59:04.000Z | 2021-05-15T19:59:04.000Z | exercises/tournament/tournament.py | RJTK/python | f9678d629735f75354bbd543eb7f10220a498dae | [
"MIT"
] | null | null | null | exercises/tournament/tournament.py | RJTK/python | f9678d629735f75354bbd543eb7f10220a498dae | [
"MIT"
] | 2 | 2018-03-03T08:32:12.000Z | 2019-08-22T11:55:53.000Z | def tally(data):
pass
| 8.666667 | 16 | 0.615385 |
acfd9783fb68ee4838ee17adb0e20e29b67c7799 | 7,739 | py | Python | training.py | peekarboo/LongShortTermMemory-Prediction | 267d7940054232b69a1202d9652859d107876b62 | [
"Apache-2.0"
] | null | null | null | training.py | peekarboo/LongShortTermMemory-Prediction | 267d7940054232b69a1202d9652859d107876b62 | [
"Apache-2.0"
] | null | null | null | training.py | peekarboo/LongShortTermMemory-Prediction | 267d7940054232b69a1202d9652859d107876b62 | [
"Apache-2.0"
] | null | null | null | #Tutorial used from https://www.thepythoncode.com/article/stock-price-prediction-in-python-using-tensorflow-2-and-keras
from tensorflow.keras.callbacks import ModelCheckpoint, TensorBoard
import os
import time
import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import LST... | 37.75122 | 187 | 0.615583 |
acfd980f5f7a53ee0918684d518e567a9ef562d1 | 1,309 | py | Python | Django/02-Object-Relational-Mapping/query_spanning_relationships/read_course_instructors.py | mustafa-sarshar/Python-DBMS | 64afce1d3b4c1ef41de792c45b6d69095e234f10 | [
"MIT"
] | null | null | null | Django/02-Object-Relational-Mapping/query_spanning_relationships/read_course_instructors.py | mustafa-sarshar/Python-DBMS | 64afce1d3b4c1ef41de792c45b6d69095e234f10 | [
"MIT"
] | null | null | null | Django/02-Object-Relational-Mapping/query_spanning_relationships/read_course_instructors.py | mustafa-sarshar/Python-DBMS | 64afce1d3b4c1ef41de792c45b6d69095e234f10 | [
"MIT"
] | null | null | null | # Django specific settings
import inspect
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "query_spanning_relationships.settings")
from django.db import connection
# Ensure settings are read
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
from related_objects.models imp... | 35.378378 | 91 | 0.7945 |
acfd9845acbdb8f6f2ea16ab41d9947413a07b99 | 3,422 | py | Python | test/functional/wallet_keypool.py | blockchaintrainer/Gath3r | ae48e710f97a63a9f5bc0d57ad80fdeea38fcbd1 | [
"MIT"
] | null | null | null | test/functional/wallet_keypool.py | blockchaintrainer/Gath3r | ae48e710f97a63a9f5bc0d57ad80fdeea38fcbd1 | [
"MIT"
] | null | null | null | test/functional/wallet_keypool.py | blockchaintrainer/Gath3r | ae48e710f97a63a9f5bc0d57ad80fdeea38fcbd1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The Gthpcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet keypool and interaction with wallet encryption/locking."""
import time
from test_fra... | 39.333333 | 119 | 0.668907 |
acfd9877ad50848ffe7db5de89d14c94f8ba7913 | 7,862 | py | Python | lib/layers.py | Alexab/3D_multiview_reg | c39a97391828ca0c4833c83367be92c1fb3c9950 | [
"MIT"
] | 275 | 2020-01-15T02:33:34.000Z | 2022-03-28T08:16:58.000Z | lib/layers.py | dj-boy/3D_multiview_reg | 22468adadfccaffe92c6d88a4cce42b5b7edb77e | [
"MIT"
] | 20 | 2020-03-15T13:08:35.000Z | 2022-03-17T07:59:52.000Z | lib/layers.py | dj-boy/3D_multiview_reg | 22468adadfccaffe92c6d88a4cce42b5b7edb77e | [
"MIT"
] | 47 | 2020-01-19T08:58:52.000Z | 2022-03-25T04:21:51.000Z | import torch
import torch.nn.functional as F
import numpy as np
import time
from sklearn.neighbors import NearestNeighbors
from lib.utils import extract_mutuals, pairwise_distance, knn_point
#from Pointnet2_PyTorch.pointnet2_ops_lib.pointnet2_ops import pointnet2_utils
class Soft_NN(torch.nn.Module):
"... | 36.738318 | 143 | 0.605444 |
acfd988a77c938ef38dfccad5452836b87c457f9 | 9,731 | py | Python | lcfcn/networks.py | AliKhoda/LCFCN | f1bf0752a92fde824d6fb70e88c443890cdb51f8 | [
"Apache-2.0"
] | 170 | 2018-10-28T07:04:49.000Z | 2022-03-08T12:14:12.000Z | lcfcn/networks.py | AliKhoda/LCFCN | f1bf0752a92fde824d6fb70e88c443890cdb51f8 | [
"Apache-2.0"
] | 44 | 2019-01-16T11:05:39.000Z | 2022-02-21T15:37:49.000Z | lcfcn/networks.py | AliKhoda/LCFCN | f1bf0752a92fde824d6fb70e88c443890cdb51f8 | [
"Apache-2.0"
] | 46 | 2018-11-09T04:34:22.000Z | 2022-02-22T14:06:21.000Z |
import torch.nn as nn
import torch
import numpy as np
import torchvision
import torch.utils.model_zoo as model_zoo
class FCN8_VGG16(nn.Module):
def __init__(self, n_classes):
super().__init__()
self.n_classes = n_classes
# PREDEFINE LAYERS
self.pool = nn.MaxPool2d(kernel_size=2, s... | 38.011719 | 102 | 0.559757 |
acfd99696c400e968e09a9372e373c8bb6f82047 | 5,345 | py | Python | dev/tools/leveleditor/direct/showbase/ObjectPool.py | CrankySupertoon01/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2021-02-13T22:40:50.000Z | 2021-02-13T22:40:50.000Z | dev/tools/leveleditor/direct/showbase/ObjectPool.py | CrankySupertoonArchive/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | dev/tools/leveleditor/direct/showbase/ObjectPool.py | CrankySupertoonArchive/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 2 | 2019-12-02T01:39:10.000Z | 2021-02-13T22:41:00.000Z | """Undocumented Module"""
__all__ = ['Diff', 'ObjectPool']
from direct.directnotify.DirectNotifyGlobal import directNotify
from direct.showbase.PythonUtil import invertDictLossless, makeList, safeRepr
from direct.showbase.PythonUtil import getNumberedTypedString, getNumberedTypedSortedString
from direct.showbase.Pyth... | 35.633333 | 99 | 0.566137 |
acfd99cf849c3bfc3fc17053cff20c608ea43c39 | 3,209 | py | Python | src/cudamon.py | djenriquez/cudamon | 1f7d57245065cb0023feb8dbf9d86b775e656147 | [
"MIT"
] | null | null | null | src/cudamon.py | djenriquez/cudamon | 1f7d57245065cb0023feb8dbf9d86b775e656147 | [
"MIT"
] | null | null | null | src/cudamon.py | djenriquez/cudamon | 1f7d57245065cb0023feb8dbf9d86b775e656147 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
import subprocess as sp
import xml.etree.ElementTree as ET
import re
import os
import logging
from src import sns
class CUDAMon:
def __init__(self):
self.gpus = []
self.sns = sns.SNS()
self._get_nvidia_smi()
logging.info('Cards detected: ')
for gpu i... | 36.465909 | 234 | 0.58741 |
acfd9add2f6458fa120c4b0f5546e985a8fef452 | 3,799 | py | Python | peerselect/experiments/exp2.py | ansonkahng16/impartiality | 074b0e7c9a4a906b46a2c550350f536247555064 | [
"BSD-3-Clause-Clear"
] | null | null | null | peerselect/experiments/exp2.py | ansonkahng16/impartiality | 074b0e7c9a4a906b46a2c550350f536247555064 | [
"BSD-3-Clause-Clear"
] | null | null | null | peerselect/experiments/exp2.py | ansonkahng16/impartiality | 074b0e7c9a4a906b46a2c550350f536247555064 | [
"BSD-3-Clause-Clear"
] | null | null | null | import math
import csv
import numpy as np
import random
# import matplotlib
# import matplotlib.pyplot as plt
import pickle
import re
# hacky path update to import peerselect
import sys
sys.path.insert(0, '/Users/akahng/Dropbox/RESEARCH/Procaccia/17-impartiality/peerselection-master/peerselect')
from peerselect import... | 28.780303 | 136 | 0.706238 |
acfd9be5b233282f0a7b39596b6a11839935a537 | 11,256 | py | Python | src/cogent3/align/pairwise_pogs_numba.py | xingjianleng/cogent3 | a85d08a948f6903e4e04eea8292f588cc0b4907e | [
"BSD-3-Clause"
] | null | null | null | src/cogent3/align/pairwise_pogs_numba.py | xingjianleng/cogent3 | a85d08a948f6903e4e04eea8292f588cc0b4907e | [
"BSD-3-Clause"
] | null | null | null | src/cogent3/align/pairwise_pogs_numba.py | xingjianleng/cogent3 | a85d08a948f6903e4e04eea8292f588cc0b4907e | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from numba import boolean, float64, int64, njit, optional, uint8
from numba.core.types.containers import Tuple
__author__ = "Peter Maxwell"
__copyright__ = "Copyright 2007-2022, The Cogent Project"
__credits__ = ["Peter Maxwell", "Gavin Huttley", "Stephen Ma"]
__license__ = "BSD-3"
__version__ = "... | 33.400593 | 81 | 0.445629 |
acfd9caff446d6bd74ee3d4a2a350c9ffeceb165 | 5,777 | py | Python | webui/gendata.py | xuduo35/StyleFlowPytorch | 4202f1c9b4dcfa355d3ab40b13900e2d969cb1b5 | [
"MIT"
] | 12 | 2021-12-21T05:14:32.000Z | 2022-03-07T09:35:58.000Z | webui/gendata.py | xuduo35/StyleFlowPytorch | 4202f1c9b4dcfa355d3ab40b13900e2d969cb1b5 | [
"MIT"
] | 2 | 2022-01-23T14:24:14.000Z | 2022-02-07T05:37:44.000Z | webui/gendata.py | xuduo35/StyleFlowPytorch | 4202f1c9b4dcfa355d3ab40b13900e2d969cb1b5 | [
"MIT"
] | 1 | 2021-12-30T10:05:06.000Z | 2021-12-30T10:05:06.000Z | import json
import os
import sys
import glob
import pickle
import random
import numpy as np
import cv2 as cv
import torch
from torchvision import transforms
from imageencoder import encoder_init, encode_real_images
from DPR import dpr_init, get_lightvec
from ffhq_dataset.face_alignment import image_align
from ffhq_... | 35.881988 | 95 | 0.59685 |
acfd9d6224c210eacaf302a6fe52d3f29ff0d6b1 | 7,522 | py | Python | python/oneflow/test_utils/oneflow_pytorch_compatiblity/oneflow_pytorch_compatiblity_test.py | felixhao28/oneflow | e558af6ef6c4ed90e4abc7bc1ba895f55795626d | [
"Apache-2.0"
] | null | null | null | python/oneflow/test_utils/oneflow_pytorch_compatiblity/oneflow_pytorch_compatiblity_test.py | felixhao28/oneflow | e558af6ef6c4ed90e4abc7bc1ba895f55795626d | [
"Apache-2.0"
] | null | null | null | python/oneflow/test_utils/oneflow_pytorch_compatiblity/oneflow_pytorch_compatiblity_test.py | felixhao28/oneflow | e558af6ef6c4ed90e4abc7bc1ba895f55795626d | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 29.731225 | 85 | 0.580032 |
acfd9ecaf98fdd1695eb1fbe712f34d1a4f5482d | 13,352 | py | Python | addsvc/py-grpc/addsvc_pb2.py | moul/grpcbin-proto | bca18df4138cc423a9f8513f9c7d5f71f1ea4b35 | [
"MIT"
] | null | null | null | addsvc/py-grpc/addsvc_pb2.py | moul/grpcbin-proto | bca18df4138cc423a9f8513f9c7d5f71f1ea4b35 | [
"MIT"
] | null | null | null | addsvc/py-grpc/addsvc_pb2.py | moul/grpcbin-proto | bca18df4138cc423a9f8513f9c7d5f71f1ea4b35 | [
"MIT"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: addsvc.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflec... | 33.463659 | 604 | 0.716222 |
acfd9f268221118e2a0ff6d5807be9933bc1271e | 11,046 | py | Python | airflow/providers/qubole/operators/qubole.py | bluecolor/airflow | d79e7221de76f01b5cd36c15224b59e8bb451c90 | [
"Apache-2.0"
] | null | null | null | airflow/providers/qubole/operators/qubole.py | bluecolor/airflow | d79e7221de76f01b5cd36c15224b59e8bb451c90 | [
"Apache-2.0"
] | null | null | null | airflow/providers/qubole/operators/qubole.py | bluecolor/airflow | d79e7221de76f01b5cd36c15224b59e8bb451c90 | [
"Apache-2.0"
] | null | null | null | #
# 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... | 45.270492 | 93 | 0.653268 |
acfda028f51726f64ed57b4aa1935bde40aefff2 | 7,037 | py | Python | src/ggrc/migrations/versions/20181029161743_005108819b75_migrate_cycle_task_entry_to_comments.py | j0gurt/ggrc-core | 84662dc85aa8864c907eabe70b8efccf92298a1f | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-01-04T10:55:14.000Z | 2019-01-04T10:55:14.000Z | src/ggrc/migrations/versions/20181029161743_005108819b75_migrate_cycle_task_entry_to_comments.py | j0gurt/ggrc-core | 84662dc85aa8864c907eabe70b8efccf92298a1f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc/migrations/versions/20181029161743_005108819b75_migrate_cycle_task_entry_to_comments.py | j0gurt/ggrc-core | 84662dc85aa8864c907eabe70b8efccf92298a1f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2018 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""
Migrate cycle_task_entry to comments
Create Date: 2018-10-29 16:17:43.979116
"""
# disable Invalid constant name pylint warning for mandatory Alembic variables.
# pylint: disable=invalid-name
from ale... | 26.961686 | 79 | 0.672304 |
acfda02ef920ef7e00fb735274462c21d39540f1 | 1,505 | py | Python | archub/commands/task.py | rfldong/archub | b5bcc67862e37a132e144d8a6cd5e7417a220b24 | [
"Apache-2.0"
] | 1 | 2018-04-20T19:11:29.000Z | 2018-04-20T19:11:29.000Z | archub/commands/task.py | rfldong/archub | b5bcc67862e37a132e144d8a6cd5e7417a220b24 | [
"Apache-2.0"
] | 34 | 2018-03-19T11:48:37.000Z | 2019-03-21T15:55:33.000Z | archub/commands/task.py | rfldong/archub | b5bcc67862e37a132e144d8a6cd5e7417a220b24 | [
"Apache-2.0"
] | null | null | null | import os
import sys
from argparse import ArgumentParser
from archub import cmdline, config
from github import Github
from archub.core import print_issues, print_issues_with_labels
def main(args):
show_all_default = config.GITHUB_REPOSITORY_NAME is None
parser = ArgumentParser(
prog=cmdline.prog(__file... | 38.589744 | 83 | 0.681063 |
acfda0c5d87e4de296a480b685435bbf7604f2e6 | 519 | py | Python | examples/quick_start/minimize_08.py | petuum/tuun | 8eec472dbf0e5e695449b0fa2d98985469fd5b30 | [
"Apache-2.0"
] | 33 | 2020-08-30T16:22:35.000Z | 2022-02-26T13:48:32.000Z | examples/quick_start/minimize_08.py | petuum/tuun | 8eec472dbf0e5e695449b0fa2d98985469fd5b30 | [
"Apache-2.0"
] | 2 | 2021-01-18T19:46:43.000Z | 2021-03-24T09:59:14.000Z | examples/quick_start/minimize_08.py | petuum/tuun | 8eec472dbf0e5e695449b0fa2d98985469fd5b30 | [
"Apache-2.0"
] | 2 | 2020-08-25T17:02:15.000Z | 2021-04-21T16:40:44.000Z | from tuun.main import Tuun
# instantiate Tuun
config = {
'seed': 12,
'acqfunction_config': {'name': 'default', 'acq_str': 'ucb'},
'probo_config': {'normalize_real': True},
}
tu = Tuun(config)
# set search space
search_space = [('real', [-20, 20]), ('real', [-100, 100])]
tu.set_config_from_list(search_spac... | 23.590909 | 64 | 0.633911 |
acfda27a543c2e871d059066752131fa0fdfb4ea | 773 | py | Python | renzongxian/0004/0004.py | saurabh896/python-1 | f8d3aedf4c0fe6e24dfa3269ea7e642c9f7dd9b7 | [
"MIT"
] | 3,976 | 2015-01-01T15:49:39.000Z | 2022-03-31T03:47:56.000Z | renzongxian/0004/0004.py | oyesam7/python-1 | 220734af09fa09a6f615d4f1b4612a0ab75d91d1 | [
"MIT"
] | 97 | 2015-01-11T02:59:46.000Z | 2022-03-16T14:01:56.000Z | renzongxian/0004/0004.py | oyesam7/python-1 | 220734af09fa09a6f615d4f1b4612a0ab75d91d1 | [
"MIT"
] | 3,533 | 2015-01-01T06:19:30.000Z | 2022-03-28T13:14:54.000Z | # Source:https://github.com/Show-Me-the-Code/show-me-the-code
# Author:renzongxian
# Date:2014-12-07
# Python 3.4
"""
第 0004 题:任一个英文的纯文本文件,统计其中的单词出现的个数。
"""
import sys
def word_count(file_path):
file_object = open(file_path, 'r')
word_num = 0
for line in file_object:
line_list = line.split()
... | 20.891892 | 87 | 0.595084 |
acfda2b561a5a0e57a3e190664ab3e2a3845ea04 | 61 | py | Python | src/utils/__init__.py | Ursidours/pythonic_interviews | a88e10b82ed2a163dfcc0bfd1d01a9e9e606c045 | [
"MIT"
] | 2 | 2021-11-13T01:30:25.000Z | 2022-02-11T18:17:22.000Z | src/utils/__init__.py | arnaudblois/pythonic_interviews | a88e10b82ed2a163dfcc0bfd1d01a9e9e606c045 | [
"MIT"
] | null | null | null | src/utils/__init__.py | arnaudblois/pythonic_interviews | a88e10b82ed2a163dfcc0bfd1d01a9e9e606c045 | [
"MIT"
] | null | null | null | """
Package containing useful functions, decorators, etc
"""
| 15.25 | 52 | 0.737705 |
acfda3e4c6881e50a15a8e2ba143f7802e04ef53 | 137 | py | Python | ibm_mq/datadog_checks/ibm_mq/__about__.py | tzach/integrations-core | ac9daf60630bea4739947fe1d8df72c20bfcbc22 | [
"BSD-3-Clause"
] | null | null | null | ibm_mq/datadog_checks/ibm_mq/__about__.py | tzach/integrations-core | ac9daf60630bea4739947fe1d8df72c20bfcbc22 | [
"BSD-3-Clause"
] | null | null | null | ibm_mq/datadog_checks/ibm_mq/__about__.py | tzach/integrations-core | ac9daf60630bea4739947fe1d8df72c20bfcbc22 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
__version__ = '3.3.1'
| 27.4 | 59 | 0.722628 |
acfda441f79d5b98534fa7c7bec9a260355d8dbb | 3,696 | py | Python | test_iu.py | doheelab/stylegan2 | 76964cc73b8f05af1747f103107d0a3e278a8c5b | [
"BSD-Source-Code"
] | null | null | null | test_iu.py | doheelab/stylegan2 | 76964cc73b8f05af1747f103107d0a3e278a8c5b | [
"BSD-Source-Code"
] | null | null | null | test_iu.py | doheelab/stylegan2 | 76964cc73b8f05af1747f103107d0a3e278a8c5b | [
"BSD-Source-Code"
] | null | null | null | # -*- coding: utf-8 -*-
"""Toonify yourself의 빵형
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1WyUoMjpiTyOWt52KgwCBhzY1itDhUgvF
# Toonify yourself!
Please ensure that you're using a GPU runtime
First some setup:
"""
# Commented out IPython magic to en... | 36.594059 | 313 | 0.763528 |
acfda46d6b1f9588a0d3c11c731197b2c9ec92b4 | 1,033 | py | Python | collector/img_converter.py | Dalci/mini-line-tracer | d4cb159f9e097212cd65b3aa00ff3806d39df518 | [
"MIT"
] | null | null | null | collector/img_converter.py | Dalci/mini-line-tracer | d4cb159f9e097212cd65b3aa00ff3806d39df518 | [
"MIT"
] | null | null | null | collector/img_converter.py | Dalci/mini-line-tracer | d4cb159f9e097212cd65b3aa00ff3806d39df518 | [
"MIT"
] | null | null | null | import numpy as np
import pickle
import cv2
import os
def convert_img(img):
# thresholding
threshold = int(np.mean(img)) * 0.5
ret, cvtd_img = cv2.threshold(img.astype(np.uint8), threshold, 255, cv2.THRESH_BINARY_INV)
print(ret)
converted_image = cv2.resize(cvtd_img, (16,16), interpolation=cv2.I... | 25.825 | 94 | 0.656341 |
acfda4b5a4856f3d39ae0d257c0a1ad9995e178f | 85 | py | Python | rllab/train/base.py | TomorrowIsAnOtherDay/RLlab | 9749a8e4f8eb0c6c0ade19622cee3bd8a82c76a9 | [
"Apache-2.0"
] | null | null | null | rllab/train/base.py | TomorrowIsAnOtherDay/RLlab | 9749a8e4f8eb0c6c0ade19622cee3bd8a82c76a9 | [
"Apache-2.0"
] | null | null | null | rllab/train/base.py | TomorrowIsAnOtherDay/RLlab | 9749a8e4f8eb0c6c0ade19622cee3bd8a82c76a9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf8
# File: base.py
import functools32 as functools
| 14.166667 | 31 | 0.741176 |
acfda521dd431fdbb1ba7cc642e3efe32f88a49c | 972 | py | Python | sigcom/ingest/mongo/mongo_entities_meta_jsonld.py | dcic/signature-commons-controller | b69c4063235d927da27891e8a30d2822c6768a66 | [
"Apache-2.0"
] | null | null | null | sigcom/ingest/mongo/mongo_entities_meta_jsonld.py | dcic/signature-commons-controller | b69c4063235d927da27891e8a30d2822c6768a66 | [
"Apache-2.0"
] | 2 | 2020-06-09T14:52:34.000Z | 2020-11-06T18:02:49.000Z | sigcom/ingest/mongo/mongo_entities_meta_jsonld.py | dcic/signature-commons-controller | b69c4063235d927da27891e8a30d2822c6768a66 | [
"Apache-2.0"
] | null | null | null | import os
import pymongo
import json
from sigcom.util import first, mongo_bulk_upsert
inputs = (
'*.entities.jsonld',
)
def requirements(uri=[], **kwargs):
return 'mongodb' in set([u.scheme for u in uri])
def ingest(input_files, uri=[], limit=1000, **kawrgs):
input_file, = input_files
# Get mongo uri
mongo... | 23.142857 | 71 | 0.605967 |
acfda532e4b65c25bda34647c4f8723cab542ece | 1,072 | py | Python | tests/test_system.py | srobo-legacy/comp-poltergeist | 15a3605257246455152ea1d4d0281329269c06f2 | [
"MIT"
] | null | null | null | tests/test_system.py | srobo-legacy/comp-poltergeist | 15a3605257246455152ea1d4d0281329269c06f2 | [
"MIT"
] | null | null | null | tests/test_system.py | srobo-legacy/comp-poltergeist | 15a3605257246455152ea1d4d0281329269c06f2 | [
"MIT"
] | null | null | null |
import os.path
import subprocess
import yaml
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def setup_module():
""" Start redis """
subprocess.call([os.path.join(ROOT, 'start-redis')])
def teardown_module():
""" Stop redis """
subprocess.call([os.path.join(ROOT, 'stop-redis')])
... | 25.52381 | 66 | 0.669776 |
acfda5f28bc6abdd9d1474c9a7a27a87cdac0cf8 | 2,509 | py | Python | documentation_tools/build_documentation.py | uliwitness/HexFiend | b7fc8642f9076bbfe1e2dc0cb23a38fca982fc45 | [
"BSD-2-Clause"
] | null | null | null | documentation_tools/build_documentation.py | uliwitness/HexFiend | b7fc8642f9076bbfe1e2dc0cb23a38fca982fc45 | [
"BSD-2-Clause"
] | null | null | null | documentation_tools/build_documentation.py | uliwitness/HexFiend | b7fc8642f9076bbfe1e2dc0cb23a38fca982fc45 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
import sys, os, subprocess, distutils.spawn, shutil
env = os.getenv
norm = os.path.normpath
built_products_dir = env("BUILT_PRODUCTS_DIR")
if built_products_dir == None:
print "Environmental variable BUILT_PRODUCTS_DIR is missing. This script should be run from within Xcode."
sys.exit(1... | 33.905405 | 110 | 0.736548 |
acfda6393b7733d34a8d2011bda3f270a5998bb3 | 377 | py | Python | timepiece/manager/migrations/0002_profile_payroll.py | mgeorge8/django_time | f75a442941b0ebbb6cc46a6d18e42b91695b7e57 | [
"MIT"
] | 1 | 2018-11-09T02:09:14.000Z | 2018-11-09T02:09:14.000Z | timepiece/manager/migrations/0002_profile_payroll.py | mgeorge8/django_time | f75a442941b0ebbb6cc46a6d18e42b91695b7e57 | [
"MIT"
] | null | null | null | timepiece/manager/migrations/0002_profile_payroll.py | mgeorge8/django_time | f75a442941b0ebbb6cc46a6d18e42b91695b7e57 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.2 on 2019-01-17 12:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('manager', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='profile',
name='payroll',
f... | 19.842105 | 52 | 0.588859 |
acfda647565df219e5179b9468ee304ba893cb87 | 2,056 | py | Python | ocr/save_nparrays.py | Mohamed209/Train-CRNN | 6d2fe08d3bc43494158c732dc5997a951aef18c9 | [
"MIT"
] | 1 | 2020-06-29T19:39:15.000Z | 2020-06-29T19:39:15.000Z | ocr/save_nparrays.py | Mohamed209/Train-CRNN | 6d2fe08d3bc43494158c732dc5997a951aef18c9 | [
"MIT"
] | 6 | 2020-09-25T22:41:28.000Z | 2022-02-09T23:38:46.000Z | ocr/save_nparrays.py | Mohamed209/Train-CRNN | 6d2fe08d3bc43494158c732dc5997a951aef18c9 | [
"MIT"
] | null | null | null | from keras.preprocessing.sequence import pad_sequences
import numpy as np
import h5py
import cv2
import os
import string
import pyarabic.araby as araby
import sys
# utils
letters = u'٠١٢٣٤٥٦٧٨٩'+'0123456789'
def labels_to_text(labels):
return ''.join(list(map(lambda x: letters[int(x)], labels)))
def text_to_lab... | 28.555556 | 110 | 0.668774 |
acfda64a97d758bf0ee7a8fc45284720ce50b6fd | 611 | py | Python | src/niweb/apps/nerds/migrations/0001_initial.py | emjemj/ni | a78e6d97d1e4610aad7698c4f0f459221c680b4f | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2018-12-21T09:35:27.000Z | 2019-07-31T18:51:58.000Z | src/niweb/apps/nerds/migrations/0001_initial.py | emjemj/ni | a78e6d97d1e4610aad7698c4f0f459221c680b4f | [
"BSD-2-Clause-FreeBSD"
] | 6 | 2019-07-25T07:10:23.000Z | 2021-02-08T09:58:57.000Z | src/niweb/apps/nerds/migrations/0001_initial.py | emjemj/ni | a78e6d97d1e4610aad7698c4f0f459221c680b4f | [
"BSD-2-Clause-FreeBSD"
] | 5 | 2019-02-06T12:00:26.000Z | 2021-11-19T14:48:06.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('noclook', '0002_nodetype_hidden'),
]
operations = [
migrations.CreateModel(
name='HostUserMap',
field... | 27.772727 | 114 | 0.590835 |
acfda65ed402b428c90c45c3710d73821c7014fe | 814 | py | Python | students/k3340/practical_works/Bakirova_Shoola/PW1-3/django_project/urls.py | BakirovaS/ITMO_ICT_WebProgramming_2020 | 2de0ec900e729a22112fd8827fb685ce90ae8a9b | [
"MIT"
] | null | null | null | students/k3340/practical_works/Bakirova_Shoola/PW1-3/django_project/urls.py | BakirovaS/ITMO_ICT_WebProgramming_2020 | 2de0ec900e729a22112fd8827fb685ce90ae8a9b | [
"MIT"
] | null | null | null | students/k3340/practical_works/Bakirova_Shoola/PW1-3/django_project/urls.py | BakirovaS/ITMO_ICT_WebProgramming_2020 | 2de0ec900e729a22112fd8827fb685ce90ae8a9b | [
"MIT"
] | null | null | null | """django_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Clas... | 35.391304 | 77 | 0.708845 |
acfda6f8c059e3546f97f546bfc26f2021a372db | 40,522 | py | Python | sklearn/ensemble/_bagging.py | lacouth/scikit-learn | d44c7ae8eb164ebf563f16301e67c519c54cb119 | [
"BSD-3-Clause"
] | null | null | null | sklearn/ensemble/_bagging.py | lacouth/scikit-learn | d44c7ae8eb164ebf563f16301e67c519c54cb119 | [
"BSD-3-Clause"
] | null | null | null | sklearn/ensemble/_bagging.py | lacouth/scikit-learn | d44c7ae8eb164ebf563f16301e67c519c54cb119 | [
"BSD-3-Clause"
] | null | null | null | """Bagging meta-estimator."""
# Author: Gilles Louppe <g.louppe@gmail.com>
# License: BSD 3 clause
import itertools
import numbers
import numpy as np
from abc import ABCMeta, abstractmethod
from warnings import warn
from joblib import Parallel
from ._base import BaseEnsemble, _partition_estimators
from ..base impo... | 34.993092 | 88 | 0.624253 |
acfda8bb598896a9ab9a025b66c0079dcc96e608 | 3,586 | py | Python | utils/user_functions.py | aragilar/NewsBlur | 64ecd83bf4cea175f1bdeeb6e475fd5cadb679c9 | [
"MIT"
] | 2 | 2015-09-05T10:40:30.000Z | 2017-03-05T12:31:21.000Z | utils/user_functions.py | aragilar/NewsBlur | 64ecd83bf4cea175f1bdeeb6e475fd5cadb679c9 | [
"MIT"
] | null | null | null | utils/user_functions.py | aragilar/NewsBlur | 64ecd83bf4cea175f1bdeeb6e475fd5cadb679c9 | [
"MIT"
] | null | null | null | import hashlib
from django.contrib.auth.models import User
from django.core.cache import cache
from django.utils.http import urlquote
from django.http import HttpResponseForbidden
from django.conf import settings
def ajax_login_required(function=None):
def _dec(view_func):
def _view(request, *args, **kwarg... | 30.649573 | 79 | 0.604852 |
acfda8df889e1d6c4f0e3a3f2bc9010e2e9780c3 | 21,733 | py | Python | rfa_toolbox/graphs.py | MLRichter/receptive_field_analysis_toolbox | 308c86ceb350925050ba3cad4931af09e36782ef | [
"MIT"
] | 77 | 2022-01-10T19:46:52.000Z | 2022-03-22T11:03:22.000Z | rfa_toolbox/graphs.py | MLRichter/receptive_field_analysis_toolbox | 308c86ceb350925050ba3cad4931af09e36782ef | [
"MIT"
] | 37 | 2021-12-10T19:08:31.000Z | 2022-03-29T04:13:24.000Z | rfa_toolbox/graphs.py | MLRichter/receptive_field_analysis_toolbox | 308c86ceb350925050ba3cad4931af09e36782ef | [
"MIT"
] | 4 | 2022-01-11T07:37:21.000Z | 2022-01-14T09:05:30.000Z | from operator import attrgetter
from typing import Any, Callable, Dict, List, Optional, Sequence, Set, Tuple, Union
import numpy as np
from attr import attrib, attrs
from rfa_toolbox.domain import Layer, Node
def receptive_field_provider_with_1x1_handling(
node: "EnrichedNetworkNode",
) -> Optional[int]:
""... | 36.649241 | 90 | 0.611558 |
acfda95c46e1346dfcc28d340e4ff72cece18afb | 3,104 | py | Python | maml_rl/policies/normal_mlp_a2c.py | YingyingF/pytorch-maml-rl | b0b5e27ac8e136ddfeffd8cbaa707c7ea529f6b6 | [
"MIT"
] | null | null | null | maml_rl/policies/normal_mlp_a2c.py | YingyingF/pytorch-maml-rl | b0b5e27ac8e136ddfeffd8cbaa707c7ea529f6b6 | [
"MIT"
] | null | null | null | maml_rl/policies/normal_mlp_a2c.py | YingyingF/pytorch-maml-rl | b0b5e27ac8e136ddfeffd8cbaa707c7ea529f6b6 | [
"MIT"
] | 1 | 2018-12-02T22:36:36.000Z | 2018-12-02T22:36:36.000Z | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions import Normal
from collections import OrderedDict
from maml_rl.policies.policy import Policy, weight_init
class NormalMLPPolicyA2C(Policy):
"""Policy network based on a multi-layer perceptron (MLP), w... | 47.030303 | 152 | 0.645941 |
acfdab66cb4596a032ae06a2a70da159e1e54a9d | 20,224 | py | Python | src/rez/utils/filesystem.py | alexey-pelykh/rez | ad12105d89d658e4d2ea9249e537b3de90391f0e | [
"Apache-2.0"
] | null | null | null | src/rez/utils/filesystem.py | alexey-pelykh/rez | ad12105d89d658e4d2ea9249e537b3de90391f0e | [
"Apache-2.0"
] | null | null | null | src/rez/utils/filesystem.py | alexey-pelykh/rez | ad12105d89d658e4d2ea9249e537b3de90391f0e | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the Rez Project
"""
Filesystem-related utilities.
"""
from __future__ import print_function
from threading import Lock
from tempfile import mkdtemp
from contextlib import contextmanager
from uuid import uuid4
import errno
import weakref
import atexit
... | 28.891429 | 114 | 0.606705 |
acfdac5451f4a4b5b09c15a64f0601973e0001d2 | 588,360 | py | Python | sdk/python/pulumi_azure_native/network/v20190401/outputs.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_native/network/v20190401/outputs.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_native/network/v20190401/outputs.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 39.978256 | 395 | 0.651487 |
acfdad40e3f9dacf1de63ecfbdeea32fb76faca3 | 4,318 | py | Python | RUN_FILES/prepare_data/48AE/prepare_train_data_48AE.py | yifding/W2NER | d13128e45f3930a8b8faa794318939dc90a75974 | [
"MIT"
] | null | null | null | RUN_FILES/prepare_data/48AE/prepare_train_data_48AE.py | yifding/W2NER | d13128e45f3930a8b8faa794318939dc90a75974 | [
"MIT"
] | null | null | null | RUN_FILES/prepare_data/48AE/prepare_train_data_48AE.py | yifding/W2NER | d13128e45f3930a8b8faa794318939dc90a75974 | [
"MIT"
] | null | null | null | import os
import random
import argparse
import jsonlines
from functools import partial
from tqdm.contrib.concurrent import process_map
from tqdm import tqdm
random.seed(19940802)
def process_instance(instance, max_span_length=5, max_seq_length=300):
asin = instance.get('asin', '')
product_type = instance.get... | 29.986111 | 505 | 0.635248 |
acfdadfb81f369c78c783f1b32400870685a6acf | 1,030 | py | Python | coremltools/test/sklearn_tests/test_feature_names.py | LaudateCorpus1/coremltools | 777a4460d6823e5e91dea4fa3eacb0b11c7d5dfc | [
"BSD-3-Clause"
] | 2,740 | 2017-10-03T23:19:01.000Z | 2022-03-30T15:16:39.000Z | coremltools/test/sklearn_tests/test_feature_names.py | LaudateCorpus1/coremltools | 777a4460d6823e5e91dea4fa3eacb0b11c7d5dfc | [
"BSD-3-Clause"
] | 1,057 | 2017-10-05T22:47:01.000Z | 2022-03-31T23:51:15.000Z | coremltools/test/sklearn_tests/test_feature_names.py | LaudateCorpus1/coremltools | 777a4460d6823e5e91dea4fa3eacb0b11c7d5dfc | [
"BSD-3-Clause"
] | 510 | 2017-10-04T19:22:28.000Z | 2022-03-31T12:16:52.000Z | # Copyright (c) 2017, Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can be
# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
import coremltools.models._feature_management as fm
import coremltools.models.datatypes as dt
import uni... | 34.333333 | 82 | 0.666019 |
acfdae07c02130338301a5869747a9b6590bdae4 | 1,221 | py | Python | Project_Health/data/data_ready.py | Anonymous633671/STABILIZER | 5a1ab8099a2d75ace7e053afc78055f1f4d359c0 | [
"MIT"
] | null | null | null | Project_Health/data/data_ready.py | Anonymous633671/STABILIZER | 5a1ab8099a2d75ace7e053afc78055f1f4d359c0 | [
"MIT"
] | null | null | null | Project_Health/data/data_ready.py | Anonymous633671/STABILIZER | 5a1ab8099a2d75ace7e053afc78055f1f4d359c0 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from scipy.io.arff import loadarff
import os
def data_github_monthly(repo_name, directory, goal):
df_raw = pd.read_csv(directory + repo_name, sep=',')
df_raw = df_raw.drop(columns=['dates'])
last_col = ''
if goal == 0:
last_col = 'monthly_commits'
eli... | 27.75 | 84 | 0.642916 |
acfdae38abb3d88fb975b97c470029b36e72d226 | 70 | py | Python | py_scripts/times2.py | mtchem/gdi-beginner-py | 7a876b8e07828ed552c61d97b756c1d0f37741ee | [
"MIT"
] | null | null | null | py_scripts/times2.py | mtchem/gdi-beginner-py | 7a876b8e07828ed552c61d97b756c1d0f37741ee | [
"MIT"
] | null | null | null | py_scripts/times2.py | mtchem/gdi-beginner-py | 7a876b8e07828ed552c61d97b756c1d0f37741ee | [
"MIT"
] | null | null | null | print(2+4)
print(7+2)
print(int(15)/float(2.7))
print(int(7.3 + 8.9))
| 14 | 25 | 0.614286 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.