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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
58de394fd8dd21900c4b91e9bd80d5a68898ec92 | 5,149 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/eric_eccli/test_eric_eccli_command.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/eric_eccli/test_eric_eccli_command.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/eric_eccli/test_eric_eccli_command.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # (c) 2019 Ericsson.
#
# This file is part of Ansible
#
# Ansible 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 3 of the License, or
# (at your option) any later version.
#
# Ansible is distri... | 40.543307 | 146 | 0.682463 |
1890c534a93013bc8e1e81f9d0fa1418d165e09f | 2,316 | py | Python | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/57_sistema_perguntas_e_respostas/sistema_de_perguntas_respostas.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/57_sistema_perguntas_e_respostas/sistema_de_perguntas_respostas.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/57_sistema_perguntas_e_respostas/sistema_de_perguntas_respostas.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | """
Sistema de perguntas e respostas
"""
print()
print('Desafio multipla escolha.')
print('=' * 28)
pergutas = {
'Pergunta 1': {
'pergunta': 'Quanto é 2 + 2? ',
'respostas': {'a': '1', 'b': '4', 'c': '5'},
'respostas_certas': 'b',
},
'Pergunta 2': {
'pergunta': 'Quanto é 3 *... | 29.692308 | 69 | 0.474093 |
e198ba478c238f5d9fd8eb8e7c85d01fe28d32f6 | 915 | py | Python | udacity course code/01-02-readmorestocks.py | bluemurder/mlfl | b895b2f1d01b0f6418a5bcee2f204dd7916062f0 | [
"MIT"
] | 1 | 2021-03-22T22:25:54.000Z | 2021-03-22T22:25:54.000Z | udacity course code/01-02-readmorestocks.py | bluemurder/mlfl | b895b2f1d01b0f6418a5bcee2f204dd7916062f0 | [
"MIT"
] | 6 | 2017-01-16T09:53:21.000Z | 2017-01-18T12:20:09.000Z | udacity course code/01-02-readmorestocks.py | bluemurder/mlfl | b895b2f1d01b0f6418a5bcee2f204dd7916062f0 | [
"MIT"
] | null | null | null | import pandas as pd
def test_run():
#Define date range
start_date = '2010-01-22'
start_date = '2010-01-26'
dates = pd.date_range(start_date, end_date)
#Create an empty dataframe
df1 = pd.DataFrame(index = dates)
#Read SPY data into temporary dataframe
dfSPY = pd.read_csv("data/SPY.csv", index_col = "Date",... | 28.59375 | 94 | 0.653552 |
beca4eb85deb8e3aa3021730056125568bddf916 | 6,534 | py | Python | research/cv/SiamFC/src/custom_transforms.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/SiamFC/src/custom_transforms.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/SiamFC/src/custom_transforms.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... | 34.941176 | 89 | 0.535047 |
831c7eade82b03c4ce032f487e6d23cdc9e5c6ef | 3,894 | py | Python | training_testing/test.py | rafaspadilha/timestampVerificationTIFS | bad325e676b0b6087e54f2e280c3600c3b0b767f | [
"MIT"
] | 5 | 2022-03-11T18:08:32.000Z | 2022-03-31T13:47:49.000Z | training_testing/test.py | rafaspadilha/timestampVerificationTIFS | bad325e676b0b6087e54f2e280c3600c3b0b767f | [
"MIT"
] | null | null | null | training_testing/test.py | rafaspadilha/timestampVerificationTIFS | bad325e676b0b6087e54f2e280c3600c3b0b767f | [
"MIT"
] | null | null | null | #####################################################
# Content-Aware Detection of Timestamp Manipulation #
# IEEE Trans. on Information Forensics and Security #
# R. Padilha, T. Salem, S. Workman, #
# F. A. Andalo, A. Rocha, N. Jacobs #
##################################################... | 28.014388 | 99 | 0.62943 |
8357174fda35522a219d3857f1a2d3ad0743d28e | 989 | py | Python | build.py | schreibubi/conan-protobuf | 4f75f7b6cbba280b1ece9673b39140637c58781c | [
"MIT"
] | 4 | 2018-04-13T02:15:01.000Z | 2020-03-08T08:44:03.000Z | build.py | schreibubi/conan-protobuf | 4f75f7b6cbba280b1ece9673b39140637c58781c | [
"MIT"
] | 15 | 2017-12-05T23:12:36.000Z | 2020-06-24T15:31:50.000Z | recipes/protobuf/3.9.1/build.py | SolarFramework/conan-solar | cdb6253556c056baacaf3e5f28b595869adddb88 | [
"Apache-2.0"
] | 35 | 2017-12-05T16:27:25.000Z | 2021-07-16T16:40:37.000Z | #!/usr/bin/env python
from bincrafters import build_template_default, build_template_installer, build_shared
from conans import tools
import os
# installer might depend on lib or vice versa. Make sure that the dependecy is available and up-to-date
build_policy = os.getenv("CONAN_BUILD_POLICY", "outdated")
os.environ[... | 43 | 107 | 0.740142 |
36c8422408f13fcff54768a809681cc12a26fbe8 | 466 | py | Python | ProjectEuler_plus/euler_005.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_005.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_005.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
from functools import reduce
t = int(input().strip())
for a0 in range(t):
n = int(input().strip())
if n == 1:
print(1)
elif n == 2:
print(2)
elif n == 3:
print(6)
else:
nums = [2, 3]
for i in range(4, n + 1):
for... | 20.26087 | 47 | 0.433476 |
3d41d27f73d5b1df50a9ac25d59393fb507f70aa | 131 | py | Python | forge/configs.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 31 | 2015-07-13T15:36:50.000Z | 2022-02-07T21:37:51.000Z | forge/configs.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 109 | 2015-04-24T10:03:24.000Z | 2019-04-12T13:34:01.000Z | forge/configs.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 16 | 2015-10-03T06:03:22.000Z | 2022-03-31T08:24:37.000Z | # -*- coding: utf-8 -*-
import ConfigParser
tmsConfig = ConfigParser.RawConfigParser()
tmsConfig.read('configs/terrain/tms.cfg')
| 18.714286 | 42 | 0.740458 |
3d520c084aa6f755e5287e0973ac0e283f437a4d | 4,132 | py | Python | test/test_npu/test_network_ops/test_deformable_conv2d_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_deformable_conv2d_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_deformable_conv2d_backward.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... | 55.093333 | 109 | 0.613988 |
62bf60dda1e61d2dae7b08d962ddfb53488289c9 | 794 | py | Python | python/pyqt/LearnPyQt/q_label.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pyqt/LearnPyQt/q_label.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pyqt/LearnPyQt/q_label.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import sys
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (
QApplication,
QLabel,
QMainWindow,
)
from PyQt5.QtGui import QPixmap
class MainWindow(QMainWindow):
def __init__(self, *args, **kwargs):
super(MainWindow, self).__init__(*args, **kwargs)
self.setWindowTitle("Jayone... | 21.459459 | 62 | 0.65995 |
62d9b674c44f58c6ef9683e77fd3820f49b7cb6c | 633 | py | Python | python/generator_tricks_for_systemprogrammer/gengrep.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator_tricks_for_systemprogrammer/gengrep.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator_tricks_for_systemprogrammer/gengrep.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # gengrep.py
#
# Grep a sequence of lines that match a re pattern
import re
def gen_grep(pat, lines):
patc = re.compile(pat)
return (line for line in lines if patc.search(line))
# Example use
if __name__ == "__main__":
from pathlib import Path
from genopen import gen_open
from... | 22.607143 | 60 | 0.63981 |
c5546ce003e724beee7df88e65d6539c19ddd2f9 | 1,286 | py | Python | 3rdParty/snowball/python/create_init.py | sita1999/arangodb | 6a4f462fa209010cd064f99e63d85ce1d432c500 | [
"Apache-2.0"
] | 39 | 2015-01-07T09:30:28.000Z | 2021-12-01T13:04:03.000Z | 3rdParty/snowball/python/create_init.py | lipper/arangodb | 66ea1fd4946668192e3f0d1060f0844f324ad7b8 | [
"Apache-2.0"
] | 23 | 2018-06-07T07:46:27.000Z | 2018-08-06T17:57:39.000Z | 3rdParty/snowball/python/create_init.py | lipper/arangodb | 66ea1fd4946668192e3f0d1060f0844f324ad7b8 | [
"Apache-2.0"
] | 4 | 2015-01-02T16:35:37.000Z | 2018-05-12T23:55:27.000Z | #! /bin/sh/env python
import sys
import re
import os
python_out_folder = sys.argv[1]
filematch = re.compile(r"(\w+)_stemmer\.py$")
imports = []
languages = ['_languages = {']
for pyscript in os.listdir(python_out_folder):
match = filematch.match(pyscript)
if (match):
langname = match.group(1)
... | 24.730769 | 113 | 0.643857 |
9a924efb489cd955c1e204834646228cc6a66300 | 116 | py | Python | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/08.3-Loop.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/08.3-Loop.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/08.3-Loop.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | grocery = ["rice", "water", "tomato", "onion", "ginger"]
for i in range(2, len(grocery), 2):
print(grocery[i])
| 23.2 | 56 | 0.594828 |
9afb6741fdd47608bc850f867aabf4b32b6b77e3 | 5,577 | py | Python | envs/fixed/basic.py | etigerstudio/zilong-on-fire | 5144a471b2d39ea38a47d394e648de00dd13cd8b | [
"MIT"
] | 2 | 2021-01-07T01:10:49.000Z | 2022-01-21T09:37:16.000Z | envs/fixed/basic.py | etigerstudio/zilong-on-fire | 5144a471b2d39ea38a47d394e648de00dd13cd8b | [
"MIT"
] | null | null | null | envs/fixed/basic.py | etigerstudio/zilong-on-fire | 5144a471b2d39ea38a47d394e648de00dd13cd8b | [
"MIT"
] | null | null | null | # Created by ALuier Bondar on 2020/12/13.
import random
import numpy as np
from envs.base import BaseEnvironment, StateFormat
from enum import Enum
class BasicFixedEnvironment(BaseEnvironment):
"""Basic environment implementation with fixed main character
子龙位置固定的基本环境实现
"""
ALIVE_REWARD = 1.0 # 存活奖... | 31.508475 | 90 | 0.574682 |
4941b8a9c5856702e4d77c5bf79b039bff738855 | 3,726 | py | Python | tichywecker-beta.py | Trolliverpust/TichyWecker | 6b361d2ec25deeb0c74aa57bbea7ff1984c6a812 | [
"CC0-1.0"
] | 2 | 2021-03-31T16:22:19.000Z | 2021-04-12T10:15:24.000Z | tichywecker-beta.py | Trolliverpust/TichyWecker | 6b361d2ec25deeb0c74aa57bbea7ff1984c6a812 | [
"CC0-1.0"
] | null | null | null | tichywecker-beta.py | Trolliverpust/TichyWecker | 6b361d2ec25deeb0c74aa57bbea7ff1984c6a812 | [
"CC0-1.0"
] | null | null | null | from pygame import mixer
import phatbeat
import time, random, copy
from datetime import datetime
mixer.init(frequency=44100)
stundenzeiten = ["5uhr.mp3","6uhr.mp3","7uhr.mp3","8uhr.mp3","9uhr.mp3","10uhr.mp3","11uhr.mp3"]
minutenzeiten = ["fünf.mp3","zehn.mp3","fünfzehn.mp3","zwanzig.mp3","fünfundzwanzig.mp3","dreiß... | 28.661538 | 205 | 0.686795 |
b8fe75f9aa928b25fc50a1c698295ab96b8af482 | 2,509 | py | Python | apps/training_tf_simple_m/keras_advanced.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 2 | 2017-11-30T21:12:11.000Z | 2017-12-01T07:52:43.000Z | apps/training_tf_simple_m/keras_advanced.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 14 | 2017-11-14T18:12:53.000Z | 2018-06-03T16:07:57.000Z | apps/training_tf_simple_m/keras_advanced.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 3 | 2018-02-05T10:40:03.000Z | 2018-02-09T09:29:19.000Z | from keras.models import Sequential
from keras.layers import Dense
from keras.layers import Conv2D
from keras.layers import MaxPooling2D
from keras.layers import Flatten
from robolib.robogui import pixel_editor
import cv2
import keras
import numpy as np
import os.path as path
DEBUG = False
RELEARN = False
MODEL_FILEN... | 30.597561 | 108 | 0.664807 |
772d85da92e166fa459e639668b79d25e223bd7b | 737 | py | Python | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/60_list_comprehension/lista_compreensão.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/60_list_comprehension/lista_compreensão.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/60_list_comprehension/lista_compreensão.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | # melhora a performace do codigo
l1 = [1, 2, 3, 4, 5, 6, 7, 8, 9]
ex1 = [variavel for variavel in l1]
ex2 = [v * 2 for v in l1] # multiplica cado elemento da lista 1 por 2
ex3 = [(v, v2) for v in l1 for v2 in range(3)]
print(ex3)
l2 = ['pedro', 'mauro', 'maria']
ex4 = [v.replace('a', '@').upper() for v in l2] # m... | 25.413793 | 89 | 0.58616 |
a2718cace2c77da8ce7e4bf424f9813581430085 | 3,606 | py | Python | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/orchive/views.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/orchive/views.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/orchive/views.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render_to_response
import subprocess
import re
import marsyas
import numpy as np
# Redirect all output to stderr
import sys
sys.stdout = sys.stderr
def index(request):
buffer_size = int(request.GET.get('buffer_size', '1024'))
print "buffer_size=%i" % buffer_size
hop_size = in... | 34.342857 | 104 | 0.643649 |
0c2017f243ed9a45df63d2e776327cfdd5730247 | 1,403 | py | Python | ___Python/Daniel/2018-06-25-VHS-Bielefeld-Python/p05_random/m01_wuerfeln.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Daniel/2018-06-25-VHS-Bielefeld-Python/p05_random/m01_wuerfeln.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Daniel/2018-06-25-VHS-Bielefeld-Python/p05_random/m01_wuerfeln.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | import random
r = random.Random()
def wuerfeln():
return r.randint(1, 6) # Augenzahl zwischen 1 und 6
def muenzwurf():
return r.randint(0, 1) # 0 = Kopf, 1 = Zahl
def kugel():
return r.randint(1, 49)
d = {}
for i in range(100000):
augenzahl = wuerfeln()
if augenzahl in d:
... | 26.471698 | 139 | 0.644334 |
ac5dd0c09127b63d4e68b0569992c552a7879fdd | 4,505 | py | Python | research/cv/ESRGAN/src/util/extract_subimages.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/ESRGAN/src/util/extract_subimages.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/ESRGAN/src/util/extract_subimages.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... | 32.883212 | 97 | 0.621088 |
ce20feabb1d206d27691e74aa5ee74dbb2af1c88 | 9,752 | py | Python | research/cv/hardnet/src/HarDNet.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/hardnet/src/HarDNet.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/hardnet/src/HarDNet.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.25641 | 116 | 0.539274 |
cbeb67f84cfe722efa6282682e4bc7ce7c547f38 | 3,762 | py | Python | source/pkgsrc/math/py-numpy16/patches/patch-numpy_distutils_fcompiler_gnu.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/math/py-numpy16/patches/patch-numpy_distutils_fcompiler_gnu.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/math/py-numpy16/patches/patch-numpy_distutils_fcompiler_gnu.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-numpy_distutils_fcompiler_gnu.py,v 1.1 2020/04/27 16:52:56 adam Exp $
Linker needs -shared explictly (at least with GCC 4.7 on SunOS), plus
any ABI flags as appropriate.
Do not generate debug symbols (remove '-g').
On OS X, do not use '-bundle' and 'dynamic_lookup' (to avoid Python.framework).
Do not us... | 44.258824 | 84 | 0.524455 |
022d097bf65128a8000a14abb3976badfcb8dec3 | 1,159 | py | Python | src/scheduler/models/execution.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 156 | 2021-11-19T18:50:14.000Z | 2022-03-31T19:48:59.000Z | src/scheduler/models/execution.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 30 | 2021-12-27T19:30:56.000Z | 2022-03-30T17:49:00.000Z | src/scheduler/models/execution.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 14 | 2022-01-17T23:24:34.000Z | 2022-03-29T09:27:47.000Z | from dataclasses import dataclass, field
from datetime import datetime
from mashumaro import DataClassDictMixin
from sqlalchemy import Column, Integer, Sequence, Text, DateTime
from typing import Optional
from sqlalchemy.sql.functions import func
from scheduler import constants
from . import mapper_registry
@mapper_... | 44.576923 | 139 | 0.755824 |
0283e9f4a46087d0920d283936e11e8f0ab7031f | 545 | py | Python | web/user/userinfo.py | liukai0322/docklet | 9e4d1f4fc2e523423b0e94406242a29b20643788 | [
"BSD-3-Clause"
] | 1 | 2016-05-31T06:52:53.000Z | 2016-05-31T06:52:53.000Z | web/user/userinfo.py | liukai0322/docklet | 9e4d1f4fc2e523423b0e94406242a29b20643788 | [
"BSD-3-Clause"
] | null | null | null | web/user/userinfo.py | liukai0322/docklet | 9e4d1f4fc2e523423b0e94406242a29b20643788 | [
"BSD-3-Clause"
] | null | null | null | from flask import redirect, request
from dockletreq.dockletrequest import dockletRequest
from view.view import normalView
import json
class userinfoView(normalView):
template_path = "user/info.html"
@classmethod
def get(self):
userinfo = dockletRequest.post('/user/selfQuery/')
userinfo = u... | 28.684211 | 84 | 0.706422 |
5a1c6b8ad99f689ce431f2ceb8bde434544f1cf8 | 801 | py | Python | torch/fx/experimental/fx2trt/converter_registry.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 183 | 2018-04-06T21:10:36.000Z | 2022-03-30T15:05:24.000Z | torch/fx/experimental/fx2trt/converter_registry.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 631 | 2018-06-05T16:59:11.000Z | 2022-03-31T16:26:57.000Z | torch/fx/experimental/fx2trt/converter_registry.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 58 | 2018-06-05T16:40:18.000Z | 2022-03-16T15:37:29.000Z | from typing import Callable, Dict, Any
from torch.fx.node import Target
CONVERTERS: Dict[Target, Any] = {}
NO_IMPLICIT_BATCH_DIM_SUPPORT = {}
NO_EXPLICIT_BATCH_DIM_SUPPORT = {}
def tensorrt_converter(
key: Target,
no_implicit_batch_dim: bool = False,
no_explicit_batch_dim: bool = False,
enabled: bo... | 25.03125 | 58 | 0.695381 |
0c8292160ca0c7e04cec50e42a42bbc834cdd01c | 5,398 | py | Python | research/cv/ivpf/ivpf/lu.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/ivpf/ivpf/lu.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/ivpf/ivpf/lu.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... | 37.748252 | 108 | 0.571693 |
0bb1c8adbc80d75ecc15a2d59531ccf07a2424db | 4,801 | py | Python | model_zoo/gpt/deploy/python/inference.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/gpt/deploy/python/inference.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/gpt/deploy/python/inference.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"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... | 36.930769 | 154 | 0.653822 |
b2e19a83348cb59fe0368e27bac3842ea8cc149b | 2,882 | py | Python | backend/api/apps.py | giacomooo/CASFEE_Project2 | 420ff488d6b9deefe6623a45ecfed299f97a4639 | [
"MIT"
] | null | null | null | backend/api/apps.py | giacomooo/CASFEE_Project2 | 420ff488d6b9deefe6623a45ecfed299f97a4639 | [
"MIT"
] | null | null | null | backend/api/apps.py | giacomooo/CASFEE_Project2 | 420ff488d6b9deefe6623a45ecfed299f97a4639 | [
"MIT"
] | null | null | null | import json
import ssl
from django.apps import AppConfig
from django.conf import settings
from six.moves import urllib
from cryptography import x509
from cryptography.hazmat import backends
# Don't verify ssl Certificates
# pylint: disable=protected-access
ssl._create_default_https_context = ssl._create_unverified_co... | 40.027778 | 126 | 0.505205 |
33639871c24dbe8220918ed7e0ceaf23e4536a1c | 1,828 | py | Python | python-bildungslogin/ucs-test/97_bildungslogin_python/00_unittests.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | python-bildungslogin/ucs-test/97_bildungslogin_python/00_unittests.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | python-bildungslogin/ucs-test/97_bildungslogin_python/00_unittests.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | #!/usr/share/ucs-test/runner /usr/bin/py.test -slvv --cov --cov-config=.coveragerc --cov-report=
# -*- 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 Lic... | 33.851852 | 96 | 0.704048 |
d7cfe0a05a02b1f1459d2136908509e268166e83 | 4,897 | py | Python | packages/watchmen-model/src/watchmen_model/admin/pipeline.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-model/src/watchmen_model/admin/pipeline.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-model/src/watchmen_model/admin/pipeline.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from enum import Enum
from typing import List, Optional, Union
from pydantic import BaseModel
from watchmen_model.common import construct_parameter_joint, OptimisticLock, PipelineId, \
PipelineStageId, PipelineUnitId, TenantBasedTuple, TopicId
from watchmen_utilities import ArrayHelper
from .conditional import Condi... | 33.087838 | 114 | 0.771493 |
cc0e17ee0bc188f5e8239bf0cbd35a92b56bb5ec | 33,675 | py | Python | Packs/OpsGenie/Integrations/OpsGenieV3/OpsGenieV3_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/OpsGenie/Integrations/OpsGenieV3/OpsGenieV3_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/OpsGenie/Integrations/OpsGenieV3/OpsGenieV3_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
import io
from CommonServerPython import *
import OpsGenieV3
from unittest import mock
def util_load_json(path):
with io.open(path, mode='r', encoding='utf-8') as f:
return json.loads(f.read())
def test_create_alert_wrong_responders():
"""
Given:
- An app client object
... | 36.523861 | 130 | 0.640891 |
041a22471dd79a6cbe232b3a793ccf31afa7baf9 | 2,747 | py | Python | fhirclient/r4models/population.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | fhirclient/r4models/population.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | fhirclient/r4models/population.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/Population) on 2019-05-07.
# 2019, SMART Health IT.
from . import backboneelement
class Population(backboneelement.BackboneElement):
""" A definition of a set of people that... | 38.690141 | 119 | 0.631962 |
f0c7045b0199ef4521f850d201b9ea515845de52 | 34,752 | py | Python | packages/watchmen-data-kernel/src/watchmen_data_kernel/storage_bridge/ask_from_memory.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/storage_bridge/ask_from_memory.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/storage_bridge/ask_from_memory.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from __future__ import annotations
from abc import abstractmethod
from datetime import date, datetime, time
from decimal import Decimal
from typing import Any, Callable, List, Optional, Tuple, Union
from watchmen_auth import PrincipalService
from watchmen_data_kernel.common import ask_all_date_formats, ask_time_forma... | 43.494368 | 120 | 0.784703 |
a8da1d638b213d085a95457cfe7061b0eba7c69a | 5,283 | py | Python | src/onegov/agency/views/settings.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/agency/views/settings.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/agency/views/settings.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from wtforms_components import ColorField
from onegov.agency import _
from onegov.agency.app import AgencyApp
from onegov.core.security import Secret
from onegov.form import Form
from onegov.form.fields import ChosenSelectMultipleField
from onegov.org.models import Organisation
from onegov.org.views.settings import ha... | 31.825301 | 77 | 0.622752 |
7660cb245f36afec495ce9ce25dda06a886ab3ce | 3,524 | py | Python | test/test_npu/test_network_ops/test_amp_non_finite_check_and_unscale_.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_amp_non_finite_check_and_unscale_.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_amp_non_finite_check_and_unscale_.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... | 44.05 | 93 | 0.702894 |
8c006a4b80e033f49eb4d9e74132a53d67c356b5 | 2,135 | py | Python | Chapter10_RNN/rnnKeras2.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter10_RNN/rnnKeras2.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter10_RNN/rnnKeras2.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | import random
import numpy as np
import tensorflow as tf
from tensorflow.keras.layers import SimpleRNN
from tensorflow.keras.models import Sequential
np.random.seed(0)
tf.random.set_seed(0)
def sigmoid_fn(x: np.ndarray) -> np.ndarray:
return x # TODO
def tanh_fn(x: np.ndarray) -> np.ndarray:... | 27.727273 | 98 | 0.581265 |
8b2a51b38fa4d2a9cf7396735c9a74ee5188a508 | 160 | py | Python | exercises/fr/test_03_14_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/test_03_14_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/test_03_14_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
"for doc in nlp.pipe(TEXTS)" in __solution__
), "Itères-tu sur les docs générés par nlp.pipe ?"
__msg__.good("Joli !")
| 26.666667 | 54 | 0.60625 |
508c47f98c5d4951fc383b58161789e9c41ac1cb | 31 | py | Python | Trees/__init__.py | dileeppandey/hello-interview | 78f6cf4e2da4106fd07f4bd86247026396075c69 | [
"MIT"
] | null | null | null | Trees/__init__.py | dileeppandey/hello-interview | 78f6cf4e2da4106fd07f4bd86247026396075c69 | [
"MIT"
] | null | null | null | Trees/__init__.py | dileeppandey/hello-interview | 78f6cf4e2da4106fd07f4bd86247026396075c69 | [
"MIT"
] | 1 | 2020-02-12T16:57:46.000Z | 2020-02-12T16:57:46.000Z | import Trees.TreeNode as Node
| 10.333333 | 29 | 0.806452 |
50e44e45b6ab915608bb6ef3d6fcf8ff9afcea26 | 608 | py | Python | kts/core/backend/util.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 18 | 2019-02-14T13:10:07.000Z | 2021-11-26T07:10:13.000Z | kts/core/backend/util.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-02-17T14:06:42.000Z | 2019-09-15T18:05:54.000Z | kts/core/backend/util.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-09-15T13:12:42.000Z | 2020-04-15T14:05:54.000Z | import sys
import ray
from kts.core.backend.address_manager import get_address_manager
from kts.core.frame import KTSFrame
def in_cli():
return sys.argv[0].endswith('kts')
def in_worker():
return sys.argv[0].endswith('default_worker.py')
def in_pytest():
return sys.argv[0].endswith('pytest')
def s... | 20.266667 | 64 | 0.684211 |
e859338bb40c4c64c63da07aa9568c1eae514b14 | 464 | py | Python | exam_recipes/exam_recipes/web/urls.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | 1 | 2022-03-03T10:16:14.000Z | 2022-03-03T10:16:14.000Z | exam_recipes/exam_recipes/web/urls.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | exam_recipes/exam_recipes/web/urls.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | from django.urls import path
from exam_recipes.web.views import show_home, create_recipe, edit_recipe, delete_recipe, \
show_details_recipe
urlpatterns = (
path('', show_home, name='index'),
path('create/', create_recipe, name='create recipe'),
path('edit/<int:pk>/', edit_recipe, name='edit recipe'),
... | 35.692308 | 90 | 0.700431 |
fa6553d8428219658417b6dc6e87f04db546d2cc | 9,450 | py | Python | test/test_npu/test_network_ops/test_cdist.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_cdist.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_cdist.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... | 48.71134 | 124 | 0.59418 |
ad80c9ac4356a9d07f5c721e4250961a10add7cb | 1,587 | py | Python | core/score.py | kklocker/EiT-WiFi-placer | c2c621baa06377d62567d7bd0c2f048f1e6c0859 | [
"MIT"
] | null | null | null | core/score.py | kklocker/EiT-WiFi-placer | c2c621baa06377d62567d7bd0c2f048f1e6c0859 | [
"MIT"
] | null | null | null | core/score.py | kklocker/EiT-WiFi-placer | c2c621baa06377d62567d7bd0c2f048f1e6c0859 | [
"MIT"
] | null | null | null | import numpy as np
from numba import jit
from dask.array import ma
def create_gaussian(N=1000, sigma=1.0, mu=0):
"""
Kun for testing
"""
x, y = np.meshgrid(np.linspace(-1, 1, N), np.linspace(-1, 1, N))
d = np.sqrt(x * x + y * y)
return (
1.0
/ (sigma * np.sqrt(2 * np.pi))
... | 25.596774 | 81 | 0.542533 |
adbc5f93e53fcf697262071878f69d30813ff3fa | 1,183 | py | Python | DataStructure/U8/Lecture/Dijkstra.py | qiaw99/Data-Structure | 3b1cdce96d4f35329ccfec29c03de57378ef0552 | [
"MIT"
] | 1 | 2019-10-29T08:21:41.000Z | 2019-10-29T08:21:41.000Z | DataStructure/U8/Lecture/Dijkstra.py | qiaw99/Data-Structure | 3b1cdce96d4f35329ccfec29c03de57378ef0552 | [
"MIT"
] | null | null | null | DataStructure/U8/Lecture/Dijkstra.py | qiaw99/Data-Structure | 3b1cdce96d4f35329ccfec29c03de57378ef0552 | [
"MIT"
] | null | null | null | from Halde import Halde as PWSchlange
def dijkstra(s,V,E):
d = {s: 0}
f = {s: None}
henkel = dict()
U = PWSchlange(len(V)) # unfertige Knoten
henkel[s] = U.einfügen(s,0)
F = [] # fertige Knoten
while not U.istleer():
u = U.entferneMin()
for v,c in E[u]: # c = c[u,v]
... | 25.717391 | 83 | 0.384615 |
cb4bb730743d108277151fb6fd604c41e6d1d4b3 | 972 | py | Python | challenges/pagesNumberingWithInk/python3/pagesNumberingWithInk.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 5 | 2020-05-21T03:02:34.000Z | 2021-09-06T04:24:26.000Z | challenges/pagesNumberingWithInk/python3/pagesNumberingWithInk.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 6 | 2019-04-24T03:39:26.000Z | 2019-05-03T02:10:59.000Z | challenges/pagesNumberingWithInk/python3/pagesNumberingWithInk.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 1 | 2021-09-06T04:24:27.000Z | 2021-09-06T04:24:27.000Z | def pagesNumberingWithInk(current, numberOfDigits):
currentNumberOfDigits = len(str(current))
while numberOfDigits >= currentNumberOfDigits:
numberOfDigits -= currentNumberOfDigits
current += 1
currentNumberOfDigits = len(str(current))
return current-1
if __name__ == '__main__':
input0 = [1, 21, 8, 21, 76, 8... | 54 | 136 | 0.708848 |
3806b0ea8b122381b0d82fb8c223b8f6322ce4a1 | 1,330 | py | Python | shinrl/_utils/log.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | 34 | 2021-12-09T07:12:57.000Z | 2022-03-11T08:17:20.000Z | shinrl/_utils/log.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | null | null | null | shinrl/_utils/log.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | 4 | 2021-12-11T07:48:01.000Z | 2022-03-01T23:50:33.000Z | """ Functions for logging.
Author: Toshinori Kitamura
Affiliation: NAIST & OSX
"""
import logging
import structlog
from structlog.processors import *
from structlog.stdlib import *
def initialize_log_style() -> None:
shinrl_logger = logging.getLogger()
shinrl_logger.handlers = []
stream_handler = loggin... | 28.913043 | 67 | 0.7 |
69863ca02f0b5a396ac17e9da77d3a2419670e00 | 522 | py | Python | Python/024-Alphabet-Rangoli.py | sadikkuzu/HackerRank | 2b1ed2cf41f6a5404c5b9293186f301b646b5d33 | [
"Apache-2.0"
] | 5 | 2019-03-09T22:44:01.000Z | 2021-09-14T00:11:38.000Z | Python/024-Alphabet-Rangoli.py | jguerra7/HackerRank-4 | 7e1663d0050ffbb0fd885b8affdada9ea13b0e80 | [
"Apache-2.0"
] | 4 | 2018-08-16T09:39:47.000Z | 2018-09-14T17:37:07.000Z | Python/024-Alphabet-Rangoli.py | jguerra7/HackerRank-4 | 7e1663d0050ffbb0fd885b8affdada9ea13b0e80 | [
"Apache-2.0"
] | 1 | 2020-06-01T23:38:35.000Z | 2020-06-01T23:38:35.000Z | # https://www.hackerrank.com/challenges/alphabet-rangoli
from __future__ import print_function
import string
def print_rangoli(size):
# your code goes here
N = size
alphabet = string.ascii_lowercase[:N]
height = N * 2 - 1
width = N * 4 - 3
lines = [None] * height
for i in range(N):
s... | 34.8 | 71 | 0.616858 |
6986c6124ac57116e5621bb681049043bb324a2a | 283 | py | Python | pyntcloud/structures/__init__.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 1,142 | 2016-10-10T08:55:30.000Z | 2022-03-30T04:46:16.000Z | pyntcloud/structures/__init__.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 195 | 2016-10-10T08:30:37.000Z | 2022-02-17T12:51:17.000Z | pyntcloud/structures/__init__.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 215 | 2017-02-28T00:50:29.000Z | 2022-03-22T17:01:31.000Z | """
HAKUNA MATATA
"""
from .convex_hull import ConvexHull
from .delaunay import Delaunay3D
from .kdtree import KDTree
from .voxelgrid import VoxelGrid
ALL_STRUCTURES = {
'convex_hull': ConvexHull,
'delaunay3D': Delaunay3D,
'kdtree': KDTree,
'voxelgrid': VoxelGrid
}
| 18.866667 | 35 | 0.727915 |
69a4aae0444bbdb6a629ab16667784be8b727bf4 | 4,569 | py | Python | hihope_neptune-oh_hid/00_src/v0.1/third_party/LVM2/daemons/lvmdbusd/fetch.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | 1 | 2022-02-15T08:51:55.000Z | 2022-02-15T08:51:55.000Z | hihope_neptune-oh_hid/00_src/v0.3/third_party/LVM2/daemons/lvmdbusd/fetch.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | hihope_neptune-oh_hid/00_src/v0.3/third_party/LVM2/daemons/lvmdbusd/fetch.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2015-2016 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
# of the GNU General Public License v.2.
#
# You should have received a copy of the GNU General Public License
# a... | 27.035503 | 76 | 0.711753 |
69f11f56d4c3dee6a1d4e4ee4e7025c66fde8f92 | 107 | py | Python | gemtown/advertisings/apps.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | gemtown/advertisings/apps.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | 5 | 2020-09-04T20:13:39.000Z | 2022-02-17T22:03:33.000Z | gemtown/advertisings/apps.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class AdvertisingsConfig(AppConfig):
name = 'gemtown.advertisings'
| 17.833333 | 36 | 0.785047 |
38bce8986af1535f0b0e124a7b568c6c3a54126b | 2,939 | py | Python | 10.3389/fimmu.2018.00251/bin/make_cdr3_clusters_tsv.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | 10.3389/fimmu.2018.00251/bin/make_cdr3_clusters_tsv.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | 10.3389/fimmu.2018.00251/bin/make_cdr3_clusters_tsv.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
import argparse
import re
from Bio import SeqIO
def create_tsv(f, c, o):
# read FASTA file
fastafh = open(f, 'rU')
seqid2seq = {}
for record in SeqIO.parse(fastafh, "fasta"):
seqid2seq[record.description] = str(record.seq)
fastafh.close()
... | 37.679487 | 124 | 0.5672 |
2a8a4cf7528e55b86e459f3e34037114eba2f802 | 147 | py | Python | Algorithms/DynamticProgramming/FibonacciModified.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/DynamticProgramming/FibonacciModified.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/DynamticProgramming/FibonacciModified.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
t1, t2, n = map(int, raw_input().split())
ar = [t1, t2]
for i in xrange(2, n):
ar.append(ar[i-2] + ar[i-1]**2)
print ar[n-1]
| 13.363636 | 41 | 0.55102 |
aa4a130cb268d7e604242cf03ed4b2348372d709 | 554 | py | Python | backend/alembic/versions/7b852dfcc007_version_0_0_7n.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-11-04T17:06:07.000Z | 2021-11-04T17:06:07.000Z | backend/alembic/versions/7b852dfcc007_version_0_0_7n.py | JamesNeumann/learning-by-annotations | c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad | [
"MIT"
] | 21 | 2021-11-01T10:13:56.000Z | 2021-12-02T10:02:13.000Z | backend/alembic/versions/7b852dfcc007_version_0_0_7n.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-12-16T18:20:55.000Z | 2021-12-16T18:20:55.000Z | """Version 0.0.7n
Revision ID: 7b852dfcc007
Revises: a5e49aaba65b
Create Date: 2021-11-10 18:58:16.440339
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "7b852dfcc007"
down_revision = "a5e49aaba65b"
branch_labels = None
depends_on = None
def upgrade():
#... | 19.103448 | 65 | 0.684116 |
aabe68dc632cf7c0b16f9ce291bc48d9dc626585 | 4,330 | py | Python | code/03_analysis_databricks/ST3-CALIBER_counts.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | code/03_analysis_databricks/ST3-CALIBER_counts.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | code/03_analysis_databricks/ST3-CALIBER_counts.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | # Databricks notebook source
# MAGIC %md
# MAGIC # Supplementary Table 3: CALIBER phenotype frequencies
# MAGIC
# MAGIC **Description**
# MAGIC
# MAGIC This notebook produces the number of distinct individuals with a CALIBER phenotype prior to 01/01/2020, as used when defining comorbidities for `CCU013: COVID-19 Ev... | 39.009009 | 386 | 0.696536 |
632fadfe02d175c47ee0d450dae1827460616a0d | 4,008 | py | Python | runServer.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | runServer.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | runServer.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding=utf-8 -*-
import ConfigParser
import logging
import os.path
import signal
import sys
import time
import tornado.autoreload
import tornado.httpserver
import tornado.ioloop
import tornado.web
from tornado.options import define, options
from tornado_swagger import swagger
import pymongo
... | 29.255474 | 103 | 0.660429 |
ea02f19281507543c200df1b554943965cfa3e68 | 97 | py | Python | Online-Judges/CodingBat/Python/List-01/08-max_end3.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | 3 | 2021-06-15T01:19:23.000Z | 2022-03-16T18:23:53.000Z | Online-Judges/CodingBat/Python/List-01/08-max_end3.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | Online-Judges/CodingBat/Python/List-01/08-max_end3.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | def max_end3(nums):
if nums[0] > nums[-1]:
return nums[0:1]*3
return nums[-1:]*3
| 19.4 | 26 | 0.536082 |
105a12b83659a78b7fbcd543264101da75a1a970 | 12,778 | py | Python | PyTorchStuff/autoencoders/autoencoder.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | null | null | null | PyTorchStuff/autoencoders/autoencoder.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-02-11T23:44:52.000Z | 2021-02-11T23:44:52.000Z | PyTorchStuff/autoencoders/autoencoder.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-12-16T01:02:23.000Z | 2021-12-16T01:02:23.000Z | # %% [markdown]
# # Image compression - part 2. - Autoencoders
# In this post I will be looking at building an autoencoder to compress the MNIST dataset.
# See part 1. [here](https://github.com/stanton119/data-analysis/blob/master/PyTorchStuff/autoencoders/pca.md).
#
# Autoencoders build a network to encode the origin... | 37.037681 | 121 | 0.715761 |
52b4aa4d80d68268e826d7c76459d1ca24597cc0 | 6,249 | py | Python | cs/lambda_cs/03_data_structures/lru_cache/lru_cache.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | cs/lambda_cs/03_data_structures/lru_cache/lru_cache.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | cs/lambda_cs/03_data_structures/lru_cache/lru_cache.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | """
Data Structures :: LRU Cache
"""
class ListNode:
def __init__(self, key, value, prev=None, next=None):
"""A node in a doubly-linked list-based LRU cache.
:param key : Key by which to access nodes.
:param value : Value accessed by key.
:param pre... | 35.106742 | 77 | 0.587774 |
5222fa049d599fb481c2d0979a5845d32fa77c9c | 4,461 | py | Python | Chapter9_AdvancedDL/Chapter9_3_ModelImprovement/bostonDnnFinal.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter9_AdvancedDL/Chapter9_3_ModelImprovement/bostonDnnFinal.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter9_AdvancedDL/Chapter9_3_ModelImprovement/bostonDnnFinal.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | import os
from typing import Tuple
import numpy as np
import tensorflow as tf
from tensorflow.keras.callbacks import EarlyStopping
from tensorflow.keras.callbacks import LearningRateScheduler
from tensorflow.keras.layers import Activation
from tensorflow.keras.layers import BatchNormalization
from tensorflow.keras.lay... | 25.786127 | 79 | 0.667563 |
52470857cc0f7310b4a4edf3f77a2669a09b8027 | 2,311 | py | Python | PINp/2015/DENISENKO_A_N/task_10_27.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2015/DENISENKO_A_N/task_10_27.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2015/DENISENKO_A_N/task_10_27.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 10
# Напишите программу "Генератор персонажей" для игры. Пользователю должно
#быть предоставлено 30 пунктов, которые можно распределить между четырьмя
#характеристиками: Сила, Здоровье, Мудрость и Ловкость. Надо сделать так, чтобы
#пользователь мог не только брать эти пункты из общего "пула", но и возвраща... | 37.885246 | 154 | 0.658589 |
0dbb4978f0a9567e13d7bc0339ab70c82f5851ec | 1,720 | py | Python | backend/apps/mapview/views.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | 3 | 2020-03-27T20:39:31.000Z | 2020-03-31T20:24:55.000Z | backend/apps/mapview/views.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | 21 | 2020-03-28T09:57:15.000Z | 2020-03-31T11:38:00.000Z | backend/apps/mapview/views.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
from django.template import loader
from apps.mapview.utils import plzs
from apps.iamstudent.models import Student
from functools import lru_cache
import time
from django.views.decorators.gzip import gzip_page
# Should be safe against BREACH a... | 30.714286 | 99 | 0.643023 |
10fca0718d1cb946212f20c12d90e44ce3a6c568 | 2,621 | py | Python | Apps/Auswertung/tests/test_data_frame.py | RGreinacher/bachelor-thesis | 60dbc03ce40e3ec42f2538d67a6aabfea6fbbfc8 | [
"MIT"
] | 1 | 2021-04-13T10:00:46.000Z | 2021-04-13T10:00:46.000Z | Apps/Auswertung/tests/test_data_frame.py | RGreinacher/bachelor-thesis | 60dbc03ce40e3ec42f2538d67a6aabfea6fbbfc8 | [
"MIT"
] | null | null | null | Apps/Auswertung/tests/test_data_frame.py | RGreinacher/bachelor-thesis | 60dbc03ce40e3ec42f2538d67a6aabfea6fbbfc8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# import python libs
import json
from pprint import pprint as pp
import sys
sys.path.append('../')
# import project libs
from constants import *
from helper import *
# defining globals & constants
PREANNOTATIONS_START_INDEX = 27
BLOCK_OFFSET = 58
# methods
def chec... | 33.177215 | 117 | 0.642503 |
33bc96a6b82d0998e27bd153b054902618cd01d8 | 2,810 | py | Python | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOpoint.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 3 | 2019-06-18T15:28:09.000Z | 2019-07-11T07:31:45.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOpoint.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 2 | 2019-07-11T14:03:25.000Z | 2021-02-08T16:14:04.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOpoint.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 1 | 2019-06-12T11:07:37.000Z | 2019-06-12T11:07:37.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
from PyQt5.QtWidgets import QToolBar, QWidget, QSizePolicy
from PyQt5.QtCore import QObject, Qt
from .gto_point import GTOPointWidget
class run(QObject): # gtoAction
def __init__(self, id, gtoTool, config, debug):
super(run, self).__init__()
# reference... | 40.724638 | 90 | 0.562989 |
d5697ab5e5c29d2672f3bcb9baa216f5d4804748 | 898 | py | Python | Backend/models/dashboard.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 15 | 2020-04-24T20:18:11.000Z | 2022-01-31T21:05:05.000Z | Backend/models/dashboard.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 2 | 2021-05-19T07:15:09.000Z | 2022-03-07T08:29:34.000Z | Backend/models/dashboard.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 4 | 2020-04-27T16:20:13.000Z | 2021-02-23T10:39:42.000Z | from datetime import datetime
from tzlocal import get_localzone
from marshmallow_sqlalchemy import SQLAlchemyAutoSchema
from db import db
class Dashboard(db.Model):
__tablename__ = 'dashboards'
id = db.Column(db.String, primary_key=True, nullable=False, autoincrement=False, unique=True)
dashboard = db.... | 32.071429 | 98 | 0.737194 |
896e4a74c260f7ec2fdf348d074dca5f5baa04fa | 1,662 | py | Python | Algorithms/Bit_Manipulation/counter_game.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Bit_Manipulation/counter_game.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Bit_Manipulation/counter_game.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
for _ in range(int(input())):
N = int(input().strip())
# If they set counter to 1, Richard wins,
# because its Louise' turn and she cannot make a move.
N -= 1
b = bin(N)[2:]
b_sum = sum([bn == '1' for bn in b])
if b_sum & 1:
print('Louise')
... | 22.767123 | 79 | 0.43923 |
89a6dd760067157994139d9c3d93fca3d158f064 | 380 | py | Python | 30 Days of Code/30DoC-day-16/30DoC_day_16.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | 30 Days of Code/30DoC-day-16/30DoC_day_16.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | 30 Days of Code/30DoC-day-16/30DoC_day_16.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | #!/bin/python3
import sys
# print parsed integer value of S
# or print("Bad String")
# Note: You must use the String-to-Integer and exception handling constructs built into your submission language. If you attempt to use loops/conditional statements, you will get a score.
S = input().strip()
try:
intS = int(S)... | 22.352941 | 188 | 0.718421 |
7f4be777897f4040ca7581001a3c94a9916c59a3 | 4,895 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/cnos/test_cnos_bgp.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/cnos/test_cnos_bgp.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/cnos/test_cnos_bgp.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.plugins.modules.network.cnos import cnos_bgp
from ansible_collections.community.general.tests.unit.modules.ut... | 50.989583 | 141 | 0.593054 |
c3832d7cabef802cff641b32eac6406948f75ad4 | 791 | py | Python | third-party/pybind11/pybind11/__main__.py | alskondr/xlnt | 7f00e91760886204c847fc659bed47234f46f3e6 | [
"Unlicense"
] | 54 | 2019-01-14T18:38:23.000Z | 2022-03-31T02:03:23.000Z | third-party/pybind11/pybind11/__main__.py | alskondr/xlnt | 7f00e91760886204c847fc659bed47234f46f3e6 | [
"Unlicense"
] | 8 | 2019-01-13T09:58:04.000Z | 2021-08-14T12:12:39.000Z | third-party/pybind11/pybind11/__main__.py | alskondr/xlnt | 7f00e91760886204c847fc659bed47234f46f3e6 | [
"Unlicense"
] | 17 | 2019-05-16T06:08:34.000Z | 2022-03-11T15:18:05.000Z | from __future__ import print_function
import argparse
import sys
import sysconfig
from . import get_include
def print_includes():
dirs = [sysconfig.get_path('include')]
if sysconfig.get_path('platinclude') not in dirs:
dirs.append(sysconfig.get_path('platinclude'))
if get_include() not in dirs:
... | 24.71875 | 83 | 0.65866 |
7f0e0e9de9bf93cf1117f1f94a68c3b56ccb2a78 | 1,765 | py | Python | furniture_store/furniture_store/web/migrations/0001_initial.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | 1 | 2022-03-03T10:16:14.000Z | 2022-03-03T10:16:14.000Z | furniture_store/furniture_store/web/migrations/0001_initial.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | furniture_store/furniture_store/web/migrations/0001_initial.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.2 on 2022-02-24 12:28
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import furniture_store.web.validators
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.C... | 44.125 | 155 | 0.635127 |
9c9b3cb7e0123f8e7b14c555aacaebf8163af36c | 2,663 | py | Python | src/onegov/user/sync.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/user/sync.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/user/sync.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null |
class UserSource(object):
""" Generalized UserSource to facilitate ldap sync """
def __init__(self, name, bases, org=None, filters=None, user_type=None,
default_filter='(objectClass=*)',
verbose=False):
self.name = name.lower()
self._bases = bases
self... | 29.263736 | 76 | 0.609087 |
0d2e49f7696958e6d02efb00e6cf631de10d088b | 306 | py | Python | src/data_science/tests/tools/test_transformations.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | src/data_science/tests/tools/test_transformations.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | src/data_science/tests/tools/test_transformations.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | import unittest
from data_science.tools.transformations import per_hour_to_per_second
class TransformationsTest(unittest.TestCase):
"""Test that the functions in transformations work as expected"""
def test_per_hour_to_per_second(self):
self.assertEqual(per_hour_to_per_second(3600), 1)
| 30.6 | 69 | 0.800654 |
0d401bc9e2630812016d1a71dbadb57a459f43b3 | 140 | py | Python | Versuch4/latex/src/sinPlot.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | null | null | null | Versuch4/latex/src/sinPlot.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | null | null | null | Versuch4/latex/src/sinPlot.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | 1 | 2022-01-06T12:47:53.000Z | 2022-01-06T12:47:53.000Z | import numpy as np
X = np.linspace(-np.pi, np.pi, 256)
C,S = np.cos(X), np.sin(X)
# plot
fig,ax = plt.subplots()
ax.plot(X,C)
ax.plot(X,S)
| 15.555556 | 35 | 0.621429 |
b4f2d9b18ff0d98da40188e9751b360e8a3ad997 | 250 | py | Python | exercises/fr/solution_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/solution_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/solution_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
# Charge le modèle "fr_core_news_sm"
nlp = spacy.load("fr_core_news_sm")
text = "Apple a été créée en 1976 par Steve Wozniak, Steve Jobs et Ron Wayne."
# Traite le texte
doc = nlp(text)
# Affiche le texte du document
print(doc.text)
| 19.230769 | 78 | 0.736 |
2585bb11557ba0225ddcd3a77a31a15631114318 | 434 | py | Python | api/wsgi/src/manage.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | 2 | 2020-06-08T19:17:10.000Z | 2020-06-08T20:45:07.000Z | api/wsgi/src/manage.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | 14 | 2015-10-07T09:31:50.000Z | 2022-02-23T07:34:10.000Z | api/wsgi/src/manage.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
# Use local config if not on openshift server
if os.environ.get('SLIP_ENV') == 'local':
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.local")
else:
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.setti... | 27.125 | 75 | 0.721198 |
4cf5cbda98b109cd800545f47f8ecebe6fb83e1a | 341 | py | Python | solution/string/9342/main.py | gkgg123/baekjoon | 4ff8a1238a5809e4958258b5f2eeab7b22105ce9 | [
"MIT"
] | 2,236 | 2019-08-05T00:36:59.000Z | 2022-03-31T16:03:53.000Z | solution/string/9342/main.py | juy4556/baekjoon | bc0b0a0ebaa45a5bbd32751f84c458a9cfdd9f92 | [
"MIT"
] | 225 | 2020-12-17T10:20:45.000Z | 2022-01-05T17:44:16.000Z | solution/string/9342/main.py | juy4556/baekjoon | bc0b0a0ebaa45a5bbd32751f84c458a9cfdd9f92 | [
"MIT"
] | 602 | 2019-08-05T00:46:25.000Z | 2022-03-31T13:38:23.000Z | # Authored by : tony9402
# Co-authored by : -
# Link : http://boj.kr/4fcec3ea35e4472bbca8beeebd2fe065
import sys
import re
def input():
return sys.stdin.readline().rstrip()
regex = re.compile('^[A-F]?A+F+C+[A-F]?$')
N = int(input())
for testcase in range(N):
line = input()
print("Infected!" if regex.match... | 21.3125 | 55 | 0.653959 |
e26fa788d7a2f4d559051b1a1147be8b7c90801f | 1,045 | py | Python | INBa/2015/Cherniy_F_Y/task_7_28.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Cherniy_F_Y/task_7_28.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Cherniy_F_Y/task_7_28.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 7. Вариант 28.
# 1-50. Разработайте систему начисления очков для задачи 6, в соответствии с которой игрок получал бы большее количество баллов за меньшее количество попыток.
# Cherniy F. Y.
# 28.03.2016
import random
print("Компьютер загадал название одного из шести континентов Земли, а Вы должны его угадат... | 23.75 | 158 | 0.696651 |
2c8862e7f664b00b5d2c87d5e4299825ea4a180d | 670 | py | Python | skills/files.py | gidocarper/rhasspy-skills-test | eaf57287a67a0e43a299053cf0b107d61afd9b13 | [
"Unlicense"
] | 4 | 2021-01-08T21:08:50.000Z | 2021-12-08T15:30:50.000Z | skills/files.py | gidocarper/rhasspy-skills-test | eaf57287a67a0e43a299053cf0b107d61afd9b13 | [
"Unlicense"
] | null | null | null | skills/files.py | gidocarper/rhasspy-skills-test | eaf57287a67a0e43a299053cf0b107d61afd9b13 | [
"Unlicense"
] | null | null | null | import json
import io, configparser
def read_configuration_file(config_file_path):
try:
cp = configparser.ConfigParser()
with io.open(config_file_path + "/config.ini", encoding="utf-8") as f:
cp.read_file(f)
return {section: {option_name: option for option_name, option in cp.it... | 30.454545 | 91 | 0.661194 |
e2d03fbe90c6f90d2d97d2289db521bfe95538e2 | 3,275 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/build/version.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/build/version.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/build/version.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# 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.ec... | 35.215054 | 90 | 0.677252 |
1a7b0624b57c04d4340b0f6a8ff435cec9d643de | 218 | py | Python | benwaonline/gallery/__init__.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | null | null | null | benwaonline/gallery/__init__.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | 16 | 2017-09-13T10:21:40.000Z | 2020-06-01T04:32:22.000Z | benwaonline/gallery/__init__.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | null | null | null | from flask import Blueprint
from flask_uploads import UploadSet, IMAGES
gallery = Blueprint('gallery', __name__, template_folder='templates')
images = UploadSet('images', IMAGES)
from benwaonline.gallery import views | 31.142857 | 69 | 0.811927 |
1a7c8a85d816212f602c3b4fd210015bcedfaac2 | 129 | py | Python | gestionProtocolos_y_Estudios/apps.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-09T01:20:45.000Z | 2021-01-09T01:20:45.000Z | gestionProtocolos_y_Estudios/apps.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-09T00:53:55.000Z | 2021-01-09T00:53:55.000Z | gestionProtocolos_y_Estudios/apps.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-07T23:57:28.000Z | 2021-01-07T23:57:28.000Z | from django.apps import AppConfig
class GestionprotocolosYEstudiosConfig(AppConfig):
name = 'gestionProtocolos_y_Estudios'
| 21.5 | 50 | 0.829457 |
1a9ab9e6777acdfe23072754ca44155bb5143aa5 | 3,829 | py | Python | apps/projects/views.py | OpenAdaptronik/Rattler | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 2 | 2018-05-18T08:38:29.000Z | 2018-05-22T08:26:09.000Z | apps/projects/views.py | IT-PM-OpenAdaptronik/Webapp | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 118 | 2017-10-31T13:45:09.000Z | 2018-02-24T20:51:42.000Z | apps/projects/views.py | OpenAdaptronik/Rattler | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | null | null | null | from apps.projects.models import Category, Project, Experiment
from django.shortcuts import render, HttpResponseRedirect
from django.core.exceptions import PermissionDenied
from django.views.generic import FormView, CreateView, ListView, DetailView, UpdateView
from django.contrib.auth.mixins import LoginRequiredMixin
... | 33.884956 | 122 | 0.693131 |
20108ad36fce0ecd643179591579010442361c7b | 5,801 | py | Python | integrators.py | patcher1/numerik | ad24c8522d61970a3a881e034a7940d43ba486be | [
"BSD-3-Clause"
] | null | null | null | integrators.py | patcher1/numerik | ad24c8522d61970a3a881e034a7940d43ba486be | [
"BSD-3-Clause"
] | null | null | null | integrators.py | patcher1/numerik | ad24c8522d61970a3a881e034a7940d43ba486be | [
"BSD-3-Clause"
] | 1 | 2019-10-01T14:36:03.000Z | 2019-10-01T14:36:03.000Z | # -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
from helpers import gaussquad
def trapezoid(f, a, b, N):
"""Zusammengesetzte Trapezregel in 1d.
Input:
f : Funktion f(x) welche integiert werden soll.
a, b : untere/obere Grenze des Integrals.
N : Anzahl ... | 33.923977 | 128 | 0.589036 |
2051453e3e595fd6b58da4437fecfdd63396a13d | 6,904 | py | Python | tests/onegov/swissvotes/test_external_resources.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/swissvotes/test_external_resources.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/swissvotes/test_external_resources.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from datetime import date
from decimal import Decimal
from onegov.core.utils import Bunch
from onegov.swissvotes.collections import SwissVoteCollection
from onegov.swissvotes.external_resources import MfgPosters
from onegov.swissvotes.external_resources import SaPosters
from onegov.swissvotes.external_resources.posters... | 33.843137 | 75 | 0.584878 |
b3aca463b0a0d41b49ed39456372000c692ddaaf | 1,489 | py | Python | oneflow/python/test/custom_ops/user_sigmoid/user_sigmoid_py_api.py | wanghongsheng01/framework_enflame | debf613e05e3f5ea8084c3e79b60d0dd9e349526 | [
"Apache-2.0"
] | 2 | 2021-09-10T00:19:49.000Z | 2021-11-16T11:27:20.000Z | oneflow/python/test/custom_ops/user_sigmoid/user_sigmoid_py_api.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 1 | 2021-06-16T08:37:50.000Z | 2021-06-16T08:37:50.000Z | oneflow/python/test/custom_ops/user_sigmoid/user_sigmoid_py_api.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 1 | 2021-11-10T07:57:01.000Z | 2021-11-10T07:57:01.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... | 28.09434 | 85 | 0.664204 |
374584dcfbfbacf308413d8a39fc3ec3096ac830 | 9,582 | py | Python | src/Sephrasto/CharakterInventarWrapper.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-02-02T16:15:59.000Z | 2022-02-02T16:15:59.000Z | src/Sephrasto/CharakterInventarWrapper.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-01-14T11:04:19.000Z | 2022-01-14T11:04:19.000Z | src/Sephrasto/CharakterInventarWrapper.py | lukruh/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 10 17:25:53 2017
@author: Lennart
"""
from Wolke import Wolke
import UI.CharakterInventar
from PyQt5 import QtWidgets, QtCore, QtGui
import Objekte
import Definitionen
from CharakterRuestungPickerWrapper import RuestungPicker
import logging
from Hilfsmethoden import Hilfs... | 37.429688 | 154 | 0.582551 |
3798dec12ccebabee92bafb450ba38c1bfdbf844 | 44,839 | py | Python | Packs/CrowdStrikeFalconX/Integrations/CrowdStrikeFalconX/TestsInput/context.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 1 | 2021-11-02T05:36:38.000Z | 2021-11-02T05:36:38.000Z | Packs/CrowdStrikeFalconX/Integrations/CrowdStrikeFalconX/TestsInput/context.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 61 | 2021-10-07T08:54:38.000Z | 2022-03-31T10:25:35.000Z | Packs/CrowdStrikeFalconX/Integrations/CrowdStrikeFalconX/TestsInput/context.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 1 | 2021-12-20T15:12:22.000Z | 2021-12-20T15:12:22.000Z | from CommonServerPython import DemistoException
SEND_UPLOADED_FILE_TO_SENDBOX_ANALYSIS_CONTEXT = {
'submitted_id': 'id',
'state': 'created',
'created_timestamp': '2020-05-12T15:34:11Z',
'environment_id': 160,
'sha256': 'sha256'
}
SEND_URL_TO_SANDBOX_ANALYSIS_CONTEXT = {
'submitted_id': 'id',
... | 81.083183 | 153 | 0.336024 |
80a11c4022047b43ecf36e488ae24d5a204e8bc5 | 330 | py | Python | scripts/hello_world_again.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_again.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_again.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | 1 | 2019-10-24T06:45:21.000Z | 2019-10-24T06:45:21.000Z | # LANGUAGE: Python 3
# AUTHOR: Luiz Devitte
# GitHub: https://github.com/LuizDevitte
def greetings(name):
print('\n')
print('Hello, World!')
print('And Hello, {}!'.format(name))
print('\n')
return 0
def main():
name = input('Hey, who are you? ')
greetings(name)
if __name__=='__main__':
... | 17.368421 | 40 | 0.60303 |
20ae05343a45a8ac865897b657d0cd1513a3782e | 205 | py | Python | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/104_heranca_multipla/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/104_heranca_multipla/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/104_heranca_multipla/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | from smartphone import Smartphone
smartphone = Smartphone('IPhone')
smartphone.ligar()
smartphone.conetar()
smartphone.conetar()
smartphone.desconectar()
smartphone.desconectar()
smartphone.desconectar() | 20.5 | 33 | 0.819512 |
20b486d58a13b3d9c2200ea6bcb78acffc9e62a6 | 732 | py | Python | 06.BinarySearch/HG/B2805.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 1 | 2021-11-21T06:03:06.000Z | 2021-11-21T06:03:06.000Z | 06.BinarySearch/HG/B2805.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 2 | 2021-10-13T07:21:09.000Z | 2021-11-14T13:53:08.000Z | 06.BinarySearch/HG/B2805.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | null | null | null | import sys
N, M = map(int, sys.stdin.readline().split())
trees = list(map(int, sys.stdin.readline().split()))
Top = max(trees)
def bs(trees, value, low, high):
result = 0
while True:
if (low > high):
break
mid = int((low + high) / 2)
h = []
for item in trees:
... | 20.333333 | 52 | 0.419399 |
4586d2e82e9e8e9837283f223f5188489487655e | 2,194 | py | Python | Sample/DB.py | BlaCkinkGJ/SFSH | 0134f1e4698ef34caee2d5a8cd875c51507b3527 | [
"MIT"
] | 1 | 2019-02-28T08:39:55.000Z | 2019-02-28T08:39:55.000Z | Sample/DB.py | BlaCkinkGJ/SFSH | 0134f1e4698ef34caee2d5a8cd875c51507b3527 | [
"MIT"
] | 5 | 2018-07-17T13:09:34.000Z | 2018-09-11T13:55:33.000Z | Sample/DB.py | BlaCkinkGJ/SFSH | 0134f1e4698ef34caee2d5a8cd875c51507b3527 | [
"MIT"
] | 2 | 2019-05-17T03:07:08.000Z | 2022-01-01T07:04:31.000Z | import pymongo
class DB:
def __init__(self, ip = 'localhost', port = 27017, table="employees"):
self.client = pymongo.MongoClient(ip, port)
self.db = self.client.SFSH
self.collection = self.db[table]
self.buffer = {
'_id' : None,
'name' ... | 30.054795 | 118 | 0.511851 |
45dbcb5f4267102a32936263d291ae0dcaefde15 | 196 | py | Python | modules/config/model_path.py | cloud441/Procerfa | 7472aeecc4eb3003e2e0f09bb0ae71f1b33e9ccf | [
"MIT"
] | null | null | null | modules/config/model_path.py | cloud441/Procerfa | 7472aeecc4eb3003e2e0f09bb0ae71f1b33e9ccf | [
"MIT"
] | null | null | null | modules/config/model_path.py | cloud441/Procerfa | 7472aeecc4eb3003e2e0f09bb0ae71f1b33e9ccf | [
"MIT"
] | null | null | null | import os
# Linux dev:
#dir_path = f"data{os.sep}pdf_models{os.sep}"
# Windows release:
dir_path = f"..{os.sep}..{os.sep}data{os.sep}pdf_models{os.sep}"
model_path = dir_path + "new_model.pdf"
| 19.6 | 64 | 0.693878 |
926be1c7e47147a10f0c587c6de98675436760ba | 697 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch04_strings/ex05_no_duplicate_chars_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch04_strings/ex05_no_duplicate_chars_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch04_strings/ex05_no_duplicate_chars_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
import pytest
from ch04_strings.solutions.ex05_no_duplicate_chars import check_no_duplicate_chars, check_no_duplicate_chars_v2
def input_and_expected():
return [("Otto", False), ("Adrian", False),
("Micha", True),... | 29.041667 | 112 | 0.771879 |
341f365f8c17bd1b7f111e47079992f9c4bf2b8d | 2,532 | py | Python | lib/python/qmk/cli/compile.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | lib/python/qmk/cli/compile.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | lib/python/qmk/cli/compile.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | """Compile a QMK Firmware.
You can compile a keymap already in the repo or using a QMK Configurator export.
"""
import subprocess
from argparse import FileType
from milc import cli
from qmk.decorators import automagic_keyboard, automagic_keymap
from qmk.commands import compile_configurator_json, create_make_command,... | 44.421053 | 144 | 0.706161 |
f3d4991d3a5187dcfbc524bc1a8c9cde9329ab1e | 1,370 | py | Python | Saegewerk/bin/generatedaten.py | Robotron-GmbH/splunk-youtube-material | f04043dae7ca22d3a22b7b21acb97c325724eadb | [
"MIT"
] | 1 | 2021-07-28T15:51:07.000Z | 2021-07-28T15:51:07.000Z | Saegewerk/bin/generatedaten.py | Robotron-GmbH/splunk-youtube-material | f04043dae7ca22d3a22b7b21acb97c325724eadb | [
"MIT"
] | null | null | null | Saegewerk/bin/generatedaten.py | Robotron-GmbH/splunk-youtube-material | f04043dae7ca22d3a22b7b21acb97c325724eadb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
import sys,platform, os
import time
path = os.path.normpath(os.getcwd())
splunkhome_arr=path.split(os.sep)[:-4]
splunkhome=os.sep.join(splunkhome_arr)
sys.path.append(os.path.join(splunkhome, 'etc', 'apps', 'Saegewerk', 'lib'))
from splunklib.searchcommands import dispatch, Gener... | 37.027027 | 196 | 0.683942 |
1e4892aa9bd32893c3f88e416549df5ae7d18347 | 6,410 | py | Python | sdks/python/apache_beam/utils/windowed_value_test.py | diegomez17/beam | 29dea08c873abc75871674762e68fd5b29b8052b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2021-12-29T09:01:21.000Z | 2022-02-26T14:32:16.000Z | sdks/python/apache_beam/utils/windowed_value_test.py | diegomez17/beam | 29dea08c873abc75871674762e68fd5b29b8052b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 4 | 2021-12-21T21:15:41.000Z | 2022-02-15T19:21:28.000Z | sdks/python/apache_beam/utils/windowed_value_test.py | diegomez17/beam | 29dea08c873abc75871674762e68fd5b29b8052b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 17 | 2021-12-15T19:31:54.000Z | 2022-01-31T18:54:23.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 37.928994 | 78 | 0.65819 |
94f31aadff8b7023504f9da7975f9f62965d8697 | 128 | py | Python | vkapp/bot/models/__init__.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | 1 | 2017-11-23T13:33:13.000Z | 2017-11-23T13:33:13.000Z | vkapp/bot/models/__init__.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | null | null | null | vkapp/bot/models/__init__.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | null | null | null | from .users import Blogger, VKUser, Admin
from .news import News, AdminReview, Publication
from .balance import Income, Payment
| 32 | 48 | 0.804688 |
ec948eb5ed308166bb9ffe9e40c90c1d7808b38f | 2,467 | py | Python | frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cstr, flt
from frappe import _
from erpnext.manufacturing.doctype.bom.bom import get_boms_in_bott... | 35.753623 | 108 | 0.745845 |
bf3d89941b6ec1c8ad1f2fa462a2826366581cf8 | 7,212 | py | Python | PopulationLib/GroupPlanting.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | 1 | 2021-03-16T08:35:50.000Z | 2021-03-16T08:35:50.000Z | PopulationLib/GroupPlanting.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | 67 | 2019-11-14T11:29:52.000Z | 2022-03-09T14:37:11.000Z | PopulationLib/GroupPlanting.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | 6 | 2019-11-12T11:11:41.000Z | 2021-08-12T13:57:22.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@date: 2018-Today
@author: jasper.bathmann@ufz.de
"""
import numpy as np
if __name__ == '__main__' and __package__ is None:
from os import sys, path
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
import PopulationLib as PLib
from Population... | 38.774194 | 79 | 0.503466 |
17903c32b851c55b6f319038e872fc8f057743b5 | 284 | py | Python | Licence 2/I33/TP 1/ex_4.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 8 | 2020-11-26T20:45:12.000Z | 2021-11-29T15:46:22.000Z | Licence 2/I33/TP 1/ex_4.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | null | null | null | Licence 2/I33/TP 1/ex_4.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 6 | 2020-10-23T15:29:24.000Z | 2021-05-05T19:10:45.000Z | def minimum2(L):
min_1 = L[0]
min_2 = L[1]
if min_1 < min_2:
min_1, min_2 = min_2, min_1
i = 0
while i < len(L):
if L[i] < min_1:
min_2, min_1 = min_1, L[i]
elif L[i] < min_2 and L[i] > min_1:
min_2 = L[i]
i += 1
return min_2
print(minimum2([3,2,5,7,2]))
| 17.75 | 38 | 0.545775 |
bd580a2c1bc330707470a98aa4f6767b48fd94b2 | 1,239 | py | Python | tp2/source/tp2.py | ha2398/ia-tps | 3696c92c8e2549aab6ac83da317cef8e15762eea | [
"MIT"
] | null | null | null | tp2/source/tp2.py | ha2398/ia-tps | 3696c92c8e2549aab6ac83da317cef8e15762eea | [
"MIT"
] | null | null | null | tp2/source/tp2.py | ha2398/ia-tps | 3696c92c8e2549aab6ac83da317cef8e15762eea | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
'''
Trabalho Pratico 2: Inteligência Artificial
Autor: Hugo Araujo de Sousa (2013007463)
tp2.py:
'''
import argparse
import numpy as np
parser = argparse.ArgumentParser()
parser.add_argument('map', type=str, help='Map of the world.')
parser.add_argument('alpha', type=float, help='Learning rat... | 26.361702 | 73 | 0.635997 |
0070739863ca4af6e712773c68976b33f3b9aba1 | 495 | py | Python | solid_bodies.py | 15menou/srocket | 7650d25ef03499ce38ae957cd6ce356541f6cf61 | [
"Apache-2.0"
] | null | null | null | solid_bodies.py | 15menou/srocket | 7650d25ef03499ce38ae957cd6ce356541f6cf61 | [
"Apache-2.0"
] | null | null | null | solid_bodies.py | 15menou/srocket | 7650d25ef03499ce38ae957cd6ce356541f6cf61 | [
"Apache-2.0"
] | null | null | null |
class Body:
supported_characteristics = ['m', 'mass',
'J', 'inertia']
def __init__(self, options):
for key in options.keys():
if key in Body.supported_characteristics:
val = options[key]
if key in ['m', 'mass']:
... | 29.117647 | 61 | 0.446465 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.