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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
66ddf371dd8a4c22bd198cec9d1bcf8dcf8cf976 | 1,832 | py | Python | haas_lib_bundles/python/docs/examples/auto_humidifier/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/auto_humidifier/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/auto_humidifier/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | import utime # 延时函数在utime库中
from driver import GPIO,I2C
import sht3x
from ssd1306 import SSD1306_I2C
hum_s = 0
oled = None
sht3xDev = None
humi_gpio = None
def sht3x_init():
global sht3xDev
i2cDev = I2C()
i2cDev.open("sht3x")
sht3xDev = sht3x.SHT3X(i2cDev)
def humi_ctrl_init():
global humi_gpi... | 23.189873 | 80 | 0.554585 |
dd2dab56240968875b3869c122b1498c77aa6576 | 2,489 | py | Python | Grundlagen/uebung_strukturen.py | kilian-funk/Python-Kurs | f5ef5a2fb2a875d2e80d77c1a6c3596a0e577d7f | [
"MIT"
] | null | null | null | Grundlagen/uebung_strukturen.py | kilian-funk/Python-Kurs | f5ef5a2fb2a875d2e80d77c1a6c3596a0e577d7f | [
"MIT"
] | null | null | null | Grundlagen/uebung_strukturen.py | kilian-funk/Python-Kurs | f5ef5a2fb2a875d2e80d77c1a6c3596a0e577d7f | [
"MIT"
] | null | null | null | """
Übung 01: Verzweigung (if-Ausdruck)
Schreibe ein kurzes Programm, dass den Benutzer fragt, ob er heute
Geburtstag hat. Wenn die Antwort ja ist, soll das Programm ihm Gratulieren.
Nutze die folgende Seite, wenn du Hilfe brauchst:
https://www.python-lernen.de/if-abfrage-python.htm
"""
# benutzer_eingabe = input("H... | 23.704762 | 78 | 0.73403 |
06d5cd7415382cc853ce943ba24ff44eb3069f3a | 209 | py | Python | OSCP/walkthrough/HTB/stego/longbottom/pickleread.py | bbhunter/Security-Guide | 139cfba3b30a4ca6a32d11aa025638d0a9c5c541 | [
"MIT"
] | 98 | 2019-11-20T05:26:30.000Z | 2022-01-27T05:05:39.000Z | OSCP/walkthrough/HTB/stego/longbottom/pickleread.py | bbhunter/Security-Guide | 139cfba3b30a4ca6a32d11aa025638d0a9c5c541 | [
"MIT"
] | null | null | null | OSCP/walkthrough/HTB/stego/longbottom/pickleread.py | bbhunter/Security-Guide | 139cfba3b30a4ca6a32d11aa025638d0a9c5c541 | [
"MIT"
] | 34 | 2019-11-25T14:29:16.000Z | 2021-10-18T16:40:42.000Z | import pickle
f = open('/root/Hunt/HTB/stego/longbottom/_socute.jpg.extracted/donotshare')
o = pickle.load(f)
outstr = ''
for line in o:
for char,n in line:
outstr += char*n
outstr += '\n'
print outstr
| 16.076923 | 76 | 0.684211 |
bb78c039b4cdde96d5e00acb0b43bdffb28c784d | 3,828 | py | Python | MoPulseGen/lib/model_funcs.py | tushar-agarwal2909/MoPulseGen | a0edeaf67f956e7db27e70f07e47d2f992bcb6f3 | [
"BSD-2-Clause"
] | null | null | null | MoPulseGen/lib/model_funcs.py | tushar-agarwal2909/MoPulseGen | a0edeaf67f956e7db27e70f07e47d2f992bcb6f3 | [
"BSD-2-Clause"
] | null | null | null | MoPulseGen/lib/model_funcs.py | tushar-agarwal2909/MoPulseGen | a0edeaf67f956e7db27e70f07e47d2f992bcb6f3 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Oct 21 21:53:22 2018
@author: agarwal.270a
"""
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
eps=1e-7
def flip(x,y):
"""Flip augmentation
Args:
x: Image to flip
Returns:
Augmented image
"""
... | 32.717949 | 135 | 0.599791 |
bbb23d9e9768b5438e5441795373a0a2e182eeec | 4,372 | py | Python | spider/got/tweet-dialog.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | spider/got/tweet-dialog.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | 2 | 2021-03-31T18:54:16.000Z | 2021-12-13T19:49:08.000Z | spider/got/tweet-dialog.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | <div> class="PermalinkOverlay-modal" id="permalink-overlay-dialog" role="dialog" aria-labelledby="permalink-overlay-header" </div>
<div class="PermalinkOverlay-content" role="document">
<div class="PermalinkOverlay-body" data-background-path="/hoorfre">
<div role="main" class="permalink light-inline-actions... | 37.050847 | 130 | 0.596752 |
591b0e9be08e06059ecda101639d72bebccd98b1 | 114 | py | Python | Python-programming-1/add.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | null | null | null | Python-programming-1/add.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | null | null | null | Python-programming-1/add.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | 1 | 2020-09-30T18:53:05.000Z | 2020-09-30T18:53:05.000Z | a=int(input("Enter the first number"))
b=int(input("Enter the second number"))
c=a+b
print("the sum is",c)
| 19 | 39 | 0.649123 |
a73abb5d327080398550ec882128550b9ba0ef33 | 141 | py | Python | tf/old_clasificador/_et/demo_json.py | alffore/lokroids-python | ac3bbc328140e53ab181034d2e3d5d5d17dc9203 | [
"MIT"
] | null | null | null | tf/old_clasificador/_et/demo_json.py | alffore/lokroids-python | ac3bbc328140e53ab181034d2e3d5d5d17dc9203 | [
"MIT"
] | null | null | null | tf/old_clasificador/_et/demo_json.py | alffore/lokroids-python | ac3bbc328140e53ab181034d2e3d5d5d17dc9203 | [
"MIT"
] | null | null | null | import json
data = dict()
data['hola'] = 'mundo'
with open('data.json', 'w') as outfile:
json.dump(data, outfile, ensure_ascii=False)
| 15.666667 | 48 | 0.659574 |
557e2af304dd11a3c0109c68ec8537a57acbcaba | 233 | py | Python | exercises/es/solution_02_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/es/solution_02_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/es/solution_02_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
# Carga el modelo es_core_news_md
nlp = spacy.load("es_core_news_md")
# Procesa un texto
doc = nlp("Hoy hice pan de banano")
# Obtén el vector para el token "banano"
banano_vector = doc[4].vector
print(banano_vector)
| 19.416667 | 40 | 0.751073 |
e97c6efa0e824162995f9c19e761daa27b92575a | 95,409 | py | Python | crackfb.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 5 | 2021-01-23T10:20:00.000Z | 2022-01-24T14:44:38.000Z | crackfb.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | crackfb.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | ############################
#HAHAHAHAHA MAU RECODE YA....
#IRI BILANG BOSS
#HAHAHAHAHAHAHAHAHAHAHA
#
#
import marshal
exec(marshal.loads('c\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00@\x00\x00\x00s\x15\x04\x00\x00d\x00\x00d\x01\x00l\x00\x00Z\x00\x00d\x00\x00d\x01\x00l\x01\x00Z\x01\x00d\x00\x00d\x01\x00l\x02\x00Z... | 8,673.545455 | 95,287 | 0.742121 |
ddb3b8bc22a7f41b9b96065ab91e3edc998dee4e | 202 | py | Python | py_client/create.py | saulhappy/drf | 5e62da54cdf0f0fead742c891d34e7eacd488a1b | [
"MIT"
] | null | null | null | py_client/create.py | saulhappy/drf | 5e62da54cdf0f0fead742c891d34e7eacd488a1b | [
"MIT"
] | null | null | null | py_client/create.py | saulhappy/drf | 5e62da54cdf0f0fead742c891d34e7eacd488a1b | [
"MIT"
] | null | null | null | import requests
endpoint = "http://localhost:8000/api/products/"
data = {
"title": "product title",
"price": 15
}
get_response = requests.post(endpoint, json=data)
print(get_response.json())
| 16.833333 | 49 | 0.688119 |
5512a6a695818c6167de4e231ae28493ce91e6eb | 1,216 | py | Python | RunFaster/simple_workouts/simple_3.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | RunFaster/simple_workouts/simple_3.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | RunFaster/simple_workouts/simple_3.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | from multiprocessing import Queue, Lock, Process, current_process
import queue, time
'''
where we are adding tasks to the queue, then creating processes and starting them, then using join() to complete the processes. Finally we are printing the log from the second queue
'''
def doJob(task_to_complete_queue, task... | 26.434783 | 185 | 0.648849 |
9b984d8bd9e9c96ba951658841911a0911d88da7 | 1,808 | py | Python | src/server/bo/User.py | ralfstefanbender/Studifix2 | 281c0a89ce56796437fe054068058c0f01a7df02 | [
"RSA-MD"
] | null | null | null | src/server/bo/User.py | ralfstefanbender/Studifix2 | 281c0a89ce56796437fe054068058c0f01a7df02 | [
"RSA-MD"
] | null | null | null | src/server/bo/User.py | ralfstefanbender/Studifix2 | 281c0a89ce56796437fe054068058c0f01a7df02 | [
"RSA-MD"
] | null | null | null | from server.bo import BusinessObject as bo
class User (bo.BusinessObject):
"""Realisierung einer exemplarischen Benutzerklasse.
Aus Gründen der Vereinfachung besitzt der Kunden in diesem Demonstrator
lediglich einen einfachen Namen, eine E_Mail-Adresse sowie eine außerhalb
unseres Systems verwaltete ... | 32.872727 | 102 | 0.631637 |
b5f3f6a7586b7049582f4c5ae7a572bf05dde27c | 1,646 | py | Python | top/clearlight/base/liaoxuefeng/object_oriented/get_ObjInfo.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | 1 | 2020-01-16T09:23:43.000Z | 2020-01-16T09:23:43.000Z | top/clearlight/base/liaoxuefeng/object_oriented/get_ObjInfo.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | top/clearlight/base/liaoxuefeng/object_oriented/get_ObjInfo.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | # 获取对象信息
import types
# 使用type()函数
from PyQt5.QtNetwork.QUdpSocket import readData
print(type(123))
print(type('str'))
print(type(None))
print(type(abs))
print(type(123) == type(456))
print(type(213) == int)
print(type('abc') == type(123))
def fn():
pass
print(type(fn))
print(type(fn) == types.FunctionType)
... | 16.46 | 58 | 0.654313 |
bd0c8c9347cbf74fcbe4f25cf0f6619d2b23620a | 4,985 | py | Python | src/onegov/election_day/views/subscription.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/subscription.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/subscription.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from morepath.request import Response
from onegov.core.security import Public
from onegov.election_day import _
from onegov.election_day import ElectionDayApp
from onegov.election_day.collections import EmailSubscriberCollection
from onegov.election_day.collections import SmsSubscriberCollection
from onegov.election_da... | 30.212121 | 79 | 0.65677 |
9e56ee12a867b559c4907eaa61d8c1de920fe817 | 27,076 | py | Python | x2paddle/project_convertor/pytorch/ast_update.py | usertianqin/X2Paddle | b554a8094ca3e255ef4bd2e80337222a35625133 | [
"Apache-2.0"
] | 559 | 2019-01-14T06:01:55.000Z | 2022-03-31T02:52:43.000Z | x2paddle/project_convertor/pytorch/ast_update.py | usertianqin/X2Paddle | b554a8094ca3e255ef4bd2e80337222a35625133 | [
"Apache-2.0"
] | 353 | 2019-05-07T13:20:03.000Z | 2022-03-31T05:30:12.000Z | x2paddle/project_convertor/pytorch/ast_update.py | usertianqin/X2Paddle | b554a8094ca3e255ef4bd2e80337222a35625133 | [
"Apache-2.0"
] | 241 | 2018-12-25T02:13:51.000Z | 2022-03-27T23:21:43.000Z | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 43.183413 | 97 | 0.55828 |
f51c3a63da004454a850f95b831902cae50c43a8 | 98 | py | Python | python_playground/not_useful/ground_truth.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_playground/not_useful/ground_truth.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_playground/not_useful/ground_truth.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | if __name__ == '__main__':
my_lst = ['./ ground_truth', 'com-dblp-ungraph', 50, 51]
print
| 24.5 | 60 | 0.602041 |
f5493b38dc5f079bd070432ff2b6fa32d59a9936 | 340 | py | Python | Algorithms/Sorting/InsertionSort2.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Sorting/InsertionSort2.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Sorting/InsertionSort2.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
s = int(raw_input())
ar = map(int, raw_input().split())
for i in xrange(1, s):
if ar[i] < ar[i-1]:
x = ar[i]
j = i
while j > 0 and x < ar[j-1]:
ar[j] = ar[j-1]
#ar[j], ar[j-1] = ar[j-1], ar[j]
j -= 1
ar[j] = x
print ' '... | 20 | 44 | 0.391176 |
f584f55e73dc91036cf98d00f7855889e2cbe577 | 47 | py | Python | mumath/__init__.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | mumath/__init__.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | mumath/__init__.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | from .config import *
from .core import MuMath
| 15.666667 | 24 | 0.765957 |
198676e5ef0a0abb1eb783f2d81e87b4b2b5cb65 | 1,487 | py | Python | Boot2Root/vulnhub/Trollcave-v1-2/scripts/user-hint-enum.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | 21 | 2016-02-06T14:30:01.000Z | 2020-09-11T05:39:17.000Z | Boot2Root/vulnhub/Trollcave-v1-2/scripts/user-hint-enum.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | null | null | null | Boot2Root/vulnhub/Trollcave-v1-2/scripts/user-hint-enum.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | 7 | 2017-02-02T16:27:02.000Z | 2021-04-30T17:14:53.000Z | import requests
import re
def GetUserByID(id):
response = (requests.get('http://192.168.1.30/users/' + str(id)).text).strip()
# Match <a href="/send_pm?recipient_name=King">PM</a>
username = re.search('recipient_name=(.*?)"', response).group(1)
return username
def GetRoleByID(id):
response = (requests.get('http:... | 41.305556 | 433 | 0.763954 |
fdc585f3e5a0a7104ad4452d51524b8c0839de84 | 7,530 | py | Python | spo/utils/onlinetermin.py | libracore/spo | efff6da53a776c4483f06d9ef1acc8a7aa96b28e | [
"MIT"
] | null | null | null | spo/utils/onlinetermin.py | libracore/spo | efff6da53a776c4483f06d9ef1acc8a7aa96b28e | [
"MIT"
] | 6 | 2019-08-23T18:36:26.000Z | 2019-11-12T13:12:12.000Z | spo/utils/onlinetermin.py | libracore/spo | efff6da53a776c4483f06d9ef1acc8a7aa96b28e | [
"MIT"
] | 1 | 2021-08-14T22:22:43.000Z | 2021-08-14T22:22:43.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2021, libracore and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
import time
from spo.utils.payrexx import get_payment_status, create_payment
@frappe.whitelist(allow_guest=True)
def check_membership(member,... | 39.631579 | 116 | 0.552855 |
8be743038d0565c08046bd1f5a2d6fb18e2f4b1d | 257 | py | Python | exercises/pt/exc_01_03_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/exc_01_03_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/exc_01_03_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | # Importar spacy e criar o objeto nlp do Português
import ____
nlp = ____
# Processar o texto
doc = ____("Eu gosto de gatos e cachorros.")
# Selecionar o primeiro token
first_token = doc[____]
# Imprimir o texto do primeito token
print(first_token.____)
| 19.769231 | 50 | 0.754864 |
f5d492e19d24ee2c32e1596e68f330702996e846 | 2,933 | py | Python | s-mbf-master/src/Tkomen2.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 50 | 2019-03-07T16:33:01.000Z | 2022-01-05T11:13:47.000Z | s-mbf-master/src/Tkomen2.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 3 | 2019-03-11T08:26:38.000Z | 2019-08-08T17:39:42.000Z | s-mbf-master/src/Tkomen2.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 38 | 2019-03-28T16:03:38.000Z | 2021-04-01T10:40:26.000Z | #Python 3.7.X
#Author: KANG-NEWBIE ©2019
import requests,os,sys
from src import Genkuki
from bs4 import BeautifulSoup as BS
from multiprocessing.pool import ThreadPool
class Tkomnew:
def __init__(self):
self.c=1
self.link=[]
self.req=requests.Session()
self.u='https://mbasic.facebook.com{}'
sel... | 28.201923 | 109 | 0.574497 |
de437393b0510e404c37efc19cd008a848a85faf | 3,055 | py | Python | etl/shared/stats_collector.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 7 | 2020-04-23T20:16:11.000Z | 2022-01-04T14:57:16.000Z | etl/shared/stats_collector.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 361 | 2020-04-23T17:20:14.000Z | 2022-03-02T11:29:45.000Z | etl/shared/stats_collector.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 1 | 2021-11-29T06:02:52.000Z | 2021-11-29T06:02:52.000Z | import os
from reporting.report_generator import ReportGenerator
from shared.logger_factory import LoggerFactory
ROOT_DIR = os.environ['ROOT_DIR']
logger = LoggerFactory.get_general_logger()
class StatsCollector:
""" Providing static methods for collecting ETL statistics """
ERROR_TYPE_FETCHING = 'fetchin... | 33.206522 | 95 | 0.667758 |
720a52389df42ebabc7ba8b30052c6449a91d544 | 99 | py | Python | scripts/docker/test_visit.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | scripts/docker/test_visit.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | scripts/docker/test_visit.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | OpenDatabase("visit/data/curv2d.silo")
AddPlot("Pseudocolor", "d")
DrawPlots()
SaveWindow()
quit()
| 16.5 | 38 | 0.737374 |
9d3b108eb513a48d3950a9b3a0e948ec10298077 | 15,489 | py | Python | src/onegov/ballot/models/election/election_compound.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/ballot/models/election/election_compound.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/ballot/models/election/election_compound.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from collections import OrderedDict
from onegov.ballot.constants import election_day_i18n_used_locales
from onegov.ballot.models.election.candidate import Candidate
from onegov.ballot.models.election.candidate_result import CandidateResult
from onegov.ballot.models.election.election import Election
from onegov.ballot.m... | 35.937355 | 79 | 0.662276 |
19f80b824c65a3c2e3004191b8e3772c63fcbce2 | 9,509 | py | Python | tests/test_toolbox.py | oliviaguest/SLIX | 2f19382c650267d0a76456c796cd3e0afe04d880 | [
"MIT"
] | null | null | null | tests/test_toolbox.py | oliviaguest/SLIX | 2f19382c650267d0a76456c796cd3e0afe04d880 | [
"MIT"
] | null | null | null | tests/test_toolbox.py | oliviaguest/SLIX | 2f19382c650267d0a76456c796cd3e0afe04d880 | [
"MIT"
] | null | null | null | from SLIX.toolbox import *
class TestToolbox:
def test_all_peaks(self):
# Create an absolute simple peak array
arr = numpy.array([0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0])
real_peaks = numpy.argwhere(arr == 1).flatten()
toolbox_peaks = all_peaks(arr, cut_edges=False)
assert numpy.a... | 50.579787 | 124 | 0.6558 |
dfaafcde07c9711978ac373d8444565a14df1baa | 554 | py | Python | DataStructures/Heap/Cookies.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/Heap/Cookies.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/Heap/Cookies.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
import heapq
import pdb
N, K = map(int, raw_input().split())
heap = map(int, raw_input().split())
heapq.heapify(heap)
opera_num = 0
while 1:
if len(heap) >= 2:
if heap[0] >= K:
print opera_num
break
least = heapq.heappop(heap)
second = heapq.... | 17.3125 | 39 | 0.516245 |
5f1b4163e3e7d3fea3f67dd3308a3a703eb12d55 | 1,182 | py | Python | partner_ngos/fund_management/doctype/logical_framework/logical_framework.py | AkramMutaher/partner_ngos | 4a345fb6989ff5a21db7fca07aa4e5174dca8f59 | [
"MIT"
] | null | null | null | partner_ngos/fund_management/doctype/logical_framework/logical_framework.py | AkramMutaher/partner_ngos | 4a345fb6989ff5a21db7fca07aa4e5174dca8f59 | [
"MIT"
] | null | null | null | partner_ngos/fund_management/doctype/logical_framework/logical_framework.py | AkramMutaher/partner_ngos | 4a345fb6989ff5a21db7fca07aa4e5174dca8f59 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Akram Mutaher and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _, throw
from frappe.model.document import Document
class LogicalFramework(Document):
def on_update(self):
frappe.m... | 38.129032 | 136 | 0.730964 |
a0a21cb2b79ea84a641a3eac6980e2751dd7a624 | 360 | py | Python | Algorithms/Implementation/bon_appetit.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/bon_appetit.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/bon_appetit.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
def bonAppetit(n, k, b, ar):
del ar[k]
res = b - (sum(ar)//2)
if res == 0:
return 'Bon Appetit'
else:
return res
n, k = input().strip().split(' ')
n, k = [int(n), int(k)]
ar = list(map(int, input().strip().split(' ')))
b = int(input().strip())
result ... | 18.947368 | 47 | 0.538889 |
13fd17f083538235b234f8eaa7e8737363147b23 | 550 | py | Python | listings/chapter08/neural_network_digits.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | 2 | 2021-09-20T06:16:41.000Z | 2022-01-17T14:24:43.000Z | listings/chapter08/neural_network_digits.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | listings/chapter08/neural_network_digits.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | import csv
from neural_network import NeuralNetwork
from random import shuffle
with open('digits.csv', 'r') as digits_file:
reader = csv.reader(digits_file, quoting=csv.QUOTE_NONNUMERIC)
digits = list(reader)
shuffle(digits)
network = NeuralNetwork(64, 256, 10, learning_rate = 0.005)
x_test, y_test, x_train, y... | 32.352941 | 66 | 0.743636 |
f8bd06c8c03f55a60c4c3a629a1d86782d4f0f97 | 2,707 | py | Python | MAIN/STM32F405/V00/SX1239.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | MAIN/STM32F405/V00/SX1239.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | MAIN/STM32F405/V00/SX1239.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | from pyb import Pin, SPI
import time
class SX1239():
def __init__(self):
super().__init__()
self.SPI = SPI(1, SPI.MASTER, baudrate=600000, polarity=0, phase=0, crc=None)
self.NRST = Pin('Y6', Pin.OUT_PP)
self.NSS = Pin('X5', Pin.OUT_PP)
self.DIO0 = Pin('Y5', Pin.IN, Pin.PUL... | 43.66129 | 141 | 0.62246 |
e4a90f2ddae799b85fe96737b90af5d47a89f371 | 9,200 | py | Python | Fastir_Collector/dump/dump.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | Fastir_Collector/dump/dump.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | Fastir_Collector/dump/dump.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | from __future__ import unicode_literals
from StringIO import StringIO
import binascii
import os
import struct
import time
import win32file
import yaml
import glob
from _analyzemft.mftsession import _MftSession
from disk_analysis import DiskAnalysis
from environment_settings import Partitions, Disks, OperatingSystem #... | 45.320197 | 122 | 0.579783 |
39aadf98d3cfcd282a4c0c71ec6943809da24d87 | 1,131 | py | Python | file-management/multimedia/file_messages.py | gbesancon/projects | 7a9da629dddcf21fbe5c043d86b00036f80cbe14 | [
"MIT"
] | null | null | null | file-management/multimedia/file_messages.py | gbesancon/projects | 7a9da629dddcf21fbe5c043d86b00036f80cbe14 | [
"MIT"
] | 1 | 2022-03-02T10:43:58.000Z | 2022-03-02T10:43:58.000Z | file-management/multimedia/file_messages.py | gbesancon/projects | 7a9da629dddcf21fbe5c043d86b00036f80cbe14 | [
"MIT"
] | null | null | null | from typing import Dict, List
def print_file_messages(messages: Dict[str, Dict[str, List[str]]]):
for folder_path in messages:
print(folder_path + ":")
for file_name in messages[folder_path]:
print(" - " + file_name + ": " + ', '.join(message for message in messages[folder_path][f... | 49.173913 | 120 | 0.687003 |
4b10233697c4ece0a05008d15726d89b691394b3 | 6,189 | py | Python | packages/watchmen-data-kernel/src/watchmen_data_kernel/topic_schema/utils.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/topic_schema/utils.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/topic_schema/utils.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from __future__ import annotations
from datetime import date, datetime, time
from decimal import Decimal
from typing import Any
from watchmen_data_kernel.common import ask_all_date_formats, ask_full_datetime_formats, ask_time_formats, \
DataKernelException
from watchmen_model.admin import Factor, FactorType
from wat... | 36.405882 | 113 | 0.726773 |
d99c265227646bad30e2c7279ce7f2b6df913d5e | 921 | py | Python | server/apps/users/serializers.py | Mayandev/django_morec | 8d115f76ad69d7aa78b07dc06aa7047979ad134b | [
"MIT"
] | 129 | 2019-04-20T08:23:25.000Z | 2022-03-14T10:02:23.000Z | server/apps/users/serializers.py | heartplus/django_morec | 8d115f76ad69d7aa78b07dc06aa7047979ad134b | [
"MIT"
] | 9 | 2019-05-19T15:06:17.000Z | 2021-12-14T06:47:14.000Z | server/apps/users/serializers.py | heartplus/django_morec | 8d115f76ad69d7aa78b07dc06aa7047979ad134b | [
"MIT"
] | 34 | 2019-05-06T06:37:17.000Z | 2021-12-09T02:27:58.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019-04-20 09:46
# @Author : Mayandev
# @Site : https://github.com/Mayandev/
# @File : serializers.py
# @Software: PyCharm
from rest_framework import serializers
from rest_framework.validators import UniqueValidator
from django.contrib.auth import get_u... | 25.583333 | 113 | 0.659066 |
8a548751fdc7d1ca08f89d53bad342681382fba6 | 8,027 | py | Python | Packs/DeepInstinct/Integrations/DeepInstinct/DeepInstinct_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/DeepInstinct/Integrations/DeepInstinct/DeepInstinct_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/DeepInstinct/Integrations/DeepInstinct/DeepInstinct_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
import DeepInstinct
import demistomock as demisto
params = {
"apikey": "key",
"base_url": "https://demisto.poc.deepinstinctweb.com",
"after_id": 0
}
mock_device = {
"id": 1,
"os": "WINDOWS",
"osv": "Windows",
"ip_address": "192.168.88.80",
"mac_address": "00:00:00:00:00:00"... | 36.486364 | 111 | 0.554254 |
76fa2536c8284e7ec2ade7fa3279a7a6bb197e6b | 6,224 | py | Python | research/nlp/seq2seq/src/seq2seq_model/seq2seq_for_infer.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/nlp/seq2seq/src/seq2seq_model/seq2seq_for_infer.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/nlp/seq2seq/src/seq2seq_model/seq2seq_for_infer.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 34.966292 | 106 | 0.617288 |
0a191a12c307d96dca3033e4be4b4db794eff8f3 | 4,028 | py | Python | verto/processors/InteractiveContainerBlockProcessor.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 4 | 2017-04-10T06:09:54.000Z | 2019-05-04T02:07:40.000Z | verto/processors/InteractiveContainerBlockProcessor.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 268 | 2017-04-03T20:40:46.000Z | 2022-02-04T20:10:08.000Z | verto/processors/InteractiveContainerBlockProcessor.py | uccser/kordac | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 1 | 2019-01-07T15:46:31.000Z | 2019-01-07T15:46:31.000Z | from verto.processors.GenericContainerBlockProcessor import GenericContainerBlockProcessor
from verto.errors.InteractiveTextContainsInteractiveError import InteractiveTextContainsInteractiveError
from verto.errors.InteractiveMissingTextError import InteractiveMissingTextError
import re
DEFAULT_THUMBNAIL = 'default'
C... | 40.28 | 106 | 0.658143 |
861133b5f468872b5ba8ec3b1d9da8841dc06969 | 2,750 | py | Python | setup.py | lmr-hh/docassemble-lmrhh | c6c5a7215d36c1fc54c604880d0712a4fc6b3a33 | [
"MIT"
] | null | null | null | setup.py | lmr-hh/docassemble-lmrhh | c6c5a7215d36c1fc54c604880d0712a4fc6b3a33 | [
"MIT"
] | null | null | null | setup.py | lmr-hh/docassemble-lmrhh | c6c5a7215d36c1fc54c604880d0712a4fc6b3a33 | [
"MIT"
] | null | null | null | """Die Anmeldungen für einen Jamulus-Workshop."""
import os
from distutils.util import convert_path
from fnmatch import fnmatchcase
from setuptools import find_packages, setup
standard_exclude = ('*.pyc', '*~', '.*', '*.bak', '*.swp*')
standard_exclude_directories = (
'.*', 'CVS', '_darcs', './build', './dist', ... | 34.375 | 80 | 0.534182 |
d4b6c428c1cdd2f2a71f26277c37fe6af55b8c53 | 154 | py | Python | Python/009-Find-the-Runner-Up-Score.py | sadikkuzu/HackerRank | 2b1ed2cf41f6a5404c5b9293186f301b646b5d33 | [
"Apache-2.0"
] | 5 | 2019-03-09T22:44:01.000Z | 2021-09-14T00:11:38.000Z | Python/009-Find-the-Runner-Up-Score.py | jguerra7/HackerRank-4 | 7e1663d0050ffbb0fd885b8affdada9ea13b0e80 | [
"Apache-2.0"
] | 4 | 2018-08-16T09:39:47.000Z | 2018-09-14T17:37:07.000Z | Python/009-Find-the-Runner-Up-Score.py | jguerra7/HackerRank-4 | 7e1663d0050ffbb0fd885b8affdada9ea13b0e80 | [
"Apache-2.0"
] | 1 | 2020-06-01T23:38:35.000Z | 2020-06-01T23:38:35.000Z | if __name__ == '__main__':
n = int(raw_input())
arr = map(int, raw_input().split())
sar = set(arr)
sar.remove(max(sar))
print max(sar) | 25.666667 | 39 | 0.577922 |
1351bf8889ff10e6767c872bd8bf9ac2b287f15d | 811 | py | Python | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/11_kapitel_05_repetitionsaufgabe_10_dna_sequence.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/11_kapitel_05_repetitionsaufgabe_10_dna_sequence.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/11_kapitel_05_repetitionsaufgabe_10_dna_sequence.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: 11_kapitel_05_repetitionsaufgabe_10_dna_sequence.py
# Project: Kapitel_05_Kontrollstrukturen
# Created Date: Sunday 24.02.2019, 10:07
# Author: Apop85
# -----
# Last Modified: Sunday 24.02.2019, 10:12
# -----
# Copyright (c) 2019 Apop85
# This software is publis... | 31.192308 | 86 | 0.678175 |
1399ec69ae9136f628ed1ac27dce779172e0f6cf | 1,191 | py | Python | data-pipeline/src/data_pipeline/pipelines/gnomad_sv_v2.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 38 | 2018-02-24T02:33:52.000Z | 2020-03-03T23:17:04.000Z | data-pipeline/src/data_pipeline/pipelines/gnomad_sv_v2.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 385 | 2018-02-21T16:53:13.000Z | 2020-03-04T00:52:40.000Z | data-pipeline/src/data_pipeline/pipelines/gnomad_sv_v2.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 13 | 2020-05-01T13:03:54.000Z | 2022-02-28T13:12:57.000Z | from data_pipeline.pipeline import Pipeline, run_pipeline
from data_pipeline.datasets.gnomad_sv_v2 import prepare_gnomad_structural_variants
pipeline = Pipeline()
###############################################
# Variants
###############################################
pipeline.add_task(
"prepare_structural_va... | 33.083333 | 117 | 0.564232 |
13e7a192f43cd4684be73a0d8b1f8260225c64e6 | 5,012 | py | Python | web/controllers/api/Food.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | 1 | 2020-03-24T04:26:34.000Z | 2020-03-24T04:26:34.000Z | web/controllers/api/Food.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | web/controllers/api/Food.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from web.controllers.api import route_api
from flask import request,jsonify,g
from common.models.food.FoodCat import FoodCat
from common.models.food.Food import Food
from common.models.member.MemberCart import MemberCart
from common.models.member.MemberComments import MemberComments
from common... | 35.295775 | 105 | 0.593575 |
dbdf98394cb2cf416f9e80b8ca3042442d7ea275 | 13,504 | py | Python | bin/concatenate_all.py | Submitty/Lichen | a45457ed5e46ef12216bdf6c7051209bc00c4dff | [
"BSD-3-Clause"
] | 5 | 2019-03-04T12:59:53.000Z | 2022-03-25T03:07:00.000Z | bin/concatenate_all.py | Submitty/Lichen | a45457ed5e46ef12216bdf6c7051209bc00c4dff | [
"BSD-3-Clause"
] | 12 | 2018-06-05T16:35:31.000Z | 2022-02-14T21:43:40.000Z | bin/concatenate_all.py | Submitty/Lichen | a45457ed5e46ef12216bdf6c7051209bc00c4dff | [
"BSD-3-Clause"
] | 2 | 2018-06-05T18:00:09.000Z | 2019-03-04T12:59:57.000Z | #!/usr/bin/env python3
"""
Walks the submission directory and creates a parallel directory of
the concatenated files.
"""
import argparse
import os
import sys
import json
import time
import humanize
import fnmatch
import hashlib
from pathlib import Path
IGNORED_FILES = [
".submit.timestamp",
".user_assignment... | 44.863787 | 165 | 0.617299 |
e0378d711a9cebb051011bfa411745d162956afa | 464 | py | Python | exercises/es/exc_03_09_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/es/exc_03_09_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/es/exc_03_09_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | from spacy.lang.es import Spanish
from spacy.tokens import Token
nlp = Spanish()
# Registra la extensión de atributo del Token, "is_country",
# con el valor por defecto False
____.____(____, ____=____)
# Procesa el texto y pon True para el atributo "is_country"
# para el token "España"
doc = nlp("Vivo en España.")
... | 25.777778 | 67 | 0.737069 |
e076e2749b95676d607aece80231c8db9b92f12d | 161 | py | Python | fibonacci-number/fibonacci-number.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | fibonacci-number/fibonacci-number.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | fibonacci-number/fibonacci-number.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def fib(self, n: int) -> int:
dp=[0,1,1,2]
for i in range(4,n+1):
dp.append(dp[i-1]+dp[i-2])
return dp[n] | 26.833333 | 38 | 0.465839 |
16106db75f191270553c765bc014ab7a53c5e1bf | 863 | py | Python | books/PythonAutomate/google_spreadsheets/read_write_data.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/google_spreadsheets/read_write_data.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/google_spreadsheets/read_write_data.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """read_write_data.py
구글 스프레드 시트 문서에 데이터 입력 및 접근하기
"""
import ezsheets
ss = ezsheets.createSpreadsheet("My SpreadSheet")
sheet = ss[0] # 첫번째 시트에 접근
print(sheet.title) # '시트1'
# 데이터 입력
sheet["A1"] = "Name"
sheet["B1"] = "Age"
sheet["C1"] = "Favorite Movie"
print(sheet["A1"]) # Name
print(sheet[2, 1]) # Age
sheet... | 20.069767 | 59 | 0.650058 |
1655a64f4378a06344e3c05cf77de6ac5071aab6 | 4,805 | py | Python | 20-fs-ias-lec/groups/05-loraLink/src/old/Feed_Sender_release6/Feed_Sender/lib/lora_sync_layer.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/05-loraLink/src/old/Feed_Sender_release6/Feed_Sender/lib/lora_sync_layer.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/05-loraLink/src/old/Feed_Sender_release6/Feed_Sender/lib/lora_sync_layer.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | from lora_link_layer import Lora_Link_Layer
from lora_feed_layer import Lora_Feed_Layer
import os
import math
import time
import _thread
import json
import crypto
import feed
import binascii
import event
import pcap
import sys
from struct import unpack
class Lora_Sync_Layer:
def __init__(se... | 34.818841 | 102 | 0.572112 |
bcfd58c43086d2338b94f91fe8a301b8f5e19b0c | 2,782 | py | Python | python/oneflow/compatible/single_client/data.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/compatible/single_client/data.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/compatible/single_client/data.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.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... | 38.638889 | 83 | 0.827822 |
4c5c591b0f834f21c3bc964fec7713ab1b218276 | 2,431 | py | Python | Curso_Python/Secao5-modulos-uteis/134_selenium_automatizando_tarefas_navegador/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao5-modulos-uteis/134_selenium_automatizando_tarefas_navegador/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao5-modulos-uteis/134_selenium_automatizando_tarefas_navegador/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | # pip install selenium
from selenium import webdriver
from time import sleep
class ChromeAuto:
def __init__(self):
self.driver_path = 'chromedriver'
self.options = webdriver.ChromeOptions()
self.options.add_argument('user-data-dir=Perfil')
self.chrome = webdriver.Chrome(
... | 31.166667 | 219 | 0.63842 |
d5bcd636ba55525da8c91d93e7bccafc3df0dcda | 619 | py | Python | source/pkgsrc/databases/py-pgnotify/patches/patch-pgnotify.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/databases/py-pgnotify/patches/patch-pgnotify.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/databases/py-pgnotify/patches/patch-pgnotify.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-pgnotify.py,v 1.1 2016/03/25 21:15:07 joerg Exp $
--- pgnotify.py.orig 2016-03-25 09:35:27.000000000 +0000
+++ pgnotify.py
@@ -99,9 +99,9 @@ class pgnotify:
else:
self.pgconn.query('unlisten "%s"' % self.event)
self.pgconn.query('unlisten "%s"' ... | 36.411765 | 76 | 0.473344 |
d5dac9dcddd985854d244ffd7daebb859751eae0 | 412 | py | Python | ___Python/Michael/p07_file_io/m01_count_files.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Michael/p07_file_io/m01_count_files.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Michael/p07_file_io/m01_count_files.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
# Zähle die Anzahl Ordner in einem Ordner (inkl. allen Unterordnern)
def count_dirs(path):
subdirs = [subdir for subdir in path.iterdir() if subdir.is_dir()] # Bestimmte die direkten Unterordner des Ordners path
count = 1
for subdir in subdirs:
count += count_dirs(... | 24.235294 | 125 | 0.684466 |
fc88421f425032032c19e871fffef496bf53afc6 | 1,108 | py | Python | 2_Iterables/Dicts/dicts.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | 1 | 2022-03-02T07:16:30.000Z | 2022-03-02T07:16:30.000Z | 2_Iterables/Dicts/dicts.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | 2_Iterables/Dicts/dicts.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | # https://docs.python.org/3/tutorial/datastructures.html#dictionaries
# Dict: immutable
# Types for the keys: BOOL, INT, NONE, FLOAT, STR, TUPLE (immutable types)
# Types for the values: any type
print("----------Erstellen----------")
my_dict = dict()
my_dict = {True: 'test', 10: [1, 2, 3], None: 10.5,
... | 21.72549 | 74 | 0.602888 |
5d76304756929968763e1d5b488cec047efc53ad | 596 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v7_0/repost_bin_qty_and_item_projected_qty.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v7_0/repost_bin_qty_and_item_projected_qty.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v7_0/repost_bin_qty_and_item_projected_qty.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
repost_bin_qty()
def repost_bin_qty():
for bin in frappe.db.sql(""" select name from `tabBin`
where (actual_qty + ... | 37.25 | 141 | 0.766779 |
5d0a4a98b941cd76b713da25b34287be739dcf0b | 345 | py | Python | code/tests/test_util.py | simonmulser/master-thesis | 5ca2ddda377a0eede5a3c50866e0f90292c5448f | [
"CC-BY-4.0"
] | null | null | null | code/tests/test_util.py | simonmulser/master-thesis | 5ca2ddda377a0eede5a3c50866e0f90292c5448f | [
"CC-BY-4.0"
] | null | null | null | code/tests/test_util.py | simonmulser/master-thesis | 5ca2ddda377a0eede5a3c50866e0f90292c5448f | [
"CC-BY-4.0"
] | 1 | 2019-06-05T09:10:30.000Z | 2019-06-05T09:10:30.000Z | from bitcoin import core
from chain import Block
from chain import BlockOrigin
genesis_hash = core.CoreRegTestParams.GENESIS_BLOCK.GetHash()
genesis_block = Block(core.CoreRegTestParams.GENESIS_BLOCK, BlockOrigin.public)
genesis_block.height = 0
genesis_block.transfer_allowed = True
genesis_block.cblock = core.CoreReg... | 34.5 | 79 | 0.855072 |
5d19ccc9e58380005ea84af83a60b674adac165e | 696 | py | Python | elements/python/6/23/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/6/23/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/6/23/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | def rotate_right_out_of_place(A):
return map(list, zip(*reversed(A)))
def rotate_right_in_place(A):
n = len(A)
for X in range((n+1)/2):
for Y in range(n/2):
x, y = X, Y
t = A[y][x]
for _ in range(4):
x, y = n-1-y, x
A[y][x], t = t... | 20.470588 | 49 | 0.505747 |
53a986db75a89ce07c10fdebe1e45461cae93860 | 3,587 | py | Python | test/test_npu/test_solve.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_solve.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_solve.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020 Huawei Technologies Co., Ltd
# Copyright (c) 2019, Facebook CORPORATION.
# All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/lice... | 40.303371 | 74 | 0.672986 |
54cb826137b5a45f136bd8e7ffe02bd0df2f1bcb | 5,977 | py | Python | skil/resources/storage.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 23 | 2018-09-19T13:34:27.000Z | 2022-02-14T09:49:35.000Z | skil/resources/storage.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 33 | 2018-10-18T07:58:05.000Z | 2019-05-16T08:24:12.000Z | skil/resources/storage.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 11 | 2018-10-21T18:58:57.000Z | 2022-02-14T09:49:36.000Z | import skil_client
from .base import Resource
class AzureStorage(Resource):
"""AzureStorage
SKIL Azure storage resource.
# Arguments:
skil: `Skil` server instance
name: Resource name
container_name: Azure storage container name
credential_uri: path to credential file
... | 34.549133 | 90 | 0.609001 |
53110c8acfc0cbe79733d15abc23e7315365b20c | 4,056 | py | Python | pyntcloud/scalar_fields/xyz.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 1,142 | 2016-10-10T08:55:30.000Z | 2022-03-30T04:46:16.000Z | pyntcloud/scalar_fields/xyz.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 195 | 2016-10-10T08:30:37.000Z | 2022-02-17T12:51:17.000Z | pyntcloud/scalar_fields/xyz.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 215 | 2017-02-28T00:50:29.000Z | 2022-03-22T17:01:31.000Z | import numpy as np
from .base import ScalarField
from ..geometry.coord_systems import (
cartesian_to_spherical,
cartesian_to_cylindrical)
from ..ransac import (
single_fit,
RANSAC_MODELS,
RANSAC_SAMPLERS)
class XYZScalarField(ScalarField):
def extract_info(self):
self.points = self.py... | 33.520661 | 96 | 0.649901 |
f427d6fd802052fbd871944d0ca7e9ac6399ae93 | 21,147 | py | Python | keyboards/ergodox_ez/util/compile_keymap.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | keyboards/ergodox_ez/util/compile_keymap.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | keyboards/ergodox_ez/util/compile_keymap.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Compiler for keymap.c files
This scrip will generate a keymap.c file from a simple
markdown file with a specific layout.
Usage:
python compile_keymap.py INPUT_PATH [OUTPUT_PATH]
"""
from __future__ import division
from __future__ import print_function
from __future... | 29.868644 | 95 | 0.494633 |
22922276d56dca094039161e3092f94b2689abf7 | 4,329 | py | Python | grillen.py | joomogmbh/GrillMeister | b1b4935d4e7f27dc895d6b16462d5568fb708ff3 | [
"MIT"
] | 1 | 2019-04-22T13:52:01.000Z | 2019-04-22T13:52:01.000Z | grillen.py | joomogmbh/GrillMeister | b1b4935d4e7f27dc895d6b16462d5568fb708ff3 | [
"MIT"
] | null | null | null | grillen.py | joomogmbh/GrillMeister | b1b4935d4e7f27dc895d6b16462d5568fb708ff3 | [
"MIT"
] | null | null | null | #encoding=utf-8
from flask import Flask, render_template, request
from sqlalchemy import update
from forms import WurstOrderForm, DeleteOrderForm, IndexForm
import config
import os
#TODO: Nachträgliche Änderungen der getätigten Bestellungen
app = Flask(__name__)
app.config['SECRET_KEY'] = config.SECRET_KEY
app.conf... | 40.839623 | 375 | 0.670825 |
a3b528c4657e20062dc259f728c14ce871f200d5 | 5,168 | py | Python | main.py | Darker97/ERP-TestDataGenerator | 487bec7a659af53f993a086631e5221ae63ca2d1 | [
"MIT"
] | null | null | null | main.py | Darker97/ERP-TestDataGenerator | 487bec7a659af53f993a086631e5221ae63ca2d1 | [
"MIT"
] | null | null | null | main.py | Darker97/ERP-TestDataGenerator | 487bec7a659af53f993a086631e5221ae63ca2d1 | [
"MIT"
] | null | null | null | from fpdf import FPDF
import random
# -------------------------------------------------------------------------------- #
def Data(Name):
# FONTS
font = 'Times'
fontSize = 8
# Table
table_border = 1
table_spacing = 2
Zeilen = 6
# -------------------------------------------------- #... | 27.057592 | 93 | 0.516641 |
43340ce37a56f43333df92ae1ec54332a1fdb29c | 1,279 | py | Python | frappe-bench/apps/erpnext/erpnext/tests/test_init.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/tests/test_init.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/tests/test_init.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | import unittest
import frappe
from erpnext import encode_company_abbr
from six.moves import range
test_records = frappe.get_test_records('Company')
class TestInit(unittest.TestCase):
def test_encode_company_abbr(self):
company = frappe.new_doc("Company")
company.company_name = "New from Existing Company For Tes... | 31.975 | 90 | 0.668491 |
4a92b1e2269e6350a1a64bcd4fee1f7603f7f155 | 6,771 | py | Python | tarefas-poo/lista-02/processa-numeros/model/processa_numeros.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/model/processa_numeros.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/model/processa_numeros.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5603
# Exercício Processa Números
# --------------------------
# Definição de funções que processam listas contendo números inteiros.
#
def soma(numeros):
"""Calcula a soma dos números.
Se a lista estiver vazia então retorna None para indicar
que o pro... | 26.976096 | 92 | 0.672427 |
4ab0228b148b4919cddc4050253dbb9dba8af948 | 2,508 | py | Python | test/test_npu/test_det.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_det.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_det.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... | 36.882353 | 114 | 0.714514 |
607b09f19ee32ef4369003b18cb0c742ed9601ab | 5,338 | py | Python | EX3/lr.py | CSUpengyuyan/DLExperiment | 4b4d8384215da85cca1915b5630dbf3fbb381b38 | [
"MIT"
] | null | null | null | EX3/lr.py | CSUpengyuyan/DLExperiment | 4b4d8384215da85cca1915b5630dbf3fbb381b38 | [
"MIT"
] | null | null | null | EX3/lr.py | CSUpengyuyan/DLExperiment | 4b4d8384215da85cca1915b5630dbf3fbb381b38 | [
"MIT"
] | 1 | 2021-05-11T09:29:28.000Z | 2021-05-11T09:29:28.000Z | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from math import floor, log
import os
output_dir = "output/"
# 处理数据 x
def dataProcess_X(rawData):
#sex 只有两个属性 先drop之后处理
if "income" in rawData.columns:
Data = rawData.drop(["sex", 'income'], axis=1)
else:
Data = rawData... | 34.662338 | 115 | 0.623454 |
60b0558c58a75c34d99b86cc90ae177a978e276a | 2,236 | py | Python | Models/classTemplateTF/util/util.py | guillaumedescoteauxisabelle/compai | b1f4c0c7c1995233461dd3a3a73c6f6bafbf98f2 | [
"Apache-2.0"
] | null | null | null | Models/classTemplateTF/util/util.py | guillaumedescoteauxisabelle/compai | b1f4c0c7c1995233461dd3a3a73c6f6bafbf98f2 | [
"Apache-2.0"
] | null | null | null | Models/classTemplateTF/util/util.py | guillaumedescoteauxisabelle/compai | b1f4c0c7c1995233461dd3a3a73c6f6bafbf98f2 | [
"Apache-2.0"
] | 1 | 2020-01-07T17:57:57.000Z | 2020-01-07T17:57:57.000Z | import sys
import os
import re
import numpy as np
import tensorflow as tf
def print_(str, colour='', bold=False):
if colour == 'w': # yellow warning
sys.stdout.write('\033[93m')
elif colour == "e": # red error
sys.stdout.write('\033[91m')
elif colour == "m": # magenta info
sys.stdo... | 30.630137 | 83 | 0.632379 |
71bf61b76112b2980d16009b85223a64a7ad5550 | 6,031 | py | Python | Contrib-Inspur/openbmc/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Inspur/openbmc/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Inspur/openbmc/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | #!/usr/bin/env python
"""
class for handling configuration data files
Reads a .conf file and obtains its metadata
"""
# Copyright (C) 2003, 2004 Chris Larson
# Copyright (C) 2003, 2004 Phil Blundell
#
# SPDX-License-Identifier: GPL-2.0-only
#
import errno
import re
import os
import bb.utils
from bb.parse im... | 30.306533 | 203 | 0.586967 |
e0a8c6a22ac45e1afb03f8e6b106a721cc258347 | 204 | py | Python | pop.py | illy777/Python_uebungen | 0106ebd8885974c0e22549688e33c49ddbbff179 | [
"Unlicense"
] | null | null | null | pop.py | illy777/Python_uebungen | 0106ebd8885974c0e22549688e33c49ddbbff179 | [
"Unlicense"
] | null | null | null | pop.py | illy777/Python_uebungen | 0106ebd8885974c0e22549688e33c49ddbbff179 | [
"Unlicense"
] | null | null | null | #popfunktion erklärt
liste = "1 2 3 4 5".split()
print(liste)
#so gehts:
for ausgabe in range(2):
a1 = liste.pop()
a2 = liste.pop()
print("Zahlen: {} ; {}".format(a1, a2))
print(liste) | 20.4 | 43 | 0.583333 |
98ee000e2ccc2da9d237e88cca609e20dbc693f3 | 1,440 | py | Python | Project2/test_main.py | veronikadim99/Wissenschaftliches-Rechnen | 3b7c86e9488bf434f3ad1d590f5b9bb9b4cdf218 | [
"Apache-2.0"
] | null | null | null | Project2/test_main.py | veronikadim99/Wissenschaftliches-Rechnen | 3b7c86e9488bf434f3ad1d590f5b9bb9b4cdf218 | [
"Apache-2.0"
] | null | null | null | Project2/test_main.py | veronikadim99/Wissenschaftliches-Rechnen | 3b7c86e9488bf434f3ad1d590f5b9bb9b4cdf218 | [
"Apache-2.0"
] | null | null | null | import random
from unittest import TestCase
import datetime
import matplotlib.pyplot as plt
import numpy as np
from main import gaussian_elimination, compute_tomograph
class Test(TestCase):
def test_gaussian_elimination(self):
size = random.randint(0, 100)
A = np.random.rand(size, size)
x... | 33.488372 | 109 | 0.604861 |
c741b61ba104681a891aef14fb1a57f2a98622c4 | 3,918 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/become/ksu.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/become/ksu.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/become/ksu.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright: (c) 2018, 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
DOCUMENTATION = '''
become: ksu
short_description: Kerberos substit... | 32.65 | 116 | 0.567381 |
c7b67d8c34210c722f282db695ac74821b82e4ef | 6,256 | py | Python | pyScript_NodeManager/MainWindow.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | pyScript_NodeManager/MainWindow.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | pyScript_NodeManager/MainWindow.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | # QT
from PySide2.QtWidgets import QMainWindow, QWidget, QVBoxLayout, QFileDialog
from PySide2.QtCore import Qt
# parent UI
from ui_node_manager_mainwindow import Ui_MainWindow
# custom content
from Node import Node
from Node_ListWidget import Node_ListWidget
from NodeContentWidget import NodeContentWidget
from SaveDia... | 36.372093 | 140 | 0.649137 |
409d3a412bfea1d73a8108a72e0832c5493365f7 | 6,480 | py | Python | src/models/kernel.py | jejjohnson/hsic_alignment | 3c676a378008634576593abec3a4a01e7daf9218 | [
"MIT"
] | null | null | null | src/models/kernel.py | jejjohnson/hsic_alignment | 3c676a378008634576593abec3a4a01e7daf9218 | [
"MIT"
] | null | null | null | src/models/kernel.py | jejjohnson/hsic_alignment | 3c676a378008634576593abec3a4a01e7daf9218 | [
"MIT"
] | null | null | null | from typing import Optional
import numpy as np
from scipy import stats
from scipy.spatial.distance import pdist, squareform
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.exceptions import NotFittedError
from sklearn.metrics.pairwise import rbf_kernel
from sklearn.utils import check_array, check... | 27 | 112 | 0.607099 |
296464e450de5c345c5e4aa32da46a36b062de68 | 332 | py | Python | exercises/fr/test_02_10_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/test_02_10_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/test_02_10_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
"doc1.similarity(doc2)" or "doc2.similarity(doc1)" in __solution__
), "Compares-tu la similarité entre les deux docs ?"
assert (
0 <= float(similarity) <= 1
), "La valeur de similarité doit être un nombre flottant. L'as-tu calculé correctement ?"
__msg__.good("Bi... | 36.888889 | 93 | 0.641566 |
464a01a4228ad630182973570ce120f01f6793e4 | 2,674 | py | Python | Prediction/predict.py | Nivram710/Seretra | dc7a509ff37e07ea4688a87ab89d13783299c069 | [
"Apache-2.0"
] | 2 | 2018-04-12T14:24:33.000Z | 2020-09-16T07:03:28.000Z | Prediction/predict.py | Nivram710/Seretra | dc7a509ff37e07ea4688a87ab89d13783299c069 | [
"Apache-2.0"
] | null | null | null | Prediction/predict.py | Nivram710/Seretra | dc7a509ff37e07ea4688a87ab89d13783299c069 | [
"Apache-2.0"
] | null | null | null | from vec2 import Vec2
from interpolate import interpolate
ROTATION_PREDICTION_WEIGHTS = [x for x in range(100, 1, -1)]
# Return information about the positions by analysing them
def unpack(positions):
# Subtract every position from the previous position to calculate the
# change of the position
position_... | 33.425 | 79 | 0.628646 |
46a96f1607a70c558aa80d824342db4a9eeb4c56 | 11,833 | py | Python | code/00_covariates/1_demographics.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | code/00_covariates/1_demographics.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | code/00_covariates/1_demographics.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | # Databricks notebook source
# MAGIC %md
# MAGIC # Master Demographics
# MAGIC
# MAGIC **Description**
# MAGIC
# MAGIC This notebook runs a list of `SQL` queries to:
# MAGIC
# MAGIC 1. Extract demographics from central `curr302_patient_skinny_record`
# MAGIC 1.1 Map ethnicity categories
# MAGIC 2. Add ... | 30.576227 | 249 | 0.700837 |
d3b531563e00c8f390e1dec998ef3e46c7f61694 | 254 | py | Python | python/coursera_python/WESLEYAN/week2/3.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/WESLEYAN/week2/3.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/WESLEYAN/week2/3.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | newEngland = ["Maine","New Hampshire","Vermont", "Rhode Island",
"Massachusetts","Connecticut"]
def problem2_3(ne):
for item in ne:
print(item,"has",len(item),"letters.")
pass # replace this pass (a do-nothing) statement with your code
| 31.75 | 68 | 0.673228 |
31900383736a8d785e2c54a0ba5367e2439f6f27 | 405 | py | Python | src/gvz/migrations/0003_alter_administrativedivision_ags.py | Integreat/gemeindeverzeichnis-django | 0089b97ea02b4741263c37357260c497b66a306d | [
"Apache-2.0"
] | 7 | 2021-04-24T19:11:15.000Z | 2021-10-30T12:59:16.000Z | src/gvz/migrations/0003_alter_administrativedivision_ags.py | Integreat/gemeindeverzeichnis-django | 0089b97ea02b4741263c37357260c497b66a306d | [
"Apache-2.0"
] | 10 | 2021-04-25T10:25:12.000Z | 2021-04-26T17:55:20.000Z | src/gvz/migrations/0003_alter_administrativedivision_ags.py | Integreat/gemeindeverzeichnis-django | 0089b97ea02b4741263c37357260c497b66a306d | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2 on 2021-04-24 20:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('gvz', '0002_auto_20210424_2009'),
]
operations = [
migrations.AlterField(
model_name='administrativedivision',
name='a... | 21.315789 | 62 | 0.612346 |
31a91648833a1b106253c0ab17f7b089a58fd62a | 5,207 | py | Python | Packs/DemistoRESTAPI/Scripts/SetIRProceduresMarkdown/SetIRProceduresMarkdown.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/DemistoRESTAPI/Scripts/SetIRProceduresMarkdown/SetIRProceduresMarkdown.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/DemistoRESTAPI/Scripts/SetIRProceduresMarkdown/SetIRProceduresMarkdown.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CommonServerPython import *
import traceback
SECTIONS_TO_KEEP = ('Threat Hunting', 'Mitigation', 'Remediation', 'Eradication')
HEADER_TRANSFORM = {'id': 'Task ID', 'name': 'Task Name', 'state': 'Task State', 'completedDate': 'Completion Time'}
''' COMMAND FUNCTION '''
def add_url_to_tasks(tasks: Dict, workpl... | 44.127119 | 116 | 0.66449 |
81f462cb49c94479a9e54fb29c50b744a5d91eb0 | 264 | py | Python | Python/itertools.product().py | paurav11/HackerRank | 80c91c5cc55dd56671a5906be7a106ad4f1db95e | [
"MIT"
] | 1 | 2021-05-19T06:44:03.000Z | 2021-05-19T06:44:03.000Z | Python/itertools.product().py | paurav11/HackerRank | 80c91c5cc55dd56671a5906be7a106ad4f1db95e | [
"MIT"
] | null | null | null | Python/itertools.product().py | paurav11/HackerRank | 80c91c5cc55dd56671a5906be7a106ad4f1db95e | [
"MIT"
] | null | null | null | from itertools import product
if __name__ == "__main__":
A = list(map(int,input().split()))
B = list(map(int,input().split()))
AXB = list(product(A,B))
string = ''
for x,y in AXB:
string = string + f'({x}, {y})' + ' '
print(string) | 26.4 | 45 | 0.545455 |
c37016dce06b79dd2062fc2ee77f6606e612f948 | 1,273 | py | Python | api/querygraphql.py | paulowiz/AiesecBot | ac77cc5426ed6382772603afa8015208020c0fba | [
"MIT"
] | 6 | 2019-10-18T17:47:30.000Z | 2021-03-18T06:04:06.000Z | api/querygraphql.py | paulowiz/AiesecBot | ac77cc5426ed6382772603afa8015208020c0fba | [
"MIT"
] | 1 | 2020-09-24T08:17:29.000Z | 2020-09-28T08:16:39.000Z | api/querygraphql.py | paulowiz/AiesecBot | ac77cc5426ed6382772603afa8015208020c0fba | [
"MIT"
] | 3 | 2019-10-20T18:40:20.000Z | 2021-04-15T01:27:59.000Z | class queryGraphql:
def __init__(self):
self.query_01 = """
{
paging {
total_pages
current_page
total_items
}
data {
id
status
created_at
date_matched
date_approved
date_realized
experience_start_date
experience_end_date
... | 16.973333 | 111 | 0.479183 |
6f58b60dd3ac771487e07d5be7864e572e3cb6c1 | 3,935 | py | Python | 4_DeepLearning-Advanced/1-Gewichte_initialisieren.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 4_DeepLearning-Advanced/1-Gewichte_initialisieren.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 4_DeepLearning-Advanced/1-Gewichte_initialisieren.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | '''
setzen des kernel_initializer und bias_initializer für die Conv2D Layer
-> verändern lohnt sich meistens nicht deshalb -> default Parameter nutzen
'''
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import random
import numpy as np
from tensorflow.keras.layers import *
from tensorflow.keras.activations impor... | 36.100917 | 99 | 0.731639 |
82b7fa1b8273a78d74618304ea9825f060f08056 | 1,188 | py | Python | data/raspi/src/praxis/QualityAssurance2020/MTTF.py | softwareengel/softwareengel-blog | e24192c096be4361c7f7bbe00d2c3e8263c9fd0b | [
"MIT"
] | null | null | null | data/raspi/src/praxis/QualityAssurance2020/MTTF.py | softwareengel/softwareengel-blog | e24192c096be4361c7f7bbe00d2c3e8263c9fd0b | [
"MIT"
] | null | null | null | data/raspi/src/praxis/QualityAssurance2020/MTTF.py | softwareengel/softwareengel-blog | e24192c096be4361c7f7bbe00d2c3e8263c9fd0b | [
"MIT"
] | null | null | null | import csv
class MTTFCalculator:
def __init__(self):
self.failures = []
self.read_from_file()
def calculate_mttf(self):
# TODO Berechne den Mittelwert der in "failures" gespeicherten Werte und gebe das Ergebnis zurueck.
# Tipp: Hierzu benoetigst du die "return"-Anweisung.
... | 37.125 | 107 | 0.610269 |
c4baaaada1d4f163e7aadf73ed653e859fd52a6b | 1,392 | py | Python | DataMining_exp/CorrelationAnalysis/src/CorrelationAnalysis_sup.py | DolorHunter/hfut-exp-archived | c67e26c1f4fba550c8974eaba10dfa302b928868 | [
"BSD-2-Clause"
] | 12 | 2020-12-07T05:49:05.000Z | 2022-03-25T09:09:36.000Z | DataMining_exp/CorrelationAnalysis/src/CorrelationAnalysis_sup.py | DolorHunter/hfut-exp | c67e26c1f4fba550c8974eaba10dfa302b928868 | [
"BSD-2-Clause"
] | null | null | null | DataMining_exp/CorrelationAnalysis/src/CorrelationAnalysis_sup.py | DolorHunter/hfut-exp | c67e26c1f4fba550c8974eaba10dfa302b928868 | [
"BSD-2-Clause"
] | 1 | 2021-01-08T08:53:53.000Z | 2021-01-08T08:53:53.000Z | import csv
import numpy
import time
from apyori import apriori
FILENAME = '../data/groceries.csv'
DATA = []
MIN_SUPPORT = 0.01
MIN_CONFIDENCE = 0.4
MIN_LIFT = 3
with open(FILENAME, newline='') as csvfile:
spamreader = csv.reader(csvfile, delimiter=',', quotechar='|')
for row in spamreader:
DATA.appen... | 37.621622 | 112 | 0.59842 |
c4e98a57dc135d8415c792cf48bd5a67ae2eaf73 | 160 | py | Python | WD/Cwiczenia/pierwszy.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | 1 | 2020-02-29T14:38:33.000Z | 2020-02-29T14:38:33.000Z | WD/Cwiczenia/pierwszy.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | null | null | null | WD/Cwiczenia/pierwszy.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | null | null | null | import math
"""
komentarz na wiele linijek
jeszcze jedna linijka
"""
b=math.sin(8)*math.sin(8)
c=5+b
a=math.log(c)
z=math.pow(a,1/6)
print(z)
| 10.666667 | 27 | 0.6125 |
484423113cfbd45bb753b57ccf48b4765435214d | 1,739 | py | Python | src/onegov/org/forms/resource_recipient.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/forms/resource_recipient.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/forms/resource_recipient.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.form import Form
from onegov.form.fields import MultiCheckboxField
from onegov.org import _
from wtforms import StringField
from wtforms.fields.html5 import EmailField
from wtforms.validators import InputRequired, Email
from onegov.reservation import Resource, ResourceCollection
WEEKDAYS = (
("MO", _(... | 26.753846 | 73 | 0.602645 |
6ff10b11f63f33bd7e487497469a4596c02b9e31 | 1,519 | py | Python | Src/parsers.py | hazemalsaied/IdenSys | 9b6220ff7e65f7059240b742c81952132a765007 | [
"MIT"
] | 2 | 2017-09-28T13:54:57.000Z | 2018-06-28T05:03:06.000Z | Src/parsers.py | hazemalsaied/IdenSys | 9b6220ff7e65f7059240b742c81952132a765007 | [
"MIT"
] | null | null | null | Src/parsers.py | hazemalsaied/IdenSys | 9b6220ff7e65f7059240b742c81952132a765007 | [
"MIT"
] | null | null | null | import logging
from features import Extractor
from param import XPParams
from transitions import Transition,getTransitionType
def parse(corpus, clf):
if XPParams.useCrossValidation:
corpus.initializeSents(training=False)
logging.warn('Test data set analysis started!')
for sent in corpus.testingSe... | 38.948718 | 86 | 0.703094 |
d2548c5aee4667e22df3a94422e6b914bc61f176 | 138 | py | Python | Code/Lists/main.py | miku/haw-di-bim-lv22 | 5e3dd1f7a1eb02ebbe5cc801bd8094618d6525e3 | [
"MIT"
] | null | null | null | Code/Lists/main.py | miku/haw-di-bim-lv22 | 5e3dd1f7a1eb02ebbe5cc801bd8094618d6525e3 | [
"MIT"
] | null | null | null | Code/Lists/main.py | miku/haw-di-bim-lv22 | 5e3dd1f7a1eb02ebbe5cc801bd8094618d6525e3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Task: Add a variable that will contain the sum of all values in vs.
vs = [1, 2, 3]
for v in vs:
print(v)
| 13.8 | 69 | 0.623188 |
d281e319d9e9fedd37ccfedf3b489b860106959d | 737 | py | Python | DataStructures/Heap/MininumAverage.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/Heap/MininumAverage.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/Heap/MininumAverage.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
from heapq import heappush, heappop
from bisect import insort
N = int(raw_input())
customers = []
for _ in xrange(N):
customer = map(int, raw_input().split())
customers.append(customer)
customers.sort()
waiting_time = 0
current_time = 0
heap = []
i = 0
while 1:
if i < N and customers[i][... | 20.472222 | 49 | 0.563094 |
966da12d7af1d0cc44f24d6228f3eb91e8ded862 | 3,039 | py | Python | Practice-2019-04-13/extract_ner_data (1).py | serge-sotnyk/nlp-practice | e38400590a3fcf140a73d6871a778b3c2115a2fe | [
"MIT"
] | 3 | 2019-11-25T09:56:48.000Z | 2021-01-18T13:18:17.000Z | Practice-2019-04-13/extract_ner_data (1).py | serge-sotnyk/nlp-practice | e38400590a3fcf140a73d6871a778b3c2115a2fe | [
"MIT"
] | null | null | null | Practice-2019-04-13/extract_ner_data (1).py | serge-sotnyk/nlp-practice | e38400590a3fcf140a73d6871a778b3c2115a2fe | [
"MIT"
] | 2 | 2020-05-17T17:22:14.000Z | 2020-09-23T08:31:46.000Z | PATH = "/your/path/to/ner-uk/"
# Read tokens and positions of tokens from a file
def read_tokens(filename):
tokens = []
pos = 0
with open(filename, "r") as f:
text = f.read().split("\n")
for line in text:
if len(line) == 0:
pos += 1
else:
... | 31.329897 | 107 | 0.548865 |
9698ebd1f357a44795f04ceaa8cf6edd6a0be373 | 51 | py | Python | warp/data/__init__.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | warp/data/__init__.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | warp/data/__init__.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | from .produces import *
from .dependencies import * | 25.5 | 27 | 0.784314 |
73bf3aae041bcbf3da0e65a14e07fde618ca141c | 822 | py | Python | python_gui_tkinter/Tkinter/TkinterCourse/5_tk_label.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/Tkinter/TkinterCourse/5_tk_label.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/Tkinter/TkinterCourse/5_tk_label.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import tkinter as tk
'''
Some Tk widgets, like the label, text, and canvas widget, allow you to specify the fonts used to display text. This can be achieved by setting the attribute "font". typically via a "font" configuration option. You have to consider that fonts are one of several areas that are not platform-inde... | 30.444444 | 301 | 0.686131 |
73d7743ba6987935611d2ac0abc12566f8eed3a6 | 20,107 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/plugins/mapmatching/wxgui-03-pre-inter.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/contributed/sumopy/plugins/mapmatching/wxgui-03-pre-inter.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/contributed/sumopy/plugins/mapmatching/wxgui-03-pre-inter.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
# SUMOPy module
# Copyright (C) 2012-2017 University of Bologna - DICAM
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public ... | 38.226236 | 119 | 0.580047 |
83c8690421fd05394e34133f48ea18ac6f161c2d | 973 | py | Python | leetcode/133-Clone-Graph/bfs_003_iterative_jiuzhang_and_me.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/133-Clone-Graph/bfs_003_iterative_jiuzhang_and_me.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/133-Clone-Graph/bfs_003_iterative_jiuzhang_and_me.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # Definition for a Node.
class Node:
def __init__(self, val=0, neighbors=[]):
self.val = val
self.neighbors = neighbors
class Solution:
def cloneGraph(self, node: 'Node') -> 'Node':
if node is None:
return None
root = node
mapping = {}
# Step 1: bf... | 27.8 | 96 | 0.562179 |
83e101899274f038aef3553a78f8ec13a5a5af6b | 1,420 | py | Python | similaritycalculation/deletesimilarities.py | Geosoft2/Geosoftware-II-AALLH | bdb61d9a1111b9082ec2b9f309998c5f2166975e | [
"MIT"
] | null | null | null | similaritycalculation/deletesimilarities.py | Geosoft2/Geosoftware-II-AALLH | bdb61d9a1111b9082ec2b9f309998c5f2166975e | [
"MIT"
] | 38 | 2018-10-24T08:51:58.000Z | 2021-12-13T19:54:39.000Z | similaritycalculation/deletesimilarities.py | Geosoft2/Geosoftware-II-AALLH | bdb61d9a1111b9082ec2b9f309998c5f2166975e | [
"MIT"
] | 12 | 2018-10-24T08:20:13.000Z | 2019-08-12T08:10:14.000Z | import logging
import os
import sqlite3
LOGGER = logging.getLogger(__name__)
def deleteSimilarities(id, constraint):
'''
Function which deletes the respective records in the similarities table
when a user runs a delete transaction
@author: Anika Graupner
:param id: id of the deleted record in t... | 34.634146 | 117 | 0.661972 |
f706ba0e3fca5e7fdc623250c98bf2863b6dd7da | 31,405 | py | Python | code/02_study_population/CCU013_13_paper_subset_data_to_cohort.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | code/02_study_population/CCU013_13_paper_subset_data_to_cohort.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | code/02_study_population/CCU013_13_paper_subset_data_to_cohort.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | # Databricks notebook source
# MAGIC %md
# MAGIC # CCU013_08 Paper subset data to cohort
# MAGIC
# MAGIC **Description**
# MAGIC
# MAGIC This notebook subsets the covid trajectory, severity and events tables to the cohort used for the phenotype severity paper.
# MAGIC
# MAGIC **Project(s)** CCU0013
# MAGIC
# MAG... | 43.317241 | 263 | 0.771024 |
f76e7fed6798a7e3d7db5844a56420372245d9bc | 11,724 | py | Python | rbac/ledger_sync/deltas/updating.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 75 | 2018-04-06T09:13:34.000Z | 2020-05-18T18:59:47.000Z | rbac/ledger_sync/deltas/updating.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 989 | 2018-04-18T21:01:56.000Z | 2019-10-23T15:37:09.000Z | rbac/ledger_sync/deltas/updating.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 72 | 2018-04-13T18:29:12.000Z | 2020-05-29T06:00:33.000Z | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# 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 ... | 35.313253 | 100 | 0.565421 |
f7990d4eb7743cb409e33c8d9187bde0ec8e32d6 | 1,050 | py | Python | src/keyword/yield.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/keyword/yield.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/keyword/yield.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
print("\n")
print("-----迭代-----")
mylist = [1, 2, 3]
for i in mylist:
print(i)
print("\n")
print("-----迭代器,用中括号的叫迭代器-----")
print("任何可以用 for in 来迭代读取的都是迭代容器,例如lists,strings,files.这些迭代器非常的便利")
print("你可以想取多少便取多少,但是你得存储所有的值,其中很多值都完全没有必要每次都保持在内存中")
mylist = [x * x for x in r... | 26.25 | 208 | 0.698095 |
545c6d44ec72b49f2b03749fd91ae2f244b06e3d | 701 | py | Python | 01_class/contextmanager.py | wuyueCreator/python-test | 6072ac9264a257c89925469238c14fff3bda5630 | [
"MIT"
] | 1 | 2019-03-25T03:44:54.000Z | 2019-03-25T03:44:54.000Z | 01_class/contextmanager.py | wuyueCreator/python-test | 6072ac9264a257c89925469238c14fff3bda5630 | [
"MIT"
] | null | null | null | 01_class/contextmanager.py | wuyueCreator/python-test | 6072ac9264a257c89925469238c14fff3bda5630 | [
"MIT"
] | null | null | null | from socket import socket, AF_INET, SOCK_STREAM
class LazyConnection:
def __init__(self, address, family=AF_INET, type=SOCK_STREAM):
self.address = address
self.family = family
self.type = type
self.connections = []
def __enter__(self):
sock = socket(self.family, self.... | 23.366667 | 66 | 0.644793 |
54c13cf162fa75fe8cb4226e26b55074c10a08fb | 2,650 | py | Python | mods/mystical_lands/world_edit_converter.py | DeathSkullPain/MysticalGame | cff5fbfbcdbff9cb472aa79d10a646a465d0e86d | [
"CC0-1.0"
] | null | null | null | mods/mystical_lands/world_edit_converter.py | DeathSkullPain/MysticalGame | cff5fbfbcdbff9cb472aa79d10a646a465d0e86d | [
"CC0-1.0"
] | null | null | null | mods/mystical_lands/world_edit_converter.py | DeathSkullPain/MysticalGame | cff5fbfbcdbff9cb472aa79d10a646a465d0e86d | [
"CC0-1.0"
] | null | null | null | import copy
path = r'minetest_dev\worlds\Test\schems' + '\\'
in_file = path + 'tree_dark_green_medium.we'
out_file = path + 'out.txt'
marker = 'wool:yellow'
air = '_'
f = open(in_file)
data = f.read()
f.close()
empty_replacers = [
'["meta"] = {["fields"] = {}, ["inventory"] = {}}, ',
'["param1"] = 15, ',
... | 21.370968 | 68 | 0.545283 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.