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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
579413950846c7dd37a6066f560c739d02bf1e0c | 350 | py | Python | Build with a Cloud Technology/helpers.py | Akshu-on-github/MLH-INIT-2022 | cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e | [
"MIT"
] | 1 | 2021-07-05T14:30:34.000Z | 2021-07-05T14:30:34.000Z | Build with a Cloud Technology/helpers.py | Akshu-on-github/MLH-INIT-2022 | cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e | [
"MIT"
] | 1 | 2021-07-02T15:36:02.000Z | 2021-07-02T15:37:25.000Z | Build with a Cloud Technology/helpers.py | Akshu-on-github/MLH-INIT-2022 | cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e | [
"MIT"
] | 1 | 2021-07-02T15:15:17.000Z | 2021-07-02T15:15:17.000Z | # helpers file containing block-level functions used in main
from arduinoDockHelper import ArduinoDock
from watsonHelper import Watson
arduinoDock = ArduinoDock()
watson = Watson()
def getWeatherData():
response = arduinoDock.sendCommand('r')
return response
def sendToWatson(eventName, data):
watson... | 25 | 60 | 0.774286 |
57d399736778c9866017a83d22895a9a52b06453 | 4,657 | py | Python | apps/mainloop_and_utils/converter.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 2 | 2017-11-30T21:12:11.000Z | 2017-12-01T07:52:43.000Z | apps/mainloop_and_utils/converter.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 14 | 2017-11-14T18:12:53.000Z | 2018-06-03T16:07:57.000Z | apps/mainloop_and_utils/converter.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 3 | 2018-02-05T10:40:03.000Z | 2018-02-09T09:29:19.000Z | import cv2
import os
import shutil
import robolib.modelmanager.downloader as downloader
from robolib.util.files import list_dir_recursive
import robolib.datamanager.datadir as datadir
import argparse
MODEL_FILE = downloader.get_model(downloader.HAARCASCADE_FRONTALFACE_ALT, False)
face_cascades = cv2.CascadeClassifier(... | 34.496296 | 120 | 0.58557 |
103d7847c6082c7ab561058370e0e45f3f2b3e61 | 321 | py | Python | py-td1/ex3.py | HuguesGuilleus/istyPOO | f460665799be2b2f34a1ebaa9878e06bb028a410 | [
"BSD-3-Clause"
] | null | null | null | py-td1/ex3.py | HuguesGuilleus/istyPOO | f460665799be2b2f34a1ebaa9878e06bb028a410 | [
"BSD-3-Clause"
] | null | null | null | py-td1/ex3.py | HuguesGuilleus/istyPOO | f460665799be2b2f34a1ebaa9878e06bb028a410 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# GUILLEUS Hugues IATIC3 <hugues.guilleus@ens.uvsq.fr>
couleur = {
"r": "Rouge",
"v": "Vert",
"b": "bleu", # Je ne sais pas pourquoi le bleu est en minuscule.
}
inp = input("[rvb]: ").lower()
if inp in couleur:
print(couleur[inp])
else:
print("Couleur non reconnue")... | 20.0625 | 65 | 0.632399 |
1087a5d5f74add54159a340cf24536fad4a7d220 | 49,653 | py | Python | python-bildungslogin/src/univention/bildungslogin/handlers.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | python-bildungslogin/src/univention/bildungslogin/handlers.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | python-bildungslogin/src/univention/bildungslogin/handlers.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | #!/usr/share/ucs-test/runner /usr/bin/py.test -s
# -*- coding: utf-8 -*-
#
# Copyright 2021 Univention GmbH
#
# https://www.univention.de/
#
# All rights reserved.
#
# The source code of this program is made available
# under the terms of the GNU Affero General Public License version 3
# (GNU AGPL V3) as published by t... | 46.060297 | 120 | 0.616438 |
dc28f2dfdf6d0ed03309ed73e35284d03512972f | 176 | py | Python | {{ cookiecutter.project_slug }}/{{ cookiecutter.package_name }}/api/v1/__init__.py | Kludex/fastapi-template | 47256eb8f8c7439a4d669172d94ce84c62cdb25a | [
"MIT"
] | 14 | 2021-03-27T22:18:56.000Z | 2022-03-21T19:04:48.000Z | {{ cookiecutter.project_slug }}/{{ cookiecutter.package_name }}/api/v1/__init__.py | Kludex/fastapi-template | 47256eb8f8c7439a4d669172d94ce84c62cdb25a | [
"MIT"
] | 33 | 2021-03-28T21:06:22.000Z | 2022-03-07T14:18:26.000Z | {{ cookiecutter.project_slug }}/{{ cookiecutter.package_name }}/api/v1/__init__.py | Kludex/fastapi-template | 47256eb8f8c7439a4d669172d94ce84c62cdb25a | [
"MIT"
] | null | null | null | from fastapi import APIRouter
from {{cookiecutter.package_name}}.api.v1.home import router as home_router
router = APIRouter(prefix="/v1")
router.include_router(home_router)
| 25.142857 | 75 | 0.806818 |
dc4af027dd23e85af03836afa923f5eb1e37c4b6 | 1,449 | py | Python | common/libs/UploadService.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | 1 | 2020-03-24T04:26:34.000Z | 2020-03-24T04:26:34.000Z | common/libs/UploadService.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | common/libs/UploadService.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from werkzeug.utils import secure_filename
from application import app, db
from common.libs.Helper import get_current_date
import datetime
import os
import stat
import uuid
from common.models.Image import Image
class UploadService():
@staticmethod
def upload_by_file(file):
conf... | 32.2 | 74 | 0.613527 |
8727b5516ff31e9d919f85f9ba8de34030bc333e | 518 | py | Python | exercises/es/test_02_14.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/es/test_02_14.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/es/test_02_14.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
"from spacy.matcher import PhraseMatcher" in __solution__
), "¿Importaste correctamente el PhraseMatcher?"
assert (
"PhraseMatcher(nlp.vocab)" in __solution__
), "¿Inicializaste correctamente el PhraseMatcher?"
assert "matcher(doc)" in __solution__, "¿Llamaste el... | 47.090909 | 95 | 0.708494 |
8777e7c4f8b4f35858193d68729a741965cf12a2 | 409 | py | Python | jump-game-ii/jump-game-ii.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | jump-game-ii/jump-game-ii.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | jump-game-ii/jump-game-ii.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def jump(self, nums: List[int]) -> int:
len_nums=len(nums)
dp=[0]*len_nums
for i, num in enumerate(nums):
for j in range(1, min(num+1, len_nums)):
dest=min(i+j, len_nums-1)
if dp[dest]==0:
dp[dest]=1+dp[i]
... | 34.083333 | 52 | 0.444988 |
0d9a90312be9ebf63ce7bef0945c120c44f17551 | 544 | py | Python | frappe-bench/apps/erpnext/erpnext/stock/doctype/quality_inspection_template/quality_inspection_template.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/stock/doctype/quality_inspection_template/quality_inspection_template.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/stock/doctype/quality_inspection_template/quality_inspection_template.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class QualityInspectionTemplate(Document):
pass
def get_template_details(tem... | 34 | 94 | 0.772059 |
21d203da62c0e548296e194c6fb109470686f5f9 | 1,246 | py | Python | documents/Programmierparadigmen/scripts/python/n-damen.py | keithmannock/LaTeX-examples | 6829f6cf9710b314a4bf0b64abdae5bcf6997fd0 | [
"MIT"
] | 2 | 2017-11-02T10:09:12.000Z | 2017-11-24T22:16:18.000Z | documents/Programmierparadigmen/scripts/python/n-damen.py | everbot/LaTeX-examples | 9558d8b3c19776cb068b9753dcd3f88645dd7134 | [
"MIT"
] | null | null | null | documents/Programmierparadigmen/scripts/python/n-damen.py | everbot/LaTeX-examples | 9558d8b3c19776cb068b9753dcd3f88645dd7134 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def get_next(n, i, damen_pos):
for i in range(n):
candidates = set(list(range(n)))
candidates -= set(damen_pos)
candidates -= set(list(range(damen_pos[i]+1)))
candidates = list(candidates)
if len(candidates) > 0:
da... | 28.318182 | 64 | 0.537721 |
10dd6d7759969be945c83ec39e8ddb39ab6933b1 | 2,546 | py | Python | notebooks/utils/helper.py | data-science-workshops/deep-learning | 6f7c4c6aa2cc3cbf781a89e85137ebfc65faa80a | [
"MIT"
] | 1 | 2019-02-14T14:58:58.000Z | 2019-02-14T14:58:58.000Z | notebooks/utils/helper.py | data-science-workshops/deep-learning | 6f7c4c6aa2cc3cbf781a89e85137ebfc65faa80a | [
"MIT"
] | null | null | null | notebooks/utils/helper.py | data-science-workshops/deep-learning | 6f7c4c6aa2cc3cbf781a89e85137ebfc65faa80a | [
"MIT"
] | 2 | 2018-07-06T16:39:53.000Z | 2018-10-09T17:29:17.000Z | import numpy as np
from os import path, listdir
from scipy import ndimage, misc
def crop(image, x, y, size):
x_start, x_end = x, x+size
y_start, y_end = y, y+size
return image[x_start:x_end,y_start:y_end]
def load_document_images_cropped(size=64, x_start_at=50, y_start_at=50):
X_train, y_train = [],... | 33.5 | 86 | 0.675962 |
80004bdca54326dae749b9e28cbc820b4bd25ea5 | 3,571 | py | Python | bach_code/legacy/rnn.py | glasperfan/thesis | aead2dfb8052afbff4d05203a0be5b0b7ef69462 | [
"Apache-2.0"
] | 5 | 2015-12-08T21:47:41.000Z | 2020-10-28T12:39:08.000Z | bach_code/legacy/rnn.py | glasperfan/thesis | aead2dfb8052afbff4d05203a0be5b0b7ef69462 | [
"Apache-2.0"
] | null | null | null | bach_code/legacy/rnn.py | glasperfan/thesis | aead2dfb8052afbff4d05203a0be5b0b7ef69462 | [
"Apache-2.0"
] | 1 | 2020-10-28T12:39:09.000Z | 2020-10-28T12:39:09.000Z | import h5py
import numpy
# For nn.Sequencer, both input and output are in the form `seqlen * batchsize * featsize`.
# A chorale is a defined as a "batch."
# **`seqlen`** = number of time steps of longest phrase (input/output)
# **`batchsize`** = number of phrases in the chorale
# **`feats`** = number of features p... | 31.052174 | 103 | 0.649958 |
1d4006d4d7b521f514b22b08efc47b4dbba5dce9 | 601 | py | Python | elements/python/5/6/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/5/6/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/5/6/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | import random
def div(x, y):
"""
Compute integer division x//y.
"""
# find largest shift less than x
i = 0
s = y
while s < x:
s <<= 1
i += 1
s >>= 1
i -= 1
d = 0
rem = x
while i >= 0:
if s < rem:
rem -= s
d += 1<<i
... | 13.976744 | 36 | 0.429285 |
d57dd9a93ebb5115efc2877ed4446b05f8c5e4ab | 1,539 | py | Python | scratch/process_pool_doc_example.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | scratch/process_pool_doc_example.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | scratch/process_pool_doc_example.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env pypy3
"""The ProcessPool example from the Python 3.7 documentation:
https://docs.python.org/3.7/library/concurrent.futures.html#processpoolexecutor-example
causes an OSError on exiting when run with pypy3 (PyPy 7.3.2-alpha0 with GCC 10.2.0)
Traceback (most recent call last):
File "/opt/pypy3/lib-pyt... | 30.78 | 90 | 0.699805 |
9821932a27d514da775f9c8f7c7ec10f2b69227d | 1,213 | py | Python | src/onegov/election_day/views/manage/archive.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/manage/archive.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/manage/archive.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from morepath import redirect
from onegov.core.security import Secret
from onegov.election_day import _
from onegov.election_day import ElectionDayApp
from onegov.election_day.collections import ArchivedResultCollection
from onegov.election_day.forms import EmptyForm
from onegov.election_day.layouts import DefaultLayou... | 30.325 | 77 | 0.703215 |
7f81c0b07be886ed026a0b7d922796e717985e01 | 4,018 | py | Python | plugins/tff_backend/api/nodes.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/api/nodes.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/api/nodes.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 2 | 2018-01-10T10:43:12.000Z | 2018-03-18T10:42:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# 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... | 40.18 | 117 | 0.777999 |
d60ed9f4287cb7ec8bf70251d4493f7975f77a39 | 613 | py | Python | ProjectEuler_plus/euler_034.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_034.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_034.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
from math import factorial
# f = [factorial(i) for i in range(0, 10)]
f = [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880]
#digit_factorials = []
#MAX_N = 10 ** 5 + 1
#for i in range(10, MAX_N): # 0.28 sec
# num = i
# total = 0
# while num > 0:
# num, m = divmod(num, ... | 22.703704 | 94 | 0.5677 |
d62c5e75a6dfababf3f6208edaa2babe9dfcc623 | 602 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/misopy/legacy_test_pysplicing.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/misopy/legacy_test_pysplicing.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/misopy/legacy_test_pysplicing.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | ##
## Test Pysplicing (fastmiso)
##
import misopy
import misopy.gff_utils
import pysplicing
gene = pysplicing.createGene( ((1,100), (201,300), (401,500)),
((0,1), (0,2), (0,1,2)) )
pysplicing.noIso(gene)
pysplicing.isoLength(gene)
reads = pysplicing.simulateReads(gene, 0L, (0.2,0.3,0.5... | 22.296296 | 78 | 0.576412 |
c3f857342f3591fbae0d090629f0d9510585715b | 1,772 | py | Python | loadtest/trafficgen/trafficgen/utils.py | harrywong/evt | 95985384619e0f5ff4021e8838d421ac4b4b946d | [
"BSD-3-Clause"
] | 1,411 | 2018-04-23T03:57:30.000Z | 2022-02-13T10:34:22.000Z | loadtest/trafficgen/trafficgen/utils.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 27 | 2018-06-11T10:34:42.000Z | 2019-07-27T08:50:02.000Z | loadtest/trafficgen/trafficgen/utils.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 364 | 2018-06-09T12:11:53.000Z | 2020-12-15T03:26:48.000Z | import struct
import cffi
ffi = cffi.FFI()
ffi.cdef('''
int LZ4_compress(const char* src, char* dst, int isize);
int LZ4_uncompress_unknownOutputSize(const char* src, char* dst, int isize, int max_osize);
int LZ4_compressBound(int isize);
''')
lz4 = ffi.dlopen('lz4')
def compress(src):
dest_len = lz... | 23.012987 | 95 | 0.608352 |
2ef189b249ae7e3c253ff541e06fc06dbd3195a8 | 2,576 | py | Python | app/datasources/manifest.py | geospatial-jeff/cognition-datasources-api | 9c2f0332f231638e5fb615d2293c32a3ad96654d | [
"Apache-2.0"
] | 18 | 2019-03-27T20:09:37.000Z | 2022-02-04T17:38:07.000Z | app/datasources/manifest.py | geospatial-jeff/cognition-datasources-api | 9c2f0332f231638e5fb615d2293c32a3ad96654d | [
"Apache-2.0"
] | 3 | 2019-06-05T15:12:17.000Z | 2020-04-30T17:54:37.000Z | app/datasources/manifest.py | geospatial-jeff/cognition-datasources-api | 9c2f0332f231638e5fb615d2293c32a3ad96654d | [
"Apache-2.0"
] | 3 | 2019-06-29T01:16:37.000Z | 2020-04-30T17:25:26.000Z | from multiprocessing import Process, Pipe
from datasources.sources import collections
class Manifest(dict):
# shouldn't use mutable default
def __init__(self, tags=['all']):
super().__init__()
self.searches = []
self.load_sources(tags)
@property
def sources(self):
for... | 31.802469 | 96 | 0.545807 |
d305396d01a7c6801b2fd1fa0ad70b19bf5a7ea1 | 16,761 | py | Python | app/qa/vmat.py | MePyDo/pygqa | 61cde42ee815968fdd029cc5056ede3badea3d91 | [
"MIT"
] | 3 | 2021-02-25T13:19:52.000Z | 2021-03-03T03:46:46.000Z | app/qa/vmat.py | MedPhyDO/pygqa | 580b2c6028d2299790a38262b795b8409cbfcc37 | [
"MIT"
] | null | null | null | app/qa/vmat.py | MedPhyDO/pygqa | 580b2c6028d2299790a38262b795b8409cbfcc37 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
MT_VMAT_0.1
MT_VMAT_0.2 PicketFence statisch
MT_VMAT_1.1 PicketFence mit rot
MT_VMAT_1.2:error PicketFence mit rot und absichtlichen Fehler
MT_VMAT_2 Variationen von DoseRate und Gantry Speed
MT_VMAT_3 MLC Speed
"""
__author__ = "R. Bauer"
__copyright__ = "MedPhyDO - Machbarkeitsstudien ... | 33.860606 | 209 | 0.489052 |
d36ab8a06a5ac36b7ba1ca329ccd6f7c7cc71d40 | 2,423 | py | Python | Classes/Screen_codes/Game_screen.py | EKaczmarek/BomberMan | a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d | [
"MIT"
] | 1 | 2018-04-30T15:46:47.000Z | 2018-04-30T15:46:47.000Z | Classes/Screen_codes/Game_screen.py | EKaczmarek/BomberMan | a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d | [
"MIT"
] | 1 | 2018-06-03T13:20:19.000Z | 2018-06-03T20:19:25.000Z | Classes/Screen_codes/Game_screen.py | EKaczmarek/BomberMan | a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d | [
"MIT"
] | 1 | 2018-06-03T12:59:11.000Z | 2018-06-03T12:59:11.000Z | import os.path
from PyQt5.QtWidgets import QDialog
from PyQt5.QtCore import pyqtSlot
from PyQt5 import uic
from PyQt5 import QtCore
import requests
import json
qtCreatorFile = os.path.join("Classes", "GUI", "game.ui")
Ui_Dialog, QtBaseClass = uic.loadUiType(qtCreatorFile)
class Game(QDialog, Ui_Dialog):
play_si... | 33.652778 | 329 | 0.657037 |
d3866c37526d9619f150476e1446c232f868d1a3 | 1,167 | py | Python | SensorEvaluation/Script/src/delete_script.py | Falyure/Intelligente-Feinstaubwarnung-Code | 77eadf08384e4fef2182ea85f382cdce91a2b8ba | [
"MIT"
] | null | null | null | SensorEvaluation/Script/src/delete_script.py | Falyure/Intelligente-Feinstaubwarnung-Code | 77eadf08384e4fef2182ea85f382cdce91a2b8ba | [
"MIT"
] | null | null | null | SensorEvaluation/Script/src/delete_script.py | Falyure/Intelligente-Feinstaubwarnung-Code | 77eadf08384e4fef2182ea85f382cdce91a2b8ba | [
"MIT"
] | 1 | 2021-04-21T11:57:42.000Z | 2021-04-21T11:57:42.000Z | import subprocess
import logging
import update_script
MAX_WORKLOAD_IN_PERCENT = 80
if __name__ == "__main__":
# logging setting
logging.basicConfig(format='%(asctime)s %(message)s', level=logging.DEBUG)
logging.getLogger('pika').setLevel(logging.WARNING)
log = logging.getLogger()
# get terminal o... | 32.416667 | 110 | 0.688089 |
9fbe3305e8407d7f6e01b4c3206cb58f48a6dc3b | 823 | py | Python | wooyun_index.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | wooyun_index.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | wooyun_index.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | # -*- coding: utf-8 -*-
# @Author: lock
# @Date: 2017-04-27 14:01:57
# @Last Modified by: lock
# @Last Modified time: 2017-04-27 16:49:26
import glob
import os
from lxml import etree
def main():
write_list=set()
file_list = glob.glob("bugs/*.html")
for f in file_list:
with open(f,'r') as fp:
content = fp.r... | 26.548387 | 110 | 0.622114 |
e28d13c1c058e6c26647d88411563e1336461a3d | 1,065 | py | Python | examples/LaTeX/tex2utf8.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | examples/LaTeX/tex2utf8.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | examples/LaTeX/tex2utf8.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""tex2utf8 - converst all .tex files in a directory to utf-8."""
import sys, os
def convert(root_path: str):
for dirpath, dirnames, filenames in os.walk(root):
for fname in filenames:
if fname.endswith('.tex'):
fpath = os.path.join(dirpath, fname)
... | 31.323529 | 65 | 0.490141 |
038b9065612517e7d7dbf8d8818bf134569d556e | 4,772 | py | Python | Dinsel/ex2/ex2.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 11 | 2017-04-21T11:39:55.000Z | 2022-02-11T20:25:18.000Z | Dinsel/ex2/ex2.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 69 | 2017-04-26T09:30:38.000Z | 2017-08-01T11:31:21.000Z | Dinsel/ex2/ex2.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 53 | 2017-04-20T16:16:11.000Z | 2017-07-19T12:53:01.000Z | #!/usr/bin/env python3
# encoding: UTF-8
"""
Strip down any given XML-File and store the 'amountOfPower' as CSV
@FriedrichDinsel
"""
import os
import sys
import csv
from lxml import etree, objectify
from lxml.etree import XMLSchemaParseError, XMLSyntaxError
from collections import defaultdict
class ParseXML():
... | 33.843972 | 113 | 0.564334 |
039dfb6c739410f7abec3d794d7880b0a1fdd213 | 469 | py | Python | Webpage/utils/tags.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | null | null | null | Webpage/utils/tags.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | 46 | 2022-01-08T12:03:24.000Z | 2022-03-30T08:51:05.000Z | Webpage/utils/tags.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | null | null | null | from django import template
from web.models import frontHeader
'''
Check for Template
@example: {% if request.user|has_group:"Editor" %}
'''
register = template.Library()
@register.filter('has_group')
def has_group(user, group_name):
return user.groups.filter(name=group_name).exists()
@register.simple_tag
def g... | 21.318182 | 55 | 0.748401 |
457de61c83171552e1aa296ff204db524b248436 | 3,931 | py | Python | rnn.py | wmhst7/EmotionAnalysis | e94fbbb5bba4706abcea06f503c9a8da5f60203a | [
"MIT"
] | null | null | null | rnn.py | wmhst7/EmotionAnalysis | e94fbbb5bba4706abcea06f503c9a8da5f60203a | [
"MIT"
] | null | null | null | rnn.py | wmhst7/EmotionAnalysis | e94fbbb5bba4706abcea06f503c9a8da5f60203a | [
"MIT"
] | 2 | 2020-05-29T15:56:13.000Z | 2021-06-03T14:18:39.000Z | import numpy as np
import json, os, sys, random, time
from sklearn.metrics import f1_score, accuracy_score
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data as Data
import torch.optim as optim
t0 = time.time()
# 参数
max_len = 500
batch_size = 64
label_size = 8
embed_size = 300
... | 37.798077 | 91 | 0.64869 |
b30973d56d7526a6dc089a55de5b2fad887a77cb | 3,440 | py | Python | 21-fs-ias-lec/03-BACnetCore/src/core/interface/owned_masterfeed.py | cn-uofbasel/BCN | 2d0852e00f2e7f3c4f7cf30f60c6765f2761f80a | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 21-fs-ias-lec/03-BACnetCore/src/core/interface/owned_masterfeed.py | cn-uofbasel/BCN | 2d0852e00f2e7f3c4f7cf30f60c6765f2761f80a | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 21-fs-ias-lec/03-BACnetCore/src/core/interface/owned_masterfeed.py | cn-uofbasel/BCN | 2d0852e00f2e7f3c4f7cf30f60c6765f2761f80a | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | from .feed import Feed
from .owned_subfeed import OwnedSubFeed
class OwnedMasterFeed(Feed):
"""
This class is the interface to use the own master-feed of this Node. It has functionality that is related
to import/export policies as well as to manage feeds.
"""
def __init__(self, feed_id, storage_c... | 35.463918 | 120 | 0.652326 |
924403d15856801d9ec71cf155a6d6e8388f53cb | 10,374 | py | Python | auswertung/main.py | RobinMarchart/wissenschaftstag-anmeldung | 7bdd6d514451c162de3f159aed0bc34f615721b2 | [
"MIT"
] | null | null | null | auswertung/main.py | RobinMarchart/wissenschaftstag-anmeldung | 7bdd6d514451c162de3f159aed0bc34f615721b2 | [
"MIT"
] | 3 | 2021-10-06T08:37:57.000Z | 2022-02-26T21:15:27.000Z | auswertung/main.py | RobinMarchart/wissenschaftstag-anmeldung | 7bdd6d514451c162de3f159aed0bc34f615721b2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import json
import asyncio
import csv
import aiofiles
import os
import itertools
import functools
import pathlib
import collections
import difflib
import hashlib
import io
Name=collections.namedtuple("Name",["Class","firstName","secondName"])
Registration=collections.namedtuple(... | 43.957627 | 200 | 0.708984 |
a6300c3eacc2da077c3e3767f2b505bc6a1b3ead | 8,495 | py | Python | PSA/execInterface.py | SECURED-FP7/secured-psa-nsm | 20c8f790ebc2d2aa8c33bda1e047f8f29275a0be | [
"Apache-2.0"
] | null | null | null | PSA/execInterface.py | SECURED-FP7/secured-psa-nsm | 20c8f790ebc2d2aa8c33bda1e047f8f29275a0be | [
"Apache-2.0"
] | null | null | null | PSA/execInterface.py | SECURED-FP7/secured-psa-nsm | 20c8f790ebc2d2aa8c33bda1e047f8f29275a0be | [
"Apache-2.0"
] | null | null | null | # -*- Mode:Python;indent-tabs-mode:nil; -*-
#
# File: execInterface.py
# Created: 27/08/2014
# Author: BSC, VTT
# Modified: 2016
# Author: VTT, jju, jk
#
# Description:
# Web service running on the PSA receiving the
# configuration for the PSA from the PSC
#
#
import falcon
import ... | 34.116466 | 129 | 0.525839 |
a679ae1a0e3ba433c36ebbe2e701b72b2076f354 | 124 | py | Python | books/PythonAutomate/scheduling/time_sleep.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/scheduling/time_sleep.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/scheduling/time_sleep.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """time_sleep.py"""
import time
for i in range(3):
print("Tick")
time.sleep(1)
print("Tock")
time.sleep(1)
| 13.777778 | 19 | 0.580645 |
a6a23d2a109363ef6b671e5b5a9183be7aeaf2d7 | 844 | py | Python | exercises/zh/test_04_10.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/zh/test_04_10.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/zh/test_04_10.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert len(TRAINING_DATA) == 4, "训练数据不对,应该有4个例子。"
assert all(
len(entry) == 2 and isinstance(entry[1], dict) for entry in TRAINING_DATA
), "训练数据格式不对。应该是一个元组的列表,元组第二个元素是一个字典。"
assert all(
entry[1].get("entities") for entry in TRAINING_DATA
), "训练数据中的所有标注应该包括实体。"
assert... | 30.142857 | 81 | 0.590047 |
a6c6e64b6d8e05a326152cf103c8126b6b4c5f70 | 211 | py | Python | Algorithms/Implementation/the_hurdle_race.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/the_hurdle_race.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/the_hurdle_race.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
n,k = input().strip().split(' ')
n,k = [int(n),int(k)]
height = list(map(int, input().strip().split(' ')))
if k < max(height):
print(max(height) - k)
else:
print(0)
| 15.071429 | 51 | 0.56872 |
5be8eae26c64d1185ed30b0dd927529322bab2e4 | 9,244 | py | Python | src/onegov/org/forms/resource.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/forms/resource.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/forms/resource.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.form import Form, merge_forms, parse_formcode
from onegov.form.validators import ValidFormDefinition
from onegov.form.filters import as_float
from onegov.org import _
from onegov.org.forms.fields import HtmlField
from onegov.org.forms.generic import DateRangeForm
from onegov.org.forms.generic import ExportF... | 30.110749 | 76 | 0.584271 |
f32ae3b00bd5c4cec169b95db759a26c4b3033b6 | 1,429 | py | Python | tests/onegov/org/test_initial_content.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/org/test_initial_content.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/org/test_initial_content.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null |
import os
from onegov.core.utils import module_path, rchop
from onegov.event import EventCollection, OccurrenceCollection
from onegov.form import FormCollection
from onegov.reservation import ResourceCollection
from onegov.page import PageCollection
def test_initial_content(org_app):
pages = PageCollection(org_... | 31.755556 | 72 | 0.679496 |
3439259cc0eb76c812b9d32e748738980bc02428 | 417 | py | Python | examples/nowcoder/SQL2/migrations/0002_auto_20210409_1208.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 5 | 2020-07-14T07:48:10.000Z | 2021-12-20T21:20:10.000Z | examples/nowcoder/SQL2/migrations/0002_auto_20210409_1208.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 7 | 2021-03-26T03:13:38.000Z | 2022-03-12T00:42:03.000Z | examples/nowcoder/SQL2/migrations/0002_auto_20210409_1208.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 1 | 2021-02-16T07:04:25.000Z | 2021-02-16T07:04:25.000Z | # Generated by Django 3.1.7 on 2021-04-09 04:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('SQL2', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='employees',
name='emp_no',
f... | 21.947368 | 92 | 0.609113 |
1b142df56b48377b6cb2269cf18aeebe5d6a9947 | 721 | py | Python | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_06_Funktionen/04_recursive_functions_with_turtle.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_06_Funktionen/04_recursive_functions_with_turtle.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_06_Funktionen/04_recursive_functions_with_turtle.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: 04_recursive_functions_with_turtle.py
# Project: Kapitel_06_Funktionen
# Created Date: Sunday 24.02.2019, 12:33
# Author: Apop85
# -----
# Last Modified: Sunday 24.02.2019, 12:45
# -----
# Copyright (c) 2019 Apop85
# This software is published under the MIT lice... | 24.862069 | 87 | 0.696255 |
942a99b27dded80f0f2b5333424b48e419447d19 | 430 | py | Python | tools/__init__.py | pchaos/wanggejiaoyi | 60242d465bf10d4be46ee6eafc99557affc2a52e | [
"MIT"
] | 15 | 2018-05-16T02:39:01.000Z | 2021-05-22T13:12:55.000Z | tools/__init__.py | pchaos/wanggejiaoyi | 60242d465bf10d4be46ee6eafc99557affc2a52e | [
"MIT"
] | null | null | null | tools/__init__.py | pchaos/wanggejiaoyi | 60242d465bf10d4be46ee6eafc99557affc2a52e | [
"MIT"
] | 9 | 2018-05-16T00:47:34.000Z | 2021-11-26T05:39:48.000Z | # -*- coding: utf-8 -*-
"""
-------------------------------------------------
@File : __init__.py.py
Description :
@Author : pchaos
date: 2018-4-10
-------------------------------------------------
Change Activity:
18-4-10:
@Contact : p19992003#gmail.com
---------... | 19.545455 | 49 | 0.348837 |
9461397531e2cbf254b62310a0b8ac4dd974eec3 | 3,607 | py | Python | paddlenlp/ops/faster_transformer/sample/bart_inference.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | paddlenlp/ops/faster_transformer/sample/bart_inference.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | paddlenlp/ops/faster_transformer/sample/bart_inference.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... | 31.920354 | 87 | 0.675353 |
84ee1bace2c3e9c36aeb9b2cf11efe654574b8e7 | 994 | py | Python | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/05_kapitel_05_repetitionsaufgabe_04_leap_years.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/05_kapitel_05_repetitionsaufgabe_04_leap_years.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/05_kapitel_05_repetitionsaufgabe_04_leap_years.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: 05_kapitel_05_repetitionsaufgabe_04_leap_years.py
# Project: Kapitel_05_Kontrollstrukturen
# Created Date: Saturday 23.02.2019, 22:34
# Author: Apop85
# -----
# Last Modified: Saturday 23.02.2019, 22:42
# -----
# Copyright (c) 2019 Apop85
# This software is publ... | 32.064516 | 92 | 0.685111 |
ca71cba8fbda6adfe199945b4814220a0e170b4d | 7,356 | py | Python | research/cv/EDSR/src/edsr.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/EDSR/src/edsr.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/EDSR/src/edsr.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... | 35.708738 | 101 | 0.583197 |
1e7292bf50866e182d86b00d0f32e7de3358b7b2 | 1,465 | py | Python | prices/cached_info.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T13:06:11.000Z | 2021-06-23T13:06:11.000Z | prices/cached_info.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T21:21:52.000Z | 2021-06-23T21:21:52.000Z | prices/cached_info.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-28T19:14:19.000Z | 2021-06-28T19:14:19.000Z | from functools import wraps
import datetime as dt
import json
import time
from ParsingAndScraping.ivi import parser as parser_ivi
from ParsingAndScraping.megogo import parser as parser_megogo
from ParsingAndScraping.Netflix import parcer as parser_netflix
from ParsingAndScraping.wink import parser as parser_wink
def ... | 24.416667 | 79 | 0.715358 |
bfcb0479d6219207014ecae3237d33ca3aec7de8 | 2,425 | py | Python | research/cv/FaceDetection/bin.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/FaceDetection/bin.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/FaceDetection/bin.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... | 31.493506 | 79 | 0.640825 |
01eca69edf8fdd769d69eeeb8fbccad8911925d4 | 2,201 | py | Python | packages/watchmen-model/src/watchmen_model/chart/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-model/src/watchmen_model/chart/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-model/src/watchmen_model/chart/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from .chart import BarChart, BarChartSettings, BarChartSettingsLabel, BarChartSettingsSeries, BarLabelPosition, \
BooleanItem, Chart, ColorItem, CountChart, CountChartSettings, CountChartSettingsText, CustomizedChart, \
CustomizedChartSettings, DefItem, DoughnutChart, DoughnutChartSettings, DropdownItem, DropdownItem... | 91.708333 | 117 | 0.871422 |
1709cc2b9d11df622a099edc29082810cf4c79e6 | 996 | py | Python | docker/composetest/app.py | gitmehedi/cloudtuts | 3008b1cf7fbf22728c9bb2c059c4bd196043a93e | [
"Unlicense"
] | 3 | 2019-08-29T10:14:40.000Z | 2021-03-05T09:50:15.000Z | docker/composetest/app.py | gitmehedi/cloudtuts | 3008b1cf7fbf22728c9bb2c059c4bd196043a93e | [
"Unlicense"
] | null | null | null | docker/composetest/app.py | gitmehedi/cloudtuts | 3008b1cf7fbf22728c9bb2c059c4bd196043a93e | [
"Unlicense"
] | 1 | 2021-03-05T09:50:29.000Z | 2021-03-05T09:50:29.000Z | import time
import redis
from flask import Flask
app = Flask(__name__)
cache = redis.Redis(host='cache', port=6379)
def get_hit_count():
retries = 5
while True:
try:
return cache.incr('hits')
except redis.exceptions.ConnectionError as exc:
if retries == 0:
... | 23.162791 | 131 | 0.606426 |
173dd467f59ce109ad8f0eee3614d4203b5c9d40 | 873 | py | Python | python_gui_tkinter/KALU/GARBAGE1/root_overide.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/KALU/GARBAGE1/root_overide.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/KALU/GARBAGE1/root_overide.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import tkinter as tk
from tkinter import messagebox
class App(tk.Tk):
def __init__(self):
tk.Tk.__init__(self)
self.title("Handling WM_DELETE_WINDOW protocol")
self.geometry("500x300+500+200")
self.make_topmost()
self.protocol("WM_DELETE_WINDOW", self.on_exit)
def on_... | 27.28125 | 83 | 0.621993 |
bd91988a1c4eb20bc07a48bc7cb3ccccff5f72b4 | 1,852 | py | Python | src/test/tests/hybrid/exprList.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/hybrid/exprList.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/hybrid/exprList.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: exprList.py
# Tests: Expression list contents as windows are added and we switch
# between databases that have expressions.
#
# Defect ID: VisIt00003955
#
# Programmer: Brad Whitloc... | 28.492308 | 79 | 0.681425 |
00c2b3d1d6ed51aa9cf6e526db59088e6254ee39 | 816 | py | Python | Packs/FeedFastly/Integrations/FeedFastly/FeedFastly.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/FeedFastly/Integrations/FeedFastly/FeedFastly.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/FeedFastly/Integrations/FeedFastly/FeedFastly.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
from JSONFeedApiModule import * # noqa: E402
def main():
params = {k: v for k, v in demisto.params().items() if v is not None}
params['feed_name_to_config'] = {
'CIDR': {
'url': 'https://api.fastly.com/public-ip-list',
... | 26.322581 | 73 | 0.560049 |
972b5f0113a7849f4b39deaa05717d7e197f9065 | 89 | py | Python | data_tests/saved__backend__py3.9/python/default_params.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | data_tests/saved__backend__/python/default_params.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | data_tests/saved__backend__/python/default_params.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | def func(a=1, b=None, c=1.0):
print(b)
return a + c
__transonic__ = ("0.4.0",)
| 12.714286 | 29 | 0.52809 |
974783da47b80a426d82b6df89297fa8846acfac | 1,112 | py | Python | project/init_data.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | null | null | null | project/init_data.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | 35 | 2022-01-24T22:15:59.000Z | 2022-03-31T15:01:35.000Z | project/init_data.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | null | null | null | import os
from project import app, db
from project.api import add_oauth2_scheme_with_transport
from project.services.user import upsert_user_role
@app.before_first_request
def add_oauth2_scheme():
# At some sites the https scheme is not set yet
insecure = os.getenv("AUTHLIB_INSECURE_TRANSPORT", "False").lowe... | 28.512821 | 88 | 0.696043 |
8ae0ebaeae5fc004837466325c28d5235bcb0fc2 | 491 | py | Python | notebooks_and_scripts/graph_miner/utils/get_cached_page.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | notebooks_and_scripts/graph_miner/utils/get_cached_page.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | notebooks_and_scripts/graph_miner/utils/get_cached_page.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | """Submodule providing a simple downloader of pages with caching layer."""
from cache_decorator import Cache
import requests
@Cache(
cache_path="cached_pages/{_hash}.txt",
validity_duration=60*60*24*7
)
def get_cached_page(url: str) -> str:
"""Returns text from the given page url."""
no_cache_header =... | 27.277778 | 74 | 0.672098 |
e7e2aac09e797583c6720d11eec384fd2d091552 | 2,534 | py | Python | src/pfun/console.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 126 | 2019-09-16T15:28:20.000Z | 2022-03-20T10:57:53.000Z | src/pfun/console.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 54 | 2019-09-30T08:44:01.000Z | 2022-03-20T11:10:00.000Z | src/pfun/console.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 11 | 2020-01-02T08:32:46.000Z | 2022-03-20T11:10:24.000Z | from __future__ import annotations
from typing import NoReturn
from typing_extensions import Protocol
from .effect import Effect, Success, add_repr, depend, purify_io_bound
from .immutable import Immutable
class Console(Immutable):
"""
Module that enables printing to stdout and reading from stdin
"""
... | 25.089109 | 78 | 0.578137 |
99d77c103c9849178ec49153e8628e1c50e63312 | 1,741 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v8_1/delete_deprecated_reports.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_1/delete_deprecated_reports.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_1/delete_deprecated_reports.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
""" delete deprecated reports """
reports = [
"Monthly Salary Register", "Customer Addresses And Contacts",
"Supplier Addresses And Contac... | 32.240741 | 87 | 0.742102 |
ec5235469eb093775e8c9c41bf19a8ea189fa267 | 544 | py | Python | jburt/types.py | jbburt/jburt | 7745491214ef2b665ca8d1fc526bc802a36985ff | [
"MIT"
] | null | null | null | jburt/types.py | jbburt/jburt | 7745491214ef2b665ca8d1fc526bc802a36985ff | [
"MIT"
] | null | null | null | jburt/types.py | jbburt/jburt | 7745491214ef2b665ca8d1fc526bc802a36985ff | [
"MIT"
] | null | null | null | import pathlib
from typing import Generic
from typing import TypeVar
import numpy as np
Shape = TypeVar("Shape")
DType = TypeVar("DType")
PathLike = TypeVar('PathLike', str, pathlib.Path)
Numeric = TypeVar('Numeric', int, float, complex, np.number)
class Array(np.ndarray, Generic[Shape, DType]):
"""
Use thi... | 23.652174 | 60 | 0.661765 |
2e3b663cbbe439799096fbc980cb0364a82c8624 | 5,403 | py | Python | Utils/py/GoPro/utils/GameLoggerSql.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/GoPro/utils/GameLoggerSql.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/GoPro/utils/GameLoggerSql.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import queue
import sqlite3
import threading
import time
from utils import Logger, blackboard
# setup logger for network related logs
logger = Logger.getLogger("GoPro")
class GameLoggerSql(threading.Thread):
def __init__(self, db, teams=None):
super().__init__()
self.__cancel = threading.Event... | 57.478723 | 351 | 0.553026 |
51fa8bb0d5134f75cce59a34d8ae1e1121eb4f31 | 747 | py | Python | python/generator_tricks_for_systemprogrammer/genqueue.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator_tricks_for_systemprogrammer/genqueue.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator_tricks_for_systemprogrammer/genqueue.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # genqueue.py
#
# Generate a sequence of items that put onto a queue
def genfrom_queue(thequeue):
while True:
item = thequeue.get()
if item is StopIteration:
break
yield item
def sendto_queue(items, thequeue):
for item in items:
thequeue.put(item)
... | 21.342857 | 62 | 0.597055 |
cf9168449a611e8e07e378a29e409892aa547aad | 2,179 | py | Python | 数据结构/NowCode/7_MinNumberInRotateArray.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | null | null | null | 数据结构/NowCode/7_MinNumberInRotateArray.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | 3 | 2020-08-14T07:50:27.000Z | 2020-08-14T08:51:06.000Z | 数据结构/NowCode/7_MinNumberInRotateArray.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | 2 | 2021-03-14T05:58:45.000Z | 2021-08-29T17:25:52.000Z | # 旋转数组的最小数字
# 把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转。
# 输入一个非递减排序的数组的一个旋转,输出旋转数组的最小元素。
# 例如数组{3,4,5,1,2}为{1,2,3,4,5}的一个旋转,该数组的最小值为1。
# NOTE:给出的所有元素都大于0,若数组大小为0,请返回0。
class Solution:
def minNumberInRotateArray(self, rotateArray):
minNum = 0
# 第一种方法,就是遍历所以的元素,找出最小的
for i in range(0, len(rotateArray)... | 33.015152 | 110 | 0.547958 |
cfa6107bed80aed481ef53a382cd846f597189e0 | 1,507 | py | Python | Python/SVM_draw_diagrammatic_sketch.py | 595666666/tripping | f448300c31de96089b855ee9774068d748b0cd31 | [
"BSD-3-Clause"
] | 3 | 2021-06-04T06:07:12.000Z | 2022-03-05T16:03:16.000Z | Python/SVM_draw_diagrammatic_sketch.py | 595666666/tripping | f448300c31de96089b855ee9774068d748b0cd31 | [
"BSD-3-Clause"
] | null | null | null | Python/SVM_draw_diagrammatic_sketch.py | 595666666/tripping | f448300c31de96089b855ee9774068d748b0cd31 | [
"BSD-3-Clause"
] | null | null | null | # Title : SVM - draw the diagrammatic sketch
# Objective : draw the diagrammatic sketch for SVM. Note that it is not the code for SVM
# Created by: Wu Shangbin
# Created on: 2021/12/8
import numpy as np
import matplotlib.pyplot as plt
from sklearn.svm import LinearSVC
from sklearn.preprocessing import StandardScale... | 35.046512 | 120 | 0.679496 |
cfbd51556cc65c0cd8aa7c41b25472c594e20479 | 1,474 | py | Python | marsyas-vamp/marsyas/src/swig/python/chroma.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/swig/python/chroma.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/swig/python/chroma.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | # EXAMPLE OF USING Marsyas together with PyLab
# for MATLAB-like plotting
# run using ipython -pylab chroma
#!/usr/bin/env python
from pylab import *
import sys
from marsyas import *
msm = MarSystemManager()
# src = msm.create("SineSource/src")
src = msm.create("SoundFileSource/src")
spk = msm.create("Spectrum... | 23.396825 | 75 | 0.706242 |
cfcfe91aec7fe0d8f50d7a16fbc0742526555b2a | 450 | py | Python | python/encapsulation/python_basic_enc.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/encapsulation/python_basic_enc.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/encapsulation/python_basic_enc.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | class Phone:
username = 'Kate' # public variable
__how_many_times_turn_on = 0 # private variable
def call(self): # public method
print('Ring-ring!')
def __turn_on(self): # private method
self.__how_many_times_turn_on += 1
print('Time ... | 26.470588 | 67 | 0.615556 |
cfde82dbafb294f34d84b7d24fd4d159215e493f | 4,010 | py | Python | Packs/CommonScripts/Scripts/ZipFile/ZipFile.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/ZipFile/ZipFile.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/ZipFile/ZipFile.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
import re
import shutil
import zipfile
import pyminizip
from os.path import isfile
ESCAPE_CHARACTERS = r'[/\<>"|?*]'
def escape_illegal_characters_in_file_name(file_name: str) -> str:
if file_name:
file_n... | 34.568966 | 118 | 0.588529 |
713a64769d0d5f240cfde9a5f2a94c2bc5a37b67 | 771 | py | Python | users/urls.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | users/urls.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | users/urls.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | from django.urls import path
from .views import (
UserList,
UserCreate,
UserRetrieveUpdateDestroy,
ProfileList,
ProfileRetrieveUpdate,
UserPhotoListCreate,
UserPhotoRetrieveUpdateDestroy,
)
urlpatterns = [
path("", UserList.as_view(), name="users"),
path("create", UserCreate.as_view... | 28.555556 | 88 | 0.661479 |
856659606a4dfec41dc6df79828940905c00d8ea | 1,912 | py | Python | 7-assets/past-student-repos/Whiteboard-Pairing-master/KthToLastNode/model_solution.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/Whiteboard-Pairing-master/KthToLastNode/model_solution.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/Whiteboard-Pairing-master/KthToLastNode/model_solution.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # This algorithm maintains a k-wide 'window' with two pointers
# and makes one walk down the linked list. When the pointer in
# front reaches the end of the list, the second pointer will be
# at the node we're looking for.
# Another approach could be walking down the list to count the
# length of the list, subtract k ... | 28.969697 | 83 | 0.67887 |
a48f743cccce769cc8388e6b6b97148cbcedd03e | 208 | py | Python | crm/admin.py | baniasbaabe/happy-qr | bf44ac19306ea6405cc7c9a100e6f83afca125b4 | [
"MIT"
] | 1 | 2021-01-23T21:42:10.000Z | 2021-01-23T21:42:10.000Z | crm/admin.py | baniasbaabe/happy-qr | bf44ac19306ea6405cc7c9a100e6f83afca125b4 | [
"MIT"
] | null | null | null | crm/admin.py | baniasbaabe/happy-qr | bf44ac19306ea6405cc7c9a100e6f83afca125b4 | [
"MIT"
] | null | null | null | from django.contrib import admin
# Register your models here.
from crm.models import *
admin.site.register(Mitarbeiter)
admin.site.register(Kunde)
admin.site.register(Auftrag)
admin.site.register(Rechnung)
| 20.8 | 32 | 0.807692 |
7791947208651a117afb3a7e4620544070c8b113 | 2,207 | py | Python | Paddle_Industry_Practice_Sample_Library/nlp_projects/nlu/ernie/data.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 1 | 2022-03-19T09:58:37.000Z | 2022-03-19T09:58:37.000Z | Paddle_Industry_Practice_Sample_Library/nlp_projects/nlu/ernie/data.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null | Paddle_Industry_Practice_Sample_Library/nlp_projects/nlu/ernie/data.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 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... | 40.87037 | 127 | 0.706389 |
77a6afaae49ff553a7bbc8c7c2fc714421f48e17 | 454 | py | Python | Interview Preparation Kits/1 Week Preparation Kit/Day 1/Mini-Max Sum/minimax_sum.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Interview Preparation Kits/1 Week Preparation Kit/Day 1/Mini-Max Sum/minimax_sum.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Interview Preparation Kits/1 Week Preparation Kit/Day 1/Mini-Max Sum/minimax_sum.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'miniMaxSum' function below.
#
# The function accepts INTEGER_ARRAY arr as parameter.
#
def miniMaxSum(arr):
# Write your code here
min_number = min(arr)
max_number = max(arr)
total = sum(arr)
print(total - m... | 15.655172 | 54 | 0.676211 |
70a978ab744f31992c772067c8dc0b616c016048 | 1,069 | pyde | Python | sketches/grid/grid.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/grid/grid.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/grid/grid.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | import math
# Range of x-values
xmin = -6
xmax = 6
# Range of y-values
ymin = -2
ymax = 2
# Calculate the range
rangex = xmax - xmin
rangey = ymax - ymin
def setup():
global xscl, yscl
size(600, 200)
this.surface.setTitle("Sinus und Cosinus")
xscl = width/rangex
yscl = -height/rangey
def draw()... | 22.270833 | 78 | 0.579046 |
5635bcd07e97a92fec9c052ad0dacce6163a2b31 | 567 | py | Python | musterloesungen/6.2/mitte.py | giu/appe6-uzh-hs2018 | 204dea36be1e53594124b606cdfa044368e54726 | [
"MIT"
] | null | null | null | musterloesungen/6.2/mitte.py | giu/appe6-uzh-hs2018 | 204dea36be1e53594124b606cdfa044368e54726 | [
"MIT"
] | null | null | null | musterloesungen/6.2/mitte.py | giu/appe6-uzh-hs2018 | 204dea36be1e53594124b606cdfa044368e54726 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Kurs: Python: Grundlagen der Programmierung für Nicht-Informatiker
# Semester: Herbstsemester 2018
# Homepage: http://accaputo.ch/kurs/python-uzh-hs-2018/
# Author: Giuseppe Accaputo
# Aufgabe: 6.2
def mitte(liste):
# Kopiere zuerst alle Elemente in eine neue Li... | 29.842105 | 76 | 0.664903 |
5636e2f9f67c817036c05ae50b34012278f49820 | 4,295 | py | Python | rbac/ledger_sync/deltas/handlers.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 75 | 2018-04-06T09:13:34.000Z | 2020-05-18T18:59:47.000Z | rbac/ledger_sync/deltas/handlers.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 989 | 2018-04-18T21:01:56.000Z | 2019-10-23T15:37:09.000Z | rbac/ledger_sync/deltas/handlers.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 72 | 2018-04-13T18:29:12.000Z | 2020-05-29T06:00:33.000Z | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# 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 ... | 35.495868 | 80 | 0.620955 |
3b366864e8ecb22a174f9ff79d7bc08697422efd | 3,484 | py | Python | tcp_manager.py | zapfdk/broadcast-clock | b88d8daad784bc9fe06b00b50d3f56ceb16dfc96 | [
"MIT"
] | null | null | null | tcp_manager.py | zapfdk/broadcast-clock | b88d8daad784bc9fe06b00b50d3f56ceb16dfc96 | [
"MIT"
] | null | null | null | tcp_manager.py | zapfdk/broadcast-clock | b88d8daad784bc9fe06b00b50d3f56ceb16dfc96 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 29 14:36:12 2016
@author: Dominik
"""
import socket
import sys
import time_manager as tm
class TCPManager():
def __init__(self, tcp_ip, tcp_port, buffer_size):
self.TCP_IP = tcp_ip
self.TCP_PORT = tcp_port
self.BUFFER_SI... | 31.107143 | 81 | 0.518083 |
d91ff157d04047d6fe7ff8d220e1f21af9d25ccc | 7,997 | py | Python | Packs/Tanium/Integrations/Tanium/Tanium_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Tanium/Integrations/Tanium/Tanium_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Tanium/Integrations/Tanium/Tanium_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z |
RAW_JSON_RESPONSE_1 = [
{
"row0": [
{
"column.display_name": "header1",
"column.result_type": "DataSize",
"column.values": [
"col1"
],
"column.what_hash": 0
},
{
... | 25.387302 | 55 | 0.404402 |
79bb5b119c754bb9965eb48fce1fd72df4e2a302 | 18,075 | py | Python | src/diagrams/icons/ciscoPng.py | kkaruso/niv | 67ba82c93279db4dae503d4dceec7ba5e9931c0a | [
"MIT"
] | null | null | null | src/diagrams/icons/ciscoPng.py | kkaruso/niv | 67ba82c93279db4dae503d4dceec7ba5e9931c0a | [
"MIT"
] | null | null | null | src/diagrams/icons/ciscoPng.py | kkaruso/niv | 67ba82c93279db4dae503d4dceec7ba5e9931c0a | [
"MIT"
] | null | null | null | # This module is automatically generated by autogen.sh. DO NOT EDIT.
from src.diagrams.icons import _ICONS
class _Cisco(_ICONS):
_type = "cisco"
_icon_dir = "../resources/icons/cisco/png"
class BasetHubPng(_Cisco):
_icon = "100basethub.png"
class a10700Png(_Cisco):
_icon = "10700.png"
class GeF... | 15.382979 | 68 | 0.706113 |
a50761caa0b46632460d8f5ce5b47127c75474e0 | 2,316 | py | Python | tarefas-poo/lista-03/relogio/view/paineis/painel_manipula_relogio.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-03/relogio/view/paineis/painel_manipula_relogio.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-03/relogio/view/paineis/painel_manipula_relogio.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5663
# Exercício do Relógio
# --------------------------
# Classe que permite realiar diversas operações com um relógio.
#
from view.menu import Menu
class PainelManipulaRelogio:
def manipule(self, relogio):
opcoes = {
0: 'Voltar',
... | 37.354839 | 69 | 0.489206 |
eb5796deef93e69f95162be76471361388cf3de6 | 283 | py | Python | Project Euler Questions 21 - 30/Project Euler Question 29.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | 1 | 2020-02-11T02:03:02.000Z | 2020-02-11T02:03:02.000Z | Project Euler Questions 21 - 30/Project Euler Question 29.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | Project Euler Questions 21 - 30/Project Euler Question 29.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | #Project Euler Question 29
#Distinct Powers
def power_set(x):
power_list = set()
for a in range(2,(x+1)):
for b in range(2,(x+1)):
power = (a**b)
power_list.add(power)
#print (power_list)
return len(power_list)
print (power_set(100)) | 21.769231 | 33 | 0.586572 |
79e17a1217aabebb82ed1b4bfe670eeaa3c3546a | 1,874 | py | Python | Memory.py | K-A-R-I-M/SonKa | 3ff5b95afa2f3c968cdaf670f27e6abc813907e4 | [
"MIT"
] | 1 | 2020-07-30T15:46:06.000Z | 2020-07-30T15:46:06.000Z | Memory.py | K-A-R-I-M/SonKa | 3ff5b95afa2f3c968cdaf670f27e6abc813907e4 | [
"MIT"
] | null | null | null | Memory.py | K-A-R-I-M/SonKa | 3ff5b95afa2f3c968cdaf670f27e6abc813907e4 | [
"MIT"
] | null | null | null | import os
"""
var pour tout SONKA
"""
dir_audio = "audio"
dir_sauvegarde_playlist = "memoire_playlist"
dos_memoire_touche = "memoire_touche"
fichier_touche_next = "touche_next.ka"
fichier_touche_pause = "touche_play_pause.ka"
trait = "__________________________________________________________"
trait_2 = "---------... | 20.822222 | 74 | 0.610993 |
0632af634266f6d5340c908b2833d00473725197 | 2,874 | py | Python | haas_lib_bundles/python/docs/examples/lbs_demo/haas506/code/lbs.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/lbs_demo/haas506/code/lbs.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/lbs_demo/haas506/code/lbs.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: UTF-8 -*-
import net
import http
import ujson
class LBS():
def __init__(self):
self.requesturl = ''
self.url = 'http://apilocate.amap.com/position'
self.accesstype = 0
#input your key here
self.key = 'yourKey'
self.cdma = 0
self.output = 'json'
... | 32.292135 | 206 | 0.452331 |
063d28e85afe536fa706676bc889f8941276bb8f | 546 | py | Python | blog.py | cyborg00222/kowalsky.at | 090778863625b67bce942fe85716941c3bf75a4b | [
"MIT"
] | null | null | null | blog.py | cyborg00222/kowalsky.at | 090778863625b67bce942fe85716941c3bf75a4b | [
"MIT"
] | null | null | null | blog.py | cyborg00222/kowalsky.at | 090778863625b67bce942fe85716941c3bf75a4b | [
"MIT"
] | null | null | null | # Peter Kowalsky - 10.06.19
import os
from datetime import datetime
from utils import list_all_files_in_dir
empty_string = ''
def dynamic(txt_src_folder):
files = list_all_files_in_dir(txt_src_folder, ".md")
md = ""
i = 1
for f in files:
last_modified = datetime.utcfromtimestamp(int(os.stat(txt_src_folde... | 28.736842 | 118 | 0.626374 |
237de94230023003577cf82599b56ee6626f4abe | 105 | py | Python | USACOClassGold/src/makefactoriallist.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | USACOClassGold/src/makefactoriallist.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | USACOClassGold/src/makefactoriallist.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | x = 1
nums = []
for i in range(1,20 + 1):
x = x * i
nums.append(x)
print(",".join(map(str,nums))) | 17.5 | 30 | 0.514286 |
88c054d88cd4940084179835c93f38cafa1c9c78 | 689 | py | Python | ArtificialIntelligence/BotBuilding/botcleanlarge.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | ArtificialIntelligence/BotBuilding/botcleanlarge.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | ArtificialIntelligence/BotBuilding/botcleanlarge.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | def next_move(posr, posc, dimx, dimy, board):
dr, dc = get_next_dirt(board, dimx, dimy)
if(posc != dc):
move = (posc < dc) and 'RIGHT' or 'LEFT'
elif(posr != dr):
move = (posr < dr) and 'DOWN' or 'UP'
else:
move = 'CLEAN'
print(move)
def get_next_dirt(board, x,y):
... | 29.956522 | 65 | 0.513788 |
cca00e8046384fc06b977eea04d4e7ab2e89a493 | 783 | py | Python | Contests/CCC/CCC '00 J4 - Babbling Brooks.py | MastaCoder/Projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | 5 | 2018-10-11T01:55:40.000Z | 2021-12-25T23:38:22.000Z | Contests/CCC/CCC '00 J4 - Babbling Brooks.py | MastaCoder/mini_projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | null | null | null | Contests/CCC/CCC '00 J4 - Babbling Brooks.py | MastaCoder/mini_projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | 1 | 2019-02-22T14:42:50.000Z | 2019-02-22T14:42:50.000Z | def join_strms(s):
s -= 1
st = paths
newst = st[s] + st[s+1]
st.remove(st[s+1])
st.remove(st[s])
st.insert(s, newst)
return st
def split_strms(s, l):
s -= 1
st = paths
perc = l/100
# print(perc)
left = st[s]*perc
right = st[s] - left
st.remove(st[s])
st.inser... | 19.097561 | 41 | 0.526181 |
d1aa0fff4aacba059816c7869f140b93901071e5 | 1,515 | py | Python | moviemon/classes/movies.py | 42bbichero/MovieMon | 4fee28e0449429ffcd3e0a284365a7f3e7c64e3d | [
"MIT"
] | null | null | null | moviemon/classes/movies.py | 42bbichero/MovieMon | 4fee28e0449429ffcd3e0a284365a7f3e7c64e3d | [
"MIT"
] | null | null | null | moviemon/classes/movies.py | 42bbichero/MovieMon | 4fee28e0449429ffcd3e0a284365a7f3e7c64e3d | [
"MIT"
] | 1 | 2019-01-12T10:42:25.000Z | 2019-01-12T10:42:25.000Z |
import requests
API_KEY = '39d6b0d3'
class Movies:
def __init__(self, ids=['tt0111161'], img_dir='.', movies=None):
if movies is not None:
self.movies = movies
else:
self.movies = dict()
for m in ids:
self.movies[m] = dict()
# download information for the movie
... | 26.578947 | 66 | 0.557756 |
d1d9d3a9fd816193ec03229c13b4fcf48ace2ea7 | 4,376 | py | Python | zplus_scraper/spiders/zplus_spider.py | tstaec/ZplusScraper | 38c4f9534b8ee3822a80b48a6827ef4f52793c0b | [
"MIT"
] | null | null | null | zplus_scraper/spiders/zplus_spider.py | tstaec/ZplusScraper | 38c4f9534b8ee3822a80b48a6827ef4f52793c0b | [
"MIT"
] | 1 | 2021-07-04T12:02:57.000Z | 2021-07-04T12:02:57.000Z | zplus_scraper/spiders/zplus_spider.py | tstaec/ZplusScraper | 38c4f9534b8ee3822a80b48a6827ef4f52793c0b | [
"MIT"
] | null | null | null | import logging
import scrapy
class ZplusSpider(scrapy.Spider):
name = 'ZplusSpider'
allowed_domains = ['www.zeit.de']
start_urls = [
'https://www.zeit.de/index',
'https://www.zeit.de/gesellschaft/index',
'https://www.zeit.de/wirtschaft/index',
'https://www.zeit.de/kultur/i... | 45.113402 | 765 | 0.678931 |
0608d1e5ea662480c65f0e1a17a145f8ace0d3ff | 474 | py | Python | Hackerrank_problems/FizzBuzz/Solution2.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | Hackerrank_problems/FizzBuzz/Solution2.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | Hackerrank_problems/FizzBuzz/Solution2.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | def fizzbuzz(x):
"""FizzBuzz challenge
scan through 1 to 100 and tell which numbers are fizz, buzz, or fizzbuzz
fizz - a number divisible by 3
buzz - a number divisible by 5
fizzbuzz - a number divisible by 5 and 3
"""
for i in range(x):
i += 1
if i % 3 == 0 and i % 5 == 0:
print("fizzbuzz")
e... | 22.571429 | 72 | 0.535865 |
882c8fa6188afebac3eefde1cca8789986254eba | 1,044 | py | Python | notebooks/1.-processing.py | xbelda/movielens-recommender | 1e1335e2a2b9f57b948916ff415af149938caa33 | [
"MIT"
] | null | null | null | notebooks/1.-processing.py | xbelda/movielens-recommender | 1e1335e2a2b9f57b948916ff415af149938caa33 | [
"MIT"
] | null | null | null | notebooks/1.-processing.py | xbelda/movielens-recommender | 1e1335e2a2b9f57b948916ff415af149938caa33 | [
"MIT"
] | null | null | null | # ---
# jupyter:
# jupytext:
# formats: ipynb,py:light
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.13.1
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
# name: python3
# ---
# cd ..
imp... | 24.27907 | 156 | 0.644636 |
884f679da8e460734e311e86f7cdfe541f3cde4f | 115 | py | Python | minutesToSeconds.py | mrmayurs4/Hacktoberfest-2020 | f2bc129bd8574d5870b9595a019bff3baddeaf73 | [
"MIT"
] | null | null | null | minutesToSeconds.py | mrmayurs4/Hacktoberfest-2020 | f2bc129bd8574d5870b9595a019bff3baddeaf73 | [
"MIT"
] | null | null | null | minutesToSeconds.py | mrmayurs4/Hacktoberfest-2020 | f2bc129bd8574d5870b9595a019bff3baddeaf73 | [
"MIT"
] | null | null | null | x = int(input("Enter the number of minutes"))
sec = x*60
print (str(x) + " minutes in seconds are " + str(sec))
| 28.75 | 55 | 0.626087 |
888f23d1225a34c0332305aeeda287b7104f1a45 | 1,385 | py | Python | IVTp/2014/TITOV_S_G/task_8_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/TITOV_S_G/task_8_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/TITOV_S_G/task_8_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 8. Вариант 22.
# Доработайте игру "Анаграммы" так, чтобы к каждому слову полагалась подсказка. Игрок должен получать право на подсказку в том случае, если у него нет никаких предположений. Разработайте систему начисления очков, по которой бы игроки, отгадавшие слово без подсказки, получали больше тех, кто запр... | 32.209302 | 311 | 0.666426 |
ee89aded4e69682ca225e1a9ea18e2e435f3b88d | 222 | py | Python | lang-python/lxml/lxml_import/lxml_main.py | xd23fe39/technical-notes | bb6348705a95db24d07b1081b1aa0265dda131ce | [
"MIT"
] | null | null | null | lang-python/lxml/lxml_import/lxml_main.py | xd23fe39/technical-notes | bb6348705a95db24d07b1081b1aa0265dda131ce | [
"MIT"
] | null | null | null | lang-python/lxml/lxml_import/lxml_main.py | xd23fe39/technical-notes | bb6348705a95db24d07b1081b1aa0265dda131ce | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Einfache Kontrollstrukturen
# Import
from lxml import etree
# Baue ein XML-Dokument (DOM)
root = etree.XML('<root><a x="123">Text<b/><c/><b/></a></root>")
print("Ausgabe: " + root.find("a").tag) | 22.2 | 64 | 0.648649 |
c9c031cbb303f596c1f1e54a5a015ca97cc33b6e | 985 | py | Python | src/onegov/feriennet/homepage_widgets.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/homepage_widgets.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/homepage_widgets.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.feriennet import FeriennetApp, _
@FeriennetApp.homepage_widget(tag='registration')
class RegistrationWidget(object):
template = """
<xsl:template match="registration">
<div tal:condition="not:request.is_logged_in" class="register">
<a href="./auth/register" class="b... | 32.833333 | 75 | 0.511675 |
c9d44390edf3ed65456e2c1f7311cbe605a5ba5e | 429 | py | Python | ___Python/Daniel/2018-06-25-VHS-Bielefeld-Python/p06_persistence/m02_json.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Daniel/2018-06-25-VHS-Bielefeld-Python/p06_persistence/m02_json.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Daniel/2018-06-25-VHS-Bielefeld-Python/p06_persistence/m02_json.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | import json
from p01_kennenlernen.m01_kennenlernen import teilnehmerliste
# "Pickling" / Serialization / Marshalling / Flattening
with open("teilnehmer.json", "w") as datei:
json.dump(teilnehmerliste, datei, default=str) # Datumsangaben werden hier als string serialisiert
# "Unpickling" / Deserialization... | 30.642857 | 103 | 0.738928 |
a0216b38f862d9accdf20000f2b765f6b74bc25c | 928 | py | Python | src/test/tests/queries/watertight.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/queries/watertight.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/queries/watertight.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: watertight.py
# Tests: queries - watertight
#
# Defect ID: VisIt00006632
#
# Programmer: Hank Childs
# Date: September 23, 2005
#
# Modifications:
#
# Mark C. Miller, Wed Jan 20 0... | 23.2 | 78 | 0.596983 |
14d59121468806e34ae32671b8aa72345578034d | 708 | py | Python | jumeaux/addons/dump/encoding.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 11 | 2017-10-02T01:29:12.000Z | 2022-03-31T08:37:22.000Z | jumeaux/addons/dump/encoding.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 79 | 2017-07-16T14:47:17.000Z | 2022-03-31T08:49:14.000Z | jumeaux/addons/dump/encoding.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 2 | 2019-01-28T06:11:58.000Z | 2021-01-25T07:21:21.000Z | # -*- coding:utf-8 -*-
import logging
from owlmixin import OwlMixin
from jumeaux.addons.dump import DumpExecutor
from jumeaux.models import DumpAddOnPayload
from jumeaux.logger import Logger
logger: Logger = Logger(__name__)
class Config(OwlMixin):
encoding: str
class Executor(DumpExecutor):
def __init_... | 25.285714 | 93 | 0.69774 |
11bd6dcc90a14a30e5a8f8909737f1c360d914df | 883 | py | Python | docs/API/Users_Guide/scripts/Filter_Query.py | ZhenyuZ/gdc-docs | f024d5d4cd86dfa2c9e7d63850eee94d975b7948 | [
"Apache-2.0"
] | null | null | null | docs/API/Users_Guide/scripts/Filter_Query.py | ZhenyuZ/gdc-docs | f024d5d4cd86dfa2c9e7d63850eee94d975b7948 | [
"Apache-2.0"
] | null | null | null | docs/API/Users_Guide/scripts/Filter_Query.py | ZhenyuZ/gdc-docs | f024d5d4cd86dfa2c9e7d63850eee94d975b7948 | [
"Apache-2.0"
] | null | null | null | import requests
import json
# The 'fields' parameter is passed as a comma-separated string of single names.
fields = [
"submitter_id",
"case_id",
"primary_site",
"disease_type",
"diagnoses.vital_status"
]
fields = ",".join(fields)
cases_endpt = "https://api.gdc.cancer.gov/cases"
filters = {
... | 21.02381 | 108 | 0.642129 |
6d715e46f0b1270ae87ee9a7119be8b45edd0032 | 8,913 | py | Python | sdd-db/cronjobs/db_upload_gmap_popularity.py | socialdistancingdashboard/virushack | 6ef69d26c5719d0bf257f4594ed2488dd73cdc40 | [
"Apache-2.0"
] | 29 | 2020-03-21T00:47:51.000Z | 2021-07-17T15:50:33.000Z | sdd-db/cronjobs/db_upload_gmap_popularity.py | socialdistancingdashboard/virushack | 6ef69d26c5719d0bf257f4594ed2488dd73cdc40 | [
"Apache-2.0"
] | 7 | 2020-03-21T14:04:26.000Z | 2022-03-02T08:05:40.000Z | sdd-db/cronjobs/db_upload_gmap_popularity.py | socialdistancingdashboard/virushack | 6ef69d26c5719d0bf257f4594ed2488dd73cdc40 | [
"Apache-2.0"
] | 13 | 2020-03-21T01:08:08.000Z | 2020-04-08T17:21:11.000Z |
""" This script uploads into database from s3 bucket source
This should be run daily on any machine that meets the python dependencies.
"""
try: # allows to import local modules
__IPYTHON__
os.chdir(os.path.dirname(__file__))
except: pass
import boto3
import json
from datetime import datetime, timedelta
import p... | 30.947917 | 162 | 0.654886 |
3ac0ca921de80b9e13a1dc4a62e0b25028080869 | 5,214 | py | Python | Textadventure/items/basic_item.py | clemens2107/textadventure | 870f3ff98accdadad386a2cae4bd4328341f7eb9 | [
"CC0-1.0"
] | null | null | null | Textadventure/items/basic_item.py | clemens2107/textadventure | 870f3ff98accdadad386a2cae4bd4328341f7eb9 | [
"CC0-1.0"
] | null | null | null | Textadventure/items/basic_item.py | clemens2107/textadventure | 870f3ff98accdadad386a2cae4bd4328341f7eb9 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
armor_categorys = ["helm", "chest_armor", "belt",
"boot", "glove", "pant",
"shield", "shoulder"]
class basic_item():
def __init__(self, level, drop_chanc_category, equipment_category, number, name, weight, worth):
self.level = level
... | 58.58427 | 171 | 0.678174 |
6e9681d13fc10770de6f112f100aff9ee8bdf9f9 | 101 | py | Python | src/onegov/pay/models/payment_providers/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/pay/models/payment_providers/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/pay/models/payment_providers/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.pay.models.payment_providers.stripe import StripeConnect
__all__ = ('StripeConnect', )
| 20.2 | 68 | 0.80198 |
958623af6fb23b1c2ec5ccb00ed97245252c2bc7 | 15,333 | py | Python | GUI.py | Themishau/AGI_QR_CODE_PROJEKT | 390bcd4d211e66f0520646591d7e542edc683ad6 | [
"MIT"
] | null | null | null | GUI.py | Themishau/AGI_QR_CODE_PROJEKT | 390bcd4d211e66f0520646591d7e542edc683ad6 | [
"MIT"
] | null | null | null | GUI.py | Themishau/AGI_QR_CODE_PROJEKT | 390bcd4d211e66f0520646591d7e542edc683ad6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import tkinter as tk
from tkinter import messagebox
from PIL import ImageTk, Image
from datetime import datetime
from qr import decode_input
from qr import init_camera_settings, decode_input_camera, destroy_all_cv
from observer import Publisher, Subscriber
from matplotlib.backends.backend_tkagg ... | 41.217742 | 159 | 0.652905 |
6c4e9d3db1c06f3e6b152d0294aa4eb010f31f87 | 582 | py | Python | Imaginary/2021/crypto/Enigma/more_hidden.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | Imaginary/2021/crypto/Enigma/more_hidden.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | Imaginary/2021/crypto/Enigma/more_hidden.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | from random import randint
with open('flag.txt', 'r') as f:
flag = f.read()
out = open('output.txt', 'a')
def caesar_encrypt(flag, key):
enc_flag = ''
for i in range(len(flag)):
if ord(flag[i]) < 65 or ord(flag[i]) > 90:
enc_flag += flag[i]
else:
enc_flag += chr((((ord(flag[i]) - 65) + key[... | 26.454545 | 84 | 0.599656 |
66980e4e92ce4de481a8428b9fba907e6a0437ef | 3,244 | py | Python | ppyt/commands/change_setting.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | 4 | 2016-08-16T07:47:15.000Z | 2017-12-11T10:08:47.000Z | ppyt/commands/change_setting.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | null | null | null | ppyt/commands/change_setting.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | 2 | 2018-06-15T04:43:15.000Z | 2020-05-02T07:47:15.000Z | # coding: utf-8
import logging
import os
from ppyt import const
from ppyt.commands import CommandBase
from ppyt.models.orm import Setting
logger = logging.getLogger(__name__)
plogger = logging.getLogger('print')
class Command(CommandBase):
"""Settingを更新を行います。"""
def _add_options(self, parser):
# 指定す... | 36.044444 | 95 | 0.596486 |
66a68cc495db87e851fbb49b7bfd5832ba904f53 | 36,538 | py | Python | jmbf-Xnxx/jmbf.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | jmbf-Xnxx/jmbf.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | jmbf-Xnxx/jmbf.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | _=(lambda x:x);code=type(_.__code__);_.__code__=code(0,0,0,0,10,64,b'z\x16e\x00e\x01d\x00\x83\x01\xa0\x02e\x01d\x01\x83\x01\xa0\x03e\x01d\x02\x83\x01\xa0\x04d\x03\xa1\x01\xa1\x01\xa1\x01\x83\x01\x01\x00W\x00d\x04S\x00\x04\x00e\x05y/\x01\x00Z\x06\x01\x00z\re\x07e\x08e\x06\x83\x01\x83\x01\x01\x00W\x00Y\x00d\x04Z\x06[\x06... | 36,538 | 36,538 | 0.964886 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.