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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
48b1a0566e31a61529c397ea65213424794be047 | 5,016 | py | Python | tools/prebuilt-dart-sdk/update.py | bleonard252-forks/pangolin-mobile | 392df6c8a66d39f31d0e2512caf3d31ae40c758f | [
"Apache-2.0"
] | null | null | null | tools/prebuilt-dart-sdk/update.py | bleonard252-forks/pangolin-mobile | 392df6c8a66d39f31d0e2512caf3d31ae40c758f | [
"Apache-2.0"
] | null | null | null | tools/prebuilt-dart-sdk/update.py | bleonard252-forks/pangolin-mobile | 392df6c8a66d39f31d0e2512caf3d31ae40c758f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2018 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import json
import os
import platform
import pipes
import subprocess
import sys
SCRIPT_DIR = os.path.dirname(__file__)... | 37.155556 | 119 | 0.575558 |
7dd83dc3d1acca86872eadc726a0609cd4ded760 | 14,225 | py | Python | src/onegov/activity/models/period.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/activity/models/period.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/activity/models/period.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import sedate
from datetime import date, datetime
from onegov.activity.models.age_barrier import AgeBarrier
from onegov.activity.models.booking import Booking
from onegov.activity.models.occasion import Occasion
from onegov.core.orm import Base
from onegov.core.orm.mixins import TimestampMixin
from onegov.core.orm.typ... | 31.894619 | 79 | 0.652373 |
815550e5367b97aebbbb89a6bc8138009674399b | 289 | py | Python | software/supervisor/emitter.py | ghsecuritylab/project-powerline | 6c0ec13bbfc11c3790c506f644db4fe45021440a | [
"MIT"
] | null | null | null | software/supervisor/emitter.py | ghsecuritylab/project-powerline | 6c0ec13bbfc11c3790c506f644db4fe45021440a | [
"MIT"
] | null | null | null | software/supervisor/emitter.py | ghsecuritylab/project-powerline | 6c0ec13bbfc11c3790c506f644db4fe45021440a | [
"MIT"
] | 1 | 2020-03-08T01:50:58.000Z | 2020-03-08T01:50:58.000Z | import socket
import json
TCP_IP = '127.0.0.1'
TCP_PORT = 1337
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))
msg = {
'error': {
'id': 0xdeadbeef
}
}
print('Sending:')
print(msg)
s.send(json.dumps(msg).encode())
s.close()
| 13.136364 | 53 | 0.622837 |
817e2dd9009edf8c65edf131c9ffd8cf06be3e33 | 30 | py | Python | pages/extensions/log_beautifier/__init__.py | ericandrewlewis/amp.dev | cf8e3d34a5582696ead97563c0809036804ab5c7 | [
"Apache-2.0"
] | 300 | 2015-12-09T20:35:37.000Z | 2019-07-16T06:41:29.000Z | pages/extensions/log_beautifier/__init__.py | ericandrewlewis/amp.dev | cf8e3d34a5582696ead97563c0809036804ab5c7 | [
"Apache-2.0"
] | 2,099 | 2019-07-16T13:24:27.000Z | 2022-03-26T12:31:51.000Z | pages/extensions/log_beautifier/__init__.py | ericandrewlewis/amp.dev | cf8e3d34a5582696ead97563c0809036804ab5c7 | [
"Apache-2.0"
] | 543 | 2019-07-18T09:06:14.000Z | 2022-03-31T02:43:10.000Z | from .log_beautifier import *
| 15 | 29 | 0.8 |
c4da0179f25f2442b4442bde2bbfedb0b7188ef1 | 3,481 | py | Python | DCM/programs/hemodynamicModel.py | l-althueser/NiMoNa_DCM16 | d93ee253ade8ccb4da1f17a91f064258adcf29c0 | [
"BSD-2-Clause"
] | 1 | 2018-04-20T07:44:11.000Z | 2018-04-20T07:44:11.000Z | DCM/programs/hemodynamicModel.py | l-althueser/NiMoNa_DCM16 | d93ee253ade8ccb4da1f17a91f064258adcf29c0 | [
"BSD-2-Clause"
] | null | null | null | DCM/programs/hemodynamicModel.py | l-althueser/NiMoNa_DCM16 | d93ee253ade8ccb4da1f17a91f064258adcf29c0 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: Tobias
Timo
Beschreibung:
Implementierung der Funktionen die zur Simulation des hämodynamischen Modells benötigt werden.
Funktionsweise:
Die Zustandgleichungen werden mit dem RK4 oder Eulerverfahren gelöst. Um eine Simulation zu starten, müssen folgende Startparameter übe... | 27.409449 | 149 | 0.60902 |
c4e14b17397e0e5bb9e087530a8903d767c0fbf0 | 1,355 | py | Python | 7-assets/past-student-repos/LambdaSchool-master/m6/62a1/queue_and_stack/test_queue.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m6/62a1/queue_and_stack/test_queue.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | cs/lambda_cs/03_data_structures/queue_and_stack/test_queue.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | import unittest
from dll_queue import Queue
class QueueTests(unittest.TestCase):
def setUp(self):
self.q = Queue()
def test_len_returns_0_for_empty_queue(self):
self.assertEqual(self.q.len(), 0)
def test_len_returns_correct_length_after_enqueue(self):
self.assertEqual(self.q.len(... | 27.653061 | 60 | 0.609594 |
d2552485d4cd85156bf13e86dc7971e9df827517 | 1,188 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch02_math/solutions/ex02_number_as_text.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch02_math/solutions/ex02_number_as_text.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch02_math/solutions/ex02_number_as_text.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
value_to_text_mapping = {
0: "ZERO", 1: "ONE", 2: "TWO", 3: "THREE", 4: "FOUR",
5: "FIVE", 6: "SIX", 7: "SEVEN", 8: "EIGHT", 9: "NINE"
}
def digit_as_text(n):
return value_to_text_mapping[n % 10]
def number_as_text(... | 19.47541 | 64 | 0.63468 |
fb9021fd6878d953a0d2a5e85cae7155a4511f57 | 3,148 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v8_0/merge_student_batch_and_student_group.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/v8_0/merge_student_batch_and_student_group.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_0/merge_student_batch_and_student_group.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import *
from frappe.model.mapper import get_mapped_doc
def execute():
# for converting student batch into student group
... | 42.540541 | 108 | 0.741741 |
838dad3e33274e72a89a8f8c5b471cdd758d804d | 613 | py | Python | lib/python/algebra/fenwicktree.py | nullputra/nlptr-lib | 618c2c74c3d3033bae04de9ba9a253bb6eb31a6c | [
"CC0-1.0"
] | null | null | null | lib/python/algebra/fenwicktree.py | nullputra/nlptr-lib | 618c2c74c3d3033bae04de9ba9a253bb6eb31a6c | [
"CC0-1.0"
] | null | null | null | lib/python/algebra/fenwicktree.py | nullputra/nlptr-lib | 618c2c74c3d3033bae04de9ba9a253bb6eb31a6c | [
"CC0-1.0"
] | null | null | null | # Ref: not522/ac-library-python https://github.com/not522/ac-library-python/blob/master/atcoder/fenwicktree.py
class FenwickTree:
def __init__(self, n=0):
self._n = n
self.data = [0] * n
def add(self, p, x):
assert 0 <= p < self._n
p += 1
while p <= self._n:
... | 25.541667 | 110 | 0.476346 |
f7d5e85b78d8b1f549a89d7522c74324bf495f1f | 581 | py | Python | code/train/train.py | wang-piaoliang/MLOpsGithubVal | d31284a90ed15b2a8898816f7483e2d5a999e9ea | [
"MIT"
] | null | null | null | code/train/train.py | wang-piaoliang/MLOpsGithubVal | d31284a90ed15b2a8898816f7483e2d5a999e9ea | [
"MIT"
] | null | null | null | code/train/train.py | wang-piaoliang/MLOpsGithubVal | d31284a90ed15b2a8898816f7483e2d5a999e9ea | [
"MIT"
] | null | null | null | from azureml.pipeline.core import PipelineEndpoint
from azureml.core import Workspace
from azureml.core.authentication import ServicePrincipalAuthentication
from azureml.core.authentication import AzureCliAuthentication
import os
from azureml.core import Run
run = Run.get_context()
ws = run.experiment.workspace
... | 26.409091 | 82 | 0.822719 |
7933a7d18e2b77abb25644a3ac0c5c11efecb6e6 | 887 | py | Python | examples/convert_temperature.py | xinetzone/dash-tests | cd4526caa2f9d906915c31370b3487bdcef92aa4 | [
"Apache-2.0"
] | 1 | 2022-03-01T07:38:32.000Z | 2022-03-01T07:38:32.000Z | examples/convert_temperature.py | xinetzone/dash-tests | cd4526caa2f9d906915c31370b3487bdcef92aa4 | [
"Apache-2.0"
] | 12 | 2021-07-13T12:33:36.000Z | 2021-07-14T05:25:19.000Z | examples/convert_temperature.py | xinetzone/dash-book | 1f624e87e2aa02c9931318918df969e44bdd2c07 | [
"Apache-2.0"
] | null | null | null | from dash.dependencies import Input, Output
from dash import dcc, html
from dash import callback_context
from app import app
layout = html.Div([
html.Div('温度变换'),
'摄氏度',
dcc.Input(
id="celsius",
value=0.0,
type="number"
),
' = 华氏温度',
dcc.Input(
id="fahrenheit",
... | 23.342105 | 77 | 0.588501 |
f792ac99e30148f1234740a588e6419d834d8945 | 224 | py | Python | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/46_47_ 48_49_50_51_funcoes_1/funçoes_p1_p2.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/46_47_ 48_49_50_51_funcoes_1/funçoes_p1_p2.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/46_47_ 48_49_50_51_funcoes_1/funçoes_p1_p2.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | """
Funções - def em python (Parte 1)
"""
# def divisão(n1, n2):
# if n2 == 0:
# return
# return n1 / n2
# divide = divisão(8, 0)
# if divide:
# print(divide)
# else:
# print('conta invalida')
| 11.2 | 33 | 0.513393 |
54189041a40b6910512b49f98d9665477f20fe76 | 9,217 | py | Python | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/loader/pipelines/decode_sampler_MRI.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 5 | 2022-01-30T07:35:58.000Z | 2022-02-08T05:45:20.000Z | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/loader/pipelines/decode_sampler_MRI.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/loader/pipelines/decode_sampler_MRI.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 1 | 2022-01-24T16:27:01.000Z | 2022-01-24T16:27:01.000Z | # 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 applic... | 41.895455 | 127 | 0.480742 |
5453ef345898bc763e449e3e1e835e74c70fb3b6 | 1,637 | py | Python | hyperts/tests/run_hyperts.py | zhangxjohn/HyperTS | c43c8d820d26dd362510997c1c294341279ce1e1 | [
"Apache-2.0"
] | null | null | null | hyperts/tests/run_hyperts.py | zhangxjohn/HyperTS | c43c8d820d26dd362510997c1c294341279ce1e1 | [
"Apache-2.0"
] | null | null | null | hyperts/tests/run_hyperts.py | zhangxjohn/HyperTS | c43c8d820d26dd362510997c1c294341279ce1e1 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from hypernets.core.callbacks import *
from hypernets.core.ops import HyperInput
from hypernets.core.search_space import HyperSpace, Choice
from hypernets.core.searcher import OptimizeDirection
from hypernets.searchers.... | 31.480769 | 137 | 0.7416 |
49e145e9f730ff2b2ba68621e0b183f3d62e223d | 925 | py | Python | 2021-05-09/城市地图带后端/城市地图后端/coffee/serializers.py | ritaswc/wechat_app_template | d6ba56b70b09bc755f7d4d6b696b9e9b53511faa | [
"MIT"
] | 395 | 2017-02-24T02:59:29.000Z | 2022-03-31T15:48:19.000Z | 2021-05-09/城市地图带后端/城市地图后端/coffee/serializers.py | ritaswc/wechat_app_template | d6ba56b70b09bc755f7d4d6b696b9e9b53511faa | [
"MIT"
] | 7 | 2020-03-17T08:33:00.000Z | 2021-09-02T23:10:46.000Z | 2021-05-09/城市地图带后端/城市地图后端/coffee/serializers.py | ritaswc/wechat_app_template | d6ba56b70b09bc755f7d4d6b696b9e9b53511faa | [
"MIT"
] | 235 | 2017-03-14T03:31:38.000Z | 2022-03-29T16:14:51.000Z | from .models import Spot, Comment
from rest_framework import serializers
class CitySpotListSerializer(serializers.ModelSerializer):
class Meta:
model = Spot
fields = ('id', 'city', 'name', 'commit_user_name', 'commit_message')
class SpotsSerializer(serializers.ModelSerializer):
commit_date ... | 37 | 151 | 0.696216 |
3f987382cacfbc911ed2915d82336ed6208cc912 | 2,129 | py | Python | CLI Tools/test_getPolygon.py | Geosoft2/Geosoftware-II-AALLH | bdb61d9a1111b9082ec2b9f309998c5f2166975e | [
"MIT"
] | null | null | null | CLI Tools/test_getPolygon.py | Geosoft2/Geosoftware-II-AALLH | bdb61d9a1111b9082ec2b9f309998c5f2166975e | [
"MIT"
] | 38 | 2018-10-24T08:51:58.000Z | 2021-12-13T19:54:39.000Z | CLI Tools/test_getPolygon.py | Geosoft2/Geosoftware-II-AALLH | bdb61d9a1111b9082ec2b9f309998c5f2166975e | [
"MIT"
] | 12 | 2018-10-24T08:20:13.000Z | 2019-08-12T08:10:14.000Z | '''
Created on 17.01.2019
@author: Aysel Tandik
'''
import os
import sys
import tempfile
import unittest
import getPolygon
# add local modules folder
file_path = os.path.join('..', 'Testdata')
sys.path.append(file_path)
def test_Geojson():
# Data with Polygon and Point
result = getPolygon.getPolygon("getPoly... | 40.942308 | 268 | 0.727102 |
3fc08d8e7cb99031529193e7122691de295df282 | 6,252 | py | Python | research/cv/ivpf/ivpf/coder.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/ivpf/ivpf/coder.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/ivpf/ivpf/coder.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.927374 | 95 | 0.576615 |
3fd1359f51f06d6ca515b8041d9e44689c6b357d | 953 | py | Python | SleekSecurity/layers/plugins/audit/apache.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | SleekSecurity/layers/plugins/audit/apache.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | SleekSecurity/layers/plugins/audit/apache.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# @name: Wascan - Web Application Scanner
# @repo: https://github.com/m4ll0k/Wascan
# @author: Momo Outaadi (M4ll0k)
# @license: See the file 'LICENSE.txt'
from lib.utils.check import *
from lib.utils.printer import *
from lib.request.request import *
class apach... | 26.472222 | 68 | 0.642183 |
b20efba38f12d69182e979122e4f5b174b5c3749 | 2,393 | py | Python | ftpAttack.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | ftpAttack.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | ftpAttack.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #!/usr/bin/env python
# encoding: utf-8
# author: Lock
# time: 2016/11/13 21:35
import ftplib
import optparse
import time
import threading
Found = False
thLock = threading.Semaphore(value=1)
TestAnonLogin = True
def anon_login(hostname):
TestAnonLogin = False
try:
ftp = ftplib.FTP(hostname)
... | 29.9125 | 101 | 0.595905 |
b748775763d5accde995d9cc16fa3f6bf31a1f0c | 1,197 | py | Python | Integrations/python/test/lang/playground_cuda.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 55 | 2021-05-11T16:01:59.000Z | 2022-03-30T14:30:33.000Z | Integrations/python/test/lang/playground_cuda.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 943 | 2021-05-10T14:00:02.000Z | 2022-03-31T21:28:15.000Z | Integrations/python/test/lang/playground_cuda.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 29 | 2021-05-10T11:33:16.000Z | 2022-03-30T21:01:54.000Z | # If you want to try out running code on cuda,
# you must first run `conda install cudatoolkit=9.0`
# and make sure intellij is setup correctly (use your local conda install for environment).
# We will use https://github.com/JetBrains/gradle-python-envs/ later to create the correct environment for you.
from numba impo... | 36.272727 | 132 | 0.710109 |
b77a3e9c1229b2b33f412be936cde635098000eb | 2,299 | py | Python | solutions/im2recipe/main.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | 1 | 2021-04-06T06:13:20.000Z | 2021-04-06T06:13:20.000Z | solutions/im2recipe/main.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | solutions/im2recipe/main.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | import logging
# from bert_serving.client import BertClient
from fastapi import Depends, FastAPI, File, UploadFile
from fastapi.middleware.cors import CORSMiddleware
from src.milvus import milvus_client
from src.search import do_search
from src.insert import do_insert
from src.mysql_toolkits import connect_m... | 23.222222 | 88 | 0.68595 |
b794a55c61e08f9d8111a6eb47e2a5c13bd722e5 | 559 | py | Python | python/en/archive/books/jump2python/j2p-02_2_2-escape_code.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/books/jump2python/j2p-02_2_2-escape_code.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/books/jump2python/j2p-02_2_2-escape_code.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
jump2python-02_2-escape_code.py
Frequenlty used
\n (new) a new line
\t (tab) a tab
\\ \ back slash
\' ' single quote
\" " double quote
\r return a carriage return or the Enter key
\f form feed ... | 27.95 | 63 | 0.506261 |
b7c0a825a8d07cfc3ab9a75646abdecccaff8fb3 | 532 | py | Python | day43/beautiful_soup.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day43/beautiful_soup.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day43/beautiful_soup.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | from bs4 import BeautifulSoup
with open("day43/website.html") as file:
contents = file.read()
soup = BeautifulSoup(contents, "html.parser")
#print(soup.title)
#print(soup.title.name)
#print(soup.title.string)
print(soup.prettify())
all_anchor = soup.find_all(name="a")
for tag in all_anchor:
print(tag.get("... | 21.28 | 56 | 0.729323 |
4d2436cc7eb72f0ba0e99878b909a20d5dbc8668 | 127 | py | Python | python/python_new/Python 3/even.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_new/Python 3/even.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_new/Python 3/even.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | num=int(input("Enter a number: "))
if (num % 2) == 0:
print("{0} is Even".format(num))
else:
print("{0} is Odd".format(num))
| 21.166667 | 34 | 0.590551 |
4dc6049b3024337021cdb5ff0f1551682856055d | 1,435 | py | Python | hog_detector.py | vvizzo/wqwtf | c3138a59891c25d3fada5960c09fa94ac6199b4b | [
"MIT"
] | null | null | null | hog_detector.py | vvizzo/wqwtf | c3138a59891c25d3fada5960c09fa94ac6199b4b | [
"MIT"
] | null | null | null | hog_detector.py | vvizzo/wqwtf | c3138a59891c25d3fada5960c09fa94ac6199b4b | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# The contents of this file are in the public domain.
#
# Usage:
# ./hog_detector.py files/*.jpg
#
# To install dlib
# pip install dlib
# Remember that dlib requires numpy for proper working
# pip install numpy
# To draw on images you need at least PIL/Pillow modul... | 30.531915 | 80 | 0.620906 |
e1dd36bbbe208e93d4a7e5e9377d062f52e19abc | 13,834 | py | Python | pickle_plotting.py | JoelHaubold/NzmLabeling | 363c027ce6584899025f79ea4758e1808b2aa96a | [
"MIT"
] | null | null | null | pickle_plotting.py | JoelHaubold/NzmLabeling | 363c027ce6584899025f79ea4758e1808b2aa96a | [
"MIT"
] | null | null | null | pickle_plotting.py | JoelHaubold/NzmLabeling | 363c027ce6584899025f79ea4758e1808b2aa96a | [
"MIT"
] | null | null | null | import os
from pathlib import Path
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
l_width = 0.9
def get_file_paths(file_directory):
file_paths = os.listdir(file_directory)
file_paths = list(filter(lambda f_path: os.path.isdir(file_directory / f_path), file_paths))
return file_pat... | 42.566154 | 121 | 0.671678 |
e1bd03ca9a94a101431b921eef0e4b48763fb5b2 | 532 | py | Python | fuzzsvc/model/FuzzingOption.py | ifoundthetao/FuzzFlow | 86559ac7f85fc89510c0d9647e02880edb95aa2a | [
"MIT"
] | 53 | 2016-08-26T02:51:45.000Z | 2021-05-24T21:05:44.000Z | model/FuzzingOption.py | FingerLeakers/FuzzFlow | 3f2de617c3658904f9640f53a05d5e4e90634e32 | [
"MIT"
] | null | null | null | model/FuzzingOption.py | FingerLeakers/FuzzFlow | 3f2de617c3658904f9640f53a05d5e4e90634e32 | [
"MIT"
] | 31 | 2016-08-26T04:08:31.000Z | 2021-05-24T21:05:54.000Z | from app import app
db = app.config['db']
class FuzzingOption(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(256), unique=True, nullable=False)
type_id = db.Column(db.Integer, db.ForeignKey('fuzzing_option_type.id'))
type = db.relationship('FuzzingOptionType', fore... | 31.294118 | 83 | 0.680451 |
835363a9fff5c9e001fe3d2ab685cc30d852e903 | 813 | py | Python | Python/M01_ProgrammingBasics/L05_WhileLoop/Exercises/Solutions/P05_Coins.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L05_WhileLoop/Exercises/Solutions/P05_Coins.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L05_WhileLoop/Exercises/Solutions/P05_Coins.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | 1 | 2022-02-23T13:03:14.000Z | 2022-02-23T13:03:14.000Z | change = float(input())
change_in_coins = int(change * 100)
coin_count = 0
while change_in_coins > 0:
if change_in_coins >= 200:
coin_count += 1
change_in_coins -= 200
elif change_in_coins >= 100:
coin_count += 1
change_in_coins -= 100
elif change_in_coins >= 50:
... | 20.846154 | 35 | 0.587946 |
55c9e29ab05cae05affa2497cf655f2c8a9fa70e | 529 | py | Python | Algorithms/Warmup/compare_triplets.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Warmup/compare_triplets.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Warmup/compare_triplets.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
def solve(a0, a1, a2, b0, b1, b2):
a, b = 0, 0
if a0 > b0:
a += 1
if a0 < b0:
b += 1
if a1 > b1:
a += 1
if a1 < b1:
b += 1
if a2 > b2:
a += 1
if a2 < b2:
b += 1
return [a, b]
a0, a1, a2 = input().strip(... | 18.892857 | 40 | 0.440454 |
36525689674d2bfa2c3a97fd59f96d12bb274eaa | 49,450 | py | Python | NN/TF/Networks.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 1,107 | 2016-09-21T02:18:36.000Z | 2022-03-29T02:52:12.000Z | NN/TF/Networks.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 18 | 2016-12-22T10:24:47.000Z | 2022-03-11T23:18:43.000Z | NN/TF/Networks.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 776 | 2016-12-21T12:08:08.000Z | 2022-03-21T06:12:08.000Z | import os
import cv2
import time
import pickle
import datetime
import matplotlib.pyplot as plt
from math import floor, sqrt
from mpl_toolkits.mplot3d import Axes3D
from tensorflow.python.framework import graph_io
from tensorflow.python.tools import freeze_graph
from NN.TF.Layers import *
from Util.Util i... | 42.592593 | 120 | 0.542568 |
3660487907ea098e5d2046cba17c29d42dd48b82 | 18,099 | py | Python | src/vclustermgr.py | liukai0322/docklet | 9e4d1f4fc2e523423b0e94406242a29b20643788 | [
"BSD-3-Clause"
] | 1 | 2016-05-31T06:52:53.000Z | 2016-05-31T06:52:53.000Z | src/vclustermgr.py | liukai0322/docklet | 9e4d1f4fc2e523423b0e94406242a29b20643788 | [
"BSD-3-Clause"
] | null | null | null | src/vclustermgr.py | liukai0322/docklet | 9e4d1f4fc2e523423b0e94406242a29b20643788 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python3
import os, random, json, sys, imagemgr, threading, servicemgr
import datetime
from log import logger
import env
##################################################
# VclusterMgr
# Description : VclusterMgr start/stop/manage virtual clusters
#
#######################################... | 48.653226 | 290 | 0.607105 |
183d4ecac23945d494f9fb5fa0f43f672ecee8d2 | 267 | py | Python | PYTHON/Regex_and_Parsing/substitution.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Regex_and_Parsing/substitution.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Regex_and_Parsing/substitution.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import re
if __name__ == '__main__':
for _ in range(int(input())):
s = input()
s = re.sub('\s&&\s', ' and ', re.sub('\s\|\|\s', ' or ', s))
print(re.sub('\s&&\s', ' and ', re.sub('\s\|\|\s', ' or ', s)))
| 26.7 | 71 | 0.456929 |
a175961c4fcc54a44a6414ea2c7183c2722255e4 | 254 | py | Python | norden/utility.py | thispl/norden | 2a208056e948cae42da688e28c15024124254867 | [
"MIT"
] | null | null | null | norden/utility.py | thispl/norden | 2a208056e948cae42da688e28c15024124254867 | [
"MIT"
] | null | null | null | norden/utility.py | thispl/norden | 2a208056e948cae42da688e28c15024124254867 | [
"MIT"
] | null | null | null | import frappe
def get_spec():
powers = frappe.db.sql("""select specification from `tabDS General` where title like 'power consumption%'""",as_dict=True)
for power in powers:
spec = "".join(power.specification.split())
print(spec) | 36.285714 | 126 | 0.677165 |
3d993371227f682803ef77e91ff321b6517eeb7f | 1,491 | py | Python | bot/exts/utils/ping.py | thecoderkitty/fluffington-bot | f518e7b66487aaf9e6c507ced43e15760d604be2 | [
"MIT"
] | null | null | null | bot/exts/utils/ping.py | thecoderkitty/fluffington-bot | f518e7b66487aaf9e6c507ced43e15760d604be2 | [
"MIT"
] | null | null | null | bot/exts/utils/ping.py | thecoderkitty/fluffington-bot | f518e7b66487aaf9e6c507ced43e15760d604be2 | [
"MIT"
] | null | null | null | from datetime import datetime
import time
from discord import Embed
from discord.ext import commands
from bot.bot import Bot
from bot.constants import Channels, Roles
DESCRIPTIONS = ("Command proccesing time", "API ping", "Bot latency")
ROUND_LATENCY = 3
class Latency(commands.Cog):
"""Getting the latency betw... | 29.235294 | 86 | 0.642522 |
3da5794c801e2e611edc4b923f5758129b5134fa | 399 | py | Python | leetcode/024-Swap-Nodes-in-Pairs/SwapPairNodes_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-04-07T15:08:53.000Z | 2016-04-07T15:08:53.000Z | leetcode/024-Swap-Nodes-in-Pairs/SwapPairNodes_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/024-Swap-Nodes-in-Pairs/SwapPairNodes_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # @author: cchen
class Solution:
# @param a ListNode
# @return a ListNode
def swapPairs(self, head):
dummy = ListNode(0);
dummy.next = head
p = dummy
while p.next and p.next.next:
tmp = p.next.next
p.next.next = tmp.next
tmp.next = p.next
... | 23.470588 | 37 | 0.503759 |
9a78e833f3dedd9b7a3b7ff38f02895b3bcffd10 | 699 | py | Python | leetcode/101-Symmetric-Tree/SymmetricTree_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2017-05-18T06:11:02.000Z | 2017-05-18T06:11:02.000Z | leetcode/101-Symmetric-Tree/SymmetricTree_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/101-Symmetric-Tree/SymmetricTree_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
# @param {TreeNode} root
# @return {boolean}
def isSym(self, l, r):
if l == None and r != None:
return False
... | 25.888889 | 72 | 0.522175 |
492de8a8a09b3b5516d4a2ce1b47bc906410281c | 9,579 | py | Python | torch/jit/_check.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 2 | 2020-03-13T06:57:49.000Z | 2020-05-17T04:18:14.000Z | torch/jit/_check.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 14 | 2021-10-14T06:58:50.000Z | 2021-12-17T11:51:07.000Z | torch/jit/_check.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 2 | 2019-07-23T14:37:31.000Z | 2019-07-23T14:47:13.000Z |
import ast
import inspect
import sys
import textwrap
import torch
import warnings
class AttributeTypeIsSupportedChecker(ast.NodeVisitor):
"""
Checks the ``__init__`` method of a given ``nn.Module`` to ensure
that all instance-level attributes can be properly initialized.
Specifically, we do type infe... | 39.097959 | 100 | 0.589832 |
b830022b28bc5a0cf226fad51f5e99e89ee287a5 | 1,264 | py | Python | Sorting/src/iterative_sorting/notes/bigo.py | tobias-fyi/02_algorithms | ab1a8a07c3560ad66712992e3af906e8fd316fe2 | [
"MIT"
] | null | null | null | Sorting/src/iterative_sorting/notes/bigo.py | tobias-fyi/02_algorithms | ab1a8a07c3560ad66712992e3af906e8fd316fe2 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | cs/lambda_cs/02_algorithms/Sorting/src/iterative_sorting/notes/bigo.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | """
Algorithms :: Sorting notes
"""
import random
import time
my_range = 1000000
my_size = 1000000
search_for = 77
my_rand = random.sample(range(my_range), my_size)
def find_in_number(arr, num):
for i in range(len(my_rand)):
if arr[i] == num:
return True
return False
def find_value_b... | 19.151515 | 49 | 0.613133 |
a7808909cad0391f06e8808624291b5f92258b69 | 43 | py | Python | python/python_backup/PRAC_PYTHON/3_fibonacci.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/3_fibonacci.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/3_fibonacci.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | a,b=0,1
while b<20:
print(b)
a,b=b,a+b | 10.75 | 12 | 0.534884 |
ac74ed55ff057772f68a1c7d6e1b6e39fa9dfde5 | 643 | py | Python | Packs/FiltersAndTransformers/Scripts/ExtractEmailTransformer/ExtractEmailTransformer_test.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Packs/FiltersAndTransformers/Scripts/ExtractEmailTransformer/ExtractEmailTransformer_test.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Packs/FiltersAndTransformers/Scripts/ExtractEmailTransformer/ExtractEmailTransformer_test.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | from ExtractEmailTransformer import *
import pytest
data_test_main = [
({'value': 'test'}, []),
({'value': 'test@test.com'}, ['test@test.com']),
({'value': 'test@test.com,test?test@test.com'}, ['test@test.com', 'test@test.com']),
]
@pytest.mark.parametrize('args, command_outputs', data_test_main)
def te... | 33.842105 | 89 | 0.713841 |
0245dfe1168461a05bd21e74e039bf8c0a39b2af | 1,308 | py | Python | Subrake-master/setup.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Subrake-master/setup.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Subrake-master/setup.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 pathlib
from setuptools import setup
# The directory containing this file
HERE = pathlib.Path(__file__).parent
# The text of the README file
README = (HERE / "README.md").read_text()
# This call to setup() does all the work
setup(
name="subrake",
version="3.3",
description="A Subdomain Enumeration... | 33.538462 | 93 | 0.668196 |
5a46a76e1cfb348626f01fa53f3ccf1314a7e900 | 18,411 | py | Python | code/media_lib.py | zauberwild/paamestia | 88ba643d6d9dc14d8abc686d464f723ea840e4f6 | [
"MIT"
] | 1 | 2020-12-24T12:20:26.000Z | 2020-12-24T12:20:26.000Z | code/media_lib.py | zauberwild/paamestia | 88ba643d6d9dc14d8abc686d464f723ea840e4f6 | [
"MIT"
] | null | null | null | code/media_lib.py | zauberwild/paamestia | 88ba643d6d9dc14d8abc686d464f723ea840e4f6 | [
"MIT"
] | null | null | null | """
contains class for graphics, animations and videos
"""
import os
from typing import Sized # used to scan for files and to execute commands from a commandline
import pygame # used in Animation-Class for displaying sprites
import pygame.freetype # used in Button class to show text
import cv2 # used ... | 30.89094 | 153 | 0.668785 |
0c88fe4417a2d9859e70eaf0cc1ade6183e6363e | 74 | py | Python | tests/server/middleware/test_db.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 156 | 2021-11-19T18:50:14.000Z | 2022-03-31T19:48:59.000Z | tests/server/middleware/test_db.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 30 | 2021-12-27T19:30:56.000Z | 2022-03-30T17:49:00.000Z | tests/server/middleware/test_db.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 14 | 2022-01-17T23:24:34.000Z | 2022-03-29T09:27:47.000Z | import pytest
import server.middleware.db
def test_init_db():
pass
| 9.25 | 27 | 0.743243 |
0b28ca482e69a25ac65773f1dc688d227919a716 | 3,165 | py | Python | src/onegov/org/views/resource_recipient.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/views/resource_recipient.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/views/resource_recipient.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.security import Private
from onegov.org import OrgApp, _
from onegov.org.forms import ResourceRecipientForm
from onegov.org.layout import ResourceRecipientsLayout
from onegov.org.layout import ResourceRecipientsFormLayout
from onegov.org.models import ResourceRecipient, ResourceRecipientCollection
from... | 28.258929 | 79 | 0.659716 |
d7f9ba311adfd00c5e2219efe28e39f112017530 | 1,642 | py | Python | 7-assets/past-student-repos/data_struct_and_algo-master/stack_imply.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 4 | 2021-08-31T00:56:40.000Z | 2021-11-29T03:08:55.000Z | 7-assets/past-student-repos/data_struct_and_algo-master/stack_imply.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 3 | 2022-02-14T18:48:11.000Z | 2022-03-30T05:26:26.000Z | 7-assets/past-student-repos/data_struct_and_algo-master/stack_imply.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-08-31T00:54:51.000Z | 2021-08-31T00:54:51.000Z | import sys
class Stack:
# initialize the constructor of empty array
def __init__(self,arr,limit):
self.arr=arr
self.arr = []
self.limit = limit
# defining an method to get all the elements in the que
def print_elements(self):
for i in range(len(self.arr)):
... | 23.457143 | 59 | 0.600487 |
503b633f462c7a298765bd618fd3dd6c540e25e7 | 2,615 | py | Python | kernel/product/models.py | sageteam/behpack | 3b8afb81dc7da70807308af4c8a2d2ab92b1a133 | [
"MIT"
] | null | null | null | kernel/product/models.py | sageteam/behpack | 3b8afb81dc7da70807308af4c8a2d2ab92b1a133 | [
"MIT"
] | null | null | null | kernel/product/models.py | sageteam/behpack | 3b8afb81dc7da70807308af4c8a2d2ab92b1a133 | [
"MIT"
] | null | null | null | from django.db import models
import secrets
from accounts.models import User
from painless import functions as func
##############################
####### Product #######
##############################
class ProductTags(models.Model):
tag_name = models.CharField(max_length = 128)
def __str__(sel... | 30.057471 | 151 | 0.675717 |
8b1af16049affa11848655b641506155abbaebd7 | 5,427 | py | Python | src/main/python/atorlib/blebase.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | src/main/python/atorlib/blebase.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | src/main/python/atorlib/blebase.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import sys
from abc import abstractmethod
import time
import threading
import logging
import asyncio
# read data from notification
class BleBase():
lock = threading.Lock()
verbose = False
mac = None
name = None
mtuSize = None
disconnectAfterData = False;
upda... | 30.661017 | 120 | 0.53326 |
8b1bd0f92d01b93765590b59e67e7e83515d5298 | 2,094 | py | Python | secret-sharing/secret-sharing-3-geheimnisse.py | nicoboss/practical-MPC | 40833d58c0458049f902dd52aa63503ce116bd90 | [
"MIT"
] | null | null | null | secret-sharing/secret-sharing-3-geheimnisse.py | nicoboss/practical-MPC | 40833d58c0458049f902dd52aa63503ce116bd90 | [
"MIT"
] | null | null | null | secret-sharing/secret-sharing-3-geheimnisse.py | nicoboss/practical-MPC | 40833d58c0458049f902dd52aa63503ce116bd90 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
class Person:
def __init__(self, personenID, x):
self.personenID = personenID
self.a = list()
self.x = x
self.y = np.zeros(teilnehmer)
self.a.append(float(input("Geheimnis: ")))
for i in range(teilnehmer-1):
self.a.append(float(input(f"Koeffizient a{i+... | 33.774194 | 83 | 0.645177 |
8b363639e1aebd1fb967995b440f1b8fe8be2396 | 732 | pyde | Python | sketches/henon2/henon2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/henon2/henon2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/henon2/henon2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | import math
a = 1.35
# a = 1.5732
h = 0.02
x0 = .01
y0 = -.02
colors = [color(18, 184, 116), color(200, 23, 223), color(95, 145, 40),
color(8, 124, 127)]
def setup():
size(400, 400)
this.surface.setTitle("Quadratische Henon-Gleichung, a = 1.35")
background(235, 215, 182)
strokeWeight(1.25)
... | 22.181818 | 71 | 0.465847 |
8ccb8a351026f7b0c07829b2170891c865c04c00 | 1,286 | py | Python | api/etl/tmp_supplement_detailsl.py | Latent-Lxx/dazhou-dw | 902b4b625cda4c9e4eb205017b8955b81f37a0b5 | [
"MIT"
] | null | null | null | api/etl/tmp_supplement_detailsl.py | Latent-Lxx/dazhou-dw | 902b4b625cda4c9e4eb205017b8955b81f37a0b5 | [
"MIT"
] | null | null | null | api/etl/tmp_supplement_detailsl.py | Latent-Lxx/dazhou-dw | 902b4b625cda4c9e4eb205017b8955b81f37a0b5 | [
"MIT"
] | 1 | 2022-02-11T04:44:37.000Z | 2022-02-11T04:44:37.000Z | # !/usr/bin/python3
# -*- coding: utf-8 -*-
# @Time : 2021/8/17 下午5:47
# @Author : Latent
# @Email : latentsky@gmail.com
# @File : mong.py
# @Software: PyCharm
# @class :
"""
1. 抽取mysql数据
2. 重新采集details
3. json数据装入
"""
from db.mysql_db import MYSQL
from db.redis_mq import RedisMQ
class TMP_SUPPLEMENT_DETAILS(object... | 24.264151 | 118 | 0.567652 |
e8abd8fdc9bb46996fa4ddd910cf4eedc6f27f25 | 329 | py | Python | Imaginary/2021/crypto/Too_Old/old.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | Imaginary/2021/crypto/Too_Old/old.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | Imaginary/2021/crypto/Too_Old/old.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import random
from secret import flag
key = random.randint(10**7, 10**8)
out = b""
for c in flag:
out += bytes([c ^ (key&0xff)])
key = int("{:016d}".format(key**2)[4:12])
print(f"{out.hex()}")
# Output:
# e649fd7458fb36acb341346324635da87427d8d25f5c8b7665b921052727bf730f1c0273d00... | 20.5625 | 86 | 0.683891 |
0f2f65b569e330df23aa2246edfb74f727493790 | 3,255 | py | Python | solutions/exercise-001.py | tmstff/corgy-python | 8f044d318087cc956079e615932b1cefd8b766ed | [
"MIT"
] | 1 | 2022-01-31T20:26:18.000Z | 2022-01-31T20:26:18.000Z | solutions/exercise-001.py | tmstff/corgy-python | 8f044d318087cc956079e615932b1cefd8b766ed | [
"MIT"
] | null | null | null | solutions/exercise-001.py | tmstff/corgy-python | 8f044d318087cc956079e615932b1cefd8b766ed | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------------
# Name: Programmieren Lernen mit Tim Aufgabe 1
# Created: 04.03.2016
##Aufgabe: Gegeben sei eine Liste mit den Gewichten von 10 Corgies:
##(22, 23, 18, 31, 5, 9, 28, 28, 25, 12).
##Gebe fuer jeden Corgi der mehr als 27 Ki... | 37.848837 | 93 | 0.670353 |
0e854bdbf988f4946b5189d8c228ffdcd7166703 | 8,946 | py | Python | python/setup.py | alskondr/xlnt | 7f00e91760886204c847fc659bed47234f46f3e6 | [
"Unlicense"
] | 8 | 2019-02-28T14:49:56.000Z | 2022-03-29T06:32:09.000Z | python/setup.py | alskondr/xlnt | 7f00e91760886204c847fc659bed47234f46f3e6 | [
"Unlicense"
] | 2 | 2021-04-09T15:36:05.000Z | 2021-11-17T22:38:10.000Z | python/setup.py | alskondr/xlnt | 7f00e91760886204c847fc659bed47234f46f3e6 | [
"Unlicense"
] | 3 | 2019-12-31T14:04:17.000Z | 2022-03-18T11:44:49.000Z | import glob
import os
import os.path as osp
import re
import shutil
import sys
from distutils.command.clean import clean as _clean
from distutils import sysconfig
from os.path import join as pjoin
from setuptools import setup, Extension, Distribution
from setuptools.command.build_ext import build_ext as _build_ext
... | 34.809339 | 101 | 0.597474 |
7eff74a217000f7f9ec1952a041de333af5a1c2d | 20,695 | py | Python | spangle/models/http.py | tkamenoko/spangle | 068479660a03239aa69c935d7ca0418c491d92da | [
"MIT"
] | 2 | 2019-11-17T06:38:56.000Z | 2019-12-01T15:32:03.000Z | spangle/models/http.py | tkamenoko/spangle | 068479660a03239aa69c935d7ca0418c491d92da | [
"MIT"
] | null | null | null | spangle/models/http.py | tkamenoko/spangle | 068479660a03239aa69c935d7ca0418c491d92da | [
"MIT"
] | null | null | null | """
HTTP Request & Response.
"""
from collections.abc import AsyncGenerator, Awaitable, Callable
from http import HTTPStatus
from http.cookies import SimpleCookie
from typing import Any, Literal, Optional, TypeVar, Union, overload
from urllib.parse import unquote_plus
import addict
import chardet
import jinja2
from s... | 28.156463 | 88 | 0.565885 |
70b8cd8d42b13a6167fe7ee16f5f736e3ca33c08 | 3,094 | py | Python | 2DNet/src/tuils/tools.py | BhaveshJP25/RSNA | 48d85faf82651b1ae4fdcd829ce2d4978a858d3f | [
"MIT"
] | null | null | null | 2DNet/src/tuils/tools.py | BhaveshJP25/RSNA | 48d85faf82651b1ae4fdcd829ce2d4978a858d3f | [
"MIT"
] | null | null | null | 2DNet/src/tuils/tools.py | BhaveshJP25/RSNA | 48d85faf82651b1ae4fdcd829ce2d4978a858d3f | [
"MIT"
] | null | null | null | import numpy as np
from sklearn.metrics import roc_auc_score
import torch
from sklearn.metrics import fbeta_score
import time
import cv2
from sklearn.metrics import log_loss
import torch
def computeAUROC(dataGT, dataPRED, classCount):
outAUROC = []
datanpGT = dataGT.cpu().numpy()
datanpPRED = dataPRED.c... | 30.94 | 83 | 0.618293 |
70e25b165f97035e49f318ee5b1397dbbc4cba7b | 3,205 | py | Python | coding/test.py | Yigit-Arisoy/deep-rts | a5ed2c29b76789830df9f7075480c7229ccf0f4d | [
"MIT"
] | 144 | 2018-07-13T07:47:50.000Z | 2022-03-31T06:29:50.000Z | coding/test.py | Yigit-Arisoy/deep-rts | a5ed2c29b76789830df9f7075480c7229ccf0f4d | [
"MIT"
] | 18 | 2019-03-29T10:37:01.000Z | 2022-03-02T12:47:34.000Z | coding/test.py | Yigit-Arisoy/deep-rts | a5ed2c29b76789830df9f7075480c7229ccf0f4d | [
"MIT"
] | 23 | 2018-11-02T18:12:51.000Z | 2022-02-15T20:32:18.000Z | import Scenarios
import Agents
import torch
import imageio
import pygame
import os
from datetime import datetime
import numpy
action_names = {
1: "Previous Unit",
2: "Next Unit",
3: "Move Left",
4: "Move Right",
5: "Move Up",
6: "Move Down",
7: "Move Up Left",
8: "Move Up Right",
... | 21.225166 | 67 | 0.664899 |
cbae4d7de5bea936395b2e59afe508e1375d80b2 | 6,374 | py | Python | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOprocessing.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/mActionGTOprocessing.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/mActionGTOprocessing.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 __future__ import print_function
from __future__ import absolute_import
from PyQt5.QtCore import *
from qgis.core import QgsProject, QgsProcessing, QgsProcessingFeatureSourceDefinition
import processing
import os
class run(QObject):
def __init__(self, id, gtotool, c... | 47.567164 | 109 | 0.514277 |
aaaaee77d3ce00ad314c2ac75095836eaf3d06a8 | 976 | py | Python | main.py | mayur200/hacktoberfest2021 | 5f141fe6dc90916d65bef17a66f0db05649c41ef | [
"MIT"
] | null | null | null | main.py | mayur200/hacktoberfest2021 | 5f141fe6dc90916d65bef17a66f0db05649c41ef | [
"MIT"
] | null | null | null | main.py | mayur200/hacktoberfest2021 | 5f141fe6dc90916d65bef17a66f0db05649c41ef | [
"MIT"
] | null | null | null | import time
# countdown timer
def countdown(t):
while t: # while t > 0 for clarity
mins = t // 60
secs = t % 60
timer = '{:02d}:{:02d}'.format(mins, secs)
print(timer, end="\r") # overwrite previous line
time.sleep(1)
t -= 1
print('Blast Off!!!')
t = input("En... | 21.688889 | 56 | 0.496926 |
63218e13092374d313fa79850047ebe1ca34e423 | 35,167 | py | Python | 20-fs-ias-lec/groups/11-sensUI/MainWindowConv.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/11-sensUI/MainWindowConv.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/11-sensUI/MainWindowConv.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'MainWindow.ui'
#
# Created by: PyQt5 UI code generator 5.14.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
Mai... | 72.809524 | 120 | 0.777547 |
2dee66683ace0fd5fbacd6a87fb96502235616d9 | 5,882 | py | Python | plotting/modules/styles/layout.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | plotting/modules/styles/layout.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | plotting/modules/styles/layout.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | # 3rd Party Packages
from matplotlib.pyplot import rcParams
# Local Packages
import plotting.modules.plotstyles
class Dimensions:
text1_pos: tuple = None
text2_pos: tuple = None
text3_pos: tuple = None
text4_pos: tuple = None
rows: int = None
cols: int = None
def init(style):
Layout = p... | 35.221557 | 103 | 0.526182 |
57eb0137919ff3cda314f2519c17169eb369b25b | 1,007 | py | Python | app/services/base_service.py | zhiyong-lv/flask-login | d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63 | [
"MIT"
] | null | null | null | app/services/base_service.py | zhiyong-lv/flask-login | d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63 | [
"MIT"
] | null | null | null | app/services/base_service.py | zhiyong-lv/flask-login | d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63 | [
"MIT"
] | null | null | null | import logging
import threading
import time
import uuid
from contextlib import contextmanager
from functools import wraps
# singleton instance, default value.
sentinel = object()
class BaseService(object):
def __init__(self):
self._logger = logging.getLogger(__name__)
self._service_lock = threadi... | 25.175 | 84 | 0.606753 |
aa1278b7b87db952213500bc9ff7abfe225f0314 | 493 | py | Python | manage.py | shonenada-archives/dewar | 392b996771a35bc26e9c301cc2a25bad973e8f61 | [
"MIT"
] | null | null | null | manage.py | shonenada-archives/dewar | 392b996771a35bc26e9c301cc2a25bad973e8f61 | [
"MIT"
] | null | null | null | manage.py | shonenada-archives/dewar | 392b996771a35bc26e9c301cc2a25bad973e8f61 | [
"MIT"
] | null | null | null | import os
from flask.ext.script import Manager, Server
from dewar.app import create_app
app_root = os.path.dirname(os.path.abspath(__name__))
application = create_app('dewar')
server = Server()
manager = Manager(application)
manager.add_command('runserver', server)
@manager.option('-p', dest='port', help='port o... | 20.541667 | 69 | 0.703854 |
a4df71c5099d03194fec813ba5cf4ff96bd19073 | 1,657 | py | Python | aMLpy/plot_spectrum_sum_of_norms.py | dirac-institute/SPSAS2019 | 34781162bb088b17c1b9afb69eee2284dce6bdec | [
"MIT"
] | 15 | 2019-07-31T07:18:49.000Z | 2021-06-03T23:41:59.000Z | aMLpy/plot_spectrum_sum_of_norms.py | dirac-institute/SPSAS2019 | 34781162bb088b17c1b9afb69eee2284dce6bdec | [
"MIT"
] | null | null | null | aMLpy/plot_spectrum_sum_of_norms.py | dirac-institute/SPSAS2019 | 34781162bb088b17c1b9afb69eee2284dce6bdec | [
"MIT"
] | 6 | 2019-08-01T19:33:16.000Z | 2020-08-27T13:01:15.000Z | """
Linear Sum of Gaussians
-----------------------
Fitting a spectrum with a linear sum of gaussians.
"""
# Author: Jake VanderPlas <vanderplas@astro.washington.edu>
# License: BSD
# The figure is an example from astroML: see http://astroML.github.com
from matplotlib import pyplot as plt
from astroML.datasets impor... | 30.127273 | 75 | 0.610742 |
5e00170d8b9a1e3e4038d80bb28175afd6e36cef | 6,142 | py | Python | Python X/Sets in py3.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | Python X/Sets in py3.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | Python X/Sets in py3.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | {
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"# a set is a type of data that stores a set of unique things\n",
"# {1, 3} - if you attempt to add another 3, python set will reject this"
]
},
{
"cell_type": "code",
"execution_c... | 16.827397 | 81 | 0.433084 |
5ea00cf867abba5c91ab544968ee549e89594434 | 1,180 | py | Python | ODAW/tf/tagfilter/services/web/project/settings.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 10 | 2020-12-08T20:18:15.000Z | 2021-06-07T20:00:07.000Z | config.py | VGasparini/tagfilter | 2f93d427f977a1ceea63d965eeb35f8187f79ac0 | [
"MIT"
] | 2 | 2021-06-28T03:42:13.000Z | 2021-06-28T16:53:13.000Z | config.py | VGasparini/tagfilter | 2f93d427f977a1ceea63d965eeb35f8187f79ac0 | [
"MIT"
] | 2 | 2021-01-14T19:59:20.000Z | 2021-06-15T11:53:21.000Z | import os, json
from tweepy import OAuthHandler
class Credentials:
def __init__(self):
try:
self.CONSUMER_KEY = os.environ["CONSUMER_KEY"]
self.CONSUMER_SECRET = os.environ["CONSUMER_SECRET"]
self.ACCESS_TOKEN = os.environ["ACCESS_TOKEN"]
self.ACCESS_TOKEN_... | 38.064516 | 74 | 0.661017 |
217632abdbdb465576f19b60221c04dfc6ea5f30 | 8,723 | py | Python | research/hpc/pinns/src/NavierStokes/net.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/hpc/pinns/src/NavierStokes/net.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/hpc/pinns/src/NavierStokes/net.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.793233 | 108 | 0.585464 |
df8a4ad61309089bf18bfc881222cd45431e663f | 1,330 | py | Python | app/views/apis/view.py | luoweis/xskAdmin | d92d0297102140ce5241a0c9f3a80f520bee96a8 | [
"MIT"
] | null | null | null | app/views/apis/view.py | luoweis/xskAdmin | d92d0297102140ce5241a0c9f3a80f520bee96a8 | [
"MIT"
] | null | null | null | app/views/apis/view.py | luoweis/xskAdmin | d92d0297102140ce5241a0c9f3a80f520bee96a8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding=utf-8 -*-
from flask_restful import Resource, request
from app.common.util import return_result
from app.views.apis.parser import *
import pprint
from app.views.apis.utils import *
import os
class WebhookXSK(Resource):
"""
wehbook 针对XSK的gitee项目
"""
def post(self):
... | 29.555556 | 66 | 0.610526 |
d51ac3807319719ae3c09ff282a776256cbb5a4f | 3,318 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/netvisor/test_pn_connection_stats_settings.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/netvisor/test_pn_connection_stats_settings.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/netvisor/test_pn_connection_stats_settings.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)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_coll... | 51.84375 | 154 | 0.714286 |
d5811598c621972774b2a40402aaa5387536cb58 | 1,189 | py | Python | tests/oidc/discovery/test_configuration.py | scottyellis/fence | 012ba76a58853169e9ee8e3f44a0dc510f4b2543 | [
"Apache-2.0"
] | 31 | 2018-01-05T22:49:33.000Z | 2022-02-02T10:30:23.000Z | tests/oidc/discovery/test_configuration.py | scottyellis/fence | 012ba76a58853169e9ee8e3f44a0dc510f4b2543 | [
"Apache-2.0"
] | 737 | 2017-12-11T17:42:11.000Z | 2022-03-29T22:42:52.000Z | tests/oidc/discovery/test_configuration.py | scottyellis/fence | 012ba76a58853169e9ee8e3f44a0dc510f4b2543 | [
"Apache-2.0"
] | 46 | 2018-02-23T09:04:23.000Z | 2022-02-09T18:29:51.000Z | """
Test the ``/.well-known/openid-configuration`` endpoint.
"""
import warnings
def test_oidc_config_fields(app, client):
"""
Test that the configuration response at least contains the required fields.
For fields which are recommended but not required, issue a warning.
"""
response = client.get(... | 28.309524 | 81 | 0.652649 |
983f9b751b53184acfc55602570b90d19c1292c9 | 100 | py | Python | testfile.py | Ockenheimer/AI805_Notizen | ed625046fd3a5f016822ad7b82879282a2f3f6c0 | [
"Beerware"
] | 1 | 2019-04-28T15:51:05.000Z | 2019-04-28T15:51:05.000Z | testfile.py | Ockenheimer/AI805_Notizen | ed625046fd3a5f016822ad7b82879282a2f3f6c0 | [
"Beerware"
] | null | null | null | testfile.py | Ockenheimer/AI805_Notizen | ed625046fd3a5f016822ad7b82879282a2f3f6c0 | [
"Beerware"
] | null | null | null | from hashlib import *
a=sha1("Sabrina")
b=sha1("Sabrina")
print a.hexdigest()
print b.hexdigest()
| 12.5 | 21 | 0.71 |
985961a60a440f3085b7fbf3ba9f9b3a55babac5 | 931 | py | Python | src/test/tests/databases/avsucd.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/databases/avsucd.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/databases/avsucd.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------)
# CLASSES: nightly
#
# Test Case: avsucd.py
#
# Programmer: Kathleen Biagas
# Date: February 6, 2020
#
# ----------------------------------------------------------------------------
OpenDatabase(data_path("AVSucd_test_data/cel... | 22.707317 | 79 | 0.610097 |
7fae060f81f41c6f4354b6ff4bbc1e3d840a1434 | 1,998 | py | Python | PopulationLib/Tree.py | realasberg/pyMANGA | c253ebc52a9d71e35b778735a7375ffc9d37aa69 | [
"MIT"
] | null | null | null | PopulationLib/Tree.py | realasberg/pyMANGA | c253ebc52a9d71e35b778735a7375ffc9d37aa69 | [
"MIT"
] | null | null | null | PopulationLib/Tree.py | realasberg/pyMANGA | c253ebc52a9d71e35b778735a7375ffc9d37aa69 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@date: 2018-Today
@author: jasper.bathmann@ufz.de
"""
from lxml import etree
import importlib.util
class Tree:
def __init__(self, x, y, species, tree_id):
self.tree_id = tree_id
self.species = species
self.trees = []
self.x = x
... | 30.738462 | 74 | 0.585586 |
122d2ecfe49906c0dab1ed03da892b988796e036 | 1,747 | py | Python | 3kCTF/2021/crypto/secure_roots/app.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | 3kCTF/2021/crypto/secure_roots/app.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | 3kCTF/2021/crypto/secure_roots/app.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | from Crypto.Util.number import getPrime, long_to_bytes
import hashlib, os, signal
def xgcd(a, b):
if a == 0:
return (b, 0, 1)
else:
g, y, x = xgcd(b % a, a)
return (g, x - (b // a) * y, y)
def getprime():
while True:
p = getPrime(1024)
if p % 4 == 3:
return p
class Server():
def... | 24.263889 | 61 | 0.550086 |
123fc59f8477c3849810f754f07d4404568cb1ca | 949 | py | Python | 1_BasicFeatures/MemoryManagment/variable_memory_ref.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | 1 | 2022-03-02T07:16:30.000Z | 2022-03-02T07:16:30.000Z | 1_BasicFeatures/MemoryManagment/variable_memory_ref.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | 1_BasicFeatures/MemoryManagment/variable_memory_ref.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | import ctypes
# Ausgabe der Speicheradresse
def print_memory_adress(var):
print(hex(id(var)))
# int
# bei Werten über 200 teilen Sie sich nicht mehr die gleichen Speicheradressen
int_value = 10
int_value1 = 10
int_value2 = 58
print_memory_adress(int_value)
print_memory_adress(int_value1) # selbe Speicheradresse, d... | 21.088889 | 78 | 0.793467 |
215aba079b967b04d5a300eb9dedfb1c9254eae7 | 4,577 | py | Python | app/controllers/api/Members.py | nucleo-de-telessaude-do-maranhao/abtms | 8d1b1df223d9f07fc4447836011f3e3678625d59 | [
"MIT"
] | null | null | null | app/controllers/api/Members.py | nucleo-de-telessaude-do-maranhao/abtms | 8d1b1df223d9f07fc4447836011f3e3678625d59 | [
"MIT"
] | null | null | null | app/controllers/api/Members.py | nucleo-de-telessaude-do-maranhao/abtms | 8d1b1df223d9f07fc4447836011f3e3678625d59 | [
"MIT"
] | 1 | 2019-03-13T14:34:24.000Z | 2019-03-13T14:34:24.000Z | from flask import jsonify
from app import app
import csv
import json
from app.models.abtms.User import User
from app.models.auth.Bussiness import Bussiness
from app.models.abtms.BankingBillet import BankingBillet
def getSituation(situation):
if situation == 0:
return "Não Pago"
return "Pago"
def get... | 26.766082 | 143 | 0.593839 |
372280d0f65f3ea0da68dfcfe52fbf4c45b50c27 | 721 | py | Python | 7-assets/past-student-repos/Intro-Python-master/src/day-1-toy/dicts.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/Intro-Python-master/src/day-1-toy/dicts.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/Intro-Python-master/src/day-1-toy/dicts.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # Make an array of dictionaries. Each dictionary should have keys:
#
# lat: the latitude
# lon: the longitude
# name: the waypoint name
#
# Make up three entries of various values.
waypoints = [
{
"lat": 43,
"lon": -121,
"name": "a place"
},
{
"lat": 41,
"lon": -123... | 18.025 | 73 | 0.549237 |
d307d0e4204aa73b76ba519952446383b457cbf0 | 2,495 | py | Python | Crypto/Non-cryptographic_Hash/src/Non-cryptographic_Hash.py | TheReturnOfTheKing/ACTF_Junior_2019 | 73635a8ea3f741d50153f01ca0ff9ca1a8e4db93 | [
"MIT"
] | 6 | 2019-02-27T08:40:05.000Z | 2021-01-29T10:04:03.000Z | Crypto/Non-cryptographic_Hash/src/Non-cryptographic_Hash.py | CSUwangj/ACTF_Junior_2019 | a2c0ee378ed02c5353176df3490f717f7d04785f | [
"MIT"
] | null | null | null | Crypto/Non-cryptographic_Hash/src/Non-cryptographic_Hash.py | CSUwangj/ACTF_Junior_2019 | a2c0ee378ed02c5353176df3490f717f7d04785f | [
"MIT"
] | 3 | 2019-02-27T08:40:15.000Z | 2019-03-03T06:07:45.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from flag import flag
import binascii
__author__ = 'CSUwangj'
banner = r"""
_ _ _ _____
| | | | | | |_ _|
| | | | ___| | ___ ___ _ __ ___ ___ | | ___
| |/\| |/ _ \ |/ __/ ... | 33.266667 | 87 | 0.342285 |
d32339c09d0f6023d15461615d002ac2f936005a | 38 | py | Python | 20-fs-ias-lec/groups/01-dev2dev/Code/application/cleanup.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/01-dev2dev/Code/application/cleanup.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/01-dev2dev/Code/application/cleanup.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | import impexp
impexp.cleanUpPayloads() | 19 | 24 | 0.868421 |
6cda881b8e7ebf19ea2a23060e8766f6e7a0faab | 2,631 | py | Python | tests/test_preisstaffel.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_preisstaffel.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_preisstaffel.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | from decimal import Decimal
import pytest # type:ignore[import]
from bo4e.com.preisstaffel import Preisstaffel, PreisstaffelSchema
from tests.serialization_helper import assert_serialization_roundtrip # type:ignore[import]
from tests.test_sigmoidparameter import example_sigmoidparameter # type:ignore[import]
exam... | 35.554054 | 97 | 0.572786 |
46ece644a53cdf65b75f4d8b8455f3b5f6ba93de | 8,836 | py | Python | backend/apps/ineedstudent/forms.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | null | null | null | backend/apps/ineedstudent/forms.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | null | null | null | backend/apps/ineedstudent/forms.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | null | null | null | from django.forms import *
from apps.ineedstudent.models import Hospital
from django.db import models
from django import forms
from django.utils.translation import gettext_lazy as _
from django.utils.translation import gettext
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Fieldset,... | 45.782383 | 344 | 0.652445 |
37ca5631af7a2e4f2293e2232433e6ee692aa48d | 471 | py | Python | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/04.Arithmetic-Operations.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/04.Arithmetic-Operations.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/04.Arithmetic-Operations.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | number_value = 3
second_value = 4
addition = number_value + second_value
subtraction = number_value - second_value
multiplication = number_value * second_value
division = number_value / 2
print(f"Addition: {addition}")
print(f"Subtraction: {subtraction}")
print(f"Multiplication: {multiplication}")
print(f"Division: {... | 24.789474 | 46 | 0.762208 |
80941833da234c3c2e3c6ad2a3d4ea85da340243 | 10,725 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/misopy/sashimi_plot/sashimi_plot.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/misopy/sashimi_plot/sashimi_plot.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/misopy/sashimi_plot/sashimi_plot.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | # -*- mode: python; -*-
##
## sashimi_plot
##
## Utility for visualizing RNA-Seq densities along gene models and
## for plotting MISO output
##
import os
import sys
import glob
import matplotlib
# Use PDF backend
matplotlib.use("pdf")
from scipy import *
from numpy import *
import pysam
import shelve
import misopy
... | 38.16726 | 107 | 0.631235 |
038c4f7bc3c08940e4d72376820d174b38b52400 | 9,069 | py | Python | Liquid-optimizer/main.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | 2 | 2021-08-30T14:12:09.000Z | 2022-01-20T02:14:22.000Z | Liquid-optimizer/main.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | null | null | null | Liquid-optimizer/main.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy as np
import os
from sklearn.model_selection import train_test_split
from model_tensorflow import train, predict
frame = "tensorflow"
class Config:
# feature_columns = list(range(0,8))
# label_columns = [5,6,7]
feature_columns = list([2,5])#comment yqy
# feature_co... | 37.320988 | 137 | 0.708237 |
ff31e6ed609f78444683d4cdb26d56ba26ac8e5e | 1,404 | py | Python | plotting/scripts/copy_files.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | plotting/scripts/copy_files.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | plotting/scripts/copy_files.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""Copies figures or figure data from the plotting folder to another folder
"""
# Standard Packages
import sys; sys.path.insert(0, '../'); sys.path.insert(0, '../../')
# Local Packages
import modules.utils as utils
def copy_files(target_folder, source_folder, target_type, source_type):
targ... | 37.945946 | 114 | 0.69302 |
444296a7da1296e88ea1dc93018b02cb9333ea0e | 1,915 | py | Python | python/python_binding/tasks.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/python_binding/tasks.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/python_binding/tasks.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import cffi
import invoke
import pathlib
@invoke.task
def clean(c):
""" Remove any build objects """
for pattern in ['*.o', '*.so', 'cffi_example*', 'cython_wrapper.cpp']:
c.run(f'rm -rf {pattern}')
def print_banner(msg):
print('===============================================')
print(f'= {ms... | 28.58209 | 79 | 0.628198 |
470e584a61b7e750461ea5d0397bbd1c6bf89b5d | 92 | py | Python | python_lessons/freecodecamp_python/012_dict_count.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | python_lessons/freecodecamp_python/012_dict_count.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | python_lessons/freecodecamp_python/012_dict_count.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | counts = { 'quincy' : 1 , 'mrugesh' : 42, 'beau': 100, '0': 10}
print(counts.get('kris', 0)) | 46 | 63 | 0.554348 |
5be67da4c34dff48bd17461911c6012ef1143ecf | 1,427 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/doc_fragments/xenserver.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/ansible/plugins/doc_fragments/xenserver.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/ansible/plugins/doc_fragments/xenserver.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | # -*- coding: utf-8 -*-
# Copyright: (c) 2018, Bojan Vitnik <bvitnik@mainstream.rs>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Common parameters for XenServer modules
DOCUMENTATION = r'''
options:
hostname:
description... | 37.552632 | 132 | 0.711983 |
7509d2ff23969f9b452acb61356e420a108df2b2 | 6,156 | py | Python | abfahrt/testutils/test_simulator/test_simulator.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | 1 | 2022-01-30T14:30:02.000Z | 2022-01-30T14:30:02.000Z | abfahrt/testutils/test_simulator/test_simulator.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | null | null | null | abfahrt/testutils/test_simulator/test_simulator.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | null | null | null | import subprocess
# The subprocess module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes. This module intends to replace several older modules and functions. (https://docs.python.org/3/library/subprocess.html)
import argparse
# The argparse module makes it e... | 48.857143 | 483 | 0.580084 |
f378a23ad2a2e333a35f30d02556bc8f6425b4a9 | 108 | py | Python | usbdrive/_root.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | usbdrive/_root.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | usbdrive/_root.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | from ._file import File
from ._osfile import OsFile
def root() -> File:
return OsFile("/home/ihrigb")
| 15.428571 | 33 | 0.694444 |
ca99eebf4d8759c1b8097bdc2e0c95298afd3ce2 | 6,065 | py | Python | Python/Sonstige_Uebungen/frequenzausgabe.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Sonstige_Uebungen/frequenzausgabe.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Sonstige_Uebungen/frequenzausgabe.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # Frequenzmuster ausgeben: Digital, Sinus, Dreieck und was sonst noch...
from time import sleep
from math import sin, pi
from random import randint as rng
global maxl
maxl=70
sleeptimer=0.1
def choose():
try:
while True:
print(''.center(maxl, '█'))
print(' Wähle Frequenzmuster: '.cen... | 29.730392 | 87 | 0.408409 |
047d453c733cc131f3ccf07ab0580d6b7b503ffb | 5,732 | py | Python | tag_2/p_11_vier_spezies_rechner.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | tag_2/p_11_vier_spezies_rechner.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | tag_2/p_11_vier_spezies_rechner.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | """
11 Taschenrechner (Tag 2)
Schreibe eine kleine Taschenrechner-Applikation, der die Methoden Addieren, Subtrahieren, Multiplizieren und
Dividieren beherrscht.
Der Taschenrechner soll seine Eingaben über ein Terminal-Interface ("Konsole") entgegen nehmen und
die Ergebnisse auf die Konsole ausgeben ("drucken").
Ben... | 29.546392 | 118 | 0.61462 |
6d2fd5eee218273b09d528e1561462229ff085d3 | 2,771 | py | Python | src/onegov/org/exports/payments.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/exports/payments.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/exports/payments.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from functools import partial
from onegov.core.security import Private
from onegov.form import merge_forms
from onegov.org.forms import DateRangeForm, ExportForm
from onegov.org import _, OrgApp
from onegov.org.exports.base import OrgExport
from onegov.ticket import TicketCollection
from onegov.town6.layout import De... | 32.6 | 76 | 0.671238 |
6d63904832d4d3c918c953e9b6ea21ca0398d98a | 1,488 | py | Python | utils/Uploader.py | wanglikang/zzuARTensorflow | 7ac59bd8988888ca5c4d7406ffc8869c9dc4121f | [
"MIT"
] | 1 | 2019-04-07T02:53:31.000Z | 2019-04-07T02:53:31.000Z | utils/Uploader.py | wanglikang/zzuARTensorflow | 7ac59bd8988888ca5c4d7406ffc8869c9dc4121f | [
"MIT"
] | null | null | null | utils/Uploader.py | wanglikang/zzuARTensorflow | 7ac59bd8988888ca5c4d7406ffc8869c9dc4121f | [
"MIT"
] | null | null | null | from qiniu import Auth, put_file, etag, urlsafe_base64_encode
import qiniu.config
import yolo.myconfig as cfg
import threading
class Uploader(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.access_key = cfg.access_key
self.secret_key = cfg.secret_key
pa... | 33.066667 | 101 | 0.688844 |
fce8e48e2f2e52c17c0e503751c1aca6c04fc6e6 | 5,838 | py | Python | hypercut/urlcut/tests.py | UnoYakshi/HyperCut | dc1dc2ad4383b69d2833e94f205959e5fe079971 | [
"MIT"
] | null | null | null | hypercut/urlcut/tests.py | UnoYakshi/HyperCut | dc1dc2ad4383b69d2833e94f205959e5fe079971 | [
"MIT"
] | 5 | 2021-03-30T13:49:59.000Z | 2021-09-22T19:19:10.000Z | hypercut/urlcut/tests.py | UnoYakshi/HyperCut | dc1dc2ad4383b69d2833e94f205959e5fe079971 | [
"MIT"
] | null | null | null | from datetime import datetime
from django.contrib.auth.models import AnonymousUser
from django.test import TestCase, RequestFactory
from .models import UrlPair
from .views import ShortURLRedirectView, RemoveURLView, AllURLsView
from .hash import encode, decode
# Test data...
FULL_URL_CORRECT = 'https://google.com/'
... | 38.156863 | 114 | 0.671292 |
fcf8fdc8ac5e1dcd19f02b9b06080e6ffccd93ea | 1,367 | py | Python | research/cv/LearningToSeeInTheDark/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/LearningToSeeInTheDark/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/LearningToSeeInTheDark/postprocess.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.972222 | 78 | 0.653255 |
eca82ccbc720f23e3a1e0926b3e8c8c330993b83 | 3,497 | py | Python | DriverBehaviorAnalyser/DriverAnalyser.py | kharezga/DBA | cc3ab4c4080b0083ab7022c1412e5667aaa59f5d | [
"MIT"
] | null | null | null | DriverBehaviorAnalyser/DriverAnalyser.py | kharezga/DBA | cc3ab4c4080b0083ab7022c1412e5667aaa59f5d | [
"MIT"
] | null | null | null | DriverBehaviorAnalyser/DriverAnalyser.py | kharezga/DBA | cc3ab4c4080b0083ab7022c1412e5667aaa59f5d | [
"MIT"
] | null | null | null | import numpy as np
import mediapipe as mp
import cv2 as cv
import os
def extractKeypoints(result):
face = np.array([[res.x, res.y, res.z] for res in result.face_landmarks.landmark]).flatten() \
if result.face_landmarks else np.zeros(1404)
return face
def drawCustomLandmarks(image, results, holistic)... | 39.738636 | 121 | 0.583071 |
bda88bc23d47e6d833e2d0bf10fa0c749a173769 | 789 | py | Python | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_posicoes.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_posicoes.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_posicoes.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5603
# Exercício Processa Números
# --------------------------
# Classe responsável por encontrar as posições de um número.
from view.paineis.painel_abstrato import PainelAbstrato
from model.processa_numeros import posicoes_de_numero
class PainelPosicoes(PainelAbst... | 35.863636 | 103 | 0.622307 |
008ba14a26f04035f4371b585080b1933b0a701f | 897 | py | Python | Contrib-Inspur/openbmc/poky/bitbake/lib/toaster/tests/browser/test_sample.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Inspur/openbmc/poky/bitbake/lib/toaster/tests/browser/test_sample.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Inspur/openbmc/poky/bitbake/lib/toaster/tests/browser/test_sample.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | #! /usr/bin/env python
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013-2016 Intel Corporation
#
# SPDX-License-Identifier: GPL-2.0-only
#
"""
A small example test demonstrating the basics of writing a test with
Toaster's SeleniumTestCase; this just fetches the Toaster home page
and checks it has the word "To... | 29.9 | 73 | 0.740245 |
daa1861a4b696e3aef2f981b1da3aae9481b2a2e | 8,113 | py | Python | checker/responsivesecurity/control.py | fausecteam/faustctf-2019-responsivesecurity | 65b4e02bdc9de278166c38697ab992638977d511 | [
"0BSD"
] | null | null | null | checker/responsivesecurity/control.py | fausecteam/faustctf-2019-responsivesecurity | 65b4e02bdc9de278166c38697ab992638977d511 | [
"0BSD"
] | null | null | null | checker/responsivesecurity/control.py | fausecteam/faustctf-2019-responsivesecurity | 65b4e02bdc9de278166c38697ab992638977d511 | [
"0BSD"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
import logging
from selenium.common.exceptions import TimeoutException
impor... | 39.383495 | 137 | 0.631579 |
9708ad7f5bfe905a978e2b83449d47658240180c | 749 | py | Python | PythonTest/draw_figure.py | yuduki24/RubyTest | 006233df69eca3eb5676984b51e57cd34d8dcf87 | [
"MIT"
] | null | null | null | PythonTest/draw_figure.py | yuduki24/RubyTest | 006233df69eca3eb5676984b51e57cd34d8dcf87 | [
"MIT"
] | 1 | 2017-11-03T06:59:55.000Z | 2017-11-04T02:10:14.000Z | PythonTest/draw_figure.py | yuduki24/RubyTest | 006233df69eca3eb5676984b51e57cd34d8dcf87 | [
"MIT"
] | null | null | null | import pygame
from pygame.locals import *
import sys
SCREEN_SIZE = (640, 480)
pygame.init()
screen = pygame.display.set_mode(SCREEN_SIZE)
pygame.display.set_caption(u"図形の描画")
while True:
screen.fill((0, 0, 0))
# 図形を描画.
# 黄の矩形.
pygame.draw.rect(screen, (255, 255, 0), Rect(10, 10, 300, 200))
# 黄... | 18.725 | 68 | 0.604806 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.