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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a5cea1199c55ed316040caafabcf99b6b929e410 | 662 | py | Python | config.py | marwanad/music_bot | c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf | [
"MIT"
] | 1 | 2020-12-07T13:30:59.000Z | 2020-12-07T13:30:59.000Z | config.py | marwanad/music_bot | c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf | [
"MIT"
] | null | null | null | config.py | marwanad/music_bot | c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf | [
"MIT"
] | null | null | null | import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
SECRET_KEY = os.environ.get('SECRET_KEY') or 'w44xM94T2y'
SQL_ALCHEMY_COMMIT_ON_TEARDOWN = True
@staticmethod
def init_app(app):
pass
class DevelopmentConfig(Config):
DEBUG = True
SQLALCHMEY_DATABASE_URI = ... | 22.066667 | 86 | 0.700906 |
5fdf217168e044dd8122eb2db5c0ea4a194794c6 | 556 | py | Python | BITs/2014/VOROSHIN_S_I/task_4_7.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/VOROSHIN_S_I/task_4_7.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/VOROSHIN_S_I/task_4_7.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача №4, Вариант 7
#Программа выводит имя, которое скрывается под псевдонимом и дополнительно выводит область интересов, место и год рождения, а также возраст. Данные хранятся в переменных.
#Ворошин С.И.
#14.03.2016
print("Мария Луиза Чеччарелли более известна, как итальянская актриса Моника Витти.")
bo... | 29.263158 | 171 | 0.730216 |
274fda576808e4ce3b867f3b18ec38bfbe57492c | 323 | py | Python | python/coursera_python/WESLEYAN/week3/COURSERA/week_3/csv/sec.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/WESLEYAN/week3/COURSERA/week_3/csv/sec.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/WESLEYAN/week3/COURSERA/week_3/csv/sec.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import csv
def read_csv_file2(filename):
"""Reads a CSV file and prints each row without list brackets. """
f = open(filename)
for row in csv.reader(f):
print(''.join(row))
pass # replace this line with your code
f.close()
filename = input("Enter a filename :")
read_csv_file2(filename)... | 21.533333 | 70 | 0.653251 |
ef335c8321105b3d1866f747fddb6bb94535153c | 6,151 | py | Python | fuzzsvc/controller/_deprecated_Config.py | ifoundthetao/FuzzFlow | 86559ac7f85fc89510c0d9647e02880edb95aa2a | [
"MIT"
] | 53 | 2016-08-26T02:51:45.000Z | 2021-05-24T21:05:44.000Z | controller/_deprecated_Config.py | FingerLeakers/FuzzFlow | 3f2de617c3658904f9640f53a05d5e4e90634e32 | [
"MIT"
] | null | null | null | controller/_deprecated_Config.py | FingerLeakers/FuzzFlow | 3f2de617c3658904f9640f53a05d5e4e90634e32 | [
"MIT"
] | 31 | 2016-08-26T04:08:31.000Z | 2021-05-24T21:05:54.000Z | from flask_restful import Resource, reqparse
#from model.FuzzingConfig import FuzzingConfig
from model.FuzzingPlatform import FuzzingPlatform
from model.FuzzingArch import FuzzingArch
from model.FuzzingHost import FuzzingHost
from model.FuzzingEngine import FuzzingEngine
from model.FuzzingTarget import FuzzingTarget
fr... | 38.204969 | 82 | 0.585758 |
f5e78bb80c78d2c350120d98653b53ee16c0175d | 163 | py | Python | flask_heroku/run.py | hou2zi0/flask-app-docker | 0e51b1f00201fc6eb46a62d0d8f2701bc02d4031 | [
"MIT"
] | null | null | null | flask_heroku/run.py | hou2zi0/flask-app-docker | 0e51b1f00201fc6eb46a62d0d8f2701bc02d4031 | [
"MIT"
] | null | null | null | flask_heroku/run.py | hou2zi0/flask-app-docker | 0e51b1f00201fc6eb46a62d0d8f2701bc02d4031 | [
"MIT"
] | null | null | null | from app import app
import os
port = int(os.environ.get("PORT", 5000))
if __name__ == '__main__':
app.run(debug=True
#,host='0.0.0.0',port=port
)
| 18.111111 | 40 | 0.613497 |
c212c754c1049e8011b163ee10faf47cc6c712a3 | 607 | py | Python | .venv/Lib/site-packages/dexpy/tests/test_load.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/tests/test_load.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/tests/test_load.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | 6 | 2017-12-22T03:47:37.000Z | 2021-03-13T03:45:26.000Z | from unittest import TestCase
import os
import dexpy.design as dsn
class TestLoad(TestCase):
def test_load(self):
data_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data")
design = dsn.load_file(os.path.join(data_dir, "two_fac.xml"))
self.assertEqual(4, dsn.runs(design))... | 30.35 | 83 | 0.627677 |
a08aa08bff987d97cbc4645d2db8691f41d65e41 | 4,609 | py | Python | python/en/archive/books/jump2python/j2p-02_3-list.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/books/jump2python/j2p-02_3-list.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/books/jump2python/j2p-02_3-list.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
j2p-02_3-list.py
jump2python
p.66, 리스트 자료형
"""
#%%##############################
# 리스트는 어떻게 만들고 사용할까 #
#################################
# n개의 요소를 포함하는 리스트를 만들기
# 리스트명 = [요소0, 요소1, ...요소n-1]
odd = [1, 3, 5, 7, 9]
# 다양한 리스트의 생김새
# d,e처럼 숫자와 문자열을 함께 요소값으로 가질 수 있다.
a = []
... | 17.00738 | 64 | 0.360382 |
f837943deec453a567b372d6588d83174d0d3239 | 564 | py | Python | live/app.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 1 | 2017-01-08T13:21:43.000Z | 2017-01-08T13:21:43.000Z | live/app.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 17 | 2018-12-03T14:22:14.000Z | 2021-07-14T15:15:12.000Z | live/app.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 2 | 2018-12-03T14:58:49.000Z | 2019-12-01T13:24:42.000Z | from flask import Flask
from flask_socketio import SocketIO
import settings
app = Flask(__name__)
socketio = SocketIO(app)
@socketio.on('evnt')
def handle_json(json):
print("Received: {}".format(json))
@socketio.on('update_flow', namespace=settings.SOCKETIO_NAMESPACE)
def update_flow(json):
if json.get('se... | 22.56 | 78 | 0.705674 |
f85359bf4ea5d73e2189656e6e4b07ea166f68b8 | 21,385 | py | Python | Fastir_Collector/dump/environment_settings.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | Fastir_Collector/dump/environment_settings.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | Fastir_Collector/dump/environment_settings.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | from construct import *
import hexdump
import os
class EnvironmentVariable(object):
def __init__(self):
self.name = ""
self.value = ""
def environment_variable(self, current_machine):
list_env_var = []
for ve in current_machine.Win32_environment():
env_var = Enviro... | 54.974293 | 120 | 0.538976 |
3e7e142e223d97477d65c8af589cd99381428234 | 4,660 | py | Python | example/model_inversion/mi_face_differential_privacy.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 24 | 2021-11-17T02:16:47.000Z | 2022-03-27T01:04:08.000Z | example/model_inversion/mi_face_differential_privacy.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 9 | 2021-12-03T06:09:27.000Z | 2022-03-29T06:33:53.000Z | example/model_inversion/mi_face_differential_privacy.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 5 | 2022-01-12T09:58:04.000Z | 2022-03-17T09:29:04.000Z | import cv2
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torchvision.transforms as transforms
from matplotlib import pyplot as plt
from sklearn.metrics import accuracy_score
from torch.utils.data import TensorDataset
from aijack.attack import M... | 27.738095 | 115 | 0.617167 |
f2f6fd08cf6d44b57cfb493380fe93a73e385ada | 115 | py | Python | flask_mapbox/settings.py | gaiar/bachelor-beuth-2019 | 391af71bd6ec483b239ed200cee880651cb5396a | [
"MIT"
] | null | null | null | flask_mapbox/settings.py | gaiar/bachelor-beuth-2019 | 391af71bd6ec483b239ed200cee880651cb5396a | [
"MIT"
] | null | null | null | flask_mapbox/settings.py | gaiar/bachelor-beuth-2019 | 391af71bd6ec483b239ed200cee880651cb5396a | [
"MIT"
] | null | null | null | MAPBOX_ACCESS_KEY = 'pk.eyJ1IjoiZWFuaXNpbW92YSIsImEiOiJjamxrb3U0OWgwb3kwM2tvYXUwa2MyZWl2In0.ysXaYDx505NQR78auE8QVg' | 115 | 115 | 0.93913 |
29f2d057d4e530315f9cbaaa0205232ff4272dd4 | 2,703 | py | Python | Packs/ExpanseV2/Scripts/ExpanseEnrichAttribution/ExpanseEnrichAttribution_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ExpanseV2/Scripts/ExpanseEnrichAttribution/ExpanseEnrichAttribution_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ExpanseV2/Scripts/ExpanseEnrichAttribution/ExpanseEnrichAttribution_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto # noqa
import ExpanseEnrichAttribution
CURRENT_IP = [
{"ip": "1.1.1.1", "attr1": "value1"},
{"ip": "8.8.8.8", "attr1": "value2"},
]
ENRICH_IP = [
{"ipaddress": "1.1.1.1", "provider": "Cloudflare", "ignored": "ignored-right"},
{"ipaddress": "8.8.8.4", "provider": "Googl... | 27.865979 | 83 | 0.606733 |
8a1924ed755c275a845b9891b4ebe123030dd652 | 2,086 | py | Python | scripts/plotNumberOfVisits2Bars.py | JakubGutowski/PersonalBlog | 96122b36486f7e874c013e50d939732a43db309f | [
"BSD-3-Clause"
] | null | null | null | scripts/plotNumberOfVisits2Bars.py | JakubGutowski/PersonalBlog | 96122b36486f7e874c013e50d939732a43db309f | [
"BSD-3-Clause"
] | null | null | null | scripts/plotNumberOfVisits2Bars.py | JakubGutowski/PersonalBlog | 96122b36486f7e874c013e50d939732a43db309f | [
"BSD-3-Clause"
] | null | null | null | import os, sqlite3
import matplotlib.pyplot as plt
from datetime import datetime
from calendar import monthrange
class VisitModel():
def __init__(self,model):
self.pub_date = datetime.strptime(model[0], '%Y-%m-%d %H:%M:%S.%f')
self.ip_address = model[1]
# Read date and number of days in this mon... | 43.458333 | 179 | 0.745925 |
6a69db18830986a862b4db90d85bcf5bdb21e322 | 1,952 | py | Python | site/public/courses/CS-1.3/Code/linked-list/linkedlist.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | 1 | 2021-08-24T20:22:19.000Z | 2021-08-24T20:22:19.000Z | site/public/courses/CS-1.3/Code/linked-list/linkedlist.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | site/public/courses/CS-1.3/Code/linked-list/linkedlist.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | #!python
class Node(object):
def __init__(self, data):
"""Initialize this node with the given data."""
self.data = data
self.next = None
class LinkedList(object):
def __init__(self):
"""Initialize this linked list."""
self.head = None
self.tail... | 28.289855 | 66 | 0.55123 |
6a799cb3087abf02cb8b7f7085c2b43ee0088a28 | 13,138 | py | Python | Bosses.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | null | null | null | Bosses.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 5 | 2020-01-18T21:10:46.000Z | 2020-01-25T20:58:19.000Z | Bosses.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 2 | 2020-01-18T17:36:50.000Z | 2020-01-22T16:52:08.000Z | import logging
from typing import Optional
from BaseClasses import Boss
from Fill import FillError
def BossFactory(boss: str, player: int) -> Optional[Boss]:
if boss in boss_table:
enemizer_name, defeat_rule = boss_table[boss]
return Boss(boss, enemizer_name, defeat_rule, player)
raise Except... | 42.380645 | 163 | 0.612194 |
7ca6e9a5aa6ccdd7d404f1a38654566065cb6935 | 848 | py | Python | 7-assets/past-student-repos/data_struct_and_algo-master/Doubling_stack.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 4 | 2021-08-31T00:56:40.000Z | 2021-11-29T03:08:55.000Z | 7-assets/past-student-repos/data_struct_and_algo-master/Doubling_stack.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 3 | 2022-02-14T18:48:11.000Z | 2022-03-30T05:26:26.000Z | 7-assets/past-student-repos/data_struct_and_algo-master/Doubling_stack.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-08-31T00:54:51.000Z | 2021-08-31T00:54:51.000Z | class Stack:
def __init__(self,limit=10):
self.stack=[]
self.limit=limit
def push(self,n):
if len(self.stack)>self.limit:
self.doublelimit()
else:
self.stack.append(n)
def pop(self):
if len(self.stack)>0:
self.stack.pop()
def... | 16.627451 | 38 | 0.542453 |
86fb79d60c6b251352ea5733539142a477b481fe | 631 | py | Python | tests/test_lists_dicts.py | MZH-bust/genutil | f17190ec484d5844f8950908cc07556a5b1429e7 | [
"MIT"
] | null | null | null | tests/test_lists_dicts.py | MZH-bust/genutil | f17190ec484d5844f8950908cc07556a5b1429e7 | [
"MIT"
] | null | null | null | tests/test_lists_dicts.py | MZH-bust/genutil | f17190ec484d5844f8950908cc07556a5b1429e7 | [
"MIT"
] | null | null | null | import pytest
from genutil import lists_dicts
class TestSortAlphanumeric:
@pytest.mark.parametrize(
"test_parameter,expected",
[
pytest.param(["1", "10", "2", "foo_10", "foo_8"], ['1', '2', '10', 'foo_8', 'foo_10'], id="Param1"),
pytest.param(["Lonely String in List"], ["Lo... | 30.047619 | 112 | 0.62599 |
d4a4e558b40071a3a16aa4cbbd87fcaf71af3434 | 1,900 | py | Python | IVTa/2014/EGOROV_V_I/task_4_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/EGOROV_V_I/task_4_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/EGOROV_V_I/task_4_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 4. Вариант 8
# Напишите программу, которая выводит имя, под которым
# скрывается Алексей Максимович Пешков. Дополнительно
# необходимо вывести область интересов указанной личности,
# место рождения, годы рождения и смерти (если человек умер),
# вычислить возраст на данный момент (или момент смерти). Для хранен... | 32.20339 | 96 | 0.656842 |
d4f3d38f5e7319452e170644a932699fd931c2e9 | 4,469 | py | Python | OpenCVPython/opencv_python_object_detection_3.py | mbHAW/AVPRG | 1de43c775ce471409b72fd68ce1053e9578c8874 | [
"MIT"
] | null | null | null | OpenCVPython/opencv_python_object_detection_3.py | mbHAW/AVPRG | 1de43c775ce471409b72fd68ce1053e9578c8874 | [
"MIT"
] | null | null | null | OpenCVPython/opencv_python_object_detection_3.py | mbHAW/AVPRG | 1de43c775ce471409b72fd68ce1053e9578c8874 | [
"MIT"
] | null | null | null | from asyncio.tasks import sleep
from asyncio.windows_events import NULL
import cv2
import numpy as np
def nothing(x):
pass
isRunning = False
coords = NULL
def run():
cap = cv2.VideoCapture(0)
if cap.isOpened() == False:
print("Error in opening video stream or file")
print(cap.get(cv2.CA... | 33.103704 | 131 | 0.593869 |
6af6c411ed1c1a23d32f690e79f334c10d18c633 | 66,236 | py | Python | bangsat.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | bangsat.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | bangsat.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #!/usr/bin/python3
#coding=utf-8
## Open Resource Code Buat Belajar Lu Ye. Kalo Mau Recode, Recode Ajah Tapi Ngotak:)
# Tinggalkan Jejak Anda Dengan Cara Tag Nama Recodernya :)
######################################################
# #
# Recode? Boleh ... | 37.698349 | 655 | 0.525711 |
ed17ce0ed2a922acbfde2e4994f44383c3b26413 | 5,051 | py | Python | 2_DeepLearning-Keras/04_Tensorboard/plotting.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 2_DeepLearning-Keras/04_Tensorboard/plotting.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 2_DeepLearning-Keras/04_Tensorboard/plotting.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | import io
import os
import numpy as np
import matplotlib.pyplot as plt
from sklearn.metrics import confusion_matrix
import tensorflow as tf
def display_digit(image, label=None, pred_label=None):
"""Display the Digit from the image.
If the Label and PredLabel is given, display it too.
"""
if image.sha... | 36.601449 | 149 | 0.646209 |
ed70e35e2dad67aac04ff1c9d23454cd2015047e | 3,591 | py | Python | tests/onegov/gazette/test_views_auth.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/gazette/test_views_auth.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/gazette/test_views_auth.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import onegov.gazette
from lxml.html import document_fromstring
from tests.shared import utils
from webtest import TestApp as Client
def test_view_permissions():
utils.assert_explicit_permissions(
onegov.gazette,
onegov.gazette.GazetteApp
)
def test_view_login_logout(gazette_app):
clien... | 35.91 | 78 | 0.687552 |
9c653ef82904c2e56dab31cf7328e0dde5965df2 | 254 | py | Python | DataStructures/Arrays/SparseArrays.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/Arrays/SparseArrays.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/Arrays/SparseArrays.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
N = int(raw_input())
str_list = []
for _ in range(N):
str_list.append(raw_input())
Q = int(raw_input())
query_list = []
for _ in range(Q):
query_list.append(raw_input())
for query in query_list:
print str_list.count(query)
| 14.941176 | 34 | 0.665354 |
9c6dee56de842d0d54a5a1724eff1aa94e7489e4 | 1,917 | py | Python | deploy/dockerfiles/blog/auth.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 38 | 2018-02-24T02:33:52.000Z | 2020-03-03T23:17:04.000Z | deploy/dockerfiles/blog/auth.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 385 | 2018-02-21T16:53:13.000Z | 2020-03-04T00:52:40.000Z | deploy/dockerfiles/blog/auth.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 13 | 2020-05-01T13:03:54.000Z | 2022-02-28T13:12:57.000Z | import json
import os
from flask import Flask, request, redirect, render_template_string, session
from requests_oauthlib import OAuth2Session
CLIENT_ID = os.getenv("OAUTH_CLIENT_ID")
CLIENT_SECRET = os.getenv("OAUTH_CLIENT_SECRET")
SCOPE = os.getenv("OAUTH_SCOPE", "public_repo")
AUTHORIZATION_BASE_URL = "https://gi... | 28.191176 | 110 | 0.706312 |
92cb108bc46f3d20ed2dea37ef888d98491ea5df | 11,451 | py | Python | sdks/python/apache_beam/runners/interactive/display/pipeline_graph.py | diegomez17/beam | 29dea08c873abc75871674762e68fd5b29b8052b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2021-12-29T09:01:21.000Z | 2022-02-26T14:32:16.000Z | sdks/python/apache_beam/runners/interactive/display/pipeline_graph.py | diegomez17/beam | 29dea08c873abc75871674762e68fd5b29b8052b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 4 | 2021-12-21T21:15:41.000Z | 2022-02-15T19:21:28.000Z | sdks/python/apache_beam/runners/interactive/display/pipeline_graph.py | diegomez17/beam | 29dea08c873abc75871674762e68fd5b29b8052b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 17 | 2021-12-15T19:31:54.000Z | 2022-01-31T18:54:23.000Z | #
# 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 "License"); you may not us... | 39.760417 | 80 | 0.697843 |
b98992d680935df4a37569be1324113111558a8b | 19,669 | py | Python | tests/core/training/test_interactive.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 1 | 2020-09-12T17:27:21.000Z | 2020-09-12T17:27:21.000Z | tests/core/training/test_interactive.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 46 | 2020-09-26T11:36:38.000Z | 2022-03-01T13:38:02.000Z | tests/core/training/test_interactive.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | null | null | null | import asyncio
import json
from collections import deque
from pathlib import Path
from typing import Any, Dict, List, Text
import pytest
import uuid
from _pytest.monkeypatch import MonkeyPatch
from aioresponses import aioresponses
from mock import Mock
import rasa.shared.utils.io
import rasa.utils.io
from rasa.core.... | 31.370016 | 88 | 0.533327 |
b9b31e3f84fac5a8e9b261f494442b90183d2c5c | 2,954 | py | Python | Startmenu.py | BogyMitutoyoCTL/Riesen-Tetris-3 | 349d7b6f12c2ddf0b66683c904406a5e8596228d | [
"MIT"
] | 1 | 2019-10-22T14:02:34.000Z | 2019-10-22T14:02:34.000Z | Startmenu.py | BogyMitutoyoCTL/Riesen-Tetris-3 | 349d7b6f12c2ddf0b66683c904406a5e8596228d | [
"MIT"
] | null | null | null | Startmenu.py | BogyMitutoyoCTL/Riesen-Tetris-3 | 349d7b6f12c2ddf0b66683c904406a5e8596228d | [
"MIT"
] | null | null | null | import time
import Playground
import RandomBlock
import Tetrisblock
import Ws2812Painter
from LED_Matrix_Maler import Painter
class Startmenu:
def __init__(self, playground):
self.playground = playground
self.playground.clear()
square = Tetrisblock.T
square.orientation = 2
... | 32.461538 | 55 | 0.602911 |
6a48af9cc445d4030960526886df85f5d3aa13f1 | 2,065 | bzl | Python | build/linter/deps.bzl | 78182648/blibli-go | 7c717cc07073ff3397397fd3c01aa93234b142e3 | [
"MIT"
] | 22 | 2019-04-27T06:44:41.000Z | 2022-02-04T16:54:14.000Z | build/linter/deps.bzl | YouthAge/blibli-go | 7c717cc07073ff3397397fd3c01aa93234b142e3 | [
"MIT"
] | null | null | null | build/linter/deps.bzl | YouthAge/blibli-go | 7c717cc07073ff3397397fd3c01aa93234b142e3 | [
"MIT"
] | 34 | 2019-05-07T08:22:27.000Z | 2022-03-25T08:14:56.000Z | # ****************************************************************
# List of external dependencies
# ****************************************************************
# These deps are derived empirically, starting from the grpc tag and
# then updating other dependents to the master commit.
DEPS = {
"com_github_al... | 26.818182 | 68 | 0.566102 |
166790aa7ec3f7efbf36a45cd2cda03241fe1be5 | 689 | py | Python | src/notif/models.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | null | null | null | src/notif/models.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | 1 | 2022-03-25T05:33:19.000Z | 2022-03-25T05:33:19.000Z | src/notif/models.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | null | null | null | from django.db import models
import uuid
from user.models import User
# Create your models here.
class Notif(models.Model):
class NotifTypeOptions(models.TextChoices):
primary = 'P'
warning = 'W'
danger = 'D'
success = 'S'
id = models.UUIDField(default=uuid.uuid4, primary_ke... | 28.708333 | 63 | 0.70537 |
1671660e1ab094207fadcbbcc35cc41d561c5da3 | 395 | py | Python | Data Structures/DataStructures-Problems/Trees/Monk and his Friends/monkandhisfriends.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 26 | 2019-07-17T11:05:43.000Z | 2022-02-06T08:31:40.000Z | Data Structures/DataStructures-Problems/Trees/Monk and his Friends/monkandhisfriends.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 7 | 2019-07-16T19:52:25.000Z | 2022-01-08T08:03:44.000Z | Data Structures/DataStructures-Problems/Trees/Monk and his Friends/monkandhisfriends.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 19 | 2020-01-14T02:44:28.000Z | 2021-12-27T17:31:59.000Z | t = int(input())
while(t):
n,m = map(int, input().split()[:2])
arr = list(map(int, input().split()))
ln = {}
for i in range(len(arr)):
if i < n:
ln[arr[i]] = 1
else:
try:
if(ln[arr[i]] == 1):
print('YES')
except Exce... | 23.235294 | 41 | 0.36962 |
bc72e4219b94740911d0e2472d7721273b57b0e5 | 1,638 | py | Python | _build/categories.py | kylebebak/kylebebak.github.io | 052cf14904d9991d5e035e6b8300c0231d839988 | [
"MIT"
] | 1 | 2017-11-26T21:56:11.000Z | 2017-11-26T21:56:11.000Z | _build/categories.py | kylebebak/kylebebak.github.io | 052cf14904d9991d5e035e6b8300c0231d839988 | [
"MIT"
] | null | null | null | _build/categories.py | kylebebak/kylebebak.github.io | 052cf14904d9991d5e035e6b8300c0231d839988 | [
"MIT"
] | 2 | 2016-07-11T16:05:40.000Z | 2020-04-16T01:51:44.000Z | import click
import build
@click.command()
@click.option('--posts_dir', default='.', help='Path to posts directory')
@click.option('--categories_file', default='.', help='Output categories file')
def categories(posts_dir, categories_file):
cats_dict = build.categories(posts_dir)
# generate markdown from catego... | 36.4 | 78 | 0.567766 |
bc971c03558be5cd53891aaaf0fccc470914a693 | 6,661 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/pn_admin_syslog.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/pn_admin_syslog.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/pn_admin_syslog.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Copyright: (c) 2018, Pluribus Networks
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['... | 28.96087 | 111 | 0.621829 |
d5ffeb7024e46e1e1f107559b26350bbcf83c4e8 | 83 | py | Python | Python/examples/os.py | bunny8469/Hello-World | 722b5961cbcd9b2c2eec2cb6aa700eaa451e008b | [
"MIT"
] | 133 | 2021-01-15T16:29:40.000Z | 2022-03-21T16:35:42.000Z | Python/examples/os.py | Amirmohammadkazemi/Hello-World | 4b4549b690b76d90129748aac1fdf10fcb59f4da | [
"MIT"
] | 117 | 2021-01-17T08:54:22.000Z | 2022-01-17T16:38:11.000Z | Python/examples/os.py | Amirmohammadkazemi/Hello-World | 4b4549b690b76d90129748aac1fdf10fcb59f4da | [
"MIT"
] | 146 | 2021-01-15T12:57:19.000Z | 2022-03-15T20:10:23.000Z | import os
# example of `system` function
os.system("clear")
os.system("ls -ltrh")
| 13.833333 | 30 | 0.698795 |
914ba90caa80d7d763ea10624a456a7636a7ceae | 267 | py | Python | orchestrator/config.py | suvambasak/fog-service-orchestration | 8404484c32b2f6c0bfb2ed820dc46d56f055141d | [
"Apache-2.0"
] | null | null | null | orchestrator/config.py | suvambasak/fog-service-orchestration | 8404484c32b2f6c0bfb2ed820dc46d56f055141d | [
"Apache-2.0"
] | null | null | null | orchestrator/config.py | suvambasak/fog-service-orchestration | 8404484c32b2f6c0bfb2ed820dc46d56f055141d | [
"Apache-2.0"
] | 1 | 2022-02-02T14:49:40.000Z | 2022-02-02T14:49:40.000Z | class Configuration:
"""
Configuration file path and settings
"""
CONFIG_DIR = "/root/.config/"
HOST_FILE_PATH = "/root/.config/HOST"
INPUTS_YAML_FILE_PATH = "/root/tosca/inputs.yaml"
SERVICE_TEMPLATE_PATH = "/root/tosca/service.yaml"
| 20.538462 | 54 | 0.670412 |
e690cc0521c6753f11c9853c7a9eb2af17fc86b6 | 2,219 | py | Python | src/test/tests/hybrid/conditional.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/hybrid/conditional.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/hybrid/conditional.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: expressions.py
#
# Tests: mesh - 3D rectilinear, single domain
# plots - Pseudocolor
# operators - Threshold
#
# Defect ID: '3655
#
# Programmer: Hank Childs
# ... | 23.114583 | 101 | 0.62776 |
fc0dc3e4e05c5ead18e2d6001d16a8aa6968f71c | 2,228 | py | Python | repo/script.module.urlresolver/lib/urlresolver/plugins/vk.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 1 | 2017-11-26T18:18:46.000Z | 2017-11-26T18:18:46.000Z | repo/script.module.urlresolver/lib/urlresolver/plugins/vk.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | null | null | null | repo/script.module.urlresolver/lib/urlresolver/plugins/vk.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 3 | 2019-09-30T19:52:05.000Z | 2020-04-12T21:20:56.000Z | """
VK urlresolver XBMC Addon
Copyright (C) 2015 tknorris
Version 0.0.1
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 3 of the License, or
(at your option) any later version.
This... | 32.289855 | 101 | 0.655296 |
fca86bec8f75f55f00540572212cd6817a4aa5e1 | 547 | py | Python | python/gdal_cookbook/cookbook_geometry/write_geometry_to_geojson.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/gdal_cookbook/cookbook_geometry/write_geometry_to_geojson.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/gdal_cookbook/cookbook_geometry/write_geometry_to_geojson.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from osgeo import ogr
# Create test polygon
ring = ogr.Geometry(ogr.wkbLinearRing)
ring.AddPoint(1179091.1646903288, 712782.8838459781)
ring.AddPoint(1161053.0218226474, 667456.2684348812)
ring.AddPoint(1214704.933941905, 641092.8288590391)
ring.AddPoint(1228580.428455506, 682719.3123998424)
ring.AddPoint(1218405.0658... | 34.1875 | 52 | 0.804388 |
5db41623fadc0195549842c0cc20b5db79d80bc8 | 1,011 | py | Python | tests/test_gmaps.py | kopytjuk/uni-unterkunft | c81664e0070f97f45baa6eaff6a71039a267fd37 | [
"MIT"
] | null | null | null | tests/test_gmaps.py | kopytjuk/uni-unterkunft | c81664e0070f97f45baa6eaff6a71039a267fd37 | [
"MIT"
] | null | null | null | tests/test_gmaps.py | kopytjuk/uni-unterkunft | c81664e0070f97f45baa6eaff6a71039a267fd37 | [
"MIT"
] | null | null | null | import unittest
from datetime import datetime, timedelta
import sys
from dotenv import load_dotenv
load_dotenv()
sys.path.append(".")
from src.gmaps import get_distances, get_locatation_attributes
class TestGmapsUtils(unittest.TestCase):
def test_get_distances(self):
loc_base = (49.146468, 9.221350)
... | 29.735294 | 86 | 0.690406 |
db5a9508677e405cc66f6cff1a7120435b34b51c | 6,947 | py | Python | rdlcompiler/systemrdl/rdl_lexer.py | MegabytePhreak/rdl | b97912751738da9fddb42a9155f5823716809fc0 | [
"MIT"
] | 4 | 2016-05-10T20:40:34.000Z | 2020-04-09T13:23:33.000Z | rdlcompiler/systemrdl/rdl_lexer.py | MegabytePhreak/rdl | b97912751738da9fddb42a9155f5823716809fc0 | [
"MIT"
] | null | null | null | rdlcompiler/systemrdl/rdl_lexer.py | MegabytePhreak/rdl | b97912751738da9fddb42a9155f5823716809fc0 | [
"MIT"
] | null | null | null |
from ply import lex
import re
from collections import OrderedDict, namedtuple
from properties import properties
from rdlcompiler.colorize import colorize, RED, BOLD
from rdlcompiler.logger import logger
Location = namedtuple('Location', ['filename', 'lineno', 'index'])
class RdlToken(object):
def __init__(se... | 27.899598 | 110 | 0.536922 |
37f6c0c4802f2fa4d71be5c0506b47022ff3fb62 | 8,710 | py | Python | src/Sephrasto/CharakterBeschreibungWrapper.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | src/Sephrasto/CharakterBeschreibungWrapper.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | src/Sephrasto/CharakterBeschreibungWrapper.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 10 17:11:39 2017
@author: Lennart
"""
from Wolke import Wolke
import UI.CharakterBeschreibung
from PyQt5 import QtWidgets, QtCore
import logging
from Hilfsmethoden import Hilfsmethoden
class BeschrWrapper(QtCore.QObject):
'''
Wrapper class for the Beschreibung GU... | 50.346821 | 244 | 0.649713 |
530dac0765f45b7ed588f74fd703b1091c14f12a | 538 | py | Python | Python/M01_ProgrammingBasics/L01_FirstStepsInCoding/Exercises/Solutions/P07_FruitMarket.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L01_FirstStepsInCoding/Exercises/Solutions/P07_FruitMarket.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L01_FirstStepsInCoding/Exercises/Solutions/P07_FruitMarket.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | 1 | 2022-02-23T13:03:14.000Z | 2022-02-23T13:03:14.000Z | price_strawberry = float(input())
kg_bananas = float(input())
kg_potatoes = float(input())
kg_raspberry = float(input())
kg_strawberry = float(input())
price_raspberry = price_strawberry / 2
price_potatoes = price_raspberry * 0.6
price_bananas = price_raspberry * 0.2
cost_strawberry = price_strawberry * kg_strawberry
c... | 38.428571 | 71 | 0.802974 |
5347910b9ba88951ec6765a1c71ecf66e419e987 | 512 | py | Python | examples/basic/example/B.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | examples/basic/example/B.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | examples/basic/example/B.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | import warp
from warp import Pipe, Parameter, Product
from . import A
class Main(Pipe):
message = Parameter('test_B')
### products
# Since this product is never declared via `@produces`, it is ignored by WARP.
product = Product('data/B.txt', static=True)
@warp.dependencies(
productA1=A.... | 24.380952 | 82 | 0.626953 |
72960a012f66bb2f6f2c0f2a493ddad2128b70f8 | 70 | py | Python | python/python_backup/wisp_old/archives/f_.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/wisp_old/archives/f_.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/wisp_old/archives/f_.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | str1 = """This is a huges string {} haha""".format("LOL")
print(str1) | 23.333333 | 57 | 0.628571 |
72ce554fd04c44439a2e9cbbe4fa46cc688ce997 | 18,456 | py | Python | Packs/remedy_SR/Integrations/remedy_SR/remedy_SR.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/remedy_SR/Integrations/remedy_SR/remedy_SR.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/remedy_SR/Integrations/remedy_SR/remedy_SR.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import base64
import hashlib
import json
import os
import demistomock as demisto
import requests
from CommonServerPython import *
from CommonServerUserPython import *
handle_proxy()
VERIFY_CERTIFICATE = not demisto.params().get('insecure', False)
URL = demisto.params()['server']
XML_NS = demisto.params()['xml_ns']
US... | 45.014634 | 120 | 0.585176 |
f4464daf490d7c4090aaa9776530945e78af50a3 | 3,780 | py | Python | pyconuk/utils.py | PyconUK/2017.pyconuk.org | 337a00c034a15e5b41a8ea8683dd44310e14fb9c | [
"MIT"
] | 3 | 2017-10-24T13:33:29.000Z | 2017-10-30T10:47:28.000Z | pyconuk/utils.py | PyconUK/2017.pyconuk.org | 337a00c034a15e5b41a8ea8683dd44310e14fb9c | [
"MIT"
] | 78 | 2017-02-14T16:49:58.000Z | 2018-04-19T06:28:42.000Z | pyconuk/utils.py | PyconUK/2017.pyconuk.org | 337a00c034a15e5b41a8ea8683dd44310e14fb9c | [
"MIT"
] | 36 | 2017-06-19T07:48:38.000Z | 2018-01-19T11:08:10.000Z | from django.core.urlresolvers import reverse
from .models import ScheduleSlot
def load_schedule_context(date, rooms_in_order):
slots = ScheduleSlot.objects.filter(date=date)
rooms_in_use_on_day = {slot.room for slot in slots}
rooms = [room for room in rooms_in_order if room in rooms_in_use_on_day]
... | 28.636364 | 91 | 0.48254 |
be5555dc8bd8861852dd99fe2af85447e689b224 | 84 | py | Python | pages/themes/beginners/modulesAndPackages/examples/my_app_pack/packA/packB/packBfunctions.py | ProgressBG-Python-Course/ProgressBG-Python | 6429833696c2c50d9f902f62cc3a65ca62659c69 | [
"MIT"
] | null | null | null | pages/themes/beginners/modulesAndPackages/examples/my_app_pack/packA/packB/packBfunctions.py | ProgressBG-Python-Course/ProgressBG-Python | 6429833696c2c50d9f902f62cc3a65ca62659c69 | [
"MIT"
] | null | null | null | pages/themes/beginners/modulesAndPackages/examples/my_app_pack/packA/packB/packBfunctions.py | ProgressBG-Python-Course/ProgressBG-Python | 6429833696c2c50d9f902f62cc3a65ca62659c69 | [
"MIT"
] | null | null | null | def packBfunction():
print("packBfunction fired!")
print("__name__: ", __name__) | 28 | 31 | 0.714286 |
be89160c6a5b123feb244d587106736a5445f362 | 909 | py | Python | src/onegov/election_day/forms/upload/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/forms/upload/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/forms/upload/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.election_day.forms.upload.election import UploadMajorzElectionForm
from onegov.election_day.forms.upload.election import UploadProporzElectionForm
from onegov.election_day.forms.upload.party_results import \
UploadPartyResultsForm
from onegov.election_day.forms.upload.rest import UploadRestForm
from one... | 37.875 | 79 | 0.829483 |
fe29f4cf21d63be1a83197acb71c20076cc707ad | 4,828 | py | Python | tools/legacy/mw4-erf-converter/convertAllErf.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 2 | 2020-03-18T18:23:27.000Z | 2020-08-02T15:59:16.000Z | tools/legacy/mw4-erf-converter/convertAllErf.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 5 | 2019-07-07T16:47:47.000Z | 2020-08-10T16:20:00.000Z | tools/legacy/mw4-erf-converter/convertAllErf.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 1 | 2020-03-18T18:23:30.000Z | 2020-03-18T18:23:30.000Z |
import sys
import json
import glob
import readErf
importFilenames = sys.argv[1:]
# lower half of mech
# hip
# (l/r)uleg (u for upper)
# (l/r)mleg (m for middle)
# (l/r)dleg (d for down)
# (l/r)foot
# (l/r)ftoe (f for front)
# (l/r)btoe (b for back)
def getMaxMin(items, index):
... | 35.5 | 154 | 0.556545 |
22ed4c0a8657fb8493add36853c76749bd9fef8c | 315 | py | Python | Programming Languages/Python/Theory/100_Python_Challenges/Section_4_Dictionary/71. invert the keys and values of a dictionary.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_4_Dictionary/71. invert the keys and values of a dictionary.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_4_Dictionary/71. invert the keys and values of a dictionary.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | """
Write a function to invert the keys and values of a dictionary.
input_dict = {'Box1':'Apple', 'Box2':'Orange'}
Expected output = {'Apple':'Box1', 'Orange':'Box2'}
"""
#Solution is:
def invert_dict(input_dict):
output_dict = {v: k for k, v in input_dict.items()}
return output_dict
| 19.6875 | 63 | 0.631746 |
60192cc18018c1d3be2cd8f4e30781cd36dc041f | 927 | py | Python | motor_control.py | pd3d/RLS | 920693cd96a2ec0d8093ad5953b8eef910c7ab33 | [
"Apache-2.0"
] | null | null | null | motor_control.py | pd3d/RLS | 920693cd96a2ec0d8093ad5953b8eef910c7ab33 | [
"Apache-2.0"
] | null | null | null | motor_control.py | pd3d/RLS | 920693cd96a2ec0d8093ad5953b8eef910c7ab33 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#import Adafruit_MotorHAT, Adafruit_DCMotor, Adafruit_Stepper
from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor, Adafruit_StepperMotor
import time
import atexit
# create a default object, no changes to I2C address or frequency
mh = Adafruit_MotorHAT()
# recommended for auto-disablin... | 34.333333 | 88 | 0.776699 |
6051e533b635e1fc2d7da2f57f8f881859d7f19e | 1,401 | py | Python | Packs/ReversingLabs_A1000/Integrations/ReversingLabsA1000v2/ReversingLabsA1000v2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ReversingLabs_A1000/Integrations/ReversingLabsA1000v2/ReversingLabsA1000v2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ReversingLabs_A1000/Integrations/ReversingLabsA1000v2/ReversingLabsA1000v2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
import io
from ReversingLabsA1000v2 import a1000_report_output, list_extracted_files_output, get_classification_output
import demistomock as demisto
import pytest
INTEGRATION_NAME = 'ReversingLabs A1000'
@pytest.fixture(autouse=True)
def handle_calling_context(mocker):
mocker.patch.object(demisto, 'c... | 31.133333 | 108 | 0.791577 |
60a1f7708ed67965ac53928646140b968741766d | 5,262 | py | Python | textprocessing/textprocessor.py | Orthant/tensorflow | e1a514aa012476dbf40b1a4f9ea004a2f259eff5 | [
"MIT"
] | null | null | null | textprocessing/textprocessor.py | Orthant/tensorflow | e1a514aa012476dbf40b1a4f9ea004a2f259eff5 | [
"MIT"
] | null | null | null | textprocessing/textprocessor.py | Orthant/tensorflow | e1a514aa012476dbf40b1a4f9ea004a2f259eff5 | [
"MIT"
] | null | null | null | # An improvement on the textprocessor.py provided by tflearn
# as an example. This adds more summaries to the Tensorboard
# such as:
# "Text" : Copy of the outputted generated text for
# keeping track of the progress of learning.
#
# "Beholder" : This feature
#
# "Projector" : So you can p... | 35.08 | 98 | 0.676169 |
71e4849af5c81cb0ddf28965d5f003a7172a4567 | 1,230 | py | Python | RevIP-main/RevIp-termux.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | RevIP-main/RevIp-termux.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | RevIP-main/RevIp-termux.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | # -*- coding: utf-8 -*-
#!usr/bin/python
import requests, json
from multiprocessing.dummy import Pool as ThreadPool
from colorama import Fore, init, Style
init(autoreset=True)
def cut(text='',leng=False):
if leng == False:
ret = text
else:
length_string = len(text)
if length_string > le... | 31.538462 | 118 | 0.578049 |
e0b0efec8fc5c90126fe004243f616949acfbc75 | 3,821 | py | Python | tests/onegov/org/test_views_settings.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/org/test_views_settings.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/org/test_views_settings.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.org.theme.org_theme import HELVETICA
def test_settings(client):
assert client.get('/general-settings', expect_errors=True)\
.status_code == 403
client.login_admin()
# general settings
settings = client.get('/general-settings')
assert client.app.font_family is None
docume... | 32.381356 | 77 | 0.669458 |
1c6a2ab7d7a266da01549f2ef4281a3b9cfc0e14 | 1,868 | pyde | Python | sketches/paletten2/paletten2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/paletten2/paletten2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/paletten2/paletten2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | """
Paletten aus vapeplot, dem Waporwave-Projekt für die
Matplotlib von Danny Antaki
https://github.com/dantaki/vapeplot
"""
vaporwave = ["#94d0ff", "#8795e8", "#966bff", "#ad8cff",
"#c774e8", "#c774a9", "#ff6ad5", "#ff6a8b",
"#ff8b8b", "#ffa58b", "#ffde8b", "#cdde8b",
... | 29.1875 | 59 | 0.470557 |
c73b7d84c9b182a6f8c47b51d5d1b5166cc2f99b | 580 | py | Python | assignments/ps7-template/short_company.py | tallamjr/mit-6006 | c2aa6bb48edef5800c0779ba2eebd697d44249b5 | [
"MIT"
] | 1 | 2022-02-26T13:52:31.000Z | 2022-02-26T13:52:31.000Z | assignments/ps7-template/short_company.py | tallamjr/mit-6006 | c2aa6bb48edef5800c0779ba2eebd697d44249b5 | [
"MIT"
] | null | null | null | assignments/ps7-template/short_company.py | tallamjr/mit-6006 | c2aa6bb48edef5800c0779ba2eebd697d44249b5 | [
"MIT"
] | null | null | null | def short_company(C, P, n, k):
'''
Input: C | Tuple of s = |C| strings representing names of companies
P | Tuple of s lists each of size nk representing prices
n | Number of days of price information
k | Number of prices in one day
Output: c | Name of a company with high... | 34.117647 | 72 | 0.537931 |
c7b89976ffde267af9976f62387588be47658414 | 228 | py | Python | myscrumy/ajibadeolufemi94scrumy/admin.py | Justfemi/Nameless | 239a44fd571d10d55a80a787ee865714c41552fa | [
"MIT"
] | null | null | null | myscrumy/ajibadeolufemi94scrumy/admin.py | Justfemi/Nameless | 239a44fd571d10d55a80a787ee865714c41552fa | [
"MIT"
] | null | null | null | myscrumy/ajibadeolufemi94scrumy/admin.py | Justfemi/Nameless | 239a44fd571d10d55a80a787ee865714c41552fa | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import GoalStatus, ScrumyGoals, ScrumyHistory
# Register your models here.
admin.site.register( GoalStatus )
admin.site.register( ScrumyGoals )
admin.site.register( ScrumyHistory )
| 28.5 | 58 | 0.811404 |
402404bdf0d047368e5e21429fb6b16985e5d777 | 280 | py | Python | exercises/pt/exc_02_02_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/pt/exc_02_02_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/pt/exc_02_02_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | from spacy.lang.en import English
nlp = English()
doc = nlp("I have a cat")
# Consulte o código hash da palavra "cat"
cat_hash = ____.____.____[____]
print(cat_hash)
# Agora consulte o cat_hash para obter a palavra novamente
cat_string = ____.____.____[____]
print(cat_string)
| 21.538462 | 58 | 0.75 |
90b9fcf96657c922efad883f7afedb09a979dbda | 1,262 | py | Python | profil/migrations/0002_auto_20171119_1646.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | profil/migrations/0002_auto_20171119_1646.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | 14 | 2018-09-12T06:59:55.000Z | 2020-02-26T07:17:48.000Z | profil/migrations/0002_auto_20171119_1646.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-11-19 15:46
from __future__ import unicode_literals
import django.contrib.auth.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('profil', '0001_initial'),
]
operations = [
... | 39.4375 | 317 | 0.63233 |
469c8bde5c5fb3b2daf04efebf8a29c9dde2f531 | 5,005 | py | Python | cgi-bin/servos.py | joecrop/SDMO | c9b5a2bcdd861f87e1470e012e9e882b51587dc6 | [
"MIT"
] | 1 | 2018-12-19T18:10:11.000Z | 2018-12-19T18:10:11.000Z | cgi-bin/servos.py | joecrop/SDMO | c9b5a2bcdd861f87e1470e012e9e882b51587dc6 | [
"MIT"
] | 1 | 2021-09-21T05:22:24.000Z | 2021-09-21T05:22:24.000Z | cgi-bin/servos.py | joecrop/SDMO | c9b5a2bcdd861f87e1470e012e9e882b51587dc6 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
import argparse
from Adafruit_PWM_Servo_Driver import PWM
import time
import RPi.GPIO as GPIO
#import pigpio
# ===========================================================================
# Example Code
# ===========================================================================
# Initia... | 21.118143 | 77 | 0.596204 |
46a6f0b85c0ce4605539385c2e9c9d37cd326836 | 10,847 | py | Python | story.py | theFox6/HPIMysterybot | 187341ff8fca4a683cc052c813f9cf1fe71117db | [
"MIT"
] | null | null | null | story.py | theFox6/HPIMysterybot | 187341ff8fca4a683cc052c813f9cf1fe71117db | [
"MIT"
] | null | null | null | story.py | theFox6/HPIMysterybot | 187341ff8fca4a683cc052c813f9cf1fe71117db | [
"MIT"
] | null | null | null | from telegram.ext import ConversationHandler, CommandHandler, MessageHandler, Filters
from telegram import ReplyKeyboardMarkup, ReplyKeyboardRemove, KeyboardButton, Location, ChatAction
from threading import Timer
import users, hints, math, logging
GETNAME, START, QUEST1, QUEST2, QUEST3, QUEST4, QUEST5, QUEST6, QUEST7... | 46.553648 | 155 | 0.691989 |
d3d0e332cfd06524549349234a754eb342f325dc | 389 | py | Python | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOtree.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 3 | 2019-06-18T15:28:09.000Z | 2019-07-11T07:31:45.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOtree.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 2 | 2019-07-11T14:03:25.000Z | 2021-02-08T16:14:04.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOtree.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 1 | 2019-06-12T11:07:37.000Z | 2019-06-12T11:07:37.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
def run(id, gtotool, config, debug):
try:
node =config['node']
expand = config.get('expand',False)
selected = config.get('select',True)
execute = config.get('execute', True)
gtotool.gtomain.runNode(node,expand,selected,execute)
... | 29.923077 | 61 | 0.601542 |
31998d91cfd8ebc5a1c6b26b0191581c8a92c5c0 | 377 | py | Python | exercises/de/solution_02_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/de/solution_02_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/de/solution_02_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
nlp = spacy.load("de_core_news_sm")
doc = nlp("Berlin gefällt mir sehr gut")
# Iteriere über die Tokens
for token in doc:
# Teste, ob der aktuelle Token ein Eigenname ist
if token.pos_ == "PROPN":
# Teste, ob der nächste Token ein Verb ist
if doc[token.i + 1].pos_ == "VERB":
... | 29 | 61 | 0.649867 |
9ee494e97443f1e1aa6b2809d34c81440154248f | 2,674 | py | Python | ListenUp/core/songs.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | ListenUp/core/songs.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | ListenUp/core/songs.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | from typing import Any, Iterable, Tuple
from api import music
from api.text_to_speech import AudioDownloader
from util import io
from util.annotations import override
from util.namedtuple_factory import register_namedtuple
from util.tupleable import Tupleable
@register_namedtuple
class Song(Tupleable, AudioDownloade... | 28.752688 | 82 | 0.581526 |
82b7401ea99715540fc47f53d1a53159790b3e3b | 6,434 | py | Python | Packs/ThreatGrid/Integrations/FeedCiscoSecureMalwareAnalytics/test_data/feed_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ThreatGrid/Integrations/FeedCiscoSecureMalwareAnalytics/test_data/feed_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ThreatGrid/Integrations/FeedCiscoSecureMalwareAnalytics/test_data/feed_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | banking_dns_response = [
{
"description": "DNS response information for domains queried by samples contacting sinkholed IP addresses.",
"ips": [
"1.1.1.1"
],
"sample_md5": "abc1",
"sample": "https://panacea.threatgrid.com/feeds/sinkholed-ip-dns/samples/",
... | 39.962733 | 116 | 0.582375 |
7d86d968491e75087931454ebcd5788aa9d0f98d | 1,088 | py | Python | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-matplotlib-subplots.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-matplotlib-subplots.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-matplotlib-subplots.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
CS231n Convolutional Neural Networks for Visual Recognition
http://cs231n.github.io/
Python Numpy Tutorial
http://cs231n.github.io/python-numpy-tutorial/
matplotlib
https://matplotlib.org/
 ̄
We will highlight some parts of SciPy that you might find useful for this c... | 24.177778 | 80 | 0.725184 |
8150300446161b5d23fa14e997a094a9ff19ad55 | 2,937 | py | Python | tests/cli/conftest.py | techBeck03/rasa | 72fef6e7742f5ccb8614c75b6410dff68f137554 | [
"Apache-2.0"
] | 2 | 2020-02-27T16:41:52.000Z | 2020-02-27T16:41:57.000Z | tests/cli/conftest.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 56 | 2020-06-09T00:16:14.000Z | 2020-11-16T00:25:20.000Z | tests/cli/conftest.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 3 | 2019-02-27T10:13:16.000Z | 2019-07-26T08:33:45.000Z | import shutil
from subprocess import check_call
from _pytest.tmpdir import TempdirFactory
from typing import Callable
import pytest
import shutil
import os
from _pytest.pytester import Testdir, RunResult
from rasa.utils.io import write_yaml_file
@pytest.fixture
def run(testdir: Testdir) -> Callable[..., RunResult]... | 28.240385 | 88 | 0.661219 |
4812971aceec045aabfbd670060268775bc38f33 | 37,177 | py | Python | examples/information_extraction/DuUIE/uie/evaluation/sel2record.py | AI-Mart/PaddleNLP | 0ababea960427e8b70220ea06d908ed58cbed0ed | [
"Apache-2.0"
] | null | null | null | examples/information_extraction/DuUIE/uie/evaluation/sel2record.py | AI-Mart/PaddleNLP | 0ababea960427e8b70220ea06d908ed58cbed0ed | [
"Apache-2.0"
] | null | null | null | examples/information_extraction/DuUIE/uie/evaluation/sel2record.py | AI-Mart/PaddleNLP | 0ababea960427e8b70220ea06d908ed58cbed0ed | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
from typing import Tuple, List, Dict
from collections import defaultdict, OrderedDict, Counter
import os
import numpy
import logging
import re
import json
from nltk.tree import ParentedTree
from uie.evaluation.constants import (span_start, type_start, type_end,
... | 33.105076 | 107 | 0.564489 |
4878d2218f48507dde97cd3ed60fef299d960979 | 1,226 | py | Python | post/count_freqItems.py | PAULUAPAUL/MasterThesis_AssociationRulesBiodiversity | 0855abc5ec4835a28be4aa305e5e45e73297b389 | [
"MIT"
] | null | null | null | post/count_freqItems.py | PAULUAPAUL/MasterThesis_AssociationRulesBiodiversity | 0855abc5ec4835a28be4aa305e5e45e73297b389 | [
"MIT"
] | null | null | null | post/count_freqItems.py | PAULUAPAUL/MasterThesis_AssociationRulesBiodiversity | 0855abc5ec4835a28be4aa305e5e45e73297b389 | [
"MIT"
] | null | null | null | import csv
from collections import Counter
from collections import defaultdict
import os
words_freq=[]
path=r"C:\Users\Paul\Documents\Studium_PP\Master\Masterarbeit\Gitlab\master-thesis-data-mining\student_work\Code\data\FP-Growth_0.1"
for file in os.listdir(path):
if file.endswith("_freq.csv"):
... | 29.902439 | 133 | 0.620718 |
9655a0e8749419470d162c424cbe5a993fcd8135 | 861 | py | Python | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_09_Ein_und_Ausgabe/04_chapter_09_repetition_task_2_print_format.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_09_Ein_und_Ausgabe/04_chapter_09_repetition_task_2_print_format.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_09_Ein_und_Ausgabe/04_chapter_09_repetition_task_2_print_format.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: 04_chapter_09_repetition_task_2.py
# Project: Kapitel_09_Ein_und_Ausgabe
# Created Date: Sunday 10.03.2019, 15:04
# Author: Apop85
# -----
# Last Modified: Sunday 10.03.2019, 15:12
# -----
# Copyright (c) 2019 Apop85
# This software is published under the MIT li... | 26.90625 | 80 | 0.665505 |
73a93b038f353f96b5751e3ed2b3274df49067fc | 828 | py | Python | src/bo4e/enum/nnrechnungstyp.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/enum/nnrechnungstyp.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/enum/nnrechnungstyp.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | # pylint: disable=missing-module-docstring
from bo4e.enum.strenum import StrEnum
class NNRechnungstyp(StrEnum):
"""
Abbildung verschiedener in der INVOIC angegebenen Rechnungstypen.
"""
ABSCHLUSSRECHNUNG = "ABSCHLUSSRECHNUNG" #: ABSCHLUSSRECHNUNG
ABSCHLAGSRECHNUNG = "ABSCHLAGSRECHNUNG" #: ABSCH... | 43.578947 | 92 | 0.77657 |
fb6d33c0f26d724a626f0683d8683c4cc9b55573 | 407 | py | Python | scripts/python/poster.py | clobee/cl00b3e.github.io | 5b590f68451568837a60152bb7c33d37b6371e53 | [
"MIT"
] | null | null | null | scripts/python/poster.py | clobee/cl00b3e.github.io | 5b590f68451568837a60152bb7c33d37b6371e53 | [
"MIT"
] | null | null | null | scripts/python/poster.py | clobee/cl00b3e.github.io | 5b590f68451568837a60152bb7c33d37b6371e53 | [
"MIT"
] | null | null | null | import base64
import requests
headers = {}
cmd = sys.argv[1]
# Standard Base64 Encoding
encodedBytes = base64.b64encode(cmd.encode("utf-8"))
encodedCmd = str(encodedBytes, "utf-8")
payload = {
'pinger': '|`echo "' + encodedCmd + '" | base64 -d`',
'submitt': 'Submit+Query'
}
print(payload)
r = requests.post(
"ht... | 16.28 | 54 | 0.675676 |
541e92bc3336616afdde2ed652c48813d3f0811a | 874 | py | Python | Contrib-Microsoft/Olympus_rack_manager/python-ocs/ocscli/loadconfig.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/ocscli/loadconfig.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/ocscli/loadconfig.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.
import Con... | 30.137931 | 69 | 0.681922 |
4d341f15d4292ba6b108a52589648160cc7c04a3 | 143 | py | Python | hardware/chip/rtl872xd/hal/hal_test/i2c/ucube.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | 4,538 | 2017-10-20T05:19:03.000Z | 2022-03-30T02:29:30.000Z | hardware/chip/rtl872xd/hal/hal_test/i2c/ucube.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | 1,088 | 2017-10-21T07:57:22.000Z | 2022-03-31T08:15:49.000Z | hardware/chip/rtl872xd/hal/hal_test/i2c/ucube.py | willianchanlovegithub/AliOS-Things | 637c0802cab667b872d3b97a121e18c66f256eab | [
"Apache-2.0"
] | 1,860 | 2017-10-20T05:22:35.000Z | 2022-03-27T10:54:14.000Z | src = Split('''
i2c_test.c
''')
component = aos_component('i2c_test', src)
component.add_cflags('-Wall')
component.add_cflags('-Werror')
| 15.888889 | 42 | 0.685315 |
4d57dc1eaa1970609539ae722496dfe6a9fb4fe6 | 2,926 | py | Python | main.py | nasfarley88/notstackoverflowbot | bdaa4e1e8616a2a3b55a8177316f0ca5233d499a | [
"CC0-1.0"
] | null | null | null | main.py | nasfarley88/notstackoverflowbot | bdaa4e1e8616a2a3b55a8177316f0ca5233d499a | [
"CC0-1.0"
] | null | null | null | main.py | nasfarley88/notstackoverflowbot | bdaa4e1e8616a2a3b55a8177316f0ca5233d499a | [
"CC0-1.0"
] | null | null | null | import sys
import asyncio
import telepot
from telepot.async.delegate import per_chat_id, create_open
from telepot.namedtuple import InlineKeyboardMarkup, InlineKeyboardButton
from telepot.namedtuple import InlineQueryResultArticle, InlineQueryResultPhoto, InputTextMessageContent
import dataset
import pickle
import st... | 30.8 | 119 | 0.65311 |
4d99e60e87dc8b0cc591cd2c5d16f89198bd6e77 | 1,367 | py | Python | SBTK_League_Helper/src/script_msg_log.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/src/script_msg_log.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/src/script_msg_log.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | from src.tools.strings import make_printable
from time import perf_counter, sleep
log_entries = 0
old_print = print
def log_entry(*args):
# For now, just printing (and dumbed down for CMD, just in case)
global log_entries
log_entries += 1
old_print("%d: @%d" % (log_entries, 1000*perf_counter()), end=... | 28.479167 | 70 | 0.509144 |
4deee3d56548386a83ea59dfbf77de26130c178f | 3,512 | py | Python | content/labs/lab10/functions/tree_pd.py | tteenathankachan/2021-CS109A | 9349749539f439deff280ceb25621fc61a337253 | [
"MIT"
] | 19 | 2021-08-29T21:23:48.000Z | 2022-03-16T14:38:25.000Z | content/labs/lab10/functions/tree_pd.py | SBalas/2021-CS109A | 0f57c3d80b7cef99d660f6a77c0166cffc1253e8 | [
"MIT"
] | null | null | null | content/labs/lab10/functions/tree_pd.py | SBalas/2021-CS109A | 0f57c3d80b7cef99d660f6a77c0166cffc1253e8 | [
"MIT"
] | 22 | 2021-09-01T13:03:05.000Z | 2022-03-31T14:34:36.000Z | import numpy as np
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
import sklearn.metrics as metrics
from sklearn.model_selection import cross_val_score
from sklearn.metrics import accuracy_score
from sklearn import tree
from sklearn.tree import DecisionTreeClassifier
from sk... | 35.474747 | 121 | 0.667995 |
428bf924b3189487a58adb650dd147e8255ca5c6 | 794 | py | Python | tut1/prefix-parser.py | benediktg/Funktionale-Programmierung | dcf9f3df0042ba9c4fc171b6981ce29ac72a78ae | [
"MIT"
] | null | null | null | tut1/prefix-parser.py | benediktg/Funktionale-Programmierung | dcf9f3df0042ba9c4fc171b6981ce29ac72a78ae | [
"MIT"
] | null | null | null | tut1/prefix-parser.py | benediktg/Funktionale-Programmierung | dcf9f3df0042ba9c4fc171b6981ce29ac72a78ae | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
def parse_expression(expression, index=0):
a = 0
b = 0
c = expression[index]
index += 1
if c in "0123456789":
return (int(c), index)
elif c in "+-*/":
a, index = parse_expression(expression, index)
b, index = parse_expression(expressio... | 20.894737 | 54 | 0.537783 |
db331550b2c18544d8866aacc603fdcf8c452c8c | 287 | py | Python | rasa/__init__.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 30 | 2020-11-30T12:55:45.000Z | 2022-01-20T02:53:03.000Z | rasa/__init__.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 209 | 2020-03-18T18:28:12.000Z | 2022-03-01T13:42:29.000Z | rasa/__init__.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 10 | 2021-01-11T02:08:43.000Z | 2021-11-19T09:12:46.000Z | import logging
from rasa import version
# define the version before the other imports since these need it
__version__ = version.__version__
from rasa.run import run
from rasa.train import train
from rasa.test import test
logging.getLogger(__name__).addHandler(logging.NullHandler())
| 22.076923 | 65 | 0.815331 |
58ed2865304579059de6d7d2ef288f5392ba7a01 | 561 | py | Python | progress-eze-053/project-8.py | cornelia247/cil-internship-cohort-01 | b8184337056d378eab16d26b40b26ed58cd177bb | [
"MIT"
] | null | null | null | progress-eze-053/project-8.py | cornelia247/cil-internship-cohort-01 | b8184337056d378eab16d26b40b26ed58cd177bb | [
"MIT"
] | null | null | null | progress-eze-053/project-8.py | cornelia247/cil-internship-cohort-01 | b8184337056d378eab16d26b40b26ed58cd177bb | [
"MIT"
] | null | null | null | # Simple function to copy and resize a jpg file
# function to copy and resize images
import shutil, os
from PIL import Image
def copy_and_resize_image(width, height):
# picture should be in current directory, include file path if not
# copy image
shutil.copy('001.jpg')
# open an image
img = Image.open("... | 29.526316 | 77 | 0.73975 |
36e02137f77a484298a78094d2041b82b06a6535 | 268 | py | Python | server/plugins/base.py | mattlokes/eink_frame | 99b2f57c549bef1c219e12a9a8efe7473748a003 | [
"MIT"
] | null | null | null | server/plugins/base.py | mattlokes/eink_frame | 99b2f57c549bef1c219e12a9a8efe7473748a003 | [
"MIT"
] | null | null | null | server/plugins/base.py | mattlokes/eink_frame | 99b2f57c549bef1c219e12a9a8efe7473748a003 | [
"MIT"
] | null | null | null |
class PluginException(Exception):
pass
class Plugin():
def __init__(self, opts={}):
self.__opts__ = opts
class PluginPhotoSource(Plugin):
@property
def photos(self):
assert False, "Virtual Property 'photos' needs overriding to use!"
| 20.615385 | 74 | 0.671642 |
3d33b7fae6985e484fdc4406ccca0cca804dd012 | 5,122 | py | Python | 20-fs-ias-lec/groups/07-logStore/src/tests/test_kotlin_connection.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/07-logStore/src/tests/test_kotlin_connection.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/07-logStore/src/tests/test_kotlin_connection.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | import hashlib # Comes with python
import secrets # Comes with python
from nacl.signing import SigningKey
from testfixtures import LogCapture
import os
from ..logStore.funcs.event import Content, Event, Meta
from ..logStore.appconn.kotlin_connection import KotlinFunction
def test_get_kotlin_event():
try:
... | 47.869159 | 101 | 0.583366 |
3d445535f7e3443198a095bf39a82a0c6d772f1e | 6,601 | py | Python | src/onegov/org/forms/form_registration.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/forms/form_registration.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/forms/form_registration.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from cached_property import cached_property
from onegov.form import Form, FormDefinition
from onegov.form.fields import MultiCheckboxField
from onegov.org import _
from wtforms.fields import BooleanField, RadioField, TextAreaField
from wtforms.fields.html5 import DateField, IntegerField
from wtforms.validators import N... | 33.678571 | 79 | 0.584154 |
62c9f452a1910888dfef5e9b27cd0189f1b028c7 | 181 | py | Python | test.py | rusty1s/tensorflow-graph-plugin | 2282888e74ab59c288d329c426a80f735c5163a1 | [
"MIT"
] | null | null | null | test.py | rusty1s/tensorflow-graph-plugin | 2282888e74ab59c288d329c426a80f735c5163a1 | [
"MIT"
] | null | null | null | test.py | rusty1s/tensorflow-graph-plugin | 2282888e74ab59c288d329c426a80f735c5163a1 | [
"MIT"
] | null | null | null | import tensorflow as tf
from sparse_ops import sparse_subtract
a = tf.SparseTensorValue(indices=[[0, 0]])
b = tf.SparseTensorValue(indices=[[0, 0], [1, 1], [2, 2]])
print('hihi')
| 22.625 | 58 | 0.696133 |
c56c8848e5f0f573c1a3f9aaa72caf1893bcc76b | 1,054 | pyde | Python | sketches/sierpinskiKurveLS/sierpinskiKurveLS.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/sierpinskiKurveLS/sierpinskiKurveLS.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/sierpinskiKurveLS/sierpinskiKurveLS.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | iterations = 7
stroke_len = 400
delta = radians(60)
axiom = 'G'
sentence = axiom
rules = {
'F': 'G-F-G',
'G': 'F+G+F',
}
def setup():
global x0, y0
size(500, 440)
this.surface.setTitle("Sierpinski-Kurve (mittels L-System)")
x0, y0 = 230, height - 140
strokeWeight(2)
noFill()
generat... | 20.666667 | 64 | 0.519924 |
628a22365745d1fedc90fdf65281111ce16b88e4 | 1,371 | py | Python | src/test/tests/simulation/multiblock.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/multiblock.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/multiblock.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: multiblock.py
#
# Tests: libsim - connecting to simulation and retrieving data from it.
# mesh - 2D structured mesh.
# scalars
# domain boundaries
#
# Progr... | 24.482143 | 78 | 0.582786 |
02b17be600604e86d1580377fd6ec5e98eb2aaf1 | 1,160 | py | Python | 7_DeepLearning-GANs/01_GAN/Generator.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 7_DeepLearning-GANs/01_GAN/Generator.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 7_DeepLearning-GANs/01_GAN/Generator.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | '''
Generator - generiert die Daten bzw. das Bild
'''
from tensorflow.keras.models import Sequential, Model
from tensorflow.keras.layers import *
from tensorflow.keras.optimizers import *
import numpy as np
def build_generator(z_dimension, img_shape):
model = Sequential()
# Hidden Layer 1
model.add(Dense... | 35.151515 | 115 | 0.706034 |
a23ffbd84c6b4f368837225fdeade94a80890ceb | 2,362 | py | Python | tools/tag_generator.py | codegleaner/codegleaner.github.io | d1c8fcd543405be6a372524619d8ce6ec80c02ea | [
"BSD-3-Clause"
] | null | null | null | tools/tag_generator.py | codegleaner/codegleaner.github.io | d1c8fcd543405be6a372524619d8ce6ec80c02ea | [
"BSD-3-Clause"
] | null | null | null | tools/tag_generator.py | codegleaner/codegleaner.github.io | d1c8fcd543405be6a372524619d8ce6ec80c02ea | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Released under MIT License
# Copyright (c) 2013 Mark Otto.
#
# 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 ... | 37.492063 | 462 | 0.680356 |
38f82a972df37eab806580446b43ab9bfec10dda | 7,060 | py | Python | vim/vim-denite-codesearch/rplugin/python3/denite/source/cached_code_search.py | username4gh/dotfiles | 6ab3e6a7eecb82f01fadfa40a961164df34af091 | [
"Unlicense"
] | 5 | 2017-04-18T20:21:06.000Z | 2020-12-28T05:44:39.000Z | vim/vim-denite-codesearch/rplugin/python3/denite/source/cached_code_search.py | username4gh/dotfiles | 6ab3e6a7eecb82f01fadfa40a961164df34af091 | [
"Unlicense"
] | 35 | 2016-09-21T18:04:51.000Z | 2020-03-11T02:39:20.000Z | vim/vim-denite-codesearch/rplugin/python3/denite/source/cached_code_search.py | username4gh/dotfiles | 6ab3e6a7eecb82f01fadfa40a961164df34af091 | [
"Unlicense"
] | 2 | 2018-12-17T03:16:35.000Z | 2020-10-18T10:09:01.000Z | import shlex
import typing
from os.path import relpath
from denite import util, process
from denite.base.source import Base
from denite.util import Nvim, UserContext, Candidates, Candidate
HEADER_SYNTAX = (
'syntax match deniteSource_Header '
r'/\v[^:]*:\d+(:\d+)? / '
'contained keepend')
FIL... | 36.020408 | 120 | 0.540368 |
ac48617ed170ce0f13e86afc01e49b42a1bb361e | 466 | py | Python | scripts/1.0 quality-checking/1.4 qual_file_checking.py | astrdhr/BIOC3301-repo | 49afb6b545ef93348bddc3c35ebb15923d080ac2 | [
"MIT"
] | 1 | 2021-04-29T19:24:55.000Z | 2021-04-29T19:24:55.000Z | scripts/1.0 quality-checking/1.4 qual_file_checking.py | astrdhr/BIOC3301-repo | 49afb6b545ef93348bddc3c35ebb15923d080ac2 | [
"MIT"
] | null | null | null | scripts/1.0 quality-checking/1.4 qual_file_checking.py | astrdhr/BIOC3301-repo | 49afb6b545ef93348bddc3c35ebb15923d080ac2 | [
"MIT"
] | null | null | null | def main():
filename=input("This program finds lines of letters in qual files (remember to put the filename in quotes):")
infile=open(filename,'r')
linelist=[]
for x, line in enumerate(infile,1):
if line[0].isalpha()==True:
li... | 42.363636 | 118 | 0.562232 |
3bee826e28b1eb62c3d0c1f896e68a2be4ea573c | 20,216 | py | Python | Packs/CounterCraft/Integrations/CounterCraft/CounterCraft_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CounterCraft/Integrations/CounterCraft/CounterCraft_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CounterCraft/Integrations/CounterCraft/CounterCraft_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
import demistomock as demisto
from CommonServerPython import formatEpochDate
SERVER_URL = "https://1.2.3.4"
@pytest.fixture(autouse=True)
def get_params(requests_mock, mocker):
mocker.patch.object(
demisto,
"params",
return_value={
"server": SERVER_URL,
... | 32.553945 | 124 | 0.569252 |
ce4738e3bf9242544b181965628a2d903ede52cc | 601 | py | Python | ___Python/Thomas/pycurs_180625/p03_lamda/m05_filtern.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Thomas/pycurs_180625/p03_lamda/m05_filtern.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Thomas/pycurs_180625/p03_lamda/m05_filtern.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | temp_celsius = [0.7, 2.1, 4.2, 8.2, 12.5, 15.6, 16.9, 16.3, 13.6, 9.5, 4.6, 2.3] #Durschnittstemperaturen Bielefeld
# Funktion
# def mindestens15(temperatur):
# return temperatur >=15 # Boolean temp>=15 -> TRUE
# umgewandelt in lambda
# mindestens15 = lambda temperatur: temperatur >= 15
def zwischen5und... | 40.066667 | 116 | 0.705491 |
0b9886307cd399da5b1d10d968501b5342a8386a | 1,365 | py | Python | flask/microblog-webform/app/main/views.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | flask/microblog-webform/app/main/views.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | 2 | 2021-03-25T22:00:07.000Z | 2022-01-20T15:51:48.000Z | flask/microblog-webform/app/main/views.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from flask import render_template, session, redirect, url_for, request, make_response, flash
from . import main
from app.main.forms import LoginForm
'''
reference doc:
https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-iii-web-forms
https://www.cnblogs.com/jsben/p/4909964.html
h... | 29.042553 | 92 | 0.624908 |
e7f598b2358d3ddcd8da6b3b2e612ed470dab4a6 | 1,801 | py | Python | showcase4/com/aaron/shutilexample.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | showcase4/com/aaron/shutilexample.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | 2 | 2021-03-25T22:00:07.000Z | 2022-01-20T15:51:48.000Z | showcase4/com/aaron/shutilexample.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | # -*- codiing:utf-8 -*-
"""
shutil example
shutil 是 Python 中的高级文件操作模块。
"""
__author__="aaron.qiu"
import pprint
import os,shutil
def shutil_showcase():
with open("test.file", "w") as f:
pass
print("test.file" in os.listdir(os.curdir))
def shutil_copy_showcase():
"""
shutil.copy(src, dst) 将源文件... | 23.697368 | 62 | 0.655747 |
6533d8a3f519a8983b134a0e49481920fdb5c54c | 6,247 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/minimize.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/minimize.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/minimize.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | #!/usr/bin/env python
# Author : Pierre Schnizer
"""
Wrapper over the functions as described in Chapter 32 of the
reference manual.
Routines for finding the minimum of a function of one variable.
Example: searching for pi using brent:
m = 2.0
a = 0.0
b = 6.0
def fn1(x, params):
return cos(x) + 1.0
self.sys ... | 34.324176 | 76 | 0.659036 |
3315acc896f5e5129ec60cfc33ff08c130a0899f | 562 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v6_4/make_image_thumbnail.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v6_4/make_image_thumbnail.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v6_4/make_image_thumbnail.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | from __future__ import print_function
import frappe
def execute():
frappe.reload_doctype("File")
frappe.reload_doctype("Item")
for item in frappe.get_all("Item", fields=("name", "website_image", "thumbnail")):
if item.website_image and not item.thumbnail:
item_doc = frappe.get_doc("Item", item.name)
try:
... | 35.125 | 88 | 0.738434 |
333f2ac913d2b3c0c7ecdc42a12b0eb28a70f311 | 1,130 | py | Python | AutosClasificados/core/models.py | joaquinpunales1992/Python-Django-WatsonVisualRecognition-WatsonNLU | 2997359150236a7d897a3f9201f8e9404f3d7f02 | [
"MIT"
] | null | null | null | AutosClasificados/core/models.py | joaquinpunales1992/Python-Django-WatsonVisualRecognition-WatsonNLU | 2997359150236a7d897a3f9201f8e9404f3d7f02 | [
"MIT"
] | null | null | null | AutosClasificados/core/models.py | joaquinpunales1992/Python-Django-WatsonVisualRecognition-WatsonNLU | 2997359150236a7d897a3f9201f8e9404f3d7f02 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
class Articulo(models.Model):
titulo = models.CharField(max_length=50, blank=True)
BMW = 'bmw'
CHEVROLET = 'chevrolet'
FORD = 'ford'
NISSAN = 'nissan'
VOLKSWAGEN = 'volkswagen'
marca_opciones = (
(BMW, 'BMW... | 33.235294 | 95 | 0.676106 |
33581f591cbb51895c1cefb9854496cd078849eb | 94 | py | Python | Python/Courses/Crash-Course-on-Python.Google/week-2-Basic-Python-Syntax/03-Explicit-conversion.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Crash-Course-on-Python.Google/week-2-Basic-Python-Syntax/03-Explicit-conversion.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Crash-Course-on-Python.Google/week-2-Basic-Python-Syntax/03-Explicit-conversion.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | base = 6
height = 3
area = (base * height) / 2
print("The area of triangle is: " + str(area))
| 18.8 | 46 | 0.617021 |
a87c78677ab0296590bfae6ada616f161566b9b4 | 8,863 | py | Python | scripts/simultaneous_fit.py | puv13/nspt-scripts | bba4c794858f34894adc2f82fd530ed5ff52f691 | [
"MIT"
] | null | null | null | scripts/simultaneous_fit.py | puv13/nspt-scripts | bba4c794858f34894adc2f82fd530ed5ff52f691 | [
"MIT"
] | null | null | null | scripts/simultaneous_fit.py | puv13/nspt-scripts | bba4c794858f34894adc2f82fd530ed5ff52f691 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This module defines a function for simultaneous fits to several
data sets.
The fit function can be the same for all data sets or a different
function for every data set. The important point is that all the
functions have to depend on the same set of... | 29.543333 | 80 | 0.471736 |
4f110eb78e616c2bd38e9196549808d13e3e9465 | 2,905 | py | Python | bior_annotate/2.1.1/annotate/scripts/new_PED_and_add_genotype.py | osallou/containers | d0904fb36ddef80c6e856af5d7bbb818b2b2564a | [
"Apache-2.0"
] | 1 | 2019-07-24T17:29:22.000Z | 2019-07-24T17:29:22.000Z | bior_annotate/2.1.1/annotate/scripts/new_PED_and_add_genotype.py | osallou/containers | d0904fb36ddef80c6e856af5d7bbb818b2b2564a | [
"Apache-2.0"
] | null | null | null | bior_annotate/2.1.1/annotate/scripts/new_PED_and_add_genotype.py | osallou/containers | d0904fb36ddef80c6e856af5d7bbb818b2b2564a | [
"Apache-2.0"
] | null | null | null | ###################################################################################################
## Usage- python new_PED_and_add_genotype.py old_PED_file.txt new_PED_file.txt phased_three_sample_VCF.vcf Updated_with_genotype.vcf
## old_PED_file.txt - PED file with 6 samples(two trio families)
## new_PED_file.txt -... | 43.358209 | 132 | 0.591738 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.