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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
07e2537b3e43653ce0616ed6421ef634050042c8 | 3,085 | py | Python | pysrc/classifier.py | CrackerCat/xed | 428712c28e831573579b7f749db63d3a58dcdbd9 | [
"Apache-2.0"
] | 1,261 | 2016-12-16T14:29:30.000Z | 2022-03-30T20:21:25.000Z | pysrc/classifier.py | CrackerCat/xed | 428712c28e831573579b7f749db63d3a58dcdbd9 | [
"Apache-2.0"
] | 190 | 2016-12-17T13:44:09.000Z | 2022-03-27T09:28:13.000Z | pysrc/classifier.py | CrackerCat/xed | 428712c28e831573579b7f749db63d3a58dcdbd9 | [
"Apache-2.0"
] | 155 | 2016-12-16T22:17:20.000Z | 2022-02-16T20:53:59.000Z | #!/usr/bin/env python
# -*- python -*-
#BEGIN_LEGAL
#
#Copyright (c) 2019 Intel Corporation
#
# 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-... | 39.551282 | 96 | 0.647326 |
07e2d1b8a7c46e378298b64b296fe93ed48acbf5 | 1,828 | py | Python | tests/integration/api/test_target_groups.py | lanz/Tenable.io-SDK-for-Python | e81a61c369ac103d1524b0898153a569536a131e | [
"MIT"
] | 90 | 2017-02-02T18:36:17.000Z | 2022-02-05T17:58:50.000Z | tests/integration/api/test_target_groups.py | lanz/Tenable.io-SDK-for-Python | e81a61c369ac103d1524b0898153a569536a131e | [
"MIT"
] | 64 | 2017-02-03T00:54:00.000Z | 2020-08-06T14:06:50.000Z | tests/integration/api/test_target_groups.py | lanz/Tenable.io-SDK-for-Python | e81a61c369ac103d1524b0898153a569536a131e | [
"MIT"
] | 49 | 2017-02-03T01:01:00.000Z | 2022-02-25T13:25:28.000Z | import pytest
from tenable_io.api.target_groups import TargetListEditRequest
from tenable_io.api.models import TargetGroup, TargetGroupList
| 44.585366 | 119 | 0.784464 |
07e312b03c9acc9dee5930a523090053e38045ca | 85,560 | py | Python | Installation/nnAudio/Spectrogram.py | tasercake/nnAudio | 5edc37b7b73674598d533261314429b875ba285d | [
"MIT"
] | null | null | null | Installation/nnAudio/Spectrogram.py | tasercake/nnAudio | 5edc37b7b73674598d533261314429b875ba285d | [
"MIT"
] | null | null | null | Installation/nnAudio/Spectrogram.py | tasercake/nnAudio | 5edc37b7b73674598d533261314429b875ba285d | [
"MIT"
] | null | null | null | """
Module containing all the spectrogram classes
"""
# 0.2.0
import torch
import torch.nn as nn
from torch.nn.functional import conv1d, conv2d, fold
import numpy as np
from time import time
from nnAudio.librosa_functions import *
from nnAudio.utils import *
sz_float = 4 # size of a float
epsilon = 10e-8 # fudg... | 41.695906 | 172 | 0.593233 |
07e4a4e5e49ff1a01f2886f954c1382ba8822f86 | 9,352 | py | Python | train.py | hui-won/KoBART_Project | 105608997473abc669d777c588d56382efb524c6 | [
"MIT"
] | 13 | 2020-12-30T15:09:08.000Z | 2022-01-02T08:11:18.000Z | train.py | hui-won/KoBART_Project | 105608997473abc669d777c588d56382efb524c6 | [
"MIT"
] | 2 | 2021-11-21T11:49:31.000Z | 2022-03-18T05:09:13.000Z | train.py | hui-won/KoBART_Project | 105608997473abc669d777c588d56382efb524c6 | [
"MIT"
] | 1 | 2021-06-15T01:24:18.000Z | 2021-06-15T01:24:18.000Z | import argparse
import logging
import os
import numpy as np
import pandas as pd
import pytorch_lightning as pl
import torch
from pytorch_lightning import loggers as pl_loggers
from torch.utils.data import DataLoader, Dataset
from dataset import KoBARTSummaryDataset
from transformers import BartForConditionalGeneration,... | 39.627119 | 153 | 0.559773 |
07e4f4a4fe370f9d6aeaae97b9bd2ee2d9364898 | 11,945 | py | Python | homeassistant/components/shelly/sensor.py | RavensburgOP/core | 0ea76e848b182ca0ebb0fdb54558f7f733898ad7 | [
"Apache-2.0"
] | 1 | 2019-08-28T00:54:28.000Z | 2019-08-28T00:54:28.000Z | homeassistant/components/shelly/sensor.py | RavensburgOP/core | 0ea76e848b182ca0ebb0fdb54558f7f733898ad7 | [
"Apache-2.0"
] | 71 | 2020-07-14T09:08:56.000Z | 2022-03-31T06:01:47.000Z | homeassistant/components/shelly/sensor.py | Vaarlion/core | f3de8b9f28de01abf72c0f5bb0b457eb1841f201 | [
"Apache-2.0"
] | null | null | null | """Sensor for Shelly."""
from __future__ import annotations
from datetime import timedelta
import logging
from typing import Final, cast
import aioshelly
from homeassistant.components import sensor
from homeassistant.components.sensor import SensorEntity
from homeassistant.config_entries import ConfigEntry
from home... | 34.226361 | 84 | 0.669904 |
07e5b14fe954fccf9ada38a8fb44f9dd227c6830 | 1,301 | py | Python | tests/web/config.py | zcqian/biothings.api | 61c0300317cf2ac7db8310b5b5741ad9b08c4163 | [
"Apache-2.0"
] | null | null | null | tests/web/config.py | zcqian/biothings.api | 61c0300317cf2ac7db8310b5b5741ad9b08c4163 | [
"Apache-2.0"
] | null | null | null | tests/web/config.py | zcqian/biothings.api | 61c0300317cf2ac7db8310b5b5741ad9b08c4163 | [
"Apache-2.0"
] | null | null | null | """
Web settings to override for testing.
"""
import os
from biothings.web.settings.default import QUERY_KWARGS
# *****************************************************************************
# Elasticsearch Variables
# *****************************************************************************
ES_INDEX = 'bts_... | 34.236842 | 79 | 0.362798 |
07e700a1cf3d3463190722de4956e44165a923c7 | 1,969 | py | Python | InvenTree/InvenTree/management/commands/rebuild_thumbnails.py | rocheparadox/InvenTree | 76c1e936db78424e0d6953c4062eb32863e302c6 | [
"MIT"
] | 656 | 2017-03-29T22:06:14.000Z | 2022-03-30T11:23:52.000Z | InvenTree/InvenTree/management/commands/rebuild_thumbnails.py | rocheparadox/InvenTree | 76c1e936db78424e0d6953c4062eb32863e302c6 | [
"MIT"
] | 1,545 | 2017-04-10T23:26:04.000Z | 2022-03-31T18:32:10.000Z | InvenTree/InvenTree/management/commands/rebuild_thumbnails.py | fablabbcn/InvenTree | 1d7ea7716cc96c6ffd151c822b01cd1fb5dcfecd | [
"MIT"
] | 196 | 2017-03-28T03:06:21.000Z | 2022-03-28T11:53:29.000Z | """
Custom management command to rebuild thumbnail images
- May be required after importing a new dataset, for example
"""
import os
import logging
from PIL import UnidentifiedImageError
from django.core.management.base import BaseCommand
from django.conf import settings
from django.db.utils import OperationalError... | 27.732394 | 82 | 0.630269 |
07e88f36bd18f9a9dc8241de858cfab239c3ca4a | 1,758 | py | Python | cogs/carbon.py | Baracchino-Della-Scuola/Bot | 65c1ef37ca9eae5d104de7d7de5cc58cc138402d | [
"MIT"
] | 6 | 2021-12-18T10:15:01.000Z | 2022-03-25T18:11:04.000Z | cogs/carbon.py | Baracchino-Della-Scuola/Bot | 65c1ef37ca9eae5d104de7d7de5cc58cc138402d | [
"MIT"
] | 3 | 2022-01-13T12:44:46.000Z | 2022-02-21T17:40:52.000Z | cogs/carbon.py | Baracchino-Della-Scuola/Bot | 65c1ef37ca9eae5d104de7d7de5cc58cc138402d | [
"MIT"
] | 1 | 2022-02-14T21:54:07.000Z | 2022-02-14T21:54:07.000Z | import discord
from discord.ext import commands
import urllib.parse
from .constants import themes, controls, languages, fonts, escales
import os
from pathlib import Path
from typing import Any
# from pyppeteer import launch
from io import *
import requests
def hex_to_rgb(hex: str) -> tuple:
"""
Args:
... | 21.975 | 86 | 0.633675 |
07e994b02286199ddba77a78c4751e4388520310 | 267 | py | Python | examples/show_artist.py | jimcortez/spotipy_twisted | 49ff2a4a5a5a9b3184b22adbe068eb91a38f3102 | [
"MIT"
] | null | null | null | examples/show_artist.py | jimcortez/spotipy_twisted | 49ff2a4a5a5a9b3184b22adbe068eb91a38f3102 | [
"MIT"
] | null | null | null | examples/show_artist.py | jimcortez/spotipy_twisted | 49ff2a4a5a5a9b3184b22adbe068eb91a38f3102 | [
"MIT"
] | null | null | null | # shows artist info for a URN or URL
import spotipy_twisted
import sys
import pprint
if len(sys.argv) > 1:
urn = sys.argv[1]
else:
urn = 'spotify:artist:3jOstUTkEu2JkjvRdBA5Gu'
sp = spotipy_twisted.Spotify()
artist = sp.artist(urn)
pprint.pprint(artist)
| 15.705882 | 49 | 0.726592 |
07ea3ff52f1fa71b79053f13390d47944be9bd66 | 499 | py | Python | examples/mcp3xxx_mcp3002_single_ended_simpletest.py | sommersoft/Adafruit_CircuitPython_MCP3xxx | 94088a7e2b30f1b34e8a5fd7076075d88aad460b | [
"MIT"
] | null | null | null | examples/mcp3xxx_mcp3002_single_ended_simpletest.py | sommersoft/Adafruit_CircuitPython_MCP3xxx | 94088a7e2b30f1b34e8a5fd7076075d88aad460b | [
"MIT"
] | null | null | null | examples/mcp3xxx_mcp3002_single_ended_simpletest.py | sommersoft/Adafruit_CircuitPython_MCP3xxx | 94088a7e2b30f1b34e8a5fd7076075d88aad460b | [
"MIT"
] | null | null | null | import busio
import digitalio
import board
import adafruit_mcp3xxx.mcp3002 as MCP
from adafruit_mcp3xxx.analog_in import AnalogIn
# create the spi bus
spi = busio.SPI(clock=board.SCK, MISO=board.MISO, MOSI=board.MOSI)
# create the cs (chip select)
cs = digitalio.DigitalInOut(board.D5)
# create the mcp object
mcp = M... | 23.761905 | 66 | 0.747495 |
07eb8c54a1c0d882798ebdd645e52dda754bb70e | 759 | py | Python | glue/core/data_factories/tables.py | rosteen/glue | ed71979f8e0e41f993a2363b3b5a8f8c3167a130 | [
"BSD-3-Clause"
] | 550 | 2015-01-08T13:51:06.000Z | 2022-03-31T11:54:47.000Z | glue/core/data_factories/tables.py | mmorys/glue | b58ced518ba6f56c59a4e03ffe84afa47235e193 | [
"BSD-3-Clause"
] | 1,362 | 2015-01-03T19:15:52.000Z | 2022-03-30T13:23:11.000Z | glue/core/data_factories/tables.py | mmorys/glue | b58ced518ba6f56c59a4e03ffe84afa47235e193 | [
"BSD-3-Clause"
] | 142 | 2015-01-08T13:08:00.000Z | 2022-03-18T13:25:57.000Z | from glue.core.data_factories.helpers import has_extension
from glue.config import data_factory
__all__ = ['tabular_data']
| 33 | 75 | 0.613966 |
07ebcae81863c1e60bd65e743d7f7961451a23cf | 2,895 | py | Python | code_doc/views/author_views.py | coordt/code_doc | c2fac64ac3ad61952a2d9f036727166741f9aff9 | [
"BSD-3-Clause"
] | null | null | null | code_doc/views/author_views.py | coordt/code_doc | c2fac64ac3ad61952a2d9f036727166741f9aff9 | [
"BSD-3-Clause"
] | null | null | null | code_doc/views/author_views.py | coordt/code_doc | c2fac64ac3ad61952a2d9f036727166741f9aff9 | [
"BSD-3-Clause"
] | null | null | null | from django.shortcuts import render
from django.http import Http404
from django.views.generic.edit import UpdateView
from django.views.generic import ListView, View
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.utils.decorators import method_decorator... | 28.382353 | 88 | 0.680484 |
07ee95bf0289bb4f328ba250a0e725c6cb917270 | 2,073 | py | Python | d00dfeed/analyses/print_sloc_per_soc.py | rehosting/rehosting_sok | 499b625c8aa60020f311df97a6253820982f20d4 | [
"MIT"
] | 4 | 2021-09-17T02:37:08.000Z | 2022-02-15T01:44:41.000Z | d00dfeed/analyses/print_sloc_per_soc.py | rehosting/rehosting_sok | 499b625c8aa60020f311df97a6253820982f20d4 | [
"MIT"
] | null | null | null | d00dfeed/analyses/print_sloc_per_soc.py | rehosting/rehosting_sok | 499b625c8aa60020f311df97a6253820982f20d4 | [
"MIT"
] | null | null | null | # External deps
import os, sys, json
from pathlib import Path
from typing import Dict, List
# Internal deps
os.chdir(sys.path[0])
sys.path.append("..")
import df_common as dfc
import analyses_common as ac
# Generated files directory
GEN_FILE_DIR = str(Path(__file__).resolve().parent.parent) + os.sep + "generated_file... | 32.904762 | 122 | 0.673903 |
07eea84b8f7990a608b685c1a60f3250095ce8a2 | 1,271 | py | Python | mingpt/lr_decay.py | asigalov61/minGPT | b4f8d57aaf1bb5c64d480f8005b73d39b075ae4b | [
"MIT"
] | 18 | 2020-09-10T02:29:38.000Z | 2022-03-16T03:17:35.000Z | mingpt/lr_decay.py | asigalov61/minGPT | b4f8d57aaf1bb5c64d480f8005b73d39b075ae4b | [
"MIT"
] | null | null | null | mingpt/lr_decay.py | asigalov61/minGPT | b4f8d57aaf1bb5c64d480f8005b73d39b075ae4b | [
"MIT"
] | 7 | 2020-08-20T16:35:38.000Z | 2022-01-10T21:57:49.000Z | import math
import pytorch_lightning as pl
| 41 | 106 | 0.609756 |
07ef68929a367d76f0cb572e51ac36b254e815b0 | 40,518 | py | Python | apprise/config/ConfigBase.py | calvinbui/apprise | a5510790baf5aa1d74afabab25ff57d6b2304d56 | [
"MIT"
] | null | null | null | apprise/config/ConfigBase.py | calvinbui/apprise | a5510790baf5aa1d74afabab25ff57d6b2304d56 | [
"MIT"
] | null | null | null | apprise/config/ConfigBase.py | calvinbui/apprise | a5510790baf5aa1d74afabab25ff57d6b2304d56 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 Chris Caron <lead2gold@gmail.com>
# All rights reserved.
#
# This code is licensed under the MIT License.
#
# 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 th... | 38.116651 | 79 | 0.550768 |
07f0b2b68417d129704d340d100e569555824ebc | 977 | py | Python | ffmpeg_util.py | manuel-fischer/ScrollRec | ec5662d3f61630f939613481290a166133d23a20 | [
"MIT"
] | null | null | null | ffmpeg_util.py | manuel-fischer/ScrollRec | ec5662d3f61630f939613481290a166133d23a20 | [
"MIT"
] | null | null | null | ffmpeg_util.py | manuel-fischer/ScrollRec | ec5662d3f61630f939613481290a166133d23a20 | [
"MIT"
] | null | null | null | import sys
import subprocess
from subprocess import Popen, PIPE
AV_LOG_QUIET = "quiet"
AV_LOG_PANIC = "panic"
AV_LOG_FATAL = "fatal"
AV_LOG_ERROR = "error"
AV_LOG_WARNING = "warning"
AV_LOG_INFO = "info"
AV_LOG_VERBOSE = "verbose"
AV_LOG_DEBUG = "debug"
ffmpeg_loglevel = AV_LOG_ERROR
IS_WIN32 = 'win32' ... | 24.425 | 89 | 0.698055 |
07f0cc1a2096d19875fd8be0522fd82d52ff8b5c | 128 | py | Python | setup.py | rizar/CLOSURE | 57f80d4e89fa281830bb9c8b6a7a2498747e727a | [
"MIT"
] | 14 | 2019-12-08T04:38:57.000Z | 2021-07-13T15:46:57.000Z | setup.py | rizar/CLOSURE | 57f80d4e89fa281830bb9c8b6a7a2498747e727a | [
"MIT"
] | null | null | null | setup.py | rizar/CLOSURE | 57f80d4e89fa281830bb9c8b6a7a2498747e727a | [
"MIT"
] | 2 | 2020-09-01T10:21:27.000Z | 2021-01-15T02:38:25.000Z | from setuptools import setup
setup(
name="nmn-iwp",
version="0.1",
keywords="",
packages=["vr", "vr.models"]
)
| 14.222222 | 32 | 0.585938 |
07f1195aa55500ccfbdb1eb16ce8a5e553bfeb5d | 11,381 | py | Python | analysis_tools/PYTHON_RICARDO/output_ingress_egress/scripts/uniform_grid.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | analysis_tools/PYTHON_RICARDO/output_ingress_egress/scripts/uniform_grid.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | analysis_tools/PYTHON_RICARDO/output_ingress_egress/scripts/uniform_grid.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | """ Represent a triangulated surface using a 3D boolean grid"""
import logging
import numpy as np
from rpl.tools.ray_tracing.bsp_tree_poly import BSP_Element
from rpl.tools.geometry import geom_utils
import data_io
def make_grid(veh_surfs, settings):
"""
Make coordinates of voxelated grid based ... | 42.30855 | 99 | 0.567613 |
07f12eb8f08aef21196193b3111071cb20b8013a | 1,884 | py | Python | silver_bullet/crypto.py | Hojung-Jeong/Silver-Bullet-Encryption-Tool | 5ea29b3cd78cf7488e0cbdcf4ea60d7c9151c2a7 | [
"Apache-2.0"
] | null | null | null | silver_bullet/crypto.py | Hojung-Jeong/Silver-Bullet-Encryption-Tool | 5ea29b3cd78cf7488e0cbdcf4ea60d7c9151c2a7 | [
"Apache-2.0"
] | null | null | null | silver_bullet/crypto.py | Hojung-Jeong/Silver-Bullet-Encryption-Tool | 5ea29b3cd78cf7488e0cbdcf4ea60d7c9151c2a7 | [
"Apache-2.0"
] | null | null | null | '''
>List of functions
1. encrypt(user_input,passphrase) - Encrypt the given string with the given passphrase. Returns cipher text and locked pad.
2. decrypt(cipher_text,locked_pad,passphrase) - Decrypt the cipher text encrypted with SBET. It requires cipher text, locked pad, and passphrase.
'''
# CODE ============... | 24.789474 | 146 | 0.735669 |
07f1ea6de606abc50abb899228cdc43831fa522e | 876 | py | Python | pyfire/errors.py | RavidLevi98/pyfire | 404ae2082fd5be3ef652b3e15a66ad0d79b7a1b5 | [
"BSD-3-Clause"
] | null | null | null | pyfire/errors.py | RavidLevi98/pyfire | 404ae2082fd5be3ef652b3e15a66ad0d79b7a1b5 | [
"BSD-3-Clause"
] | 1 | 2021-05-22T21:34:44.000Z | 2021-05-22T21:34:44.000Z | pyfire/errors.py | RavidLevi98/pyfire | 404ae2082fd5be3ef652b3e15a66ad0d79b7a1b5 | [
"BSD-3-Clause"
] | 1 | 2021-05-22T21:21:11.000Z | 2021-05-22T21:21:11.000Z | # -*- coding: utf-8 -*-
"""
pyfire.errors
~~~~~~~~~~~~~~~~~~~~~~
Holds the global used base errors
:copyright: 2011 by the pyfire Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import xml.etree.ElementTree as ET
| 28.258065 | 72 | 0.651826 |
07f21adedf8ef7aa0ba52361a9cf4372ad43ac9a | 4,967 | py | Python | app/nextMoveLogic.py | thekitbag/starter-snake-python | 48d12d2fa61ecfc976cd5750316b1db49a641f7f | [
"MIT"
] | null | null | null | app/nextMoveLogic.py | thekitbag/starter-snake-python | 48d12d2fa61ecfc976cd5750316b1db49a641f7f | [
"MIT"
] | null | null | null | app/nextMoveLogic.py | thekitbag/starter-snake-python | 48d12d2fa61ecfc976cd5750316b1db49a641f7f | [
"MIT"
] | null | null | null | import random
| 29.217647 | 122 | 0.655124 |
07f27b728b22aae57de29b0aad696e2f245d31dd | 2,921 | py | Python | generator/util.py | gbtami/lichess-puzzler | e7338b35f592481141acefe39c7aaa444b26aa9e | [
"MIT"
] | 1 | 2021-02-20T11:21:53.000Z | 2021-02-20T11:21:53.000Z | generator/util.py | gbtami/lichess-puzzler | e7338b35f592481141acefe39c7aaa444b26aa9e | [
"MIT"
] | null | null | null | generator/util.py | gbtami/lichess-puzzler | e7338b35f592481141acefe39c7aaa444b26aa9e | [
"MIT"
] | null | null | null | from dataclasses import dataclass
import math
import chess
import chess.engine
from model import EngineMove, NextMovePair
from chess import Color, Board
from chess.pgn import GameNode
from chess.engine import SimpleEngine, Score
nps = []
def win_chances(score: Score) -> float:
"""
winning chances from -1 to ... | 38.946667 | 442 | 0.66176 |
07f699666466b24dd921c96e35a918f2fe5e627b | 293 | py | Python | sleep.py | SkylerHoward/O | 989246a5cdc297ab9f76cb6b26daebd799a03741 | [
"MIT"
] | null | null | null | sleep.py | SkylerHoward/O | 989246a5cdc297ab9f76cb6b26daebd799a03741 | [
"MIT"
] | null | null | null | sleep.py | SkylerHoward/O | 989246a5cdc297ab9f76cb6b26daebd799a03741 | [
"MIT"
] | null | null | null | import time, morning
from datetime import datetime
| 29.3 | 63 | 0.648464 |
07f6a33d952a989c19f3efa056df22e95ace1f20 | 4,526 | py | Python | tests/unit/commands/local/start_lambda/test_cli.py | ourobouros/aws-sam-cli | 3fba861f5106d604fde6d023923a9b83377a35d9 | [
"Apache-2.0"
] | 2 | 2018-11-09T04:43:41.000Z | 2018-11-20T06:39:45.000Z | tests/unit/commands/local/start_lambda/test_cli.py | ourobouros/aws-sam-cli | 3fba861f5106d604fde6d023923a9b83377a35d9 | [
"Apache-2.0"
] | null | null | null | tests/unit/commands/local/start_lambda/test_cli.py | ourobouros/aws-sam-cli | 3fba861f5106d604fde6d023923a9b83377a35d9 | [
"Apache-2.0"
] | null | null | null | from unittest import TestCase
from mock import patch, Mock
from samcli.commands.local.start_lambda.cli import do_cli as start_lambda_cli
from samcli.commands.local.cli_common.user_exceptions import UserException
from samcli.commands.validate.lib.exceptions import InvalidSamDocumentException
from samcli.commands.local.... | 45.26 | 96 | 0.579319 |
07f8b674abd2c96105f1e6a593d1a4ae299e109a | 5,389 | py | Python | restapi/services/Utils/test_getters.py | Varun487/CapstoneProject_TradingSystem | b21e3f2c6c5e75596927666bf65294a2014babcf | [
"MIT"
] | 3 | 2022-01-10T01:39:00.000Z | 2022-01-11T13:17:36.000Z | restapi/services/Utils/test_getters.py | Varun487/CapstoneProject_TradingSystem | b21e3f2c6c5e75596927666bf65294a2014babcf | [
"MIT"
] | null | null | null | restapi/services/Utils/test_getters.py | Varun487/CapstoneProject_TradingSystem | b21e3f2c6c5e75596927666bf65294a2014babcf | [
"MIT"
] | 1 | 2022-01-09T07:30:36.000Z | 2022-01-09T07:30:36.000Z | from django.test import TestCase
import pandas as pd
from .getters import Getter
from .converter import Converter
from strategies.models import Company
from strategies.models import IndicatorType
| 52.833333 | 119 | 0.660419 |
07f928cd0ad75195469f95ed414958ac002210c7 | 3,376 | py | Python | pytorch_toolkit/ote/ote/modules/trainers/mmdetection.py | abhatikar/training_extensions | 1c96e0f5f39688f8b79735e8dfa90646afc3d5e6 | [
"Apache-2.0"
] | 2 | 2021-01-07T05:09:17.000Z | 2021-10-15T05:13:46.000Z | pytorch_toolkit/ote/ote/modules/trainers/mmdetection.py | abhatikar/training_extensions | 1c96e0f5f39688f8b79735e8dfa90646afc3d5e6 | [
"Apache-2.0"
] | 9 | 2021-09-08T03:12:59.000Z | 2022-03-12T00:57:19.000Z | pytorch_toolkit/ote/ote/modules/trainers/mmdetection.py | abhatikar/training_extensions | 1c96e0f5f39688f8b79735e8dfa90646afc3d5e6 | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... | 34.44898 | 101 | 0.627073 |
07fabd24f913f0cde7669692291156d001f2e833 | 1,979 | py | Python | svn-go-stats/transform.py | BT-OpenSource/bt-betalab | af5a1b0d778c1746312149f62da0c4159f387293 | [
"MIT"
] | 1 | 2021-03-02T10:44:07.000Z | 2021-03-02T10:44:07.000Z | svn-go-stats/transform.py | BT-OpenSource/bt-betalab | af5a1b0d778c1746312149f62da0c4159f387293 | [
"MIT"
] | null | null | null | svn-go-stats/transform.py | BT-OpenSource/bt-betalab | af5a1b0d778c1746312149f62da0c4159f387293 | [
"MIT"
] | null | null | null | import sys
import json
import subprocess
import re
import statistics
# Main service body
if __name__ == "__main__":
complexity = get_complexity()
duplicate_const_strings = get_duplicate_const_strings()
files = set()
files.update(complexity.keys())
files.update(duplicate_const_strings.keys())
... | 29.102941 | 106 | 0.623042 |
07fb390e2fe8908e8e3a429d629ca30f1d77df66 | 11,225 | py | Python | test/test_python_errors.py | yangyangxcf/parso | e496b07b6342f6182225a60aad6031d7ad08f24d | [
"PSF-2.0"
] | null | null | null | test/test_python_errors.py | yangyangxcf/parso | e496b07b6342f6182225a60aad6031d7ad08f24d | [
"PSF-2.0"
] | null | null | null | test/test_python_errors.py | yangyangxcf/parso | e496b07b6342f6182225a60aad6031d7ad08f24d | [
"PSF-2.0"
] | null | null | null | """
Testing if parso finds syntax errors and indentation errors.
"""
import sys
import warnings
import pytest
import parso
from parso._compatibility import is_pypy
from .failing_examples import FAILING_EXAMPLES, indent, build_nested
if is_pypy:
# The errors in PyPy might be different. Just skip the module for n... | 34.860248 | 96 | 0.625568 |
07fb5058c7a297096cbf1ff7f21aedcf66b7d3ad | 985 | py | Python | shogitk/usikif.py | koji-hirono/pytk-shogi-replayer | a10819a797faecbee5c7b0654beb3694eb522840 | [
"MIT"
] | null | null | null | shogitk/usikif.py | koji-hirono/pytk-shogi-replayer | a10819a797faecbee5c7b0654beb3694eb522840 | [
"MIT"
] | null | null | null | shogitk/usikif.py | koji-hirono/pytk-shogi-replayer | a10819a797faecbee5c7b0654beb3694eb522840 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from shogitk.shogi import Coords, Move, BLACK, WHITE, DROP, PROMOTE
RANKNUM = {
'a': 1,
'b': 2,
'c': 3,
'd': 4,
'e': 5,
'f': 6,
'g': 7,
'h': 8,
'i': 9
}
| 25.921053 | 74 | 0.450761 |
07fca3ec2f3896a49c6703b50dabc9ec79e258a9 | 2,160 | py | Python | etherbank_cli/oracles.py | ideal-money/etherbank-cli | d957daa13aa951331cadc35c246c1ce8459ca8df | [
"BSD-2-Clause"
] | 1 | 2018-12-29T02:12:25.000Z | 2018-12-29T02:12:25.000Z | etherbank_cli/oracles.py | ideal-money/etherbank-cli | d957daa13aa951331cadc35c246c1ce8459ca8df | [
"BSD-2-Clause"
] | 5 | 2018-12-20T12:45:39.000Z | 2019-01-08T06:16:01.000Z | etherbank_cli/oracles.py | ideal-money/etherbank-cli | d957daa13aa951331cadc35c246c1ce8459ca8df | [
"BSD-2-Clause"
] | null | null | null | import click
from . import utils
if __name__ == '__main__':
main()
| 30 | 82 | 0.697222 |
07fd108f6337b8e7a88da0155cf318b6098e4ae4 | 2,585 | py | Python | src/grader/machine.py | MrKaStep/csc230-grader | 559846f4d921c5c4be6b6e9ba8629fb24b448e41 | [
"MIT"
] | null | null | null | src/grader/machine.py | MrKaStep/csc230-grader | 559846f4d921c5c4be6b6e9ba8629fb24b448e41 | [
"MIT"
] | null | null | null | src/grader/machine.py | MrKaStep/csc230-grader | 559846f4d921c5c4be6b6e9ba8629fb24b448e41 | [
"MIT"
] | null | null | null | import getpass
from plumbum import local
from plumbum.machines.paramiko_machine import ParamikoMachine
from plumbum.path.utils import copy
def get_local_machine():
return local
def with_machine_rule(cls):
old_init = cls.__init__
cls.__init__ = new_init
old_apply = cls.apply
cls.apply = new_app... | 32.3125 | 133 | 0.600387 |
07fdb99131cb0d8251646bea304d79ad58fc7ab6 | 157 | py | Python | Mundo 1/Ex33.py | legna7/Python | 52e0b642d1b7acc592ec82dd360c5697fb0765db | [
"MIT"
] | null | null | null | Mundo 1/Ex33.py | legna7/Python | 52e0b642d1b7acc592ec82dd360c5697fb0765db | [
"MIT"
] | null | null | null | Mundo 1/Ex33.py | legna7/Python | 52e0b642d1b7acc592ec82dd360c5697fb0765db | [
"MIT"
] | null | null | null | salario = float(input('digite o seu salario: '))
aumento = (salario + (salario * 15)/100 if salario <= 1250 else salario + (salario * 10)/100)
print(aumento) | 52.333333 | 93 | 0.687898 |
07ff0da6e717ab9585c2e512803b8604ff985d37 | 2,793 | py | Python | tests/test_tree.py | andreax79/airflow-code-editor | 031170387496bbc6d540179c6c2f1765e1e70694 | [
"Apache-2.0"
] | 194 | 2019-08-06T13:03:11.000Z | 2022-03-25T15:29:29.000Z | tests/test_tree.py | andreax79/airflow-code-editor | 031170387496bbc6d540179c6c2f1765e1e70694 | [
"Apache-2.0"
] | 29 | 2019-08-23T16:07:17.000Z | 2022-03-31T03:43:47.000Z | tests/test_tree.py | andreax79/airflow-code-editor | 031170387496bbc6d540179c6c2f1765e1e70694 | [
"Apache-2.0"
] | 32 | 2019-08-15T12:13:37.000Z | 2022-03-31T17:27:24.000Z | #!/usr/bin/env python
import os
import os.path
import airflow
import airflow.plugins_manager
from airflow import configuration
from flask import Flask
from unittest import TestCase, main
from airflow_code_editor.commons import PLUGIN_NAME
from airflow_code_editor.tree import (
get_tree,
)
assert airflow.plugins_m... | 31.382022 | 85 | 0.583602 |
07ff31219d3e42ddfa090b695c0d4b6ede8d31e9 | 2,826 | py | Python | examples/token_freshness.py | greenape/flask-jwt-extended | 11ac3bf0937ee199aea7d6dc47c748bef9bf1d2f | [
"MIT"
] | 2 | 2021-03-20T01:55:08.000Z | 2021-11-14T12:20:23.000Z | examples/token_freshness.py | greenape/flask-jwt-extended | 11ac3bf0937ee199aea7d6dc47c748bef9bf1d2f | [
"MIT"
] | 1 | 2020-08-06T23:02:45.000Z | 2020-09-26T01:36:21.000Z | examples/token_freshness.py | greenape/flask-jwt-extended | 11ac3bf0937ee199aea7d6dc47c748bef9bf1d2f | [
"MIT"
] | 1 | 2020-10-28T20:09:00.000Z | 2020-10-28T20:09:00.000Z | from quart import Quart, jsonify, request
from quart_jwt_extended import (
JWTManager,
jwt_required,
create_access_token,
jwt_refresh_token_required,
create_refresh_token,
get_jwt_identity,
fresh_jwt_required,
)
app = Quart(__name__)
app.config["JWT_SECRET_KEY"] = "super-secret" # Change ... | 33.247059 | 75 | 0.714084 |
07ff9a1f5ea3709124ad1fb347eb63a9284a7ad2 | 195 | py | Python | env/lib/python3.7/site-packages/tinvest/typedefs.py | umchemurziev/Practics | 82b49f9d58e67f1ecff9e6303e7d914bc1905730 | [
"MIT"
] | 1 | 2021-03-29T18:47:32.000Z | 2021-03-29T18:47:32.000Z | env/lib/python3.7/site-packages/tinvest/typedefs.py | umchemurziev/Practics | 82b49f9d58e67f1ecff9e6303e7d914bc1905730 | [
"MIT"
] | null | null | null | env/lib/python3.7/site-packages/tinvest/typedefs.py | umchemurziev/Practics | 82b49f9d58e67f1ecff9e6303e7d914bc1905730 | [
"MIT"
] | null | null | null | from datetime import datetime
from typing import Any, Dict, Union
__all__ = 'AnyDict'
AnyDict = Dict[str, Any] # pragma: no mutate
datetime_or_str = Union[datetime, str] # pragma: no mutate
| 21.666667 | 59 | 0.738462 |
07ffdb3c18cae37c2fe662c5c84ed5398af39b35 | 1,345 | py | Python | keras/linear/model/pipeline_train.py | PipelineAI/models | d8df07877aa8b10ce9b84983bb440af75e84dca7 | [
"Apache-2.0"
] | 44 | 2017-11-17T06:19:05.000Z | 2021-11-03T06:00:56.000Z | keras/linear/model/pipeline_train.py | PipelineAI/models | d8df07877aa8b10ce9b84983bb440af75e84dca7 | [
"Apache-2.0"
] | 3 | 2018-08-09T14:28:17.000Z | 2018-09-10T03:32:42.000Z | keras/linear/model/pipeline_train.py | PipelineAI/models | d8df07877aa8b10ce9b84983bb440af75e84dca7 | [
"Apache-2.0"
] | 21 | 2017-11-18T15:12:12.000Z | 2020-08-15T07:08:33.000Z | import os
os.environ['KERAS_BACKEND'] = 'theano'
os.environ['THEANO_FLAGS'] = 'floatX=float32,device=cpu'
import cloudpickle as pickle
import pipeline_invoke
import pandas as pd
import numpy as np
import keras
from keras.layers import Input, Dense
from keras.models import Model
from keras.models import save_model, loa... | 30.568182 | 92 | 0.709294 |
580077f8f713a612aa61ab64e08f6fd83f19a081 | 1,454 | py | Python | tests/effects/test_cheerlights.py | RatJuggler/led-shim-effects | 3c63f5f2ce3f35f52e784489deb9212757c18cd2 | [
"MIT"
] | 1 | 2021-04-17T16:18:14.000Z | 2021-04-17T16:18:14.000Z | tests/effects/test_cheerlights.py | RatJuggler/led-shim-effects | 3c63f5f2ce3f35f52e784489deb9212757c18cd2 | [
"MIT"
] | 12 | 2019-07-26T18:01:56.000Z | 2019-08-31T15:35:17.000Z | tests/effects/test_cheerlights.py | RatJuggler/led-shim-demo | 3c63f5f2ce3f35f52e784489deb9212757c18cd2 | [
"MIT"
] | null | null | null | from unittest import TestCase
from unittest.mock import Mock, patch
import sys
sys.modules['smbus'] = Mock() # Mock the hardware layer to avoid errors.
from ledshimdemo.canvas import Canvas
from ledshimdemo.effects.cheerlights import CheerLightsEffect
| 39.297297 | 106 | 0.72696 |
5800997c4a49cdfc01a368bf3ebf423b84d98d2c | 7,074 | py | Python | figures/Figure_7/02_generate_images.py | Jhsmit/ColiCoords-Paper | 7b92e67600930f64859d14867113b6de3edf1379 | [
"MIT"
] | 2 | 2019-05-12T12:06:50.000Z | 2020-11-11T16:44:49.000Z | figures/Figure_7/02_generate_images.py | Jhsmit/ColiCoords-Paper | 7b92e67600930f64859d14867113b6de3edf1379 | [
"MIT"
] | null | null | null | figures/Figure_7/02_generate_images.py | Jhsmit/ColiCoords-Paper | 7b92e67600930f64859d14867113b6de3edf1379 | [
"MIT"
] | 2 | 2019-06-17T16:00:56.000Z | 2020-02-07T22:17:47.000Z | from colicoords.synthetic_data import add_readout_noise, draw_poisson
from colicoords import load
import numpy as np
import mahotas as mh
from tqdm import tqdm
import os
import tifffile
def gen_im(data_dir):
"""Generate microscopy images from a list of cell objects by placing them randomly oriented in the ima... | 40.890173 | 126 | 0.602771 |
580134063c60e1903557dccde046d7a394258b01 | 319 | py | Python | dictionary.py | SchmitzAndrew/OSS-101-example | 1efecd4c5bfef4495904568d11e3f8d0a5ed9bd0 | [
"MIT"
] | null | null | null | dictionary.py | SchmitzAndrew/OSS-101-example | 1efecd4c5bfef4495904568d11e3f8d0a5ed9bd0 | [
"MIT"
] | null | null | null | dictionary.py | SchmitzAndrew/OSS-101-example | 1efecd4c5bfef4495904568d11e3f8d0a5ed9bd0 | [
"MIT"
] | null | null | null | word = input("Enter a word: ")
if word == "a":
print("one; any")
elif word == "apple":
print("familiar, round fleshy fruit")
elif word == "rhinoceros":
print("large thick-skinned animal with one or two horns on its nose")
else:
print("That word must not exist. This dictionary is very comprehensive.")
| 29 | 77 | 0.667712 |
58023a0843c7993ed1535e882c1755e33a7a8544 | 116 | py | Python | solved_bronze/num11720.py | ilmntr/white_study | 51d69d122b07e9a0922dddb134bff4ec79077eb9 | [
"MIT"
] | null | null | null | solved_bronze/num11720.py | ilmntr/white_study | 51d69d122b07e9a0922dddb134bff4ec79077eb9 | [
"MIT"
] | null | null | null | solved_bronze/num11720.py | ilmntr/white_study | 51d69d122b07e9a0922dddb134bff4ec79077eb9 | [
"MIT"
] | null | null | null | cnt = int(input())
num = list(map(int, input()))
sum = 0
for i in range(len(num)):
sum = sum + num[i]
print(sum) | 19.333333 | 29 | 0.586207 |
58035ad02fa85d7c60de0ef4d5c14279175bc2ac | 566 | py | Python | setup.py | sdnhub/kube-navi | d16a9289ba7261011e6c8d19c48cdc9bd533e629 | [
"Apache-2.0"
] | null | null | null | setup.py | sdnhub/kube-navi | d16a9289ba7261011e6c8d19c48cdc9bd533e629 | [
"Apache-2.0"
] | null | null | null | setup.py | sdnhub/kube-navi | d16a9289ba7261011e6c8d19c48cdc9bd533e629 | [
"Apache-2.0"
] | null | null | null | from distutils.core import setup
setup(
name = 'kube_navi',
packages = ['kube_navi'], # this must be the same as the name above
version = '0.1',
description = 'Kubernetes resource discovery toolkit',
author = 'Srini Seetharaman',
author_email = 'srini.seetharaman@gmail.com',
url = 'https://github.com/sdnh... | 40.428571 | 106 | 0.69788 |
5804951a8f92330526763d3f11395d318d54d180 | 10,444 | py | Python | flink-ai-flow/ai_flow/metric/utils.py | MarvinMiao/flink-ai-extended | e45eecf2deea6976ba3d7ba821ffb8d9ce0a17f4 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2020-12-12T15:21:05.000Z | 2020-12-12T15:21:05.000Z | flink-ai-flow/ai_flow/metric/utils.py | MarvinMiao/flink-ai-extended | e45eecf2deea6976ba3d7ba821ffb8d9ce0a17f4 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-01-30T11:28:37.000Z | 2021-01-30T11:28:37.000Z | flink-ai-flow/ai_flow/metric/utils.py | MarvinMiao/flink-ai-extended | e45eecf2deea6976ba3d7ba821ffb8d9ce0a17f4 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 49.032864 | 122 | 0.627633 |
58055aabc65a23b166d03e3a5c7b5b2ffaa06173 | 3,154 | py | Python | src/moduels/gui/Tab_Help.py | HaujetZhao/Caps_Writer | f2b2038a2c0984a1d356f024cbac421fe594601a | [
"MIT"
] | 234 | 2020-07-10T11:23:09.000Z | 2022-03-31T09:41:40.000Z | src/moduels/gui/Tab_Help.py | HaujetZhao/Caps_Writer | f2b2038a2c0984a1d356f024cbac421fe594601a | [
"MIT"
] | 9 | 2020-07-11T08:31:11.000Z | 2022-03-01T04:30:08.000Z | src/moduels/gui/Tab_Help.py | HaujetZhao/Caps_Writer | f2b2038a2c0984a1d356f024cbac421fe594601a | [
"MIT"
] | 23 | 2020-07-14T08:58:44.000Z | 2022-03-17T06:38:10.000Z | # -*- coding: UTF-8 -*-
from PySide2.QtWidgets import QWidget, QPushButton, QVBoxLayout
from PySide2.QtCore import Signal
from moduels.component.NormalValue import
from moduels.component.SponsorDialog import SponsorDialog
import os, webbrowser
def initElement(self):
self. = QPushButton(self.tr(''))
... | 45.057143 | 132 | 0.69499 |
5805a2c8d616906daf19682b40baa91f10a88715 | 1,845 | py | Python | app/routes/register.py | AuFeld/COAG | 3874a9c1c6ceb908a6bbabfb49e2c701d8e54f20 | [
"MIT"
] | 1 | 2021-06-03T10:29:12.000Z | 2021-06-03T10:29:12.000Z | app/routes/register.py | AuFeld/COAG | 3874a9c1c6ceb908a6bbabfb49e2c701d8e54f20 | [
"MIT"
] | 45 | 2021-06-05T14:47:09.000Z | 2022-03-30T06:16:44.000Z | app/routes/register.py | AuFeld/COAG | 3874a9c1c6ceb908a6bbabfb49e2c701d8e54f20 | [
"MIT"
] | null | null | null | from typing import Callable, Optional, Type, cast
from fastapi import APIRouter, HTTPException, Request, status
from app.models import users
from app.common.user import ErrorCode, run_handler
from app.users.user import (
CreateUserProtocol,
InvalidPasswordException,
UserAlreadyExists,
ValidatePassword... | 32.946429 | 83 | 0.648238 |
5805ce50d417618b337a1e60276ff06de0f997f8 | 1,425 | py | Python | utils/visual.py | xizaoqu/Panoptic-PolarNet | 8ce05f437f54e030eac7de150f43caab2810cfbb | [
"BSD-3-Clause"
] | 90 | 2021-03-30T08:02:15.000Z | 2022-03-30T03:29:56.000Z | utils/visual.py | xizaoqu/Panoptic-PolarNet | 8ce05f437f54e030eac7de150f43caab2810cfbb | [
"BSD-3-Clause"
] | 11 | 2021-04-01T02:29:08.000Z | 2022-03-04T07:30:50.000Z | utils/visual.py | xizaoqu/Panoptic-PolarNet | 8ce05f437f54e030eac7de150f43caab2810cfbb | [
"BSD-3-Clause"
] | 21 | 2021-04-01T09:29:38.000Z | 2022-03-28T01:36:02.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import cv2
import numpy as np
def flow_to_img(flow, normalize=True):
"""Convert flow to viewable image, using color hue to encode flow vector orientation, and color saturation to
encode vector length. This is similar to the OpenCV tutorial on dense optical flow, e... | 39.583333 | 116 | 0.665263 |
5806fd8ba37feb4c4d823dfb9c4c105ed07bdd0c | 624 | py | Python | DistributedRL/Gateway/build/Code/sim/Parser/LAI/GreenIndex.py | zhkmxx9302013/SoftwarePilot | 826098465b800085774946c20a7a283f369f1d21 | [
"MIT"
] | 4 | 2019-03-20T17:46:01.000Z | 2019-03-31T17:32:44.000Z | DistributedRL/Gateway/build/Code/sim/Parser/LAI/GreenIndex.py | zhkmxx9302013/SoftwarePilot | 826098465b800085774946c20a7a283f369f1d21 | [
"MIT"
] | null | null | null | DistributedRL/Gateway/build/Code/sim/Parser/LAI/GreenIndex.py | zhkmxx9302013/SoftwarePilot | 826098465b800085774946c20a7a283f369f1d21 | [
"MIT"
] | null | null | null | import argparse
from PIL import Image, ImageStat
import math
parser = argparse.ArgumentParser()
parser.add_argument('fname')
parser.add_argument('pref', default="", nargs="?")
args = parser.parse_args()
im = Image.open(args.fname)
RGB = im.convert('RGB')
imWidth, imHeight = im.size
ratg = 1.2
ratgb = 1.66
ming = 10... | 20.8 | 50 | 0.684295 |
58077bea9c4435d13d9ff119348291eadd3323f7 | 4,561 | py | Python | reports/heliosV1/python/heliosStorageStats/heliosStorageStats.py | ped998/scripts | 0dcaaf47f9676210e1c972a5d59d8d0de82a1d93 | [
"Apache-2.0"
] | null | null | null | reports/heliosV1/python/heliosStorageStats/heliosStorageStats.py | ped998/scripts | 0dcaaf47f9676210e1c972a5d59d8d0de82a1d93 | [
"Apache-2.0"
] | null | null | null | reports/heliosV1/python/heliosStorageStats/heliosStorageStats.py | ped998/scripts | 0dcaaf47f9676210e1c972a5d59d8d0de82a1d93 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""cluster storage stats for python"""
# import pyhesity wrapper module
from pyhesity import *
from datetime import datetime
import codecs
# command line arguments
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-v', '--vip', type=str, default='helios.cohesity.com') # cl... | 49.043011 | 293 | 0.726814 |
580792f2d4c1bf5c14b84d5f807f69b1126aead4 | 5,422 | py | Python | src/advanceoperate/malimgthread.py | zengrx/S.M.A.R.T | 47a9abe89008e9b34f9b9d057656dbf3fb286456 | [
"MIT"
] | 10 | 2017-07-11T01:08:28.000Z | 2021-05-07T01:49:00.000Z | src/advanceoperate/malimgthread.py | YanqiangHuang/S.M.A.R.T | 47a9abe89008e9b34f9b9d057656dbf3fb286456 | [
"MIT"
] | null | null | null | src/advanceoperate/malimgthread.py | YanqiangHuang/S.M.A.R.T | 47a9abe89008e9b34f9b9d057656dbf3fb286456 | [
"MIT"
] | 6 | 2017-05-02T14:27:15.000Z | 2017-05-15T05:56:40.000Z | #coding=utf-8
from PyQt4 import QtCore
import os, glob, numpy, sys
from PIL import Image
from sklearn.cross_validation import StratifiedKFold
from sklearn.metrics import confusion_matrix
from sklearn.neighbors import KNeighborsClassifier
from sklearn.neighbors import BallTree
from sklearn import cross_validation
from ... | 31.34104 | 87 | 0.568241 |
6af1bee4f8dfc29969377047eaf5953641fb77f7 | 4,823 | py | Python | tests/test_find_forks/test_find_forks.py | ivan2kh/find_forks | 409251282a85da48445afc03c5a1797df393ca95 | [
"MIT"
] | 41 | 2015-05-15T14:37:42.000Z | 2022-02-05T01:52:00.000Z | tests/test_find_forks/test_find_forks.py | ivan2kh/find_forks | 409251282a85da48445afc03c5a1797df393ca95 | [
"MIT"
] | 12 | 2015-05-15T22:10:36.000Z | 2021-12-05T14:21:58.000Z | tests/test_find_forks/test_find_forks.py | ivan2kh/find_forks | 409251282a85da48445afc03c5a1797df393ca95 | [
"MIT"
] | 16 | 2015-05-15T14:44:33.000Z | 2020-11-18T00:54:18.000Z | # coding: utf-8
"""test_find_fork."""
# pylint: disable=no-self-use
from __future__ import absolute_import, division, print_function, unicode_literals
from os import path
import unittest
from six import PY3
from find_forks.__init__ import CONFIG
from find_forks.find_forks import add_forks, determine_names, find_fork... | 41.577586 | 146 | 0.644412 |
6af1e67adc2134fb57f91c04b0e1763048fc52e2 | 15,853 | py | Python | neutron/agent/l3/dvr_router.py | insequent/neutron | 2b1c4f121e3e8ba1c5eb2ba6661bf6326e1507c5 | [
"Apache-2.0"
] | null | null | null | neutron/agent/l3/dvr_router.py | insequent/neutron | 2b1c4f121e3e8ba1c5eb2ba6661bf6326e1507c5 | [
"Apache-2.0"
] | null | null | null | neutron/agent/l3/dvr_router.py | insequent/neutron | 2b1c4f121e3e8ba1c5eb2ba6661bf6326e1507c5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015 Openstack Foundation
#
# 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 ... | 43.196185 | 79 | 0.6272 |
6af266c300822127b8933d07e4d514dfddafdca3 | 575 | py | Python | sider/warnings.py | PCManticore/sider | cd11b38b2a1bf1ea3600eb287abfe3c2b40c67c1 | [
"MIT"
] | 19 | 2015-01-17T18:24:36.000Z | 2022-02-05T06:33:41.000Z | sider/warnings.py | PCManticore/sider | cd11b38b2a1bf1ea3600eb287abfe3c2b40c67c1 | [
"MIT"
] | 5 | 2016-01-13T14:19:44.000Z | 2016-06-01T18:50:36.000Z | sider/warnings.py | PCManticore/sider | cd11b38b2a1bf1ea3600eb287abfe3c2b40c67c1 | [
"MIT"
] | 6 | 2015-08-16T10:32:09.000Z | 2019-11-29T09:57:06.000Z | """:mod:`sider.warnings` --- Warning categories
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module defines several custom warning category classes.
"""
| 25 | 71 | 0.683478 |
6af312eaf5ecd0a0c44737d1362c73e2f2338489 | 2,512 | py | Python | kadal/query.py | Bucolo/Kadal | a0085f15df4f8ebbf5ec4cd4344e207773c6b498 | [
"MIT"
] | 1 | 2022-03-12T15:04:01.000Z | 2022-03-12T15:04:01.000Z | kadal/query.py | Bucolo/Kadal | a0085f15df4f8ebbf5ec4cd4344e207773c6b498 | [
"MIT"
] | null | null | null | kadal/query.py | Bucolo/Kadal | a0085f15df4f8ebbf5ec4cd4344e207773c6b498 | [
"MIT"
] | null | null | null | MEDIA_SEARCH = """
query ($search: String, $type: MediaType, $exclude: MediaFormat, $isAdult: Boolean) {
Media(search: $search, type: $type, format_not: $exclude, isAdult: $isAdult) {
id
type
format
title {
english
romaji
native
}
synonyms
status
description
start... | 14.03352 | 104 | 0.515525 |
6af335ed4a4087ef091d5830d5a795b074596342 | 1,032 | py | Python | sandbox/test/testChainop.py | turkeydonkey/nzmath3 | a48ae9efcf0d9ad1485c2e9863c948a7f1b20311 | [
"BSD-3-Clause"
] | 1 | 2021-05-26T19:22:17.000Z | 2021-05-26T19:22:17.000Z | sandbox/test/testChainop.py | turkeydonkey/nzmath3 | a48ae9efcf0d9ad1485c2e9863c948a7f1b20311 | [
"BSD-3-Clause"
] | null | null | null | sandbox/test/testChainop.py | turkeydonkey/nzmath3 | a48ae9efcf0d9ad1485c2e9863c948a7f1b20311 | [
"BSD-3-Clause"
] | null | null | null | import unittest
import operator
import sandbox.chainop as chainop
def suite(suffix="Test"):
suite = unittest.TestSuite()
all_names = globals()
for name in all_names:
if name.endswith(suffix):
suite.addTest(unittest.makeSuite(all_names[name], "test"))
return suite
if __name__ == ... | 31.272727 | 98 | 0.650194 |
6af3beecef5460df43fd5570a5ba8ce1f6a0d13d | 1,131 | py | Python | labs_final/lab5/experiments/run_trpo_pendulum.py | mrmotallebi/berkeley-deeprl-bootcamp | 9257c693724c38edfa4571e3510667ca168b7ca1 | [
"MIT"
] | 3 | 2018-03-26T14:13:11.000Z | 2020-07-23T22:26:28.000Z | labs_final/lab5/experiments/run_trpo_pendulum.py | mrmotallebi/berkeley-deeprl-bootcamp | 9257c693724c38edfa4571e3510667ca168b7ca1 | [
"MIT"
] | null | null | null | labs_final/lab5/experiments/run_trpo_pendulum.py | mrmotallebi/berkeley-deeprl-bootcamp | 9257c693724c38edfa4571e3510667ca168b7ca1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import chainer
from algs import trpo
from env_makers import EnvMaker
from models import GaussianMLPPolicy, MLPBaseline
from utils import SnapshotSaver
import numpy as np
import os
import logger
log_dir = "data/local/trpo-pendulum"
np.random.seed(42)
# Clean up existing logs
os.system("rm -rf {... | 24.586957 | 51 | 0.678161 |
6af3f2a17f291a65e5f9b17cbe9f19d00752f642 | 2,098 | py | Python | jtyoui/regular/regexengine.py | yy1244/Jtyoui | d3c212ed9d6ffa6b37a8ca49098ab59c89216f09 | [
"MIT"
] | 1 | 2019-12-05T09:46:51.000Z | 2019-12-05T09:46:51.000Z | jtyoui/regular/regexengine.py | yy1244/Jtyoui | d3c212ed9d6ffa6b37a8ca49098ab59c89216f09 | [
"MIT"
] | null | null | null | jtyoui/regular/regexengine.py | yy1244/Jtyoui | d3c212ed9d6ffa6b37a8ca49098ab59c89216f09 | [
"MIT"
] | null | null | null | #!/usr/bin/python3.7
# -*- coding: utf-8 -*-
# @Time : 2019/12/2 10:17
# @Author: Jtyoui@qq.com
"""
"""
try:
import xml.etree.cElementTree as et
except ModuleNotFoundError:
import xml.etree.ElementTree as et
import re
| 27.246753 | 87 | 0.479981 |
6af4d5fe8b77a49f0cbdce7b5f8e3248894cc3b5 | 5,117 | py | Python | proglearn/transformers.py | rflperry/ProgLearn | 9f799b4a8cf2157ba40b04842dc88eaf646e6420 | [
"MIT"
] | null | null | null | proglearn/transformers.py | rflperry/ProgLearn | 9f799b4a8cf2157ba40b04842dc88eaf646e6420 | [
"MIT"
] | 1 | 2020-11-25T19:21:54.000Z | 2020-11-25T19:21:54.000Z | proglearn/transformers.py | rflperry/ProgLearn | 9f799b4a8cf2157ba40b04842dc88eaf646e6420 | [
"MIT"
] | null | null | null | """
Main Author: Will LeVine
Corresponding Email: levinewill@icloud.com
"""
import keras
import numpy as np
from sklearn.tree import DecisionTreeClassifier
from sklearn.utils.validation import check_array, check_is_fitted, check_X_y
from .base import BaseTransformer
| 26.931579 | 94 | 0.587063 |
6af5766ae43b84c8b76547fb51e5b56cfdb7f3af | 9,900 | py | Python | morphelia/external/saphire.py | marx-alex/Morphelia | 809278b07f1a535789455d54df3cbddc850d609c | [
"MIT"
] | null | null | null | morphelia/external/saphire.py | marx-alex/Morphelia | 809278b07f1a535789455d54df3cbddc850d609c | [
"MIT"
] | null | null | null | morphelia/external/saphire.py | marx-alex/Morphelia | 809278b07f1a535789455d54df3cbddc850d609c | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.collections as mcoll
from matplotlib.ticker import MaxNLocator
plt.style.use('seaborn-darkgrid')
def colorline(x, y, z=None, cmap=plt.get_cmap('copper'), norm=plt.Normalize(0.0, 1.0),
linewidth=3, alpha=1.0, zord... | 34.256055 | 114 | 0.58101 |
6af5ea523e6e4b25159d80c12448780bfd106c8c | 4,824 | py | Python | account/views.py | Stfuncode/food-beverage-investigator | 0fea4943a5c2634068dc04118f83742327937c25 | [
"MIT"
] | null | null | null | account/views.py | Stfuncode/food-beverage-investigator | 0fea4943a5c2634068dc04118f83742327937c25 | [
"MIT"
] | null | null | null | account/views.py | Stfuncode/food-beverage-investigator | 0fea4943a5c2634068dc04118f83742327937c25 | [
"MIT"
] | null | null | null | import imp
from venv import create
from django.shortcuts import render, redirect
from django.views import View
from django.views.generic import (
ListView,
)
from account.models import *
from account.forms import *
from data.models import *
from django.contrib.auth import login as auth_login
from django.contrib.a... | 33.5 | 87 | 0.645522 |
6af67173be2103fc04ef7a7c51b006d1f866e003 | 2,697 | py | Python | fpds/client.py | mgradowski/aiproject | 855332bd982bef2530ad935a209ae8be35963165 | [
"MIT"
] | null | null | null | fpds/client.py | mgradowski/aiproject | 855332bd982bef2530ad935a209ae8be35963165 | [
"MIT"
] | null | null | null | fpds/client.py | mgradowski/aiproject | 855332bd982bef2530ad935a209ae8be35963165 | [
"MIT"
] | null | null | null | import cv2
import aiohttp
import asyncio
import concurrent.futures
import argparse
import numpy as np
def main():
parser = argparse.ArgumentParser('fpds.client')
parser.add_argument('url', type=str, help='WebSocket endpoint of fpds.server e.g. http://localhost:8181/fpds')
args = parser.parse_args()
lo... | 35.025974 | 127 | 0.668891 |
6af759aad1d331394cb7f013c9559f17569541f2 | 3,619 | py | Python | Giveme5W1H/extractor/tools/key_value_cache.py | bkrrr/Giveme5W | 657738781fe387d76e6e0da35ed009ccf81f4290 | [
"Apache-2.0"
] | 410 | 2018-05-02T12:53:02.000Z | 2022-03-28T16:11:34.000Z | Giveme5W1H/extractor/tools/key_value_cache.py | bkrrr/Giveme5W | 657738781fe387d76e6e0da35ed009ccf81f4290 | [
"Apache-2.0"
] | 51 | 2018-05-02T13:53:19.000Z | 2022-03-22T00:16:39.000Z | Giveme5W1H/extractor/tools/key_value_cache.py | TU-Berlin/Giveme5W1H | b1586328393a50acde86015d22f78a4c15bf2f34 | [
"Apache-2.0"
] | 81 | 2018-05-29T14:03:27.000Z | 2022-02-08T08:59:38.000Z | import logging
import os
import pickle
import sys
import threading
import time
from typing import List
from Giveme5W1H.extractor.root import path
from Giveme5W1H.extractor.tools.util import bytes_2_human_readable
| 30.931624 | 115 | 0.585797 |
6af7f07129b756fc33dfdd705556d009ef89fe63 | 3,121 | py | Python | nsst_translate_corpus.py | AlexanderJenke/nsst | 75f6afa39568c72c9c513ac0313db33b80bb67d5 | [
"Apache-2.0"
] | null | null | null | nsst_translate_corpus.py | AlexanderJenke/nsst | 75f6afa39568c72c9c513ac0313db33b80bb67d5 | [
"Apache-2.0"
] | null | null | null | nsst_translate_corpus.py | AlexanderJenke/nsst | 75f6afa39568c72c9c513ac0313db33b80bb67d5 | [
"Apache-2.0"
] | null | null | null | from argparse import ArgumentParser
from tqdm import tqdm
import NSST
from nsst_translate import best_transition_sequence
if __name__ == '__main__':
parser = ArgumentParser()
parser.add_argument("--nsst_file", default="output/nsst_tss20_th4_nSt100_Q0.pkl", help="nsst file")
parser.add_argument("--src_lan... | 32.852632 | 104 | 0.544056 |
6afa2508436ad02c7fe767127789a72b5fa053d8 | 382 | py | Python | 10 Days of Statistics/Day 1/Standard Deviation.py | dhyanpatel110/HACKERRANK | 949b1ff468ff3487663bf063a8fe6cdfb9dea26b | [
"Apache-2.0"
] | null | null | null | 10 Days of Statistics/Day 1/Standard Deviation.py | dhyanpatel110/HACKERRANK | 949b1ff468ff3487663bf063a8fe6cdfb9dea26b | [
"Apache-2.0"
] | null | null | null | 10 Days of Statistics/Day 1/Standard Deviation.py | dhyanpatel110/HACKERRANK | 949b1ff468ff3487663bf063a8fe6cdfb9dea26b | [
"Apache-2.0"
] | null | null | null | # Import library
import math
# Define functionts
# Set data
size = int(input())
numbers = list(map(int, input().split()))
# Get standard deviation
print(round(stddev(numbers, size), 1))
| 19.1 | 47 | 0.63089 |
6afb588f82055ac18339fc17c00162ed0a0496d8 | 314 | py | Python | Homework/Hw4/Solution/problem5a.py | jmsevillam/Herramientas-Computacionales-UniAndes | 957338873bd6a17201dfd4629c7edd5760e2271d | [
"MIT"
] | null | null | null | Homework/Hw4/Solution/problem5a.py | jmsevillam/Herramientas-Computacionales-UniAndes | 957338873bd6a17201dfd4629c7edd5760e2271d | [
"MIT"
] | null | null | null | Homework/Hw4/Solution/problem5a.py | jmsevillam/Herramientas-Computacionales-UniAndes | 957338873bd6a17201dfd4629c7edd5760e2271d | [
"MIT"
] | 5 | 2019-05-27T13:35:51.000Z | 2020-09-30T15:19:39.000Z |
Alice='Ti rga eoe esg o h ore"ermetsCmuainls'
Bob='hspormdcdsamsaefrtecus Hraina optcoae"'
print(decode(Alice,Bob,''))
| 24.153846 | 47 | 0.630573 |
6afbbfc0a8b4d96b676b80363b2e541af846b662 | 7,415 | py | Python | pychron/lasers/power/composite_calibration_manager.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 31 | 2016-03-07T02:38:17.000Z | 2022-02-14T18:23:43.000Z | pychron/lasers/power/composite_calibration_manager.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 1,626 | 2015-01-07T04:52:35.000Z | 2022-03-25T19:15:59.000Z | pychron/lasers/power/composite_calibration_manager.py | UIllinoisHALPychron/pychron | f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc | [
"Apache-2.0"
] | 26 | 2015-05-23T00:10:06.000Z | 2022-03-07T16:51:57.000Z | # ===============================================================================
# Copyright 2012 Jake Ross
#
# 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/licens... | 30.142276 | 88 | 0.552124 |
6afbd0d610e5a63b6a074ba49e684ae0359ba35a | 3,957 | py | Python | ttt_package/libs/best_move.py | Ipgnosis/tic_tac_toe | e1519b702531965cc647ff37c1c46d72f4b3b24e | [
"BSD-3-Clause"
] | null | null | null | ttt_package/libs/best_move.py | Ipgnosis/tic_tac_toe | e1519b702531965cc647ff37c1c46d72f4b3b24e | [
"BSD-3-Clause"
] | 4 | 2021-03-25T19:52:40.000Z | 2021-12-12T17:57:11.000Z | ttt_package/libs/best_move.py | Ipgnosis/tic_tac_toe | e1519b702531965cc647ff37c1c46d72f4b3b24e | [
"BSD-3-Clause"
] | null | null | null | # refactored from make_play to simplify
# by Russell on 3/5/21
#from ttt_package.libs.move_utils import get_open_cells
from ttt_package.libs.compare import get_transposed_games, reorient_games
from ttt_package.libs.calc_game_bound import calc_game_bound
from ttt_package.libs.maxi_min import maximin
# find the best mo... | 42.548387 | 100 | 0.703058 |
6afc188b33bb84dbd980d2429af99225dafac393 | 805 | py | Python | yard/skills/66-python/cookbook/yvhai/demo/mt/raw_thread.py | paser4se/bbxyard | d09bc6efb75618b2cef047bad9c8b835043446cb | [
"Apache-2.0"
] | 1 | 2016-03-29T02:01:58.000Z | 2016-03-29T02:01:58.000Z | yard/skills/66-python/cookbook/yvhai/demo/mt/raw_thread.py | paser4se/bbxyard | d09bc6efb75618b2cef047bad9c8b835043446cb | [
"Apache-2.0"
] | 18 | 2019-02-13T09:15:25.000Z | 2021-12-09T21:32:13.000Z | yard/skills/66-python/cookbook/yvhai/demo/mt/raw_thread.py | paser4se/bbxyard | d09bc6efb75618b2cef047bad9c8b835043446cb | [
"Apache-2.0"
] | 2 | 2020-07-05T01:01:30.000Z | 2020-07-08T22:33:06.000Z | #!/usr/bin/env python3
# python
import _thread
import time
from yvhai.demo.base import YHDemo
if __name__ == '__main__':
RawThreadDemo.demo()
| 20.125 | 70 | 0.601242 |
6afc7c91ed45303d7c201609e1cc6104aa29ad90 | 3,108 | py | Python | rasa/utils/tensorflow/constants.py | praneethgb/rasa | 5bf227f165d0b041a367d2c0bbf712ebb6a54792 | [
"Apache-2.0"
] | 8 | 2020-09-16T17:22:13.000Z | 2022-02-01T00:11:30.000Z | rasa/utils/tensorflow/constants.py | praneethgb/rasa | 5bf227f165d0b041a367d2c0bbf712ebb6a54792 | [
"Apache-2.0"
] | 216 | 2020-09-20T13:05:58.000Z | 2022-03-28T12:10:24.000Z | rasa/utils/tensorflow/constants.py | praneethgb/rasa | 5bf227f165d0b041a367d2c0bbf712ebb6a54792 | [
"Apache-2.0"
] | 1 | 2022-02-01T18:23:23.000Z | 2022-02-01T18:23:23.000Z | # constants for configuration parameters of our tensorflow models
LABEL = "label"
IDS = "ids"
# LABEL_PAD_ID is used to pad multi-label training examples.
# It should be < 0 to avoid index out of bounds errors by tf.one_hot.
LABEL_PAD_ID = -1
HIDDEN_LAYERS_SIZES = "hidden_layers_sizes"
SHARE_HIDDEN_LAYERS = "share_hid... | 27.75 | 87 | 0.818855 |
6afcd2c6547b58f11a5de71fbf337c71913e7438 | 32,025 | py | Python | client/canyons-of-mars/maze.py | GamesCreatorsClub/GCC-Rover | 25a69f62a1bb01fc421924ec39f180f50d6a640b | [
"MIT"
] | 3 | 2018-02-13T21:39:55.000Z | 2018-04-26T18:17:39.000Z | client/canyons-of-mars/maze.py | GamesCreatorsClub/GCC-Rover | 25a69f62a1bb01fc421924ec39f180f50d6a640b | [
"MIT"
] | null | null | null | client/canyons-of-mars/maze.py | GamesCreatorsClub/GCC-Rover | 25a69f62a1bb01fc421924ec39f180f50d6a640b | [
"MIT"
] | null | null | null |
#
# Copyright 2016-2019 Games Creators Club
#
# MIT License
#
import math
import pyroslib
import pyroslib.logging
import time
from pyroslib.logging import log, LOG_LEVEL_ALWAYS, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG
from rover import WheelOdos, WHEEL_NAMES
from rover import normaiseAngle, angleDiference
from challenge_uti... | 43.75 | 238 | 0.600031 |
6afda5b387926673c59318881a0eddf14e127e55 | 732 | py | Python | src/spaceone/monitoring/conf/proto_conf.py | jean1042/monitoring | 0585a1ea52ec13285eaca81cc5b19fa3f7a1fba4 | [
"Apache-2.0"
] | 5 | 2020-06-04T23:01:30.000Z | 2020-09-09T08:58:51.000Z | src/spaceone/monitoring/conf/proto_conf.py | jean1042/monitoring | 0585a1ea52ec13285eaca81cc5b19fa3f7a1fba4 | [
"Apache-2.0"
] | 8 | 2021-11-12T08:13:00.000Z | 2022-03-28T11:13:12.000Z | src/spaceone/monitoring/conf/proto_conf.py | jean1042/monitoring | 0585a1ea52ec13285eaca81cc5b19fa3f7a1fba4 | [
"Apache-2.0"
] | 7 | 2020-06-10T01:56:35.000Z | 2021-12-02T05:36:21.000Z | PROTO = {
'spaceone.monitoring.interface.grpc.v1.data_source': ['DataSource'],
'spaceone.monitoring.interface.grpc.v1.metric': ['Metric'],
'spaceone.monitoring.interface.grpc.v1.project_alert_config': ['ProjectAlertConfig'],
'spaceone.monitoring.interface.grpc.v1.escalation_policy': ['EscalationPolicy']... | 56.307692 | 89 | 0.730874 |
6afe84146c4619406b9150aea7be577bdc37e585 | 2,929 | py | Python | tests/delete_regress/models.py | PirosB3/django | 9b729ddd8f2040722971ccfb3b12f7d8162633d1 | [
"BSD-3-Clause"
] | 2 | 2015-01-21T15:45:07.000Z | 2015-02-21T02:38:13.000Z | tests/delete_regress/models.py | PirosB3/django | 9b729ddd8f2040722971ccfb3b12f7d8162633d1 | [
"BSD-3-Clause"
] | null | null | null | tests/delete_regress/models.py | PirosB3/django | 9b729ddd8f2040722971ccfb3b12f7d8162633d1 | [
"BSD-3-Clause"
] | 1 | 2020-05-25T08:55:19.000Z | 2020-05-25T08:55:19.000Z | from django.contrib.contenttypes.fields import (
GenericForeignKey, GenericRelation
)
from django.contrib.contenttypes.models import ContentType
from django.db import models
# Models for #15776
# Models for #16128
| 20.626761 | 80 | 0.725162 |
6afe91d71e827ccc78b53873ca9a15887ff25298 | 5,550 | py | Python | All_Program.py | TheoSaify/Yolo-Detector | f1ac387370982de323a4fc09109c57736b8ce8d6 | [
"Apache-2.0"
] | null | null | null | All_Program.py | TheoSaify/Yolo-Detector | f1ac387370982de323a4fc09109c57736b8ce8d6 | [
"Apache-2.0"
] | null | null | null | All_Program.py | TheoSaify/Yolo-Detector | f1ac387370982de323a4fc09109c57736b8ce8d6 | [
"Apache-2.0"
] | null | null | null | import cv2
from cv2 import *
import numpy as np
from matplotlib import pyplot as plt
###############################SIFT MATCH Function#################################
###################################################################################################
#################################... | 29.83871 | 127 | 0.571171 |
6afebab1780e5e05d2dbd1b300b2e8c2a43c36a7 | 17,003 | py | Python | apps/UI_phone_mcdm.py | industrial-optimization-group/researchers-night | 68f2fcb8530032e157badda772a795e1f3bb2c4b | [
"MIT"
] | null | null | null | apps/UI_phone_mcdm.py | industrial-optimization-group/researchers-night | 68f2fcb8530032e157badda772a795e1f3bb2c4b | [
"MIT"
] | null | null | null | apps/UI_phone_mcdm.py | industrial-optimization-group/researchers-night | 68f2fcb8530032e157badda772a795e1f3bb2c4b | [
"MIT"
] | null | null | null | import dash
from dash.exceptions import PreventUpdate
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
import dash_bootstrap_components as dbc
import dash_table
import plotly.express as ex
import plotly.graph_objects as go
import pandas as pd
imp... | 43.485934 | 95 | 0.283597 |
6aff4d7639431aa38a4d3a68b963afee4300b218 | 3,479 | py | Python | pyxon/utils.py | k-j-m/Pyxon | a7f9b3ce524f2441e952c47acd199dd4024d2322 | [
"MIT"
] | null | null | null | pyxon/utils.py | k-j-m/Pyxon | a7f9b3ce524f2441e952c47acd199dd4024d2322 | [
"MIT"
] | null | null | null | pyxon/utils.py | k-j-m/Pyxon | a7f9b3ce524f2441e952c47acd199dd4024d2322 | [
"MIT"
] | null | null | null | import pyxon.decode as pd
def unobjectify(obj):
"""
Turns a python object (must be a class instance)
into the corresponding JSON data.
Example:
>>> @sprop.a # sprop annotations are needed to tell the
>>> @sprop.b # unobjectify function what parameter need
>>> @sprop.c # to be written out.... | 28.284553 | 72 | 0.627479 |
6affc41b95b69a262ac3e3eb689401cbbc182548 | 19,112 | py | Python | AxonDeepSeg/segment.py | sophie685/newfileplzworklord | fbbb03c44dc9e4b0409364b49265f453ac80d3c0 | [
"MIT"
] | null | null | null | AxonDeepSeg/segment.py | sophie685/newfileplzworklord | fbbb03c44dc9e4b0409364b49265f453ac80d3c0 | [
"MIT"
] | 8 | 2020-09-26T00:42:19.000Z | 2022-02-10T00:41:55.000Z | AxonDeepSeg/segment.py | sophie685/newfileplzworklord | fbbb03c44dc9e4b0409364b49265f453ac80d3c0 | [
"MIT"
] | null | null | null | # Segmentation script
# -------------------
# This script lets the user segment automatically one or many images based on the default segmentation models: SEM or
# TEM.
#
# Maxime Wabartha - 2017-08-30
# Imports
import sys
from pathlib import Path
import json
import argparse
from argparse import RawTextHelpFormatter... | 45.075472 | 202 | 0.604071 |
ed0142db547eada6fd1f50b0e7939a47e99944a3 | 1,746 | py | Python | tests/test_hedges.py | aplested/DC_Pyps | da33fc7d0e7365044e368488d1c7cbbae7473cc7 | [
"MIT"
] | 1 | 2021-03-25T18:09:25.000Z | 2021-03-25T18:09:25.000Z | tests/test_hedges.py | aplested/DC_Pyps | da33fc7d0e7365044e368488d1c7cbbae7473cc7 | [
"MIT"
] | null | null | null | tests/test_hedges.py | aplested/DC_Pyps | da33fc7d0e7365044e368488d1c7cbbae7473cc7 | [
"MIT"
] | null | null | null | from dcstats.hedges import Hedges_d
from dcstats.statistics_EJ import simple_stats as mean_SD
import random
import math
###tests
| 29.59322 | 102 | 0.689003 |
ed0157759bef39b622e00be4f990c696bc0f3dd8 | 110 | py | Python | src/FYP/fifaRecords/urls.py | MustafaAbbas110/FinalProject | 30d371f06a8a1875285cfd4a8940ca3610ec1274 | [
"BSD-3-Clause"
] | null | null | null | src/FYP/fifaRecords/urls.py | MustafaAbbas110/FinalProject | 30d371f06a8a1875285cfd4a8940ca3610ec1274 | [
"BSD-3-Clause"
] | null | null | null | src/FYP/fifaRecords/urls.py | MustafaAbbas110/FinalProject | 30d371f06a8a1875285cfd4a8940ca3610ec1274 | [
"BSD-3-Clause"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.Records, name ="fRec"),
] | 18.333333 | 42 | 0.672727 |
ed0176bb36b001f6300ef33bd058b934c1c2ff34 | 2,022 | py | Python | spacy_transformers/tests/regression/test_spacy_issue6401.py | KennethEnevoldsen/spacy-transformers | fa39a94ba276ae3681d14a4b376ea50fadd574b3 | [
"MIT"
] | null | null | null | spacy_transformers/tests/regression/test_spacy_issue6401.py | KennethEnevoldsen/spacy-transformers | fa39a94ba276ae3681d14a4b376ea50fadd574b3 | [
"MIT"
] | null | null | null | spacy_transformers/tests/regression/test_spacy_issue6401.py | KennethEnevoldsen/spacy-transformers | fa39a94ba276ae3681d14a4b376ea50fadd574b3 | [
"MIT"
] | null | null | null | import pytest
from spacy.training.example import Example
from spacy.util import make_tempdir
from spacy import util
from thinc.api import Config
TRAIN_DATA = [
("I'm so happy.", {"cats": {"POSITIVE": 1.0, "NEGATIVE": 0.0}}),
("I'm so angry", {"cats": {"POSITIVE": 0.0, "NEGATIVE": 1.0}}),
]
cfg_string = """
... | 29.304348 | 85 | 0.678536 |
ed0376f91f0c41a8fa993fc5f6223d8bbb5eb7cb | 712 | py | Python | hydra/client/repl.py | rpacholek/hydra | 60e3c2eec5ab1fd1dde8e510baa5175173c66a6a | [
"MIT"
] | null | null | null | hydra/client/repl.py | rpacholek/hydra | 60e3c2eec5ab1fd1dde8e510baa5175173c66a6a | [
"MIT"
] | null | null | null | hydra/client/repl.py | rpacholek/hydra | 60e3c2eec5ab1fd1dde8e510baa5175173c66a6a | [
"MIT"
] | null | null | null | import asyncio
from ..core.common.io import input
from .action_creator import ActionCreator
| 28.48 | 62 | 0.58427 |
ed037d47b7c87bc348767b05b7307204b77059ed | 35,606 | py | Python | train_dv3.py | drat/Neural-Voice-Cloning-With-Few-Samples | 4febde43ccc143fc88d74d5fa0c5a117636778b4 | [
"MIT"
] | 361 | 2018-08-17T14:37:29.000Z | 2022-03-15T13:04:16.000Z | train_dv3.py | drat/Neural-Voice-Cloning-With-Few-Samples | 4febde43ccc143fc88d74d5fa0c5a117636778b4 | [
"MIT"
] | 22 | 2018-11-25T13:42:26.000Z | 2020-04-29T05:16:25.000Z | train_dv3.py | drat/Neural-Voice-Cloning-With-Few-Samples | 4febde43ccc143fc88d74d5fa0c5a117636778b4 | [
"MIT"
] | 121 | 2018-08-30T03:53:09.000Z | 2022-03-25T09:03:17.000Z | """Trainining script for seq2seq text-to-speech synthesis model.
usage: train.py [options]
options:
--data-root=<dir> Directory contains preprocessed features.
--checkpoint-dir=<dir> Directory where to save model checkpoints [default: checkpoints].
--hparams=<parmas> Hyper param... | 37.559072 | 102 | 0.63068 |
ed03eb092480421cebe7ff1098718fc83eac9aac | 3,324 | py | Python | magic_mirror.py | alcinnz/Historical-Twin | 54a9ab5dc130aaeb2e00058bbaeace7377e2ff3d | [
"MIT"
] | 1 | 2018-08-16T10:06:21.000Z | 2018-08-16T10:06:21.000Z | magic_mirror.py | alcinnz/Historical-Twin | 54a9ab5dc130aaeb2e00058bbaeace7377e2ff3d | [
"MIT"
] | null | null | null | magic_mirror.py | alcinnz/Historical-Twin | 54a9ab5dc130aaeb2e00058bbaeace7377e2ff3d | [
"MIT"
] | null | null | null | #! /usr/bin/python2
import time
start = time.time()
import pygame, numpy
import pygame.camera
# Init display
screen = pygame.display.set_mode((0,0), pygame.FULLSCREEN)
pygame.display.set_caption("Magic Mirror")
#pygame.mouse.set_visible(False)
# Init font
pygame.font.init()
font_colour = 16, 117, 186
fonts = {40: p... | 28.655172 | 87 | 0.653129 |
ed0441122c358fac6781aee918c51f234c854920 | 288 | py | Python | resolwe/__init__.py | plojyon/resolwe | 1bee6f0860fdd087534adf1680e9350d79ab97cf | [
"Apache-2.0"
] | 27 | 2015-12-07T18:29:12.000Z | 2022-03-16T08:01:47.000Z | resolwe/__init__.py | plojyon/resolwe | 1bee6f0860fdd087534adf1680e9350d79ab97cf | [
"Apache-2.0"
] | 681 | 2015-12-01T11:52:24.000Z | 2022-03-21T07:43:37.000Z | resolwe/__init__.py | plojyon/resolwe | 1bee6f0860fdd087534adf1680e9350d79ab97cf | [
"Apache-2.0"
] | 28 | 2015-12-01T08:32:57.000Z | 2021-12-14T00:04:16.000Z | """.. Ignore pydocstyle D400.
=======
Resolwe
=======
Open source enterprise dataflow engine in Django.
"""
from resolwe.__about__ import ( # noqa: F401
__author__,
__copyright__,
__email__,
__license__,
__summary__,
__title__,
__url__,
__version__,
)
| 14.4 | 49 | 0.638889 |
ed04e3a19994480a40ef35eabbb8a7e09343ee2c | 8,898 | py | Python | audio_som64_u_grupo1.py | andremsouza/swine_sound_analysis | 5583bf91b18e8ad2dcaccb30a94c134e2eab34a5 | [
"MIT"
] | null | null | null | audio_som64_u_grupo1.py | andremsouza/swine_sound_analysis | 5583bf91b18e8ad2dcaccb30a94c134e2eab34a5 | [
"MIT"
] | 1 | 2021-01-20T01:56:42.000Z | 2021-01-20T01:56:42.000Z | audio_som64_u_grupo1.py | andremsouza/swine_sound_analysis | 5583bf91b18e8ad2dcaccb30a94c134e2eab34a5 | [
"MIT"
] | null | null | null | # %% [markdown]
# # Testing python-som with audio dataset
# %% [markdown]
# # Imports
# %%
import matplotlib.pyplot as plt
# import librosa as lr
# import librosa.display as lrdisp
import numpy as np
import pandas as pd
import pickle
import seaborn as sns
import sklearn.preprocessing
from python_som import SOM
FILE... | 30.682759 | 80 | 0.615532 |
ed0683361fef86b73c36e55f72fcd846b4e5dd8c | 1,019 | py | Python | footy/engine/UpdateEngine.py | dallinb/footy | d6879481a85b4a84023805bf29bd7dff32afa67f | [
"BSD-3-Clause"
] | 2 | 2020-08-27T17:59:13.000Z | 2021-10-10T02:26:20.000Z | footy/engine/UpdateEngine.py | FootyStats/footy | d6879481a85b4a84023805bf29bd7dff32afa67f | [
"BSD-3-Clause"
] | 32 | 2020-08-24T15:01:57.000Z | 2022-03-12T00:47:02.000Z | footy/engine/UpdateEngine.py | dallinb/footy | d6879481a85b4a84023805bf29bd7dff32afa67f | [
"BSD-3-Clause"
] | null | null | null | """Prediction Engine - Update the data model with the most resent fixtures and results."""
from footy.domain import Competition
| 29.970588 | 109 | 0.649657 |
ed06ae9dc5fa12b66e8b0650821700fcf43fb094 | 2,286 | py | Python | bindings/pydeck/docs/scripts/embed_examples.py | marsupialmarcos/deck.gl | c9867c1db87e492253865353f68c985019c7c613 | [
"MIT"
] | 2 | 2021-08-11T08:05:51.000Z | 2021-08-11T08:05:54.000Z | bindings/pydeck/docs/scripts/embed_examples.py | marsupialmarcos/deck.gl | c9867c1db87e492253865353f68c985019c7c613 | [
"MIT"
] | null | null | null | bindings/pydeck/docs/scripts/embed_examples.py | marsupialmarcos/deck.gl | c9867c1db87e492253865353f68c985019c7c613 | [
"MIT"
] | null | null | null | """Script to embed pydeck examples into .rst pages with code
These populate the files you see once you click into a grid cell
on the pydeck gallery page
"""
from multiprocessing import Pool
import os
import subprocess
import sys
from const import DECKGL_URL_BASE, EXAMPLE_GLOB, GALLERY_DIR, HTML_DIR, HOSTED_STATIC_PAT... | 35.169231 | 106 | 0.71916 |
ed0721912431ef604f57495e6aa85dbb0102f18a | 45,482 | py | Python | symbolicR/python/forward_kin.py | mharding01/augmented-neuromuscular-RT-running | 7e1ef00d3fdf9cfa9d59fc4f3a6a0e6dd792a834 | [
"MIT"
] | null | null | null | symbolicR/python/forward_kin.py | mharding01/augmented-neuromuscular-RT-running | 7e1ef00d3fdf9cfa9d59fc4f3a6a0e6dd792a834 | [
"MIT"
] | null | null | null | symbolicR/python/forward_kin.py | mharding01/augmented-neuromuscular-RT-running | 7e1ef00d3fdf9cfa9d59fc4f3a6a0e6dd792a834 | [
"MIT"
] | null | null | null | import numpy as np
import sympy as sp
import re
import os
######################
# #
# 17 16 21 #
# 18 15 22 #
# 19 14 23 #
# 20 01 24 #
# 02 08 #
# 03 09 #
# 04 10 #
# 05 11 #
# 06 12 #
# 07... | 32.348506 | 189 | 0.633767 |
ed07be5c12830ff2ea484a69a77d31923d6aa5cb | 1,223 | py | Python | examples/last.py | 0xiso/PyMISP | 20a340414422714dcf31389957343c663550ed1a | [
"BSD-2-Clause"
] | 5 | 2019-08-12T15:21:00.000Z | 2021-10-01T01:50:52.000Z | examples/last.py | DragonDev1906/PyMISP | 5c72dc9c33b4ae850d40ff06dfb05c27f3e80e5d | [
"BSD-2-Clause"
] | null | null | null | examples/last.py | DragonDev1906/PyMISP | 5c72dc9c33b4ae850d40ff06dfb05c27f3e80e5d | [
"BSD-2-Clause"
] | 3 | 2018-11-22T15:33:16.000Z | 2019-09-02T14:23:35.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pymisp import PyMISP
from keys import misp_url, misp_key, misp_verifycert
import argparse
import os
import json
# Usage for pipe masters: ./last.py -l 5h | jq .
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Download latest events fr... | 27.795455 | 133 | 0.644317 |
ed0ba1aa04531d363f3421c385e69a867b69168b | 2,949 | py | Python | saleor/dashboard/urls.py | Chaoslecion123/Diver | 8c5c493701422eada49cbf95b0b0add08f1ea561 | [
"BSD-3-Clause"
] | null | null | null | saleor/dashboard/urls.py | Chaoslecion123/Diver | 8c5c493701422eada49cbf95b0b0add08f1ea561 | [
"BSD-3-Clause"
] | null | null | null | saleor/dashboard/urls.py | Chaoslecion123/Diver | 8c5c493701422eada49cbf95b0b0add08f1ea561 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import include, url
from django.views.generic.base import TemplateView
from . import views as core_views
from .category.urls import urlpatterns as category_urls
from .collection.urls import urlpatterns as collection_urls
from .customer.urls import urlpatterns as customer_urls
from .discount.urls ... | 49.15 | 83 | 0.714819 |
ed0cbfaf8410cb124a4ef21f7ca9796ba91008fc | 1,146 | py | Python | experiments/CUB_fewshot_raw/FRN/ResNet-12/train.py | Jf-Chen/FRN-main | 5b57b9e0d7368058a8e3ba41a53c460b54ab9b91 | [
"MIT"
] | 43 | 2021-04-27T23:42:35.000Z | 2022-03-30T02:41:19.000Z | experiments/CUB_fewshot_raw/FRN/ResNet-12/train.py | Jf-Chen/FRN-main | 5b57b9e0d7368058a8e3ba41a53c460b54ab9b91 | [
"MIT"
] | 7 | 2021-05-31T10:38:17.000Z | 2022-01-06T05:20:08.000Z | experiments/CUB_fewshot_raw/FRN/ResNet-12/train.py | Jf-Chen/FRN-main | 5b57b9e0d7368058a8e3ba41a53c460b54ab9b91 | [
"MIT"
] | 7 | 2021-05-18T00:37:46.000Z | 2022-01-23T07:09:51.000Z | import os
import sys
import torch
import yaml
from functools import partial
sys.path.append('../../../../')
from trainers import trainer, frn_train
from datasets import dataloaders
from models.FRN import FRN
args = trainer.train_parser()
with open('../../../../config.yml', 'r') as f:
temp = yaml.safe_load(f)
data... | 30.157895 | 89 | 0.666667 |
ed0d0fb11e355951942a4b93a958119ead61c53e | 6,037 | py | Python | exp/DFRdatasets/simulate.py | zzzace2000/dropout-feature-rankin | 7769ce822f3c0a6d23167d11f1569f59e56b1266 | [
"CC-BY-4.0"
] | 6 | 2019-02-24T07:31:38.000Z | 2021-12-27T08:57:38.000Z | exp/DFRdatasets/simulate.py | zzzace2000/dropout-feature-rankin | 7769ce822f3c0a6d23167d11f1569f59e56b1266 | [
"CC-BY-4.0"
] | 2 | 2019-01-13T11:49:35.000Z | 2020-05-18T01:59:15.000Z | exp/DFRdatasets/simulate.py | zzzace2000/dropout-feature-rankin | 7769ce822f3c0a6d23167d11f1569f59e56b1266 | [
"CC-BY-4.0"
] | 6 | 2018-11-06T14:17:07.000Z | 2021-11-06T14:30:10.000Z | import argparse
import argparse
import os
import numpy as np
import torch
from dataloaders.LoaderBase import LoaderBase
import exp.feature.feature_utils as feature_utils
if __name__ == '__main__':
args = parse_args()
if 'other_ranks' in args.rank_func:
args.rank_func.remove('other_ranks')
... | 41.068027 | 98 | 0.629617 |
ed0d8ae3aab7a47853ec71583d13c54d255d0f51 | 2,430 | py | Python | gym_pcgrl/envs/reps/wide_3D_rep.py | JiangZehua/gym-pcgrl | 80ddbde173803e81060578c2c4167d8d1f5cacba | [
"MIT"
] | null | null | null | gym_pcgrl/envs/reps/wide_3D_rep.py | JiangZehua/gym-pcgrl | 80ddbde173803e81060578c2c4167d8d1f5cacba | [
"MIT"
] | null | null | null | gym_pcgrl/envs/reps/wide_3D_rep.py | JiangZehua/gym-pcgrl | 80ddbde173803e81060578c2c4167d8d1f5cacba | [
"MIT"
] | null | null | null | from gym_pcgrl.envs.reps.representation3D import Representation3D
from PIL import Image
from gym import spaces
import numpy as np
from gym_pcgrl.envs.probs.minecraft.mc_render import reps_3D_render
"""
The wide representation where the agent can pick the tile position and tile value at each update.
"""
| 32.837838 | 101 | 0.671605 |
ed0ede6f5172ebc43a6bba82ff98dc80379f3c8f | 10,696 | py | Python | ucsmsdk/mometa/adaptor/AdaptorMenloQStats.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/adaptor/AdaptorMenloQStats.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/adaptor/AdaptorMenloQStats.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for AdaptorMenloQStats ManagedObject."""
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
| 76.94964 | 277 | 0.708022 |
ed0fc8cf4f946e650eb4b14f0a5d7690952a62a3 | 980 | py | Python | python/old_password_test.py | XelaRellum/old_password | b461941069bc7f1187776a992f86c89317ab215e | [
"MIT"
] | null | null | null | python/old_password_test.py | XelaRellum/old_password | b461941069bc7f1187776a992f86c89317ab215e | [
"MIT"
] | null | null | null | python/old_password_test.py | XelaRellum/old_password | b461941069bc7f1187776a992f86c89317ab215e | [
"MIT"
] | null | null | null | import unittest
import pytest
from old_password import old_password
import csv
import re
def test_password_with_space():
"""
spaces in password are skipped
"""
assert old_password("pass word") == old_password("password")
def test_password_with_tab():
"""
tabs in password are skipped
"... | 22.272727 | 67 | 0.643878 |
ed10c3db0c256d5bebae34542a471bf7c8fc94ae | 6,829 | py | Python | src/RS_model/train_mlp.py | CindyChen1995/MKR | f9ae37903dcf43b6d101dfc08644ce4a29ecbf9d | [
"MIT"
] | null | null | null | src/RS_model/train_mlp.py | CindyChen1995/MKR | f9ae37903dcf43b6d101dfc08644ce4a29ecbf9d | [
"MIT"
] | null | null | null | src/RS_model/train_mlp.py | CindyChen1995/MKR | f9ae37903dcf43b6d101dfc08644ce4a29ecbf9d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
-------------------------------------------------
Description :
Author : cmy
date 2020/1/2
-------------------------------------------------
"""
import datetime
import heapq
import numpy as np
import tensorflow as tf
import time
from metrics import ndcg_at_k
from tra... | 41.387879 | 130 | 0.516767 |
ed12384bdaa43735e81fa807c26ed334db11e7a1 | 84,211 | py | Python | pylipid.py | glass-w/PyLipID | ee29f92ba6187cd22b9554a599177152ebed9c4c | [
"MIT"
] | null | null | null | pylipid.py | glass-w/PyLipID | ee29f92ba6187cd22b9554a599177152ebed9c4c | [
"MIT"
] | null | null | null | pylipid.py | glass-w/PyLipID | ee29f92ba6187cd22b9554a599177152ebed9c4c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 28 19:28:17 2019
@author: Wanling Song
"""
import mdtraj as md
import numpy as np
import pandas as pd
import argparse
import sys
from collections import defaultdict
import pickle
import os
import matplotlib
matplotlib.use('Agg')
import matplotlib.p... | 62.332346 | 227 | 0.574723 |
ed123b848cc69e55c673d2f62ec3999397f7c2b8 | 547 | py | Python | main.py | yaakiyu/rt-bot | f68bca95c516e08c31ecc846524dcea4c8ba1503 | [
"BSD-4-Clause"
] | null | null | null | main.py | yaakiyu/rt-bot | f68bca95c516e08c31ecc846524dcea4c8ba1503 | [
"BSD-4-Clause"
] | null | null | null | main.py | yaakiyu/rt-bot | f68bca95c516e08c31ecc846524dcea4c8ba1503 | [
"BSD-4-Clause"
] | null | null | null | # RT by Rext
from asyncio import run
from discord import Intents, Status, Game, AllowedMentions
from core.bot import RT
from data import SECRET
try: from uvloop import install
except ModuleNotFoundError: ...
else: install()
intents = Intents.default()
intents.message_content = True
intents.members = True
bot = RT... | 21.038462 | 70 | 0.753199 |
ed1329b2789d579e2ef82e7b330a86a58150d0b6 | 13,014 | py | Python | hiplot/fetchers_demo.py | dmitryvinn/hiplot | 52fe8b195a4e254240eb1a0847953fa3c1957a43 | [
"MIT"
] | 1 | 2022-03-21T15:46:17.000Z | 2022-03-21T15:46:17.000Z | hiplot/fetchers_demo.py | ai2ys/hiplot | 148f7c4eba11c6393957a819169f3cf07c469bec | [
"MIT"
] | null | null | null | hiplot/fetchers_demo.py | ai2ys/hiplot | 148f7c4eba11c6393957a819169f3cf07c469bec | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import uuid
import random
import math
import time
import typing as t
from . import experiment as hip
# Demos from the README. If one of those ... | 34.247368 | 140 | 0.593592 |
ed148a5bf47d0fb8ac1d5504a3f607cd11c82fbf | 313 | py | Python | app/endpoints/common/dtos/ingredient.py | brauls/ingredients-service | 67c1408f96f4b407d7e7b3e5e62406a6931de1c1 | [
"MIT"
] | null | null | null | app/endpoints/common/dtos/ingredient.py | brauls/ingredients-service | 67c1408f96f4b407d7e7b3e5e62406a6931de1c1 | [
"MIT"
] | 1 | 2021-06-01T23:34:40.000Z | 2021-06-01T23:34:40.000Z | app/endpoints/common/dtos/ingredient.py | brauls/ingredients-service | 67c1408f96f4b407d7e7b3e5e62406a6931de1c1 | [
"MIT"
] | null | null | null | """Ingredient dto.
"""
| 24.076923 | 60 | 0.642173 |
ed14a6749afbe24501971f360abe8e3e8754902d | 423 | py | Python | barcode.py | kallangerard/grocery-barcode-scanner | 0a866c5b20c43355b642c0b78ba09d5cf4b0383c | [
"MIT"
] | null | null | null | barcode.py | kallangerard/grocery-barcode-scanner | 0a866c5b20c43355b642c0b78ba09d5cf4b0383c | [
"MIT"
] | null | null | null | barcode.py | kallangerard/grocery-barcode-scanner | 0a866c5b20c43355b642c0b78ba09d5cf4b0383c | [
"MIT"
] | null | null | null | import logging
import groceries.api as groceries
import barcodescanner.scan as barcode
if __name__ == "__main__":
logging.basicConfig(level=logging.DEBUG)
main()
| 22.263158 | 50 | 0.65721 |
ed152979dba20d65fa46d571939edbfd7eb69a09 | 790 | py | Python | setup.py | mr-sk/easy-icm-runner | 01cf9d7d8e4ef13afc18dbdda2862035121f3624 | [
"MIT"
] | null | null | null | setup.py | mr-sk/easy-icm-runner | 01cf9d7d8e4ef13afc18dbdda2862035121f3624 | [
"MIT"
] | null | null | null | setup.py | mr-sk/easy-icm-runner | 01cf9d7d8e4ef13afc18dbdda2862035121f3624 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="easy-icm-runner",
version="1.0.6",
author="Bachir El Koussa",
author_email="bgkoussa@gmail.com",
description="A wrapper for IBM ICMs Scheduler API Calls",
long_description=long_descrip... | 30.384615 | 93 | 0.641772 |
ed15a4196531124a25ec9256f08c4c288fc464c6 | 1,784 | py | Python | test_molecule.py | zee93/molecule_parser | 42f5a3722d733ef9f7243bfa2b0b9a08c7bc5d23 | [
"MIT"
] | null | null | null | test_molecule.py | zee93/molecule_parser | 42f5a3722d733ef9f7243bfa2b0b9a08c7bc5d23 | [
"MIT"
] | null | null | null | test_molecule.py | zee93/molecule_parser | 42f5a3722d733ef9f7243bfa2b0b9a08c7bc5d23 | [
"MIT"
] | null | null | null | import unittest
from molecule import onize_formula, update_equation_with_multiplier, flaten_formula, parse_molecule
if __name__ == '__main__':
unittest.main()
| 39.644444 | 100 | 0.669283 |