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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18563ccef181229a7af9228ea607d8d9a3f0a86a | 847 | py | Python | Interview Preparation Kits/Interview Preparation Kit/Warm-up Challenges/Sales by Match/socket_merchant.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Interview Preparation Kits/Interview Preparation Kit/Warm-up Challenges/Sales by Match/socket_merchant.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Interview Preparation Kits/Interview Preparation Kit/Warm-up Challenges/Sales by Match/socket_merchant.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the sockMerchant function below.
def sockMerchant(n, ar):
if n <= 1:
return 0
else:
pairs = 0
i = 0
while i < len(ar) and len(ar) > 0:
j = i+1
flag = True
whil... | 18.822222 | 49 | 0.436836 |
3da188b53bf5f95dd16b397fc4dbbd5fe3a4f9cb | 3,446 | py | Python | src/main/python/floatingpoints/floating_points_fixed_view.py | mkisser-tgm/floating_points | ef6c93c1d1fa5bbb38615c0d2fc7632b31f06e8e | [
"MIT"
] | null | null | null | src/main/python/floatingpoints/floating_points_fixed_view.py | mkisser-tgm/floating_points | ef6c93c1d1fa5bbb38615c0d2fc7632b31f06e8e | [
"MIT"
] | null | null | null | src/main/python/floatingpoints/floating_points_fixed_view.py | mkisser-tgm/floating_points | ef6c93c1d1fa5bbb38615c0d2fc7632b31f06e8e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui/my_floating_points.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def setupUi(self, Form):
Form.s... | 47.205479 | 83 | 0.692397 |
3de4cdb9c4fd0c1a8da0fb0f415be176307486fa | 4,365 | py | Python | applications/speech_cmd_analysis/preprocess.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/speech_cmd_analysis/preprocess.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/speech_cmd_analysis/preprocess.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 41.971154 | 227 | 0.656128 |
9a87e66466e41cfc04bf2aae0ce05b1ec0bc8cf4 | 1,160 | py | Python | apps/mail/migrations/0001_initial.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 1 | 2017-01-08T13:21:43.000Z | 2017-01-08T13:21:43.000Z | apps/mail/migrations/0001_initial.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 17 | 2018-12-03T14:22:14.000Z | 2021-07-14T15:15:12.000Z | apps/mail/migrations/0001_initial.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 2 | 2018-12-03T14:58:49.000Z | 2019-12-01T13:24:42.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-11-13 16:34
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Create... | 36.25 | 151 | 0.592241 |
b111b213dacfb42dfce583549b6c56aa4533f12d | 1,795 | py | Python | src/onegov/wtfs/views/user_manual.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/views/user_manual.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/views/user_manual.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from humanize import naturalsize
from morepath import redirect
from morepath import Response
from onegov.wtfs import _
from onegov.wtfs import WtfsApp
from onegov.wtfs.forms import UserManualForm
from onegov.wtfs.layouts import EditUserManualLayout
from onegov.wtfs.layouts import UserManualLayout
from onegov.wtfs.model... | 24.256757 | 62 | 0.68078 |
490a53be7d6a255b25e4712a2e390c6497c628fc | 428 | py | Python | Curso-Em-Video-Python/2Exercicios/042_Analisando_triangulo_V2.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/042_Analisando_triangulo_V2.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/042_Analisando_triangulo_V2.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | lado1 = int(input('Lado 1: '))
lado2 = int(input('Lado 2: '))
lado3 = int(input('Lado 3: '))
if lado1 < lado2 + lado3 and lado2 < lado1 + lado3 and lado3 < lado1 + lado2:
print('É um triangulo', end=' ')
if lado1 == lado2 == lado3:
print('Equilátero!!')
elif lado1 == lado2 or lado1 == lado3 or lado2... | 30.571429 | 77 | 0.57243 |
498a4fcb20611a1f048ba3615fafb316f637c7c5 | 2,878 | py | Python | SectorwiseCompanyExcelCreator.py | Yashraj890/StockAnalyzer | 96311362c85a224833a23c08148df956a64e177c | [
"MIT"
] | null | null | null | SectorwiseCompanyExcelCreator.py | Yashraj890/StockAnalyzer | 96311362c85a224833a23c08148df956a64e177c | [
"MIT"
] | null | null | null | SectorwiseCompanyExcelCreator.py | Yashraj890/StockAnalyzer | 96311362c85a224833a23c08148df956a64e177c | [
"MIT"
] | null | null | null | import pandas as pd
from openpyxl import Workbook
from openpyxl import load_workbook
# let's read the sectors data from workbook
Sectorswb = load_workbook(r'D:\NSEData\Sectors.xlsx')
# let's read the sectorswise company data from workbook
SectorwiseCompanieswb = load_workbook(r'D:\NSEData\SectorWiseCompanies.xlsx')
... | 39.972222 | 198 | 0.692495 |
02f048edfce03e9ceafb62b2c6130f20ff34d28b | 12,379 | py | Python | data/fund_net/a_collect_fundnet.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | data/fund_net/a_collect_fundnet.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | data/fund_net/a_collect_fundnet.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Nov 10 15:15:17 2017 @author: wangkaibiao
动态网页是指跟静态网页相对的一种网页编程技术。静态网页,随着html代码的生成,页面的内容和显示效果就基本上不会发生变化了——除非你修改页面代码。
而动态网页则不然,页面代码虽然没有变,但是显示的内容却是可以随着时间、环境或者数据库操作的结果而发生改变的。与静态网页相对应的,
能与后台数据库进行交互,数据传递。也就是说,网页 URL的后缀不是.htm、.html、.shtml、.xml等静态网页的常见形动态网页制作格式,
而是以.aspx、.asp、.j... | 36.842262 | 105 | 0.623475 |
b8c06b34f32a21479c1d72b64e8d3ca9c58d9a5e | 86 | py | Python | 20-fs-ias-lec/groups/13-sneakernet/code/__init__.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/13-sneakernet/code/__init__.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/13-sneakernet/code/__init__.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | from .logMerge import *
from .Event import *
from .crypto import *
from .pcap import * | 21.5 | 23 | 0.732558 |
ac68e1264838e0ae46c63e05763457aadc2826d8 | 2,121 | py | Python | GUI-Vat.py | PawitKrai/Vat7 | eed973bd8c0d2ae99e46a41c53fd3c345595a751 | [
"MIT"
] | null | null | null | GUI-Vat.py | PawitKrai/Vat7 | eed973bd8c0d2ae99e46a41c53fd3c345595a751 | [
"MIT"
] | null | null | null | GUI-Vat.py | PawitKrai/Vat7 | eed973bd8c0d2ae99e46a41c53fd3c345595a751 | [
"MIT"
] | null | null | null | #GUI-Vat.py
from tkinter import *
from tkinter import ttk
GUI = Tk()
GUI.geometry('500x600')
GUI.title('Calculated Vat Programming by PAWIT')
#===== Config =====
FONT1 = ('Angsana New',20)
#====== ชองกรอกข้อมูล (ชื่อสินค้า) ======
L = ttk.Label(GUI,text = 'ชื่อสินค้า',font = FONT1).pack()
v_produc... | 29.054795 | 117 | 0.577086 |
ce4034633e991b17f54ba0a2dfafc35378357ce1 | 3,574 | py | Python | quark_core_api/data/storage/query.py | arcticle/Quark | 17aa5b5869a9e9c7a04c1a371fef5998f33dc319 | [
"MIT"
] | null | null | null | quark_core_api/data/storage/query.py | arcticle/Quark | 17aa5b5869a9e9c7a04c1a371fef5998f33dc319 | [
"MIT"
] | null | null | null | quark_core_api/data/storage/query.py | arcticle/Quark | 17aa5b5869a9e9c7a04c1a371fef5998f33dc319 | [
"MIT"
] | null | null | null | from future.utils import viewitems
from quark_core_api.data.storage import QueryOperators, LogicalOperator
from quark_core_api.exceptions import InvalidExpressionException, InvalidOperationException
class QueryCommand(object):
def __init__(self, query):
self.query = Query(query)
def execute(self, da... | 32.198198 | 109 | 0.624231 |
5a7cdf7cdc389a633f2f4395088ccbc066d57655 | 1,530 | py | Python | 7-assets/past-student-repos/LambdaSchool-master/m7/72a1/projects/adventure/util.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m7/72a1/projects/adventure/util.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m7/72a1/projects/adventure/util.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | class Queue():
def __init__(self):
self.queue = []
def enqueue(self, value):
self.queue.append(value)
def dequeue(self):
if self.size() > 0:
return self.queue.pop(0)
else:
return None
def size(self):
return len(self.queue)
class Stack(... | 23.90625 | 58 | 0.538562 |
ce78beddca237079b766a718e3aebaef6e1f79a4 | 416 | py | Python | PINp/2014/Gryadin_V_D/task_3_46.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Gryadin_V_D/task_3_46.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Gryadin_V_D/task_3_46.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 3. Вариант 46
#Напишите программу, которая выводит имя "Аврора Жюпен", и запрашивает его псевдоним.
#Программа должна сцеплять две эти строки и выводить полученную строку, разделяя имя
#и псевдоним с помощью тире.
#Gryadin V. D.
print("Аврора Жюпен")
a = "Под каким же именем мы знаем этого человека?"
input(a ... | 32 | 85 | 0.745192 |
cea603b815dfde0cde8f07481cb4c0faba7284dd | 362 | py | Python | pacman-arch/test/pacman/tests/sync133.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/sync133.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/sync133.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Sysupgrade with a sync package replacing a local one in 'IgnorePkg'"
sp = pmpkg("pkg2")
sp.replaces = ["pkg1"]
self.addpkg2db("sync", sp)
lp = pmpkg("pkg1")
self.addpkg2db("local", lp)
self.option["IgnorePkg"] = ["pkg1"]
self.args = "-Su"
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXI... | 19.052632 | 88 | 0.696133 |
6820686a0ff196b1e46cda3ac3ea5fcb117c7a86 | 5,035 | py | Python | research/cv/ivpf/ivpf/generative_flow.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/ivpf/ivpf/generative_flow.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/ivpf/ivpf/generative_flow.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.908497 | 79 | 0.547964 |
cc2b2f716652485af0f74dea01bc61b97ee63a16 | 14,383 | py | Python | tests/onegov/core/test_utils.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/core/test_utils.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/core/test_utils.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import re
import textwrap
import onegov.core
import os.path
import pytest
import transaction
from onegov.core import utils
from onegov.core.custom import json
from onegov.core.errors import AlreadyLockedError
from onegov.core.orm import SessionManager
from onegov.core.orm.types import HSTORE
from onegov.core.utils im... | 31.820796 | 79 | 0.630745 |
0445adf1648e2a75f62723073f224bff5cc0fb90 | 3,534 | py | Python | monitoring/zabbix/zabbix_collections/zabbix-cli/tests/test_config.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 63 | 2018-02-04T03:31:22.000Z | 2022-03-07T08:27:39.000Z | monitoring/zabbix/zabbix_collections/zabbix-cli/tests/test_config.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 3 | 2020-06-15T03:41:03.000Z | 2020-06-15T03:41:04.000Z | monitoring/zabbix/zabbix_collections/zabbix-cli/tests/test_config.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 40 | 2018-01-22T16:31:16.000Z | 2022-03-08T04:40:42.000Z | import unittest
import zabbix_cli.config
try:
# PY3
import configparser
except ImportError:
import ConfigParser as configparser
class MockConfig(configparser.ConfigParser, object):
def __init__(self):
super(MockConfig, self).__init__({'option_a': 'a', 'option_b': 'b'})
self.add_sect... | 29.697479 | 77 | 0.612054 |
aca638e95d6149e43a8da7fbde5963d6aabf3879 | 467 | py | Python | loging.py | bank-manage/Bank | 1e88bde04b8c1cd59513844457b3db9ed739bfeb | [
"Apache-2.0"
] | null | null | null | loging.py | bank-manage/Bank | 1e88bde04b8c1cd59513844457b3db9ed739bfeb | [
"Apache-2.0"
] | null | null | null | loging.py | bank-manage/Bank | 1e88bde04b8c1cd59513844457b3db9ed739bfeb | [
"Apache-2.0"
] | null | null | null | print("------登录界面------")
Bank = {}
def log_ing():
while True:
count = 1
username = input("请输入用户名:")
passwd = input("请输入密码:")
passwd2 = int(input("请再次输入密码:"))
if 6>len(username)>0 and isinstance(passwd,int):
if passwd2 == passwd:
bank[username] = passwd
print("登陆成功!")
break
else... | 12.289474 | 50 | 0.56531 |
4a234731d73f6968c6a545284bca205fe4b0706b | 534 | py | Python | tests/onegov/ballot/collections/test_ballots.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/ballot/collections/test_ballots.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/ballot/collections/test_ballots.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from datetime import date
from onegov.ballot import Ballot
from onegov.ballot import BallotCollection
from onegov.ballot import Vote
def test_ballots(session):
vote = Vote(
title="A",
shortcode="Z",
domain='federation',
date=date(2015, 6, 14)
)
vote.ballots.append(Ballot(ty... | 23.217391 | 66 | 0.672285 |
4f69a1934f91eae05a61faec61d2a8c45669a813 | 867 | py | Python | t1nkuy/apps/goods/filters.py | qq453388937/drf | 63ef7c5f89cf8f597fd09828f8ce94ce809ce287 | [
"MIT"
] | null | null | null | t1nkuy/apps/goods/filters.py | qq453388937/drf | 63ef7c5f89cf8f597fd09828f8ce94ce809ce287 | [
"MIT"
] | null | null | null | t1nkuy/apps/goods/filters.py | qq453388937/drf | 63ef7c5f89cf8f597fd09828f8ce94ce809ce287 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = 'bobby'
import django_filters
from django.db.models import Q
from .models import Goods
class GoodsFilter(django_filters.rest_framework.FilterSet):
"""
商品的过滤类
"""
pricemin = django_filters.NumberFilter(name='shop_price', help_text="最低价格", lookup_expr=... | 33.346154 | 99 | 0.685121 |
8b178d63a988c7e3722575e2fb41d0053100d9fe | 668 | py | Python | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Errors.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 282 | 2016-06-16T14:41:44.000Z | 2022-03-02T03:43:02.000Z | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Errors.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 146 | 2016-06-16T08:55:45.000Z | 2020-09-08T10:37:32.000Z | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Errors.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 94 | 2016-06-16T10:49:07.000Z | 2022-03-28T09:14:03.000Z | class Error(Exception):
"""Raised when something failed in an unexpected and unrecoverable way"""
pass
class OperationError(Error):
"""Raised when an operation failed in an expected but unrecoverable way"""
pass
class NotifyError(Error):
"""Raised when an notify operation failed in an expected b... | 23.034483 | 85 | 0.724551 |
ba1a6b2eec991385d88753f02ea5ed2bb153456f | 355 | py | Python | exercises/pt/test_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/pt/test_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/pt/test_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
doc.text == "I like tree kangaroos and narwhals."
), "Verifique se você processou o texto corretamente..."
assert first_token == doc[0], "Tem certeza que você selecionou o primeiro token"
assert "print(first_token.text)" in __solution__, "Você está imprimindo o texto do toke... | 44.375 | 94 | 0.684507 |
d75d54ae9b99805522905c80e241df87f0e296a1 | 3,439 | py | Python | devices/hcsr04.py | MiaranaDIY/Salamigal | 44ac98fa6463d46694e1f9343a0ebc788e7a88f8 | [
"MIT"
] | 3 | 2017-08-02T12:26:34.000Z | 2021-01-13T01:06:26.000Z | devices/hcsr04.py | MiaranaDIY/Salamigal | 44ac98fa6463d46694e1f9343a0ebc788e7a88f8 | [
"MIT"
] | null | null | null | devices/hcsr04.py | MiaranaDIY/Salamigal | 44ac98fa6463d46694e1f9343a0ebc788e7a88f8 | [
"MIT"
] | 3 | 2017-02-14T22:10:00.000Z | 2021-01-02T14:26:43.000Z | #Setup logging
import logging
import logging.config
logging.config.fileConfig('logging.conf')
# create logger
logger = logging.getLogger('root')
import time
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM) # set board mode to Broadcom
GPIO.setwarnings(False)
import devices.device as device
class HCSR04(device.Device)... | 34.39 | 99 | 0.598139 |
d16a1a1179cbd5eb5a06180c62ad4ee7efa8edb3 | 343 | py | Python | scripts/HelloPython/bsp01_FOR.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | scripts/HelloPython/bsp01_FOR.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | scripts/HelloPython/bsp01_FOR.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | #!/usr/bin/env python
# bsp01_FOR.py
# -----------------------------------
# 4.10.2021 by OJ
# test
# -----------------------------------
# ---- Variablen ----
text = "Willkommen im Robotik Labor"
i = 0
for c in text:
print("Zeichen Nr. ", i, " ", text[i], " ", c)
i += 1 # i++ gibt es nicht!
print(" For... | 18.052632 | 50 | 0.428571 |
d17583ce6a93e8c6dcd35e2786b5c8655625201b | 377 | py | Python | 07_Testing/test_prime1.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | 07_Testing/test_prime1.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | 07_Testing/test_prime1.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | from prime import is_prime
import unittest
class Tests(unittest.TestCase):
def test_1(self):
self.assertFalse(is_prime(1))
def test_2(self):
self.assertTrue(is_prime(2))
def test_8(self):
self.assertFalse(is_prime(8))
def test_11(self):
self.assertTrue(is_pri... | 15.708333 | 37 | 0.639257 |
0f90edd294b5c97f5924445917d501838e69c473 | 16,673 | py | Python | UCEF-main/ucef.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 6 | 2021-08-23T04:54:21.000Z | 2021-12-06T09:45:20.000Z | UCEF-main/ucef.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | UCEF-main/ucef.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | # -*- coding: utf-8 -*-
import urllib3, requests, re, time, random, sys, argparse, colorama, os, bs4, html5lib, tqdm, cloudscraper
from bs4 import BeautifulSoup
from pathlib import Path
from banner import banner
sys.stdout.write(banner())
email=input(" \033[1;96mUDEMY EMAIL : \033[1;93m")
password=input(" ... | 28.896014 | 156 | 0.540814 |
7d06d52c387522894fc09dba12eec9b0c0f2e705 | 414 | py | Python | source/pkgsrc/devel/py-mox/patches/patch-mox.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/devel/py-mox/patches/patch-mox.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/devel/py-mox/patches/patch-mox.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-mox.py,v 1.1 2018/03/24 17:10:07 joerg Exp $
--- mox.py.orig 2018-03-24 14:35:50.526907676 +0000
+++ mox.py
@@ -1229,7 +1229,7 @@ class Comparator:
rhs: any python object
"""
- raise NotImplementedError, 'method must be implemented by a subclass.'
+ raise NotImplementedError('method ... | 29.571429 | 75 | 0.666667 |
adfc31a6519458cf31e6ca4ebc10b855d93d1bbc | 336 | py | Python | train_model/evaluate_model.py | liwde/ArtOrTrash | 75d6aa0da53b7dd2ef328150afa4b0cb7d8c458a | [
"Apache-2.0"
] | 4 | 2019-06-03T19:31:47.000Z | 2019-06-13T13:38:58.000Z | train_model/evaluate_model.py | liwde/ArtOrTrash | 75d6aa0da53b7dd2ef328150afa4b0cb7d8c458a | [
"Apache-2.0"
] | null | null | null | train_model/evaluate_model.py | liwde/ArtOrTrash | 75d6aa0da53b7dd2ef328150afa4b0cb7d8c458a | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
from constants import PATH_MODEL
from util import load_image
model = tf.keras.models.load_model(PATH_MODEL)
test_image = load_image('test.jpg')
test_image = tf.reshape(test_image, (-1, 224, 224, 3))
result = model.predict(test_image)
print('Das ist Kunst!' if round(result[0][0]) == 0 else '... | 24 | 72 | 0.741071 |
bc1f9d97ec7786242654b60071941aa0696390d4 | 229 | py | Python | python/python_new/Python 3/largest.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_new/Python 3/largest.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_new/Python 3/largest.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | a=int(input("Enter first number: "))
b=int(input("Enter second number: "))
c=int(input("Enter third number: "))
if (a>=b)and(a>=c):
print(a,"is largest")
elif (b>=a)and(b>=c):
print(b,"is largest")
else:
print(c,"is largest")
| 22.9 | 37 | 0.633188 |
70bc00d6004100e9b1868217313ff5d9662da19d | 517 | py | Python | Python/M01_ProgrammingBasics/L02_ConditionalStatements/Exercises/Solutions/P06_GodzillaVsKong.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L02_ConditionalStatements/Exercises/Solutions/P06_GodzillaVsKong.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L02_ConditionalStatements/Exercises/Solutions/P06_GodzillaVsKong.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | 1 | 2022-02-23T13:03:14.000Z | 2022-02-23T13:03:14.000Z | budget = float(input())
staff_number = int(input())
price_per_staff = float(input())
decor = budget * 0.1
price_all_staff = staff_number * price_per_staff
if staff_number > 150:
price_all_staff = price_all_staff * 0.9
cost = price_all_staff + decor
if budget >= cost:
remaining = budget - cost
print('Act... | 25.85 | 68 | 0.694391 |
cb80312985af5e7810e9a677c934fc8f882bd6db | 2,110 | py | Python | micropython/sd/ntptime.py | webbhm/PiRock | 2c8f328bf212d8bcac88061fd1ba23866746626a | [
"Apache-2.0"
] | null | null | null | micropython/sd/ntptime.py | webbhm/PiRock | 2c8f328bf212d8bcac88061fd1ba23866746626a | [
"Apache-2.0"
] | null | null | null | micropython/sd/ntptime.py | webbhm/PiRock | 2c8f328bf212d8bcac88061fd1ba23866746626a | [
"Apache-2.0"
] | null | null | null | """
Make a wifi connection and get the NTP time
May need to change for wifi login info issues
Author: Howard Webb
Date: 11/6/2020
Wifi has issues, note changes for soft reset
github.com/micropython/micropython/issues/4681
"""
try:
import usocket as socket
except:
import socket
try:
import ustruct as struc... | 23.444444 | 87 | 0.605687 |
1dd8083c7c36ff1b047881ade675e820755eea82 | 565 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v6_24/map_customer_address_to_shipping_address_on_po.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/v6_24/map_customer_address_to_shipping_address_on_po.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v6_24/map_customer_address_to_shipping_address_on_po.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doctype("Purchase Order")
if not frappe.db.has_column("Purchase Order", "shipping_address"):
return... | 29.736842 | 84 | 0.773451 |
69f969a7bb2757cb9d5ad482d9806c8f8e405c80 | 1,578 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/MetaSV-0.5-py2.7.egg/metasv.bak/defaults.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/MetaSV-0.5-py2.7.egg/metasv.bak/defaults.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/MetaSV-0.5-py2.7.egg/metasv/defaults.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | MIN_SV_LENGTH = 50
MAX_SV_LENGTH = 1000000
OVERLAP_RATIO = 0.5
WIGGLE = 100
INS_WIGGLE = 100
TX_WIGGLE = 5
SVS_SUPPORTED = set(["DEL", "DUP", "INS", "INV", "ITX", "CTX"])
SVS_ASSEMBLY_SUPPORTED = set(["DEL", "INS" , "INV", "DUP"])
SVS_SOFTCLIP_SUPPORTED = set(["DEL", "INS" , "INV", "DUP"])
MEAN_READ_LENGTH=100
# For g... | 23.552239 | 63 | 0.78834 |
c7fd7d1e39de9b1ff9f78a19603d2cbe66605ad6 | 14,048 | py | Python | tensorflow/basic-rl/tutorial12/code/train_mountaincar_continuous_pg.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | tensorflow/basic-rl/tutorial12/code/train_mountaincar_continuous_pg.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | tensorflow/basic-rl/tutorial12/code/train_mountaincar_continuous_pg.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-10-14T07:30:18.000Z | 2019-10-14T07:30:18.000Z | import gym
import itertools
import matplotlib
import numpy as np
import sys
import tensorflow as tf
import collections
import sklearn.pipeline
import sklearn.preprocessing
import plotting
from baselines import logger
from sklearn.kernel_approximation import RBFSampler
"""
Vanilla Policy Gradient implemented using Ac... | 38.277929 | 144 | 0.647921 |
2a3fb4b013018f42291385b6aa4b34cbde70a01a | 12,653 | py | Python | Packs/CovalenceManagedSecurity/Integrations/CovalenceManagedSecurity/CovalenceManagedSecurity.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CovalenceManagedSecurity/Integrations/CovalenceManagedSecurity/CovalenceManagedSecurity.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CovalenceManagedSecurity/Integrations/CovalenceManagedSecurity/CovalenceManagedSecurity.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import os
import requests
import traceback
import json
from datetime import datetime, timedelta
from requests import HTTPError
from CommonServerPython import *
import demistomock as demisto
DATE_FORMAT = '%Y-%m-%d %H:%M:%S'
EMAIL = demisto.params().get('credentials')['identifier']
API_KEY = demisto.params().get('crede... | 35.742938 | 126 | 0.560499 |
2a5ad44091b4af49afaea66726602d33809584f5 | 1,997 | py | Python | Terminagent/Calendar.py | flikkes/intelligente_agenten | 340ca9b9d98b4525b330292f16444e106dec9d66 | [
"MIT"
] | null | null | null | Terminagent/Calendar.py | flikkes/intelligente_agenten | 340ca9b9d98b4525b330292f16444e106dec9d66 | [
"MIT"
] | null | null | null | Terminagent/Calendar.py | flikkes/intelligente_agenten | 340ca9b9d98b4525b330292f16444e106dec9d66 | [
"MIT"
] | null | null | null | class Calendar:
LOWER_BOUND_KEY = 'lowerBound'
UPPER_BOUND_KEY = 'upperBound'
APPOINTMENTS_KEY = 'appointments'
timeData = [
{LOWER_BOUND_KEY: 8.0, UPPER_BOUND_KEY: 18.0, APPOINTMENTS_KEY: []},
{LOWER_BOUND_KEY: 8.0, UPPER_BOUND_KEY: 18.0, APPOINTMENTS_KEY: []},
... | 39.94 | 147 | 0.621933 |
aa572e9358bb864016b168e750eac0b3cbbd33a3 | 928 | py | Python | pk/data/cluster/dbscan/cluster.py | gwdgithubnom/ox-patient | cddf4fe381cb4506db8e0d62803dd2044cf7ad92 | [
"MIT"
] | null | null | null | pk/data/cluster/dbscan/cluster.py | gwdgithubnom/ox-patient | cddf4fe381cb4506db8e0d62803dd2044cf7ad92 | [
"MIT"
] | null | null | null | pk/data/cluster/dbscan/cluster.py | gwdgithubnom/ox-patient | cddf4fe381cb4506db8e0d62803dd2044cf7ad92 | [
"MIT"
] | 1 | 2021-04-14T00:45:38.000Z | 2021-04-14T00:45:38.000Z | '''
Created on Feb 13, 2014
@author: sushant
'''
class cluster:
pList = []
X = []
Y = []
name = ""
def __init__(self,name):
self.name = name
self.pList = []
self.X = []
self.Y = []
def addPoint(self,point):
self.pList.append(point)
... | 17.509434 | 35 | 0.4375 |
aa61b8d140359e848d887ac08b33937e93975b21 | 66 | py | Python | fg/tournaments/tests.py | alex-evans/fgolf | 8fcdfd72d168e25204a914e57d4c3478382fd473 | [
"MIT"
] | null | null | null | fg/tournaments/tests.py | alex-evans/fgolf | 8fcdfd72d168e25204a914e57d4c3478382fd473 | [
"MIT"
] | null | null | null | fg/tournaments/tests.py | alex-evans/fgolf | 8fcdfd72d168e25204a914e57d4c3478382fd473 | [
"MIT"
] | null | null | null | from django.test import TestCase
from .models import Tournament
| 13.2 | 32 | 0.818182 |
934b1a7fdc8fe2a5afe172ac7e5da5d0025eeafe | 2,794 | py | Python | research/cv/inception_resnet_v2/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/inception_resnet_v2/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/inception_resnet_v2/eval.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... | 41.701493 | 113 | 0.705082 |
fad0134f18465fd3fb66be07f898d66d389ab8a5 | 163 | py | Python | top/clearlight/base/runoob/file_io.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | 1 | 2020-01-16T09:23:43.000Z | 2020-01-16T09:23:43.000Z | top/clearlight/base/runoob/file_io.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | top/clearlight/base/runoob/file_io.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | # 读取键盘输入
# raw_input([prompt]) 函数从标准输入读取一个行,并返回一个字符串(去掉结尾的换行符)
from click._compat import raw_input
str = raw_input("请输入:")
print('你输入的内容是:', str)
str = input() | 16.3 | 53 | 0.723926 |
ea0f42ad99d28a36462035a0e3d35eb7da732294 | 265 | py | Python | scheduleSynchronizer/web_scraper1111/test.py | 497022407/Shifts-manager | beccb63c8622c015a9a453f586d4c3bb5d5066b9 | [
"Apache-2.0"
] | null | null | null | scheduleSynchronizer/web_scraper1111/test.py | 497022407/Shifts-manager | beccb63c8622c015a9a453f586d4c3bb5d5066b9 | [
"Apache-2.0"
] | null | null | null | scheduleSynchronizer/web_scraper1111/test.py | 497022407/Shifts-manager | beccb63c8622c015a9a453f586d4c3bb5d5066b9 | [
"Apache-2.0"
] | null | null | null |
import requests
import re
import string
from bs4 import BeautifulSoup
import scraper
import search
import datetime
import time
from dateutil.parser import parse
# workshop, lecture, all in small letters
li = search.look("Game Theory PG")
for x in li:
x.display() | 17.666667 | 41 | 0.792453 |
35013b7970bc825b7052473164c250e4c1d950b9 | 874 | py | Python | Webpage/arbeitsstunden/migrations/0019_auto_20211012_1329.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | null | null | null | Webpage/arbeitsstunden/migrations/0019_auto_20211012_1329.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | 46 | 2022-01-08T12:03:24.000Z | 2022-03-30T08:51:05.000Z | Webpage/arbeitsstunden/migrations/0019_auto_20211012_1329.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.8 on 2021-10-12 13:29
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('arbeitsstunden', '0018_auto_20210718_1120'),
]
operations = [
migrations.AddField(
model_name='customhours',
... | 29.133333 | 156 | 0.575515 |
35221d60a76ff6c5da1f3a4682cc198bc0e8181b | 142 | py | Python | 20-fs-ias-lec/groups/01-dev2dev/Code/BTonly/pythonCLITest.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/BTonly/pythonCLITest.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/BTonly/pythonCLITest.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | import os
cmd = "swift adhoc.swift"
SSID = "kool"
password = "cool" #Password is a WEP password
os.system(cmd + " " + SSID + " " + password)
| 20.285714 | 45 | 0.640845 |
dc86abab07ded8ba4c77de0b22ba165a33aff1ae | 7,184 | py | Python | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/loader/pipelines/decode_image.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_image.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/loader/pipelines/decode_image.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 Reserve.
#
# 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... | 35.741294 | 85 | 0.509744 |
52594f4d5a21e3b3fc0f04f74fad59c967be4ac8 | 873 | py | Python | frappe-bench/apps/erpnext/erpnext/agriculture/doctype/crop/crop.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/agriculture/doctype/crop/crop.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/agriculture/doctype/crop/crop.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
from frappe import _
class Crop(Document):
def validate(... | 34.92 | 93 | 0.745704 |
1d267239b41766a1502acf482ea8105cf560e4d5 | 4,049 | py | Python | backend/apps/accounts/forms.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | 2 | 2020-03-28T13:56:39.000Z | 2020-03-29T10:16:12.000Z | backend/apps/accounts/forms.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | 76 | 2020-03-27T21:53:04.000Z | 2020-03-30T20:27:43.000Z | backend/apps/accounts/forms.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | null | null | null | from crispy_forms.bootstrap import PrependedText
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Column, HTML, Layout, Row, Submit
from django import forms
from django.contrib.auth.forms import AuthenticationForm, UserCreationForm, UsernameField
from django.db import transaction
from django.u... | 29.772059 | 99 | 0.611756 |
7f940760a5a23e98c1edb49101f30d1c8e1562ed | 136 | py | Python | pelican/plugins/myst/__init__.py | noirbizarre/pelican-myst | c2c7b44803ebc33e70d915c35b692df14597469b | [
"MIT"
] | null | null | null | pelican/plugins/myst/__init__.py | noirbizarre/pelican-myst | c2c7b44803ebc33e70d915c35b692df14597469b | [
"MIT"
] | 21 | 2021-12-21T16:47:35.000Z | 2022-03-29T04:34:59.000Z | pelican/plugins/myst/__init__.py | noirbizarre/pelican-myst | c2c7b44803ebc33e70d915c35b692df14597469b | [
"MIT"
] | null | null | null | from pelican.plugins.signals import readers_init
from .reader import add_reader
def register():
readers_init.connect(add_reader)
| 17 | 48 | 0.801471 |
1005cb5a65b5fab6653ba2770dc60f5676c5da22 | 3,428 | py | Python | Python X/List Comprehensions.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | Python X/List Comprehensions.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | Python X/List Comprehensions.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | {
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"a = [1, 3, 5, 7, 9, 11]"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"# [2, 6, 10, 14, 18, 22] (double elements in [a])\n... | 16.8867 | 76 | 0.409568 |
12051e578eb1f95e9577da022d6793bdd638dbd0 | 13,226 | py | Python | source/pkgsrc/lang/python37/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/lang/python37/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/lang/python37/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.3 2020/11/19 16:29:42 bsiegert Exp $
Disable certain modules, so they can be built as separate packages.
Do not look for ncursesw.
Assume panel_library is correct; this is a fix for ncurses' gnupanel
which will get transformed to panel in buildlink.
Also look for uuid/uuid.h.
Support fo... | 44.086667 | 137 | 0.558748 |
12571dafcda95907891d2900432028059eda077a | 750 | py | Python | test/logs_ds.py | wybosys/nnt.logic.jvm | 249aedd7f8dd03d94dcb0780b91dadacd4b25270 | [
"BSD-3-Clause"
] | 2 | 2020-09-22T11:01:31.000Z | 2020-09-22T11:12:29.000Z | test/logs_ds.py | wybosys/nnt.logic.jvm | 249aedd7f8dd03d94dcb0780b91dadacd4b25270 | [
"BSD-3-Clause"
] | null | null | null | test/logs_ds.py | wybosys/nnt.logic.jvm | 249aedd7f8dd03d94dcb0780b91dadacd4b25270 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import kafka
import json
import time
import os
import datetime
# 循环给xaas-logs容器投递测试用日志数据
LOGS_DIR = "/storage/xaas-logs/logs"
LOGS_FILE = "%s/nnt-logic-logs-ds.log" % LOGS_DIR
MSGID = 0
def one():
log = {
"app": -1,
"cmd": -1,
"data": {
"id": MSGID
... | 17.045455 | 70 | 0.536 |
4ee984257c0cc5f6bd28bc6604070e415a74080e | 2,886 | py | Python | research/cv/SiamFC/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/SiamFC/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/SiamFC/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... | 53.444444 | 119 | 0.717256 |
213e34cb13068d70e7b5532f5425ba41b997ceed | 290 | py | Python | CareerTinderServer/CareerTinder/take_picture.py | sarojaerabelli/HVGS | 86ec3d2de496540ca439c40f4a0c58c47aa181cf | [
"MIT"
] | 1 | 2016-09-18T16:40:27.000Z | 2016-09-18T16:40:27.000Z | CareerTinderServer/CareerTinder/take_picture.py | sarojaerabelli/HVGS | 86ec3d2de496540ca439c40f4a0c58c47aa181cf | [
"MIT"
] | null | null | null | CareerTinderServer/CareerTinder/take_picture.py | sarojaerabelli/HVGS | 86ec3d2de496540ca439c40f4a0c58c47aa181cf | [
"MIT"
] | null | null | null | from django.http import HttpResponse
from django.template import loader
# Create your views here.
def index(request):
template = loader.get_template('CareerTinder/photo.html')
context = {
'name': 'John Doe'
}
return HttpResponse(template.render(context, request))
| 24.166667 | 61 | 0.713793 |
2c30afe7016ad7f65a6d58d8e759567b8c9effd4 | 1,196 | py | Python | 2-resources/_PYTHON/code-examples-master/mysql/python/insert-batch-generated-mysql.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_PYTHON/code-examples-master/mysql/python/insert-batch-generated-mysql.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_PYTHON/code-examples-master/mysql/python/insert-batch-generated-mysql.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-11-05T07:48:26.000Z | 2021-11-05T07:48:26.000Z | import datetime
import random
import MySQLdb
host="192.168.1.1"
user="root"
password="password"
dbname="db1"
db = MySQLdb.connect(host, user, password, dbname)
names = ['Ruan', 'Stefan', 'James', 'Peter', 'Silver', 'Frank', 'Michelle', 'Samantha', 'Jennifer']
surnames = ['Smith', 'Jacobs', 'James', 'Phillips', 'Ande... | 34.171429 | 147 | 0.643813 |
2592eed5871464ed2318da8239a28c017c8bccb4 | 3,668 | py | Python | Packs/CarbonBlackDefense/Integrations/CarbonBlackEndpointStandard/CarbonBlackEndpointStandard_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CarbonBlackDefense/Integrations/CarbonBlackEndpointStandard/CarbonBlackEndpointStandard_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CarbonBlackDefense/Integrations/CarbonBlackEndpointStandard/CarbonBlackEndpointStandard_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | def create_client():
from CarbonBlackEndpointStandard import Client
client = Client(base_url='example.com',
verify=False,
proxies=1234,
api_secret_key="api_secret_key",
api_key="api_key",
policy_api_key="policy_a... | 32.75 | 106 | 0.643948 |
d38f12c4c8811183ef7a55e25f11bb03c6fc2d67 | 1,377 | py | Python | SECCON/2020/Quals/mlml/env/run.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | SECCON/2020/Quals/mlml/env/run.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | SECCON/2020/Quals/mlml/env/run.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | #!/usr/bin/env python3.7
import sys
import os
import binascii
import re
import subprocess
import signal
def handler(x, y):
sys.exit(-1)
signal.signal(signal.SIGALRM, handler)
signal.alarm(30)
def is_bad_str(code):
code = code.lower()
# I don't like these words :)
for s in ['__', 'open', 'read', '.'... | 20.552239 | 126 | 0.557008 |
6cbb7052657301d79cf766483dfeac9bd78ae95b | 751 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/solutions/ex08_add_one.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/solutions/ex08_add_one.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/solutions/ex08_add_one.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
def add_one(digits):
if len(digits) == 0:
raise ValueError("must be a valid non empty array / list")
result = []
# laufe von hinten nach vorne und addiere, prüfe auf Überlauf
overflow = 1
for current_d... | 22.088235 | 66 | 0.58988 |
2cc56038b8baef6210c6e6e358e1a7e32ff38c44 | 4,370 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/scripts/venn_gchart.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/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/scripts/venn_gchart.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/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/scripts/venn_gchart.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | #!/usr/bin/env python
"""
Given 3 files, creates a 3-way Venn diagram of intersections using the Google \
Chart API; see :mod:`pybedtools.contrib.venn_maker` for more flexibility.
The values in the diagram assume:
* unstranded intersections
* no features that are nested inside larger features
"""
import argp... | 31.438849 | 79 | 0.578032 |
1aa6462f64c7c52a3510b2b683cd50e0dd89da85 | 45,095 | py | Python | twitter_listener/gttm/db/postgres.py | MahdiFarnaghi/gtm | adbec372786262607291f901a444a0ebe9e98b48 | [
"Apache-2.0"
] | null | null | null | twitter_listener/gttm/db/postgres.py | MahdiFarnaghi/gtm | adbec372786262607291f901a444a0ebe9e98b48 | [
"Apache-2.0"
] | null | null | null | twitter_listener/gttm/db/postgres.py | MahdiFarnaghi/gtm | adbec372786262607291f901a444a0ebe9e98b48 | [
"Apache-2.0"
] | null | null | null | import json
from copy import copy
from datetime import datetime, timedelta
from sqlalchemy.sql.elements import collate
from sqlalchemy.sql.expression import null
import sqlalchemy_utils
from geoalchemy2 import Geometry
from sqlalchemy import Column
from sqlalchemy import Integer, String, BigInteger, DateTime
from sqlal... | 47.922423 | 172 | 0.516133 |
2004966a8866c7a4b46bb8df7725b17e88f44294 | 931 | py | Python | src/onegov/election_day/views/election_compound/mandate_allocation.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/election_compound/mandate_allocation.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/election_compound/mandate_allocation.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.ballot import ElectionCompound
from onegov.core.security import Public
from onegov.election_day import ElectionDayApp
from onegov.election_day.layouts import ElectionCompoundLayout
from onegov.election_day.utils.election import get_party_results
from onegov.election_day.utils.election import get_party_resul... | 30.032258 | 72 | 0.749731 |
646847a9a09eac9470d153be8de1edf52a9f17c6 | 1,129 | py | Python | 20-hs-redez-sem/groups/02-unionDir/filesystem-redez-server/net/server.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-server/net/server.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-server/net/server.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | import socket
from net import client_list, client
from browser import unionpath
class Server:
def __init__(self):
self.unionpath = unionpath.Unionpath()
self.Port = 65184
self.server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.server_socket.setsockopt(socket.SOL... | 34.212121 | 80 | 0.605846 |
0384c817bbe187f51a48de4462202096bdd390b7 | 11,383 | py | Python | MAIN/STM32F405_C/NORMAL/history/V28/PXSensor.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | MAIN/STM32F405_C/NORMAL/history/V28/PXSensor.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | MAIN/STM32F405_C/NORMAL/history/V28/PXSensor.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | import gc
from micropython import const
from SX1239 import RF_COMING_DATA_SIZE
OPEN_SCENE_SHOW_TIME = const(2500)
CLOSING_TIME = const(10000)
CLOSE_SCENE_SHOW_TIME = const(1000)
MAX_SEAT_NUMBER = const(33)
PXHUB_ESTIMATED_LIFETIME = const(1788) #day
RF_DATA_SIZE ... | 55.79902 | 744 | 0.622595 |
0390d80c188da696e4a2545288f0ca2e304d0c61 | 297 | py | Python | Online-Judges/DimikOJ/Python/04-divisor.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | 3 | 2021-06-15T01:19:23.000Z | 2022-03-16T18:23:53.000Z | Online-Judges/DimikOJ/Python/04-divisor.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | Online-Judges/DimikOJ/Python/04-divisor.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | for i in range(int(input())):
number = int(input())
print("Case "+str(i+1)+":", end="")
devi = number
for j in range(1, number+1, 1):
divided = number / j
divided_int = int(divided)
if divided - divided_int == 0:
print("",j, end="")
print()
| 27 | 39 | 0.505051 |
0394f105484f3b806a530010b196182939994f3f | 492 | py | Python | INBa/2015/SOSNOVY_M_S/task_2_26.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/SOSNOVY_M_S/task_2_26.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/SOSNOVY_M_S/task_2_26.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 2. Вариант 26.
# Напишите программу, которая будет выводить на экран наиболее понравившеесявам высказывание, автором которого является Марк Аврелий. Не забудьте о том,что автор должен быть упомянут на отдельной строке.
# Сосновый М.С.
# 21.02.2016
print("Хоть и 50 лет после института, все равно учишься, все ра... | 61.5 | 203 | 0.768293 |
ff0afaed16cdcf2cd85623684eed931b4579c3d6 | 3,509 | py | Python | research/cv/IRN/src/data/__init__.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/IRN/src/data/__init__.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/IRN/src/data/__init__.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... | 30.780702 | 78 | 0.630379 |
45859e48bf2fb742359ca3cfbb860d1e05590cdc | 2,938 | py | Python | official/cv/FCN8s/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/FCN8s/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/FCN8s/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.189873 | 88 | 0.668822 |
9271018ccc5309361fb8d6b36f993caf26abd8d0 | 1,982 | py | Python | beta_regularizer.py | ben-eysenbach/DDO | 3751e0a830814650dd8d965b9d9945d2d82def0e | [
"MIT"
] | 1 | 2021-11-17T04:45:21.000Z | 2021-11-17T04:45:21.000Z | beta_regularizer.py | ben-eysenbach/DDO | 3751e0a830814650dd8d965b9d9945d2d82def0e | [
"MIT"
] | null | null | null | beta_regularizer.py | ben-eysenbach/DDO | 3751e0a830814650dd8d965b9d9945d2d82def0e | [
"MIT"
] | 1 | 2021-02-28T16:37:34.000Z | 2021-02-28T16:37:34.000Z | import tensorflow as tf
import numpy as np
import tensorflow.keras.backend as K
from tensorflow.keras.layers import Layer
import scipy.special
class BetaRegularization(Layer):
def __init__(self, alpha, beta, **kwargs):
super(BetaRegularization, self).__init__(**kwargs)
self.supports_masking = True... | 36.036364 | 120 | 0.614531 |
a612a9b62afee5d9dafb778c84d652fa9d37f095 | 493 | py | Python | manager.py | pushyzheng/docker-oj-web | 119abae3763cd2e53c686a320af7f4f5af1f16ca | [
"MIT"
] | 2 | 2019-06-24T08:34:39.000Z | 2019-06-27T12:23:47.000Z | manager.py | pushyzheng/docker-oj-web | 119abae3763cd2e53c686a320af7f4f5af1f16ca | [
"MIT"
] | null | null | null | manager.py | pushyzheng/docker-oj-web | 119abae3763cd2e53c686a320af7f4f5af1f16ca | [
"MIT"
] | null | null | null | # encoding:utf-8
from flask_script import Manager, Server, Shell
from flask_migrate import Migrate, MigrateCommand
from app import db
from app import app
manager = Manager(app)
migrate = Migrate(app, db)
def make_shell_context():
return dict(app=app, db=db)
manager.add_command('db', MigrateCommand)
manager.add... | 24.65 | 69 | 0.766734 |
a68fd96b5f9ce582be4a13aaa0db5dc1a461006e | 1,328 | py | Python | task_3/rng_simulation.py | christopher-besch/bwinf39 | e5394b37894a56608312057d179029d8a5df98fd | [
"MIT"
] | 1 | 2021-01-04T15:16:44.000Z | 2021-01-04T15:16:44.000Z | task_3/rng_simulation.py | christopher-besch/bwinf39 | e5394b37894a56608312057d179029d8a5df98fd | [
"MIT"
] | null | null | null | task_3/rng_simulation.py | christopher-besch/bwinf39 | e5394b37894a56608312057d179029d8a5df98fd | [
"MIT"
] | null | null | null | import random
from typing import List
def play_rng(player1: int, player2: int, skill_levels: List[int]) -> int:
"""
player1 and player2 play RNG against each other
the skill level of a player determines the number of marbles in the urn
return the winner
"""
skill_level1 = skill_level... | 30.883721 | 76 | 0.646837 |
5bb30fc36f900d4d342ca79742a69a0ff73e9ef9 | 986 | py | Python | src/train.py | afranck64/benzlim | b8a3087cfe093ed9700ba92799aaeed17f1dd92f | [
"Apache-2.0"
] | null | null | null | src/train.py | afranck64/benzlim | b8a3087cfe093ed9700ba92799aaeed17f1dd92f | [
"Apache-2.0"
] | null | null | null | src/train.py | afranck64/benzlim | b8a3087cfe093ed9700ba92799aaeed17f1dd92f | [
"Apache-2.0"
] | null | null | null | """train.py - manage the whole training"""
import os
import logging
from .dao import (CSVDAO, DBManager, StationDAO)
from .compat import printf
from .config import Configuration
class Trainer(object):
@staticmethod
def train(force_train=False):
config = Configuration.get_instance()
#TODO War... | 29.878788 | 103 | 0.693712 |
5bd855f719100508372c739ef52bba0ffea7f0c5 | 6,723 | py | Python | frappe-bench/apps/erpnext/erpnext/utilities/user_progress_utils.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/utilities/user_progress_utils.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/utilities/user_progress_utils.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import frappe, erpnext
import json
from frappe import _
from frappe.utils import flt
from erpnext.setup.doctype.setup_progress.setup_progress import update_domain_actions, get_domain_actions_... | 28.367089 | 114 | 0.678566 |
f366782f283235a803ceacb23d89e031e7425420 | 91 | py | Python | gemtown/gems/apps.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | gemtown/gems/apps.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | 5 | 2020-09-04T20:13:39.000Z | 2022-02-17T22:03:33.000Z | gemtown/gems/apps.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class GemsConfig(AppConfig):
name = 'gemtown.gems'
| 15.166667 | 33 | 0.747253 |
f37643fb0613a72b690c86694587c4994cc2ec44 | 105 | py | Python | api/admin.py | nts2pd/MovieRaterApp | 60c3c1f19e5c10cedca89a12f7ec746f275bbcbf | [
"MIT"
] | null | null | null | api/admin.py | nts2pd/MovieRaterApp | 60c3c1f19e5c10cedca89a12f7ec746f275bbcbf | [
"MIT"
] | null | null | null | api/admin.py | nts2pd/MovieRaterApp | 60c3c1f19e5c10cedca89a12f7ec746f275bbcbf | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Movie, Rating
admin.site.register([Movie, Rating])
| 21 | 36 | 0.790476 |
f3c44a34eac470bc5c91c5ffe244ed795328cb95 | 1,115 | py | Python | Simple Wave Analysis/structureUseage.py | washingtonxr/OpenAlgorithm | e1898e36dead0c79b23e054587d92f378c5e8b10 | [
"Apache-2.0"
] | null | null | null | Simple Wave Analysis/structureUseage.py | washingtonxr/OpenAlgorithm | e1898e36dead0c79b23e054587d92f378c5e8b10 | [
"Apache-2.0"
] | null | null | null | Simple Wave Analysis/structureUseage.py | washingtonxr/OpenAlgorithm | e1898e36dead0c79b23e054587d92f378c5e8b10 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import sys
class MyClass():
def __init__(self, name=""):
self.name = name
self.data_dic = {}
self.index = -1
class Struct():
def __init__(self, contents, name, message, status, num=-1):
self.contents = contents
self.name = name
... | 28.589744 | 79 | 0.599103 |
ca7338245d38d194f89b058e64b9ef8500823f6f | 3,271 | py | Python | crawler/FundCompanyListCrawler.py | macroxu/FundAnalysis | bc94f271fae5df6971aae37b873b97973d25b1c8 | [
"Apache-2.0"
] | null | null | null | crawler/FundCompanyListCrawler.py | macroxu/FundAnalysis | bc94f271fae5df6971aae37b873b97973d25b1c8 | [
"Apache-2.0"
] | null | null | null | crawler/FundCompanyListCrawler.py | macroxu/FundAnalysis | bc94f271fae5df6971aae37b873b97973d25b1c8 | [
"Apache-2.0"
] | null | null | null | # the crawler
# get and parse the page of fund company list
# parse and save company name and detail url
from urllib import request
from bs4 import BeautifulSoup
from bs4.element import Tag
import json
import os
from utils.FileManager import FileManager
import pathlib
from FundCompanyCrawler import *
class... | 31.152381 | 95 | 0.606237 |
ca91a970bf0262894b3c7f28605ce6d96730d385 | 5,836 | py | Python | Calliope-Rennspiel/Python/ki-trainieren-sklearn.py | rao003/ki-in-schulen | ec7e69da6d728ce6480711b45cea0aef7796b14b | [
"MIT"
] | 10 | 2021-05-27T15:08:45.000Z | 2022-03-01T17:21:24.000Z | Calliope-Rennspiel/Python/ki-trainieren-sklearn.py | telekom/ki-in-schulen | ec7e69da6d728ce6480711b45cea0aef7796b14b | [
"MIT"
] | null | null | null | Calliope-Rennspiel/Python/ki-trainieren-sklearn.py | telekom/ki-in-schulen | ec7e69da6d728ce6480711b45cea0aef7796b14b | [
"MIT"
] | 3 | 2021-04-08T12:44:30.000Z | 2021-06-21T08:20:59.000Z | #
# ki-trainieren-sklearn.py$
#
# (C) 2020, Christian A. Schiller, Deutsche Telekom AG
#
# Deutsche Telekom AG and all other contributors /
# copyright owners license this file to you under the
# MIT License (the "License"); you may not use this
# file except in compliance with the License.
# You may obtain a copy of t... | 36.704403 | 112 | 0.706991 |
0488232a8df9eb6b04d1c4c233c7cfb0e936f7c4 | 144 | py | Python | aoc2020/day_16/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_16/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_16/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | from .part_1 import Solution as Part1
class Solution(Part1):
expected = None
def solve(self) -> any:
return super().solve2()
| 16 | 37 | 0.645833 |
6d430749a392e352539fd3b3545c3a7022781134 | 11,600 | py | Python | CS305/assignment7/rdt/rdt.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 22 | 2018-08-07T06:55:10.000Z | 2021-06-12T02:12:19.000Z | CS305/assignment7/rdt/rdt.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 28 | 2020-03-04T23:47:22.000Z | 2022-02-26T18:50:00.000Z | CS305/assignment7/rdt/rdt.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 4 | 2019-11-09T15:41:26.000Z | 2021-10-10T08:56:57.000Z | from udp import UDPsocket, timeout # import provided class
from enum import Enum, unique
import logging
logging.basicConfig(level=logging.INFO,
format='%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s')
WINDOWS_SIZE = 8
MAX_LENGTH = 1024
MAX_TIMEOUT_RETRY = 5
SYN = 0b0100... | 29.820051 | 103 | 0.528448 |
edee5a40702d1a18b4de112b992bec7963334922 | 3,214 | py | Python | examples/multimodal/layoutxlm/compare.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/multimodal/layoutxlm/compare.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/multimodal/layoutxlm/compare.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | import sys
import paddle
import torch
import numpy as np
sys.path.insert(0, "../../../")
def get_input_demo(platform="paddle", device="cpu"):
info = paddle.load("fake_input_paddle_xlm.data")
# imgs = np.random.rand(info["input_ids"].shape[0], 3, 224, 224).astype(np.float32)
# info["image"] = paddle.to_te... | 34.55914 | 87 | 0.667082 |
fcd1ea289f8e444aa6750c6e53c3be85b3a76fe0 | 5,424 | py | Python | test/gen_proto.py | wybosys/nnt.logic.jvm | 249aedd7f8dd03d94dcb0780b91dadacd4b25270 | [
"BSD-3-Clause"
] | 2 | 2020-09-22T11:01:31.000Z | 2020-09-22T11:12:29.000Z | test/gen_proto.py | wybosys/nnt.logic.jvm | 249aedd7f8dd03d94dcb0780b91dadacd4b25270 | [
"BSD-3-Clause"
] | null | null | null | test/gen_proto.py | wybosys/nnt.logic.jvm | 249aedd7f8dd03d94dcb0780b91dadacd4b25270 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import argparse
import os
import platform
import re
import subprocess
from typing import List
import psutil
# 使用python生成
# python3 -m grpc_tools.protoc --python_out=py --grpc_python_out=py -I../src/main/proto dubbo/test.proto dao.proto
# 使用protoc生成
# protoc --proto_path=../src/main/proto --pl... | 31.352601 | 185 | 0.601586 |
fce402d7b41aab9ced4bd6a504e854b17930d8d9 | 1,603 | py | Python | python/en/archive/dropbox/miscellaneous_python_files/new 2.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/miscellaneous_python_files/new 2.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/miscellaneous_python_files/new 2.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | INFO:tensorflow:Confusion Matrix:
[[363 0 1 0 1 0 0 0 0 4 2 0]
[ 1 49 46 17 12 41 33 54 33 10 15 60]
[ 7 8 275 10 6 6 51 14 0 4 5 11]
[ 2 16 6 151 12 73 16 2 9 2 11 106]
[ 6 1 1 9 182 12 21 6 15 26 49 22]
[ 7 7 4 14 4 25... | 48.575758 | 70 | 0.444167 |
1e042d137203df61e5d0db664e82485c7ecb5a25 | 478 | py | Python | python/test/building_good_tests/test_apple.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/test/building_good_tests/test_apple.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/test/building_good_tests/test_apple.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """Avoid multiple asserts"""
import pytest
class Apple:
color = "Green"
worms = ["worm"]
def is_sweet(self):
return False
@pytest.fixture(scope="class")
def apple():
return Apple()
class TestApple:
def test_is_sweet(self, apple):
assert apple.is_sweet()
... | 17.703704 | 40 | 0.594142 |
1eb35155874f5f2b3339427dc441a887058fe5b2 | 3,032 | py | Python | ExponentialSmoothing/Holt_Winters.py | lance52587/MachineLearningNote | 0184f8de178990ee31ace2a43809830874313697 | [
"MIT"
] | 37 | 2018-06-06T05:58:54.000Z | 2022-02-21T04:49:54.000Z | ExponentialSmoothing/Holt_Winters.py | YYangjlu/MachineLearningNote | d34a9b57af3b2c6f276d14c2a7a3dccadb585421 | [
"MIT"
] | null | null | null | ExponentialSmoothing/Holt_Winters.py | YYangjlu/MachineLearningNote | d34a9b57af3b2c6f276d14c2a7a3dccadb585421 | [
"MIT"
] | 35 | 2018-10-01T16:12:34.000Z | 2022-02-21T03:35:33.000Z | # -*- coding: utf-8 -*-
# @Date : 2017-04-11 21:27:00
# @Author : Alan Lau (rlalan@outlook.com)
# @Language : Python3.5
import numpy as np
from matplotlib import pyplot as plt
def exponential_smoothing(alpha, s):
s2 = np.zeros(s.shape)
s2[0] = s[0]
for i in range(1, len(s2)):
s2[i] = alpha*... | 35.255814 | 89 | 0.651715 |
1ebcc698b6d7bda036f6e3afcccd2eafed411ce6 | 509 | py | Python | Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IncidentsCheck_Widget_NumberofErrors/IncidentsCheck_Widget_NumberofErrors_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IncidentsCheck_Widget_NumberofErrors/IncidentsCheck_Widget_NumberofErrors_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IncidentsCheck_Widget_NumberofErrors/IncidentsCheck_Widget_NumberofErrors_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
from IncidentsCheck_Widget_NumberofErrors import main
@pytest.mark.parametrize('list_, expected', [
([{'Contents': '4@7,5@7,44@3,45@3,46@3,47@3,85@48,86@48'}], 8),
([{'Contents': ''}], 0),
([{}], 0)
])
def test_script(mocker, list_, expected):
mocker.patch.o... | 26.789474 | 70 | 0.67387 |
bf4e224b4e686432e36f573421af4df678c51edb | 1,225 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch07_recursion_advanced/ex03_lcs_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch07_recursion_advanced/ex03_lcs_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch07_recursion_advanced/ex03_lcs_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
import pytest
from ch07_recursion_advanced.solutions.ex03_lcs import lcs, lcs_optimized, lcs_from_start
@pytest.mark.parametrize("value1, value2, expected",
[("ABCE", "ZACEF", "ACE"),
... | 32.236842 | 89 | 0.564082 |
bf624375ee87bf29b2e055129dbfd9e608763b77 | 783 | py | Python | Lab3/Task[7-9].py | ValeriyMartsyshyn/HelloPython | badcf85bc54e889eed0286b420e5cabe68da8572 | [
"MIT"
] | null | null | null | Lab3/Task[7-9].py | ValeriyMartsyshyn/HelloPython | badcf85bc54e889eed0286b420e5cabe68da8572 | [
"MIT"
] | null | null | null | Lab3/Task[7-9].py | ValeriyMartsyshyn/HelloPython | badcf85bc54e889eed0286b420e5cabe68da8572 | [
"MIT"
] | null | null | null | #task7
def func():
a = input("Enter a text sliting a new row with \\n: ")
print("Number of characters in the text: ", len(a))
print("Number of words in the text: ", len(a.split()))
print("Number of lines in the text ", len(a.split('\\n')))
func()
#task8
def func():
N = input("Enter a number of mon... | 21.162162 | 62 | 0.526181 |
78c7235b762942e9265cf1c2904359871f17a563 | 256 | py | Python | Versuch2/map.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | null | null | null | Versuch2/map.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | null | null | null | Versuch2/map.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | 1 | 2022-01-06T12:47:53.000Z | 2022-01-06T12:47:53.000Z | import random
# -------- dead -------- #
a = 75
b = 25
rand = 0
aa = 0
bb = 0
for x in range(0, 2000):
rand = random.randint(1, a + b)
if (rand >= a):
aa += 1
if(rand < a):
bb += 1
print("A " + str(aa))
print("B " + str(bb)) | 13.473684 | 35 | 0.433594 |
159684b1a018bbfcfc881909e181890a9ce93c0d | 6,628 | py | Python | minesweeper.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | minesweeper.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | minesweeper.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | from tkinter import Tk, Canvas, Button
from random import randint, random
from PIL import ImageTk, Image
import time
POCET = 50
# POCET_MIN = 10
VELIKOST = int(500/POCET)
OBTIZNOST = 0.1
BARVY = [
"#000",
"blue",
"green",
"red",
"#007",
"brown",
"#A4A",
"yellow",
"black"
]
flaged =... | 28.324786 | 77 | 0.496982 |
e56bb873944d0112e22b875176503b8af0e7e4aa | 971 | py | Python | ISTp/2014/GOMAN_D_V/task_4_45.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | ISTp/2014/GOMAN_D_V/task_4_45.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | ISTp/2014/GOMAN_D_V/task_4_45.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 4. Вариант 45
# Напишите программу, которая выводит имя, под которым скрывается Борис
# Николаевич Кампов. Дополнительно необходимо вывести область интересов
# указанной личности, место рождения, годы рождения и смерти (если человек умер),
# вычислить возраст на данный момент (или момент смерти). Для хранения ... | 34.678571 | 89 | 0.753862 |
dab3b8277942f4f49ec4049e1f117d284f3ed9a2 | 1,793 | py | Python | research/cv/dcgan/mindspore_hub_conf.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/dcgan/mindspore_hub_conf.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/dcgan/mindspore_hub_conf.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... | 39.844444 | 103 | 0.717234 |
9739dbad9a66b83243ad3197a60a0a4c95a704e2 | 639 | py | Python | admin-tutorial/AdminFields/exclude_/admin.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 5 | 2020-07-14T07:48:10.000Z | 2021-12-20T21:20:10.000Z | admin-tutorial/AdminFields/exclude_/admin.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 7 | 2021-03-26T03:13:38.000Z | 2022-03-12T00:42:03.000Z | admin-tutorial/AdminFields/exclude_/admin.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 1 | 2021-02-16T07:04:25.000Z | 2021-02-16T07:04:25.000Z | from django.contrib import admin
from .models import ArticleModel
# Register your models here.
class ArticleModelAdmin(admin.ModelAdmin):
# 备注:
# author 字段有两个隐藏参数: null=False 和 blank=False;
# null = False 数据库不允许该字段为空值(None, '')
# null = True 数据库允许字段为空值
#
# blank = False ... | 29.045455 | 71 | 0.658842 |
8ae318f805c896afcab0f5031b950d494de00d16 | 4,084 | py | Python | zencad/geom/unify_ops.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/geom/unify_ops.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/geom/unify_ops.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | from zencad.geom.shape import Shape, nocached_shape_generator, shape_generator
from zencad.lazifier import *
from zencad.geom.boolops import _union
from OCC.Core.TopAbs import TopAbs_WIRE, TopAbs_EDGE, TopAbs_VERTEX, TopAbs_FACE, TopAbs_SOLID, TopAbs_SHELL, TopAbs_COMPOUND, TopAbs_COMPSOLID
from OCC.Core.BRep import B... | 27.046358 | 143 | 0.650343 |
a9be73afd67057e7b8ffed2ee8c2997711cd189a | 3,272 | py | Python | envs/rpg/rpg.py | etigerstudio/zilong-on-fire | 5144a471b2d39ea38a47d394e648de00dd13cd8b | [
"MIT"
] | 2 | 2021-01-07T01:10:49.000Z | 2022-01-21T09:37:16.000Z | envs/rpg/rpg.py | etigerstudio/zilong-on-fire | 5144a471b2d39ea38a47d394e648de00dd13cd8b | [
"MIT"
] | null | null | null | envs/rpg/rpg.py | etigerstudio/zilong-on-fire | 5144a471b2d39ea38a47d394e648de00dd13cd8b | [
"MIT"
] | null | null | null | from envs.base import BaseEnvironment
from envs.rpg.world import World
from envs.rpg.levels.teasure_tutorial import TreasureTutorial
from envs.rpg.entities.actor import Actor
from enum import Enum
import numpy as np
class RPGEnvironment(BaseEnvironment):
STATE_PADDING = 2
class Action(Enum):
"""动作枚举"... | 35.182796 | 117 | 0.649756 |
a9c5e78133d3b7b29f086babb2fb8c11e13f1bb9 | 2,762 | py | Python | test_protocol/utils/pair_analysis.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 1,329 | 2021-01-13T07:06:30.000Z | 2022-03-31T07:23:39.000Z | test_protocol/utils/pair_analysis.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 115 | 2021-01-13T10:42:57.000Z | 2022-03-28T03:57:52.000Z | test_protocol/utils/pair_analysis.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 351 | 2021-01-13T07:21:00.000Z | 2022-03-29T14:11:39.000Z | """
@author: Jun Wang
@date: 20201016
@contact: jun21wangustc@gmail.com
"""
import sys
import numpy as np
sys.path.append('/export/home/wangjun492/wj_armory/faceX-Zoo/face_recognition/face_evaluation')
from utils.feature_extractor import FeatureHandler
def sort_key(image_score):
return image_score[-1]
def get_sc... | 40.617647 | 134 | 0.728096 |
a9f7d4bc1068e1f95c29ce5795338c0c7fab9312 | 1,065 | py | Python | results/xlights/city-backend/xlight/models.py | Rebstorm/dthack17 | 41cea4804fefe6a397114056c43d17c54b8e979d | [
"MIT"
] | null | null | null | results/xlights/city-backend/xlight/models.py | Rebstorm/dthack17 | 41cea4804fefe6a397114056c43d17c54b8e979d | [
"MIT"
] | null | null | null | results/xlights/city-backend/xlight/models.py | Rebstorm/dthack17 | 41cea4804fefe6a397114056c43d17c54b8e979d | [
"MIT"
] | null | null | null | """Django default module for model definition"""
from django.db import models
class TrafficLight(models.Model):
"""Traffic light object"""
beaconid = models.CharField(max_length=100)
"""iBeacon ID corresponding to traffic light"""
location_street = models.CharField(max_length=100)
"""... | 31.323529 | 56 | 0.664789 |
e79ac5de5a35a85e4c87184cf33ad06686c8c4a0 | 638 | py | Python | tkapil-2021-02-16.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | tkapil-2021-02-16.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | tkapil-2021-02-16.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | from tkinter import Tk, Canvas
from PIL import ImageTk, Image
from random import randint
window = Tk()
window.config(cursor="none")
canvas = Canvas(window, width=800, height=600)
canvas.pack()
prokop = ImageTk.PhotoImage(file="images/prokopAne.png")
cursorFile = ImageTk.PhotoImage(file="images/cursor.png")
for i in ... | 24.538462 | 66 | 0.700627 |
41313036b10c7a143d329f946f74533d8262c0da | 204 | py | Python | Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 21/21.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | 50-Python-Exercises/Exercises/Exercise 21/21.py | kuwarkapur/Hacktoberfest-2022 | efaafeba5ce51d8d2e2d94c6326cc20bff946f17 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | 50-Python-Exercises/Exercises/Exercise 21/21.py | kuwarkapur/Hacktoberfest-2022 | efaafeba5ce51d8d2e2d94c6326cc20bff946f17 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | #Filter out values of equal or greater than 2
#Note that for Python 2 you will have to use iteritems
d = {"a": 1, "b": 2, "c": 3}
d = dict((key, value) for key, value in d.items() if value <= 1)
print(d)
| 34 | 64 | 0.647059 |
68e03c9bdb6fdf4dd9fad4162fab5a8a55c6d502 | 1,196 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v5_0/update_projects.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v5_0/update_projects.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v5_0/update_projects.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import frappe
def execute():
# convert milestones to tasks
frappe.reload_doctype("Project")
frappe.reload_doc("projects", "doctype", "project_task")
frappe.reload_doctype("Task")
frappe.reload_doc("projects", "doctype", "task_depends_on")
frappe.rel... | 34.171429 | 83 | 0.701505 |
ec0f170cb73408de392d6cce0643411daa6d6c30 | 899 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch02_math/solutions/ex05_prime_pairs_first.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch02_math/solutions/ex05_prime_pairs_first.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch02_math/solutions/ex05_prime_pairs_first.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
from solutions.ch02_math.solutions.ex04_primes import calc_primes_up_to
def main():
def is_twin_pair(n):
return is_prime(n) and is_prime(n + 2)
def is_cousin_pair(n):
return is_prime(n) and is_prime(n + 4... | 21.926829 | 72 | 0.63515 |
ec55ba6c904c8be1c1000217822d7c78f82b3830 | 2,773 | py | Python | solutions/ctirg/webserver/src/indexer/tools.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | 1 | 2021-04-06T06:13:20.000Z | 2021-04-06T06:13:20.000Z | solutions/ctirg/webserver/src/indexer/tools.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | solutions/ctirg/webserver/src/indexer/tools.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | import logging
from common.config import MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PWD, MYSQL_DB
import pymysql
import os
def connect_mysql():
try:
# conn = pymysql.connect(host="127.0.0.1",user="root",port=3306,password="123456",database="mysql", local_infile=True)
conn = pymysql.connect(host=MYS... | 30.811111 | 135 | 0.611251 |
6b94590b1e947179b1ac14cfd25f2bffb5b3d8c8 | 700 | py | Python | other_files/prependpc.py | Oidlichtnwoada/MiMi | 06bdee6903673ec4d4fdb3a27ee8f65af2cb2f32 | [
"MIT"
] | 1 | 2019-12-27T10:42:40.000Z | 2019-12-27T10:42:40.000Z | other_files/prependpc.py | Oidlichtnwoada/MiMi | 06bdee6903673ec4d4fdb3a27ee8f65af2cb2f32 | [
"MIT"
] | null | null | null | other_files/prependpc.py | Oidlichtnwoada/MiMi | 06bdee6903673ec4d4fdb3a27ee8f65af2cb2f32 | [
"MIT"
] | null | null | null | import sys
if(len(sys.argv) != 3):
print("USAGE: python3 prependpc inpath outpath")
else:
infile_path = sys.argv[1]
outfile_path = sys.argv[2]
outfile = open(outfile_path,"w+")
with open(infile_path,"r") as infile:
content = infile.readlines()
outfile.write("LEGEND: \n (REGISTER) = x... | 35 | 129 | 0.551429 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.