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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9e62071189cac5149112c6297c7ba4cd5f137cfd | 1,677 | py | Python | libs/uix/baseclasses/news.py | mkbeh/CRyptoLab | 424c938c16c9264e99eff71e4c1a27ca65314d42 | [
"MIT"
] | null | null | null | libs/uix/baseclasses/news.py | mkbeh/CRyptoLab | 424c938c16c9264e99eff71e4c1a27ca65314d42 | [
"MIT"
] | 1 | 2021-06-01T22:30:24.000Z | 2021-06-01T22:30:24.000Z | libs/uix/baseclasses/news.py | mkbeh/CRyptoLab | 424c938c16c9264e99eff71e4c1a27ca65314d42 | [
"MIT"
] | 1 | 2021-05-11T23:06:20.000Z | 2021-05-11T23:06:20.000Z | # -*- coding: utf-8 -*-
from kivy.properties import ObjectProperty
from kivy.uix.screenmanager import Screen
from libs.utils import utils
class News(Screen):
bits_media = ObjectProperty()
noname_ = ObjectProperty()
scrl_view = ObjectProperty(None)
ico_list = ObjectProperty(None)
def __init__(sel... | 28.913793 | 100 | 0.586166 |
9e620c5eb71574029f3a0f78381ef8c34204a729 | 21,120 | py | Python | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 45.031983 | 208 | 0.669744 |
9e6241b32c3b2f401be16387e0f9f1e17cebad2a | 748 | py | Python | cap4/sketch2_with.py | leobarros/use_cabeca_python | 4e0897a68fb7ef669ec05eab7cba9412baa0e85e | [
"Apache-2.0"
] | null | null | null | cap4/sketch2_with.py | leobarros/use_cabeca_python | 4e0897a68fb7ef669ec05eab7cba9412baa0e85e | [
"Apache-2.0"
] | null | null | null | cap4/sketch2_with.py | leobarros/use_cabeca_python | 4e0897a68fb7ef669ec05eab7cba9412baa0e85e | [
"Apache-2.0"
] | 1 | 2020-06-02T17:47:22.000Z | 2020-06-02T17:47:22.000Z | #!/usr/bin/python3
# -*- coding:UTF-8 -*-
import os
man = []
other = []
try:
data = open('sketch.txt')
for each_line in data:
try:
(role, line_spoken) = each_line.split(':', 1)
line_spoken = line_spoken.strip()
if role == 'Man':
man.append(line_spok... | 24.129032 | 90 | 0.55615 |
9e624cdb4e9ff69adcf24ddd42b45986cf836cf6 | 766 | py | Python | venv/Scripts/rst2s5.py | diodax/commit-multi-label-classification | 30edb27e6356a66ec7fdfba4d77c2bb6147d63e3 | [
"FTL"
] | null | null | null | venv/Scripts/rst2s5.py | diodax/commit-multi-label-classification | 30edb27e6356a66ec7fdfba4d77c2bb6147d63e3 | [
"FTL"
] | null | null | null | venv/Scripts/rst2s5.py | diodax/commit-multi-label-classification | 30edb27e6356a66ec7fdfba4d77c2bb6147d63e3 | [
"FTL"
] | null | null | null | #!C:\Users\dioda\odrive\RIT - Google Drive\Spring 2019\SWEN 780 Capstone Research Project\commit-multi-label-classification\venv\Scripts\python.exe
# $Id: rst2s5.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: Chris Liechti <cliechti@gmx.net>
# Copyright: This module has been placed in the public domain.
"""
A minim... | 30.64 | 147 | 0.754569 |
9e629503007036c57d604c5edec7297af1e44d6c | 14,172 | py | Python | cogs/Verification.py | jakebacker/Gompei-Bot | dba3b11874ca19c22f170b8a01928af2b3fb2bd8 | [
"MIT"
] | 9 | 2020-02-14T02:07:39.000Z | 2022-01-08T03:25:22.000Z | cogs/Verification.py | jakebacker/Gompei-Bot | dba3b11874ca19c22f170b8a01928af2b3fb2bd8 | [
"MIT"
] | 16 | 2020-02-14T02:10:29.000Z | 2022-02-04T14:50:58.000Z | cogs/Verification.py | jakebacker/Gompei-Bot | dba3b11874ca19c22f170b8a01928af2b3fb2bd8 | [
"MIT"
] | 8 | 2020-02-21T14:28:07.000Z | 2022-02-04T14:49:04.000Z | from cogs.Permissions import administrator_perms, moderator_perms
from GompeiFunctions import time_delta_string
from discord.ext import tasks, commands
from datetime import timedelta
from datetime import datetime
from config import Config
import pytimeparse
import asyncio
import discord
class Verification(commands.... | 42.945455 | 134 | 0.594129 |
9e629f1cca1178a08695c8bff3b12b5133626ae3 | 4,047 | py | Python | loaders/segmentation/train.py | VladimirYugay/SGDepth | ed68e05431ad0131658ee76b8c50142979f859a5 | [
"MIT"
] | null | null | null | loaders/segmentation/train.py | VladimirYugay/SGDepth | ed68e05431ad0131658ee76b8c50142979f859a5 | [
"MIT"
] | null | null | null | loaders/segmentation/train.py | VladimirYugay/SGDepth | ed68e05431ad0131658ee76b8c50142979f859a5 | [
"MIT"
] | null | null | null | from torch.utils.data import DataLoader
from dataloader.pt_data_loader.specialdatasets import StandardDataset
from dataloader.definitions.labels_file import labels_cityscape_seg, labels_motsynth_seg
import dataloader.pt_data_loader.mytransforms as tf
def motsynth_seg_train(resize_height, resize_width, crop_height, c... | 33.725 | 117 | 0.65703 |
9e62a28dc23587f94d754a6a78952b3cc20ee9f5 | 3,379 | py | Python | test/test_utils.py | samtaufa/pry | 155b783351cef5d8c8669bba4484f1a5f159150e | [
"MIT"
] | 1 | 2016-05-09T08:20:56.000Z | 2016-05-09T08:20:56.000Z | test/test_utils.py | samtaufa/pry | 155b783351cef5d8c8669bba4484f1a5f159150e | [
"MIT"
] | null | null | null | test/test_utils.py | samtaufa/pry | 155b783351cef5d8c8669bba4484f1a5f159150e | [
"MIT"
] | null | null | null | import libpry
class uisPathContained(libpry.AutoTree):
def test_isPathContained(self):
assert libpry.utils.isPathContained(".", "./foo.py")
assert libpry.utils.isPathContained("..", ".")
assert not libpry.utils.isPathContained(".", "../foo.py")
assert libpry.utils.isPathContained("... | 33.79 | 84 | 0.563184 |
9e62d4501aba045a07dc1076639c7d03e0248e9d | 71 | py | Python | livechat/reports/__init__.py | livechat/lc-sdk-python | 536483590b9600ef1bc86fe36a1f810368b85a9d | [
"Apache-2.0"
] | 5 | 2021-03-22T19:22:05.000Z | 2022-01-18T13:38:22.000Z | livechat/reports/__init__.py | livechat/lc-sdk-python | 536483590b9600ef1bc86fe36a1f810368b85a9d | [
"Apache-2.0"
] | 5 | 2021-10-05T14:44:33.000Z | 2022-02-16T07:33:51.000Z | livechat/reports/__init__.py | livechat/lc-sdk-python | 536483590b9600ef1bc86fe36a1f810368b85a9d | [
"Apache-2.0"
] | null | null | null | # pylint: disable=C0114
from livechat.reports.client import ReportsApi
| 23.666667 | 46 | 0.830986 |
9e6300478e70e4e3607e29845f04718eb1df331b | 193 | py | Python | terrascript/puppetca/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/puppetca/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/puppetca/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/puppetca/d.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
| 21.444444 | 79 | 0.766839 |
9e6310981337657cdfe517c2094764d529bb1784 | 769 | py | Python | tests/test_e2e.py | SolbiatiAlessandro/xbot | 699428a050c508f545c98e048f24a2a6edb5ea4c | [
"MIT"
] | null | null | null | tests/test_e2e.py | SolbiatiAlessandro/xbot | 699428a050c508f545c98e048f24a2a6edb5ea4c | [
"MIT"
] | null | null | null | tests/test_e2e.py | SolbiatiAlessandro/xbot | 699428a050c508f545c98e048f24a2a6edb5ea4c | [
"MIT"
] | null | null | null | """e2e translation test"""
import xbot
import xbot.__main__
import xbot.constants
def test_e2e__telegram_to_discord():
sourcecode_filename = "./tests/original_code.py"
xbot.translate.translate(sourcecode_filename)
expected_code = ""
with open("./tests/translated_code__expected.py","r") as f:
e... | 24.806452 | 64 | 0.70091 |
9e631496c3c4c12014e5e271ba7558f9c4e59a72 | 3,476 | py | Python | test.py | mazerty/bli | 1bc5c1a7996dc81f9112e01e141afe4f5c58e8f8 | [
"MIT"
] | null | null | null | test.py | mazerty/bli | 1bc5c1a7996dc81f9112e01e141afe4f5c58e8f8 | [
"MIT"
] | null | null | null | test.py | mazerty/bli | 1bc5c1a7996dc81f9112e01e141afe4f5c58e8f8 | [
"MIT"
] | null | null | null | import os.path
import pathlib
import tempfile
import unittest
import prbg
import s3llar
bucket_name = "test.mazerty.fr"
result1 = {("file1", "e382ac6f66df7fb71dae6292810182eb"),
("file2", "260b6f5bf4fdfe7be7cea1737b41e797"),
("file3", "7d5f31ffd43f957a4f4f8982ef65b12d"),
("directory... | 34.76 | 106 | 0.657365 |
9e6318221db0e213519c65c14d88e7a24b8e58ad | 14,553 | py | Python | legislative_act/history.py | Lexparency/lexhost | 71ad624d4ea608294ed40496e44fbdfcd11622c7 | [
"MIT"
] | null | null | null | legislative_act/history.py | Lexparency/lexhost | 71ad624d4ea608294ed40496e44fbdfcd11622c7 | [
"MIT"
] | null | null | null | legislative_act/history.py | Lexparency/lexhost | 71ad624d4ea608294ed40496e44fbdfcd11622c7 | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
from functools import wraps
from typing import List
from elasticsearch.exceptions import NotFoundError, ConnectionTimeout
from datetime import date
from . import model as dm
from .model import art_sub_id
from .utils.generics import retry
class VersionNotAvailable(Exception):
... | 37.997389 | 86 | 0.570329 |
9e6346455d954ff71c65533fb24f2f60ac6fb19d | 1,105 | py | Python | setup.py | stefan-grafberger/mlinspect-cidr | 4a15068a1652c043021d04795bd89da32ec20992 | [
"Apache-2.0"
] | 5 | 2020-08-26T13:32:13.000Z | 2020-10-20T15:34:57.000Z | setup.py | stefan-grafberger/mlinspect-cidr | 4a15068a1652c043021d04795bd89da32ec20992 | [
"Apache-2.0"
] | 1 | 2020-08-29T22:53:27.000Z | 2020-08-29T22:53:27.000Z | setup.py | stefan-grafberger/mlinspect-cidr | 4a15068a1652c043021d04795bd89da32ec20992 | [
"Apache-2.0"
] | null | null | null | """
For 'python setup.py develop' and 'python setup.py test'
"""
import os
from setuptools import setup, find_packages
ROOT = os.path.dirname(__file__)
with open(os.path.join(ROOT, "requirements", "requirements.txt")) as f:
required = f.read().splitlines()
with open(os.path.join(ROOT, "requirements", "requiremen... | 29.078947 | 75 | 0.689593 |
9e637113be79b4f1cb4d4d3cceccfde4db55b074 | 3,534 | py | Python | src/kol/bot/ChatBroadcaster.py | thedufer/pykol | bad8ff4bf2f4bc6a7a5b6dbbd9333ef5aaf3432a | [
"BSD-3-Clause"
] | 1 | 2016-05-08T12:10:32.000Z | 2016-05-08T12:10:32.000Z | src/kol/bot/ChatBroadcaster.py | thedufer/pykol | bad8ff4bf2f4bc6a7a5b6dbbd9333ef5aaf3432a | [
"BSD-3-Clause"
] | null | null | null | src/kol/bot/ChatBroadcaster.py | thedufer/pykol | bad8ff4bf2f4bc6a7a5b6dbbd9333ef5aaf3432a | [
"BSD-3-Clause"
] | null | null | null | """
This module implements a FilterManager filter to allow bots to broadcast their /clan chat
to other bots being run in this process. Users may prefix their chats with 'PRIVATE:' to
tell the bot to not broadcast that particular message. In addition, users with sufficient
privileges may tell the bot to stop or start br... | 33.657143 | 90 | 0.70996 |
9e637fc95d601bf2f7bbd82f3c8178cb973912bb | 15,826 | py | Python | backbones/resnet.py | wofmanaf/Group-CAM | d52a2ceb4b44201c8b5bd5ed27867eba9ff482e5 | [
"Apache-2.0"
] | 68 | 2021-03-26T23:14:35.000Z | 2022-03-24T04:29:35.000Z | backbones/resnet.py | wofmanaf/Group-CAM | d52a2ceb4b44201c8b5bd5ed27867eba9ff482e5 | [
"Apache-2.0"
] | 9 | 2021-04-12T02:34:32.000Z | 2022-03-19T02:48:25.000Z | backbones/resnet.py | wofmanaf/Group-CAM | d52a2ceb4b44201c8b5bd5ed27867eba9ff482e5 | [
"Apache-2.0"
] | 21 | 2021-03-26T03:58:40.000Z | 2022-03-22T08:28:50.000Z | from typing import Type, Any, Callable, Union, List, Optional
import torch
import torch.nn as nn
from torch import Tensor
import torch.nn.functional as F
try:
from torch.hub import load_state_dict_from_url
except ImportError:
from torch.utils.model_zoo import load_url as load_state_dict_from_url
__all__ = ['... | 40.894057 | 111 | 0.62252 |
9e638870616cdf70d5a2adf499aff61829be5d7d | 9,386 | py | Python | oldstuff/python/box/starfield.py | bcherry/bcherry | 5d2f1144dbdbf35d6284018fa2c9e24ec5cecec6 | [
"MIT"
] | 3 | 2016-11-13T09:06:41.000Z | 2021-09-11T23:36:19.000Z | oldstuff/python/box/starfield.py | bcherry/bcherry | 5d2f1144dbdbf35d6284018fa2c9e24ec5cecec6 | [
"MIT"
] | null | null | null | oldstuff/python/box/starfield.py | bcherry/bcherry | 5d2f1144dbdbf35d6284018fa2c9e24ec5cecec6 | [
"MIT"
] | 2 | 2017-04-04T10:03:18.000Z | 2021-09-11T23:36:26.000Z | #! /usr/bin/env python
import whrandom, pygame, math
class Star:
""" Star is a crippled particle class - it can draw itself, keep track
of its speed, position and direction, color and size. """
def __init__(self, position_x, position_y, distance, angle, speed, size,
color):
s... | 38 | 79 | 0.554443 |
9e638bc7cc1c23066cc6adcc70b0661a92aadccf | 1,222 | py | Python | dipy/core/ndindex.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | 2 | 2018-07-25T14:04:20.000Z | 2021-02-10T07:10:10.000Z | dipy/core/ndindex.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | null | null | null | dipy/core/ndindex.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | 2 | 2018-07-24T21:20:54.000Z | 2018-08-27T04:08:24.000Z | from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.lib.stride_tricks import as_strided
def ndindex(shape):
"""
An N-dimensional iterator object to index arrays.
Given the shape of an array, an `ndindex` instance iterates over
the N-dimensional index of the... | 26 | 79 | 0.57365 |
9e639ffe1a23c29ce343f49f3d400f6bb234f88e | 7,770 | py | Python | asposeimagingcloud/models/requests/modify_tiff_request.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | 1 | 2022-01-14T10:06:26.000Z | 2022-01-14T10:06:26.000Z | asposeimagingcloud/models/requests/modify_tiff_request.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | 3 | 2019-07-17T15:01:31.000Z | 2020-12-29T09:16:10.000Z | asposeimagingcloud/models/requests/modify_tiff_request.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | null | null | null | # coding: utf-8
# ----------------------------------------------------------------------------
# <copyright company="Aspose" file="modify_tiff_request.py">
# Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person o... | 54.335664 | 252 | 0.678893 |
9e63f3922a71ee064372ca6e4cb325e64b4fd561 | 11,649 | py | Python | style_transfer.py | djin31/StyleTransfer | d1f563fa1acc51134105024b63fb7b78e2d2a5f2 | [
"MIT"
] | 7 | 2020-06-18T08:42:56.000Z | 2020-07-22T08:11:46.000Z | style_transfer.py | djin31/StyleTransfer | d1f563fa1acc51134105024b63fb7b78e2d2a5f2 | [
"MIT"
] | null | null | null | style_transfer.py | djin31/StyleTransfer | d1f563fa1acc51134105024b63fb7b78e2d2a5f2 | [
"MIT"
] | 2 | 2020-07-30T22:01:03.000Z | 2021-03-19T06:53:37.000Z | #!/usr/bin/env python
# ## Neural Algorithm of Artistic Style
#
# Pytorch implementation of style transfer technique proposed by [Gatys et al, 2016](https://arxiv.org/abs/1508.06576).
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision.models as models
import torchvision.transforms... | 44.292776 | 180 | 0.624775 |
9e64243d82d54fb9cf3970f60d80f30c095b2b5d | 5,091 | bzl | Python | third_party/util-linux/util-linux.bzl | monogon-dev/monogon | 950c26d52a08499ebf45ee2b4b0e46d3bea66dee | [
"Apache-2.0"
] | 31 | 2021-04-04T07:09:41.000Z | 2022-02-14T10:37:35.000Z | third_party/util-linux/util-linux.bzl | monogon-dev/monogon | 950c26d52a08499ebf45ee2b4b0e46d3bea66dee | [
"Apache-2.0"
] | 116 | 2021-07-05T10:55:20.000Z | 2022-03-29T12:59:30.000Z | third_party/util-linux/util-linux.bzl | monogon-dev/monogon | 950c26d52a08499ebf45ee2b4b0e46d3bea66dee | [
"Apache-2.0"
] | 2 | 2021-04-13T16:57:06.000Z | 2021-12-17T01:35:18.000Z | # Copyright 2020 The Monogon Project Authors.
#
# SPDX-License-Identifier: Apache-2.0
#
# 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
... | 26.936508 | 95 | 0.5879 |
9e64306aeb760cc3f4466474a69c99032484f66e | 2,933 | py | Python | Bot.py | stevenjob/lunchbot | 756a478cbc49028dda49ed4240f1f84ab8fd1faf | [
"BSD-3-Clause"
] | null | null | null | Bot.py | stevenjob/lunchbot | 756a478cbc49028dda49ed4240f1f84ab8fd1faf | [
"BSD-3-Clause"
] | null | null | null | Bot.py | stevenjob/lunchbot | 756a478cbc49028dda49ed4240f1f84ab8fd1faf | [
"BSD-3-Clause"
] | null | null | null | import re
import time
from SlackPostedMessage import SlackPostedMessage
USER_RE_ANCHORED = re.compile('^<@(U[^>|]+)(\|[^>]+)?>')
USER_RE = re.compile('<@(U[^>|]+)(\|[^>]+)?>')
def lookup_user(connection, id):
for u in connection.server.users:
if hasattr(u, 'id') and u.id == id:
return u.name.... | 28.201923 | 112 | 0.596659 |
9e6453b673dd6933b185545dae3f0d51dbd6740f | 4,715 | py | Python | networks.py | lingxz/networks | c8c38927271ccb6ed31916b0b92eeab4095e3490 | [
"MIT"
] | null | null | null | networks.py | lingxz/networks | c8c38927271ccb6ed31916b0b92eeab4095e3490 | [
"MIT"
] | null | null | null | networks.py | lingxz/networks | c8c38927271ccb6ed31916b0b92eeab4095e3490 | [
"MIT"
] | null | null | null | import networkx as nx
import random
import pickle as pk
import json
import os
import numpy as np
# abstract base class, this should not be instantiated directly
class BaseBAGraph(nx.Graph):
prefix = 'base'
def __init__(self, m, N, seed=None, *args, **kwargs):
super().__init__(*args, **kwargs)
... | 30.816993 | 103 | 0.574337 |
9e6469088757401914f3b215cc0ffbf56fa68f62 | 1,851 | py | Python | Perceptron/Perceptron_Tutorial/template.py | AwsafAlam/Pattern_Recognition | cf52b833c6e66fe4920bc8a76b78246fbca83842 | [
"MIT"
] | null | null | null | Perceptron/Perceptron_Tutorial/template.py | AwsafAlam/Pattern_Recognition | cf52b833c6e66fe4920bc8a76b78246fbca83842 | [
"MIT"
] | null | null | null | Perceptron/Perceptron_Tutorial/template.py | AwsafAlam/Pattern_Recognition | cf52b833c6e66fe4920bc8a76b78246fbca83842 | [
"MIT"
] | null | null | null | import numpy as np
import math
datasetSize = 0
noOfFeatures = 0
noOfClasses = 0
Processed_DataSet = {}
class DataStore:
def __init__(self, cls):
self.cls = cls
self.features = []
self.mean = []
self.sd = []
self.transpose = []
self.covariance = []
self.deter... | 26.826087 | 89 | 0.602377 |
9e6473c012bc10c5daba9dcb635573ec30c8c2d6 | 837 | py | Python | rlglue/registry.py | okkhoy/minecraft-rl | 24c3b6c108fbeca4101ee6f86714a9ccb0f3947b | [
"MIT"
] | null | null | null | rlglue/registry.py | okkhoy/minecraft-rl | 24c3b6c108fbeca4101ee6f86714a9ccb0f3947b | [
"MIT"
] | null | null | null | rlglue/registry.py | okkhoy/minecraft-rl | 24c3b6c108fbeca4101ee6f86714a9ccb0f3947b | [
"MIT"
] | null | null | null | """
.. module:: RLGlueRegistry
:platform: Unix, Windows
:synopsis: Registry for rl-glue agents, environments and experiments
.. moduleauthor:: Pierre-Luc Bacon <pierrelucbacon@gmail.com>
"""
class RLGlueRegistry(object):
def __init__(self):
self.agents = {}
self.environments = {}
se... | 26.15625 | 71 | 0.700119 |
9e64786b1d9619d93504d2948cefafe07a65d4e7 | 17,230 | py | Python | codes_src/fairseq/modules/multihead_attention_old.py | ZhenYangIACAS/WeTS | bba33ad64e10efd7d3d95b5a0b6ad125216542cf | [
"Unlicense"
] | 50 | 2021-11-15T02:34:43.000Z | 2021-11-18T07:24:46.000Z | codes_src/fairseq/modules/multihead_attention_old.py | yujun531/WeTS | bba33ad64e10efd7d3d95b5a0b6ad125216542cf | [
"Unlicense"
] | null | null | null | codes_src/fairseq/modules/multihead_attention_old.py | yujun531/WeTS | bba33ad64e10efd7d3d95b5a0b6ad125216542cf | [
"Unlicense"
] | 26 | 2021-11-15T02:35:14.000Z | 2021-11-15T08:25:42.000Z | # 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 torch
from torch import nn
from torch.nn import Parameter
import torch.nn.functional as F
from fairseq import utils
# added by zieeny... | 43.842239 | 114 | 0.58758 |
9e6498184be3b8a627c9cec74291e79748d442e6 | 66 | py | Python | xpring/__init__.py | mvadari/xpring-py | b837420127d1c1e5051ed305ed4f19fe9910a4f6 | [
"0BSD"
] | 6 | 2019-12-11T00:54:56.000Z | 2021-03-11T19:44:44.000Z | xpring/__init__.py | mvadari/xpring-py | b837420127d1c1e5051ed305ed4f19fe9910a4f6 | [
"0BSD"
] | null | null | null | xpring/__init__.py | mvadari/xpring-py | b837420127d1c1e5051ed305ed4f19fe9910a4f6 | [
"0BSD"
] | 9 | 2020-02-28T18:40:46.000Z | 2022-02-28T23:01:09.000Z | from xpring.client import Client
from xpring.wallet import Wallet
| 22 | 32 | 0.848485 |
9e649c14e64eacba99fa630b42b7bee3374b230d | 2,441 | py | Python | sem/storage/coder.py | YoannDupont/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 22 | 2016-11-13T21:08:58.000Z | 2021-04-26T07:04:54.000Z | sem/storage/coder.py | Raphencoder/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 15 | 2016-11-15T10:21:07.000Z | 2021-11-08T10:08:05.000Z | sem/storage/coder.py | Raphencoder/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 8 | 2016-11-15T10:21:41.000Z | 2022-03-04T21:28:05.000Z | #-*- coding:utf-8 -*-
"""
file: coder.py
author: Yoann Dupont
MIT License
Copyright (c) 2018 Yoann Dupont
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... | 31.701299 | 78 | 0.669807 |
9e64b015b18e37e33a25f5f668b89de9a81f070f | 13,596 | py | Python | numbas_lti/views/resource.py | pbh4/numbas_leicester | bac5c66c0c7809ee9588a69b3bced4244cee08e5 | [
"Apache-2.0"
] | null | null | null | numbas_lti/views/resource.py | pbh4/numbas_leicester | bac5c66c0c7809ee9588a69b3bced4244cee08e5 | [
"Apache-2.0"
] | null | null | null | numbas_lti/views/resource.py | pbh4/numbas_leicester | bac5c66c0c7809ee9588a69b3bced4244cee08e5 | [
"Apache-2.0"
] | null | null | null | from .mixins import ResourceManagementViewMixin, MustBeInstructorMixin, MustHaveExamMixin
from .generic import CSVView
from numbas_lti import forms
from numbas_lti.models import Resource, AccessToken, Exam, Attempt, ReportProcess, DiscountPart, EditorLink, COMPLETION_STATUSES
from channels import Channel
from django im... | 37.766667 | 196 | 0.66321 |
9e64c2b38bb0580e76f0467a2f09c115d2014b26 | 128 | py | Python | beanstalkt/__init__.py | nephics/beanstalkt | d30ccc420ff26125e354d9ac125598e456869b71 | [
"Apache-2.0"
] | 9 | 2015-02-11T06:40:59.000Z | 2020-04-28T12:54:36.000Z | beanstalkt/__init__.py | nephics/beanstalkt | d30ccc420ff26125e354d9ac125598e456869b71 | [
"Apache-2.0"
] | null | null | null | beanstalkt/__init__.py | nephics/beanstalkt | d30ccc420ff26125e354d9ac125598e456869b71 | [
"Apache-2.0"
] | 5 | 2015-04-01T02:28:48.000Z | 2021-02-17T00:22:59.000Z | from .beanstalkt import (Client, BeanstalkException, UnexpectedResponse,
CommandFailed, Buried, DeadlineSoon, TimedOut)
| 42.666667 | 72 | 0.789063 |
9e64c4fc113414d80e99970fdbd8e955205a5e7f | 380 | py | Python | examples/mpi/test.py | abyellow/abin-tight-binding | 538aef632937b1840d5ffd184f162858637b01f5 | [
"MIT"
] | 1 | 2018-02-22T19:13:24.000Z | 2018-02-22T19:13:24.000Z | examples/mpi/test.py | abyellow/abin-tight-binding | 538aef632937b1840d5ffd184f162858637b01f5 | [
"MIT"
] | null | null | null | examples/mpi/test.py | abyellow/abin-tight-binding | 538aef632937b1840d5ffd184f162858637b01f5 | [
"MIT"
] | 1 | 2017-09-14T17:25:09.000Z | 2017-09-14T17:25:09.000Z | from mpi4py import MPI
class tt():
def __init__(self):
self.dummy=0
def run(self):
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
if rank == 0:
data = {'a': 7, 'b': 3.14}
#comm.send(data, dest=1, tag=11)
print rank, data
elif rank == 1:
data = {'a': 7, 'b': 3.14}
#data = comm.re... | 15.833333 | 41 | 0.560526 |
9e64d1b1795bcaaf9104ea3cc9e5ec990cd38c14 | 9,192 | py | Python | plastering/inferencers/scrabble/tagsets2entities.py | MingzheWu418/plastering | 322531e934c3acf2ecc8f520b37a6d255b9959c2 | [
"MIT"
] | 29 | 2018-09-19T01:16:27.000Z | 2022-03-29T14:35:36.000Z | plastering/inferencers/scrabble/tagsets2entities.py | MingzheWu418/plastering | 322531e934c3acf2ecc8f520b37a6d255b9959c2 | [
"MIT"
] | 14 | 2019-04-12T18:37:36.000Z | 2022-02-10T00:27:55.000Z | plastering/inferencers/scrabble/tagsets2entities.py | MingzheWu418/plastering | 322531e934c3acf2ecc8f520b37a6d255b9959c2 | [
"MIT"
] | 14 | 2019-03-05T23:44:11.000Z | 2022-03-18T07:29:31.000Z | import os
import pdb
from uuid import uuid4
from operator import itemgetter
from pathlib import Path
from collections import defaultdict
import pprint
from rdflib import Graph, Namespace, RDF, URIRef
pp = pprint.PrettyPrinter(indent=4)
import pycrfsuite
from bson.binary import Binary as BsonBinary
import arrow
import ... | 40.493392 | 117 | 0.53601 |
9e64dc440a0052b0eadc6c3e6b07ac5ca690df74 | 718 | py | Python | va_explorer/users/migrations/0004_userpasswordhistory.py | VA-Explorer/va_explorer | e43cfbff0ce5209c12134b7ac4ce439db6fc87a2 | [
"Apache-2.0"
] | null | null | null | va_explorer/users/migrations/0004_userpasswordhistory.py | VA-Explorer/va_explorer | e43cfbff0ce5209c12134b7ac4ce439db6fc87a2 | [
"Apache-2.0"
] | 125 | 2020-10-07T12:00:15.000Z | 2022-03-31T21:29:21.000Z | va_explorer/users/migrations/0004_userpasswordhistory.py | VA-Explorer/va_explorer | e43cfbff0ce5209c12134b7ac4ce439db6fc87a2 | [
"Apache-2.0"
] | 2 | 2020-10-29T16:08:42.000Z | 2020-12-08T19:03:41.000Z | # Generated by Django 3.1.5 on 2021-02-02 22:52
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('users', '0003_auto_20210122_1422'),
]
operations = [
migrations.CreateMode... | 29.916667 | 118 | 0.635097 |
9e64f7c90eef4009ca3771c4e3c8bdb440a55411 | 7,363 | py | Python | clowdr/controller/metadata.py | glatard/clowdr | 224ba53d2b46a1f5eac7330049aac608419201fe | [
"MIT"
] | null | null | null | clowdr/controller/metadata.py | glatard/clowdr | 224ba53d2b46a1f5eac7330049aac608419201fe | [
"MIT"
] | null | null | null | clowdr/controller/metadata.py | glatard/clowdr | 224ba53d2b46a1f5eac7330049aac608419201fe | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# This software is distributed with the MIT license:
# https://github.com/gkiar/clowdr/blob/master/LICENSE
#
# clowdr/controller/metadata.py
# Created by Greg Kiar on 2018-02-28.
# Email: gkiar@mcin.ca
from copy import deepcopy
import os.path as op
import datetime
import time
import string
impo... | 32.436123 | 98 | 0.6022 |
9e650390474f68b25b15dfda4a0d59db47884e97 | 5,463 | py | Python | vyperlogix/trees/BinarySearchTree/__init__.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | 1 | 2020-09-29T01:36:33.000Z | 2020-09-29T01:36:33.000Z | vyperlogix/trees/BinarySearchTree/__init__.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | vyperlogix/trees/BinarySearchTree/__init__.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | __copyright__ = """\
(c). Copyright 2008-2020, Vyper Logix Corp., All Rights Reserved.
Published under Creative Commons License
(http://creativecommons.org/licenses/by-nc/3.0/)
restricted to non-commercial educational use only.,
http://www.VyperLogix.com for details
THE AUTHOR VYPER LOGIX CORP DISCLAIMS ALL WARRA... | 33.310976 | 78 | 0.528098 |
9e651ed3ca463bf48e8eebdaec493fae12d3d468 | 904 | py | Python | tests/generator_tests/test_regex_id_sep.py | 3mcloud/magellan-models | aae47496f240a5211e650a5c0efcbc95a15f7bb0 | [
"BSD-3-Clause"
] | 2 | 2021-08-11T18:15:28.000Z | 2021-08-11T18:33:38.000Z | tests/generator_tests/test_regex_id_sep.py | 3mcloud/magellan-models | aae47496f240a5211e650a5c0efcbc95a15f7bb0 | [
"BSD-3-Clause"
] | null | null | null | tests/generator_tests/test_regex_id_sep.py | 3mcloud/magellan-models | aae47496f240a5211e650a5c0efcbc95a15f7bb0 | [
"BSD-3-Clause"
] | null | null | null | from tests.helper import get_testing_spec
from magellan_models.initializers.initialize_with_endpoint import (
initialize_with_endpoint,
)
from magellan_models.config import MagellanConfig
import re
from copy import deepcopy
def test_regex_id_sep_finds_and_parses_models(requests_mock):
config = MagellanConfig... | 33.481481 | 81 | 0.713496 |
9e652533e7b669d6d85eb61ad31f57191aa55af2 | 2,285 | py | Python | tests/codebase/test_python_execution_with_OO.py | ivan-usov/bokeh | ec3295c4e6027864db4821b59d1a423bf4a1245f | [
"BSD-3-Clause"
] | null | null | null | tests/codebase/test_python_execution_with_OO.py | ivan-usov/bokeh | ec3295c4e6027864db4821b59d1a423bf4a1245f | [
"BSD-3-Clause"
] | null | null | null | tests/codebase/test_python_execution_with_OO.py | ivan-usov/bokeh | ec3295c4e6027864db4821b59d1a423bf4a1245f | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#---------------------------------------------------... | 30.878378 | 81 | 0.447265 |
9e653003d39c266c5d1283c69fc9d97d71a366d0 | 1,899 | py | Python | examples/win_echod.py | kanzure/impacket | 88c7536ca24bc8f47718764f76cc38cdc8cf1879 | [
"Apache-1.1"
] | 1 | 2015-05-23T00:07:36.000Z | 2015-05-23T00:07:36.000Z | impacket/examples/win_echod.py | Aliced3645/DataCenterMarketing | 67bc485e73cf538498a89b28465afb822717affb | [
"Apache-2.0"
] | null | null | null | impacket/examples/win_echod.py | Aliced3645/DataCenterMarketing | 67bc485e73cf538498a89b28465afb822717affb | [
"Apache-2.0"
] | 4 | 2015-02-25T20:08:18.000Z | 2021-07-06T12:31:29.000Z | import win32file, win32pipe, pywintypes
PIPE = r"\\.\pipe\echo"
BUFSIZE = 512
class Iocp:
def __init__(self, object):
self.port = win32file.CreateIoCompletionPort(-1, 0, 0, 0)
win32file.CreateIoCompletionPort(object.handle, self.port, 1, 0)
def wait_buggy(self):
win32file.GetQueuedCom... | 31.65 | 75 | 0.561875 |
9e6539a4442b9697b478b9410f198d30a3eada55 | 3,231 | py | Python | experiments/WebsiteFingerprinting/Bento-DF/DeepFingerprint-changes/ClosedWorld_DF_Bento.py | rajKarra69420/bento | 1324189e26acfe3a372882519bd78e037d93997c | [
"BSD-3-Clause"
] | 3 | 2021-12-01T02:11:15.000Z | 2022-02-03T22:45:00.000Z | experiments/WebsiteFingerprinting/Bento-DF/DeepFingerprint-changes/ClosedWorld_DF_Bento.py | rajKarra69420/bento | 1324189e26acfe3a372882519bd78e037d93997c | [
"BSD-3-Clause"
] | 4 | 2021-11-27T11:04:36.000Z | 2022-02-17T02:53:21.000Z | experiments/WebsiteFingerprinting/Bento-DF/DeepFingerprint-changes/ClosedWorld_DF_Bento.py | rajKarra69420/bento | 1324189e26acfe3a372882519bd78e037d93997c | [
"BSD-3-Clause"
] | 5 | 2021-07-01T20:23:43.000Z | 2022-03-12T18:10:34.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This code is to implement deep fingerprinting model for website fingerprinting attacks
# ACM Reference Formant
# Payap Sirinam, Mohsen Imani, Marc Juarez, and Matthew Wright. 2018.
# Deep Fingerprinting: Undermining Website Fingerprinting Defenses with Deep Learning.
# I... | 33.65625 | 104 | 0.763541 |
9e655f83045d86a81ffea65a382aca81e6c15242 | 1,125 | py | Python | examples/ex_tsp.py | mullzhang/genqubo | ad0a29aeb31d931419c847d02669fffd08bb974e | [
"Apache-2.0"
] | null | null | null | examples/ex_tsp.py | mullzhang/genqubo | ad0a29aeb31d931419c847d02669fffd08bb974e | [
"Apache-2.0"
] | null | null | null | examples/ex_tsp.py | mullzhang/genqubo | ad0a29aeb31d931419c847d02669fffd08bb974e | [
"Apache-2.0"
] | 1 | 2021-02-21T15:18:28.000Z | 2021-02-21T15:18:28.000Z | import random
import dimod
from optneal import Cost, Penalty, MultiIndex
def gen_random_cost(N, start_idx):
def rmd():
return random.randint(1, 10)
cost_dict = {(start_idx, 0): -10}
for i in range(N):
for j in range(N):
cost_dict.update({((i, N - 1), (j, 0)): rmd()})
... | 23.93617 | 81 | 0.579556 |
9e65800db8790e287eb273db44e69398d37f4e2b | 15,329 | py | Python | pyggi/algo/local_search.py | bloa/pyggi | 79babee583460494b1c533e45e49c7cb23ed70c9 | [
"MIT"
] | null | null | null | pyggi/algo/local_search.py | bloa/pyggi | 79babee583460494b1c533e45e49c7cb23ed70c9 | [
"MIT"
] | null | null | null | pyggi/algo/local_search.py | bloa/pyggi | 79babee583460494b1c533e45e49c7cb23ed70c9 | [
"MIT"
] | null | null | null | import copy
import itertools
import random
import time
from pyggi.base import Algorithm, Patch
class LocalSearch(Algorithm):
def setup(self):
super().setup()
self.name = 'Local Search'
self.config['strategy'] = 'first'
self.config['warmup'] = 3
self.config['horizon'] = 1
... | 34.216518 | 120 | 0.553265 |
9e65ca97114ff5f5001138cdb4c1cb880962d64e | 221 | py | Python | setup.py | roger-yu-ds/bde_assignment_2 | cb7284591455c365ecab4b8ebb8fec5b4b024c19 | [
"MIT"
] | null | null | null | setup.py | roger-yu-ds/bde_assignment_2 | cb7284591455c365ecab4b8ebb8fec5b4b024c19 | [
"MIT"
] | null | null | null | setup.py | roger-yu-ds/bde_assignment_2 | cb7284591455c365ecab4b8ebb8fec5b4b024c19 | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='Creating a data pipeline using Airflow',
author='Roger Yu',
license='MIT',
)
| 20.090909 | 57 | 0.669683 |
9e65db5ae0528354a62c9a1ba3ac425c0f65a72a | 7,271 | py | Python | dronekit/gimbal.py | o-gent/dronekit2 | 1c6a37cbf5a8f647f8b2c94d792612cb74cd0f7a | [
"Apache-2.0"
] | null | null | null | dronekit/gimbal.py | o-gent/dronekit2 | 1c6a37cbf5a8f647f8b2c94d792612cb74cd0f7a | [
"Apache-2.0"
] | null | null | null | dronekit/gimbal.py | o-gent/dronekit2 | 1c6a37cbf5a8f647f8b2c94d792612cb74cd0f7a | [
"Apache-2.0"
] | null | null | null | from pymavlink import mavutil
from dronekit.atributes import LocationGlobal, LocationGlobalRelative
class Gimbal(object):
"""
Gimbal status and control.
An object of this type is returned by :py:attr:`Vehicle.gimbal`. The
gimbal orientation can be obtained from its :py:attr:`roll`, :py:attr:`pitch` ... | 38.882353 | 122 | 0.623298 |
9e661836b85efa254c74c9464b3dcc4f6012afd1 | 220 | py | Python | tests/test_scripts/trace_class.py | in-the-ocean/progshot | c2129a3a086849801fab0be96103a614457a245b | [
"Apache-2.0"
] | 5 | 2021-05-31T11:52:07.000Z | 2021-11-14T18:16:18.000Z | tests/test_scripts/trace_class.py | in-the-ocean/progshot | c2129a3a086849801fab0be96103a614457a245b | [
"Apache-2.0"
] | 20 | 2021-05-18T02:08:53.000Z | 2021-06-25T21:42:13.000Z | tests/test_scripts/trace_class.py | in-the-ocean/progshot | c2129a3a086849801fab0be96103a614457a245b | [
"Apache-2.0"
] | 1 | 2021-05-05T21:18:12.000Z | 2021-05-05T21:18:12.000Z | from progshot import trace
class Data:
def __init__(self):
self.a = 1
self.b = {"a": 2, "b": 3}
self.c = [i for i in range(10)]
@trace
def func_f():
a = Data()
return a
func_f()
| 12.222222 | 39 | 0.513636 |
9e662571957ed4f7747d1996e336e49e2a54c02b | 1,804 | py | Python | inspector/tests/tests_twitter.py | Samael500/social-inspector | 5bea9017a43f2da89d17bffcf85f57d8d7528206 | [
"MIT"
] | 1 | 2016-10-30T08:09:30.000Z | 2016-10-30T08:09:30.000Z | inspector/tests/tests_twitter.py | Samael500/social-inspector | 5bea9017a43f2da89d17bffcf85f57d8d7528206 | [
"MIT"
] | null | null | null | inspector/tests/tests_twitter.py | Samael500/social-inspector | 5bea9017a43f2da89d17bffcf85f57d8d7528206 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
from inspector.src.twitter import Twitter
from inspector.src.geocoder import CachedGeocoder
from datetime import datetime, timedelta
class TestTwitter(unittest.TestCase):
""" Test twitter class """
def setUp(self):
self.twitter = Twitter()
def test_twit... | 36.08 | 102 | 0.651885 |
9e66490d9099f2e5225a8fdc56a74d3968ebfb7c | 244 | py | Python | scenes/charactercreation/__init__.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | scenes/charactercreation/__init__.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | scenes/charactercreation/__init__.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | from scenes.charactercreation.attributes import AttributeSelection
from scenes.charactercreation.classes import ClassSelection
from scenes.charactercreation.skills import SkillsSelection
from scenes.charactercreation.races import RaceSelection
| 48.8 | 66 | 0.901639 |
9e66814d682e4fe50f57ab4bc59ca6b977edea06 | 318 | py | Python | mouse_burrows/__init__.py | david-zwicker/cv-mouse-burrows | 906476f49ff9711cd672feca5f70efedaab82b01 | [
"BSD-3-Clause"
] | 1 | 2016-03-06T05:16:38.000Z | 2016-03-06T05:16:38.000Z | mouse_burrows/__init__.py | david-zwicker/cv-mouse-burrows | 906476f49ff9711cd672feca5f70efedaab82b01 | [
"BSD-3-Clause"
] | null | null | null | mouse_burrows/__init__.py | david-zwicker/cv-mouse-burrows | 906476f49ff9711cd672feca5f70efedaab82b01 | [
"BSD-3-Clause"
] | null | null | null | """
This package contains routines for tracking digging mouse
"""
# enable the faulthandler to detect low-level crashes
try:
import faulthandler
except ImportError:
pass
else:
faulthandler.enable()
from .simple import (scan_video, scan_video_in_folder, load_results,
load_result_file) | 24.461538 | 68 | 0.72956 |
9e6696afdce0b833a6047c80710a1b8b27d08746 | 1,243 | py | Python | jesse/strategies/TestCanCancelEntryOrdersAfterOpenPositionLong2/__init__.py | botzill/jesse | cff9e69446980ae739f5020964c4618638b2014d | [
"MIT"
] | null | null | null | jesse/strategies/TestCanCancelEntryOrdersAfterOpenPositionLong2/__init__.py | botzill/jesse | cff9e69446980ae739f5020964c4618638b2014d | [
"MIT"
] | null | null | null | jesse/strategies/TestCanCancelEntryOrdersAfterOpenPositionLong2/__init__.py | botzill/jesse | cff9e69446980ae739f5020964c4618638b2014d | [
"MIT"
] | null | null | null | from jesse.strategies import Strategy
class TestCanCancelEntryOrdersAfterOpenPositionLong2(Strategy):
def before(self) -> None:
if self.price == 12:
self._fake_order(0, 'MARKET', 'EXECUTED', 10)
self._fake_order(1, 'LIMIT', 'ACTIVE', 9)
self._fake_order(2, 'LIMIT', 'ACT... | 28.25 | 63 | 0.552695 |
9e669cde1a40565fd7c1860d58e089988923a3de | 2,568 | py | Python | app/speech_service.py | mbroz/feel-the-streets | 6e21a496f1530b0500ca66e11712f3f31cd857ae | [
"MIT"
] | null | null | null | app/speech_service.py | mbroz/feel-the-streets | 6e21a496f1530b0500ca66e11712f3f31cd857ae | [
"MIT"
] | null | null | null | app/speech_service.py | mbroz/feel-the-streets | 6e21a496f1530b0500ca66e11712f3f31cd857ae | [
"MIT"
] | null | null | null | import platform
import os
import shutil
import accessible_output2.outputs
from accessible_output2.outputs import auto
from . import speech_dispatcher_output
class SpeechService:
def __init__(self):
if platform.system() == "Linux":
# This hack inserts the speech dispatcher output to th... | 40.761905 | 251 | 0.669393 |
9e66a9b59ee361d73f53b2c2a57d4468377d5c9b | 30,643 | py | Python | Main/analysis/metrics.py | Gitrocha2/MarineTraffic | d124952016861e046cdc98e1a916adb3e4429dbe | [
"MIT"
] | null | null | null | Main/analysis/metrics.py | Gitrocha2/MarineTraffic | d124952016861e046cdc98e1a916adb3e4429dbe | [
"MIT"
] | null | null | null | Main/analysis/metrics.py | Gitrocha2/MarineTraffic | d124952016861e046cdc98e1a916adb3e4429dbe | [
"MIT"
] | null | null | null | #import functions
from pathlib import Path
import pandas as pd
import numpy as np
import os
import matplotlib.pyplot as plt
import matplotlib.ticker as mtick
import matplotlib.dates as mdates
pd.options.mode.chained_assignment = None # default='warn'
def find_folders(xpath, amode):
result = []
listdir = os... | 49.988581 | 267 | 0.583853 |
9e66d53657078aaaf4d0736930acf5e9937cebf8 | 20,420 | py | Python | python_src/Windmaster_SOBOL.py | alexanderdrent/Uncertainty-Analysis-Windmaster | 4bc2ada3b4d12012a8229ee6c1b21cd9a8792e93 | [
"MIT"
] | null | null | null | python_src/Windmaster_SOBOL.py | alexanderdrent/Uncertainty-Analysis-Windmaster | 4bc2ada3b4d12012a8229ee6c1b21cd9a8792e93 | [
"MIT"
] | null | null | null | python_src/Windmaster_SOBOL.py | alexanderdrent/Uncertainty-Analysis-Windmaster | 4bc2ada3b4d12012a8229ee6c1b21cd9a8792e93 | [
"MIT"
] | null | null | null | import datetime
import enum
import json
import math
import os
from collections import namedtuple, Counter
import numpy as np
import pandas as pd
from SALib.analyze import sobol
from ema_workbench import (CategoricalParameter, IntegerParameter,
BooleanParameter, RealParameter,
... | 38.969466 | 120 | 0.564887 |
9e678bb991c4aac9765888ccd168e71acefab251 | 1,717 | py | Python | test/indexer/test_health_check.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | test/indexer/test_health_check.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | test/indexer/test_health_check.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | import os
import unittest
from unittest import mock
from moto import mock_sts, mock_sqs
from azul import config
from azul.logging import configure_test_logging
from health_check_test_case import HealthCheckTestCase
def setUpModule():
configure_test_logging()
class TestIndexerHealthCheck(HealthCheckTestCase):
... | 29.101695 | 82 | 0.661619 |
9e680334f2f53c4c00c9f3f41e83d29e301b32ea | 6,879 | py | Python | lingvo/tasks/mt/model.py | tom-doerr/lingvo | 2441edc7fee78903502ebd528ab4dc309db0001d | [
"Apache-2.0"
] | 4 | 2019-06-08T00:19:06.000Z | 2020-08-03T16:28:53.000Z | lingvo/tasks/mt/model.py | tom-doerr/lingvo | 2441edc7fee78903502ebd528ab4dc309db0001d | [
"Apache-2.0"
] | null | null | null | lingvo/tasks/mt/model.py | tom-doerr/lingvo | 2441edc7fee78903502ebd528ab4dc309db0001d | [
"Apache-2.0"
] | 5 | 2018-12-11T08:05:16.000Z | 2020-05-30T03:40:13.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.918782 | 80 | 0.69167 |
9e682085e15396eed7464ff31895461e8cad89f1 | 395 | py | Python | core/migrations/0006_flight_processing_time.py | IS-AgroSmart/MVP | b347e7c846a9a29584a6baee0b825381d5bc62a3 | [
"CNRI-Python"
] | null | null | null | core/migrations/0006_flight_processing_time.py | IS-AgroSmart/MVP | b347e7c846a9a29584a6baee0b825381d5bc62a3 | [
"CNRI-Python"
] | 140 | 2020-01-21T15:42:29.000Z | 2021-08-21T18:04:19.000Z | core/migrations/0006_flight_processing_time.py | IS-AgroSmart/MVP | b347e7c846a9a29584a6baee0b825381d5bc62a3 | [
"CNRI-Python"
] | 1 | 2019-12-13T21:47:57.000Z | 2019-12-13T21:47:57.000Z | # Generated by Django 3.0 on 2019-12-28 00:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0005_auto_20191226_1628'),
]
operations = [
migrations.AddField(
model_name='flight',
name='processing_time',
... | 20.789474 | 57 | 0.610127 |
9e6823368b475c1074c52fb8e782a6984192841b | 2,172 | py | Python | experimental/remote_image/plugin/RemoteImage.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | 1 | 2019-04-27T01:34:27.000Z | 2019-04-27T01:34:27.000Z | experimental/remote_image/plugin/RemoteImage.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | null | null | null | experimental/remote_image/plugin/RemoteImage.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | null | null | null | #
# RemoteImage.py -- Mixin for images that live on a remote server
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
from ginga.AstroImage import AstroImage, AstroHead... | 32.909091 | 79 | 0.622007 |
9e682b4708fd8e9b2f94947e9df00db1102f6e2f | 8,213 | py | Python | dadata/asynchr.py | Khalmatov/dadata-py | 2d08941c4d8182cc157bab569bd874067975275e | [
"MIT"
] | 41 | 2020-08-06T04:56:54.000Z | 2022-02-25T16:03:17.000Z | dadata/asynchr.py | Khalmatov/dadata-py | 2d08941c4d8182cc157bab569bd874067975275e | [
"MIT"
] | 6 | 2020-08-08T12:48:59.000Z | 2022-02-02T17:14:31.000Z | dadata/asynchr.py | Khalmatov/dadata-py | 2d08941c4d8182cc157bab569bd874067975275e | [
"MIT"
] | 11 | 2020-10-06T13:56:52.000Z | 2022-02-11T11:11:03.000Z | """
Asynchronous Dadata API client.
"""
import datetime as dt
from typing import Dict, List, Optional
import httpx
from dadata import settings
class ClientBase:
"""Base class for API client"""
def __init__(self, base_url: str, token: str, secret: str = None):
headers = {
"Content-type": ... | 36.502222 | 96 | 0.62742 |
9e682da4266dbeb13aa72d4961a0a8517e3a5378 | 6,789 | py | Python | selsum/tasks/abs_task.py | abrazinskas/SelSum | 6ed0e282cf854db7095196732e62ef8662c0daa6 | [
"MIT"
] | 34 | 2021-09-10T17:10:10.000Z | 2022-03-28T05:12:07.000Z | selsum/tasks/abs_task.py | abrazinskas/SelSum | 6ed0e282cf854db7095196732e62ef8662c0daa6 | [
"MIT"
] | null | null | null | selsum/tasks/abs_task.py | abrazinskas/SelSum | 6ed0e282cf854db7095196732e62ef8662c0daa6 | [
"MIT"
] | 3 | 2021-11-20T08:21:19.000Z | 2022-03-28T05:12:14.000Z | import logging
import os
import torch as T
import numpy as np
from selsum.data.abs_dataset import AbsDataset
from selsum.data.doc_reducer import DocReducer
from selsum.data.sep_replacer import SepReplacer
from selsum.data.seq_splitter import SeqSplitter
from selsum.data.seq_dataset import SeqDataset
from selsum.data.sr... | 44.960265 | 85 | 0.615996 |
9e6833023f01caade702f90d4af2335db81790c9 | 1,997 | py | Python | mittab/libs/backup/__init__.py | MIT-Tab/mit-tab | fd7e518bb7252fc1638111ef8a5fe79700ac77ef | [
"MIT"
] | 6 | 2018-04-21T19:26:48.000Z | 2020-06-19T22:34:57.000Z | mittab/libs/backup/__init__.py | ClaireBookworm/mit-tab | 0857a3809e1b0113fb3cb0866c3aa227c45bed62 | [
"MIT"
] | 152 | 2018-04-06T14:32:51.000Z | 2022-02-11T22:12:53.000Z | mittab/libs/backup/__init__.py | ClaireBookworm/mit-tab | 0857a3809e1b0113fb3cb0866c3aa227c45bed62 | [
"MIT"
] | 10 | 2018-04-06T20:28:16.000Z | 2021-10-02T19:18:42.000Z | import shutil
import time
import os
from wsgiref.util import FileWrapper
from django.conf import settings
from mittab.apps.tab.models import TabSettings
from mittab.libs import errors
from mittab.settings import BASE_DIR
from mittab.libs.backup.strategies.local_dump import LocalDump
ACTIVE_BACKUP_KEY = "MITTAB_ACTI... | 27.356164 | 75 | 0.709064 |
9e686cee1c3aec2263ba728d20b24debc02365ac | 7,900 | py | Python | vault/settings.py | globocom/vault | 4909cc022476e59022a1dc55d1bbabf49873ca80 | [
"Apache-2.0"
] | 15 | 2015-03-19T13:05:06.000Z | 2021-08-13T19:17:25.000Z | vault/settings.py | globocom/vault | 4909cc022476e59022a1dc55d1bbabf49873ca80 | [
"Apache-2.0"
] | 24 | 2015-02-24T14:20:06.000Z | 2021-12-15T13:33:52.000Z | vault/settings.py | globocom/vault | 4909cc022476e59022a1dc55d1bbabf49873ca80 | [
"Apache-2.0"
] | 11 | 2016-09-12T07:54:01.000Z | 2021-10-31T20:26:43.000Z | # -*- coding: utf-8 -*-
"""
Django settings for vault project.
"""
import os
import importlib
from django.utils.translation import gettext_lazy as _
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = os.getenv("VAULT_SECRET_KEY", "vaultsecretkey")
PROJECT = "vault"
DEBUG = os.gete... | 30.152672 | 82 | 0.652911 |
9e68829c496707d1ce3cc40f695a685f58884e1b | 2,155 | py | Python | src/recombinant_client_binding/3_combine_technical_reps.py | dezeraecox-manuscripts/COX_Proteome-stability | a5397baae7f0bc73980b88f8ccf7b83e3d05f590 | [
"MIT"
] | null | null | null | src/recombinant_client_binding/3_combine_technical_reps.py | dezeraecox-manuscripts/COX_Proteome-stability | a5397baae7f0bc73980b88f8ccf7b83e3d05f590 | [
"MIT"
] | null | null | null | src/recombinant_client_binding/3_combine_technical_reps.py | dezeraecox-manuscripts/COX_Proteome-stability | a5397baae7f0bc73980b88f8ccf7b83e3d05f590 | [
"MIT"
] | null | null | null | import os
import re
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from functools import reduce
from collections import defaultdict
from loguru import logger
from GEN_Utils import FileHandling, CalcUtils
logger.info('Import OK')
def main(sample_name):
# Read in raw ... | 34.758065 | 134 | 0.691415 |
9e68f07e1d1b4d9bc709da28d232e9520a635b59 | 2,536 | py | Python | oslo/log/openstack/common/notifier/proxy.py | citrix-openstack-build/oslo.log | f3f275a7625425d8790aa92ab9f94a51474d0aab | [
"Apache-2.0"
] | null | null | null | oslo/log/openstack/common/notifier/proxy.py | citrix-openstack-build/oslo.log | f3f275a7625425d8790aa92ab9f94a51474d0aab | [
"Apache-2.0"
] | null | null | null | oslo/log/openstack/common/notifier/proxy.py | citrix-openstack-build/oslo.log | f3f275a7625425d8790aa92ab9f94a51474d0aab | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Red Hat, 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 agre... | 32.512821 | 78 | 0.670741 |
9e68fdbc32a88835c1b89c4f12776fcc5b38ae73 | 465 | py | Python | vapor_manager/projects/forms.py | codescribblr/project-manager-django3 | d0dc79e992811eee3e35666acdb16bcafa16d98d | [
"MIT"
] | null | null | null | vapor_manager/projects/forms.py | codescribblr/project-manager-django3 | d0dc79e992811eee3e35666acdb16bcafa16d98d | [
"MIT"
] | null | null | null | vapor_manager/projects/forms.py | codescribblr/project-manager-django3 | d0dc79e992811eee3e35666acdb16bcafa16d98d | [
"MIT"
] | null | null | null | from django import forms
from vapor_manager.servers.models import Server
class ProjectAttachServerForm(forms.Form):
server = forms.ModelChoiceField(queryset=Server.objects.none(), required=True, empty_label=None)
def __init__(self, *args, **kwargs):
account = kwargs.pop('account', None)
supe... | 33.214286 | 100 | 0.701075 |
9e6914c7c436674f37fdc56cbec7b105cc527b41 | 3,128 | py | Python | docs/motionstills/motion_stills.py | morris-frank/morris-frank.dev | a7c0acf507fbe5545805bcf3b31790a593d41c0a | [
"MIT"
] | null | null | null | docs/motionstills/motion_stills.py | morris-frank/morris-frank.dev | a7c0acf507fbe5545805bcf3b31790a593d41c0a | [
"MIT"
] | null | null | null | docs/motionstills/motion_stills.py | morris-frank/morris-frank.dev | a7c0acf507fbe5545805bcf3b31790a593d41c0a | [
"MIT"
] | null | null | null | from pathlib import Path
import shutil
import subprocess
from tqdm.auto import tqdm
import torchvision
import torch
# Folder settings...............................................................
originals = Path("/Users/mfr/Desktop/ms/api/originals")
to_match = Path("/Users/mfr/Desktop/ms/api/processed")
save_direc... | 35.146067 | 106 | 0.625 |
9e691fa54cc75faa20e5fb5f215e6d5f43ebb8ab | 5,459 | py | Python | mxnet-spark/utils.py | awslabs/deeplearning-emr | 8227f79a466422fca32b68294ece6f99caf6a4fa | [
"Apache-2.0"
] | 69 | 2017-11-27T20:04:44.000Z | 2022-03-14T06:39:03.000Z | mxnet-spark/utils.py | awslabs/deeplearning-emr | 8227f79a466422fca32b68294ece6f99caf6a4fa | [
"Apache-2.0"
] | 3 | 2018-03-09T12:52:33.000Z | 2019-01-04T01:44:09.000Z | mxnet-spark/utils.py | awslabs/deeplearning-emr | 8227f79a466422fca32b68294ece6f99caf6a4fa | [
"Apache-2.0"
] | 14 | 2018-02-27T18:58:12.000Z | 2021-08-01T20:28:59.000Z | # Copyright 2017 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | 36.393333 | 120 | 0.67723 |
9e692395757ff97e1ee2e7c40b44c4581f009a32 | 2,692 | py | Python | leetcode_python/Array/missing-ranges.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Array/missing-ranges.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | null | null | null | leetcode_python/Array/missing-ranges.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | # Given a sorted integer array where the range of elements are in the inclusive range [lower, upper], return its missing ranges.
# For example, given [0, 1, 3, 50, 75], lower = 0 and upper = 99, return ["2", "4->49", "51->74", "76->99"].
# V0
# V1
# https://blog.csdn.net/qq_32424059/article/details/94437790
# IDEA :... | 32.433735 | 128 | 0.473626 |
9e693834022b4b4cc92fb1a26c21bd7badf6cc4d | 4,587 | py | Python | t/test_umash_fp_multiple_blocks.py | warmchang/umash | d56c343ce9bdf7d1eea59ab73898005bdf92888a | [
"MIT"
] | null | null | null | t/test_umash_fp_multiple_blocks.py | warmchang/umash | d56c343ce9bdf7d1eea59ab73898005bdf92888a | [
"MIT"
] | null | null | null | t/test_umash_fp_multiple_blocks.py | warmchang/umash | d56c343ce9bdf7d1eea59ab73898005bdf92888a | [
"MIT"
] | null | null | null | """
Test suite for the very long input fingerprinting subroutine.
"""
from hypothesis import given, note
import hypothesis.strategies as st
from umash import C, FFI
from umash_reference import (
blockify_chunks,
chunk_bytes,
oh_compress,
poly_reduce,
UmashKey,
)
U64S = st.integers(min_value=0, max... | 29.403846 | 87 | 0.63462 |
9e693faffb8e9907783b98d864700ea382840e47 | 9,146 | py | Python | src/uvm/base/runtime_phases.py | fvutils/uvm-py | 5e5ed203b680ead6e1b47fcff6d74fa99b5929c4 | [
"Apache-2.0"
] | 1 | 2019-10-13T06:14:28.000Z | 2019-10-13T06:14:28.000Z | src/uvm/base/runtime_phases.py | fvutils/uvm-py | 5e5ed203b680ead6e1b47fcff6d74fa99b5929c4 | [
"Apache-2.0"
] | null | null | null | src/uvm/base/runtime_phases.py | fvutils/uvm-py | 5e5ed203b680ead6e1b47fcff6d74fa99b5929c4 | [
"Apache-2.0"
] | 1 | 2019-12-23T06:21:49.000Z | 2019-12-23T06:21:49.000Z | #
#----------------------------------------------------------------------
# Copyright 2007-2011 Mentor Graphics Corporation
# Copyright 2007-2018 Cadence Design Systems, Inc.
# Copyright 2011 AMD
# Copyright 2014-2018 NVIDIA Corporation
# Copyright 2013 Cisco Systems, Inc.
# Copyright 2019 Matthew Ballance
# All Righ... | 30.794613 | 76 | 0.680079 |
9e6941e143690900afd6a5fe681f548fb1413226 | 32,305 | py | Python | pkgcore/ebuild/processor.py | pombreda/pkgcore | b438fc573af1a031d7ce12adbbf299bab5338451 | [
"BSD-3-Clause"
] | 1 | 2021-07-05T13:10:18.000Z | 2021-07-05T13:10:18.000Z | pkgcore/ebuild/processor.py | vapier/pkgcore | 35a7e4f4f0fc61dd9c4dc72d35a57e2e9d5b832f | [
"BSD-3-Clause"
] | 8 | 2015-03-24T14:21:44.000Z | 2015-03-24T14:21:44.000Z | pkgcore/ebuild/processor.py | vapier/pkgcore | 35a7e4f4f0fc61dd9c4dc72d35a57e2e9d5b832f | [
"BSD-3-Clause"
] | null | null | null | # Copyright: 2004-2011 Brian Harring <ferringb@gmail.com>
# License: GPL2/BSD
"""
low level ebuild processor.
This basically is a coprocessor that controls a bash daemon for actual
ebuild execution. Via this, the bash side can reach into the python
side (and vice versa), enabling remote trees (piping data from pytho... | 34.587794 | 98 | 0.600836 |
9e69a7e4e2a4b2ce1e795e9fed62877404f2493f | 3,263 | py | Python | modules/emulator/pytari2600/graphics/pygamestella.py | 5space/nesbot | 38a9e8cadf0cbe41ee25e0850c244e2834a6e12c | [
"MIT"
] | null | null | null | modules/emulator/pytari2600/graphics/pygamestella.py | 5space/nesbot | 38a9e8cadf0cbe41ee25e0850c244e2834a6e12c | [
"MIT"
] | null | null | null | modules/emulator/pytari2600/graphics/pygamestella.py | 5space/nesbot | 38a9e8cadf0cbe41ee25e0850c244e2834a6e12c | [
"MIT"
] | null | null | null | import pygame
from . import stella
# Import numpy, if it exists.
try:
import numpy
has_numpy = True
except:
has_numpy = False
finally:
pass
class PygameColors(stella.Colors):
def __init__(self):
super(PygameColors, self).__init__()
def set_color(self, r, g, b):
r = r & 0xFF
... | 35.467391 | 129 | 0.63745 |
9e69efcdbbc5717b2549d287a5e5257f67dff256 | 1,572 | py | Python | phase1a/case5a/case5a_analysis.py | pep8speaks/fhr-benchmark-1 | 531d518844de20ca70bd90522c573ead7aa459ce | [
"BSD-3-Clause"
] | 1 | 2020-11-24T09:56:12.000Z | 2020-11-24T09:56:12.000Z | phase1a/case5a/case5a_analysis.py | pep8speaks/fhr-benchmark-1 | 531d518844de20ca70bd90522c573ead7aa459ce | [
"BSD-3-Clause"
] | null | null | null | phase1a/case5a/case5a_analysis.py | pep8speaks/fhr-benchmark-1 | 531d518844de20ca70bd90522c573ead7aa459ce | [
"BSD-3-Clause"
] | null | null | null | """
PHASE 1A CASE 5A
This python script builds analyzes the tallies from openmc statepoint file
and uses functions in scripts/openmc_analysis.py to analyze and manipulate
the data into what is required for the FHR benchmark.
"""
###############################################################################
# ... | 28.581818 | 79 | 0.532443 |
9e69f7840f0d9ecea9a0a5b86be804b06c9a38e9 | 1,849 | py | Python | app/resources/v1/te/indicadores_mpt_unidades.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2019-07-25T21:15:05.000Z | 2019-07-25T21:15:05.000Z | app/resources/v1/te/indicadores_mpt_unidades.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 44 | 2019-08-05T15:24:00.000Z | 2022-01-31T23:11:31.000Z | app/resources/v1/te/indicadores_mpt_unidades.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2021-05-11T07:49:51.000Z | 2021-05-11T07:49:51.000Z | ''' Controller para fornecer dados da CEE '''
from flask import request
from flask_restful_swagger_2 import swagger
from resources.base import BaseResource
class IndicadoresEscravoMptUnidadesResource(BaseResource):
''' Classe de múltiplos Indicadores de Unidades do MPT '''
CUSTOM_SWAGGER_PARAMS = [
{"n... | 49.972973 | 98 | 0.683072 |
9e69fce0876bebc5a1550ff4ef499b1bf1ffb0e3 | 3,785 | py | Python | mixwithaws.py | lpassig/azurecompare | dd9936e0e80c8baa1db01cb724402f04bf97f6f9 | [
"MIT"
] | 1 | 2020-11-27T12:56:31.000Z | 2020-11-27T12:56:31.000Z | mixwithaws.py | lpassig/azurecompare | dd9936e0e80c8baa1db01cb724402f04bf97f6f9 | [
"MIT"
] | null | null | null | mixwithaws.py | lpassig/azurecompare | dd9936e0e80c8baa1db01cb724402f04bf97f6f9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import json
from collections import defaultdict
def mixaws(datafile, awsdatafile, mixeddatafile):
with open(datafile) as data_file:
instances = json.load(data_file)
with open(awsdatafile) as data_file:
awsdata = json.load(data_file)
awsregion = {
... | 44.529412 | 161 | 0.502246 |
9e6a146f67796466202cc5074ddd25e4c2b083a6 | 10,204 | py | Python | tensorflow/contrib/bayesflow/python/kernel_tests/monte_carlo_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/bayesflow/python/kernel_tests/monte_carlo_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/bayesflow/python/kernel_tests/monte_carlo_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.095785 | 87 | 0.662485 |
9e6a30e6d994a8133fc851919fb925976e55f3aa | 686 | py | Python | rassh/api/bonaire_http_api.py | rbricheno/rassh | 2a8406965bcbdc06b3e83f92ea449619e1b359aa | [
"MIT"
] | null | null | null | rassh/api/bonaire_http_api.py | rbricheno/rassh | 2a8406965bcbdc06b3e83f92ea449619e1b359aa | [
"MIT"
] | null | null | null | rassh/api/bonaire_http_api.py | rbricheno/rassh | 2a8406965bcbdc06b3e83f92ea449619e1b359aa | [
"MIT"
] | null | null | null | """This lets you run the Bonaire API on the SSH gateway server. It sets up a flask_restful API using the dynamic
resources from the BonaireSSHManager."""
from flask import Flask
from flask_restful import Api
from rassh.managers.bonaire_ssh_manager import BonaireSSHManager
from rassh.api.dynamic_resources import add_d... | 36.105263 | 112 | 0.794461 |
9e6a38b40ddf0109cd4ae0ad92778b3dee2818b5 | 9,604 | py | Python | tests/platform_tests/test_reboot.py | shihhsien-wang/sonic-mgmt | 986c8b88d1393a782a4b6ea7f548d53a4fea6a16 | [
"Apache-2.0"
] | null | null | null | tests/platform_tests/test_reboot.py | shihhsien-wang/sonic-mgmt | 986c8b88d1393a782a4b6ea7f548d53a4fea6a16 | [
"Apache-2.0"
] | null | null | null | tests/platform_tests/test_reboot.py | shihhsien-wang/sonic-mgmt | 986c8b88d1393a782a4b6ea7f548d53a4fea6a16 | [
"Apache-2.0"
] | null | null | null | """
Check platform status after reboot. Three types of reboot are covered in this script:
* Cold reboot
* Fast reboot
* Warm reboot
This script is to cover the test case 'Reload configuration' in the SONiC platform test plan:
https://github.com/Azure/SONiC/blob/master/doc/pmon/sonic_platform_test_plan.md
"""
import lo... | 41.575758 | 132 | 0.74698 |
9e6a43b2f2fbb9a7eb7156df2e8e1613e856c5e6 | 23 | py | Python | sarkas/__init__.py | pwessels-uhh/sarkas | 78fb9f8106ed6b15fb67c22afea09593fed01730 | [
"MIT"
] | null | null | null | sarkas/__init__.py | pwessels-uhh/sarkas | 78fb9f8106ed6b15fb67c22afea09593fed01730 | [
"MIT"
] | 1 | 2022-02-18T00:32:25.000Z | 2022-02-18T00:32:25.000Z | sarkas/__init__.py | pwessels-uhh/sarkas | 78fb9f8106ed6b15fb67c22afea09593fed01730 | [
"MIT"
] | null | null | null | __version__ = '1.0.0a1' | 23 | 23 | 0.695652 |
9e6a5d32514b7da573f4985b9e548bc80e24a7e1 | 598 | py | Python | shelter/migrations/0021_auto_20201018_1950.py | kermox/schronisko-krakow | 8f8c546894e4b683ce463debad27db72ef820f90 | [
"MIT"
] | 1 | 2020-11-17T18:50:44.000Z | 2020-11-17T18:50:44.000Z | shelter/migrations/0021_auto_20201018_1950.py | kermox/schronisko-krakow | 8f8c546894e4b683ce463debad27db72ef820f90 | [
"MIT"
] | 9 | 2020-10-23T18:42:45.000Z | 2022-03-12T00:39:57.000Z | shelter/migrations/0021_auto_20201018_1950.py | kermox/schronisko-krakow | 8f8c546894e4b683ce463debad27db72ef820f90 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.5 on 2020-10-18 19:50
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shelter', '0020_auto_20201018_1944'),
]
operations = [
migrations.AlterField(
model_name='petow... | 29.9 | 227 | 0.680602 |
9e6a6fd5d1a5d466f057b3872542dc3c47077d46 | 5,429 | py | Python | autotest/gdrivers/gdalhttp.py | chambbj/gdal | 3d56aecb5b8e9890dae8f560acd099992e707d12 | [
"MIT"
] | 1 | 2015-02-16T16:51:38.000Z | 2015-02-16T16:51:38.000Z | autotest/gdrivers/gdalhttp.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | autotest/gdrivers/gdalhttp.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | #!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test HTTP Driver.
# Author: Frank Warmerdam <warmerdam@pobox.com>
#
###############################################################################
# Copyright (c... | 29.505435 | 109 | 0.555719 |
9e6a708716ff943f9fefb17f27b9f66b41be6f2c | 549 | py | Python | alembic/versions/97519c3acc64_.py | Nukesor/taxcli | f313acd2f1c9a551361a535f8428a17c53e6b468 | [
"MIT"
] | null | null | null | alembic/versions/97519c3acc64_.py | Nukesor/taxcli | f313acd2f1c9a551361a535f8428a17c53e6b468 | [
"MIT"
] | null | null | null | alembic/versions/97519c3acc64_.py | Nukesor/taxcli | f313acd2f1c9a551361a535f8428a17c53e6b468 | [
"MIT"
] | null | null | null | """empty message
Revision ID: 97519c3acc64
Revises: 9ffd091d1d16
Create Date: 2016-11-17 00:36:18.728149
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '97519c3acc64'
down_revision = '9ffd091d1d16'
branch_labels = None
depends_on = None
def upgrade():
op... | 18.931034 | 46 | 0.697632 |
9e6a7a0f2bea8ebaa4f8d5013763602617a2f5da | 34,916 | py | Python | individuals/credit_card.py | h2oai/driverlessai-recipes | 508663ed6bd1961925fcb29fde268493fe40e9e8 | [
"Apache-2.0"
] | 194 | 2019-04-23T10:25:13.000Z | 2022-03-29T04:19:28.000Z | individuals/credit_card.py | h2oai/driverlessai-recipes | 508663ed6bd1961925fcb29fde268493fe40e9e8 | [
"Apache-2.0"
] | 50 | 2019-06-24T20:17:51.000Z | 2022-03-16T20:05:37.000Z | individuals/credit_card.py | h2oai/driverlessai-recipes | 508663ed6bd1961925fcb29fde268493fe40e9e8 | [
"Apache-2.0"
] | 85 | 2019-03-27T12:26:43.000Z | 2022-01-27T13:15:37.000Z | """Custom Individual 0 from Experiment test_credit_card_c6b98_4367_ficulahe """
from h2oaicore.ga import CustomIndividual
class Indivtestcreditcardc6b984367ficulahe_finalFalse_id0(CustomIndividual):
"""
Custom wrapper class used to construct DAI Individual
_params_valid: dict: items that can be filled fo... | 52.426426 | 135 | 0.493585 |
9e6aa0fb98b3926c597aa5502e21588ba18b3045 | 5,313 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_06_01/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_06_01/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_06_01/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 39.066176 | 133 | 0.659138 |
9e6aac17cde71d8787da17bd81bc27ed2138f37f | 1,561 | py | Python | authentication/auth_noauth.py | re4lity/XFLTReaT | e85a3d0babd82baa8ebc40873f1de480fcb5d3e6 | [
"MIT"
] | 1 | 2019-08-19T10:52:00.000Z | 2019-08-19T10:52:00.000Z | authentication/auth_noauth.py | re4lity/XFLTReaT | e85a3d0babd82baa8ebc40873f1de480fcb5d3e6 | [
"MIT"
] | null | null | null | authentication/auth_noauth.py | re4lity/XFLTReaT | e85a3d0babd82baa8ebc40873f1de480fcb5d3e6 | [
"MIT"
] | null | null | null | # MIT License
# Copyright (c) 2017 Balazs Bucsay
# 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, ... | 31.22 | 80 | 0.768738 |
9e6b0220d3c03f0ec90d11063d1a2478612effb5 | 3,830 | py | Python | tests/test_msf_io.py | ghuls/weblogo | 7eab5d1b8a8ec38786fa426af84bd77950835524 | [
"MIT"
] | 108 | 2015-08-21T10:39:22.000Z | 2022-03-04T22:10:49.000Z | tests/test_msf_io.py | ghuls/weblogo | 7eab5d1b8a8ec38786fa426af84bd77950835524 | [
"MIT"
] | 60 | 2015-07-21T22:55:52.000Z | 2022-03-24T21:20:00.000Z | tests/test_msf_io.py | ghuls/weblogo | 7eab5d1b8a8ec38786fa426af84bd77950835524 | [
"MIT"
] | 40 | 2015-08-04T00:18:23.000Z | 2021-12-30T13:41:54.000Z | #!/usr/bin/env python
# Copyright (c) 2006, The Regents of the University of California, through
# Lawrence Berkeley National Laboratory (subject to receipt of any required
# approvals from the U.S. Dept. of Energy). All rights reserved.
# This software is distributed under the new BSD Open Source License.
# <h... | 36.826923 | 78 | 0.69765 |
9e6b045b0069657dfce1127aae7d668e42bfac3b | 9,266 | py | Python | gammapy/makers/map.py | kabartay/gammapy | 015206d2418b1d254f1c9d3ea819ab0c5ece99e9 | [
"BSD-3-Clause"
] | 1 | 2021-02-02T21:35:27.000Z | 2021-02-02T21:35:27.000Z | gammapy/makers/map.py | kabartay/gammapy | 015206d2418b1d254f1c9d3ea819ab0c5ece99e9 | [
"BSD-3-Clause"
] | null | null | null | gammapy/makers/map.py | kabartay/gammapy | 015206d2418b1d254f1c9d3ea819ab0c5ece99e9 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import logging
import astropy.units as u
from astropy.table import Table
from gammapy.datasets import MapDataset
from gammapy.irf import EDispKernelMap, EnergyDependentMultiGaussPSF, PSFMap
from gammapy.maps import Map
from .core import Maker
from .utils i... | 29.890323 | 87 | 0.587632 |
9e6b1fe5fffdf72a222cbd00d380504136f187d5 | 2,414 | py | Python | alipay/aop/api/domain/AlipayIserviceCcmAgentGetModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayIserviceCcmAgentGetModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayIserviceCcmAgentGetModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayIserviceCcmAgentGetModel(object):
def __init__(self):
self._external_user_id = None
self._id = None
self._job_number = None
self._user_channel = None
@p... | 28.069767 | 83 | 0.591549 |
9e6b5b66b678af3c47e538d12c4471b871e1d01f | 1,163 | py | Python | src/streamlink/plugins/vinhlongtv.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | 1 | 2019-11-25T01:37:21.000Z | 2019-11-25T01:37:21.000Z | src/streamlink/plugins/vinhlongtv.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugins/vinhlongtv.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | null | null | null | import logging
import re
from streamlink.plugin import Plugin
from streamlink.plugin.api import http, useragents, validate
from streamlink.stream import HLSStream
log = logging.getLogger(__name__)
class VinhLongTV(Plugin):
api_url = 'http://api.thvli.vn/backend/cm/detail/{0}/'
_url_re = re.compile(
... | 25.282609 | 73 | 0.642304 |
9e6b70525e671ed9a04f26d940eb15e088ed7a42 | 1,878 | py | Python | keno/strategy.py | matthewdeanmartin/keno | 04724f5ebf53b5f11d150ec587750a18d0d3fee0 | [
"MIT"
] | null | null | null | keno/strategy.py | matthewdeanmartin/keno | 04724f5ebf53b5f11d150ec587750a18d0d3fee0 | [
"MIT"
] | 17 | 2018-07-14T17:48:04.000Z | 2020-09-16T10:25:59.000Z | keno/strategy.py | matthewdeanmartin/keno | 04724f5ebf53b5f11d150ec587750a18d0d3fee0 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
Choices gambler makes in a classic gambler's ruin problem
"""
from typing import List, Union
class Strategy(object):
"""
Represents the player's risk tollerances.
(Not the simulated player's risk tollerances!)
"""
def __init__(
self,
state_range: List[str],
... | 31.830508 | 92 | 0.640043 |
9e6b8cd6a9306f3f920088ec3f51bed09822ab08 | 3,534 | py | Python | ntm/ntm.py | OZA15015/ntm_research_pytorch | 4ba50423db617f423a91591ac6ad7f8d687d36f2 | [
"BSD-3-Clause"
] | 1 | 2021-07-16T14:05:03.000Z | 2021-07-16T14:05:03.000Z | ntm/ntm.py | sinanonur/pytorch-ntm | 3c64937cb075e737528ff7ecf02b2c1c6d8347a1 | [
"BSD-3-Clause"
] | null | null | null | ntm/ntm.py | sinanonur/pytorch-ntm | 3c64937cb075e737528ff7ecf02b2c1c6d8347a1 | [
"BSD-3-Clause"
] | 1 | 2021-04-29T19:57:19.000Z | 2021-04-29T19:57:19.000Z | #!/usr/bin/env python
import torch
from torch import nn
import torch.nn.functional as F
class NTM(nn.Module):
"""A Neural Turing Machine."""
def __init__(self, num_inputs, num_outputs, controller, memory, heads):
"""Initialize the NTM.
:param num_inputs: External input size.
:param nu... | 37.2 | 97 | 0.633277 |
9e6ba49911b7d891b1194764e7f6d8cbc979ac10 | 805 | py | Python | setup_cxfreeze.py | Jalkhov/apyk | f8616fcf32f7d1eef6aaa2328139678f392a472b | [
"MIT"
] | null | null | null | setup_cxfreeze.py | Jalkhov/apyk | f8616fcf32f7d1eef6aaa2328139678f392a472b | [
"MIT"
] | null | null | null | setup_cxfreeze.py | Jalkhov/apyk | f8616fcf32f7d1eef6aaa2328139678f392a472b | [
"MIT"
] | null | null | null | import sys
from apyk.win_main import version
from cx_Freeze import Executable, setup
includefiles = ['LICENSE', 'README.md']
base = None
if sys.platform == 'win32':
base = 'Win32GUI'
executables = [Executable(
script='apyk/win_main.py',
target_name='apyk.exe',
copyright='Copyright (C) 2021 Pedro To... | 22.361111 | 112 | 0.617391 |
9e6bf398f81c93c845a090356ff003f5458f9c31 | 4,702 | py | Python | packages/director-sdk/python/simcore_director_sdk/models/inline_response_default_error.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null | packages/director-sdk/python/simcore_director_sdk/models/inline_response_default_error.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | 2 | 2018-05-13T09:10:57.000Z | 2019-03-06T08:10:40.000Z | packages/director-sdk/python/simcore_director_sdk/models/inline_response_default_error.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Director API
This is the oSparc's director API # noqa: E501
OpenAPI spec version: 0.1.0
Contact: support@simcore.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class InlineResponseDefaultError(object):
"""NOTE: T... | 27.337209 | 93 | 0.573373 |
9e6bf6b30f287ddbc84fe7964966dfff793bae7e | 742 | py | Python | examples/example_filter/example_upper.py | Eastwu5788/pre-request | 6e51076ef9260d5fcf56dc513ad0240f04ce4938 | [
"MIT"
] | 86 | 2017-08-17T12:41:52.000Z | 2022-02-24T12:17:47.000Z | examples/example_filter/example_upper.py | Eastwu5788/pre-request | 6e51076ef9260d5fcf56dc513ad0240f04ce4938 | [
"MIT"
] | 10 | 2020-03-30T03:24:46.000Z | 2022-02-23T01:34:53.000Z | examples/example_filter/example_upper.py | Eastwu5788/pre-request | 6e51076ef9260d5fcf56dc513ad0240f04ce4938 | [
"MIT"
] | 7 | 2017-08-18T03:40:35.000Z | 2020-05-19T04:09:10.000Z | # !/usr/local/python/bin/python
# -*- coding: utf-8 -*-
# (C) Wu Dong, 2020
# All rights reserved
# @Author: 'Wu Dong <wudong@eastwu.cn>'
# @Time: '2020-04-13 10:53'
""" 演示 pre-request 框架验证字符串大写测试
"""
from flask import Flask
from pre_request import pre, Rule
app = Flask(__name__)
app.config["TESTING"] = True
client =... | 18.097561 | 45 | 0.6469 |
9e6bfdd2d316f0efaca5369d64f1832fa033067a | 771 | py | Python | computedfields/migrations/0001_initial.py | olivierdalang/django-computedfields | 13a5c107904e7596eeafe948ffc66c9702d95589 | [
"MIT"
] | null | null | null | computedfields/migrations/0001_initial.py | olivierdalang/django-computedfields | 13a5c107904e7596eeafe948ffc66c9702d95589 | [
"MIT"
] | null | null | null | computedfields/migrations/0001_initial.py | olivierdalang/django-computedfields | 13a5c107904e7596eeafe948ffc66c9702d95589 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-03-11 23:22
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
initial = True
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
]
operations = [
... | 24.870968 | 64 | 0.544747 |
9e6c0ea541c3512ab69ae9977757c4cc63d31d79 | 3,756 | py | Python | benchmarks.py | yamamura-k/MetaHeuristics | abc6da4c0d9886260425124dfcee2a92b833446f | [
"MIT"
] | 1 | 2021-09-14T04:28:18.000Z | 2021-09-14T04:28:18.000Z | benchmarks.py | yamamura-k/MetaHeuristics | abc6da4c0d9886260425124dfcee2a92b833446f | [
"MIT"
] | 6 | 2021-07-01T01:13:43.000Z | 2021-07-15T14:26:46.000Z | benchmarks.py | yamamura-k/MetaHeuristics | abc6da4c0d9886260425124dfcee2a92b833446f | [
"MIT"
] | null | null | null | import autograd.numpy as np
from utils.base import Function, gen_matrix
"""
Reference : https://qiita.com/nabenabe0928/items/08ed6495853c3dd08f1e
"""
class log_exp(Function):
def __init__(self, A=None, n=10, m=100):
super().__init__()
if A is None:
self.A = gen_matrix(m, n)
e... | 26.265734 | 74 | 0.519169 |
9e6c13bab6fea122a1972e302fc0a784e8863444 | 3,109 | py | Python | tests/dbobject/test_language.py | andreypopp/Pyrseas | 5fadc91bfd1e3e430e8f53d434df18b9abea3cb0 | [
"BSD-3-Clause"
] | 1 | 2015-03-16T09:10:47.000Z | 2015-03-16T09:10:47.000Z | tests/dbobject/test_language.py | andreypopp/Pyrseas | 5fadc91bfd1e3e430e8f53d434df18b9abea3cb0 | [
"BSD-3-Clause"
] | null | null | null | tests/dbobject/test_language.py | andreypopp/Pyrseas | 5fadc91bfd1e3e430e8f53d434df18b9abea3cb0 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Test languages"""
import unittest
from pyrseas.testutils import DatabaseToMapTestCase
from pyrseas.testutils import InputMapToSqlTestCase
CREATE_STMT = "CREATE LANGUAGE plperl"
DROP_STMT = "DROP LANGUAGE IF EXISTS plperl CASCADE"
COMMENT_STMT = "COMMENT ON LANGUAGE plperl IS 'Test language... | 36.151163 | 78 | 0.651656 |
9e6c1f42e8b2ee96d9f2d741f0b98db3b8a8284f | 35,290 | py | Python | genienlp/data_utils/numericalizer.py | Krish-sysadmin/genienlp | 3586e4368eb0b0756a772294daedc043ce55454c | [
"BSD-3-Clause"
] | null | null | null | genienlp/data_utils/numericalizer.py | Krish-sysadmin/genienlp | 3586e4368eb0b0756a772294daedc043ce55454c | [
"BSD-3-Clause"
] | null | null | null | genienlp/data_utils/numericalizer.py | Krish-sysadmin/genienlp | 3586e4368eb0b0756a772294daedc043ce55454c | [
"BSD-3-Clause"
] | null | null | null | #
# Copyright (c) 2019-2020 The Board of Trustees of the Leland Stanford Junior University
# 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 abov... | 43.567901 | 127 | 0.616719 |
9e6c2969844d8b7554dc221e2e064cfd81b9bc74 | 23,184 | py | Python | localstack/utils/bootstrap.py | qubyte/localstack | b7520260fa9281d7c11aad64a7ae1aff53953b97 | [
"Apache-2.0"
] | null | null | null | localstack/utils/bootstrap.py | qubyte/localstack | b7520260fa9281d7c11aad64a7ae1aff53953b97 | [
"Apache-2.0"
] | null | null | null | localstack/utils/bootstrap.py | qubyte/localstack | b7520260fa9281d7c11aad64a7ae1aff53953b97 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import pkgutil
import re
import shlex
import shutil
import sys
import threading
import time
import warnings
from datetime import datetime
from functools import wraps
import pip as pip_mod
import six
from localstack import config, constants
from localstack.utils.docker import DOCKER_CLIENT, Co... | 33.894737 | 106 | 0.643806 |
9e6c445e31de5efab7b6328d4a001c71740b74a0 | 49 | py | Python | python/app/thirdparty/dirsearch/lib/controller/__init__.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 351 | 2020-02-26T05:23:26.000Z | 2022-03-26T12:39:19.000Z | python/app/thirdparty/dirsearch/lib/controller/__init__.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 15 | 2020-03-26T07:31:49.000Z | 2022-03-09T02:12:17.000Z | python/app/thirdparty/dirsearch/lib/controller/__init__.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 99 | 2020-02-28T07:30:46.000Z | 2022-03-16T16:41:09.000Z | from .controller import Controller # noqa: F401
| 24.5 | 48 | 0.77551 |
9e6c54877cad81d4d38e8a53bb0f204ac23c3c7f | 4,016 | py | Python | alipay/aop/api/request/MybankPaymentTradeDepositVerifyQueryRequest.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/request/MybankPaymentTradeDepositVerifyQueryRequest.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/request/MybankPaymentTradeDepositVerifyQueryRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.MybankPaymentTradeDepositVerifyQueryModel import MybankPaymentTradeDepositVerifyQueryModel
class MybankPaymentTradeDepositVerifyQuer... | 27.696552 | 148 | 0.648406 |
9e6c6e7c6181e24cbd8783586696f245e69424c8 | 4,929 | py | Python | troncli/h_worker.py | seancrx/tron-cli | 1507b4c650a1da0785e5515feccca6a9aa375d25 | [
"MIT"
] | 2 | 2021-04-17T22:19:55.000Z | 2022-02-01T02:37:36.000Z | troncli/h_worker.py | 1000WONG/tron-cli | c1e4c14096b4572d557af8da86305ba795b93b16 | [
"MIT"
] | 7 | 2019-05-14T11:13:30.000Z | 2021-12-13T20:07:12.000Z | troncli/h_worker.py | 1000WONG/tron-cli | c1e4c14096b4572d557af8da86305ba795b93b16 | [
"MIT"
] | 12 | 2019-12-23T11:56:47.000Z | 2022-02-01T02:36:42.000Z | import os
import subprocess
import copy
from troncli import utils
from troncli.constants import *
class Worker:
"""handler for manage multiple nodes in multiple processes"""
def __init__(self):
self.root_path = os.getcwd()
self.processes = {}
self.node_list = utils.Node()
async ... | 40.735537 | 105 | 0.578008 |
9e6c7474fb60093d9f796b0051780a98c8ac2644 | 1,761 | py | Python | cupy/math/explog.py | umitanuki/chainer | 225c56b233e684ff4855451d2af4c2fb66915f21 | [
"MIT"
] | null | null | null | cupy/math/explog.py | umitanuki/chainer | 225c56b233e684ff4855451d2af4c2fb66915f21 | [
"MIT"
] | null | null | null | cupy/math/explog.py | umitanuki/chainer | 225c56b233e684ff4855451d2af4c2fb66915f21 | [
"MIT"
] | 1 | 2018-11-18T00:36:51.000Z | 2018-11-18T00:36:51.000Z | from cupy import elementwise
from cupy.math import ufunc
exp = ufunc.create_math_ufunc(
'exp', 1, 'cupy_exp',
'''Elementwise exponential function.
.. seealso:: :data:`numpy.exp`
''')
expm1 = ufunc.create_math_ufunc(
'expm1', 1, 'cupy_expm1',
'''Computes ``exp(x) - 1`` elementwise.
.. ... | 19.566667 | 63 | 0.577513 |
9e6c783f21b8fb2fe6f1e03fe5019f9cec497308 | 18,220 | py | Python | dashboard/src/app.py | Virtual-Audience-Synthesis/audience-synthesis-playground | 95b5d816c4565ef3261d3c9660a6b76a3c2041c7 | [
"MIT"
] | null | null | null | dashboard/src/app.py | Virtual-Audience-Synthesis/audience-synthesis-playground | 95b5d816c4565ef3261d3c9660a6b76a3c2041c7 | [
"MIT"
] | 7 | 2021-12-09T16:44:23.000Z | 2021-12-10T17:17:58.000Z | dashboard/src/app.py | Virtual-Audience-Synthesis/audience-synthesis-playground | 95b5d816c4565ef3261d3c9660a6b76a3c2041c7 | [
"MIT"
] | null | null | null | import os
import dash
import json
import time
import queue
import numpy as np
from scipy import signal
import sounddevice as sd
import plotly.graph_objs as go
import utils.audio as utils_audio
import dash_core_components as dcc
import scipy.io.wavfile as wavfile
import dash_html_components as html
from dash.dependencie... | 36.513026 | 88 | 0.405763 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.