hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79540e69ef8430899848bf5177c90799698c3fe2 | 2,260 | py | Python | src/wechaty/user/contact_self.py | kis87988/Chatie-python-wechaty | 92b0ad6fff693be67f37faf3dbcc16bcb0d13bde | [
"Apache-2.0"
] | 1 | 2021-12-10T06:48:33.000Z | 2021-12-10T06:48:33.000Z | src/wechaty/user/contact_self.py | kis87988/Chatie-python-wechaty | 92b0ad6fff693be67f37faf3dbcc16bcb0d13bde | [
"Apache-2.0"
] | 1 | 2022-01-17T04:02:36.000Z | 2022-01-17T04:02:36.000Z | src/wechaty/user/contact_self.py | kis87988/Chatie-python-wechaty | 92b0ad6fff693be67f37faf3dbcc16bcb0d13bde | [
"Apache-2.0"
] | null | null | null | """ContactSelf"""
from __future__ import annotations
from typing import Any, Optional, Type
from wechaty import FileBox, get_logger
from wechaty.exceptions import WechatyOperationError
from wechaty.user.contact import Contact
log = get_logger('ContactSelf')
class ContactSelf(Contact):
"""ContactSelf"""
as... | 27.560976 | 96 | 0.611504 |
79540ffbdf30be7cee783af841efbc3792d0d5b8 | 4,243 | py | Python | mpython_ble/application/peripheral.py | labplus-cn/mpython_ble | c07a2eddec73c7f19ba5ef56ecbb5d47dd1b1fdf | [
"MIT"
] | 2 | 2020-11-01T05:51:00.000Z | 2021-09-20T03:32:50.000Z | mpython_ble/application/peripheral.py | labplus-cn/mpython_ble | c07a2eddec73c7f19ba5ef56ecbb5d47dd1b1fdf | [
"MIT"
] | 1 | 2021-08-09T09:29:17.000Z | 2021-08-09T09:29:17.000Z | mpython_ble/application/peripheral.py | labplus-cn/mpython_ble | c07a2eddec73c7f19ba5ef56ecbb5d47dd1b1fdf | [
"MIT"
] | 1 | 2020-08-11T02:28:38.000Z | 2020-08-11T02:28:38.000Z | # The MIT License (MIT)
# Copyright (c) 2020, Tangliufeng for labplus Industries
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights... | 41.598039 | 143 | 0.679472 |
7954103936245cb45d23cdc8205a11bdd8a13b2a | 1,485 | py | Python | setup.py | joequant/webdavfs | 369a6e6027aa94f103cb12626f58ea2fb9a7f709 | [
"MIT"
] | null | null | null | setup.py | joequant/webdavfs | 369a6e6027aa94f103cb12626f58ea2fb9a7f709 | [
"MIT"
] | null | null | null | setup.py | joequant/webdavfs | 369a6e6027aa94f103cb12626f58ea2fb9a7f709 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, find_packages
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Lan... | 27 | 55 | 0.628283 |
795410c29bcc3ba58f34780f4ac57eb58e19dab7 | 1,550 | py | Python | tests/symmetries_t.py | JunaidAkhter/vmc_jax | 4f0dcc9f32cb6885cad3c5d797d9f9e01247f737 | [
"MIT"
] | null | null | null | tests/symmetries_t.py | JunaidAkhter/vmc_jax | 4f0dcc9f32cb6885cad3c5d797d9f9e01247f737 | [
"MIT"
] | null | null | null | tests/symmetries_t.py | JunaidAkhter/vmc_jax | 4f0dcc9f32cb6885cad3c5d797d9f9e01247f737 | [
"MIT"
] | null | null | null | import sys
# Find jVMC package
sys.path.append(sys.path[0] + "/..")
import unittest
import jax
from jax.config import config
config.update("jax_enable_x64", True)
import jax.random as random
import jax.numpy as jnp
import numpy as np
import jVMC
import jVMC.util.symmetries as symmetries
import jVMC.global_defs as ... | 31 | 164 | 0.65871 |
795410ee88382dc57a6fef43db2f8cf6554450dd | 958 | py | Python | examples/test_cec2013.py | mcrimi/opfunu | 9c8a074c5dca604acc3ddc7fbf15ef30f57d1756 | [
"Apache-2.0"
] | 1 | 2021-05-25T14:46:21.000Z | 2021-05-25T14:46:21.000Z | examples/test_cec2013.py | HaaLeo/opfunu | 1ff3ecf4b7818a0edd5d92ce5475839fa9477da1 | [
"Apache-2.0"
] | null | null | null | examples/test_cec2013.py | HaaLeo/opfunu | 1ff3ecf4b7818a0edd5d92ce5475839fa9477da1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# ------------------------------------------------------------------------------------------------------%
# Created by "Thieu Nguyen" at 22:21, 25/04/2020 %
# ... | 53.222222 | 105 | 0.327766 |
795410fe296799b5835798c33993be540e204037 | 583 | py | Python | python3.4+/startbot.py | mickeymouse/Vagabot | 1bd3ab154647676a31de26a572af3af88f456571 | [
"MIT"
] | null | null | null | python3.4+/startbot.py | mickeymouse/Vagabot | 1bd3ab154647676a31de26a572af3af88f456571 | [
"MIT"
] | null | null | null | python3.4+/startbot.py | mickeymouse/Vagabot | 1bd3ab154647676a31de26a572af3af88f456571 | [
"MIT"
] | null | null | null | import discord
import asyncio
from configs import Configs
from Bot import commands
client = discord.Client()
@client.event
@asyncio.coroutine
def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
@client.event
@asyncio.coroutine
def on_message(message)... | 22.423077 | 60 | 0.67753 |
795411ccbea2e2301b20401398527b1a01e02b72 | 1,607 | py | Python | doom/utils/tradeno.py | iiCodeThings/admin | 851ebcb8b90d4bea4bd7468ed403ec13fca801ee | [
"MIT"
] | 1 | 2022-02-16T08:20:12.000Z | 2022-02-16T08:20:12.000Z | doom/utils/tradeno.py | iiCodeThings/admin | 851ebcb8b90d4bea4bd7468ed403ec13fca801ee | [
"MIT"
] | null | null | null | doom/utils/tradeno.py | iiCodeThings/admin | 851ebcb8b90d4bea4bd7468ed403ec13fca801ee | [
"MIT"
] | null | null | null | import time
# Tue, 21 Mar 2006 20:50:14.000 GMT
twepoch = 1142974214000
worker_id_bits = 5
data_center_id_bits = 5
max_worker_id = -1 ^ (-1 << worker_id_bits)
max_data_center_id = -1 ^ (-1 << data_center_id_bits)
sequence_bits = 12
worker_id_shift = sequence_bits
data_center_id_shift = sequence_bits + worker_id_bits
... | 28.192982 | 81 | 0.632856 |
795411de44010507822794b7529cf20a5a7363c7 | 29,110 | py | Python | tensorpac/utils.py | tylerbrunette/tensorpac | afae9557db417a54b001c0837dbc8638f6fe20f0 | [
"BSD-3-Clause"
] | null | null | null | tensorpac/utils.py | tylerbrunette/tensorpac | afae9557db417a54b001c0837dbc8638f6fe20f0 | [
"BSD-3-Clause"
] | null | null | null | tensorpac/utils.py | tylerbrunette/tensorpac | afae9557db417a54b001c0837dbc8638f6fe20f0 | [
"BSD-3-Clause"
] | null | null | null | """Utility functions."""
import logging
import numpy as np
from scipy.signal import periodogram
from tensorpac.methods.meth_pac import _kl_hr
from tensorpac.pac import _PacObj, _PacVisual
from tensorpac.io import set_log_level
logger = logging.getLogger('tensorpac')
def pac_vec(f_pha='mres', f_amp='mres'):
"""... | 39.073826 | 79 | 0.57482 |
795411e4d11dcaf91a3309f8ad4b18d5698068cf | 60 | py | Python | python/rrsg_cgreco/__init__.py | ismrm-rrsg-2019/rrsg_challenge_01 | 62feee3a3fbab3db376834429998b21ba474f593 | [
"MIT"
] | 4 | 2020-04-07T15:56:27.000Z | 2020-09-11T10:42:36.000Z | python/rrsg_cgreco/__init__.py | ismrm-rrsg-2019/rrsg_challenge_01 | 62feee3a3fbab3db376834429998b21ba474f593 | [
"MIT"
] | 1 | 2020-06-10T08:17:44.000Z | 2020-06-10T08:17:44.000Z | python/rrsg_cgreco/__init__.py | ismrm-rrsg-2019/rrsg_challenge_01 | 62feee3a3fbab3db376834429998b21ba474f593 | [
"MIT"
] | 2 | 2020-04-29T03:26:36.000Z | 2020-04-29T18:14:30.000Z | from . import linop
from . import recon
from . import solver | 20 | 20 | 0.766667 |
795412d69c3b66cccbf53c0fd685b6e4a914b142 | 2,192 | py | Python | libwise/app/WaveletBrowser.py | flomertens/wise-utils | ebc8e88a0a752f6119d049e6f7a044c9e6818f24 | [
"MIT"
] | 2 | 2017-11-07T19:32:51.000Z | 2019-11-06T17:31:29.000Z | libwise/app/WaveletBrowser.py | flomertens/libwise | ebc8e88a0a752f6119d049e6f7a044c9e6818f24 | [
"MIT"
] | null | null | null | libwise/app/WaveletBrowser.py | flomertens/libwise | ebc8e88a0a752f6119d049e6f7a044c9e6818f24 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from libwise import uiutils, wavelets, plotutils
import waveletsui
import numpy as np
class WaveletBrowser(uiutils.Experience):
def __init__(self, wavelet_families=wavelets.get_all_wavelet_families()):
uiutils.Experience.__init__(self)
self.gui = uiutils.UI(900, 500, "Wavel... | 27.061728 | 83 | 0.574818 |
79541507e17a44b93424bcbe59d037b50ee7e22d | 1,488 | py | Python | aiida/backends/tests/utils/fixtures.py | DanielMarchand/aiida_core | 1f6385d6245fc4941a7501ba6f5cb6e6fe3632fc | [
"BSD-2-Clause"
] | 1 | 2019-03-15T10:37:53.000Z | 2019-03-15T10:37:53.000Z | aiida/backends/tests/utils/fixtures.py | odarbelaeze/aiida_core | 934b4ccdc73a993f2a6656caf516500470e3da08 | [
"BSD-2-Clause"
] | null | null | null | aiida/backends/tests/utils/fixtures.py | odarbelaeze/aiida_core | 934b4ccdc73a993f2a6656caf516500470e3da08 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 45.090909 | 117 | 0.59879 |
795415176a846c0a5b8810a7e60494138bd91669 | 839 | py | Python | src/os_urlpattern/compat.py | ARPSyndicate/os-urlpattern | 9311aff896ad591b2a9123d256f629f5d142dfc6 | [
"MIT"
] | 37 | 2018-06-15T11:38:26.000Z | 2022-03-17T22:35:38.000Z | src/os_urlpattern/compat.py | cfhamlet/os-urlpattern | 9311aff896ad591b2a9123d256f629f5d142dfc6 | [
"MIT"
] | null | null | null | src/os_urlpattern/compat.py | cfhamlet/os-urlpattern | 9311aff896ad591b2a9123d256f629f5d142dfc6 | [
"MIT"
] | 8 | 2018-06-20T10:02:39.000Z | 2022-02-17T14:47:08.000Z | """Compatible import.
"""
from __future__ import unicode_literals
import operator
import string
import sys
_PY3 = sys.version_info[0] >= 3
if _PY3:
from io import StringIO
iteritems = operator.methodcaller("items")
itervalues = operator.methodcaller("values")
from urllib.parse import urlparse, ParseR... | 27.966667 | 66 | 0.738975 |
795415d965ad571b6a95398812e3a90591bb8a1c | 4,368 | py | Python | scratch.py | LOLZ1235/Spaceinvader | ecd3a5988899583ed5bc81a893a3f2a3c4d99dba | [
"Apache-2.0"
] | null | null | null | scratch.py | LOLZ1235/Spaceinvader | ecd3a5988899583ed5bc81a893a3f2a3c4d99dba | [
"Apache-2.0"
] | 1 | 2020-04-25T06:26:46.000Z | 2020-04-25T06:26:46.000Z | scratch.py | LOLZ1235/Spaceinvader | ecd3a5988899583ed5bc81a893a3f2a3c4d99dba | [
"Apache-2.0"
] | null | null | null | import pygame
import random
import math
from pygame import mixer
pygame.init()
clock = pygame.time.Clock()
screen = pygame.display.set_mode((900, 800))
mixer.music.load('l.ogg')
mixer.music.play(-1)
pygame.display.set_caption("Space Invader")
bg = pygame.image.load('background.png')
icon = pygame.image.loa... | 24.402235 | 88 | 0.510531 |
7954164f72688cf0d64235a3026d583f741d136e | 1,864 | py | Python | setup.py | fserena/wd-entities | f3a315fd7b4e99032b262a9c88fb12304c640777 | [
"Apache-2.0"
] | null | null | null | setup.py | fserena/wd-entities | f3a315fd7b4e99032b262a9c88fb12304c640777 | [
"Apache-2.0"
] | null | null | null | setup.py | fserena/wd-entities | f3a315fd7b4e99032b262a9c88fb12304c640777 | [
"Apache-2.0"
] | null | null | null | """
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
Ontology Engineering Group
http://www.oeg-upm.net/
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
Copyright (C) 2016 Ontology Engineering Group.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-... | 38.833333 | 131 | 0.589056 |
7954175f29f5b05b0054d795055db1ea1265c86e | 2,029 | py | Python | modulos/menu5.py | DevJavaStudios/pack-comandos-termux- | dc68b4ce1581b4aed1057beae3ad1c39b4f68e67 | [
"MIT"
] | null | null | null | modulos/menu5.py | DevJavaStudios/pack-comandos-termux- | dc68b4ce1581b4aed1057beae3ad1c39b4f68e67 | [
"MIT"
] | null | null | null | modulos/menu5.py | DevJavaStudios/pack-comandos-termux- | dc68b4ce1581b4aed1057beae3ad1c39b4f68e67 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#Modulo do UniTools-Termux
import os
import sys
import time
from Zawiencom import *
def FacebookBruteForce():
update()
os.system("git clone https://github.com/IAmBlackHacker/Facebook-BruteForce.git")
os.system("mv Facebook-BruteForce ~")
cc()
restart_program()
def Hydra():... | 21.817204 | 82 | 0.671759 |
7954180b75476c257ba428352815a7d97771d864 | 930 | py | Python | emulator/cr_tb.py | Adancurusul/UR408_Core | 077712cb3d2a2dd3d9d1a0eeaae2bc71b632e159 | [
"MIT"
] | 4 | 2020-07-13T03:12:19.000Z | 2021-08-03T02:09:28.000Z | emulator/cr_tb.py | Adancurusul/UR408_Core | 077712cb3d2a2dd3d9d1a0eeaae2bc71b632e159 | [
"MIT"
] | null | null | null | emulator/cr_tb.py | Adancurusul/UR408_Core | 077712cb3d2a2dd3d9d1a0eeaae2bc71b632e159 | [
"MIT"
] | null | null | null | from myhdl import *
from cr import cr
def cr_convert():
rst = ResetSignal(1, active=1, isasync=False)
clk,int0,int1,int2,int3,mem_read,mem_write,mem_ok,branch,cr_write,ret,apc,jmp,bra,main_state = [Signal(bool(0)) for _ in range(15)]
selector = Signal(intbv(0)[3:])
#Signal().driven='wire'
pc_next,b... | 54.705882 | 367 | 0.709677 |
795418454cb52bd911e661f5f1024bb2b35337be | 340 | py | Python | apps/promotions/migrations/0003_remove_promotion_current_nums.py | lsdlab/djshop_toturial | 6d450225cc05e6a1ecd161de2b522e1af0b68cc0 | [
"MIT"
] | null | null | null | apps/promotions/migrations/0003_remove_promotion_current_nums.py | lsdlab/djshop_toturial | 6d450225cc05e6a1ecd161de2b522e1af0b68cc0 | [
"MIT"
] | 6 | 2020-06-07T15:18:58.000Z | 2021-09-22T19:07:33.000Z | apps/promotions/migrations/0003_remove_promotion_current_nums.py | lsdlab/djshop_toturial | 6d450225cc05e6a1ecd161de2b522e1af0b68cc0 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.1 on 2020-01-07 22:41
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('promotions', '0002_auto_20191226_2252'),
]
operations = [
migrations.RemoveField(
model_name='promotion',
name='current_nums... | 18.888889 | 50 | 0.605882 |
795418eace034909473c587489cbb5f366fd44be | 3,953 | py | Python | runtime/python/Tools/scripts/ndiff.py | hwaipy/InteractionFreeNode | 88642b68430f57b028fd0f276a5709f89279e30d | [
"MIT"
] | 207 | 2018-10-01T08:53:01.000Z | 2022-03-14T12:15:54.000Z | runtime/python/Tools/scripts/ndiff.py | hwaipy/InteractionFreeNode | 88642b68430f57b028fd0f276a5709f89279e30d | [
"MIT"
] | 8 | 2019-06-29T14:18:51.000Z | 2022-02-19T07:30:27.000Z | runtime/python/Tools/scripts/ndiff.py | hwaipy/InteractionFreeNode | 88642b68430f57b028fd0f276a5709f89279e30d | [
"MIT"
] | 76 | 2020-03-16T01:47:46.000Z | 2022-03-21T16:37:07.000Z | #! /usr/bin/env python3
# Module ndiff version 1.7.0
# Released to the public domain 08-Dec-2000,
# by Tim Peters (tim.one@home.com).
# Provided as-is; use at your own risk; no warranty; no promises; enjoy!
# ndiff.py is now simply a front-end to the difflib.ndiff() function.
# Originally, it contained the ... | 29.5 | 76 | 0.609411 |
79541924d221816c77a06c1982ab9d02f397ee20 | 424 | py | Python | introduction_to_classic_ciphers/lesson5/task1/tests.py | behzod/pycharm-courses | 0ba74ff0ff87e7747173c60cd139c25b8d7f3b0e | [
"Apache-2.0"
] | 213 | 2015-01-03T19:25:02.000Z | 2020-02-06T03:08:43.000Z | introduction_to_classic_ciphers/lesson5/task1/tests.py | behzod/pycharm-courses | 0ba74ff0ff87e7747173c60cd139c25b8d7f3b0e | [
"Apache-2.0"
] | 24 | 2015-01-01T17:03:09.000Z | 2019-12-22T10:28:22.000Z | introduction_to_classic_ciphers/lesson5/task1/tests.py | behzod/pycharm-courses | 0ba74ff0ff87e7747173c60cd139c25b8d7f3b0e | [
"Apache-2.0"
] | 139 | 2015-01-03T19:24:22.000Z | 2020-01-24T18:05:51.000Z | from test_helper import run_common_tests, failed, passed, get_answer_placeholders
def test_answer_placeholders():
placeholders = get_answer_placeholders()
placeholder = placeholders[0]
if placeholder == "'COME AT NOON'" or placeholder == '"COME AT NOON"':
passed()
else:
failed(message=... | 26.5 | 81 | 0.705189 |
79541af9407fcb77ce9e83eb27b5a10d6bebcdd3 | 1,118 | py | Python | state_manager/filters/aiogram.py | Bloodielie/state_manager | 415e293c5fe85dd99648cacf727fd572c9d5df3f | [
"Apache-2.0"
] | 4 | 2020-07-13T15:07:11.000Z | 2021-10-30T17:11:44.000Z | state_manager/filters/aiogram.py | Bloodielie/state_manager | 415e293c5fe85dd99648cacf727fd572c9d5df3f | [
"Apache-2.0"
] | null | null | null | state_manager/filters/aiogram.py | Bloodielie/state_manager | 415e293c5fe85dd99648cacf727fd572c9d5df3f | [
"Apache-2.0"
] | null | null | null | from aiogram import types
from state_manager.filters.base import BaseTextFilter, BaseTextContainsFilter, BaseRegexFilter
from state_manager.filters.logic import text_in_list, text_contains, text_matches_regex
class TextFilter(BaseTextFilter):
def check(self, msg: types.Message) -> bool: # type: ignore
t... | 27.95 | 94 | 0.677102 |
79541cdf30d87601224d14ff284af8ce76af2389 | 4,507 | py | Python | pcmc/features/serveur.py | loic-simon/pcmc-bot | d1d9b3c0249edbdffa5c1f9f1919a7a5b52678c4 | [
"MIT"
] | null | null | null | pcmc/features/serveur.py | loic-simon/pcmc-bot | d1d9b3c0249edbdffa5c1f9f1919a7a5b52678c4 | [
"MIT"
] | null | null | null | pcmc/features/serveur.py | loic-simon/pcmc-bot | d1d9b3c0249edbdffa5c1f9f1919a7a5b52678c4 | [
"MIT"
] | null | null | null | """pcmc-bot / features / Gestion du serveur
Communication directe avec le serveur Minecraft
"""
import asyncio
import datetime
import re
import discord
from discord.ext import commands
from pcmc import config
from pcmc.blocs import tools, server
class _ServerInfo():
def __init__(self, players, n_players, max... | 32.192857 | 77 | 0.56379 |
79541d354727375eb65dcac1bd9d7dd846e61930 | 912 | py | Python | FuzzyMiner/test/FuzzyTests.py | fnc11/FuzzyMiner | 5e159d9f10330334b72bd839d43854777c0c9449 | [
"Apache-2.0"
] | 5 | 2020-05-24T13:13:11.000Z | 2021-01-01T13:08:24.000Z | FuzzyMiner/test/FuzzyTests.py | fnc11/FuzzyMiner | 5e159d9f10330334b72bd839d43854777c0c9449 | [
"Apache-2.0"
] | 11 | 2020-05-27T22:38:06.000Z | 2022-02-27T06:07:31.000Z | FuzzyMiner/test/FuzzyTests.py | fnc11/FuzzyMiner | 5e159d9f10330334b72bd839d43854777c0c9449 | [
"Apache-2.0"
] | 2 | 2020-11-24T13:09:43.000Z | 2022-01-12T06:32:22.000Z | import unittest
from FuzzyMiner.fuzzyminerpk import FMUtility
class TestFuzzyMethods(unittest.TestCase):
def test_is_valid_matrix1D(self):
self.d = [1, 2, 3]
FMUtility.is_valid_matrix1D(self.d)
def test_is_valid_matrix2D(self):
self.d = a = [[1, 2, 3], [4, 5, 6]]
FMUtility.is... | 28.5 | 47 | 0.658991 |
79541d4c5164beffb47b17be1afd0c8e89b6e774 | 54 | py | Python | apps/operation/__init__.py | codelieche/moocweb | 0e25efa597a79a38066ec41559334be604388f30 | [
"MIT"
] | 1 | 2017-08-07T07:28:23.000Z | 2017-08-07T07:28:23.000Z | apps/operation/__init__.py | codelieche/moocweb | 0e25efa597a79a38066ec41559334be604388f30 | [
"MIT"
] | null | null | null | apps/operation/__init__.py | codelieche/moocweb | 0e25efa597a79a38066ec41559334be604388f30 | [
"MIT"
] | null | null | null | default_app_config = "operation.apps.OperationConfig"
| 27 | 53 | 0.851852 |
79541d7839cc3556bddfc69b3ff5b3b39336b1e7 | 5,060 | py | Python | spawn_models.py | Stayermax/5dof-bartender-robot | dd04303afd2c252e6f7105e33ba35b01f3915194 | [
"MIT"
] | null | null | null | spawn_models.py | Stayermax/5dof-bartender-robot | dd04303afd2c252e6f7105e33ba35b01f3915194 | [
"MIT"
] | null | null | null | spawn_models.py | Stayermax/5dof-bartender-robot | dd04303afd2c252e6f7105e33ba35b01f3915194 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2013-2015, Rethink Robotics
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# ... | 34.657534 | 86 | 0.708893 |
79541fdc0932ddcaadfe519193589b0ca77fafae | 2,046 | py | Python | tests/integration/modules/test_virtualenv.py | l2ol33rt/salt | ff68bbd9f4bda992a3e039822fb32f141e94347c | [
"Apache-2.0"
] | 1 | 2022-02-09T06:40:14.000Z | 2022-02-09T06:40:14.000Z | tests/integration/modules/test_virtualenv.py | l2ol33rt/salt | ff68bbd9f4bda992a3e039822fb32f141e94347c | [
"Apache-2.0"
] | null | null | null | tests/integration/modules/test_virtualenv.py | l2ol33rt/salt | ff68bbd9f4bda992a3e039822fb32f141e94347c | [
"Apache-2.0"
] | 4 | 2020-11-04T06:28:05.000Z | 2022-02-09T10:54:49.000Z | # -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import os
import tempfile
# Import Salt Testing libs
from tests.support.case import ModuleCase
from tests.support.unit import skipIf
from tests.support.paths import TMP
# Import salt libs
import salt.utils
from salt.modules.virtualen... | 34.677966 | 85 | 0.676931 |
79542163d1f022541aa24118da84b9417851c015 | 717 | py | Python | tests/test_text_mobject.py | Pow3r5/manim | 2972a64342aa5ae72977b444f653b05250ab1f8f | [
"MIT"
] | 2 | 2022-03-31T08:31:00.000Z | 2022-03-31T08:31:43.000Z | tests/test_text_mobject.py | Pow3r5/manim | 2972a64342aa5ae72977b444f653b05250ab1f8f | [
"MIT"
] | 21 | 2022-03-02T15:25:49.000Z | 2022-03-07T11:15:45.000Z | tests/test_text_mobject.py | DD2480-Group-10/manim | e147a9fc6c117332221e42437481f3efba76499a | [
"MIT"
] | null | null | null | from __future__ import annotations
from colour import Color
from manim.mobject.text.text_mobject import MarkupText, Text
def test_font_size():
"""Test that Text and MarkupText return the
correct font_size value after being scaled."""
text_string = Text("0").scale(0.3)
markuptext_string = MarkupText(... | 29.875 | 75 | 0.723849 |
79542223a6cdef0401a0da95deb872c1eca384bf | 1,436 | py | Python | recipe/migrations/0001_initial.py | UtkarshAgrawalDTU/My-Fridge-API | 8b73b40ef5c4920b47db66574305c26095f9b1e7 | [
"MIT"
] | null | null | null | recipe/migrations/0001_initial.py | UtkarshAgrawalDTU/My-Fridge-API | 8b73b40ef5c4920b47db66574305c26095f9b1e7 | [
"MIT"
] | 3 | 2021-06-04T23:22:04.000Z | 2021-09-22T19:10:42.000Z | recipe/migrations/0001_initial.py | UtkarshAgrawalDTU/My-Fridge-API | 8b73b40ef5c4920b47db66574305c26095f9b1e7 | [
"MIT"
] | 1 | 2021-08-20T10:50:24.000Z | 2021-08-20T10:50:24.000Z | # Generated by Django 3.0.6 on 2020-05-25 08:24
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Ingredient',
fields=[
('id', models.AutoFie... | 39.888889 | 114 | 0.587047 |
79542269894205f26f7b297649a6c0cdf4568c23 | 1,166 | py | Python | maltools/models/files.py | infosec-garage/maltools | 007c7856f343b267b28b2bca8065ec2832678fc2 | [
"MIT"
] | null | null | null | maltools/models/files.py | infosec-garage/maltools | 007c7856f343b267b28b2bca8065ec2832678fc2 | [
"MIT"
] | null | null | null | maltools/models/files.py | infosec-garage/maltools | 007c7856f343b267b28b2bca8065ec2832678fc2 | [
"MIT"
] | null | null | null | """MaltoolFile model subclasses"""
from __future__ import annotations
import re
from pathlib import Path
from typing import List
from ..utils import read_file, sha256sum
from .base import Indicator, MaltoolFile
from .indicators import FunctionIndicator
class PowerShellFile(MaltoolFile):
"""Malicious PowerShell ... | 29.15 | 91 | 0.610635 |
795423b71b38aba0a54c93c6145a622a7334b9f3 | 9,053 | py | Python | Habana/benchmarks/bert/implementations/bert-tf-sys-420gh-tngr/TensorFlow/common/tb_utils.py | jqueguiner/training_results_v1.0 | 8200377f425ae24b6ed6c2816b9273aab0996d43 | [
"Apache-2.0"
] | 27 | 2021-07-01T00:34:52.000Z | 2022-03-29T08:49:53.000Z | Habana/benchmarks/bert/implementations/bert-tf-sys-420gh-tngr/TensorFlow/common/tb_utils.py | jqueguiner/training_results_v1.0 | 8200377f425ae24b6ed6c2816b9273aab0996d43 | [
"Apache-2.0"
] | 21 | 2021-08-31T08:34:50.000Z | 2022-03-17T11:42:10.000Z | Habana/benchmarks/bert/implementations/bert-tf-sys-420gh-tngr/TensorFlow/common/tb_utils.py | jqueguiner/training_results_v1.0 | 8200377f425ae24b6ed6c2816b9273aab0996d43 | [
"Apache-2.0"
] | 39 | 2021-07-02T00:46:14.000Z | 2022-03-13T16:59:55.000Z | import os
import time
import tensorflow as tf
from copy import deepcopy
from tensorboard.plugins.hparams import api as hp
from tensorflow.python.eager import context
from tensorflow.python.keras import backend as K
from tensorflow.python.ops import summary_ops_v2
from tensorflow.python.summary import summary as tf_summ... | 34.953668 | 85 | 0.625097 |
7954247882ce3bb79e0a8cb4db7509bc5f6619ee | 857 | py | Python | plugin/taskmage2/utils/functional.py | willjp/vim-taskmage | adcf809ccf1768753eca4dadaf6279b34e8d5699 | [
"BSD-2-Clause"
] | 1 | 2017-11-28T14:12:03.000Z | 2017-11-28T14:12:03.000Z | plugin/taskmage2/utils/functional.py | willjp/vim-taskmage | adcf809ccf1768753eca4dadaf6279b34e8d5699 | [
"BSD-2-Clause"
] | 16 | 2017-08-13T18:01:26.000Z | 2020-11-17T04:55:43.000Z | plugin/taskmage2/utils/functional.py | willjp/vim-taskmage | adcf809ccf1768753eca4dadaf6279b34e8d5699 | [
"BSD-2-Clause"
] | null | null | null | import functools
def pipeline(data, fn_list):
""" Runs all functions in `fn_list` on `data` .
Each is expected to return a new copy of `data` .
"""
return functools.reduce(
lambda a, x: map(x, a),
fn_list,
data,
)
def multifilter(filters, result):
""" Applies multiple... | 20.404762 | 53 | 0.565928 |
795424ecb13cfe6a77b9f4fcca0d64bcd9943c3f | 836 | py | Python | py/python3/medium/environment.py | nmorse/pounce | 3b4ddb0e5b5be3a0699b4a98b6b4daefd3653539 | [
"MIT"
] | 9 | 2018-09-15T01:59:54.000Z | 2020-07-08T11:15:31.000Z | py/python3/medium/environment.py | nmorse/pounce | 3b4ddb0e5b5be3a0699b4a98b6b4daefd3653539 | [
"MIT"
] | 29 | 2018-07-06T19:14:30.000Z | 2019-05-17T10:15:10.000Z | py/python3/medium/environment.py | nmorse/pounce | 3b4ddb0e5b5be3a0699b4a98b6b4daefd3653539 | [
"MIT"
] | null | null | null | # connect environment specific inputs and outputs to pounce words
import time
#from pounce import runtime as pounce
io = {"state": True}
words = {}
def _readIO(s, pl):
global io
io_values = {}
#s.append(io.copy())
for key in io:
io_values[key] = io[key]
s.append(io_values)
return [s... | 19.44186 | 65 | 0.593301 |
79542527c0dde92db62934f6613468d71ad739ab | 1,449 | py | Python | fiepipedesktoplib/sites/shells/networkedsite.py | leith-bartrich/fiepipe_desktop | 5136141d67a59e9a2afb79f368a6a02f2d61d2da | [
"MIT"
] | null | null | null | fiepipedesktoplib/sites/shells/networkedsite.py | leith-bartrich/fiepipe_desktop | 5136141d67a59e9a2afb79f368a6a02f2d61d2da | [
"MIT"
] | null | null | null | fiepipedesktoplib/sites/shells/networkedsite.py | leith-bartrich/fiepipe_desktop | 5136141d67a59e9a2afb79f368a6a02f2d61d2da | [
"MIT"
] | null | null | null | import fiepipedesktoplib.sites.shells.abstractsite
import fiepipelib.stateserver
class Shell(fiepipedesktoplib.sites.shells.abstractsite.Shell):
"""Shell for working in a networked site."""
_siteName
_networkedSite = None
def GetSite(self):
if self._networkedSite == None:
print("... | 27.339623 | 77 | 0.63216 |
795425d0f7cd6ad8482fc2ef371a5a9d3ac73135 | 3,033 | py | Python | lnt/util/wsgi_restart.py | llvm-mirror/lnt | 8c57bba3687ada10de5653ae46c537e957525bdb | [
"Apache-2.0"
] | 12 | 2015-10-29T19:28:02.000Z | 2020-02-04T21:25:32.000Z | lnt/util/wsgi_restart.py | llvm-mirror/lnt | 8c57bba3687ada10de5653ae46c537e957525bdb | [
"Apache-2.0"
] | 3 | 2017-03-04T14:23:14.000Z | 2019-11-02T21:56:51.000Z | lnt/util/wsgi_restart.py | llvm-mirror/lnt | 8c57bba3687ada10de5653ae46c537e957525bdb | [
"Apache-2.0"
] | 14 | 2015-04-03T03:36:06.000Z | 2019-10-23T14:09:08.000Z | # This code lifted from the mod_wsgi docs.
from __future__ import print_function
import os
import sys
import signal
import threading
import atexit
import Queue
_interval = 1.0
_times = {}
_files = []
_running = False
_queue = Queue.Queue()
_lock = threading.Lock()
def _restart(path):
_queue.put(True)
prefix... | 24.658537 | 76 | 0.607979 |
7954261d87560c9d93e9cca0e6e40051e7aa13d2 | 752 | py | Python | publications/OptimisingForEquity/main.py | alan-turing-institute/spatial-inequality | 13e47817db92c14aaf3b0f3d020305adb821e0b5 | [
"MIT"
] | 5 | 2021-07-14T12:42:32.000Z | 2022-03-02T18:14:48.000Z | publications/OptimisingForEquity/main.py | alan-turing-institute/spatial-inequality | 13e47817db92c14aaf3b0f3d020305adb821e0b5 | [
"MIT"
] | 40 | 2020-01-29T14:44:13.000Z | 2022-02-11T16:14:53.000Z | publications/OptimisingForEquity/main.py | alan-turing-institute/spatial-inequality | 13e47817db92c14aaf3b0f3d020305adb821e0b5 | [
"MIT"
] | 1 | 2021-03-27T20:26:39.000Z | 2021-03-27T20:26:39.000Z | import sensors_urb_obs
import networks_single_obj
import networks_multi_objs
import networks_two_objs
import figs_demographics
import figs_single_obj
import figs_urb_obs
import figs_multi_objs
import figs_two_objs
import report
def main():
"""
Run all scripts to process the data, generate optimised networks a... | 22.787879 | 85 | 0.75133 |
795428bf2a3bb2eb928c703f2e6434194c9913d4 | 6,078 | py | Python | tests/broken/test_construct.py | james-morrison-mowi/wavespectra | d721b8bb491113173eabad0773ce4494b81c5e74 | [
"MIT"
] | null | null | null | tests/broken/test_construct.py | james-morrison-mowi/wavespectra | d721b8bb491113173eabad0773ce4494b81c5e74 | [
"MIT"
] | null | null | null | tests/broken/test_construct.py | james-morrison-mowi/wavespectra | d721b8bb491113173eabad0773ce4494b81c5e74 | [
"MIT"
] | null | null | null | import sys
import os
import logging
import unittest
import time
import numpy as np
from numpy.testing import assert_array_almost_equal
plot = False
if plot:
import matplotlib.pyplot as plt
sys.path.insert(0,os.path.join(os.path.dirname(__file__),'..'))
from wavespectra.construct import jonswap, ochihubble
def c... | 41.346939 | 94 | 0.453274 |
795428cfa49b695c78e79f814195ffc449b8a454 | 2,283 | py | Python | test/pybind_test/wdl_mos_mpi_high_level.py | Chunshuizhao/HugeCTR | 085b2e8ad2abaee5578e7bf43b8394d0b8473b58 | [
"Apache-2.0"
] | null | null | null | test/pybind_test/wdl_mos_mpi_high_level.py | Chunshuizhao/HugeCTR | 085b2e8ad2abaee5578e7bf43b8394d0b8473b58 | [
"Apache-2.0"
] | null | null | null | test/pybind_test/wdl_mos_mpi_high_level.py | Chunshuizhao/HugeCTR | 085b2e8ad2abaee5578e7bf43b8394d0b8473b58 | [
"Apache-2.0"
] | null | null | null | import hugectr
from mpi4py import MPI
import threading
import sys
def model_oversubscriber_test(json_file, output_dir, use_host_ps):
dataset = [("file_list."+str(i)+".txt", "file_list."+str(i)+".keyset") for i in range(5)]
solver = hugectr.CreateSolver(batchsize = 16384,
batchsize_e... | 53.093023 | 183 | 0.611914 |
79542994fef39ed1046712dc557e4c632658cc2c | 7,207 | py | Python | tempest/reporting.py | KiranPawar72/tempest | 1fef3dd92b083055793065dd0693454735ec2c01 | [
"Apache-2.0"
] | null | null | null | tempest/reporting.py | KiranPawar72/tempest | 1fef3dd92b083055793065dd0693454735ec2c01 | [
"Apache-2.0"
] | null | null | null | tempest/reporting.py | KiranPawar72/tempest | 1fef3dd92b083055793065dd0693454735ec2c01 | [
"Apache-2.0"
] | null | null | null | from tempest import tvaultconf
import subprocess
import datetime
import os
import pickle
test_results_file="Report/results.html"
sanity_results_file="test_results"
test_script_status = tvaultconf.PASS
test_script_name = ""
test_step_to_write =""
passed_count = 0
failed_count = 0
total_tests_count = passed_count + fail... | 35.678218 | 164 | 0.557652 |
79542a6d2ea1634f16d943364039d7793a749978 | 42,178 | py | Python | Code/Data Processing/pre_processing.py | MauroSilvaPinto/Interpretable-EEG-seizure-prediction-using-a-multiobjective-evolutionary-algorithm | 210302843f2881ea1b19b25c9e5599e3896e09a8 | [
"CC0-1.0"
] | null | null | null | Code/Data Processing/pre_processing.py | MauroSilvaPinto/Interpretable-EEG-seizure-prediction-using-a-multiobjective-evolutionary-algorithm | 210302843f2881ea1b19b25c9e5599e3896e09a8 | [
"CC0-1.0"
] | null | null | null | Code/Data Processing/pre_processing.py | MauroSilvaPinto/Interpretable-EEG-seizure-prediction-using-a-multiobjective-evolutionary-algorithm | 210302843f2881ea1b19b25c9e5599e3896e09a8 | [
"CC0-1.0"
] | 2 | 2022-03-22T14:20:44.000Z | 2022-03-27T09:22:55.000Z | """
a code to pre-process and extract fist-level features from raw data from the selected patients.
the output will be the extracted features, chronologically, in 5 second non-overlapping windows
order by patient and seizure.
format output name:pat[patient_number]_seizure[seizure_number]_featureMatrix.npy
example outp... | 55.717305 | 148 | 0.549718 |
79542acf10ad4a392e5ae0f45867dc6a80ea2592 | 94 | py | Python | automl_infrastructure/interpretation/__init__.py | barak1412/automl_infrastructure | e8a291d175237bb7f74ebae5d6f5d2f8bcf5dc32 | [
"MIT"
] | null | null | null | automl_infrastructure/interpretation/__init__.py | barak1412/automl_infrastructure | e8a291d175237bb7f74ebae5d6f5d2f8bcf5dc32 | [
"MIT"
] | null | null | null | automl_infrastructure/interpretation/__init__.py | barak1412/automl_infrastructure | e8a291d175237bb7f74ebae5d6f5d2f8bcf5dc32 | [
"MIT"
] | null | null | null | from automl_infrastructure.interpretation.permutation_importance import PermutationImportance
| 47 | 93 | 0.93617 |
79542b561d3f72a4a470258fbe3d32cb5370b12d | 4,481 | py | Python | dipole/tests/base.py | thisch/pydipole | e496177fe60c3ec1d3b28d2dc843c0fd54b5757c | [
"MIT"
] | null | null | null | dipole/tests/base.py | thisch/pydipole | e496177fe60c3ec1d3b28d2dc843c0fd54b5757c | [
"MIT"
] | null | null | null | dipole/tests/base.py | thisch/pydipole | e496177fe60c3ec1d3b28d2dc843c0fd54b5757c | [
"MIT"
] | null | null | null | import pytest
import os
import numpy as np
import logging
import matplotlib.pyplot as plt
import matplotlib as mpl
class Base:
log = logging.getLogger('dip')
def setup_method(self, method):
print("\n{}:{}".format(self.__class__.__name__, method.__name__))
# TODO support for fixtures (convert ... | 33.192593 | 98 | 0.543182 |
79542c54ee52f95245512c19257debe6a6280820 | 143,481 | py | Python | Rules.py | cheuer/ALttPDoorRandomizer | 44d7e6c15cca8dc613e8fe9cdca07eaa3c5f44a3 | [
"MIT"
] | null | null | null | Rules.py | cheuer/ALttPDoorRandomizer | 44d7e6c15cca8dc613e8fe9cdca07eaa3c5f44a3 | [
"MIT"
] | null | null | null | Rules.py | cheuer/ALttPDoorRandomizer | 44d7e6c15cca8dc613e8fe9cdca07eaa3c5f44a3 | [
"MIT"
] | null | null | null | import logging
from BaseClasses import CollectionState, RegionType, DoorType
from Regions import key_only_locations
from RoomData import DoorKind
from collections import deque
import OWGSets
def set_rules(world, player):
if world.logic[player] == 'nologic':
logging.getLogger('').info('WARNING! Seeds gene... | 81.942319 | 437 | 0.690565 |
79542c7772eac13f7480a501a9dc7e7b492ba824 | 51,624 | py | Python | my_happy_pandas/core/arrays/sparse/array.py | ggservice007/my-happy-pandas | 63145d54e452177f7d5b2fc8fdbc1fdf37dd5b16 | [
"Apache-2.0"
] | null | null | null | my_happy_pandas/core/arrays/sparse/array.py | ggservice007/my-happy-pandas | 63145d54e452177f7d5b2fc8fdbc1fdf37dd5b16 | [
"Apache-2.0"
] | null | null | null | my_happy_pandas/core/arrays/sparse/array.py | ggservice007/my-happy-pandas | 63145d54e452177f7d5b2fc8fdbc1fdf37dd5b16 | [
"Apache-2.0"
] | null | null | null | """
SparseArray data structure
"""
from collections import abc
import numbers
import operator
from typing import Any, Callable, Union
import warnings
import numpy as np
from my_happy_pandas._libs import lib
import my_happy_pandas._libs.sparse as splib
from my_happy_pandas._libs.sparse import BlockIndex, IntIndex, Spa... | 32.735574 | 88 | 0.565086 |
79542d79d9a4dfa000e0273e3ab37dc2f5112df2 | 10,849 | py | Python | salt/modules/macports.py | styro/salt | d087d94dca02ca8bf53a6c21b94944bc7957522c | [
"Apache-2.0"
] | 3 | 2016-09-03T06:26:42.000Z | 2019-06-30T13:04:53.000Z | salt/modules/macports.py | styro/salt | d087d94dca02ca8bf53a6c21b94944bc7957522c | [
"Apache-2.0"
] | null | null | null | salt/modules/macports.py | styro/salt | d087d94dca02ca8bf53a6c21b94944bc7957522c | [
"Apache-2.0"
] | 1 | 2021-12-02T15:30:00.000Z | 2021-12-02T15:30:00.000Z | # -*- coding: utf-8 -*-
'''
Support for MacPorts under Mac OSX.
This module has some caveats.
1. Updating the database of available ports is quite resource-intensive.
However, `refresh=True` is the default for all operations that need an
up-to-date copy of available ports. Consider `refresh=False` when you are
sure ... | 26.079327 | 102 | 0.606968 |
79542db3c22af7e3161cc18f898a7c1c064d9aa7 | 923 | py | Python | utils/data_test.py | libai2019/dataset-api | 2f793821864f32bd210c17060a70682488bb74e0 | [
"Apache-2.0"
] | 385 | 2018-07-02T22:21:25.000Z | 2022-03-28T13:12:47.000Z | utils/data_test.py | libai2019/dataset-api | 2f793821864f32bd210c17060a70682488bb74e0 | [
"Apache-2.0"
] | 102 | 2018-08-01T10:40:40.000Z | 2022-03-16T10:32:44.000Z | utils/data_test.py | libai2019/dataset-api | 2f793821864f32bd210c17060a70682488bb74e0 | [
"Apache-2.0"
] | 98 | 2018-07-12T18:36:42.000Z | 2022-03-20T04:38:03.000Z | import cv2
import data
import utils as uts
from collections import OrderedDict
def stereo_rectify_test():
image_name = 'test/180602_015140124'
dataset = data.ApolloScape(scale=1.0, use_stereo=True)
images = OrderedDict([])
image_size = dataset._data_config['image_size']
for cam_name in ['Camera_5'... | 32.964286 | 88 | 0.646804 |
79542dd8b4470adf5b21cc1fbfedd3366e36aebf | 723 | py | Python | code/matching_track/train_eval/merge_score2.py | seungkee/2nd-place-solution-to-facebook-image-similarity-matching-track | 716667bf416239f448e4ea2730a2cc5146536719 | [
"Apache-2.0"
] | 13 | 2021-12-07T17:15:10.000Z | 2022-02-23T08:45:58.000Z | code/matching_track/train_eval/merge_score2.py | seungkee/2nd-place-solution-to-facebook-image-similarity-matching-track | 716667bf416239f448e4ea2730a2cc5146536719 | [
"Apache-2.0"
] | 2 | 2021-12-16T14:33:10.000Z | 2021-12-28T07:15:33.000Z | code/matching_track/train_eval/merge_score2.py | seungkee/2nd-place-solution-to-facebook-image-similarity-matching-track | 716667bf416239f448e4ea2730a2cc5146536719 | [
"Apache-2.0"
] | 4 | 2021-12-08T07:52:28.000Z | 2022-03-29T05:50:38.000Z | import pandas as pd
import numpy as np
p1='repo/0/matching-1009-from-1008-from-1001-nochange'
p2='repo/1/matching-1009-from-1008-from-1001-nochange'
p3='repo/2/matching-1009-from-1008-from-1001-nochange_000002'
df1_1=pd.read_csv(p1+'/final_cand_n.csv_halfeval.csv')
df2_1=pd.read_csv(p2+'/final_cand_n.csv_halfeval.csv'... | 38.052632 | 103 | 0.745505 |
79542e7dfdfa76a3856956ca5007f52889a74838 | 1,205 | py | Python | application.py | tjsavage/polymer-dashboard | 19bc467f1206613f8eec646b6f2bc43cc319ef75 | [
"CNRI-Python",
"Linux-OpenIB"
] | 1 | 2017-04-26T18:51:43.000Z | 2017-04-26T18:51:43.000Z | application.py | tjsavage/polymer-dashboard | 19bc467f1206613f8eec646b6f2bc43cc319ef75 | [
"CNRI-Python",
"Linux-OpenIB"
] | null | null | null | application.py | tjsavage/polymer-dashboard | 19bc467f1206613f8eec646b6f2bc43cc319ef75 | [
"CNRI-Python",
"Linux-OpenIB"
] | null | null | null | import os, sys
from pprint import pprint
sys.path.append('lib')
import webapp2
import modules
import settings
HOMEPAGE = open('home.html').read()
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.write(HOMEPAGE)
app = webapp2.WSGIApplication([
('/', MainPage),
('/api/github/... | 28.690476 | 87 | 0.721162 |
79542f8437840752c8d1cbc972dd03aa9cb4e3ca | 4,247 | py | Python | core/loss.py | verages/YOLOv4_light | b8f707a7ab5c2f3b2fd58d34e287e6b28a625641 | [
"MIT"
] | null | null | null | core/loss.py | verages/YOLOv4_light | b8f707a7ab5c2f3b2fd58d34e287e6b28a625641 | [
"MIT"
] | 1 | 2022-02-10T00:11:51.000Z | 2022-02-10T00:11:51.000Z | core/loss.py | verages/YOLOv4_light | b8f707a7ab5c2f3b2fd58d34e287e6b28a625641 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Brief: loss相关
from core.ious import box_ciou, box_iou
from nets.yolo import yolo_head
import config.config as cfg
import tensorflow as tf
from tensorflow.keras import losses
def smooth_labels(y_true, e):
"""
u(y)表示一个关于label y,且独立于观测样本x(与x无关)的固定且已知的分布:
q’(y|x) =(1-e) * q(y|x... | 34.811475 | 106 | 0.626089 |
79542f85c7a6de0c6a63179a84f1ffff7b8b8fc9 | 4,389 | py | Python | textsemantics/textrank/pagerank_weighted.py | PrimozGodec/text-semantics | 194b0bce7adcc8937a30643959681f0b175927ab | [
"MIT"
] | 11 | 2021-01-27T07:43:33.000Z | 2021-12-18T11:58:00.000Z | textsemantics/textrank/pagerank_weighted.py | PrimozGodec/text-semantics | 194b0bce7adcc8937a30643959681f0b175927ab | [
"MIT"
] | 32 | 2020-11-24T12:42:46.000Z | 2021-12-06T12:01:22.000Z | textsemantics/textrank/pagerank_weighted.py | PrimozGodec/text-semantics | 194b0bce7adcc8937a30643959681f0b175927ab | [
"MIT"
] | 3 | 2020-11-10T15:29:16.000Z | 2020-11-28T11:42:52.000Z | """
Module was removed from gensim - this is a fixed copy.
This module calculate PageRank [1]_ based on wordgraph.
.. [1] https://en.wikipedia.org/wiki/PageRank
Examples
--------
Calculate Pagerank for words
.. sourcecode:: pycon
>>> from textsemantics.textrank.keywords import get_graph
>>> from textsema... | 27.43125 | 99 | 0.622465 |
79542fd45f9ff1535d363a88a69d9245293a3837 | 25,305 | py | Python | biopal/io/data_io.py | rpitonak/BioPAL | 08c57b3ba2d8e5a06105f930b1067c2541636bb6 | [
"MIT"
] | null | null | null | biopal/io/data_io.py | rpitonak/BioPAL | 08c57b3ba2d8e5a06105f930b1067c2541636bb6 | [
"MIT"
] | null | null | null | biopal/io/data_io.py | rpitonak/BioPAL | 08c57b3ba2d8e5a06105f930b1067c2541636bb6 | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: BioPAL <biopal@esa.int>
# SPDX-License-Identifier: MIT
import os
import io
import struct
import logging
import operator
import numpy as np
from scipy.interpolate import interp2d
from biopal.io.xml_io import raster_info
from biopal.utility.constants import EPSG_CODE_LLA
from arepytools.io.prod... | 36.047009 | 221 | 0.646947 |
795430ed4d70e6a4bd5510c05dfc35c9139a14b0 | 639 | py | Python | test.py | segfault87/PyFCM | aa158d3ec220b5776e993b4051fd44dc7ec96d6e | [
"MIT"
] | null | null | null | test.py | segfault87/PyFCM | aa158d3ec220b5776e993b4051fd44dc7ec96d6e | [
"MIT"
] | null | null | null | test.py | segfault87/PyFCM | aa158d3ec220b5776e993b4051fd44dc7ec96d6e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'olucurious'
from pyfcm import FCMNotification
from pprint import pprint
push_service = FCMNotification(api_key="<server key>")
registration_id="<device registration_id>"
message = "Hope you're having fun this weekend, don't forget to check today's news"
result... | 42.6 | 113 | 0.816901 |
7954323e58893ff29ef1e74338adf928bedfb954 | 647 | py | Python | binary_search.py | daneebee/python_algorithms | 7d9da23b95ee97d1c32be61ea8c5187684b06d67 | [
"MIT"
] | null | null | null | binary_search.py | daneebee/python_algorithms | 7d9da23b95ee97d1c32be61ea8c5187684b06d67 | [
"MIT"
] | null | null | null | binary_search.py | daneebee/python_algorithms | 7d9da23b95ee97d1c32be61ea8c5187684b06d67 | [
"MIT"
] | null | null | null | def binary_search(search_val, search_list):
midpoint = (len(search_list)-1) // 2
if search_val == search_list[midpoint]:
return True
elif len(search_list) == 1 and search_val != search_list[0]:
return False
elif search_val > search_list[midpoint]:
return binary_search(search_val... | 28.130435 | 64 | 0.670788 |
79543255e3772eea4573d3a3fdb131311366f726 | 2,497 | py | Python | esprima/compat.py | gustavopinto/entente | 19b65d8cafd77c198c9c441f4f5e01503360309b | [
"BSD-2-Clause"
] | 384 | 2015-01-06T15:09:23.000Z | 2022-02-25T19:56:44.000Z | esprima/compat.py | gustavopinto/entente | 19b65d8cafd77c198c9c441f4f5e01503360309b | [
"BSD-2-Clause"
] | 222 | 2015-01-06T19:11:08.000Z | 2022-02-16T06:46:39.000Z | esprima/compat.py | gustavopinto/entente | 19b65d8cafd77c198c9c441f4f5e01503360309b | [
"BSD-2-Clause"
] | 86 | 2015-01-16T09:50:31.000Z | 2022-02-25T13:27:14.000Z | # -*- coding: utf-8 -*-
# Copyright JS Foundation and other contributors, https://js.foundation/
#
# 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
# ... | 34.205479 | 78 | 0.647978 |
795432a5d52bda31693254ba0946b2d0d4e4e6b9 | 1,286 | py | Python | stacker/hooks/ecs.py | chrishenry/stacker | 4fc631ebb139012e72f11b4cf9277f9ccac18aac | [
"BSD-2-Clause"
] | null | null | null | stacker/hooks/ecs.py | chrishenry/stacker | 4fc631ebb139012e72f11b4cf9277f9ccac18aac | [
"BSD-2-Clause"
] | null | null | null | stacker/hooks/ecs.py | chrishenry/stacker | 4fc631ebb139012e72f11b4cf9277f9ccac18aac | [
"BSD-2-Clause"
] | null | null | null | # A lot of this code exists to deal w/ the broken ECS connect_to_region
# function, and will be removed once this pull request is accepted:
# https://github.com/boto/boto/pull/3143
import logging
logger = logging.getLogger(__name__)
from boto.regioninfo import get_regions
from boto.ec2containerservice.layer1 import... | 28.577778 | 73 | 0.702955 |
795432bc1f94ed7466b1622f2c494f068e3a49f4 | 4,712 | py | Python | segmenter/evaluators/tasks.py | brandongk/segmenter | dbc042d31dc74f1abdc87ae10a6be78ba38ddb91 | [
"Unlicense"
] | null | null | null | segmenter/evaluators/tasks.py | brandongk/segmenter | dbc042d31dc74f1abdc87ae10a6be78ba38ddb91 | [
"Unlicense"
] | null | null | null | segmenter/evaluators/tasks.py | brandongk/segmenter | dbc042d31dc74f1abdc87ae10a6be78ba38ddb91 | [
"Unlicense"
] | null | null | null | import argparse
from launcher import Task
from segmenter.evaluators import Evaluators
from segmenter.jobs import BaseJob
from segmenter.models import FoldWeightFinders
import itertools
import os
class EvaluateTask(BaseJob):
name = 'evaluate'
def __init__(self, args):
super().__init__(args)
s... | 37.396825 | 78 | 0.471774 |
795433cd8ccf9f22479107e9c786b4a5abb560f8 | 5,054 | py | Python | week2-wireshark/pyshark_test.py | sharkwheels/Independet_study_2017 | bc3974a784c1d264b10a8584e9c5000d5d20496a | [
"MIT"
] | null | null | null | week2-wireshark/pyshark_test.py | sharkwheels/Independet_study_2017 | bc3974a784c1d264b10a8584e9c5000d5d20496a | [
"MIT"
] | null | null | null | week2-wireshark/pyshark_test.py | sharkwheels/Independet_study_2017 | bc3974a784c1d264b10a8584e9c5000d5d20496a | [
"MIT"
] | null | null | null | import pyshark
import collections
import time
import operator
import logging
import serial
import struct
import socket
### LOGGING AND SERIAL SETUP ###################################################
logging.basicConfig(level=logging.WARNING,
format='%(asctime)s %(levelname)s %(message)s',
... | 24.77451 | 117 | 0.625049 |
7954350c032225faca564e7b44c8b7f102adc1d3 | 929 | py | Python | src/build/android/pylib/output/local_output_manager_test.py | kiss2u/naiveproxy | 724caf7f3c8bc2d2d0dcdf090e97429a3c88a85a | [
"BSD-3-Clause"
] | 575 | 2015-06-18T23:58:20.000Z | 2022-03-23T09:32:39.000Z | src/build/android/pylib/output/local_output_manager_test.py | kiss2u/naiveproxy | 724caf7f3c8bc2d2d0dcdf090e97429a3c88a85a | [
"BSD-3-Clause"
] | 113 | 2015-05-04T09:58:14.000Z | 2022-01-31T19:35:03.000Z | src/build/android/pylib/output/local_output_manager_test.py | kiss2u/naiveproxy | 724caf7f3c8bc2d2d0dcdf090e97429a3c88a85a | [
"BSD-3-Clause"
] | 52 | 2015-07-14T10:40:50.000Z | 2022-03-15T01:11:49.000Z | #! /usr/bin/env vpython
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# pylint: disable=protected-access
import tempfile
import shutil
import unittest
from pylib.base import output_manager
from pylib.b... | 26.542857 | 77 | 0.771798 |
7954356bde0683b99ed74793c46a2c73e6b2a00c | 3,085 | py | Python | impacket/dcerpc/wkssvc.py | rackerlabs/impacket | 327acaeab5289da6e99cd82fe0b88db329566e66 | [
"Apache-1.1"
] | 1 | 2015-05-23T00:07:36.000Z | 2015-05-23T00:07:36.000Z | impacket/impacket/dcerpc/wkssvc.py | Aliced3645/DataCenterMarketing | 67bc485e73cf538498a89b28465afb822717affb | [
"Apache-2.0"
] | null | null | null | impacket/impacket/dcerpc/wkssvc.py | Aliced3645/DataCenterMarketing | 67bc485e73cf538498a89b28465afb822717affb | [
"Apache-2.0"
] | 1 | 2021-07-25T23:46:43.000Z | 2021-07-25T23:46:43.000Z | # Copyright (c) 2003-2012 CORE Security Technologies
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# $Id: wkssvc.py 529 2012-04-29 21:39:46Z bethus@gmail.com $
#
# Author: Alberto Solino
#
# Description... | 31.479592 | 82 | 0.611994 |
7954359167c3721cd1fa69432123553e62904767 | 8,922 | py | Python | affiliates/facebook/migrations/0013_auto__add_field_facebookuser_full_name__add_field_facebookuser_first_n.py | glogiotatidis/affiliates | 34d0ded8e24be9dd207d6419a5157dc8ce34bc06 | [
"BSD-3-Clause"
] | 15 | 2015-01-01T07:17:44.000Z | 2020-11-09T06:28:29.000Z | affiliates/facebook/migrations/0013_auto__add_field_facebookuser_full_name__add_field_facebookuser_first_n.py | glogiotatidis/affiliates | 34d0ded8e24be9dd207d6419a5157dc8ce34bc06 | [
"BSD-3-Clause"
] | 16 | 2015-02-25T23:17:27.000Z | 2015-08-20T10:28:18.000Z | affiliates/facebook/migrations/0013_auto__add_field_facebookuser_full_name__add_field_facebookuser_first_n.py | glogiotatidis/affiliates | 34d0ded8e24be9dd207d6419a5157dc8ce34bc06 | [
"BSD-3-Clause"
] | 12 | 2015-01-17T20:57:03.000Z | 2019-11-03T15:04:31.000Z | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'FacebookUser.full_name'
db.add_column('facebook_facebookuser', 'full_name',
... | 66.088889 | 182 | 0.579242 |
795435a262c0457ffd3cfceac5e38cd7a38c686e | 12,232 | py | Python | trkm/sequencer/faker.py | josebadoe/trkm | fb25e2f4c67e88ca9dfbfd0816d402e9ddbc7836 | [
"Apache-2.0"
] | null | null | null | trkm/sequencer/faker.py | josebadoe/trkm | fb25e2f4c67e88ca9dfbfd0816d402e9ddbc7836 | [
"Apache-2.0"
] | null | null | null | trkm/sequencer/faker.py | josebadoe/trkm | fb25e2f4c67e88ca9dfbfd0816d402e9ddbc7836 | [
"Apache-2.0"
] | null | null | null | import configparser
import sys
from datetime import datetime, timedelta
import statistics, random
class RecordWrapper:
def __init__(self, name, time, idx, data):
self.name = name
self.time = time
self._idx = idx
self._data = data
@property
def hr(self):
return self.... | 33.420765 | 105 | 0.514797 |
795435ad6d2408b39d8020f103b042f3a6f24ba2 | 1,596 | py | Python | experiments/visualisation/plot_outliers.py | KoDa-project/pykoda | a7460e5bf4d39b9cd3793efbbdbb341bc1e751c0 | [
"BSD-3-Clause"
] | 1 | 2022-02-21T10:00:26.000Z | 2022-02-21T10:00:26.000Z | experiments/visualisation/plot_outliers.py | KoDa-project/pykoda | a7460e5bf4d39b9cd3793efbbdbb341bc1e751c0 | [
"BSD-3-Clause"
] | null | null | null | experiments/visualisation/plot_outliers.py | KoDa-project/pykoda | a7460e5bf4d39b9cd3793efbbdbb341bc1e751c0 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import pykoda
def plot_outliers(company, date, n_sigma: float = 5.0):
"""Plot stations that accumulate significant delays, defined as the ones that accumulate a median delay
n_sigma times the median delay."""
df = pykoda.datautils.get_data_range(feed='Tr... | 36.272727 | 112 | 0.685464 |
795435b5a6a8db5c17602aaefc0b0c4320860f7e | 863 | py | Python | src/apps/climsoft/schemas/data_form_schema.py | opencdms/opencdms-api | f1ed6e1d883025a8658746fe457e0c975718c7be | [
"MIT"
] | 3 | 2020-12-01T09:25:18.000Z | 2022-02-14T23:57:34.000Z | src/apps/climsoft/schemas/data_form_schema.py | opencdms/opencdms-api | f1ed6e1d883025a8658746fe457e0c975718c7be | [
"MIT"
] | 11 | 2021-12-05T10:09:00.000Z | 2022-02-17T08:11:22.000Z | src/apps/climsoft/schemas/data_form_schema.py | opencdms/opencdms-api | f1ed6e1d883025a8658746fe457e0c975718c7be | [
"MIT"
] | 2 | 2021-03-10T19:03:05.000Z | 2021-12-11T08:36:04.000Z | from typing import List
from pydantic import BaseModel, constr
from common_schemas import Response
class CreateDataForm(BaseModel):
form_name: constr(max_length=250)
order_num: int
table_name: constr(max_length=255)
description: str
selected: bool
val_start_position: int
val_end_position: ... | 21.04878 | 46 | 0.736964 |
795436d5c747326d907b3a94003d54c5b17b6197 | 1,404 | py | Python | azure-mgmt-network/azure/mgmt/network/v2019_02_01/models/azure_firewall_application_rule_protocol_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-network/azure/mgmt/network/v2019_02_01/models/azure_firewall_application_rule_protocol_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-network/azure/mgmt/network/v2019_02_01/models/azure_firewall_application_rule_protocol_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 35.1 | 84 | 0.61396 |
795436da07e18a9690199ef52095bd67968cb8ee | 391 | py | Python | dtc/enums/order_status_enum.py | jseparovic/python-ws-dtc-client | fd3952cdaf7ab8c9d5a26ccf53b5e9acb3a9ea0f | [
"Apache-2.0"
] | 15 | 2020-04-26T05:25:53.000Z | 2022-02-11T19:38:42.000Z | dtc/enums/order_status_enum.py | jseparovic/python-ws-dtc-client | fd3952cdaf7ab8c9d5a26ccf53b5e9acb3a9ea0f | [
"Apache-2.0"
] | 2 | 2021-01-08T19:58:08.000Z | 2021-11-29T06:08:48.000Z | dtc/enums/order_status_enum.py | jseparovic/python-ws-dtc-client | fd3952cdaf7ab8c9d5a26ccf53b5e9acb3a9ea0f | [
"Apache-2.0"
] | 4 | 2020-11-23T13:38:01.000Z | 2021-12-27T13:21:06.000Z |
class OrderStatusEnum:
ORDER_STATUS_UNSPECIFIED = 0
ORDER_STATUS_ORDER_SENT = 1
ORDER_STATUS_PENDING_OPEN = 2
ORDER_STATUS_PENDING_CHILD = 3
ORDER_STATUS_OPEN = 4
ORDER_STATUS_PENDING_CANCEL_REPLACE = 5
ORDER_STATUS_PENDING_CANCEL = 6
ORDER_STATUS_FILLED = 7
ORDER_STATUS_CANCELED = ... | 27.928571 | 43 | 0.764706 |
795436e2e29f775b977cda9c4a2a40882a129526 | 2,874 | py | Python | my_classes/ScopesClosuresAndDecorators/.history/Decoraators2_20210716232246.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | my_classes/ScopesClosuresAndDecorators/.history/Decoraators2_20210716232246.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | my_classes/ScopesClosuresAndDecorators/.history/Decoraators2_20210716232246.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | """ Decorator Parametors
In the previous ideos we saw some built-in decorators that can handle some arguments:
@wraps(fn) @lru_cache(maxsize=256) <\
def inner(): def factorial(n): \
... ... \>function call
This should loo... | 26.127273 | 103 | 0.573765 |
795437bff3b25a7c6e4261d1d6d7954ab7dc68c6 | 4,537 | py | Python | tempest/api/compute/v3/images/test_images_oneserver.py | rcbops-qe/tempest | 88960aa32c473b64072671541a136dbae41b1d4c | [
"Apache-2.0"
] | 3 | 2015-03-03T15:43:06.000Z | 2016-10-24T06:12:40.000Z | tempest/api/compute/v3/images/test_images_oneserver.py | rcbops-qe/tempest | 88960aa32c473b64072671541a136dbae41b1d4c | [
"Apache-2.0"
] | null | null | null | tempest/api/compute/v3/images/test_images_oneserver.py | rcbops-qe/tempest | 88960aa32c473b64072671541a136dbae41b1d4c | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
# 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 requ... | 41.245455 | 79 | 0.65594 |
7954392561f4fa26365e94acf03a824a254895ef | 1,824 | py | Python | tests/test_oas_couple.py | RogerEMO/srd | 40eb8bb02cfd3b1f60ed9eb3e361877fea744cb5 | [
"MIT"
] | 1 | 2021-11-22T18:15:09.000Z | 2021-11-22T18:15:09.000Z | tests/test_oas_couple.py | RogerEMO/srd | 40eb8bb02cfd3b1f60ed9eb3e361877fea744cb5 | [
"MIT"
] | 3 | 2021-05-10T18:46:16.000Z | 2021-06-01T16:51:48.000Z | tests/test_oas_couple.py | RogerEMO/srd | 40eb8bb02cfd3b1f60ed9eb3e361877fea744cb5 | [
"MIT"
] | 1 | 2021-05-05T17:20:06.000Z | 2021-05-05T17:20:06.000Z | import pytest
from math import isclose
import sys
sys.path.append('/Users/pyann/Dropbox (CEDIA)/srd/Model')
import srd
from srd import oas
year = 2019
@pytest.mark.parametrize('age, inc_oas', [(58, 0), (62, 0), (70, 7000)])
def test_age_oas(age, inc_oas):
p0 = srd.Person(age=age)
p1 = srd.Person... | 31.448276 | 81 | 0.61568 |
79543ac4aeb94007f65bf2944ff1b6b6db01dbce | 3,207 | py | Python | tag_recommender/multilabel_classification.py | h4iku/tag-recom | 3acdeeed14ff11329ef724d30d99300d53ffc0f3 | [
"MIT"
] | 1 | 2022-01-04T05:51:38.000Z | 2022-01-04T05:51:38.000Z | tag_recommender/multilabel_classification.py | h4iku/tag-recom | 3acdeeed14ff11329ef724d30d99300d53ffc0f3 | [
"MIT"
] | null | null | null | tag_recommender/multilabel_classification.py | h4iku/tag-recom | 3acdeeed14ff11329ef724d30d99300d53ffc0f3 | [
"MIT"
] | null | null | null | import json
import pickle
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.calibration import CalibratedClassifierCV
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.multiclass import OneVsRestClassifier
from sklearn.pipeline import FeatureUnion, Pipeline... | 32.07 | 79 | 0.637356 |
79543afc4b69509596d0071915a987f7d3f07fa6 | 284 | py | Python | src/django_delta_logger/__init__.py | rennat/django_delta_logger | 5bb2a2edd8258e9c146a515886b2bf0e0df00365 | [
"MIT"
] | null | null | null | src/django_delta_logger/__init__.py | rennat/django_delta_logger | 5bb2a2edd8258e9c146a515886b2bf0e0df00365 | [
"MIT"
] | null | null | null | src/django_delta_logger/__init__.py | rennat/django_delta_logger | 5bb2a2edd8258e9c146a515886b2bf0e0df00365 | [
"MIT"
] | null | null | null | __VERSION__ = '0.1.1'
from enum import Enum
import json
from django.core.exceptions import ImproperlyConfigured
default_app_config = 'django_delta_logger.apps.DjangoDeltaLoggerConfig'
DOES_NOT_EXIST = object()
DeltaEventType = Enum('DeltaEventType', 'CREATED UPDATED DELETED')
| 18.933333 | 71 | 0.806338 |
79543affc7c074bf1486ae70fc9e5bae48ecb5c7 | 3,581 | py | Python | docs/generate_api_docs.py | MattTaylorDLS/pymalcolm | 995a8e4729bd745f8f617969111cc5a34ce1ac14 | [
"Apache-2.0"
] | null | null | null | docs/generate_api_docs.py | MattTaylorDLS/pymalcolm | 995a8e4729bd745f8f617969111cc5a34ce1ac14 | [
"Apache-2.0"
] | null | null | null | docs/generate_api_docs.py | MattTaylorDLS/pymalcolm | 995a8e4729bd745f8f617969111cc5a34ce1ac14 | [
"Apache-2.0"
] | null | null | null | import os
import shutil
repo_root = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
def generate_docs():
build_dir = os.path.join(repo_root, "docs", "build")
if os.path.isdir(build_dir):
shutil.rmtree(build_dir)
os.mkdir(build_dir)
# open the .rst file
fname = os.path.joi... | 38.923913 | 80 | 0.547892 |
79543bfde1782f21d17a28d90e59435c93b21b87 | 8,285 | py | Python | sdk/lusid_notifications/models/create_sms_notification.py | finbourne/notifications-sdk-python-preview | 2368e05445c74dc248afc1c98efa9f2ca895de3b | [
"MIT"
] | null | null | null | sdk/lusid_notifications/models/create_sms_notification.py | finbourne/notifications-sdk-python-preview | 2368e05445c74dc248afc1c98efa9f2ca895de3b | [
"MIT"
] | null | null | null | sdk/lusid_notifications/models/create_sms_notification.py | finbourne/notifications-sdk-python-preview | 2368e05445c74dc248afc1c98efa9f2ca895de3b | [
"MIT"
] | null | null | null | # coding: utf-8
"""
FINBOURNE Notifications API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.1.317
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
try:
from inspect import getfullargspec
except ImportError:
from inspect import ge... | 36.179039 | 130 | 0.613277 |
79543d9c15bdd168f225c179bb1b62dd40f972b2 | 5,923 | py | Python | toontown/battle/FireCogPanel.py | SuperM0use24/TT-CL-Edition | fdad8394f0656ae122b687d603f72afafd220c65 | [
"MIT"
] | null | null | null | toontown/battle/FireCogPanel.py | SuperM0use24/TT-CL-Edition | fdad8394f0656ae122b687d603f72afafd220c65 | [
"MIT"
] | 1 | 2021-06-08T17:16:48.000Z | 2021-06-08T17:16:48.000Z | toontown/battle/FireCogPanel.py | SuperM0use24/TT-CL-Edition | fdad8394f0656ae122b687d603f72afafd220c65 | [
"MIT"
] | 3 | 2021-06-03T05:36:36.000Z | 2021-06-22T15:07:31.000Z | from toontown.toonbase.ToontownBattleGlobals import *
from toontown.toonbase import ToontownGlobals
from direct.fsm import StateData
from direct.directnotify import DirectNotifyGlobal
from toontown.battle import BattleBase
from direct.gui.DirectGui import *
from panda3d.core import *
from toontown.toonbase import TTLoc... | 45.914729 | 354 | 0.609657 |
79543e96cbadc0cd310634a83503f67f468d4dcc | 1,472 | py | Python | ae_python/property.py | Kalbra/after-effects-python | bdcaf395ba2b5d4c33d1109921a30cc00bad3775 | [
"MIT"
] | 2 | 2021-01-27T21:04:04.000Z | 2022-02-06T04:58:04.000Z | ae_python/property.py | Kalbra/after-effects-python | bdcaf395ba2b5d4c33d1109921a30cc00bad3775 | [
"MIT"
] | null | null | null | ae_python/property.py | Kalbra/after-effects-python | bdcaf395ba2b5d4c33d1109921a30cc00bad3775 | [
"MIT"
] | null | null | null | class Property:
def __init__(self, default_value):
# If the type is property so this class not a subclass will be created the values will be transfer.
if type(default_value) == Property:
self.default_value = default_value.default_value
self.value_stack = default_value.value_s... | 32.711111 | 118 | 0.634511 |
79543eba331f0cf4356b7a81393e7bd643c0d96b | 4,867 | py | Python | configs/top_down/darkpose/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark_plus.py | saccadic/mmpose | b90aa3aa865c3246a6ab95536fe6607d48224e66 | [
"Apache-2.0"
] | null | null | null | configs/top_down/darkpose/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark_plus.py | saccadic/mmpose | b90aa3aa865c3246a6ab95536fe6607d48224e66 | [
"Apache-2.0"
] | null | null | null | configs/top_down/darkpose/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark_plus.py | saccadic/mmpose | b90aa3aa865c3246a6ab95536fe6607d48224e66 | [
"Apache-2.0"
] | null | null | null | log_level = 'INFO'
load_from = None
resume_from = None
dist_params = dict(backend='nccl')
workflow = [('train', 1)]
checkpoint_config = dict(interval=10)
evaluation = dict(interval=10, metric='mAP', key_indicator='AP')
optimizer = dict(
type='Adam',
lr=5e-4,
)
optimizer_config = dict(grad_clip=None)
# learning... | 28.461988 | 79 | 0.596055 |
79543f78b42f29602eb148c40831bbc7845911e6 | 1,334 | py | Python | packages/sklearn/_bak/svm/nodes/svm___NuSVC0/svm___NuSVC0.py | frecklebars/Ryven | 86a8c06effc47897d0b8fbbd1fa8580a957f9515 | [
"MIT"
] | 18 | 2021-01-18T09:52:41.000Z | 2022-03-22T10:48:44.000Z | packages/sklearn/_bak/svm/nodes/svm___NuSVC0/svm___NuSVC0.py | frecklebars/Ryven | 86a8c06effc47897d0b8fbbd1fa8580a957f9515 | [
"MIT"
] | null | null | null | packages/sklearn/_bak/svm/nodes/svm___NuSVC0/svm___NuSVC0.py | frecklebars/Ryven | 86a8c06effc47897d0b8fbbd1fa8580a957f9515 | [
"MIT"
] | 3 | 2021-01-18T09:49:42.000Z | 2022-03-22T10:48:47.000Z | from NIENV import *
# API METHODS --------------
# self.main_widget
# self.update_shape()
# Ports
# self.input(index)
# self.set_output_val(index, val)
# self.exec_output(index)
# self.create_new_input(type_, label, widget_name=None, widget_pos='under', pos=-1)
# self.delete_input(index)
# self.create_new_output(t... | 23.403509 | 83 | 0.595952 |
79543fc29aaf4c3a43026b403fced3814c7b412b | 1,571 | py | Python | pypy/tool/pytest/test/test_astrewrite.py | hollmmax/zig | d80baa5a5fcbc82b3e2294b398edc20a98737a52 | [
"MIT"
] | null | null | null | pypy/tool/pytest/test/test_astrewrite.py | hollmmax/zig | d80baa5a5fcbc82b3e2294b398edc20a98737a52 | [
"MIT"
] | null | null | null | pypy/tool/pytest/test/test_astrewrite.py | hollmmax/zig | d80baa5a5fcbc82b3e2294b398edc20a98737a52 | [
"MIT"
] | null | null | null | from pytest import raises
from pypy.tool.pytest.astrewriter import ast_rewrite
def get_assert_explanation(space, src):
fn = "?"
w_code = ast_rewrite.rewrite_asserts(space, src, fn)
w_d = space.newdict(module=True)
excinfo = space.raises_w(space.w_AssertionError, space.exec_, w_code, w_d, w_d)
retur... | 24.169231 | 127 | 0.59198 |
79544097aa291b961e17f90271907d5818c21ee0 | 2,205 | py | Python | src/turbo_allauth/tests/settings.py | danjac/django-turbo-allauth | dde7b5a9aede029198f7feef41fad1160ddf9aed | [
"MIT"
] | 2 | 2021-04-05T07:26:45.000Z | 2021-09-18T08:59:19.000Z | src/turbo_allauth/tests/settings.py | danjac/django-turbo-allauth | dde7b5a9aede029198f7feef41fad1160ddf9aed | [
"MIT"
] | null | null | null | src/turbo_allauth/tests/settings.py | danjac/django-turbo-allauth | dde7b5a9aede029198f7feef41fad1160ddf9aed | [
"MIT"
] | null | null | null | # Standard Library
import pathlib
SECRET_KEY = "seekret"
DATABASES = {
"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": "mem_db"},
}
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [pathlib.Path(__file__).parent.absolute() / "templates"],
... | 31.056338 | 74 | 0.650794 |
795440c03952e5b640a7538371706b087ab2ce21 | 784 | py | Python | class5_4.py | wchunhao2000/pyneta | 3c03dff486e3a777e3e6cca4e0de5b823cf64256 | [
"Apache-2.0"
] | null | null | null | class5_4.py | wchunhao2000/pyneta | 3c03dff486e3a777e3e6cca4e0de5b823cf64256 | [
"Apache-2.0"
] | null | null | null | class5_4.py | wchunhao2000/pyneta | 3c03dff486e3a777e3e6cca4e0de5b823cf64256 | [
"Apache-2.0"
] | null | null | null | from jinja2 import FileSystemLoader, StrictUndefined
from jinja2.environment import Environment
env = Environment(undefined=StrictUndefined)
env.loader = FileSystemLoader("./templates/class5/exercise4")
my_vrfs = [
{"vrf_name": "blue1", "rd_number": "100:1", "ipv4_af": True, "ipv6_af": True},
{"vrf_name": "... | 39.2 | 82 | 0.67602 |
795440cdb62cf2c870e6ff4211462ff15e00102c | 2,863 | py | Python | addic7ed_cli/version.py | BenoitZugmeyer/addic7ed-cli | 12005ed1f25fc167210e75a004a9fa9998f88065 | [
"MIT"
] | 58 | 2015-01-06T17:09:41.000Z | 2022-01-08T20:27:55.000Z | addic7ed_cli/version.py | BenoitZugmeyer/addic7ed-cli | 12005ed1f25fc167210e75a004a9fa9998f88065 | [
"MIT"
] | 27 | 2015-02-18T19:49:08.000Z | 2020-04-04T21:06:32.000Z | addic7ed_cli/version.py | BenoitZugmeyer/addic7ed-cli | 12005ed1f25fc167210e75a004a9fa9998f88065 | [
"MIT"
] | 12 | 2015-05-11T19:16:22.000Z | 2019-11-08T16:59:05.000Z |
import re
import zipfile
import io
import shutil
from addic7ed_cli.util import parse_release
from addic7ed_cli.error import FatalError
from addic7ed_cli.request import session
from addic7ed_cli.language import iso639_3_codes
class Version(object):
def __init__(self, id, language_id, version, url, language, rele... | 31.119565 | 96 | 0.615788 |
795441e4c24c3f556118a23495662c52c0dcc16a | 142 | py | Python | userpreferences/urls.py | georgiawang5332/meatFoodManager | 204b5b7aa2a3c5a6c9cc38077a10a72c0c69f140 | [
"MIT"
] | null | null | null | userpreferences/urls.py | georgiawang5332/meatFoodManager | 204b5b7aa2a3c5a6c9cc38077a10a72c0c69f140 | [
"MIT"
] | null | null | null | userpreferences/urls.py | georgiawang5332/meatFoodManager | 204b5b7aa2a3c5a6c9cc38077a10a72c0c69f140 | [
"MIT"
] | null | null | null | from . import views
from django.urls import path
app_name = 'userpreferences'
urlpatterns = [
path('', views.index, name="preferences")
]
| 15.777778 | 43 | 0.71831 |
79544246a3026b18054233b70616e122b25c253a | 891 | py | Python | palindrome.py | xiaomiwujiecao/effectivePythonNote | 772e81864b171dcc19b6bcb1b31fc61bcfa1b9fe | [
"MIT"
] | null | null | null | palindrome.py | xiaomiwujiecao/effectivePythonNote | 772e81864b171dcc19b6bcb1b31fc61bcfa1b9fe | [
"MIT"
] | null | null | null | palindrome.py | xiaomiwujiecao/effectivePythonNote | 772e81864b171dcc19b6bcb1b31fc61bcfa1b9fe | [
"MIT"
] | null | null | null | # encoding=utf-8
# def palinedrome(word):
# """Return True if the given word is a palindrome """
# return word == word[::-1]
#
# print(repr(palinedrome.__doc__))
class Player(object):
"""Represents a player of the game
SubClassed my override the 'trick' method to provide
custom animations for the player's moveme... | 26.205882 | 62 | 0.721661 |
79544281d1bfbe2a732aa57be51aa8aa5ba177f7 | 5,572 | py | Python | setup.py | xarkes/pydis | 1036274b2827884cab04a0816daa721759dc48c2 | [
"MIT"
] | 12 | 2018-06-17T14:48:28.000Z | 2022-01-17T16:30:52.000Z | setup.py | xarkes/pydis | 1036274b2827884cab04a0816daa721759dc48c2 | [
"MIT"
] | 4 | 2018-09-08T22:10:32.000Z | 2021-02-09T05:43:43.000Z | setup.py | xarkes/pydis | 1036274b2827884cab04a0816daa721759dc48c2 | [
"MIT"
] | 4 | 2018-09-01T23:56:39.000Z | 2019-11-19T06:24:35.000Z | import os
import re
import sys
import shutil
import subprocess
from setuptools import setup
from setuptools.command.develop import develop
from distutils.util import get_platform
from distutils.command.build import build
package_dir = os.path.dirname(os.path.abspath(__file__))
if sys.platform == 'darwin':
libra... | 32.970414 | 106 | 0.639986 |
7954433bfd68739f04acb0cbb067e03c180bb3c4 | 4,987 | py | Python | src/models/VGG19.py | harveyslash/Deep-Image-Analogy-TF | 9bda06fbe3a5786217a3db112d2f162573b1dd90 | [
"MIT"
] | 4 | 2018-02-27T21:43:42.000Z | 2021-08-22T14:42:47.000Z | src/models/VGG19.py | harveyslash/Deep-Image-Analogy-TF | 9bda06fbe3a5786217a3db112d2f162573b1dd90 | [
"MIT"
] | null | null | null | src/models/VGG19.py | harveyslash/Deep-Image-Analogy-TF | 9bda06fbe3a5786217a3db112d2f162573b1dd90 | [
"MIT"
] | 2 | 2018-02-25T21:50:08.000Z | 2018-11-26T23:42:32.000Z | import time
import os
from src.PatchMatch import PatchMatchOrig
import torchvision.models as models
import numpy as np
import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
from torch import optim
import torch.utils.model_zoo as model_zoo
import cv2
import torchvision
fr... | 32.594771 | 104 | 0.596752 |
795443b86e788ab1e4007c1e6c784a392b6e6736 | 19,701 | py | Python | .modules/.sqlmap/lib/techniques/union/use.py | termux-one/EasY_HaCk | 0a8d09ca4b126b027b6842e02fa0c29d8250e090 | [
"Apache-2.0"
] | 1,103 | 2018-04-20T14:08:11.000Z | 2022-03-29T06:22:43.000Z | .modules/.sqlmap/lib/techniques/union/use.py | sshourya948/EasY_HaCk | 0a8d09ca4b126b027b6842e02fa0c29d8250e090 | [
"Apache-2.0"
] | 29 | 2019-04-03T14:52:38.000Z | 2022-03-24T12:33:05.000Z | .modules/.sqlmap/lib/techniques/union/use.py | sshourya948/EasY_HaCk | 0a8d09ca4b126b027b6842e02fa0c29d8250e090 | [
"Apache-2.0"
] | 161 | 2018-04-20T15:57:12.000Z | 2022-03-15T19:16:16.000Z | #!/usr/bin/env python
"""
Copyright (c) 2006-2018 sqlmap developers (http://sqlmap.org/)
See the file 'LICENSE' for copying permission
"""
import binascii
import re
import time
import xml.etree.ElementTree
from extra.safe2bin.safe2bin import safecharencode
from lib.core.agent import agent
from lib.core.bigarray impo... | 47.586957 | 495 | 0.566316 |
795445cfa92335606e79b3a9b81b347359a3d920 | 3,481 | py | Python | astacus/node/uploader.py | aiven/astacus | 2d64e1f33e01d50a41127f41d9da3d1ab0ce0387 | [
"Apache-2.0"
] | 19 | 2020-06-22T12:17:59.000Z | 2022-02-18T00:12:17.000Z | astacus/node/uploader.py | aiven/astacus | 2d64e1f33e01d50a41127f41d9da3d1ab0ce0387 | [
"Apache-2.0"
] | 7 | 2020-06-24T05:16:20.000Z | 2022-02-28T07:35:31.000Z | astacus/node/uploader.py | aiven/astacus | 2d64e1f33e01d50a41127f41d9da3d1ab0ce0387 | [
"Apache-2.0"
] | 2 | 2020-09-05T21:23:08.000Z | 2022-02-17T15:02:37.000Z | """
Copyright (c) 2020 Aiven Ltd
See LICENSE for details
"""
from .snapshotter import hash_hexdigest_readable, Snapshotter
from astacus.common import exceptions, utils
from astacus.common.progress import Progress
from astacus.common.storage import ThreadLocalStorage
import logging
logger = logging.getLogger(__name... | 44.628205 | 121 | 0.629704 |
795445e4f0541ac5b3c6c85230108d640ffb3ab6 | 756 | py | Python | extensions/dice.py | ooxxe04/ConfessionBot-2.0 | 6ead21e38d6d28aed0f44d3e8ef4bd14f49f84b5 | [
"MIT"
] | null | null | null | extensions/dice.py | ooxxe04/ConfessionBot-2.0 | 6ead21e38d6d28aed0f44d3e8ef4bd14f49f84b5 | [
"MIT"
] | null | null | null | extensions/dice.py | ooxxe04/ConfessionBot-2.0 | 6ead21e38d6d28aed0f44d3e8ef4bd14f49f84b5 | [
"MIT"
] | 1 | 2020-03-05T11:30:18.000Z | 2020-03-05T11:30:18.000Z | import discord
from discord.ext import commands
import random
class Dice(commands.cog.Cog):
"""simple dice rolling command extension, could be treated like another example"""
def __init__(self, bot:commands.Bot):
self.bot = bot
@commands.command(aliases=['roll'])
async def dice(self, ctx:commands.Context,... | 29.076923 | 84 | 0.637566 |
795446cba04763c7a7aa8e75f727f5ec107744be | 739 | py | Python | var/spack/repos/builtin/packages/perl-libwww-perl/package.py | whitfin/spack | aabd2be31a511d0e00c1017f7311a421659319d9 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 3 | 2019-06-27T13:26:50.000Z | 2019-07-01T16:24:54.000Z | var/spack/repos/builtin/packages/perl-libwww-perl/package.py | openbiox/spack | bb6ec7fb40c14b37e094a860e3625af53f633174 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 75 | 2016-07-27T11:43:00.000Z | 2020-12-08T15:56:53.000Z | var/spack/repos/builtin/packages/perl-libwww-perl/package.py | openbiox/spack | bb6ec7fb40c14b37e094a860e3625af53f633174 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 8 | 2015-10-16T13:51:49.000Z | 2021-10-18T13:58:03.000Z | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PerlLibwwwPerl(PerlPackage):
"""The libwww-perl collection is a set of Perl modules which ... | 38.894737 | 92 | 0.744249 |
795446de83b3b669abf384ca34176a1f052c94fd | 6,656 | py | Python | test/functional/feature_maxuploadtarget.py | asuka431/fujicoin-22.0 | 9e338be2116022f0d18df153298b8881e6145f04 | [
"MIT"
] | null | null | null | test/functional/feature_maxuploadtarget.py | asuka431/fujicoin-22.0 | 9e338be2116022f0d18df153298b8881e6145f04 | [
"MIT"
] | null | null | null | test/functional/feature_maxuploadtarget.py | asuka431/fujicoin-22.0 | 9e338be2116022f0d18df153298b8881e6145f04 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2020 The Baricoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test behavior of -maxuploadtarget.
* Verify that getdata requests for old blocks (>1week) are dropped... | 39.856287 | 102 | 0.679387 |
795447b97a2ed1e48488c2441ac6683c4b7cc472 | 9,508 | py | Python | pycom/lib/uasyncio/core.py | o-gent/aero_one | 1815fb798937724c3694c7119639fcf628d0e57b | [
"MIT"
] | 1 | 2019-03-22T18:49:33.000Z | 2019-03-22T18:49:33.000Z | pycom/lib/uasyncio/core.py | o-gent/aero_one | 1815fb798937724c3694c7119639fcf628d0e57b | [
"MIT"
] | null | null | null | pycom/lib/uasyncio/core.py | o-gent/aero_one | 1815fb798937724c3694c7119639fcf628d0e57b | [
"MIT"
] | null | null | null | import utime as time
import utimeq
import ucollections
type_gen = type((lambda: (yield))())
DEBUG = 0
log = None
def set_debug(val):
global DEBUG, log
DEBUG = val
if val:
import logging
log = logging.getLogger("uasyncio.core")
class CancelledError(Exception):
pass
class TimeoutEr... | 30.184127 | 109 | 0.532604 |
795447e73fa487496d45a4e047c7a14d5ade4ba6 | 322 | py | Python | discordRoll.py | rustikles/EZ-diceRoll | d2c69ac8dbcab2b6d5fb6312fe0802ba41b7625f | [
"BSD-3-Clause"
] | null | null | null | discordRoll.py | rustikles/EZ-diceRoll | d2c69ac8dbcab2b6d5fb6312fe0802ba41b7625f | [
"BSD-3-Clause"
] | null | null | null | discordRoll.py | rustikles/EZ-diceRoll | d2c69ac8dbcab2b6d5fb6312fe0802ba41b7625f | [
"BSD-3-Clause"
] | null | null | null | import discord
from discord.ext import commands
import random
bot = commands.Bot(command_prefix='!')
@bot.command()
async def roll(ctx, number):
try:
arg = random.randint(1, int(number))
except ValueError:
await ctx.send("What the fuck is that???")
else:
await ctx.send(str(arg))
bot.run('TOKEN'... | 18.941176 | 46 | 0.680124 |
7954487cab190e70c2dd79a8f6846ee6283c696e | 8,516 | py | Python | docs/conf.py | loanzen/quickbooks-py | c8e1a9857ea66ef9a5a0ed2d83b711a96c7e18b1 | [
"ISC"
] | 5 | 2015-09-03T00:21:28.000Z | 2018-04-30T03:04:43.000Z | docs/conf.py | loanzen/quickbooks-py | c8e1a9857ea66ef9a5a0ed2d83b711a96c7e18b1 | [
"ISC"
] | null | null | null | docs/conf.py | loanzen/quickbooks-py | c8e1a9857ea66ef9a5a0ed2d83b711a96c7e18b1 | [
"ISC"
] | 1 | 2016-05-01T17:26:32.000Z | 2016-05-01T17:26:32.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# quickbooks-py documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this... | 30.855072 | 76 | 0.717708 |
7954489603b5accd410e51630eed922b37e30d67 | 2,537 | py | Python | workspace_tools/export/uvision4.py | bygreencn/mbed | 9196548e9a7230011d499556e9d162718febb7eb | [
"Apache-2.0"
] | 1 | 2019-05-07T15:01:19.000Z | 2019-05-07T15:01:19.000Z | workspace_tools/export/uvision4.py | bygreencn/mbed | 9196548e9a7230011d499556e9d162718febb7eb | [
"Apache-2.0"
] | null | null | null | workspace_tools/export/uvision4.py | bygreencn/mbed | 9196548e9a7230011d499556e9d162718febb7eb | [
"Apache-2.0"
] | null | null | null | """
mbed SDK
Copyright (c) 2011-2013 ARM Limited
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 wr... | 37.308824 | 146 | 0.607804 |
79544903ef093a0813e81720a43248ae5f6fcbb9 | 3,279 | py | Python | recipes/retrieve_all_pictures_from_ODF_files_cli.py | jdum/odfdo | 2494d0bed39f5a55974643206e9bafeed40f3a6b | [
"Apache-2.0"
] | 18 | 2018-04-19T08:30:48.000Z | 2022-02-14T11:00:27.000Z | recipes/retrieve_all_pictures_from_ODF_files_cli.py | jdum/odfdo | 2494d0bed39f5a55974643206e9bafeed40f3a6b | [
"Apache-2.0"
] | 15 | 2018-04-22T00:52:41.000Z | 2021-07-05T10:16:38.000Z | recipes/retrieve_all_pictures_from_ODF_files_cli.py | jdum/odfdo | 2494d0bed39f5a55974643206e9bafeed40f3a6b | [
"Apache-2.0"
] | 6 | 2018-04-22T00:14:12.000Z | 2021-12-06T01:42:07.000Z | #!/usr/bin/env python
"""
Analyse a list of files and directory (recurse), open all ODF documents and copy pictures
from documents in a directory.
"""
import os
import optparse
from hashlib import sha1
import time
from odfdo import Document
# encoding = "UTF8"
default_dest_dir = "my_collected_pictures"
known_images =... | 29.017699 | 89 | 0.635255 |
79544975be592888bb2055cf756aa45efe25f091 | 1,897 | py | Python | tests/test_directive_only.py | balabit-deps/balabit-os-7-sphinx | 4e18ca37f4ddddf346c0b30835a544db20887259 | [
"BSD-2-Clause"
] | null | null | null | tests/test_directive_only.py | balabit-deps/balabit-os-7-sphinx | 4e18ca37f4ddddf346c0b30835a544db20887259 | [
"BSD-2-Clause"
] | null | null | null | tests/test_directive_only.py | balabit-deps/balabit-os-7-sphinx | 4e18ca37f4ddddf346c0b30835a544db20887259 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
test_only_directive
~~~~~~~~~~~~~~~~~~~
Test the only directive with the test root.
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from docutils import nodes
from sphinx.util.nodes import process_... | 33.280702 | 87 | 0.590406 |
79544aa298a3f632aa43d37543872230660e6df3 | 8,382 | py | Python | source1/qc/qc.py | tltneon/SourceIO | 418224918c2b062a4c78a41d4d65329ba2decb22 | [
"MIT"
] | 199 | 2019-04-02T02:30:58.000Z | 2022-03-30T21:29:49.000Z | source1/qc/qc.py | syborg64/SourceIO | e4ba86d801f518e192260af08ef533759c2e1cc3 | [
"MIT"
] | 113 | 2019-03-03T19:36:25.000Z | 2022-03-31T19:44:05.000Z | source1/qc/qc.py | syborg64/SourceIO | e4ba86d801f518e192260af08ef533759c2e1cc3 | [
"MIT"
] | 38 | 2019-05-15T16:49:30.000Z | 2022-03-22T03:40:43.000Z | import math
from typing import List
import numpy as np
from ..mdl.v49.mdl_file import Mdl
from ..mdl.structs.bone import ProceduralBoneType
from ..mdl.structs.header import StudioHDRFlags
from ..mdl.structs.bodygroup import BodyPartV49
from pathlib import Path
def vector_i_transform(input: List, matrix: List):
... | 43.884817 | 120 | 0.535433 |
79544b939af404fd729292c81efd150c8933f9bb | 1,855 | py | Python | onnx_export.py | christiansafka/ONNX-Inference-AWS-Lambda | 28663ff0b25bb813aba92a37dc7dfba396551373 | [
"MIT"
] | 1 | 2022-03-01T11:39:49.000Z | 2022-03-01T11:39:49.000Z | onnx_export.py | christiansafka/ONNX-Inference-AWS-Lambda | 28663ff0b25bb813aba92a37dc7dfba396551373 | [
"MIT"
] | null | null | null | onnx_export.py | christiansafka/ONNX-Inference-AWS-Lambda | 28663ff0b25bb813aba92a37dc7dfba396551373 | [
"MIT"
] | null | null | null | import torch
import torch.onnx
import onnxruntime
import numpy as np
from efficientnet_pytorch.model import EfficientNetAutoEncoder
model = EfficientNetAutoEncoder.from_pretrained('efficientnet-b0')
model.eval()
dummy_input = torch.rand(1, 3, 224, 224)
# # Export the model
dynamic_axes = {'input' : {0 : 'batch_size... | 40.326087 | 112 | 0.672237 |
79544b9f2088f5aa0b7657f58614f66b0f6c0d26 | 1,920 | py | Python | phub.py | Dark-PRINCESS/Dark-PRINCESS- | 0ad9c67960c8f88745442d264fdcd113b9925807 | [
"MIT"
] | 1 | 2020-10-23T09:35:36.000Z | 2020-10-23T09:35:36.000Z | phub.py | Dark-PRINCESS/Dark-PRINCESS- | 0ad9c67960c8f88745442d264fdcd113b9925807 | [
"MIT"
] | null | null | null | phub.py | Dark-PRINCESS/Dark-PRINCESS- | 0ad9c67960c8f88745442d264fdcd113b9925807 | [
"MIT"
] | null | null | null |
from telethon import events
import asyncio
from uniborg.util import admin_cmd
@borg.on(admin_cmd(pattern="phub"))
async def _(event):
if event.fwd_from:
return
animation_interval = 0.5
animation_ttl = range(0, 101)
await event.edit("phub")
animation_chars ... | 14.222222 | 50 | 0.450521 |
79544bfe1647e4df39c71b069e146b332c81d7bc | 3,407 | py | Python | snippets/EM/EM_pipeline_2018_IMPORTANT/deprecated/config_myelin3D.py | michielkleinnijenhuis/EM | f46a9b11298919b359e80d9f23a7e824df1356cb | [
"Apache-2.0"
] | null | null | null | snippets/EM/EM_pipeline_2018_IMPORTANT/deprecated/config_myelin3D.py | michielkleinnijenhuis/EM | f46a9b11298919b359e80d9f23a7e824df1356cb | [
"Apache-2.0"
] | null | null | null | snippets/EM/EM_pipeline_2018_IMPORTANT/deprecated/config_myelin3D.py | michielkleinnijenhuis/EM | f46a9b11298919b359e80d9f23a7e824df1356cb | [
"Apache-2.0"
] | null | null | null | def config(parameters={}, run_from='', run_upto='', run_only=''):
# dataset
datadir = '/data/ndcn-fmrib-water-brain/ndcn0180/EM/Myrf_00'
datasets = ['T4_1']
steps = [
'normalize_datasets', 'dm3_to_tif', 'register', 'downsample', 'tif_to_h5',
'datamask', 'myelinmask', 'myelinmask_multi'... | 28.391667 | 94 | 0.521867 |
79544d6026e90baa5f4fe262dd6e91c2ca1c6cfe | 1,759 | py | Python | FlaskApp/app.py | pitt-makerspace/ms_lockout | 39337584e6c2b26b30f3297b5ad2563eb6a71eb1 | [
"MIT"
] | null | null | null | FlaskApp/app.py | pitt-makerspace/ms_lockout | 39337584e6c2b26b30f3297b5ad2563eb6a71eb1 | [
"MIT"
] | null | null | null | FlaskApp/app.py | pitt-makerspace/ms_lockout | 39337584e6c2b26b30f3297b5ad2563eb6a71eb1 | [
"MIT"
] | null | null | null | """
Pitt MakerSpace Control Panel Web Interface.
"""
import datetime
from flask import Flask, render_template, redirect, url_for, request
from csv_helper import read_csv
# DATABASE SETUP
CSV_FILE = 'ms_lockout.csv'
DATA = read_csv(CSV_FILE)
USER_IDS = [col[0] for col in DATA]
access_col_idx = 3
app = Flask(__name__... | 24.430556 | 86 | 0.617396 |
79544d82dbfe8f45523cdaceacc46a24c18f5808 | 4,076 | py | Python | alipay/aop/api/request/AlipayMarketingCampaignDrawcampWhitelistCreateRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayMarketingCampaignDrawcampWhitelistCreateRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayMarketingCampaignDrawcampWhitelistCreateRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayMarketingCampaignDrawcampWhitelistCreateModel import AlipayMarketingCampaignDrawcampWhitelistCreateModel
class AlipayMarketing... | 28.110345 | 148 | 0.653582 |
79544e4ee85761da98d177ce17162b89b285b8c6 | 211 | py | Python | hms_tz/hms_tz/doctype/lab_bundle/test_lab_bundle.py | av-dev2/hms_tz | a36dbe8bfacf6a770913b1bfa000d43edd2cd87a | [
"MIT"
] | 5 | 2021-04-20T06:11:25.000Z | 2021-11-18T15:37:25.000Z | hms_tz/hms_tz/doctype/lab_bundle/test_lab_bundle.py | av-dev2/hms_tz | a36dbe8bfacf6a770913b1bfa000d43edd2cd87a | [
"MIT"
] | 90 | 2021-04-05T13:36:34.000Z | 2022-03-31T07:26:25.000Z | hms_tz/hms_tz/doctype/lab_bundle/test_lab_bundle.py | av-dev2/hms_tz | a36dbe8bfacf6a770913b1bfa000d43edd2cd87a | [
"MIT"
] | 10 | 2021-03-26T06:43:20.000Z | 2022-02-18T06:36:58.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2021, Aakvatech and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestLabBundle(unittest.TestCase):
pass
| 19.181818 | 48 | 0.763033 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.