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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d27c6a2e2b92e87530838d4b7ea192f129dfd615 | 11,538 | py | Python | Packs/BmcHelixRemedyForce/Scripts/BMCHelixRemedyforceCreateIncident/BMCHelixRemedyforceCreateIncident.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/BmcHelixRemedyForce/Scripts/BMCHelixRemedyforceCreateIncident/BMCHelixRemedyforceCreateIncident.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/BmcHelixRemedyForce/Scripts/BMCHelixRemedyforceCreateIncident/BMCHelixRemedyforceCreateIncident.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import * # noqa: E402 lgtm [py/polluting-import]
import json
from typing import Dict, Any
DEFAULT_ARGS = [
"category_id",
"client_id",
"queue_id",
"staff_id",
"status_id",
"urgency_id",
"template_id",
"description",
"due_date",... | 35.069909 | 118 | 0.640666 |
73ef739bf131c035c81cd3012cf210d7d1212934 | 2,408 | py | Python | controller/testmain.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | 1 | 2021-06-15T08:59:02.000Z | 2021-06-15T08:59:02.000Z | controller/testmain.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | controller/testmain.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null |
# testmain.py
# hhoegl, 2021-02-16
import sys
import time
import RPi.GPIO as GPIO
import mcp23017
import atexit
import smbus
def cleanup():
print("cleanup")
output_write(0x00)
def output_write(wert):
'''Each bit in wert is 0 (inactive) or 1 (active). The output driver
is driven active low, i.e. w... | 22.296296 | 76 | 0.583056 |
83a0b03afcba31a6b25ea133b931d71ea68cb352 | 446 | py | Python | docs/API/Users_Guide/scripts/Download_Files.py | ZhenyuZ/gdc-docs | f024d5d4cd86dfa2c9e7d63850eee94d975b7948 | [
"Apache-2.0"
] | 67 | 2016-06-09T14:11:51.000Z | 2022-03-16T07:54:44.000Z | docs/API/Users_Guide/scripts/Download_Files.py | ZhenyuZ/gdc-docs | f024d5d4cd86dfa2c9e7d63850eee94d975b7948 | [
"Apache-2.0"
] | 19 | 2016-06-21T15:51:11.000Z | 2021-06-07T09:22:20.000Z | docs/API/Users_Guide/scripts/Download_Files.py | ZhenyuZ/gdc-docs | f024d5d4cd86dfa2c9e7d63850eee94d975b7948 | [
"Apache-2.0"
] | 32 | 2016-07-15T01:24:19.000Z | 2019-03-25T10:42:28.000Z | import requests
import json
import re
file_id = "b658d635-258a-4f6f-8377-767a43771fe4"
data_endpt = "https://api.gdc.cancer.gov/data/{}".format(file_id)
response = requests.get(data_endpt, headers = {"Content-Type": "application/json"})
response_head_cd = response.headers["Content-Disposition"]
file_name = re.find... | 26.235294 | 83 | 0.751121 |
49acdee3b2bb89794862191065483a30c81381c0 | 3,170 | py | Python | simple-tensorflow-demo/4.demos/2.forwardPropagationTest.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | 1 | 2019-07-05T03:42:17.000Z | 2019-07-05T03:42:17.000Z | simple-tensorflow-demo/4.demos/2.forwardPropagationTest.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | null | null | null | simple-tensorflow-demo/4.demos/2.forwardPropagationTest.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | 1 | 2019-06-24T05:56:55.000Z | 2019-06-24T05:56:55.000Z | """
急切执行 eager execution
该模式下, 一旦被调用就会立即执行, 省去了构造graph并传给session执行的过程, 无需Session.run(), tf2.0后会当成默认模式.
开启:
tf.enable_eager_execution(), 一旦开启, 在这个python会话中就无法关闭.
禁用:
https://www.tensorflow.org/api_docs/python/tf/disable_eager_execution
v1.13 -> tf.disable_eager_execution()
https://www.tensorflow.org/versions/r2.0/api_do... | 27.094017 | 93 | 0.584227 |
49b81c845cc492641f95d1f08d1f7a3dde3bad2a | 7,841 | py | Python | python/python_backup/PRAC_PYTHON/Jimut.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/Jimut.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/Jimut.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | """Creating an AI named Chatbox """
"""The list of functions or operations it can perform ..."""
import os
def clear():
os.system('cls') # on windows
def print1():
for i1 in range(60):
print("--",end ='')
i1=i1+1
def factors(n):
print("* Factors of ",n," are : ",end=" ")
for i in range(1,n):
i... | 24.735016 | 129 | 0.579518 |
b70d8009741a4931c7f8c459e473d23928222113 | 470 | py | Python | leetcode/067-Add-Binary/AddBinary_003.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/067-Add-Binary/AddBinary_003.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/067-Add-Binary/AddBinary_003.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution(object):
def addBinary(self, a, b):
"""
:type a: str
:type b: str
:rtype: str
"""
res = ''
tc = 0
for i in range(max(len(a), len(b))):
ta = int(a[-i - 1]) if i < len(a) else 0
tb = int(b[-i - 1]) if i < len(b) els... | 26.111111 | 52 | 0.370213 |
b7f2ef2e0f282894e87965bdedccea8b0d611d99 | 2,345 | py | Python | checks/certificate_test.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 19 | 2018-04-20T11:03:41.000Z | 2022-01-12T20:58:56.000Z | checks/certificate_test.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 160 | 2018-04-05T16:12:59.000Z | 2022-03-01T13:01:27.000Z | checks/certificate_test.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 8 | 2018-11-05T13:07:57.000Z | 2021-06-11T11:46:43.000Z | from checks import certificate
from checks.config import Config
import unittest
from pprint import pprint
class TestCertificateChecker(unittest.TestCase):
def test_google(self):
"""Load cert from a site that should work"""
url = 'https://www.google.com/'
config = Config(urls=[url])
... | 37.222222 | 77 | 0.626013 |
4d4e3e50ed85249219504d271b63b51e6d3af3e5 | 170 | py | Python | backend/api/authentication.py | saulhappy/drf | 5e62da54cdf0f0fead742c891d34e7eacd488a1b | [
"MIT"
] | null | null | null | backend/api/authentication.py | saulhappy/drf | 5e62da54cdf0f0fead742c891d34e7eacd488a1b | [
"MIT"
] | null | null | null | backend/api/authentication.py | saulhappy/drf | 5e62da54cdf0f0fead742c891d34e7eacd488a1b | [
"MIT"
] | null | null | null | from ast import keyword
from rest_framework.authentication import TokenAuthentication as BaseTokenAuth
class TokenAuthentication(BaseTokenAuth):
keyword = "Bearer"
| 24.285714 | 78 | 0.835294 |
1500a981ec5abb0fce915e3c541d75218e81a0c4 | 1,832 | py | Python | pyramid-creator/app/persistance/minio_wrapper.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-11-04T17:06:07.000Z | 2021-11-04T17:06:07.000Z | pyramid-creator/app/persistance/minio_wrapper.py | JamesNeumann/learning-by-annotations | c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad | [
"MIT"
] | 21 | 2021-11-01T10:13:56.000Z | 2021-12-02T10:02:13.000Z | pyramid-creator/app/persistance/minio_wrapper.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-12-16T18:20:55.000Z | 2021-12-16T18:20:55.000Z | from typing import Any
from app.persistance.custom_minio_client import MinioClient
class MinioWrapper:
hint_bucket = "hint-images"
task_bucket = "task-images"
info_bucket = "info-images"
pyramid_bucket = "pyramids"
def __init__(self):
self.minio_client = MinioClient()
... | 33.309091 | 85 | 0.657205 |
12c296af44c4cf471ef5d07cb4b243587ca62eb5 | 405 | py | Python | BITs/2014/Kozlov_A_D/task_1_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Kozlov_A_D/task_1_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Kozlov_A_D/task_1_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 1. Вариант 11.
#Напишите программу, которая будет сообщать род деятельности и псевдоним под которым скрывается Алессандро Филипели. После вывода информации программа должна дожидаться пока пользователь нажмет Enter для выхода.
#Козлов А.Д.
#21.02.2016
input("Алессандро Филипепи более известен под псевдонимом Б... | 67.5 | 211 | 0.832099 |
fbf670d5bb9d5c76e9492594c13ce26187df104f | 8,221 | py | Python | transonic/analyses/extast.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | transonic/analyses/extast.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | transonic/analyses/extast.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | """Extended AST with CommentLine nodes
======================================
"""
from io import StringIO
from copy import deepcopy
import gast
from gast.ast3 import GAstToAst3
from transonic.analyses import beniget
class CommentLine(gast.AST):
"""New AST node representing a comment line"""
_fields = ("s... | 24.687688 | 80 | 0.566111 |
3f2bd615083698cfafef27d917cd1146ca59c97a | 1,373 | py | Python | andinopy/base_devices/rfid_keyboard/rfid_keyboard_serial.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | andinopy/base_devices/rfid_keyboard/rfid_keyboard_serial.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | andinopy/base_devices/rfid_keyboard/rfid_keyboard_serial.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | # _ _ _
# / \ _ __ __| (_)_ __ ___ _ __ _ _
# / _ \ | '_ \ / _` | | '_ \ / _ \| '_ \| | | |
# / ___ \| | | | (_| | | | | | (_) | |_) | |_| |
# /_/ \_\_| |_|\__,_|_|_| |_|\___/| .__/ \__, |
# |_| |___/
# by Jakob Groß
import threading
f... | 31.204545 | 79 | 0.568099 |
18d733096b68aab63f1e6451177c75120c556d9c | 4,578 | py | Python | collector.py | jxtrbtk/bindex | 8feee8ff9db371d9e691e10ea70467446c0412b1 | [
"MIT"
] | 1 | 2022-03-09T20:44:33.000Z | 2022-03-09T20:44:33.000Z | collector.py | jxtrbtk/bindex | 8feee8ff9db371d9e691e10ea70467446c0412b1 | [
"MIT"
] | null | null | null | collector.py | jxtrbtk/bindex | 8feee8ff9db371d9e691e10ea70467446c0412b1 | [
"MIT"
] | null | null | null | import requests
import json
import time
import os
import pandas as pd
import random
import sys
import traceback
import datetime
import lib.api
import lib.market
import lib.wallet
STORAGE = os.path.join("collector","data")
## sudo docker build -t collector:v0.2 docker/collector/.
## sudo docker run -it -v collecto... | 32.7 | 122 | 0.583879 |
7a15cb957b359e3009991175e6de85ef61c2eec5 | 4,846 | py | Python | heise_preisvgl/crawler.py | uhadler/heise_preisvgl | 8c82247ae73a34e0de3231a9369ecf2ef61d0cb9 | [
"Apache-2.0"
] | null | null | null | heise_preisvgl/crawler.py | uhadler/heise_preisvgl | 8c82247ae73a34e0de3231a9369ecf2ef61d0cb9 | [
"Apache-2.0"
] | null | null | null | heise_preisvgl/crawler.py | uhadler/heise_preisvgl | 8c82247ae73a34e0de3231a9369ecf2ef61d0cb9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Dec 14 19:45:03 2020
@author: Uwe
"""
from bs4 import BeautifulSoup
import requests, time, getpass
class Crawler():
def __init__(self, url=None, max_price=None, sleep_time = 40, alert_by_mail=False):
"""Constructor"""
self.PREFIX_ = "https://www.h... | 39.080645 | 107 | 0.481841 |
830c6ed93ff5b6cb51ff46647a78c54d1c314979 | 3,274 | py | Python | test/test_npu/test_network_ops/test_tensor_equal.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_tensor_equal.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_tensor_equal.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 42.519481 | 77 | 0.639279 |
8329e4c7afc248052da5150aceffef332681db4e | 1,145 | py | Python | Theories/DataStructures/BinaryTree/PopulatingNextRightPointersEachNodeII/populate_next_right_pointers_each_node_ii.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Theories/DataStructures/BinaryTree/PopulatingNextRightPointersEachNodeII/populate_next_right_pointers_each_node_ii.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Theories/DataStructures/BinaryTree/PopulatingNextRightPointersEachNodeII/populate_next_right_pointers_each_node_ii.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | # Definition for a Node.
class Node:
def __init__(self, val: int = 0, left: 'Node' = None, right: 'Node' = None, next: 'Node' = None):
self.val = val
self.left = left
self.right = right
self.next = next
# Recursive
def connect(root: 'Node') -> 'Node':
node_level = {}
def po... | 25.444444 | 101 | 0.531004 |
7fd2877872a8f729d895eb53b70f9e1048eac9bf | 1,014 | py | Python | SoSe-21/Uebung-7/A2-Produktionsliste-2.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | 1 | 2022-03-23T09:40:39.000Z | 2022-03-23T09:40:39.000Z | SoSe-21/Uebung-7/A2-Produktionsliste-2.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | SoSe-21/Uebung-7/A2-Produktionsliste-2.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | # Initialisierung der Stückliste
stueckliste = []
# Funktionsdefinition
def teilehinzufuegen(bestandteil):
stueckliste.append(bestandteil)
print("Bitte erfassen Sie im Folgenden die Teile für die Stückliste des SpaceX Starship.")
# Nutzereingabe der Menge
korrekte_eingabe = False
while not korrekte_eingabe:
... | 32.709677 | 90 | 0.699211 |
a101fd7e5f5834f5b6801b6f1069a09cd9ec2db2 | 505 | py | Python | intermediate/docker-compose/flask-redis/app.py | nutstache/dockerlabs | acfb2b4e06e2c4092849be6dcc1f88038f64cfed | [
"MIT"
] | 2,521 | 2018-07-13T07:23:45.000Z | 2022-03-31T22:54:06.000Z | intermediate/docker-compose/flask-redis/app.py | nutstache/dockerlabs | acfb2b4e06e2c4092849be6dcc1f88038f64cfed | [
"MIT"
] | 171 | 2018-06-21T13:21:43.000Z | 2022-03-09T06:55:35.000Z | intermediate/docker-compose/flask-redis/app.py | nutstache/dockerlabs | acfb2b4e06e2c4092849be6dcc1f88038f64cfed | [
"MIT"
] | 1,250 | 2018-06-19T06:57:23.000Z | 2022-03-29T16:26:34.000Z | from flask import Flask, request, jsonify
from redis import Redis
app = Flask(__name__)
redis = Redis(host="redis", db=0, socket_timeout=5, charset="utf-8", decode_responses=True)
@app.route('/', methods=['POST', 'GET'])
def index():
if request.method == 'POST':
name = request.json['name']
... | 29.705882 | 91 | 0.60396 |
a14d235b8ce3d45fae41b20b10138905ab668568 | 70 | py | Python | dao/book.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | dao/book.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | dao/book.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding=utf-8 -*-
class book():
pass
| 10 | 22 | 0.542857 |
3d7d809fbfa72f759e65772ecafc1dbc70ee2b36 | 7,823 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/icx/test_icx_user.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/icx/test_icx_user.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/icx/test_icx_user.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # Copyright: (c) 2019, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collect... | 39.510101 | 129 | 0.609996 |
3da87087ef30970f076ba283bb2f50067e74967f | 54 | py | Python | WD/Cwiczenia/laLaSkrypt.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | 1 | 2020-02-29T14:38:33.000Z | 2020-02-29T14:38:33.000Z | WD/Cwiczenia/laLaSkrypt.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | null | null | null | WD/Cwiczenia/laLaSkrypt.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | null | null | null | refren="la la la la la"
print(refren.count("la"))
| 13.5 | 26 | 0.62963 |
62155b5e0e8f0caf5276cbc4e154bccb43471eee | 94 | py | Python | src/aijack/collaborative/fedavg/__init__.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 1 | 2022-03-17T21:17:44.000Z | 2022-03-17T21:17:44.000Z | src/aijack/collaborative/fedavg/__init__.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | null | null | null | src/aijack/collaborative/fedavg/__init__.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 2 | 2022-01-17T07:28:22.000Z | 2022-01-30T00:12:53.000Z | from .client import FedAvgClient # noqa: F401
from .server import FedAvgServer # noqa: F401
| 31.333333 | 46 | 0.765957 |
f3029579b4a365cda98373ee442abc0fd98ad7b9 | 754 | py | Python | source/pkgsrc/ham/uhd/patches/patch-lib_transport_nirio_lvbitx_process-lvbitx.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/ham/uhd/patches/patch-lib_transport_nirio_lvbitx_process-lvbitx.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/ham/uhd/patches/patch-lib_transport_nirio_lvbitx_process-lvbitx.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-lib_transport_nirio_lvbitx_process-lvbitx.py,v 1.1 2019/10/04 10:41:44 adam Exp $
Do not modify output path.
--- lib/transport/nirio/lvbitx/process-lvbitx.py.orig 2019-10-03 18:11:53.000000000 +0000
+++ lib/transport/nirio/lvbitx/process-lvbitx.py
@@ -30,7 +30,7 @@ if (len(args) < 1):
lvbitx_filenam... | 47.125 | 138 | 0.774536 |
b8af59aea2a885020217059bccb72c49e2c1b0c7 | 127 | py | Python | datenfinder/gui/admin.py | digitalfabrik/buergerinnendatenfinder | ff0a27b068f568e9e8c6a8a70b81251dbde0b7e6 | [
"Apache-2.0"
] | 2 | 2021-05-12T21:52:48.000Z | 2021-10-30T13:01:03.000Z | datenfinder/gui/admin.py | digitalfabrik/buergerinnendatenfinder | ff0a27b068f568e9e8c6a8a70b81251dbde0b7e6 | [
"Apache-2.0"
] | null | null | null | datenfinder/gui/admin.py | digitalfabrik/buergerinnendatenfinder | ff0a27b068f568e9e8c6a8a70b81251dbde0b7e6 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import CitizenDate
# Register your models here.
admin.site.register(CitizenDate)
| 25.4 | 32 | 0.826772 |
0c5810e04de00a8ccd48b34cadbc5bb4f2317112 | 1,933 | py | Python | Backend/models/cases.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 15 | 2020-04-24T20:18:11.000Z | 2022-01-31T21:05:05.000Z | Backend/models/cases.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 2 | 2021-05-19T07:15:09.000Z | 2022-03-07T08:29:34.000Z | Backend/models/cases.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 4 | 2020-04-27T16:20:13.000Z | 2021-02-23T10:39:42.000Z | import json
from db import db
class CasesAggregated(db.Model):
"""
Hospital data class
"""
__abstract__ = True
name = db.Column(db.String())
ids = db.Column(db.Integer, primary_key=True)
until = db.Column(db.String())
cases = db.Column(db.Integer())
deaths = db.Column(db.Integer(... | 26.479452 | 71 | 0.722711 |
3be8ee1abf859bd17b297e81301ec9e728753275 | 300 | py | Python | python/en/archive/books/jump2python/j2p-02_2_3-string_operations.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/books/jump2python/j2p-02_2_3-string_operations.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/books/jump2python/j2p-02_2_3-string_operations.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
jump2python-02_2_(3)-string_operations.py
P.46, 문자열 연산하기
"""
# 1. 문자열 더해서 연결하기 (Concatenation)
head = "Python"
tail = " is fun!"
print( head + tail )
# 2. 문자열 곱하기
a = "python"
print( a*2 )
# 3.문자열 곱하기 응용
print('='*50)
print('My program')
print('='*50) | 15.789474 | 42 | 0.566667 |
ce4f89fb9b856fa51232cdf3301bcd7b0b006601 | 88 | py | Python | backend/match4healthcare/constants/enum.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | 2 | 2020-03-28T13:56:39.000Z | 2020-03-29T10:16:12.000Z | backend/match4healthcare/constants/enum.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | 76 | 2020-03-27T21:53:04.000Z | 2020-03-30T20:27:43.000Z | backend/match4healthcare/constants/enum.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | null | null | null | from enum import Enum
class Environment(Enum):
DEVELOPMENT = 0
PRODUCTION = 1
| 12.571429 | 24 | 0.693182 |
ce54cbd3351fba25bbb1b37dd4ef0452092c830f | 2,459 | py | Python | SoSe-21/Code-Vorlesungen/VL-4/Zufallsgenerator-Spiel-3.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | 1 | 2022-03-23T09:40:39.000Z | 2022-03-23T09:40:39.000Z | SoSe-21/Code-Vorlesungen/VL-4/Zufallsgenerator-Spiel-3.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | SoSe-21/Code-Vorlesungen/VL-4/Zufallsgenerator-Spiel-3.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | # Zufallsgenerator Spiel
# v.0.2.
# Jonas Reinhardt
import random
random.seed()
# Initialisieren der Schleife
spielen = "JA"
while spielen.upper() == "JA":
# Werte generieren
a = random.randint(1,10)
b = random.randint(1,10)
# Lösung berechnen
loesungAddition = a + b
loesungMultiplikation = ... | 35.128571 | 90 | 0.569744 |
0c6d24767e8b9894927b78bc5cd15e46328a8844 | 1,382 | py | Python | marsyas-vamp/marsyas/scripts/Python/icme2011_dtw_matrix.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/Python/icme2011_dtw_matrix.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/Python/icme2011_dtw_matrix.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Run pitchdtw on all .txt files in this directory, and generate a
# matrix from this
#
import sys
import os
import datetime
import commands
import re
if len(sys.argv) != 3:
print "Usage: icme2001_dtw_matrix.py path output_file"
exit(0);
#
# The path that we're going to look for text fil... | 21.261538 | 83 | 0.603473 |
0b6f4d1581fedc388c8428d5cd70e2729313c901 | 2,173 | py | Python | aiotftp/iofile.py | JulianOrteil/aiotftp | 67026f2c43429ee2649d769188fb8121ded6be80 | [
"MIT"
] | null | null | null | aiotftp/iofile.py | JulianOrteil/aiotftp | 67026f2c43429ee2649d769188fb8121ded6be80 | [
"MIT"
] | null | null | null | aiotftp/iofile.py | JulianOrteil/aiotftp | 67026f2c43429ee2649d769188fb8121ded6be80 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Utilities related to file operations."""
import os
from io import TextIOWrapper
from pathlib import Path
from typing import Optional
from .netascii import NETASCII
def ensure_path(path: str):
path = os.fsdecode(path).lstrip('./')
abspath = Path.cwd() / path
try:
abs... | 23.117021 | 89 | 0.610676 |
e7f02c49496ba36b6dac272056ab67a643021171 | 861 | py | Python | server/bumf/api/serializers/account.py | bumfiness/bumf | 71c404c0a8f804b8f0e127df3de6d8916db4c660 | [
"Apache-2.0"
] | 6 | 2017-01-07T17:59:46.000Z | 2017-02-10T13:19:46.000Z | server/bumf/api/serializers/account.py | rixx/bumf | 71c404c0a8f804b8f0e127df3de6d8916db4c660 | [
"Apache-2.0"
] | null | null | null | server/bumf/api/serializers/account.py | rixx/bumf | 71c404c0a8f804b8f0e127df3de6d8916db4c660 | [
"Apache-2.0"
] | null | null | null | from rest_framework import serializers
from bumf.core.models import RealAccount, VirtualAccount
class BudgetAccountSerializer(serializers.ModelSerializer):
class Meta:
model = VirtualAccount
fields = (
# Model fields
'id', 'name', 'project', 'parent', 'comment',
... | 22.657895 | 70 | 0.583043 |
65233b94cd572304a13740e75ed341ce7a7d744a | 15,900 | py | Python | python/primary/wdf.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | 1 | 2020-07-29T16:43:46.000Z | 2020-07-29T16:43:46.000Z | python/primary/wdf.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | null | null | null | python/primary/wdf.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
from __future__ import print_function
import os
try:
from urllib import urlencode, quote_plus
except ImportError:
from urllib.parse import urlencode, quote_plus
try:
import urllib2 as wdf_urllib
from cookielib import CookieJar
except ImportError:
import urllib.... | 26.722689 | 240 | 0.592013 |
3338e70d18d42a7cc475e3f641d0e015f1d91486 | 1,310 | py | Python | 7-assets/past-student-repos/Whiteboard-Pairing-master/ProductOfAllOtherNumbers/model_solution.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/Whiteboard-Pairing-master/ProductOfAllOtherNumbers/model_solution.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/Whiteboard-Pairing-master/ProductOfAllOtherNumbers/model_solution.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # How would you solve this problem if division was allowed?
def getProductsOfAllIntsExceptAtIndex(intArray):
if len(intArray) < 2:
return ('Getting the product of numbers at other indices requires at least 2 numbers')
productsOfAllIntsExceptAtIndex = [0]*len(intArray)
# For each integer, we find the pr... | 40.9375 | 143 | 0.735878 |
684c14d7a91c8de975b02cea73fbbf783cb3f289 | 388,836 | py | Python | 0day-Xploit-main/FoxRsf.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | 0day-Xploit-main/FoxRsf.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | 0day-Xploit-main/FoxRsf.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | import sys
import requests , re , datetime
from multiprocessing.dummy import Pool
from colorama import Fore
from colorama import Style
from pprint import pprint
from colorama import init
init(autoreset=True)
fr = Fore.RED
fc = Fore.CYAN
fw = Fore.WHITE... | 97.648418 | 742 | 0.535925 |
f0baedf191ffd605234c455f598a9e94dba3065d | 1,950 | py | Python | official/gnn/gcn/preprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/gnn/gcn/preprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/gnn/gcn/preprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 40.625 | 104 | 0.712308 |
ac9eb1beed7137f8bf06b814d9bf5b6335498e19 | 1,458 | py | Python | Algorithms/Graph_theory/roads_and_libraries.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Graph_theory/roads_and_libraries.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Graph_theory/roads_and_libraries.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from collections import defaultdict
class Graph(object):
def __init__(self):
self.nodes = set()
self.edges = defaultdict(list)
def add_node(self, value):
self.nodes.add(value)
def add_edge(self, from_node, to_node):
self.edges[to_node].append(from_n... | 28.038462 | 66 | 0.547325 |
96ee19f4a4e57c30327ff408f533074bc90fa1b0 | 437 | py | Python | PMIa/2015/ANDROS_D_A/task_6_2.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2015/ANDROS_D_A/task_6_2.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2015/ANDROS_D_A/task_6_2.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 6.Вариант 2.
#Создайте игру, в которой компьютер загадывает название одного из двенадцати созвездий, входящих в зодиакальный круг, а игрок должен его угадать.
#Andros D.A.
#28.04.2016
import random
sozvezdia=["Oven","Telec","Bliznetsy","Rak","Lev","Deva","Vesy","Skorpion","Strelec","Kozerog","Vodoley","Riby"]
... | 36.416667 | 145 | 0.727689 |
50912bef0385e69e9c278cd7f7e7d2f7ec700608 | 2,069 | py | Python | Base/server.py | AlanDeveloper/Flask-Mail | f2d9245f4614d99645b480a861b311f56f274af1 | [
"MIT"
] | null | null | null | Base/server.py | AlanDeveloper/Flask-Mail | f2d9245f4614d99645b480a861b311f56f274af1 | [
"MIT"
] | null | null | null | Base/server.py | AlanDeveloper/Flask-Mail | f2d9245f4614d99645b480a861b311f56f274af1 | [
"MIT"
] | null | null | null |
import psycopg2
class ServerDAO():
def connect(self):
return psycopg2.connect("dbname=ds2Mail user=postgres host=localhost")
def login(self, email, password):
conn = self.connect()
cur = conn.cursor()
try:
cur.execute('SELECT * FROM "user" WHERE email = %s and pass... | 24.05814 | 101 | 0.501692 |
50f2bf57d957dfd62ea4c25e1dff07837a9d366a | 10,412 | py | Python | Packs/KasperskySecurityCenter/Integrations/KasperskySecurityCenter/KasperskySecurityCenter_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/KasperskySecurityCenter/Integrations/KasperskySecurityCenter/KasperskySecurityCenter_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/KasperskySecurityCenter/Integrations/KasperskySecurityCenter/KasperskySecurityCenter_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import io
import json
import pytest
from KasperskySecurityCenter import (GROUP_FIELDS, HOST_DETAILED_FIELDS,
HOST_FIELDS, Client, add_group,
delete_group, get_host, get_policy,
list_groups,
... | 31.551515 | 109 | 0.648675 |
50f917ff20f372e95473d78742de809a66a3de46 | 392 | py | Python | doc/devmode.py | gonium/EVSE-Car-Simulator | 16e10f521eee962967f66a43f7e356b7e21f1a08 | [
"MIT"
] | 32 | 2017-09-19T15:32:02.000Z | 2022-03-19T20:47:54.000Z | doc/devmode.py | alekseyvm/EVSE-Car-Simulator | 16e10f521eee962967f66a43f7e356b7e21f1a08 | [
"MIT"
] | 4 | 2017-10-22T09:40:33.000Z | 2018-05-08T13:47:52.000Z | doc/devmode.py | alekseyvm/EVSE-Car-Simulator | 16e10f521eee962967f66a43f7e356b7e21f1a08 | [
"MIT"
] | 7 | 2018-01-01T13:53:34.000Z | 2022-03-10T09:21:06.000Z | #!/usr/bin/env python
import sys
if __name__ == '__main__':
try:
from livereload import Server, shell
except ImportError as error:
print("Cannot import livereload: please run ")
print(" pip install livereload")
sys.exit(-1)
print("Open http://localhost:5500/EVSE-Car-Simulator.html")
server = ... | 24.5 | 61 | 0.673469 |
e895d034c74307a2b34b426d92a5c4ff15baeb51 | 17,018 | py | Python | content/tutorials/jsonimport/generate/script/python/migration.py | chris-jan-trapp/easydb-documentation | 7a597a755e11b460f39e0f154d7db038a4e02cb8 | [
"MIT"
] | 3 | 2017-09-06T14:31:13.000Z | 2021-01-06T17:14:30.000Z | content/tutorials/jsonimport/generate/script/python/migration.py | chris-jan-trapp/easydb-documentation | 7a597a755e11b460f39e0f154d7db038a4e02cb8 | [
"MIT"
] | 10 | 2018-03-20T14:14:56.000Z | 2022-03-08T10:23:00.000Z | content/tutorials/jsonimport/generate/script/python/migration.py | chris-jan-trapp/easydb-documentation | 7a597a755e11b460f39e0f154d7db038a4e02cb8 | [
"MIT"
] | 4 | 2019-02-21T15:01:14.000Z | 2022-03-08T10:23:14.000Z | #!/usr/bin/python
# coding=utf8
import sqlite3
import json
import datetime
import sys
# import the helper functions from easydb-migration-tools
# sys.path.append('../easydb-migration-tools/json_migration/')
sys.path.append('/home/pf/migration/easydb-migration/easydb-migration-tools/json_migration/') # xxx
import migr... | 30.718412 | 121 | 0.514338 |
e8c3f11fe668e06434bfa004dbf2980e117324bf | 28,547 | py | Python | MoPulseGen/Rpeaks2EcgPpg_gen_model.py | tushar-agarwal2909/MoPulseGen | a0edeaf67f956e7db27e70f07e47d2f992bcb6f3 | [
"BSD-2-Clause"
] | null | null | null | MoPulseGen/Rpeaks2EcgPpg_gen_model.py | tushar-agarwal2909/MoPulseGen | a0edeaf67f956e7db27e70f07e47d2f992bcb6f3 | [
"BSD-2-Clause"
] | null | null | null | MoPulseGen/Rpeaks2EcgPpg_gen_model.py | tushar-agarwal2909/MoPulseGen | a0edeaf67f956e7db27e70f07e47d2f992bcb6f3 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Feb 14 20:47:57 2020
@author: agarwal.270a
"""
import numpy as np
import glob
import matplotlib.pyplot as plt
from scipy import io
from scipy import signal as sig
from scipy.signal import detrend
#from pathlib import Path
from simulator_for_CC import Simulator
... | 44.32764 | 153 | 0.523628 |
d7187df6e5236a75857b9a6af2de95222356551c | 8,615 | py | Python | Packs/HackerOne/Integrations/HackerOne/test_data/input_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/HackerOne/Integrations/HackerOne/test_data/input_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/HackerOne/Integrations/HackerOne/test_data/input_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | MESSAGES = {
"Common_ERROR_MESSAGE": "Unable to retrieve the data based on arguments.",
"PAGE_SIZE": "{} is an invalid value for page size. Page size must be between 1 and 100.",
"PAGE_NUMBER": "{} is an invalid value for page number. Page number must be between 1 and int32.",
"NO_RECORDS_FOUND": "No {}... | 61.978417 | 125 | 0.585839 |
d784a1b1828747846994c23f816d6aa55f29bd31 | 1,265 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v4_0/update_custom_print_formats_for_renamed_fields.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/v4_0/update_custom_print_formats_for_renamed_fields.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v4_0/update_custom_print_formats_for_renamed_fields.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import re
def execute():
# NOTE: sequence is important
fields_list = (
("amount", "base_amount"),
("ref_rate", "price_list_rate"),
... | 34.189189 | 104 | 0.668775 |
ad9e70bdc70bcb69017cc5266e06a6aeb0efa17b | 813 | py | Python | examples/sync_slider_text.py | xinetzone/dash-tests | cd4526caa2f9d906915c31370b3487bdcef92aa4 | [
"Apache-2.0"
] | 1 | 2022-03-01T07:38:32.000Z | 2022-03-01T07:38:32.000Z | examples/sync_slider_text.py | xinetzone/dash-tests | cd4526caa2f9d906915c31370b3487bdcef92aa4 | [
"Apache-2.0"
] | 12 | 2021-07-13T12:33:36.000Z | 2021-07-14T05:25:19.000Z | examples/sync_slider_text.py | xinetzone/dash-book | 1f624e87e2aa02c9931318918df969e44bdd2c07 | [
"Apache-2.0"
] | null | null | null | from dash.dependencies import Input, Output
from dash import dcc, html
from dash import callback_context
from app import app
layout = html.Div(
[
dcc.Slider(
id="slider-circular", min=0, max=20,
marks={i: str(i) for i in range(21)},
value=3
),
dcc.Input(... | 25.40625 | 75 | 0.611316 |
7e2c691aae0df2149b6443fdb5fb790698d693ca | 2,099 | py | Python | pkgs/all-pkgs/s/salt/remove-modules.py | ccce/nixpkgs | e647f8a7f34254de0145c35950c1d6f1c93ea3da | [
"MIT"
] | 64 | 2016-01-06T09:46:17.000Z | 2022-03-23T03:07:34.000Z | pkgs/all-pkgs/s/salt/remove-modules.py | ccce/nixpkgs | e647f8a7f34254de0145c35950c1d6f1c93ea3da | [
"MIT"
] | 93 | 2016-01-02T18:27:38.000Z | 2021-03-15T16:50:09.000Z | pkgs/all-pkgs/s/salt/remove-modules.py | ccce/nixpkgs | e647f8a7f34254de0145c35950c1d6f1c93ea3da | [
"MIT"
] | 13 | 2016-01-15T19:03:55.000Z | 2021-06-25T16:54:54.000Z | import os
import fnmatch
import shutil
whitelisted_modules = [
'__init__',
'aggregation',
'aliases',
'args',
'async',
'atomicfile',
'cache',
'cloud',
'cmd_json',
'cmd_yaml',
'cmd_yamlex',
'cmdmod',
'compat',
'config',
'context',
'core',
'crypt',
'data',
'defaults',
'decorators',... | 15.781955 | 62 | 0.585993 |
0e3c8fbfe4aeb3d9916fa6b960998175c342c53b | 423 | py | Python | python/deep_learning/exp/sound.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/deep_learning/exp/sound.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/deep_learning/exp/sound.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import pyttsx
engine = pyttsx.init()
#engine.say('Greetings!')
#engine.say('How are you today?')
#engine.runAndWait()
#engine.say('Hello I\'m Jimut\'s AI')
#engine.runAndWait()
engine.say('Amlyan is a hero ')
#engine.runAndWait()
#engine.say('Let\'s make AI shit after sem - 3')
#engine.runAndWait()
engine.say('Bakki ..... | 26.4375 | 48 | 0.6974 |
70f467c6b0329410623cc8bd951cb2f94e85bad9 | 2,521 | py | Python | andinopy/base_devices/rfid_keyboard/rfid_keyboard_i2c.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | andinopy/base_devices/rfid_keyboard/rfid_keyboard_i2c.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | andinopy/base_devices/rfid_keyboard/rfid_keyboard_i2c.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | # _ _ _
# / \ _ __ __| (_)_ __ ___ _ __ _ _
# / _ \ | '_ \ / _` | | '_ \ / _ \| '_ \| | | |
# / ___ \| | | | (_| | | | | | (_) | |_) | |_| |
# /_/ \_\_| |_|\__,_|_|_| |_|\___/| .__/ \__, |
# |_| |___/
# by Jakob Groß
import time
import... | 32.74026 | 101 | 0.581515 |
2aec85f17183ff2d9f698f80cc46976efd63f497 | 2,356 | py | Python | year_2/prog_base_sem1_cw/app/main/forms.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | year_2/prog_base_sem1_cw/app/main/forms.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | 21 | 2020-03-24T16:26:04.000Z | 2022-02-18T15:56:16.000Z | year_2/prog_base_sem1_cw/app/main/forms.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, TextAreaField, SubmitField, DateField, FileField
from wtforms.validators import DataRequired, Length
class EditProfileForm(FlaskForm):
name = StringField('Имя', validators=[
Length(1, 64, message='Слишком большое имя, сожалеем об этом.')
... | 37.396825 | 122 | 0.713073 |
6303e3b2b0be2fd34032720632e44839cb5e6742 | 1,852 | py | Python | comp/twosigma/LongestChain/LongestChain_002.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | comp/twosigma/LongestChain/LongestChain_002.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | comp/twosigma/LongestChain/LongestChain_002.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # Bugs to be fixed. See the 2nd testcase
def longestChain(words):
lendict, lenlist = {}, []
# build the dictory where
# the key is the length of a word,
# and the value is the set of words with the length
for word in words:
l = len(word)
if len(word) in lendict:
lendict[... | 28.060606 | 84 | 0.518359 |
6333b4ee1002ae7d332b363e435ea1372bb7f07c | 1,760 | py | Python | servers/docker-python/mongo.py | veaba/ncov | 6019f6b90761fd39363f8a7182ffcee22b9cb7ed | [
"MIT"
] | 288 | 2020-01-21T06:12:03.000Z | 2022-01-16T08:03:13.000Z | servers/docker-python/mongo.py | kayan12/ncov | 90f828208d1eea7cc20e933da41638f328e0411d | [
"MIT"
] | 26 | 2020-01-20T05:07:31.000Z | 2022-03-12T00:24:56.000Z | servers/docker-python/mongo.py | kayan12/ncov | 90f828208d1eea7cc20e933da41638f328e0411d | [
"MIT"
] | 48 | 2020-01-22T09:05:59.000Z | 2022-01-16T08:03:11.000Z | # 连接mongo数据库
import pymongo
from config import MONGO_IP, MONGO_PORT, MONGO_USER, MONGO_PASSWORD, MONGO_AUTH_MECHAISM, MONGO_DB
import json
from bson import json_util, son
def mongo_connect():
client = pymongo.MongoClient(
host=MONGO_IP,
port=MONGO_PORT,
username=MONGO_USER,
passwor... | 22 | 98 | 0.665909 |
2deb58014c49ad97da113d7a1e5c7b62ab3d3fba | 13,859 | py | Python | pypi_installer/sbtab/validatorSBtab.py | derHahn/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 4 | 2015-02-20T09:20:10.000Z | 2018-02-05T10:54:10.000Z | pypi_installer/sbtab/validatorSBtab.py | tlubitz/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 80 | 2018-04-13T13:46:24.000Z | 2022-02-16T16:01:46.000Z | python/web_version/modules/validatorSBtab.py | tlubitz/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 6 | 2018-06-06T19:55:32.000Z | 2021-09-30T15:16:40.000Z | #!/usr/bin/env python
"""
SBtab Validator
===============
Validator for SBtab files.
See specification for further information.
"""
try:
from . import SBtab
from . import misc
except:
import SBtab
import misc
import re
import collections
import sys
import os
class SBtabError(Exception):
'''
... | 41.618619 | 119 | 0.52493 |
fa8cb1bdb504e8d27acccc2ba18550bb3649a4db | 6,715 | py | Python | Packs/Carbon_Black_Enterprise_Response/Scripts/CBLiveGetFile/CBLiveGetFile.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Carbon_Black_Enterprise_Response/Scripts/CBLiveGetFile/CBLiveGetFile.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Carbon_Black_Enterprise_Response/Scripts/CBLiveGetFile/CBLiveGetFile.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import time
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
secTimeout = 120
# find sensor ID
if not demisto.get(demisto.args(), 'ip') and not demisto.get(demisto.args(), 'hostname'):
demisto.results({'Type': entryTypes['error'], 'ContentsFormat': formats['text'],
... | 45.993151 | 114 | 0.53522 |
35b87d78d5c6ce58766896e5541d94e5311fe0f3 | 666 | py | Python | loesungen/chapter06/import-iris-xml-mixed.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | 2 | 2021-09-20T06:16:41.000Z | 2022-01-17T14:24:43.000Z | loesungen/chapter06/import-iris-xml-mixed.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | loesungen/chapter06/import-iris-xml-mixed.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | from xml.etree import ElementTree
doc = ElementTree.parse('iris-mixed.xml')
root = doc.getroot()
irises = []
for iris in root.findall('iris'):
iris_type = iris.attrib['type']
sepal = iris.find('sepal')
sepal_length = sepal.attrib['length']
sepal_width = sepal.attrib['width']
petal = iris.find('peta... | 26.64 | 46 | 0.654655 |
ea982dbd3578dc22bc16ead9f00cfe1f085f796f | 111 | py | Python | Python/Random/Tech-With-Tim/Python-Socket-Programming/server.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Random/Tech-With-Tim/Python-Socket-Programming/server.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Random/Tech-With-Tim/Python-Socket-Programming/server.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | import socket
import threading
PORT = 8888
SERVER = socket.gethostbyname(socket.gethostname())
print(SERVER)
| 13.875 | 51 | 0.792793 |
a4d5b4e582c3866d25cefb00e4e4a68b8fbdbe31 | 91 | py | Python | main.py | Dennis-89/Calculator | 0eab9f470dc4d2dbbf01e12316c440f71de1d325 | [
"MIT"
] | null | null | null | main.py | Dennis-89/Calculator | 0eab9f470dc4d2dbbf01e12316c440f71de1d325 | [
"MIT"
] | null | null | null | main.py | Dennis-89/Calculator | 0eab9f470dc4d2dbbf01e12316c440f71de1d325 | [
"MIT"
] | null | null | null | from kivy.app import App
meineAnwendung=App()
print(meineAnwendung)
meineAnwendung.run()
| 13 | 24 | 0.802198 |
76074a7a0c462ad7537ff3208c323df3f517f535 | 5,749 | py | Python | imwievaluation/questions.py | ESchae/IMWIEvaluation | 2fa661711b7b65cba25c1fa9ba69e09e75c7655f | [
"MIT"
] | null | null | null | imwievaluation/questions.py | ESchae/IMWIEvaluation | 2fa661711b7b65cba25c1fa9ba69e09e75c7655f | [
"MIT"
] | null | null | null | imwievaluation/questions.py | ESchae/IMWIEvaluation | 2fa661711b7b65cba25c1fa9ba69e09e75c7655f | [
"MIT"
] | 1 | 2019-10-19T10:11:17.000Z | 2019-10-19T10:11:17.000Z | from pylatex.utils import NoEscape
from imwievaluation.utils import clean_string
"""
Matrix --> several sub-questions and responses (responses are the same for each sub_question)
MatrixFivePoints --> mehrere sub-questions, responsesn sind '1', '2', '3', '4' und '5'
MultipleChoice --> keine sub-questions ( = []); Hä... | 34.220238 | 107 | 0.588972 |
5251fd6fdc10ac1b796d7924fe11f020afb60053 | 1,719 | py | Python | awsrun/common/protocol.py | eec289q-f21/stdsw | 93604a1b947e39496e6559982eea6d41c77d0204 | [
"MIT"
] | null | null | null | awsrun/common/protocol.py | eec289q-f21/stdsw | 93604a1b947e39496e6559982eea6d41c77d0204 | [
"MIT"
] | null | null | null | awsrun/common/protocol.py | eec289q-f21/stdsw | 93604a1b947e39496e6559982eea6d41c77d0204 | [
"MIT"
] | 1 | 2021-10-07T23:10:33.000Z | 2021-10-07T23:10:33.000Z | import json
from abc import ABC, abstractmethod
import objectfactory
from common.configuration import CmdConfig, WSConfig
from utils.Meta import reconcile_meta
class IMessage(ABC):
@abstractmethod
def flatten(self):
pass
class AWSMsg(reconcile_meta(objectfactory.Serializable, IMessage, ABC)):
de... | 22.038462 | 74 | 0.669575 |
bfed88155f134a1888b1ee119db4eaf307f17309 | 2,540 | py | Python | KnowledgeQuizTool/MillionHeroes/baiduSearch/process.py | JianmingXia/StudyTest | 66d688ad41bbce619f44359ea126ff07a923f97b | [
"MIT"
] | 26 | 2018-01-11T03:57:40.000Z | 2021-12-22T07:12:59.000Z | baiduSearch/process.py | wenxuefeng3930/MillionHeroesAssistant | c382e2685275d6b5d92d5b68fa9c515360e61f9e | [
"MIT"
] | 68 | 2020-09-05T04:22:49.000Z | 2022-03-25T18:47:08.000Z | baiduSearch/process.py | wenxuefeng3930/MillionHeroesAssistant | c382e2685275d6b5d92d5b68fa9c515360e61f9e | [
"MIT"
] | 10 | 2018-01-11T03:59:05.000Z | 2021-12-22T07:13:00.000Z | import requests
from bs4 import BeautifulSoup
# 定义返回的result类
class Result(object):
def __init__(self, r_index, r_title, r_abstract, show_url, r_url): # id似乎占用了内部名称,那就用index来代替吧
self.__index = r_index
self.__title = r_title
self.__abstract = r_abstract
self.__show_url = show_url
... | 25.918367 | 98 | 0.640945 |
0da4e42e146b4843ba68869ef09385ad39ab520a | 438 | py | Python | test/shops/TestSram.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | null | null | null | test/shops/TestSram.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 5 | 2020-01-18T21:10:46.000Z | 2020-01-25T20:58:19.000Z | test/shops/TestSram.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 2 | 2020-01-18T17:36:50.000Z | 2020-01-22T16:52:08.000Z | from Shops import shop_table
from test.TestBase import TestBase
class TestSram(TestBase):
def testUniqueOffset(self):
sram_ids = set()
for shop_name, shopdata in shop_table.items():
for x in range(3):
new = shopdata.sram_offset + x
with self.subTest(shop... | 31.285714 | 69 | 0.59589 |
21a6d72f332b43e03b3567f2926c797f890cd020 | 653 | py | Python | components/amp-utility/python/GPIO.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 4,538 | 2017-10-20T05:19:03.000Z | 2022-03-30T02:29:30.000Z | components/amp-utility/python/GPIO.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 1,088 | 2017-10-21T07:57:22.000Z | 2022-03-31T08:15:49.000Z | components/amp-utility/python/GPIO.py | willianchanlovegithub/AliOS-Things | 637c0802cab667b872d3b97a121e18c66f256eab | [
"Apache-2.0"
] | 1,860 | 2017-10-20T05:22:35.000Z | 2022-03-27T10:54:14.000Z | # * coding: UTF8 *
"""
=================================================================================================
"""
def open(type):
"""
打开并根据board.json配置实例
:param type: 对象类型
:returns: 0: 成功,其他: 失败
:raises OSError: EINVAL
"""
pass
def write(value):
"""
设置GPIO电平值,GPIO引脚为输出模式时可用
... | 13.604167 | 97 | 0.467075 |
df1d2c75728833042e7bbf9811d445d3296a64f0 | 392 | py | Python | lbry/lbry/wallet/network.py | mittalkartik2000/lbry-sdk | a07b17ec0c9c5d0a88bc730caf6ab955e0971b38 | [
"MIT"
] | null | null | null | lbry/lbry/wallet/network.py | mittalkartik2000/lbry-sdk | a07b17ec0c9c5d0a88bc730caf6ab955e0971b38 | [
"MIT"
] | 4 | 2020-10-27T21:53:05.000Z | 2022-02-11T03:10:54.000Z | lbry/lbry/wallet/network.py | braveheart12/lbry-sdk | dc709b468f9dce60d206161785def5c7ace2b763 | [
"MIT"
] | null | null | null | from torba.client.basenetwork import BaseNetwork
class Network(BaseNetwork):
def get_claims_by_ids(self, claim_ids):
return self.rpc('blockchain.claimtrie.getclaimsbyids', claim_ids)
def resolve(self, urls):
return self.rpc('blockchain.claimtrie.resolve', urls)
def claim_search(self, **... | 28 | 73 | 0.72449 |
df621e46af6f568f02cf4cdfa717f3c464bcbbbd | 375 | py | Python | Python/Exercícios_Python/054_detector_de_palíndromo.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/054_detector_de_palíndromo.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/054_detector_de_palíndromo.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""054 - Detector de Palíndromo
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1WoNOqT1Xis8-f7-msLiIu3U18heD62fc
"""
frase = input("Qual a frase? ").upper().replace(" ", "")
if frase == frase[::-1]:
print("A frase é um palí... | 26.785714 | 77 | 0.68 |
10f4e418cfd92dec43f75a89c200442ea5066891 | 363 | py | Python | models/hr_job_formation.py | aroodooteam/aro_hr | bf26f026593493486b4b5c13b26b9b47b9fe3825 | [
"BSD-2-Clause"
] | null | null | null | models/hr_job_formation.py | aroodooteam/aro_hr | bf26f026593493486b4b5c13b26b9b47b9fe3825 | [
"BSD-2-Clause"
] | null | null | null | models/hr_job_formation.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 HrJobFormation(models.Model):
_name = "hr.job.formation"
_description = "Formation requis pour le poste"
name = fields.Many2one(comodel_name='hr.employee.formation.module', string='Formation')
job_id = fields.Many2o... | 27.923077 | 91 | 0.710744 |
33759358e0a5f19e764b1ace3eb626c53271dd4a | 17,997 | py | Python | stock_dash.py | AtharvaKatre/Dash-StockAnalyzer | 113040ca00c6cc1e6357a0539727147be86da4c0 | [
"MIT"
] | 1 | 2021-07-05T19:30:56.000Z | 2021-07-05T19:30:56.000Z | stock_dash.py | AtharvaKatre/Dash-StockAnalyzer | 113040ca00c6cc1e6357a0539727147be86da4c0 | [
"MIT"
] | null | null | null | stock_dash.py | AtharvaKatre/Dash-StockAnalyzer | 113040ca00c6cc1e6357a0539727147be86da4c0 | [
"MIT"
] | null | null | null | import pandas as pd
import plotly.graph_objs as go
import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
import dash_table
from dash.dependencies import Input, Output
# -----------------------------------------Reading CSVs---------------------------... | 38.87041 | 158 | 0.535423 |
d57400cf197cd1f288fe42a1fe07b6efa2eac12e | 746 | py | Python | elements/python/5/8/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/5/8/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/5/8/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | import sys
DIGIT_FOR_VALUE = '0123456789ABCDEF'
VALUE_FOR_DIGIT = {d: i for i, d in enumerate(DIGIT_FOR_VALUE)}
def from_base(s, b=10):
x = 0
for d in s:
if d not in VALUE_FOR_DIGIT:
raise Exception('unknown digit')
v = VALUE_FOR_DIGIT[d]
if v >= b:
raise Exce... | 18.195122 | 63 | 0.5563 |
984851bc2b81e7a1799828db6471adc4350c0068 | 1,963 | py | Python | Interview Preparation Kits/Interview Preparation Kit/Stacks and Queues/Castle on the Grid/castle_grid.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Interview Preparation Kits/Interview Preparation Kit/Stacks and Queues/Castle on the Grid/castle_grid.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Interview Preparation Kits/Interview Preparation Kit/Stacks and Queues/Castle on the Grid/castle_grid.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the minimumMoves function below.
def bfs(grid, start, goal):
m = len(grid)
n = len(grid[0])
visited = {}
queue = []
queue.append(start)
visited[start] = 0
while queue:
current = queue.pop(0)
... | 21.811111 | 61 | 0.467142 |
98981685a5f611df24d9a725f0688c080dbde9d8 | 1,285 | py | Python | hypercut/urlcut/models.py | UnoYakshi/HyperCut | dc1dc2ad4383b69d2833e94f205959e5fe079971 | [
"MIT"
] | null | null | null | hypercut/urlcut/models.py | UnoYakshi/HyperCut | dc1dc2ad4383b69d2833e94f205959e5fe079971 | [
"MIT"
] | 5 | 2021-03-30T13:49:59.000Z | 2021-09-22T19:19:10.000Z | hypercut/urlcut/models.py | UnoYakshi/HyperCut | dc1dc2ad4383b69d2833e94f205959e5fe079971 | [
"MIT"
] | null | null | null | from django.db import models
from django.urls import reverse
from .hash import encode
class UrlPair(models.Model):
"""Full-short URLs pair. Main entity for the entire application..."""
full_url = models.URLField(null=False)
short_url = models.CharField(max_length=50, unique=True, db_index=True, default='... | 36.714286 | 117 | 0.670817 |
614ae0225f80282cfbe915d4fa7dc286fb8c06f2 | 1,510 | py | Python | lang-python/sandbox/dialog.py | xd23fe39/technical-notes | bb6348705a95db24d07b1081b1aa0265dda131ce | [
"MIT"
] | null | null | null | lang-python/sandbox/dialog.py | xd23fe39/technical-notes | bb6348705a95db24d07b1081b1aa0265dda131ce | [
"MIT"
] | null | null | null | lang-python/sandbox/dialog.py | xd23fe39/technical-notes | bb6348705a95db24d07b1081b1aa0265dda131ce | [
"MIT"
] | null | null | null | #!/usr/bin/python3
## -*- coding: utf-8 -*-
import random
##########################################################################
# Application Data Structure (Dialog Application)
AppData = {
"ID": "201912240050",
"TYPE": "DIALOG",
"NAME": "DIALOG Application (Sample)",
"ASK": "Wie heißt Deine Lie... | 30.2 | 114 | 0.47351 |
14917d45848ccbf7b64fbf00b7e81c78f0357e64 | 5,675 | py | Python | web-brutator-master/lib/core/ArgumentsParser.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | web-brutator-master/lib/core/ArgumentsParser.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | web-brutator-master/lib/core/ArgumentsParser.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import os
import re
from lib.core.Config import *
from lib.core.Utils import Utils, LineWrapRawTextHelpFormatter
import lib.core.Globals as Globals
class ArgumentsParser:
formatter_class = lambda prog: LineWrapRawTextHelpFormatter(
prog, max_... | 43.320611 | 96 | 0.576916 |
21544d93f01d195e7ca579f7d237271099e0ad6b | 1,380 | py | Python | oneflow/python/test/customized/test_reshape.py | wanghongsheng01/framework_enflame | debf613e05e3f5ea8084c3e79b60d0dd9e349526 | [
"Apache-2.0"
] | 2 | 2021-09-10T00:19:49.000Z | 2021-11-16T11:27:20.000Z | oneflow/python/test/customized/test_reshape.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 1 | 2021-06-16T08:37:50.000Z | 2021-06-16T08:37:50.000Z | oneflow/python/test/customized/test_reshape.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 1 | 2021-11-10T07:57:01.000Z | 2021-11-10T07:57:01.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 27.6 | 72 | 0.705797 |
3702eb0eddbb8e759dfd92fc37f8009c09beb1c6 | 1,698 | py | Python | packages/watchmen-data-kernel/src/watchmen_data_kernel/encryption/aes_encryptor.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/encryption/aes_encryptor.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/encryption/aes_encryptor.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from base64 import b64decode, b64encode
from typing import Any, Dict, Union
from watchmen_data_kernel.common import DataKernelException
from watchmen_model.admin import FactorEncryptMethod
from watchmen_utilities import is_blank
from .encryptor import Encryptor
class AESEncryptor(Encryptor):
def __init__(self, key:... | 30.872727 | 74 | 0.734982 |
d345e5d18c512866c7d17adef159220cf9c7f236 | 215 | py | Python | src/python3_learn_video/if_condition1.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/python3_learn_video/if_condition1.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/python3_learn_video/if_condition1.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | print('--------------------------------')
temp = input("不妨猜一下小甲鱼心里想的是哪个数字?")
guess = int(temp)
if guess == 8:
print("猜对了")
else:
if guess > 8:
print('大了')
else:
print('小了')
print('游戏结束')
| 17.916667 | 41 | 0.455814 |
d37a4078e0ab97e359ef846069b73adfd901292e | 358 | py | Python | pandemie/deployment/deployment.py | marvinsxtr/informaticup-2020-pandemie | 0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89 | [
"MIT"
] | null | null | null | pandemie/deployment/deployment.py | marvinsxtr/informaticup-2020-pandemie | 0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89 | [
"MIT"
] | null | null | null | pandemie/deployment/deployment.py | marvinsxtr/informaticup-2020-pandemie | 0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89 | [
"MIT"
] | 1 | 2020-03-28T00:02:41.000Z | 2020-03-28T00:02:41.000Z | import pandemie.web
from pandemie.tester.strategies import final
def deploy():
"""
This function starts the Web-Service with the final-strategy
"""
my_strategy = final.Final(silent=True)
my_server = pandemie.web.WebServer(my_strategy, log="default")
# Start server
my_server.start()
#... | 21.058824 | 66 | 0.695531 |
6cacc863c54096840fa888bdf0069efb221b4192 | 703 | py | Python | DataStructures/Stacks/Equal.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/Stacks/Equal.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/Stacks/Equal.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
#n1, n2, n3 = map(int, raw_input().split())
with open('data', 'r') as fIn:
lines = map(lambda x: x.strip(), fIn.readlines())
#stack1 = map(int, raw_input().split())
stack1 = map(int, lines[0].split())
h1 = sum(stack1)
#stack2 = map(int, raw_input().split())
stack2 = map(int, lines[1].split())
h2 = ... | 22.677419 | 53 | 0.55761 |
9fc9a41259c0dac9aa99b4b9a5a471c7da3f0bda | 2,712 | py | Python | zencad/geom/sew.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/geom/sew.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/geom/sew.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | from zencad.geom.shape import Shape, nocached_shape_generator, shape_generator
from zencad.util import as_indexed
from OCC.Core.BRepBuilderAPI import BRepBuilderAPI_MakeEdge, BRepBuilderAPI_MakeWire
from OCC.Core.TopAbs import TopAbs_WIRE, TopAbs_EDGE
from OCC.Core.gp import gp_Pnt
from zencad.lazifier import lazy
im... | 23.789474 | 98 | 0.571165 |
9fcaac247cb4394e6980cf57596573e2c1611658 | 634 | py | Python | api/wsgi/src/devices/bpm/migrations/0001_initial.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | 2 | 2020-06-08T19:17:10.000Z | 2020-06-08T20:45:07.000Z | api/wsgi/src/devices/bpm/migrations/0001_initial.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | 14 | 2015-10-07T09:31:50.000Z | 2022-02-23T07:34:10.000Z | api/wsgi/src/devices/bpm/migrations/0001_initial.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('devices', '0002_device_live_url'),
]
operations = [
migrations.CreateModel(
name='Bpm',
fields=[
... | 26.416667 | 114 | 0.563091 |
2c886abb555419e93b79f2de218b920e9a1d1ea0 | 322 | py | Python | exercises/pt/solution_02_09.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/solution_02_09.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/solution_02_09.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
# Carregue o fluxo de processamento en_core_web_md
# para fazer o download do fluxo: python -m spacy download pt_core_news_md
nlp = spacy.load("pt_core_news_md")
# Processe um texto
doc = nlp("Duas bananas de pijamas")
# Imprima o vetor para "bananas"
bananas_vector = doc[1].vector
print(bananas_vector... | 24.769231 | 74 | 0.773292 |
203cee6913c2c8e02ed56c7be6d9811bbbd8b545 | 1,967 | py | Python | scripts/component_graph/test/server/net/test_api_handler.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 3 | 2020-08-02T04:46:18.000Z | 2020-08-07T10:10:53.000Z | scripts/component_graph/test/server/net/test_api_handler.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | scripts/component_graph/test/server/net/test_api_handler.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.
import unittest
from unittest import mock
from server.net.api_handler import *
from server.query import QueryHandler
class TestApiHan... | 40.979167 | 77 | 0.731063 |
80a974e8a7cd3c14f16366509bae26debd2f056f | 2,375 | py | Python | code/03_analysis_databricks/ST2-Codelists_frequencies.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | code/03_analysis_databricks/ST2-Codelists_frequencies.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | code/03_analysis_databricks/ST2-Codelists_frequencies.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | # Databricks notebook source
# MAGIC %md
# MAGIC # Supplementary Table 2: COVID-19 codes & frequencies
# MAGIC
# MAGIC **Description**
# MAGIC
# MAGIC This notebook runs a list of `SQL` queries to extract the different codelists useed in the `CCU013: COVID-19 Event Phenotypes` work and the frequency with which they... | 33.450704 | 245 | 0.724632 |
206c289004db8580e4d5a421c59e324572709766 | 9,276 | py | Python | Packs/PcapAnalysis/Scripts/PcapFileExtractor/PcapFileExtractor.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/PcapAnalysis/Scripts/PcapFileExtractor/PcapFileExtractor.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/PcapAnalysis/Scripts/PcapFileExtractor/PcapFileExtractor.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import hashlib
import subprocess
import tempfile
from typing import List, Optional, Set, Tuple, Union
import magic
from CommonServerPython import * # noqa: E402 lgtm [py/polluting-import]
INCLUSIVE: str = 'inclusive'
EXCLUSIVE: str = 'exclusive'
class HashCalculator:
"""Class to calculate hashes.
"""
... | 33.608696 | 120 | 0.605865 |
20bf5608b714abfc6a3f316e4b208499487e77ec | 4,673 | py | Python | migration/migration.py | patrickbucher/mongomir-pytkovic | 4f6ea608c9b95b236ce3aee925277451bf4c2e9f | [
"MIT"
] | null | null | null | migration/migration.py | patrickbucher/mongomir-pytkovic | 4f6ea608c9b95b236ce3aee925277451bf4c2e9f | [
"MIT"
] | null | null | null | migration/migration.py | patrickbucher/mongomir-pytkovic | 4f6ea608c9b95b236ce3aee925277451bf4c2e9f | [
"MIT"
] | 1 | 2018-12-05T11:08:47.000Z | 2018-12-05T11:08:47.000Z | #!/usr/bin/env python3
import sqlite3
from pymongo import MongoClient
import os
from datetime import datetime
import time
# SQLite connection and setup
datdir = os.environ['DATDIR']
sqlite_db = os.path.join(datdir, 'database.sqlite')
connection = sqlite3.connect(sqlite_db)
connection.row_factory = sqlite3.Row
# Mong... | 34.614815 | 79 | 0.675155 |
b3308c5d9d789fcf2cc72c8185245adbcd9e18c3 | 295 | py | Python | make_index.py | nichdel/recipe-wiki | f83bfa526b5fb907696ef6417abc51c1456efbee | [
"MIT"
] | null | null | null | make_index.py | nichdel/recipe-wiki | f83bfa526b5fb907696ef6417abc51c1456efbee | [
"MIT"
] | null | null | null | make_index.py | nichdel/recipe-wiki | f83bfa526b5fb907696ef6417abc51c1456efbee | [
"MIT"
] | null | null | null | import os
import re
folder = 'wiki/Recipes/'
next = folder + 'next.txt'
links = os.listdir(folder)
links.sort()
p = re.compile("_")
f = open('index.md', 'w')
for string in links:
nstr = p.sub(' ', string)[0:-3]
f.write("[" + nstr + "](" + folder + string + ") \n")
f.write("\n")
| 14.75 | 56 | 0.559322 |
ff602f18b38e2a4b23f014090d0c4c7b1e319ff0 | 384 | py | Python | leetcode/560-Subarray-Sum-Equals-K/cum_sum_2d_tle.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/560-Subarray-Sum-Equals-K/cum_sum_2d_tle.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/560-Subarray-Sum-Equals-K/cum_sum_2d_tle.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
def subarraySum(self, nums: List[int], k: int) -> int:
for i in range(1, len(nums)):
nums[i] += nums[i - 1]
cum_sums = [0] + nums
cnt = 0
for i in range(len(cum_sums)):
for j in range(i + 1, len(cum_sums)):
if cum_sums[j] - cu... | 27.428571 | 58 | 0.458333 |
4476b16dbc9f739360ff51dbf7f55abeccb50e44 | 167 | py | Python | frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/work_order/.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/work_order/.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/work_order/.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | import frappe
def set_required_items(production_order):
pass
def reserve_for_production(production_order):
'''Reserve pending raw materials for production'''
pass | 20.875 | 51 | 0.820359 |
922a137e0f44ff901ece3ee1ef8ffc5095208f87 | 120 | py | Python | python_lessons/freecodecamp_python/010_equal_code.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | python_lessons/freecodecamp_python/010_equal_code.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | python_lessons/freecodecamp_python/010_equal_code.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | words = 'His e-mail is q-lar@freecodecamp.org'
pieces = words.split()
parts = pieces[3].split('-')
n = parts[1]
print(n) | 24 | 46 | 0.666667 |
92523036c2f1034be07a5533442e63b42355e536 | 611 | py | Python | Chapter2_Python/MatplotlibIntro.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter2_Python/MatplotlibIntro.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter2_Python/MatplotlibIntro.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
noten_jan = [56, 64, 78, 100]
noten_ben = [86, 94, 98, 90]
# Plot
# x, y
plt.plot([1, 2, 3, 4], noten_jan, color="blue")
plt.plot([1, 2, 3, 4], noten_ben, color="red")
plt.legend(["Jan", "Ben"])
plt.xlabel("Fach")
plt.ylabel("Note in %")
plt.title("... | 23.5 | 51 | 0.545008 |
a6d35ffb90228ce8a55d8dafb5f5764265150bd7 | 6,058 | py | Python | AustinBot/austin_bot.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | AustinBot/austin_bot.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | AustinBot/austin_bot.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | from datetime import datetime as dt, timedelta as td
from discord import Member, Embed, Colour
from discord.ext import commands
from discord.ext.commands import Bot
import os
from os.path import getmtime
import asyncio
import discord
import logging
import sys
import typing
from string import ascii_lowercase
# from all_... | 31.226804 | 139 | 0.699241 |
b6e37f4938f8c0cd258e8f4fc4612a3f9588aaa5 | 4,150 | py | Python | banking/views.py | deepur99/Pocket-Bank- | 8d960a548cab992568c23086974031512611247f | [
"Apache-2.0"
] | null | null | null | banking/views.py | deepur99/Pocket-Bank- | 8d960a548cab992568c23086974031512611247f | [
"Apache-2.0"
] | null | null | null | banking/views.py | deepur99/Pocket-Bank- | 8d960a548cab992568c23086974031512611247f | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from . models import *
from datetime import datetime
from django.shortcuts import render, redirect
from django.contrib.auth.forms import UserCreationForm
from .forms import UserRegisterForm
from django.contrib import messages
from django.contrib.auth.decorators import login_required... | 35.470085 | 112 | 0.661446 |
6d40ca33f09c858ad465da8f6504d4d05ed43f9c | 13,889 | py | Python | skripte/python/edit_tools/prepare_patch.py | hyphenation/languages-german | 4330a0b1254e88615cb4c83e4b3dc2f0810c76d9 | [
"MIT"
] | null | null | null | skripte/python/edit_tools/prepare_patch.py | hyphenation/languages-german | 4330a0b1254e88615cb4c83e4b3dc2f0810c76d9 | [
"MIT"
] | null | null | null | skripte/python/edit_tools/prepare_patch.py | hyphenation/languages-german | 4330a0b1254e88615cb4c83e4b3dc2f0810c76d9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf8 -*-
# :Copyright: © 2014 Günter Milde.
# Released without warranty under the terms of the
# GNU General Public License (v. 2 or later)
# :Id: $Id: $
# prepare_patch.py: Helfer für kleine Editieraufgaben
# ================================================... | 30.259259 | 79 | 0.613867 |
edc8777045ce50f94078e789855c767a3ad4c3cd | 409 | py | Python | src/loops/interfaces.py | AakashMallik/cnn-firefly | 6c8ed58a035e62682263753436b124cb979ed240 | [
"MIT"
] | null | null | null | src/loops/interfaces.py | AakashMallik/cnn-firefly | 6c8ed58a035e62682263753436b124cb979ed240 | [
"MIT"
] | 7 | 2020-11-27T12:24:31.000Z | 2020-11-29T09:41:09.000Z | src/loops/interfaces.py | AakashMallik/cnn-firefly | 6c8ed58a035e62682263753436b124cb979ed240 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from typing import Union
class LoopInterface(ABC):
device = None
@abstractmethod
def run_single_epoch(self) -> Union[None, float]:
"""[summary]
"""
@abstractmethod
def run_epochs(self) -> None:
"""[summary]
"""
# @abstractm... | 18.590909 | 53 | 0.564792 |
1e3f0695fb6d4e5f9a6404a2d2cbe5d5a9221788 | 992 | py | Python | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/12_kapitel_05_repetitionsaufgabe_11_ulam_sequence.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/12_kapitel_05_repetitionsaufgabe_11_ulam_sequence.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/12_kapitel_05_repetitionsaufgabe_11_ulam_sequence.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: 12_kapitel_05_repetitionsaufgabe_11_ulam_sequence.py
# Project: Kapitel_05_Kontrollstrukturen
# Created Date: Sunday 24.02.2019, 10:14
# Author: Apop85
# -----
# Last Modified: Sunday 24.02.2019, 10:19
# -----
# Copyright (c) 2019 Apop85
# This software is publi... | 32 | 95 | 0.684476 |
1e76a2525d80dc120504134b6742ae413c82e92d | 7,049 | py | Python | feedcrawler/url.py | rix1337/FeedCrawler | 6c104c39f1bd45e5d49c02c90bb8d9fd35f9709e | [
"MIT"
] | 16 | 2021-04-06T07:37:18.000Z | 2022-03-27T15:05:32.000Z | feedcrawler/url.py | rix1337/FeedCrawler | 6c104c39f1bd45e5d49c02c90bb8d9fd35f9709e | [
"MIT"
] | 17 | 2021-06-09T10:37:49.000Z | 2022-03-31T07:29:36.000Z | feedcrawler/url.py | rix1337/FeedCrawler | 6c104c39f1bd45e5d49c02c90bb8d9fd35f9709e | [
"MIT"
] | 3 | 2021-05-22T13:49:57.000Z | 2022-01-05T11:15:47.000Z | # -*- coding: utf-8 -*-
# FeedCrawler
# Projekt von https://github.com/rix1337
import concurrent.futures
import datetime
from feedcrawler import internal
from feedcrawler.config import CrawlerConfig
from feedcrawler.db import FeedDb
from feedcrawler.flaresolverr import get_flaresolverr_url
from feedcrawler.flaresolve... | 41.222222 | 152 | 0.564477 |
bfa3d5497a88999dfe71e69109e16e66cb0b2e70 | 303 | py | Python | home/admin.py | joaogabriel15/spfc | 74e0fb79cfe64001fe55fea07aa80d61fa76b2e4 | [
"MIT"
] | null | null | null | home/admin.py | joaogabriel15/spfc | 74e0fb79cfe64001fe55fea07aa80d61fa76b2e4 | [
"MIT"
] | null | null | null | home/admin.py | joaogabriel15/spfc | 74e0fb79cfe64001fe55fea07aa80d61fa76b2e4 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Civil , Documento, TipoDocumento
# Register your models here.
class DocumentoAdmin(admin.ModelAdmin):
list_display = ('civil','tipo')
admin.site.register(Civil)
admin.site.register(Documento, DocumentoAdmin)
admin.site.register(TipoDocumento) | 25.25 | 52 | 0.792079 |
44ecd157810e7e56a1df7ecb6f00174cac731600 | 3,284 | py | Python | script/pyscripts/helpers.py | agarrharr/fronzbot.github.io | 702f5a9d5ab15046f0dad539e57766a24f583d1d | [
"MIT"
] | 3 | 2020-04-08T03:01:05.000Z | 2021-11-04T11:10:52.000Z | script/pyscripts/helpers.py | agarrharr/fronzbot.github.io | 702f5a9d5ab15046f0dad539e57766a24f583d1d | [
"MIT"
] | 20 | 2017-07-28T02:54:39.000Z | 2022-02-26T03:34:48.000Z | script/pyscripts/helpers.py | agarrharr/fronzbot.github.io | 702f5a9d5ab15046f0dad539e57766a24f583d1d | [
"MIT"
] | 4 | 2019-03-04T19:56:13.000Z | 2020-04-09T00:31:09.000Z | '''Various helper functions and classes'''
import glob
import sys
PATH = './_posts/'
EXT = '.md'
VALID_TAGS = ['analog', 'theory', 'systems', 'circuits', 'projects', 'university project', 'fun',
'python', 'scripts', 'MATLAB', 'device physics', 'admin', 'home automation', 'noise',
'signals'... | 32.84 | 104 | 0.517357 |
7810b01b97eefe30d369c0769e656fbd7c757042 | 7,122 | py | Python | other/re-risky/split-version/task3/task/gold.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | other/re-risky/split-version/task3/task/gold.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | other/re-risky/split-version/task3/task/gold.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #!/usr/bin/python
# -*- coding: utf8 -*-
# Copyright 2018 Google LLC
#
# 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 ... | 90.151899 | 4,232 | 0.697416 |
7845e19e48514e8346ded77d51ca985167357311 | 894 | py | Python | src/lecture1/My_Explorer.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | 1 | 2020-08-17T07:09:09.000Z | 2020-08-17T07:09:09.000Z | src/lecture1/My_Explorer.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | null | null | null | src/lecture1/My_Explorer.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | 2 | 2020-07-26T07:27:57.000Z | 2020-08-17T07:09:15.000Z |
import numpy as np
import cv2
#from matplotlib import pyplot as plt
ipath = "allfull.jpg"
lpath = "label.npy"
class MyExplorer():
def __init__(self,img_path,label_path,fps=25,size=(40,40)):
self.img = cv2.imread(img_path)
self.l = np.load(label_path)
self.fps = fps
self... | 17.88 | 80 | 0.581655 |
bf1a274e8f18bad32bfd46b32ac0a0e5f71f57b5 | 906 | py | Python | setup.py | VolkerBergen/convertx | 3d11f94e5ff20b17381c626848fe26e82a5c9cb7 | [
"BSD-2-Clause"
] | null | null | null | setup.py | VolkerBergen/convertx | 3d11f94e5ff20b17381c626848fe26e82a5c9cb7 | [
"BSD-2-Clause"
] | 5 | 2022-01-06T20:34:22.000Z | 2022-01-17T14:58:05.000Z | setup.py | VolkerBergen/convertx | 3d11f94e5ff20b17381c626848fe26e82a5c9cb7 | [
"BSD-2-Clause"
] | 1 | 2022-01-05T13:17:57.000Z | 2022-01-05T13:17:57.000Z | import os
from setuptools import find_packages, setup
setup(
name='convertx',
version='0.1',
description='Convert Word documents (docx) to clean HTML and Markdown',
long_description=open(os.path.join(os.path.dirname(__file__), 'README.rst')).read(),
author='Volker Bergen',
author_email='email@v... | 36.24 | 94 | 0.661148 |
17568533964c27c66c66a21c0b9b0903866ddeff | 4,760 | py | Python | oldp/apps/laws/processing/processing_steps/extract_refs.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | 3 | 2020-06-27T08:19:35.000Z | 2020-12-27T17:46:02.000Z | oldp/apps/laws/processing/processing_steps/extract_refs.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | null | null | null | oldp/apps/laws/processing/processing_steps/extract_refs.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | null | null | null | import re
from oldp.apps.laws.models import Law
from oldp.apps.laws.processing.processing_steps import LawProcessingStep
from oldp.apps.references.models import LawReferenceMarker
class ExtractRefs(LawProcessingStep):
description = 'Extract references'
def __init__(self):
super(ExtractRefs, self).__... | 33.521127 | 166 | 0.444748 |
17602def691477bd71e9125545e94c02a46bb5fc | 22,213 | py | Python | research/cv/E-NET/src/model.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/E-NET/src/model.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/E-NET/src/model.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... | 43.899209 | 120 | 0.47067 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.