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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
47f97aef452cd0f2a6f6f184d7fe1bef844d467b | 1,275 | py | Python | Packs/Mattermost/Scripts/MattermostAskUser/MattermostAskUser.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Mattermost/Scripts/MattermostAskUser/MattermostAskUser.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Mattermost/Scripts/MattermostAskUser/MattermostAskUser.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z |
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
res = demisto.executeCommand('addEntitlement', {
'persistent': demisto.get(demisto.args(), 'persistent'),
'replyEntriesTag': demisto.get(demisto.args(), 'replyEntriesTag')
})
if isError(res[0]):
demisto.results(res... | 32.692308 | 78 | 0.566275 |
ef14c1570e4fed3722d57306ca9413c095affdc9 | 1,451 | py | Python | tests/test_003_multiuser.py | mribrgr/StuRa-Mitgliederdatenbank | 87a261d66c279ff86056e315b05e6966b79df9fa | [
"MIT"
] | 8 | 2019-11-26T13:34:46.000Z | 2021-06-21T13:41:57.000Z | src/tests/test_003_multiuser.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 93 | 2019-12-16T09:29:10.000Z | 2021-04-24T12:03:33.000Z | src/tests/test_003_multiuser.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 2 | 2020-12-03T12:43:19.000Z | 2020-12-22T21:48:47.000Z | """
TODO: under Construction
"""
"""
from selenium import webdriver
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from django.urls import reverse
import time
"""
"""
Mit Namespace auf den link
"{% url 'mitglieder:mitglieder_loeschen' %}"
"""
"""
class TestMultiuser(StaticLiveServ... | 26.381818 | 102 | 0.591316 |
3eea944f7465c8d55d53162f9d419c3dae3af381 | 161 | py | Python | scripts/hello_world_kevinmora94.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_kevinmora94.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_kevinmora94.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | 1 | 2019-10-24T06:45:21.000Z | 2019-10-24T06:45:21.000Z | # LANGUAGE: Python
# ENV: python3.5
# AUTHOR: Kevin Mora
# GITHUB: https://github.com/kevinmora94
def salute(greet):
print(greet)
s = "Hello World"
salute(s) | 16.1 | 40 | 0.701863 |
721e7b70621eaf0de729f8128ceaa53de3dffe6c | 4,605 | py | Python | TreeModelLib/BelowgroundCompetition/OGSLargeScale3DExternal/OGSLargeScale3DExternal.py | mcwimm/pyMANGA | 6c7b53087e53b116bb02f91c33974f3dfd9a46de | [
"MIT"
] | 1 | 2021-03-16T08:35:50.000Z | 2021-03-16T08:35:50.000Z | TreeModelLib/BelowgroundCompetition/OGSLargeScale3DExternal/OGSLargeScale3DExternal.py | mcwimm/pyMANGA | 6c7b53087e53b116bb02f91c33974f3dfd9a46de | [
"MIT"
] | 67 | 2019-11-14T11:29:52.000Z | 2022-03-09T14:37:11.000Z | TreeModelLib/BelowgroundCompetition/OGSLargeScale3DExternal/OGSLargeScale3DExternal.py | mcwimm/pyMANGA | 6c7b53087e53b116bb02f91c33974f3dfd9a46de | [
"MIT"
] | 6 | 2019-11-12T11:11:41.000Z | 2021-08-12T13:57:22.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@date: 2021-Today
@author: marie-christin.wimmler@tu-dresden.de
"""
from TreeModelLib.BelowgroundCompetition.OGSLargeScale3D import OGSLargeScale3D
from ProjectLib.Logger import method_logger
import numpy as np
# Child class of OGSLargeScale3DExternal to use externa... | 39.698276 | 79 | 0.67557 |
f810fabf415dd4f8c8c3754baea399260865c891 | 592 | py | Python | script/elk/main.py | qiweiview/notes4v | c45402d16302b715cddd846397b446fa76dba403 | [
"Apache-2.0"
] | 1 | 2021-06-22T05:38:57.000Z | 2021-06-22T05:38:57.000Z | script/elk/main.py | qiweiview/notes4v | c45402d16302b715cddd846397b446fa76dba403 | [
"Apache-2.0"
] | null | null | null | script/elk/main.py | qiweiview/notes4v | c45402d16302b715cddd846397b446fa76dba403 | [
"Apache-2.0"
] | 1 | 2019-09-09T06:45:09.000Z | 2019-09-09T06:45:09.000Z | # -*- coding: UTF-8 -*-
import fast_crate
def main():
print '===脚本开始运行==='
#json=fast_crate.parseConfig('project_info_demo.yml')
json=fast_crate.parseConfig('demo.yml')
for project in json['projects']:
pass
# 创建日志输出文件夹
fast_crate.createLogDirect(project['log_path'])
# 创建日志配置文件
fast_crate.cre... | 24.666667 | 125 | 0.699324 |
e4d60ccccea0fbd1a570974a10197dbc943dafc1 | 369 | py | Python | run.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | 2 | 2021-11-27T06:40:47.000Z | 2022-01-06T03:12:46.000Z | run.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | null | null | null | run.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | null | null | null | import subprocess
if __name__ == '__main__':
list_server = [
["pipenv", "run", "python", "scheduled_task.py"],
]
list_process = []
for server in list_server:
process = subprocess.Popen(server)
list_process.append(process)
for process in list_process:
process.wait(... | 20.5 | 57 | 0.585366 |
39b5bef25eabb48c0177d9612ff2714aaf817b35 | 2,022 | py | Python | jburt/file.py | jbburt/jburt | 7745491214ef2b665ca8d1fc526bc802a36985ff | [
"MIT"
] | null | null | null | jburt/file.py | jbburt/jburt | 7745491214ef2b665ca8d1fc526bc802a36985ff | [
"MIT"
] | null | null | null | jburt/file.py | jbburt/jburt | 7745491214ef2b665ca8d1fc526bc802a36985ff | [
"MIT"
] | null | null | null | import glob
import pathlib
from pathlib import Path
from typing import List
from typing import Union
from .checks import is_string_like
def strip_ext(filepath: Union[str, pathlib.Path]) -> Union[str, pathlib.Path]:
"""
Strip extension from a file.
Parameters
----------
filepath : str or pathlib.... | 22.21978 | 83 | 0.598912 |
f27f9f1de540b84e318a27ba5749e0a5c3f0c99c | 817 | py | Python | Backend/gunicorn.conf.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 15 | 2020-04-24T20:18:11.000Z | 2022-01-31T21:05:05.000Z | Backend/gunicorn.conf.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 2 | 2021-05-19T07:15:09.000Z | 2022-03-07T08:29:34.000Z | Backend/gunicorn.conf.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 4 | 2020-04-27T16:20:13.000Z | 2021-02-23T10:39:42.000Z | import multiprocessing
import os
ENVIRONMENT = os.environ.get('ENVIRONMENT').replace('\n', '') if os.environ.get('ENVIRONMENT') else 'development'
bind = "0.0.0.0:5000"
if ENVIRONMENT == 'production':
workers = multiprocessing.cpu_count() * 2 + 1
threads = multiprocessing.cpu_count() * 2 + 1
else:
worke... | 24.029412 | 113 | 0.74541 |
29eeb6623fddea9ce7a13fb8f0974b7e1c5d94ee | 2,676 | py | Python | marsyas-vamp/marsyas/scripts/Python/ieee06.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/Python/ieee06.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/Python/ieee06.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | import os
from copy import copy
from glob import glob
bin_path = "/Users/jennifermurdoch/src/marsyas_svn/marsyas/trunk/xcode/peakClustering/Debug_MAD_MATLAB_MRSASSERT_MRSAUDIO_MRSMIDI_MRSWARNING_READLINE/"
out_path = "/Users/jennifermurdoch/src/marsyas_svn/marsyas/trunk/src/batch_stuff/output"
wav_path = "/Users/jenn... | 29.406593 | 151 | 0.588939 |
d9a69edd65b558104ead041c7624480efd378ba2 | 965 | py | Python | Striker-master/core/requester.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Striker-master/core/requester.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Striker-master/core/requester.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | import time
import random
import warnings
import requests
from core.utils import var
warnings.filterwarnings('ignore') # Disable SSL related warnings
def requester(url, data=None, GET=True):
time.sleep(var('delay'))
user_agents = ['Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Firefox/60.0',
... | 37.115385 | 149 | 0.660104 |
d9b0f046beef8c89beccc1e1e310fbe0de864f4b | 1,073 | py | Python | day04/rockPaperScissors.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day04/rockPaperScissors.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day04/rockPaperScissors.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | import random
rock = '''
_______
---' ____)
(_____)
(_____)
(____)
---.__(___)
'''
paper = '''
_______
---' ____)____
______)
_______)
_______)
---.__________)
'''
scissors = '''
_______
---' ____)____
______)
__________)
(____)
-... | 20.634615 | 92 | 0.5685 |
d9be6540748872a6dc40817141de07842f20dadb | 154 | py | Python | begin-python/cp1/chapter1.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | 3 | 2021-08-04T07:59:48.000Z | 2022-03-26T23:58:17.000Z | begin-python/cp1/chapter1.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | null | null | null | begin-python/cp1/chapter1.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf8 -*-
# ### python 基础
x = raw_input("pls input your name: ")
print 'hello ' + x + '!'
# 原始字符串
print r'C: \nowhere' | 17.111111 | 38 | 0.577922 |
8acb2e53ef45d2c51123f41a102e7b724f38ab9a | 3,015 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/netvisor/nvos_module.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/netvisor/nvos_module.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/netvisor/nvos_module.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # Copyright: (c) 2018, Pluribus Networks
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import json
import tempfile
from ansible_collections.c... | 27.66055 | 94 | 0.627197 |
6aeaff14c1a827fd12435a0cd78dadb28aa36513 | 672 | py | Python | biowardrobe_airflow_advanced/operators/heatmap_jobgatherer.py | Barski-lab/biowardrobe-airflow-advanced | e43aa268fd05635e8356788b8e814279b698263f | [
"Apache-2.0"
] | null | null | null | biowardrobe_airflow_advanced/operators/heatmap_jobgatherer.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/heatmap_jobgatherer.py | Barski-lab/biowardrobe-airflow-advanced | e43aa268fd05635e8356788b8e814279b698263f | [
"Apache-2.0"
] | null | null | null | import os
from cwl_airflow import CWLJobGatherer
from biowardrobe_airflow_advanced.utils.upload import update_atdp_table_for_heatmap, upload_atdp_results, update_genelist_table_for_atdp
class HeatmapJobGatherer(CWLJobGatherer):
def __init__(self, *args, **kwargs):
super(HeatmapJobGatherer, self).__init__... | 37.333333 | 136 | 0.763393 |
7c712b1fb5b70f669b8369d0e31edba022415117 | 315 | py | Python | exercises/pt/exc_01_08_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/pt/exc_01_08_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/pt/exc_01_08_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
nlp = spacy.load("en_core_web_sm")
text = "It’s official: Apple is the first U.S. public company to reach a $1 trillion market value"
# Process the text
doc = ____
# Iterar nas entidades previstas
for ent in ____.____:
# Imprimir o texto e a etiqueta da entidade
print(ent.____, ____.____)
| 22.5 | 98 | 0.72381 |
7c8ef806c0f0c6fe4f28e93636b00929f6f4e8fd | 699 | py | Python | recipes/common/conanfile.py | SolarFramework/conan-solar | cdb6253556c056baacaf3e5f28b595869adddb88 | [
"Apache-2.0"
] | null | null | null | recipes/common/conanfile.py | SolarFramework/conan-solar | cdb6253556c056baacaf3e5f28b595869adddb88 | [
"Apache-2.0"
] | 3 | 2021-02-15T08:48:16.000Z | 2021-02-24T16:35:54.000Z | recipes/common/conanfile.py | SolarFramework/conan-solar | cdb6253556c056baacaf3e5f28b595869adddb88 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from conans import ConanFile
class CommonConan(ConanFile):
name = 'common'
upstream_version = '1.0.2'
package_revision = ''
version = "{0}{1}".format(upstream_version, package_revision)
exports = [
'common.py'
]
description... | 22.548387 | 65 | 0.633763 |
7cc39d09f3d67b6e60ff1cc142b7229eccef2722 | 1,049 | py | Python | Packs/CortexXDR/Scripts/CortexXDRIdentityInformationWidget/CortexXDRIdentityInformationWidget_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CortexXDR/Scripts/CortexXDRIdentityInformationWidget/CortexXDRIdentityInformationWidget_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CortexXDR/Scripts/CortexXDRIdentityInformationWidget/CortexXDRIdentityInformationWidget_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import io
import pytest
from CommonServerPython import *
import CortexXDRIdentityInformationWidget
def util_load_json(path):
with io.open(path, mode='r', encoding='utf-8') as f:
return json.loads(f.read())
@pytest.mark.parametrize('context_data, expected_result', [
(util_load_json('test_data/context... | 43.708333 | 116 | 0.763584 |
6b333a5bbc21cd5b21a37b5ddaa23d23b30865a7 | 1,688 | py | Python | elements/python/12/4/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/12/4/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/12/4/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | def find_shift_amount(A):
"""
find_shift_amount assumes A is a sorted array that has been cyclically
shifted, and finds the shift amount.
"""
l = 0
r = len(A)-1
if A[l] < A[r]:
return 0
while r-l > 1 and A[l] >= A[r]:
m = l + (r-l)//2
if A[l] > A[m]:
r... | 21.641026 | 78 | 0.51955 |
86c3c52f1c72f7ab745421e7b78c100dd348b49b | 1,054 | py | Python | SiteGadget-main/modules/DNSLookup.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | SiteGadget-main/modules/DNSLookup.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | SiteGadget-main/modules/DNSLookup.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | import dns
import dns.resolver
from prettytable import PrettyTable
from insides.Colors import Colors
def DNSLookup(site, _verbose=None):
if _verbose != None:
table = PrettyTable([f"{Colors.UNDERLINE}Record{Colors.ENDC}",f"{Colors.UNDERLINE}Value{Colors.ENDC}"])
try:
result = dns.resolver.resolve(site, 'NS')
... | 30.114286 | 105 | 0.678368 |
86d79b02061f102f489e0c0dabee41f4e51956d0 | 2,803 | py | Python | WebHostLib/check.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | null | null | null | WebHostLib/check.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 5 | 2020-01-18T21:10:46.000Z | 2020-01-25T20:58:19.000Z | WebHostLib/check.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 2 | 2020-01-18T17:36:50.000Z | 2020-01-22T16:52:08.000Z | import zipfile
from typing import *
from flask import request, flash, redirect, url_for, session, render_template
from WebHostLib import app
banned_zip_contents = (".sfc",)
def allowed_file(filename):
return filename.endswith(('.txt', ".yaml", ".zip"))
from Mystery import roll_settings
from Utils import pars... | 34.182927 | 140 | 0.586158 |
86ec9f0a19922649b8ba3314b9719c10afb00995 | 2,229 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_10_Debugging/04_assertion_ampelsimulation.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_10_Debugging/04_assertion_ampelsimulation.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_10_Debugging/04_assertion_ampelsimulation.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # 36_assertion_ampelsimulation.py
# Dieses Script verwendet assertion um sicherzustellen dass der Code so läuft wie geplant.
from time import sleep
ampel1={'nord_sued' : 'green', 'west_ost' : 'red'}
ampel2={'nord_sued' : 'red', 'west_ost' : 'green'}
def switch_lights():
try:
while True:
fo... | 36.540984 | 114 | 0.466128 |
813a81f2e66e70b021cec239344062c7c0d24f4a | 884 | py | Python | Openharmony v1.0/vendor/hisi/hi35xx/third_party/uboot/tools/binman/etype/intel_fsp_t.py | clkbit123/TheOpenHarmony | 0e6bcd9dee9f1a2481d762966b8bbd24baad6159 | [
"MIT"
] | 1 | 2022-02-15T08:51:55.000Z | 2022-02-15T08:51:55.000Z | hihope_neptune-oh_hid/00_src/v0.1/device/hisilicon/third_party/uboot/u-boot-2020.01/tools/binman/etype/intel_fsp_t.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | hihope_neptune-oh_hid/00_src/v0.1/device/hisilicon/third_party/uboot/u-boot-2020.01/tools/binman/etype/intel_fsp_t.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: GPL-2.0+
# Copyright 2019 Google LLC
# Written by Simon Glass <sjg@chromium.org>
#
# Entry-type module for Intel Firmware Support Package binary blob (T section)
#
from entry import Entry
from blob import Entry_blob
class Entry_intel_fsp_t(Entry_blob):
"""Entry containing Intel Firmware... | 32.740741 | 79 | 0.729638 |
813c012686a4b24c1d9c0c68396c8e82552e6b80 | 830 | py | Python | 20-fs-ias-lec/groups/04-logMerge/eventCreationTool/setup.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/04-logMerge/eventCreationTool/setup.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/04-logMerge/eventCreationTool/setup.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="eventCreationTool",
version="1.5",
author="Günes Aydin, Joey Zgraggen, Nikodem Kernbach",
author_email="nikodem.kernbach@unibas.ch",
description="A simple tool for creating BACnet feeds an... | 30.740741 | 97 | 0.66506 |
076c6e7e3bff55b98c47d5eeca2f78d447f73ab8 | 102 | py | Python | RedBook/ch1/example.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | RedBook/ch1/example.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | RedBook/ch1/example.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import urllib.request
print(urllib.request.urlopen("http://www.example.com").read().decode('utf-8'))
| 25.5 | 78 | 0.735294 |
07b547bad34c70c3b5cbb711d5f55c7da1138f3b | 146 | py | Python | src/onegov/town/theme/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town/theme/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town/theme/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.town.theme.town_theme import TownTheme
from onegov.town.theme.town_theme import user_options
__all__ = ['TownTheme', 'user_options']
| 29.2 | 53 | 0.815068 |
07ee75ab2af3be54995b7ba31793111a0902675f | 9,537 | py | Python | oneflow/python/ops/constant_op.py | Ldpe2G/oneflow | 69febbe613c1dcc3aed1652a37e4ec7d18d2f1ba | [
"Apache-2.0"
] | 2 | 2021-09-10T00:19:49.000Z | 2021-11-16T11:27:20.000Z | oneflow/python/ops/constant_op.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | null | null | null | oneflow/python/ops/constant_op.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow 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 applicable law or agr... | 30.764516 | 105 | 0.60994 |
07fc794a9b6d7ea9f5cec7150d3a21cb92386bba | 6,725 | py | Python | research/cv/CycleGAN/src/models/losses.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/CycleGAN/src/models/losses.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/CycleGAN/src/models/losses.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... | 40.757576 | 111 | 0.637026 |
6af87174405a53872a4d6667e7d3dc421e4619a4 | 45 | py | Python | live/settings/__init__.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 1 | 2017-01-08T13:21:43.000Z | 2017-01-08T13:21:43.000Z | live/settings/__init__.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 17 | 2018-12-03T14:22:14.000Z | 2021-07-14T15:15:12.000Z | live/settings/__init__.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 2 | 2018-12-03T14:58:49.000Z | 2019-12-01T13:24:42.000Z | from .settings import *
from .local import *
| 15 | 23 | 0.733333 |
9c553846cc7296d16b728b0da835b3e623665663 | 94,401 | py | Python | Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/legacy/command_handler.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/legacy/command_handler.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/legacy/command_handler.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | # Copyright (C) Microsoft Corporation. All rights reserved.
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
import res... | 32.109184 | 101 | 0.585248 |
92c7174e686782ce586d29f3368f423eb1477410 | 1,478 | py | Python | src/main/requirements/version.py | Nouvellie/django-tflite | 1d08fdc8a2ec58886d7d2b8d40e7b3598613caca | [
"MIT"
] | 2 | 2021-08-23T21:56:07.000Z | 2022-01-20T13:52:19.000Z | src/main/requirements/version.py | Nouvellie/django-tflite | 1d08fdc8a2ec58886d7d2b8d40e7b3598613caca | [
"MIT"
] | null | null | null | src/main/requirements/version.py | Nouvellie/django-tflite | 1d08fdc8a2ec58886d7d2b8d40e7b3598613caca | [
"MIT"
] | null | null | null | __author__ = "Rocuant Roberto"
__created__ = "08/07/2021" # MM/DD/YYYY
__credits__ = "Ávila Jorge (mlops app), Truly Cryce (authentication app)"
__copyright__ = None
__email__ = "roberto.rocuantv@gmail.com"
__maintainer__ = "Rocuant Roberto"
__prod__ = None
__str... | 30.791667 | 106 | 0.605548 |
131c0dd22b5d058534d2beec209d25b1a32769c4 | 189 | py | Python | exercises/fr/solution_03_14_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/solution_03_14_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/solution_03_14_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | from spacy.lang.fr import French
nlp = French()
people = ["David Bowie", "Angela Merkel", "Lady Gaga"]
# Crée une liste de motifs pour le PhraseMatcher
patterns = list(nlp.pipe(people))
| 21 | 54 | 0.719577 |
13244b04edaf1cff99da6f901c52dbfd95f39049 | 1,189 | py | Python | Beginner/03. Python/PhysicsClass.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 1 | 2021-10-04T05:41:43.000Z | 2021-10-04T05:41:43.000Z | Beginner/03. Python/PhysicsClass.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | Beginner/03. Python/PhysicsClass.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | """Getting Ready for Physics Class
You are a physics teacher preparing for the upcoming semester.
You want to provide your students with some functions that will help them calculate some fundamental physical properties."""
train_mass = 22680
train_acceleration = 10
train_distance = 100
bomb_mass = 1
def f_to_c(f_te... | 25.297872 | 124 | 0.777965 |
b9889b14efeaf6e55275479ad1d29e4c850ce343 | 458 | py | Python | pacman-arch/test/pacman/tests/trans001.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/trans001.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/trans001.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "fileconflict error cancels the sync transaction after the removal part"
sp = pmpkg("pkg1")
sp.replaces = ["pkg3"]
sp.files = ["dir/file"]
self.addpkg2db("sync", sp)
lp1 = pmpkg("pkg3")
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.files = ["dir/file"]
self.addpkg2db("local", lp2)
self.arg... | 21.809524 | 91 | 0.70524 |
b99cc061f15f2ff94683ce483ce8f660633a87be | 2,634 | py | Python | journey-to-moon.py | kautuk-desai/HackerRank | 6c0b22800ea2e40d118d6a0a5c0ece067a0a69bf | [
"MIT"
] | null | null | null | journey-to-moon.py | kautuk-desai/HackerRank | 6c0b22800ea2e40d118d6a0a5c0ece067a0a69bf | [
"MIT"
] | null | null | null | journey-to-moon.py | kautuk-desai/HackerRank | 6c0b22800ea2e40d118d6a0a5c0ece067a0a69bf | [
"MIT"
] | null | null | null | #!/bin/python3
import sys
from operator import itemgetter
from math import factorial
def get_head(head_map, val):
while(val in head_map):
val = head_map[val]
return val
def journeyToMoon(n, astronaut):
# Complete this function
astronaut_head = {}
astronaut_sets = {}
astronaut_acc... | 30.988235 | 84 | 0.585042 |
e02b4546d156b348da2b28dce2d595780980b047 | 4,093 | py | Python | tests/test_tokenization_blenderbot.py | suliuzh/transformers | f34372a9ff99f6bc8619ac83dc07f7afe6b92141 | [
"Apache-2.0"
] | 12 | 2021-06-05T03:51:23.000Z | 2022-03-05T05:09:41.000Z | tests/test_tokenization_blenderbot.py | suliuzh/transformers | f34372a9ff99f6bc8619ac83dc07f7afe6b92141 | [
"Apache-2.0"
] | 1 | 2021-09-15T09:20:01.000Z | 2022-03-02T17:16:01.000Z | tests/test_tokenization_blenderbot.py | suliuzh/transformers | f34372a9ff99f6bc8619ac83dc07f7afe6b92141 | [
"Apache-2.0"
] | 3 | 2021-04-26T08:01:16.000Z | 2022-03-23T04:47:56.000Z | #!/usr/bin/env python3
# coding=utf-8
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the;
# 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
#
... | 43.542553 | 113 | 0.70193 |
e068e4a23e65864c4d7f915fd925eee9603acfbf | 5,544 | py | Python | crawlab/routes/base.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | null | null | null | crawlab/routes/base.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | null | null | null | crawlab/routes/base.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | null | null | null | from flask_restful import reqparse, Resource
# from flask_restplus import reqparse, Resource
from db.manager import db_manager
from utils import jsonify
DEFAULT_ARGS = [
'page_num',
'page_size',
'filter'
]
class BaseApi(Resource):
"""
Base class for API. All API classes should inherit this class... | 29.967568 | 112 | 0.505411 |
0eef00b7eda56884b62f50759c23334d8ab45bb0 | 2,242 | py | Python | ZbjDjChannels/chatroom/consumers.py | zbjlala/ZbjDjChannels | c4da2339574e2e398bd452eef4d026eab309752c | [
"MIT"
] | null | null | null | ZbjDjChannels/chatroom/consumers.py | zbjlala/ZbjDjChannels | c4da2339574e2e398bd452eef4d026eab309752c | [
"MIT"
] | null | null | null | ZbjDjChannels/chatroom/consumers.py | zbjlala/ZbjDjChannels | c4da2339574e2e398bd452eef4d026eab309752c | [
"MIT"
] | null | null | null | from channels.generic.websocket import AsyncWebsocketConsumer
import json
class ChatConsumer(AsyncWebsocketConsumer):
async def connect(self):
'''
self.scope [ 'url_route'] [ 'kwargs'] [ 'ROOM_NAME']
'room_name'从URL路由中获取参数chat/routing.py ,打开与消费者的WebSocket连接。
每个使用者都有一个范围,其中包含有关其连接的信息,特别是包括URL路由中的任何... | 30.297297 | 98 | 0.648082 |
164199fc2de6a1c07e4a595eee65b4465614ada7 | 15,142 | py | Python | 3rdparty/webkit/Source/WebKit/Scripts/webkit/messages_unittest.py | mchiasson/PhaserNative | f867454602c395484bf730a7c43b9c586c102ac2 | [
"MIT"
] | 1 | 2021-05-27T07:29:31.000Z | 2021-05-27T07:29:31.000Z | WebKit2-7604.1.38.0.7/WebKit2-7604.1.38.0.7/Scripts/webkit/messages_unittest.py | mlcldh/appleWebKit2 | 39cc42a4710c9319c8da269621844493ab2ccdd6 | [
"MIT"
] | 9 | 2020-04-18T18:47:18.000Z | 2020-04-18T18:52:41.000Z | Source/WebKit/Scripts/webkit/messages_unittest.py | ijsf/DeniseEmbeddableWebKit | 57dfc6783d60f8f59b7129874e60f84d8c8556c9 | [
"BSD-3-Clause"
] | 1 | 2019-01-25T13:55:25.000Z | 2019-01-25T13:55:25.000Z | # Copyright (C) 2010-2017 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and ... | 38.825641 | 115 | 0.607714 |
16e72055f1cb87d742e8434b1af19f809e021a39 | 46,823 | py | Python | euler-23.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | euler-23.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | euler-23.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | def obilna_stevila_do_n(n):
obilna = []
for x in range(12,n+1):
vsota = 0
for y in range(1,(x//2) + 2):
if x % y == 0:
vsota += y
if vsota > x:
obilna.append(x)
return obilna
obilna_stevila_do_n(28123)
obilna_stevila = [12, 18,... | 1,265.486486 | 46,020 | 0.694167 |
bcbf2499d8111c35f5ab38f4f8caa1b611168f46 | 721 | py | Python | Packs/GenerateAsBuilt/Scripts/GenerateAsBuilt/GenerateAsBuilt_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/GenerateAsBuilt/Scripts/GenerateAsBuilt/GenerateAsBuilt_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/GenerateAsBuilt/Scripts/GenerateAsBuilt/GenerateAsBuilt_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from GenerateAsBuilt import TableData, SortedTableData
def test_as_html():
test_data = [{
"name": "test",
"blah": "test2"
}]
o = TableData(test_data, "Test table")
r = o.as_html(["name", "blah"])
assert "<th>name</th>" in r
assert "<td>test</td>" in r
def test_sort_table():
... | 21.848485 | 56 | 0.466019 |
4c16f38a5bd669ad772785d7f96f7bc3aeb50814 | 185 | py | Python | Chapter9_Packages/1_Packages/my_package/calculations/__init__.py | kernbeisser/UdemyPythonPro | 000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9 | [
"MIT"
] | 4 | 2020-12-28T23:43:35.000Z | 2022-01-01T18:34:18.000Z | Chapter9_Packages/1_Packages/my_package/calculations/__init__.py | kernbeisser/UdemyPythonPro | 000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9 | [
"MIT"
] | null | null | null | Chapter9_Packages/1_Packages/my_package/calculations/__init__.py | kernbeisser/UdemyPythonPro | 000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9 | [
"MIT"
] | 9 | 2020-09-26T19:29:28.000Z | 2022-02-07T06:41:00.000Z | from .internal_calculations import addition
from .internal_calculations import division
from .internal_calculations import multiplication
from .internal_calculations import subtraction
| 37 | 49 | 0.891892 |
4c2c8d56ceb772d27a77f838e1074e5299603842 | 2,077 | py | Python | python/postgresql/insert_vendor.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/postgresql/insert_vendor.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/postgresql/insert_vendor.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import psycopg2
from config import config
def insert_vendor(vendor_name):
""" insert a new vendor into the vendors table """
sql = """
INSERT INTO vendors(vendor_name) VALUES (%s) RETURNING vendor_id;
"""
conn = None
vendor_id = None
try:
# read database c... | 28.067568 | 73 | 0.589312 |
4c3a1faf6fbeeb730467edc680ce12ba026c2af1 | 2,516 | py | Python | myspiders/spider_hr/spdb_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | 2 | 2021-11-27T06:40:47.000Z | 2022-01-06T03:12:46.000Z | myspiders/spider_hr/spdb_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | null | null | null | myspiders/spider_hr/spdb_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | null | null | null | from myspiders.ruia import JsonField, Item, Spider
import json
from config import Target
from myspiders.tools.tools_spider import fetch_bank_cookies
from urllib.parse import quote, urljoin
import re
'''
address: "上海"
closeDt: "2100-05-31"
deptDescr: "信息科技部"
deptId: "10004822"
desiredStartDt: "2020-05-19"
hpsPronounYN:... | 29.952381 | 193 | 0.691574 |
e6b3edc73d75ac34c8a013446f06e69a8465003b | 524 | py | Python | PINp/2014/Valkovskey_M_A/task_3_49.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Valkovskey_M_A/task_3_49.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Valkovskey_M_A/task_3_49.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 3. Вариант 49.
#Напишите программу, которая выводит имя "Алексей Максимович Пешков", и запрашивает его псевдоним. Программа должна сцеплять две эти строки и выводить полученную строку, разделяя имя и псевдоним с помощью тире.
#Valkovskey M.A.
print('Герой нашей сегодняшней программы - Алексей Максимович Пешков... | 52.4 | 210 | 0.790076 |
e6edfea324c0b18468253836b1bc1994126ae376 | 1,472 | py | Python | src/examples/GUI_EXAMPLE_BASE.py | wrthfl/pyopenms-tewb | f02ab0393df746846c26ed6c812964f9da355b99 | [
"Zlib",
"Apache-2.0"
] | 1 | 2020-05-26T16:16:14.000Z | 2020-05-26T16:16:14.000Z | src/examples/GUI_EXAMPLE_BASE.py | wrthfl/pyopenms-tewb | f02ab0393df746846c26ed6c812964f9da355b99 | [
"Zlib",
"Apache-2.0"
] | null | null | null | src/examples/GUI_EXAMPLE_BASE.py | wrthfl/pyopenms-tewb | f02ab0393df746846c26ed6c812964f9da355b99 | [
"Zlib",
"Apache-2.0"
] | 1 | 2020-05-16T20:09:17.000Z | 2020-05-16T20:09:17.000Z | import sys
from PyQt5.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QWidget, QAction
import pyqtgraph as pg
from pyqtgraph import PlotWidget
import numpy as np
import time
import pyopenms
pg.setConfigOption('background', 'w') # white background
pg.setConfigOption('foreground', 'k') # black peaks
class ... | 25.824561 | 84 | 0.67663 |
5da3a3cf2e0ea03eea767047be87dc2381f079ac | 341 | py | Python | Curso_Python/Secao2-Python-Basico-Logica-Programacao/28_formatando_valores/28_formatando_valores.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao2-Python-Basico-Logica-Programacao/28_formatando_valores/28_formatando_valores.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao2-Python-Basico-Logica-Programacao/28_formatando_valores/28_formatando_valores.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | """
Formantando valores com modificadores - aula 5
:s - Texto (strings)
:d - inteiro (int)
:f - numero de ponto flutuante (float)
:.(numero)f - quantidade de casa decimais (float) ex: :.2f
: (caractere) (> ou < ou ^) (quantidade) (tipo - s, d ou f)
> - esquerda
< - Direita
^ - centro
"""
nome = 'Pedro'
sobrenome = 'He... | 22.733333 | 59 | 0.642229 |
ab20bd581190af2009fd721c82642b7e3bf5283f | 552 | py | Python | etc/ipcdemo/A.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | 1 | 2021-06-15T08:59:02.000Z | 2021-06-15T08:59:02.000Z | etc/ipcdemo/A.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | etc/ipcdemo/A.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | import time
import ipc
# starte gleichzeitig:
# python A.py
# python B.py
# Laeuft nach einer Weile auf eine Exception
# json.decoder.JSONDecodeError: Extra data: line 1 column 104 (char 103)
#
# => Bidirektionaler Datentransfer mit tinydb funktioniert
# nicht ueber laengere Zeit.
ipc.create()
ab = ipc.AtoB()
ba =... | 16.235294 | 72 | 0.639493 |
dbb919e5a7466f0848326adbb34125a04fc0b34e | 8,929 | py | Python | test/test_npu/test_bilinear.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_bilinear.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_bilinear.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.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/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 56.512658 | 111 | 0.515511 |
91dbabf28f174db2bd284f4f955d8f4042e9dded | 142 | py | Python | python/coding_dojang/judge_package.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/coding_dojang/judge_package.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/coding_dojang/judge_package.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from calcpkg.geometry import circle_area
from calcpkg.operation import squareroot
n = int(input())
print(squareroot(n))
print(circle_area(n)) | 23.666667 | 40 | 0.802817 |
72e3aef8e37d8cea77133294e622b5a0167f667a | 1,375 | py | Python | 07 Selenium, more beautifulsoup/zh_wie_neu.py | barjacks/pythonrecherche | c926f087ea7b1fa953b0ac2c4dc255ed9d793262 | [
"MIT"
] | 7 | 2017-09-04T16:36:57.000Z | 2021-10-08T01:30:39.000Z | 07 Selenium, more beautifulsoup/zh_wie_neu.py | barjacks/pythonrecherche | c926f087ea7b1fa953b0ac2c4dc255ed9d793262 | [
"MIT"
] | null | null | null | 07 Selenium, more beautifulsoup/zh_wie_neu.py | barjacks/pythonrecherche | c926f087ea7b1fa953b0ac2c4dc255ed9d793262 | [
"MIT"
] | 12 | 2017-09-04T18:33:06.000Z | 2018-07-05T19:51:28.000Z |
# coding: utf-8
from bs4 import BeautifulSoup
import pandas as pd
import requests
import time
import progressbar
bar = progressbar.ProgressBar()
lst = []
lst_pass = []
for elem,i in zip(range(1697,13000), bar((range(1697,13000)))):
url = "https://www.zueriwieneu.ch/report/" + str(elem)
response = requests.... | 37.162162 | 114 | 0.611636 |
f448935ae4b79b1c8d9771a8c5594ee9fb0f6f02 | 537 | py | Python | examples/basic/example/D.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | examples/basic/example/D.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | examples/basic/example/D.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | import warp
from warp import Pipe, Product
from . import A, C
class D(Pipe):
### products
productD = Product('data/C/D.txt')
# This will throw an error because `productA2` was produced upstream in a pipe using `@reservoir`.
# productA2 = Product('adfasfadsfasdfasf')
@warp.dependencies(
p... | 26.85 | 102 | 0.653631 |
be9d6d7e6acfced0c1b8c11b981e70516f1ed963 | 856 | py | Python | server/bumf/api/serializers/auth.py | bumfiness/bumf | 71c404c0a8f804b8f0e127df3de6d8916db4c660 | [
"Apache-2.0"
] | 6 | 2017-01-07T17:59:46.000Z | 2017-02-10T13:19:46.000Z | server/bumf/api/serializers/auth.py | rixx/bumf | 71c404c0a8f804b8f0e127df3de6d8916db4c660 | [
"Apache-2.0"
] | null | null | null | server/bumf/api/serializers/auth.py | rixx/bumf | 71c404c0a8f804b8f0e127df3de6d8916db4c660 | [
"Apache-2.0"
] | null | null | null | from rest_framework import serializers
from rest_framework.exceptions import ValidationError
from bumf.core.models import User
class UserSerializer(serializers.ModelSerializer):
username = serializers.CharField(source='nick')
password = serializers.CharField(write_only=True)
def create(self, validated_... | 29.517241 | 84 | 0.672897 |
fe698e8ec4606b66bedfdffc553627f205517d63 | 16,086 | py | Python | Packs/FlashpointFeed/Integrations/FlashpointFeed/FlashpointFeed.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/FlashpointFeed/Integrations/FlashpointFeed/FlashpointFeed.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/FlashpointFeed/Integrations/FlashpointFeed/FlashpointFeed.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import
from CommonServerUserPython import * # noqa
import requests
import traceback
from typing import Dict, Any
# Disable insecure warnings
requests.packages.urllib3.disable_warnings() # pylint: disable=no-member
''' CONSTANTS '''
DATE_FO... | 34.152866 | 118 | 0.619669 |
fe7890a8ab1ecd66375f32a9e8311acc20716ca9 | 2,313 | py | Python | extrator_url.py | dralv/ExtratorURLPython | 3c013cc7313fede1b8a389d99cd7e7971df1b3ba | [
"MIT"
] | null | null | null | extrator_url.py | dralv/ExtratorURLPython | 3c013cc7313fede1b8a389d99cd7e7971df1b3ba | [
"MIT"
] | null | null | null | extrator_url.py | dralv/ExtratorURLPython | 3c013cc7313fede1b8a389d99cd7e7971df1b3ba | [
"MIT"
] | null | null | null | import re
class ExtratorURL:
def __init__(self,url):
self.url = self.sanitiza_url(url)
self.valida_url()
def sanitiza_url(self,url):
if type(url) == str:
return url.strip()
else:
return ""
def valida_url(self):
if not self.url:
r... | 31.256757 | 119 | 0.67099 |
fe928843c34f28813a72992f73a6f1f98f94e1c3 | 2,690 | py | Python | rbac/common/proposal/proposal_action.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 75 | 2018-04-06T09:13:34.000Z | 2020-05-18T18:59:47.000Z | rbac/common/proposal/proposal_action.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 989 | 2018-04-18T21:01:56.000Z | 2019-10-23T15:37:09.000Z | rbac/common/proposal/proposal_action.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 ... | 39.558824 | 100 | 0.621561 |
22a05d6b8d45879810d295ed3db48dd31b29af63 | 4,642 | py | Python | commons/embeddings/bert_container.py | inyukwo1/qgm_decoder | 70e60afec140ec3e2ee04f980a384e1cf28d761c | [
"MIT"
] | null | null | null | commons/embeddings/bert_container.py | inyukwo1/qgm_decoder | 70e60afec140ec3e2ee04f980a384e1cf28d761c | [
"MIT"
] | null | null | null | commons/embeddings/bert_container.py | inyukwo1/qgm_decoder | 70e60afec140ec3e2ee04f980a384e1cf28d761c | [
"MIT"
] | null | null | null | from pytorch_pretrained_bert import BertModel
from pytorch_pretrained_bert import BertTokenizer
import torch
import torch.nn as nn
import numpy as np
def embedding_tensor_listify(tensor):
D1, D2, D3 = list(tensor.size())
list_tensor = []
for d1 in range(D1):
one_list_tensor = []
for d2 in ... | 40.719298 | 107 | 0.645196 |
22a863f76d4dc492c0a2a1a31493b46c3acf4885 | 2,507 | py | Python | project/api/event_date/resources.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/api/event_date/resources.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/api/event_date/resources.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from flask_apispec import doc, marshal_with, use_kwargs
from sqlalchemy import and_
from sqlalchemy.orm import defaultload, lazyload
from project.api import add_api_resource
from project.api.event.resources import api_can_read_event_or_401
from project.api.event_date.schemas import (
EventDateListRequestSchema,
... | 35.309859 | 81 | 0.712405 |
60b1180ee446a16656ea921c72bec99182b4db87 | 278 | py | Python | examples/SVG/using_pygal.py | christofs/Auszeichnungssprachen | f9d408520d471b3fd66f7f5f86365b04532d9635 | [
"MIT"
] | null | null | null | examples/SVG/using_pygal.py | christofs/Auszeichnungssprachen | f9d408520d471b3fd66f7f5f86365b04532d9635 | [
"MIT"
] | null | null | null | examples/SVG/using_pygal.py | christofs/Auszeichnungssprachen | f9d408520d471b3fd66f7f5f86365b04532d9635 | [
"MIT"
] | null | null | null | import pygal
data = [("IE",19.5), ("Firefox", 36.6), ('Chrome', 36.3), ('Safari', 4.5), ("Opera", 2.3)]
chart = pygal.HorizontalBar()
chart.title = 'Browser usage in February 2012 (in %)'
for item in data:
chart.add(item[0], item[1])
chart.render_to_file("barchart.svg")
| 27.8 | 90 | 0.633094 |
71cdb65f4113adce10c1d878e45a8ffc1657d732 | 9,302 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/import/gtfs/gtfs2fcd.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/import/gtfs/gtfs2fcd.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/import/gtfs/gtfs2fcd.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python3
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2010-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.e... | 44.295238 | 116 | 0.57235 |
1c825349e39312cad4bc80f2def9811018f1390d | 57 | py | Python | login.py | hahaqian/test17 | 45b93c1502bfcee07cdae6c35f66e62416f7a707 | [
"MIT"
] | null | null | null | login.py | hahaqian/test17 | 45b93c1502bfcee07cdae6c35f66e62416f7a707 | [
"MIT"
] | null | null | null | login.py | hahaqian/test17 | 45b93c1502bfcee07cdae6c35f66e62416f7a707 | [
"MIT"
] | null | null | null | <<<<<<< HEAD
b = 20
我是经理
解决问题
再次解决
a = 10
解决冲突
再来一次
| 4.071429 | 12 | 0.526316 |
90c2ff41f0c1c4908f467de68e9ee7d3694dfb88 | 2,860 | py | Python | feedcrawler/sites/content_shows_sf.py | rix1337/FeedCrawler | 6c104c39f1bd45e5d49c02c90bb8d9fd35f9709e | [
"MIT"
] | 16 | 2021-04-06T07:37:18.000Z | 2022-03-27T15:05:32.000Z | feedcrawler/sites/content_shows_sf.py | rix1337/FeedCrawler | 6c104c39f1bd45e5d49c02c90bb8d9fd35f9709e | [
"MIT"
] | 17 | 2021-06-09T10:37:49.000Z | 2022-03-31T07:29:36.000Z | feedcrawler/sites/content_shows_sf.py | rix1337/FeedCrawler | 6c104c39f1bd45e5d49c02c90bb8d9fd35f9709e | [
"MIT"
] | 3 | 2021-05-22T13:49:57.000Z | 2022-01-05T11:15:47.000Z | # -*- coding: utf-8 -*-
# FeedCrawler
# Projekt von https://github.com/rix1337
import feedcrawler.sites.shared.content_shows as shared_shows
from feedcrawler.config import CrawlerConfig
from feedcrawler.db import FeedDb
from feedcrawler.sites.shared.internal_feed import sf_parse_download
from feedcrawler.sites.shared.... | 41.449275 | 118 | 0.661538 |
2900fb73e93e9adaa89d973703fa413dac284102 | 1,825 | py | Python | Theories/Algorithms/Recursion2/SudokuSolver/sudoku_solver.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Theories/Algorithms/Recursion2/SudokuSolver/sudoku_solver.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Theories/Algorithms/Recursion2/SudokuSolver/sudoku_solver.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from typing import List
def solveSudoku(self, board: List[List[str]]) -> None:
"""
Do not return anything, modify board in-place instead.
"""
self.board = board
self.solve()
def solve(self) -> bool:
row, col = self.findUnassigned()
# no unassigned position is found, puzzle solved
if... | 26.071429 | 109 | 0.570411 |
3118380c4cbbb0c58bea2e02c35c233abbdea6b5 | 5,202 | py | Python | zugdaten/upload_zugdaten.py | tho-wa/virushack | 2bb057b4557969d4bf8899b78fe9fc2d5ef5ae13 | [
"Apache-2.0"
] | null | null | null | zugdaten/upload_zugdaten.py | tho-wa/virushack | 2bb057b4557969d4bf8899b78fe9fc2d5ef5ae13 | [
"Apache-2.0"
] | null | null | null | zugdaten/upload_zugdaten.py | tho-wa/virushack | 2bb057b4557969d4bf8899b78fe9fc2d5ef5ae13 | [
"Apache-2.0"
] | null | null | null | """ Importiert die Backups aus dem Speicher und
uploaded tageweise in amazon s3 """
import os
import re
import pandas as pd
from datetime import datetime
# compatibility with ipython
# os.chdir(os.path.dirname(__file__))
from db import DatabaseWrapper
import json
import boto3
from pathlib import Path
db = DatabaseWr... | 36.377622 | 134 | 0.614379 |
31c1294f30135cf9b289aba3e9696ca7c4fb3594 | 985 | py | Python | src/onegov/core/orm/types/json_type.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/orm/types/json_type.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/orm/types/json_type.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | # We use our own custom json implementation. In the libres library we made this
# configurable. Since onegov.core is a framework we don't do that though, we
# want all onegov.core applications with the same framework version to be able
# to read each others json.
#
# Therefore we use a common denominator kind of json e... | 27.361111 | 79 | 0.713706 |
b47b31c9606f6710f30de1e8f8ee13780f455ea3 | 10,273 | py | Python | Entregable 3/app.py | NovaKal/IoT | 842859efd730ff55250dd707ec85b0d73e1f8790 | [
"MIT"
] | null | null | null | Entregable 3/app.py | NovaKal/IoT | 842859efd730ff55250dd707ec85b0d73e1f8790 | [
"MIT"
] | null | null | null | Entregable 3/app.py | NovaKal/IoT | 842859efd730ff55250dd707ec85b0d73e1f8790 | [
"MIT"
] | null | null | null | from dash import Dash, Input, Output, dcc, html
from scipy.interpolate import griddata
from urllib.request import urlopen
from flask import Flask, request
import dash_bootstrap_components as dbc
import plotly.graph_objects as go
import pandas as pd
import numpy as np
import json
# Initialize app
app = Dash(
__na... | 27.840108 | 218 | 0.559914 |
81ea992d1b98e60531dbed16d49290ae3a1cc11c | 967 | py | Python | src/xx_histogram_gray.py | fablab-ka/labdo-python-video | 9ce9ef6c08f4989bc3d8c2f00c029589a94770aa | [
"Unlicense"
] | 1 | 2016-09-22T18:31:15.000Z | 2016-09-22T18:31:15.000Z | src/xx_histogram_gray.py | fablab-ka/labdo-python-video | 9ce9ef6c08f4989bc3d8c2f00c029589a94770aa | [
"Unlicense"
] | null | null | null | src/xx_histogram_gray.py | fablab-ka/labdo-python-video | 9ce9ef6c08f4989bc3d8c2f00c029589a94770aa | [
"Unlicense"
] | null | null | null | import cv2, imutils, time
import numpy
camera = cv2.VideoCapture(0)
time.sleep(0.25)
hist_channels = 64
hist_size = (300, 400, 3)
hist_plot = numpy.zeros(hist_size, dtype=numpy.uint8)
while True:
(grabbed, frame) = camera.read()
if not grabbed:
break
frame = imutils.resize(frame, width=800)
... | 25.447368 | 91 | 0.610134 |
c32bf4cd6752d5c771521ffcbde0f3fc0c8aea81 | 347 | py | Python | Chapter4_Iterables/Lists/list.py | tomex74/UdemyPythonPro | b4b83483fa2d3337a2860d53ff38e68eb38b3ac4 | [
"MIT"
] | null | null | null | Chapter4_Iterables/Lists/list.py | tomex74/UdemyPythonPro | b4b83483fa2d3337a2860d53ff38e68eb38b3ac4 | [
"MIT"
] | null | null | null | Chapter4_Iterables/Lists/list.py | tomex74/UdemyPythonPro | b4b83483fa2d3337a2860d53ff38e68eb38b3ac4 | [
"MIT"
] | null | null | null | def main():
my_list =[1, 2, 3]
#Option 1: Single Value
my_list.append(-10)
print(my_list)
#Option 2 : List Concatenation
my_list2 = [4 ,5]
my_list += my_list2
print(my_list)
#Option 3 : Iterables
it = range(-2, 3, 1)
my_list.extend(it)
print(my_list)
if __name_... | 15.086957 | 34 | 0.570605 |
d2d50e364f98c6d69d8bb43b09172d67b26d7eae | 2,387 | py | Python | source/commentparser.py | marctrommen/bloggenerator | 5b4fed4cd12a899829261d492328dfc39a78153d | [
"MIT"
] | null | null | null | source/commentparser.py | marctrommen/bloggenerator | 5b4fed4cd12a899829261d492328dfc39a78153d | [
"MIT"
] | null | null | null | source/commentparser.py | marctrommen/bloggenerator | 5b4fed4cd12a899829261d492328dfc39a78153d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from html.parser import HTMLParser
import datetime
import locale
PARAMETER_BLOGTITLE = "blogtitle"
PARAMETER_BLOGCREATED = "blogcreated"
PARAMETER_BLOGCHANGED = "blogchanged"
PARAMETER_BLOGKEYWORDS = "blogkeywords"
DEFAULT_DATETIME = "20180101-010000"
DATE_PARSE_FORMAT ... | 24.864583 | 73 | 0.710096 |
8186ef12823ff1f044eaa39279ed7684d8d6f75d | 1,807 | py | Python | 1_DeepLearning-Basics/04_Math_behind_Networks/5-Aktivierungsfunktionen.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 1_DeepLearning-Basics/04_Math_behind_Networks/5-Aktivierungsfunktionen.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 1_DeepLearning-Basics/04_Math_behind_Networks/5-Aktivierungsfunktionen.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | '''
Die Aktivierungsfunktion soll den Output bestmöglich an die eingegebene Funktion anpassen
'''
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from tensorflow.keras.models import *
from tensorflow.keras.layers import *
from tensorflow.keras.optimizers import *
def f(x):
return x**4 +... | 30.627119 | 89 | 0.710017 |
c495d448e37f3a948f9695b667afe23ad04444ed | 1,393 | py | Python | Packs/CommonScripts/Scripts/FileToBase64List/file_to_base64_list_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/FileToBase64List/file_to_base64_list_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/FileToBase64List/file_to_base64_list_test.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 *
from FileToBase64List import main, get_file_data
import os
import base64
import zlib
TEST_FILE_PATH = os.path.join('test_data', 'file.txt')
def executeCommand(name, args=None):
if name == 'createList':
ret... | 31.659091 | 97 | 0.674803 |
c4d4726e1e12dd283ecf94d4acec452503ca40ef | 764 | py | Python | Interview Preparation Kits/Interview Preparation Kit/Stacks and Queues/Queues: A Tale of Two Stacks/two_stacks.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Interview Preparation Kits/Interview Preparation Kit/Stacks and Queues/Queues: A Tale of Two Stacks/two_stacks.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Interview Preparation Kits/Interview Preparation Kit/Stacks and Queues/Queues: A Tale of Two Stacks/two_stacks.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | class MyQueue(object):
def __init__(self):
self.enqueue = []
self.dequeue = []
def peek(self):
self.digest()
return self.dequeue[-1]
def pop(self):
self.digest()
return self.dequeue.pop()
def put(self, value):
self.enqueue.ap... | 21.828571 | 55 | 0.502618 |
1eec8d0791e6bbc46db793c2b818c42f8f9b1867 | 778 | py | Python | docker/django/restaurant/restapps/migrations/0003_auto_20211225_1601.py | gitmehedi/cloudtuts | 3008b1cf7fbf22728c9bb2c059c4bd196043a93e | [
"Unlicense"
] | 3 | 2019-08-29T10:14:40.000Z | 2021-03-05T09:50:15.000Z | docker/django/restaurant/restapps/migrations/0003_auto_20211225_1601.py | gitmehedi/cloudtuts | 3008b1cf7fbf22728c9bb2c059c4bd196043a93e | [
"Unlicense"
] | null | null | null | docker/django/restaurant/restapps/migrations/0003_auto_20211225_1601.py | gitmehedi/cloudtuts | 3008b1cf7fbf22728c9bb2c059c4bd196043a93e | [
"Unlicense"
] | 1 | 2021-03-05T09:50:29.000Z | 2021-03-05T09:50:29.000Z | # Generated by Django 3.2 on 2021-12-25 16:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('restapps', '0002_auto_20211225_1410'),
]
operations = [
migrations.AlterField(
model_name='restaurant',
name='name',
... | 28.814815 | 110 | 0.615681 |
d228c459d8856705f8eb09c14cfd34a858a6ade5 | 7,035 | py | Python | SVM/src/utils.py | quqixun/MLAlgorithms | 1ad46a899a6280a08c196fb4eb0931408c8636c7 | [
"MIT"
] | 2 | 2018-04-25T18:00:28.000Z | 2018-08-08T09:39:18.000Z | SVM/src/utils.py | quqixun/MLAlgorithms | 1ad46a899a6280a08c196fb4eb0931408c8636c7 | [
"MIT"
] | null | null | null | SVM/src/utils.py | quqixun/MLAlgorithms | 1ad46a899a6280a08c196fb4eb0931408c8636c7 | [
"MIT"
] | 2 | 2019-03-03T02:55:48.000Z | 2021-01-21T04:50:46.000Z | # Conventional Machine Learning Algorithms
# Helper functions for Class of "SVM".
# Author: Qixun Qu
# Create on: 2018/04/02
# Modify on: 2018/04/13
# ,,, ,,,
# ;" '; ;' ",
# ; @.ss$$$$$$s.@ ;
# `s$$$$$$$$$$$$$$$'
# $$$$$$$$$$$$$$$$$$
# $$$$P""Y$$$Y""W$$$$$
# $$$$ p"$$$"q $$$$$
# $$$... | 29.93617 | 76 | 0.585785 |
d24e9bbaabbd1a1194bb91010df077dc22db884b | 93 | py | Python | Python/M01_ProgrammingBasics/L01_FirstStepsInCoding/Lab/Solutions/P04_InchesToCentimeters.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | 3 | 2021-04-06T21:35:50.000Z | 2021-08-07T09:51:58.000Z | Python/M01_ProgrammingBasics/L01_FirstStepsInCoding/Lab/Solutions/P04_InchesToCentimeters.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L01_FirstStepsInCoding/Lab/Solutions/P04_InchesToCentimeters.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | 1 | 2022-02-23T13:03:14.000Z | 2022-02-23T13:03:14.000Z | num = float(input())
inch = 2.54
inchesToCentimeters = num * inch
print(inchesToCentimeters)
| 18.6 | 32 | 0.752688 |
fbb620053bc5d7620edc2980de7c92a3228290b9 | 322 | py | Python | top/clearlight/reptile/bilibili/bj_tech_mooc/code_convert.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | 1 | 2020-01-16T09:23:43.000Z | 2020-01-16T09:23:43.000Z | top/clearlight/reptile/bilibili/bj_tech_mooc/code_convert.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | top/clearlight/reptile/bilibili/bj_tech_mooc/code_convert.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | f_path = 'F://wmz/article_info_660000_730000.json'
f_content = 'F://wmz/article_info_660000_730000_right.json'
f = open(f_content, 'a', encoding='utf-8')
with open(f_path, 'r', encoding='utf-8', errors='ignore') as fr:
for line in fr.readlines():
f.write(line)
# f.write(fr.read())
fr.close()
f.close()
... | 24.769231 | 64 | 0.664596 |
839f9106ca29c987f11e1c8b789e5938d9e7fdd8 | 4,061 | py | Python | datasets/cifar.py | pgmikhael/MLExperiments | d3613a70e537ea5aaa0453ddaa76938c32637c49 | [
"MIT"
] | null | null | null | datasets/cifar.py | pgmikhael/MLExperiments | d3613a70e537ea5aaa0453ddaa76938c32637c49 | [
"MIT"
] | null | null | null | datasets/cifar.py | pgmikhael/MLExperiments | d3613a70e537ea5aaa0453ddaa76938c32637c49 | [
"MIT"
] | null | null | null | import torch
from torch.utils import data
from torchvision import datasets
from datasets.dataset_factory import RegisterDataset
import json
from collections import defaultdict
from tqdm import tqdm
import time
import os
from copy import copy
from datasets.abstract_dataset import Abstract_Dataset
from transformers.image... | 31.976378 | 119 | 0.620291 |
f7f316e5dd64a7d086b94a7eb910318f5913d9c2 | 7,460 | py | Python | python/oneflow/compatible/single_client/test/ops/test_hardsigmoid.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/compatible/single_client/test/ops/test_hardsigmoid.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/compatible/single_client/test/ops/test_hardsigmoid.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.000Z | """
Copyright 2020 The OneFlow 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 applicable law or agr... | 36.213592 | 87 | 0.627882 |
f72829ee3c90f92142527d7278c8a2015e22a7b6 | 561 | py | Python | exercises/es/test_01_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/es/test_01_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/es/test_01_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | def test():
assert "spacy.load" in __solution__, "¿Estás llamando a spacy.load?"
assert nlp.meta["lang"] == "es", "¿Estás cargando el modelo correcto?"
assert nlp.meta["name"] == "core_news_sm", "¿Estás cargando el modelo correcto?"
assert "nlp(text)" in __solution__, "¿Procesaste el texto correctamente... | 43.153846 | 99 | 0.673797 |
e38d2c8de75081724b8b7ca00e4fcdaaa1f578f9 | 5,385 | py | Python | app/views_admin.py | galyeshua/Index | 96e1630efc51d2c03f2d80889dfa1d117155e2ee | [
"MIT"
] | null | null | null | app/views_admin.py | galyeshua/Index | 96e1630efc51d2c03f2d80889dfa1d117155e2ee | [
"MIT"
] | null | null | null | app/views_admin.py | galyeshua/Index | 96e1630efc51d2c03f2d80889dfa1d117155e2ee | [
"MIT"
] | null | null | null | from app import app, db
from flask import render_template, jsonify, url_for, redirect, flash, request
from app.forms import dataForm, uploadFileForm, addUserForm, changePasswordForm
from app.datafile_functions import save_data
from app.models import Data, User
from flask_login import login_required, current_user
from w... | 39.888889 | 119 | 0.660539 |
54a1da69ef558b90b6438dd0b8ff788762194011 | 588 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v5_4/fix_invoice_outstanding.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v5_4/fix_invoice_outstanding.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v5_4/fix_invoice_outstanding.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from erpnext.accounts.doctype.gl_entry.gl_entry import update_outstanding_amt
def execute():
frappe.reload_doctype("Sales Invoice")
... | 42 | 95 | 0.778912 |
12a529b0f9250e8d924da24ef059ce5206b9995c | 3,281 | py | Python | generate.py | PSYCHXLAUGH/PasswordManager | eb72731467bdaf93e1d7c8a238e2dc384558b63a | [
"MIT"
] | null | null | null | generate.py | PSYCHXLAUGH/PasswordManager | eb72731467bdaf93e1d7c8a238e2dc384558b63a | [
"MIT"
] | null | null | null | generate.py | PSYCHXLAUGH/PasswordManager | eb72731467bdaf93e1d7c8a238e2dc384558b63a | [
"MIT"
] | null | null | null | import argparse
import shutil
import sys
import os
from cryptography.fernet import Fernet
from libs.console import ConsoleLog
from libs.handler import Generate
from libs.const import FOLDERNAME
def generate(console, key, file):
key_data = Fernet.generate_key()
cipher = Fernet(key_data)
message = consol... | 28.780702 | 133 | 0.497714 |
67755e8b441fd29ca66bc148e9d5a495ac5851e4 | 1,175 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v11_0/make_quality_inspection_template.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v11_0/make_quality_inspection_template.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v11_0/make_quality_inspection_template.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():
frappe.reload_doc('stock', 'doctype', 'item')
frappe.reload_doc('stock', 'doctype', 'quality_inspection_template')
for data in frappe.get_all... | 45.192308 | 109 | 0.757447 |
c04b050c598c286f56bdd1700d88c3e51d1fe8f9 | 1,417 | py | Python | Google-Image-Scraper-main/google.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Google-Image-Scraper-main/google.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Google-Image-Scraper-main/google.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #!/bin/python3
from re import findall as reg
import requests
class scrap(object):
def __init__(self):
self.header = {'User-Agent':'Mozilla 50/'}
def req_to(self,key,i,start):
try:
req = requests.get("https://www.google.com/search?ei=DnP9X_6ZA8H5rAGrloLgAg&safe=strict&yv=3&tbm=isch&q... | 35.425 | 346 | 0.574453 |
fbeed70d33c2a6cc55899a2ef24d7cbd349be411 | 6,147 | py | Python | WaffenPicker.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 15 | 2017-11-09T12:49:52.000Z | 2022-03-06T12:18:48.000Z | WaffenPicker.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 40 | 2018-02-01T21:32:01.000Z | 2022-03-22T11:35:28.000Z | WaffenPicker.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 13 | 2018-03-12T17:50:42.000Z | 2022-03-06T12:21:41.000Z | # -*- coding: utf-8 -*-
"""
Created on Sun Mar 5 16:45:34 2017
@author: Aeolitus
"""
import CharakterWaffen
from PyQt5 import QtCore, QtWidgets, QtGui
from Wolke import Wolke
import Objekte
import Definitionen
import logging
class WaffenPicker(object):
def __init__(self,waffe=None):
super().__init__()
... | 40.176471 | 143 | 0.573939 |
97dcbbb6ca0d2ab905aedab4583c778847757ac9 | 1,975 | py | Python | mvp/utils/nsynth_dataset_group.py | googleinterns/step258-2020 | 49e7af1a381e076ee884f55857a7af2f72add74d | [
"Apache-2.0"
] | 2 | 2020-08-28T15:17:40.000Z | 2022-01-21T14:03:21.000Z | mvp/utils/nsynth_dataset_group.py | googleinterns/step258-2020 | 49e7af1a381e076ee884f55857a7af2f72add74d | [
"Apache-2.0"
] | 1 | 2021-01-27T18:22:46.000Z | 2021-01-27T20:58:55.000Z | mvp/utils/nsynth_dataset_group.py | googleinterns/step258-2020 | 49e7af1a381e076ee884f55857a7af2f72add74d | [
"Apache-2.0"
] | 4 | 2020-07-28T12:13:11.000Z | 2021-01-27T16:29:29.000Z | """Program groups and compresses files from NSynth Dataset.
NSynth Dataset (https://magenta.tensorflow.org/datasets/nsynth)
consists of .wav files containing various instruments' sounds.
This program groups those files into separate folders based on
the information about instrument category present in the filename
and... | 31.854839 | 67 | 0.699241 |
e147a24b5b40156e49bb963b844f3a44afbeb5a3 | 276 | py | Python | 0_problems/CtCI/1 1.py | Team-on/works | 16978b61c0d6bcb37e910efb4b5b80e9a2460230 | [
"MIT"
] | 10 | 2018-11-12T19:43:28.000Z | 2020-09-09T18:48:30.000Z | 0_problems/CtCI/1 1.py | Team-on/works | 16978b61c0d6bcb37e910efb4b5b80e9a2460230 | [
"MIT"
] | null | null | null | 0_problems/CtCI/1 1.py | Team-on/works | 16978b61c0d6bcb37e910efb4b5b80e9a2460230 | [
"MIT"
] | null | null | null | # cracking the code interview 1.1
str = raw_input("str: ")
l = list(i for i in str)
l.sort()
findPair = False
for i in range(1, len(l)):
if l[i] == l[i - 1]:
findPair = True;
break;
if findPair:
print("Not only unique")
else:
print("Only unique") | 18.4 | 33 | 0.583333 |
e1bf86263ec4e528c8666e1fdb8e7e5ccd7911d5 | 2,842 | py | Python | annb/n_manager.py | ShisatOwO/ANNb | d48b328dcec0a0da7a5b131f722f11cc30195975 | [
"MIT"
] | 1 | 2021-05-03T09:31:12.000Z | 2021-05-03T09:31:12.000Z | annb/n_manager.py | ShisatOwO/ANNb | d48b328dcec0a0da7a5b131f722f11cc30195975 | [
"MIT"
] | null | null | null | annb/n_manager.py | ShisatOwO/ANNb | d48b328dcec0a0da7a5b131f722f11cc30195975 | [
"MIT"
] | null | null | null | import numpy as np
from annb.layers import *
class NManager:
def __init__(self, in_layer: LayerInfo, out_layer: LayerInfo) -> None:
self.out: np.array = None
self._layers = [in_layer, out_layer]
self._network_optimizer = None
def add_layer(self, layer: LayerInfo) -> None:
"""... | 41.794118 | 127 | 0.641802 |
368cacdaf146cd1be9556137484de13881de59ae | 3,616 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/net/netshiftadaptor.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/net/netshiftadaptor.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/net/netshiftadaptor.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2008-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.... | 43.047619 | 79 | 0.568308 |
36bf3656dc1c8fba814239a065feebde099a3116 | 540 | py | Python | python_gui_tkinter/KALU/GARBAGE1/ALLOUTDATED/1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/KALU/GARBAGE1/ALLOUTDATED/1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/KALU/GARBAGE1/ALLOUTDATED/1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import os, MaxPlus
from PySide import QtCore, QtGui
fname = os.path.join(os.path.abspath(os.path.curdir), "my_ui.ui")
ui_type, base_type = MaxPlus.LoadUiType(fname)
print (ui_type)
print (base_type)
def buttonClicked():
print ("pushButton clicked")
class MyWidget(base_type, ui_type):
def __init__(self, parent... | 23.478261 | 65 | 0.72963 |
a1671e039ab52ce93f1961d889942729c49d981b | 2,708 | py | Python | Packs/GoogleChronicleBackstory/Scripts/ChroniclePotentiallyBlockedIPWidgetScript/ChroniclePotentiallyBlockedIPWidgetScript_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/GoogleChronicleBackstory/Scripts/ChroniclePotentiallyBlockedIPWidgetScript/ChroniclePotentiallyBlockedIPWidgetScript_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/GoogleChronicleBackstory/Scripts/ChroniclePotentiallyBlockedIPWidgetScript/ChroniclePotentiallyBlockedIPWidgetScript_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from unittest.mock import patch
import demistomock as demisto
import ChroniclePotentiallyBlockedIPWidgetScript
INDICATOR_DATA = {'indicator': {'CustomFields': {'chronicleassethostname': '0.0.0.0',
'chroniclepotentiallyblockedip': 'No'}}}
def test_main_success(mocker)... | 41.030303 | 121 | 0.731167 |
a1be768935f25e92099fae4aca1f3ecc9761c986 | 1,285 | py | Python | CodeChef_problems/SCAT2020/SC_02.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | CodeChef_problems/SCAT2020/SC_02.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | CodeChef_problems/SCAT2020/SC_02.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | #PROBLEM : https://www.codechef.com/SCAT2020/problems/SC_02
#ORIGINAL SOLUTION : https://www.codechef.com/SCAT2020/status/SC_02,sahiljena
a = int(input()) #Input for number of testcases
for i in range(a):
n = int(input()) #input for number of boys and girls in the classroom
b = list(map(int,input().split())) ... | 55.869565 | 125 | 0.664591 |
629c9a8b7b007981094dd789b1c9fc224842a260 | 163 | py | Python | Implementation/vibrostudies-backend/db/authentication.py | VibroStudies/vibrostudies | 24491d4dd193655e3036354174babc4ab17a8639 | [
"MIT"
] | null | null | null | Implementation/vibrostudies-backend/db/authentication.py | VibroStudies/vibrostudies | 24491d4dd193655e3036354174babc4ab17a8639 | [
"MIT"
] | null | null | null | Implementation/vibrostudies-backend/db/authentication.py | VibroStudies/vibrostudies | 24491d4dd193655e3036354174babc4ab17a8639 | [
"MIT"
] | null | null | null | from rest_framework.authentication import TokenAuthentication
from models import AuthToken
class AuthTokenAuthentication(TokenAuthentication):
model=AuthToken | 32.6 | 61 | 0.877301 |
62b58b1e8ea77c8b210add38e81cda63ee33ca59 | 1,606 | py | Python | angstrom/2019/misc/TI-1337/wrapper.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | angstrom/2019/misc/TI-1337/wrapper.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | angstrom/2019/misc/TI-1337/wrapper.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | #!/usr/bin/env python3
"""
Wrapper that filters all input to the calculator program to make sure it follows the blacklist.
It is not necessary to fully understand this code. Just know it doesn't allow any of the characters in the following string:
"()[]{}_.#\"\'\\ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Check ti1337.py to see what ... | 40.15 | 124 | 0.722914 |
c50b8da449ffee3e0c399efdbc3865ce0373ded6 | 4,777 | py | Python | run.py | devmarcstorm/streets-in-berlin | 9e352aeb0499de992eb59dbaf34230933c5a1b3a | [
"MIT"
] | 2 | 2021-09-27T18:54:46.000Z | 2021-09-27T18:54:49.000Z | run.py | devmarcstorm/streets-in-berlin | 9e352aeb0499de992eb59dbaf34230933c5a1b3a | [
"MIT"
] | null | null | null | run.py | devmarcstorm/streets-in-berlin | 9e352aeb0499de992eb59dbaf34230933c5a1b3a | [
"MIT"
] | null | null | null | import json
import re
from datetime import datetime
import requests
from bs4 import BeautifulSoup
WIKI_ARTICLE_TITLE_PREFIX = "Liste_der_Straßen_und_Plätze_in_Berlin-"
WIKI_ARTICLE_TITLE_PREFIX_ALTERNATIVE = "Liste_der_Straßen_in_Berlin-"
LICENSE_PREFIX = """Die Straßennamen, sortiert nach Name und Bezirk, wurden au... | 35.649254 | 155 | 0.699393 |
c534dd494e1e32bb736ce488ef11fc2f35e99035 | 1,195 | py | Python | workshop_petstagram/workshop_petstagram/main/views/pets.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | 1 | 2022-03-03T10:16:14.000Z | 2022-03-03T10:16:14.000Z | workshop_petstagram/workshop_petstagram/main/views/pets.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | workshop_petstagram/workshop_petstagram/main/views/pets.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from workshop_petstagram.main.forms import AddPetForm, EditPetForm, DeletePetForm
from workshop_petstagram.main.helpers import get_profile
from workshop_petstagram.main.models import Pet
from workshop_petstagram.main.templatetags.profiles import has_profile
def pet_actio... | 30.641026 | 105 | 0.717992 |
c55f48547a2462c3d3fb74dea36a30053ee6c0e2 | 508 | pyde | Python | sketches/moiree/moiree01/moiree01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/moiree/moiree01/moiree01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/moiree/moiree01/moiree01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | def setup():
size(720, 500)
this.surface.setTitle(u"Mysteriöses Moiré")
def draw():
background(220)
x = 0
# x = width/2
noFill()
for i in range(0, 1500, 3):
mycolor = color(150, 100, 255)
strokeWeight(2)
stroke(mycolor)
ellipse(360, 250, i, i)
my... | 20.32 | 47 | 0.492126 |
3d959f73c2cc3d501f0529eee3c6ee9af7f0d019 | 1,234 | py | Python | checks/hyperlinks.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 19 | 2018-04-20T11:03:41.000Z | 2022-01-12T20:58:56.000Z | checks/hyperlinks.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 160 | 2018-04-05T16:12:59.000Z | 2022-03-01T13:01:27.000Z | checks/hyperlinks.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 8 | 2018-11-05T13:07:57.000Z | 2021-06-11T11:46:43.000Z | """
Collects information on hyperlinks on the page.
"""
import logging
from bs4 import BeautifulSoup
from checks.abstract_checker import AbstractChecker
class Checker(AbstractChecker):
def __init__(self, config, previous_results=None):
super().__init__(config, previous_results)
def depends_on_resul... | 23.730769 | 70 | 0.584279 |
3da31cf134f09f2d795b35dec921213662cf8582 | 3,261 | py | Python | python/pyqt/threading_basics_tutorial/design.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pyqt/threading_basics_tutorial/design.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pyqt/threading_basics_tutorial/design.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'threading_design.ui'
#
# Created by: PyQt5 UI code generator 5.14.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
... | 50.953125 | 123 | 0.744864 |
4942319d4075dd853800013d7541fb697da85f68 | 701 | py | Python | Python/Tipos e comandos/EquacaoSegundoGrau.py | gianvstheworld/POO | f6b9d3d351d703d974a6ca031ee636aea7119367 | [
"MIT"
] | null | null | null | Python/Tipos e comandos/EquacaoSegundoGrau.py | gianvstheworld/POO | f6b9d3d351d703d974a6ca031ee636aea7119367 | [
"MIT"
] | null | null | null | Python/Tipos e comandos/EquacaoSegundoGrau.py | gianvstheworld/POO | f6b9d3d351d703d974a6ca031ee636aea7119367 | [
"MIT"
] | null | null | null | from cmath import sqrt
'''
-- Nome: Gianluca Capezzuto Sardinha
-- NUSP: 11876933
-- Exercício 2
'''
def main():
a = leu()
b = leu()
c = leu()
delta = b**2 - 4 * a * c
x1 = (-b + sqrt(delta)) / (2 * a)
x2 = (-b - sqrt(delta)) / (2 * a)
print("A equação tem como raiz {0} e {1}".form... | 14.914894 | 65 | 0.479315 |
4973c73196ac2b80edec69b138578dff6ab32b89 | 2,897 | py | Python | src/onegov/translator_directory/views/language.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/translator_directory/views/language.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/translator_directory/views/language.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.elements import Link
from onegov.core.security import Secret, Private
from onegov.translator_directory import TranslatorDirectoryApp
from onegov.translator_directory.collections.language import LanguageCollection
from onegov.translator_directory.forms.language import LanguageForm
from onegov.translator... | 27.590476 | 79 | 0.652399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.