hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | 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 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b1d089298e5f4bb67268690bc90d7e531a39929b | 7,710 | py | Python | aleph/model/document.py | gazeti/aleph | f6714c4be038471cfdc6408bfe88dc9e2ed28452 | [
"MIT"
] | 1 | 2017-07-28T12:54:09.000Z | 2017-07-28T12:54:09.000Z | aleph/model/document.py | gazeti/aleph | f6714c4be038471cfdc6408bfe88dc9e2ed28452 | [
"MIT"
] | 7 | 2017-08-16T12:49:23.000Z | 2018-02-16T10:22:11.000Z | aleph/model/document.py | gazeti/aleph | f6714c4be038471cfdc6408bfe88dc9e2ed28452 | [
"MIT"
] | 6 | 2017-07-26T12:29:53.000Z | 2017-08-18T09:35:50.000Z | import logging
from datetime import datetime, timedelta
from normality import ascii_text
from sqlalchemy import func
from sqlalchemy.dialects.postgresql import JSONB
from sqlalchemy.orm.attributes import flag_modified
from aleph.core import db
from aleph.model.metadata import Metadata
from aleph.model.validate import ... | 35.366972 | 113 | 0.623476 | 7,073 | 0.91738 | 243 | 0.031518 | 2,283 | 0.296109 | 0 | 0 | 981 | 0.127237 |
b1d1d0561cf49238a4a8252a8f7aae4e72eed16d | 1,613 | py | Python | pyInet/__main__.py | LcfherShell/pynet | 80284d7147d7b8d69c631fd6fe1236bb73e50b1b | [
"MIT"
] | null | null | null | pyInet/__main__.py | LcfherShell/pynet | 80284d7147d7b8d69c631fd6fe1236bb73e50b1b | [
"MIT"
] | null | null | null | pyInet/__main__.py | LcfherShell/pynet | 80284d7147d7b8d69c631fd6fe1236bb73e50b1b | [
"MIT"
] | null | null | null | try:
from main import ClassA, ClassB
except:
try:
from pyInet import ClassA, ClassB
except:
from pyInet.main import ClassA, ClassB
if __name__ == "__main__":
child = ClassA #Public Class
network = ClassB #Private Class
print("Call function using public... | 33.604167 | 62 | 0.543707 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 379 | 0.234966 |
b1d42f3d03c0a3e27b14e56be2c1099412ba4e94 | 3,854 | py | Python | dope/filespec/__init__.py | gwappa/pydope | c8beb315177a850e9d275902a6303e68a319c123 | [
"MIT"
] | null | null | null | dope/filespec/__init__.py | gwappa/pydope | c8beb315177a850e9d275902a6303e68a319c123 | [
"MIT"
] | 5 | 2020-05-13T13:09:45.000Z | 2020-05-14T14:18:43.000Z | dope/filespec/__init__.py | gwappa/pydope | c8beb315177a850e9d275902a6303e68a319c123 | [
"MIT"
] | null | null | null | #
# MIT License
#
# Copyright (c) 2020 Keisuke Sehara
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, me... | 37.417476 | 102 | 0.639855 | 2,649 | 0.687338 | 0 | 0 | 177 | 0.045926 | 0 | 0 | 1,375 | 0.356772 |
b1d4408048c2582c035650ab9faddb5edccff6fd | 2,498 | py | Python | city_scrapers_core/extensions/status.py | jtotoole/city-scrapers-core | 0c091d91bf8883c6f361a19fbb055abc3b306835 | [
"MIT"
] | null | null | null | city_scrapers_core/extensions/status.py | jtotoole/city-scrapers-core | 0c091d91bf8883c6f361a19fbb055abc3b306835 | [
"MIT"
] | null | null | null | city_scrapers_core/extensions/status.py | jtotoole/city-scrapers-core | 0c091d91bf8883c6f361a19fbb055abc3b306835 | [
"MIT"
] | null | null | null | from datetime import datetime
import pytz
from scrapy import signals
RUNNING = "running"
FAILING = "failing"
STATUS_COLOR_MAP = {RUNNING: "#44cc11", FAILING: "#cb2431"}
STATUS_ICON = """
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="144" height="20">
<linearGradient id=... | 34.694444 | 108 | 0.6249 | 1,269 | 0.508006 | 0 | 0 | 254 | 0.101681 | 0 | 0 | 1,229 | 0.491994 |
b1d542377c13c57ca40f0aad4217a57a0a2f3e27 | 5,438 | py | Python | tests/test_filters.py | maniospas/pygrank | a92f6bb6d13553dd960f2e6bda4c041a8027a9d1 | [
"Apache-2.0"
] | 19 | 2019-10-07T14:42:40.000Z | 2022-03-24T15:02:02.000Z | tests/test_filters.py | maniospas/pygrank | a92f6bb6d13553dd960f2e6bda4c041a8027a9d1 | [
"Apache-2.0"
] | 13 | 2021-08-25T12:54:37.000Z | 2022-03-05T03:31:34.000Z | tests/test_filters.py | maniospas/pygrank | a92f6bb6d13553dd960f2e6bda4c041a8027a9d1 | [
"Apache-2.0"
] | 4 | 2019-09-25T09:54:51.000Z | 2020-12-09T00:11:21.000Z | import networkx as nx
import pygrank as pg
import pytest
from .test_core import supported_backends
def test_zero_personalization():
assert pg.sum(pg.PageRank()(next(pg.load_datasets_graph(["graph9"])), {}).np) == 0
def test_abstract_filter_types():
graph = next(pg.load_datasets_graph(["graph5"]))
with p... | 39.693431 | 136 | 0.685914 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 368 | 0.067672 |
b1d70b532712bd846f1a70f021a50fadff6b4449 | 9,816 | py | Python | src/preprocess.py | vkola-lab/ajpa2021 | 67a76ae184b4c9c40c9bc104c8d87ffa5ea69d91 | [
"MIT"
] | null | null | null | src/preprocess.py | vkola-lab/ajpa2021 | 67a76ae184b4c9c40c9bc104c8d87ffa5ea69d91 | [
"MIT"
] | null | null | null | src/preprocess.py | vkola-lab/ajpa2021 | 67a76ae184b4c9c40c9bc104c8d87ffa5ea69d91 | [
"MIT"
] | null | null | null | import os
import PIL
from PIL import Image
from PIL import Image, ImageStat
PIL.Image.MAX_IMAGE_PIXELS = 10000000000
import numpy as np
import cv2
import openslide
import time
PATCH_SIZE = 224
STRIDE = 224
DOWN_SIZE = 508
def preprocess_mask(path_ori, path_mask, width_resize=2560, height_resize=1920):
start_tim... | 49.326633 | 165 | 0.599124 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 786 | 0.080073 |
b1d7b3ea3f8d942998560e953fec761fcb002a45 | 2,433 | py | Python | procgen.py | tredfern/rdl2021-tutorial | 18f992c9c09ab18ee8e2927cf53d707c251d4948 | [
"MIT"
] | null | null | null | procgen.py | tredfern/rdl2021-tutorial | 18f992c9c09ab18ee8e2927cf53d707c251d4948 | [
"MIT"
] | null | null | null | procgen.py | tredfern/rdl2021-tutorial | 18f992c9c09ab18ee8e2927cf53d707c251d4948 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 Trevor Redfern
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
from __future__ import annotations
from typing import Tuple, Iterator, List, TYPE_CHECKING
import random
import tcod
from game_map import GameMap
import tile_types
if TYPE_CHECKI... | 25.610526 | 95 | 0.628442 | 690 | 0.2836 | 416 | 0.170982 | 289 | 0.118783 | 0 | 0 | 128 | 0.05261 |
b1d821122ad47a7fa47c073b2ce27f383a3871d3 | 1,492 | py | Python | examples/plot_simulate_bo.py | pmdaly/supereeg | 750f55db3cbfc2f3430e879fecc7a1f5407282a6 | [
"MIT"
] | 1 | 2018-12-10T01:38:48.000Z | 2018-12-10T01:38:48.000Z | examples/plot_simulate_bo.py | pmdaly/supereeg | 750f55db3cbfc2f3430e879fecc7a1f5407282a6 | [
"MIT"
] | null | null | null | examples/plot_simulate_bo.py | pmdaly/supereeg | 750f55db3cbfc2f3430e879fecc7a1f5407282a6 | [
"MIT"
] | 1 | 2019-06-25T21:34:12.000Z | 2019-06-25T21:34:12.000Z | # -*- coding: utf-8 -*-
"""
=============================
Simulating a brain object
=============================
In this example, we demonstrate the simulate_bo function.
First, we'll load in some example locations. Then we'll simulate 1
brain object specifying a noise parameter and the correlational structure
of the... | 27.127273 | 92 | 0.731233 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 850 | 0.569705 |
b1d8a19c3055e7f0d5aa484065ba5f44c533be7b | 420 | py | Python | poc/classes/AuxSTRuleOfInference.py | bookofproofs/fpl | 527b43b0f8bb3d459ee906e5ed8524a676ce3a2c | [
"MIT"
] | 4 | 2021-11-08T10:09:46.000Z | 2021-11-13T22:25:46.000Z | poc/classes/AuxSTRuleOfInference.py | bookofproofs/fpl | 527b43b0f8bb3d459ee906e5ed8524a676ce3a2c | [
"MIT"
] | 1 | 2020-09-04T13:02:09.000Z | 2021-06-16T07:07:44.000Z | poc/classes/AuxSTRuleOfInference.py | bookofproofs/fpl | 527b43b0f8bb3d459ee906e5ed8524a676ce3a2c | [
"MIT"
] | 1 | 2021-11-08T10:10:12.000Z | 2021-11-08T10:10:12.000Z | from poc.classes.AuxSTBlockWithSignature import AuxSTBlockWithSignature
from poc.classes.AuxSymbolTable import AuxSymbolTable
class AuxSTRuleOfInference(AuxSTBlockWithSignature):
def __init__(self, i):
super().__init__(AuxSymbolTable.block_ir, i)
self.zfrom = i.last_positions_by_rule['PredicateId... | 38.181818 | 81 | 0.785714 | 291 | 0.692857 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.090476 |
b1d8cc75992fcd005adcc90ea90aa099fbd29007 | 5,031 | py | Python | examples/fmanipulator.py | mateusmoutinho/python-cli-args | 40b758db808e96b3c12a3e0a87b6904660e90d9b | [
"MIT"
] | null | null | null | examples/fmanipulator.py | mateusmoutinho/python-cli-args | 40b758db808e96b3c12a3e0a87b6904660e90d9b | [
"MIT"
] | null | null | null | examples/fmanipulator.py | mateusmoutinho/python-cli-args | 40b758db808e96b3c12a3e0a87b6904660e90d9b | [
"MIT"
] | null | null | null | from io import TextIOWrapper
from typing import IO, Text
from cli_args_system import Args
from cli_args_system import Args, FlagsContent
from sys import exit
HELP = """this is a basic file manipulator to demonstrate
args_system usage with file flags
-------------------flags----------------------------
-join: join th... | 29.25 | 79 | 0.650566 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,602 | 0.517193 |
b1d9ea1eac536432c7382cf5532afaf25887bbe6 | 276 | py | Python | test/test_main.py | KY64/python-starter-template | 6ba734cec57668db6246e85bf0c324ff04359482 | [
"MIT"
] | null | null | null | test/test_main.py | KY64/python-starter-template | 6ba734cec57668db6246e85bf0c324ff04359482 | [
"MIT"
] | 2 | 2021-09-24T12:57:15.000Z | 2021-09-24T19:55:01.000Z | test/test_main.py | KY64/python-starter-template | 6ba734cec57668db6246e85bf0c324ff04359482 | [
"MIT"
] | null | null | null | import unittest
from src.main import substract, add
class TestMain(unittest.TestCase):
def test_add(self):
result = add(9, 7)
self.assertEqual(result, 16)
def test_substract(self):
result = substract(9, 7)
self.assertEqual(result, 2)
| 23 | 36 | 0.655797 | 222 | 0.804348 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b1da25a95c5118697812a66adf7849f4cbae7363 | 441 | py | Python | usage.py | nicogetaz/cfile | 305a8e5fd133e4fd36d8958ede4627b008d4664a | [
"MIT"
] | 45 | 2017-11-17T04:44:29.000Z | 2022-03-30T12:30:17.000Z | usage.py | nicogetaz/cfile | 305a8e5fd133e4fd36d8958ede4627b008d4664a | [
"MIT"
] | 4 | 2019-03-25T15:43:26.000Z | 2021-02-09T12:26:03.000Z | usage.py | nicogetaz/cfile | 305a8e5fd133e4fd36d8958ede4627b008d4664a | [
"MIT"
] | 18 | 2017-10-12T13:24:00.000Z | 2021-12-09T05:29:54.000Z | import cfile as C
hello = C.cfile('hello.c')
hello.code.append(C.sysinclude('stdio.h'))
hello.code.append(C.blank())
hello.code.append(C.function('main', 'int',).add_param(C.variable('argc', 'int')).add_param(C.variable('argv', 'char', pointer=2)))
body = C.block(innerIndent=3)
body.append(C.statement(C.fcall('pr... | 40.090909 | 132 | 0.693878 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 89 | 0.201814 |
b1da8715774b114e58c022d18b5599a966be0c83 | 116 | py | Python | question_model.py | sangethmathewjohn/PyQuiz_OOP | a9fdcab3884cee1b80951c1e279f5e58db981c3d | [
"Unlicense"
] | 2 | 2021-06-27T08:33:58.000Z | 2021-07-20T06:59:53.000Z | question_model.py | sangethmathewjohn/PyQuiz_OOP | a9fdcab3884cee1b80951c1e279f5e58db981c3d | [
"Unlicense"
] | null | null | null | question_model.py | sangethmathewjohn/PyQuiz_OOP | a9fdcab3884cee1b80951c1e279f5e58db981c3d | [
"Unlicense"
] | null | null | null | class Question:
def __init__(self, qtext, qanswer):
self.text =qtext
self.answer =qanswer
| 19.333333 | 40 | 0.603448 | 114 | 0.982759 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b1daaac896ddc4849cfd241b1e6031646b780a40 | 156 | py | Python | data-science/exercicios/livro-introducao-a-programacao-com-python/capitulo-5/exercicio5-2.py | joaovictor-loureiro/data-science | 21ad240e1db94d614e54fcb3fbf6ef74a78af9d8 | [
"MIT"
] | null | null | null | data-science/exercicios/livro-introducao-a-programacao-com-python/capitulo-5/exercicio5-2.py | joaovictor-loureiro/data-science | 21ad240e1db94d614e54fcb3fbf6ef74a78af9d8 | [
"MIT"
] | null | null | null | data-science/exercicios/livro-introducao-a-programacao-com-python/capitulo-5/exercicio5-2.py | joaovictor-loureiro/data-science | 21ad240e1db94d614e54fcb3fbf6ef74a78af9d8 | [
"MIT"
] | null | null | null | # Exercício 5.2 - Modifique o programa para exibir os números de 50 a 100.
i = 50
print('\n')
while i <= 100:
print('%d' % i)
i += 1
print('\n') | 14.181818 | 74 | 0.570513 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 0.556962 |
b1dab95c84aa79d34c26b83dc05fe89c1233edca | 14,141 | py | Python | scripts/BaxterArmClient.py | mkrizmancic/qlearn_baxter | 0498315212cacb40334cbb97a858c6ba317f52a3 | [
"MIT"
] | 4 | 2017-11-11T18:16:22.000Z | 2018-11-08T13:31:09.000Z | scripts/BaxterArmClient.py | mkrizmancic/qlearn_baxter | 0498315212cacb40334cbb97a858c6ba317f52a3 | [
"MIT"
] | null | null | null | scripts/BaxterArmClient.py | mkrizmancic/qlearn_baxter | 0498315212cacb40334cbb97a858c6ba317f52a3 | [
"MIT"
] | 2 | 2019-09-04T12:28:58.000Z | 2021-09-27T13:02:48.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
CREDIT:
Main layout of this file was done by Lucija Kopic (graduation thesis)
at Faculty of Electrical Engineering and Computing, University of Zagreb.
"""
import math
from threading import Thread
import actionlib
import tf
from tf.transformations import ... | 42.851515 | 119 | 0.592391 | 13,173 | 0.931547 | 0 | 0 | 0 | 0 | 0 | 0 | 4,639 | 0.328053 |
b1dbac0f835a64d0cbdbae3be2827e7023234d2d | 107 | py | Python | Factorial.py | conbopbi/TEchMasterHK | 81452694de6b5d46a51bdf1eceb7a4346b93cc85 | [
"MIT"
] | null | null | null | Factorial.py | conbopbi/TEchMasterHK | 81452694de6b5d46a51bdf1eceb7a4346b93cc85 | [
"MIT"
] | null | null | null | Factorial.py | conbopbi/TEchMasterHK | 81452694de6b5d46a51bdf1eceb7a4346b93cc85 | [
"MIT"
] | null | null | null | import math
n=int(input('Nhap mot so:'))
output=math.factorial(n)
print('Giai thua cua ',n,' la: ',output) | 21.4 | 40 | 0.682243 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.345794 |
b1dbc2b8aaeac4063785ede18a17f1f56b8d7356 | 86 | py | Python | flytekit/__init__.py | flytehub/flytekit | f8f53567594069b29fcd3f99abd1da71a5ef0e22 | [
"Apache-2.0"
] | null | null | null | flytekit/__init__.py | flytehub/flytekit | f8f53567594069b29fcd3f99abd1da71a5ef0e22 | [
"Apache-2.0"
] | null | null | null | flytekit/__init__.py | flytehub/flytekit | f8f53567594069b29fcd3f99abd1da71a5ef0e22 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
import flytekit.plugins
__version__ = '0.3.1'
| 17.2 | 38 | 0.813953 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.081395 |
b1dc9ba592a6ef41c372eaa2cd477c8b9c68c9a0 | 7,289 | py | Python | src/Navigate.py | Qu-Xiangjun/CQU_NK_Research_Project | 8634ce3496801610bc94aa3a424bcd9cff8d042e | [
"MIT"
] | 1 | 2021-04-14T12:52:47.000Z | 2021-04-14T12:52:47.000Z | src/Navigate.py | Qu-Xiangjun/CQU_NK_Research_Project | 8634ce3496801610bc94aa3a424bcd9cff8d042e | [
"MIT"
] | null | null | null | src/Navigate.py | Qu-Xiangjun/CQU_NK_Research_Project | 8634ce3496801610bc94aa3a424bcd9cff8d042e | [
"MIT"
] | null | null | null | """
@Author: Qu Xiangjun
@Time: 2021.01.26
@Describe: 此文件负责根据雷达数据进行导航的线程类定义
"""
import socket
import time
from threading import Thread
import threading
import numpy as np
# python3.8.0 64位(python 32位要用32位的DLL)
from ctypes import *
from Navigation_help import *
from Can_frame_help import *
VCI_USBCAN2 = 4 # 设备类型 USBCA... | 33.589862 | 89 | 0.522568 | 7,640 | 0.910066 | 0 | 0 | 0 | 0 | 0 | 0 | 3,045 | 0.362716 |
b1dd89557115038bb1f6354ded5195f9ead07ccf | 233 | py | Python | list02/exer_02.py | pedrolucas27/exercising-python | 4b30bbce6b860fb617baf4600d8da83b68023e82 | [
"MIT"
] | null | null | null | list02/exer_02.py | pedrolucas27/exercising-python | 4b30bbce6b860fb617baf4600d8da83b68023e82 | [
"MIT"
] | null | null | null | list02/exer_02.py | pedrolucas27/exercising-python | 4b30bbce6b860fb617baf4600d8da83b68023e82 | [
"MIT"
] | null | null | null | #Faça um Programa que peça um valor e mostre na tela se o valor é positivo ou negativo.
valor = int(input("Dígite um número:"))
if valor < 0:
print("O número",valor,"é negativo!")
else:
print("O número",valor,"é positivo!") | 33.285714 | 88 | 0.682403 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 162 | 0.669421 |
b1de66542e990852570d0825e181d49c32975991 | 48 | py | Python | python/testData/intentions/PyConvertToFStringIntentionTest/percentOperatorWidthAndPrecision_after.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/intentions/PyConvertToFStringIntentionTest/percentOperatorWidthAndPrecision_after.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/intentions/PyConvertToFStringIntentionTest/percentOperatorWidthAndPrecision_after.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | f'{1:.5d} {2:3.5d} {3:3d} {"spam":>20} {4:<#d}'
| 24 | 47 | 0.395833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 47 | 0.979167 |
b1dea7e1058a7eee3b72428c420020b2fdd458a2 | 6,346 | py | Python | ansys/dpf/core/operators/math/make_one_on_comp.py | jfthuong/pydpf-core | bf2895ebc546e0004f759289bfc9a23196559ac3 | [
"MIT"
] | 18 | 2021-10-16T10:38:29.000Z | 2022-03-29T11:26:42.000Z | ansys/dpf/core/operators/math/make_one_on_comp.py | jfthuong/pydpf-core | bf2895ebc546e0004f759289bfc9a23196559ac3 | [
"MIT"
] | 79 | 2021-10-11T23:18:54.000Z | 2022-03-29T14:53:14.000Z | ansys/dpf/core/operators/math/make_one_on_comp.py | jfthuong/pydpf-core | bf2895ebc546e0004f759289bfc9a23196559ac3 | [
"MIT"
] | 5 | 2021-11-29T18:35:37.000Z | 2022-03-16T16:49:21.000Z | """
make_one_on_comp
===============
Autogenerated DPF operator classes.
"""
from warnings import warn
from ansys.dpf.core.dpf_operator import Operator
from ansys.dpf.core.inputs import Input, _Inputs
from ansys.dpf.core.outputs import Output, _Outputs
from ansys.dpf.core.operators.specification import PinSpecification... | 29.654206 | 89 | 0.578159 | 6,001 | 0.945635 | 0 | 0 | 3,372 | 0.531358 | 0 | 0 | 3,657 | 0.576269 |
b1e15b56feda70e36690890e29f9ba4efcc55495 | 8,716 | py | Python | cheshire3/web/www_utils.py | cheshire3/cheshire3 | 306348831ec110229c78a7c5f0f2026a0f394d2c | [
"Python-2.0",
"Unlicense"
] | 3 | 2015-08-02T09:03:28.000Z | 2017-12-06T09:26:14.000Z | cheshire3/web/www_utils.py | cheshire3/cheshire3 | 306348831ec110229c78a7c5f0f2026a0f394d2c | [
"Python-2.0",
"Unlicense"
] | 5 | 2015-08-17T01:16:35.000Z | 2015-09-16T21:51:27.000Z | cheshire3/web/www_utils.py | cheshire3/cheshire3 | 306348831ec110229c78a7c5f0f2026a0f394d2c | [
"Python-2.0",
"Unlicense"
] | 6 | 2015-05-17T15:32:20.000Z | 2020-04-22T08:43:16.000Z | #
# Program: www_utils.py
# Version: 0.10
# Description:
# Generic search functions for Cheshire 3
#
# Language: Python
# Author: John Harrison <john.harrison@liv.ac.uk>
# Date: 19 December 2007
#
# Copyright: © University of Liverpool 2005-2007
#
# Version History:
# 0.01 - 13/04/2005 - JH... | 27.495268 | 128 | 0.519504 | 1,321 | 0.15156 | 0 | 0 | 0 | 0 | 0 | 0 | 3,695 | 0.423933 |
b1e3076f57089de6bfe7eeff45ef0b802cbca8fa | 5,057 | py | Python | superviselySDK/supervisely_lib/geometry/bitmap_base.py | nicehuster/mmdetection-supervisely-person-datasets | ff1b57e16a71378510571dbb9cebfdb712656927 | [
"Apache-2.0"
] | 40 | 2019-05-05T08:08:18.000Z | 2021-10-17T00:07:58.000Z | superviselySDK/supervisely_lib/geometry/bitmap_base.py | nicehuster/mmdetection-supervisely-person-datasets | ff1b57e16a71378510571dbb9cebfdb712656927 | [
"Apache-2.0"
] | 8 | 2019-06-13T06:00:08.000Z | 2021-07-24T05:25:33.000Z | superviselySDK/supervisely_lib/geometry/bitmap_base.py | nicehuster/mmdetection-supervisely-person-datasets | ff1b57e16a71378510571dbb9cebfdb712656927 | [
"Apache-2.0"
] | 6 | 2019-07-30T06:36:27.000Z | 2021-06-03T11:57:36.000Z | # coding: utf-8
import numpy as np
from supervisely_lib.geometry.constants import DATA, ORIGIN
from supervisely_lib.geometry.geometry import Geometry
from supervisely_lib.geometry.point_location import PointLocation
from supervisely_lib.geometry.rectangle import Rectangle
from supervisely_lib.imaging.image import res... | 40.782258 | 120 | 0.686969 | 3,796 | 0.750643 | 0 | 0 | 1,431 | 0.282974 | 0 | 0 | 842 | 0.166502 |
b1e369fb08913d130b89cec1f5483abc5621f780 | 851 | py | Python | src/secml/ml/classifiers/gradients/mixin_classifier_gradient_sgd.py | zangobot/secml | 95a293e1201c24256eb7fe2f1d2125cd5f318c8c | [
"Apache-2.0"
] | 63 | 2020-04-20T16:31:16.000Z | 2022-03-29T01:05:35.000Z | src/secml/ml/classifiers/gradients/mixin_classifier_gradient_sgd.py | zangobot/secml | 95a293e1201c24256eb7fe2f1d2125cd5f318c8c | [
"Apache-2.0"
] | 5 | 2020-04-21T11:31:39.000Z | 2022-03-24T13:42:56.000Z | src/secml/ml/classifiers/gradients/mixin_classifier_gradient_sgd.py | zangobot/secml | 95a293e1201c24256eb7fe2f1d2125cd5f318c8c | [
"Apache-2.0"
] | 8 | 2020-04-21T09:16:42.000Z | 2022-02-23T16:28:43.000Z | """
.. module:: CClassifierGradientSGDMixin
:synopsis: Mixin for SGD classifier gradients.
.. moduleauthor:: Ambra Demontis <ambra.demontis@unica.it>
.. moduleauthor:: Marco Melis <marco.melis@unica.it>
"""
from secml.array import CArray
from secml.ml.classifiers.gradients import CClassifierGradientLinearMixin
c... | 26.59375 | 80 | 0.680376 | 531 | 0.623972 | 0 | 0 | 0 | 0 | 0 | 0 | 585 | 0.687427 |
b1e811f35a54f18497c53bcd1b57a0f2b90a05d1 | 455 | py | Python | src/epyodbc/constructs/base_class.py | kingspp/epyodbc | 601ea659c243e7128f946fed264a095f82b25f8a | [
"MIT"
] | null | null | null | src/epyodbc/constructs/base_class.py | kingspp/epyodbc | 601ea659c243e7128f946fed264a095f82b25f8a | [
"MIT"
] | null | null | null | src/epyodbc/constructs/base_class.py | kingspp/epyodbc | 601ea659c243e7128f946fed264a095f82b25f8a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
| **@created on:** 9/4/20,
| **@author:** prathyushsp,
| **@version:** v0.0.1
|
| **Description:**
|
|
| **Sphinx Documentation Status:**
"""
from abc import ABCMeta, abstractmethod
import json
class BaseClass(metaclass=ABCMeta):
@abstractmethod
def pretty(self):
pass
... | 18.2 | 61 | 0.586813 | 228 | 0.501099 | 0 | 0 | 50 | 0.10989 | 0 | 0 | 170 | 0.373626 |
b1e81c6b8160d531e4161ae5339f729307b428e9 | 1,891 | py | Python | madlib4.py | Leorodr501/Mad-Libs | 0d619908ad4b1f73365e86345dd4023f9aa7f72d | [
"MIT"
] | null | null | null | madlib4.py | Leorodr501/Mad-Libs | 0d619908ad4b1f73365e86345dd4023f9aa7f72d | [
"MIT"
] | null | null | null | madlib4.py | Leorodr501/Mad-Libs | 0d619908ad4b1f73365e86345dd4023f9aa7f72d | [
"MIT"
] | null | null | null | adjective = input("Enter an adjective: ")
adjective = input("Enter another adjective: ")
noun = input("Enter a noun: ")
noun = input("Enter another noun: ")
plural_noun = input("Enter a plural noun: ")
game = input("Enter a game: ")
plural_noun = input("Enter another plural noun: ")
verb = input("Enter a verb ending in... | 51.108108 | 225 | 0.668429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,205 | 0.637229 |
b1ea115bb0ded34de6025f440ccc8b24a383a6be | 5,854 | py | Python | proto_5/connect/__main__.py | jadnohra/connect | 8eb21e6f122898094447bc3d5edb3053d5a2adf2 | [
"Unlicense"
] | null | null | null | proto_5/connect/__main__.py | jadnohra/connect | 8eb21e6f122898094447bc3d5edb3053d5a2adf2 | [
"Unlicense"
] | 6 | 2021-03-19T12:06:56.000Z | 2022-03-12T00:23:09.000Z | proto_5/connect/__main__.py | jadnohra/connect | 8eb21e6f122898094447bc3d5edb3053d5a2adf2 | [
"Unlicense"
] | null | null | null | import argparse
import os
import logging
import sys
from types import SimpleNamespace
from .util.print_tree import print_tree
def data_to_card_path(card_dir, fpath):
return os.path.splitext("/" + os.path.relpath(fpath, start=card_dir))[0]
class Card:
def __init__(self, card_dir, fpath):
self._fpath = ... | 34.233918 | 83 | 0.654766 | 2,249 | 0.384182 | 0 | 0 | 350 | 0.059788 | 0 | 0 | 280 | 0.047831 |
b1ea3252892ba4485f0734ae364981f2c8a20c18 | 35,322 | py | Python | arcadia.py | ntw1103/arcadia | bfefc433a97c13739c9c1b329e0b9af63dba9d1b | [
"BSD-2-Clause"
] | 1 | 2018-12-11T04:36:53.000Z | 2018-12-11T04:36:53.000Z | arcadia.py | ntw1103/arcadia | bfefc433a97c13739c9c1b329e0b9af63dba9d1b | [
"BSD-2-Clause"
] | null | null | null | arcadia.py | ntw1103/arcadia | bfefc433a97c13739c9c1b329e0b9af63dba9d1b | [
"BSD-2-Clause"
] | 1 | 2018-12-11T04:37:35.000Z | 2018-12-11T04:37:35.000Z | # -*- coding: utf-8 -*-
#!/usr/bin/env python2
import fileinput
import json
import random
import socket
import thread #
import urllib2 #
import collections
import time
import traceback
import re
from decimal import Decimal as D
from datetime import datetime
import MySQLdb #
import math
username = 'Arcadia2'
oper_key ... | 43.233782 | 188 | 0.46832 | 9,301 | 0.263305 | 0 | 0 | 0 | 0 | 0 | 0 | 12,200 | 0.345374 |
b1edfb7e986ee60ac0da1a869a4e400f7398c3fe | 1,492 | py | Python | app/display_modules/ags/tests/test_tasks.py | MetaGenScope/metagenscope-server | 609cd57c626c857c8efde8237a1f22f4d1e6065d | [
"MIT"
] | null | null | null | app/display_modules/ags/tests/test_tasks.py | MetaGenScope/metagenscope-server | 609cd57c626c857c8efde8237a1f22f4d1e6065d | [
"MIT"
] | null | null | null | app/display_modules/ags/tests/test_tasks.py | MetaGenScope/metagenscope-server | 609cd57c626c857c8efde8237a1f22f4d1e6065d | [
"MIT"
] | null | null | null | """Test suite for Average Genome Size tasks."""
from app.display_modules.ags.ags_tasks import boxplot, ags_distributions
from app.samples.sample_models import Sample
from app.tool_results.microbe_census.tests.factory import create_microbe_census
from tests.base import BaseTestCase
class TestAverageGenomeSizeTasks(B... | 38.25641 | 79 | 0.635389 | 1,205 | 0.807641 | 0 | 0 | 0 | 0 | 0 | 0 | 329 | 0.220509 |
b1ee21b42e49b37ad9977b9259b77f5d847cdf1c | 491 | py | Python | tsim/serialization/__init__.py | eduardomezencio/tsim | 60ac63152a98fd7dabb59c66367bca216e6a7370 | [
"MIT"
] | 2 | 2021-04-24T06:48:13.000Z | 2022-01-25T02:38:44.000Z | tsim/serialization/__init__.py | eduardomezencio/tsim | 60ac63152a98fd7dabb59c66367bca216e6a7370 | [
"MIT"
] | null | null | null | tsim/serialization/__init__.py | eduardomezencio/tsim | 60ac63152a98fd7dabb59c66367bca216e6a7370 | [
"MIT"
] | null | null | null | """Global serialization configuration."""
from importlib import import_module
import os
def configure_serialization():
"""Configure serialization for all classes in folder."""
for name in filter(
lambda s: not s.startswith('_') and s.endswith('.py'),
os.listdir(os.path.dirname(os.path... | 30.6875 | 71 | 0.668024 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 142 | 0.289206 |
b1eeecae89c5a75d2089876662644291654428d3 | 4,678 | py | Python | windows/winobject/handle.py | 1orenz0/PythonForWindows | f3de7b528b020b45ac6a871c975006fc1db1c3b0 | [
"BSD-3-Clause"
] | 1 | 2021-06-22T16:50:31.000Z | 2021-06-22T16:50:31.000Z | windows/winobject/handle.py | killvxk/PythonForWindows | b253bc5873e7d97087ed22f2753b51fc6880ec18 | [
"BSD-3-Clause"
] | null | null | null | windows/winobject/handle.py | killvxk/PythonForWindows | b253bc5873e7d97087ed22f2753b51fc6880ec18 | [
"BSD-3-Clause"
] | 1 | 2021-05-12T12:58:27.000Z | 2021-05-12T12:58:27.000Z | import os
import ctypes
import windows
from windows import winproxy
from windows.generated_def import windef
from windows.generated_def.winstructs import *
# Remove this ?
class EPUBLIC_OBJECT_TYPE_INFORMATION(PUBLIC_OBJECT_TYPE_INFORMATION):
pass
current_process_pid = os.getpid()
class Handle(SYSTEM_HANDLE):
... | 33.898551 | 150 | 0.665669 | 3,870 | 0.827277 | 0 | 0 | 1,209 | 0.258444 | 0 | 0 | 653 | 0.13959 |
b1efcf80cebb01dff50a1e2a45ff4368cec1958a | 4,428 | py | Python | metrics.py | efratkohen/Project | d95d20a1be8fe0e0918b3e699c640f36704639f8 | [
"MIT"
] | 1 | 2020-07-25T11:27:17.000Z | 2020-07-25T11:27:17.000Z | metrics.py | efratkohen/Project | d95d20a1be8fe0e0918b3e699c640f36704639f8 | [
"MIT"
] | null | null | null | metrics.py | efratkohen/Project | d95d20a1be8fe0e0918b3e699c640f36704639f8 | [
"MIT"
] | null | null | null | import traceback
import numpy as np
from matplotlib import pyplot, pyplot as plt
from sklearn.metrics import (
mean_squared_error,
median_absolute_error,
roc_curve,
auc,
f1_score,
precision_recall_curve,
r2_score,
)
from sklearn.metrics import confusion_matrix
import column_labeler as clabel... | 28.203822 | 80 | 0.613144 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 382 | 0.086269 |
b1f0550c1843ad31adf65e89fa5211ad4acfccfc | 1,328 | py | Python | tests/iterators/pull_test.py | SSouik/pyutil | d2250fb585679e49eb9056a3051bf239a58c2e8b | [
"MIT"
] | null | null | null | tests/iterators/pull_test.py | SSouik/pyutil | d2250fb585679e49eb9056a3051bf239a58c2e8b | [
"MIT"
] | 21 | 2022-01-05T04:51:33.000Z | 2022-01-28T05:45:57.000Z | tests/iterators/pull_test.py | SSouik/pyutil | d2250fb585679e49eb9056a3051bf239a58c2e8b | [
"MIT"
] | null | null | null | import pytest
from pyutil import pull
def test_pull_with_empty_list():
lst = []
pull(lst, 1)
expected = []
assert lst == expected
def test_pull_when_list_has_values():
lst = [1, 2, 3, 4, 5]
pull(lst, 2)
expected = [1, 3, 4, 5]
assert lst == expected
def test_pull_when_list_has_valu... | 20.75 | 54 | 0.582831 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.033886 |
b1f203c60f7518be9918994e126f2868a0f76ed4 | 30,681 | py | Python | main.py | RohiBaner/Beijing-Air-Quality-Prediction | 4ec823ceacef1b61e1c1e5689a97a1335e4b5867 | [
"MIT"
] | 3 | 2019-09-23T10:04:05.000Z | 2021-03-10T12:12:28.000Z | main.py | RohiBaner/Beijing-Air-Quality-Prediction | 4ec823ceacef1b61e1c1e5689a97a1335e4b5867 | [
"MIT"
] | null | null | null | main.py | RohiBaner/Beijing-Air-Quality-Prediction | 4ec823ceacef1b61e1c1e5689a97a1335e4b5867 | [
"MIT"
] | null | null | null | ''' --------------------------------------------IMPORTING NECESSARY LIBRARIES------------------------------------------- '''
import numpy as np
import pandas as pd
from math import radians, cos, sin, asin, sqrt
from sklearn.preprocessing import MinMaxScaler
from sklearn.preprocessing import LabelEncoder, OneHotEnc... | 57.671053 | 249 | 0.702031 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16,350 | 0.532903 |
b1f22c9adbe507763be9a3e8cffbcec89c6b45a4 | 234 | py | Python | examples/SortTimeDemo.py | Ellis0817/Introduction-to-Programming-Using-Python | 1882a2a846162d5ff56d4d56c3940b638ef408bd | [
"MIT"
] | null | null | null | examples/SortTimeDemo.py | Ellis0817/Introduction-to-Programming-Using-Python | 1882a2a846162d5ff56d4d56c3940b638ef408bd | [
"MIT"
] | 4 | 2019-11-07T12:32:19.000Z | 2020-07-19T14:04:44.000Z | examples/SortTimeDemo.py | Ellis0817/Introduction-to-Programming-Using-Python | 1882a2a846162d5ff56d4d56c3940b638ef408bd | [
"MIT"
] | 5 | 2019-12-04T15:56:55.000Z | 2022-01-14T06:19:18.000Z | import random
import time
n = eval(input("Enter the number of elements to sort: "))
lst = list(range(n))
random.shuffle(lst)
startTime = time.time()
lst.sort()
print("Sort time in Python is", int(time.time() - startTime), "seconds") | 23.4 | 72 | 0.705128 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 73 | 0.311966 |
b1f274b6140c852afcbc6bb5b744a886df0fb5fe | 102 | py | Python | cloudflare/__init__.py | darylyu/cloudflare | be12ac9fa614a7078a89d7036f3a99e3165bd99d | [
"BSD-3-Clause"
] | 1 | 2015-05-03T12:51:44.000Z | 2015-05-03T12:51:44.000Z | cloudflare/__init__.py | darylyu/cloudflare | be12ac9fa614a7078a89d7036f3a99e3165bd99d | [
"BSD-3-Clause"
] | 2 | 2015-12-17T00:47:01.000Z | 2016-04-04T14:24:14.000Z | cloudflare/__init__.py | darylyu/cloudflare | be12ac9fa614a7078a89d7036f3a99e3165bd99d | [
"BSD-3-Clause"
] | 3 | 2015-09-13T22:43:54.000Z | 2016-04-02T19:44:21.000Z | # -*- coding: utf-8 -*-
__author__ = 'Daryl Yu'
__email__ = 'dyu@fastmail.com'
__version__ = '0.0.2'
| 17 | 30 | 0.627451 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 0.568627 |
b1f5f177dec08c59abe32983e95271dfac01dbdf | 1,239 | py | Python | tests/conftest.py | andrewsayre/pysmartapp | 5c3be867584d7e82d00b5998295b20bd12eccf94 | [
"MIT"
] | 10 | 2019-02-07T20:07:10.000Z | 2020-12-30T20:29:32.000Z | tests/conftest.py | andrewsayre/pysmartapp | 5c3be867584d7e82d00b5998295b20bd12eccf94 | [
"MIT"
] | 1 | 2021-12-05T15:00:13.000Z | 2021-12-05T15:00:13.000Z | tests/conftest.py | andrewsayre/pysmartapp | 5c3be867584d7e82d00b5998295b20bd12eccf94 | [
"MIT"
] | 2 | 2020-10-17T20:20:45.000Z | 2021-09-28T12:58:50.000Z | """Define common test configuraiton."""
import pytest
from pysmartapp.dispatch import Dispatcher
from pysmartapp.smartapp import SmartApp, SmartAppManager
@pytest.fixture
def smartapp(event_loop) -> SmartApp:
"""Fixture for testing against the SmartApp class."""
app = SmartApp(dispatcher=Dispatcher(loop=eve... | 26.361702 | 66 | 0.67958 | 0 | 0 | 0 | 0 | 1,070 | 0.8636 | 120 | 0.096852 | 318 | 0.256659 |
b1f8c5ac672b61358853182ee48a06e86cda8b9c | 294 | py | Python | to_do_list.py | GYosifov88/Python-Fundamentals | b46ba2822bd2dac6ff46830c6a520e559b448442 | [
"MIT"
] | null | null | null | to_do_list.py | GYosifov88/Python-Fundamentals | b46ba2822bd2dac6ff46830c6a520e559b448442 | [
"MIT"
] | null | null | null | to_do_list.py | GYosifov88/Python-Fundamentals | b46ba2822bd2dac6ff46830c6a520e559b448442 | [
"MIT"
] | null | null | null | todo_list = ["" for i in range(11)]
command = input()
while command != 'End':
task = command.split('-')
importance = int(task[0])
thing_to_do = task[1]
todo_list[importance] = thing_to_do
command = input()
final_list = [x for x in todo_list if x != ""]
print(final_list) | 21 | 46 | 0.629252 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.040816 |
b1fa447d2310139f7a8d64aba2e5e1395276502b | 6,035 | py | Python | run.py | Tracymbone/password_locker | 346a3c770174d20fe24720fd4875f5f4e222d582 | [
"MIT"
] | null | null | null | run.py | Tracymbone/password_locker | 346a3c770174d20fe24720fd4875f5f4e222d582 | [
"MIT"
] | null | null | null | run.py | Tracymbone/password_locker | 346a3c770174d20fe24720fd4875f5f4e222d582 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.8
from socket import create_server
from users import Users
from credentials import Credentials
def create_credentials(first_name, last_name, user_name, credential):
users = Users(first_name, last_name, user_name, credential)
return users
def save_user(users):
users.save_user()
d... | 28.875598 | 136 | 0.471914 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,390 | 0.230323 |
b1faa38cc22b54eb622228d21323a509bcdbceb8 | 2,346 | py | Python | menu_info/menu_details.py | averytorres/WazHack-Clone | e53e9b1b64f3828b20e45d4eeaafcdedf9bc6fda | [
"Unlicense"
] | 1 | 2019-06-21T17:13:35.000Z | 2019-06-21T17:13:35.000Z | menu_info/menu_details.py | averytorres/WazHack-Clone | e53e9b1b64f3828b20e45d4eeaafcdedf9bc6fda | [
"Unlicense"
] | 18 | 2019-06-25T00:48:11.000Z | 2019-07-11T17:52:24.000Z | menu_info/menu_details.py | averytorres/WazHack-Clone | e53e9b1b64f3828b20e45d4eeaafcdedf9bc6fda | [
"Unlicense"
] | 1 | 2019-06-21T17:08:23.000Z | 2019-06-21T17:08:23.000Z | from game_states import GameStates
from action_consumer.available_actions_enum import Action
def get_menu_title(menu_name):
menu_titles = {}
menu_titles.update({GameStates.SHOW_INVENTORY:'Press the key next to an item to use it, or Esc to cancel.\n'})
menu_titles.update({GameStates.DROP_INVENTORY: 'Press... | 39.1 | 132 | 0.728048 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 503 | 0.214408 |
b1fbf96a2060ff4635f4538c1011d07667a95b78 | 270 | py | Python | sciris/sc_version.py | optimamodel/sciris | fc0148fd9352e443a1c9b1a790275bc2904b30b1 | [
"MIT"
] | null | null | null | sciris/sc_version.py | optimamodel/sciris | fc0148fd9352e443a1c9b1a790275bc2904b30b1 | [
"MIT"
] | 4 | 2018-03-27T21:47:13.000Z | 2018-08-28T00:50:00.000Z | sciris/sc_version.py | optimamodel/sciris | fc0148fd9352e443a1c9b1a790275bc2904b30b1 | [
"MIT"
] | 1 | 2018-09-05T07:57:39.000Z | 2018-09-05T07:57:39.000Z | '''
Version and license information.
'''
__all__ = ['__version__', '__versiondate__', '__license__']
__version__ = '1.3.3'
__versiondate__ = '2022-01-16'
__license__ = f'Sciris {__version__} ({__versiondate__}) – © 2014-2022 by the Sciris Development Team'
| 27 | 107 | 0.692593 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 193 | 0.70696 |
b1fc50952b7cf799deab08fe85f0849c2cbaf2f0 | 1,154 | py | Python | tests/unit/fileserver/test_hgfs.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | 1 | 2020-03-31T22:51:16.000Z | 2020-03-31T22:51:16.000Z | tests/unit/fileserver/test_hgfs.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/unit/fileserver/test_hgfs.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-09-30T07:00:01.000Z | 2021-09-30T07:00:01.000Z | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import, print_function, unicode_literals
# Import Salt Testing libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import TestCase
from tests.support.mock import patch
# Import Salt libs
import salt.fileserve... | 28.85 | 72 | 0.618718 | 816 | 0.707106 | 0 | 0 | 0 | 0 | 0 | 0 | 381 | 0.330156 |
b1fca680c3a855f104f3ad48d1f63a988374a6e5 | 26 | py | Python | constants.py | harryrobertwright/plutus | 7a0d9f1474982d1bb66d7b018f2ce7e28aab7bc3 | [
"MIT"
] | null | null | null | constants.py | harryrobertwright/plutus | 7a0d9f1474982d1bb66d7b018f2ce7e28aab7bc3 | [
"MIT"
] | null | null | null | constants.py | harryrobertwright/plutus | 7a0d9f1474982d1bb66d7b018f2ce7e28aab7bc3 | [
"MIT"
] | null | null | null | INTERVALS = [
"1h",
]
| 6.5 | 13 | 0.423077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0.153846 |
b1fd1af131dc102c96ef990fe42c7c22c4e492de | 1,273 | py | Python | networks/model_factory.py | DQle38/Fair-Feature-Distillation-for-Visual-Recognition | f0f98728f36528218bf19dce9a26d6ee1ba96e58 | [
"MIT"
] | 5 | 2021-09-07T13:33:45.000Z | 2022-02-12T18:56:45.000Z | networks/model_factory.py | DQle38/Fair-Feature-Distillation-for-Visual-Recognition | f0f98728f36528218bf19dce9a26d6ee1ba96e58 | [
"MIT"
] | null | null | null | networks/model_factory.py | DQle38/Fair-Feature-Distillation-for-Visual-Recognition | f0f98728f36528218bf19dce9a26d6ee1ba96e58 | [
"MIT"
] | 4 | 2021-09-25T06:56:38.000Z | 2022-03-24T18:06:08.000Z | import torch.nn as nn
from networks.resnet import resnet18
from networks.shufflenet import shufflenet_v2_x1_0
from networks.cifar_net import Net
from networks.mlp import MLP
class ModelFactory():
def __init__(self):
pass
@staticmethod
def get_model(target_model, num_classes, img_size, pretrained... | 31.04878 | 91 | 0.639434 | 1,094 | 0.859387 | 0 | 0 | 1,030 | 0.809112 | 0 | 0 | 36 | 0.02828 |
b1ff61ec8eb947ca5da56f846d344d35e22df2db | 5,536 | py | Python | main.py | MarySueTeam/Video_Maker | a3bbdeb49b5f887d5f8dbc3b4e57b955d4ee3671 | [
"MIT"
] | 1 | 2022-03-04T09:25:11.000Z | 2022-03-04T09:25:11.000Z | main.py | MarySueTeam/Video_Maker | a3bbdeb49b5f887d5f8dbc3b4e57b955d4ee3671 | [
"MIT"
] | null | null | null | main.py | MarySueTeam/Video_Maker | a3bbdeb49b5f887d5f8dbc3b4e57b955d4ee3671 | [
"MIT"
] | 1 | 2022-01-25T16:19:25.000Z | 2022-01-25T16:19:25.000Z | from manim import *
from TTS.TTS import get_mp3_file
from utils import cut, get_duration, deal_text
import time
class Video(Scene):
def construct(self):
# INFO 视频开头
LOGO = ImageMobject("./media/images/logo.png").scale(0.3).to_edge(UP, buff=2)
Slogan_text = "为你收集日落时的云朵,为你收藏下雨后的天空"
g... | 48.99115 | 129 | 0.62211 | 5,714 | 0.980439 | 0 | 0 | 0 | 0 | 0 | 0 | 1,492 | 0.256005 |
b1ff7639399b3c6d47d30f81feb9b3ec46b39e02 | 106 | py | Python | Discord Bots/Discord Bot/test_Bot.py | SeymoTheDev/skittles-stuff | f9eba3efd0577045085418391b7154f3fd121f70 | [
"MIT"
] | null | null | null | Discord Bots/Discord Bot/test_Bot.py | SeymoTheDev/skittles-stuff | f9eba3efd0577045085418391b7154f3fd121f70 | [
"MIT"
] | null | null | null | Discord Bots/Discord Bot/test_Bot.py | SeymoTheDev/skittles-stuff | f9eba3efd0577045085418391b7154f3fd121f70 | [
"MIT"
] | null | null | null | from unittest import TestCase
class Test(TestCase):
def test_punch(self):
self.fail()
| 15.142857 | 30 | 0.641509 | 69 | 0.650943 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5901159e3f1532199cb8c881801333e8fca64f93 | 1,518 | py | Python | sevenbridges/models/compound/tasks/batch_by.py | sbg/sevenbridges-python | b3e14016066563470d978c9b13e1a236a41abea8 | [
"Apache-2.0"
] | 46 | 2016-04-27T12:51:17.000Z | 2021-11-24T23:43:12.000Z | sevenbridges/models/compound/tasks/batch_by.py | sbg/sevenbridges-python | b3e14016066563470d978c9b13e1a236a41abea8 | [
"Apache-2.0"
] | 111 | 2016-05-25T15:44:31.000Z | 2022-02-05T20:45:37.000Z | sevenbridges/models/compound/tasks/batch_by.py | sbg/sevenbridges-python | b3e14016066563470d978c9b13e1a236a41abea8 | [
"Apache-2.0"
] | 37 | 2016-04-27T12:10:43.000Z | 2021-03-18T11:22:28.000Z | from sevenbridges.meta.resource import Resource
# noinspection PyUnresolvedReferences,PyProtectedMember
class BatchBy(Resource, dict):
"""
Task batch by resource.
"""
_name = 'batch_by'
# noinspection PyMissingConstructor
def __init__(self, **kwargs):
self.parent = kwargs.pop('_parent... | 27.107143 | 77 | 0.554018 | 1,411 | 0.929513 | 0 | 0 | 0 | 0 | 0 | 0 | 153 | 0.100791 |
5904c0dfbd55d07ecdda6b598e8aefd81056a978 | 2,764 | py | Python | server/core/tests/test_models.py | jleg13/Django-REST-API | 7e2c397ca3d49a320a79356c96b35beb86cc97ff | [
"MIT"
] | null | null | null | server/core/tests/test_models.py | jleg13/Django-REST-API | 7e2c397ca3d49a320a79356c96b35beb86cc97ff | [
"MIT"
] | null | null | null | server/core/tests/test_models.py | jleg13/Django-REST-API | 7e2c397ca3d49a320a79356c96b35beb86cc97ff | [
"MIT"
] | null | null | null | from unittest.mock import patch
from django.test import TestCase
from django.contrib.auth import get_user_model
from core import models
def sample_user(email='test@email.com', password='testpass'):
"""Create a sample user"""
return get_user_model().objects.create_user(email, password)
class ModelTests(Tes... | 32.904762 | 76 | 0.646527 | 2,463 | 0.8911 | 0 | 0 | 386 | 0.139653 | 0 | 0 | 681 | 0.246382 |
5906bff03b00e79f2660983fe9997b9cd354f2bc | 30 | py | Python | tests/database/__init__.py | dinosv/cobib | 15342de37336a51d87c8f04f8430d0621da69a5c | [
"MIT"
] | 9 | 2020-09-27T19:22:35.000Z | 2022-02-27T20:00:58.000Z | tests/database/__init__.py | dinosv/cobib | 15342de37336a51d87c8f04f8430d0621da69a5c | [
"MIT"
] | null | null | null | tests/database/__init__.py | dinosv/cobib | 15342de37336a51d87c8f04f8430d0621da69a5c | [
"MIT"
] | 2 | 2020-12-07T15:26:03.000Z | 2021-10-03T18:04:57.000Z | """coBib's database tests."""
| 15 | 29 | 0.633333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.966667 |
590721cca2145e8661012d52208da3bcc5dbe108 | 230 | py | Python | Semester-1/Lab8/src/lab_A.py | Vipul-Cariappa/Collage-CS-Lab | 0a0193df9575a4e69b60759d974423202ddf544b | [
"MIT"
] | null | null | null | Semester-1/Lab8/src/lab_A.py | Vipul-Cariappa/Collage-CS-Lab | 0a0193df9575a4e69b60759d974423202ddf544b | [
"MIT"
] | null | null | null | Semester-1/Lab8/src/lab_A.py | Vipul-Cariappa/Collage-CS-Lab | 0a0193df9575a4e69b60759d974423202ddf544b | [
"MIT"
] | 2 | 2022-03-04T14:06:15.000Z | 2022-03-16T17:32:10.000Z | # program to display first n lines in a text file
n = int(input("Enter number of lines: "))
with open("note.txt") as file:
while n > 0:
print(
file.readline(),
end=""
)
n -= 1
| 19.166667 | 49 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.373913 |
59079f538bc9e256df53c65451be92c382f11c5c | 23,420 | py | Python | eplusplus/view/mainWindow.py | labeee/EPlusPlus | da6cbd60575146a8f165fb72e165919cd83ddc24 | [
"MIT"
] | 1 | 2018-02-06T17:41:12.000Z | 2018-02-06T17:41:12.000Z | eplusplus/view/mainWindow.py | labeee/EPlusPlus | da6cbd60575146a8f165fb72e165919cd83ddc24 | [
"MIT"
] | null | null | null | eplusplus/view/mainWindow.py | labeee/EPlusPlus | da6cbd60575146a8f165fb72e165919cd83ddc24 | [
"MIT"
] | 1 | 2021-06-29T02:49:59.000Z | 2021-06-29T02:49:59.000Z | import os
import sys
import ctypes
import webbrowser
from .lineEdit import LineEdit
from .dialogWithCheckBox import DialogWithCheckBox
from eplusplus.controller import ActorUser
from eplusplus.exception import ColumnException, NoIdfException, InstallException, NoCsvException
from PyQt5.QtCore import QSize, Qt, QRect
fr... | 40.589255 | 101 | 0.608839 | 22,322 | 0.952588 | 0 | 0 | 0 | 0 | 0 | 0 | 10,293 | 0.439252 |
5907d7fbfcc198ea821785faf5ae482c8f858484 | 4,555 | py | Python | CHAPTER 11 (search trees)/red_black_trees_class.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | CHAPTER 11 (search trees)/red_black_trees_class.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | CHAPTER 11 (search trees)/red_black_trees_class.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | from tree_map_class import *
class RedBlackTreeMap(TreeMap):
"""Sorted map implementation using red-black tree."""
class _Node(TreeMap._Node):
"""Node class for red-black tree maintains bit that denotes color."""
__slots__ = "_red" # add additional data member to the Node class
... | 46.958763 | 88 | 0.528211 | 4,524 | 0.993194 | 0 | 0 | 0 | 0 | 0 | 0 | 1,360 | 0.298573 |
59083cdbd1613168bb0ded29e8cc254a35bff318 | 5,170 | py | Python | my_diary_data_structures.py | koechkevin/myDiary | c5f48fa04a5f8c2bce9f1580c0f92f3f0d5f9bcb | [
"Apache-2.0"
] | null | null | null | my_diary_data_structures.py | koechkevin/myDiary | c5f48fa04a5f8c2bce9f1580c0f92f3f0d5f9bcb | [
"Apache-2.0"
] | null | null | null | my_diary_data_structures.py | koechkevin/myDiary | c5f48fa04a5f8c2bce9f1580c0f92f3f0d5f9bcb | [
"Apache-2.0"
] | 1 | 2018-11-04T09:48:46.000Z | 2018-11-04T09:48:46.000Z | from functools import wraps
import datetime
from flask import jsonify, Flask, request, session
from my_class import ExternalFunctions
app = Flask(__name__)
app.config["SECRET_KEY"] = 'kkkoech'
user_details = dict()
diary_entries = dict()
@app.route("/api/v1", methods=['GET'])
def home():
return jsonify({"messa... | 38.014706 | 100 | 0.624178 | 0 | 0 | 0 | 0 | 4,800 | 0.928433 | 0 | 0 | 1,454 | 0.281238 |
5909eb773cf91122abfbd155ab1ef7779d77f23a | 26 | py | Python | micro-benchmark-key-errs/snippets/parameters/imported_assigned_call/to_import.py | WenJinfeng/PyCG | b45e8e04fe697d8301cf27222a8f37646d69f168 | [
"Apache-2.0"
] | 121 | 2020-12-16T20:31:37.000Z | 2022-03-21T20:32:43.000Z | micro-benchmark-key-errs/snippets/parameters/imported_assigned_call/to_import.py | WenJinfeng/PyCG | b45e8e04fe697d8301cf27222a8f37646d69f168 | [
"Apache-2.0"
] | 24 | 2021-03-13T00:04:00.000Z | 2022-03-21T17:28:11.000Z | micro-benchmark-key-errs/snippets/parameters/imported_assigned_call/to_import.py | WenJinfeng/PyCG | b45e8e04fe697d8301cf27222a8f37646d69f168 | [
"Apache-2.0"
] | 19 | 2021-03-23T10:58:47.000Z | 2022-03-24T19:46:50.000Z | const1 = "a"
const2 = "b"
| 8.666667 | 12 | 0.538462 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.230769 |
5909f08bda2ad877f9982af2cd854a38d7dd516a | 13,029 | py | Python | intake_sdmx.py | dr-leo/intake_sdmx | dccd51e6ce4aa352fba0a0c25dfac82148acd1e3 | [
"Apache-2.0"
] | null | null | null | intake_sdmx.py | dr-leo/intake_sdmx | dccd51e6ce4aa352fba0a0c25dfac82148acd1e3 | [
"Apache-2.0"
] | 3 | 2021-05-29T19:46:36.000Z | 2022-01-15T14:15:22.000Z | intake_sdmx.py | dr-leo/intake_sdmx | dccd51e6ce4aa352fba0a0c25dfac82148acd1e3 | [
"Apache-2.0"
] | 1 | 2021-05-28T13:14:53.000Z | 2021-05-28T13:14:53.000Z | """intake plugin for SDMX data sources"""
import intake
from intake.catalog import Catalog
from intake.catalog.utils import reload_on_change
from intake.catalog.local import LocalCatalogEntry, UserParameter
import pandasdmx as sdmx
from collections.abc import MutableMapping
from datetime import date
from itertools im... | 36.805085 | 90 | 0.54939 | 12,636 | 0.969837 | 0 | 0 | 801 | 0.061478 | 0 | 0 | 3,309 | 0.253972 |
5910779f16295dd8d8929f180e23470f2321f629 | 1,388 | py | Python | apps/exp/afe/afe_bfcc.py | yt7589/mgs | 2faae1b69e6d4cde63afb9b2432b1bf49ebdd770 | [
"Apache-2.0"
] | null | null | null | apps/exp/afe/afe_bfcc.py | yt7589/mgs | 2faae1b69e6d4cde63afb9b2432b1bf49ebdd770 | [
"Apache-2.0"
] | null | null | null | apps/exp/afe/afe_bfcc.py | yt7589/mgs | 2faae1b69e6d4cde63afb9b2432b1bf49ebdd770 | [
"Apache-2.0"
] | null | null | null | #
#import scipy
#from scipy import io as sio
import scipy.io.wavfile
from ext.spafe.utils import vis
from ext.spafe.features.bfcc import bfcc
class AfeBfcc:
@staticmethod
def extract_bfcc(wav_file):
print('获取BFCC特征')
num_ceps = 13
low_freq = 0
high_freq = 2000
nfilts = 2... | 30.844444 | 77 | 0.50072 | 1,253 | 0.897564 | 0 | 0 | 1,234 | 0.883954 | 0 | 0 | 289 | 0.20702 |
591250889987fba85313b14511149afd485e1e41 | 268 | py | Python | rustplus/exceptions/exceptions.py | fieu/rustplus | d1e82a7a32988d48ce2c3fd386f464bd48f50385 | [
"MIT"
] | 1 | 2021-08-10T12:59:42.000Z | 2021-08-10T12:59:42.000Z | rustplus/exceptions/exceptions.py | fieu/rustplus | d1e82a7a32988d48ce2c3fd386f464bd48f50385 | [
"MIT"
] | null | null | null | rustplus/exceptions/exceptions.py | fieu/rustplus | d1e82a7a32988d48ce2c3fd386f464bd48f50385 | [
"MIT"
] | null | null | null | class Error(Exception):
"""Base class for other exceptions"""
pass
class ClientError(Error):
"""Raised when the client details are not valid"""
pass
class ImageError(Error):
"""Raised when the Image Returned is not valid"""
pass
| 20.615385 | 55 | 0.641791 | 256 | 0.955224 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 0.507463 |
591491ff550ba32d4e2ae2cbc52705d6ad0c7c72 | 4,673 | py | Python | notifier_bot.py | maticardenas/football_api_notif | 81f9e265d4effb7545e3d9ad80ee1109cd9b8edf | [
"MIT"
] | null | null | null | notifier_bot.py | maticardenas/football_api_notif | 81f9e265d4effb7545e3d9ad80ee1109cd9b8edf | [
"MIT"
] | null | null | null | notifier_bot.py | maticardenas/football_api_notif | 81f9e265d4effb7545e3d9ad80ee1109cd9b8edf | [
"MIT"
] | null | null | null | import logging
from datetime import date
from telegram import Update
from telegram.ext import ApplicationBuilder, CommandHandler
from config.notif_config import NotifConfig
from src.emojis import Emojis
from src.team_fixtures_manager import TeamFixturesManager
from src.telegram_bot.bot_commands_handler import NextAnd... | 37.685484 | 116 | 0.684571 | 0 | 0 | 0 | 0 | 0 | 0 | 3,497 | 0.746903 | 949 | 0.202691 |
59166d910964300c77243a402c6b75bc3f352d74 | 1,517 | py | Python | homeassistant_cli/plugins/event.py | dotlambda/home-assistant-cli | e8c5a493ca902a739a357d3053a2f09d589e9be1 | [
"Apache-2.0"
] | null | null | null | homeassistant_cli/plugins/event.py | dotlambda/home-assistant-cli | e8c5a493ca902a739a357d3053a2f09d589e9be1 | [
"Apache-2.0"
] | null | null | null | homeassistant_cli/plugins/event.py | dotlambda/home-assistant-cli | e8c5a493ca902a739a357d3053a2f09d589e9be1 | [
"Apache-2.0"
] | null | null | null | """Edit plugin for Home Assistant CLI (hass-cli)."""
import json as json_
import logging
import click
import homeassistant_cli.autocompletion as autocompletion
from homeassistant_cli.cli import pass_context
from homeassistant_cli.config import Configuration
from homeassistant_cli.helper import raw_format_output, req_r... | 29.173077 | 75 | 0.661173 | 0 | 0 | 0 | 0 | 1,136 | 0.748846 | 0 | 0 | 310 | 0.204351 |
59177fedfb201ef7cf401094e43b1d49ac1b2c09 | 8,576 | py | Python | events/models.py | Strategy-Tap/Novizi-BackEnd | 536edde68dc79ad5467f2dbb0931a56930a4edea | [
"MIT"
] | null | null | null | events/models.py | Strategy-Tap/Novizi-BackEnd | 536edde68dc79ad5467f2dbb0931a56930a4edea | [
"MIT"
] | 4 | 2021-04-08T21:23:49.000Z | 2022-03-12T00:44:54.000Z | events/models.py | Strategy-Tap/Novizi-BackEnd | 536edde68dc79ad5467f2dbb0931a56930a4edea | [
"MIT"
] | 1 | 2020-06-12T16:08:46.000Z | 2020-06-12T16:08:46.000Z | """Collection of model."""
from typing import Any
from django.conf import settings
from django.db import models
from django.db.models.signals import pre_save
from django.dispatch import receiver
from django.utils.translation import gettext_lazy as _
from djgeojson.fields import PointField
from .utils import get_read_... | 30.519573 | 87 | 0.653451 | 7,349 | 0.856926 | 0 | 0 | 554 | 0.064599 | 0 | 0 | 2,222 | 0.259095 |
5917ad709fbc60f4121dfd8d315e221b94423156 | 1,938 | py | Python | src/nlp/classification/tf1/traditional_cls/bert_embedding.py | wu-uw/OpenCompetition | 9aa9d7a50ada1deb653d295dd8a7fe46321b9094 | [
"Apache-2.0"
] | 15 | 2019-12-22T14:26:47.000Z | 2020-11-02T10:57:37.000Z | src/nlp/classification/tf1/traditional_cls/bert_embedding.py | GT-JLU/OpenCompetition | 5262fc5fa7efd7b483c1dc09cb7747dd75e37175 | [
"Apache-2.0"
] | 2 | 2020-02-03T07:10:11.000Z | 2020-02-11T16:38:56.000Z | src/nlp/classification/tf1/traditional_cls/bert_embedding.py | GT-JLU/OpenCompetition | 5262fc5fa7efd7b483c1dc09cb7747dd75e37175 | [
"Apache-2.0"
] | 12 | 2020-01-06T14:16:52.000Z | 2020-05-23T14:12:30.000Z | # coding = utf-8
import copy
import json
import logging
import math
import os
import shutil
import tarfile
import tempfile
import sys
from io import open
import torch
from torch import nn
from torch.nn import CrossEntropyLoss
from activation_function import gelu, swish, ACT2FN
import logging
logger = logging.getLogge... | 35.888889 | 114 | 0.750774 | 1,564 | 0.807018 | 0 | 0 | 0 | 0 | 0 | 0 | 230 | 0.118679 |
5918b94351e68baf0dc788cb62fb44c5a012741d | 2,276 | py | Python | raster_compare/base/raster_data_difference.py | jomey/raster_compare | 5199005d01f569e187e944d62af0ea70c383d16a | [
"MIT"
] | 1 | 2021-11-13T12:59:53.000Z | 2021-11-13T12:59:53.000Z | raster_compare/base/raster_data_difference.py | jomey/raster_compare | 5199005d01f569e187e944d62af0ea70c383d16a | [
"MIT"
] | null | null | null | raster_compare/base/raster_data_difference.py | jomey/raster_compare | 5199005d01f569e187e944d62af0ea70c383d16a | [
"MIT"
] | null | null | null | import numpy as np
from osgeo import gdal
from .median_absolute_deviation import MedianAbsoluteDeviation
from .raster_file import RasterFile
class RasterDataDifference(object):
GDAL_DRIVER = gdal.GetDriverByName('GTiff')
def __init__(self, lidar, sfm, band_number):
self.lidar = RasterFile(lidar, ban... | 27.756098 | 76 | 0.629174 | 2,131 | 0.936292 | 0 | 0 | 1,387 | 0.609402 | 0 | 0 | 7 | 0.003076 |
591c39e1d0a64ea2423fa974b75251f4ec29ed0a | 3,386 | py | Python | dbcontext/Module/construct.py | jimmg35/Sensor_Crawling_v2 | 5154885cad5173127539487a2fcf2140a4409b8b | [
"MIT"
] | null | null | null | dbcontext/Module/construct.py | jimmg35/Sensor_Crawling_v2 | 5154885cad5173127539487a2fcf2140a4409b8b | [
"MIT"
] | null | null | null | dbcontext/Module/construct.py | jimmg35/Sensor_Crawling_v2 | 5154885cad5173127539487a2fcf2140a4409b8b | [
"MIT"
] | null | null | null | import time
import hmac
import base64
import datetime
import schedule
import psycopg2
from time import mktime
from hashlib import sha1
from pprint import pprint
from requests import request
from datetime import datetime
from wsgiref.handlers import format_date_time
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCO... | 33.86 | 137 | 0.60632 | 3,005 | 0.887478 | 0 | 0 | 0 | 0 | 0 | 0 | 794 | 0.234495 |
591d8ee660b8804dd218cc4cd1c5374e204e9abe | 1,540 | py | Python | ppqq/src/qq/main.py | xiaomin0322/mypqq | 8bdd5d1dafb5fa53d65cb732b7372fbcfe9c7c2c | [
"Apache-2.0"
] | 1 | 2018-11-11T14:34:53.000Z | 2018-11-11T14:34:53.000Z | ppqq/src/qq/main.py | xiaomin0322/mypqq | 8bdd5d1dafb5fa53d65cb732b7372fbcfe9c7c2c | [
"Apache-2.0"
] | null | null | null | ppqq/src/qq/main.py | xiaomin0322/mypqq | 8bdd5d1dafb5fa53d65cb732b7372fbcfe9c7c2c | [
"Apache-2.0"
] | 1 | 2021-02-04T08:46:09.000Z | 2021-02-04T08:46:09.000Z | # -*- coding: utf8 -*-
# 作者:Light.紫.星
# QQ:1311817771
import AndroidQQ,threading,time
from AndroidQQ import Android
class Main:
def __init__(self):
pass
def login(self,qqnum,qqpass):
print 15*"-",("开始登陆QQ:"),qqnum,15*"-"
self.sdk = Android()
self.state = 0
s... | 35 | 75 | 0.546104 | 1,468 | 0.872771 | 0 | 0 | 0 | 0 | 0 | 0 | 588 | 0.349584 |
591f579f62bec7c986797fa9d6cc59de7656817e | 527 | py | Python | util/logger.py | code4hk/NewsdiffHK-Backend | 76ffd933fe9900a0bd2191597a210ddf86d2a8cd | [
"MIT"
] | 5 | 2015-03-29T19:19:16.000Z | 2015-06-20T09:37:39.000Z | util/logger.py | code4hk/NewsdiffHK-Backend | 76ffd933fe9900a0bd2191597a210ddf86d2a8cd | [
"MIT"
] | 28 | 2015-04-07T13:34:57.000Z | 2015-05-25T13:30:36.000Z | util/logger.py | code4hk/NewsdiffHK-Backend | 76ffd933fe9900a0bd2191597a210ddf86d2a8cd | [
"MIT"
] | null | null | null | from util.env import log_dir
import logging
class MyFormatter(logging.Formatter):
def formatTime(self, record, datefmt=None):
return logging.Formatter.formatTime(self, record, datefmt).replace(',', '.')
def get(name):
log = logging.getLogger(name)
log.setLevel(logging.DEBUG)
formatter = MyFo... | 29.277778 | 84 | 0.70019 | 170 | 0.322581 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.11575 |
59203bba648641256e52153b47303c1f888cf09a | 1,347 | py | Python | src/core/migrations/0096_auto_20191023_1441.py | metabolism-of-cities/ARCHIVED-metabolism-of-cities-platform-v3 | c754d3b1b401906a21640b8eacb6b724a448b31c | [
"MIT"
] | null | null | null | src/core/migrations/0096_auto_20191023_1441.py | metabolism-of-cities/ARCHIVED-metabolism-of-cities-platform-v3 | c754d3b1b401906a21640b8eacb6b724a448b31c | [
"MIT"
] | null | null | null | src/core/migrations/0096_auto_20191023_1441.py | metabolism-of-cities/ARCHIVED-metabolism-of-cities-platform-v3 | c754d3b1b401906a21640b8eacb6b724a448b31c | [
"MIT"
] | null | null | null | # Generated by Django 2.2.2 on 2019-10-23 14:41
from django.db import migrations, models
import tinymce.models
class Migration(migrations.Migration):
dependencies = [
('core', '0095_auto_20191022_1602'),
]
operations = [
migrations.AlterModelOptions(
name='casestudy',
... | 35.447368 | 323 | 0.590943 | 1,232 | 0.914625 | 0 | 0 | 0 | 0 | 0 | 0 | 412 | 0.305865 |
592176ee7d34af8c375b741cef8c2df674d9c4b5 | 2,243 | py | Python | piservicebusclient.py | nikkh/pi | 237c0c0effcf69c15c6fb2791c7fd49eb1e254aa | [
"Unlicense"
] | null | null | null | piservicebusclient.py | nikkh/pi | 237c0c0effcf69c15c6fb2791c7fd49eb1e254aa | [
"Unlicense"
] | null | null | null | piservicebusclient.py | nikkh/pi | 237c0c0effcf69c15c6fb2791c7fd49eb1e254aa | [
"Unlicense"
] | null | null | null | #!/usr/bin/python
import colorsys
from azure.servicebus import ServiceBusService
from azure.servicebus import Message
from blinkt import set_pixel, set_brightness, show, clear
import time
import json
class Payload(object):
def __init__(self, j):
self.__dict__ = json.loads(j)
def snake( r, g, b ):
"Th... | 28.392405 | 78 | 0.602764 | 89 | 0.039679 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.164512 |
59245ad69bc6ea799437abf97159920fe65df34f | 149 | py | Python | exercicio-mundo-1/ex010.py | amosxrl/python | 8399a9c42fdb49184fcfe906f8bce82d1a671667 | [
"MIT"
] | 2 | 2020-05-06T23:49:20.000Z | 2020-05-06T23:49:25.000Z | exercicio-mundo-1/ex010.py | amosxrl/python | 8399a9c42fdb49184fcfe906f8bce82d1a671667 | [
"MIT"
] | null | null | null | exercicio-mundo-1/ex010.py | amosxrl/python | 8399a9c42fdb49184fcfe906f8bce82d1a671667 | [
"MIT"
] | null | null | null | print('Quanto dinheiro voce tem na carteiro')
print('-'*20)
re = float(input('R$ '))
dol = re * 0.1874
print('-'*20)
print('US$ {:.2f}'.format(dol))
| 21.285714 | 45 | 0.610738 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.409396 |
59253833cbcb18241d731edddc82a7004e814b3e | 3,163 | py | Python | catkin_ws/build/baxter_core_msgs/cmake/baxter_core_msgs-genmsg-context.py | roop-pal/robotic-folding | a0e062ac6d23cd07fe10e3f45abc4ba50e533141 | [
"RSA-MD"
] | null | null | null | catkin_ws/build/baxter_core_msgs/cmake/baxter_core_msgs-genmsg-context.py | roop-pal/robotic-folding | a0e062ac6d23cd07fe10e3f45abc4ba50e533141 | [
"RSA-MD"
] | null | null | null | catkin_ws/build/baxter_core_msgs/cmake/baxter_core_msgs-genmsg-context.py | roop-pal/robotic-folding | a0e062ac6d23cd07fe10e3f45abc4ba50e533141 | [
"RSA-MD"
] | null | null | null | # generated from genmsg/cmake/pkg-genmsg.context.in
messages_str = "/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/AnalogIOState.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/AnalogIOStates.msg;/home/parallels/catkin_ws/src/baxter_common/baxter_core_msgs/msg/AnalogOutputCommand... | 263.583333 | 2,159 | 0.863737 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,980 | 0.942144 |
59269ff1d7149784a5bf3e067f0e6975db562830 | 14,031 | py | Python | apps/part_interpolation&replacement/part_replacement.py | GuillaumeDufau/3D-point-capsule-networks | 369206df643edb263d43cf2d05923cf0a26841e5 | [
"MIT"
] | 283 | 2019-04-14T12:58:54.000Z | 2022-03-30T11:49:38.000Z | apps/part_interpolation&replacement/part_replacement.py | LONG-9621/3D-Point-Capsule-Networks | 161ac9042ca9c048f4b531ae26fe94a29b13e777 | [
"MIT"
] | 20 | 2019-05-01T05:40:02.000Z | 2021-11-20T11:15:17.000Z | apps/part_interpolation&replacement/part_replacement.py | LONG-9621/3D-Point-Capsule-Networks | 161ac9042ca9c048f4b531ae26fe94a29b13e777 | [
"MIT"
] | 55 | 2019-04-22T12:14:42.000Z | 2022-03-25T06:26:36.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 12 17:45:51 2018
@author: zhao
"""
import argparse
import torch
import torch.nn.parallel
from torch.autograd import Variable
import torch.optim as optim
import torch.nn.functional as F
import sys
import os
import numpy as np
BASE_DIR = os.path.dir... | 44.26183 | 170 | 0.662818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,889 | 0.13463 |
592749e0c27abaef8d986702717878c311749a54 | 6,839 | py | Python | src/Grid.py | RavinSG/aaivu-ride-hailing-simulation | eb7bc7cc6a5830d40509ce22fe4fa2eb013e6767 | [
"Apache-2.0"
] | 8 | 2021-02-18T19:02:59.000Z | 2022-02-19T13:38:48.000Z | src/Grid.py | Programmer-RD-AI/aaivu-ride-hailing-simulation | f315661c94c9e3f26bab1d8bb9c35d21b1a60479 | [
"Apache-2.0"
] | null | null | null | src/Grid.py | Programmer-RD-AI/aaivu-ride-hailing-simulation | f315661c94c9e3f26bab1d8bb9c35d21b1a60479 | [
"Apache-2.0"
] | 2 | 2021-02-14T03:28:51.000Z | 2022-02-19T13:38:51.000Z | import simpy
import itertools
import numpy as np
from RideSimulator.Driver import Driver
from RideSimulator.HexGrid import HexGrid
def get_spot_locations(width: int, height: int, interval: int) -> np.ndarray:
"""
:param width: width of the grid
:param height: height of the grid
:param interval: distan... | 41.70122 | 120 | 0.640445 | 5,819 | 0.850855 | 0 | 0 | 164 | 0.02398 | 0 | 0 | 2,525 | 0.369206 |
592751375bcd4d68f888638835a70c28a75cc554 | 427 | py | Python | template.py | imsofi/advent-of-code | 8ac1406cfee689d9da0302363eaee7c8fea5c722 | [
"0BSD"
] | null | null | null | template.py | imsofi/advent-of-code | 8ac1406cfee689d9da0302363eaee7c8fea5c722 | [
"0BSD"
] | null | null | null | template.py | imsofi/advent-of-code | 8ac1406cfee689d9da0302363eaee7c8fea5c722 | [
"0BSD"
] | null | null | null | """
Day $:
https://adventofcode.com/2021/day/$
"""
Data = list
def parse_file(path: str) -> Data:
with open(path) as f:
raw = f.read().splitlines()
data = raw
return data
def part_1(data: Data):
...
def part_2(data: Data):
...
def main():
data = parse_file("example.txt")
... | 12.558824 | 36 | 0.559719 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.210773 |
59276445280313e61b8b7bc4ae85576dc76c9f96 | 3,174 | py | Python | src/ReichardtDS8.py | smittal6/i3d | e347b5415f5665a6f25b644a3dda5dd32f01dbbb | [
"MIT"
] | null | null | null | src/ReichardtDS8.py | smittal6/i3d | e347b5415f5665a6f25b644a3dda5dd32f01dbbb | [
"MIT"
] | null | null | null | src/ReichardtDS8.py | smittal6/i3d | e347b5415f5665a6f25b644a3dda5dd32f01dbbb | [
"MIT"
] | null | null | null | import numpy as np
def Reichardt8(video, dirs=[0,1,2,3,4,5,6,7]):
'''
Returns a tuple of Reichardt-Hassenstein correlators in 8 directions
args:
video: Shape ~ [TimeSteps, H, W, 1]
'''
vp1, vm1 = Reichardt_vertical_2channels_Vectorized(video) #Directions 1, -1
vp3, vm3 = Reich... | 34.5 | 104 | 0.732199 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 970 | 0.305608 |
592904d4f5f76e99f9c27babc8743707b85f9a4e | 1,662 | py | Python | shopdrawing.py | Maxim-Kovalenko/turtle-graphics-programms | 768866f9b6658dc0933b0391387a6bdec64ad6ec | [
"Apache-2.0"
] | 1 | 2020-04-14T08:31:24.000Z | 2020-04-14T08:31:24.000Z | shopdrawing.py | Maxim-Kovalenko/turtle-graphics-programms | 768866f9b6658dc0933b0391387a6bdec64ad6ec | [
"Apache-2.0"
] | null | null | null | shopdrawing.py | Maxim-Kovalenko/turtle-graphics-programms | 768866f9b6658dc0933b0391387a6bdec64ad6ec | [
"Apache-2.0"
] | 1 | 2021-01-05T15:47:59.000Z | 2021-01-05T15:47:59.000Z | from turtle import *
coeficient = 0.5
speed(5)
def base():
fillcolor("#fae0bd")
begin_fill()
pencolor("#c8835c")
pensize(10 * coeficient)
penup()
backward(100 * coeficient)
pendown()
for i in range(0,2):
forward(300 * coeficient)
right(90)
fo... | 17.494737 | 34 | 0.527677 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.054152 |
592b099ed5239bc2e197e2c20d2d55bdd277f278 | 881 | py | Python | src/block_constants.py | cemulate/minecraft-hdl | a46da8d2a29aad9c2fc84037d677190c6db80dcd | [
"MIT"
] | 5 | 2015-09-11T04:13:01.000Z | 2021-11-17T14:35:28.000Z | src/block_constants.py | cemulate/minecraft-hdl | a46da8d2a29aad9c2fc84037d677190c6db80dcd | [
"MIT"
] | null | null | null | src/block_constants.py | cemulate/minecraft-hdl | a46da8d2a29aad9c2fc84037d677190c6db80dcd | [
"MIT"
] | 1 | 2021-03-15T17:31:27.000Z | 2021-03-15T17:31:27.000Z | REDSTONE = 55
REPEATER = 93
TORCH = 75
AIR = 0
GLASS = 20
SLAB = 44
DOUBLE_SLAB = 43
WOOL = 35
DIR_WEST_POS_Z = 0
DIR_NORTH_NEG_X = 1
DIR_EAST_NEG_Z = 2
DIR_SOUTH_POS_X = 3
TORCH_ON_GROUND = 5
TORCH_POINTING_POS_X = 1
TORCH_POINTING_NEG_X = 2
TORCH_POINTING_POS_Z = 3
TORCH_POINTING_NEG_Z = 4
STONE_SLAB_TOP = 8
DO... | 17.62 | 29 | 0.538025 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 120 | 0.136209 |
592b8f8cacb2754ab7e4528631c3f40cfdc1b7e7 | 4,973 | py | Python | qfc/dirhandler.py | akhilkedia/qfc | 101861bd2fb818564245249fc93f278752684b51 | [
"MIT"
] | null | null | null | qfc/dirhandler.py | akhilkedia/qfc | 101861bd2fb818564245249fc93f278752684b51 | [
"MIT"
] | null | null | null | qfc/dirhandler.py | akhilkedia/qfc | 101861bd2fb818564245249fc93f278752684b51 | [
"MIT"
] | null | null | null | import os
import subprocess
import sys
class CVSHandler():
""" Handler of CVS (fir, mercurial...) directories,
The main purpose of this class is to cache external cvs command output, and determine the appropriate files to yield when navigating to a subdirectory of a project.
This basically means th... | 42.87069 | 246 | 0.648904 | 4,041 | 0.812588 | 0 | 0 | 580 | 0.11663 | 0 | 0 | 1,998 | 0.40177 |
592c8f23fd0453baefac3223ac8d226123072b8f | 436 | py | Python | demo1/jsons.py | dollarkillerx/Python-Data-Analysis | f208d5ce9951e9fca2d084a89290100b7e543154 | [
"MIT"
] | null | null | null | demo1/jsons.py | dollarkillerx/Python-Data-Analysis | f208d5ce9951e9fca2d084a89290100b7e543154 | [
"MIT"
] | null | null | null | demo1/jsons.py | dollarkillerx/Python-Data-Analysis | f208d5ce9951e9fca2d084a89290100b7e543154 | [
"MIT"
] | null | null | null | import json
filename = "data.json"
mydata = {
"title":"我的测试数据",
"lesson":{
"python":"学习中",
'vue':"学习完毕",
"golang":"基本精通"
},
"games":{
"GAT":"一年没有玩了"
},
}
# 文件写入
with open(filename,'w',encoding="utf-8") as data:
# 数据,文件句柄,json缩进空格数
json.dump(mydata,data,inden... | 16.769231 | 49 | 0.538991 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 232 | 0.444444 |
592ca011fcc9c84fa4da0a8bde9dd4daf4629fd5 | 280 | py | Python | Scripts/malware_scan/classess/progress.py | Team-Zed-cf/Team-Zed | 662eee2948502fca0bdc477955db17e2d32f92aa | [
"MIT"
] | null | null | null | Scripts/malware_scan/classess/progress.py | Team-Zed-cf/Team-Zed | 662eee2948502fca0bdc477955db17e2d32f92aa | [
"MIT"
] | null | null | null | Scripts/malware_scan/classess/progress.py | Team-Zed-cf/Team-Zed | 662eee2948502fca0bdc477955db17e2d32f92aa | [
"MIT"
] | null | null | null | import progressbar, time
from .colors import *
# progress bar
def animated_marker():
widgets = ['In Process: ', progressbar.AnimatedMarker()]
bar = progressbar.ProgressBar(widgets=widgets).start()
for i in range(18):
time.sleep(0.1)
bar.update(i) | 28 | 61 | 0.660714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.1 |
593150e1f3c9a373acbf0b4f5ce7f05a49bde1de | 4,406 | py | Python | single_subject_workflow.py | tknapen/reward_np_analysis | 29bcc02d5acd23689dee7059ecb1607d2814cdf0 | [
"MIT"
] | null | null | null | single_subject_workflow.py | tknapen/reward_np_analysis | 29bcc02d5acd23689dee7059ecb1607d2814cdf0 | [
"MIT"
] | null | null | null | single_subject_workflow.py | tknapen/reward_np_analysis | 29bcc02d5acd23689dee7059ecb1607d2814cdf0 | [
"MIT"
] | null | null | null | # from nipype import config
# config.enable_debug_mode()
# Importing necessary packages
import os
import os.path as op
import glob
import json
import nipype
from nipype import config, logging
import matplotlib.pyplot as plt
import nipype.interfaces.fsl as fsl
import nipype.pipeline.engine as pe
import nipype.interfaces... | 40.422018 | 170 | 0.682705 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,322 | 0.300045 |
593382e994272402d7ed09a0a47388a40b5bfde8 | 3,692 | py | Python | thm.py | brenolf/k-flow | f2ab6e2e6aa09aad437acb2ef071257adc0464c1 | [
"Apache-2.0"
] | null | null | null | thm.py | brenolf/k-flow | f2ab6e2e6aa09aad437acb2ef071257adc0464c1 | [
"Apache-2.0"
] | null | null | null | thm.py | brenolf/k-flow | f2ab6e2e6aa09aad437acb2ef071257adc0464c1 | [
"Apache-2.0"
] | null | null | null | import sys
N = -1
G = None
H = None
vis = None
vis_aux = None
valence = None
flows = {}
answer = []
allowed_flows = {
3 : [-1, 1],
4 : [-1, 1, 2],
5 : [-1, 1, 2, -2]
}
def has_k_flow (graph):
global N, G, H, vis, valence, flows
G = graph
N = len(G)
H = [[0] * N for i in xrange(0, N)]
vis = [False] * N
... | 16.93578 | 83 | 0.597237 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 194 | 0.052546 |
5933bc9be206bb31b3b20546a2f728540ffb2f7a | 45,642 | py | Python | ms/MS/index.py | jcnelson/syndicate | 4837265be3e0aa18cdf4ee50316dbfc2d1f06e5b | [
"Apache-2.0"
] | 16 | 2015-01-02T15:39:04.000Z | 2016-03-17T06:38:46.000Z | ms/MS/index.py | jcnelson/syndicate | 4837265be3e0aa18cdf4ee50316dbfc2d1f06e5b | [
"Apache-2.0"
] | 37 | 2015-01-28T20:58:05.000Z | 2016-03-22T04:01:32.000Z | ms/MS/index.py | jcnelson/syndicate | 4837265be3e0aa18cdf4ee50316dbfc2d1f06e5b | [
"Apache-2.0"
] | 8 | 2015-04-08T02:26:03.000Z | 2016-03-04T05:56:24.000Z | #!/usr/bin/pyhon
"""
Copyright 2014 The Trustees of Princeton University
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 re... | 40.534636 | 267 | 0.619101 | 44,677 | 0.978857 | 20,772 | 0.455107 | 43,273 | 0.948096 | 0 | 0 | 13,769 | 0.301674 |
59346b4914120bc35ba05709bdea9720cdc9dfbc | 3,009 | py | Python | tests/test_utils.py | caseygrun/plates | 156069487560d0c72f080f7e45a4dc2ae7a466ac | [
"MIT"
] | null | null | null | tests/test_utils.py | caseygrun/plates | 156069487560d0c72f080f7e45a4dc2ae7a466ac | [
"MIT"
] | null | null | null | tests/test_utils.py | caseygrun/plates | 156069487560d0c72f080f7e45a4dc2ae7a466ac | [
"MIT"
] | null | null | null | from microplates.utils import *
def test_itertuples():
assert list(itertuples((0,0),(0,2))) == [(0,0),(0,1),(0,2)]
assert list(itertuples((1,0),(2,0))) == [(1,0),(2,0)]
assert list(itertuples((1,0),(2,1))) == [(1,0),(1,1),(2,0),(2,1)]
assert list(itertuples((1,0),(2,1), by='column')) == [(1,0),(2,0),(1... | 38.576923 | 123 | 0.580592 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 553 | 0.183782 |
593527dd9bb90c5f584c18500adffe54b948dd13 | 1,066 | py | Python | example.py | train255/deep-speaker | d63b111b904faab34fe58637b3d0e7fd188e1b36 | [
"MIT"
] | 3 | 2021-08-20T16:40:09.000Z | 2022-02-08T23:17:52.000Z | example.py | train255/deep-speaker | d63b111b904faab34fe58637b3d0e7fd188e1b36 | [
"MIT"
] | 1 | 2022-03-22T04:16:15.000Z | 2022-03-22T04:26:03.000Z | example.py | train255/deep-speaker | d63b111b904faab34fe58637b3d0e7fd188e1b36 | [
"MIT"
] | 1 | 2020-11-06T08:07:27.000Z | 2020-11-06T08:07:27.000Z | import numpy as np
import random
from audio import read_mfcc
from batcher import sample_from_mfcc
from constants import SAMPLE_RATE, NUM_FRAMES
from conv_models import DeepSpeakerModel
from test import batch_cosine_similarity
np.random.seed(123)
random.seed(123)
model = DeepSpeakerModel()
model.m.load_weights('/Users... | 41 | 117 | 0.827392 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 225 | 0.211069 |
59373033d6759f87ac888baaf5e7fad69fe7d8fc | 135,252 | py | Python | pychunkedgraph/tests/test.py | perlman/PyChunkedGraph | 2c582f46a8292010e8f9f54c94c63af0b172bdad | [
"MIT"
] | null | null | null | pychunkedgraph/tests/test.py | perlman/PyChunkedGraph | 2c582f46a8292010e8f9f54c94c63af0b172bdad | [
"MIT"
] | null | null | null | pychunkedgraph/tests/test.py | perlman/PyChunkedGraph | 2c582f46a8292010e8f9f54c94c63af0b172bdad | [
"MIT"
] | null | null | null | import sys
import os
import subprocess
import pytest
import numpy as np
from functools import partial
import collections
from grpc._channel import _Rendezvous
from google.cloud import bigtable
from google.auth import credentials
from math import inf
from datetime import datetime, timedelta
from time import sleep
from s... | 45.863683 | 162 | 0.555526 | 132,284 | 0.94341 | 0 | 0 | 133,032 | 0.948744 | 0 | 0 | 27,177 | 0.193818 |
593862c08f86b1ec3350fd994c6a0a23e0d407ad | 202 | py | Python | remote_works/graphql/delivery/resolvers.py | tetyanaloskutova/saleor | b3bb51e9c0c4c2febf4aa1e2a7d893e77c331e89 | [
"BSD-3-Clause"
] | 7 | 2019-05-17T14:27:13.000Z | 2021-12-17T22:52:40.000Z | remote_works/graphql/delivery/resolvers.py | tetyanaloskutova/saleor | b3bb51e9c0c4c2febf4aa1e2a7d893e77c331e89 | [
"BSD-3-Clause"
] | 9 | 2019-04-13T09:24:28.000Z | 2019-09-09T15:35:05.000Z | remote_works/graphql/delivery/resolvers.py | tetyanaloskutova/remote-works | b3bb51e9c0c4c2febf4aa1e2a7d893e77c331e89 | [
"BSD-3-Clause"
] | null | null | null | import graphene_django_optimizer as gql_optimizer
from ...delivery import models
def resolve_delivery_zones(info):
qs = models.DeliveryZone.objects.all()
return gql_optimizer.query(qs, info)
| 22.444444 | 49 | 0.787129 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
593db3c128dcad16c4059d93406558fd51b30469 | 5,617 | py | Python | wark.py | rcorre/wark | fe4fe4789cb63bb2738265c3a008dc3dadb8ddaa | [
"MIT"
] | 1 | 2017-05-24T00:25:39.000Z | 2017-05-24T00:25:39.000Z | wark.py | rcorre/wark | fe4fe4789cb63bb2738265c3a008dc3dadb8ddaa | [
"MIT"
] | null | null | null | wark.py | rcorre/wark | fe4fe4789cb63bb2738265c3a008dc3dadb8ddaa | [
"MIT"
] | null | null | null | import os
import json
import uuid
import shlex
import weechat
import requests
from ciscosparkapi import CiscoSparkAPI
from ws4py.client.threadedclient import WebSocketClient
SCRIPT_NAME = "spark"
FULL_NAME = "plugins.var.python.{}".format(SCRIPT_NAME)
SPARK_SOCKET_URL = 'https://wdm-a.wbx2.com/wdm/api/v1/devices'
... | 28.226131 | 79 | 0.590707 | 2,874 | 0.511661 | 0 | 0 | 0 | 0 | 0 | 0 | 1,801 | 0.320634 |
593e946792eaa8675d0ba0dfd7b0ef6bf054d411 | 1,869 | py | Python | src/app.py | jqueguiner/text-to-speech-as-a-service | b66b1593a6c669c77edadb38939de30e82e46425 | [
"MIT"
] | 3 | 2020-03-19T09:49:49.000Z | 2020-03-30T14:18:00.000Z | src/app.py | jqueguiner/text-to-speech-as-a-service | b66b1593a6c669c77edadb38939de30e82e46425 | [
"MIT"
] | 2 | 2021-09-28T01:12:37.000Z | 2022-02-26T06:54:04.000Z | src/app.py | jqueguiner/text-to-speech-as-a-service | b66b1593a6c669c77edadb38939de30e82e46425 | [
"MIT"
] | null | null | null | import os
import sys
import subprocess
import requests
import ssl
import random
import string
import json
from flask import jsonify
from flask import Flask
from flask import request
from flask import send_file
import traceback
from uuid import uuid4
from notebook_utils.synthesize import *
try: # Python 3.5+
f... | 21.238636 | 82 | 0.687533 | 0 | 0 | 0 | 0 | 531 | 0.284109 | 0 | 0 | 240 | 0.128411 |
593ea1a84d21ae7ff3a90ce0dfc4e0f0d6b66ac7 | 4,728 | py | Python | Leander_Stephen_D'Souza/Joystick/Joystick_Motor_Code_using_PWM_library.py | leander-dsouza/MRM-Tenure | 3f372ffeeb12b04f4c5c636235db61725d47c3c6 | [
"MIT"
] | 2 | 2020-08-26T04:01:03.000Z | 2020-09-11T05:21:32.000Z | Leander_Stephen_D'Souza/Joystick/Joystick_Motor_Code_using_PWM_library.py | leander-dsouza/MRM-Tenure | 3f372ffeeb12b04f4c5c636235db61725d47c3c6 | [
"MIT"
] | null | null | null | Leander_Stephen_D'Souza/Joystick/Joystick_Motor_Code_using_PWM_library.py | leander-dsouza/MRM-Tenure | 3f372ffeeb12b04f4c5c636235db61725d47c3c6 | [
"MIT"
] | null | null | null | import RPi.GPIO as GPIO
import time
import pygame
from pygame import locals
import pygame.display
GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)
speedA = 0.000
speedB = 0.000
x = 512.00
y = 512.00
# frequency=100Hz
t_on = 0.00
t_off = 0.00
ledpin1 =35 # left_fwd
ledpin2 =36 # right_fwd
l... | 27.172414 | 78 | 0.556684 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 305 | 0.064509 |
593f2fd2545bc28f967b04b9e6d7e99629ac3a94 | 8,548 | py | Python | rest_helpers/type_serializers.py | WillFr/restlax | ec47617d915094137077f641427976f04acd8d47 | [
"Apache-2.0"
] | 1 | 2019-07-03T16:29:05.000Z | 2019-07-03T16:29:05.000Z | rest_helpers/type_serializers.py | WillFr/restlax | ec47617d915094137077f641427976f04acd8d47 | [
"Apache-2.0"
] | null | null | null | rest_helpers/type_serializers.py | WillFr/restlax | ec47617d915094137077f641427976f04acd8d47 | [
"Apache-2.0"
] | null | null | null | """
This module contains functions that are geared toward serializing objects,
in particular JSON API objects.
"""
import decimal
from collections import Iterable
from rest_helpers.jsonapi_objects import Resource, Response, Link, JsonApiObject, Relationship
def to_jsonable(obj, no_empty_field=False, is_private=None):... | 33.786561 | 168 | 0.681797 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,370 | 0.511231 |
59424eac730e7540dbabc57af91b0ddacf577089 | 458 | py | Python | hackerearth/Algorithms/Fredo and Sums/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | 4 | 2020-07-24T01:59:50.000Z | 2021-07-24T15:14:08.000Z | hackerearth/Algorithms/Fredo and Sums/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | hackerearth/Algorithms/Fredo and Sums/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | """
# Sample code to perform I/O:
name = input() # Reading input from STDIN
print('Hi, %s.' % name) # Writing output to STDOUT
# Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
"""
# Write your code here
t = int(input())
for _ in range(t):
n =... | 28.625 | 94 | 0.576419 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 274 | 0.598253 |
5942ff8661f94ed3c33e9cd05d6389cd70d923f4 | 1,753 | py | Python | Wizard Battle App/wizardbattle.py | rayjustinhuang/PythonApps | ba5572fbff38de71f806558c5d0be5827962aebb | [
"MIT"
] | null | null | null | Wizard Battle App/wizardbattle.py | rayjustinhuang/PythonApps | ba5572fbff38de71f806558c5d0be5827962aebb | [
"MIT"
] | null | null | null | Wizard Battle App/wizardbattle.py | rayjustinhuang/PythonApps | ba5572fbff38de71f806558c5d0be5827962aebb | [
"MIT"
] | null | null | null | import random
import time
from characters import Wizard, Creature
def main():
game_header()
game_loop()
def game_header():
print('------------------------------')
print(' WIZARD TEXT GAME APP')
print('------------------------------')
def game_loop():
creatures = [
Creature('T... | 25.405797 | 84 | 0.50599 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 599 | 0.3417 |
5943869d3d4d2e30ae0802900ea733c4c32ec043 | 2,581 | py | Python | xmastreegame/ThreadedTree.py | martinohanlon/GPIOXmasTreeGame | 0d32ff7ca4fe3c2b536f5fa4490d09c1caf54b3a | [
"MIT"
] | 2 | 2015-01-21T22:13:53.000Z | 2017-12-13T17:57:37.000Z | xmastreegame/ThreadedTree.py | martinohanlon/GPIOXmasTreeGame | 0d32ff7ca4fe3c2b536f5fa4490d09c1caf54b3a | [
"MIT"
] | null | null | null | xmastreegame/ThreadedTree.py | martinohanlon/GPIOXmasTreeGame | 0d32ff7ca4fe3c2b536f5fa4490d09c1caf54b3a | [
"MIT"
] | null | null | null |
import threading
from time import sleep
import RPi.GPIO as GPIO
illumination_time_default = 0.001
class XmasTree(threading.Thread):
#Pins
#Model B+ or A+
#A, B, C, D = 21, 19, 26, 20
#Other model, probably Model A or Model B
#A, B, C, D = 7, 9, 11, 8
def __init__(self, A = 21,B = ... | 25.058252 | 62 | 0.533514 | 2,100 | 0.813638 | 0 | 0 | 0 | 0 | 0 | 0 | 553 | 0.214258 |
59445fc42f57f15739274fff9371a3ae622d87a7 | 1,962 | py | Python | cap7/ex5.py | felipesch92/livroPython | 061b1c095c3ec2d25fb1d5fdfbf9e9dbe10b3307 | [
"MIT"
] | null | null | null | cap7/ex5.py | felipesch92/livroPython | 061b1c095c3ec2d25fb1d5fdfbf9e9dbe10b3307 | [
"MIT"
] | null | null | null | cap7/ex5.py | felipesch92/livroPython | 061b1c095c3ec2d25fb1d5fdfbf9e9dbe10b3307 | [
"MIT"
] | null | null | null | jogo = [[], [], []], [[], [], []], [[], [], []]
cont = 0
contx = conto = contxc = contoc = 0
while True:
l = int(input('Informe a linha: '))
c = int(input('Informe a coluna: '))
if l < 4 and c < 4:
if cont % 2 == 0:
jogo[l-1][c-1] = 'X'
else:
jogo[l-1][c-1] = 'O'
... | 35.035714 | 77 | 0.35474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 257 | 0.130391 |
5944d36b482e6230d5854a8d2998c95179d5d03e | 23,625 | py | Python | lib/intercom_test/framework.py | rtweeks/intercom_test | a682088af93d280297764b639f4727ec4716673f | [
"Apache-2.0"
] | null | null | null | lib/intercom_test/framework.py | rtweeks/intercom_test | a682088af93d280297764b639f4727ec4716673f | [
"Apache-2.0"
] | null | null | null | lib/intercom_test/framework.py | rtweeks/intercom_test | a682088af93d280297764b639f4727ec4716673f | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 PayTrace, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 40.247019 | 132 | 0.634201 | 21,216 | 0.898032 | 6,315 | 0.267302 | 1,970 | 0.083386 | 0 | 0 | 9,349 | 0.395725 |
5945f3b8e933ce01f957d7f582aa80cb9b902687 | 1,283 | py | Python | 2020/03/day3.py | AlbertVeli/AdventOfCode | 3d3473695318a0686fac720a1a21dd3629f09e33 | [
"Unlicense"
] | null | null | null | 2020/03/day3.py | AlbertVeli/AdventOfCode | 3d3473695318a0686fac720a1a21dd3629f09e33 | [
"Unlicense"
] | null | null | null | 2020/03/day3.py | AlbertVeli/AdventOfCode | 3d3473695318a0686fac720a1a21dd3629f09e33 | [
"Unlicense"
] | 1 | 2021-12-04T10:37:09.000Z | 2021-12-04T10:37:09.000Z | #!/usr/bin/env python3
# Day 3, with some speed optimizations
# Not really necessary for day 3, but probably later
import sys
import typing
import array
if len(sys.argv) != 2:
print('Usage:', sys.argv[0], '<input.txt>')
sys.exit(1)
width = 0
heigth = 0
# Use 1-d array of bytes to keep pixels
def read_input... | 18.070423 | 52 | 0.533125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 254 | 0.197973 |
59470f4e50387be73fea566efd45c232849a6813 | 226 | py | Python | Introduction to Computer Science and Programing Using Python/Exercises/Week 2 - Function, Strings and Alogorithms/Bisection Search.py | Dittz/Learning_Python | 4c0c97075ef5e1717f82e2cf24b0587f0c8504f5 | [
"MIT"
] | null | null | null | Introduction to Computer Science and Programing Using Python/Exercises/Week 2 - Function, Strings and Alogorithms/Bisection Search.py | Dittz/Learning_Python | 4c0c97075ef5e1717f82e2cf24b0587f0c8504f5 | [
"MIT"
] | null | null | null | Introduction to Computer Science and Programing Using Python/Exercises/Week 2 - Function, Strings and Alogorithms/Bisection Search.py | Dittz/Learning_Python | 4c0c97075ef5e1717f82e2cf24b0587f0c8504f5 | [
"MIT"
] | null | null | null | x = 23
epsilon = 0.001
guess = x/2
tries = 0
while abs(guess**2- x) >= epsilon:
if guess**2 > x:
guess /=2
else:
guess *=1.5
tries +=1
print(f'Number of tries: {tries}')
print(f'Guess = {guess}')
| 15.066667 | 34 | 0.535398 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.199115 |
5949927fb2326eb76fbf268aa983df1f7b22c9a8 | 6,223 | py | Python | SB_Admin_2/templates/dashboard.py | Softyy/sb-admin-2-dash | c57d46fd7f1703696fdd96a7b834beb32ab8a4aa | [
"MIT"
] | null | null | null | SB_Admin_2/templates/dashboard.py | Softyy/sb-admin-2-dash | c57d46fd7f1703696fdd96a7b834beb32ab8a4aa | [
"MIT"
] | null | null | null | SB_Admin_2/templates/dashboard.py | Softyy/sb-admin-2-dash | c57d46fd7f1703696fdd96a7b834beb32ab8a4aa | [
"MIT"
] | null | null | null | import dash_core_components as dcc
import dash_html_components as html
from .layouts.info_card import render as info_card
from .layouts.graph_wrapper import render as graph_wrapper
from .layouts.project_bar import render as project_bar
from .layouts.color_card import render as color_card
from ..data_retrievers.dummy ... | 44.134752 | 248 | 0.415877 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,699 | 0.273019 |
594b9e391b71aa4e58f65f8b436f15f1fdaebd0a | 2,440 | py | Python | tests/unit/test_refresh_utils.py | anukaal/cloud-sql-python-connector | e8799c7de46dbe11a91a9a29173a5cfd279a561d | [
"Apache-2.0"
] | null | null | null | tests/unit/test_refresh_utils.py | anukaal/cloud-sql-python-connector | e8799c7de46dbe11a91a9a29173a5cfd279a561d | [
"Apache-2.0"
] | null | null | null | tests/unit/test_refresh_utils.py | anukaal/cloud-sql-python-connector | e8799c7de46dbe11a91a9a29173a5cfd279a561d | [
"Apache-2.0"
] | null | null | null | """"
Copyright 2021 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dis... | 30.123457 | 84 | 0.690164 | 0 | 0 | 0 | 0 | 1,623 | 0.665164 | 1,581 | 0.647951 | 1,112 | 0.455738 |
594bfb1a451c5278cb6eb0568922591b031e3438 | 105 | py | Python | office365/sharepoint/search/query/popularTenantQuery.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | 544 | 2016-08-04T17:10:16.000Z | 2022-03-31T07:17:20.000Z | office365/sharepoint/search/query/popularTenantQuery.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | 438 | 2016-10-11T12:24:22.000Z | 2022-03-31T19:30:35.000Z | office365/sharepoint/search/query/popularTenantQuery.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | 202 | 2016-08-22T19:29:40.000Z | 2022-03-30T20:26:15.000Z | from office365.runtime.client_value import ClientValue
class PopularTenantQuery(ClientValue):
pass
| 17.5 | 54 | 0.828571 | 47 | 0.447619 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
594c04608e796ac9b1ce2395563d5fd38205ff2d | 1,320 | py | Python | blog/urls.py | MaryamKia/blog | 5274fda9fa67d20f48b0554bd9659f54221ae423 | [
"MIT"
] | null | null | null | blog/urls.py | MaryamKia/blog | 5274fda9fa67d20f48b0554bd9659f54221ae423 | [
"MIT"
] | 10 | 2020-02-12T00:42:03.000Z | 2022-01-13T01:20:37.000Z | blog/urls.py | PilaPont/blog | 61eb5cf30fe9937b4d0c85eb319854946df69a27 | [
"MIT"
] | null | null | null | """blog URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based... | 42.580645 | 96 | 0.696212 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 901 | 0.682576 |