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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fc8d7dfc7065f1289f998e19f6eb23be82ecd370 | 201 | py | Python | exercises/pt/exc_02_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/pt/exc_02_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/pt/exc_02_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
# Carregue o modelo en_core_web_md
nlp = ____
# Processe um texto
doc = nlp("Two bananas in pyjamas")
# Imprima o vetor para "bananas"
bananas_vector = ____.____
print(bananas_vector)
| 16.75 | 35 | 0.756219 |
0752e417784f3568ba2147ee1ab3a3032ecdf803 | 1,809 | py | Python | addition_module/DMUE/inference.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 1,329 | 2021-01-13T07:06:30.000Z | 2022-03-31T07:23:39.000Z | addition_module/DMUE/inference.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 115 | 2021-01-13T10:42:57.000Z | 2022-03-28T03:57:52.000Z | addition_module/DMUE/inference.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 351 | 2021-01-13T07:21:00.000Z | 2022-03-29T14:11:39.000Z | import os
from PIL import Image
import torch
import torch.nn.functional as F
import torchvision.transforms as T
from models.make_target_model import make_target_model
class Config:
pass
cfg = Config()
cfg.ori_shape = (256, 256)
cfg.image_crop_size = (224, 224)
cfg.normalize_mean = [0.5, 0.5, 0.5]
cfg.normalize_... | 27.830769 | 106 | 0.646766 |
ab621eabce2fcfbc8ac6a3883f6cd9ee34fd2ff2 | 1,194 | py | Python | checks/domain_variations.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 19 | 2018-04-20T11:03:41.000Z | 2022-01-12T20:58:56.000Z | checks/domain_variations.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 160 | 2018-04-05T16:12:59.000Z | 2022-03-01T13:01:27.000Z | checks/domain_variations.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 8 | 2018-11-05T13:07:57.000Z | 2021-06-11T11:46:43.000Z | """
This adds commonly tried variations of domains/subdomains to the URLs config.
"""
import logging
from urllib.parse import urlparse
from urllib.parse import urlunparse
from checks.abstract_checker import AbstractChecker
class Checker(AbstractChecker):
def __init__(self, config, previous_results=None):
... | 26.533333 | 80 | 0.61139 |
dbce6ed756149761422fe9eff5293d8bd35b2d23 | 1,420 | py | Python | SmartMediCine/Verwendete Scripte/green.py | REMEXLabs/SmartHome_SomSe2016 | 80cce8364f20f50df83b6596cd5b02e43f753fc7 | [
"Apache-2.0"
] | null | null | null | SmartMediCine/Verwendete Scripte/green.py | REMEXLabs/SmartHome_SomSe2016 | 80cce8364f20f50df83b6596cd5b02e43f753fc7 | [
"Apache-2.0"
] | null | null | null | SmartMediCine/Verwendete Scripte/green.py | REMEXLabs/SmartHome_SomSe2016 | 80cce8364f20f50df83b6596cd5b02e43f753fc7 | [
"Apache-2.0"
] | null | null | null | #Import
import RPi.GPIO as GPIO
import time
import datetime
import os
import sys
import colorsys
#Board Mode: Angabe der Pin-Nummer
GPIO.setmode(GPIO.BOARD)
#GPIO Pin definieren fuer den Dateneingang vom Sensor
HALL_GPIO = 12
TILT_GPIO = 18
GPIO.setup(HALL_GPIO,GPIO.IN)
GPIO.setup(TILT_GPIO,GPIO.IN)
countOne=0
cou... | 22.903226 | 150 | 0.679577 |
72ba7689a683fdc1b8b25cc27125741364861b86 | 2,894 | py | Python | examples/text_to_sql/RAT-SQL/text2sql/models/enc_dec.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/text_to_sql/RAT-SQL/text2sql/models/enc_dec.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/text_to_sql/RAT-SQL/text2sql/models/enc_dec.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # 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 app... | 36.632911 | 81 | 0.617484 |
f40fbdc569d52fb53760c7b9133d1c564b0d2685 | 1,843 | py | Python | 2-resources/_PYTHON/code-examples-master/python-flask/api/flask-api.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_PYTHON/code-examples-master/python-flask/api/flask-api.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_PYTHON/code-examples-master/python-flask/api/flask-api.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-11-05T07:48:26.000Z | 2021-11-05T07:48:26.000Z | from flask import Flask, jsonify, request
from multiprocessing import Value
counter = Value('i', 0)
app = Flask(__name__)
a = []
help_message = """
API Usage:
- GET /api/list
- POST /api/add data={"key": "value"}
- GET /api/get/<id>
- PUT /api/update/<id> data={"key": "value_to_replace"}
- DELETE /api/de... | 26.328571 | 105 | 0.619642 |
fe57f214dfae9792ace8c94bf1a7d5eac16bceba | 1,354 | py | Python | robot/douyin/by_video_id.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2017-10-23T14:58:47.000Z | 2017-10-23T14:58:47.000Z | robot/douyin/by_video_id.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | null | null | null | robot/douyin/by_video_id.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 -*-
# https://aweme.snssdk.com/aweme/v1/play/?video_id={video_id}
import os
from contextlib import closing
import sys
import certifi
import urllib3
http = urllib3.PoolManager(cert_reqs='CERT_REQUIRED', ca_certs=certifi.where())
def vedio_download(video_name, video_url):
... | 33.02439 | 109 | 0.64771 |
43c52a25c28e9c1d3c221d4e27a2286b69d8df8b | 6,149 | py | Python | Packs/FlashpointFeed/Integrations/FlashpointFeed/FlashpointFeed_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Packs/FlashpointFeed/Integrations/FlashpointFeed/FlashpointFeed_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 61 | 2021-10-07T08:54:38.000Z | 2022-03-31T10:25:35.000Z | Packs/FlashpointFeed/Integrations/FlashpointFeed/FlashpointFeed_test.py | henry-sue-pa/content | 043c6badfb4f9c80673cad9242fdea72efe301f7 | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | """Flashpoint Feed Test File."""
import json
import io
import pytest
from unittest.mock import patch
from test_data import input_data
from FlashpointFeed import Client, HTTP_ERRORS, MESSAGES, MAX_FETCH
from CommonServerPython import DemistoException
from requests.exceptions import HTTPError
BASE_URL = "https://fp.too... | 33.237838 | 103 | 0.740608 |
719da339131989a73b9aeb72e48abd1c3e140b3a | 2,102 | py | Python | 2018/finals/web-blind-xss/app/main.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/web-blind-xss/app/main.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2018/finals/web-blind-xss/app/main.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, ... | 33.365079 | 80 | 0.710752 |
1cfa158bf0103f6c3773380a3e0529277e88acc4 | 4,458 | py | Python | official/cv/vit/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | official/cv/vit/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/vit/eval.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... | 32.304348 | 84 | 0.657918 |
4018a7870c8c1c018521211817fae9b2f67cf3f0 | 628 | py | Python | beispielanwendungen/pythonqml1/main2.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 5 | 2017-03-11T13:27:27.000Z | 2022-01-09T10:52:05.000Z | beispielanwendungen/pythonqml1/main2.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 2 | 2021-02-14T10:59:59.000Z | 2021-10-30T21:46:32.000Z | beispielanwendungen/pythonqml1/main2.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 1 | 2019-08-07T03:08:18.000Z | 2019-08-07T03:08:18.000Z | #!/usr/bin/env python
import sys, os, traceback
from PyQt4 import QtCore, QtGui, QtDeclarative
def main(argv):
app = QtGui.QApplication(argv)
main = QtGui.QMainWindow()
view = QtDeclarative.QDeclarativeView(main)
view.setResizeMode(QtDeclarative.QDeclarativeView.SizeViewToRootObject)
view.setHori... | 26.166667 | 75 | 0.732484 |
40bf7ab4b31f85a781c8b7e0b7be92ed97e1a5eb | 3,292 | py | Python | Utils/py/ActionSelection/experimental/QLearning/q-learning_2.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/ActionSelection/experimental/QLearning/q-learning_2.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/ActionSelection/experimental/QLearning/q-learning_2.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import gamefield
import threading
import time
import numpy as np
# TODO: change Color display
# TODO: Something is wrong with the game color update; every second move just gets updated
#
discount = 0.95 # future influence - discount factor
actions = gamefield.actions
states = gamefield.field
specials = gamefield.spec... | 24.567164 | 90 | 0.584447 |
d3bcf5e17f959189ebd30bc0782e45e8ea45b312 | 4,227 | py | Python | Packs/AnsibleHetznerCloud/Integrations/AnsibleHCloud/AnsibleHCloud.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | Packs/AnsibleHetznerCloud/Integrations/AnsibleHCloud/AnsibleHCloud.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | Packs/AnsibleHetznerCloud/Integrations/AnsibleHCloud/AnsibleHCloud.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | import ssh_agent_setup
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
# Import Generated code
from AnsibleApiModule import * # noqa: E402
host_type = 'local'
# MAIN FUNCTION
def main() -> None:
"""main function, parses params and runs command functions
:return:... | 46.450549 | 120 | 0.646085 |
3167e103641be95b5ff53ef99ba2b0102d014453 | 88 | py | Python | 2235-add-two-integers/2235-add-two-integers.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 2235-add-two-integers/2235-add-two-integers.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 2235-add-two-integers/2235-add-two-integers.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def sum(self, num1: int, num2: int) -> int:
return num1+num2 | 29.333333 | 47 | 0.613636 |
6f1c8f215f28a6db5055bf35f2bdf6c8bd087211 | 526 | py | Python | tarefas-poo/lista-03/navio/view/paineis/painel_cria_navio.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-03/navio/view/paineis/painel_cria_navio.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-03/navio/view/paineis/painel_cria_navio.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5603
# Exercício do Navio
# --------------------------
# Classe que permite que um navio seja criado
#
from model.navio import Navio
class PainelCriaNavio:
def crie(self, iu):
print('- - - Criar Navio - - - ')
num_containers = int(input('Quanto... | 30.941176 | 89 | 0.591255 |
5b14cecb254c67bc8b3f08aac5f5d3b2e06a468e | 3,528 | py | Python | Webpage/arbeitsstunden/migrations/0001_initial.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | null | null | null | Webpage/arbeitsstunden/migrations/0001_initial.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | 46 | 2022-01-08T12:03:24.000Z | 2022-03-30T08:51:05.000Z | Webpage/arbeitsstunden/migrations/0001_initial.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.8 on 2021-04-08 07:14
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('member', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Ar... | 44.1 | 171 | 0.589853 |
7d7646048056852d3ef1f47dc9b291e983088544 | 21,988 | py | Python | hoomd/update.py | XT-Lee/asap | 03c3e3616d51298fa42bd7696c84ecf3ff29089f | [
"BSD-3-Clause"
] | 2 | 2020-03-30T14:38:50.000Z | 2020-06-02T05:53:41.000Z | hoomd/update.py | XT-Lee/asap | 03c3e3616d51298fa42bd7696c84ecf3ff29089f | [
"BSD-3-Clause"
] | null | null | null | hoomd/update.py | XT-Lee/asap | 03c3e3616d51298fa42bd7696c84ecf3ff29089f | [
"BSD-3-Clause"
] | 1 | 2020-05-20T07:00:08.000Z | 2020-05-20T07:00:08.000Z | # Copyright (c) 2009-2019 The Regents of the University of Michigan
# This file is part of the HOOMD-blue project, released under the BSD 3-Clause License.
# Maintainer: joaander / All Developers are free to add commands for new features
R""" Modify the system state periodically.
When an updater is specified, it act... | 43.198428 | 212 | 0.663726 |
7dc9da076c8b3cc20a9002e16c2a225d49c61116 | 2,707 | py | Python | plugins/tff_backend/bizz/kyc/__init__.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/bizz/kyc/__init__.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/bizz/kyc/__init__.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 2 | 2018-01-10T10:43:12.000Z | 2018-03-18T10:42:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# 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... | 45.881356 | 118 | 0.715552 |
c4bf1c70847c48e16e2dd84e392b3b0066a523be | 332 | py | Python | INBa/2015/Shemenev_A_V/task_3_30.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Shemenev_A_V/task_3_30.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Shemenev_A_V/task_3_30.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 3. Вариант 30.
#Напишите программу, которая выводит имя "Илья Арнольдович Файзильберг", и запрашивает его псевдоним.
# Shemenev A.V
# 14.03.16
print("Герой нашей программы Илья Арнольдович Файзильберг")
print("Под каким именем мы знаем этого человека? Ваш ответ:")
x=input()
print ("Все верно, псевдоним - " +x)... | 25.538462 | 101 | 0.743976 |
1eefa364ac7c03dd50a8be70f370279082d01f45 | 1,650 | py | Python | app/__init__.py | IoTServ/FlaskSimpleCMS | db0fc4464c6d514db14972156ca3e002a60a4876 | [
"MIT"
] | null | null | null | app/__init__.py | IoTServ/FlaskSimpleCMS | db0fc4464c6d514db14972156ca3e002a60a4876 | [
"MIT"
] | 4 | 2020-08-29T16:11:12.000Z | 2022-03-12T00:47:03.000Z | app/__init__.py | IoTServ/FlaskSimpleCMS | db0fc4464c6d514db14972156ca3e002a60a4876 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_bootstrap import Bootstrap
from flask_login import LoginManager
from flask_wtf.csrf import CsrfProtect
from flask_moment import Moment
from flask_cache import Cache
from config import Config
from flask_mail import Mail
from flask_compress import... | 27.966102 | 67 | 0.765455 |
6fe318d4bdc39e4b7d5ff5b2507247cc8879385f | 9,233 | py | Python | src/test/tests/simulation/batch.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/simulation/batch.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/simulation/batch.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: batch.py
#
# Tests: libsim - batch mode.
#
# Programmer: Kathleen Biagas
# Date: June 18, 2014
#
# Modifications:
#
# ---------------------------------------------------------------------... | 23.43401 | 96 | 0.590057 |
9641320d469622b6e4553b07346944f4f805cf5c | 325 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v5_0/execute_on_doctype_update.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v5_0/execute_on_doctype_update.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v5_0/execute_on_doctype_update.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import frappe
def execute():
for dt in ("Stock Ledger Entry", "Communication", "DefaultValue", "DocShare", "File", "ToDo"):
frappe.get_doc("DocType", dt).run_module_method("on_doctype_upda... | 36.111111 | 95 | 0.738462 |
9651e6b991894f06569858cd5a8c5d1569205899 | 15,123 | py | Python | contracts/tests/test_LedgerChannel.py | PerunEthereum/Perun | 0704f481e8747f6f4405e67abe1cafd5d96d2ab8 | [
"MIT"
] | 64 | 2018-04-10T19:28:59.000Z | 2020-11-10T02:56:57.000Z | contracts/tests/test_LedgerChannel.py | PerunEthereum/Perun | 0704f481e8747f6f4405e67abe1cafd5d96d2ab8 | [
"MIT"
] | 2 | 2018-05-18T15:39:10.000Z | 2018-12-17T19:00:50.000Z | contracts/tests/test_LedgerChannel.py | PerunEthereum/Perun | 0704f481e8747f6f4405e67abe1cafd5d96d2ab8 | [
"MIT"
] | 9 | 2018-04-10T21:17:41.000Z | 2019-12-10T11:42:34.000Z | from datetime import timedelta, datetime
from collections import defaultdict
import pytest
from utils import *
@pytest.fixture()
def balance(web3, parties):
return [web3.eth.getBalance(party) for party in parties]
@pytest.fixture()
def costs():
return defaultdict(int)
def deploy_lc(chain, parties, sender, ot... | 69.691244 | 180 | 0.646234 |
837c0f0d33aeaeb6ccb3a9e93b4fa1b3b7b10e3a | 7,515 | py | Python | mongodb/mongodb-enterprise-kubernetes/samples/kubernetes-clients/python/mongodb_kube_client.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 63 | 2018-02-04T03:31:22.000Z | 2022-03-07T08:27:39.000Z | mongodb/mongodb-enterprise-kubernetes/samples/kubernetes-clients/python/mongodb_kube_client.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 3 | 2020-06-15T03:41:03.000Z | 2020-06-15T03:41:04.000Z | mongodb/mongodb-enterprise-kubernetes/samples/kubernetes-clients/python/mongodb_kube_client.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 40 | 2018-01-22T16:31:16.000Z | 2022-03-08T04:40:42.000Z | from __future__ import print_function
import base64
from pprint import pprint
from kubernetes import client, config
from kubernetes.client.rest import ApiException
# Added for Python2 and Python3 cross-compatibility
try:
def base64encode(input_string):
return base64.encodebytes(bytes(input_string, "utf-8... | 38.737113 | 120 | 0.602129 |
5408446009c03a37d08746fe58c886934d9abe73 | 1,002 | py | Python | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_parte.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_parte.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_parte.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5603
# Exercício Processa Números
# --------------------------
# Classe responsável por retornar uma parte da lista de números.
from view.paineis.painel_abstrato import PainelAbstrato
from model.processa_numeros import parte
class PainelParte(PainelAbstrato):
d... | 37.111111 | 119 | 0.582834 |
583cc26034ede8d712d19bc9b10b8b7a1d4fdfd3 | 5,630 | py | Python | checker/responsivesecurity/__init__.py | fausecteam/faustctf-2019-responsivesecurity | 65b4e02bdc9de278166c38697ab992638977d511 | [
"0BSD"
] | null | null | null | checker/responsivesecurity/__init__.py | fausecteam/faustctf-2019-responsivesecurity | 65b4e02bdc9de278166c38697ab992638977d511 | [
"0BSD"
] | null | null | null | checker/responsivesecurity/__init__.py | fausecteam/faustctf-2019-responsivesecurity | 65b4e02bdc9de278166c38697ab992638977d511 | [
"0BSD"
] | null | null | null | from . import control
#from .proxy import make_proxy, restrict, unrestrict
import hashlib
import secrets
import random
import os
import sys
import time
BLINDTEXT = """
Lyrisch: Hinter den Wortbergen
Weit hinten, hinter den Wortbergen, fern der Länder Vokalien und Konsonantien leben die Blindtexte. Abgeschieden wohn... | 41.703704 | 1,857 | 0.684902 |
5857e88daa3e6d583b69238861dc7beb4b7ed2b8 | 1,434 | py | Python | loesung/blatt1b_3a.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | 1 | 2019-09-27T13:47:20.000Z | 2019-09-27T13:47:20.000Z | loesung/blatt1b_3a.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | null | null | null | loesung/blatt1b_3a.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | null | null | null | # Hier soll nun ein Text durch Verschiebung der Buchstaben mit Hilfe der
# internen Zeichenrepresentation verschlüsselt werden. Und zwar wird eine Zahl,
# der Schlüssel, vom User abgefragt. Anschließend wird ein beliebiger Text
# vom User abgefragt. Nun wird der Text verschlüsselt, indem jeder Buchstabe um
# den Schlüs... | 39.833333 | 80 | 0.762901 |
49ddf99bf550a93598e484e4a280bb09e6be9e19 | 1,124 | py | Python | exercises/pt/solution_03_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/solution_03_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/solution_03_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
from spacy.language import Language
from spacy.matcher import PhraseMatcher
from spacy.tokens import Span
nlp = spacy.load("pt_core_news_sm")
animals = ["Golden Retriever", "gato", "tartaruga", "Rattus norvegicus"]
animal_patterns = list(nlp.pipe(animals))
print("animal_patterns:", animal_patterns)
matche... | 36.258065 | 87 | 0.756228 |
4d0c91886f41b84010c06f0b8249758d2e6efb67 | 255 | py | Python | docs/examples/5-CloudAPI/get_models.py | scuervo91/dcapy | 46c9277e607baff437e5707167476d5f7e2cf80c | [
"MIT"
] | 4 | 2021-05-21T13:26:10.000Z | 2021-11-15T17:17:01.000Z | docs/examples/5-CloudAPI/get_models.py | scuervo91/dcapy | 46c9277e607baff437e5707167476d5f7e2cf80c | [
"MIT"
] | null | null | null | docs/examples/5-CloudAPI/get_models.py | scuervo91/dcapy | 46c9277e607baff437e5707167476d5f7e2cf80c | [
"MIT"
] | null | null | null | from sqlalchemy import schema
from dcapy.auth import Credential
from dcapy.schedule import Period
cred = Credential()
cred.login('user','password')
df = cred.get_models_info()
print(df)
df2 = cred.get_models_info(schema=['period','well'])
print(df2) | 17 | 52 | 0.756863 |
425f13d814b5b58f5bbefb7f118aa82d100a7095 | 659 | py | Python | exercises/pt/test_03_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/test_03_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/test_03_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | def test():
assert (
'after="ner"' in __solution__
), "Você está adicionando o componente explicitamente depois do identificador de entidades?"
assert (
nlp.pipe_names[6] == "animal_component"
), "Você adicionou o componente depois do indentificador de entidades?"
assert len(doc.ents... | 38.764706 | 96 | 0.675266 |
67a6e01fbfd4c0b92aa8040962c7671d315a9655 | 953 | py | Python | tintz/core/templatetags/errorlist.py | dcfranca/tintz-backend | 9f29e17cafc31ab7dc568d1e2c984e6f1b1fc3fc | [
"MIT"
] | 4 | 2016-05-06T20:52:42.000Z | 2018-11-18T08:29:33.000Z | core/templatetags/errorlist.py | valbertovc/django_semantic_ui | b4bd87983c1e78c442cef7168721225f6893c67a | [
"MIT"
] | 2 | 2021-03-19T21:51:51.000Z | 2021-06-10T18:22:50.000Z | core/templatetags/errorlist.py | valbertovc/django_semantic_ui | b4bd87983c1e78c442cef7168721225f6893c67a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django import template
from django.forms.utils import ErrorList
from core.utils import SemanticErrorList
register = template.Library()
@register.filter
def as_pointing_label(errors):
'''
Generate top pointing label on semanti-ui format.
Usage on template:
{% load erro... | 28.878788 | 82 | 0.629591 |
3f4870682fb446b63ec53a8b152a3118e98ceaa6 | 1,326 | py | Python | backend/app/schemas/course.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-11-04T17:06:07.000Z | 2021-11-04T17:06:07.000Z | backend/app/schemas/course.py | JamesNeumann/learning-by-annotations | c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad | [
"MIT"
] | 21 | 2021-11-01T10:13:56.000Z | 2021-12-02T10:02:13.000Z | backend/app/schemas/course.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-12-16T18:20:55.000Z | 2021-12-16T18:20:55.000Z | from datetime import datetime
from typing import Optional, List
from pydantic import BaseModel
from app.schemas.task_group import TaskGroup, TaskGroupDetail
from app.schemas.user import User
class CourseBase(BaseModel):
name: Optional[str] = None
short_name: Optional[str] = None
description:... | 22.474576 | 62 | 0.688537 |
e1353e4467df859017d481ee9dff70cfc46e4bbd | 4,864 | py | Python | matbench/util.py | sparks-baird/matbench | 4424609454286e32fff2bcc724379b2a316c5a76 | [
"MIT"
] | null | null | null | matbench/util.py | sparks-baird/matbench | 4424609454286e32fff2bcc724379b2a316c5a76 | [
"MIT"
] | null | null | null | matbench/util.py | sparks-baird/matbench | 4424609454286e32fff2bcc724379b2a316c5a76 | [
"MIT"
] | null | null | null | """
Utils and quality-of-life enhancements.
"""
import datetime
import hashlib
import json
import logging
import os
import sys
import numpy as np
import pandas as pd
logger = logging.getLogger(__name__)
class RecursiveDotDict(dict):
"""
Adapted from user Curt Hagenlocher from
https://stackoverflow.com/... | 29.125749 | 85 | 0.630757 |
e19424c7b4d0b0ef3ef035b211b880f4e482ba87 | 6,492 | py | Python | gen_index/validation_run.py | fginter/docs-fginterfork | 1012563e049f1ad57548bb71908c632b23ee64f9 | [
"Apache-2.0"
] | 1 | 2021-08-18T08:52:27.000Z | 2021-08-18T08:52:27.000Z | gen_index/validation_run.py | fginter/docs-fginterfork | 1012563e049f1ad57548bb71908c632b23ee64f9 | [
"Apache-2.0"
] | null | null | null | gen_index/validation_run.py | fginter/docs-fginterfork | 1012563e049f1ad57548bb71908c632b23ee64f9 | [
"Apache-2.0"
] | null | null | null | import sys
import glob
import os.path
import json
import re
import codecs
import StringIO
import subprocess
import datetime
THISDIR=os.path.dirname(os.path.abspath(__file__))
# valueRe=re.compile(u"^([a-zA-Z ]+): ([A-Za-z0-9+. -]+)$")
# def analyze_readme(dir_name):
# readme_data={u"Documentation status":u"stub",... | 39.108434 | 160 | 0.591959 |
bedfe0ecb536d633ea3fe10bb05637c795279e72 | 4,814 | py | Python | Contrib-Inspur/openbmc/poky/meta/lib/oe/useradd.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Inspur/openbmc/poky/meta/lib/oe/useradd.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Inspur/openbmc/poky/meta/lib/oe/useradd.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | #
# SPDX-License-Identifier: GPL-2.0-only
#
import argparse
import re
class myArgumentParser(argparse.ArgumentParser):
def _print_message(self, message, file=None):
bb.warn("%s - %s: %s" % (d.getVar('PN'), pkg, message))
# This should never be called...
def exit(self, status=0, message=None):
... | 66.861111 | 163 | 0.680515 |
83039805df00c15a7e91b3ddb1ca921427762172 | 5,006 | py | Python | src/schuss.py | katsugeneration/schuss | 30e2303aa0646f0a4424cbc4b5422acc58a06218 | [
"Apache-2.0"
] | 6 | 2018-12-20T06:50:52.000Z | 2021-12-16T13:08:38.000Z | src/schuss.py | katsugeneration/schuss | 30e2303aa0646f0a4424cbc4b5422acc58a06218 | [
"Apache-2.0"
] | 1 | 2020-06-29T07:00:51.000Z | 2020-06-29T07:00:51.000Z | src/schuss.py | katsugeneration/schuss | 30e2303aa0646f0a4424cbc4b5422acc58a06218 | [
"Apache-2.0"
] | 1 | 2022-03-04T07:29:55.000Z | 2022-03-04T07:29:55.000Z | # -*- coding: utf-8 -*-
import math
from util.iterator import sliding_window
class Schuss(object):
'''
Spell checker main module.
'''
def __init__(self, counter, tokenizer, smoother, distance):
'''
:parameters:
counter: n-gram counter object. Expect counted.
tok... | 38.806202 | 120 | 0.540352 |
55d10effba0b499d96a2694063733d284a5fc17a | 4,901 | py | Python | scrapers/debates.py | tillprochaska/bundestag-wm | ff86a919f79031fded14885fc7d91453c4a23b32 | [
"MIT"
] | null | null | null | scrapers/debates.py | tillprochaska/bundestag-wm | ff86a919f79031fded14885fc7d91453c4a23b32 | [
"MIT"
] | 2 | 2020-07-16T07:03:51.000Z | 2021-05-07T11:25:49.000Z | scrapers/debates.py | tillprochaska/bundestag-wm | ff86a919f79031fded14885fc7d91453c4a23b32 | [
"MIT"
] | null | null | null | import requests;
from bs4 import BeautifulSoup;
import json;
from datetime import datetime;
import re;
import collections;
import logging;
logging.basicConfig(level=logging.INFO);
URL = 'https://www.bundestag.de/apps/plenar/plenar/conferenceweekDetail.form?year=2018&limit=50&week=';
SESSION_WEEKS = [24, 26, 27];
DEST ... | 38.896825 | 178 | 0.541318 |
369c78af303620ec5fdb8d8af353ea71c98b37e6 | 7,812 | py | Python | cockroachdb/kubernetes/multiregion/setup.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 63 | 2018-02-04T03:31:22.000Z | 2022-03-07T08:27:39.000Z | cockroachdb/kubernetes/multiregion/setup.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 13 | 2019-12-30T04:29:18.000Z | 2022-03-02T06:11:05.000Z | cockroachdb/kubernetes/multiregion/setup.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 40 | 2018-01-22T16:31:16.000Z | 2022-03-08T04:40:42.000Z | #!/usr/bin/env python
import distutils.spawn
import json
import os
from subprocess import check_call,check_output
from sys import exit
from time import sleep
# Before running the script, fill in appropriate values for all the parameters
# above the dashed line.
# Fill in the `contexts` map with the zones of your clu... | 43.642458 | 359 | 0.682668 |
e9fe62febaee7d805282829c97bdcbd4e51ded72 | 16,666 | py | Python | tests/onegov/form/test_core.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/form/test_core.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/form/test_core.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from decimal import Decimal
from onegov.form import Form, merge_forms, with_options, move_fields
from onegov.form.fields import HoneyPotField
from onegov.pay import Price
from wtforms import RadioField, StringField, TextAreaField, validators
from wtforms.fields.html5 import EmailField
from wtforms.validators import Inp... | 28.247458 | 79 | 0.583223 |
a118f86e4615dfb0c1f91d502f84e35b250241dc | 5,725 | py | Python | api/etl/ods_transform.py | Latent-Lxx/dazhou-dw | 902b4b625cda4c9e4eb205017b8955b81f37a0b5 | [
"MIT"
] | null | null | null | api/etl/ods_transform.py | Latent-Lxx/dazhou-dw | 902b4b625cda4c9e4eb205017b8955b81f37a0b5 | [
"MIT"
] | null | null | null | api/etl/ods_transform.py | Latent-Lxx/dazhou-dw | 902b4b625cda4c9e4eb205017b8955b81f37a0b5 | [
"MIT"
] | 1 | 2022-02-11T04:44:37.000Z | 2022-02-11T04:44:37.000Z | # !/usr/bin/python3
# -*- coding: utf-8 -*-
# @Time : 2021/7/22 下午5:02
# @Author : Latent
# @Email : latentsky@gmail.com
# @File : ods_transform.py
# @Software: PyCharm
# @class : 数据转换 ---> 对所有的现存属性 进行统一单位
"""
CREATE TABLE dm_elec_all_goods_info(
--- 项目维度
id UUID COMMENT '用于所有插入记录',
project_name String commen... | 30.945946 | 101 | 0.611354 |
62a55cf6be4b6602273f18a76c0aadcb1aad659c | 15,249 | py | Python | FBS.py | aikhen/FBS | b4fb2e7c3eb3a8998921f228a8d867720ad9243c | [
"Apache-2.0"
] | null | null | null | FBS.py | aikhen/FBS | b4fb2e7c3eb3a8998921f228a8d867720ad9243c | [
"Apache-2.0"
] | null | null | null | FBS.py | aikhen/FBS | b4fb2e7c3eb3a8998921f228a8d867720ad9243c | [
"Apache-2.0"
] | null | null | null | import marshal
exec(marshal.loads('c\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00@\x00\x00\x00s\\\x01\x00\x00d\x00\x00d\x01\x00l\x00\x00Z\x00\x00d\x00\x00d\x01\x00l\x01\x00Z\x01\x00d\x00\x00d\x01\x00l\x02\x00Z\x02\x00d\x00\x00d\x01\x00l\x03\x00Z\x03\x00d\x00\x00d\x01\x00l\x04\x00Z\x04\x00d\x00\x00d\x01\x00l\x05\x00Z... | 5,083 | 15,233 | 0.743262 |
62c10ade06781bd4adeb0543bd2caa49f5152288 | 25,198 | py | Python | Contrib-Microsoft/Olympus_rack_manager/python-ocs/wcscli/wcs_help.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/wcscli/wcs_help.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/wcscli/wcs_help.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | # Copyright (C) Microsoft Corporation. All rights reserved.
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# -*- codi... | 29.820118 | 98 | 0.539448 |
b135e002b81011df2df65a589ae36fb0b5bb284b | 852 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch09_search_and_sort/ex01_contains_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch09_search_and_sort/ex01_contains_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch09_search_and_sort/ex01_contains_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
import pytest
from ch09_search_and_sort.solutions.ex01_contains import contains_all, contains_all_v2
@pytest.mark.parametrize("values, search_values, expected",
[([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [7, 2], T... | 38.727273 | 86 | 0.602113 |
b182992922b2aa016f82928806979808c544dc4c | 1,630 | py | Python | frappe-bench/apps/erpnext/erpnext/education/doctype/fees/test_fees.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/education/doctype/fees/test_fees.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/education/doctype/fees/test_fees.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from frappe.utils import nowdate
from frappe.utils.make_random import get_random
# test_records = frappe.get_test_records('Fees')
class TestFees(... | 30.185185 | 99 | 0.717178 |
b88ec1715ca4fb8427bcd939b4581a97010170ed | 963 | py | Python | code/textmining/nmf_topic_modelling.py | DLR-SC/repository-synergy | 115e48c37e659b144b2c3b89695483fd1d6dc788 | [
"MIT"
] | 5 | 2021-05-09T12:51:32.000Z | 2021-11-04T11:02:54.000Z | code/textmining/nmf_topic_modelling.py | DLR-SC/repository-synergy | 115e48c37e659b144b2c3b89695483fd1d6dc788 | [
"MIT"
] | null | null | null | code/textmining/nmf_topic_modelling.py | DLR-SC/repository-synergy | 115e48c37e659b144b2c3b89695483fd1d6dc788 | [
"MIT"
] | 3 | 2021-05-12T12:14:05.000Z | 2021-10-06T05:19:54.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 23 09:12:51 2020
"""
import nltk
import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer
from nltk.stem.porter import PorterStemmer
def print_top_words(model, feature_names, n_top_words):
for topic_idx, topic in enumerate(model.components_):
... | 29.181818 | 76 | 0.68432 |
0c51760c14ea6bbf30e6c86f01020c63529b25f6 | 4,477 | py | Python | python_gui_tkinter/KALU/GARBAGE/TEST/DBOperations.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/KALU/GARBAGE/TEST/DBOperations.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/KALU/GARBAGE/TEST/DBOperations.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import tkinter as tk
from tkinter import *
from tkinter import font
from tkinter.filedialog import askopenfilename
from tkinter import ttk
import textwrap
from AppOperations import AppOperations as ao # the class build for this purpose
from CommandsGUI import CommandsGUI
from Generic import Generic
from GUIfunct... | 34.976563 | 156 | 0.65736 |
38edb9a9b6f4e619f4947d20d969433a49236a69 | 373 | py | Python | Online-Judges/DimikOJ/Python/41-darar-sum-2.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | 3 | 2021-06-15T01:19:23.000Z | 2022-03-16T18:23:53.000Z | Online-Judges/DimikOJ/Python/41-darar-sum-2.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | Online-Judges/DimikOJ/Python/41-darar-sum-2.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | def factorial(i):
i_of_facto = 1
for j in range(2, i+1):
i_of_facto *= j
return i_of_facto
def sum_of_dara(n):
sum_of = 0
for i in range(n+1):
sum_of += (i / factorial(i))
return sum_of
t = int(input())
for _ in range(t):
n = int(input())
#print("{:.4f}".format(sum_o... | 17.761905 | 43 | 0.560322 |
f0277ab237228f81eeb1db04d0cec6b72a66571f | 394 | py | Python | Flask/Courses/Flask-Tutorials.Tech-With-Tim/02-Template/main.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Flask/Courses/Flask-Tutorials.Tech-With-Tim/02-Template/main.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Flask/Courses/Flask-Tutorials.Tech-With-Tim/02-Template/main.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | from flask import Flask, redirect, url_for, render_template
app = Flask(__name__)
@app.route("/")
def home():
return render_template("index.html")
@app.route("/<name>/")
def user(name):
return render_template(
"index.html",
content=name,
content2=23,
contents=["Shihab", "Sa... | 16.416667 | 59 | 0.614213 |
6520ad2ef8630d2fe33b00a26789391d546c4514 | 2,228 | py | Python | chapter_ten/fusing_rust_into_flask_and_celery/flask_app/src/app.py | PacktPublishing/Speed-up-your-Python-with-Rust | 1fce5fb59ea966015768e7eca51c0e31d69531ec | [
"MIT"
] | 21 | 2021-09-10T12:46:26.000Z | 2022-03-23T02:50:39.000Z | chapter_ten/deploying_with_a_private_github_repository/flask_app/src/app.py | PacktPublishing/Speed-up-your-Python-with-Rust | 1fce5fb59ea966015768e7eca51c0e31d69531ec | [
"MIT"
] | null | null | null | chapter_ten/deploying_with_a_private_github_repository/flask_app/src/app.py | PacktPublishing/Speed-up-your-Python-with-Rust | 1fce5fb59ea966015768e7eca51c0e31d69531ec | [
"MIT"
] | 6 | 2021-09-02T08:32:37.000Z | 2022-03-17T21:15:25.000Z | from flask import Flask
from fib_calcs.fib_calculation import FibCalculation
from data_access import dal
from models.database.fib_entry import FibEntry
from task_queue.engine import make_celery
from fib_calcs import calc_fib_num
from fib_calcs.enums import CalculationMethod
app = Flask(__name__)
celery = make_celery... | 28.564103 | 61 | 0.638689 |
0b18caae2d2e66402a6cda8958308a879fd51296 | 3,428 | py | Python | project/views/organizer.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/views/organizer.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/views/organizer.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from flask import flash, redirect, render_template, url_for
from flask_babelex import gettext
from flask_security import auth_required
from sqlalchemy.exc import SQLAlchemyError
from project import app, db
from project.access import access_or_401, get_admin_unit_for_manage_or_404
from project.forms.organizer import (
... | 33.940594 | 87 | 0.677946 |
acd84bf92f795722192a33d6b276dc211fea42a7 | 10,567 | py | Python | 21-fs-ias-lec/03-BACnetCore/src/core/com_link.py | cn-uofbasel/BCN | 2d0852e00f2e7f3c4f7cf30f60c6765f2761f80a | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 21-fs-ias-lec/03-BACnetCore/src/core/com_link.py | cn-uofbasel/BCN | 2d0852e00f2e7f3c4f7cf30f60c6765f2761f80a | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 21-fs-ias-lec/03-BACnetCore/src/core/com_link.py | cn-uofbasel/BCN | 2d0852e00f2e7f3c4f7cf30f60c6765f2761f80a | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | from enum import Enum
from queue import Queue, Empty
from threading import Thread
import time
from .security.verification import Verification
from ..replication.channel import Channel
from ..replication.message_container import MessageContainer
from .interface.event import Event
class OperationModes(Enum):
"""
... | 46.964444 | 120 | 0.692628 |
4a1718d8475d27628e559cb19f7a17bd3546f5b8 | 196 | py | Python | PYTHON/Numpy/inner_and_outer.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Numpy/inner_and_outer.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Numpy/inner_and_outer.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import numpy
n = numpy.array(list(map(int, input().split())))
m = numpy.array(list(map(int, input().split())))
print(numpy.inner(n, m))
print(numpy.outer(n, m))
| 21.777778 | 48 | 0.673469 |
c5985b95c979bf39afb2c4c87c5fa13a483f8762 | 3,677 | py | Python | python/system/log.py | rissom/RC3MUD | d5ffb8b79a6a95e9389ee0576f52dfee1f52c4ee | [
"MIT"
] | 1 | 2020-09-29T17:44:31.000Z | 2020-09-29T17:44:31.000Z | python/system/log.py | rissom/RC3MUD | d5ffb8b79a6a95e9389ee0576f52dfee1f52c4ee | [
"MIT"
] | null | null | null | python/system/log.py | rissom/RC3MUD | d5ffb8b79a6a95e9389ee0576f52dfee1f52c4ee | [
"MIT"
] | null | null | null | import logging
from collections import deque
import sys
from threading import Lock
import glob
import os
from os.path import isfile, join
from os import listdir
from _datetime import datetime
class LogStream(object):
def __init__(self, maxlines = 1000):
self.maxlines = maxlines
self.logbuf = deque... | 24.844595 | 78 | 0.509111 |
a858fb185f6382cc53350f4414e0fdac8ada49a4 | 4,382 | py | Python | module/leastsquares.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | null | null | null | module/leastsquares.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | null | null | null | module/leastsquares.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | null | null | null | import numpy as np
import re
from os import listdir
def matrixbuild(X):
'quadratischer Teil'
xquad = []
for q in range(len(X)):
xquadrow = []
for i in range(len(X[q])):
for e in range(i,len(X[q])):
xquadrow.append(X[q][i]*X[q][e])
... | 25.476744 | 111 | 0.438384 |
8c29c09a5561a5bd0bbc0919f4fe9f2d22696849 | 205 | py | Python | sources/stage04/tt.py | kantel/pythonschulung2 | b13fb24770dd7789f3845aeb147a720dff272951 | [
"MIT"
] | null | null | null | sources/stage04/tt.py | kantel/pythonschulung2 | b13fb24770dd7789f3845aeb147a720dff272951 | [
"MIT"
] | null | null | null | sources/stage04/tt.py | kantel/pythonschulung2 | b13fb24770dd7789f3845aeb147a720dff272951 | [
"MIT"
] | null | null | null | import turtle as t
wn = t.Screen()
wn.colormode(255)
wn.setup(width = 500, height = 500)
wn.title("Bouncing Ball")
ball = t.Turtle()
ball.shape("circle")
ball.color(255, 0, 0)
ball.penup()
wn.mainloop() | 15.769231 | 35 | 0.682927 |
8b03ace740592d62319b5aba50a4adf668674145 | 2,054 | bzl | Python | 3rdparty/app_image.bzl | damienmg/ender3_control_box | e0699f30c838774aa431689b1ce50b049c9f8d47 | [
"Apache-2.0"
] | 3 | 2021-03-04T18:34:30.000Z | 2022-02-23T16:11:57.000Z | 3rdparty/app_image.bzl | damienmg/ender3_control_box | e0699f30c838774aa431689b1ce50b049c9f8d47 | [
"Apache-2.0"
] | null | null | null | 3rdparty/app_image.bzl | damienmg/ender3_control_box | e0699f30c838774aa431689b1ce50b049c9f8d47 | [
"Apache-2.0"
] | 1 | 2020-03-03T04:26:58.000Z | 2020-03-03T04:26:58.000Z | # Copyright 2019 Damien Martin-Guillerez <damien.martin.guillerez@gmail.com>
#
# 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
#
# Unles... | 30.656716 | 77 | 0.62999 |
8c78866cdb7c89dc0439c50e3090a6d069515036 | 21,027 | py | Python | tests/onegov/swissvotes/test_views_vote.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/swissvotes/test_views_vote.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/swissvotes/test_views_vote.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from datetime import date
from decimal import Decimal
from onegov.swissvotes.models import SwissVote
from onegov.swissvotes.views.vote import view_vote_percentages
from pytest import mark
from re import findall
from transaction import commit
from translationstring import TranslationString
from webtest import TestApp as... | 32.053354 | 79 | 0.584772 |
8c9093d946e8b6823d950da979517487f2fbc576 | 1,327 | py | Python | sandbox/character/character_impl.py | gergelyszaz/SandboxVN | b6855d1c952df66296e8fb3af42c2f8b46908a07 | [
"MIT"
] | null | null | null | sandbox/character/character_impl.py | gergelyszaz/SandboxVN | b6855d1c952df66296e8fb3af42c2f8b46908a07 | [
"MIT"
] | 1 | 2022-03-22T23:50:32.000Z | 2022-03-22T23:50:32.000Z | sandbox/character/character_impl.py | gergelyszaz/SandboxVN | b6855d1c952df66296e8fb3af42c2f8b46908a07 | [
"MIT"
] | null | null | null | import string
from typing import List
from sandbox.action.action import Action
from sandbox.character.character import Character
from sandbox.character.habit import Habit
from sandbox.location.location import Location
from sandbox.location.map import Map
from sandbox.schedule.schedule import Schedule
class CharacterI... | 33.175 | 82 | 0.672193 |
8cd287fab82ee58532d424f07f30b35aedbb4921 | 2,001 | py | Python | resources/mechanics_lib/Gripper.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 7 | 2016-01-20T02:33:00.000Z | 2021-02-04T04:06:57.000Z | resources/mechanics_lib/Gripper.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | null | null | null | resources/mechanics_lib/Gripper.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 3 | 2016-10-05T07:20:30.000Z | 2017-11-20T10:36:50.000Z | from api.component import Component
class Gripper(Component):
def defComponents(self):
self.addSubcomponent("lbot","Beam")
self.addSubcomponent("ltop","Beam")
self.addSubcomponent("hinge","Hinge")
#self.addSubcomponent("tetra","Tetrahedron")
def defParameters(self):
... | 32.803279 | 78 | 0.631184 |
e8d19bf1014cd90689dfa47ffc96a27fedf69a9b | 1,612 | py | Python | prep/triangles.py | Empythy/geometry-learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 21 | 2018-10-09T08:15:29.000Z | 2022-03-16T08:23:08.000Z | prep/triangles.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 31 | 2017-09-20T13:30:37.000Z | 2018-03-01T13:24:58.000Z | prep/triangles.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 7 | 2018-11-29T11:39:02.000Z | 2022-01-12T07:10:26.000Z | import numpy as np
from model.topoml_util.GeoVectorizer import GeoVectorizer
from shapely.geometry import Polygon
from shapely.wkt import loads
SET_SIZE = 100000
TRIANGLES = '../files/triangles.npz'
print('Creating triangles')
raw_training_vectors = np.random.normal(size=(SET_SIZE, 6, 2))
triangle_sets = np.array([[... | 42.421053 | 118 | 0.770471 |
fa2a7754be0b9b0d3f07d3370946599bd7d0c12b | 121 | py | Python | python/python_backup/PRAC_PYTHON/ab32.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/ab32.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/ab32.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | #pascal's traingle upto 5th term
n=input("term:")
k=1
for i in range(1,n+1,1):
print k
k=k*11
| 15.125 | 33 | 0.520661 |
0f08623e51776707feda7e5fbc8c8a428bf14dd8 | 2,011 | py | Python | admin-tutorial/AdminDateHierarchy/simple_relate/admin.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 5 | 2020-07-14T07:48:10.000Z | 2021-12-20T21:20:10.000Z | admin-tutorial/AdminDateHierarchy/simple_relate/admin.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 7 | 2021-03-26T03:13:38.000Z | 2022-03-12T00:42:03.000Z | admin-tutorial/AdminDateHierarchy/simple_relate/admin.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 1 | 2021-02-16T07:04:25.000Z | 2021-02-16T07:04:25.000Z | from django.contrib import admin
from .models import ArticleModel, AuthorModel
# Register your models here.
class AuthorModelAdmin(admin.ModelAdmin):
search_fields = ('name', )
class ArticleModelAdmin(admin.ModelAdmin):
list_display = ['title',
'author',
'date_joined'... | 29.573529 | 70 | 0.677772 |
70fc2706d4551179df7d4bb7c1ad6ee606e6b5aa | 2,553 | py | Python | src/visuanalytics/analytics/control/scheduler/DbScheduler.py | mxsph/Data-Analytics | c82ff54b78f50b6660d7640bfee96ea68bef598f | [
"MIT"
] | 3 | 2020-08-24T19:02:09.000Z | 2021-05-27T20:22:41.000Z | src/visuanalytics/analytics/control/scheduler/DbScheduler.py | mxsph/Data-Analytics | c82ff54b78f50b6660d7640bfee96ea68bef598f | [
"MIT"
] | 342 | 2020-08-13T10:24:23.000Z | 2021-08-12T14:01:52.000Z | src/visuanalytics/analytics/control/scheduler/DbScheduler.py | visuanalytics/visuanalytics | f9cce7bc9e3227568939648ddd1dd6df02eac752 | [
"MIT"
] | 8 | 2020-09-01T07:11:18.000Z | 2021-04-09T09:02:11.000Z | """
Modul welches den Datenbank Scheduler beeinhaltet.
Sorgt dafür das ein Video zur richtigen Zeit gerendert wird.
"""
import logging
from datetime import datetime
from visuanalytics.analytics.control.scheduler.scheduler import Scheduler, ignore_errors
from visuanalytics.analytics.util.video_delete import delete_on_... | 34.04 | 95 | 0.619271 |
697a6ed1704363fb6c1558b6663f7dd6048f2f2e | 524 | py | Python | pyntcloud/neighbors/k_neighbors.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 1,142 | 2016-10-10T08:55:30.000Z | 2022-03-30T04:46:16.000Z | pyntcloud/neighbors/k_neighbors.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 195 | 2016-10-10T08:30:37.000Z | 2022-02-17T12:51:17.000Z | pyntcloud/neighbors/k_neighbors.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 215 | 2017-02-28T00:50:29.000Z | 2022-03-22T17:01:31.000Z |
def k_neighbors(kdtree, k):
""" Get indices of K neartest neighbors for each point
Parameters
----------
kdtree: pyntcloud.structrues.KDTree
The KDTree built on top of the points in point cloud
k: int
Number of neighbors to find
Returns
-------
k_neighbors: (N, k) arr... | 24.952381 | 66 | 0.601145 |
385ea2b9e2f65dda887786d94183aa9fee55a8ab | 2,446 | py | Python | plugins/tff_backend/migrations/_015_user_data.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/migrations/_015_user_data.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/migrations/_015_user_data.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 2 | 2018-01-10T10:43:12.000Z | 2018-03-18T10:42:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2018 GIG Technology NV
#
# 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... | 36.507463 | 101 | 0.724039 |
2ac1f112cb2224165303ee4545976aa3325400b1 | 3,035 | py | Python | sakf/conf/serverConfig.py | spdir/sakf | 9a07c5f90765201a42d524dc6d4554f4ccd3c750 | [
"Apache-2.0"
] | null | null | null | sakf/conf/serverConfig.py | spdir/sakf | 9a07c5f90765201a42d524dc6d4554f4ccd3c750 | [
"Apache-2.0"
] | null | null | null | sakf/conf/serverConfig.py | spdir/sakf | 9a07c5f90765201a42d524dc6d4554f4ccd3c750 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# import base64, uuid
# base64.b64encode(uuid.uuid4().bytes + uuid.uuid4().bytes)
import os
import tornado.web
from tornado.options import define, options, parse_config_file
from sakf.conf import globalConfig
from sakf.route import route
from sakf.app.webssh.policy import (
load_host_keys, ge... | 27.342342 | 71 | 0.696211 |
630dbe48e41a2b019994a19b5d014a29d6936fa3 | 4,671 | py | Python | test/test_npu/test_scatter_dim_update.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_scatter_dim_update.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_scatter_dim_update.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # 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... | 48.65625 | 113 | 0.639692 |
2d4f852563e9f108236ec146e1601e0ddafc7f60 | 1,160 | py | Python | src/test/tests/databases/history.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/databases/history.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/databases/history.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# MODES: serial
# CLASSES: nightly
#
# Test Case: history.py
#
# Tests: variables that only have values for real zones (not ghost zones)
# Some history variables have this property.
#
# Programmer: Hank Childs
# Dat... | 24.680851 | 79 | 0.607759 |
fa96fc524370263b96f21511c9e07a26d2bfa6e4 | 5,517 | py | Python | nz_crawl_demo/day10/soufang/soufang/spiders/sfw.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_crawl_demo/day10/soufang/soufang/spiders/sfw.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_crawl_demo/day10/soufang/soufang/spiders/sfw.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | # -*- coding: utf-8 -*-
import scrapy
import re
from soufang.items import NewHouseItem,EsfHouseItem
from scrapy_redis.spiders import RedisSpider
class SfwSpider(RedisSpider):
name = 'sfw'
allowed_domains = ['fang.com']
# start_urls = ['https://www.fang.com/SoufunFamily.htm']
# 这个方法是拿出新房和二手房的 url
re... | 47.973913 | 170 | 0.519304 |
fae293538f043f853a75dfcedd34995b1d8b303d | 1,840 | py | Python | src/onegov/translator_directory/constants.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/translator_directory/constants.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/translator_directory/constants.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.translator_directory import _
full_text_max_chars = 25
member_can_see = (
'first_name',
'last_name',
'pers_id',
'admission',
'withholding_tax',
'self_employed',
'gender',
'date_of_birth',
'nationality',
'address',
'zip_code',
'city',
'drive_distance',
... | 26.285714 | 76 | 0.653261 |
4f02af6f756cb2887a4f8ff0763a7453be388dfe | 2,435 | py | Python | scrapers/scrape_gl.py | AryaVashisht/covid_19 | 0c734615a1190a5b2fff4697f47731ef2b8b6918 | [
"CC-BY-4.0"
] | null | null | null | scrapers/scrape_gl.py | AryaVashisht/covid_19 | 0c734615a1190a5b2fff4697f47731ef2b8b6918 | [
"CC-BY-4.0"
] | null | null | null | scrapers/scrape_gl.py | AryaVashisht/covid_19 | 0c734615a1190a5b2fff4697f47731ef2b8b6918 | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
import sys
from bs4 import BeautifulSoup
import scrape_common as sc
def split_whitespace(text):
if not text:
return []
text = re.sub(r'\s\s+', ' ', text)
return text.split(' ')
d = sc.download('https://www.gl.ch/verwaltung/finanzen-und-ge... | 35.289855 | 168 | 0.641068 |
ea4509713d4187a89a35f5dce56aced203511c08 | 4,038 | py | Python | src/bo4e/bo/regionaltarif.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/bo/regionaltarif.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/bo/regionaltarif.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | """
Contains Regionaltarif class and corresponding marshmallow schema for de-/serialization
"""
from datetime import datetime
from typing import List, Optional
import attr
from marshmallow import fields
from bo4e.bo.tarifinfo import Tarifinfo, TarifinfoSchema
from bo4e.com.regionalepreisgarantie import RegionalePrei... | 42.957447 | 180 | 0.760773 |
3536f33796705e28ef3eac7816920168e1ffaf78 | 15,245 | py | Python | abfahrt/unittest/unittest_travelcenter.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | 1 | 2022-01-30T14:30:02.000Z | 2022-01-30T14:30:02.000Z | abfahrt/unittest/unittest_travelcenter.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | null | null | null | abfahrt/unittest/unittest_travelcenter.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | null | null | null | import unittest
# The unittest unit testing framework was originally inspired by JUnit and has a similar flavor as major unit testing frameworks in other languages.
# It supports test automation, sharing of setup and shutdown code for tests, aggregation of tests into collections, and independence of the tests from the ... | 53.118467 | 265 | 0.664283 |
52c58ed18e5a09528021a7f6dee60dd5b305bb70 | 7,705 | py | Python | tests/test_datasets.py | Matheus158257/projects | 26a6148046533476e625a872a2950c383aa975a8 | [
"Apache-2.0"
] | null | null | null | tests/test_datasets.py | Matheus158257/projects | 26a6148046533476e625a872a2950c383aa975a8 | [
"Apache-2.0"
] | null | null | null | tests/test_datasets.py | Matheus158257/projects | 26a6148046533476e625a872a2950c383aa975a8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from io import BytesIO
from json import dumps
from unittest import TestCase
from minio.error import BucketAlreadyOwnedByYou
from platiagro import CATEGORICAL, DATETIME, NUMERICAL
from projects.api.main import app
from projects.controllers.utils import uuid_alpha
from projects.database import e... | 40.767196 | 193 | 0.596366 |
eae0561da90b1e665c4f540cb5466640d00dfe36 | 1,633 | py | Python | official_examples/Reinforcement_Learning_GameSolution_Examples/coin/game_interface.py | RuichunWang/ModelArts-Lab | cfa9a853e3a76a21eac2818f055b36978ac2bb69 | [
"Apache-2.0"
] | 1,045 | 2019-05-09T02:50:43.000Z | 2022-03-31T06:22:11.000Z | official_examples/Reinforcement_Learning_GameSolution_Examples/coin/game_interface.py | RuichunWang/ModelArts-Lab | cfa9a853e3a76a21eac2818f055b36978ac2bb69 | [
"Apache-2.0"
] | 1,468 | 2019-05-16T00:48:18.000Z | 2022-03-08T04:12:44.000Z | official_examples/Reinforcement_Learning_GameSolution_Examples/coin/game_interface.py | RuichunWang/ModelArts-Lab | cfa9a853e3a76a21eac2818f055b36978ac2bb69 | [
"Apache-2.0"
] | 1,077 | 2019-05-09T02:50:53.000Z | 2022-03-27T11:05:32.000Z | import os
import sys
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
import numpy as np
from gym_spoof.envs.spoof_env import SpoofEnv
class GameInterface():
def __init__(self, *args):
# Create Doom instance
self.game = SpoofEnv()
self.player_num = 2
# must contain cu... | 30.240741 | 97 | 0.588487 |
21e21a90193466a8e6567ccc31aa0f5bd705cea6 | 1,165 | py | Python | evo_algorithm/ea_shapes/create_plots.py | MateRyze/InformatiCup-2019 | eeca3ff7f8a102f4093697c6badee21ce25e2e87 | [
"MIT"
] | 3 | 2019-03-21T17:02:55.000Z | 2019-04-04T18:16:10.000Z | evo_algorithm/ea_shapes/create_plots.py | MateRyze/InformatiCup-2019 | eeca3ff7f8a102f4093697c6badee21ce25e2e87 | [
"MIT"
] | 11 | 2019-10-30T12:05:39.000Z | 2022-03-11T23:43:54.000Z | evo_algorithm/ea_shapes/create_plots.py | MateRyze/InformatiCup-2019 | eeca3ff7f8a102f4093697c6badee21ce25e2e87 | [
"MIT"
] | 1 | 2019-10-30T12:04:00.000Z | 2019-10-30T12:04:00.000Z | import os
import glob
import json
import pandas
import matplotlib.pyplot as plt
import seaborn as sns
recordFilenames = glob.glob(os.path.join("stats", "*-meta.csv"))
records = []
for fname in recordFilenames:
record = pandas.read_csv(fname)
metadata = [
json.loads(record["metadata"][i].replace("'", "... | 28.414634 | 88 | 0.641202 |
21ef932b5e081512973c74c6668dfb866617d71c | 1,071 | py | Python | 2021-05-09/写笔记带后端/library-server-develop/apps/user/migrations/0001_initial.py | ritaswc/wechat_app_template | d6ba56b70b09bc755f7d4d6b696b9e9b53511faa | [
"MIT"
] | 395 | 2017-02-24T02:59:29.000Z | 2022-03-31T15:48:19.000Z | 2021-05-09/写笔记带后端/library-server-develop/apps/user/migrations/0001_initial.py | ritaswc/wechat_app_template | d6ba56b70b09bc755f7d4d6b696b9e9b53511faa | [
"MIT"
] | 7 | 2020-03-17T08:33:00.000Z | 2021-09-02T23:10:46.000Z | 2021-05-09/写笔记带后端/library-server-develop/apps/user/migrations/0001_initial.py | ritaswc/wechat_app_template | d6ba56b70b09bc755f7d4d6b696b9e9b53511faa | [
"MIT"
] | 235 | 2017-03-14T03:31:38.000Z | 2022-03-29T16:14:51.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-08 07:12
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Person... | 33.46875 | 114 | 0.580766 |
80421af654ffa4dad48cb88f4600c477d3dd30ea | 11,452 | py | Python | python_playground/data/IncSimRank.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_playground/data/IncSimRank.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_playground/data/IncSimRank.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | # Tracking SimRank in Dynamic Graphs
import numpy as np
from itertools import chain, combinations, product
from scipy.sparse import csr_matrix, dok_matrix, dia_matrix
from data import *
from simrank import *
from numba import jit
from redis import StrictRedis
from persistentDict import PersistentDict
from LinkCutTree i... | 31.899721 | 131 | 0.54366 |
33a27950bc34b20ca738e3060b0b9ea92666aa12 | 1,006 | py | Python | python/oneflow/compatible/single_client/eager/symbol.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/eager/symbol.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/eager/symbol.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... | 29.588235 | 79 | 0.754473 |
33c214ae7e4c8961554d9aea536a6d1d5a6036ce | 144 | py | Python | python/python_backup/PRAC_PYTHON/5_for1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/5_for1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/5_for1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | words=["Jimut","Python","c"]
for w in words: #for just simple for loop
#print(w,len(w))
if len(w)>5:
words.insert(0,w);
print(words)
| 20.571429 | 42 | 0.611111 |
893855b42d332169207e445363ac9ffe2ffe48c5 | 1,281 | py | Python | Openharmony v1.0/third_party/ltp/testcases/network/nfsv4/acl/test_long_acl.py | clkbit123/TheOpenHarmony | 0e6bcd9dee9f1a2481d762966b8bbd24baad6159 | [
"MIT"
] | 1 | 2022-02-15T08:51:55.000Z | 2022-02-15T08:51:55.000Z | hihope_neptune-oh_hid/00_src/v0.3/third_party/ltp/testcases/network/nfsv4/acl/test_long_acl.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | hihope_neptune-oh_hid/00_src/v0.3/third_party/ltp/testcases/network/nfsv4/acl/test_long_acl.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
'''
Access Control Lists testing based on newpynfs framework
Aurelien Charbon - Bull SA
'''
from random_gen import *
from optparse import OptionParser
import subprocess
import os
import threading
import time
import random
alphabet='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789_... | 28.466667 | 94 | 0.666667 |
98713786be09ef1009c1aa091b6c03b806eac977 | 737 | py | Python | Packs/HealthCheck/Scripts/HealthCheckContainersStatus/HealthCheckContainersStatus.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/HealthCheck/Scripts/HealthCheckContainersStatus/HealthCheckContainersStatus.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/HealthCheck/Scripts/HealthCheckContainersStatus/HealthCheckContainersStatus.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
def main():
incident = demisto.incidents()[0]
account_name = incident.get('account')
account_name = f'acc_{account_name}/' if account_name != "" else ""
res = execute_command('demisto-api-get', {'uri': f'{accou... | 32.043478 | 115 | 0.674355 |
7f705519027a1e6aa5d52d06beda6cfd1aef752e | 346 | py | Python | pacman-arch/test/pacman/tests/remove060.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/remove060.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/remove060.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Remove a group"
lp1 = pmpkg("pkg1")
lp1.groups = ["grp"]
lp2 = pmpkg("pkg2")
lp3 = pmpkg("pkg3")
lp3.groups = ["grp"]
for p in lp1, lp2, lp3:
self.addpkg2db("local", p);
self.args = "-R grp"
self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2")
self.a... | 17.3 | 35 | 0.66763 |
123701ec68e79b77ad5f42577a1f873102ca27b1 | 10,107 | py | Python | Packs/FetchIndicatorsFromFile/Scripts/FetchIndicatorsFromFile/FetchIndicatorsFromFile.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/FetchIndicatorsFromFile/Scripts/FetchIndicatorsFromFile/FetchIndicatorsFromFile.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/FetchIndicatorsFromFile/Scripts/FetchIndicatorsFromFile/FetchIndicatorsFromFile.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
import re
import xlrd
import csv
import tldextract
import traceback
def csv_file_to_indicator_list(file_path, col_num, starting_row, auto_detect, default_type, type_col, limit, offset):
indicator_list = []
# ... | 37.295203 | 121 | 0.636885 |
89c3dc5c646c75105ccd087924a49927b3101d09 | 2,720 | py | Python | bebbiBotMain.py | dgnaegi/altpapierBot | 287d7e446eabf189189713067d8ac7405416d720 | [
"WTFPL"
] | 5 | 2019-07-17T04:36:14.000Z | 2020-05-04T12:48:10.000Z | bebbiBotMain.py | dgnaegi/altpapierBot | 287d7e446eabf189189713067d8ac7405416d720 | [
"WTFPL"
] | 8 | 2019-08-04T19:16:00.000Z | 2021-09-10T10:11:47.000Z | bebbiBotMain.py | dgnaegi/altpapierBot | 287d7e446eabf189189713067d8ac7405416d720 | [
"WTFPL"
] | 3 | 2019-07-17T06:37:56.000Z | 2021-09-06T19:59:18.000Z | from dataStorage.userData import userData
from telegram import Update
from telegram.ext import Updater, CommandHandler, CallbackContext
from dataStorage.dataAccessBasel import dataAccess
from helper.areaCodeParser import areaCodeBaselParser
import json
def start(update: Update, context: CallbackContext):
updat... | 49.454545 | 204 | 0.741544 |
f67bf3b3da920950686cc523c98b87ef8a001b46 | 1,993 | py | Python | TestBot/test_cogs/rpgFunctions/profession.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | TestBot/test_cogs/rpgFunctions/profession.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | TestBot/test_cogs/rpgFunctions/profession.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | from .. import sql, log, BASE_PATH, chunk, Page
from .equipment import Equipment, get_equipment
#############
# Functions #
#############
def get_professions():
df = sql('rpg', 'select * from professions')
return [Profession(**d) for d in df.to_dict('records')]
def get_profession(name):
df = sql('rpg', 'select * f... | 28.884058 | 126 | 0.679378 |
9cbc065177e795d4f50b953cfaa92c69c6e0a1e0 | 737 | py | Python | tests/conftest.py | ralfkret/hvz | 842c25d58fb3c30060080efcfa8b3d183b78e2ab | [
"MIT"
] | 1 | 2019-07-30T14:39:43.000Z | 2019-07-30T14:39:43.000Z | tests/conftest.py | ralfkret/hvz | 842c25d58fb3c30060080efcfa8b3d183b78e2ab | [
"MIT"
] | 11 | 2019-07-31T13:40:30.000Z | 2019-08-07T21:54:52.000Z | tests/conftest.py | ralfkret/hvz | 842c25d58fb3c30060080efcfa8b3d183b78e2ab | [
"MIT"
] | null | null | null | import os
import tempfile
import pytest
from web import create_app, db
from app import execute_sql
def _get_sql(filename):
with open(os.path.join(os.path.dirname(__file__), '..', 'database', filename), 'rb') as f:
return f.read().decode('utf8')
_create_sql = _get_sql('create.sql')
_data_sql = _get_sql('t... | 18.897436 | 94 | 0.683853 |
1466cb8ca96c8aa466e8ad4098fbd092f2211a0f | 2,268 | py | Python | research/cv/relationnet/src/lr_generator.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | research/cv/relationnet/src/lr_generator.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/relationnet/src/lr_generator.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... | 37.8 | 94 | 0.575397 |
b4f611b8ff5307481dbb8c4c1fe1436942394d07 | 2,220 | py | Python | StoryTellingGame/util/flask_json.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | StoryTellingGame/util/flask_json.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | 2 | 2017-10-26T16:52:58.000Z | 2017-11-01T16:58:52.000Z | StoryTellingGame/util/flask_json.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
from flask import Flask, sessions
from flask.json import JSONDecoder
from flask.json import JSONEncoder
from typing import Callable, Any, Dict, NamedTuple, Union
from util.namedtuple_factory import all_namedtuples
from util.oop import override
def serialize_named_tup... | 30.410959 | 77 | 0.615766 |
25a362cbcf7ca965a7d957a303f501473b04e05e | 442 | py | Python | tests/mock/test_spark.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 23 | 2018-09-19T13:34:27.000Z | 2022-02-14T09:49:35.000Z | tests/mock/test_spark.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 33 | 2018-10-18T07:58:05.000Z | 2019-05-16T08:24:12.000Z | tests/mock/test_spark.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 11 | 2018-10-21T18:58:57.000Z | 2022-02-14T09:49:36.000Z | import pytest
from skil.spark import *
def test_pa_config():
pa = ParameterAveraging(8, 32)
conf = pa.to_json()
retrieved = ParameterAveraging.from_json(conf)
assert retrieved.to_json() == conf
def test_ps_config():
ps = ParameterSharing(8, 32)
conf = ps.to_json()
retrieved = Paramete... | 17.68 | 50 | 0.680995 |
9818b4bbe796a3b88ad913d92c082d6ea695a0f4 | 8,358 | py | Python | cbm/show/background.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 17 | 2021-01-18T07:27:01.000Z | 2022-03-10T12:26:21.000Z | cbm/show/background.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 4 | 2021-04-29T11:20:44.000Z | 2021-12-06T10:19:17.000Z | cbm/show/background.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 47 | 2021-01-21T08:25:22.000Z | 2022-03-21T14:28:42.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This file is part of CbM (https://github.com/ec-jrc/cbm).
# Author : Konstantinos Anastasakis
# Credits : GTCAP Team
# Copyright : 2021 European Commission, Joint Research Centre
# License : 3-Clause BSD
import os
import json
import glob
import rasterio
import m... | 36.025862 | 89 | 0.573582 |
e241756f7519d7749710ec06dc3d4bbcf794c553 | 246 | py | Python | eBan/admin.py | Chrisaliang/eBanWeb | ad0d75d8247cab77ff679ec961dd42d0db537841 | [
"Apache-2.0"
] | null | null | null | eBan/admin.py | Chrisaliang/eBanWeb | ad0d75d8247cab77ff679ec961dd42d0db537841 | [
"Apache-2.0"
] | null | null | null | eBan/admin.py | Chrisaliang/eBanWeb | ad0d75d8247cab77ff679ec961dd42d0db537841 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import Board
# Register your models here.
@admin.register(Board)
class BoardAdmin(admin.ModelAdmin):
list_display = ('id', 'name', 'description')
# admin.AdminSite.register(Board, BoardAdmin)
| 20.5 | 48 | 0.752033 |
e29d6c42010a3e19fc3fe37f69636d63594c6285 | 47 | py | Python | runners/great_expectations/main.py | omio-labs/richterin | c4165fe4910a556f5bba3c7224fed6d35c3fea57 | [
"MIT"
] | null | null | null | runners/great_expectations/main.py | omio-labs/richterin | c4165fe4910a556f5bba3c7224fed6d35c3fea57 | [
"MIT"
] | null | null | null | runners/great_expectations/main.py | omio-labs/richterin | c4165fe4910a556f5bba3c7224fed6d35c3fea57 | [
"MIT"
] | null | null | null | def validate(dataset: str) -> str:
return True | 23.5 | 34 | 0.723404 |
2c3445054c091be207eb239fde80e5494856ac93 | 3,193 | py | Python | TreeModelLib/BelowgroundCompetition/NetworkHydro/NetworkHydro.py | mcwimm/pyMANGA | 6c7b53087e53b116bb02f91c33974f3dfd9a46de | [
"MIT"
] | 1 | 2021-03-16T08:35:50.000Z | 2021-03-16T08:35:50.000Z | TreeModelLib/BelowgroundCompetition/NetworkHydro/NetworkHydro.py | mcwimm/pyMANGA | 6c7b53087e53b116bb02f91c33974f3dfd9a46de | [
"MIT"
] | 67 | 2019-11-14T11:29:52.000Z | 2022-03-09T14:37:11.000Z | TreeModelLib/BelowgroundCompetition/NetworkHydro/NetworkHydro.py | mcwimm/pyMANGA | 6c7b53087e53b116bb02f91c33974f3dfd9a46de | [
"MIT"
] | 6 | 2019-11-12T11:11:41.000Z | 2021-08-12T13:57:22.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@date: 2021-Today
@author: marie-christin.wimmler@tu-dresden.de
"""
import numpy as np
from TreeModelLib.BelowgroundCompetition.SimpleNetwork import SimpleNetwork
from TreeModelLib.BelowgroundCompetition.SimpleHydro import SimpleHydro
from ProjectLib.Logger import met... | 38.939024 | 77 | 0.684623 |
2c7448f45137ed8dadba672c5995ab28b30e92ce | 2,608 | pyde | Python | sketches/avoider3/avoider3.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/avoider3/avoider3.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/avoider3/avoider3.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | from random import randint
from sprite import Skull, Smiley, Star
w = 640
h = 480
tw = th = 36
noSmileys = 10
nobStars = 30
nonStars = 15
startgame = True
playgame = False
gameover = False
skull = Skull(w/2, 320)
smiley = []
bStar = []
nStar = []
def setup():
global heart
skull.score = 0
skull.health = 5... | 25.320388 | 80 | 0.556748 |
2cbdf007114db0aab8633cc7568cd3f6d9d49fab | 237 | py | Python | Competitions-Challenges/Google CodeJam/ You Can Go Your Own Way/solution.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 26 | 2019-07-17T11:05:43.000Z | 2022-02-06T08:31:40.000Z | Competitions-Challenges/Google CodeJam/ You Can Go Your Own Way/solution.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 7 | 2019-07-16T19:52:25.000Z | 2022-01-08T08:03:44.000Z | Competitions-Challenges/Google CodeJam/ You Can Go Your Own Way/solution.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 19 | 2020-01-14T02:44:28.000Z | 2021-12-27T17:31:59.000Z | t = int(input())
for case in range(t):
n = int(input())
lydia = input()
lydia = lydia.replace('S', '-')
lydia = lydia.replace('E', 'S')
lydia = lydia.replace('-', 'E')
print('Case #{0}: {1}'.format(case+1, lydia)) | 29.625 | 49 | 0.527426 |
1a9ac9bd7c0d525a817fd77a664b65fe7333d8aa | 250 | py | Python | src/server/app/endpoints/terms_of_service/controllers.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | null | null | null | src/server/app/endpoints/terms_of_service/controllers.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | null | null | null | src/server/app/endpoints/terms_of_service/controllers.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | null | null | null | from flask import Flask, Blueprint, render_template, abort, g, request
terms_of_service = Blueprint("terms_of_service", __name__)
@terms_of_service.route('/')
def loadTerms():
return render_template('/terms_of_service/terms_of_service.html')
| 25 | 70 | 0.784 |
202cf7491e387d0ce15258d99fa19714ba3f7463 | 1,990 | py | Python | lib/helper.py | liushrui/dsb | eacbe770acf32023029eb89dcc7829af89b09132 | [
"MIT"
] | null | null | null | lib/helper.py | liushrui/dsb | eacbe770acf32023029eb89dcc7829af89b09132 | [
"MIT"
] | null | null | null | lib/helper.py | liushrui/dsb | eacbe770acf32023029eb89dcc7829af89b09132 | [
"MIT"
] | null | null | null | import os
import json
import numpy as np
from datetime import datetime
import tensorflow as tf
import keras.backend as K
def get_gpu_session(ratio=None, interactive=False):
config = tf.ConfigProto(allow_soft_placement=True)
if ratio is None:
config.gpu_options.allow_growth = True
els... | 24.875 | 70 | 0.59598 |
b3863293c19dcef011f7727c3aab56b78d95b9d8 | 490 | py | Python | gemtown/musicians/admin.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | gemtown/musicians/admin.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | 5 | 2020-09-04T20:13:39.000Z | 2022-02-17T22:03:33.000Z | gemtown/musicians/admin.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | from django.contrib import admin
from . import models
@admin.register(models.Musician)
class MusicianAdmin(admin.ModelAdmin):
fields = [
'nickname',
'description',
'career',
'creator',
]
list_display = [
'id',
'nickname',
'career',
'creator... | 15.806452 | 38 | 0.497959 |
b3a55f4e154b63bd5c7d06ef34babd6870cc07f5 | 2,762 | py | Python | Lab_01/List_test.py | SadequrRahman/advance-SoC | 35da93adfcdb1b4ec740cb44ffc54d9c8cc7adc4 | [
"BSD-4-Clause-UC"
] | null | null | null | Lab_01/List_test.py | SadequrRahman/advance-SoC | 35da93adfcdb1b4ec740cb44ffc54d9c8cc7adc4 | [
"BSD-4-Clause-UC"
] | null | null | null | Lab_01/List_test.py | SadequrRahman/advance-SoC | 35da93adfcdb1b4ec740cb44ffc54d9c8cc7adc4 | [
"BSD-4-Clause-UC"
] | null | null | null | # Author: Mohammad Sadequr Rahman
# File Name: List.py
#
# Description: Unit test for List processing functions
# This file import List and do some testing
# using unittest framework.
#
import List
import unittest
#########################... | 37.324324 | 103 | 0.620203 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.