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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5eb4db2c43a0e8c3ade3cacf2fc256bd41261ccd | 463 | py | Python | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/svg/views.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/svg/views.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/svg/views.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render_to_response
import subprocess
import re
import marsyas
def index(request):
out = subprocess.Popen('/home/sness/marsyas/release/bin/sound2png -json /home/sness/wavfiles/tiny.wav', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
points = ""
for line in out.s... | 30.866667 | 169 | 0.686825 |
df26e800c78bc9bed0efb94cad2adec3dda47e74 | 86 | py | Python | Shivani/ques. 6.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | Shivani/ques. 6.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | Shivani/ques. 6.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | n=int(input("enter a number\n"))
if n%5==0:
print("Hello")
else:
print("Bye")
| 14.333333 | 32 | 0.569767 |
1d20dd7444836d72d7fd1ddb090f131884eacb56 | 754 | py | Python | TEMPLATE/test.py | bboortz/programming_challenges | ddf2b5dfbe00bf6d5f05e7af2824eab114f66f82 | [
"Apache-2.0"
] | null | null | null | TEMPLATE/test.py | bboortz/programming_challenges | ddf2b5dfbe00bf6d5f05e7af2824eab114f66f82 | [
"Apache-2.0"
] | null | null | null | TEMPLATE/test.py | bboortz/programming_challenges | ddf2b5dfbe00bf6d5f05e7af2824eab114f66f82 | [
"Apache-2.0"
] | null | null | null |
import os, sys, inspect
from app import *
from nose.tools import assert_equal
from nose.tools import assert_not_equal
class TestApp(object):
@classmethod
def setup_class(klass):
"""This method is run once for each class before any tests are run"""
@classmethod
def teardown_class(klass):
... | 24.322581 | 78 | 0.668435 |
63549d6b56e69c45d1be13e090f26d8479e2684d | 5,093 | py | Python | norden/hooks.py | thispl/norden | 2a208056e948cae42da688e28c15024124254867 | [
"MIT"
] | null | null | null | norden/hooks.py | thispl/norden | 2a208056e948cae42da688e28c15024124254867 | [
"MIT"
] | null | null | null | norden/hooks.py | thispl/norden | 2a208056e948cae42da688e28c15024124254867 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import __version__ as app_version
app_name = "norden"
app_title = "Norden"
app_publisher = "Teampro"
app_description = "Norden"
app_icon = "octicon octicon-file-directory"
app_color = "grey"
app_email = "sarumathy.d@groupteampro.com"
app_license = ... | 30.315476 | 120 | 0.734145 |
f689799b08253e8aea737d4fd46eb980d3d6f51d | 4,471 | py | Python | webinterface/serializers.py | monoclecat/Cleaning-Schedule-generator | b12fa8a6f834a89b805bf062a0df45279a7a8796 | [
"MIT"
] | 2 | 2021-11-28T23:04:00.000Z | 2022-01-13T19:47:45.000Z | webinterface/serializers.py | monoclecat/Cleaning-Schedule-generator | b12fa8a6f834a89b805bf062a0df45279a7a8796 | [
"MIT"
] | 25 | 2020-03-29T14:40:46.000Z | 2021-09-22T17:37:15.000Z | webinterface/serializers.py | monoclecat/cleaning-schedule-management-system | b12fa8a6f834a89b805bf062a0df45279a7a8796 | [
"MIT"
] | 1 | 2020-07-04T11:42:17.000Z | 2020-07-04T11:42:17.000Z | from rest_framework.serializers import *
from webinterface.models import *
def api_view_reference():
return {
'schedule': {'view_name': 'webinterface:api:schedule-detail', 'lookup_field': 'slug'},
'cleaner': {'view_name': 'webinterface:api:cleaner-detail', 'lookup_field': 'slug'},
'schedul... | 34.658915 | 104 | 0.588235 |
c3bac4ccccbcce6805fb2d156f6792c6e12c09a1 | 786 | py | Python | app/views/teaching.py | luoweis/xskAdmin | d92d0297102140ce5241a0c9f3a80f520bee96a8 | [
"MIT"
] | null | null | null | app/views/teaching.py | luoweis/xskAdmin | d92d0297102140ce5241a0c9f3a80f520bee96a8 | [
"MIT"
] | null | null | null | app/views/teaching.py | luoweis/xskAdmin | d92d0297102140ce5241a0c9f3a80f520bee96a8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding=utf-8 -*-
from flask import render_template
from app.bpurls import teachingBP
from app.common.xsk_mysql_utils import *
@teachingBP.route('/students/', methods=['GET'])
def students():
context = {}
context["title"] = "运维开发平台2.0"
context["content"] = "DevOps2.0"
studen... | 28.071429 | 69 | 0.639949 |
7f10374699ed2f555dfa1687fc940019eb3600d9 | 7,391 | py | Python | src/datasets/divahisdb.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | 2 | 2018-04-27T09:02:15.000Z | 2019-04-19T19:12:13.000Z | src/datasets/divahisdb.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | 1 | 2019-04-19T19:13:08.000Z | 2021-02-22T21:29:55.000Z | src/datasets/divahisdb.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | null | null | null | import torch
import torch.utils.data
import torchvision
from glob import glob
import json
import os
from pathlib import Path
import random
from PIL import Image
from zipfile import ZipFile
import torchvision.transforms as transforms
from enum import IntFlag, IntEnum, Enum
import logging
import numpy as np
SET_NAMES =... | 30.290984 | 116 | 0.61169 |
9cdba9e1df8acedd4bc59df31af4cfe50867bf9a | 665 | py | Python | PINp/2014/Zabolotnova_D.K/task_7_44..py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Zabolotnova_D.K/task_7_44..py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Zabolotnova_D.K/task_7_44..py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 7. Вариант 44.
# Игра, в которой компьютер загадывает имя одного из шести генеральных секретарей ЦК КПСС, а игрок должен его угадать
#Zabolotnova D.K.
#25.05.16
import random
a=random.choice(['Сталин','Хрущёв','Брежнев','Андропов','Черненко','Горбачёв'])
print("Я загадала одного из шести генеральных секре... | 25.576923 | 117 | 0.675188 |
14079557b6a4107b9b55f9e18a036b8cbf184663 | 3,323 | py | Python | lemgoDigital/lemgoDigital.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | 29 | 2020-03-21T00:47:51.000Z | 2021-07-17T15:50:33.000Z | lemgoDigital/lemgoDigital.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | 7 | 2020-03-21T14:04:26.000Z | 2022-03-02T08:05:40.000Z | lemgoDigital/lemgoDigital.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | 13 | 2020-03-21T01:08:08.000Z | 2020-04-08T17:21:11.000Z | from datetime import datetime
import boto3
import requests
import json
import csv
def to_data(city_name, lat, lon, traffic_list, passerby_list, noise_list):
return {
'landkreis_name': city_name,
'datetimeRequest': datetime.now().isoformat(),
'lat': lat,
'lon': lon,
'data': ... | 32.578431 | 102 | 0.557328 |
372f3519f5c27678b1e73d7cd2e097342d81a179 | 1,645 | py | Python | x2paddle/project_convertor/pytorch/torch2paddle/parambase.py | usertianqin/X2Paddle | b554a8094ca3e255ef4bd2e80337222a35625133 | [
"Apache-2.0"
] | 559 | 2019-01-14T06:01:55.000Z | 2022-03-31T02:52:43.000Z | x2paddle/project_convertor/pytorch/torch2paddle/parambase.py | usertianqin/X2Paddle | b554a8094ca3e255ef4bd2e80337222a35625133 | [
"Apache-2.0"
] | 353 | 2019-05-07T13:20:03.000Z | 2022-03-31T05:30:12.000Z | x2paddle/project_convertor/pytorch/torch2paddle/parambase.py | usertianqin/X2Paddle | b554a8094ca3e255ef4bd2e80337222a35625133 | [
"Apache-2.0"
] | 241 | 2018-12-25T02:13:51.000Z | 2022-03-27T23:21:43.000Z | # Copyright (c) 2021 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 appl... | 32.254902 | 74 | 0.726444 |
2ee516c684976d1b84dfaee8e9168f719a799a29 | 621 | py | Python | scripts/component_graph/server/__init__.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 3 | 2020-08-02T04:46:18.000Z | 2020-08-07T10:10:53.000Z | scripts/component_graph/server/__init__.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | scripts/component_graph/server/__init__.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 1 | 2020-08-07T10:11:49.000Z | 2020-08-07T10:11:49.000Z | #!/usr/bin/env python3
# Copyright 2019 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.
"""The server module defines an API server that provides the component graph.
The server module is responsible for analyzing data provi... | 34.5 | 79 | 0.795491 |
980d2fe0242bb7c3a7862c84f2e97927638ed8a8 | 1,419 | py | Python | examples/fun.py | enordquist/Go100x | 327a8f767a68d7b42e6cd0aea11b2d9cc2d8b5ea | [
"MIT"
] | null | null | null | examples/fun.py | enordquist/Go100x | 327a8f767a68d7b42e6cd0aea11b2d9cc2d8b5ea | [
"MIT"
] | null | null | null | examples/fun.py | enordquist/Go100x | 327a8f767a68d7b42e6cd0aea11b2d9cc2d8b5ea | [
"MIT"
] | null | null | null | import go100x
import numpy as np
sizea=855 #*3
sizeb=798 #*3
#sizea=9
#sizeb=10
def calc_grid(blockx,size):
return int((size-1+blockx)/blockx)
a = np.zeros(sizea)
b = np.zeros(sizeb)
a=a+2
b=b+3
a = np.random.rand(sizea)
b = np.random.rand(sizeb)
# cpu version of function
c = go100x.fun_cpu(a,b)
## gpu_... | 23.65 | 83 | 0.524313 |
e22c1cc67e30dea2f2f744cddeec749b92661095 | 268 | py | Python | src/tests/add_block.py | TimmMoetz/blockchain-lab | 02bb55cc201586dbdc8fdc252a32381f525e83ff | [
"RSA-MD"
] | 2 | 2021-11-08T12:00:02.000Z | 2021-11-12T18:37:52.000Z | src/tests/add_block.py | TimmMoetz/blockchain-lab | 02bb55cc201586dbdc8fdc252a32381f525e83ff | [
"RSA-MD"
] | null | null | null | src/tests/add_block.py | TimmMoetz/blockchain-lab | 02bb55cc201586dbdc8fdc252a32381f525e83ff | [
"RSA-MD"
] | 1 | 2022-03-28T13:49:37.000Z | 2022-03-28T13:49:37.000Z | from src.blockchain.block import Transaction
from src.blockchain.blockchain import Blockchain
transactions = [Transaction("Justus", "Jonas", 10.0),
Transaction("Bernd", "Harald", 5.0)]
blockchain = Blockchain()
blockchain.add_block(transactions) | 38.285714 | 54 | 0.723881 |
2c9d3e89335c12971998cb1f208e2b6085e5e641 | 6,416 | py | Python | src/webserver/predict.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | 1 | 2020-04-17T12:27:06.000Z | 2020-04-17T12:27:06.000Z | src/webserver/predict.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | 1 | 2022-02-27T13:13:17.000Z | 2022-02-27T13:13:17.000Z | src/webserver/predict.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | null | null | null | import os
import base64
import json
import cv2
import numpy as np
import tensorflow as tf
from http.server import BaseHTTPRequestHandler, HTTPServer
from io import BytesIO
class DeepmechPredictionServer(BaseHTTPRequestHandler):
srcPath = os.path.join(os.getcwd())
def do_OPTIONS(self):
self.send_resp... | 37.520468 | 96 | 0.552837 |
1a9c0cb9df4b4a316cc6bf35d06531df41fe2e92 | 1,338 | py | Python | src/onegov/wtfs/views/daily_list.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/views/daily_list.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/views/daily_list.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from morepath import redirect
from onegov.wtfs import _
from onegov.wtfs import WtfsApp
from onegov.wtfs.forms import DailyListSelectionForm
from onegov.wtfs.layouts import DailyListBoxesLayout
from onegov.wtfs.layouts import DailyListBoxesAndFormsLayout
from onegov.wtfs.layouts import DailyListLayout
from onegov.wtfs.... | 27.306122 | 66 | 0.763079 |
203039ea603e34aa1d928bf5347c8d22b885ef9f | 4,091 | py | Python | kts/core/backend/progress.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 18 | 2019-02-14T13:10:07.000Z | 2021-11-26T07:10:13.000Z | kts/core/backend/progress.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-02-17T14:06:42.000Z | 2019-09-15T18:05:54.000Z | kts/core/backend/progress.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-09-15T13:12:42.000Z | 2020-04-15T14:05:54.000Z | import time
from contextlib import contextmanager
from copy import copy
from typing import Iterable, Optional
import kts.core.backend.signal as rs
from kts.core.backend.util import in_worker
class AbstractProgressBar:
def update_time(self, step, timestamp):
if self.start is None:
self.start =... | 31.229008 | 118 | 0.593742 |
203fa54c35501cc556dc9d81193e8399e6a92915 | 771 | py | Python | Tutorials/30_days_of_code/Binary_numbers copy.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Tutorials/30_days_of_code/Binary_numbers copy.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Tutorials/30_days_of_code/Binary_numbers copy.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | #base 3 to base 10
#number = 21 base 3
#number = 2(3^1) + 1(3^0)
#number = 7 base 10
# https://www.hackerrank.com/challenges/30-binary-numbers/problem?h_r=internal-search
def base10(n):
l = len(n)
if b == 10:
return int(n)
else:
b10 = [int(n[i]) * b **(l-i-1) for i in range(l)]
r... | 19.769231 | 85 | 0.564202 |
b34207e46a970a9cc80b3892f71d5a33a8560f58 | 822 | py | Python | .venv/Lib/site-packages/dexpy/tests/test_design.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | 21 | 2016-10-19T18:13:03.000Z | 2021-11-02T13:58:31.000Z | .venv/Lib/site-packages/dexpy/tests/test_design.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | 43 | 2016-10-11T20:56:28.000Z | 2020-08-20T16:39:38.000Z | .venv/Lib/site-packages/dexpy/tests/test_design.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | 6 | 2017-12-22T03:47:37.000Z | 2021-03-13T03:45:26.000Z | from unittest import TestCase
import dexpy.design as design
class TestDesign(TestCase):
def test_var_name(self):
"""Tests that design converts variable ids into chars correctly."""
self.assertEqual('A', design.get_var_name(0))
self.assertEqual('Z', design.get_var_name(24))
self.a... | 39.142857 | 75 | 0.670316 |
44615d77b47bd8fd0f0fd1ac8865be2c408c0fe5 | 692 | py | Python | BigData_exp/exp2/0202/0202.py | DolorHunter/hfut-exp-archived | c67e26c1f4fba550c8974eaba10dfa302b928868 | [
"BSD-2-Clause"
] | 12 | 2020-12-07T05:49:05.000Z | 2022-03-25T09:09:36.000Z | BigData_exp/exp2/0202/0202.py | DolorHunter/hfut-exp | c67e26c1f4fba550c8974eaba10dfa302b928868 | [
"BSD-2-Clause"
] | null | null | null | BigData_exp/exp2/0202/0202.py | DolorHunter/hfut-exp | c67e26c1f4fba550c8974eaba10dfa302b928868 | [
"BSD-2-Clause"
] | 1 | 2021-01-08T08:53:53.000Z | 2021-01-08T08:53:53.000Z | '''
FileName: 0202.py
Auther: Wang Zixiang
Date: 04.20.2019
Function: encrypt file
'''
import re
def encrypt(file):
with open(file) as f:
words_box = []
for symbol in f:
# Delete symbol except a-zA-Z0-9
symbol = re.sub(r'[^a-zA-Z0-9]', '', symbol)
... | 19.771429 | 56 | 0.533237 |
2b7d841ed77230cb92ed7d1354fd9a13960c051d | 532 | py | Python | RedBook/ch2/parse_image_2.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | RedBook/ch2/parse_image_2.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | RedBook/ch2/parse_image_2.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
def parse_image(data):
soup = BeautifulSoup(data, 'html.parser')
imgTagList = soup.find_all('img')
dataSet = set(x.attrs['src'] for x in imgTagList)
return dataSet
def main():
url = "http://www.google.co.kr"
res = requests.get(url)
charset =... | 21.28 | 53 | 0.642857 |
5b98b3985bff191b05614adc44612bc0b53bad45 | 423 | py | Python | ___Python/Carsten/p03_lambda/m05_filtern.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Carsten/p03_lambda/m05_filtern.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Carsten/p03_lambda/m05_filtern.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | celsius = [0.7, 2.1, 4.2, 8.2, 12.5, 15.6, 16.9, 16.3, 13.6, 9.5, 4.6, 2.3]
def mindestens15(temperatur):
return temperatur >= 15
def zwischen5und10(temperatur):
return 5<= temperatur and temperatur <= 10
print(list(filter(lambda temperatur: temperatur >= 15, celsius)))
print(list(filter(lambda te... | 32.538462 | 85 | 0.676123 |
751bc4f5d3681f91fa4c9f4f5c353fdbebd90c07 | 2,942 | py | Python | 0-notes/job-search/Leetcode/~01-FindLengthLL.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Leetcode/~01-FindLengthLL.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Leetcode/~01-FindLengthLL.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # Write a function to count the number of nodes in a given singly linked list.
## time complexity: mostly O(1), O(n) at worst for loop
## space complexity: O(1)
# Node class
class Node:
# Function to initialise the node object
def __init__(self, data):
self.data = data # Assign data
se... | 24.932203 | 78 | 0.604691 |
3403645b8399ae76f31f955af13eef01953b68f5 | 443 | py | Python | INBa/2015/KODZOKOV_M_M/task_1_9.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/KODZOKOV_M_M/task_1_9.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/KODZOKOV_M_M/task_1_9.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Напишите программу, которая будет сообщать род деятельности и псевдоним под которым скрывается Борис Николаевич Бугаев.
#После вывода информации программа должна дожидаться пока пользователь нажмет Enter для выхода.
# Кодзоков М.М., 25.05.2016
print ("Борис Николаевич Бугаев - Русский писатель, поэт, критик, мемуар... | 55.375 | 155 | 0.810384 |
1b144ebba264f2ea485e061fa59b1da24acfb707 | 457 | py | Python | source/pkgsrc/devel/py-test-xdist/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/devel/py-test-xdist/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/devel/py-test-xdist/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.1 2020/08/27 12:27:00 joerg Exp $
--- setup.py.orig 2020-08-26 11:53:27.731267998 +0000
+++ setup.py
@@ -1,9 +1,10 @@
from setuptools import setup, find_packages
+import sys
install_requires = ["execnet>=1.1", "pytest>=4.4.0", "pytest-forked", "six"]
-with open("README.rst") as f:
+... | 26.882353 | 94 | 0.643326 |
1b4e7140adb18a4eb797e41190fdeedad2902638 | 1,479 | py | Python | src/aijack/collaborative/splitnn/client.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 24 | 2021-11-17T02:16:47.000Z | 2022-03-27T01:04:08.000Z | src/aijack/collaborative/splitnn/client.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 9 | 2021-12-03T06:09:27.000Z | 2022-03-29T06:33:53.000Z | src/aijack/collaborative/splitnn/client.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 5 | 2022-01-12T09:58:04.000Z | 2022-03-17T09:29:04.000Z | from ..core import BaseClient
class SplitNNClient(BaseClient):
def __init__(self, model, user_id=0):
super().__init__(model, user_id=user_id)
self.own_intermidiate = None
self.prev_intermidiate = None
self.grad_from_next_client = None
def forward(self, prev_intermediate):
... | 33.613636 | 85 | 0.64165 |
9415d26b6f6046a8479a69cabecde7e25452315d | 269 | py | Python | leetcode/190-Reverse-Bits/ReverseBits_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/190-Reverse-Bits/ReverseBits_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/190-Reverse-Bits/ReverseBits_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
# @param n, an integer
# @return an integer
def reverseBits(self, n):
a = bin(n)[2:].zfill(32)
num = len(a)
res = ''
for i in range(num - 1, -1, -1):
res = res + a[i]
return int(res, 2)
| 19.214286 | 40 | 0.457249 |
9432e0a44d369bfd6d3506182a90ed28bbc637f5 | 390 | py | Python | src/labtest/migrations/0012_labtest_attended.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | null | null | null | src/labtest/migrations/0012_labtest_attended.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | 1 | 2022-03-25T05:33:19.000Z | 2022-03-25T05:33:19.000Z | src/labtest/migrations/0012_labtest_attended.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | null | null | null | # Generated by Django 3.1.6 on 2022-04-05 10:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('labtest', '0011_auto_20220404_2227'),
]
operations = [
migrations.AddField(
model_name='labtest',
name='attended',
... | 20.526316 | 53 | 0.602564 |
9437e961c65e911d6d552e1bd4e45ff0606d2604 | 183 | py | Python | moocfi-java/practice_JoinInput/JoinInput.py | Floozutter/coursework | 244548f415553f058098cae84ccdd4ce3f58c245 | [
"Unlicense"
] | null | null | null | moocfi-java/practice_JoinInput/JoinInput.py | Floozutter/coursework | 244548f415553f058098cae84ccdd4ce3f58c245 | [
"Unlicense"
] | null | null | null | moocfi-java/practice_JoinInput/JoinInput.py | Floozutter/coursework | 244548f415553f058098cae84ccdd4ce3f58c245 | [
"Unlicense"
] | null | null | null | if __name__ == "__main__":
print(
"You wrote:\n" +
"\n".join(map(input, (
"Write the first string:\n",
"Write the second string:\n",
"Write the third string:\n"
)))
) | 20.333333 | 32 | 0.579235 |
ca1b80a1a544dea535a2bb464c31699282b614cb | 985 | py | Python | daten_angleichen.py | Hofei90/kuehltest_wertelogging | ae8be084d077c886312275c7fa0366aa28d27beb | [
"MIT"
] | null | null | null | daten_angleichen.py | Hofei90/kuehltest_wertelogging | ae8be084d077c886312275c7fa0366aa28d27beb | [
"MIT"
] | null | null | null | daten_angleichen.py | Hofei90/kuehltest_wertelogging | ae8be084d077c886312275c7fa0366aa28d27beb | [
"MIT"
] | null | null | null | from db_modell import Log, Kuehlvarianten, db_create_table
import datetime
def main():
db_create_table()
varianten = Kuehlvarianten.select()
datensaetze_sortiert = []
for variante in varianten:
datensaetze = []
for datensatz in Log.select().where(Log.variante == variante.id):
... | 31.774194 | 77 | 0.601015 |
b6d19833f7e26aabc54d71a99320ac2a2da639cd | 132 | py | Python | dataset/vocab/__init__.py | baowj-678/TC | 4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6 | [
"MIT"
] | null | null | null | dataset/vocab/__init__.py | baowj-678/TC | 4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6 | [
"MIT"
] | null | null | null | dataset/vocab/__init__.py | baowj-678/TC | 4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6 | [
"MIT"
] | null | null | null | import sys
import os
abs_path = os.path.dirname(os.path.abspath(__file__))
sys.path.append(abs_path)
from vocab.vocab import Vocab | 18.857143 | 53 | 0.795455 |
b692d5d6111807d9c4e81dc9beb1bdcfe7075333 | 3,544 | py | Python | src/distill_bert/utils.py | laomagic/TextClassifier | 22ff31619ac227d68b5a346aefc8fe16321e4586 | [
"MIT"
] | 19 | 2020-10-28T12:50:32.000Z | 2022-03-14T08:56:58.000Z | utils.py | laomagic/TextFastBert | 499645243e07931e490d172366b2ba9e03fbc624 | [
"MIT"
] | 1 | 2020-11-29T07:37:07.000Z | 2020-12-23T01:59:56.000Z | utils.py | laomagic/TextFastBert | 499645243e07931e490d172366b2ba9e03fbc624 | [
"MIT"
] | 4 | 2020-11-11T02:06:29.000Z | 2021-06-09T15:52:09.000Z | #!/usr/bin/env python
# coding:utf8
# Provide some utilities for task finetune scripts.
import collections
import json
import os
import re
import torch
import torch.utils.data as data
from model_define.optimization import BERTAdam
import logging
def eval_pr(labels, preds):
TP, TN, FP, FN = 0, 0, 0, 0
for la... | 30.290598 | 86 | 0.595937 |
1ec48c6e735b917d951935b5a3c6e2e414c112e2 | 1,854 | py | Python | fuzzsvc/model/FuzzingEngine.py | ifoundthetao/FuzzFlow | 86559ac7f85fc89510c0d9647e02880edb95aa2a | [
"MIT"
] | 53 | 2016-08-26T02:51:45.000Z | 2021-05-24T21:05:44.000Z | model/FuzzingEngine.py | FingerLeakers/FuzzFlow | 3f2de617c3658904f9640f53a05d5e4e90634e32 | [
"MIT"
] | null | null | null | model/FuzzingEngine.py | FingerLeakers/FuzzFlow | 3f2de617c3658904f9640f53a05d5e4e90634e32 | [
"MIT"
] | 31 | 2016-08-26T04:08:31.000Z | 2021-05-24T21:05:54.000Z | from app import app
from datetime import *
db = app.config['db']
fuzzing_engine_option = db.Table('fuzzing_engine_option',
db.Column('option_id', db.Integer, db.ForeignKey('fuzzing_option.id')),
db.Column('engine_id', db.Integer, db.ForeignKey('fuzzing_engine.id'))
)
# fuzzing_engine_config = db.Table('fuz... | 40.304348 | 83 | 0.66343 |
153f74e40c7d31777d10dfac98f012f10b1c83a7 | 1,017 | py | Python | models/hr_employee_qualification.py | aroodooteam/aro_hr | bf26f026593493486b4b5c13b26b9b47b9fe3825 | [
"BSD-2-Clause"
] | null | null | null | models/hr_employee_qualification.py | aroodooteam/aro_hr | bf26f026593493486b4b5c13b26b9b47b9fe3825 | [
"BSD-2-Clause"
] | null | null | null | models/hr_employee_qualification.py | aroodooteam/aro_hr | bf26f026593493486b4b5c13b26b9b47b9fe3825 | [
"BSD-2-Clause"
] | 3 | 2017-09-11T08:02:11.000Z | 2020-04-04T08:13:23.000Z | # -*- coding: utf-8 -*-
from openerp import api, exceptions, fields, models
class HrEmployeeQualification(models.Model):
"""gestion des qualifications"""
_name = 'hr.employee.qualification'
_description = "Employee Qualification"
date = fields.Date(string = 'Date')
name = fields.Many2one(comodel... | 48.428571 | 105 | 0.699115 |
17a29c2bd30006f91ef3116387e16f9ea7f109af | 1,248 | py | Python | cunqu.py | bank-manage/Bank | 1e88bde04b8c1cd59513844457b3db9ed739bfeb | [
"Apache-2.0"
] | null | null | null | cunqu.py | bank-manage/Bank | 1e88bde04b8c1cd59513844457b3db9ed739bfeb | [
"Apache-2.0"
] | null | null | null | cunqu.py | bank-manage/Bank | 1e88bde04b8c1cd59513844457b3db9ed739bfeb | [
"Apache-2.0"
] | null | null | null |
# 存钱,
put_cardno = 123456 # 假设输入了一个卡号
userbase = {123456:["身份证号","姓名","1234",500,1]} # {卡號:[身份證號碼,姓名,密碼,金額,狀態]}
def func2():
answer1 = input("是否显余额?y/n")
if answer1 == "y":
print("尊敬的{}客户,您目前的余额为{}元".format(userbase[put_cardno][1], userbase[put_cardno][-2]))
answer2 = input("是否选择继续交... | 17.333333 | 93 | 0.490385 |
e5b6334097d98fef86a98973a60d981558f61e00 | 35,304 | py | Python | dcapy/schedule/schedule.py | scuervo91/dcapy | 46c9277e607baff437e5707167476d5f7e2cf80c | [
"MIT"
] | 4 | 2021-05-21T13:26:10.000Z | 2021-11-15T17:17:01.000Z | dcapy/schedule/schedule.py | scuervo91/dcapy | 46c9277e607baff437e5707167476d5f7e2cf80c | [
"MIT"
] | null | null | null | dcapy/schedule/schedule.py | scuervo91/dcapy | 46c9277e607baff437e5707167476d5f7e2cf80c | [
"MIT"
] | null | null | null | #External Imports
from typing import Union, Optional, List, Dict
from pydantic import BaseModel, Field, validator
from datetime import date, timedelta
import pandas as pd
import numpy as np
import pyDOE2 as ed
import yaml
import json
from rich.tree import Tree
from rich.panel import Panel
from rich.layout import Layout... | 33.622857 | 166 | 0.706974 |
f90393b996e5a7559e91ba29de9f95dfcf278379 | 1,622 | py | Python | project/views/oauth2_token.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/views/oauth2_token.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/views/oauth2_token.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from flask import flash, redirect, render_template, url_for
from flask_babelex import gettext
from flask_security import auth_required, current_user
from sqlalchemy.exc import SQLAlchemyError
from project import app, db
from project.access import owner_access_or_401
from project.forms.oauth2_token import RevokeOAuth2T... | 31.192308 | 81 | 0.720099 |
00a64a5360863124c16921e8324da45b438f0b91 | 124 | py | Python | python/python_backup/PRAC_PYTHON/pop.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/pop.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/pop.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | a=input("enter a number")
b=input("enter another number")
for i in range(0,n+1,1):
if (a*i)%b==0:
print (a*i)%b
| 20.666667 | 32 | 0.572581 |
00cc9c3aa6748d4b12bb42a7717ac196a687a94c | 29,236 | py | Python | verto/tests/ImageTagTest.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 4 | 2017-04-10T06:09:54.000Z | 2019-05-04T02:07:40.000Z | verto/tests/ImageTagTest.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 268 | 2017-04-03T20:40:46.000Z | 2022-02-04T20:10:08.000Z | verto/tests/ImageTagTest.py | uccser/kordac | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 1 | 2019-01-07T15:46:31.000Z | 2019-01-07T15:46:31.000Z | import markdown
from unittest.mock import Mock
from collections import defaultdict
from verto.VertoExtension import VertoExtension
from verto.processors.ImageTagBlockProcessor import ImageTagBlockProcessor
from verto.errors.ArgumentMissingError import ArgumentMissingError
from verto.errors.ArgumentValueError import Ar... | 51.928952 | 193 | 0.712307 |
9707caae03ee950ee7bf0980b47ef0215899c17a | 10,585 | py | Python | src/lcdoc/mkdocs/replace/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 24 | 2021-10-04T22:11:59.000Z | 2022-02-02T21:51:43.000Z | src/lcdoc/mkdocs/replace/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 2 | 2021-10-04T21:51:30.000Z | 2021-10-05T14:15:31.000Z | src/lcdoc/mkdocs/replace/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | null | null | null | """
## Markdown Replace
Allows to add replacements into the markdown source, which are replaced by values given
by a python module.
The python module (default is: docs/mdreplace.py) must have a table attribute, either
dict or callable.
When callable and kw args in the signature, it will be called with a lot of conte... | 32.569231 | 116 | 0.537648 |
822f28167e40f84e21e17b0f7afb4e022320af7e | 9,679 | py | Python | src/visuanalytics/analytics/processing/image/pillow/overlay.py | mxsph/Data-Analytics | c82ff54b78f50b6660d7640bfee96ea68bef598f | [
"MIT"
] | 3 | 2020-08-24T19:02:09.000Z | 2021-05-27T20:22:41.000Z | src/visuanalytics/analytics/processing/image/pillow/overlay.py | mxsph/Data-Analytics | c82ff54b78f50b6660d7640bfee96ea68bef598f | [
"MIT"
] | 342 | 2020-08-13T10:24:23.000Z | 2021-08-12T14:01:52.000Z | src/visuanalytics/analytics/processing/image/pillow/overlay.py | visuanalytics/visuanalytics | f9cce7bc9e3227568939648ddd1dd6df02eac752 | [
"MIT"
] | 8 | 2020-09-01T07:11:18.000Z | 2021-04-09T09:02:11.000Z | """
Modul, welches die Pillow Image Funktionen zum Erstellen und Bearbeiten von Bildern beinhaltet.
"""
import numbers
from PIL import Image
from visuanalytics.analytics.control.procedures.step_data import StepData
from visuanalytics.analytics.processing.image.pillow.draw import DRAW_TYPES
from visuanalytics.analytic... | 44.399083 | 118 | 0.684162 |
41324c7277ff5df9daef5d65fe5b580b94174561 | 280 | py | Python | my_music_app/my_music_app/web/validators.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | 1 | 2022-03-03T10:16:14.000Z | 2022-03-03T10:16:14.000Z | my_music_app/my_music_app/web/validators.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | my_music_app/my_music_app/web/validators.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | from django.core.exceptions import ValidationError
import re
def validate_username_characters(value):
pattern = "^[A-Za-z0-9_]*$"
if not bool(re.match(pattern, value)):
raise ValidationError('Ensure this value contains only letters, numbers, and underscore.')
| 25.454545 | 98 | 0.732143 |
68c8bbccdf5fea02b0df87a9d0ddc558c8f6e5b6 | 440 | py | Python | FUNDASTORE/APPS/PRODUCTOS/migrations/0006_producto_pro_imagen.py | GabrielB-07/FundaStore-cgb | b509a9743a651344b32dd7a40ab789f1db48e54b | [
"CC0-1.0"
] | null | null | null | FUNDASTORE/APPS/PRODUCTOS/migrations/0006_producto_pro_imagen.py | GabrielB-07/FundaStore-cgb | b509a9743a651344b32dd7a40ab789f1db48e54b | [
"CC0-1.0"
] | null | null | null | FUNDASTORE/APPS/PRODUCTOS/migrations/0006_producto_pro_imagen.py | GabrielB-07/FundaStore-cgb | b509a9743a651344b32dd7a40ab789f1db48e54b | [
"CC0-1.0"
] | null | null | null | # Generated by Django 3.1.7 on 2021-02-22 19:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('PRODUCTOS', '0005_auto_20210222_1408'),
]
operations = [
migrations.AddField(
model_name='producto',
name='pro_image... | 23.157895 | 98 | 0.622727 |
68f661d17305729114d3aacd34fb38a7d59dd4bb | 300 | py | Python | doc/perf.py | SetZero/G474RE-CORDIC | 2c4a191ec1215989b7e4eb6234b84327e8367e06 | [
"MIT"
] | null | null | null | doc/perf.py | SetZero/G474RE-CORDIC | 2c4a191ec1215989b7e4eb6234b84327e8367e06 | [
"MIT"
] | null | null | null | doc/perf.py | SetZero/G474RE-CORDIC | 2c4a191ec1215989b7e4eb6234b84327e8367e06 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
from pandas import read_csv
data = read_csv("performance.csv", sep=',')
part = data.iloc[:,[0, 1, 4]]
group_by_subj = part.groupby(["SUBJ"])
group_by_subj.boxplot()
plt.plot(subplots=True)
plt.figure(figsize=(4, 3))
plt.show()
# plt.boxplot(column=['GCC', "CORDIC"])
| 25 | 43 | 0.706667 |
ec1f4afabf54ab613751040eb77be4f1c97572ef | 579 | py | Python | old/analyze-canny.py | Haus4/studienarbeit-stau | 10921f8850df67c797cf174b42fbc5dcec257251 | [
"MIT"
] | 2 | 2018-10-16T08:09:13.000Z | 2019-02-18T13:33:11.000Z | old/analyze-canny.py | Haus4/studienarbeit-stau | 10921f8850df67c797cf174b42fbc5dcec257251 | [
"MIT"
] | 7 | 2019-02-28T18:10:44.000Z | 2019-03-04T21:09:03.000Z | old/analyze-canny.py | Haus4/studienarbeit-stau | 10921f8850df67c797cf174b42fbc5dcec257251 | [
"MIT"
] | 1 | 2020-04-05T08:53:13.000Z | 2020-04-05T08:53:13.000Z | import os
import cv2
import numpy
def main():
frame = cv2.imread("eval/jam/20171108-1054-A.png")
frame = cv2.GaussianBlur(frame, (3, 3), 0)
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
edges = cv2.Canny(gray,100,200)
kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (2, 2))
closing ... | 25.173913 | 65 | 0.685665 |
2e6ad13867b979d5414b3db32c2746f0ea447bad | 398 | py | Python | src/labtest/migrations/0013_auto_20220512_1723.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | null | null | null | src/labtest/migrations/0013_auto_20220512_1723.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | 1 | 2022-03-25T05:33:19.000Z | 2022-03-25T05:33:19.000Z | src/labtest/migrations/0013_auto_20220512_1723.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | null | null | null | # Generated by Django 3.1.6 on 2022-05-12 17:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('labtest', '0012_labtest_attended'),
]
operations = [
migrations.AlterField(
model_name='labtest',
name='attended',
... | 20.947368 | 61 | 0.603015 |
cf71fb03d86b3bc389b7a9e3ec0646e45a915a26 | 4,047 | py | Python | beispielanwendungen/hellogl/hellogl3.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 5 | 2017-03-11T13:27:27.000Z | 2022-01-09T10:52:05.000Z | beispielanwendungen/hellogl/hellogl3.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 2 | 2021-02-14T10:59:59.000Z | 2021-10-30T21:46:32.000Z | beispielanwendungen/hellogl/hellogl3.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 1 | 2019-08-07T03:08:18.000Z | 2019-08-07T03:08:18.000Z | # -*- coding: utf-8 -*-
import sys, random
from PyQt4 import QtCore, QtGui, QtOpenGL
from OpenGL.GL import *
livingSpace = []
livingSpaceWidth = 100
livingSpaceHeight = 60
creatureSize = 10
def main(argv):
app = QtGui.QApplication(argv)
mainwindow = MainWindow()
mainwindow.show()
sys.exit(app.exec_... | 32.637097 | 105 | 0.549049 |
cf88e8a907a132845ad913d043015fd8b619ea22 | 431 | py | Python | pacman-termux/test/pacman/tests/file-conflict-with-installed-pkg.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/file-conflict-with-installed-pkg.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/file-conflict-with-installed-pkg.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "File conflict with an installed package"
lp = pmpkg("foobar")
lp.files = ["conflicting-file"]
self.addpkg2db("local", lp)
p1 = pmpkg("pkg1")
p1.files = ["conflicting-file"]
self.addpkg(p1)
self.args = "-U %s" % (p1.filename())
self.addrule("!PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=foobar")
se... | 23.944444 | 60 | 0.721578 |
997e18c9836ab5b7a7f9d9d6b1bea34cd4f94efd | 2,939 | py | Python | website/apps/projects/migrations/0001_initial.py | stahlnow/stahlnow | 265dd46c54f68173071d1c86218201d6e618ceeb | [
"MIT"
] | 1 | 2017-03-14T08:08:31.000Z | 2017-03-14T08:08:31.000Z | website/apps/projects/migrations/0001_initial.py | stahlnow/stahlnow | 265dd46c54f68173071d1c86218201d6e618ceeb | [
"MIT"
] | null | null | null | website/apps/projects/migrations/0001_initial.py | stahlnow/stahlnow | 265dd46c54f68173071d1c86218201d6e618ceeb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
import django.db.models.deletion
from django.conf import settings
import taggit.managers
class Migration(migrations.Migration):
dependencies = [
('taggit', '0001_initial'... | 46.650794 | 170 | 0.588295 |
5c4de230db1683905ef1900a8a595ac765a87a00 | 2,444 | py | Python | verto/processors/ScratchCompatibilityPreprocessor.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 4 | 2017-04-10T06:09:54.000Z | 2019-05-04T02:07:40.000Z | verto/processors/ScratchCompatibilityPreprocessor.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 268 | 2017-04-03T20:40:46.000Z | 2022-02-04T20:10:08.000Z | verto/processors/ScratchCompatibilityPreprocessor.py | uccser/kordac | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 1 | 2019-01-07T15:46:31.000Z | 2019-01-07T15:46:31.000Z | from markdown.preprocessors import Preprocessor
import re
# Enable support for | so that languages can be passed options
FENCED_BLOCK_RE_OVERRIDE = re.compile(r'''(?P<fence>^(?:~{3,}|`{3,}))[ ]*
(\{?\.?(?P<lang>[\w#.+-:]*))?[ ]*
(hl_lines=(?P<quot>"|')(?P<hl_lines>.*?)(?P=quot))?[ ]*
}?[ ]*\n
(?P<code>.*?)(?<=\n)
(?P=... | 37.030303 | 117 | 0.60311 |
a42ff02ea20030f9c5631ec943c6fdd8e8fac5c2 | 1,610 | py | Python | frappe-bench/apps/erpnext/erpnext/healthcare/doctype/vital_signs/vital_signs.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/healthcare/doctype/vital_signs/vital_signs.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/healthcare/doctype/vital_signs/vital_signs.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, ESS LLP and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class VitalSigns(Document):
def on_submit(self):
insert_vital_signs_to_medical_record(self)
def... | 32.857143 | 117 | 0.754037 |
f1632f2280f6163f852e69309860a5ef311d4344 | 4,567 | py | Python | research/nlp/ktnet/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/nlp/ktnet/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/nlp/ktnet/export.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... | 46.602041 | 119 | 0.678564 |
f18320f7d19670c68c8051ad72eddd3f254b9bc0 | 998 | py | Python | packages/watchmen-rest-doll/src/watchmen_rest_doll/sso/saml/auth_saml_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-doll/src/watchmen_rest_doll/sso/saml/auth_saml_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-doll/src/watchmen_rest_doll/sso/saml/auth_saml_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from fastapi import APIRouter
from pydantic import BaseModel
from watchmen_model.system import Token
from watchmen_rest.util import raise_401, raise_404
from watchmen_rest_doll.doll import ask_saml2_enabled, ask_saml2_settings
from .saml_helper import build_token, find_user, get_user_name_in_saml_body, verify_signatur... | 28.514286 | 93 | 0.784569 |
74d6eeec3090eca2fdd8ef0f14b44b6c1ba8917a | 35,023 | py | Python | app/dicom.py | MedPhyDO/pygqa | 580b2c6028d2299790a38262b795b8409cbfcc37 | [
"MIT"
] | 3 | 2021-02-25T13:19:52.000Z | 2021-03-03T03:46:46.000Z | app/dicom.py | MedPhyDO/pygqa | 580b2c6028d2299790a38262b795b8409cbfcc37 | [
"MIT"
] | null | null | null | app/dicom.py | MedPhyDO/pygqa | 580b2c6028d2299790a38262b795b8409cbfcc37 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Dicom Funktionen auch zum Abfragen eines Dicom servers
Statuscodes:
https://pydicom.github.io/pynetdicom/stable/reference/status.html
Test mit findscu
findscu -v -S -k 0008,0052="IMAGE" -k "0008,0018=1.2.246.352.62.1.4625604914426170283.12140466054276070541" -aet PHYSIK_BA -a... | 34.779543 | 209 | 0.523884 |
2d411cc4ff30c51d1c4b46d97e5bff3a8a73134a | 424 | py | Python | pygenface/structures.py | capalmer1013/eigenface | 4c9113c58a876578667ab3e1ecf7120bb1cb07f9 | [
"MIT"
] | null | null | null | pygenface/structures.py | capalmer1013/eigenface | 4c9113c58a876578667ab3e1ecf7120bb1cb07f9 | [
"MIT"
] | 1 | 2021-09-08T01:46:37.000Z | 2021-09-08T01:46:37.000Z | pygenface/structures.py | capalmer1013/eigenface | 4c9113c58a876578667ab3e1ecf7120bb1cb07f9 | [
"MIT"
] | null | null | null | class Eigenface(object):
def __init__(self):
pass
def add(self, face):
pass
def addMultiple(self, listOfFaces):
pass
def addFile(self, filename):
pass
def addMultipleFiles(self, listOfFilenames):
pass
def load(self, filename):
... | 16.96 | 49 | 0.542453 |
747c011970d8d26d2659444d178964bb0a23e59a | 2,654 | py | Python | test/test_npu/util_test.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/util_test.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/util_test.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020 Huawei Technologies Co., Ltd
# Copyright (c) 2019, Facebook CORPORATION.
# All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/lice... | 39.61194 | 117 | 0.687265 |
74a6567102f8bef1a4a8b87595ac99a2c3a05425 | 2,325 | py | Python | src/doc/gui_manual/PythonScripts/resection.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/doc/gui_manual/PythonScripts/resection.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/doc/gui_manual/PythonScripts/resection.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | import sys
header_levels = []
# =======
# Chapter
# =======
header_levels.append("=")
# Section
# =======
header_levels.append("=")
# Sub-section
# -----------
header_levels.append("-")
# sub-sub-section
# ~~~~~~~~~~~~~~~
header_levels.append("~")
# paragraph
# """""""""
header_levels.append("\"")
blank_line ="\n"
i... | 29.0625 | 115 | 0.669247 |
24c50288e909ed14379be47eaebeb806cec1cd01 | 2,038 | py | Python | examples/relationship/onetoonefield/models.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 5 | 2020-07-14T07:48:10.000Z | 2021-12-20T21:20:10.000Z | examples/relationship/onetoonefield/models.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 7 | 2021-03-26T03:13:38.000Z | 2022-03-12T00:42:03.000Z | examples/relationship/onetoonefield/models.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 1 | 2021-02-16T07:04:25.000Z | 2021-02-16T07:04:25.000Z | from django.db import models
# CREATE TABLE `onetoonefield_place` ( -- Django 建表语句
# `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
# `name` varchar(50) NOT NULL,
# `address` varchar(80) NOT NULL
# );
#
#
# CREATE TABLE `onetoonefield_place` ( ... | 40.76 | 117 | 0.581452 |
24fc840041294f21a9f06c2231e524836e8f9ef6 | 1,573 | py | Python | software/supervisor/views/HomeView.py | ghsecuritylab/project-powerline | 6c0ec13bbfc11c3790c506f644db4fe45021440a | [
"MIT"
] | null | null | null | software/supervisor/views/HomeView.py | ghsecuritylab/project-powerline | 6c0ec13bbfc11c3790c506f644db4fe45021440a | [
"MIT"
] | null | null | null | software/supervisor/views/HomeView.py | ghsecuritylab/project-powerline | 6c0ec13bbfc11c3790c506f644db4fe45021440a | [
"MIT"
] | 1 | 2020-03-08T01:50:58.000Z | 2020-03-08T01:50:58.000Z | """
hallo das ist ein Kommentar
"""
from PyQt5.QtWidgets import QWidget, QPushButton, QLabel
from PyQt5.QtGui import QFont
class HomeView(QWidget):
def __init__(self, parent):
super(HomeView, self).__init__(parent)
current1 = 100 #input argument
current2 = 200
current3 = ... | 32.770833 | 78 | 0.631914 |
56349ad0e63fe0c97d2b8668c04d00e64926c52b | 865 | py | Python | django_project/utils/aliyun_sms.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | django_project/utils/aliyun_sms.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | django_project/utils/aliyun_sms.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | #pip install aliyun-python-sdk-core
from aliyunsdkcore.client import AcsClient
from aliyunsdkcore.request import CommonRequest
client = AcsClient('uXIWtuAQspvFqpCt', 'g4dRrretS3HDiACJuwkaUzoUgUG8C4', 'cn-hangzhou')
def send_sms(telephone,code):
request = CommonRequest()
request.set_accept_format('json')
r... | 36.041667 | 87 | 0.744509 |
3b95ec904261b2450c629b388cd15020609c8e19 | 696 | py | Python | src/tools/dev/scaling/makedata.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/tools/dev/scaling/makedata.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/tools/dev/scaling/makedata.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | import os
cases = (
(1,16, 1, 8, 2, "pdebug"),
(16,256, 1, 16, 16, "pdebug"),
(32,512, 2, 16, 16, "pdebug"),
(64,1024, 2, 32, 16, "pdebug"),
(128,2048, 2, 32, 32, "psmall"),
(256,4096, 2, 64, 32, "psmall"),
(512,8192, 2, 64, 64, "psmall"),
(2048, 32768, 4, 128, 64, "pbatch"),
(4096, 65536, 4, 128, 128, "pbat... | 31.636364 | 184 | 0.541667 |
8ef1645d05f1637c500051f5ca716db87b466b20 | 365 | py | Python | projects/g4h1-wsn/src/utils/__init__.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g4h1-wsn/src/utils/__init__.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g4h1-wsn/src/utils/__init__.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | from .log import init_root_logger, get_log_file_dir_path, launch_time
from .event import node_want_to_terminate
from .scheduler import EnumScheduleMode, Scheduler, TerminationCondition
__all__ = [
'init_root_logger', 'get_log_file_dir_path', 'launch_time',
'node_want_to_terminate',
'EnumScheduleMo... | 33.181818 | 73 | 0.778082 |
7977da45742420bfa0996f2473e4e4aea6ca2b9f | 3,880 | py | Python | deprecated/examples/distribute_ctr/infer.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | deprecated/examples/distribute_ctr/infer.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | deprecated/examples/distribute_ctr/infer.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | # Copyright (c) 2019 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.952381 | 77 | 0.614948 |
79d2b0571a8bbeb21437aefecbde813bee46f6ec | 21,168 | py | Python | Character.py | Mathias-Mo/Zauberwald_v05 | 7c67b7ed086feb8e3897f4b6c2122b8b66256331 | [
"MIT"
] | null | null | null | Character.py | Mathias-Mo/Zauberwald_v05 | 7c67b7ed086feb8e3897f4b6c2122b8b66256331 | [
"MIT"
] | null | null | null | Character.py | Mathias-Mo/Zauberwald_v05 | 7c67b7ed086feb8e3897f4b6c2122b8b66256331 | [
"MIT"
] | null | null | null | from data import features
from player import message_output
import random
import time
class Character:
def __init__(self, params):
self.name = params['name']
self.lives = params['lives']
self.energy = params['energy']
self.energy_max = params['energy_max']
self.energy_name ... | 39.492537 | 148 | 0.530707 |
ebc879178ebef9c1ba137065b737e1a535b3a5f3 | 740 | py | Python | 03 Python/Entwicklung eines IoT-Devices/aufgabe/src/my_iot_device/button.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 03 Python/Entwicklung eines IoT-Devices/aufgabe/src/my_iot_device/button.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 03 Python/Entwicklung eines IoT-Devices/aufgabe/src/my_iot_device/button.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | 1 | 2020-10-10T20:24:05.000Z | 2020-10-10T20:24:05.000Z | import RPi.GPIO as GPIO
BUTTON_GPIO = 21
class ButtonHandler:
"""
Publisher-Klasse für den Hardwarebutton. Setzt eine Callback-Methode auf,
die darauf wartet, dass der Button gedrückt wird und dann eine Nachricht
an den Luftsensor schickt, um eine neue Messung anzustoßen.
"""
def __init__... | 27.407407 | 77 | 0.640541 |
69384e7ace45fa80cd9ec09936c4375784d94e61 | 5,586 | py | Python | research/nlp/ktnet/src/bert_ms_format.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/nlp/ktnet/src/bert_ms_format.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/nlp/ktnet/src/bert_ms_format.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... | 46.941176 | 108 | 0.708378 |
d6c60433a2612123de2aa300f96c3a056c9b8f3c | 2,582 | py | Python | marsyas-vamp/marsyas/src/swig/python/scripts/marmonitors.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/swig/python/scripts/marmonitors.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/swig/python/scripts/marmonitors.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import optparse
import math
from pylab import *
from marsyas_util import *
import sys
from marsyas import MarSystemManager,MarControlPtr
class SubPlotInfo:
def __init__(self, control="", x="", y="", title=""):
self.marcontrol = control
self.x_label = x
self.y_label ... | 26.895833 | 69 | 0.625097 |
d6d3dfacc4d3691f2aa80c0c8dab3f7dd40f9a68 | 181 | py | Python | TEDx/Titles_starting_0_to_9/names.py | gt-big-data/TEDVis | 328a4c62e3a05c943b2a303817601aebf198c1aa | [
"MIT"
] | null | null | null | TEDx/Titles_starting_0_to_9/names.py | gt-big-data/TEDVis | 328a4c62e3a05c943b2a303817601aebf198c1aa | [
"MIT"
] | null | null | null | TEDx/Titles_starting_0_to_9/names.py | gt-big-data/TEDVis | 328a4c62e3a05c943b2a303817601aebf198c1aa | [
"MIT"
] | 2 | 2018-02-06T00:00:44.000Z | 2019-06-04T12:43:41.000Z | from os import listdir
from os.path import isfile, join
from operator import itemgetter, attrgetter
onlyfiles = [f for f in listdir(".") if isfile(join(".", f))]
print(onlyfiles) | 22.625 | 61 | 0.734807 |
ba640453ab0d2dd7a985476c6991d15bfb8e67b8 | 151 | py | Python | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/07.08-contine-Statement.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/07.08-contine-Statement.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/07.08-contine-Statement.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | # Program to show the use of continue statement inside loops
for val in "string":
if val == "i":
continue
print(val)
print("The end") | 18.875 | 60 | 0.635762 |
0325c15cd1b23a1ea6ceacbcc11927a255340af7 | 378 | py | Python | Algorithms/BitManipulation/AndProduct.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/BitManipulation/AndProduct.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/BitManipulation/AndProduct.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
from math import log
for _ in xrange(input()):
a, b = map(int, raw_input().split())
an = 0 if a==0 else int(log(a, 2))
bn = int(log(b, 2))
if bn > an:
print 0
elif bn == an:
num_str = str(bin(a))
length = len(str(bin(a^b))) - 2
new_num = num_str[:-l... | 18 | 48 | 0.502646 |
3074c39e4dddd6b7057c62c069ee6b251ed6d4f7 | 5,384 | py | Python | retro/cores/gba/src/platform/python/mgba/gba.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 2,706 | 2018-04-05T18:28:50.000Z | 2022-03-29T16:56:59.000Z | retro/cores/gba/src/platform/python/mgba/gba.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 242 | 2018-04-05T22:30:42.000Z | 2022-03-19T01:55:11.000Z | retro/cores/gba/src/platform/python/mgba/gba.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 464 | 2018-04-05T19:10:34.000Z | 2022-03-28T13:33:32.000Z | # Copyright (c) 2013-2016 Jeffrey Pfau
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from ._pylib import ffi, lib
from .arm import ARMCore
from .core import Core, ne... | 32.047619 | 86 | 0.643016 |
067e273751dc2f01aff51e5923d220e12dcfa6d3 | 13,107 | py | Python | Packs/AbnormalSecurity/Integrations/AbnormalSecurity/AbnormalSecurity_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/AbnormalSecurity/Integrations/AbnormalSecurity/AbnormalSecurity_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/AbnormalSecurity/Integrations/AbnormalSecurity/AbnormalSecurity_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
import demistomock as demisto
import io
import json
from AbnormalSecurity import Client, check_the_status_of_an_action_requested_on_a_case_command, \
check_the_status_of_an_action_requested_on_a_threat_command, \
get_a_list_of_abnormal_cases_identified_by_abnormal_security_command, get_a_list_of_t... | 40.578947 | 122 | 0.719768 |
d1f800a2269fa8f01cb3674e3822a53014975f2a | 852 | py | Python | 02.Sort/NY/P42839.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 1 | 2021-11-21T06:03:06.000Z | 2021-11-21T06:03:06.000Z | 02.Sort/NY/P42839.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 2 | 2021-10-13T07:21:09.000Z | 2021-11-14T13:53:08.000Z | 02.Sort/NY/P42839.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | null | null | null | # 프로그래머스 42839 - 소수 찾기
# 후기
# - 정규표현식에 대한 이해가 부족한 것 같다.
# - 2, 10번 케이스에 대해서만 오류가 난다 -> 검색해보니 제곱근과 관련이 있다고 하는데 정확히 이해가 되지 않아 다시 한 번 확인해야 한다.
from itertools import permutations
def solution(numbers):
answer = 0
temp = []
numList = []
for i in range (1, len(numbers)+1) :
temp = permut... | 24.342857 | 84 | 0.457746 |
0600b2dbd646a7297d05bceaf7c5c41fe831ef75 | 677 | py | Python | Week 6/plotting_intial_cluster.py | mayankpadhi/AI_Codes | 8631f18cd9d1bba9ffc142b1ede0197b512157e2 | [
"MIT"
] | null | null | null | Week 6/plotting_intial_cluster.py | mayankpadhi/AI_Codes | 8631f18cd9d1bba9ffc142b1ede0197b512157e2 | [
"MIT"
] | null | null | null | Week 6/plotting_intial_cluster.py | mayankpadhi/AI_Codes | 8631f18cd9d1bba9ffc142b1ede0197b512157e2 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import csv
import matplotlib.colors as colors
col = iter(colors.cnames.values())
list=[]
mean =[0,0]
cov=[[1 ,0.7 ],[0.7, 1]]
x, y = np.random.multivariate_normal(mean, cov,40).T
plt.scatter(x, y, color=next(col))
mean =[4,4]
cov=[[1 ,0.25 ],[0.25, 0.5]]
x1, y1 = np.... | 21.83871 | 54 | 0.660266 |
8889dcc0e28c0f7ed380a050fea32fa8f3c0ed69 | 297 | py | Python | Problems/Stack/Easy/CrawlerLogFolder/crawler_log_folder.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Stack/Easy/CrawlerLogFolder/crawler_log_folder.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Stack/Easy/CrawlerLogFolder/crawler_log_folder.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from typing import List
def minOperations(logs: List[str]) -> int:
operation = 0
for i in logs:
if i == "../":
if operation != 0:
operation -= 1
elif i == "./":
continue
else:
operation += 1
return operation | 21.214286 | 42 | 0.461279 |
ee71437b8ea614672a6da4ed4e01085d1fa8d55d | 452 | py | Python | BITs/2014/Shmireychik_S_V/task_3_17.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Shmireychik_S_V/task_3_17.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Shmireychik_S_V/task_3_17.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача №3, Вариант 7
#Программа выводит имя "Симона Руссель" и запросит ее псевдоним,который пользователь напишет сам.
#Шмирейчик С.В.
#29.02.2016
print("Герой нашей сегодняшней программы - Симона Руссель")
psev=input("Под каким же именем мы знаем этого человека? Ваш ответ:")
if (psev)==("Мишель Морган"):
... | 34.769231 | 98 | 0.721239 |
c9f8a147724a4af605e19a48d469d078c3bbe0c8 | 5,709 | py | Python | demo/ced_curve.py | JACKYLUO1991/FaceLandmarks | 0e7eb636d25ba93e64cc3433a79239be51c883cc | [
"Apache-2.0"
] | 24 | 2019-09-01T09:02:59.000Z | 2022-03-22T08:38:16.000Z | demo/ced_curve.py | HeroOneHY/FaceLandmarks | 0e7eb636d25ba93e64cc3433a79239be51c883cc | [
"Apache-2.0"
] | 2 | 2019-10-25T02:39:03.000Z | 2022-03-20T15:45:22.000Z | demo/ced_curve.py | HeroOneHY/FaceLandmarks | 0e7eb636d25ba93e64cc3433a79239be51c883cc | [
"Apache-2.0"
] | 11 | 2019-10-25T01:36:18.000Z | 2021-04-09T06:51:58.000Z | # Normalized Mean Error
# Created by Jacky LUO
# https://github.com/MarekKowalski/DeepAlignmentNetwork
import sys
import numpy as np
import matplotlib.pyplot as plt
from keras.models import load_model
from keras.utils import custom_object_scope
import pandas as pd
import os
import cv2 as cv
from tqdm import tqdm
from ... | 35.02454 | 87 | 0.597478 |
0954da7a75152fb0563b4379deaad5130f102620 | 638 | py | Python | SBTK_League_Helper/src/__DEPRECATED/mvp_requirements.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/src/__DEPRECATED/mvp_requirements.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/src/__DEPRECATED/mvp_requirements.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | # These are abstract classes
# an enumeration of the methods that need to be implemented for their instances.
class UserInterface (object):
def __init__(self, boss, *args, **kwargs): #args and kwargs may optionally have an effect
raise NotImplementedError
def main_loop(self):
raise NotImpl... | 35.444444 | 96 | 0.700627 |
eef6ca04b234d4d486fd0d3acf444dab85273f58 | 3,878 | py | Python | tournamentmasters/tournament_master.py | jorgeparavicini/FourWins | 1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83 | [
"MIT"
] | 1 | 2021-01-20T18:33:01.000Z | 2021-01-20T18:33:01.000Z | tournamentmasters/tournament_master.py | jorgeparavicini/FourWins | 1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83 | [
"MIT"
] | null | null | null | tournamentmasters/tournament_master.py | jorgeparavicini/FourWins | 1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83 | [
"MIT"
] | 2 | 2019-09-04T08:27:14.000Z | 2019-09-06T20:32:30.000Z | from time import sleep
from typing import List, Callable
from bots import BaseBot
from bots.botutilities import Grid
class TournamentMaster:
win_condition = 4
def __init__(self, bot_1: BaseBot, bot_2: BaseBot, grid_width: int, grid_height: int,
time_between_rounds: float = 0):
self.... | 33.721739 | 119 | 0.625322 |
fed12ba98147abcda5f3f3485b055e683de6b15b | 151 | py | Python | transonic_cl/cython.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | transonic_cl/cython.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | transonic_cl/cython.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | def decor_1_value(value):
return lambda x: x
cdivision = nonecheck = wraparound = boundscheck = decor_1_value
def nogil(func):
return func
| 15.1 | 64 | 0.721854 |
3a32348c856eace7792053d88a610290455dc1d9 | 2,817 | py | Python | src/bo4e/bo/preisblattdienstleistung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/bo/preisblattdienstleistung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/bo/preisblattdienstleistung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | """
Contains PreisblattDienstleistung class and corresponding marshmallow schema for de-/serialization
"""
from typing import List, Optional
import attr
from marshmallow import fields
from marshmallow_enum import EnumField # type:ignore[import]
from bo4e.bo.preisblatt import Preisblatt, PreisblattSchema
from bo4e.co... | 42.681818 | 202 | 0.778133 |
3a9609c8b5b738955e045b5e157c81c23af9e8a7 | 621 | py | Python | src/main/apps/mlops/utils/model_input.py | Nouvellie/django-tflite | 1d08fdc8a2ec58886d7d2b8d40e7b3598613caca | [
"MIT"
] | 2 | 2021-08-23T21:56:07.000Z | 2022-01-20T13:52:19.000Z | src/main/apps/mlops/utils/model_input.py | Nouvellie/django-tflite | 1d08fdc8a2ec58886d7d2b8d40e7b3598613caca | [
"MIT"
] | null | null | null | src/main/apps/mlops/utils/model_input.py | Nouvellie/django-tflite | 1d08fdc8a2ec58886d7d2b8d40e7b3598613caca | [
"MIT"
] | null | null | null | import numpy as np
from typing import (
Generic,
TypeVar,
)
SELFCLASS = TypeVar('SELFCLASS')
class ModelInputGenerator:
"""Generate inputs for the Fashion Mnist model"""
def __new__(cls, *args, **kwargs) -> Generic[SELFCLASS]:
return super(ModelInputGenerator, cls).__new__(cls, *args, **kwar... | 25.875 | 76 | 0.663446 |
287d06c068dcf0144e6c0a840c0387e145b36a5e | 603 | py | Python | SoSe-21/Code-Vorlesungen/Wiederholung/2/test.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | 1 | 2022-03-23T09:40:39.000Z | 2022-03-23T09:40:39.000Z | SoSe-21/Code-Vorlesungen/Wiederholung/2/test.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | SoSe-21/Code-Vorlesungen/Wiederholung/2/test.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | # adressbuch = {"Lara": 123456}
# adressbuch["Klaus"] = 123456
# print(adressbuch.items(0))
# def a():
# count = 0
# count += 0
# for z in (1,2,4):
# count +=1
# return count
# print (a())
# a = 11
# def kl(a):
# a -= 3
# return a
# print(kl(a))
# print(a)
# a = 4
# def g(var):
# ... | 12.5625 | 31 | 0.470978 |
9536fdb50ea58314497e708fab1c0be9991b8499 | 314 | py | Python | Python/EstruturaSequencial/Exercicios/Exercicio12.py | ekballo/Back-End | b252e3b2a16ce36486344823f14afa6691fde9bc | [
"MIT"
] | null | null | null | Python/EstruturaSequencial/Exercicios/Exercicio12.py | ekballo/Back-End | b252e3b2a16ce36486344823f14afa6691fde9bc | [
"MIT"
] | null | null | null | Python/EstruturaSequencial/Exercicios/Exercicio12.py | ekballo/Back-End | b252e3b2a16ce36486344823f14afa6691fde9bc | [
"MIT"
] | null | null | null | #Tendo como dados de entrada a altura de uma pessoa, construa um algoritmo que calcule seu peso ideal, usando a seguinte fórmula: (72.7*altura) - 58
alt = float(input('Digite sua altura seperada por ponto (Ex 1.69) : '))
vt = 72.7 * alt
resultado = vt - 58
print('Seu peso idela seria {:.2f}kg'.format(resultado)) | 52.333333 | 148 | 0.719745 |
95f397cddd72915b39167e3cda4873c1d85412bb | 1,595 | py | Python | google_scholar_scraper/app.py | AravindVasudev/code-dump | 9b67c3cd1e8673b5ce4a90e5b17d69c82ad55298 | [
"MIT"
] | null | null | null | google_scholar_scraper/app.py | AravindVasudev/code-dump | 9b67c3cd1e8673b5ce4a90e5b17d69c82ad55298 | [
"MIT"
] | 1 | 2021-06-01T21:51:54.000Z | 2021-06-01T21:51:54.000Z | google_scholar_scraper/app.py | AravindVasudev/code-dump | 9b67c3cd1e8673b5ce4a90e5b17d69c82ad55298 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
import json
# Google Scholar URL
URL = 'https://scholar.google.co.in/citations'
contents = dict()
# get the user ID
id = input('Enter Scholar ID: ')
# send GET request to the URL with id as GET params
page = requests.get(URL, params={"user": id})
# create a Beautiful So... | 33.93617 | 96 | 0.704075 |
6c31983c05cfded604833ecf9af20a6b169e2101 | 434 | py | Python | pacman-arch/test/pacman/tests/sync045.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/sync045.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/sync045.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Install a sync package conflicting with two local ones (-dd)"
sp = pmpkg("pkg1")
sp.conflicts = ["pkg2", "pkg3"]
self.addpkg2db("sync", sp);
lp1 = pmpkg("pkg2")
self.addpkg2db("local", lp1);
lp2 = pmpkg("pkg3")
self.addpkg2db("local", lp2);
self.args = "-Sdd %s --ask=4" % sp.name
self.addrule("... | 22.842105 | 81 | 0.686636 |
662c2bc8f6ba017f6d1d272892ed0f67bdb99429 | 6,661 | py | Python | src/train_dcgan.py | misogil0116/Biscotti | 010ef0f29fbd5d33c9870ce249f1a9824f3471c4 | [
"Apache-2.0"
] | 10 | 2018-01-11T01:15:15.000Z | 2020-06-22T15:03:31.000Z | src/train_dcgan.py | misogil0116/Biscotti | 010ef0f29fbd5d33c9870ce249f1a9824f3471c4 | [
"Apache-2.0"
] | null | null | null | src/train_dcgan.py | misogil0116/Biscotti | 010ef0f29fbd5d33c9870ce249f1a9824f3471c4 | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import glob
import numpy as np
np.random.seed(2016)
from keras import backend as K
from keras.callbacks import ModelCheckpoint
from keras.models import Model, Sequential
from keras.layers import Input
from keras.layers import Conv2D, MaxPooling2D, UpSampling2D, Dense
# from keras.layers impor... | 45.937931 | 103 | 0.667017 |
b0b34596313d9e45011ee92c75f2700d31d3381b | 587 | py | Python | hausse/utils/constants.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | null | null | null | hausse/utils/constants.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | 1 | 2021-08-30T21:41:46.000Z | 2021-08-30T21:41:46.000Z | hausse/utils/constants.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | 1 | 2021-08-31T19:27:32.000Z | 2021-08-31T19:27:32.000Z | from pathlib import Path
# Main keys
class Keys:
BASE = "base_dir"
CLEAN = "clean"
DIST = "dist_dir"
SRC = "src_dir"
PLUGINS = "plugins"
# Default values
class Defaults:
FILES = [
"hausse.json",
"hausse.yaml",
"hausse.yml",
".hausse.json",
".hausse.... | 15.864865 | 30 | 0.500852 |
af789d10eb6f443698df0afea7b474ed04ec1fde | 844 | py | Python | INBa/2014/MorenkoAA/MorenkoAA_7_14.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2014/MorenkoAA/MorenkoAA_7_14.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2014/MorenkoAA/MorenkoAA_7_14.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 7, Вариант 14
# Разработайте систему начисления очков для задачи 6, в соответствии с которой игрок получал бы большее количество баллов за меньшее количество попыток.
# Моренко А.А.
# 04.04.2016
import random
print ('Отгадайте загадку: Сидит дед во сто шуб одет')
def get_random_ded():
deds = ("... | 28.133333 | 153 | 0.670616 |
bba3613784c7cafc85bb27bf342a05756114dfc0 | 1,411 | py | Python | year_3/databases_sem1/lab3/api/migrations/0001_initial.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | year_3/databases_sem1/lab3/api/migrations/0001_initial.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | 21 | 2020-03-24T16:26:04.000Z | 2022-02-18T15:56:16.000Z | year_3/databases_sem1/lab3/api/migrations/0001_initial.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | # Generated by Django 2.0 on 2017-12-26 16:52
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Employee',
fields=[
('id', models.AutoField(a... | 34.414634 | 135 | 0.545712 |
a52851009a4a9f83ce0cbe988e51f1fb8bb2cb99 | 2,286 | py | Python | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/stop_watch_game.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | stop_watch_game/stopwatch_game.py | Jimut123/code_skulptor_pygames | 1bb2c65f5bc5519f3caed956a6f5a55a7359fcb3 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | stop_watch_game/stopwatch_game.py | Jimut123/code_skulptor_pygames | 1bb2c65f5bc5519f3caed956a6f5a55a7359fcb3 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | # template for "Stopwatch: The Game"
import simplegui
import math
import random
import time
# define global variables
x = 0 # no. of sucessful stops
y = 0 # no. of total stops
current_time = 0
# define helper function format that converts time
# in tenths of seconds into formatted string A:BC.D
def format(t):
... | 23.326531 | 63 | 0.650919 |
590ad64024926c4d6498507d6d1c2882d5826a7f | 2,378 | py | Python | 20-hs-redez-sem/groups/02-unionDir/filesystem-redez-client/utils/folder_structure.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-hs-redez-sem/groups/02-unionDir/filesystem-redez-client/utils/folder_structure.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-hs-redez-sem/groups/02-unionDir/filesystem-redez-client/utils/folder_structure.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | import os
from os import listdir
from os.path import isfile, isdir, join
import json
from browser import help_functions
def search(path, root, tree_dict, include=None):
'''
USE:
*use via get function: "folder_structure.get(path)"
Description:
searches all sub folders and saves it to a dictionary (tree_dict) i... | 30.101266 | 145 | 0.688814 |
abcb90125f88b82c00b844cc269af872039300f2 | 4,114 | py | Python | web-app/predictions/predict.py | florianfricke/Bachelor_Thesis_Sentiment_Analyse | aa1fa95cfbc13115ee60baaf79eab0d1940998ab | [
"MIT"
] | 1 | 2020-06-04T13:20:45.000Z | 2020-06-04T13:20:45.000Z | web-app/predictions/predict.py | florianfricke/Bachelor_Thesis_Sentiment_Analyse | aa1fa95cfbc13115ee60baaf79eab0d1940998ab | [
"MIT"
] | 6 | 2020-06-03T18:45:11.000Z | 2022-02-10T01:51:03.000Z | web-app/predictions/predict.py | florianfricke/Bachelor_Thesis_Sentiment_Analyse | aa1fa95cfbc13115ee60baaf79eab0d1940998ab | [
"MIT"
] | null | null | null | """
Created by Florian Fricke.
"""
import sys
import os
sys.path.insert(
0, "{}/datastories_semeval2017_task4".format(os.getcwd()))
from utilities_nn.data_loader import get_embeddings, Task4Loader
sys.path.insert(
0, "{}".format(os.getcwd()))
from utilities.utilities import get_filenames_from_directory
from uti... | 42.412371 | 87 | 0.551288 |
05322cc50577c13655b813345697c95730132e41 | 8,472 | py | Python | util.py | ottermegazord/nmt-graph | 7e2f73cd617fe262d984eb05f2157f7aebac8982 | [
"MIT"
] | null | null | null | util.py | ottermegazord/nmt-graph | 7e2f73cd617fe262d984eb05f2157f7aebac8982 | [
"MIT"
] | null | null | null | util.py | ottermegazord/nmt-graph | 7e2f73cd617fe262d984eb05f2157f7aebac8982 | [
"MIT"
] | null | null | null |
"""
***************************************************************************************
*
* Yara English to Cypher Neural Machine Translation
*
*
* Name : Idaly Ali
*
* Designation : Research Scientist
*
* Description : Seq2Seq: Neural Machine Translation with Attention for translation
* ... | 29.830986 | 114 | 0.610718 |
55a74c43ee7b401a8c51792cacae57f8a6395ee7 | 2,620 | py | Python | TimeLoopLib/TreeDynamicTimeStepping.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | TimeLoopLib/TreeDynamicTimeStepping.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | TimeLoopLib/TreeDynamicTimeStepping.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@date: 2018-Today
@author: jasper.bathmann@ufz.de
"""
class TreeDynamicTimeStepping:
def __init__(self, project):
self.aboveground_competition = project.getAbovegroundCompetition()
self.belowground_competition = project.getBelowgroundCompetition()... | 43.666667 | 79 | 0.666031 |
ddf1ae4650951f1f04ab86aee1f4f49bbf5e4d45 | 1,633 | py | Python | example/data_models.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 8 | 2022-02-24T14:59:24.000Z | 2022-03-31T04:37:55.000Z | example/data_models.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 3 | 2022-02-27T17:08:52.000Z | 2022-03-18T13:11:01.000Z | example/data_models.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 2 | 2022-02-24T15:03:07.000Z | 2022-03-15T03:12:00.000Z | from typing import List, Optional
from volley.data_models import GenericMessage
class InputMessage(GenericMessage):
request_id: str
list_of_values: List[float]
msg_counter: int = 0
class Config:
schema_extra = {
"examples": [
{
"request_id": "r... | 19.914634 | 53 | 0.492958 |
9bba92ff96542db21a36b2d0df19840323ecfde1 | 3,279 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/cnos/test_cnos_vrf.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_vrf.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_vrf.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #
# (c) 2019 Lenovo.
#
# 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... | 41.506329 | 130 | 0.740165 |
9511802a5cc556ec13eaba4d16b01733a61ba41e | 1,696 | py | Python | PSA/modules/CertValidation.py | SECURED-FP7/secured-psa-nsm | 20c8f790ebc2d2aa8c33bda1e047f8f29275a0be | [
"Apache-2.0"
] | null | null | null | PSA/modules/CertValidation.py | SECURED-FP7/secured-psa-nsm | 20c8f790ebc2d2aa8c33bda1e047f8f29275a0be | [
"Apache-2.0"
] | null | null | null | PSA/modules/CertValidation.py | SECURED-FP7/secured-psa-nsm | 20c8f790ebc2d2aa8c33bda1e047f8f29275a0be | [
"Apache-2.0"
] | null | null | null |
# -*- Mode:Python;indent-tabs-mode:nil; -*-
#
# CertValidation.py
#
# Implements a certificate chain verification module that utilises
# validate-certs.bro
#
import logging
from broccoli import event, record_type, record
from modules.BroModule import BroModule
# Log event:
CVLogRecord = record_type( 'id', # O... | 25.69697 | 72 | 0.548349 |
952d202197b339ba1d89a86271684b5ea748b6bb | 348 | py | Python | src/utils/device.py | AakashMallik/cnn-firefly | 6c8ed58a035e62682263753436b124cb979ed240 | [
"MIT"
] | null | null | null | src/utils/device.py | AakashMallik/cnn-firefly | 6c8ed58a035e62682263753436b124cb979ed240 | [
"MIT"
] | 7 | 2020-11-27T12:24:31.000Z | 2020-11-29T09:41:09.000Z | src/utils/device.py | AakashMallik/cnn-firefly | 6c8ed58a035e62682263753436b124cb979ed240 | [
"MIT"
] | null | null | null | import torch
def get_device():
if torch.cuda.is_available():
device = torch.device("cuda:0")
print("[ GPU: {} (1/{}) ]".format(
torch.cuda.get_device_name(0),
torch.cuda.device_count())
)
else:
device = torch.device("cpu")
print("[ Running on the... | 21.75 | 42 | 0.534483 |
c864b4831ec15105cc480c7e2b9ce56cf820ee3e | 3,709 | py | Python | project/api/image/schemas.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/api/image/schemas.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/api/image/schemas.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from marshmallow import ValidationError, fields, post_load, validate, validates_schema
from project.api import marshmallow
from project.api.schemas import SQLAlchemyBaseSchema
from project.imageutils import (
get_bytes_from_image,
get_image_from_base64_str,
get_image_from_url,
get_mime_type_from_image,... | 30.908333 | 120 | 0.666217 |
f1e19d759721507f5c7befceb2a60fe9d67c1178 | 3,621 | py | Python | .github/announce/main.py | cssbristol/css-website-2015 | 39833da7de5a6e10a31390b7e62d8ce93c1b24ea | [
"MIT"
] | 15 | 2015-11-17T18:09:44.000Z | 2021-09-19T21:03:45.000Z | .github/announce/main.py | cssbristol/css-website-2015 | 39833da7de5a6e10a31390b7e62d8ce93c1b24ea | [
"MIT"
] | 56 | 2016-01-01T14:49:03.000Z | 2021-12-22T17:08:57.000Z | .github/announce/main.py | cssbristol/css-website-2015 | 39833da7de5a6e10a31390b7e62d8ce93c1b24ea | [
"MIT"
] | 34 | 2015-11-17T18:14:00.000Z | 2021-11-22T03:12:12.000Z | #!/usr/bin/env python3.9
# Author: danjones1618 <hello@danjones.dev>
from datetime import datetime, timedelta
from dataclasses import dataclass
from discord_webhook import DiscordWebhook
from typing import Optional, List, Union
from pathlib import Path
from requests import Response
import sys
import os
import frontmat... | 30.175 | 125 | 0.631317 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.