hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 251 | max_forks_repo_name stringlengths 4 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a613b9a8c301525a013a5679b0f23d6447d8344b | 7,214 | py | Python | nova3/engines/nyaapantsu.py | chr0nu5/qBittorrent-Plugins-Easy-Install | 2b905523671f3d75977d1dc399cf6a8c723f463e | [
"MIT"
] | null | null | null | nova3/engines/nyaapantsu.py | chr0nu5/qBittorrent-Plugins-Easy-Install | 2b905523671f3d75977d1dc399cf6a8c723f463e | [
"MIT"
] | null | null | null | nova3/engines/nyaapantsu.py | chr0nu5/qBittorrent-Plugins-Easy-Install | 2b905523671f3d75977d1dc399cf6a8c723f463e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#VERSION: 1.2
#AUTHORS: Joost Bremmer (toost.b@gmail.com)
#
# 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 version 3 of the License, or
# (at your option) any... | 35.712871 | 83 | 0.530358 |
a615cb65339565e253a5ef2e1e9fe7fc3d78dd10 | 806 | py | Python | python-leetcode/it_03.03.py | MDGSF/interviews | 9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76 | [
"MIT"
] | 12 | 2020-01-16T08:55:27.000Z | 2021-12-02T14:52:39.000Z | python-leetcode/it_03.03.py | MDGSF/interviews | 9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76 | [
"MIT"
] | null | null | null | python-leetcode/it_03.03.py | MDGSF/interviews | 9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76 | [
"MIT"
] | 1 | 2019-12-11T12:00:38.000Z | 2019-12-11T12:00:38.000Z |
# Your StackOfPlates object will be instantiated and called as such:
# obj = StackOfPlates(cap)
# obj.push(val)
# param_2 = obj.pop()
# param_3 = obj.popAt(index)
| 25.1875 | 68 | 0.600496 |
a615cdf949b68109cdb350bb44c0f837323c64f3 | 3,580 | py | Python | siebenapp/ui/goalwidget.py | ahitrin/SiebenApp | 1e3c8b9d90b6bed4efa28a9a9fa65ed37525c4ae | [
"MIT"
] | 14 | 2016-11-26T08:35:19.000Z | 2022-03-01T05:20:11.000Z | siebenapp/ui/goalwidget.py | ahitrin/SiebenApp | 1e3c8b9d90b6bed4efa28a9a9fa65ed37525c4ae | [
"MIT"
] | 98 | 2016-11-28T08:58:48.000Z | 2022-03-18T17:59:04.000Z | siebenapp/ui/goalwidget.py | ahitrin/SiebenApp | 1e3c8b9d90b6bed4efa28a9a9fa65ed37525c4ae | [
"MIT"
] | 1 | 2017-12-20T12:42:18.000Z | 2017-12-20T12:42:18.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui/goal.ui'
#
# Created by: PyQt5 UI code generator 5.8.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
| 43.13253 | 88 | 0.708101 |
a619383cde46a46920c9996c56eea79c404d6a6c | 8,342 | py | Python | trainer/audio_trainer.py | ryanwongsa/DeepFakeDetectionChallenge | b9902b88e89d5165190ad673d5dfb10cc821d5a1 | [
"Apache-2.0"
] | 5 | 2020-05-07T18:14:17.000Z | 2021-11-18T02:44:55.000Z | trainer/audio_trainer.py | ryanwongsa/DeepFakeDetectionChallenge | b9902b88e89d5165190ad673d5dfb10cc821d5a1 | [
"Apache-2.0"
] | 1 | 2021-08-17T09:40:28.000Z | 2021-09-20T16:57:29.000Z | trainer/audio_trainer.py | ryanwongsa/DeepFakeDetectionChallenge | b9902b88e89d5165190ad673d5dfb10cc821d5a1 | [
"Apache-2.0"
] | 1 | 2020-12-21T08:31:18.000Z | 2020-12-21T08:31:18.000Z | import torch
torch.backends.cudnn.benchmark = True
from trainer.base_audio_trainer import BaseAudioTrainer
from logger.new_callbacks import Callbacks
from torch.utils.data import DataLoader
from dataloader.audio_dataset import AudioDataset
from torch.optim.lr_scheduler import CosineAnnealingLR
from models.audio_mode... | 42.131313 | 296 | 0.649245 |
a61d2ff865e88390f5a4f3b8c8da817f93d2e1a6 | 355 | py | Python | Calculator/operations/__init__.py | Shakil-1501/Session12 | 0ae424a6ac8949b21b89aa1548b6e997a2e4c133 | [
"MIT"
] | null | null | null | Calculator/operations/__init__.py | Shakil-1501/Session12 | 0ae424a6ac8949b21b89aa1548b6e997a2e4c133 | [
"MIT"
] | null | null | null | Calculator/operations/__init__.py | Shakil-1501/Session12 | 0ae424a6ac8949b21b89aa1548b6e997a2e4c133 | [
"MIT"
] | null | null | null | from .sine import *
from .cose import *
from .tane import *
from .tanhe import *
from .ee import *
from .loge import *
from .sigmoide import *
from .relue import *
from .softmaxe import *
__all__= (sine.__all__+ cose.__all__ + tane.__all__ + tanhe.__all__ + ee.__all__ + loge.__all__ + sigmoide.__all__ + relu... | 25.357143 | 151 | 0.698592 |
a61da44df1b4b01ba75ab9949fbc2b4e355911f3 | 121 | py | Python | Basico/ex002.py | Gustavsantos/python1 | 5520f2d2ee591157942008fdcd6bd42eb521f1a6 | [
"MIT"
] | null | null | null | Basico/ex002.py | Gustavsantos/python1 | 5520f2d2ee591157942008fdcd6bd42eb521f1a6 | [
"MIT"
] | null | null | null | Basico/ex002.py | Gustavsantos/python1 | 5520f2d2ee591157942008fdcd6bd42eb521f1a6 | [
"MIT"
] | null | null | null | nome = str(input('Qual seu nome?')).upper().capitalize()
print('prazer em conhecelo, \033[1;34m{}\033[m!'.format(nome)) | 60.5 | 62 | 0.677686 |
a61e50a3bc6d9d83dac4e1176ba6bdfe1909c870 | 1,881 | py | Python | bin/taxid2lineage.py | twylie/viromatch | 44edca07c44308b17b9f19174c08175736fff53f | [
"MIT"
] | 5 | 2021-02-13T09:02:21.000Z | 2021-10-06T19:20:41.000Z | bin/taxid2lineage.py | twylie/viromatch | 44edca07c44308b17b9f19174c08175736fff53f | [
"MIT"
] | 4 | 2021-05-14T09:02:32.000Z | 2022-03-25T05:06:40.000Z | bin/taxid2lineage.py | twylie/viromatch | 44edca07c44308b17b9f19174c08175736fff53f | [
"MIT"
] | 1 | 2021-04-05T22:30:44.000Z | 2021-04-05T22:30:44.000Z | #! /usr/bin/python3.7
import argparse
from viromatch.lib.taxonomy import Taxonomy
import os
version = '1.0'
if __name__ == '__main__':
# Given a list of NCBI tax ids, we will look-up and return the
# corresponding taxonomic lineages. By default, we return the YAML
# representation and the flattened li... | 21.62069 | 70 | 0.600744 |
a61f07aff13fd36fc9ecc85e1e4a70ff58848de8 | 2,779 | py | Python | database.py | Konako1/osu-tg-bot | fc569b0a0fe2bc25947eb2fca443f809c84ef980 | [
"MIT"
] | 1 | 2022-03-26T16:55:33.000Z | 2022-03-26T16:55:33.000Z | database.py | Konako1/osu-tg-bot | fc569b0a0fe2bc25947eb2fca443f809c84ef980 | [
"MIT"
] | null | null | null | database.py | Konako1/osu-tg-bot | fc569b0a0fe2bc25947eb2fca443f809c84ef980 | [
"MIT"
] | null | null | null | from typing import Optional
import aiosqlite
from aiogram.dispatcher.middlewares import BaseMiddleware
import config
| 38.068493 | 100 | 0.582944 |
a6238a7cdde1b28e0b8b179e20a5211a8bc243b8 | 8,423 | py | Python | module_utils/rsd_common.py | intel/ansible-rsd-provisioning | 757f4d5ca9447a22efdf56fda337dc19579c6380 | [
"Apache-2.0"
] | 2 | 2019-07-17T09:56:41.000Z | 2020-03-14T21:32:32.000Z | module_utils/rsd_common.py | intel/ansible-rsd-provisioning | 757f4d5ca9447a22efdf56fda337dc19579c6380 | [
"Apache-2.0"
] | null | null | null | module_utils/rsd_common.py | intel/ansible-rsd-provisioning | 757f4d5ca9447a22efdf56fda337dc19579c6380 | [
"Apache-2.0"
] | 4 | 2019-11-02T00:31:07.000Z | 2021-02-17T11:11:46.000Z | # Copyright (c) 2019 Intel Corporation. All rights reserved.
#
# GNU General Public License v3.0+
# (see LICENSE.GPL or https://www.gnu.org/licenses/gpl-3.0.txt)
#
# Authors:
# - Igor D.C. - <igor.duarte.cardoso@intel.com>
# - Marco Chiappero - <marco.chiappero@intel.com>
###########################################... | 31.429104 | 78 | 0.515256 |
a62415e6af752f35b91e91cf93818faa54736ef9 | 5,309 | py | Python | src/dockerblade/daemon.py | ChrisTimperley/dockerblade | 2be99bb9b2919ac87831879e04d6739d6967a8f3 | [
"Apache-2.0"
] | 1 | 2020-06-27T23:21:00.000Z | 2020-06-27T23:21:00.000Z | src/dockerblade/daemon.py | ChrisTimperley/dockerblade | 2be99bb9b2919ac87831879e04d6739d6967a8f3 | [
"Apache-2.0"
] | 66 | 2019-10-12T22:20:49.000Z | 2021-12-08T20:15:28.000Z | src/dockerblade/daemon.py | ChrisTimperley/dockerblade | 2be99bb9b2919ac87831879e04d6739d6967a8f3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
__all__ = ('DockerDaemon',)
from types import TracebackType
from typing import Any, Mapping, Optional, Type
from loguru import logger
import attr
import docker
from .container import Container
| 42.134921 | 78 | 0.569787 |
a6241a7c60cc25d87aeba3bf7a47f6e1a3cb5132 | 1,606 | py | Python | AreaFinder.py | karmatek/MinnoProto | cb231b44c055b910ce0e890f48fff0e0c7525c6e | [
"MIT"
] | null | null | null | AreaFinder.py | karmatek/MinnoProto | cb231b44c055b910ce0e890f48fff0e0c7525c6e | [
"MIT"
] | null | null | null | AreaFinder.py | karmatek/MinnoProto | cb231b44c055b910ce0e890f48fff0e0c7525c6e | [
"MIT"
] | null | null | null | """this module finds areas of image, it first finds edges in picture's pixel area.
then it makes contours of those edges, and draws biggest contours"""
import cv2
import numpy as np
from matplotlib import pyplot as plt
#plt.subplot(121),plt.imshow(img,cmap = 'gray')
#plt.title('Original Image'), plt.xticks([]), plt.yt... | 37.348837 | 107 | 0.702366 |
a627af630e9c7ea0f65acfa02285e5da65872a94 | 2,465 | py | Python | scripts/detection_configs.py | www516717402/edgeai-mmdetection | c5563434728da227678ba3588621b4b426cda43d | [
"BSD-3-Clause"
] | null | null | null | scripts/detection_configs.py | www516717402/edgeai-mmdetection | c5563434728da227678ba3588621b4b426cda43d | [
"BSD-3-Clause"
] | null | null | null | scripts/detection_configs.py | www516717402/edgeai-mmdetection | c5563434728da227678ba3588621b4b426cda43d | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2018-2020, Texas Instruments
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of condition... | 48.333333 | 103 | 0.78499 |
a6282b4f65c892360e83ec0d77ab379ee0c3ed7f | 93 | py | Python | hello_world.py | economicactivist/profiles-rest-api | 298dfc81eea353c3db9c43b3514fd95b5e557e0c | [
"MIT"
] | null | null | null | hello_world.py | economicactivist/profiles-rest-api | 298dfc81eea353c3db9c43b3514fd95b5e557e0c | [
"MIT"
] | 5 | 2021-04-08T21:53:59.000Z | 2022-02-10T15:12:26.000Z | hello_world.py | economicactivist/profiles-rest-api | 298dfc81eea353c3db9c43b3514fd95b5e557e0c | [
"MIT"
] | null | null | null | print('hello world!')
a = "cat dog fish monkey".split()
for animal in a:
print(animal)
| 13.285714 | 33 | 0.645161 |
a628a61d4eade64beae8f07a2d6973ce8921c088 | 1,391 | py | Python | users/models.py | faisoabdirisak/NextDoor | 57eb963ea8e68cc1b3516ec1005418b3fdc6283a | [
"Unlicense",
"MIT"
] | null | null | null | users/models.py | faisoabdirisak/NextDoor | 57eb963ea8e68cc1b3516ec1005418b3fdc6283a | [
"Unlicense",
"MIT"
] | null | null | null | users/models.py | faisoabdirisak/NextDoor | 57eb963ea8e68cc1b3516ec1005418b3fdc6283a | [
"Unlicense",
"MIT"
] | null | null | null | # from distutils.command.upload import upload
# import email
# from email.policy import default
# from unicodedata import name
import email
import uuid
from django.db import models
from django.contrib.auth.models import User
# from django.db.models.signals import post_save,post_delete
# from django.dispatch import rec... | 32.348837 | 102 | 0.717469 |
a62b1c307fdb97895ca854309c5d81de1710a8df | 1,438 | py | Python | back/babar_twitter/serializers.py | dryvenn/babar3 | 6f193ddbc1170739d8b1bf39033ad64d9bc85747 | [
"MIT"
] | null | null | null | back/babar_twitter/serializers.py | dryvenn/babar3 | 6f193ddbc1170739d8b1bf39033ad64d9bc85747 | [
"MIT"
] | null | null | null | back/babar_twitter/serializers.py | dryvenn/babar3 | 6f193ddbc1170739d8b1bf39033ad64d9bc85747 | [
"MIT"
] | null | null | null | import json
from datetime import timedelta
from django.utils import timezone
from rest_framework import serializers
import tweepy
from .models import *
# Get secrets and create the API instance
secrets = open("./babar_twitter/SECRETS.json", 'r')
keychain = json.load(secrets)
secrets.close()
twitter_auth = tweepy.OAut... | 29.958333 | 95 | 0.656467 |
a62b50d2b959f583c0aa23c6919ec3d633f00676 | 1,579 | py | Python | tools/software-tool-chain/instruction_coding.py | jufo-ufo/Breadboard-Computer | f19089f88adaa13c53dfe79571ff90b0de9a34a3 | [
"Apache-2.0"
] | null | null | null | tools/software-tool-chain/instruction_coding.py | jufo-ufo/Breadboard-Computer | f19089f88adaa13c53dfe79571ff90b0de9a34a3 | [
"Apache-2.0"
] | null | null | null | tools/software-tool-chain/instruction_coding.py | jufo-ufo/Breadboard-Computer | f19089f88adaa13c53dfe79571ff90b0de9a34a3 | [
"Apache-2.0"
] | null | null | null | from typing import Dict, Tuple
INSTRUCTIONS: Dict[str, Tuple[str, str, str, int]] = {
"nop": ("", "", "", 0x00),
"mov": ("r", "", "rc", 0x01),
"add": ("r", "r", "rc", 0x02),
"sub": ("r", "r", "rc", 0x03),
"mul": ("r", "r", "rc", 0x04),
"div": ("r", "r", "rc", 0x05),
"xor": ("r", "r", "rc", ... | 29.240741 | 60 | 0.329322 |
a62c74b285e912ac651e99cb611624923fcd7697 | 1,105 | py | Python | examples/canopen/canopen_example.py | RobertoRoos/ingenialink-python | c5e82dfbff17898bb316f5dc3f91a7f3c049ba20 | [
"MIT"
] | null | null | null | examples/canopen/canopen_example.py | RobertoRoos/ingenialink-python | c5e82dfbff17898bb316f5dc3f91a7f3c049ba20 | [
"MIT"
] | null | null | null | examples/canopen/canopen_example.py | RobertoRoos/ingenialink-python | c5e82dfbff17898bb316f5dc3f91a7f3c049ba20 | [
"MIT"
] | null | null | null | import sys
from ingenialink.canopen.net import Network, CAN_DEVICE
if __name__ == '__main__':
test = run_example()
sys.exit()
| 30.694444 | 81 | 0.514932 |
a62e5d77c05596c38b887d3ac6ee4a9230f19780 | 5,051 | py | Python | rnmu/test/test_acontrario_point.py | marianotepper/nmu_rfit | c726be892b928b884f81452697b9211cf273e03c | [
"BSD-3-Clause"
] | 8 | 2017-06-13T13:07:34.000Z | 2020-02-13T06:30:42.000Z | rnmu/test/test_acontrario_point.py | marianotepper/nmu_rfit | c726be892b928b884f81452697b9211cf273e03c | [
"BSD-3-Clause"
] | null | null | null | rnmu/test/test_acontrario_point.py | marianotepper/nmu_rfit | c726be892b928b884f81452697b9211cf273e03c | [
"BSD-3-Clause"
] | 3 | 2017-06-10T18:30:57.000Z | 2019-03-19T07:28:25.000Z | from __future__ import print_function
import matplotlib.pyplot as plt
import matplotlib.colors as plt_colors
import numpy as np
import scipy.io
import scipy.stats
from rnmu.pme.point import Point
from rnmu.pme.line import Line
import rnmu.pme.stats as stats
if __name__ == '__main__':
main()
plt.show()
| 31.372671 | 82 | 0.567808 |
a62ea8307891d611a45992bc024911fc8e8e0da9 | 17,456 | py | Python | oldbabylonian/cookbook/poslib.py | sethbam9/tutorials | c259636682304cb516e9048ca8df5a3ab92c62cc | [
"MIT"
] | 2 | 2019-07-17T18:51:26.000Z | 2019-07-24T19:45:23.000Z | oldbabylonian/cookbook/poslib.py | sethbam9/tutorials | c259636682304cb516e9048ca8df5a3ab92c62cc | [
"MIT"
] | 3 | 2019-01-16T10:56:50.000Z | 2020-11-16T16:30:48.000Z | oldbabylonian/cookbook/poslib.py | sethbam9/tutorials | c259636682304cb516e9048ca8df5a3ab92c62cc | [
"MIT"
] | 2 | 2020-12-17T15:41:33.000Z | 2021-11-03T18:23:07.000Z | import os
import collections
from functools import reduce
import yaml
from tf.lib import writeSets
HERE_BASE = "."
DROPBOX_BASE = "~/Dropbox/obb"
SET_NAME = "sets.tfx"
MODULE = "pos"
TF_LOC = f"{MODULE}/tf"
| 29.737649 | 103 | 0.507734 |
a630e19b17abd22ec5eb9f8bfa6cd41dd44b3348 | 1,613 | py | Python | tcfcli/cmds/native/startapi/cli.py | tencentyun/scfcli | ef15508ad34a851cf0d2750dfaa5202f6a600887 | [
"Apache-2.0"
] | 103 | 2019-06-11T06:09:56.000Z | 2021-12-18T22:48:59.000Z | tcfcli/cmds/native/startapi/cli.py | TencentCloud/Serverless-cli | 57f98b24cfd10712770a4806212cfb69d981a11a | [
"Apache-2.0"
] | 8 | 2019-07-12T12:08:40.000Z | 2020-10-20T07:18:17.000Z | tcfcli/cmds/native/startapi/cli.py | TencentCloud/Serverless-cli | 57f98b24cfd10712770a4806212cfb69d981a11a | [
"Apache-2.0"
] | 49 | 2019-06-11T06:26:05.000Z | 2020-02-19T08:13:36.000Z | # -*- coding: utf-8 -*-
import click
from tcfcli.cmds.native.common.start_api_context import StartApiContext
from tcfcli.help.message import NativeHelp as help
DEF_TMP_FILENAME = "template.yaml"
| 36.659091 | 100 | 0.681959 |
a63284b08e3b3a719f709e9f2059ec76a6420514 | 1,905 | py | Python | testing/dummy_usb.py | dominikandreas/modtpy | 90616cee4e7ae34ecc56c24faa003e1ffd0210de | [
"MIT"
] | 3 | 2019-01-24T16:40:22.000Z | 2020-11-09T22:24:12.000Z | testing/dummy_usb.py | dominikandreas/modtpy | 90616cee4e7ae34ecc56c24faa003e1ffd0210de | [
"MIT"
] | null | null | null | testing/dummy_usb.py | dominikandreas/modtpy | 90616cee4e7ae34ecc56c24faa003e1ffd0210de | [
"MIT"
] | null | null | null | from modtpy.api.modt import ModT, Mode
from modtpy.api.errors import PrinterError
import logging
from contextlib import contextmanager
| 24.74026 | 102 | 0.622572 |
a6329ec460cd0fd9eb39a536eca18ce065e12138 | 712 | py | Python | core/models/bert/classifier.py | readerbench/PASTEL | bef88d05c37b68f62a76983e4c31d9591b9a679a | [
"Apache-2.0"
] | null | null | null | core/models/bert/classifier.py | readerbench/PASTEL | bef88d05c37b68f62a76983e4c31d9591b9a679a | [
"Apache-2.0"
] | null | null | null | core/models/bert/classifier.py | readerbench/PASTEL | bef88d05c37b68f62a76983e4c31d9591b9a679a | [
"Apache-2.0"
] | null | null | null | from torch.nn.functional import relu, softmax, sigmoid
from transformers import BertModel
import torch.nn as nn
| 37.473684 | 84 | 0.75 |
a6333b4280980727cc41b230009b8b7911647e4a | 3,095 | py | Python | django/apps/audit/operations.py | wykys/project-thesaurus | f700396b30ed44e6b001c15397a25450ac068af4 | [
"MIT"
] | null | null | null | django/apps/audit/operations.py | wykys/project-thesaurus | f700396b30ed44e6b001c15397a25450ac068af4 | [
"MIT"
] | 93 | 2020-05-19T18:14:12.000Z | 2022-03-29T00:26:39.000Z | django/apps/audit/operations.py | wykys/project-thesaurus | f700396b30ed44e6b001c15397a25450ac068af4 | [
"MIT"
] | 1 | 2020-11-21T20:24:35.000Z | 2020-11-21T20:24:35.000Z | from typing import Type
from django.db.migrations.operations.base import Operation
from django.db.models import Model
EnableAuditOperation = AddAuditOperation
DisableAuditOperation = RemoveAuditOperation
| 34.388889 | 104 | 0.57189 |
a63517af775b6810696eee33fd69c06e61c4d35a | 484 | py | Python | DP&Memorization/272.py | wilbertgeng/LintCode_exercise | e7a343b746e98ca3b4bc7b36655af7291f3150db | [
"MIT"
] | null | null | null | DP&Memorization/272.py | wilbertgeng/LintCode_exercise | e7a343b746e98ca3b4bc7b36655af7291f3150db | [
"MIT"
] | null | null | null | DP&Memorization/272.py | wilbertgeng/LintCode_exercise | e7a343b746e98ca3b4bc7b36655af7291f3150db | [
"MIT"
] | null | null | null | """272. Climbing Stairs II
"""
| 21.043478 | 94 | 0.508264 |
a635f25e0d832aa8c213627d281f0fbe8a76415f | 9,791 | py | Python | train_due.py | BlackHC/DUE | e6370a89f9aab8bfbbafe0d9a544dd637867751d | [
"MIT"
] | 49 | 2021-02-23T14:34:04.000Z | 2022-03-24T22:50:02.000Z | train_due.py | BlackHC/DUE | e6370a89f9aab8bfbbafe0d9a544dd637867751d | [
"MIT"
] | 2 | 2021-12-06T22:25:41.000Z | 2022-02-02T12:38:08.000Z | train_due.py | BlackHC/DUE | e6370a89f9aab8bfbbafe0d9a544dd637867751d | [
"MIT"
] | 13 | 2021-03-05T01:35:12.000Z | 2022-02-22T11:24:14.000Z | import argparse
import json
import torch
import torch.nn.functional as F
from torch.utils.tensorboard.writer import SummaryWriter
from ignite.engine import Events, Engine
from ignite.metrics import Accuracy, Average, Loss
from ignite.contrib.handlers import ProgressBar
from gpytorch.mlls import VariationalELBO
from ... | 28.297688 | 88 | 0.629456 |
a637253ad3b575ae1f1d91f3dfdeda8b63c8e5e1 | 14,583 | py | Python | gui.py | tea321000/image_semantic_segmentation | 80409858e8d44c1b24695035abf3a68fd83e9574 | [
"MIT"
] | 14 | 2020-06-20T01:52:56.000Z | 2021-12-11T01:13:23.000Z | gui.py | tea321000/image_semantic_segmentation | 80409858e8d44c1b24695035abf3a68fd83e9574 | [
"MIT"
] | 1 | 2020-12-28T13:32:19.000Z | 2020-12-28T13:32:19.000Z | gui.py | tea321000/image_semantic_segmentation | 80409858e8d44c1b24695035abf3a68fd83e9574 | [
"MIT"
] | 1 | 2020-10-15T11:57:45.000Z | 2020-10-15T11:57:45.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui4.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, ... | 55.873563 | 149 | 0.696907 |
a6377793c412ebc024d19ecb586fc91e462e185d | 2,032 | py | Python | dataset/cifar10_c.py | xuanqing94/NeuralSDE | f3511799cfc9c3d6b95ff9bcb07563df88715e0c | [
"MIT"
] | 5 | 2020-06-28T07:15:35.000Z | 2022-01-20T01:52:31.000Z | dataset/cifar10_c.py | xuanqing94/NeuralSDE | f3511799cfc9c3d6b95ff9bcb07563df88715e0c | [
"MIT"
] | null | null | null | dataset/cifar10_c.py | xuanqing94/NeuralSDE | f3511799cfc9c3d6b95ff9bcb07563df88715e0c | [
"MIT"
] | null | null | null | from PIL import Image
import os
import numpy as np
import torch
import torch.utils.data as data
if __name__ == "__main__":
data = CIFAR10_C("~/data/CIFAR-10-C", [1])
d = data.get_ith_data(0)
print(d[0])
| 30.328358 | 88 | 0.596457 |
a637a96d54f58cda8435da2b415a24a67ca1842e | 3,544 | py | Python | models/word2vec/cbow_model.py | ktodorov/eval-historical-texts | e2994d594525d1d92056a6398935376a96659abb | [
"MIT"
] | 9 | 2020-08-27T15:03:46.000Z | 2022-01-02T10:48:35.000Z | models/word2vec/cbow_model.py | ktodorov/eval-historical-texts | e2994d594525d1d92056a6398935376a96659abb | [
"MIT"
] | 16 | 2020-09-12T17:37:59.000Z | 2020-11-18T10:36:32.000Z | models/word2vec/cbow_model.py | ktodorov/eval-historical-texts | e2994d594525d1d92056a6398935376a96659abb | [
"MIT"
] | 1 | 2022-03-08T16:16:52.000Z | 2022-03-08T16:16:52.000Z | import os
from typing import Callable
import torch
from torch import nn
from torch.nn.utils.rnn import pad_packed_sequence, pack_padded_sequence
from overrides import overrides
from entities.metric import Metric
from entities.batch_representation import BatchRepresentation
from entities.options.embedding_layer_optio... | 38.945055 | 126 | 0.752822 |
a637ff1c369797ef1abc4107c3a9bce38ee9b23d | 990 | py | Python | mri_works/NodeEditor/modules/File_IO/Deleting_files_folders.py | montigno/mri_works | 8ec6ff1500aa34d3540e44e4b0148023cf821f61 | [
"CECILL-B"
] | 2 | 2020-08-20T21:00:53.000Z | 2021-08-16T15:28:51.000Z | mri_works/NodeEditor/modules/File_IO/Deleting_files_folders.py | montigno/mri_works | 8ec6ff1500aa34d3540e44e4b0148023cf821f61 | [
"CECILL-B"
] | 3 | 2020-09-24T06:50:43.000Z | 2020-12-15T11:02:04.000Z | mri_works/NodeEditor/modules/File_IO/Deleting_files_folders.py | montigno/mri_works | 8ec6ff1500aa34d3540e44e4b0148023cf821f61 | [
"CECILL-B"
] | 1 | 2020-08-20T21:00:59.000Z | 2020-08-20T21:00:59.000Z |
##############################################################################
##############################################################################
##############################################################################
| 26.756757 | 78 | 0.435354 |
a63828f981b1214d9b5676be8d17b2e2e623a148 | 834 | py | Python | scripts/opts.py | RipZ/beerbox | b396c5f14ed088ac82c2ebcea9746456748d763d | [
"Apache-2.0"
] | null | null | null | scripts/opts.py | RipZ/beerbox | b396c5f14ed088ac82c2ebcea9746456748d763d | [
"Apache-2.0"
] | null | null | null | scripts/opts.py | RipZ/beerbox | b396c5f14ed088ac82c2ebcea9746456748d763d | [
"Apache-2.0"
] | null | null | null | import argparse
parser = argparse.ArgumentParser(description='oled arguments')
parser.add_argument(
'--port', '-p',
type=int,
default=0,
help='i2c bus number',
)
parser.add_argument(
'--parameter', '-t',
type=str,
default='',
help='parameter to display',
)
parser.add_argument(
'--va... | 20.341463 | 62 | 0.642686 |
a63954e3462fad8db808fe79ee0028680cc60ef9 | 12,864 | py | Python | alphacsc/tests/test_d_solver.py | dinalzein/alphacsc | dab672c4da54ed1b89f2364f552cf9b0707fcaeb | [
"BSD-3-Clause"
] | null | null | null | alphacsc/tests/test_d_solver.py | dinalzein/alphacsc | dab672c4da54ed1b89f2364f552cf9b0707fcaeb | [
"BSD-3-Clause"
] | null | null | null | alphacsc/tests/test_d_solver.py | dinalzein/alphacsc | dab672c4da54ed1b89f2364f552cf9b0707fcaeb | [
"BSD-3-Clause"
] | null | null | null | import pytest
from numpy.testing import assert_allclose
import numpy as np
from alphacsc.tests.conftest import N_CHANNELS, N_TIMES_ATOM, N_ATOMS
from alphacsc.update_d_multi import prox_d, prox_uv
from alphacsc._d_solver import get_solver_d, check_solver_and_constraints
from alphacsc._z_encoder import get_z_encoder_... | 36.134831 | 89 | 0.576803 |
a639c17d6fd2fadfce0ccee6caacea6630ec1b9f | 1,931 | py | Python | deploy/app/pipeline.py | PBenavides/credit-fraud-API | 154b7ab2247f89649f8244b35d115cf352be23a5 | [
"MIT"
] | null | null | null | deploy/app/pipeline.py | PBenavides/credit-fraud-API | 154b7ab2247f89649f8244b35d115cf352be23a5 | [
"MIT"
] | null | null | null | deploy/app/pipeline.py | PBenavides/credit-fraud-API | 154b7ab2247f89649f8244b35d115cf352be23a5 | [
"MIT"
] | null | null | null | import pandas as pd
import datetime
import numpy as np
import json
from app import artifacts_dict as artifacts
from app.utils import get_time_now, get_time_sin_cos
| 25.407895 | 102 | 0.616261 |
a639e39129cf3e132136165ec24e35e67033099f | 1,054 | py | Python | setup.py | bfontaine/wpydumps | f01ff6fc7dfae75a5b1526d26e33d92410898971 | [
"MIT"
] | 1 | 2021-01-06T17:49:01.000Z | 2021-01-06T17:49:01.000Z | setup.py | bfontaine/wpydumps | f01ff6fc7dfae75a5b1526d26e33d92410898971 | [
"MIT"
] | null | null | null | setup.py | bfontaine/wpydumps | f01ff6fc7dfae75a5b1526d26e33d92410898971 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
from setuptools import setup
# http://stackoverflow.com/a/7071358/735926
import re
VERSIONFILE = 'wpydumps/__init__.py'
verstrline = open(VERSIONFILE, 'rt').read()
VSRE = r'^__version__\s+=\s+[\'"]([^\'"]+)[\'"]'
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
... | 28.486486 | 76 | 0.634725 |
a63b3f2f9f2a7bfd879e5b06a05f0c6a64277b8f | 1,343 | py | Python | ambiente_virtual/Lib/site-packages/alembic/testing/suite/test_op.py | PI-UNIVESP-Penapolis/PRODEA | 1ced58f52bace8b6de0de3c6516b9fb7231da09c | [
"MIT"
] | 1,324 | 2018-11-27T05:44:41.000Z | 2022-03-30T19:49:20.000Z | ambiente_virtual/Lib/site-packages/alembic/testing/suite/test_op.py | PI-UNIVESP-Penapolis/PRODEA | 1ced58f52bace8b6de0de3c6516b9fb7231da09c | [
"MIT"
] | 452 | 2018-11-27T22:43:38.000Z | 2022-03-28T04:33:43.000Z | ambiente_virtual/Lib/site-packages/alembic/testing/suite/test_op.py | PI-UNIVESP-Penapolis/PRODEA | 1ced58f52bace8b6de0de3c6516b9fb7231da09c | [
"MIT"
] | 159 | 2018-11-29T18:46:15.000Z | 2022-03-28T16:34:19.000Z | """Test against the builders in the op.* module."""
from sqlalchemy import Column
from sqlalchemy import event
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy import Table
from sqlalchemy.sql import text
from ...testing.fixtures import AlterColRoundTripFixture
from ...testing.fixtures imp... | 31.232558 | 77 | 0.706627 |
a63bcfa9188011d5f54844e668d23332501081e1 | 36,617 | py | Python | xData/multiD_XYs.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 14 | 2019-08-29T23:46:24.000Z | 2022-03-21T10:16:25.000Z | xData/multiD_XYs.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 1 | 2020-08-04T16:14:45.000Z | 2021-12-01T01:54:34.000Z | xData/multiD_XYs.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 2 | 2022-03-03T22:41:41.000Z | 2022-03-03T22:54:43.000Z | # <<BEGIN-copyright>>
# Copyright 2021, Lawrence Livermore National Security, LLC.
# See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
# <<END-copyright>>
"""
This module contains the XYsnd classes for n > 1.
"""
__metaclass__ = type
"""
Missing methods
copyDataToGridWsAn... | 49.482432 | 198 | 0.598984 |
a63d599dea6045877e02b25d4ad286249a4128fc | 624 | py | Python | racket_stringer/settings/development.py | rbennett91/racket_stringer | 37cc583003ea924294955a6331bf82d60783c709 | [
"PostgreSQL"
] | null | null | null | racket_stringer/settings/development.py | rbennett91/racket_stringer | 37cc583003ea924294955a6331bf82d60783c709 | [
"PostgreSQL"
] | 6 | 2021-03-31T19:45:30.000Z | 2022-02-10T11:58:21.000Z | racket_stringer/settings/development.py | rbennett91/racket_stringer | 37cc583003ea924294955a6331bf82d60783c709 | [
"PostgreSQL"
] | null | null | null | from .base import *
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ['SECRET_KEY']
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = [os.environ['ALLOWED_HOSTS']]
# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#... | 26 | 66 | 0.647436 |
a64256e4855190c8d496f99dade4331c334760ed | 7,159 | py | Python | tests/test_training.py | Jimmy2027/MMVAE_mnist_svhn_text | e6e74059bd5feefc0af088f7b1abc31b0e9f2ab7 | [
"MIT"
] | null | null | null | tests/test_training.py | Jimmy2027/MMVAE_mnist_svhn_text | e6e74059bd5feefc0af088f7b1abc31b0e9f2ab7 | [
"MIT"
] | 24 | 2021-11-15T14:22:08.000Z | 2022-02-28T14:30:23.000Z | tests/test_training.py | Jimmy2027/MMVAE_mnist_svhn_text | e6e74059bd5feefc0af088f7b1abc31b0e9f2ab7 | [
"MIT"
] | null | null | null | import tempfile
from pathlib import Path
import pytest
from norby.utils import get_readable_elapsed_time
from mmvae_hub.celeba.CelebaTrainer import CelebaTrainer
from mmvae_hub.evaluation.eval_metrics.coherence import test_generation
from mmvae_hub.mimic.MimicTrainer import MimicTrainer
from mmvae_hub.mnistsvhntext.m... | 46.187097 | 118 | 0.564744 |
a6430c564af2fe8b504ab18c9fbc24d3c163cb63 | 41,339 | py | Python | src/api/datahub/access/deploy_plan_views.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 84 | 2021-06-30T06:20:23.000Z | 2022-03-22T03:05:49.000Z | src/api/datahub/access/deploy_plan_views.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 7 | 2021-06-30T06:21:16.000Z | 2022-03-29T07:36:13.000Z | src/api/datahub/access/deploy_plan_views.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 40 | 2021-06-30T06:21:26.000Z | 2022-03-29T12:42:26.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE is licensed under the MIT License.
License for BK-BASE :
------------------------------------------------------------... | 38.419145 | 120 | 0.497037 |
a64342d6282acb3e5c3a1da43389d3370a406889 | 17,804 | py | Python | venv/lib/python3.8/site-packages/azureml/_restclient/operations/assets_operations.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/azureml/_restclient/operations/assets_operations.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/azureml/_restclient/operations/assets_operations.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.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 2.3.3... | 44.621554 | 242 | 0.645024 |
a643b7cb05c62d6f05038a65215f5b01cb85f51d | 1,284 | py | Python | histomicstk/features/__init__.py | basanto/HistomicsTK | f3dbd93a7f31c7825574f9ccf0b86e09e9fee360 | [
"Apache-2.0"
] | 249 | 2016-04-04T12:00:54.000Z | 2022-03-31T15:46:50.000Z | histomicstk/features/__init__.py | basanto/HistomicsTK | f3dbd93a7f31c7825574f9ccf0b86e09e9fee360 | [
"Apache-2.0"
] | 616 | 2016-01-13T21:06:01.000Z | 2022-03-19T00:06:28.000Z | histomicstk/features/__init__.py | basanto/HistomicsTK | f3dbd93a7f31c7825574f9ccf0b86e09e9fee360 | [
"Apache-2.0"
] | 109 | 2016-01-21T16:14:34.000Z | 2022-03-10T00:59:06.000Z | """
This package contains functions to computing a variety of image-based features
that quantify the appearance and/or morphology of an objects/regions in the
image. These are needed for classifying objects (e.g. nuclei) and
regions (e.g. tissues) found in histopathology images.
"""
# make functions available at the p... | 38.909091 | 82 | 0.82866 |
a643c170360fd65c1fce02757aabe7bff1085035 | 1,532 | py | Python | combined.py | witchOfTheEast/tkinter_tutorial | aeff45ce01cfca88795ec3b9c1be5835553cd907 | [
"MIT"
] | null | null | null | combined.py | witchOfTheEast/tkinter_tutorial | aeff45ce01cfca88795ec3b9c1be5835553cd907 | [
"MIT"
] | null | null | null | combined.py | witchOfTheEast/tkinter_tutorial | aeff45ce01cfca88795ec3b9c1be5835553cd907 | [
"MIT"
] | null | null | null | from Tkinter import *
import tkMessageBox
root = Tk()
# create a menu
menu = Menu(root)
root.config(menu=menu)
filemenu = Menu(menu)
menu.add_cascade(label="File", menu=filemenu)
filemenu.add_command(label="New", command=callback)
filemenu.add_command(label="Open...", command=callback)
filemenu.add_separator()
file... | 23.569231 | 88 | 0.686684 |
a64617babb2bab4f4378a4b38e453efba462a25c | 8,000 | py | Python | phipkit/score.py | openvax/phipkit | 267a9b0bb3b79b3ff416e07ce390e43b84a02be4 | [
"Apache-2.0"
] | null | null | null | phipkit/score.py | openvax/phipkit | 267a9b0bb3b79b3ff416e07ce390e43b84a02be4 | [
"Apache-2.0"
] | null | null | null | phipkit/score.py | openvax/phipkit | 267a9b0bb3b79b3ff416e07ce390e43b84a02be4 | [
"Apache-2.0"
] | null | null | null | '''
Analyze PHiP-seq read counts matrix to generate enrichment-over-beads-only scores.
Algorithm sketch:
[I] For each bead-only sample:
[1] Bin the read counts across clones into some number of bins (default 50).
[2] For each set of clones c associated with each bin:
For each other sample s:
... | 34.934498 | 100 | 0.628375 |
a6468c6cb1584d9d4b7819179d568755b90ea133 | 619 | py | Python | ciphers/password_encryption.py | sulochanaviji/Python | 441d6fc1b0b50b04e3947cdab0384de09965eee1 | [
"MIT"
] | null | null | null | ciphers/password_encryption.py | sulochanaviji/Python | 441d6fc1b0b50b04e3947cdab0384de09965eee1 | [
"MIT"
] | null | null | null | ciphers/password_encryption.py | sulochanaviji/Python | 441d6fc1b0b50b04e3947cdab0384de09965eee1 | [
"MIT"
] | null | null | null | from passlib.context import CryptContext
#importing cryptcontext from passlib
pwd_context = CryptContext(
schemes=["pbkdf2_sha256"],
default="pbkdf2_sha256",
pbkdf2_sha256__default_rounds=30000
)
#A round is a part of the algorithm that runs many times in order to reduce "crackability".
pas... | 26.913043 | 91 | 0.780291 |
a64902e3f8f932d8557295852469583d5b782d2c | 233 | py | Python | src/basestation/const.py | jariz/basestation | 090acf2880e10a08667de85feab0fc3bdb375ada | [
"MIT"
] | 2 | 2021-07-04T11:39:44.000Z | 2022-01-20T18:57:53.000Z | src/basestation/const.py | jariz/basestation | 090acf2880e10a08667de85feab0fc3bdb375ada | [
"MIT"
] | null | null | null | src/basestation/const.py | jariz/basestation | 090acf2880e10a08667de85feab0fc3bdb375ada | [
"MIT"
] | null | null | null | SERVICE = "00001523-1212-efde-1523-785feabcd124"
PWR_CHARACTERISTIC = "00001525-1212-EFDE-1523-785FEABCD124"
IDENTIFY_CHARACTERISTIC = "00008421-1212-EFDE-1523-785FEABCD124"
PWR_ON = b"\x01"
PWR_STANDBY = b"\x00"
NAME_SUFFIX = "LHB-" | 38.833333 | 64 | 0.785408 |
a649eb74dba0e4238520088fa3858aec2514206f | 2,264 | py | Python | j.py | thatch/cloudmesh-iu | 903b897e8234904ea4637f6783e6c53fb9a3c7a8 | [
"Apache-2.0"
] | null | null | null | j.py | thatch/cloudmesh-iu | 903b897e8234904ea4637f6783e6c53fb9a3c7a8 | [
"Apache-2.0"
] | null | null | null | j.py | thatch/cloudmesh-iu | 903b897e8234904ea4637f6783e6c53fb9a3c7a8 | [
"Apache-2.0"
] | null | null | null | from cloudmesh.common.Shell import Shell
import subprocess
import asyncio
import sys
from subprocess import PIPE, Popen
import threading
from queue import Queue, Empty
import time
import os
import shlex
host = "r-003"
port = 9010
command = f'ssh juliet "ssh {host} ./ENV3/bin/jupyter-lab --ip localhost --port {port}"'
... | 29.789474 | 104 | 0.618816 |
a64ac3cbe97a0aa5dc2fd09b5e46340c1b456133 | 171 | py | Python | 12.HTM_Content/main.py | sarincr/Introduction-to-Flask-Web-framework | 69a703b3533b6b12f07712a5473b31176c25c9c7 | [
"MIT"
] | null | null | null | 12.HTM_Content/main.py | sarincr/Introduction-to-Flask-Web-framework | 69a703b3533b6b12f07712a5473b31176c25c9c7 | [
"MIT"
] | null | null | null | 12.HTM_Content/main.py | sarincr/Introduction-to-Flask-Web-framework | 69a703b3533b6b12f07712a5473b31176c25c9c7 | [
"MIT"
] | null | null | null | from flask import *
app = Flask(__name__)
if __name__ == '__main__':
app.run()
| 15.545455 | 47 | 0.625731 |
a64bbe192a36abeb0640fa965fed32d5ef6bad50 | 297 | py | Python | lib/data_coll/source_file.py | KentWangYQ/server-migration | 82b0eaac42db3eb697fd53b79d64bd0d39024842 | [
"MIT"
] | null | null | null | lib/data_coll/source_file.py | KentWangYQ/server-migration | 82b0eaac42db3eb697fd53b79d64bd0d39024842 | [
"MIT"
] | null | null | null | lib/data_coll/source_file.py | KentWangYQ/server-migration | 82b0eaac42db3eb697fd53b79d64bd0d39024842 | [
"MIT"
] | null | null | null | import os
import config
| 19.8 | 49 | 0.535354 |
a6517756a3a14e9acb42f1ecdbdc81a9baa0b501 | 888 | py | Python | utils.py | TobyBoyne/gogen-solver | 59f74591fe48bede8d7cff8f6460cfb74b8e3ebd | [
"MIT"
] | null | null | null | utils.py | TobyBoyne/gogen-solver | 59f74591fe48bede8d7cff8f6460cfb74b8e3ebd | [
"MIT"
] | null | null | null | utils.py | TobyBoyne/gogen-solver | 59f74591fe48bede8d7cff8f6460cfb74b8e3ebd | [
"MIT"
] | null | null | null | from string import ascii_lowercase
from itertools import product
# the letter z is not found in gogen puzzles
lowercase_letters = ascii_lowercase[:-1]
def get_connections(word_list):
"""Returns a dictionary of each letter in the alphabet, where the value is
a set of all the letters that are linked to it based on a... | 31.714286 | 75 | 0.727477 |
a6533118b46e76f56bec90a679a74b2a3469e5cd | 2,728 | py | Python | Utilities/MS_UT_Stack2Dir.py | JaneliaSciComp/MetaSegmenter | 6db3e8e26677b49be999773daee6ea475985df55 | [
"Unlicense"
] | null | null | null | Utilities/MS_UT_Stack2Dir.py | JaneliaSciComp/MetaSegmenter | 6db3e8e26677b49be999773daee6ea475985df55 | [
"Unlicense"
] | null | null | null | Utilities/MS_UT_Stack2Dir.py | JaneliaSciComp/MetaSegmenter | 6db3e8e26677b49be999773daee6ea475985df55 | [
"Unlicense"
] | null | null | null | #! /usr/local/python-2.7.6/bin/python
#
# Copyright (C) 2015 by Howard Hughes Medical Institute.
#
# Purpose: given a segmentation stack,
# produce a directory of RGB files
import os, sys, re, h5py
import tifffile as tiff
import numpy
from skimage.morphology import label
from scipy.ndimage import measurements
from sk... | 35.894737 | 100 | 0.603006 |
a6544ccff7f22122adea74703d79ead395520358 | 5,371 | py | Python | qa/L0_custom_legacy/custom_legacy_test.py | wiggin66/server | d32e253244be8539a087ba59fee5ab63f9f6a040 | [
"BSD-3-Clause"
] | 4 | 2021-06-02T02:37:53.000Z | 2022-01-20T19:32:57.000Z | qa/L0_custom_legacy/custom_legacy_test.py | wiggin66/server | d32e253244be8539a087ba59fee5ab63f9f6a040 | [
"BSD-3-Clause"
] | null | null | null | qa/L0_custom_legacy/custom_legacy_test.py | wiggin66/server | d32e253244be8539a087ba59fee5ab63f9f6a040 | [
"BSD-3-Clause"
] | 1 | 2021-12-17T03:07:54.000Z | 2021-12-17T03:07:54.000Z | #!/bin/bash
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of ... | 40.383459 | 83 | 0.633402 |
a6551b4d98c72a4734c14321b779357ef66e0ea1 | 811 | py | Python | testsuite/sesstion_test.py | olegvg/telebot | e37bce862518a1addaf1db4624a62eaf9dfc4afa | [
"MIT"
] | null | null | null | testsuite/sesstion_test.py | olegvg/telebot | e37bce862518a1addaf1db4624a62eaf9dfc4afa | [
"MIT"
] | null | null | null | testsuite/sesstion_test.py | olegvg/telebot | e37bce862518a1addaf1db4624a62eaf9dfc4afa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
from telebot.storage import EphemeralStorage
| 23.852941 | 51 | 0.664612 |
a65643a5cfe26a75ee90de2f3f498ab27ada61a1 | 1,856 | py | Python | logger.py | SoPudge/lib.py | 7e8e6cb76a1838c2af969bd1f3b7cf5ce6cb0441 | [
"MIT"
] | null | null | null | logger.py | SoPudge/lib.py | 7e8e6cb76a1838c2af969bd1f3b7cf5ce6cb0441 | [
"MIT"
] | null | null | null | logger.py | SoPudge/lib.py | 7e8e6cb76a1838c2af969bd1f3b7cf5ce6cb0441 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import logging
if __name__ == '__main__':
#kw = {'file_path':'N:\\005_Software','file_name':'abc.log'}
logger = Logger('mylog')
logger.info('this is in log')
| 26.898551 | 93 | 0.579741 |
a656d2bce16963a39c156a75a1c47bd702c5f92a | 965 | py | Python | monitor.py | TheRevanchist/rcnn_for_relab | c51dcb464f5485278cdecbe413b9e03819be0a12 | [
"MIT"
] | null | null | null | monitor.py | TheRevanchist/rcnn_for_relab | c51dcb464f5485278cdecbe413b9e03819be0a12 | [
"MIT"
] | null | null | null | monitor.py | TheRevanchist/rcnn_for_relab | c51dcb464f5485278cdecbe413b9e03819be0a12 | [
"MIT"
] | null | null | null | import numpy as np
| 29.242424 | 69 | 0.619689 |
a656dc09ee6ec9003928f2504f93fd239a261cd0 | 1,287 | py | Python | docs/examples/config_manager_test.py | tbeckham/DeploymentManager | c1b2ba47d1732859ff458eb934da671fb0dad37f | [
"Apache-2.0"
] | null | null | null | docs/examples/config_manager_test.py | tbeckham/DeploymentManager | c1b2ba47d1732859ff458eb934da671fb0dad37f | [
"Apache-2.0"
] | null | null | null | docs/examples/config_manager_test.py | tbeckham/DeploymentManager | c1b2ba47d1732859ff458eb934da671fb0dad37f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from config_manager.eucalyptus import Eucalyptus
from config_manager.eucalyptus.enterprise import Enterprise
from config_manager.eucalyptus.topology import Topology
from config_manager.eucalyptus.topology.cluster import Cluster
from config_manager.eucalyptus.topology.cluster.nodecontroller import ... | 35.75 | 84 | 0.742813 |
a657192a2a6097dd374a729b11c2e62a804c6b55 | 6,581 | py | Python | bin/postprocess-exe.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | 1 | 2021-09-15T10:10:26.000Z | 2021-09-15T10:10:26.000Z | bin/postprocess-exe.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | null | null | null | bin/postprocess-exe.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | 1 | 2021-06-11T15:29:43.000Z | 2021-06-11T15:29:43.000Z | #!/usr/bin/env python
from __future__ import print_function
from cosmosis.postprocessing.postprocess import postprocessor_for_sampler
from cosmosis.postprocessing.inputs import read_input
from cosmosis.postprocessing.plots import Tweaks
from cosmosis.runtime.utils import mkdir
import sys
import argparse
import os
par... | 53.072581 | 183 | 0.752925 |
a6571d51ba20f89c596630ca6b73cb59f6d6f6e4 | 224 | py | Python | Task 3.py | IsSveshuD/lab_10 | 7b6c6f69e9ee272e95300f325b1f1a251b3b07b6 | [
"MIT"
] | null | null | null | Task 3.py | IsSveshuD/lab_10 | 7b6c6f69e9ee272e95300f325b1f1a251b3b07b6 | [
"MIT"
] | null | null | null | Task 3.py | IsSveshuD/lab_10 | 7b6c6f69e9ee272e95300f325b1f1a251b3b07b6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding^ utf-8 -*-
if __name__ == '__main__':
print(t())
| 13.176471 | 26 | 0.446429 |
a658fb18c246abf8c825b53218e1569f28081bc2 | 2,592 | py | Python | MyPython/wifi-scanner.py | LairdStreak/MyPyPlayGround | e999cfd179d457a6d17c81bf1bacaa7c90e3e1dc | [
"MIT"
] | null | null | null | MyPython/wifi-scanner.py | LairdStreak/MyPyPlayGround | e999cfd179d457a6d17c81bf1bacaa7c90e3e1dc | [
"MIT"
] | null | null | null | MyPython/wifi-scanner.py | LairdStreak/MyPyPlayGround | e999cfd179d457a6d17c81bf1bacaa7c90e3e1dc | [
"MIT"
] | null | null | null | #!/usr/bin/python
from scapy.all import *
import sys
import signal
import os
#Function to handle Crtl+C
if __name__ == "__main__":
signal.signal(signal.SIGINT, signal_handler)
usage()
check_root()
parameters ={sys.argv[1]:sys.argv[2]}
if "mon" not in str(parameters["-i"]):
newiface = setup_monitor(parameters[... | 24 | 100 | 0.629244 |
a6592e64bf1d5f88b19a5726eb07a0d0e13e1847 | 1,715 | py | Python | setup.py | AmineSoukara/PyAnime4Up | 495c6123a60e28e8a447da4152793c9201729e6a | [
"MIT"
] | 2 | 2021-10-01T20:51:20.000Z | 2021-11-12T04:45:16.000Z | setup.py | AmineSoukara/PyAnime4Up | 495c6123a60e28e8a447da4152793c9201729e6a | [
"MIT"
] | null | null | null | setup.py | AmineSoukara/PyAnime4Up | 495c6123a60e28e8a447da4152793c9201729e6a | [
"MIT"
] | null | null | null | """
PyAnime4Up
~~~~~~~~~
:Copyright: (c) 2021 By Amine Soukara <https://github.com/AmineSoukara>.
:License: MIT, See LICENSE For More Details.
:Description: A Selenium-less Python Anime4Up Library
"""
from setuptools import find_packages, setup
AUTHOR = "AmineSoukara"
EMAIL = "AmineSoukara@gmail.com"
URL = "https://g... | 30.625 | 77 | 0.653061 |
a659c422f6fefeb24b335ffa862836f6bd0ada52 | 1,032 | py | Python | test/test_middleware.py | sunhailin-Leo/fastapi_apollo_middleware | 32351406141dbd87254efd4516288a556adbe72a | [
"MIT"
] | 2 | 2021-03-26T03:54:43.000Z | 2021-03-28T10:51:19.000Z | test/test_middleware.py | sunhailin-Leo/fastapi_apollo_middleware | 32351406141dbd87254efd4516288a556adbe72a | [
"MIT"
] | null | null | null | test/test_middleware.py | sunhailin-Leo/fastapi_apollo_middleware | 32351406141dbd87254efd4516288a556adbe72a | [
"MIT"
] | null | null | null | import time
import pytest
from fastapi import FastAPI
from fastapi.testclient import TestClient
from fastapi_apollo_middleware.middleware import (
FastAPIApolloMiddleware,
startup_apollo_cycle_task,
)
| 23.454545 | 71 | 0.669574 |
a65b05d80f7724fcec88f7d9e34cf1ea27153013 | 545 | py | Python | metadata-ingestion/src/datahub/ingestion/source/bigquery.py | qumingxing/datahub | 1b96cd8c2665f17fbda1c523ea55f9db0c4ae77b | [
"Apache-2.0"
] | null | null | null | metadata-ingestion/src/datahub/ingestion/source/bigquery.py | qumingxing/datahub | 1b96cd8c2665f17fbda1c523ea55f9db0c4ae77b | [
"Apache-2.0"
] | null | null | null | metadata-ingestion/src/datahub/ingestion/source/bigquery.py | qumingxing/datahub | 1b96cd8c2665f17fbda1c523ea55f9db0c4ae77b | [
"Apache-2.0"
] | null | null | null | from typing import Optional
from .sql_common import SQLAlchemyConfig, SQLAlchemySource
| 24.772727 | 58 | 0.710092 |
a65cc33c30371070823025c24bcfdcb3d64f61dc | 655 | py | Python | HW/final/test/preprocess.py | houzeyu2683/IRRHW | c44298ad14c468eff36bc75ebc63abdc9ba24d55 | [
"Apache-2.0"
] | null | null | null | HW/final/test/preprocess.py | houzeyu2683/IRRHW | c44298ad14c468eff36bc75ebc63abdc9ba24d55 | [
"Apache-2.0"
] | null | null | null | HW/final/test/preprocess.py | houzeyu2683/IRRHW | c44298ad14c468eff36bc75ebc63abdc9ba24d55 | [
"Apache-2.0"
] | 1 | 2022-01-16T03:40:34.000Z | 2022-01-16T03:40:34.000Z |
import pandas
'''
term document matrix
'''
information = pandas.read_csv("csv/information.csv")
import text
vocabulary = text.vocabulary()
vocabulary.build(content = information['abstract'], title=information['title_e'])
matrix = pandas.DataFrame(vocabulary.frequency, dtype='int')
matrix.index = vocabulary.ter... | 22.586207 | 89 | 0.757252 |
a65d8a9e5583c81d0cc550a14888526c903f8d10 | 5,039 | py | Python | fai/files.py | st31ny/pyfai | e81aa4b6a62bb4b5f27b5dc7e83dc2fa93862846 | [
"MIT"
] | 2 | 2021-12-20T00:47:06.000Z | 2021-12-21T15:04:42.000Z | fai/files.py | st31ny/pyfai | e81aa4b6a62bb4b5f27b5dc7e83dc2fa93862846 | [
"MIT"
] | null | null | null | fai/files.py | st31ny/pyfai | e81aa4b6a62bb4b5f27b5dc7e83dc2fa93862846 | [
"MIT"
] | null | null | null | """ File Handling
=============
Pyfai strictly differentiates between virtual paths in the target system
(:any:`TargetPath`) and physical paths in the installer system
(:any:`InstallerPath`). While the former are always rooted in the target
system's filesystem root, only the latter can be resolved ... | 33.593333 | 86 | 0.670173 |
a65e4a75490f93c29d34c895001bf593d4b147ba | 1,595 | py | Python | libs/openldap/openldap.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | 14 | 2017-09-04T09:01:03.000Z | 2022-01-04T20:09:00.000Z | libs/openldap/openldap.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | 14 | 2017-12-15T08:11:22.000Z | 2020-12-29T19:11:13.000Z | libs/openldap/openldap.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | 19 | 2017-09-05T19:16:21.000Z | 2020-10-18T12:46:06.000Z | import info
from Package.CMakePackageBase import *
# self.subinfo.options.configure.args = "-DBUILD_TOOL=ON -DBUILD_TESTS=ON "
| 43.108108 | 103 | 0.64326 |
a65e59791dc58d5a43721bf93a162bd5c1d59c87 | 4,610 | py | Python | cogs/fun/cog.py | uselessvevo/bonny-biboni-bot | ad6d0dc9e688dc9264638103bd07c8a95c2aaa56 | [
"MIT"
] | null | null | null | cogs/fun/cog.py | uselessvevo/bonny-biboni-bot | ad6d0dc9e688dc9264638103bd07c8a95c2aaa56 | [
"MIT"
] | null | null | null | cogs/fun/cog.py | uselessvevo/bonny-biboni-bot | ad6d0dc9e688dc9264638103bd07c8a95c2aaa56 | [
"MIT"
] | null | null | null | """
Description: Old fun module. Will be rewritten
Version: 0620/prototype
Author: useless_vevo
"""
# Standard library
import os
import hashlib
import requests
from io import BytesIO
# Discord
import discord
from discord.ext import commands
# Pillow/PIL
from PIL import Image
from PIL import ImageFont
from PIL import... | 35.736434 | 92 | 0.565727 |
a65ef392a6bb4a69f0aea268aa1ebea4dbe1f81a | 2,271 | py | Python | download/gnosis/xml/pickle/test/test_paranoia.py | DavidMertz/gnosis-web | df5ab0d470a02ed6c51c971f2b40f1dcdc7d7350 | [
"CC0-1.0"
] | null | null | null | download/gnosis/xml/pickle/test/test_paranoia.py | DavidMertz/gnosis-web | df5ab0d470a02ed6c51c971f2b40f1dcdc7d7350 | [
"CC0-1.0"
] | null | null | null | download/gnosis/xml/pickle/test/test_paranoia.py | DavidMertz/gnosis-web | df5ab0d470a02ed6c51c971f2b40f1dcdc7d7350 | [
"CC0-1.0"
] | null | null | null | "Test that the PARANOIA setting works --fpm"
import gnosis.xml.pickle as xml_pickle
from gnosis.xml.pickle.util import \
setParanoia, getParanoia, add_class_to_store
import funcs
funcs.set_parser()
ud_xml = """<?xml version="1.0"?>
<!DOCTYPE PyObject SYSTEM "PyObjects.dtd">
<PyObject module="UserDict" class="Us... | 19.747826 | 60 | 0.660942 |
a6641926389cb84ab0fd992f95aedcd6c3ef503b | 1,079 | py | Python | tests/test_regions.py | luigialberti/pytriangle | 99ecafc299a692ef0f33e262bc7a1c912d3aa694 | [
"MIT"
] | null | null | null | tests/test_regions.py | luigialberti/pytriangle | 99ecafc299a692ef0f33e262bc7a1c912d3aa694 | [
"MIT"
] | null | null | null | tests/test_regions.py | luigialberti/pytriangle | 99ecafc299a692ef0f33e262bc7a1c912d3aa694 | [
"MIT"
] | null | null | null | import math
import triangle
import numpy
pointBoundary = [ (-1, -1),
(-1, 1.0),
( 0, 1.0),
( 0, -1),
( 1, 1),
( 1, -3)]
points = pointBoundary
segs = [(0, 1),(1, 2),(2, 3),(3, 0), (2, 4), (4, 5), (5, 3)]
# these are ph... | 22.957447 | 77 | 0.586654 |
a66424d83bcda18d8f44b788187e695f8de567b5 | 183 | py | Python | utilities/colormap/prepare_arduino_colormap.py | gauravmm/Remote-Temperature-Monitor | e3695a44dc30e5c013871e303ae8f6fdf481bf04 | [
"MIT"
] | null | null | null | utilities/colormap/prepare_arduino_colormap.py | gauravmm/Remote-Temperature-Monitor | e3695a44dc30e5c013871e303ae8f6fdf481bf04 | [
"MIT"
] | null | null | null | utilities/colormap/prepare_arduino_colormap.py | gauravmm/Remote-Temperature-Monitor | e3695a44dc30e5c013871e303ae8f6fdf481bf04 | [
"MIT"
] | null | null | null | import colormaps as cmaps
cmap = cmaps._inferno_data;
for i,r in enumerate(cmap):
if i % 2 == 0:
print "{%s}," % ",\t".join(str(int(round(v * 255))) for v in r);
| 22.875 | 73 | 0.557377 |
a665215b275a48c5f84ca29a35c2258cf294cefc | 4,703 | py | Python | src/Tester.py | ujjawalmisra/json-ws-test | bece383d414c12b8827afc59da5c7a98d4c46b0f | [
"MIT"
] | 1 | 2017-02-09T14:52:25.000Z | 2017-02-09T14:52:25.000Z | src/Tester.py | ujjawalmisra/json-ws-test | bece383d414c12b8827afc59da5c7a98d4c46b0f | [
"MIT"
] | null | null | null | src/Tester.py | ujjawalmisra/json-ws-test | bece383d414c12b8827afc59da5c7a98d4c46b0f | [
"MIT"
] | null | null | null | import argparse
import json
import pprint
import Logger
from executors.EndLoopExecutor import EndLoopExecutor
from executors.ExecutorFactory import ExecutorFactory
from DictUtils import DictUtils
#--------------------------------
# [main]
#--------------------------------
parser = argparse.ArgumentParser()
parser.... | 37.624 | 94 | 0.51818 |
a6656df6119176760b7920afa00e05c68143461d | 6,448 | py | Python | herald.py | z33kz33k/warriors | 7730557a0770058419b7b8d36888d9b5d883e066 | [
"MIT"
] | null | null | null | herald.py | z33kz33k/warriors | 7730557a0770058419b7b8d36888d9b5d883e066 | [
"MIT"
] | null | null | null | herald.py | z33kz33k/warriors | 7730557a0770058419b7b8d36888d9b5d883e066 | [
"MIT"
] | null | null | null | """
Functions bundled in this module make various announcements about the current game state to the standard output
"""
import math
| 45.408451 | 299 | 0.623604 |
a6663eeb6a9d4fc56840a93b4bd7b39452405d4b | 68 | py | Python | AKDSFramework/__init__.py | DeepNet-Research/AKDSFramework | a0b9fc2466b228ea6053b9f03e1d497462567a96 | [
"MIT"
] | 13 | 2020-11-03T00:07:43.000Z | 2021-12-31T04:18:03.000Z | AKDSFramework/__init__.py | DeepNet-Research/AKDSFramework | a0b9fc2466b228ea6053b9f03e1d497462567a96 | [
"MIT"
] | 2 | 2021-03-06T12:20:33.000Z | 2021-03-07T04:26:29.000Z | AKDSFramework/__init__.py | DeepNet-Research/AKDSFramework | a0b9fc2466b228ea6053b9f03e1d497462567a96 | [
"MIT"
] | 2 | 2020-11-03T23:13:53.000Z | 2021-02-24T13:16:02.000Z | from . import structure, applications, error
__version__ = '1.0.0'
| 17 | 44 | 0.735294 |
a666a0e5f19e2e19dcb19fdfde8d96921a4a61f8 | 9,912 | py | Python | tests/test_as_json_p.py | malexer/flask-json | ef7c20f9f5e9bc82f13243290df1eddb3733738c | [
"BSD-3-Clause"
] | 41 | 2015-04-23T21:33:26.000Z | 2021-12-10T01:25:16.000Z | tests/test_as_json_p.py | malexer/flask-json | ef7c20f9f5e9bc82f13243290df1eddb3733738c | [
"BSD-3-Clause"
] | 7 | 2015-09-27T06:34:12.000Z | 2021-11-21T04:44:33.000Z | tests/test_as_json_p.py | malexer/flask-json | ef7c20f9f5e9bc82f13243290df1eddb3733738c | [
"BSD-3-Clause"
] | 18 | 2015-09-26T12:11:20.000Z | 2021-07-02T16:21:22.000Z | """
This module provides tests for @as_json_p() decorator.
"""
import sys
import pytest
from werkzeug.exceptions import BadRequest
from flask import Response, json
from flask_json import json_response, _json_p_handler, as_json_p
# Helper function to make a request.
def req(app, *args, **kwargs):
return app.test_... | 39.177866 | 79 | 0.55801 |
a666e2b483e7e338818d32db2cd3f68b92fb8795 | 7,504 | py | Python | tests/L0/run_transformer/run_gpt_minimal_test.py | jpool-nv/apex | d36397d2b8ce5c8854997e4ec2828e056e8fda89 | [
"BSD-3-Clause"
] | null | null | null | tests/L0/run_transformer/run_gpt_minimal_test.py | jpool-nv/apex | d36397d2b8ce5c8854997e4ec2828e056e8fda89 | [
"BSD-3-Clause"
] | null | null | null | tests/L0/run_transformer/run_gpt_minimal_test.py | jpool-nv/apex | d36397d2b8ce5c8854997e4ec2828e056e8fda89 | [
"BSD-3-Clause"
] | 1 | 2021-12-20T00:49:01.000Z | 2021-12-20T00:49:01.000Z | from functools import partial
from typing import List
import time
import torch
from apex.transformer import parallel_state
from apex.transformer.tensor_parallel import model_parallel_cuda_manual_seed
from apex.transformer.pipeline_parallel.utils import setup_microbatch_calculator
from apex.transformer.pipeli... | 38.482051 | 244 | 0.678971 |
a667624b7f6ad6a76fa1c32f9b8be7619f67e985 | 92 | py | Python | test.py | towarischtsch/siproll | e3efd5f874d8ccb2c89a2947418759e447403861 | [
"MIT"
] | 1 | 2020-08-07T00:32:21.000Z | 2020-08-07T00:32:21.000Z | test.py | towarischtsch/siproll | e3efd5f874d8ccb2c89a2947418759e447403861 | [
"MIT"
] | null | null | null | test.py | towarischtsch/siproll | e3efd5f874d8ccb2c89a2947418759e447403861 | [
"MIT"
] | null | null | null | import siproll
import sys
siproll.do_call("sip:"+ sys.argv[1] + "@voip.eventphone.de", 60)
| 18.4 | 64 | 0.706522 |
a6686f130b7b18b5246514e791fb407dc6aced56 | 8,143 | py | Python | src/04/bayes.py | LittleNewton/Data_Mining_Report | 4f91c238cdb2faa733af0de332beea0964cc2caf | [
"Apache-2.0"
] | 1 | 2020-10-29T13:33:57.000Z | 2020-10-29T13:33:57.000Z | src/04/bayes.py | LittleNewton/Data_Mining_Report | 4f91c238cdb2faa733af0de332beea0964cc2caf | [
"Apache-2.0"
] | null | null | null | src/04/bayes.py | LittleNewton/Data_Mining_Report | 4f91c238cdb2faa733af0de332beea0964cc2caf | [
"Apache-2.0"
] | null | null | null | # Load libraries
import pandas
import numpy as np
import scipy.stats as stats
import matplotlib.pyplot as plt
from sklearn import model_selection #
from sklearn.naive_bayes import GaussianNB
bayes = Bayes_Test()
dataset = bayes.load_dataset()
#
X_train, X_validation, Y_train, Y_validation = bayes.split_out_datas... | 31.319231 | 91 | 0.518728 |
a66b9ccf2bf348065b63a0f36a81c1cbb5d98f94 | 2,175 | py | Python | SampleFunctionAPI/services/dummy_data.py | ms-us-rcg-app-innovation/secure-retail-chat-bot | 486c35ca1a0e63dfcbf8f1ad46081f7f3ffc9f44 | [
"MIT"
] | null | null | null | SampleFunctionAPI/services/dummy_data.py | ms-us-rcg-app-innovation/secure-retail-chat-bot | 486c35ca1a0e63dfcbf8f1ad46081f7f3ffc9f44 | [
"MIT"
] | null | null | null | SampleFunctionAPI/services/dummy_data.py | ms-us-rcg-app-innovation/secure-retail-chat-bot | 486c35ca1a0e63dfcbf8f1ad46081f7f3ffc9f44 | [
"MIT"
] | null | null | null | data = {
"recent_sales": [
{
"id": 1,
"item": 'shirt',
"size": 'large',
"color": 'blue',
"price": '13.99'
},
{
"id": 2,
"item": 'shirt',
"size": 'large',
"color": 'orange',
"price": '15.99'
},
{
"i... | 19.419643 | 49 | 0.388046 |
a66b9f7d8fd4fa6e0e8466e1fbc8a8bfb48006d8 | 1,695 | py | Python | tests/unit/test_binary_tree.py | ali92hm/data-structure-implementation | c0b0bd7d711db3085312565dc509c6d8efad03fa | [
"MIT"
] | null | null | null | tests/unit/test_binary_tree.py | ali92hm/data-structure-implementation | c0b0bd7d711db3085312565dc509c6d8efad03fa | [
"MIT"
] | null | null | null | tests/unit/test_binary_tree.py | ali92hm/data-structure-implementation | c0b0bd7d711db3085312565dc509c6d8efad03fa | [
"MIT"
] | null | null | null | import pytest
from data_structure_implementation.binary_tree import BinaryTree, BinaryTreeNode
| 36.847826 | 82 | 0.639528 |
a66d35e9c6f79553a73555c39661a31163d7a94c | 16,851 | py | Python | src/auth/wxapi/wechat_api.py | zeroleo12345/authen | 700e5b6842aecc61c0a3f96bd5ef480fbeecbc46 | [
"MIT"
] | null | null | null | src/auth/wxapi/wechat_api.py | zeroleo12345/authen | 700e5b6842aecc61c0a3f96bd5ef480fbeecbc46 | [
"MIT"
] | null | null | null | src/auth/wxapi/wechat_api.py | zeroleo12345/authen | 700e5b6842aecc61c0a3f96bd5ef480fbeecbc46 | [
"MIT"
] | 1 | 2019-11-13T05:59:35.000Z | 2019-11-13T05:59:35.000Z | #coding:utf-8
import sys
import traceback
import time
import datetime
import pytz
import base64
import binascii
import hashlib
#
from flask import Flask, request, redirect, jsonify, session, abort, render_template, Response
from decouple import config
#
from mybase.mylog3 import log
from mybase.myencrypt2 import enc... | 46.808333 | 499 | 0.600142 |
a66da1cf042e3419a188397e4e43b785aa423282 | 935 | py | Python | main.py | TheRockerfly/weather_app | 60e9dd8e535c0dfc318c8064bce6b31492943e93 | [
"MIT"
] | null | null | null | main.py | TheRockerfly/weather_app | 60e9dd8e535c0dfc318c8064bce6b31492943e93 | [
"MIT"
] | 1 | 2021-06-02T01:44:04.000Z | 2021-06-02T01:44:04.000Z | main.py | TheRockerfly/weather_app | 60e9dd8e535c0dfc318c8064bce6b31492943e93 | [
"MIT"
] | null | null | null | from pprint import pprint as pp
from flask import Flask, render_template, request
from module.weather import query_api
app = Flask(__name__)
if __name__ == '__main__':
app.run(debug=True)
| 25.27027 | 80 | 0.571123 |
a66e33c225390d6454c298d14ea6a0904b017ead | 426 | py | Python | challengenews/migrations/0005_alter_articles_slug.py | scpaes/jungledevs-challenge | 188bc7a4aacbb278a9486c57685db53be0477d51 | [
"MIT"
] | null | null | null | challengenews/migrations/0005_alter_articles_slug.py | scpaes/jungledevs-challenge | 188bc7a4aacbb278a9486c57685db53be0477d51 | [
"MIT"
] | 6 | 2021-08-10T02:19:35.000Z | 2021-08-10T02:24:05.000Z | challengenews/migrations/0005_alter_articles_slug.py | scpaes/jungledevs-challenge | 188bc7a4aacbb278a9486c57685db53be0477d51 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.6 on 2021-08-15 04:36
from django.db import migrations, models
| 22.421053 | 89 | 0.610329 |
a66f409d426b89c09b0d5bd141819f3ea9e8e14f | 5,094 | py | Python | gocardless_pro/services/customer_bank_accounts_service.py | gdvalderrama/gocardless-pro-python | 0ff8001f5bba11673c4fa0f30d26eca61a1219ba | [
"MIT"
] | null | null | null | gocardless_pro/services/customer_bank_accounts_service.py | gdvalderrama/gocardless-pro-python | 0ff8001f5bba11673c4fa0f30d26eca61a1219ba | [
"MIT"
] | null | null | null | gocardless_pro/services/customer_bank_accounts_service.py | gdvalderrama/gocardless-pro-python | 0ff8001f5bba11673c4fa0f30d26eca61a1219ba | [
"MIT"
] | null | null | null | # WARNING: Do not edit by hand, this file was generated by Crank:
#
# https://github.com/gocardless/crank
#
from . import base_service
from .. import resources
from ..paginator import Paginator
from .. import errors
| 31.060976 | 90 | 0.586965 |
a66ffc143e72f7f83e2cb123a1a619264f32be49 | 295 | py | Python | datasets/mmdet_tusimple/mmdet/core/bbox/iou_calculators/__init__.py | Jinming-Su/SGNet | fcf35edaf332c1a4e2713acad5a0fc0e21509c3e | [
"MIT"
] | 13 | 2021-10-15T15:14:45.000Z | 2022-03-09T00:22:55.000Z | datasets/mmdet_tusimple/mmdet/core/bbox/iou_calculators/__init__.py | Jinming-Su/SGNet | fcf35edaf332c1a4e2713acad5a0fc0e21509c3e | [
"MIT"
] | 4 | 2021-10-17T09:04:20.000Z | 2022-03-25T06:43:00.000Z | datasets/mmdet_tusimple/mmdet/core/bbox/iou_calculators/__init__.py | Jinming-Su/SGNet | fcf35edaf332c1a4e2713acad5a0fc0e21509c3e | [
"MIT"
] | 2 | 2021-11-17T11:31:35.000Z | 2021-11-29T06:50:35.000Z | from .builder import build_iou_calculator
from .iou2d_calculator import BboxOverlaps2D, bbox_overlaps
from .dis_calculator import Dis, bbox_dis
from .riou_calculator import RboxOverlaps2D
__all__ = ['build_iou_calculator', 'BboxOverlaps2D', 'bbox_overlaps', 'Dis', 'bbox_dis', 'RboxOverlaps2D']
| 49.166667 | 106 | 0.823729 |
a67191887ff2e4cbe5a722f8867e0bdf2eaf5490 | 1,256 | py | Python | audio/tests/backends/base.py | jerryuhoo/PaddleSpeech | 1eec7b5e042da294c7524af92f0fae4c32a71aa3 | [
"Apache-2.0"
] | 1,379 | 2021-11-10T02:42:21.000Z | 2022-03-31T13:34:25.000Z | audio/tests/backends/base.py | jerryuhoo/PaddleSpeech | 1eec7b5e042da294c7524af92f0fae4c32a71aa3 | [
"Apache-2.0"
] | 268 | 2021-11-10T14:07:34.000Z | 2022-03-31T02:25:20.000Z | audio/tests/backends/base.py | jerryuhoo/PaddleSpeech | 1eec7b5e042da294c7524af92f0fae4c32a71aa3 | [
"Apache-2.0"
] | 296 | 2021-11-15T02:37:11.000Z | 2022-03-31T12:14:46.000Z | # Copyright (c) 2022 PaddlePaddle 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 appli... | 35.885714 | 77 | 0.725318 |
a671fe0e76961bcf5c4e0d73d1fd01eb4c998058 | 6,091 | py | Python | 07keras/09fasttext_multi_classification.py | KEVINYZY/python-tutorial | ae43536908eb8af56c34865f52a6e8644edc4fa3 | [
"Apache-2.0"
] | 2 | 2021-01-04T10:44:44.000Z | 2022-02-13T07:53:41.000Z | 07keras/09fasttext_multi_classification.py | zm79287/python-tutorial | d0f7348e1da4ff954e3add66e1aae55d599283ee | [
"Apache-2.0"
] | null | null | null | 07keras/09fasttext_multi_classification.py | zm79287/python-tutorial | d0f7348e1da4ff954e3add66e1aae55d599283ee | [
"Apache-2.0"
] | 2 | 2020-11-23T08:58:51.000Z | 2022-02-13T07:53:42.000Z | # -*- coding: utf-8 -*-
# Author: XuMing <xuming624@qq.com>
# Brief: This example demonstrates the use of fasttext for text classification
# Bi-gram : 0.9056 test accuracy after 5 epochs.
import os
import keras
import numpy as np
from keras.layers import Dense
from keras.layers import Embedding
from keras.layers impor... | 34.805714 | 102 | 0.67099 |
a673b3a3ead6195386323a5ae506ff90585ffcf7 | 529 | py | Python | tests/deployment/test_deployment.py | ChristianHinge/ml_ops_project_lectures | 34c8cd222526d1af0db3998bfc993fbdccef5b16 | [
"MIT"
] | null | null | null | tests/deployment/test_deployment.py | ChristianHinge/ml_ops_project_lectures | 34c8cd222526d1af0db3998bfc993fbdccef5b16 | [
"MIT"
] | null | null | null | tests/deployment/test_deployment.py | ChristianHinge/ml_ops_project_lectures | 34c8cd222526d1af0db3998bfc993fbdccef5b16 | [
"MIT"
] | null | null | null | import requests
import json
import torch
import numpy as np
x_new = np.zeros((1,1,28,28))
# Convert the array to a serializable list in a JSON document
input_json = json.dumps({"data": x_new.tolist()})
# Set the content type
headers = { 'Content-Type':'application/json' }
predictions = requests.post("http://127.0.0.... | 29.388889 | 89 | 0.727788 |
a67495135f219838eddc7cc161b252690978c0c7 | 3,943 | py | Python | app.py | yeojin-dev/leo | 20e4bd7dbd409bee8ff26a713f83cfb3d0a443ba | [
"MIT"
] | null | null | null | app.py | yeojin-dev/leo | 20e4bd7dbd409bee8ff26a713f83cfb3d0a443ba | [
"MIT"
] | null | null | null | app.py | yeojin-dev/leo | 20e4bd7dbd409bee8ff26a713f83cfb3d0a443ba | [
"MIT"
] | null | null | null | import datetime
import os
import uuid
from urllib.parse import urlparse
import slack
from flask import (
Flask,
jsonify,
render_template,
request,
send_from_directory,
)
from flask.cli import load_dotenv
from pymongo import MongoClient
from pytz import timezone
app = Flask(__name__)
load_dotenv()
... | 33.134454 | 103 | 0.67512 |
a675137fe059ab035f6c8c74928e31aa79eec616 | 961 | py | Python | scrapy_store_project/goods/tasks.py | MaksNech/pylab2018_ht_22 | 5c862b23203e93bf4cbdf5f1e5777f29052f2f69 | [
"MIT"
] | null | null | null | scrapy_store_project/goods/tasks.py | MaksNech/pylab2018_ht_22 | 5c862b23203e93bf4cbdf5f1e5777f29052f2f69 | [
"MIT"
] | 10 | 2020-02-11T23:54:49.000Z | 2022-03-11T23:42:36.000Z | scrapy_store_project/goods/tasks.py | MaksNech/pylab2018_ht_22 | 5c862b23203e93bf4cbdf5f1e5777f29052f2f69 | [
"MIT"
] | 1 | 2020-12-02T09:32:19.000Z | 2020-12-02T09:32:19.000Z | import requests
import tempfile
from celery.task import task
from django.core import files
from celery.utils.log import get_task_logger
from .models import Bag
logger = get_task_logger(__name__)
| 24.025 | 58 | 0.591051 |
a6753cc917302d9905a242a41ec0d71e8e1a5d5d | 1,408 | py | Python | core/migrations/0002_foodweight.py | MakuZo/nutrigo | e50e10d497bcf9e01294565d42012d777f5c98d0 | [
"MIT"
] | 30 | 2019-03-28T18:01:58.000Z | 2022-02-26T02:19:28.000Z | core/migrations/0002_foodweight.py | MakuZo/nutrigo | e50e10d497bcf9e01294565d42012d777f5c98d0 | [
"MIT"
] | 8 | 2019-06-06T19:33:08.000Z | 2022-02-10T13:10:34.000Z | core/migrations/0002_foodweight.py | MakuZo/nutrigo | e50e10d497bcf9e01294565d42012d777f5c98d0 | [
"MIT"
] | 10 | 2019-04-04T19:19:28.000Z | 2021-06-05T05:29:40.000Z | # Generated by Django 2.1.5 on 2019-02-09 18:55
import django.db.models.deletion
from django.db import migrations, models
| 32 | 83 | 0.440341 |
a67579557fd6c58769b6d554c5405a8d2d779881 | 236 | py | Python | tests/unit/cli/conftest.py | trainML/trainml-cli | 3065ed4cacf415964bcfc8c3854dd8acbc3729c5 | [
"MIT"
] | 1 | 2021-02-11T16:08:05.000Z | 2021-02-11T16:08:05.000Z | tests/unit/cli/conftest.py | trainML/trainml-cli | 3065ed4cacf415964bcfc8c3854dd8acbc3729c5 | [
"MIT"
] | 1 | 2021-05-04T00:20:28.000Z | 2021-07-07T16:21:35.000Z | tests/unit/cli/conftest.py | trainML/trainml-cli | 3065ed4cacf415964bcfc8c3854dd8acbc3729c5 | [
"MIT"
] | null | null | null | from click.testing import CliRunner
from pytest import fixture, mark
from unittest.mock import Mock, AsyncMock, patch, create_autospec
pytestmark = [mark.cli,mark.unit] | 21.454545 | 65 | 0.762712 |
a6762cb2023d77e741f45f1530edf25cc49e8843 | 2,835 | py | Python | bokeh-app/main.py | jdkent/hrfViz | ab9cf3587cd8387388550f3bef3086ff866a7559 | [
"BSD-3-Clause"
] | null | null | null | bokeh-app/main.py | jdkent/hrfViz | ab9cf3587cd8387388550f3bef3086ff866a7559 | [
"BSD-3-Clause"
] | null | null | null | bokeh-app/main.py | jdkent/hrfViz | ab9cf3587cd8387388550f3bef3086ff866a7559 | [
"BSD-3-Clause"
] | null | null | null | ''' Present an interactive function explorer with slider widgets.
Scrub the sliders to change the properties of the ``hrf`` curve, or
type into the title text box to update the title of the plot.
Use the ``bokeh serve`` command to run the example by executing:
bokeh serve sliders.py
at your command prompt. Then nav... | 33.75 | 96 | 0.699824 |
a67778c67ef1eefa67194e04daebceb9183fd006 | 682 | py | Python | python-leetcode/laozhang/tree/leetcode_814_.py | sweeneycai/cs-summary-reflection | c4220b153baa6b1b93a11c7e5637d42e3429481f | [
"Apache-2.0"
] | 227 | 2019-04-09T00:36:00.000Z | 2022-03-29T05:05:03.000Z | python-leetcode/laozhang/tree/leetcode_814_.py | sweeneycai/cs-summary-reflection | c4220b153baa6b1b93a11c7e5637d42e3429481f | [
"Apache-2.0"
] | 139 | 2019-06-14T01:53:11.000Z | 2022-02-16T11:08:40.000Z | python-leetcode/laozhang/tree/leetcode_814_.py | sweeneycai/cs-summary-reflection | c4220b153baa6b1b93a11c7e5637d42e3429481f | [
"Apache-2.0"
] | 89 | 2019-04-10T07:00:54.000Z | 2022-03-23T01:36:03.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# coding=utf-8
"""
814.
"""
from laozhang import TreeNode
| 28.416667 | 107 | 0.530792 |
a6777a5db732418a0a72fdae43c10c8041048b60 | 4,816 | py | Python | .pyinstaller/run_astropy_tests.py | lmichel/astropy | 67f944f6145ae4899e7bf6e335ffcb24c9493ac3 | [
"BSD-3-Clause"
] | null | null | null | .pyinstaller/run_astropy_tests.py | lmichel/astropy | 67f944f6145ae4899e7bf6e335ffcb24c9493ac3 | [
"BSD-3-Clause"
] | null | null | null | .pyinstaller/run_astropy_tests.py | lmichel/astropy | 67f944f6145ae4899e7bf6e335ffcb24c9493ac3 | [
"BSD-3-Clause"
] | null | null | null | import os
import shutil
import sys
import erfa # noqa
import pytest
import astropy # noqa
if len(sys.argv) == 3 and sys.argv[1] == '--astropy-root':
ROOT = sys.argv[2]
else:
# Make sure we don't allow any arguments to be passed - some tests call
# sys.executable which becomes this script when producing... | 44.592593 | 95 | 0.648463 |
a67b1d8de6adb0040480f42eafab24154419c297 | 425 | py | Python | encrypt_decrypt_app/migrations/0019_auto_20200727_0833.py | Chika-Jinanwa/chikas-cipher | 91e7139f11132c885bd8872d705ffe3d0ca51b7d | [
"MIT"
] | null | null | null | encrypt_decrypt_app/migrations/0019_auto_20200727_0833.py | Chika-Jinanwa/chikas-cipher | 91e7139f11132c885bd8872d705ffe3d0ca51b7d | [
"MIT"
] | 9 | 2021-03-30T14:05:43.000Z | 2022-03-12T00:44:58.000Z | encrypt_decrypt_app/migrations/0019_auto_20200727_0833.py | Chika-Jinanwa/chikas-cipher | 91e7139f11132c885bd8872d705ffe3d0ca51b7d | [
"MIT"
] | null | null | null | # Generated by Django 3.0.8 on 2020-07-27 15:33
from django.db import migrations, models
| 22.368421 | 74 | 0.616471 |
a67cead0877f8b98f05986d181f9f977da542551 | 333 | py | Python | analyzer/migrations/0006_remove_attachment_added_by.py | JackShen1/sentimento-web | 19d1973c555fe7d8b745d5ce23555c0fd8c479e2 | [
"MIT"
] | 1 | 2021-04-02T10:00:28.000Z | 2021-04-02T10:00:28.000Z | analyzer/migrations/0006_remove_attachment_added_by.py | JackShen1/sentimento-web | 19d1973c555fe7d8b745d5ce23555c0fd8c479e2 | [
"MIT"
] | null | null | null | analyzer/migrations/0006_remove_attachment_added_by.py | JackShen1/sentimento-web | 19d1973c555fe7d8b745d5ce23555c0fd8c479e2 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-04-26 10:27
from django.db import migrations
| 18.5 | 48 | 0.600601 |
a680b15fd060d64cf9e6fa6cd3e6835e870e01ee | 5,109 | py | Python | DataManagements/UserCatesDBManagement.py | CHUht/Hangout_Recommendations | 477752da8259e821bb58487cdb9d483a6b208a3f | [
"MIT"
] | 2 | 2020-02-03T22:08:15.000Z | 2021-03-11T18:37:47.000Z | DataManagements/UserCatesDBManagement.py | CHUht/Hangout_Recommendations_Back_End | 477752da8259e821bb58487cdb9d483a6b208a3f | [
"MIT"
] | null | null | null | DataManagements/UserCatesDBManagement.py | CHUht/Hangout_Recommendations_Back_End | 477752da8259e821bb58487cdb9d483a6b208a3f | [
"MIT"
] | null | null | null | import sqlite3
from DataManagements.BackendAPIStaticList import singleton
from DataManagements.BackendAPIStaticList import cate_map
if __name__ == "__main__":
userCatesManager = UserCatesManager()
# userCatesManager.insert_user_tags(0,[1,4,13])
userCatesManager.insert_user_cates(0,{1,5,12})
userCatesMa... | 30.963636 | 83 | 0.562145 |
a683a3c1e348a3f60fd5ed371539e1911665f6e6 | 2,255 | py | Python | pupillae/fons/generator/dice_roller.py | chomouri/pupillae | 7c178eee78e5bff224c8982ca0a3674ea8830e55 | [
"MIT"
] | null | null | null | pupillae/fons/generator/dice_roller.py | chomouri/pupillae | 7c178eee78e5bff224c8982ca0a3674ea8830e55 | [
"MIT"
] | null | null | null | pupillae/fons/generator/dice_roller.py | chomouri/pupillae | 7c178eee78e5bff224c8982ca0a3674ea8830e55 | [
"MIT"
] | null | null | null | import random
import re
# Third-party modules:
# Local modules:
# Function WAI:
def roll_3d6():
"""Rolls 3d6"""
total = 0
for i in range(3):
roll = random.randint(1, 6)
# print(f"Rolling 1d6: {roll}")
total += roll
return total
# Function WAI:
def roll_4d6d():
"""Rolls 4d6... | 27.5 | 77 | 0.536585 |
a684db8114e6f751f36ca0a1f53bcfc8192318de | 3,088 | py | Python | tests/test_swaplink.py | aratz-lasa/py-swaplink | a1821953704215648749ccde65d6c4d9201998af | [
"MIT"
] | 1 | 2019-10-21T08:54:32.000Z | 2019-10-21T08:54:32.000Z | tests/test_swaplink.py | aratz-lasa/py-swaplink | a1821953704215648749ccde65d6c4d9201998af | [
"MIT"
] | 1 | 2021-06-02T00:33:01.000Z | 2021-06-02T00:33:01.000Z | tests/test_swaplink.py | aratz-lasa/py-swaplink | a1821953704215648749ccde65d6c4d9201998af | [
"MIT"
] | null | null | null | import asyncio
import random
from asyncio import Event
from typing import List, Any
import pytest
from swaplink import defaults
from tests.utils import setup_network_by_relative_loads
# for speeding up tests
defaults.HBEAT_SEND_FREQUENCY *= 0.3
defaults.HBEAT_CHECK_FREQUENCY *= 0.3
defaults.RPC_TIMEOUT *= 0.3
| 29.692308 | 82 | 0.731865 |
a685097fe33f7cb01421c71457d5d7a015032c99 | 110 | py | Python | Python/Curos_Python_curemvid/Exercicios_dos_videos/Ex005.py | Jhonattan-rocha/Meus-primeiros-programas | f5971b66c0afd049b5d0493e8b7a116b391d058e | [
"MIT"
] | null | null | null | Python/Curos_Python_curemvid/Exercicios_dos_videos/Ex005.py | Jhonattan-rocha/Meus-primeiros-programas | f5971b66c0afd049b5d0493e8b7a116b391d058e | [
"MIT"
] | null | null | null | Python/Curos_Python_curemvid/Exercicios_dos_videos/Ex005.py | Jhonattan-rocha/Meus-primeiros-programas | f5971b66c0afd049b5d0493e8b7a116b391d058e | [
"MIT"
] | null | null | null | n = int(input("Digite um nmero: "))
print("O anecessor do nmero {} e o sucessor {} ".format(n-1, n+1))
| 27.5 | 71 | 0.618182 |
a6850dc67dbc459d1feab97522a0718104e78923 | 846 | py | Python | opening_window.py | m3hrab/Snake-and-ladder-game | bc69d280eb893eb658701218b7b42e321e5c41f3 | [
"MIT"
] | 1 | 2021-10-04T04:01:49.000Z | 2021-10-04T04:01:49.000Z | opening_window.py | m3hrab/Snake-and-Ladder-game | bc69d280eb893eb658701218b7b42e321e5c41f3 | [
"MIT"
] | null | null | null | opening_window.py | m3hrab/Snake-and-Ladder-game | bc69d280eb893eb658701218b7b42e321e5c41f3 | [
"MIT"
] | null | null | null | import pygame
import time
| 24.171429 | 60 | 0.599291 |
a68586830537b4c7d2e69cd8efe90faed5602e2b | 13,741 | py | Python | gewittergefahr/scripts/deep_learning_helper.py | dopplerchase/GewitterGefahr | 4415b08dd64f37eba5b1b9e8cc5aa9af24f96593 | [
"MIT"
] | 26 | 2018-10-04T01:07:35.000Z | 2022-01-29T08:49:32.000Z | gewittergefahr/scripts/deep_learning_helper.py | liuximarcus/GewitterGefahr | d819874d616f98a25187bfd3091073a2e6d5279e | [
"MIT"
] | 4 | 2017-12-25T02:01:08.000Z | 2018-12-19T01:54:21.000Z | gewittergefahr/scripts/deep_learning_helper.py | liuximarcus/GewitterGefahr | d819874d616f98a25187bfd3091073a2e6d5279e | [
"MIT"
] | 11 | 2017-12-10T23:05:29.000Z | 2022-01-29T08:49:33.000Z | """Handles input args for training deep-learning models."""
import numpy
from gewittergefahr.gg_utils import soundings
from gewittergefahr.deep_learning import cnn
from gewittergefahr.deep_learning import deep_learning_utils as dl_utils
TIME_FORMAT = '%Y-%m-%d-%H%M%S'
SOUNDING_HEIGHTS_M_AGL = soundings.DEFAULT_HEIGHT... | 40.414706 | 80 | 0.755695 |
a6864cff30190d27e7138fb69ceaf1b96919cb06 | 1,859 | py | Python | custom_components/rinnaitouch/__init__.py | funtastix/rinnaitouch | 272b3a4dcd8bcb66a9656c3f9ca497a74a7244b6 | [
"MIT"
] | 4 | 2022-02-17T22:26:14.000Z | 2022-03-31T05:45:53.000Z | custom_components/rinnaitouch/__init__.py | funtastix/rinnaitouch | 272b3a4dcd8bcb66a9656c3f9ca497a74a7244b6 | [
"MIT"
] | 8 | 2022-02-19T01:37:16.000Z | 2022-03-29T21:12:29.000Z | custom_components/rinnaitouch/__init__.py | funtastix/rinnaitouch | 272b3a4dcd8bcb66a9656c3f9ca497a74a7244b6 | [
"MIT"
] | null | null | null | """Set up main entity."""
# pylint: disable=duplicate-code
import logging
from dataclasses import dataclass
from homeassistant.config_entries import ConfigEntry
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.const import CONF_HOST
from homeassistant.core import HomeAssistant
from homeassis... | 26.942029 | 95 | 0.731038 |