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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cd40fc4a4fa99d4a9cc6ae6a281106853dff13a6 | 3,451 | py | Python | Classes/Client.py | EKaczmarek/BomberMan | a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d | [
"MIT"
] | 1 | 2018-04-30T15:46:47.000Z | 2018-04-30T15:46:47.000Z | Classes/Client.py | EKaczmarek/BomberMan | a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d | [
"MIT"
] | 1 | 2018-06-03T13:20:19.000Z | 2018-06-03T20:19:25.000Z | Classes/Client.py | EKaczmarek/BomberMan | a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d | [
"MIT"
] | 1 | 2018-06-03T12:59:11.000Z | 2018-06-03T12:59:11.000Z | import socket
from PyQt5 import QtCore
import json
import datetime
class Client(QtCore.QObject):
get_info_from_server = QtCore.pyqtSignal(bool, str, str)
def __init__(self):
super(Client, self).__init__()
self.host = None
self.port = None
self.size = None
self.server =... | 38.775281 | 88 | 0.560417 |
3e5e470003b36d65195dfb68a59e853b588f42a1 | 1,024 | py | Python | sort_algorithm/02_binary_search.py | Jeson1g/Dawson | b65f2347110cf56d13e9fcf8f08a3b38af53af77 | [
"MIT"
] | 2 | 2018-06-19T08:46:10.000Z | 2018-11-05T02:15:34.000Z | shujujiegou/02_binary_search.py | summerliu1024/PythonExercises | 43e07998540a73f0112538646ded37b39e8da88b | [
"MIT"
] | null | null | null | shujujiegou/02_binary_search.py | summerliu1024/PythonExercises | 43e07998540a73f0112538646ded37b39e8da88b | [
"MIT"
] | null | null | null | def binary_search(alist, item):
"""
二分查找 递归实现版本
:param alist:
:param item: 查找的元素
:return: True, False
"""
n = len(alist)
if 0 == n:
return False
mid = n // 2
if alist[mid] == item:
return True
elif item < alist[mid]:
return binary_search(alist[:mid],... | 20.48 | 49 | 0.537109 |
e4ee37a738ad0f6ee27192b68c5357006b403490 | 89,212 | py | Python | python/web_version/modules/balancer.py | derHahn/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 4 | 2015-02-20T09:20:10.000Z | 2018-02-05T10:54:10.000Z | python/web_version/modules/balancer.py | tlubitz/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 80 | 2018-04-13T13:46:24.000Z | 2022-02-16T16:01:46.000Z | python/web_version/modules/balancer.py | tlubitz/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 6 | 2018-06-06T19:55:32.000Z | 2021-09-30T15:16:40.000Z | #!/usr/bin/env python
try: from . import SBtab
except: import SBtab
import numpy
import scipy.linalg
import copy
import time
import datetime
import os
import sys
# common declarations for the webversion
name2index = {'standard chemical potential': 0,
'catalytic rate constant geometric mean': 1,
... | 51.537839 | 297 | 0.546496 |
5f7fb4dcffb0c7d4db170c8b692dfb1fc21384af | 823 | py | Python | tarefas-poo/lista-03/prefeitura/model/cidadao.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-03/prefeitura/model/cidadao.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-03/prefeitura/model/cidadao.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5603
# Exercício da Prefeitura
# --------------------------
# Classe responsável por representar um cidadão.
class Cidadao:
def __init__(self, ano_nascimento, renda):
'''Um cidadão é caracterizado pelo seu ano de nascimento e sua renda.
'''
... | 25.71875 | 77 | 0.54192 |
39571273576af6ac23869e2a468e1ea66ee7e011 | 2,306 | py | Python | apps/hygiene/migrations/0001_initial.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 1 | 2017-01-08T13:21:43.000Z | 2017-01-08T13:21:43.000Z | apps/hygiene/migrations/0001_initial.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 17 | 2018-12-03T14:22:14.000Z | 2021-07-14T15:15:12.000Z | apps/hygiene/migrations/0001_initial.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 2 | 2018-12-03T14:58:49.000Z | 2019-12-01T13:24:42.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2019-06-07 19:51
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
... | 38.433333 | 122 | 0.568517 |
39f3e1f70415e3e019c0f0cf6f93abb39f205802 | 347 | py | Python | pacman-termux/test/pacman/tests/multiple-architectures01.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/multiple-architectures01.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/multiple-architectures01.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Install a package (multiple Architecture options, wrong)"
p = pmpkg("dummy")
p.files = ["bin/dummy",
"usr/man/man1/dummy.1"]
p.arch = 'i686'
self.addpkg(p)
self.option["Architecture"] = ['i586', 'i486', 'i386']
self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=1")
self.a... | 23.133333 | 77 | 0.654179 |
8a363e1c16eefdafbc2bcca123a5f6f3094f3961 | 1,998 | py | Python | BipartiteGraphModels/utility/tSNE.py | GACSE/BipartiteGraphModel | c05b2d9cfb1042e4a3eb374257637e2ac1f592c3 | [
"MIT"
] | 5 | 2021-02-09T06:51:48.000Z | 2021-11-09T02:00:21.000Z | BipartiteGraphModels/utility/tSNE.py | GACSE/BipartiteGraphModel | c05b2d9cfb1042e4a3eb374257637e2ac1f592c3 | [
"MIT"
] | null | null | null | BipartiteGraphModels/utility/tSNE.py | GACSE/BipartiteGraphModel | c05b2d9cfb1042e4a3eb374257637e2ac1f592c3 | [
"MIT"
] | 2 | 2021-07-19T09:27:01.000Z | 2022-02-21T10:20:00.000Z | from utility.parser import parse_args
from utility.load_data_v5 import *
import numpy as np
args = parse_args()
Ks = eval(args.Ks)
neighbors_num = eval(args.neighbors_num)
data_generator = DataV2(path=args.data_path + args.dataset, batch_size=args.batch_size, neighbors_num=neighbors_num, weighted_sample_num=args.weigh... | 47.571429 | 162 | 0.732232 |
8ad620d940354cc872fd3c7c8e4e824d9837dcf2 | 39 | py | Python | JavaScript/01basico/16operadores_aritmeticos/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | JavaScript/01basico/16operadores_aritmeticos/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | JavaScript/01basico/16operadores_aritmeticos/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | print('Heloor')
c = input(':')
print(c) | 13 | 15 | 0.589744 |
0a0c115f7aa4faea032f09dd8eba13513daa6203 | 695 | py | Python | Liter_Client/__init__.py | Drelf2018/Liter | e12ffdd22ee7b2724722c38e852fc9c1b2f180ad | [
"MIT"
] | null | null | null | Liter_Client/__init__.py | Drelf2018/Liter | e12ffdd22ee7b2724722c38e852fc9c1b2f180ad | [
"MIT"
] | null | null | null | Liter_Client/__init__.py | Drelf2018/Liter | e12ffdd22ee7b2724722c38e852fc9c1b2f180ad | [
"MIT"
] | null | null | null | import sys
from .send_receive import connecter
from .LoginWindow import LoginWindow
from .MainWindow import MainWindow
from PyQt5.QtWidgets import QApplication
class Client(object):
def __init__(self, host='127.0.0.1', port=7233):
self.app = QApplication(sys.argv) # 新建窗口前必运行app
self.ct = connecte... | 33.095238 | 76 | 0.654676 |
6a706ba112e6e0c7b57c1e46bd9b0418402db376 | 505 | pyde | Python | sketches/mira/mira.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/mira/mira.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/mira/mira.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | a = -.48
b = .93
def setup():
size(640, 480)
background(0)
colorMode(HSB, 255, 100, 100)
this.surface.setTitle("Fantastic Feather Fractal")
noLoop()
def draw():
loadPixels()
x = 4.0
y = .0
for i in range(1, 120000, 1):
x1 = b*y + f(x)
y = -x + f(x1)
x = x1
... | 20.2 | 86 | 0.471287 |
0abfe3370342053b2d616506884e180d09e2fe08 | 850 | py | Python | weeman-master/core/misc.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | weeman-master/core/misc.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | weeman-master/core/misc.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | ##
## misc.py - usefull functions
##
import sys
import time
def printt(s, msg):
if s == 1:
print("\033[01;31m[%s] Error: %s\033[00m" %(time.strftime("%H:%M:%S"),msg))
sys.exit(1)
elif s == 2:
print("\033[01;32m[%s] %s\033[00m" %(time.strftime("%H:%M:%S"),msg))
elif s == 3:
... | 26.5625 | 83 | 0.535294 |
6b0b7bb48616c3dc16799c44723a677310de7f23 | 20,734 | py | Python | frappe-bench/apps/erpnext/erpnext/stock/doctype/material_request/test_material_request.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/stock/doctype/material_request/test_material_request.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/stock/doctype/material_request/test_material_request.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# ERPNext - web based ERP (http://erpnext.com)
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, unittest, erpnext
from frappe.utils imp... | 34.214521 | 112 | 0.737195 |
86f352f52106d1ee2531eb8936f5a5e0885aa11e | 7,320 | py | Python | CGR/T3/snowman_rain.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 10 | 2020-12-08T20:18:15.000Z | 2021-06-07T20:00:07.000Z | CGR/T3/snowman_rain.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 2 | 2021-06-28T03:42:13.000Z | 2021-06-28T16:53:13.000Z | CGR/T3/snowman_rain.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 2 | 2021-01-14T19:59:20.000Z | 2021-06-15T11:53:21.000Z | from OpenGL.GL import *
from OpenGL.GLUT import *
from OpenGL.GLU import *
from colors import *
from shapes import SolidCylinder
from random import randint as rand
angle_h = 300.0
angle_v = 0
spin = True
turn_h = 1
turn_v = 0
render_quality = 100 # max = 100
flakes_quantity = 4000
flakes = []
radius = 0.85
width = ... | 24.4 | 88 | 0.623907 |
d4b43d41f4cd5c816d32bf2f9db708811200248f | 11,402 | py | Python | classic-rock/radio.py | h4ckfu/data | bdc02fd5051dfb31e42f8e078832ceead92f9958 | [
"CC-BY-4.0"
] | 16,124 | 2015-01-01T06:18:12.000Z | 2022-03-31T00:46:52.000Z | classic-rock/radio.py | h4ckfu/data | bdc02fd5051dfb31e42f8e078832ceead92f9958 | [
"CC-BY-4.0"
] | 179 | 2015-01-07T10:19:57.000Z | 2022-02-21T21:19:14.000Z | classic-rock/radio.py | h4ckfu/data | bdc02fd5051dfb31e42f8e078832ceead92f9958 | [
"CC-BY-4.0"
] | 12,163 | 2015-01-03T14:23:36.000Z | 2022-03-31T10:10:23.000Z | import time
import urllib2
import sys
"""
next step: make it create new file each time, run cleanup op
"""
def cc_pull(x):
try:
iteration = x[1] + 1
url = x[0]
callsign = x[2]
filename = callsign + str(iteration).rjust(3,'0') + ".txt"
record = open(filename,"w")
last_song = x[3]
response = urllib2.urlo... | 27.946078 | 97 | 0.594194 |
07f7e46640ae91a83c3c9df30432ed92ad9fe0df | 16,168 | py | Python | pyScript_NodeManager/ui_node_manager_node_content_widget.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | pyScript_NodeManager/ui_node_manager_node_content_widget.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | pyScript_NodeManager/ui_node_manager_node_content_widget.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'node_manager_node_content_widget.ui'
##
## Created by: Qt User Interface Compiler version 5.14.1
##
## WARNING! All changes made in this file will be lost when recompiling UI... | 50.842767 | 130 | 0.753031 |
92d6e76d5fb0169605d87a51a769529b0bccbb80 | 481 | py | Python | reverse-integer/reverse-integer.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | reverse-integer/reverse-integer.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | reverse-integer/reverse-integer.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def reverse(self, x: int) -> int:
if x<0:
target=str(x)[1:]
reveresed = "".join(target[-i] for i in range(1,len(target)+1))
output = (-1)*int(reveresed)
else:
target=str(x)
reveresed = "".join(target[-i] for i in range(1,le... | 28.294118 | 75 | 0.469854 |
b9a44dd20219641a00186bc04b85e1ce6e7d86d3 | 7,101 | py | Python | Paddle_Industry_Practice_Sample_Library/nlp_projects/event_extraction/ernie/data.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 1 | 2022-01-12T06:52:43.000Z | 2022-01-12T06:52:43.000Z | Paddle_Industry_Practice_Sample_Library/nlp_projects/event_extraction/ernie/data.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null | Paddle_Industry_Practice_Sample_Library/nlp_projects/event_extraction/ernie/data.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 40.577143 | 118 | 0.618786 |
1651dde75826e3c544dfb9e3c49d28d8035913c0 | 2,764 | py | Python | src/onegov/ballot/collections/elections.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/ballot/collections/elections.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/ballot/collections/elections.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.ballot.models import Election
from onegov.core.collection import Pagination
from sqlalchemy import cast
from sqlalchemy import desc
from sqlalchemy import distinct
from sqlalchemy import extract
from sqlalchemy import Integer
class ElectionCollectionPagination(Pagination):
def __init__(self, session,... | 27.366337 | 78 | 0.622648 |
168bf92dd654e1143c198101ef6285e4193cee75 | 703 | py | Python | exercises/fr/solution_02_14.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/fr/solution_02_14.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/fr/solution_02_14.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import json
import spacy
with open("exercises/fr/countries.json", encoding="utf8") as f:
COUNTRIES = json.loads(f.read())
nlp = spacy.blank("fr")
doc = nlp("La Tchéquie pourrait aider la Slovaquie à protéger son espace aérien")
# Importe le PhraseMatcher et initialise-le
from spacy.matcher import PhraseMatcher
... | 30.565217 | 81 | 0.755334 |
4c205b09a1c816df10da560f20bdeddc4b07fd0c | 2,511 | py | Python | tests/rbac/common/role/create_role_helper_test.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | tests/rbac/common/role/create_role_helper_test.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | 1 | 2019-07-08T22:32:43.000Z | 2019-07-08T22:32:43.000Z | tests/rbac/common/role/create_role_helper_test.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | # 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 ... | 29.197674 | 79 | 0.702509 |
e6ae32c7ff8a9a4947690d950d3615e0fcf8402d | 7,697 | py | Python | fhirclient/r4models/composition_tests.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | fhirclient/r4models/composition_tests.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | fhirclient/r4models/composition_tests.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b on 2019-05-07.
# 2019, SMART Health IT.
import os
import io
import unittest
import json
from . import composition
from .fhirdate import FHIRDate
class CompositionTests(unittest.TestCase):
def instantiate_fro... | 60.606299 | 130 | 0.67195 |
e6d3e3b290fb98e6f1ed37f3a4aed541fb0463ff | 451 | py | Python | pacman-arch/test/pacman/tests/deprange001.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/deprange001.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/deprange001.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "dependency ranges should be satisfied by the same package"
lp1 = pmpkg("pkg1")
lp1.provides = ["dependency=2"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.provides = ["dependency=5"]
self.addpkg2db("local", lp2)
p = pmpkg("pkg3")
p.depends = ["dependency>=3", "dependency<=4"]
self.addpkg... | 23.736842 | 78 | 0.698448 |
e6eac1980dab39e0f91a77c9e1331c2828d37414 | 2,514 | py | Python | skimind/kernel/learningModels/ckpt_manager.py | NathBangwa/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 1 | 2020-11-13T18:30:47.000Z | 2020-11-13T18:30:47.000Z | skimind/kernel/learningModels/ckpt_manager.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 5 | 2020-11-13T18:16:48.000Z | 2021-09-08T01:04:59.000Z | skimind/kernel/learningModels/ckpt_manager.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | null | null | null | # interface_db
from . import interfacedb
# os
import os
import shutil
# config
from . import config
from . import skiconfig
#---------------------------------------------------------------------------
# REINITIALISATION
#---------------------------------------------------------------------------
def reboot_check... | 31.037037 | 89 | 0.570008 |
fc1b9a3e2d5ab1a6960954e495b18dce7bfd4941 | 4,245 | py | Python | .venv/Lib/site-packages/dexpy/design.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | 21 | 2016-10-19T18:13:03.000Z | 2021-11-02T13:58:31.000Z | .venv/Lib/site-packages/dexpy/design.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | 43 | 2016-10-11T20:56:28.000Z | 2020-08-20T16:39:38.000Z | .venv/Lib/site-packages/dexpy/design.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | 6 | 2017-12-22T03:47:37.000Z | 2021-03-13T03:45:26.000Z | """Contains information about a designed experiment."""
from xml.dom import minidom
import string
from patsy import dmatrix
import pandas as pd
valid_vars = string.ascii_uppercase.replace("I", "")
def get_var_name(var_id):
"""Converts a variable id into a character representing that factor."""
out = valid_... | 35.082645 | 116 | 0.675383 |
fc6678e49088166c9ff300ffbbc61a4e93721b91 | 6,963 | py | Python | workspace/cogrob/service_manager/client/test_multiple_actions.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/test_multiple_actions.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/test_multiple_actions.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... | 40.719298 | 79 | 0.788166 |
fc84a3b201656ce7ed1e504c63b0976701da01fb | 2,229 | py | Python | tests/onegov/election_day/layouts/test_mail_layout.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/layouts/test_mail_layout.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/layouts/test_mail_layout.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.ballot import Vote
from onegov.ballot import Election
from onegov.election_day.layouts import MailLayout
from tests.onegov.election_day.common import DummyRequest
def test_mail_layout_model_title(session):
layout = MailLayout(None, DummyRequest())
assert layout.model_title(Vote()) is None
asse... | 37.15 | 72 | 0.668461 |
54fcb25209b714aa7ab45ff59b58a2f41d4b8077 | 7,122 | py | Python | examples/language_model/gpt-3/deploy/python/inference.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/language_model/gpt-3/deploy/python/inference.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/language_model/gpt-3/deploy/python/inference.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 38.497297 | 154 | 0.620331 |
37d53e166e1ccf0068180c0b48180305a85e55bc | 2,187 | py | Python | src/processing/Main.py | Phrosten/CodeCompetition_07-2017_BigData | 3d9cb8da2164ea2687471375966d77ff7b129a93 | [
"Apache-2.0"
] | null | null | null | src/processing/Main.py | Phrosten/CodeCompetition_07-2017_BigData | 3d9cb8da2164ea2687471375966d77ff7b129a93 | [
"Apache-2.0"
] | null | null | null | src/processing/Main.py | Phrosten/CodeCompetition_07-2017_BigData | 3d9cb8da2164ea2687471375966d77ff7b129a93 | [
"Apache-2.0"
] | null | null | null | import DataItem, Parse, Processing, Output
#
# Main
#
def main():
json = "DataCollection = {" # json accumulates data to be saved to the script files
# Parse Input
print("--Parsing Input--")
data = Parse.GetInput() # Get the processed data from the races.csv file
# Process da... | 39.763636 | 138 | 0.668496 |
7290e0a2b805b1282c7a0cc5dcec50b60d1dfb28 | 4,610 | py | Python | python_experiments/run_mcap_scalability.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_experiments/run_mcap_scalability.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_experiments/run_mcap_scalability.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | import socket
from exec_utilities import time_out_util
from config import *
from exec_utilities.exec_utils import *
from multiprocessing import Process
def run_exp(env_tag=lccpu12_tag, with_c_group=True):
hostname = socket.gethostname()
with open('config.json') as ifs:
my_config_dict = json.load(ifs... | 43.904762 | 108 | 0.549892 |
f44f858a32536d14c920aea8ef850b4ab14fbd47 | 6,937 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/output/tripinfoDiff.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/output/tripinfoDiff.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/output/tripinfoDiff.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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 avail... | 41.291667 | 96 | 0.609774 |
f4634a59a5f6378160f4f95e789339c53edf7e4f | 22,857 | py | Python | Packs/MobileIronUEM/Integrations/MobileIronCORE/MobileIronCORE.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/MobileIronUEM/Integrations/MobileIronCORE/MobileIronCORE.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/MobileIronUEM/Integrations/MobileIronCORE/MobileIronCORE.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
from typing import Any, Dict, List, Tuple
import urllib3
from CommonServerPython import *
# Disable insecure warnings
urllib3.disable_warnings()
'''Constants'''
PROBLEMATIC_CHARACTERS = ['.', '(', ')', '[', ']', ' ']
REPLACE_WITH = '_'
STANDARD_DEVICE_FIELDS = ','.join(['common.uuid', 'common.complian... | 39.476684 | 130 | 0.609354 |
fea57dc0f8f6387cc43ecd1e7fddffb79e73aa1c | 23,041 | py | Python | DarkRise/darkrise_listener.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | DarkRise/darkrise_listener.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | DarkRise/darkrise_listener.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | #!/usr/bin/python2
#-*- coding:utf-8 -*-
import socket
import colorama
import nclib
from datetime import datetime
import time
import random
import sys
import argparse
import os
import platform
from ftplib import FTP
import readline
banner1 = '''
▓█████▄ ▄▄▄ ██▀███ ██ ▄█▀ ██▀███ ██▓ ██████ ▓█████
▒██▀ █... | 61.938172 | 148 | 0.34022 |
fe03a7b4ed55615392d80f8320c8fcac944662c3 | 1,933 | py | Python | research/cv/faceboxes/preprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | research/cv/faceboxes/preprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/faceboxes/preprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 40.270833 | 87 | 0.609933 |
4a7ff4a0fb1a2d77c7b3a67a1372942afcaeb279 | 5,979 | py | Python | storage/emulated/0/qpython/scripts3/test.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | storage/emulated/0/qpython/scripts3/test.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | storage/emulated/0/qpython/scripts3/test.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | import sys
import time
import types
import androidhelper
try:
import gdata.docs.service
except ImportError:
gdata = None
droid = androidhelper.Android()
def event_loop():
for i in range(10):
time.sleep(1)
droid.eventClearBuffer()
time.sleep(1)
e = droid.eventPoll(1)
if e... | 25.334746 | 94 | 0.695769 |
4abb4523e3bd5adf601d42ef70994703e6103325 | 285 | py | Python | exercises/en/solution_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/en/solution_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/en/solution_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | # Import the English language class and create the nlp object
from spacy.lang.en import English
nlp = English()
# Process the text
doc = nlp("I like tree kangaroos and narwhals.")
# Select the first token
first_token = doc[0]
# Print the first token's text
print(first_token.text)
| 20.357143 | 61 | 0.750877 |
4361ee3fe7d7df699be72920908f10abc3504f4b | 3,053 | py | Python | project/init_data.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/init_data.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/init_data.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | import os
from project import app, db
from project.api import add_oauth2_scheme_with_transport
from project.models import Location
from project.services.admin_unit import upsert_admin_unit_member_role
from project.services.event import upsert_event_category
from project.services.user import upsert_user_role
@app.bef... | 31.802083 | 88 | 0.69964 |
43743118f1580a630e050a80f1987c64841fa56d | 7,422 | py | Python | Packs/AlibabaActionTrail/Integrations/AlibabaActionTrailEventCollector/AlibabaActionTrailEventCollector.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | Packs/AlibabaActionTrail/Integrations/AlibabaActionTrailEventCollector/AlibabaActionTrailEventCollector.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 40 | 2022-03-03T07:34:00.000Z | 2022-03-31T07:38:35.000Z | Packs/AlibabaActionTrail/Integrations/AlibabaActionTrailEventCollector/AlibabaActionTrailEventCollector.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | import demistomock as demisto
from CommonServerPython import *
from SiemApiModule import *
from datetime import datetime
from typing import Any
import six
import hmac
import hashlib
import base64
import urllib3
API_VERSION = '0.6.0'
urllib3.disable_warnings()
class AlibabaParams(BaseModel):
from_: str = Field(a... | 33.432432 | 111 | 0.631366 |
60b1d208b935e15bf61301dc50644048aeaa57c8 | 719 | py | Python | source/pkgsrc/games/accelerator3d/patches/patch-accelerator.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/games/accelerator3d/patches/patch-accelerator.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/games/accelerator3d/patches/patch-accelerator.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-accelerator.py,v 1.1 2016/07/24 02:34:32 kamil Exp $
Adapt for new API.
--- accelerator.py.orig 2016-07-20 19:56:58.692780436 +0000
+++ accelerator.py
@@ -274,7 +274,7 @@ def DisplayInit():
glColorMaterial(GL_FRONT,GL_AMBIENT_AND_DIFFUSE)
glMaterialfv(GL_FRONT,GL_SHININESS,128)
glMaterialfv(GL_FR... | 44.9375 | 139 | 0.816412 |
60f23303f9a34cf7f92fac974a2e95945be309bc | 305 | py | Python | Python/Exercícios_Python/024_primeiras_letras_de_um_texto.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/024_primeiras_letras_de_um_texto.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/024_primeiras_letras_de_um_texto.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""024 - Primeiras letras de um texto
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1Zqxi20Xf-JKqppY20Q8c52RL0PvTyE62
"""
cid = str(input('Em que cidade você nasceu? ')).strip().title()
print(cid[:5] == 'Santo') | 27.727273 | 77 | 0.708197 |
71af758d99b611727faa3eba58d295df9331431c | 108 | gyp | Python | 20190115node/20191107mmap/share-object/binding.gyp | weiruifeng/myblog | 44457607e428c0197baa6f370f0756b657f31964 | [
"MIT"
] | 139 | 2017-08-09T02:32:54.000Z | 2022-01-13T19:44:13.000Z | 20190115node/20191107mmap/share-object/binding.gyp | weiruifeng/myblog | 44457607e428c0197baa6f370f0756b657f31964 | [
"MIT"
] | 3 | 2018-10-07T14:00:57.000Z | 2018-12-20T05:52:10.000Z | 20190115node/20191107mmap/share-object/binding.gyp | weiruifeng/myblog | 44457607e428c0197baa6f370f0756b657f31964 | [
"MIT"
] | 29 | 2018-07-17T01:29:51.000Z | 2022-01-04T09:26:28.000Z | {
"targets": [
{
"target_name": "shareObject",
"sources": [ "shareObject.cc" ]
}
]
} | 13.5 | 37 | 0.453704 |
71b54af142065b208b1e772dab9c647c11d2cde7 | 235 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v7_0/update_item_projected.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v7_0/update_item_projected.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v7_0/update_item_projected.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | import frappe
def execute():
frappe.reload_doctype("Item")
from erpnext.stock.doctype.bin.bin import update_item_projected_qty
for item in frappe.get_all("Item", filters={"is_stock_item": 1}):
update_item_projected_qty(item.name) | 33.571429 | 68 | 0.791489 |
e0a342cc25a5c6015f6b217a9d8743a77ecb04d5 | 1,347 | py | Python | api/models/users.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 2 | 2021-03-23T20:32:38.000Z | 2021-04-21T11:20:12.000Z | docker/api/api/models/users.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 4 | 2021-04-19T11:00:55.000Z | 2021-04-20T08:21:48.000Z | docker/api/api/models/users.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Corona-Info-App
# Nutzerdatenbank
# © 2020 Tobias Höpp.
# Include dependencies
from main import db
# Class definition
class users(db.Model):
__tablename__ = "users"
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(40), unique=True)
password = db.Col... | 31.325581 | 79 | 0.642168 |
4619a3e33c3290a3c42ce08e977de27b99302775 | 9,142 | py | Python | official/cv/yolov3_resnet18/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/yolov3_resnet18/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/yolov3_resnet18/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020 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... | 45.482587 | 117 | 0.655765 |
c77aa79aafe01d221797b4f8d801338cca395d32 | 415 | py | Python | exercises/zh/exc_04_11.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/zh/exc_04_11.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/zh/exc_04_11.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
from spacy.tokens import Span
nlp = spacy.blank("zh")
doc1 = nlp("我去年去了西安,那里的城墙很壮观!")
doc1.ents = [Span(doc1, 5, 7, label="TOURIST_DESTINATION")]
doc2 = nlp("人一辈子一定要去一趟巴黎,但那里的埃菲尔铁塔有点无趣。")
doc2.ents = [Span(doc2, 10, 12, label="TOURIST_DESTINATION")]
doc3 = nlp("深圳也有个巴黎的埃菲尔铁塔,哈哈哈")
doc3.ents = []
doc4 ... | 24.411765 | 61 | 0.703614 |
c7e477fbd3b3421e7f60a69ff409ce7b9adce6e4 | 4,142 | py | Python | pipeswitch/frontend_schedule.py | CcTtry/PipeSwitch | c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e | [
"Apache-2.0"
] | null | null | null | pipeswitch/frontend_schedule.py | CcTtry/PipeSwitch | c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e | [
"Apache-2.0"
] | null | null | null | pipeswitch/frontend_schedule.py | CcTtry/PipeSwitch | c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e | [
"Apache-2.0"
] | null | null | null | import threading
import torch
import importlib
from util.utils import timestamp
class FrontendScheduleThd(threading.Thread):
def __init__(self, model_list, qin, worker_list):
super(FrontendScheduleThd, self).__init__()
self.model_list = model_list
self.qin = qin
self.wor... | 38.351852 | 91 | 0.573877 |
40c81b05f498c243191faf93cb6da9a8308112b5 | 13,481 | py | Python | Packs/NozomiNetworks/Integrations/NozomiNetworks/NozomiNetworks.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/NozomiNetworks/Integrations/NozomiNetworks/NozomiNetworks.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/NozomiNetworks/Integrations/NozomiNetworks/NozomiNetworks.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from datetime import timezone
from typing import Dict, List
from CommonServerPython import *
''' IMPORTS '''
import requests
import json
requests.packages.urllib3.disable_warnings()
class Client(BaseClient):
def http_request(self, method, path, data=None):
response = self._http_request(
me... | 30.158837 | 128 | 0.652548 |
907d31c009c3ebdc2b9157e51837f773f711635c | 803 | py | Python | tests/resources/postgres/postgres-project/tests/conftest.py | Kludex/fastapi-template | 47256eb8f8c7439a4d669172d94ce84c62cdb25a | [
"MIT"
] | 14 | 2021-03-27T22:18:56.000Z | 2022-03-21T19:04:48.000Z | tests/resources/postgres/postgres-project/tests/conftest.py | Kludex/fastapi-template | 47256eb8f8c7439a4d669172d94ce84c62cdb25a | [
"MIT"
] | 33 | 2021-03-28T21:06:22.000Z | 2022-03-07T14:18:26.000Z | tests/resources/postgres/postgres-project/tests/conftest.py | Kludex/fastapi-template | 47256eb8f8c7439a4d669172d94ce84c62cdb25a | [
"MIT"
] | null | null | null | import asyncio
import os
import pytest
from asgi_lifespan import LifespanManager
from dotenv import load_dotenv
from httpx import AsyncClient
load_dotenv(".env")
os.environ["POSTGRES_HOST"] = "localhost"
os.environ["POSTGRES_DB"] = "test"
@pytest.fixture(autouse=True)
async def connection():
from postgres_proje... | 22.305556 | 88 | 0.731009 |
90acc351928ed6b13391b9c49eadba4bd20309a1 | 209 | py | Python | Jennifer Ezeobi/project8-python.py | cornelia247/cil-internship-cohort-01 | b8184337056d378eab16d26b40b26ed58cd177bb | [
"MIT"
] | null | null | null | Jennifer Ezeobi/project8-python.py | cornelia247/cil-internship-cohort-01 | b8184337056d378eab16d26b40b26ed58cd177bb | [
"MIT"
] | null | null | null | Jennifer Ezeobi/project8-python.py | cornelia247/cil-internship-cohort-01 | b8184337056d378eab16d26b40b26ed58cd177bb | [
"MIT"
] | null | null | null | def image_resize(image,width,height):
from PIL import Image
img = Image.open(image)
resized_img = img.resize((width,height))
resized_img.save("resized_image.jpg")
image_resize('rtg.jpeg',70,70) | 34.833333 | 44 | 0.722488 |
90b90a68897ed4a9366a3c6c65c5e730b80ec1a0 | 232 | py | Python | load.py | AlexTibet/ETL | 9291712943d0c0f33b288c9fa39be20975f17e72 | [
"MIT"
] | null | null | null | load.py | AlexTibet/ETL | 9291712943d0c0f33b288c9fa39be20975f17e72 | [
"MIT"
] | null | null | null | load.py | AlexTibet/ETL | 9291712943d0c0f33b288c9fa39be20975f17e72 | [
"MIT"
] | null | null | null | import csv
def load_to_tsv(output_file_name, data: []):
with open(output_file_name, 'w') as tsvfile:
writer = csv.writer(tsvfile, delimiter='\t', newline='\n')
for row in data:
writer.writerow(row)
| 25.777778 | 66 | 0.62931 |
46389b247866baa494a57ddee123261946765ad8 | 1,399 | py | Python | web/web-lemonthinker/src/app/generate.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | 2 | 2021-08-09T17:08:12.000Z | 2021-08-09T17:08:17.000Z | web/web-lemonthinker/src/app/generate.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | null | null | null | web/web-lemonthinker/src/app/generate.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | 1 | 2021-10-09T16:51:56.000Z | 2021-10-09T16:51:56.000Z | import os
from PIL import Image, ImageDraw, ImageFont
import sys
font = ImageFont.truetype('static/generator/comic-sans.ttf', size=48)
outfile = sys.argv[1]
text = sys.argv[2]
if len(text) > 1000: # Too much text :lemonthink:
text = "Too long!"
width, height = 512, 562
img = Image.new('RGB', (width, height), colo... | 27.431373 | 76 | 0.671909 |
81f868ed76fdfa43c1347a437ea368e6ccc86ad3 | 2,618 | py | Python | official/cv/maskrcnn_mobilenetv1/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/maskrcnn_mobilenetv1/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/maskrcnn_mobilenetv1/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 39.074627 | 104 | 0.726127 |
c37d8e0c464c90e9f20ebc10fdb648a7dad4f993 | 8,933 | py | Python | src/onegov/election_day/forms/vote.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/forms/vote.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/forms/vote.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from datetime import date
from onegov.election_day import _
from onegov.form import Form
from wtforms import BooleanField
from wtforms import RadioField
from wtforms import StringField
from wtforms.fields.html5 import DateField
from wtforms.fields.html5 import URLField
from wtforms.validators import InputRequired
cla... | 33.837121 | 71 | 0.59185 |
5efaf43904ee2fcea0ab4bbb672247f81f7a0087 | 10,460 | py | Python | venv/lib/python3.7/site-packages/twilio/rest/preview/bulk_exports/export_configuration.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | 4 | 2020-11-13T02:31:25.000Z | 2020-12-24T22:04:30.000Z | venv/lib/python3.7/site-packages/twilio/rest/preview/bulk_exports/export_configuration.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | 7 | 2020-06-03T19:08:42.000Z | 2021-09-22T19:08:32.000Z | bot/lib/python3.7/site-packages/twilio/rest/preview/bulk_exports/export_configuration.py | carlosrh18/DavinciBot | d73a6b7f68d7bab25d134d3f85c6b63a86c206c5 | [
"MIT"
] | 1 | 2020-06-03T19:22:39.000Z | 2020-06-03T19:22:39.000Z | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base.list_resource import ListResource
f... | 35.821918 | 108 | 0.677725 |
6f4d90fa2bee54d978df33be284969567ac162cf | 372 | pyde | Python | sketches/particleSystem03/particleSystem03.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/particleSystem03/particleSystem03.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/particleSystem03/particleSystem03.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | # Single Particle
from particle import Particle
particles = []
def setup():
global loc
size(640, 480)
loc = PVector(width/2, 50)
def draw():
global loc
background(96)
particles.append(Particle(loc))
for particle in particles:
particle.run()
if particle.isDead():
... | 18.6 | 35 | 0.607527 |
6f5c89b4c377aada1a167116e4bddd9d3b8bce6d | 571 | py | Python | hello/__init__.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2017-10-23T14:58:47.000Z | 2017-10-23T14:58:47.000Z | hello/__init__.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | null | null | null | hello/__init__.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2018-04-06T07:49:18.000Z | 2018-04-06T07:49:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import datetime
import logging.config
def log(func):
def wrapper(*args, **kw):
print('call %s() in %s :' % (func.__name__, datetime.datetime.now()))
result = func(*args, **kw)
time.sleep(0.1)
print('called %s() in %s :' % ... | 19.033333 | 79 | 0.616462 |
48bb16be3ec9590ae19749e1eb4f5077faf74f0c | 1,218 | py | Python | Beginner/03. Python/indian_flag.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 1 | 2021-10-06T13:55:02.000Z | 2021-10-06T13:55:02.000Z | Beginner/03. Python/indian_flag.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | Beginner/03. Python/indian_flag.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | import turtle
turtle.penup()
turtle.goto(-100,100)
turtle.color("black")
#orange
turtle.pendown()
turtle.begin_fill()
turtle.fillcolor("#FF9933")
turtle.left(90)
turtle.forward(90)
turtle.right(90)
turtle.forward(600)
turtle.right(90)
turtle.forward(90)
turtle.right(90)
turtle.forward(600)
turtle.end_fill()
#white ... | 15.615385 | 73 | 0.743842 |
960660456fd6d635e92d223aa55f6e6be63a677b | 137 | py | Python | basics/mod_divmod.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | 1 | 2019-04-07T23:14:29.000Z | 2019-04-07T23:14:29.000Z | basics/mod_divmod.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | null | null | null | basics/mod_divmod.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | null | null | null | first = int(input())
second = int(input())
mod = str(divmod(first,second))
print(str(first//second))
print(str(first%second))
print(mod) | 19.571429 | 31 | 0.70073 |
96218db972c8654003ef3153e653a612a6a71917 | 621 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v10_0/update_assessment_result.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_assessment_result.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v10_0/update_assessment_result.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc('education', 'doctype', 'assessment_result')
frappe.db.sql("""
UPDATE `tabAssessment Result` AS ar
INNER JOIN `tabAssess... | 31.05 | 71 | 0.743961 |
82621c7ffb9b5641e190e11ba905c2483e684e27 | 2,820 | py | Python | apps/user/tests.py | OpenAdaptronik/Rattler | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 2 | 2018-05-18T08:38:29.000Z | 2018-05-22T08:26:09.000Z | apps/user/tests.py | IT-PM-OpenAdaptronik/Webapp | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 118 | 2017-10-31T13:45:09.000Z | 2018-02-24T20:51:42.000Z | apps/user/tests.py | OpenAdaptronik/Rattler | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | null | null | null | """ License
MIT License
Copyright (c) 2017 OpenAdaptronik
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge,... | 45.483871 | 100 | 0.702482 |
8195a38b51a81246367366e617438287b74228b4 | 228 | py | Python | src/server/run.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | 6 | 2020-12-15T18:57:53.000Z | 2022-02-06T18:54:35.000Z | src/server/run.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | 186 | 2020-11-17T10:18:17.000Z | 2022-03-02T07:19:22.000Z | src/server/run.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | 1 | 2020-12-14T19:37:30.000Z | 2020-12-14T19:37:30.000Z | from gevent import monkey
monkey.patch_all()
#from eventlet import hubs
#hubs.use_hub("poll")
from config import app, socketio
if __name__ == '__main__':
socketio.run(app, host="0.0.0.0", port=5000, use_reloader=False)
| 17.538462 | 68 | 0.72807 |
4856989b200561f9e6d7480a5473415c36181b3a | 11,045 | py | Python | movies/project/OpenMovie.py | ptracton/ExperimentalPython | a3159226982ec9656bb0f81f6997687da22f4466 | [
"MIT"
] | null | null | null | movies/project/OpenMovie.py | ptracton/ExperimentalPython | a3159226982ec9656bb0f81f6997687da22f4466 | [
"MIT"
] | null | null | null | movies/project/OpenMovie.py | ptracton/ExperimentalPython | a3159226982ec9656bb0f81f6997687da22f4466 | [
"MIT"
] | null | null | null | """
This is a wrapper around the Open Movie Database python API module.
"""
import json
import logging
import os
import re
import sys
import traceback
import bs4
import omdb
import requests
import numpy as np
import pandas as pd
import sqlalchemy
import ORM
class OpenMovie():
"""
"""
def __init__(sel... | 34.842271 | 119 | 0.553373 |
6fb9bbbbd99b4f74561fc3f1f9d20270bab3fe56 | 1,393 | py | Python | other/re-risky/split-version/task3/spoilers_and_source/src/gen_mixer.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | other/re-risky/split-version/task3/spoilers_and_source/src/gen_mixer.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | other/re-risky/split-version/task3/spoilers_and_source/src/gen_mixer.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #!/usr/bin/python
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 24.438596 | 74 | 0.640345 |
6ff75a8ba5348197d413c190147804d48d13cbcf | 1,408 | py | Python | code/tests/test_behaviour.py | simonmulser/master-thesis | 5ca2ddda377a0eede5a3c50866e0f90292c5448f | [
"CC-BY-4.0"
] | null | null | null | code/tests/test_behaviour.py | simonmulser/master-thesis | 5ca2ddda377a0eede5a3c50866e0f90292c5448f | [
"CC-BY-4.0"
] | null | null | null | code/tests/test_behaviour.py | simonmulser/master-thesis | 5ca2ddda377a0eede5a3c50866e0f90292c5448f | [
"CC-BY-4.0"
] | 1 | 2019-06-05T09:10:30.000Z | 2019-06-05T09:10:30.000Z | from mock import MagicMock
from behaviour import CatchUpBehaviour
import unittest
from mock import patch
class BehaviourTest(unittest.TestCase):
def __init__(self, *args, **kwargs):
super(BehaviourTest, self).__init__(*args, **kwargs)
self.client = None
self.chain = None
self.ip =... | 32 | 80 | 0.664063 |
d228f7e1a443242a5f50d16acf8245723fbdb14f | 8,341 | py | Python | 21-fs-ias-lec/11-Onboarding/Demo_D_new/feedCtrl/ui.py | cn-uofbasel/BCN | 2d0852e00f2e7f3c4f7cf30f60c6765f2761f80a | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 21-fs-ias-lec/11-Onboarding/Demo_D_new/feedCtrl/ui.py | cn-uofbasel/BCN | 2d0852e00f2e7f3c4f7cf30f60c6765f2761f80a | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 21-fs-ias-lec/11-Onboarding/Demo_D_new/feedCtrl/ui.py | cn-uofbasel/BCN | 2d0852e00f2e7f3c4f7cf30f60c6765f2761f80a | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue May 19 15:15:14 2020
@author: yannickrummele
"""
from tkinter import *
from tkinter import ttk
# from uiFunctionsHandler import UiFunctionHandler
from .uiFunctionsHandler import *
from openpyxl import load_workbook, Workbook
import bluetooth
import o... | 34.044898 | 133 | 0.652919 |
f741c6459bdc3ea082e71324bee55d402c52773d | 3,598 | py | Python | wifisky-master/wifisky.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 50 | 2019-08-19T00:28:30.000Z | 2022-03-26T15:02:52.000Z | wifisky-master/wifisky.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | wifisky-master/wifisky.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 22 | 2019-09-09T17:15:39.000Z | 2022-03-02T17:44:03.000Z | import os
import sys
import subprocess
from os import system
from time import sleep
follow = """
{+}-- https://www.facebook.com/dzmanisso
{+}-- https://twitter.com/ManissoDz
{+}-- https://github.com/Manisso
{+}-- https://www.linkedin.com/in/Manisso
{+}-- https://www.instagram.com/man.i.s/
"""
#Wash is a utility for i... | 32.414414 | 159 | 0.613674 |
f78018f403d856da37d56769d799e81cd67568ba | 1,072 | py | Python | pyventskalender/tag04_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | pyventskalender/tag04_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | pyventskalender/tag04_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | #%%
def ich_haette_gerne_so_viele_katzen(anzahl: int) -> str:
text = "Ich hätte gerne {} Katze".format(anzahl)
if anzahl > 1:
text += "n"
return text
# %%
# Damit können wir schon ein kleines Spiel bauen.
# Hier wird eine Zufallszahl zwischen 1 und 20 gewählt:
import random
zufallszahl = random.ran... | 33.5 | 73 | 0.685634 |
e3d6c8626174585c1d5c821d1c6df2032ac78b9e | 4,332 | py | Python | Controller.py | santosgv/bot.instagram | 15927248996813b9b3e727b721a60e0380813e27 | [
"MIT"
] | null | null | null | Controller.py | santosgv/bot.instagram | 15927248996813b9b3e727b721a60e0380813e27 | [
"MIT"
] | null | null | null | Controller.py | santosgv/bot.instagram | 15927248996813b9b3e727b721a60e0380813e27 | [
"MIT"
] | null | null | null | import time
import random
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.chrome.options import Options
from tkinter import messagebox
from threading import *
cl... | 37.025641 | 101 | 0.581256 |
5436283c9ce1d05e7c4b0f1edf5e6add44b9a6fa | 4,900 | py | Python | trs.py | sonar-idh/Transformer | bbfde9d19ad4a4917257483ba66eb30a8294244d | [
"MIT"
] | null | null | null | trs.py | sonar-idh/Transformer | bbfde9d19ad4a4917257483ba66eb30a8294244d | [
"MIT"
] | null | null | null | trs.py | sonar-idh/Transformer | bbfde9d19ad4a4917257483ba66eb30a8294244d | [
"MIT"
] | null | null | null | # coding: utf-8
import gzip
import zipfile
import time
import datetime
from src.marcTransform import MARC21
from src.eadTransform import EAD
from enrich.transform_ocr import write_enriched_graphml, process_tsv
from enrich.merge import merge_all_files
import fire
if __name__=='__main__':
# PARAMETER
of = 'gra... | 40.833333 | 275 | 0.569388 |
54450406b4488edf1deb04579d2f8c4217c2fa15 | 1,524 | py | Python | tests/test_006_mitgliedAendern.py | mribrgr/StuRa-Mitgliederdatenbank | 87a261d66c279ff86056e315b05e6966b79df9fa | [
"MIT"
] | 8 | 2019-11-26T13:34:46.000Z | 2021-06-21T13:41:57.000Z | src/tests/test_006_mitgliedAendern.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 93 | 2019-12-16T09:29:10.000Z | 2021-04-24T12:03:33.000Z | src/tests/test_006_mitgliedAendern.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 2 | 2020-12-03T12:43:19.000Z | 2020-12-22T21:48:47.000Z | from tests.MyTestCase import MyTestCase
from tests.MyFuncLogin import loginAsLukasAdmin
from tests.MyFuncMitglieder import addMitglied
class TestMitgliedAendern(MyTestCase):
"""
Setup and Teardown functions are specified in
MyTestCase
"""
# Tests
def test_1MitgliedAendern_AsSuperuser(... | 31.102041 | 118 | 0.599081 |
b7b94f0dad6b6eeb724523c65c7ba9df78b1b0a6 | 414 | py | Python | Tutorials/10 Days of Statistics/Day 5/normal_distribution1.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Tutorials/10 Days of Statistics/Day 5/normal_distribution1.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Tutorials/10 Days of Statistics/Day 5/normal_distribution1.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/bin/python3
import sys
from math import erf, sqrt
def phi(x, mu, std):
return (1.0 + erf((x-mu) / (std*sqrt(2.0)))) / 2.0
arr1 = [float(arr_i) for arr_i in input().strip().split(' ')]
mu = arr1[0]
std = arr1[1]
x = float(input())
arr2 = [float(arr_i) for arr_i in input().strip().split(' ')]
y1 = arr2[0]
y2 = ... | 20.7 | 61 | 0.594203 |
4d73f2aab34be725b6e91ed6f5a250c5b2ba2e85 | 498 | py | Python | exercises/de/solution_04_12_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/de/solution_04_12_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/de/solution_04_12_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
from spacy.tokens import Span
nlp = spacy.blank("de")
doc1 = nlp("Reddit und Patreon helfen Kreativen beim Aufbau von Communities")
doc1.ents = [
Span(doc1, 0, 1, label="WEBSITE"),
Span(doc1, 2, 3, label="WEBSITE"),
]
doc2 = nlp("PewDiePie knackt Rekord auf YouTube")
doc2.ents = [Span(doc2, 4, 5... | 26.210526 | 88 | 0.690763 |
c428743710ce72817dae6f9947356aa2704809b3 | 506 | py | Python | PYTHON/Strings/string_formatting.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Strings/string_formatting.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Strings/string_formatting.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
def print_formatted(number):
max_len = len(format(number, 'b'))
for i in range(1, number + 1):
d = i
o = format(i, 'o')
h = format(i, 'X')
b = format(i, 'b')
print('{0: >{width}}'.format(d, width=max_len), '{0: >{width}}'.format(o, wi... | 24.095238 | 181 | 0.549407 |
671efc746d7b669f74bdfbb18374b880ebb47a87 | 3,069 | py | Python | _Dist/NeuralNetworks/_Tests/Pruner/Basic.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 1,107 | 2016-09-21T02:18:36.000Z | 2022-03-29T02:52:12.000Z | _Dist/NeuralNetworks/_Tests/Pruner/Basic.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 18 | 2016-12-22T10:24:47.000Z | 2022-03-11T23:18:43.000Z | _Dist/NeuralNetworks/_Tests/Pruner/Basic.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 776 | 2016-12-21T12:08:08.000Z | 2022-03-21T06:12:08.000Z | import os
import sys
root_path = os.path.abspath("../../../../")
if root_path not in sys.path:
sys.path.append(root_path)
from _Dist.NeuralNetworks.NNUtil import *
from _Dist.NeuralNetworks._Tests.Pruner.Base import Base
class Basic(Base):
def __init__(self, *args, **kwargs):
super(Basic, self).__ini... | 40.381579 | 110 | 0.657217 |
22033f01b4daed4ff0f449b577334dc9a5431355 | 78 | py | Python | solutions/qrcode_demo/src/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | 4,538 | 2017-10-20T05:19:03.000Z | 2022-03-30T02:29:30.000Z | solutions/qrcode_demo/src/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | 1,088 | 2017-10-21T07:57:22.000Z | 2022-03-31T08:15:49.000Z | solutions/qrcode_demo/src/main.py | willianchanlovegithub/AliOS-Things | 637c0802cab667b872d3b97a121e18c66f256eab | [
"Apache-2.0"
] | 1,860 | 2017-10-20T05:22:35.000Z | 2022-03-27T10:54:14.000Z | # Welcome! This is a sample code.
import sys
sys.stdout.write("hello world!")
| 19.5 | 33 | 0.730769 |
58b0f567bce5d3f0fef8a1386660ca7f2cf753a9 | 5,632 | py | Python | 2018/finals/misc-polyglot/polyglot.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2018/finals/misc-polyglot/polyglot.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2018/finals/misc-polyglot/polyglot.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 31.640449 | 80 | 0.64968 |
1885d800466b1a25d3e2a84dcef14da96ad88c6b | 694 | py | Python | Assembler/trim.py | Laegluin/mikrorechner | 7e5e878072c941e422889465c43dea838b83e5fd | [
"MIT"
] | 1 | 2019-01-28T01:53:20.000Z | 2019-01-28T01:53:20.000Z | Assembler/trim.py | Laegluin/mikrorechner | 7e5e878072c941e422889465c43dea838b83e5fd | [
"MIT"
] | null | null | null | Assembler/trim.py | Laegluin/mikrorechner | 7e5e878072c941e422889465c43dea838b83e5fd | [
"MIT"
] | null | null | null | import re
def cut_comments(commands):
return [re.sub(r'#(.)*','',command) for command in commands]
def cut_whitespace_lines(commands):
return [command for command in commands if not re.match('\s*$',command)]
def trim_word_gap(commands):
return [re.sub("[\s]", " ", command) for command in commands]
def c... | 34.7 | 81 | 0.733429 |
8306c00e7e69a2fdce92d8a2611cd0aee4a049bc | 232 | py | Python | online_library/online_library/library/admin.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | 1 | 2022-03-03T10:16:14.000Z | 2022-03-03T10:16:14.000Z | online_library/online_library/library/admin.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | online_library/online_library/library/admin.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | from django.contrib import admin
from online_library.library.models import Profile, Book
@admin.register(Profile)
class ProfileAdmin(admin.ModelAdmin):
pass
@admin.register(Book)
class BookAdmin(admin.ModelAdmin):
pass
| 16.571429 | 55 | 0.784483 |
834b590d64b7afdf26496e4288c69f240fc3b9bf | 8,670 | py | Python | SequentialBayesianRegression/adaptive_coefficients.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | null | null | null | SequentialBayesianRegression/adaptive_coefficients.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-02-11T23:44:52.000Z | 2021-02-11T23:44:52.000Z | SequentialBayesianRegression/adaptive_coefficients.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-12-16T01:02:23.000Z | 2021-12-16T01:02:23.000Z | # %% [markdown]
# # Bayesian Linear Regression - Adaptive coefficients
# This post follows on from looking at [Bayesian Linear Regression](https://www.richard-stanton.com/2021/06/07/sequential-bayesian-regression.html).
# Here we look at the ability of the above method to track non-stationary problems where the regress... | 32.111111 | 148 | 0.678316 |
3dc5417a10c1ae37342f2c35ee753ee038731482 | 3,024 | py | Python | domain/Game.py | MusicMemory/Ornithology_1.0 | 08ded140908ecc393218705fd588ceaf91e6b2c0 | [
"Apache-2.0"
] | null | null | null | domain/Game.py | MusicMemory/Ornithology_1.0 | 08ded140908ecc393218705fd588ceaf91e6b2c0 | [
"Apache-2.0"
] | null | null | null | domain/Game.py | MusicMemory/Ornithology_1.0 | 08ded140908ecc393218705fd588ceaf91e6b2c0 | [
"Apache-2.0"
] | null | null | null | import random as r
from domain.BirdRepository import BirdRepository
MAX_ITERATIONS = 100
class Game:
def __init__(self, no_birds, no_questions, no_answers, difficulty):
self.__points = 0
self.__no_answers = no_answers
self.__questions = [None for i in range(no_questions)]
self.__a... | 43.826087 | 112 | 0.612765 |
3de30f1a3b317db5a3a41d5d199457c075b9fbfc | 14,586 | py | Python | research/recommend/Fat-DeepFFM/src/fat_deepffm.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | research/recommend/Fat-DeepFFM/src/fat_deepffm.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/recommend/Fat-DeepFFM/src/fat_deepffm.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.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... | 38.083551 | 116 | 0.617099 |
b11b360dfaaf557587380037c93d3d1a70785d10 | 1,039 | py | Python | NN/Test/PyTorch/Auto/Test.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 1,107 | 2016-09-21T02:18:36.000Z | 2022-03-29T02:52:12.000Z | NN/Test/PyTorch/Auto/Test.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 18 | 2016-12-22T10:24:47.000Z | 2022-03-11T23:18:43.000Z | NN/Test/PyTorch/Auto/Test.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 776 | 2016-12-21T12:08:08.000Z | 2022-03-21T06:12:08.000Z | from NN.PyTorch.Auto.Networks import *
from Util.Util import DataUtil
def main():
nn = NNDist()
save = False
load = False
show_loss = True
train_only = False
verbose = 2
lr = 0.001
lb = 0.001
epoch = 5
record_period = 1
x, y = DataUtil.get_dataset("mnis... | 24.162791 | 102 | 0.538017 |
49917f4eed789005e1d94ec6a4542cdbe8142361 | 5,157 | py | Python | kts/modelling/pipeline.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 18 | 2019-02-14T13:10:07.000Z | 2021-11-26T07:10:13.000Z | kts/modelling/pipeline.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-02-17T14:06:42.000Z | 2019-09-15T18:05:54.000Z | kts/modelling/pipeline.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-09-15T13:12:42.000Z | 2020-04-15T14:05:54.000Z | import sys
import time
from contextlib import redirect_stdout
from copy import deepcopy
from functools import partial
from typing import List, Tuple
import numpy as np
import pandas as pd
from IPython.display import display
from kts.settings import cfg
from kts.ui.feature_computing_report import FeatureComputingRepor... | 34.844595 | 99 | 0.608299 |
b8c5da2d4d2b1f80e24241ebd3306d13de67205c | 13,279 | py | Python | code/02_study_population/CCU013_20_whole_population_demographics_comorbidities.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | code/02_study_population/CCU013_20_whole_population_demographics_comorbidities.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | code/02_study_population/CCU013_20_whole_population_demographics_comorbidities.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | # Databricks notebook source
# MAGIC %run /Workspaces/dars_nic_391419_j3w9t_collab/CCU013/COVID-19-SEVERITY-PHENOTYPING/CCU013_00_helper_functions
# COMMAND ----------
# MAGIC %md
# MAGIC # 1) The STUDY population
# MAGIC From `ccu013_dp_skinny_patient_23_01_2020`
# COMMAND ----------
# MAGIC %sql
# MAGIC SELECT
# ... | 30.95338 | 301 | 0.727841 |
77125160ee2a57090cfbeded5b8d94f58d304b75 | 1,120 | py | Python | ais3-pre-exam-2022-writeup/Web/Gallery/release/bot/xssbot.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | ais3-pre-exam-2022-writeup/Web/Gallery/release/bot/xssbot.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | ais3-pre-exam-2022-writeup/Web/Gallery/release/bot/xssbot.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import time
import os
from selenium.webdriver import Chrome
from selenium.webdriver.chrome.options import Options
from selenium.common.exceptions import TimeoutException, WebDriverException
TIMEOUT = 3
def browse(path):
options = Options()
options.headless = True
options.add_argum... | 29.473684 | 75 | 0.688393 |
771c9cd72a1672b1ce292fc32bfe7a942446ca43 | 1,213 | py | Python | Python/flask/decorator.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/flask/decorator.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/flask/decorator.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | def outer(func):
counter = 0
def inner():
# nonlocal bezeichnent das Variable nicht nur lokal vorhanden (1 Ebene darüber)
nonlocal counter
print(f"Funktion wurde {counter}x ausgeführt ")
counter += 1
func()
return inner
# Funktion cached z.B. kompliziert berechnet... | 19.253968 | 118 | 0.638912 |
02c46855700b19fc6fe3b60f036706cf2d98b584 | 571 | py | Python | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/rows_not_exists.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/rows_not_exists.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/rows_not_exists.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from datetime import datetime
from typing import Optional, Tuple
from watchmen_data_kernel.storage import TopicDataService
from watchmen_model.dqc import MonitorRule
from .trigger_pipeline import trigger
from .types import RuleResult
def rows_not_exists(
data_service: TopicDataService, rule: Optional[MonitorRule],... | 27.190476 | 65 | 0.796848 |
b831a7d3680eb0d54d3318692d464095ba09beb5 | 563 | py | Python | 2015/09/under-five-mortality-20150908/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2015/09/under-five-mortality-20150908/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2015/09/under-five-mortality-20150908/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
import base_filters
COPY_GOOGLE_DOC_KEY = '171b9pt64T4zRh0SnrZf4pqUeij3enQMnNqjl2-6TOkk'
USE_ASSETS = False
# Use these variables to override the default cache timeouts for this graphic
# DEFAULT_MAX_AGE = 20
# ASSETS_MAX_AGE = 300
def breaks(n):
n = float(n)
if (n >= 200):
r... | 20.107143 | 77 | 0.651865 |
b84dabdec3497fb2cb8978676af97ad1ebafcbdc | 1,920 | py | Python | python_gui_tkinter/Tkinter/TkinterCourse/24_canvas_wid_3.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/Tkinter/TkinterCourse/24_canvas_wid_3.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/Tkinter/TkinterCourse/24_canvas_wid_3.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | '''
We demonstrate now how to print text on a canvas. We will extend and modify the previous example for this purpose. The method create_text() can be applied to a canvas object to write text on it. The first two parameters are the x and the y positions of the text object. By default, the text is centred on this positi... | 39.183673 | 545 | 0.613542 |
b85c4308999ccd734994a784c89be3d3a7ee660a | 1,148 | py | Python | frappe-bench/apps/erpnext/erpnext/config/support.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/config/support.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/config/support.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Issues"),
"items": [
{
"type": "doctype",
"name": "Issue",
"description": _("Support queries from customers."),
},
{
"type": "doctype",
"name": "Communication",
"descri... | 18.819672 | 59 | 0.497387 |
a2ff38ba2776d995ccd8c24ec6d2fac919aa2657 | 1,467 | py | Python | Problems/Depth-First Search/medium/DeleteNodesReturnForest/delete_nodes_return_forest.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Depth-First Search/medium/DeleteNodesReturnForest/delete_nodes_return_forest.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Depth-First Search/medium/DeleteNodesReturnForest/delete_nodes_return_forest.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | import copy
from typing import Optional, List
# Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
def delNodes(self, root: Optional[TreeNode], to_delete: List[int]) -> List[TreeNode]:
... | 26.196429 | 87 | 0.605317 |
a768c15c47295bfb4101b3efc0d140b26a322eda | 566 | py | Python | Python/Programação_em_Python_Essencial/4- Estruturas de Repetição/loop_while.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Programação_em_Python_Essencial/4- Estruturas de Repetição/loop_while.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Programação_em_Python_Essencial/4- Estruturas de Repetição/loop_while.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | """
Loop while
Forma geral
while expressão_booleana:
//execução do loop
O bloco do while será repetido enquanto a expressão booleana for verdadeira.
Expressão Booleana é toda expressão onde o resultado é verdadeiro ou falso (True or False).
Exemplo:
num = 5
num < 5
# Exemplo 1
numero = 1
while numero < 10:
... | 15.297297 | 107 | 0.713781 |
ac04a271ec359391dd64ff7351759ba52b53caa8 | 1,289 | py | Python | ladon-server/software/src/python/mqtt-mongo-wrapper/MongoWrapper.py | LucasRGoes/ladon-io | ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6 | [
"MIT"
] | 1 | 2018-04-29T22:33:42.000Z | 2018-04-29T22:33:42.000Z | ladon-server/software/src/python/mqtt-mongo-wrapper/MongoWrapper.py | LucasRGoes/ladon-io | ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6 | [
"MIT"
] | null | null | null | ladon-server/software/src/python/mqtt-mongo-wrapper/MongoWrapper.py | LucasRGoes/ladon-io | ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6 | [
"MIT"
] | null | null | null | ## IMPORTS ##
import logging # Logging: provides a set of convenience functions for simple logging usage
from pymongo import MongoClient # Pymongo: is a Python distribution containing tools for working with MongoDB
## CLASS ##
class MongoWrapper:
class __MongoWrapper:
# __init__ (Private Constructor)
# ---... | 27.425532 | 109 | 0.726144 |
ac5d72ada6e9a5be472ec8e408b6836fb8c33822 | 17,115 | py | Python | SATisPy/dpll.py | zacsimile/SATisPy | 1e4385c7262a1c6025c46b079dfc0f65e9267f71 | [
"MIT"
] | null | null | null | SATisPy/dpll.py | zacsimile/SATisPy | 1e4385c7262a1c6025c46b079dfc0f65e9267f71 | [
"MIT"
] | null | null | null | SATisPy/dpll.py | zacsimile/SATisPy | 1e4385c7262a1c6025c46b079dfc0f65e9267f71 | [
"MIT"
] | null | null | null | import argparse
import numpy as np
from itertools import compress
from numpy import sign, floor
class Solver:
def __init__(self, clauses):
'''
Create CDCL Solver object and preprocess the CNF clauses.
'''
# Things we need to keep track of
self.clauses = clauses
self.... | 35.28866 | 210 | 0.51376 |
3bdd1b6b9b5c4a484ddf3ae109020c455f08521d | 203 | py | Python | huTools/__init__.py | gadventures/huTools | 8bc58d63491bcd3cfc3e78d219be703d943ffeb5 | [
"BSD-3-Clause"
] | null | null | null | huTools/__init__.py | gadventures/huTools | 8bc58d63491bcd3cfc3e78d219be703d943ffeb5 | [
"BSD-3-Clause"
] | null | null | null | huTools/__init__.py | gadventures/huTools | 8bc58d63491bcd3cfc3e78d219be703d943ffeb5 | [
"BSD-3-Clause"
] | null | null | null | """This module collects several utility funictions we found useful at HUDORA. Nothing special in there.
Consider it BSD Licensed.
"""
from __future__ import unicode_literals
__revision__ = "$Revision$"
| 29 | 103 | 0.793103 |
02069a19394ca795832c817608b65cf92c17d4ec | 120 | py | Python | warp/__init__.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | warp/__init__.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | warp/__init__.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | from .graph import *
from .workspace import Workspace
from .pipes import *
from .data import *
from .globals import log
| 20 | 32 | 0.766667 |
0277aed8de7a1af562ea444bdb2106503a97b517 | 8,338 | py | Python | bindings/python/ensmallen/datasets/get_dataset.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | bindings/python/ensmallen/datasets/get_dataset.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | bindings/python/ensmallen/datasets/get_dataset.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | """Utility to automatically retrieve a graph by name and repository."""
import os
from glob import glob
from typing import Any, Callable, List, Optional
from tqdm.auto import tqdm
import compress_json
import pandas as pd
from ensmallen import Graph, datasets
from userinput.utils import closest, set_validator, get_k_clo... | 31.94636 | 100 | 0.566323 |
ceb5738ec0e17cbc6dbb8fd18c232cb878db00fa | 226 | py | Python | funpmp/ev.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2017-10-23T14:58:47.000Z | 2017-10-23T14:58:47.000Z | funpmp/ev.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | null | null | null | funpmp/ev.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2018-04-06T07:49:18.000Z | 2018-04-06T07:49:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def ev_cal(pv, ac, ev):
sv = ev - pv
spi = ev / pv
cv = ev - ac
cpi = ev / ac
return sv, spi, cv, cpi
if __name__ == '__main__':
ev_cal(800, 1000, 700)
| 15.066667 | 27 | 0.513274 |
49070b1bcf74e2b81d8bd7f0c0c4ea20b8fe2865 | 305 | py | Python | marsyas-vamp/marsyas/scripts/addMarSystem.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/addMarSystem.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/addMarSystem.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import os
import sys
import modifyBuild
marsystem = 1
# action: 1 == add filename. 2 == remove filename.
action = 1
try:
source_filename = sys.argv[1]
except:
print "Please enter the name of your new MarSystem"
sys.exit()
modifyBuild.process(source_filename, marsystem, action)
| 16.944444 | 55 | 0.734426 |
6530338c38d70fdf1006d3bde6b119878c9971c3 | 2,424 | py | Python | Hadoop/hadoop-conf/topology_script.py | lhfei/cloud-doc | b5624c10cbda7eb8e563e3a67920bb7bc7815a7f | [
"Apache-2.0"
] | 5 | 2016-06-25T15:49:17.000Z | 2020-01-17T12:05:32.000Z | Hadoop/hadoop-conf/topology_script.py | lhfei/cloud-doc | b5624c10cbda7eb8e563e3a67920bb7bc7815a7f | [
"Apache-2.0"
] | 1 | 2018-03-02T04:03:48.000Z | 2018-03-02T04:03:48.000Z | Hadoop/hadoop-conf/topology_script.py | lhfei/cloud-doc | b5624c10cbda7eb8e563e3a67920bb7bc7815a7f | [
"Apache-2.0"
] | 4 | 2015-08-31T14:51:10.000Z | 2017-09-04T13:27:58.000Z | #!/usr/bin/env python
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"Lic... | 36.179104 | 109 | 0.724422 |
334e671d751bf7a65eeef713ed223c0feb15ac7e | 3,580 | py | Python | solutions/graph_based_recommend/webserver/src/pinsage/data_utils.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | 2 | 2020-08-08T02:58:14.000Z | 2020-08-08T04:57:35.000Z | solutions/graph_based_recommend/webserver/src/pinsage/data_utils.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | solutions/graph_based_recommend/webserver/src/pinsage/data_utils.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | 1 | 2021-03-09T12:42:46.000Z | 2021-03-09T12:42:46.000Z | import torch
import dgl
import numpy as np
import scipy.sparse as ssp
# This is the train-test split method most of the recommender system papers running on MovieLens
# takes. It essentially follows the intuition of "training on the past and predict the future".
# One can also change the threshold to make validation ... | 44.197531 | 102 | 0.665642 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.