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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b79213e67802f641ca0c8e5f0c8e7bc88b03eeca | 1,325 | py | Python | ebenezer/atencion/models/level.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | null | null | null | ebenezer/atencion/models/level.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | 3 | 2020-02-11T23:15:00.000Z | 2021-06-10T20:52:17.000Z | ebenezer/atencion/models/level.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | null | null | null | from uuid import uuid4
from django.db import models
from mptt.models import MPTTModel, TreeForeignKey
from .taxonomy import Taxonomy
from .type_of_level import TypeOfLevel
class Level(MPTTModel):
id = models.UUIDField(
primary_key=True,
default=uuid4,
editable=False)
type_of_level =... | 25.480769 | 56 | 0.636226 |
b7ff8d15ed7f13c05178541f951469b3d27cb7fc | 9,313 | py | Python | mbf-latif.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | mbf-latif.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | mbf-latif.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/python
#encoding=utf-8
#Belajarlah Bahasa Pemerograman Dari Pada Copy Paste Dan Recod Script Orang :) TTD : Muhammad Latif Harkat
#Module Upload And Except Install
import json,os,time,sys
from concurrent.futures import ThreadPoolExecutor as Bool
try:
import pyfiglet
except:
os.system("python -m pip instal... | 36.810277 | 418 | 0.662193 |
4d407ee0304155e8a99fdf6bb7dd512e726f09bc | 7,466 | py | Python | research/cv/fairmot/sdk_eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/fairmot/sdk_eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/fairmot/sdk_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.709497 | 117 | 0.627779 |
12a694be786faeb5b1edbd77f4520914c6a511ba | 241 | py | Python | Lec7.py | JSliman948/IA241 | 57e8441ed0a8236e08308c6ed18b7555d76fd739 | [
"MIT"
] | null | null | null | Lec7.py | JSliman948/IA241 | 57e8441ed0a8236e08308c6ed18b7555d76fd739 | [
"MIT"
] | null | null | null | Lec7.py | JSliman948/IA241 | 57e8441ed0a8236e08308c6ed18b7555d76fd739 | [
"MIT"
] | null | null | null | """
Lecture 7: While Loops
"""
i=5
while i >=0:
print(i)
i = i-1
if i ==3:
pass
print(i)
#exceptions section
try:
print(1/0)
except:
print("error")
try:
print(1+0)
except:
print("error") | 10.954545 | 22 | 0.493776 |
97d35c1efcb2abac62c830f6fd97dc3856bfa5dd | 2,249 | py | Python | v703/python/impulse.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 2 | 2019-12-10T10:25:11.000Z | 2021-01-26T13:59:40.000Z | v703/python/impulse.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | null | null | null | v703/python/impulse.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 1 | 2020-12-06T21:24:58.000Z | 2020-12-06T21:24:58.000Z | import numpy as np
import matplotlib.pyplot as plt
from uncertainties import ufloat
from scipy import optimize
import scipy.constants as const
u, imp, i = np.genfromtxt('python/daten/impulse.txt', unpack=True) # V 1/s μs
anzmess = len(u)
impf = np.zeros(anzmess)
for k in range(anzmess):
impf[k] = np.sqrt(imp[k])
... | 26.458824 | 111 | 0.613161 |
3f6eab790c0d6e834fae298cfc7f32850ba9bb05 | 3,076 | py | Python | 0-notes/job-search/SamplesDSAlgos/data structures/bloom_filter.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/SamplesDSAlgos/data structures/bloom_filter.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/SamplesDSAlgos/data structures/bloom_filter.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null |
# Install mmh3 and bitarray 3rd party module first
# pip install mmh3
# pip install bitarray
import math
import mmh3
from bitarray import bitarray
# BLOOM FILTER
# designed to tell you quickly & efficiently if item is in set
# trade-off is it can't tell you definitely if item is in set
# can on... | 32.723404 | 83 | 0.606632 |
453c176848f0bc60f510667abf26224544942585 | 2,269 | py | Python | site_generation/cloudprovider_azure.py | globalwatchpost/CloudRegionsList | f428b39fc797403cf6ed5d38196a5df29f59d8af | [
"MIT"
] | null | null | null | site_generation/cloudprovider_azure.py | globalwatchpost/CloudRegionsList | f428b39fc797403cf6ed5d38196a5df29f59d8af | [
"MIT"
] | null | null | null | site_generation/cloudprovider_azure.py | globalwatchpost/CloudRegionsList | f428b39fc797403cf6ed5d38196a5df29f59d8af | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import logging
import json
import pprint
import sys
import cloudprovider
import subprocess
class CloudProviderAzure(cloudprovider.CloudProvider):
def __init__(self, regionGeoInfo, dateFormatFunction):
super().__init__( regionGeoInfo, dateFormatFunction )
def getDataSources(self)... | 32.884058 | 114 | 0.577788 |
18c301d557cfdea78c5219e99507747dd8478bbb | 5,881 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/import/matsim/matsim_importPlans.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/import/matsim/matsim_importPlans.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/import/matsim/matsim_importPlans.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2010-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.ec... | 40.558621 | 159 | 0.587655 |
7a036915c9114e3366173d690812a4bea73281f6 | 378 | py | Python | INBa/2014/Andreev_F_I/task_1_2.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2014/Andreev_F_I/task_1_2.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2014/Andreev_F_I/task_1_2.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 1, Вариант 2
# Напишите программу, которая будет сообщать род деятельности и псевдоним под которым скрывается Мартин Андерсен. После вывода информации программа должна дожидаться пока пользователь нажмет Enter для выхода.
# Андреев Ф.И.
# 23.05.2016
print('Мартин Андерсен известный датский писатель-коммунист... | 47.25 | 208 | 0.806878 |
e19c1f8cb9d6402e6e049798f9136eabde9218be | 444 | py | Python | lianjia/lianjia_house_info.py | mcmin001/NBCrawler | ec6a348e32889fb9252651b203a725a39b6836ec | [
"Apache-2.0"
] | null | null | null | lianjia/lianjia_house_info.py | mcmin001/NBCrawler | ec6a348e32889fb9252651b203a725a39b6836ec | [
"Apache-2.0"
] | null | null | null | lianjia/lianjia_house_info.py | mcmin001/NBCrawler | ec6a348e32889fb9252651b203a725a39b6836ec | [
"Apache-2.0"
] | null | null | null |
class LianjiaHouseInfo:
def __init__(self, price, area, pricePerSquare, houseType, complexName, province, city, district, lianjiaCode):
self.price = price
self.area = area
self.pricePerSquare = pricePerSquare
self.houseType = houseType
self.complexName = complexName
... | 29.6 | 115 | 0.662162 |
36f9647af8324125cfdf8faac6d6fb26fc11d89b | 10,074 | py | Python | workspace/cogrob/service_manager/client/sync_with_rorg_server.py | CogRob/Rorg | dbf9d849e150404c117f6f0062476d995cec7316 | [
"BSD-3-Clause"
] | 8 | 2019-05-07T02:30:58.000Z | 2021-12-10T18:44:45.000Z | workspace/cogrob/service_manager/client/sync_with_rorg_server.py | CogRob/Rorg | dbf9d849e150404c117f6f0062476d995cec7316 | [
"BSD-3-Clause"
] | 1 | 2021-03-17T07:18:23.000Z | 2021-03-17T07:18:23.000Z | workspace/cogrob/service_manager/client/sync_with_rorg_server.py | CogRob/Rorg | dbf9d849e150404c117f6f0062476d995cec7316 | [
"BSD-3-Clause"
] | 2 | 2019-05-21T14:15:24.000Z | 2022-02-09T12:50:24.000Z | # Copyright (c) 2019, The Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... | 42.327731 | 80 | 0.732083 |
7fd675df6d66a465f64cfd86a8053532e0809f25 | 1,983 | py | Python | api/dashan_universe/transforms.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 6 | 2018-06-27T00:09:55.000Z | 2019-03-07T14:06:53.000Z | api/dashan_universe/transforms.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2021-03-31T18:37:46.000Z | 2021-06-01T21:49:41.000Z | api/dashan_universe/transforms.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2020-01-24T16:40:49.000Z | 2021-09-30T02:28:55.000Z | from dashan_universe.med_regex import med_regex
import re
def transform_lab_orders(lab_orders):
order_ids = {'blood_culture': ['7564'], 'lactate': ['1022', '838', '64630']}
order_tsps = {'blood_culture': [], 'lactate': []}
for order in lab_orders:
if order.get('OrderStatus') in ['Signed', 'Sent',... | 41.3125 | 104 | 0.611195 |
a11ee4351ac01498d6ef75894020788f05624851 | 495 | py | Python | push-code.py | ipussy/ipussy.github.io | 95d19a74e38bb54303cf18057a99a57c783e76bf | [
"Apache-2.0"
] | null | null | null | push-code.py | ipussy/ipussy.github.io | 95d19a74e38bb54303cf18057a99a57c783e76bf | [
"Apache-2.0"
] | null | null | null | push-code.py | ipussy/ipussy.github.io | 95d19a74e38bb54303cf18057a99a57c783e76bf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import os
import os.path
from os import path
from datetime import datetime
def pushToGithub():
print('pushToGithub')
gitStatus = os.system('git status')
print('Status', gitStatus)
message = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
gitAdd = 'git add .'
gitCommi... | 19.038462 | 58 | 0.628283 |
a127cc3400ed85eec3cba3637c2b6552efa66475 | 314 | py | Python | python/coursera_python/MICHIGAN/WEB/test/Spam.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/MICHIGAN/WEB/test/Spam.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/MICHIGAN/WEB/test/Spam.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import re
hand = open('Spam.txt')
numlist = list()
for line in hand:
line = line.rstrip() # Strips a line
stuff = re.findall('^X-DSPAM-Confidence: ([0-9.]+)',line) # Matches with this type of architecture
if len(stuff)!= 1: continue
num=float(stuff[0])
numlist.append(num)
print('Mximum:',max(numlist))
| 22.428571 | 99 | 0.671975 |
a147b75f6cb44b700750275e6f5343878a93be4d | 351 | py | Python | beispielanwendungen/designer/helloworld.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 5 | 2017-03-11T13:27:27.000Z | 2022-01-09T10:52:05.000Z | beispielanwendungen/designer/helloworld.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 2 | 2021-02-14T10:59:59.000Z | 2021-10-30T21:46:32.000Z | beispielanwendungen/designer/helloworld.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 1 | 2019-08-07T03:08:18.000Z | 2019-08-07T03:08:18.000Z | # -*- coding: utf-8 -*-
import sys
from PyQt4 import QtCore, QtGui
from ui_helloworld import Ui_MainWindow
def main(argv):
app = QtGui.QApplication(argv)
mainwindow = QtGui.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(mainwindow)
mainwindow.show()
sys.exit(app.exec_())
if __name__ == "... | 17.55 | 39 | 0.666667 |
62dc189d0a15e6dbecaf0e74b387168b9cb1933b | 14,093 | py | Python | Packs/HYASInsight/Integrations/HYASInsight/HYASInsight_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/HYASInsight/Integrations/HYASInsight/HYASInsight_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/HYASInsight/Integrations/HYASInsight/HYASInsight_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
import json
import io
from HYASInsight import Client, get_passive_dns_records_by_indicator, get_dynamic_dns_records_by_indicator, \
get_whois_records_by_indicator, get_whois_current_records_by_domain, get_malware_samples_records_by_indicator, \
get_associated_ips_by_hash, get_associated_domains_b... | 53.790076 | 123 | 0.61896 |
c55882f99ecdddbf51dadfd3b5c1d3f98fd8897a | 553 | py | Python | site/public/courses/BEW-1.1/Examples/DiceGame/02-Flask/app.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | 1 | 2021-08-24T20:22:19.000Z | 2021-08-24T20:22:19.000Z | site/public/courses/BEW-1.1/Examples/DiceGame/02-Flask/app.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | site/public/courses/BEW-1.1/Examples/DiceGame/02-Flask/app.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | from random import randint
from flask import Flask
app = Flask(__name__)
@app.route("/")
def play_dice_game():
"""Plays a game by rolling two dice. If the rolls are the same, the user
wins; if not, they lose. Returns a string representation of the outcome and
rolls."""
die1 = randint(1, 6)
... | 27.65 | 80 | 0.618445 |
9a76bc854a3a63b7fbc5fb09eecb8525deb40a1c | 1,540 | py | Python | PythonPro/demo/loop_for.py | JianmingXia/StudyTest | 66d688ad41bbce619f44359ea126ff07a923f97b | [
"MIT"
] | null | null | null | PythonPro/demo/loop_for.py | JianmingXia/StudyTest | 66d688ad41bbce619f44359ea126ff07a923f97b | [
"MIT"
] | 68 | 2020-09-05T04:22:49.000Z | 2022-03-25T18:47:08.000Z | PythonPro/demo/loop_for.py | JianmingXia/StudyTest | 66d688ad41bbce619f44359ea126ff07a923f97b | [
"MIT"
] | null | null | null | #coding=utf-8
#循环语句
# 输出 Python 的每个字母
for letter in 'Python':
if letter == 'h':
pass
print '这是 pass 块'
print '当前字母 :', letter
print "Good bye!"
# for letter in 'Python': # 第一个实例
# if letter == 'h':
# continue
# print '当前字母 :', letter
#
# var = 10 # 第二个实例
# while v... | 20.810811 | 46 | 0.470779 |
9a835f3fc0d5b175ecbcd3634bcf95d4660da309 | 11,814 | py | Python | src/main/python/tools/file_manage.py | gwdgithubnom/ox-patient | cddf4fe381cb4506db8e0d62803dd2044cf7ad92 | [
"MIT"
] | null | null | null | src/main/python/tools/file_manage.py | gwdgithubnom/ox-patient | cddf4fe381cb4506db8e0d62803dd2044cf7ad92 | [
"MIT"
] | null | null | null | src/main/python/tools/file_manage.py | gwdgithubnom/ox-patient | cddf4fe381cb4506db8e0d62803dd2044cf7ad92 | [
"MIT"
] | 1 | 2021-04-14T00:45:38.000Z | 2021-04-14T00:45:38.000Z | """
操作管理文件的api
"""
import os, random, string, shutil
import configparser
from tools import logger
from context import resource_manager
from tools import config_parser
import time
log = logger.getLogger()
class pcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNIN... | 28.195704 | 136 | 0.541138 |
9aa076cfc96e34773886743e52bba78c5876b91d | 194 | py | Python | Segundo commit El programa sin concluir.py | gustavolugla/Un_numero_mayor_que_10 | e392703b546f85b96b5793b8a78d3154a66a2cf3 | [
"MIT"
] | null | null | null | Segundo commit El programa sin concluir.py | gustavolugla/Un_numero_mayor_que_10 | e392703b546f85b96b5793b8a78d3154a66a2cf3 | [
"MIT"
] | 2 | 2021-09-26T17:25:33.000Z | 2021-09-27T00:41:50.000Z | Segundo commit El programa sin concluir.py | gustavolugla/Un_numero_mayor_que_10 | e392703b546f85b96b5793b8a78d3154a66a2cf3 | [
"MIT"
] | 1 | 2021-09-26T17:21:17.000Z | 2021-09-26T17:21:17.000Z | #!/usr/bin/python3
numero -int(input("ingrese un numero mayor a 10:"))
while (numero <10):
numero =int(input("ingrese un numero mayor a 10:"))
print ( "el numero ingresado es", numero)
| 32.333333 | 56 | 0.670103 |
492bd7b48aa934b3ac81339fcf93aa692b4f3054 | 484 | py | Python | pacman-arch/test/pacman/tests/sync896.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/sync896.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/sync896.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Sync causes single package removal of a provide (success)"
sp = pmpkg("pkg3")
sp.conflicts = ["pkg1"]
sp.provides = ["foo"]
self.addpkg2db("sync", sp)
lp1 = pmpkg("pkg1")
lp1.provides = ["foo"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.depends = ["foo"]
self.addpkg2db("local", lp2)
se... | 22 | 78 | 0.683884 |
626f7d46229a3868c0398379031239206d3f2f09 | 259 | py | Python | transonic_cl/cythonize.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | transonic_cl/cythonize.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | transonic_cl/cythonize.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | import sys
from distutils.core import setup
from Cython.Build import cythonize
import numpy as np
path = sys.argv.pop()
sys.argv.extend(("build_ext", "--inplace"))
setup(
ext_modules=cythonize(path, language_level=3), include_dirs=[np.get_include()]
)
| 19.923077 | 82 | 0.749035 |
b82d41ef07be2a355117c5351345dd997ca05c37 | 717 | py | Python | Prepare Preparation Kits/1 Week Preparation Kit/Day 01/Plus Minus/solution.py | mahbub-ul-islam/HackerRank | 6f8dd4654824c62bba2f6cbda6fc543a4f37be51 | [
"MIT"
] | null | null | null | Prepare Preparation Kits/1 Week Preparation Kit/Day 01/Plus Minus/solution.py | mahbub-ul-islam/HackerRank | 6f8dd4654824c62bba2f6cbda6fc543a4f37be51 | [
"MIT"
] | null | null | null | Prepare Preparation Kits/1 Week Preparation Kit/Day 01/Plus Minus/solution.py | mahbub-ul-islam/HackerRank | 6f8dd4654824c62bba2f6cbda6fc543a4f37be51 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'plusMinus' function below.
#
# The function accepts INTEGER_ARRAY arr as parameter.
#
def plusMinus(arr):
# Write your code here
length = len(arr)
positive = 0
negative = 0
zero = 0
for value in arr:
... | 17.071429 | 54 | 0.555091 |
a7ca43c558f36667cef09a49c491af653ec0412d | 37 | py | Python | testserver/blueprints/api/__init__.py | IfengAutomation/AutomationTestServer | b16ad0fae9cd7198a93cf2f3cd68d46fdae2dbdd | [
"Apache-2.0"
] | null | null | null | testserver/blueprints/api/__init__.py | IfengAutomation/AutomationTestServer | b16ad0fae9cd7198a93cf2f3cd68d46fdae2dbdd | [
"Apache-2.0"
] | null | null | null | testserver/blueprints/api/__init__.py | IfengAutomation/AutomationTestServer | b16ad0fae9cd7198a93cf2f3cd68d46fdae2dbdd | [
"Apache-2.0"
] | null | null | null | from .client_api import api
bp = api
| 12.333333 | 27 | 0.756757 |
0b71019370c9437c5d890ae7897b491d6e1e5140 | 4,461 | py | Python | crypto/RSA202/script.py | killua4564/2019-AIS3-preexam | b13b5c9d3a2ec8beef7cca781154655bb51605e3 | [
"MIT"
] | 1 | 2019-06-15T11:45:41.000Z | 2019-06-15T11:45:41.000Z | crypto/RSA202/script.py | killua4564/2019-AIS3-preexam | b13b5c9d3a2ec8beef7cca781154655bb51605e3 | [
"MIT"
] | null | null | null | crypto/RSA202/script.py | killua4564/2019-AIS3-preexam | b13b5c9d3a2ec8beef7cca781154655bb51605e3 | [
"MIT"
] | null | null | null | import gmpy2
from sympy import invert
from Crypto.Util.number import isPrime, long_to_bytes
# e = 65537
# (enc1,n1) = (1866739590223797894675042930867507244459802734183817120733673558730628194296958093591260416428147300252816258812188827322730714255110909448735060349711514657617017626271999512009288, 21073089383086789... | 75.610169 | 1,356 | 0.89397 |
0ba183c5e8e07c27307404562654992f7f0794f8 | 356 | py | Python | p01/tests/test_01.py | JoseIbanez/fastapi | ac4b74f23315021042efd88e192aa39d8481de53 | [
"MIT"
] | null | null | null | p01/tests/test_01.py | JoseIbanez/fastapi | ac4b74f23315021042efd88e192aa39d8481de53 | [
"MIT"
] | null | null | null | p01/tests/test_01.py | JoseIbanez/fastapi | ac4b74f23315021042efd88e192aa39d8481de53 | [
"MIT"
] | null | null | null | import unittest
from cifastapi.config import safeget
class Dummy(unittest.TestCase):
def test_dummy_01(self):
self.assertGreater(2, 1)
def test_dummy_02(self):
self.assertGreater(2, 1)
def test_safeget(self):
ret = safeget({"a":1},"a")
self.assertEqual(ret,1)
if __name__... | 19.777778 | 36 | 0.648876 |
f0327c6969ee4f47cc47072ee0cfa5a763caf5d1 | 7,451 | py | Python | pfsk.py | krillr/pfsk | 8957ae07443155464bf01337c8e5ca5960fd17f9 | [
"Apache-2.0"
] | null | null | null | pfsk.py | krillr/pfsk | 8957ae07443155464bf01337c8e5ca5960fd17f9 | [
"Apache-2.0"
] | null | null | null | pfsk.py | krillr/pfsk | 8957ae07443155464bf01337c8e5ca5960fd17f9 | [
"Apache-2.0"
] | null | null | null | import bitarray
import numpy as np
import util
FRAMELENGTH = 0.5
TONESPACING = 4
SAMPLERATE = 44100.0
CHUNK_LENGTH = int(SAMPLERATE * FRAMELENGTH)
MINIMUM_PHASE = 0
MAXIMUM_PHASE = util.TAU
EXPECTED = bitarray.bitarray('01001011010100100011000101001100010011000101001000100000010000110100111000111000001101010010000000... | 41.859551 | 160 | 0.58972 |
b2d503b77be5cb5d1beeb20a0e34211917bbcf8d | 2,744 | py | Python | 2-resources/_External-learning-resources/02-pyth/python-patterns-master/patterns/behavioral/observer.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-patterns-master/patterns/behavioral/observer.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-patterns-master/patterns/behavioral/observer.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-11-05T07:48:26.000Z | 2021-11-05T07:48:26.000Z | """
http://code.activestate.com/recipes/131499-observer-pattern/
*TL;DR
Maintains a list of dependents and notifies them of any state changes.
*Examples in Python ecosystem:
Django Signals: https://docs.djangoproject.com/en/3.1/topics/signals/
Flask Signals: https://flask.palletsprojects.com/en/1.1.x/signals/
"""
fr... | 24.720721 | 79 | 0.640306 |
d7e68999d61df586628a2de6948cb7e29c89dbf1 | 1,227 | py | Python | src/python3_learn_video/generator.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/python3_learn_video/generator.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/python3_learn_video/generator.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | """
yield :
相当于 return 但是return一次就中断结束了
生成器 是 迭代器 的一种实现:
所谓的协同程序就是可以运行的独立函数调用,函数可以暂停或者挂起,并在需要的时候从程序离开的地方继续或者重新开始
"""
def myGen():
print("生成器被执行!")
yield 1
yield 2
print('------------------------------------')
myG = myGen()
print(next(myG))
print(next(myG))
print('----------------------------... | 17.28169 | 59 | 0.400978 |
0bc572289543c68ec2918af6d2231a7bbcab5051 | 565 | py | Python | py-basics/src/lectures/dictionaries/leap-years.py | AndrasTarlos/s4f | bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426 | [
"CC0-1.0"
] | null | null | null | py-basics/src/lectures/dictionaries/leap-years.py | AndrasTarlos/s4f | bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426 | [
"CC0-1.0"
] | null | null | null | py-basics/src/lectures/dictionaries/leap-years.py | AndrasTarlos/s4f | bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426 | [
"CC0-1.0"
] | 4 | 2021-12-13T15:52:00.000Z | 2022-03-28T13:54:53.000Z | # 7kyu | Leap Years
# https://www.codewars.com/kata/526c7363236867513f0005ca/python
def isLeapYear(year):
if year % 400 == 0:
return True
elif year % 100 == 0:
return False
elif year % 4 == 0:
return True
else:
return False
# Leap years should return True
print(isLeap... | 24.565217 | 63 | 0.661947 |
040ebec1777807afe70e3549e6d80cd7a6085b13 | 3,518 | py | Python | src/bo4e/bo/tarifpreisblatt.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/bo/tarifpreisblatt.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/bo/tarifpreisblatt.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | """
Contains Tarifpreisblatt class and corresponding marshmallow schema for de-/serialization
"""
from datetime import datetime
from typing import List, Optional
import attr
from marshmallow import fields
from bo4e.bo.tarifinfo import Tarifinfo, TarifinfoSchema
from bo4e.com.aufabschlag import AufAbschlag, AufAbschla... | 42.902439 | 184 | 0.766913 |
f0b90807b217024997e0b3490a9ddd717bf10f8c | 2,677 | py | Python | tests/test_application.py | Theta-Dev/Spotify-Gender-Ex | 4e5360f115cb3302397b8e1ad1b11ad96b887ad2 | [
"MIT"
] | 1 | 2022-02-05T16:40:13.000Z | 2022-02-05T16:40:13.000Z | tests/test_application.py | Theta-Dev/Spotify-Gender-Ex | 4e5360f115cb3302397b8e1ad1b11ad96b887ad2 | [
"MIT"
] | 31 | 2021-06-17T11:59:33.000Z | 2022-03-19T07:05:18.000Z | tests/test_application.py | Theta-Dev/Spotify-Gender-Ex | 4e5360f115cb3302397b8e1ad1b11ad96b887ad2 | [
"MIT"
] | null | null | null | import os
import unittest
import tests
from spotify_gender_ex import downloader
from spotify_gender_ex.__main__ import start_genderex
DOWNLOAD_IDS = {
'8-5-89-901': '3065569',
'8-5-93-445': '3145501',
'8-5-94-839': '3170083',
'8-5-98-984': '3217260',
'8-6-0-830': '3243383',
'8-6-4-971': '33130... | 33.4625 | 100 | 0.632424 |
f0e7daffc948cdf0c7969c83d105cfd999d835a5 | 2,669 | py | Python | helper_functions/graph_helper_functions.py | weberja/praktikum_graphen | da3ecefdf1327078697e3787cfe19414a9ac13c4 | [
"Apache-2.0"
] | 1 | 2021-07-22T10:28:40.000Z | 2021-07-22T10:28:40.000Z | helper_functions/graph_helper_functions.py | weberja/praktikum_graphen | da3ecefdf1327078697e3787cfe19414a9ac13c4 | [
"Apache-2.0"
] | null | null | null | helper_functions/graph_helper_functions.py | weberja/praktikum_graphen | da3ecefdf1327078697e3787cfe19414a9ac13c4 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
import networkx as nx
from newick import load
from digraph import DiGraph
from helper_functions.graphml import GraphML
def left_siblings(G, node):
parent = _parent(G, node)
if not parent:
return None
for v in children(G, parent):
if G.nodes[v]['order'] == G.nodes... | 23.830357 | 99 | 0.57737 |
9be95b79311893db0b03128c4873593655e12060 | 226 | py | Python | RDS/circle2_use_cases/port/src/server.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 10 | 2020-06-24T08:22:24.000Z | 2022-01-13T16:17:36.000Z | RDS/circle2_use_cases/port/src/server.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 78 | 2020-01-23T14:32:06.000Z | 2022-03-07T14:11:16.000Z | RDS/circle2_use_cases/port/src/server.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 1 | 2020-06-24T08:33:48.000Z | 2020-06-24T08:33:48.000Z | #!/usr/bin/env python
from __init__ import bootstrap
app = bootstrap("UseCasePortService", all=True)
# set the WSGI application callable to allow using uWSGI:
# uwsgi --http :8080 -w app
app.run(port=8080, server="gevent")
| 22.6 | 57 | 0.743363 |
a8a2cb3b46f0ce0a159aeaecd0b7c659104f4f0d | 30,559 | py | Python | pages/dashboard.py | socialdistancingdashboard/frontend | aa102c20af09f18aea601573940e1fb8b94041a3 | [
"Apache-2.0"
] | 4 | 2020-03-31T09:05:26.000Z | 2020-10-08T10:39:53.000Z | pages/dashboard.py | socialdistancingdashboard/frontend | aa102c20af09f18aea601573940e1fb8b94041a3 | [
"Apache-2.0"
] | null | null | null | pages/dashboard.py | socialdistancingdashboard/frontend | aa102c20af09f18aea601573940e1fb8b94041a3 | [
"Apache-2.0"
] | null | null | null | import streamlit as st
import pandas as pd
import numpy as np
import altair as alt
import datetime
import urllib
import json
import requests
from PIL import Image
from io import BytesIO
from .get_airquality_desc import get_airquality_desc
@st.cache(ttl=43200) # time-to-live: 12h
def load_topojson():
#url_topojson ... | 42.325485 | 585 | 0.60555 |
763986c25401405d65d53659079c756a1701c51f | 5,411 | py | Python | project/__init__.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/__init__.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/__init__.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | import logging
import os
from flask import Flask
from flask_babelex import Babel
from flask_cors import CORS
from flask_gzip import Gzip
from flask_mail import Mail, email_dispatched
from flask_migrate import Migrate
from flask_qrcode import QRcode
from flask_security import Security, SQLAlchemySessionUserDatastore
fr... | 27.190955 | 85 | 0.750878 |
7658f0383d8c91f601366b3389051abfc51acf59 | 350 | py | Python | WD/Cwiczenia/obliczenia/wyswietlJakoListe.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | 1 | 2020-02-29T14:38:33.000Z | 2020-02-29T14:38:33.000Z | WD/Cwiczenia/obliczenia/wyswietlJakoListe.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | null | null | null | WD/Cwiczenia/obliczenia/wyswietlJakoListe.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | null | null | null | #Tworzymy funkcję, która będzie przyjmować dowolną ilość argumentów
#Funkcja będzie wyświetlać arguementy w postaci listy numerowanej
def wyswietlJakoListe(* elementy):
dlugosc=len(elementy)
if dlugosc==0:
print("Brak elementów")
else:
for i in range(dlugosc):
print(str... | 31.818182 | 68 | 0.665714 |
76a4ecad84876241a4cc68eb2ee71d6f37fffe7b | 1,149 | py | Python | src/aijack/attack/inversion/utils/datarepextractor.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 24 | 2021-11-17T02:16:47.000Z | 2022-03-27T01:04:08.000Z | src/aijack/attack/inversion/utils/datarepextractor.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 9 | 2021-12-03T06:09:27.000Z | 2022-03-29T06:33:53.000Z | src/aijack/attack/inversion/utils/datarepextractor.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 5 | 2022-01-12T09:58:04.000Z | 2022-03-17T09:29:04.000Z | import torch
class DataRepExtractor:
def __init__(self, net, num_fc_layers=1, m=1, bias=True):
self.net = net
self.num_fc_layers = num_fc_layers
self.m = m
self.bias = bias
# dl_dw = torch.autograd.grad(loss, net.parameters(), retain_graph=True)
# dl_dw = [g.detach... | 31.916667 | 82 | 0.555265 |
4f38e5fd910eb9ab4481a72bc8ec0beda0cc0ddf | 5,073 | py | Python | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTObufferselectbypoint.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 3 | 2019-06-18T15:28:09.000Z | 2019-07-11T07:31:45.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTObufferselectbypoint.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 2 | 2019-07-11T14:03:25.000Z | 2021-02-08T16:14:04.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTObufferselectbypoint.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 1 | 2019-06-12T11:07:37.000Z | 2019-06-12T11:07:37.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from PyQt5.QtCore import Qt,pyqtSignal
from PyQt5.QtGui import QColor,QCursor
from PyQt5.QtWidgets import QAction
from qgis.core import QgsGeometry,QgsWkbTypes,QgsPointXY,QgsCircle,QgsPoint, QgsProject, QgsSnappingUtils, QgsSnappingConfi... | 36.76087 | 124 | 0.653065 |
96ec038c2eee3cb668a1f0c7152c94d57edd4657 | 5,472 | py | Python | src/onegov/search/mixins.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/search/mixins.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/search/mixins.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.search.utils import classproperty
from onegov.search.utils import extract_hashtags
class Searchable(object):
""" Defines the interface required for an object to be searchable.
Note that ``es_id ``, ``es_properties`` and ``es_type_name`` must be class
properties, not instance properties. So do... | 28.8 | 78 | 0.639072 |
50d1e8f9c59218506a0a9efdac1ffe7d8f219537 | 90 | py | Python | Python/BasicDataTypes/second_largest_number.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | Python/BasicDataTypes/second_largest_number.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | Python/BasicDataTypes/second_largest_number.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | _ = input()
l = set(map(int, input().strip().split(' ')))
l.remove(max(l))
print(max(l)) | 15 | 45 | 0.566667 |
e85f5cbc0e423fcfcf69fa8e821d37a826c8d4c7 | 13,282 | py | Python | src/onegov/org/pdf/ticket.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/pdf/ticket.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/pdf/ticket.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.org import _
from datetime import date
from functools import partial
from io import BytesIO, StringIO
from bleach import Cleaner
from bleach.linkifier import LinkifyFilter
from lxml import etree
from pdfdocument.document import MarkupParagraph
from reportlab.platypus import Paragraph
from onegov.chat impo... | 33.288221 | 79 | 0.565352 |
e883df13b1c23c52cc68d6ac22e388f2500449e4 | 588 | py | Python | todo/urls.py | arkarhtethan/simple-django-todo-list | 1d91ec11deb4bdcf9902206ddf754205e3d96447 | [
"MIT"
] | null | null | null | todo/urls.py | arkarhtethan/simple-django-todo-list | 1d91ec11deb4bdcf9902206ddf754205e3d96447 | [
"MIT"
] | 9 | 2019-12-04T22:33:07.000Z | 2022-02-10T08:25:39.000Z | todo/urls.py | arkarhtethan/simple-django-todo-list | 1d91ec11deb4bdcf9902206ddf754205e3d96447 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name="todo"
urlpatterns = [
path('list/',views.TodoListView.as_view(), name="index_view"),
path('api/',views.TodoAPIView.as_view(), name="api_view"),
path('detail/<int:pk>/',views.TodoDetailView.as_view(), name="detail_view"),
path('done/<int:pk>/',views.TodoIt... | 39.2 | 77 | 0.719388 |
e8873bbc3c8c6ab6e6d9153a15c66cb134766694 | 947 | py | Python | ci/setup_submodule.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | ci/setup_submodule.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | ci/setup_submodule.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.000Z | import configparser
import argparse
import os
parser = argparse.ArgumentParser()
parser.add_argument("-s", "--oneflow_src_local_path", type=str, required=False)
parser.add_argument("-r", "--oneflow_src_remote_url", type=str, required=False)
args = parser.parse_args()
assert (
args.oneflow_src_local_path or args.o... | 35.074074 | 79 | 0.720169 |
ad86e8392c0bd104c486e4722e9e5490b1d7f452 | 1,601 | py | Python | marsyas-vamp/marsyas/collections/copy_adjust_mf.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/collections/copy_adjust_mf.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/collections/copy_adjust_mf.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
OMIT_BLANK_LABELS = True
OMIT_MISSING_FILES = True
COPY_ONLY_TEMPOS = True
OMIT_FILES = ["loopBPMs_tempos.mf", "ismir2004_tempos.mf"]
OMIT_FILES = ["loopBPMs_tempos.mf"]
import sys
import glob
import os.path
NEW_DIR=sys.argv[1]
GEORGE_DIR1="/Users/gtzan/data/sound/"
GEORGE_DIR2="/Users/George/... | 27.135593 | 65 | 0.603998 |
0f2dbc5f2117f7894eed1a230e7be7914ba8ab21 | 1,334 | py | Python | backend/tests/integration/test_sanjunzong_penghu.py | SeanGau/vaccinate | f3d7388c666ee466da570e8c17bbe1f2caee912f | [
"MIT"
] | 39 | 2021-05-01T03:36:44.000Z | 2021-11-16T13:29:21.000Z | backend/tests/integration/test_sanjunzong_penghu.py | SeanGau/vaccinate | f3d7388c666ee466da570e8c17bbe1f2caee912f | [
"MIT"
] | 50 | 2021-04-28T10:57:07.000Z | 2021-08-19T05:13:07.000Z | backend/tests/integration/test_sanjunzong_penghu.py | SeanGau/vaccinate | f3d7388c666ee466da570e8c17bbe1f2caee912f | [
"MIT"
] | 19 | 2021-05-02T04:25:02.000Z | 2021-07-11T04:34:16.000Z | import unittest
import os
from Parsers.sanjunzong_penghu import *
from hospital_types import AppointmentAvailability, HospitalAvailabilitySchema
class TestSanjunzongPenghu(unittest.TestCase):
def test_full(self) -> None:
with open("backend/tests/saved_pages/sanjunzong_penghu_full.html") as html_file:
... | 41.6875 | 88 | 0.676162 |
0f3aa1e8783ed9701524a08556722c5b189a3575 | 7,347 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/messaging/rabbitmq/test_rabbitmq_user.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/messaging/rabbitmq/test_rabbitmq_user.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/messaging/rabbitmq/test_rabbitmq_user.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from ansible_collections.community.general.plugins.modules.messaging.rabbitmq import rabbitmq_user
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collections.community.general.tests.unit.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTe... | 54.422222 | 143 | 0.676058 |
7ec25dd4591cc246eb7e90a26777dae110ba4cc3 | 364 | py | Python | portfolio.py | matthewmercuri/mdbacktestv2 | 2525113458cdf71e7d99ac208ad35aea92169b99 | [
"MIT"
] | null | null | null | portfolio.py | matthewmercuri/mdbacktestv2 | 2525113458cdf71e7d99ac208ad35aea92169b99 | [
"MIT"
] | null | null | null | portfolio.py | matthewmercuri/mdbacktestv2 | 2525113458cdf71e7d99ac208ad35aea92169b99 | [
"MIT"
] | null | null | null | import pandas as pd
STOCKPORTCOLS = ['Symbol', 'Quantity', 'Cost Basis']
class Portfolio:
''' Need to add PnL and market value functions
'''
def __init__(self, starting_cash):
self.stock_positions = pd.DataFrame(columns=STOCKPORTCOLS)
self.stock_positions = self.stock_positions.set_index(... | 28 | 71 | 0.695055 |
cb5b0fd45cc280dfc1932811bade4eb699b6c87d | 945 | py | Python | packages/watchmen-rest/src/watchmen_rest/settings.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest/src/watchmen_rest/settings.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest/src/watchmen_rest/settings.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import Set, Dict
from pydantic import BaseSettings
DEV = "dev"
PROD = "production"
class RestSettings(BaseSettings):
"""
REST settings will not construct by itself, it should be inherited and constructed by inheriting one
"""
APP_NAME: str = 'Watchmen REST App',
VERSION: str = '16.0.0'
DESCRIPTION... | 24.868421 | 101 | 0.724868 |
cb7282e933973e79eba1d4e36364ea8c3e67562d | 12,340 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/HTSeq-0.6.1p1-py2.7-linux-x86_64.egg/HTSeq/scripts/count.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/HTSeq-0.6.1p1-py2.7-linux-x86_64.egg/HTSeq/scripts/count.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | ABLIRC/install/external_lib/HTSeq/scripts/count.py | ablifedev/ABLIRC | 875278b748a8e22ada2c76c3c76dbf970be4a6a4 | [
"MIT"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | import sys, optparse, itertools, warnings, traceback, os.path
import HTSeq
class UnknownChrom( Exception ):
pass
def invert_strand( iv ):
iv2 = iv.copy()
if iv2.strand == "+":
iv2.strand = "-"
elif iv2.strand == "-":
iv2.strand = "+"
else:
raise ValueError, "Illegal strand"
ret... | 39.806452 | 118 | 0.543517 |
381bb102271ca760f32a9a5b897116495fc8b2b7 | 271 | py | Python | listings/chapter06/import-json-to-list.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | 2 | 2021-09-20T06:16:41.000Z | 2022-01-17T14:24:43.000Z | listings/chapter06/import-json-to-list.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | listings/chapter06/import-json-to-list.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | import json
with open('iris.json', 'r', newline='') as json_file:
irises = json.load(
json_file,
object_hook = lambda obj: list(obj.values())
)
print(f"{len(irises)} Datensätze importiert.")
print(irises[0])
print(irises[50])
print(irises[100])
| 20.846154 | 53 | 0.645756 |
69db89f48d136e6b8749589dd5cfbc4d54d26915 | 708 | py | Python | pages/extensions/amp_example_preview/util/templates.py | ericandrewlewis/amp.dev | cf8e3d34a5582696ead97563c0809036804ab5c7 | [
"Apache-2.0"
] | 300 | 2015-12-09T20:35:37.000Z | 2019-07-16T06:41:29.000Z | pages/extensions/amp_example_preview/util/templates.py | ericandrewlewis/amp.dev | cf8e3d34a5582696ead97563c0809036804ab5c7 | [
"Apache-2.0"
] | 2,099 | 2019-07-16T13:24:27.000Z | 2022-03-26T12:31:51.000Z | pages/extensions/amp_example_preview/util/templates.py | ericandrewlewis/amp.dev | cf8e3d34a5582696ead97563c0809036804ab5c7 | [
"Apache-2.0"
] | 543 | 2019-07-18T09:06:14.000Z | 2022-03-31T02:43:10.000Z | import os
from grow.documents.document import Document
from jinja2 import contextfilter, Environment, Template
# this is the pod path
BASE_PATH = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../../'))
def load_template(path_in_pod, doc):
"""
:type path_in_pod: str
:type doc: Doc... | 30.782609 | 99 | 0.727401 |
38db9e6e240ec0fbd1127777fec4c922c5afc8be | 8,453 | py | Python | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/recordings/views.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/recordings/views.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/recordings/views.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | import subprocess
import re
import marsyas
import sys
import logging
from django.shortcuts import render_to_response
from django.http import HttpResponse
from recordings.models import Recording
#
# Pitch contour
#
def median_filter(input,window_width):
half = window_width / 2
output = []
for i in range(h... | 44.256545 | 871 | 0.652904 |
2a33dcd7cd87223938675a963301f88b4463bbf3 | 7,127 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/jtcrouter.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/jtcrouter.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/jtcrouter.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2012-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.ec... | 45.394904 | 112 | 0.591273 |
aa838a59279141054fa5c605c7f3e7c6e2957aeb | 1,621 | py | Python | apps/facerecog/aifacerec_keras_predict.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 2 | 2017-11-30T21:12:11.000Z | 2017-12-01T07:52:43.000Z | apps/facerecog/aifacerec_keras_predict.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 14 | 2017-11-14T18:12:53.000Z | 2018-06-03T16:07:57.000Z | apps/facerecog/aifacerec_keras_predict.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 3 | 2018-02-05T10:40:03.000Z | 2018-02-09T09:29:19.000Z | import numpy as np
from keras.models import load_model
from apps.facerecog.aifacerec_keras import contrastive_loss, read_pgm, get_data
get_data()
MODEL_FILENAME = "atnt4.model"
CLASS = 6
IMAGE = 3
def load_image(cls, img):
img = read_pgm("ModelData_AtnTFaces/s" + str(cls) + "/" + str(img) + ".pgm")
img = i... | 32.42 | 173 | 0.674892 |
aaa152762205e8299893111a55e9892a44e25cbb | 68,337 | py | Python | Python/pyBitwiseAutomation/autogenPega.py | jimwaschura/Automation | f655feeea74ff22ebe44d8b68374ba6983748f60 | [
"BSL-1.0"
] | null | null | null | Python/pyBitwiseAutomation/autogenPega.py | jimwaschura/Automation | f655feeea74ff22ebe44d8b68374ba6983748f60 | [
"BSL-1.0"
] | null | null | null | Python/pyBitwiseAutomation/autogenPega.py | jimwaschura/Automation | f655feeea74ff22ebe44d8b68374ba6983748f60 | [
"BSL-1.0"
] | null | null | null | # autogenPega.py
# ================================================================================
# BOOST SOFTWARE LICENSE
#
# Copyright 2020 BitWise Laboratories Inc.
# Original Author.......Jim Waschura
# Contact...............info@bitwiselabs.com
#
# Permission is hereby granted, free of charge, to any person or o... | 33.221682 | 116 | 0.587661 |
2d81983d01b1f5f12525ad1ee08894d13d478132 | 7,314 | py | Python | src/onegov/wtfs/collections/scan_jobs.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/collections/scan_jobs.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/collections/scan_jobs.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.collection import Pagination
from onegov.core.orm.func import unaccent
from onegov.wtfs.models import Municipality
from onegov.wtfs.models import ScanJob
from sqlalchemy import func
from sqlalchemy import or_
class ScanJobCollection(Pagination):
batch_size = 20
initial_sort_by = 'dispatch_da... | 28.909091 | 76 | 0.576839 |
fa8c8fa89934a7c395b764e37c1d78259347d8f3 | 1,334 | py | Python | helment_disturbution_over_an_video.py | nvk681/NFL_Kaggle | f2507d210aa283d8076e7a328e512473be4ef1d3 | [
"MIT"
] | 1 | 2021-12-08T07:22:05.000Z | 2021-12-08T07:22:05.000Z | helment_disturbution_over_an_video.py | nvk681/NFL_Kaggle | f2507d210aa283d8076e7a328e512473be4ef1d3 | [
"MIT"
] | 13 | 2021-10-15T00:27:42.000Z | 2021-12-08T07:22:30.000Z | helment_disturbution_over_an_video.py | Mrinal18/NFL_Kaggle | 7692464d6555e45305a3664c68e33b6eeab72990 | [
"MIT"
] | null | null | null | import cv2
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv('../input/nfl-health-and-safety-helmet-assignment/train_labels.csv')
selected_video_frame_details = {}
video_to_process = cv2.VideoCapture('../input/nfl-health-and-safety-helmet-assignment/train/57583_000082_Endzone.mp4')
fps =... | 33.35 | 140 | 0.705397 |
87cb1048fd7f90946e7deb49a60a6813c7475a86 | 167 | py | Python | Curso-Em-Video-Python/2Exercicios/014_Conversor_de_Temperaturas.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/014_Conversor_de_Temperaturas.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/014_Conversor_de_Temperaturas.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | celsius = float(input('Qual é a temperatura em celsius? '))
fa = ((celsius /5)*9) + 32
print('A conversão de {:.1f}°C, para Fahrenheit é {:.1f}°F'.format(celsius, fa)) | 55.666667 | 80 | 0.652695 |
35bdef8f2d05e20959d4784f8da9c2b3fec9ed45 | 480 | py | Python | 03 Python/Smart Home Dashboard/loesung/logfile/data_logger.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 03 Python/Smart Home Dashboard/loesung/logfile/data_logger.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 03 Python/Smart Home Dashboard/loesung/logfile/data_logger.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | 1 | 2020-10-10T20:24:05.000Z | 2020-10-10T20:24:05.000Z | from abc import ABC, abstractmethod
class DataLogger(ABC):
"""
Abstrakte Basisklasse für Objekte, welche die Messwerte protokollieren
oder über das Internet an einen Backendserver verschicken können.
"""
@abstractmethod
def log_values(self, temperature, humidity, light_switch):
"""... | 32 | 74 | 0.689583 |
57606399f34379022a811de66b4fc2d1f14f6092 | 3,242 | py | Python | apps/projects/forms.py | OpenAdaptronik/Rattler | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 2 | 2018-05-18T08:38:29.000Z | 2018-05-22T08:26:09.000Z | apps/projects/forms.py | IT-PM-OpenAdaptronik/Webapp | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 118 | 2017-10-31T13:45:09.000Z | 2018-02-24T20:51:42.000Z | apps/projects/forms.py | OpenAdaptronik/Rattler | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | null | null | null | from django import forms
from django.utils.translation import gettext_lazy as _
from .models import Project, Category, ProjectImage
class ProjectForm(forms.ModelForm):
category = forms.ModelChoiceField(Category.objects.filter(parent=None), label=_('category'))
subcategory = forms.ChoiceField(label=_('subcateg... | 27.016667 | 96 | 0.599321 |
1025e38ce2a5e752caf643df38627b012cec671d | 678 | py | Python | exercises/de/test_03_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/de/test_03_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/de/test_03_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert "len(doc)" in __solution__, "Berechnest du die Länge des Docs?"
assert "return doc" in __solution__, "Gibst du das Doc in der Komponente korrekt zurück?"
assert "nlp.add_pipe" in __solution__, "Hast du die Komponente zur Pipeline hinzugefügt?"
assert (
"first=True" in __soluti... | 42.375 | 94 | 0.681416 |
1058410fda6bbf90df2f004b8ec05867ece39f75 | 301 | py | Python | setup.py | rsautter/NRDA | 82279ae70ade4e6fe6378e4c571bb7c79395f7e1 | [
"MIT"
] | null | null | null | setup.py | rsautter/NRDA | 82279ae70ade4e6fe6378e4c571bb7c79395f7e1 | [
"MIT"
] | null | null | null | setup.py | rsautter/NRDA | 82279ae70ade4e6fe6378e4c571bb7c79395f7e1 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name="NRDA",
version="1.0",
author='Rubens Andreas Sautter',
author_email='rubens.sautter@gmail.com',
url='https://github.com/rsautter/NRDA',
install_requires=['numpy','tqdm','scipy'],
py_modules=['cNoise','ReactionNBurguers']
)
| 27.363636 | 48 | 0.657807 |
f4dab284bd9002bde4047076aab20225bdc4034c | 508 | py | Python | INBa/2015/Shirlin_V_V/task_3_32.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Shirlin_V_V/task_3_32.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Shirlin_V_V/task_3_32.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задание 3. Вариант 32
#Напишите программу, которая выводит имя "Фредерик Аустерлиц", и запрашивает его псевдоним. Программа должна сцеплять две эти строки и выводить полученную строку, разделяя имя и псевдоним с помощью тире.
#Ширлин Вячеслав Викторович
#10.03.2016
print("Герой нашей сегоднешней программы - Фредерик... | 50.8 | 203 | 0.793307 |
1d4d7041f8cb6fa14536e68383fd1c64d4de29c3 | 550 | py | Python | 1.Array/Problems/rotation_of_array_by_gcd.py | Vinaypatil-Ev/vinEvC_datastructure | 3e02e49c03a2b7d2e09af9a2dce080e6d9abbf74 | [
"MIT"
] | 3 | 2020-09-10T18:40:40.000Z | 2020-09-15T17:32:12.000Z | 1.Array/Problems/rotation_of_array_by_gcd.py | Vinaypatil-Ev/vinEvC_datastructure | 3e02e49c03a2b7d2e09af9a2dce080e6d9abbf74 | [
"MIT"
] | null | null | null | 1.Array/Problems/rotation_of_array_by_gcd.py | Vinaypatil-Ev/vinEvC_datastructure | 3e02e49c03a2b7d2e09af9a2dce080e6d9abbf74 | [
"MIT"
] | null | null | null | #ratation by juggling method
def rotateArr(a, d):
n = len(a)
d = d % n
g = gcd(d, n)
for i in range(g):
temp = a[i]
j = i
while True:
k = j + d
if k >= n:
k = k - n
if k == i:
break
a[j] = a[k]
... | 17.1875 | 35 | 0.349091 |
7f4912bca5364e7263f71a5a88e1ca0d10151bd2 | 4,098 | py | Python | tests/test_mu.py | guruvamsi-policharla/noisy-krotov | c5397d9dbde68d06f17e88620d6a6b2c74664841 | [
"BSD-3-Clause"
] | 49 | 2018-11-07T06:43:33.000Z | 2022-03-18T20:53:06.000Z | tests/test_mu.py | guruvamsi-policharla/noisy-krotov | c5397d9dbde68d06f17e88620d6a6b2c74664841 | [
"BSD-3-Clause"
] | 94 | 2018-11-06T20:15:04.000Z | 2022-01-06T09:06:15.000Z | tests/test_mu.py | qucontrol/krotov | 9f9a22336c433dc3a37637ce8cc8324df4290b46 | [
"BSD-3-Clause"
] | 20 | 2018-11-06T20:03:11.000Z | 2022-03-12T05:29:21.000Z | """Tests for krotov.mu"""
import pytest
from qutip import ket, sigmam, sigmap, sigmax, sigmaz
import krotov
@pytest.fixture
def tls_control_system():
"""Non-trivial control system defined on a TLS"""
eps1 = lambda t, args: 0.5
eps2 = lambda t, args: 1
H1 = [0.5 * sigmaz(), [sigmap(), eps1], [sigmam()... | 31.282443 | 79 | 0.622011 |
7f581b6936caed5f54f27193deb7d64826a8eca8 | 1,142 | py | Python | disenn/models/aggregators.py | AmanDaVinci/DiSENN | ca84a8d646ad8e5e3675ffd19165c20933b81ef7 | [
"MIT"
] | 1 | 2020-08-28T05:06:36.000Z | 2020-08-28T05:06:36.000Z | disenn/models/aggregators.py | AmanDaVinci/DiSENN | ca84a8d646ad8e5e3675ffd19165c20933b81ef7 | [
"MIT"
] | null | null | null | disenn/models/aggregators.py | AmanDaVinci/DiSENN | ca84a8d646ad8e5e3675ffd19165c20933b81ef7 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
class SumAggregator(nn.Module):
def __init__(self, num_classes):
"""Basic Sum Aggregator that aggregates the concepts and relevances by summing their products.
"""
super().__init__()
self.num_classes = num_classes
... | 33.588235 | 112 | 0.648862 |
f6aec55c19c447c9cdf559097c57377f91fbac0b | 6,461 | py | Python | src/bo4e/enum/waehrungscode.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/enum/waehrungscode.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/enum/waehrungscode.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | # pylint: disable=missing-module-docstring
from bo4e.enum.strenum import StrEnum
class Waehrungscode(StrEnum):
"""
Aufzählung der Währungscodes.
"""
AED = "AED" #: UAE Dirham
AFN = "AFN" #: Afghani
ALL = "ALL" #: Lek
AMD = "AMD" #: Armenian Dram
ANG = "ANG" #: Netherlands Antille... | 33.651042 | 86 | 0.533973 |
1204fe43203f6bf9a48efea1a8253e7dc3da668d | 1,867 | py | Python | official/cv/vgg16/ascend310_quant_infer/acc.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/vgg16/ascend310_quant_infer/acc.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/vgg16/ascend310_quant_infer/acc.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.34 | 112 | 0.692555 |
89e3a82f2e4d27e3cd2bdcc38a27398ae86c16c8 | 1,340 | py | Python | data/date_gen.py | Janrupf/airport-db-seeding | 768a9373f02ede5bf613d09270d2fbe84de37a97 | [
"MIT"
] | null | null | null | data/date_gen.py | Janrupf/airport-db-seeding | 768a9373f02ede5bf613d09270d2fbe84de37a97 | [
"MIT"
] | null | null | null | data/date_gen.py | Janrupf/airport-db-seeding | 768a9373f02ede5bf613d09270d2fbe84de37a97 | [
"MIT"
] | null | null | null | import functools
import random
class DateGen:
def __init__(self, year, month):
self.year = year
self.month = month
def __iter__(self):
return self
def __next__(self):
start_day = random.randint(1, 27)
end_day = start_day + random.randint(0, 3)
return (
... | 23.928571 | 96 | 0.576866 |
d61c9e8e22542245b96768e941535ecea40064de | 577 | py | Python | ___Python/Torsten/Python-Kurs/p03_lambda/m03_filtern.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Torsten/Python-Kurs/p03_lambda/m03_filtern.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Torsten/Python-Kurs/p03_lambda/m03_filtern.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | temperaturenGC = [0.7, 2.1, 4.2, 8.2, 12.5, 15.6, 16.9, 16.3, 13.6, 9.5, 4.6, 2.3] #Durchschnittstemp. in Bielefeld
print("Temperaturen in °C:", temperaturenGC)
def mindestens15(temperatur):
return temperatur>= 15
def zwischen5und10(temperatur):
return 5 <= temperatur and temperatur <= 10
def fi... | 25.086957 | 116 | 0.660312 |
d63ea564ec7c71dff374bb0ee32502bf1b2e8a39 | 448 | py | Python | python/generator/generator_solution.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator/generator_solution.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator/generator_solution.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | def check_prime(number):
for divisor in range(2, int(number ** 0.5) + 1):
if number % divisor == 0:
return False
return True
def Primes(max_):
number = 1
generated = 0
while generated < max_:
number += 1
if check_prime(number):
generated += 1
... | 20.363636 | 52 | 0.560268 |
c38f91a178af3239ae48ae1aca8d5fe4c8d10ad0 | 570 | py | Python | scripts/HelloPython/global_and_local_Var_V2.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | scripts/HelloPython/global_and_local_Var_V2.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | scripts/HelloPython/global_and_local_Var_V2.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | #!/usr/bin/env python
# ------------------------------------------------
# --- global_and_local_Var_V2.py ----
# Version vom 19.09.2019 by OJ
# -------------------------------------------------
# WHS - Campus Bocholt - ROP
# globale Variablen - Demo
# -------------------------------------------------
# globale Variabl... | 21.111111 | 51 | 0.473684 |
c3c7610479525a8d445112ddfa98b806b1ffc32d | 364 | py | Python | authapp/urls.py | parekhakhil/BookBugs | 97600877762be058260df823b4eda5ae61770fee | [
"MIT"
] | null | null | null | authapp/urls.py | parekhakhil/BookBugs | 97600877762be058260df823b4eda5ae61770fee | [
"MIT"
] | null | null | null | authapp/urls.py | parekhakhil/BookBugs | 97600877762be058260df823b4eda5ae61770fee | [
"MIT"
] | null | null | null | from django.urls import re_path,path
from . import views
app_name='authapp'
urlpatterns = [
path('accounts/profile/',views.profile_redirector,name='user_profile'),
path('accounts/profile/update/',views.UserProfileUpdateView.as_view(),name='user_profile_update'),
re_path(r'^@(?P<username>[\w-]+)/$', views.U... | 40.444444 | 102 | 0.733516 |
6180f6379c97c72c8412f10e345a0d0845c06591 | 767 | py | Python | deepspeech_test.py | nilsfed/SmarterWecker | 82a64172206fb1065bb0aaac0a769952af136c1a | [
"MIT"
] | null | null | null | deepspeech_test.py | nilsfed/SmarterWecker | 82a64172206fb1065bb0aaac0a769952af136c1a | [
"MIT"
] | null | null | null | deepspeech_test.py | nilsfed/SmarterWecker | 82a64172206fb1065bb0aaac0a769952af136c1a | [
"MIT"
] | null | null | null | from deepspeech import Model
import scipy.io.wavfile as wav
import sys
def load_model(models, lm, trie):
BEAM_WIDTH = 500
LM_ALPHA = 0.75
LM_BETA = 1.85
ds = Model(models, BEAM_WIDTH)
ds.enableDecoderWithLM(lm, trie, LM_ALPHA, LM_BETA)
sample_rate = ds.sampleR... | 21.305556 | 57 | 0.63103 |
6181d8d84484b7519f9035734504099bb0212137 | 2,232 | py | Python | ANN/past_works/sistemas_lineares.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 10 | 2020-12-08T20:18:15.000Z | 2021-06-07T20:00:07.000Z | ANN/past_works/sistemas_lineares.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 2 | 2021-06-28T03:42:13.000Z | 2021-06-28T16:53:13.000Z | ANN/past_works/sistemas_lineares.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 2 | 2021-01-14T19:59:20.000Z | 2021-06-15T11:53:21.000Z | from __future__ import division
import numpy as np
from numpy import linalg
def jacobi(A, b, x0, tol, N):
# preliminares
A, b, x0 = A.astype("double"), b.astype("double"), x0.astype("double")
n = np.shape(A)[0]
x = np.zeros(n)
it = 0
# iteracoes
while it < N:
it = it... | 26.891566 | 77 | 0.46819 |
61c83ce44a452ae5b820a34a13f073180de6f9ce | 42,413 | py | Python | Packs/NutanixHypervisor/Integrations/NutanixHypervisor/NutanixHypervisor.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/NutanixHypervisor/Integrations/NutanixHypervisor/NutanixHypervisor.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/NutanixHypervisor/Integrations/NutanixHypervisor/NutanixHypervisor.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import copy
from typing import Dict
import pytz
import urllib3
from CommonServerPython import *
# Disable insecure warnings
urllib3.disable_warnings()
''' CONSTANTS '''
USECS_ENTRIES_MAPPING = {'boot_time_in_usecs': 'boot_time',
'create_time_usecs': 'create_time',
'... | 41.786207 | 120 | 0.655365 |
149528802809039cb58e5fe4688ca9d4ee21e4f0 | 1,830 | py | Python | main.py | quiode/Radioaktiver-Mutter-Tochter-Zerfall-mit-Python | 3bc6cb297fcb7318d74616d80aefaec1857825ae | [
"MIT"
] | null | null | null | main.py | quiode/Radioaktiver-Mutter-Tochter-Zerfall-mit-Python | 3bc6cb297fcb7318d74616d80aefaec1857825ae | [
"MIT"
] | 1 | 2021-11-15T10:44:18.000Z | 2021-11-15T10:50:52.000Z | main.py | quiode/Radioaktiver-Mutter-Tochter-Zerfall-mit-Python | 3bc6cb297fcb7318d74616d80aefaec1857825ae | [
"MIT"
] | null | null | null | from config import *
import random
class Nuklid:
def __init__(self, nuklid_type: int = 0):
# Type 0 = Mother, Type 1 = 1. Sister, Type 2 = 2. Sister and so on
if nuklid_type >= ANZAHL_MOEGLICHE_TOECHTER or nuklid_type < 0:
raise ValueError(
f"Type {nuklid_type} is bigge... | 33.272727 | 121 | 0.646448 |
2128e9e1e9fb1715c5198a6a70dcd5facdfd46b9 | 2,560 | py | Python | process.py | PAULUAPAUL/MasterThesis_AssociationRulesBiodiversity | 0855abc5ec4835a28be4aa305e5e45e73297b389 | [
"MIT"
] | null | null | null | process.py | PAULUAPAUL/MasterThesis_AssociationRulesBiodiversity | 0855abc5ec4835a28be4aa305e5e45e73297b389 | [
"MIT"
] | null | null | null | process.py | PAULUAPAUL/MasterThesis_AssociationRulesBiodiversity | 0855abc5ec4835a28be4aa305e5e45e73297b389 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from preprocess import *
import time
import sys
def ProcessData (minSup = 0.3,minConf = 0.5,minInt = 0.1,write_csv= True):
print('Minimum Support: ', minSup)
print('Minimum Confidence: ', minConf)
print('Minimum Interest: ', minInt)
print("FP-Growth"... | 44.137931 | 185 | 0.687109 |
b4902e0e0098bcd11e71fc34faf3f44d082d79a5 | 672 | py | Python | RedirectedLoginSession/util/oop.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | RedirectedLoginSession/util/oop.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | RedirectedLoginSession/util/oop.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | def extend(klass):
# type: (type) -> callable
def extender(extension_method):
# type: (callable) -> None
setattr(klass, extension_method.func_name, extension_method)
return None
return extender
def override(klass):
# type: (type) -> callable
def overrider(override_method):... | 26.88 | 71 | 0.644345 |
b4f58384bfe7c0165913903544f985b14849bf8d | 675 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v10_0/update_sales_order_link_to_purchase_order.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/v10_0/update_sales_order_link_to_purchase_order.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v10_0/update_sales_order_link_to_purchase_order.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("buying", "doctype", "supplier_quotation_item")
for doctype in ['Purchase Order','Supplier Quotation']:
frappe.db.sql("""
Update
`tab{doctype} Item`, `tabMateria... | 37.5 | 86 | 0.745185 |
2c09f1c1089045e1282f091a68df9b94f7924e0f | 4,609 | py | Python | scripts/data_preparation.py | jhKessler/Tagesschau-Analysis | 40490b13fa2f3e5cf3bd4b5f4f46b5bf72ab9899 | [
"MIT"
] | null | null | null | scripts/data_preparation.py | jhKessler/Tagesschau-Analysis | 40490b13fa2f3e5cf3bd4b5f4f46b5bf72ab9899 | [
"MIT"
] | null | null | null | scripts/data_preparation.py | jhKessler/Tagesschau-Analysis | 40490b13fa2f3e5cf3bd4b5f4f46b5bf72ab9899 | [
"MIT"
] | null | null | null | # imports
import pandas as pd
import numpy as np
from tqdm import tqdm
import torch
from transformers import pipeline
# load data
print("Loading Data...")
data = pd.read_excel("data/raw.xlsx")
print("Done")
print("Cleaning data...")
# format time string to datetime obj and drop string from df
data["date_and_time"] = ... | 33.398551 | 133 | 0.706444 |
d32787b700e385d2cd594407cb182fdddafdc4aa | 290 | py | Python | Beginner/03. Python/InvertBinaryTree.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 1 | 2021-10-04T05:41:43.000Z | 2021-10-04T05:41:43.000Z | Beginner/03. Python/InvertBinaryTree.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | Beginner/03. Python/InvertBinaryTree.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | class Solution:
def invertTree(self, root: TreeNode) -> TreeNode:
if root:
root.left,root.right=root.right,root.left
self.invertTree(root.left)
self.invertTree(root.right)
return root
else:
return None
| 29 | 53 | 0.548276 |
d3753b83eb06b1b643be64cca584f1b585fac07a | 1,710 | py | Python | IdeaProjects/MachineLearning/HierarchicalClustering.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | 1 | 2018-12-30T14:07:42.000Z | 2018-12-30T14:07:42.000Z | IdeaProjects/MachineLearning/HierarchicalClustering.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | IdeaProjects/MachineLearning/HierarchicalClustering.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
@author: miko
"""
from numpy import *
class cluster_node:
def __init__(self,vec,left=None,right=None,distance=0.0,id=None):
self.left=left
self.right=right
self.vec=vec
self.id=id
self.distance=distance
def L2dist(v1,v2):
return sqrt(sum(v1... | 30.535714 | 136 | 0.580117 |
2cb603d379bc4d37d544c37c26f938a3ffb3b535 | 5,955 | py | Python | tests/test_ausschreibungsdetail.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_ausschreibungsdetail.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_ausschreibungsdetail.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | from decimal import Decimal
import pytest # type:ignore[import]
from bo4e.com.ausschreibungsdetail import Ausschreibungsdetail, AusschreibungsdetailSchema
from bo4e.com.menge import Menge
from bo4e.enum.mengeneinheit import Mengeneinheit
from bo4e.enum.netzebene import Netzebene
from bo4e.enum.zaehlertyp import Zaeh... | 40.510204 | 113 | 0.559194 |
2cb79452a5d371ee2d466cd3669ce043c0eaaddc | 2,052 | py | Python | pyscriptsforpentesters-main/scripts/ftpbust3r.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | pyscriptsforpentesters-main/scripts/ftpbust3r.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | pyscriptsforpentesters-main/scripts/ftpbust3r.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | from ftplib import FTP # a class to implement the ftp client side
from colorama import Fore, init # for printing fancy colors on terminal
# init the console for colors (Windows)
# init()
# hostname or IP address of the FTP server
host = input("Enter the hostname/ip: ")
# username of the FTP server, root as defa... | 41.877551 | 123 | 0.639864 |
200d447757001b7a87006147c314eef8887cd9df | 1,465 | py | Python | OSINT-SPY-master/modules/company_detail.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | OSINT-SPY-master/modules/company_detail.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | OSINT-SPY-master/modules/company_detail.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | from .config import *
from .utils import format_dict
import clearbit
import requests
clearbit.key = clearbit_api_key
def get_company_detail(domain, json_output=False):
try:
company = clearbit.Company.find(domain=domain, stream=True)
except Exception as e:
print(e)
else:
... | 35.731707 | 103 | 0.563823 |
37aa609fbc884744ec34043a2b0be7a38b352c50 | 696 | py | Python | build/lib/AESEncryptor_heureka_code/Exceptions/__init__.py | heureka-code/AESEncryptor-heureka-code | 9b11ed77148971672f6e6113a4411fae56e5712c | [
"MIT"
] | null | null | null | build/lib/AESEncryptor_heureka_code/Exceptions/__init__.py | heureka-code/AESEncryptor-heureka-code | 9b11ed77148971672f6e6113a4411fae56e5712c | [
"MIT"
] | null | null | null | build/lib/AESEncryptor_heureka_code/Exceptions/__init__.py | heureka-code/AESEncryptor-heureka-code | 9b11ed77148971672f6e6113a4411fae56e5712c | [
"MIT"
] | null | null | null | from .PasswordExceptions import PasswordError, WrongPassword
from .FileExceptions import FileError, FileIsEncrypted, FileIsNotEncrypted
from .TextExceptions import TextError, TextIsEncrypted, TextIsNotEncrypted
from .PasswordExceptions import __doc__ as PasswordExceptions__doc__
from .FileExceptions import __doc__ as ... | 49.714286 | 100 | 0.777299 |
80a9dd6d4bd7270e0faeb9acee22862ba98f0347 | 435 | py | Python | Visual Studio Product Team/Visual Studio 2010 SDK Samples/[C++]-Visual Studio 2010 SDK Samples/IronPython Studio VS Shell Isolated/C#,C++/studioisolated/IronPython/src/IronPython.Project/Templates/Projects/WPFApp/Window1.py | zzgchina888/msdn-code-gallery-microsoft | 21cb9b6bc0da3b234c5854ecac449cb3bd261f29 | [
"MIT"
] | 2 | 2022-01-21T01:40:58.000Z | 2022-01-21T01:41:10.000Z | Common7/IDE/src/IronPython.Project/Templates/Projects/WPFApp/Window1.py | jdm7dv/visual-studio | 16cff89cee98f3c5e1c3e6134d1658c271a5902f | [
"Apache-2.0"
] | 1 | 2022-03-15T04:21:41.000Z | 2022-03-15T04:21:41.000Z | Common7/IDE/src/IronPython.Project/Templates/Projects/WPFApp/Window1.py | jdm7dv/visual-studio | 16cff89cee98f3c5e1c3e6134d1658c271a5902f | [
"Apache-2.0"
] | null | null | null | from System import *
from System.IO import *
from System.Windows import *
from clr import *
import System
import System.Windows
class $safeprojectname$: # namespace
class $safeitemname$:
"""type(Root) == System.Windows.Window"""
__slots__ = [ 'Root' ]
def __init__(self):
... | 29 | 124 | 0.671264 |
206b2de002f0981eed1442fbb16b370531c716d6 | 4,657 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_ospf.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_ospf.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_ospf.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import pa... | 43.523364 | 103 | 0.646339 |
b352df135067cc934f6eccd03084de54c7780630 | 78 | py | Python | src/sft/qsft/__init__.py | huykingsofm/FileTransmitter | f0f8cd0d6f941903bb8c42291a81b711055fcb1a | [
"MIT"
] | 1 | 2020-08-28T19:06:13.000Z | 2020-08-28T19:06:13.000Z | src/sft/qsft/__init__.py | huykingsofm/sft | f0f8cd0d6f941903bb8c42291a81b711055fcb1a | [
"MIT"
] | null | null | null | src/sft/qsft/__init__.py | huykingsofm/sft | f0f8cd0d6f941903bb8c42291a81b711055fcb1a | [
"MIT"
] | null | null | null | from sft.qsft.client import QSFTClient
from sft.qsft.server import QSFTServer
| 26 | 38 | 0.846154 |
6429c782c7c88aeaa72715f6b8949af4f1b75af5 | 5,439 | py | Python | prep/preprocess-neighborhoods.py | Empythy/geometry-learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 21 | 2018-10-09T08:15:29.000Z | 2022-03-16T08:23:08.000Z | prep/preprocess-neighborhoods.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 31 | 2017-09-20T13:30:37.000Z | 2018-03-01T13:24:58.000Z | prep/preprocess-neighborhoods.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 7 | 2018-11-29T11:39:02.000Z | 2022-01-12T07:10:26.000Z | """
Preprocessing script to convert well-known-text geometries to matrix representations thereof.
With a SANE_NUMBER_OF_POINTS set to 2048, it simplifies only 248
"""
import os
from datetime import timedelta
from time import time
from zipfile import ZipFile
import matplotlib.pyplot as plt
import numpy as np
from pand... | 39.992647 | 119 | 0.727156 |
2bc822ce9c0618644ee9d68e50b07b1961e450ec | 1,274 | py | Python | graph_network/dataset/dataset.py | stevezheng23/graph_network_tf | b48a43453c2731f253bfe5a61e0b6339f4fc9f99 | [
"Apache-2.0"
] | null | null | null | graph_network/dataset/dataset.py | stevezheng23/graph_network_tf | b48a43453c2731f253bfe5a61e0b6339f4fc9f99 | [
"Apache-2.0"
] | null | null | null | graph_network/dataset/dataset.py | stevezheng23/graph_network_tf | b48a43453c2731f253bfe5a61e0b6339f4fc9f99 | [
"Apache-2.0"
] | null | null | null | import os.path
import numpy as np
import tensorflow as tf
from data.utility import *
__all__ = ["Dataset"]
class Dataset(object):
"""base dataset"""
def __init__(self,
base_path,
dataset_name="base",
dataset_url=None):
"""initialize base dataset"""
... | 24.980392 | 76 | 0.592622 |
a690f6f9d93f0c544c5a0183ca6d95608e531302 | 273 | py | Python | 2270-number-of-ways-to-split-array/2270-number-of-ways-to-split-array.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 2270-number-of-ways-to-split-array/2270-number-of-ways-to-split-array.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 2270-number-of-ways-to-split-array/2270-number-of-ways-to-split-array.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def waysToSplitArray(self, nums: List[int]) -> int:
sumnums = sum(nums)
sofar, output = 0, 0
for i in range(len(nums)-1):
sofar+=nums[i]
if 2*sofar>=sumnums:
output+=1
return output | 30.333333 | 55 | 0.512821 |
75062975d3dfaf9f03cc1c198dccc68cd36630b3 | 224 | py | Python | Python/EstruturaSequencial/Exercicios/Exercicio06.py | ekballo/Back-End | b252e3b2a16ce36486344823f14afa6691fde9bc | [
"MIT"
] | null | null | null | Python/EstruturaSequencial/Exercicios/Exercicio06.py | ekballo/Back-End | b252e3b2a16ce36486344823f14afa6691fde9bc | [
"MIT"
] | null | null | null | Python/EstruturaSequencial/Exercicios/Exercicio06.py | ekballo/Back-End | b252e3b2a16ce36486344823f14afa6691fde9bc | [
"MIT"
] | null | null | null | #Faça um Programa que peça o raio de um círculo, calcule e mostre sua área.
raio = float(input('Digite o valor do círculo em m2: '))
pi = 3.14
area = pi * (raio ** 2)
print('A area do círculo é de {:.1f}'.format(area,pi)) | 28 | 75 | 0.665179 |
75176e3b1e8ba29962a6efc04e6bd269198ddfa5 | 3,472 | py | Python | migrations/versions/3c5b34fd1156_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | migrations/versions/3c5b34fd1156_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | migrations/versions/3c5b34fd1156_.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | """empty message
Revision ID: 3c5b34fd1156
Revises: 27da3ceea723
Create Date: 2020-11-08 19:11:32.132404
"""
import sqlalchemy as sa
import sqlalchemy_utils
from alembic import op
from sqlalchemy import orm
from sqlalchemy.ext.declarative import declarative_base
from project import dbtypes
# revision identifiers, u... | 30.191304 | 85 | 0.656682 |
f3773e85b709f8242d13fba4df19c5129da606f8 | 811 | py | Python | euler-21.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | euler-21.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | euler-21.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | def ambialna_stevila_do_n(n):
abialna_stevila = set()
potencialni_abialni_par = {-1:0,0:-1,1:1}
for x in range(1,n+1):
delitelji = [1]
for y in range(2,(x//2)+2):
if x % y == 0:
delitelji.append(y)
if sum(delitelji) > 10000:
potencialn... | 32.44 | 69 | 0.563502 |
1b38c272b722d16e0fc09c76bb6b8640fc0c774d | 1,986 | py | Python | src/comex_stat/assets/migrations/0007_auto_20181115_0208.py | mdicgovbr/2018.2-ComexStat | 9eb339e6995585061317d41eabed99b569472806 | [
"MIT"
] | null | null | null | src/comex_stat/assets/migrations/0007_auto_20181115_0208.py | mdicgovbr/2018.2-ComexStat | 9eb339e6995585061317d41eabed99b569472806 | [
"MIT"
] | null | null | null | src/comex_stat/assets/migrations/0007_auto_20181115_0208.py | mdicgovbr/2018.2-ComexStat | 9eb339e6995585061317d41eabed99b569472806 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.2 on 2018-11-15 02:08
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('assets', '0006_auto_20181115_0206'),
]
operations = [
migrations.AlterField(
model_name='ncm',
... | 44.133333 | 288 | 0.625378 |
1b483223dcd74805e5a0abbdbe4ddcda11461561 | 291 | py | Python | Pythonjunior2020/Woche2/Aufgabe_2_3_2.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche2/Aufgabe_2_3_2.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche2/Aufgabe_2_3_2.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | # 2.3.2, Woche 2, Block 3, Aufgabe 2
# Dekleration
stamp = 100
round_time = 17
# IF-Schleife
while stamp >= round_time :
print("Lasst uns noch eine Runde spielen")
stamp = stamp - round_time
print("Verbleibende Zeit:", stamp)
# keine Runde mehr
print("Jetzt gibt es Essen")
| 19.4 | 46 | 0.680412 |
04885ec3601c990360c8096b16d77e02630d4bf9 | 9,180 | py | Python | learning/notes_bert.py | dainst/chronoi-corpus-processing | 7f508a7572e1022c4c88d1477db029e6619a1f0c | [
"MIT"
] | null | null | null | learning/notes_bert.py | dainst/chronoi-corpus-processing | 7f508a7572e1022c4c88d1477db029e6619a1f0c | [
"MIT"
] | null | null | null | learning/notes_bert.py | dainst/chronoi-corpus-processing | 7f508a7572e1022c4c88d1477db029e6619a1f0c | [
"MIT"
] | null | null | null | ##
# 07_bert
##
import torch
from torch.optim import Adam
from torch.utils.data import TensorDataset, DataLoader, RandomSampler, SequentialSampler
from pytorch_pretrained_bert import BertTokenizer, BertConfig
from pytorch_pretrained_bert import BertForTokenClassification, BertAdam
from tqdm import trange
def do_07_b... | 42.897196 | 109 | 0.638998 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.