hexsha stringlengths 40 40 | size int64 6 782k | ext stringclasses 7
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 6 72 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses list | max_stars_count int64 1 53k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 184 | max_issues_repo_name stringlengths 6 72 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses list | max_issues_count int64 1 27.1k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 184 | max_forks_repo_name stringlengths 6 72 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses list | max_forks_count int64 1 12.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 6 782k | avg_line_length float64 2.75 664k | max_line_length int64 5 782k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
52e7f0850007ce66c96b38faa20e4b6c569e9279 | 833 | py | Python | script/sync_local.py | xephonhq/xephon-b | 83006c4fb65746b14078cf9fa166e06ed518a567 | [
"MIT"
] | 9 | 2016-10-18T02:29:59.000Z | 2019-07-17T16:59:22.000Z | script/sync_local.py | xephonhq/xephon-b | 83006c4fb65746b14078cf9fa166e06ed518a567 | [
"MIT"
] | 45 | 2016-10-22T00:53:32.000Z | 2020-01-19T00:29:37.000Z | script/sync_local.py | xephonhq/xephon-b | 83006c4fb65746b14078cf9fa166e06ed518a567 | [
"MIT"
] | 3 | 2016-12-06T18:24:48.000Z | 2018-03-23T03:40:12.000Z | #!/usr/bin/env python3
import os
from shutil import copytree, ignore_patterns, rmtree
# hack use latest libtsdb-go
def copy_to_vendor(src_repo, dst_repo):
"""
src_repo: github.com/dyweb/gommon
dst_repo: github.com/benchhub/benchboard/agent
"""
gopath = os.getenv('GOPATH')
print('gopath is', ... | 27.766667 | 59 | 0.647059 |
5e09a53bba4793b9e3e2182c01ea9582aeee738c | 60,176 | py | Python | research/cvtmodel/resnest/src/resnest50.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cvtmodel/resnest/src/resnest50.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cvtmodel/resnest/src/resnest50.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | import mindspore.ops as P
from mindspore import nn
class Module5(nn.Cell):
def __init__(self, conv2d_0_in_channels, conv2d_0_out_channels, conv2d_0_kernel_size, conv2d_0_padding,
conv2d_0_pad_mode, conv2d_0_group):
super(Module5, self).__init__()
self.conv2d_0 = nn.Conv2d(in_chann... | 59.2867 | 119 | 0.524329 |
eaadaebfdbcf2dc44a81fa6646b2b360db9d9008 | 2,023 | py | Python | tests/unit/filters/test_kdtree_filters.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 1,142 | 2016-10-10T08:55:30.000Z | 2022-03-30T04:46:16.000Z | tests/unit/filters/test_kdtree_filters.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 195 | 2016-10-10T08:30:37.000Z | 2022-02-17T12:51:17.000Z | tests/unit/filters/test_kdtree_filters.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 215 | 2017-02-28T00:50:29.000Z | 2022-03-22T17:01:31.000Z | import pytest
from numpy.testing import assert_array_equal
from pyntcloud.filters.kdtree import (
KDTreeFilter,
RadiusOutlierRemovalFilter,
StatisticalOutlierRemovalFilter
)
@pytest.mark.parametrize("kdtree_id", [
"FOO",
"K",
"K(10)",
"K(16",
"K16)",
"K16"
])
@pytest.mark.usefixtu... | 25.935897 | 105 | 0.681661 |
eaf7114f240def28f68c4c1733b7e841f3e1e658 | 2,032 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_13_Arbeiten_mit_Word_und_PDF_Dokumenten/08_docx_in_datei_schreiben/08_docx_in_datei_schreiben.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_13_Arbeiten_mit_Word_und_PDF_Dokumenten/08_docx_in_datei_schreiben/08_docx_in_datei_schreiben.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_13_Arbeiten_mit_Word_und_PDF_Dokumenten/08_docx_in_datei_schreiben/08_docx_in_datei_schreiben.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # 08_docx_in_datei_schreiben.py
# In diesem Beispielscript geht es darum einen Beliebigen String in ein Word-Dokument zu 08_docx_in_datei_schreiben
import os, docx
from docx.enum.text import WD_BREAK_TYPE
os.chdir(os.path.dirname(__file__))
target_file='.\\hello_world.docx'
if os.path.exists(target_file):
os.remo... | 46.181818 | 266 | 0.793307 |
f4cac8377b27577730fd773f76742d333ffeff91 | 8,360 | py | Python | verto/processors/ConditionalProcessor.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 4 | 2017-04-10T06:09:54.000Z | 2019-05-04T02:07:40.000Z | verto/processors/ConditionalProcessor.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 268 | 2017-04-03T20:40:46.000Z | 2022-02-04T20:10:08.000Z | verto/processors/ConditionalProcessor.py | uccser/kordac | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 1 | 2019-01-07T15:46:31.000Z | 2019-01-07T15:46:31.000Z | from markdown.blockprocessors import BlockProcessor
from verto.errors.TagNotMatchedError import TagNotMatchedError
from verto.processors.utils import etree, parse_arguments, blocks_to_string
from verto.utils.HtmlParser import HtmlParser
from verto.utils.HtmlSerializer import HtmlSerializer
from collections import Order... | 38.703704 | 111 | 0.624163 |
f4dc98b35c6b0b984482605607d5fecfdf14f2e7 | 4,535 | py | Python | Python/pyBitwiseAutomation/AutomationExtender.py | jimwaschura/Automation | f655feeea74ff22ebe44d8b68374ba6983748f60 | [
"BSL-1.0"
] | null | null | null | Python/pyBitwiseAutomation/AutomationExtender.py | jimwaschura/Automation | f655feeea74ff22ebe44d8b68374ba6983748f60 | [
"BSL-1.0"
] | null | null | null | Python/pyBitwiseAutomation/AutomationExtender.py | jimwaschura/Automation | f655feeea74ff22ebe44d8b68374ba6983748f60 | [
"BSL-1.0"
] | null | null | null | # AutomationExtender.py
# ================================================================================
# BOOST SOFTWARE LICENSE
#
# Copyright 2020 BitWise Laboratories Inc.
# Original Author.......Jim Waschura
# Contact...............info@bitwiselabs.com
#
# Permission is hereby granted, free of charge, to any pers... | 44.029126 | 101 | 0.731422 |
bff9ebfd6c6590c66d76e8e524844fe7410fb89b | 1,619 | py | Python | Packs/GsuiteAuditor/Integrations/GsuiteAuditor/GsuiteAuditor_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/GsuiteAuditor/Integrations/GsuiteAuditor/GsuiteAuditor_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/GsuiteAuditor/Integrations/GsuiteAuditor/GsuiteAuditor_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
import io
import pytest
from GsuiteAuditor import GSuiteClient, activities_list_command
MOCKER_HTTP_METHOD = 'GSuiteApiModule.GSuiteClient.http_request'
with open('test_data/service_account_json.txt') as j:
TEST_JSON = j.read()
@pytest.fixture
def gsuite_client():
headers = {
'Content-... | 29.981481 | 118 | 0.73008 |
5e8dfa9d0de30a7386a336407e5bc8998448fd66 | 4,573 | py | Python | bp-revok/caroline/modules/creep/creep.py | fkolacek/FIT-VUT | bb6f7f6eb1fea1f13952e0ab463e5aa69a84084c | [
"Apache-2.0"
] | null | null | null | bp-revok/caroline/modules/creep/creep.py | fkolacek/FIT-VUT | bb6f7f6eb1fea1f13952e0ab463e5aa69a84084c | [
"Apache-2.0"
] | null | null | null | bp-revok/caroline/modules/creep/creep.py | fkolacek/FIT-VUT | bb6f7f6eb1fea1f13952e0ab463e5aa69a84084c | [
"Apache-2.0"
] | 3 | 2017-04-07T12:02:22.000Z | 2020-03-23T12:11:55.000Z | import json
import os
import signal
import sys
from threading import Lock
import time
import urllib
import traceback
import re
confirmation = 'a274bda9c14e'
print >> sys.stderr, os.getpid()
interrupted = [False]
closing = [False]
report_lock = Lock()
reqs = {}
rsps = {}
cookie = [[""]]
def handler(signum, frame):
... | 26.74269 | 242 | 0.641592 |
0d59dfc9c6744790a28f24f8ef3d81a123313f28 | 4,012 | py | Python | cs/lambda_cs/05_hash_tables_and_blockchain/Hash-Tables/notes/hashtable_brady.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | cs/lambda_cs/05_hash_tables_and_blockchain/Hash-Tables/notes/hashtable_brady.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | cs/lambda_cs/05_hash_tables_and_blockchain/Hash-Tables/notes/hashtable_brady.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | # '''
# Linked List hash table key/value pair
# '''
class LinkedPair:
def __init__(self, key, value):
self.key = key
self.value = value
self.next = None
def __repr__(self):
return f"<{self.key}, {self.value}>"
class HashTable:
'''
A hash table that with `capacity` bucket... | 26.051948 | 92 | 0.57677 |
21e2f0e5ef4de89a9ab1e890c64e62d1b7da3e6c | 516 | py | Python | src/bo4e/enum/bilanzierungsmethode.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/enum/bilanzierungsmethode.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/enum/bilanzierungsmethode.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | # pylint: disable=missing-module-docstring
from bo4e.enum.strenum import StrEnum
class Bilanzierungsmethode(StrEnum):
"""
Mit dieser Aufzählung kann zwischen den Bilanzierungsmethoden bzw. -grundlagen unterschieden werden.
"""
RLM = "RLM" #: Registrierende Leistungsmessung
SLP = "SLP" #: Standa... | 34.4 | 104 | 0.726744 |
10f98d58754ce9fb08ef30a25659d7bd6b3a11ae | 46,298 | py | Python | api/api.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 6 | 2018-06-27T00:09:55.000Z | 2019-03-07T14:06:53.000Z | api/api.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2021-03-31T18:37:46.000Z | 2021-06-01T21:49:41.000Z | api/api.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2020-01-24T16:40:49.000Z | 2021-09-30T02:28:55.000Z | import os, sys, traceback
import time, datetime, calendar
import asyncio
import copy
import functools
import logging
import json
import pytz
import data_example
import dashan_query as query
from utils import explain
from aiohttp import web
from aiohttp.web import Response, json_response
from aiocache import LRUMemory... | 45.568898 | 220 | 0.61696 |
986c8485b9beb6ecaa03a3671868d43bd02b9780 | 2,202 | py | Python | tarefas-poo/lista-03/navio/model/navio.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-03/navio/model/navio.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-03/navio/model/navio.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5603
# Exercício do Navio
# --------------------------
# Classe que representa um navio.
#
from model.container import Container
class Navio:
def __init__(self, qtd_max_containers, peso_maximo):
'''Um navio aceita uma quantidade máxima de containers e s... | 34.40625 | 110 | 0.630336 |
7fb99eed1726e43b37794a003278677fd3bbe7e3 | 3,002 | py | Python | tests/web.adblockplus.org/data/dataDownloadButton.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 9 | 2016-01-29T18:05:29.000Z | 2021-10-06T04:21:55.000Z | tests/web.adblockplus.org/data/dataDownloadButton.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 9 | 2015-04-06T19:03:32.000Z | 2019-05-28T13:34:55.000Z | tests/web.adblockplus.org/data/dataDownloadButton.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 18 | 2015-04-06T17:42:31.000Z | 2021-10-06T04:26:29.000Z | TEST_DATA = [(
'desktop_chrome',
'GET ADBLOCK PLUS FOR CHROME',
'https://eyeo.to/adblockplus/chrome_install/index',
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 '
'(KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',
'https://chrome.google.com/webstore/deta... | 49.213115 | 115 | 0.656562 |
f68d335aec23b4016d5b88453cfb1fbdd2de46ec | 184 | py | Python | Problems/Dynamic Programming/Easy/CountingBit/count_bit.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Dynamic Programming/Easy/CountingBit/count_bit.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Dynamic Programming/Easy/CountingBit/count_bit.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from typing import List
def countBits(n: int) -> List[int]:
ans = [0 for _ in range(n + 1)]
for num in range(n + 1):
ans[num] = ans[num >> 1] + num % 2
return ans | 23 | 42 | 0.548913 |
1006518a0026030f5790f6964c0dc7f9abbe1e28 | 616 | py | Python | luechenbresse/ard-tagesschau.py | turkishmaid/luechenbresse | 2527b19eb2f961cef5ddb62e816b471e5d04847d | [
"MIT"
] | null | null | null | luechenbresse/ard-tagesschau.py | turkishmaid/luechenbresse | 2527b19eb2f961cef5ddb62e816b471e5d04847d | [
"MIT"
] | 4 | 2020-05-12T07:26:52.000Z | 2020-05-23T12:21:49.000Z | luechenbresse/ard-tagesschau.py | turkishmaid/luechenbresse | 2527b19eb2f961cef5ddb62e816b471e5d04847d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
"""
Special coding for the ard-tagesschau RSS feed.
We can re-think the exit-mechanism later (class/interface, whatever...).
Created: 10.05.20
"""
from datetime import datetime
from time import mktime
def parse_feed_header(feed_header):
return feed_header["title"], feed_hea... | 23.692308 | 83 | 0.715909 |
1019c6d9a50b7b3faa7f3bb81ed8848b761dd477 | 3,418 | py | Python | Packs/PhishUp/Integrations/PhishUp/PhishUp_test.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Packs/PhishUp/Integrations/PhishUp/PhishUp_test.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Packs/PhishUp/Integrations/PhishUp/PhishUp_test.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | import json
import io
from pytest import raises
MOCK_APIKEY = "not"
MOCK_PARAMS = {
"credentials": {
"password": MOCK_APIKEY
}
}
BASE_URL = "https://apiv2.phishup.co"
def util_load_json(path):
with io.open(path, mode='r', encoding='utf-8') as f:
return json.loads(f.read())
def test_in... | 35.237113 | 104 | 0.696021 |
c38b288d278907dca7a49f0661107d888c4ae7cd | 5,591 | py | Python | research/cv/SiamFC/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/SiamFC/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/SiamFC/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... | 42.037594 | 96 | 0.614917 |
c397f130bb59b798527749c4376809b857e85fda | 191 | py | Python | setup.py | jkopka/price_tracker | 370dd320a3d54a3bd955b62df337dfe87b58f7ee | [
"MIT"
] | null | null | null | setup.py | jkopka/price_tracker | 370dd320a3d54a3bd955b62df337dfe87b58f7ee | [
"MIT"
] | 2 | 2020-07-04T18:44:37.000Z | 2020-08-10T06:29:53.000Z | setup.py | jkopka/price_tracker | 370dd320a3d54a3bd955b62df337dfe87b58f7ee | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name="pricetracker",
packages=["pricetracker"],
include_package_data=True,
install_requires=["flask", "bs4", "requests", "matplotlib"],
)
| 21.222222 | 64 | 0.691099 |
4ee5066cb424039ccae0daf3bc4323c27341c458 | 8,501 | py | Python | examples/language_model/gpt-3/static/utils/fp16_util.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/language_model/gpt-3/static/utils/fp16_util.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/language_model/gpt-3/static/utils/fp16_util.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 45.459893 | 89 | 0.532643 |
141be069aebd6e3c36ce4b9401e8e86d64970a50 | 1,135 | py | Python | service/api/jsonhandler.py | netzbegruenung/schaufenster | c0860570cf6b46dc0fade9cef7562edd2fa7f3a0 | [
"Apache-2.0"
] | 1 | 2021-07-20T06:56:38.000Z | 2021-07-20T06:56:38.000Z | jsonhandler.py | netzbegruenung/green-spider-api | 294eae35b739ffa4715331eb7f2ddedddcd2f89c | [
"Apache-2.0"
] | 181 | 2019-12-10T07:02:43.000Z | 2022-03-31T12:09:39.000Z | jsonhandler.py | netzbegruenung/green-spider-api | 294eae35b739ffa4715331eb7f2ddedddcd2f89c | [
"Apache-2.0"
] | 2 | 2018-01-23T21:25:57.000Z | 2018-01-24T21:46:41.000Z | import six
from datetime import date, datetime
from falcon import errors
from falcon.media import BaseHandler
from falcon.util import json
class ComplexEncoder(json.JSONEncoder):
"""JSONENcoder that handles date and datetime"""
def default(self, obj):
if isinstance(obj, date) or isinstance(obj, dat... | 29.102564 | 63 | 0.611454 |
14758bb08684661640d0544920f15991848df4e7 | 1,028 | py | Python | display/topIcon.py | mattholy/PIX | 79c017a2b26a8d82e408061586cf12a2ea3161d8 | [
"MIT"
] | null | null | null | display/topIcon.py | mattholy/PIX | 79c017a2b26a8d82e408061586cf12a2ea3161d8 | [
"MIT"
] | null | null | null | display/topIcon.py | mattholy/PIX | 79c017a2b26a8d82e408061586cf12a2ea3161d8 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
import os
def network(myPage,pos):
myPage.pieslice((144-pos,2,178-pos,36),225,315,fill = 255)
return 30#图标宽度
def cpuLoad(myPage,pos):
myPage.rectangle((176-pos-20,2,176-pos,18),f... | 38.074074 | 99 | 0.65856 |
215d652b3e89d2c660845771438596f23a04c16a | 754 | py | Python | jumeaux/addons/log2reqs/yaml.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 11 | 2017-10-02T01:29:12.000Z | 2022-03-31T08:37:22.000Z | jumeaux/addons/log2reqs/yaml.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 79 | 2017-07-16T14:47:17.000Z | 2022-03-31T08:49:14.000Z | jumeaux/addons/log2reqs/yaml.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 2 | 2019-01-28T06:11:58.000Z | 2021-01-25T07:21:21.000Z | # -*- coding:utf-8 -*-
from owlmixin import OwlMixin
from owlmixin.owlcollections import TList
from jumeaux.addons.log2reqs import Log2ReqsExecutor
from jumeaux.models import Request, Log2ReqsAddOnPayload
class Config(OwlMixin):
encoding: str = 'utf8'
class Executor(Log2ReqsExecutor):
def __init__(self, c... | 26.928571 | 90 | 0.683024 |
2eba63b453c24932412b26e8b036f43844c057c7 | 1,642 | py | Python | wagtail_localize/test/migrations/0019_translation_component_model.py | th3hamm0r/wagtail-localize | e9e0ba9245060c65e3247b62739abbed71bc2516 | [
"BSD-3-Clause"
] | 6 | 2019-09-10T19:53:55.000Z | 2019-11-14T16:57:07.000Z | wagtail_localize/test/migrations/0019_translation_component_model.py | th3hamm0r/wagtail-localize | e9e0ba9245060c65e3247b62739abbed71bc2516 | [
"BSD-3-Clause"
] | 17 | 2019-07-11T11:17:37.000Z | 2019-11-19T16:40:31.000Z | wagtail_localize/test/migrations/0019_translation_component_model.py | th3hamm0r/wagtail-localize | e9e0ba9245060c65e3247b62739abbed71bc2516 | [
"BSD-3-Clause"
] | 2 | 2019-09-30T20:23:39.000Z | 2019-10-31T14:09:31.000Z | # Generated by Django 3.2.9 on 2021-11-21 15:06
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("wagtail_localize", "0015_translationcontext_field_path"),
("wagtail_localize_test", "0018_structblocks_with_choosers... | 30.407407 | 72 | 0.436054 |
9f0b8e4f6fb03265ea6c7ed08e7ee77e184d68cd | 463 | py | Python | unique BST.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | unique BST.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | unique BST.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
class Solution:
# @param {integer} n
# @return {integer}
def numTrees(self, n):
nlist=range(n+1)[1:]
return self.rec(nlist)
def rec(self,list):
sum=0
list=list[:]
#print list
if len(list)<=0:
return 1
for point in range(len(list)):
#list[:point],list[point:]
a=self.... | 14.46875 | 32 | 0.600432 |
4cf3bb224c458949307a7a034f486c9298fb69fd | 3,230 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v4_0/set_naming_series_property_setter.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v4_0/set_naming_series_property_setter.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v4_0/set_naming_series_property_setter.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import print_function, unicode_literals
import frappe
from frappe.custom.doctype.property_setter.property_setter import make_property_setter
doctype_series_map = {
'Attendan... | 32.959184 | 123 | 0.726316 |
e24af36ab1855916e8a21c725cabec0448adb5c4 | 341 | py | Python | exercises/es/solution_03_16_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/es/solution_03_16_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/es/solution_03_16_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
nlp = spacy.load("es_core_news_sm")
text = (
"Chick-fil-A es una cadena de restaurantes de comida rápida "
"americana con sede en la ciudad de College Park, Georgia, "
"especializada en sándwiches de pollo."
)
# Únicamente convierte el texto en tokens
doc = nlp.make_doc(text)
print([token.tex... | 26.230769 | 65 | 0.72434 |
2c7b330c38d59d94e0024213c1c0c542673b2d06 | 1,176 | py | Python | synchroload/plugins/github.py | rakennus/duraphilms.github.io | bdbecdfb55f4870b5ebf572cd2a7eb4e6770ea22 | [
"MIT"
] | 3 | 2020-07-08T08:58:46.000Z | 2020-12-01T20:23:30.000Z | synchroload/plugins/github.py | rakennus/duraphilms.github.io | bdbecdfb55f4870b5ebf572cd2a7eb4e6770ea22 | [
"MIT"
] | 1 | 2020-12-30T12:49:43.000Z | 2021-01-04T11:05:48.000Z | synchroload/plugins/github.py | rakennus/duraphilms.github.io | bdbecdfb55f4870b5ebf572cd2a7eb4e6770ea22 | [
"MIT"
] | 2 | 2018-06-21T17:45:11.000Z | 2020-12-30T00:30:45.000Z | import requests
import json
import os
import magic
HOSTER_NAME = "github"
HOSTER_HAS_DIRECT_LINKS = True
HOSTER_KEEP_UNAVAILABLE_UPLOADS = False
GITHUB_TOKEN = os.getenv("GITHUB_TOKEN", "")
GITHUB_OWNER = os.getenv("GITHUB_OWNER", "duramedia")
GITHUB_REPO = os.getenv("GITHUB_REPO", "synchro")
def upload(filename):
... | 25.565217 | 136 | 0.608844 |
2c8050da2f6d0de5d675d0288e4e9a0ae1df09dd | 651 | py | Python | benwaonline/entities/tag.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | null | null | null | benwaonline/entities/tag.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | 16 | 2017-09-13T10:21:40.000Z | 2020-06-01T04:32:22.000Z | benwaonline/entities/tag.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | null | null | null | from benwaonline.schemas import TagSchema
from benwaonline.entities import Entity
class Tag(Entity):
'''Represents a Tag resource object, related to the Tag model in the database
Attributes:
type_: 'Tag'
'''
_schema = 'TagSchema'
type_ = 'tag'
attrs = {
'post': 'posts'
}
... | 25.038462 | 85 | 0.614439 |
e2c94e429ef0da3d2bbeed95b25bb4398dc71faf | 3,148 | py | Python | RDS/circle3_central_services/research_manager/src/lib/Port.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 10 | 2020-06-24T08:22:24.000Z | 2022-01-13T16:17:36.000Z | RDS/circle3_central_services/research_manager/src/lib/Port.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 78 | 2020-01-23T14:32:06.000Z | 2022-03-07T14:11:16.000Z | RDS/circle3_central_services/research_manager/src/lib/Port.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 1 | 2020-06-24T08:33:48.000Z | 2020-06-24T08:33:48.000Z | class Port():
def __init__(self, portName, fileStorage=False, metadata=False, customProperties: list = None):
"""
This initialize the a port with a name, which has to start with "port-", so the rds system can access the portname as domain to the corresponding microservice.
fileStorage and m... | 32.122449 | 167 | 0.574333 |
1aba8ea808b3d1437b8e218e70462d0df1d7dc8e | 983 | py | Python | src/onegov/activity/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/activity/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/activity/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.activity.models.activity import Activity, ACTIVITY_STATES
from onegov.activity.models.attendee import Attendee
from onegov.activity.models.booking import Booking
from onegov.activity.models.invoice import Invoice
from onegov.activity.models.invoice_item import InvoiceItem
from onegov.activity.models.invoice... | 32.766667 | 73 | 0.78942 |
46c92affbb5f3a7f9f9eecd134667cf38301eb1d | 3,022 | py | Python | packages/watchmen-data-kernel/src/watchmen_data_kernel/storage/regular_data_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/storage/regular_data_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/storage/regular_data_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import Any, Dict, List, Optional
from watchmen_data_kernel.topic_schema import TopicSchema
from watchmen_model.admin import Factor, is_aggregation_topic
from watchmen_model.pipeline_kernel import TopicDataColumnNames
from watchmen_storage import ColumnNameLiteral, EntityCriteriaExpression, EntityRow, Entit... | 43.797101 | 107 | 0.807743 |
46ca13a759f95d95ffedf62718e13552174691b0 | 649 | py | Python | tools/pythonpkg/tests/fast/api/test_dbapi07.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 2,816 | 2018-06-26T18:52:52.000Z | 2021-04-06T10:39:15.000Z | tools/pythonpkg/tests/fast/api/test_dbapi07.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 1,310 | 2021-04-06T16:04:52.000Z | 2022-03-31T13:52:53.000Z | tools/pythonpkg/tests/fast/api/test_dbapi07.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 270 | 2021-04-09T06:18:28.000Z | 2022-03-31T11:55:37.000Z | # timestamp ms precision
import numpy
from datetime import datetime
class TestNumpyTimestampMilliseconds(object):
def test_numpy_timestamp(self, duckdb_cursor):
res = duckdb_cursor.execute("SELECT TIMESTAMP '2019-11-26 21:11:42.501' as test_time").fetchnumpy()
assert res['test_time'] == numpy.dat... | 40.5625 | 108 | 0.714946 |
8073632ac7433d937d9f868187798131edf4abd0 | 256 | py | Python | src/onegov/intranet/app.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/intranet/app.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/intranet/app.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.org import OrgApp
class IntranetApp(OrgApp):
def configure_organisation(self, **cfg):
cfg.setdefault('enable_user_registration', False)
cfg.setdefault('enable_yubikey', True)
super().configure_organisation(**cfg)
| 25.6 | 57 | 0.710938 |
ff057e1c9b24850594298ef3ce87ef25b942af85 | 7,916 | py | Python | src/server/db/UserMapper.py | ralfstefanbender/Studifix2 | 281c0a89ce56796437fe054068058c0f01a7df02 | [
"RSA-MD"
] | null | null | null | src/server/db/UserMapper.py | ralfstefanbender/Studifix2 | 281c0a89ce56796437fe054068058c0f01a7df02 | [
"RSA-MD"
] | null | null | null | src/server/db/UserMapper.py | ralfstefanbender/Studifix2 | 281c0a89ce56796437fe054068058c0f01a7df02 | [
"RSA-MD"
] | null | null | null | from server.bo.User import User
from server.db.Mapper import Mapper
class UserMapper (Mapper):
"""Mapper-Klasse, die User-Objekte auf eine relationale
Datenbank abbildet. Hierzu wird eine Reihe von Methoden zur Verfügung
gestellt, mit deren Hilfe z.B. Objekte gesucht, erzeugt, modifiziert und
gelöscht... | 33.82906 | 118 | 0.605988 |
207da1a4e66b69c376b0d6738076192099d819ee | 1,027 | py | Python | src/damage_calculator.py | tschibu/starthack-asimov | bbc6fe04986738c014fa4cbd02a7f9e23b8a9c29 | [
"MIT"
] | null | null | null | src/damage_calculator.py | tschibu/starthack-asimov | bbc6fe04986738c014fa4cbd02a7f9e23b8a9c29 | [
"MIT"
] | null | null | null | src/damage_calculator.py | tschibu/starthack-asimov | bbc6fe04986738c014fa4cbd02a7f9e23b8a9c29 | [
"MIT"
] | null | null | null | import numpy as np
import base64
import json
from helper import log_helper
#Definde Logger without Filehandle
logger = log_helper.get(False, "Data Parse")
class DataParser:
def calculate_damage(self, data_array):
"""Berechnet den schaden und gibt den Winkel, relativ zur Auto Mitte zurück, wo der Impact ... | 29.342857 | 103 | 0.665044 |
ffafa868ffe21dde66b5775d39e270bc22795000 | 219,689 | py | Python | Dark-Gold-Master/Dark.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Dark-Gold-Master/Dark.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Dark-Gold-Master/Dark.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #Udah Balek Kau Sana Anjing
#Password DumaiDmi
#https://github.com/Dumai-991/Dark-Gold
import marshal
exec(marshal.loads('c\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00@\x00\x00\x00s\xb8\x04\x00\x00d\x00\x00d\x01\x00l\x00\x00Z\x00\x00d\x00\x00d\x01\x00l\x01\x00Z\x01\x00d\x00\x00d\x01\x00l\x02\x00Z\x02\x00d\x00\x00d... | 31,384.142857 | 219,585 | 0.742795 |
923d340d55c4c0e6c52d1e3f72eb38ce64abf4a5 | 824 | py | Python | source/pkgsrc/devel/capstone/patches/patch-bindings_python_setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/devel/capstone/patches/patch-bindings_python_setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/devel/capstone/patches/patch-bindings_python_setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-bindings_python_setup.py,v 1.2 2020/08/18 20:20:46 riastradh Exp $
--- bindings/python/setup.py.orig 2020-05-08 10:03:30.000000000 +0000
+++ bindings/python/setup.py
@@ -140,14 +140,6 @@ def build_libraries():
# Do not build tests & static library
os.system('cmake -DCMAKE_BUILD_TYPE=RE... | 41.2 | 129 | 0.696602 |
a69cb1d86f2814c91d948afbbd2db4881022b5de | 1,438 | py | Python | controller/clock1s.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | 1 | 2021-06-15T08:59:02.000Z | 2021-06-15T08:59:02.000Z | controller/clock1s.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | controller/clock1s.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null |
# A 1 second timebase
# https://stackoverflow.com/questions/8600161/executing-periodic-actions-in-python
# https://medium.com/greedygame-engineering/an-elegant-way-to-run-periodic-tasks-in-python-61b7c477b679
import logging, threading, functools
import time
import conf
class PeriodicTimer(object):
def __init__... | 26.62963 | 103 | 0.619611 |
750d1ac2994bea71798a9b4173fbd0986fcb8a52 | 627 | py | Python | exercises/zh/test_04_11.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/zh/test_04_11.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/zh/test_04_11.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | def test():
assert [(ent.text, ent.label_) for ent in doc1.ents] == [
("西安", "GPE")
], "请再检查下第一个例子中的实体。"
assert [(ent.text, ent.label_) for ent in doc2.ents] == [
("巴黎", "GPE")
], "请再检查下第二个例子中的实体。"
assert [(ent.text, ent.label_) for ent in doc3.ents] == [
("深圳", "GPE"),
... | 29.857143 | 61 | 0.547049 |
f3635be92d70e75a5a7d6a71c9942401fc2145de | 2,237 | py | Python | scripts/file-management/ultrasonix-subsetter.py | jenniferxkuo/ultramisc | 65bff53c97715eb9a24acc62b77460f22e0dabc6 | [
"MIT"
] | null | null | null | scripts/file-management/ultrasonix-subsetter.py | jenniferxkuo/ultramisc | 65bff53c97715eb9a24acc62b77460f22e0dabc6 | [
"MIT"
] | null | null | null | scripts/file-management/ultrasonix-subsetter.py | jenniferxkuo/ultramisc | 65bff53c97715eb9a24acc62b77460f22e0dabc6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# subsetter.py: pick out a subset of acquisitions in an experiment directory.
# usage: python subsetter.py expdir
import os, sys, glob, shutil
import argparse
from ultratils.exp import Exp
def read_stimfile(stimfile):
with open(stimfile, "r") as stfile:
stim = stfile.read().rstrip('\n')
re... | 28.316456 | 133 | 0.675458 |
1b21c96b3a5dda3b556e9e5c95f2f01165572137 | 125 | py | Python | scripts/Pseudopython.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/Pseudopython.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/Pseudopython.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | 1 | 2019-10-24T06:45:21.000Z | 2019-10-24T06:45:21.000Z | // LANGUAGE: Python
// ENV: IDLE
// AUTHOR: Pseudogenesis
// GITHUB: https://github.com/pseudogenesis
print("Hello world~")
| 20.833333 | 44 | 0.704 |
944838e2fc3723906b8386425711bc9c0534935c | 324 | py | Python | Python/turtle-drawing/dots.py | DMeurer/small-projects | 3d9e714db9cd8dd8a626d9b8f0faa44325ef10e1 | [
"MIT"
] | 1 | 2021-03-25T14:23:58.000Z | 2021-03-25T14:23:58.000Z | Python/turtle-drawing/dots.py | DMeurer/small-projects | 3d9e714db9cd8dd8a626d9b8f0faa44325ef10e1 | [
"MIT"
] | 1 | 2021-01-15T17:03:06.000Z | 2021-02-15T10:02:07.000Z | Python/turtle-drawing/dots.py | DMeurer/small-projects | 3d9e714db9cd8dd8a626d9b8f0faa44325ef10e1 | [
"MIT"
] | null | null | null | import turtle
t = turtle.Turtle()
dot_distance = 25
width = 8
height = 4
t.speed(1)
t.penup()
for y in range(height):
t.dot()
for i in range(width):
t.forward(dot_distance)
t.dot()
t.backward(dot_distance * width)
t.right(90)
t.forward(dot_distance)
t.left(90)
turtle.do... | 14.727273 | 36 | 0.608025 |
945910577292c52aced4293c837e194d68d741e2 | 299 | py | Python | biowardrobe_airflow_advanced/operators/__init__.py | Barski-lab/biowardrobe-airflow-advanced | e43aa268fd05635e8356788b8e814279b698263f | [
"Apache-2.0"
] | null | null | null | biowardrobe_airflow_advanced/operators/__init__.py | Barski-lab/biowardrobe-airflow-advanced | e43aa268fd05635e8356788b8e814279b698263f | [
"Apache-2.0"
] | 1 | 2018-09-30T16:57:06.000Z | 2018-09-30T16:57:06.000Z | biowardrobe_airflow_advanced/operators/__init__.py | Barski-lab/biowardrobe-airflow-advanced | e43aa268fd05635e8356788b8e814279b698263f | [
"Apache-2.0"
] | null | null | null | from .deseq_jobdispatcher import DeseqJobDispatcher
from .deseq_jobgatherer import DeseqJobGatherer
from .heatmap_jobdispatcher import HeatmapJobDispatcher
from .heatmap_jobgatherer import HeatmapJobGatherer
from .pca_jobdispatcher import PcaJobDispatcher
from .pca_jobgatherer import PcaJobGatherer | 49.833333 | 55 | 0.90301 |
0477acb64ec92d3b58219e0897ceff9642085283 | 902 | py | Python | leetcode/241-Different-Ways-to-Add-Parentheses/DiffWays2AddParen_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/241-Different-Ways-to-Add-Parentheses/DiffWays2AddParen_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/241-Different-Ways-to-Add-Parentheses/DiffWays2AddParen_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # code not optimized which can be optimized easily by DP
class Solution:
# @param {string} input
# @return {integer[]}
def diffWaysToCompute(self, input):
s = input
t = s.split()
s = ''.join(t)
if s.isdigit():
return [int(s)]
res = []
for i in ran... | 32.214286 | 56 | 0.381375 |
049d9d99afe228a3c3619f3d5e1ca21a56f9a9ae | 18 | py | Python | src/lb/__init__.py | lburgazzoli/lb-py-misc | 714bfdaf557f7a05d35a6349c78cc8c281007345 | [
"Apache-2.0"
] | null | null | null | src/lb/__init__.py | lburgazzoli/lb-py-misc | 714bfdaf557f7a05d35a6349c78cc8c281007345 | [
"Apache-2.0"
] | null | null | null | src/lb/__init__.py | lburgazzoli/lb-py-misc | 714bfdaf557f7a05d35a6349c78cc8c281007345 | [
"Apache-2.0"
] | null | null | null | __author__ = 'lb'
| 9 | 17 | 0.666667 |
8e2b7f19a2178ea89d418bd4f0d61354119f1d00 | 1,872 | py | Python | scriptsForPreprocessing/create_polygon_test.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | 1 | 2022-01-03T14:00:17.000Z | 2022-01-03T14:00:17.000Z | scriptsForPreprocessing/create_polygon_test.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | null | null | null | scriptsForPreprocessing/create_polygon_test.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | 1 | 2021-12-21T09:50:53.000Z | 2021-12-21T09:50:53.000Z | import json
import numpy as np
from pycocotools import mask
from skimage import measure
import os, json
import cv2
import pandas as pd
fishial_mask_dir = r'createing_dataset/dataset'
list_path = os.listdir(fishial_mask_dir)
result_dict = {}
count = 0
df = pd.read_csv (r'createing_dataset/resources/train-annotations-o... | 42.545455 | 196 | 0.677885 |
fcb85b491efcab82973ec6c0aa25b8e8cbcd1cc9 | 5,162 | py | Python | SBTK_League_Helper/test4.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/test4.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/test4.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | """
Box creating characters
░▒▓█▄▀
┌─┬┐╔═╦╗
│ ││║ ║║
├─┼┤╠═╬╣
└─┴┘╚═╩╝
·
"""
print('''
A B C D E F G H J
_
1 · · · · · · · (█) ·
_ _
2 · · · · · · (█) · (█)
_ _
3 · · + · · · (#)(█) ·
_ ... | 30.011628 | 50 | 0.070128 |
1e68a351b71c41324a4740d877d0fecb765513cd | 751 | py | Python | Source/07_TCP/server.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | 1 | 2022-02-28T09:49:35.000Z | 2022-02-28T09:49:35.000Z | Source/07_TCP/server.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | null | null | null | Source/07_TCP/server.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | null | null | null |
import socket
print("Server Side TCP")
print("~" * 30)
# Create Socket
# AF_INET: IPV4
# SOCK_STREAM : TCP
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
ip = "" # from which ip can i receive socket, or receive from all
port = 20000
s.bind((ip,port))
s.listen()
try:
# Accept the connection from the ... | 17.880952 | 78 | 0.61518 |
bfb0d2c4eaa478d190fde5330b301897fac0a471 | 398 | py | Python | PathFinding/test.py | DangerOnTheRanger/project-panzee | 9392a3d8c4a0acbac80905e164dca91b691022ab | [
"BSD-2-Clause"
] | 5 | 2015-07-16T20:44:58.000Z | 2016-04-19T03:47:46.000Z | PathFinding/test.py | DangerOnTheRanger/project-panzee | 9392a3d8c4a0acbac80905e164dca91b691022ab | [
"BSD-2-Clause"
] | 6 | 2015-12-23T07:05:06.000Z | 2016-07-03T22:29:03.000Z | PathFinding/test.py | DangerOnTheRanger/project-panzee | 9392a3d8c4a0acbac80905e164dca91b691022ab | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
try:
# for Python2
from Tkinter import * ## notice capitalized T in Tkinter
except ImportError:
# for Python3
from tkinter import * ## notice here too
from window import CellGrid
from window import Cell
from pathFinder import path_finder
if __name__ == "__main__" :
app =... | 20.947368 | 62 | 0.670854 |
7804699c46c418f0b4a24ca01ad7b042256bb92b | 10,433 | py | Python | down.py | MyWay404/WordMaker | 3c850fbcc585838d281ef8d20f627f0c2c3f087b | [
"MIT"
] | null | null | null | down.py | MyWay404/WordMaker | 3c850fbcc585838d281ef8d20f627f0c2c3f087b | [
"MIT"
] | null | null | null | down.py | MyWay404/WordMaker | 3c850fbcc585838d281ef8d20f627f0c2c3f087b | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# Import Modules
try:
import os,sys,time,random,urllib.request,itertools,threading,platform,readline,gzip
except Exception as F:
exit("\x1b[1;31m [!] \x1b[0;32m%s"%(F)+"\x1b[0;39m")
# Color
A = "\x1b[1;32m"
B = "\x1b[1;31m"
C = "\x1b[1;33m"
D = "\x1b[1;36m"
E = "\x1b[0;39m"
rand = (A,B,C,D)... | 32.603125 | 112 | 0.423368 |
15780ce307f85b741d405d714b1a23390888862d | 475 | py | Python | src/video_transcoding/migrations/0002_auto_20200226_0919.py | serzh-unknown/django-video-transcoding | a9048a83ff71e214a215f271d8809f98c1db44b0 | [
"MIT"
] | 21 | 2020-02-07T17:40:16.000Z | 2021-09-02T18:56:21.000Z | src/video_transcoding/migrations/0002_auto_20200226_0919.py | serzh-unknown/django-video-transcoding | a9048a83ff71e214a215f271d8809f98c1db44b0 | [
"MIT"
] | 184 | 2020-02-09T10:46:17.000Z | 2022-03-28T00:53:04.000Z | src/video_transcoding/migrations/0002_auto_20200226_0919.py | serzh-unknown/django-video-transcoding | a9048a83ff71e214a215f271d8809f98c1db44b0 | [
"MIT"
] | 6 | 2020-02-07T13:58:33.000Z | 2021-07-27T16:24:56.000Z | # Generated by Django 3.0.3 on 2020-02-26 09:19
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('video_transcoding', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='video',
... | 23.75 | 111 | 0.631579 |
bd81db25c934f13d9319812d3d1eedb4256f8d4a | 5,555 | py | Python | kts/ui/feature_importances.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 18 | 2019-02-14T13:10:07.000Z | 2021-11-26T07:10:13.000Z | kts/ui/feature_importances.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-02-17T14:06:42.000Z | 2019-09-15T18:05:54.000Z | kts/ui/feature_importances.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-09-15T13:12:42.000Z | 2020-04-15T14:05:54.000Z | import time
from contextlib import redirect_stdout
from typing import List, Dict, Union
from IPython.display import display
from kts.settings import cfg
from kts.ui.components import HTMLRepr, Field, Annotation, AlignedColumns, Output, Progress, InnerColumn, Row, Title, \
Column
from kts.util.formatting import fo... | 40.547445 | 169 | 0.591179 |
e501ff4f4fc3da892d87f2b54ec30e74abf6d177 | 826 | py | Python | setup.py | HazelTheWitch/SemVer | 3ca3663990b1e0451b9eab25d411a68d50c90554 | [
"MIT"
] | null | null | null | setup.py | HazelTheWitch/SemVer | 3ca3663990b1e0451b9eab25d411a68d50c90554 | [
"MIT"
] | null | null | null | setup.py | HazelTheWitch/SemVer | 3ca3663990b1e0451b9eab25d411a68d50c90554 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
from pathlib import Path
from src.semver import version
here = Path(__file__).parent.resolve()
long = (here / 'README.md').read_text('utf-8')
short = long.split('\n')[1]
setup(
name='semver',
version=version.string,
description=short,
long_description=lon... | 26.645161 | 54 | 0.664649 |
e52e7fdd540486eed957d7f990be39ea0bfa4861 | 624 | py | Python | IVTa/2014/MOSHKOV_Y_O/task_7_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/MOSHKOV_Y_O/task_7_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/MOSHKOV_Y_O/task_7_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 7. Вариант 23
# Создайте игру, в которой компьютер загадывает название одного
# из семи дней недели, а игрок должен его угадать.
# Moshkov Y. O.
# 31.03.2016
import random
week = ["Понедельник", "Вторник", "Среда",
"Четверг", "Пятница", "Суббота", "Воскресенье"]
number = random.randint(0, 6)
day = week[num... | 28.363636 | 74 | 0.652244 |
f9172bae4a66c6126a847b7594dc75f47b009505 | 384 | py | Python | Pythonjunior2020/Woche2/Aufgabe_2_2_3.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche2/Aufgabe_2_2_3.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche2/Aufgabe_2_2_3.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | # 2.2.3, Woche 2, Block 2, Aufgabe 3
# Import
from daten import form
from turtle import *
# SetUp
penup()
goto(-200,100)
pendown()
# IF - Statement
if form == "Dreieck" :
# Dreieck
for i in range(0, 3):
forward(100)
left(120)
elif form == "Viereck":
# Viereck
for i in range(0, 4):
... | 14.769231 | 36 | 0.565104 |
00e1ad93390835d2dd363a8f771bd964f318020a | 423 | py | Python | algorithms/ar-slpsrt/python2/sleep_sort.py | NuclearCactus/FOSSALGO | eb66f3bdcd6c42c66e8fc7110a32ac021596ca66 | [
"MIT"
] | 59 | 2018-09-11T17:40:25.000Z | 2022-03-03T14:40:39.000Z | algorithms/ar-slpsrt/python2/sleep_sort.py | NuclearCactus/FOSSALGO | eb66f3bdcd6c42c66e8fc7110a32ac021596ca66 | [
"MIT"
] | 468 | 2018-08-28T17:04:29.000Z | 2021-12-03T15:16:34.000Z | algorithms/ar-slpsrt/python2/sleep_sort.py | NuclearCactus/FOSSALGO | eb66f3bdcd6c42c66e8fc7110a32ac021596ca66 | [
"MIT"
] | 253 | 2018-08-28T17:08:51.000Z | 2021-11-01T12:30:39.000Z | from time import sleep
from threading import Timer
def sleepSort(values):
sortedList = []
def add(x):
sortedList.append(x)
maxVal = values[0]
for value in values:
if maxVal < value: maxVal = value
Timer(value, add, [value]).start()
sleep(maxVal+1)
return sortedList
lst ... | 22.263158 | 42 | 0.647754 |
97a98242f3b2d126d5edde0b40f517935abceee4 | 1,834 | py | Python | python/arrays/arrays.py | miroadamy/language-matrix | 510bc33d058555da8a67f87d25353b93d219d750 | [
"MIT"
] | 15 | 2015-03-13T03:45:52.000Z | 2022-02-26T00:11:18.000Z | python/arrays/arrays.py | miroadamy/language-matrix | 510bc33d058555da8a67f87d25353b93d219d750 | [
"MIT"
] | 5 | 2015-02-23T18:20:17.000Z | 2021-03-20T21:54:48.000Z | python/arrays/arrays.py | miroadamy/language-matrix | 510bc33d058555da8a67f87d25353b93d219d750 | [
"MIT"
] | 9 | 2016-05-11T13:03:22.000Z | 2021-04-11T13:07:12.000Z | from array import *
"""Arrays are available in Python, but Lists are usually used.
Arrays can used the u code to create an array of Strings but will be deprecated"""
"""
Arrays in Python are strong typed. A type is required in order to create
Type code C Type Python Type Minimum size (bytes)
'b'... | 45.85 | 514 | 0.569793 |
99f55f08f681391a094ed3c77b225eae230e8468 | 5,236 | py | Python | code_generator.py | Peetee06/compilerbau_ws2122_hsbochum | 9b71e33f7385ba946ce7f4d375b7ca68b21dd97f | [
"MIT"
] | null | null | null | code_generator.py | Peetee06/compilerbau_ws2122_hsbochum | 9b71e33f7385ba946ce7f4d375b7ca68b21dd97f | [
"MIT"
] | null | null | null | code_generator.py | Peetee06/compilerbau_ws2122_hsbochum | 9b71e33f7385ba946ce7f4d375b7ca68b21dd97f | [
"MIT"
] | 2 | 2022-03-13T18:48:24.000Z | 2022-03-20T16:45:19.000Z | class CodeGenerator:
def __init__(self, ast):
self.idx = 0
self.ast = ast
# the intermediate representation
self.ir = None
self.binary_operators = [
"ADD",
"SUB",
"MUL",
"DIV",
"LT",
"GT",
"LT... | 33.564103 | 76 | 0.481092 |
ec047698695a4fd6280510f3544be64f9b169169 | 7,425 | py | Python | proxy/proxy.py | cutec-chris/sce | da1f906ff4a049722b8968eeab8a07b411c92a8c | [
"MIT"
] | null | null | null | proxy/proxy.py | cutec-chris/sce | da1f906ff4a049722b8968eeab8a07b411c92a8c | [
"MIT"
] | null | null | null | proxy/proxy.py | cutec-chris/sce | da1f906ff4a049722b8968eeab8a07b411c92a8c | [
"MIT"
] | null | null | null | import bottle,json,logging,base64,random,time,pathlib,os,uuid,sys
app = bottle.Bottle()
servers = []
users = []
ownId = str(uuid.uuid4())
@app.route('/')
@app.route('/index.html')
@app.route('/client/<filepath:path>')
def handle_index(filepath='index.html'):
basepath = str(pathlib.Path('/'.join(list(pathlib.Path(__... | 37.690355 | 100 | 0.559057 |
6b93cfde0f7eb4d77604b44ccde52b1d3801c74f | 1,481 | py | Python | biowardrobe_airflow_advanced/init_advanced.py | Barski-lab/biowardrobe-airflow-advanced | e43aa268fd05635e8356788b8e814279b698263f | [
"Apache-2.0"
] | null | null | null | biowardrobe_airflow_advanced/init_advanced.py | Barski-lab/biowardrobe-airflow-advanced | e43aa268fd05635e8356788b8e814279b698263f | [
"Apache-2.0"
] | 1 | 2018-09-30T16:57:06.000Z | 2018-09-30T16:57:06.000Z | biowardrobe_airflow_advanced/init_advanced.py | Barski-lab/biowardrobe-airflow-advanced | e43aa268fd05635e8356788b8e814279b698263f | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
import sys
import logging
import argparse
from biowardrobe_airflow_advanced.utils.connect import HookConnect, DirectConnect
from biowardrobe_airflow_advanced.utils.utilities import normalize_args
from biowardrobe_airflow_advanced.utils.initialize import (gen_outputs,
... | 30.854167 | 119 | 0.673869 |
cf186d8522f13085f12c7721c79964fe1d8c9fc1 | 3,745 | py | Python | modeling/head/dlinknet.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | 2 | 2020-12-22T08:40:05.000Z | 2021-03-30T08:09:44.000Z | modeling/head/dlinknet.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | null | null | null | modeling/head/dlinknet.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | null | null | null | """ Full assembly of the parts to form the complete network """
from __future__ import division
from modeling.model_utils.unet_parts import *
import torch.nn.functional as F
from functools import partial
nonlinearity = partial(F.relu,inplace=True)
class DLinkNet(nn.Module):
def __init__(self, backbone,BatchNorm,... | 36.715686 | 119 | 0.628571 |
d8c2cffbb399390500252ed837dfbaa191383db3 | 150 | py | Python | python/douban/tool.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 1 | 2019-05-22T07:12:34.000Z | 2019-05-22T07:12:34.000Z | python/douban/tool.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 3 | 2021-12-10T01:13:54.000Z | 2021-12-14T21:18:42.000Z | python/douban/tool.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# @Time:2020/8/4 21:23
# @Author:TimVan
# @File:tool.py.py
# @Software:PyCharm
print("It's Tool,__name__={}".format(__name__)) | 21.428571 | 47 | 0.646667 |
51e6d513b96798c01c695f9cd0b1b73f330c9ddb | 4,673 | py | Python | Sprint-Challenge--Algorithms/robot_sort/robot_sort_select.py | tobias-fyi/02_algorithms | ab1a8a07c3560ad66712992e3af906e8fd316fe2 | [
"MIT"
] | null | null | null | Sprint-Challenge--Algorithms/robot_sort/robot_sort_select.py | tobias-fyi/02_algorithms | ab1a8a07c3560ad66712992e3af906e8fd316fe2 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | cs/lambda_cs/02_algorithms/Sprint-Challenge--Algorithms/robot_sort/robot_sort_select.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | """
Algorithms :: Sprint Challenge - robot sort
"""
class SortingRobot:
def __init__(self, l):
"""
SortingRobot takes a list and sorts it.
"""
self._list = l # The list the robot is tasked with sorting
self._item = None # The item the robot is holding
self._positi... | 29.764331 | 87 | 0.555104 |
8fbad7b9739fe89330bec1f6e3dd07f27e33d4c0 | 14,681 | py | Python | addition_module/DMUE/preprocess/face_alignmenet/utils/utils.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 1,329 | 2021-01-13T07:06:30.000Z | 2022-03-31T07:23:39.000Z | addition_module/DMUE/preprocess/face_alignmenet/utils/utils.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 115 | 2021-01-13T10:42:57.000Z | 2022-03-28T03:57:52.000Z | addition_module/DMUE/preprocess/face_alignmenet/utils/utils.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 351 | 2021-01-13T07:21:00.000Z | 2022-03-29T14:11:39.000Z | from __future__ import print_function, division
import os
import sys
import math
import torch
import cv2
from PIL import Image
from skimage import io
from skimage import transform as ski_transform
from scipy import ndimage
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from torch.utils.data import... | 41.35493 | 449 | 0.557251 |
7125915e2eb5858bef2e56cb8bafc09934cb795a | 208 | py | Python | exercises/fr/solution_01_02_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/solution_01_02_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/solution_01_02_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | # Importe la classe de langue "French"
from spacy.lang.fr import French
# Crée l'objet nlp
nlp = French()
# Traite un texte
doc = nlp("Ceci est une phrase.")
# Affiche le texte du document
print(doc.text)
| 17.333333 | 38 | 0.716346 |
f169df42c814c63e0a53a4685eeb3f0bb134ec18 | 432 | py | Python | 2016/11/trump-appointments-20161115/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2016/11/trump-appointments-20161115/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2016/11/trump-appointments-20161115/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
import base_filters
# Test google doc
# COPY_GOOGLE_DOC_KEY = '1DmpBcF4t8FOk6fpBPOgx3PDpVzulrYqWhT_yUZiDc-k'
# Actual google doc shared by politics
COPY_GOOGLE_DOC_KEY = '1AnnjUy7jbX1RzSEzltx4kiRzAV84VZ6nKIbEDkHFG3E'
USE_ASSETS = True
# Use these variables to override the default cache timeout... | 25.411765 | 77 | 0.821759 |
74bb2112bd1523d6b6637f6b7570398599c5e950 | 1,229 | py | Python | python/EyeScanner.py | thomas-trendsoft/BeerBot | 9ac9bfcede3f37dc8aaa3ee09e06272a1b43a9e9 | [
"MIT"
] | null | null | null | python/EyeScanner.py | thomas-trendsoft/BeerBot | 9ac9bfcede3f37dc8aaa3ee09e06272a1b43a9e9 | [
"MIT"
] | null | null | null | python/EyeScanner.py | thomas-trendsoft/BeerBot | 9ac9bfcede3f37dc8aaa3ee09e06272a1b43a9e9 | [
"MIT"
] | 1 | 2020-12-31T01:22:19.000Z | 2020-12-31T01:22:19.000Z | import Distance
import Stepper
# front eye controller
class EyeScanner:
# util method to get stepper motor to front direction
def calibrate(self):
i = 0 # security to avoid complete rotation
check = self.dist.measure()
print(str(check))
while (i < 200 and check > 8.0 and ch... | 31.512821 | 116 | 0.589097 |
2d089ec156f9395b7c829f7b1b5480d2debdc72a | 533 | py | Python | 322-coin-change/322-coin-change.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 322-coin-change/322-coin-change.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 322-coin-change/322-coin-change.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def coinChange(self, coins: List[int], amount: int) -> int:
dp=[0]
for i in range(1,amount+1):
if i in coins:
dp.append(1)
else:
candidate=[]
for coin in coins:
if i-coin>0 and dp[i-coin]!=-1:... | 33.3125 | 63 | 0.412758 |
2d3d1fc54d90043e91e36947bb3276374d06f8d5 | 1,888 | py | Python | indl/model/helper.py | SachsLab/indl | 531d2e0c2ee765004aedc553af40e258262f86cb | [
"Apache-2.0"
] | 1 | 2021-02-22T01:39:50.000Z | 2021-02-22T01:39:50.000Z | indl/model/helper.py | SachsLab/indl | 531d2e0c2ee765004aedc553af40e258262f86cb | [
"Apache-2.0"
] | null | null | null | indl/model/helper.py | SachsLab/indl | 531d2e0c2ee765004aedc553af40e258262f86cb | [
"Apache-2.0"
] | null | null | null | __all__ = ['check_inputs', 'check_tensor_name']
import tensorflow as tf
def check_inputs(model_builder):
def _check_inputs_wrapped_model_builder(*args, **kwargs):
_input = args[0]
is_multi = isinstance(_input, (list, tuple)) and\
len(_input) > 0 and not any([isinstance(_, int... | 37.019608 | 122 | 0.619174 |
7016c135828e36837d101770c5e2a78ca24ad6bd | 7,573 | py | Python | official/nlp/cpm/src/cpm_loss.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/nlp/cpm/src/cpm_loss.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/nlp/cpm/src/cpm_loss.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... | 44.810651 | 110 | 0.627492 |
704a45862443ae6f417a58d76992cb4947336ec7 | 15,019 | py | Python | MoPulseGen/HR2Rpeaks_v2.py | tushar-agarwal2909/MoPulseGen | a0edeaf67f956e7db27e70f07e47d2f992bcb6f3 | [
"BSD-2-Clause"
] | null | null | null | MoPulseGen/HR2Rpeaks_v2.py | tushar-agarwal2909/MoPulseGen | a0edeaf67f956e7db27e70f07e47d2f992bcb6f3 | [
"BSD-2-Clause"
] | null | null | null | MoPulseGen/HR2Rpeaks_v2.py | tushar-agarwal2909/MoPulseGen | a0edeaf67f956e7db27e70f07e47d2f992bcb6f3 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Feb 14 20:46:09 2020
@author: agarwal.270a
"""
import numpy as np
import matplotlib.pyplot as plt
#from scipy import io
#from pathlib import Path
from simulator_for_CC import Simulator
import tensorflow as tf
from tensorflow.keras import layers
import glob
i... | 42.307042 | 98 | 0.565284 |
3b9673be72b109232168eb1b881e0aff00e495e4 | 1,548 | py | Python | model/topoml_util/test_fourier_descriptors.py | Empythy/geometry-learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 21 | 2018-10-09T08:15:29.000Z | 2022-03-16T08:23:08.000Z | model/topoml_util/test_fourier_descriptors.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 31 | 2017-09-20T13:30:37.000Z | 2018-03-01T13:24:58.000Z | model/topoml_util/test_fourier_descriptors.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 7 | 2018-11-29T11:39:02.000Z | 2022-01-12T07:10:26.000Z | import unittest
import numpy as np
from pyefd import elliptic_fourier_descriptors
class TestFourierDescriptors(unittest.TestCase):
def test_same_descriptors(self):
square1 = [[0, 0], [1, 0], [1, 0.5], [1, 1], [0, 1], [0, 0]]
square2 = [[0, 0], [0.5, 0], [1, 0], [1, 1], [0, 1], [0, 0]]
desc... | 46.909091 | 90 | 0.635659 |
8ed4b266f7e6a14f247321cbbbe6cf7809ee81b5 | 396 | py | Python | pacman-termux/test/pacman/tests/querycheck001.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/querycheck001.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/querycheck001.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Query--check files, all there"
pkg = pmpkg("dummy")
pkg.files = [
"usr/lib/libdummy.so.0",
"usr/lib/libdummy.so -> libdummy.so.0",
"usr/share/dummy/C/",
"usr/share/dummy/C/msgs",
"usr/share/dummy/en -> C"]
self.addpkg2db("local",pkg)
self.args = "-Qk"
self.addrule("PACMAN_RETC... | 24.75 | 67 | 0.656566 |
d9301dc5179d53ee1efc8c02100fbdc9e46299fc | 354 | py | Python | env/Scripts/mako-render-script.py | YangWang1231/FlaskWeb | 7d1f53f1b3e69781cba3c850bfd9e10cd6e4b088 | [
"MIT"
] | null | null | null | env/Scripts/mako-render-script.py | YangWang1231/FlaskWeb | 7d1f53f1b3e69781cba3c850bfd9e10cd6e4b088 | [
"MIT"
] | null | null | null | env/Scripts/mako-render-script.py | YangWang1231/FlaskWeb | 7d1f53f1b3e69781cba3c850bfd9e10cd6e4b088 | [
"MIT"
] | null | null | null | #!C:\Users\Administrator\source\repos\FLaskempty\env\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'Mako==1.1.0','console_scripts','mako-render'
__requires__ = 'Mako==1.1.0'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('Mako==1.1.0', 'console... | 32.181818 | 75 | 0.714689 |
30c84350b634eca0ac159c28114a603e88b02d2a | 1,942 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_08_Dateien_lesen_und_schreiben/02_files_lesen_und_schreiben/15_files_lesen_und_schreiben.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_08_Dateien_lesen_und_schreiben/02_files_lesen_und_schreiben/15_files_lesen_und_schreiben.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_08_Dateien_lesen_und_schreiben/02_files_lesen_und_schreiben/15_files_lesen_und_schreiben.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # Hier geht es darum Files zu lesen und zu schreiben
import os, re
maxl=53
dv=25
def output(string):
delta=len(string)%maxl
if delta != 0:
string+=' '*(maxl-delta)
pattern=re.compile(r'[\S].{'+str(maxl-dv)+r','+str(maxl)+r'}[ .,]')
output=pattern.findall(string)
for i in range(len(output)):... | 30.34375 | 241 | 0.696704 |
15f56eeec2e803ab4a18366f28677ccc8891560b | 3,232 | py | Python | blog/post_parser.py | Lanseuo/lucas-blog | fd6932952aac3a3055026551700bc86adef279f4 | [
"MIT"
] | 1 | 2019-01-29T15:57:20.000Z | 2019-01-29T15:57:20.000Z | blog/post_parser.py | Lanseuo/lucas-blog | fd6932952aac3a3055026551700bc86adef279f4 | [
"MIT"
] | 1 | 2018-05-05T19:43:28.000Z | 2018-05-05T19:43:28.000Z | blog/post_parser.py | Lanseuo/lucas-blog | fd6932952aac3a3055026551700bc86adef279f4 | [
"MIT"
] | 1 | 2018-04-24T09:36:57.000Z | 2018-04-24T09:36:57.000Z | import markdown
import re
from . import meta
from datetime import datetime
class PostParser:
def __init__(self, markdown_file_path, permalink):
self.markdown_file_path = markdown_file_path
self.permalink = permalink
self.parse_markdown()
self.set_attributes()
def extract_dat... | 34.021053 | 96 | 0.544245 |
c6297e22ab59e9472eb3563e7d370efb4463d816 | 329 | py | Python | frappe-bench/apps/erpnext/erpnext/selling/doctype/quotation/quotation_dashboard.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/selling/doctype/quotation/quotation_dashboard.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/selling/doctype/quotation/quotation_dashboard.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | from frappe import _
def get_data():
return {
'fieldname': 'prevdoc_docname',
'non_standard_fieldnames': {
'Subscription': 'reference_document',
},
'transactions': [
{
'label': _('Sales Order'),
'items': ['Sales Order']
},
{
'label': _('Subscription'),
'items': ['Subscription']
... | 17.315789 | 40 | 0.574468 |
c62eb10e7c5087a85eaab2cd21fa65b6dfe3b104 | 89 | py | Python | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/07.12-Printing-Pattern.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/07.12-Printing-Pattern.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/07.12-Printing-Pattern.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | for i in range(4, 0, -1):
for _ in range(i):
print("#", end=" ")
print()
| 17.8 | 27 | 0.438202 |
0630b65608c1886f53aa744df10c771233b6e7db | 592 | py | Python | Problems/Depth-First Search/easy/FindPathsExistsGraph/find_paths_exits_in_graph.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Depth-First Search/easy/FindPathsExistsGraph/find_paths_exits_in_graph.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Depth-First Search/easy/FindPathsExistsGraph/find_paths_exits_in_graph.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from collections import defaultdict
from typing import List
def validPath(self, n: int, edges: List[List[int]], start: int, end: int) -> bool:
neighbors = defaultdict(list)
for v1, v2 in edges:
neighbors[v1].append(v2)
neighbors[v2].append(v1)
def dfs(node, end, seen):
if node ==... | 22.769231 | 82 | 0.5625 |
23052d47fe474775986b41d8ee784e3f484942bf | 673 | py | Python | python/python_backup/PRAC_PYTHON/ab28.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/ab28.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/ab28.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | # input a string and print nos.of vowels,words,consonent,spaces
s=input("enter string:")
w=1
v=0
c=0
sp=0
for i in range(0,len(s),1):
if s[i]=='A'or s[i]=='a'or s[i]=='E' or s[i]=='e' or s[i]=='I' or s[i]=='i' or s[i]=='O'or s[i]=='o' or s[i]=='U' or s[i]=='u':
v=v+1
else:
if s[i]... | 28.041667 | 151 | 0.442793 |
23421cf90de612379740d181adbe3148b39c5613 | 47 | py | Python | Algorithms/DynamicProgramming/Fibonacci Numbers/tempCodeRunnerFile.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 26 | 2019-07-17T11:05:43.000Z | 2022-02-06T08:31:40.000Z | Algorithms/DynamicProgramming/Fibonacci Numbers/tempCodeRunnerFile.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 7 | 2019-07-16T19:52:25.000Z | 2022-01-08T08:03:44.000Z | Algorithms/DynamicProgramming/Fibonacci Numbers/tempCodeRunnerFile.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 19 | 2020-01-14T02:44:28.000Z | 2021-12-27T17:31:59.000Z | print("\ntime: " + str(1000 * (fin-init))+"ms") | 47 | 47 | 0.553191 |
ccc9f8f69884941bf5ee10603f1b9782344c8bfd | 1,390 | py | Python | user_sync/port.py | sabanawaf/user-sync.py | 51a7f9165d1740120b172edf507f1b3b3d5e57f8 | [
"MIT"
] | 3 | 2017-03-15T16:34:25.000Z | 2017-04-07T12:10:22.000Z | user_sync/port.py | sabanawaf/user-sync.py | 51a7f9165d1740120b172edf507f1b3b3d5e57f8 | [
"MIT"
] | 78 | 2019-04-18T17:20:32.000Z | 2022-02-23T14:19:54.000Z | user_sync/port.py | sabanawaf/user-sync.py | 51a7f9165d1740120b172edf507f1b3b3d5e57f8 | [
"MIT"
] | 18 | 2019-07-01T19:39:34.000Z | 2021-06-06T10:56:41.000Z | # Copyright (c) 2016-2017 Adobe Inc. All rights reserved.
#
# 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, modif... | 40.882353 | 80 | 0.761871 |
aed0da3a9c01fd3be22ddcdd52a997746466bb36 | 3,350 | py | Python | packages/watchmen-data-kernel/src/watchmen_data_kernel/common/settings.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/common/settings.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/common/settings.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from logging import getLogger
from typing import List, Tuple
from pydantic import BaseSettings
from watchmen_utilities import ArrayHelper
logger = getLogger(__name__)
class KernelSettings(BaseSettings):
STORAGE_ECHO: bool = False
FULL_DATETIME_FORMATS: List[str] = [
'%Y%m%d%H%M%S%f', '%d%m%Y%H%M%S%f', '%m%d%Y... | 26.8 | 98 | 0.74806 |
ae26c87f70d901185df2b30e5e626bd9f3d2d72f | 4,400 | py | Python | Louisa/DrClean.py | JonathanOnorato/ChemLP | a7b0d2f9a3899531aacda9bc85d89d721f6450c4 | [
"MIT"
] | 4 | 2020-04-13T20:49:01.000Z | 2021-02-09T01:05:01.000Z | Louisa/DrClean.py | JonathanOnorato/ChemLP | a7b0d2f9a3899531aacda9bc85d89d721f6450c4 | [
"MIT"
] | 3 | 2020-04-28T23:16:27.000Z | 2020-04-28T23:26:53.000Z | Louisa/DrClean.py | JonathanOnorato/ChemLP | a7b0d2f9a3899531aacda9bc85d89d721f6450c4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # TEXT data cleaner and tokenizer
#
# we use NLTK, Regex, BeautifulSoup, inflect to clean the parsed text data (json file), tokenize them into sentences and restore them as JSON file.
# Resources used to create this code are as following:
# * <a href="https://www.kdnuggets.com/... | 33.587786 | 213 | 0.697955 |
ae2cab6514a36e3c694d620a6f0fdb3c8991b3b9 | 958 | py | Python | languages/python/django-oso/tests/conftest.py | saschajullmann/oso | 85d07c6a1825acba5ec043c917bff6e0f5c7128f | [
"Apache-2.0"
] | 1 | 2021-07-08T17:36:08.000Z | 2021-07-08T17:36:08.000Z | languages/python/django-oso/tests/conftest.py | saschajullmann/oso | 85d07c6a1825acba5ec043c917bff6e0f5c7128f | [
"Apache-2.0"
] | 2 | 2021-03-24T19:24:40.000Z | 2021-03-24T19:54:46.000Z | languages/python/django-oso/tests/conftest.py | saschajullmann/oso | 85d07c6a1825acba5ec043c917bff6e0f5c7128f | [
"Apache-2.0"
] | 1 | 2021-03-24T19:51:45.000Z | 2021-03-24T19:51:45.000Z | from pathlib import Path
import sys
from django import VERSION
from django.conf import settings
def pytest_configure():
# Add test apps to sys path
test_app = Path(__file__).parent
sys.path.append(test_app.as_posix())
settings.configure(
INSTALLED_APPS=[
"test_app",
"... | 20.382979 | 83 | 0.56263 |
0929c060edaed47a0b84623d34196fae7e4839cf | 3,615 | py | Python | test/test_npu/test_network_ops/test_ctc_loss_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_ctc_loss_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_ctc_loss_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020 Huawei Technologies Co., Ltd
# Copyright (c) 2019, Facebook CORPORATION.
# All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licen... | 35.792079 | 115 | 0.670263 |
092a87aecd0f007f974022b60e6021f39d5a256e | 912 | py | Python | webfrontend/htmlauth/system/testing/python3-jsonrpc/jsonclient2.py | gmkey/Loxberry | 6fe32ba2c72a062bf4743c8f9a7871cfb7702874 | [
"Apache-2.0"
] | 60 | 2016-07-14T13:19:30.000Z | 2022-03-13T11:46:39.000Z | webfrontend/htmlauth/system/testing/python3-jsonrpc/jsonclient2.py | gmkey/Loxberry | 6fe32ba2c72a062bf4743c8f9a7871cfb7702874 | [
"Apache-2.0"
] | 1,251 | 2016-07-06T12:41:21.000Z | 2022-03-30T13:53:04.000Z | webfrontend/htmlauth/system/testing/python3-jsonrpc/jsonclient2.py | Woersty/LoxBerry | e3cfae5523474c4bff1bd99b4aa534141b87d29c | [
"Apache-2.0"
] | 43 | 2016-07-15T05:56:32.000Z | 2021-12-23T16:01:20.000Z | import requests
import json
def main():
url = "http://localhost:80/admin/system/jsonrpc.php"
headers = {'content-type': 'application/json'}
# Example echo method
payload = {
# "method": "getdirs",
# "method": "LBWeb::lbheader",
"method": "get_lbfooter",
# "method": "... | 24 | 56 | 0.555921 |
11ccb72af470628fb2ba2cb3175256326863e1b4 | 15,509 | py | Python | research/cv/FaceRecognition/modelarts/train_start_final.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/FaceRecognition/modelarts/train_start_final.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/FaceRecognition/modelarts/train_start_final.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # coding = utf-8
"""
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable... | 39.563776 | 120 | 0.648269 |
0158f4333d8160a7ed0db5057b978accde6c8f97 | 1,914 | py | Python | opencv_tutorial/opencv_python_tutorials/Image_Processing/template_matching.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | opencv_tutorial/opencv_python_tutorials/Image_Processing/template_matching.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | opencv_tutorial/opencv_python_tutorials/Image_Processing/template_matching.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Apr 4 13:45:26 2019
@author: jone
"""
#%% Template Matching in OpenCV
import cv2
from matplotlib import pyplot as plt
img = cv2.imread('img/messi.jpg', 0)
img2 = img.copy()
template = cv2.imread('img/messi_face.jpg', 0)
w, h = template.shape[::1]
# All the 6 methods for co... | 29 | 75 | 0.666667 |
01630411d30202508b937f7911b3af101fe31543 | 609 | py | Python | ledger/admin.py | Thames1990/BadBatBets | 8dffb69561668b8991bf4103919e4b254d4ca56a | [
"MIT"
] | null | null | null | ledger/admin.py | Thames1990/BadBatBets | 8dffb69561668b8991bf4103919e4b254d4ca56a | [
"MIT"
] | null | null | null | ledger/admin.py | Thames1990/BadBatBets | 8dffb69561668b8991bf4103919e4b254d4ca56a | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Account, Credit, Debit, Transaction
class AccountAdmin(admin.ModelAdmin):
list_display = ('name', 'type', 'balance')
class CreditAdmin(admin.ModelAdmin):
list_display = ('account', 'amount')
class DebitAdmin(admin.ModelAdmin):
list_display = ('acco... | 23.423077 | 55 | 0.758621 |
114f0daed2e35c0111e6f76840406eaceab5785d | 967 | py | Python | build/lib/AESEncryptor_heureka_code/Exceptions/PasswordExceptions.py | heureka-code/AESEncryptor-heureka-code | 9b11ed77148971672f6e6113a4411fae56e5712c | [
"MIT"
] | null | null | null | build/lib/AESEncryptor_heureka_code/Exceptions/PasswordExceptions.py | heureka-code/AESEncryptor-heureka-code | 9b11ed77148971672f6e6113a4411fae56e5712c | [
"MIT"
] | null | null | null | build/lib/AESEncryptor_heureka_code/Exceptions/PasswordExceptions.py | heureka-code/AESEncryptor-heureka-code | 9b11ed77148971672f6e6113a4411fae56e5712c | [
"MIT"
] | null | null | null | __date__ = "11.03.2021"
__status__ = "Development"
__annotations__ = "Enthält die Exceptions für Passworte"
__doc__ = """
Passwort Exceptions:
PasswordError:
ist die Klasse, von der die anderen Passwort-Exceptions erben.
WrongPassword:
ist die Exception, falls ein falsches Passwort verwendet wurde.
"""
... | 23.585366 | 102 | 0.68666 |
3a0b4698a780ae4b29382ff7d8354c2c16c49644 | 334 | py | Python | BITs/2014/Abdrahmanova_G_I/task_2_1.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Abdrahmanova_G_I/task_2_1.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Abdrahmanova_G_I/task_2_1.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 2. Вариант 1.
#Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Еврипид. Не забудьте о том, что автор должен быть упомянут на отдельной строке.
print('Лишь ласковый имеет дар пленять. \n\t\t\tЕврипид')
input('Нажмите Enter')
#Abdrahmanova G. ... | 55.666667 | 199 | 0.790419 |
3ac26adff3a6a00c14efecdbd39fecd9acd7a206 | 2,381 | py | Python | wk-sentiment/app/test/test_sentiment.py | wkabbani/microservices | 3b2956084880b6bc0b255a53493bec39c7bbf513 | [
"MIT"
] | 4 | 2020-10-08T15:05:02.000Z | 2021-08-03T01:00:08.000Z | wk-sentiment/app/test/test_sentiment.py | wkabbani/microservices | 3b2956084880b6bc0b255a53493bec39c7bbf513 | [
"MIT"
] | null | null | null | wk-sentiment/app/test/test_sentiment.py | wkabbani/microservices | 3b2956084880b6bc0b255a53493bec39c7bbf513 | [
"MIT"
] | 1 | 2020-10-08T15:05:04.000Z | 2020-10-08T15:05:04.000Z | import unittest
import os
import json
from application import create_app
from config import config_by_name
class SentimentAPITestCase(unittest.TestCase):
"""This class represents the sentiment api test case"""
def setUp(self):
"""Defines test variables and initializes the test case."""
self.... | 29.395062 | 68 | 0.578748 |
3ad8bb21fff9fa058c13cab67374da318d48985a | 1,476 | py | Python | packages/watchmen-data-kernel/src/watchmen_data_kernel/encryption/encryptor.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/encryption/encryptor.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/encryption/encryptor.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from __future__ import annotations
from abc import abstractmethod
from typing import Any, Dict, Union
from watchmen_data_kernel.common import DataKernelException
from watchmen_model.admin import FactorEncryptMethod
class Encryptor:
@abstractmethod
def accept(self, method: Union[FactorEncryptMethod, str]) -> bool:... | 22.363636 | 112 | 0.721545 |
a36c9f520b8c42587978529016ff9f9036b96012 | 6,049 | py | Python | scripts/make_eps0.00_all_v.py | puv13/nspt-scripts | bba4c794858f34894adc2f82fd530ed5ff52f691 | [
"MIT"
] | null | null | null | scripts/make_eps0.00_all_v.py | puv13/nspt-scripts | bba4c794858f34894adc2f82fd530ed5ff52f691 | [
"MIT"
] | null | null | null | scripts/make_eps0.00_all_v.py | puv13/nspt-scripts | bba4c794858f34894adc2f82fd530ed5ff52f691 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This is a script to extract the epsilon to 0 results from NSPT data files
for the PCM model.
"""
import glob
import re
import numpy as np
from optparse import OptionParser
#-------------------------------------------------------------------------------
# Defi... | 32.005291 | 80 | 0.392296 |
6ed41e1c5c8074f7a59d8909d9481d1acfd65eb9 | 1,654 | py | Python | 2021-05-09/城市地图带后端/城市地图后端/coffee/models.py | ritaswc/wechat_app_template | d6ba56b70b09bc755f7d4d6b696b9e9b53511faa | [
"MIT"
] | 395 | 2017-02-24T02:59:29.000Z | 2022-03-31T15:48:19.000Z | 2021-05-09/城市地图带后端/城市地图后端/coffee/models.py | ritaswc/wechat_app_template | d6ba56b70b09bc755f7d4d6b696b9e9b53511faa | [
"MIT"
] | 7 | 2020-03-17T08:33:00.000Z | 2021-09-02T23:10:46.000Z | 2021-05-09/城市地图带后端/城市地图后端/coffee/models.py | ritaswc/wechat_app_template | d6ba56b70b09bc755f7d4d6b696b9e9b53511faa | [
"MIT"
] | 235 | 2017-03-14T03:31:38.000Z | 2022-03-29T16:14:51.000Z | from django.conf import settings
from django.db import models
from django.contrib.auth.models import User
from django.utils import timezone
# Create your models here.
class Spot(models.Model):
city = models.CharField(max_length=70)
name = models.CharField(max_length=70)
longitude = models.FloatField()
latitud... | 42.410256 | 90 | 0.779323 |
42f9c946e2adc4fd28ac6b169c39e9def2a53bb7 | 65,776 | py | Python | DHParser/transform.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | DHParser/transform.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | DHParser/transform.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null | # transform.py - transformation functions for converting the
# concrete into the abstract syntax tree
#
# Copyright 2016 by Eckhart Arnold (arnold@badw.de)
# Bavarian Academy of Sciences an Humanities (badw.de)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may... | 37.479202 | 110 | 0.622735 |
dd102562c316f202f5ede31cc716b3e41f8ad0d0 | 18,609 | py | Python | .arch/preproc_lp.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 24 | 2021-10-04T22:11:59.000Z | 2022-02-02T21:51:43.000Z | .arch/preproc_lp.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 2 | 2021-10-04T21:51:30.000Z | 2021-10-05T14:15:31.000Z | .arch/preproc_lp.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
"""
LP Preprocessor of Markdown
"""
import json
import os
import sys
import time
import traceback
from ast import literal_eval
from functools import partial
from hashlib import md5
from devapp.app import app
from devapp.app import do as app_do
# from operators.testing.auto_docs import dir_pytes... | 36.345703 | 119 | 0.51991 |
dd63380bece641e8ee6001fbdc2a63cea28ce730 | 758 | py | Python | loesungsvorschlaege/ml_1_lineare_regression/praxis/lin_reg_abstrakt_ohne_matrizen.py | severinhaller/einf-machinelearning | 4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b | [
"MIT"
] | null | null | null | loesungsvorschlaege/ml_1_lineare_regression/praxis/lin_reg_abstrakt_ohne_matrizen.py | severinhaller/einf-machinelearning | 4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b | [
"MIT"
] | null | null | null | loesungsvorschlaege/ml_1_lineare_regression/praxis/lin_reg_abstrakt_ohne_matrizen.py | severinhaller/einf-machinelearning | 4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b | [
"MIT"
] | null | null | null | # Beispiel aus dem Skript in Python programmiert
# 3.2 Abstraktes Beispiel bzw. 3.3 Methode der kleinsten Quadrate
# Daten in einer Liste speichern
x_werte = [1, 2, 2.5]
y_werte = [1, 2, 1]
# Mittelwerte berechnen
avg_x = sum(x_werte) / 3
avg_y = sum(y_werte) / 3
# w_1 berechnen
# Summe im Zaehler
zaehler = (x_werte[0... | 37.9 | 120 | 0.654354 |
06c7ca0dff69312aeb8dc817701b7a35d22eb0c6 | 463 | py | Python | aoc2020/day_23/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_23/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_23/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | from aoc2020 import *
from datetime import datetime
class Solution(SolutionABC):
expected = 149245887792
def solve(self) -> any:
cups = next(self.resource_lines("input", lambda l: [int(i) for i in l]))
max_cup_value = max(cups)
cups = cups + list(range(max_cup_value + 1, 1000000+1))
... | 30.866667 | 80 | 0.656587 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.