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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d18c7869a9ee4d7cdf081a74c4a11dfbf68c91c3 | 769 | py | Python | _search/server/parseutil.py | NicoKiaru/imagej.github.io | e334937e361f1aa0ad45cf46ba5c8fadfc32be28 | [
"CC-BY-3.0"
] | 16 | 2020-08-03T20:08:00.000Z | 2022-03-02T15:50:47.000Z | _search/server/parseutil.py | NicoKiaru/imagej.github.io | e334937e361f1aa0ad45cf46ba5c8fadfc32be28 | [
"CC-BY-3.0"
] | 196 | 2015-09-14T19:15:07.000Z | 2022-03-31T02:22:39.000Z | _search/server/parseutil.py | NicoKiaru/imagej.github.io | e334937e361f1aa0ad45cf46ba5c8fadfc32be28 | [
"CC-BY-3.0"
] | 60 | 2020-06-04T14:18:37.000Z | 2022-03-30T23:10:55.000Z | #!/bin/env python
import re
def first_sentence(lines):
def good(line):
if line.startswith('#'): return False # ignore headers
if re.match('^[=-]+$', line): return False # ignore section dividers
return True
s = ''.join(line for line in lines if good(line))
s = re.sub('<[^>]*... | 36.619048 | 79 | 0.449935 |
8891b4ae92c741489ab522bb6a12de2ff74ca04d | 8,347 | py | Python | checklisten/migrations/0001_initial.py | mribrgr/StuRa-Mitgliederdatenbank | 87a261d66c279ff86056e315b05e6966b79df9fa | [
"MIT"
] | 8 | 2019-11-26T13:34:46.000Z | 2021-06-21T13:41:57.000Z | src/checklisten/migrations/0001_initial.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 93 | 2019-12-16T09:29:10.000Z | 2021-04-24T12:03:33.000Z | src/checklisten/migrations/0001_initial.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 2 | 2020-12-03T12:43:19.000Z | 2020-12-22T21:48:47.000Z | # Generated by Django 3.0.8 on 2020-08-13 15:51
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import simple_history.models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUT... | 56.782313 | 189 | 0.597101 |
ee3d68ab2f3d7bb3b8e2f855621da2fbc2f82edb | 316 | py | Python | Backend/src/awattprice/types.py | olivaresf/AWattPrice | db50930a016a4263638af64704d3233cc27e142b | [
"BSD-3-Clause"
] | 8 | 2020-10-22T14:47:54.000Z | 2022-01-23T20:17:51.000Z | v1_backend/src/v1_awattprice/types.py | sp4c38/AwattarApp | b914e8042e5cdcb84485d6d45133a00244662bda | [
"BSD-3-Clause"
] | 75 | 2020-11-16T16:13:28.000Z | 2022-03-27T09:45:56.000Z | v1_backend/src/v1_awattprice/types.py | sp4c38/AwattarApp | b914e8042e5cdcb84485d6d45133a00244662bda | [
"BSD-3-Clause"
] | 4 | 2020-11-10T21:21:08.000Z | 2021-10-20T12:35:33.000Z | # -*- coding: utf-8 -*-
"""
AWattPrice types
"""
__author__ = "Frank Becker <fb@alien8.de>"
__copyright__ = "Frank Becker"
__license__ = "mit"
from typing import Dict
from pydantic import BaseModel
class APNSToken(BaseModel):
token: str
region_identifier: int
vat_selection: int
config: Dict
| 13.73913 | 42 | 0.689873 |
ee4c58286bfa118c0bee525e74b60fc6ad2f4c49 | 1,719 | py | Python | tests/discord/test_permission.py | ph7vc/CL4M-B0T | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 9 | 2019-02-17T06:33:14.000Z | 2021-10-05T02:19:00.000Z | tests/discord/test_permission.py | ns-phennessy/Bolt | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 28 | 2019-02-10T07:48:05.000Z | 2021-12-20T00:15:37.000Z | tests/discord/test_permission.py | ph7vc/Philbot | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 4 | 2015-03-13T03:58:55.000Z | 2015-05-27T08:29:46.000Z | import unittest
from bolt.discord.permissions import Permission
class TestPermission(unittest.TestCase):
def test_permission_from_list_to_list(self):
expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS']
permission = Permission(['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'])
actual = permiss... | 34.38 | 79 | 0.716114 |
c9a702498eb5ddedcaf6f73934242db2b825e18e | 4,428 | py | Python | research/cv/GENet_Res50/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/GENet_Res50/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/GENet_Res50/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 36.595041 | 100 | 0.670506 |
c9d149c9233c42e72313f5995c2f6ff00788fb61 | 219 | py | Python | showcase1/com/aaron/hello.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | showcase1/com/aaron/hello.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | 2 | 2021-03-25T22:00:07.000Z | 2022-01-20T15:51:48.000Z | showcase1/com/aaron/hello.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
def sayHello():
str = "hello world python!!!"
print(str)
if __name__ == "__main__":
# execute only if run as a script
print('This is main of module "hello.py"')
sayHello()
| 18.25 | 46 | 0.589041 |
4e60e9e08b60e68f4045b8de03b40b918776a8e5 | 275 | py | Python | packages/watchmen-storage/src/watchmen_storage/topic_utils.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage/src/watchmen_storage/topic_utils.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage/src/watchmen_storage/topic_utils.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import Union
from watchmen_model.admin import Topic
def as_table_name(topic_or_name: Union[Topic, str]) -> str:
if isinstance(topic_or_name, str):
return f'topic_{topic_or_name.strip().lower()}'
else:
return f'topic_{topic_or_name.name.strip().lower()}'
| 25 | 59 | 0.756364 |
4e7a889dabb11dc68026c80da2bf569da787585a | 567 | py | Python | nz_crawl_demo/day4/demo5.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_crawl_demo/day4/demo5.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_crawl_demo/day4/demo5.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | import time
import threading
class DrivingThread(threading.Thread):
def run(self):
for x in range(3):
print('%s正在开车' % threading.current_thread()) # 当前线程
time.sleep(2)
class LolingThread(threading.Thread):
def run(self):
for x in range(3):
print('%s正在撸' % th... | 23.625 | 64 | 0.603175 |
11e8c207d13ff3db63c9f96d6cabf8eeb45565ed | 14,036 | py | Python | crackv3.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | crackv3.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | crackv3.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | ###############################
# Mau Recode? Sertain author yg buat :v #
# Author: Latip176 | github: Latip176 :v #
###############################
#import modulenya :v
import requests as req,json,os,time,pyfiglet,re
from concurrent.futures import ThreadPoolExecutor as Bool
from bs4 import BeautifulSoup as parser
... | 49.249123 | 419 | 0.644058 |
f5047fae91a14bccaec4e93834babc08aaa51709 | 2,283 | py | Python | tests/ModelWordMeterTest.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | tests/ModelWordMeterTest.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | tests/ModelWordMeterTest.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | import unittest
import pandas as pd
from libs.ModelFactory import ModelFactory
from measure.ModelWordMeter import ModelWordMeter
class ModelWordMeterTest(unittest.TestCase):
def __init__(self, *args, **kwargs):
super(ModelWordMeterTest, self).__init__(*args, **kwargs)
self.debug = True
def ... | 32.614286 | 80 | 0.584319 |
e10a76a0e36714d91936be5fb2e3ae43ebdfe1ca | 3,846 | py | Python | Main.py | Drageast/Die_Botin | b574166a37c0f92c34db99931c8c894390fbead9 | [
"BSD-3-Clause"
] | null | null | null | Main.py | Drageast/Die_Botin | b574166a37c0f92c34db99931c8c894390fbead9 | [
"BSD-3-Clause"
] | null | null | null | Main.py | Drageast/Die_Botin | b574166a37c0f92c34db99931c8c894390fbead9 | [
"BSD-3-Clause"
] | null | null | null | # Imports
import discord
import tweepy
from discord import Webhook, AsyncWebhookAdapter
from discord.ext import commands, tasks
import aiohttp
from pymongo import MongoClient
import os
# Utils
import Utils
# Erstellen des Client für discord
intents = discord.Intents.default()
intents.members = True
client = commands... | 35.611111 | 122 | 0.712428 |
01732492e4cbc98f1acf75b6aa99449a86bb52c7 | 1,055 | py | Python | src/austria/urls.py | frocentus/offenewahlen_api | 71860583890f8a4c23df67f271e8f13558fa9582 | [
"MIT"
] | 14 | 2017-07-12T14:42:57.000Z | 2017-09-08T20:32:53.000Z | src/austria/urls.py | frocentus/offenewahlen_api | 71860583890f8a4c23df67f271e8f13558fa9582 | [
"MIT"
] | 209 | 2017-07-11T21:36:01.000Z | 2017-11-05T01:10:50.000Z | src/austria/urls.py | OKFNat/offenewahlen-api | 71860583890f8a4c23df67f271e8f13558fa9582 | [
"MIT"
] | 8 | 2017-07-15T09:40:42.000Z | 2018-01-12T03:02:06.000Z | from django.conf.urls import url, include
from rest_framework.routers import DefaultRouter
from rest_framework_swagger.views import get_swagger_view
from . import views, views_api
# Django REST framework
router = DefaultRouter()
router.register(r'election', views_api.ElectionInterface)
router.register(r'district', vi... | 39.074074 | 93 | 0.814218 |
6d813b39e81a35ce3216fd20a8e2fbfbaa13bf16 | 2,692 | py | Python | abfahrt/main.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | 1 | 2022-01-30T14:30:02.000Z | 2022-01-30T14:30:02.000Z | abfahrt/main.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | null | null | null | abfahrt/main.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | null | null | null | from abfahrt import *
def main():
input_ = Input()
stations, lines, trains, passengers = input_.from_stdin()
if not input_.check_input():
print("INVALID INPUT: Not enough or invalid objects given!")
return
result = Result(input_)
linelist = Linelist(lines)
stationlist = Sta... | 35.893333 | 132 | 0.655646 |
1105d5d57fb4a5070792215bad6e1ed00f1bc88f | 802 | py | Python | ___Python/Jonas/Python/p11_uebungen/m04_pi.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Jonas/Python/p11_uebungen/m04_pi.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Jonas/Python/p11_uebungen/m04_pi.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | # 1) pi annähern über random
import random
import math
r = random.random
inside = 0
total = 100000
for i in range (0, total):
x = r()
y = r()
if (math.sqrt(x ** 2 + y ** 2) <= 1):
inside += 1
pi = 4 * inside/total
print(pi)
# 2) Check, ob zwei Polynome gleich sind
def p1(x)... | 16.04 | 43 | 0.450125 |
1123e518cc7f081dd461d5ab52684ff73fd0a4ce | 4,497 | py | Python | docker_tag.py | dubass83/err-docker-tag | e2eb9ee64b37ef6446afbddb4b9fda96b311f497 | [
"MIT"
] | null | null | null | docker_tag.py | dubass83/err-docker-tag | e2eb9ee64b37ef6446afbddb4b9fda96b311f497 | [
"MIT"
] | null | null | null | docker_tag.py | dubass83/err-docker-tag | e2eb9ee64b37ef6446afbddb4b9fda96b311f497 | [
"MIT"
] | null | null | null | from errbot import BotPlugin, botcmd
from itertools import chain
import re
import logging
import time
log = logging.getLogger(name='errbot.plugins.DockerTag')
try:
import docker
except ImportError:
log.error("Please install 'docker' python package")
try:
from config import DOCKER_REG_URL, DOCKER_USERNAME... | 33.066176 | 104 | 0.576607 |
a387af8ffa0818f9c0d3a9f99cc2b2ef2e5f6193 | 20,234 | py | Python | wz/ui/icons_rc.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/ui/icons_rc.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/ui/icons_rc.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | # Resource object code (Python 3)
# Created by: object code
# Created by: The Resource Compiler for Qt version 6.1.2
# WARNING! All changes made in this file will be lost!
from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00\x07\xd4\
\x00\
\x000\x01x\x9c\xedZms\xdb6\x12\xfe\xee_\xc1\
\xd2\x1f\x1aOE\x0ao\x04@\xd... | 45.674944 | 96 | 0.713304 |
a38f2bcc95b81b80bc1ffdf0b8c38d5016d79c99 | 8,250 | py | Python | pyUnnenberg/unnenberg.py | DominikAuras/pyUnnenberg | f3ad87b71ccd25b9231c19e3f4a4f7d1c053028b | [
"MIT"
] | null | null | null | pyUnnenberg/unnenberg.py | DominikAuras/pyUnnenberg | f3ad87b71ccd25b9231c19e3f4a4f7d1c053028b | [
"MIT"
] | null | null | null | pyUnnenberg/unnenberg.py | DominikAuras/pyUnnenberg | f3ad87b71ccd25b9231c19e3f4a4f7d1c053028b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from backgroundaudio import BackgroundAudio
from play_audiofile import PlayAudioFile
from datetime import datetime, timedelta
import calendar
import time
from contextlib import closing
import logging
from vws import vws
from glob import glob
from itertools import cycle
f... | 28.947368 | 135 | 0.659394 |
a39f139b0bccc0b789696628be7a1ef5bba22552 | 1,300 | py | Python | lib/util/ImageProcessing/mouse_click.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 5 | 2018-02-06T22:48:34.000Z | 2020-01-07T20:19:05.000Z | lib/util/ImageProcessing/mouse_click.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 11 | 2018-01-31T21:47:49.000Z | 2018-04-21T16:42:52.000Z | lib/util/ImageProcessing/mouse_click.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 2 | 2020-06-18T05:40:03.000Z | 2022-02-02T03:46:30.000Z | import cv2
import numpy as np
class MouseClicks:
"""Class for mouse click events"""
corners = []
ref_pt = []
def __init__(self):
self.data = []
def draw_point(event,x,y,flags,param):
"""Draw point in the image to represent input points
Keyword arguments:
event -... | 25.490196 | 75 | 0.552308 |
6e6027e997285385c5fdc4a804caf7db5b94a93b | 1,855 | py | Python | head_title.py | RoyWang2018/LDMS | 33342e33b6aabd3b81292f47081baba315b5be86 | [
"MIT"
] | null | null | null | head_title.py | RoyWang2018/LDMS | 33342e33b6aabd3b81292f47081baba315b5be86 | [
"MIT"
] | null | null | null | head_title.py | RoyWang2018/LDMS | 33342e33b6aabd3b81292f47081baba315b5be86 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Jan 30 01:35:40 2019
head title
20190130
version 0.0
@author: user
"""
import tkinter as tk
from tkinter import ttk
ini_font = ('Microsoft YaHei UI', 16, 'bold')
ini_title = '測 試 用 標 題'
# it is necessary to input chinese string for head title.
# title is 'head title' ... | 26.5 | 79 | 0.491644 |
c297ef2d81f151eacbdb957336da0afb03d02854 | 1,781 | py | Python | tests/server/handlers/test_datasources.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 156 | 2021-11-19T18:50:14.000Z | 2022-03-31T19:48:59.000Z | tests/server/handlers/test_datasources.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 30 | 2021-12-27T19:30:56.000Z | 2022-03-30T17:49:00.000Z | tests/server/handlers/test_datasources.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 14 | 2022-01-17T23:24:34.000Z | 2022-03-29T09:27:47.000Z | import uuid
import pytest
from server import create_app
DATASOURCES_ENDPOINT = "/v1/api/datasources"
NUM_DATASOURCES_IN_DB = 1
@pytest.fixture
def client(tmpdir):
# temp_db_file = f"sqlite:///{tmpdir.dirpath()}/"
app = create_app()
app.config["TESTING"] = True
with app.test_client() as client:
... | 29.683333 | 88 | 0.729366 |
6c36dd05b6cf1941e13e93716c81ad3216036500 | 881 | py | Python | lang-python/sqlite/src/test.py | xd23fe39/technical-notes | bb6348705a95db24d07b1081b1aa0265dda131ce | [
"MIT"
] | null | null | null | lang-python/sqlite/src/test.py | xd23fe39/technical-notes | bb6348705a95db24d07b1081b1aa0265dda131ce | [
"MIT"
] | null | null | null | lang-python/sqlite/src/test.py | xd23fe39/technical-notes | bb6348705a95db24d07b1081b1aa0265dda131ce | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
# test.py
# https://docs.python.org/2/library/sqlite3.html
# https://sqlite.org/lang_corefunc.html
import sqlite3 as sqlite
import sys as sys
import os as os
# Database Connection
# https://www.connectionstrings.com/
db_connect_str = ':memory:'
con = None
try:
... | 20.488372 | 48 | 0.640182 |
b0b3aeea51b8e9c9cc9dde5e88ac12a0ab34af51 | 1,288 | py | Python | src/Sephrasto/PluginLoader.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-02-02T16:15:59.000Z | 2022-02-02T16:15:59.000Z | src/Sephrasto/PluginLoader.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-01-14T11:04:19.000Z | 2022-01-14T11:04:19.000Z | src/Sephrasto/PluginLoader.py | lukruh/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | null | null | null | import importlib.util
import os
import os.path
import logging
import sys
from Hilfsmethoden import Hilfsmethoden
class PluginData(object):
def __init__(self, path, name):
super().__init__()
self.path = path
self.name = name
self.description = ""
if not self.path in sys.path... | 28 | 99 | 0.602484 |
b0c52a17261d96d77acdac297a846a9fba9f8e7a | 1,445 | py | Python | Project Euler Qusetions 11 - 20/Project Euler Question 12.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | 1 | 2020-02-11T02:03:02.000Z | 2020-02-11T02:03:02.000Z | Project Euler Qusetions 11 - 20/Project Euler Question 12.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | Project Euler Qusetions 11 - 20/Project Euler Question 12.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | #Project Euler Question 12
#The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be:
#1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ...
#Let us list the factors of the first seven triangle numbers:
#1: 1
#3:... | 30.104167 | 175 | 0.613149 |
c692bdf59a4ce0e513650b9e98f21d440909b9f5 | 495 | py | Python | PYTHON/Numpy/array_mathematics.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Numpy/array_mathematics.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Numpy/array_mathematics.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import numpy
s = list(map(int, input().split()))
N, M = s[0], s[1]
arr = []
for _ in range(0, N):
temp = list(map(int, input().split()))
arr.append(temp)
n = numpy.array(arr)
arr = []
for _ in range(0, N):
temp = list(map(int, input().split()))
arr.append(temp)
m = nu... | 19.8 | 42 | 0.622222 |
c6d8b95abfab61dfb29e25a37e15ad53cbb450d4 | 436 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/gemini-0.10.0-py2.7.egg/gemini/merge-bed.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/gemini-0.10.0-py2.7.egg/gemini/merge-bed.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/gemini-0.10.0-py2.7.egg/gemini/merge-bed.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
import sys
prev_score = None
start = None
end = None
recs = []
for line in sys.stdin:
f = line.strip().split('\t')
score = f[3]
if score == prev_score:
chrom = f[0]
start = f[1]
while (score == prev_score):
end = f[1]
prev_score = score
line = sys.stdin.next()
f = line.str... | 16.769231 | 31 | 0.616972 |
af62bb659f74b1807e4cde7bbd5bac518f9ce39a | 6,417 | py | Python | controller.py | maxbachmann-university/blind-controller | 5aa19182f5b3dd5b8262cf369f667923790b443d | [
"MIT"
] | null | null | null | controller.py | maxbachmann-university/blind-controller | 5aa19182f5b3dd5b8262cf369f667923790b443d | [
"MIT"
] | null | null | null | controller.py | maxbachmann-university/blind-controller | 5aa19182f5b3dd5b8262cf369f667923790b443d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from transitions.extensions import LockedMachine as Machine
import paho.mqtt.client as mqtt
import threading
import json
import time
import logging
import yaml
lock = threading.Lock()
logging.basicConfig(level=logging.DEBUG)
# Set transitions' log level to INFO; DEBUG me... | 29.985981 | 87 | 0.613371 |
afbcc6573c38fb78f67a9851d8e10c857ef10650 | 275 | py | Python | guiao1/gen.py | jtmr05/SO | b92d4589cac84c0cca31611ef741229383d7f217 | [
"MIT"
] | 1 | 2022-02-22T17:30:09.000Z | 2022-02-22T17:30:09.000Z | guiao1/gen.py | jtmr05/SO | b92d4589cac84c0cca31611ef741229383d7f217 | [
"MIT"
] | null | null | null | guiao1/gen.py | jtmr05/SO | b92d4589cac84c0cca31611ef741229383d7f217 | [
"MIT"
] | null | null | null | #
# generate a file with lim lines
# used to test cp performance
#
lim = 10 ** 6
def fill(filename):
file = open(filename, 'w', encoding='utf8')
for i in range(1, lim):
file.write("abcdefghijklmnopqrstuvwxyz\n")
file.close()
fill("resources/lines.txt") | 19.642857 | 50 | 0.650909 |
bb99d3ff36771896ebfcd314588c905b738eb514 | 15,666 | py | Python | Packs/HackerOne/Integrations/HackerOne/HackerOne_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/HackerOne/Integrations/HackerOne/HackerOne_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/HackerOne/Integrations/HackerOne/HackerOne_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import io
import os
import pytest
import json
from CommonServerPython import DemistoException
from test_data import input_data
from unittest import mock
BASE_URL = 'https://mocked_url/v1/'
URL_SUFFIX = {
"REPORTS": "reports",
"PROGRAMS": "me/programs"
}
def util_load_json(path):
with io.open(path, mod... | 34.430769 | 120 | 0.693093 |
bb9e2e8ed3c3bdb4baf6d380d96a6a1dfc520a2f | 777 | py | Python | ir_sensor.py | abbashan03/Sicherheitssystem | c29ac4cf5dc645891d59d23a604ad39bd7b0c63e | [
"MIT"
] | 3 | 2018-09-10T16:27:31.000Z | 2019-03-25T13:53:03.000Z | ir_sensor.py | abbashan03/Sicherheitssystem | c29ac4cf5dc645891d59d23a604ad39bd7b0c63e | [
"MIT"
] | 3 | 2018-09-11T14:54:12.000Z | 2019-02-11T15:27:33.000Z | ir_sensor.py | abbashan03/Sicherheitssystem | c29ac4cf5dc645891d59d23a604ad39bd7b0c63e | [
"MIT"
] | 1 | 2018-09-10T16:28:19.000Z | 2018-09-10T16:28:19.000Z | from picamera import PiCamera
from time import sleep
import RPi.GPIO as GPIO
import time
sensor = 18
camera = PiCamera()
GPIO.setmode(GPIO.BCM)
GPIO.setup(sensor,GPIO.IN)
print ("IR Sensor Ready.....")
nr = 0
try:
while True:
if GPIO.input(sensor):
print ("C")
... | 19.923077 | 67 | 0.527671 |
a545ce62e5bffc11da0ffb1855d581748a140674 | 479 | py | Python | SPS-Variants/backup/top-k-overview/backup/preZhi/genData/ckDir.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | related_projects/source_codes/top-k-overview/preZhi/genData/ckDir.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | related_projects/source_codes/top-k-overview/preZhi/genData/ckDir.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | import sys
if __name__ == '__main__':
gname = sys.argv[1]
isDirected = False
if gname == '':
print 'Usage: checkDirected <file>'
sys.exit(1)
else:
with open(gname) as gdata:
for line in gdata:
s = line.split()
if int(s[0].strip()) > int... | 26.611111 | 57 | 0.45929 |
36ff1c79c22e29d482a18d78a431adbcaf7ac576 | 7,961 | py | Python | Hackathons_19_20/Brainwaves 2019/Clustering Financial Articles/brainwaves clust art.py | aviggithub/Hackathons_20 | a1bbc63cff3bd71982017749a0cc162d684e452b | [
"Apache-2.0"
] | null | null | null | Hackathons_19_20/Brainwaves 2019/Clustering Financial Articles/brainwaves clust art.py | aviggithub/Hackathons_20 | a1bbc63cff3bd71982017749a0cc162d684e452b | [
"Apache-2.0"
] | null | null | null | Hackathons_19_20/Brainwaves 2019/Clustering Financial Articles/brainwaves clust art.py | aviggithub/Hackathons_20 | a1bbc63cff3bd71982017749a0cc162d684e452b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Dec 28 21:55:20 2018
@author: avi
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.cluster import KMeans
from sklearn.metrics import adjusted... | 26.101639 | 153 | 0.700289 |
3c70f59bd8925fabaf15e2eace624c0bd68ff97b | 338 | py | Python | src/settings/development.py | qinyanjuidavid/Yansta | bb5de4aa52342211611f9f248846f38fb0d77898 | [
"Apache-2.0"
] | null | null | null | src/settings/development.py | qinyanjuidavid/Yansta | bb5de4aa52342211611f9f248846f38fb0d77898 | [
"Apache-2.0"
] | null | null | null | src/settings/development.py | qinyanjuidavid/Yansta | bb5de4aa52342211611f9f248846f38fb0d77898 | [
"Apache-2.0"
] | 1 | 2022-02-14T19:11:08.000Z | 2022-02-14T19:11:08.000Z | import os
from src.settings.local import *
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
CORS_ALLOWED_ORIGINS = [
"http://localhost:8000",
"http://... | 16.9 | 64 | 0.642012 |
5927d5e76e198356170a721e5f842e86251211fc | 30,596 | py | Python | app/qa/wl.py | MePyDo/pygqa | 61cde42ee815968fdd029cc5056ede3badea3d91 | [
"MIT"
] | 3 | 2021-02-25T13:19:52.000Z | 2021-03-03T03:46:46.000Z | app/qa/wl.py | MedPhyDO/pygqa | 580b2c6028d2299790a38262b795b8409cbfcc37 | [
"MIT"
] | null | null | null | app/qa/wl.py | MedPhyDO/pygqa | 580b2c6028d2299790a38262b795b8409cbfcc37 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = "R. Bauer"
__copyright__ = "MedPhyDO - Machbarkeitsstudien des Instituts für Medizinische Strahlenphysik und Strahlenschutz am Klinikum Dortmund im Rahmen von Bachelor und Masterarbeiten an der TU-Dortmund / FH-Dortmund"
__credits__ = ["R.Bauer", "K.Loot"]
__license__ = "MIT"
__ver... | 36.122786 | 209 | 0.489149 |
59499948816f3eaa06d99bf2c1a1dd956e742824 | 575 | py | Python | tarefas-poo/lista-01/calculos/view/paineis/painel_menor3.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-01/calculos/view/paineis/painel_menor3.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-01/calculos/view/paineis/painel_menor3.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5603
# Exercício calculos
# --------------------------
# Classe responsável por descobrir o menor de 3 números inteiros.
from view.paineis.painel_abstrato import PainelAbstrato
from model.calculos import menor_de_tres_numeros
class PainelMenor3(PainelAbstrato):
... | 31.944444 | 70 | 0.624348 |
3cccdead500c24c6a2b38c5dbffbbf370ca25a66 | 1,215 | py | Python | source-code/Pseudocode/SolveLinearCongruences/solveLinearCongruences.py | RalfGuder/LaTeX-examples | a1bf9fe422969be1ca4674394ebd2170c07f7693 | [
"MIT"
] | 1,231 | 2015-01-07T04:04:25.000Z | 2022-03-31T17:43:29.000Z | source-code/Pseudocode/SolveLinearCongruences/solveLinearCongruences.py | DoubleL61/LaTeX-examples | cd0d97f85fadb59b7c6e9062b37a8bf7d725ba0c | [
"MIT"
] | 5 | 2015-05-10T13:10:47.000Z | 2021-05-02T21:28:49.000Z | source-code/Pseudocode/SolveLinearCongruences/solveLinearCongruences.py | DoubleL61/LaTeX-examples | cd0d97f85fadb59b7c6e9062b37a8bf7d725ba0c | [
"MIT"
] | 400 | 2015-01-05T06:22:18.000Z | 2022-03-19T04:07:59.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def extended_euclidean_algorithm(a, b):
"""
Calculates gcd(a,b) and a linear combination such that
gcd(a,b) = a*x + b*y
As a side effect:
If gcd(a,b) = 1 = a*x + b*y
Then x is multiplicative inverse of a modulo b.
"""
aO, bO = a, b
x ... | 22.5 | 68 | 0.525103 |
ab7708df305b7bb739163da06801c16f88e91c0b | 1,324 | py | Python | frappe-bench/apps/erpnext/erpnext/erpnext_integrations/connectors/github_connection.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/erpnext_integrations/connectors/github_connection.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/erpnext_integrations/connectors/github_connection.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | from __future__ import unicode_literals
import frappe
from frappe.data_migration.doctype.data_migration_connector.connectors.base import BaseConnection
from github import Github
class GithubConnection(BaseConnection):
def __init__(self, connector):
self.connector = connector
try:
password = self.get_password(... | 28.782609 | 97 | 0.759819 |
f98a40fa51e6eb0d44986040ad2a527897201436 | 140 | py | Python | torch/ao/quantization/fx/backend_config/fuse_handler.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 5 | 2018-04-24T13:41:12.000Z | 2019-07-09T07:32:09.000Z | torch/ao/quantization/fx/backend_config/fuse_handler.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 14 | 2021-10-14T06:58:50.000Z | 2021-12-17T11:51:07.000Z | torch/ao/quantization/fx/backend_config/fuse_handler.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 7 | 2020-08-31T22:49:59.000Z | 2020-09-15T14:29:07.000Z | from ..fusion_patterns import DefaultFuseHandler
# TODO: move DefaultFuseHandler
def get_fuse_handler_cls():
return DefaultFuseHandler
| 23.333333 | 48 | 0.828571 |
f9c16116eafea345b51ded7c01be983d1832c8f6 | 1,851 | py | Python | listings/chapter05/csp.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | 2 | 2021-09-20T06:16:41.000Z | 2022-01-17T14:24:43.000Z | loesungen/chapter05/csp.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | loesungen/chapter05/csp.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | class CSP:
def __init__(self, variables, domains, constraint_function):
self.variables = variables
self.domains = domains
self.constraint_function = constraint_function
def solve(self, assignment = {}):
# Wenn alle Variablen zugeordnet sind, ist das die Lösung
if len(as... | 39.382979 | 77 | 0.622366 |
34d4b2c3d54a5e2ff2b286ec94618519e350bf3d | 462 | py | Python | main.py | Mohammad-Robati/MazeSolver | d9be1f981035bb4f4283283543e705472c80085f | [
"MIT"
] | null | null | null | main.py | Mohammad-Robati/MazeSolver | d9be1f981035bb4f4283283543e705472c80085f | [
"MIT"
] | null | null | null | main.py | Mohammad-Robati/MazeSolver | d9be1f981035bb4f4283283543e705472c80085f | [
"MIT"
] | null | null | null | from maze_solver import MazeSolver
colors_of_rooms = []
line = input().split()
number_of_rooms = int(line[0])
number_of_corridors = int(line[1])
line = input().split()
for i in range(number_of_rooms - 1):
colors_of_rooms.append(line[i])
line = input().split()
rocket_initial = int(line[0]) - 1
lucky_initial = int(l... | 28.875 | 110 | 0.751082 |
1f559111bce3aef0a52cb380f9252342284a7702 | 1,685 | py | Python | src/test/tests/databases/sami.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/sami.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/sami.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: sami.py
#
# Tests: sami files
#
# Programmer: Mark C. Miller
# Date: October 12, 2006
#
# ----------------------------------------------------------------------------
RequiredDatabasePlu... | 21.0625 | 78 | 0.632641 |
c0cbfb1b2a1e883e4bf0f659ec8338ec32117d9c | 820 | py | Python | django/django-models-manager.py | pisitj/practice-python-web-framework | 5f7f60737b1cf9618e73ad8047b6c4f556d1feb0 | [
"MIT"
] | null | null | null | django/django-models-manager.py | pisitj/practice-python-web-framework | 5f7f60737b1cf9618e73ad8047b6c4f556d1feb0 | [
"MIT"
] | null | null | null | django/django-models-manager.py | pisitj/practice-python-web-framework | 5f7f60737b1cf9618e73ad8047b6c4f556d1feb0 | [
"MIT"
] | null | null | null | from django.db import models
class BookManager(models.Manager):
def start_with_a(self):
return super().get_queryset().filter(title__istartwith='a')
class Book(models.Model):
title = models.CharField(max_length=200)
word_count = models.PositiveIntegerField()
published_on = models.DateTimeField... | 22.162162 | 67 | 0.703659 |
c0e876ab092176039b4745bdf306498be91cab59 | 9,345 | py | Python | evaluation-webapp/reposynergy/views.py | DLR-SC/repository-synergy | 115e48c37e659b144b2c3b89695483fd1d6dc788 | [
"MIT"
] | 5 | 2021-05-09T12:51:32.000Z | 2021-11-04T11:02:54.000Z | evaluation-webapp/reposynergy/views.py | DLR-SC/repository-synergy | 115e48c37e659b144b2c3b89695483fd1d6dc788 | [
"MIT"
] | null | null | null | evaluation-webapp/reposynergy/views.py | DLR-SC/repository-synergy | 115e48c37e659b144b2c3b89695483fd1d6dc788 | [
"MIT"
] | 3 | 2021-05-12T12:14:05.000Z | 2021-10-06T05:19:54.000Z | # author: relbaff
from django.contrib import messages
from django.contrib.auth.decorators import user_passes_test, permission_required
from django.shortcuts import render, redirect
from django.contrib.auth import authenticate
from django.utils import timezone
from datetime import datetime
from . import PAGES, controll... | 34.739777 | 142 | 0.673515 |
23c9c0faf20581b03c7d94ad57443d708c97fbac | 194 | py | Python | exercises/ja/test_03_14_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/ja/test_03_14_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/ja/test_03_14_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
"patterns = list(nlp.pipe(people))" in __solution__
), "nlp.pipeの結果に対してリストを呼び出しましたか?"
__msg__.good("Good job!追加のメタデータとともにnlp.pipeを呼びだす実践的な例を見ていきましょう。")
| 27.714286 | 69 | 0.690722 |
f1b3e99921858791aea9d7298c7390558aadd97f | 965 | py | Python | tasks/forms.py | abernten/website | 89167c5b1914953ac67def01b9ec0c169c50658f | [
"MIT"
] | 3 | 2020-03-21T22:32:56.000Z | 2020-03-28T23:06:38.000Z | tasks/forms.py | abernten/website | 89167c5b1914953ac67def01b9ec0c169c50658f | [
"MIT"
] | null | null | null | tasks/forms.py | abernten/website | 89167c5b1914953ac67def01b9ec0c169c50658f | [
"MIT"
] | null | null | null | from django.forms import ModelForm
from django import forms
from .models import Task, TaskOffer
class TaskForm(ModelForm):
class Meta:
model = Task
fields = [
'title',
'description',
'helpers_count',
'start_date',
'end_date',
... | 25.394737 | 88 | 0.481865 |
9e62415fe554dfb59e48c61ad2fd75193c678b4d | 423 | py | Python | 30-Days-of-Code/Day08-DictionariesAndMaps.py | sadikkuzu/HackerRank | 2b1ed2cf41f6a5404c5b9293186f301b646b5d33 | [
"Apache-2.0"
] | 5 | 2019-03-09T22:44:01.000Z | 2021-09-14T00:11:38.000Z | 30-Days-of-Code/Day08-DictionariesAndMaps.py | jguerra7/HackerRank-4 | 7e1663d0050ffbb0fd885b8affdada9ea13b0e80 | [
"Apache-2.0"
] | 4 | 2018-08-16T09:39:47.000Z | 2018-09-14T17:37:07.000Z | 30-Days-of-Code/Day08-DictionariesAndMaps.py | jguerra7/HackerRank-4 | 7e1663d0050ffbb0fd885b8affdada9ea13b0e80 | [
"Apache-2.0"
] | 1 | 2020-06-01T23:38:35.000Z | 2020-06-01T23:38:35.000Z | # Enter your code here. Read input from STDIN. Print output to STDOUT
# https://www.hackerrank.com/challenges/30-dictionaries-and-maps
n = int(raw_input())
d = dict()
for _ in xrange(n):
x = str(raw_input()).split(' ')
d[x[0]] = x[1]
q = raw_input()
try:
while(q<>''):
if q in d:
print st... | 24.882353 | 69 | 0.55792 |
8d7f732d5a9adbb4007290c2dfab5d11b1256ef3 | 316 | py | Python | python/coursera_python/MICHIGAN/WEB/test/http.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/MICHIGAN/WEB/test/http.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/MICHIGAN/WEB/test/http.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import socket
mysocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
mysocket.connect(('data.pr4e.org', 80))
cmd = 'GET http://data.pr4e.org/romeo.txt HTTP/1.0\n\n'.encode()
mysocket.send(cmd)
while True:
data = mysock.recv(512)
if (len(data) < 1):
break
print(data.decode())
mysock.close()
| 12.64 | 64 | 0.68038 |
f552552d3c3e0ccc5afddfd15ad77c9aeb67500b | 1,359 | py | Python | modem.py | plishing/Agena2 | 56f2f48a3bda4ff3d011d70e630cf6793995a239 | [
"Beerware"
] | 2 | 2016-03-17T09:39:34.000Z | 2016-03-17T11:26:19.000Z | modem.py | plishing/Agena2 | 56f2f48a3bda4ff3d011d70e630cf6793995a239 | [
"Beerware"
] | null | null | null | modem.py | plishing/Agena2 | 56f2f48a3bda4ff3d011d70e630cf6793995a239 | [
"Beerware"
] | null | null | null | #!/usr/bin/python
import telem as telem
import time as time
time.sleep(15)
m_active = 1
connection = 0
initTime = time.time() + 60
count = 1
telem.modem(1)
time.sleep(30)
while True:
mode = None
#We need to know if probe is in ascend or descend mode
with open('outtt.txt','r') as f:
... | 28.3125 | 102 | 0.593819 |
277b5ddf5f31b892a0a87c2dbfb08b02961c1ffe | 1,805 | py | Python | plugins/tff_backend/api/global_stats.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/api/global_stats.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/api/global_stats.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... | 39.23913 | 103 | 0.786704 |
47528ba47efca4999b3ba6da655f394a7909cb53 | 1,204 | py | Python | notebooks/util/solr_helper/result_formatter.py | dbmdz/webarchiv-dh-bestandsausbau | 98c271a09cdb026d1d58133f49dcb3e1c9fcf9b6 | [
"MIT"
] | null | null | null | notebooks/util/solr_helper/result_formatter.py | dbmdz/webarchiv-dh-bestandsausbau | 98c271a09cdb026d1d58133f49dcb3e1c9fcf9b6 | [
"MIT"
] | null | null | null | notebooks/util/solr_helper/result_formatter.py | dbmdz/webarchiv-dh-bestandsausbau | 98c271a09cdb026d1d58133f49dcb3e1c9fcf9b6 | [
"MIT"
] | null | null | null | def style_highlight(highlight):
style = '<em style="background-color:yellow;font-style:normal;">'
styled_highlight = highlight.replace("<em>", style)
return styled_highlight
def write_table_row(key, value):
row = f"<tr><td>{key}</td><td>{value}</td></tr>"
return row
def write_doc_entry(idx, doc,... | 36.484848 | 111 | 0.645349 |
4bd1b835bd27fede8928eac45a3647b211be4c51 | 3,535 | py | Python | sam_core/sam_core/res_obj.py | csjy309450/SAM-Backend | a23569ea372f718ca4a167e21e8046336db00561 | [
"MIT"
] | null | null | null | sam_core/sam_core/res_obj.py | csjy309450/SAM-Backend | a23569ea372f718ca4a167e21e8046336db00561 | [
"MIT"
] | null | null | null | sam_core/sam_core/res_obj.py | csjy309450/SAM-Backend | a23569ea372f718ca4a167e21e8046336db00561 | [
"MIT"
] | null | null | null | STATUS_NO_ERROR = 0
STATUS_KNOWN = 1
STATUS_API_DISABLED = 2
g_error_code = {
STATUS_NO_ERROR: {'ch': '成功', 'en': 'succeed'},
STATUS_KNOWN: {'ch': '未知错误', 'en': 'unknown error'},
STATUS_API_DISABLED: {'ch': 'API不可用', 'en': 'api disabled'}
}
class JsonObjBase(object):
def __init__(self):
pass
... | 33.666667 | 110 | 0.67355 |
32395a4bd6579c4ce032e139573f21d5a2f38595 | 3,952 | py | Python | data/discover.py | seppe912/Midea2Lox | 7967afd227d7b7f7130abc710cd97b4f7f840a37 | [
"Apache-2.0"
] | 2 | 2019-03-05T11:59:47.000Z | 2021-11-16T23:05:34.000Z | data/discover.py | seppe912/Midea2Lox | 7967afd227d7b7f7130abc710cd97b4f7f840a37 | [
"Apache-2.0"
] | 1 | 2019-08-20T13:48:20.000Z | 2020-05-29T13:12:06.000Z | data/discover.py | seppe912/Midea2Lox | 7967afd227d7b7f7130abc710cd97b4f7f840a37 | [
"Apache-2.0"
] | null | null | null | #!REPLACELBPBINDIR/venv/bin/python3
# -*- coding: utf-8 -*-
import logging
import sys
import configparser
#set path
cfg_path = 'REPLACELBPCONFIGDIR' #### REPLACE LBPCONFIGDIR ####
log_path = 'REPLACELBPLOGDIR' #### REPLACE LBPLOGDIR ####
home_path = 'REPLACELBHOMEDIR' #### REPLACE LBHOMEDIR ####
cfg = configparser.Ra... | 41.166667 | 175 | 0.629555 |
08b4fecb746fa46cb7ae4f1a8d87a75b97a3994d | 1,662 | py | Python | Packs/GroupIB_ThreatIntelligenceAttribution/Scripts/GIBIncidentUpdateIncludingClosed/GIBIncidentUpdateIncludingClosed.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/GroupIB_ThreatIntelligenceAttribution/Scripts/GIBIncidentUpdateIncludingClosed/GIBIncidentUpdateIncludingClosed.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/GroupIB_ThreatIntelligenceAttribution/Scripts/GIBIncidentUpdateIncludingClosed/GIBIncidentUpdateIncludingClosed.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 prevent_duplication(current_incident):
"""
This script checks if there is an existing incident with the same GIB ID as the incoming incident.
If so, the script updates the already existing incident with the fiel... | 37.772727 | 120 | 0.664862 |
dec330afec35ddcd3b3c80a34f23ccc839fd96d9 | 2,546 | py | Python | src/shapes/circle.py | ceofil/uni-python-project | 531e73218a3d53448f1fd39a0bf9404a6d6bb284 | [
"MIT"
] | null | null | null | src/shapes/circle.py | ceofil/uni-python-project | 531e73218a3d53448f1fd39a0bf9404a6d6bb284 | [
"MIT"
] | null | null | null | src/shapes/circle.py | ceofil/uni-python-project | 531e73218a3d53448f1fd39a0bf9404a6d6bb284 | [
"MIT"
] | null | null | null | import numpy as np
import math
class Circle:
"""
Circle class, stores coords and style props.
Attributes:
x, y: center coords
radius: circle radius
fill_color: 3-int tuple representing rgb color
stroke_color: 3-int tuple representing rgb color
stroke_width: int rep... | 35.361111 | 113 | 0.591909 |
72315f000bb5fa87ce31a084775236aa011f5b3f | 546 | py | Python | source/pkgsrc/devel/py-angr/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/devel/py-angr/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/devel/py-angr/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.2 2021/06/02 23:27:11 khorben Exp $
Allow unicorn 1.0.1, which is what we have in pkgsrc.
Judging by the commit history, unicorn>=1.0.2 is needed only for
building on Windows.
--- setup.py.orig 2021-05-18 20:52:07.000000000 +0000
+++ setup.py
@@ -130,7 +130,7 @@ if 'bdist_wheel' in sys.ar... | 28.736842 | 66 | 0.641026 |
dfd271ab863498e89e8a503a89f351cc38952b70 | 476 | py | Python | src/bo4e/enum/tariftyp.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/enum/tariftyp.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/enum/tariftyp.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | # pylint: disable=missing-module-docstring
from bo4e.enum.strenum import StrEnum
class Tariftyp(StrEnum):
"""
Zur Differenzierung von Grund/Ersatzversorgungstarifen und sonstigen angebotenen Tarifen.
"""
GRUND_ERSATZVERSORGUNG = "GRUND_ERSATZVERSORGUNG" #: Grund- und Ersatzversorgung
GRUNDVERSOR... | 34 | 93 | 0.758403 |
5f18995d4b43cd922f00c8e3b980010fb821f9c2 | 1,570 | py | Python | Imagenes/Pseudopotential/vdW_isoth.py | efogliatto/Tesis | 058fa0c2e23cd538621d17d41bb216a4db4d211a | [
"CC0-1.0"
] | null | null | null | Imagenes/Pseudopotential/vdW_isoth.py | efogliatto/Tesis | 058fa0c2e23cd538621d17d41bb216a4db4d211a | [
"CC0-1.0"
] | null | null | null | Imagenes/Pseudopotential/vdW_isoth.py | efogliatto/Tesis | 058fa0c2e23cd538621d17d41bb216a4db4d211a | [
"CC0-1.0"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import argparse
if __name__ == "__main__":
# Argumentos de consola
parser = argparse.ArgumentParser(description='Ejemplo de construccion de Maxwell con vdW')
parser.add_argument('-png', help='Imagen en formato png', action='store_true')
... | 17.444444 | 94 | 0.588535 |
a050e60d523f936f36adab1f64fa2372f5954c5d | 805 | py | Python | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/startup.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/startup.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/startup.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 1 | 2019-06-12T11:07:37.000Z | 2019-06-12T11:07:37.000Z | from PyQt5.QtCore import QSettings, QStandardPaths
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QApplication, QSplashScreen
import os
try:
s = QSettings()
s.setValue("PythonPlugins/GeoTaskOrganizer", True)
s.setValue("qgis/iconSize", 32)
s.setValue("qgis/stylesheet/iconSize", 32)
s.s... | 29.814815 | 97 | 0.675776 |
f80e107b6ef0f33c03b64421fabc65fb7341d6ad | 1,046 | py | Python | cs/lambda_cs/08_interview_prep/exercises/merge_point_two_lists.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | cs/lambda_cs/08_interview_prep/exercises/merge_point_two_lists.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | cs/lambda_cs/08_interview_prep/exercises/merge_point_two_lists.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | """
Interview Preparation :: Day 2 lesson
Live coding through an example from HackerRank:
[Find the Merge Point of Two Linked Lists](http://hr.gs/cfcfac)
Given pointers to the head nodes of 2 linked lists that merge together at some point,
find the Node where the two lists merge.
It is guaranteed that the two head ... | 23.772727 | 85 | 0.66826 |
5fd396d0021e81c309c599e9fe9352825ec9f5e4 | 834 | py | Python | watchlist_app/tests/factories.py | attachemd/moviedb | c2e3b7bc3c1537c64834c2ee94492122dafdfcd4 | [
"MIT"
] | null | null | null | watchlist_app/tests/factories.py | attachemd/moviedb | c2e3b7bc3c1537c64834c2ee94492122dafdfcd4 | [
"MIT"
] | null | null | null | watchlist_app/tests/factories.py | attachemd/moviedb | c2e3b7bc3c1537c64834c2ee94492122dafdfcd4 | [
"MIT"
] | null | null | null | import factory
from django.utils import timezone
from faker import Faker
from datetime import datetime
from core.models import WatchListModel, StreamPlatformModel
faker = Faker()
class StreamPlatformFactory(factory.django.DjangoModelFactory):
class Meta:
model = StreamPlatformModel
name = faker.compa... | 27.8 | 77 | 0.703837 |
f2e40b356a756c3c30af5a22f1364ccdf83a062b | 4,403 | py | Python | module/classification_package/src/dataset.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | 1 | 2022-01-03T14:00:17.000Z | 2022-01-03T14:00:17.000Z | module/classification_package/src/dataset.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | null | null | null | module/classification_package/src/dataset.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | 1 | 2021-12-21T09:50:53.000Z | 2021-12-21T09:50:53.000Z | import pandas as pd
import numpy as np
import os.path
import torch
import os
from PIL import Image
from torch.utils.data import DataLoader
from torch.utils.data.dataset import Dataset
from torch.utils.data.sampler import BatchSampler
from module.classification_package.src.utils import read_json
class FishialDataset(... | 39.666667 | 152 | 0.614127 |
0851dd2bf0da8eb06b5651746bb5bc70ca4b488f | 2,642 | py | Python | checks/charset.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 19 | 2018-04-20T11:03:41.000Z | 2022-01-12T20:58:56.000Z | checks/charset.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 160 | 2018-04-05T16:12:59.000Z | 2022-03-01T13:01:27.000Z | checks/charset.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 8 | 2018-11-05T13:07:57.000Z | 2021-06-11T11:46:43.000Z | """
Checks which character set a page has.
TODO: Check for http-equiv meta tags like
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
"""
import logging
from bs4 import BeautifulSoup
from checks.abstract_checker import AbstractChecker
class Checker(AbstractChecker):
def __init__... | 33.871795 | 138 | 0.598032 |
4b6edd5f4a4049ab04da56bf174b3d264ddd3006 | 1,922 | py | Python | back-end/src/analysis/db_con.py | akshah/iodb | 80fbad1cb639e2cad304d6565cf4918ee5b4e4c0 | [
"Apache-2.0"
] | null | null | null | back-end/src/analysis/db_con.py | akshah/iodb | 80fbad1cb639e2cad304d6565cf4918ee5b4e4c0 | [
"Apache-2.0"
] | null | null | null | back-end/src/analysis/db_con.py | akshah/iodb | 80fbad1cb639e2cad304d6565cf4918ee5b4e4c0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import MySQLdb
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
from scipy.optimize import curve_fit
def standard(data):
mean=np.mean(data)
std=np.std(data)
return (data - mean)/std
db = MySQLdb.connect(host="proton.netsec.colostate.edu", # your host, usually loc... | 24.025 | 316 | 0.707596 |
6a5f46be0091d62d1dc2c35fcb9c644dafdb9aa8 | 848 | py | Python | exercises/pt/test_02_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/test_02_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/test_02_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | def test():
assert "token_texts" not in __solution__, "Você removeu a variável token_texts?"
assert "pos_tags" not in __solution__, "Você removeu a variável pos_tags?"
assert (
"token.pos_ ==" in __solution__
), "Você está verificando se a classe gramatical do token é um substantivo próprio?"
... | 53 | 90 | 0.683962 |
7c841bffde0648781944de2674e9d32dd1e4088f | 71 | py | Python | config/__init__.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | config/__init__.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | config/__init__.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | from .config import RelayConfig, DmxConfig, GeneralConfig, AudioConfig
| 35.5 | 70 | 0.84507 |
7cee4fc4251ed0ba1de97a71f4e14757571388b3 | 1,241 | py | Python | SearchCAM-main/searchCAM.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | SearchCAM-main/searchCAM.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | SearchCAM-main/searchCAM.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/env python3
#-*- coding: utf-8 -*-
#https://github.com/AngelSecurityTeam/SearchCAM
import requests
from bs4 import BeautifulSoup
import re , colorama
colorama.init()
def bann():
print("""
\033[1;31m
____ __ ________ __ ___
/ __/__ ___ _________/ / / ___/ _ | / |/ /
_\ \/ -_)... | 26.404255 | 64 | 0.526994 |
864c3eae1ac125690bac8bec6181fe50a355c356 | 1,646 | py | Python | year_3/databases_sem1/lab3/api/urls.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | year_3/databases_sem1/lab3/api/urls.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | 21 | 2020-03-24T16:26:04.000Z | 2022-02-18T15:56:16.000Z | year_3/databases_sem1/lab3/api/urls.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | from django.urls import path
import api.views as views
urlpatterns = [
path('', views.index, name='apiindex'),
# Registered views for Payrolls.
path('payrolls/', views.get_payrolls),
path('payrolls/add/', views.add_payroll),
path('payrolls/upd/<int:payroll_id>/', views.update_payroll),
path('... | 40.146341 | 68 | 0.703524 |
865266fb6acf5aa723852fd01096b261507f470e | 2,354 | py | Python | api/urls.py | scholaronroad/guts_2021_hackathon | 482b7b59317b67fc37f67f1ccfeaadbf811c00ca | [
"MIT"
] | null | null | null | api/urls.py | scholaronroad/guts_2021_hackathon | 482b7b59317b67fc37f67f1ccfeaadbf811c00ca | [
"MIT"
] | 2 | 2021-02-06T13:54:45.000Z | 2021-02-06T20:05:18.000Z | api/urls.py | scholaronroad/guts_2021_hackathon | 482b7b59317b67fc37f67f1ccfeaadbf811c00ca | [
"MIT"
] | null | null | null | from django.conf import settings
from django.contrib import admin
from django.db import router
from django.urls import include, path
from rest_framework import routers
from rest_framework.authtoken.views import obtain_auth_token
from . import views
from . import jwt_views
admin.autodiscover()
urlpatterns = [
pat... | 43.592593 | 116 | 0.725149 |
86617a51add711015d9db74769bf36de42f99ffe | 2,159 | py | Python | app/forms.py | galyeshua/Index | 96e1630efc51d2c03f2d80889dfa1d117155e2ee | [
"MIT"
] | null | null | null | app/forms.py | galyeshua/Index | 96e1630efc51d2c03f2d80889dfa1d117155e2ee | [
"MIT"
] | null | null | null | app/forms.py | galyeshua/Index | 96e1630efc51d2c03f2d80889dfa1d117155e2ee | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import FormField, Form, StringField, PasswordField, SubmitField
from app.fields import UnorderedFieldList
from wtforms.validators import DataRequired, ValidationError, URL, length, EqualTo
from flask_wtf.file import FileField, FileRequired
from app.models import User
class... | 35.393443 | 98 | 0.728115 |
8683514398752920cad35e0e40cccf88ee3c5913 | 393 | py | Python | python/DfsBfs/dfs.py | dongjundev/Programmers-Algorithm | 11e3fd5cb5bb194fbc2d40e505d31972a515e3e4 | [
"MIT"
] | null | null | null | python/DfsBfs/dfs.py | dongjundev/Programmers-Algorithm | 11e3fd5cb5bb194fbc2d40e505d31972a515e3e4 | [
"MIT"
] | null | null | null | python/DfsBfs/dfs.py | dongjundev/Programmers-Algorithm | 11e3fd5cb5bb194fbc2d40e505d31972a515e3e4 | [
"MIT"
] | null | null | null | # DFS algorithm
def dfs(graph, start, visited=None):
if visited is None:
visited = set()
visited.add(start)
print(start)
for next in graph[start] - visited:
dfs(graph, next, visited)
return visited
graph = {'0': set(['1', '2']),
'1': set(['0', '3', '4']),
'2': set(['0'])... | 19.65 | 38 | 0.483461 |
86ae681ee9e9c04cb0b0a1efbb65bfda5f925b2d | 94 | py | Python | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/46_47_ 48_49_50_51_funcoes_2/ex2.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/46_47_ 48_49_50_51_funcoes_2/ex2.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/46_47_ 48_49_50_51_funcoes_2/ex2.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | """
Soma entre 3 valores
"""
def soma(n1, n2, n3):
print(n1 + n2 + n3)
soma(5, 5, 10)
| 8.545455 | 23 | 0.521277 |
86d309187ab286f6c4a56fa68edf4b5b20a8c1a6 | 351 | py | Python | 04_SQL/commerce/auctions/migrations/0002_auto_20201103_1448.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | 04_SQL/commerce/auctions/migrations/0002_auto_20201103_1448.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | 04_SQL/commerce/auctions/migrations/0002_auto_20201103_1448.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-11-03 14:48
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('auctions', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='listing',
old_name='users',
new... | 18.473684 | 47 | 0.569801 |
8105e1a96344159d973e20de844a029a0dd2570a | 2,110 | py | Python | frappe-bench/apps/erpnext/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/hr/report/employee_leave_balance/employee_leave_balance.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
from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext.hr.doctype.leave_application.leave_application \
import get_leave_allocation_records, get_leave_balance... | 35.166667 | 149 | 0.736967 |
d4da25d2877a201b21fee17dfffd14204f5b98ba | 4,958 | py | Python | resources/mechanics_lib/Brains.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 7 | 2016-01-20T02:33:00.000Z | 2021-02-04T04:06:57.000Z | resources/mechanics_lib/Brains.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | null | null | null | resources/mechanics_lib/Brains.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
from api.edge import Flat
from EBrain import EBrain
class Brains(Component):
def defComponents(self):
self.addSubcomponent("brain", "RectBeam")
self.addSubcomponent("prog", "RectBeam")
self.addSubcomponent("bt", "RectBeam")
self.addSubcomponent("rest", "RectBeam")
... | 37.278195 | 106 | 0.634127 |
07e9a914d13f7e3d8cab5942e1de2612f068ddcf | 4,805 | py | Python | projekte_ss2017/AktienkursAnalyst_Jeremy_Tobias/AktienkursAnalyst.py | krother/python_abv_zedat | 1e2e1fe16da6612c470f06f519cd053c567e0611 | [
"MIT"
] | 1 | 2019-03-04T20:09:26.000Z | 2019-03-04T20:09:26.000Z | projekte_ss2017/AktienkursAnalyst_Jeremy_Tobias/AktienkursAnalyst.py | krother/python_abv_zedat | 1e2e1fe16da6612c470f06f519cd053c567e0611 | [
"MIT"
] | null | null | null | projekte_ss2017/AktienkursAnalyst_Jeremy_Tobias/AktienkursAnalyst.py | krother/python_abv_zedat | 1e2e1fe16da6612c470f06f519cd053c567e0611 | [
"MIT"
] | null | null | null | #Aktienkurse abrufen, darstellen und analysieren am Beispiel der DAX30 Unternehmen.
import os
import pandas as pd
import pandas_datareader as pdr
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from datetime import datetime
from statsmodels.tsa.arima_model import ARIMA
from statsmodels.g... | 38.75 | 107 | 0.71717 |
ed377139eb8194672c28579dd9292cdba05464a3 | 729 | py | Python | lib/rle.py | liushrui/dsb | eacbe770acf32023029eb89dcc7829af89b09132 | [
"MIT"
] | null | null | null | lib/rle.py | liushrui/dsb | eacbe770acf32023029eb89dcc7829af89b09132 | [
"MIT"
] | null | null | null | lib/rle.py | liushrui/dsb | eacbe770acf32023029eb89dcc7829af89b09132 | [
"MIT"
] | null | null | null | import numpy as np
from skimage.morphology import label # label regions
def rle_encoding(x):
'''
x: numpy array of shape (height, width), 1 - mask, 0 - background
Returns run length as list
'''
dots = np.where(x.T.flatten()==1)[0] # .T sets Fortran order down-then-right
run_lengths =... | 30.375 | 81 | 0.593964 |
92cc61af75f7b2f8a5acd32e8834701ccb2ca840 | 951 | py | Python | comp/zenefits/skype/MaxSubseqMatching.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2017-05-18T06:11:02.000Z | 2017-05-18T06:11:02.000Z | comp/zenefits/skype/MaxSubseqMatching.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | comp/zenefits/skype/MaxSubseqMatching.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | def ismatched(word, p, k):
pk = ''
for c in p:
pk += c * k
i, j = 0, 0
while i < len(pk) and j < len(word):
if pk[i] == word[j]:
i += 1
j += 1
else:
j += 1
if i < len(pk):
return False
return True
def maxmatch(word, p):
... | 18.647059 | 47 | 0.452156 |
13af6229c40e158701e24a6d90b94ec000ad7814 | 156 | py | Python | apps/principal/admin.py | Cesar0510/lbzproject | c197875488cfb10cd35890bcdc0dcc60adf8af76 | [
"Apache-2.0"
] | null | null | null | apps/principal/admin.py | Cesar0510/lbzproject | c197875488cfb10cd35890bcdc0dcc60adf8af76 | [
"Apache-2.0"
] | null | null | null | apps/principal/admin.py | Cesar0510/lbzproject | c197875488cfb10cd35890bcdc0dcc60adf8af76 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import Asesor, Cliente
# Register your models here.
admin.site.register(Cliente)
admin.site.register(Asesor)
| 22.285714 | 35 | 0.807692 |
13c09c20941a7f160b797afc6adf420375d8309f | 281 | py | Python | start_game.py | Apo-lo/Muehle_gegen_Horst | 7d5548266082ea0d10358122e0d8bc28abb49b64 | [
"MIT"
] | null | null | null | start_game.py | Apo-lo/Muehle_gegen_Horst | 7d5548266082ea0d10358122e0d8bc28abb49b64 | [
"MIT"
] | null | null | null | start_game.py | Apo-lo/Muehle_gegen_Horst | 7d5548266082ea0d10358122e0d8bc28abb49b64 | [
"MIT"
] | null | null | null | # start_game.py
import draw_playboard as draw
import yolo5
import threading
threading._start_new_thread(yolo5.start_yolo5, ("yolo5",5))
window = draw.generate_window()
draw.globalwindow = window
board = draw.playboard()
draw.draw_buttons(board, window)
print("Program finished") | 21.615385 | 59 | 0.797153 |
b9696a91e595d144df10225fe1e325b6ab1827f3 | 5,822 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/net_tools/exoscale/exo_dns_domain.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/net_tools/exoscale/exo_dns_domain.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/net_tools/exoscale/exo_dns_domain.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2016, René Moser <mail@renemoser.net>
# 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',
... | 27.592417 | 136 | 0.575575 |
b987bef56b56ecab1eebf8a4a80f84c5c0b6cbc5 | 522 | py | Python | rabbitmq/tutorial/receive.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | rabbitmq/tutorial/receive.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | rabbitmq/tutorial/receive.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import pika
credentials = pika.PlainCredentials('admin', '1q2w3e')
parameters = pika.ConnectionParameters('192.168.1.197', 5672, '/', credentials)
connection = pika.BlockingConnection(parameters)
channel = connection.channel()
channel.queue_declare(queue='hello')
def callback(ch, method, properties, body):
prin... | 26.1 | 79 | 0.745211 |
6a27b631dcaade30b181148d2cb7a97e457b803c | 2,570 | py | Python | programs/genesis_util/remove.py | ypenghui6test/cocos-mainnet | 2dbfa903a6dceb3d3ec421481aa4b8c3896dcbe7 | [
"MIT"
] | 29 | 2021-02-04T22:26:34.000Z | 2021-02-18T17:31:13.000Z | programs/genesis_util/remove.py | CocosBlockchainExpedition/cocos-mainnet | e0dc376c191f9b18a3a86f7705bfd0e0ca67cb5b | [
"MIT"
] | 3 | 2020-02-10T11:06:02.000Z | 2020-03-18T07:24:08.000Z | programs/genesis_util/remove.py | CocosBlockchainExpedition/cocos-mainnet | e0dc376c191f9b18a3a86f7705bfd0e0ca67cb5b | [
"MIT"
] | 3 | 2019-12-11T07:16:41.000Z | 2019-12-12T09:37:05.000Z | #!/usr/bin/env python3
import argparse
import json
import sys
def dump_json(obj, out, pretty):
if pretty:
json.dump(obj, out, indent=2, sort_keys=True)
else:
json.dump(obj, out, separators=(",", ":"), sort_keys=True)
return
def main():
parser = argparse.ArgumentParser(description="Rem... | 35.694444 | 119 | 0.629183 |
e05d5c82b91a7aedb565236649f3c8ff602fd449 | 31 | py | Python | hmtoinflux/__main__.py | debauer/HomematicToInflux | 233a837f0da031f331d771f0e6f7b55f488cd747 | [
"MIT"
] | 1 | 2022-02-28T12:06:59.000Z | 2022-02-28T12:06:59.000Z | hmtoinflux/__main__.py | debauer/HomematicToInflux | 233a837f0da031f331d771f0e6f7b55f488cd747 | [
"MIT"
] | null | null | null | hmtoinflux/__main__.py | debauer/HomematicToInflux | 233a837f0da031f331d771f0e6f7b55f488cd747 | [
"MIT"
] | null | null | null | from .core import Core
Core()
| 7.75 | 22 | 0.709677 |
161124cb5c8f7c13dd02d71cbe6142b381debf00 | 129 | py | Python | python_gui_tkinter/KALU/GARBAGE1/ALLOUTDATED/TESTING2/TEST/pckfrgt.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/KALU/GARBAGE1/ALLOUTDATED/TESTING2/TEST/pckfrgt.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/KALU/GARBAGE1/ALLOUTDATED/TESTING2/TEST/pckfrgt.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | from tkinter import *
root = Tk()
b = Button(root, text="Delete me", command=lambda: b.pack_forget())
b.pack()
root.mainloop() | 16.125 | 67 | 0.682171 |
164665f3e78f00f24e325cecd7d37f00d010346e | 3,272 | py | Python | rasa/nlu/tokenizers/whitespace_tokenizer.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 37 | 2019-06-07T07:39:00.000Z | 2022-01-27T08:32:57.000Z | rasa/nlu/tokenizers/whitespace_tokenizer.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 209 | 2020-03-18T18:28:12.000Z | 2022-03-01T13:42:29.000Z | rasa/nlu/tokenizers/whitespace_tokenizer.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 65 | 2019-05-21T12:16:53.000Z | 2022-02-23T10:54:15.000Z | from typing import Any, Dict, List, Text
import regex
import re
import rasa.shared.utils.io
from rasa.shared.constants import DOCS_URL_COMPONENTS
from rasa.nlu.tokenizers.tokenizer import Token, Tokenizer
from rasa.shared.nlu.training_data.message import Message
class WhitespaceTokenizer(Tokenizer):
defaults =... | 34.083333 | 134 | 0.588936 |
4c0786756d21c3565ee32fa6708906282319cf84 | 1,059 | py | Python | 0_homeworks/Python/Console/5/ServerShell.py | Team-on/works | 16978b61c0d6bcb37e910efb4b5b80e9a2460230 | [
"MIT"
] | 10 | 2018-11-12T19:43:28.000Z | 2020-09-09T18:48:30.000Z | 0_homeworks/Python/Console/5/ServerShell.py | Team-on/works | 16978b61c0d6bcb37e910efb4b5b80e9a2460230 | [
"MIT"
] | null | null | null | 0_homeworks/Python/Console/5/ServerShell.py | Team-on/works | 16978b61c0d6bcb37e910efb4b5b80e9a2460230 | [
"MIT"
] | null | null | null | class Server:
name="Name"
ip="127.0.0.1"
hddSize=100
def TurnOn(self, newIp):
self.ip = newIp
print("New ip: ", self.ip)
print("Avaliable space: ", self.hddSize)
def TurnOff(self):
ip = "127.0.0.1"
def Calculations(self):
if self.ip != "127.0.0.1":
... | 21.18 | 60 | 0.525024 |
4c3ceaac1921b35e449f4c09b85195801bc6d7d1 | 6,656 | py | Python | tests/onegov/town6/test_layout.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/town6/test_layout.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/town6/test_layout.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from datetime import datetime
import morepath
from onegov.core.elements import Link
from onegov.core.utils import Bunch
from onegov.page import Page
from onegov.town6 import TownApp
from onegov.town6.layout import DefaultLayout, PageLayout, EventBaseLayout
import onegov.core
import onegov.org
import more.transaction
... | 27.966387 | 74 | 0.605319 |
e6bc11c32e803c38dc48efa78ac94ff866441e05 | 301 | py | Python | ___Python/Michael/p06_persistence/m02_json.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Michael/p06_persistence/m02_json.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Michael/p06_persistence/m02_json.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | import json
# from bson import json_util
from p01_kennenlernern.m01_kennenlernen import teilnehmerliste
with open("teilnehmer.json", "w") as datei:
json.dump(teilnehmerliste, datei, default=str)
with open("teilnehmer.json", "r") as datei:
liste = json.load(datei)
print(liste)
| 23.153846 | 63 | 0.72093 |
5d86a96f392f8b33805fe2506365e769ceaa5c56 | 2,646 | py | Python | rmpflow_using_class/simu_main.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | rmpflow_using_class/simu_main.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | rmpflow_using_class/simu_main.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | """メインのやつ
.baxter
"""
import numpy as np
from scipy.integrate import solve_ivp
from math import cos, sin, tan, pi
#import itertools
import csv
import matplotlib.pyplot as plt
import matplotlib.animation as anm
from mpl_toolkits.mplot3d import Axes3D
#import matplotlib.patches as patches
import time
# 自作
import rmp_t... | 22.423729 | 110 | 0.536281 |
5d9a92961dfb077bef68bc9d7acbe6220ee655e0 | 844 | py | Python | backend/apps/mapview/utils.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | 3 | 2020-03-27T20:39:31.000Z | 2020-03-31T20:24:55.000Z | backend/apps/mapview/utils.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | 21 | 2020-03-28T09:57:15.000Z | 2020-03-31T11:38:00.000Z | backend/apps/mapview/utils.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | null | null | null | import csv
from os.path import dirname, abspath, join
from math import radians, sin, cos, asin, sqrt
import json
current_location = dirname(abspath(__file__))
with open(join(current_location, "files/plzs_merged.json")) as f:
plzs = json.loads(f.read())
def haversine(lon1, lat1, lon2, lat2):
lon1, lat1, lon2... | 28.133333 | 71 | 0.648104 |
54ef5d9e3c3e1950c485e73b874491ef279379a4 | 12,930 | py | Python | mltrain-nips-2017/lu_jensen/visdial_workshop.pytorch/eval/eval_all.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 123 | 2017-10-05T00:29:34.000Z | 2022-03-28T14:16:06.000Z | mltrain-nips-2017/lu_jensen/visdial_workshop.pytorch/eval/eval_all.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 13 | 2017-10-23T09:33:33.000Z | 2022-01-05T09:42:29.000Z | mltrain-nips-2017/lu_jensen/visdial_workshop.pytorch/eval/eval_all.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 37 | 2017-10-06T09:47:05.000Z | 2020-06-27T21:06:01.000Z | from __future__ import print_function
import argparse
import os
import random
import sys
sys.path.append(os.getcwd())
import pdb
import time
import numpy as np
import json
import progressbar
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.parallel
import torch.backends.cudnn as cudn... | 38.482143 | 120 | 0.630394 |
db5a4a8d6c24532a48dad29d1bc5483efabd7de0 | 172 | py | Python | Python/Random/File-Handling/03-tell-and-seek.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Random/File-Handling/03-tell-and-seek.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Random/File-Handling/03-tell-and-seek.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | with open("text.txt", 'r') as file:
print(file.read(10))
print(file.tell())
file.seek(0)
print(file.read(10))
file.seek(3)
print(file.read(1))
| 13.230769 | 35 | 0.563953 |
9172410c6fb86e4600b1169eba50de79941f41ab | 879 | py | Python | python/gdal_cookbook/cookbook_general/install_error_handler.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/gdal_cookbook/cookbook_general/install_error_handler.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/gdal_cookbook/cookbook_general/install_error_handler.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import sys
try:
from osgeo import ogr, osr, gdal
except:
sys.exit('ERROR: cannot find GDAL/OGR modules')
# example GDAL error handler function
def gdal_error_handler(err_class, err_num, err_msg):
errtype = {
gdal.CE_None: 'None',
gdal.CE_Debug: 'Debug',
gdal.CE_Warning: 'Warning',
... | 27.46875 | 52 | 0.640501 |
f415839621598e8ae6207d351268c4abbe378928 | 3,336 | py | Python | src/bin/management/commands/delete_old_historie.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 1 | 2021-12-20T20:15:26.000Z | 2021-12-20T20:15:26.000Z | src/bin/management/commands/delete_old_historie.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | null | null | null | src/bin/management/commands/delete_old_historie.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | null | null | null | from django.core.management.base import BaseCommand, CommandError
from datetime import timedelta
from django.utils import timezone
from mitglieder.models import Mitglied, MitgliedAmt, MitgliedMail
class Command(BaseCommand):
help = 'Deletes all entries concerning Mitglieder from the Historie older than 5 years. I... | 60.654545 | 205 | 0.704137 |
fe4d589bc383f7230673efef37661aa54759b5e4 | 433 | py | Python | Kapitel 2/Ratespiel.py | mqng/HS-CO_WS2122_IF_FProg | b52470e0991bdbaeba22b154c4029e6cded51fd7 | [
"MIT"
] | null | null | null | Kapitel 2/Ratespiel.py | mqng/HS-CO_WS2122_IF_FProg | b52470e0991bdbaeba22b154c4029e6cded51fd7 | [
"MIT"
] | null | null | null | Kapitel 2/Ratespiel.py | mqng/HS-CO_WS2122_IF_FProg | b52470e0991bdbaeba22b154c4029e6cded51fd7 | [
"MIT"
] | null | null | null | import random
z = random.randint(0,9)
zahlErraten = False
while (zahlErraten == False):
for i in range(3):
testZahl = int(input("Versuch eine Zahl: "))
if testZahl == z:
zahlErraten = True
break
if testZahl < z:
print("Die Zahl ist größer als die Eingegebene")
... | 24.055556 | 57 | 0.602771 |
4a3566d9b5e0e1d31f98a55f29ffb0d621c5df6d | 258 | py | Python | third_party/balenaPiCam(dev)/script.py | DockerComposeFiles/ARM | b0faddb525ad134ff8c589c370d8e61ab030c216 | [
"MIT"
] | null | null | null | third_party/balenaPiCam(dev)/script.py | DockerComposeFiles/ARM | b0faddb525ad134ff8c589c370d8e61ab030c216 | [
"MIT"
] | null | null | null | third_party/balenaPiCam(dev)/script.py | DockerComposeFiles/ARM | b0faddb525ad134ff8c589c370d8e61ab030c216 | [
"MIT"
] | null | null | null | # Dieses Skript schießt ein Bild über die Raspberry Kamera und speichert es lokal.
from time import sleep
from picamera import PiCamera
camera = PiCamera()
camera.resolution = (1024, 768)
camera.start_preview()
sleep(2)
camera.capture('output2.jpg')
exit() | 23.454545 | 82 | 0.77907 |
78f2855e981a20f98ba43a44dbe12c8344d2e02b | 1,978 | py | Python | deutschland/autobahn/models/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/autobahn/models/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/autobahn/models/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
# import all models into this package
# if you have many models here with many references from one model to another this may
# raise a RecursionError
# to avoid this, import only the models that you directly need like:
# from from deutschland.autobahn.model.pet import Pet
# or import this package, but b... | 48.243902 | 88 | 0.857937 |
604a9611ddba7f250824a600c4b7cb4cdd151b80 | 14,139 | py | Python | Contrib-Inspur/openbmc/poky/bitbake/lib/layerindexlib/cooker.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Inspur/openbmc/poky/bitbake/lib/layerindexlib/cooker.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Inspur/openbmc/poky/bitbake/lib/layerindexlib/cooker.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | # Copyright (C) 2016-2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: GPL-2.0-only
#
import logging
import json
from collections import OrderedDict, defaultdict
from urllib.parse import unquote, urlparse
import layerindexlib
import layerindexlib.plugin
logger = logging.getLogger('BitBake.layerindexlib.c... | 42.20597 | 121 | 0.552302 |
1cade000fdcd53baa29f790dca792641603c4d98 | 72 | py | Python | Python/M01_ProgrammingBasics/L05_WhileLoop/Lab/Solutions/P01_ReadText.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | 1 | 2020-09-22T13:25:34.000Z | 2020-09-22T13:25:34.000Z | Python/M01_ProgrammingBasics/L05_WhileLoop/Lab/Solutions/P01_ReadText.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L05_WhileLoop/Lab/Solutions/P01_ReadText.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | 1 | 2020-10-17T09:27:46.000Z | 2020-10-17T09:27:46.000Z | text = input()
while text != "Stop":
print(text)
text = input() | 14.4 | 21 | 0.555556 |
98cb0f5368d499b52c236c96276ae4313ac7c849 | 3,702 | py | Python | Calliope-Rennspiel/Python/ki-trainieren-orange3.py | rao003/ki-in-schulen | ec7e69da6d728ce6480711b45cea0aef7796b14b | [
"MIT"
] | 10 | 2021-05-27T15:08:45.000Z | 2022-03-01T17:21:24.000Z | Calliope-Rennspiel/Python/ki-trainieren-orange3.py | telekom/ki-in-schulen | ec7e69da6d728ce6480711b45cea0aef7796b14b | [
"MIT"
] | null | null | null | Calliope-Rennspiel/Python/ki-trainieren-orange3.py | telekom/ki-in-schulen | ec7e69da6d728ce6480711b45cea0aef7796b14b | [
"MIT"
] | 3 | 2021-04-08T12:44:30.000Z | 2021-06-21T08:20:59.000Z | #
# ki-trainieren-orange3.py$
#
# (C) 2021, Christian A. Schiller, Deutsche Telekom AG
#
# Deutsche Telekom AG and all other contributors /
# copyright owners license this file to you under the
# MIT License (the "License"); you may not use this
# file except in compliance with the License.
# You may obtain a copy of t... | 32.761062 | 84 | 0.716099 |
c71f3998a63609732acd72958ba154d890b69129 | 1,063 | py | Python | leetcode/117-Populating-Next-Right-Pointers-in-Each-Node-II/PopulateNxtRightPtrsinEachNodeII_rec_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/117-Populating-Next-Right-Pointers-in-Each-Node-II/PopulateNxtRightPtrsinEachNodeII_rec_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/117-Populating-Next-Right-Pointers-in-Each-Node-II/PopulateNxtRightPtrsinEachNodeII_rec_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # Definition for binary tree with next pointer.
# class TreeLinkNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
# self.next = None
class Solution(object):
def connect(self, root):
"""
:type root: TreeLinkNode
:... | 32.212121 | 86 | 0.50047 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.