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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ddf8e771394dba3a046cff4e4cbae190e7f32598 | 8,452 | py | Python | research/cv/resnetv2_50_frn/src/resnetv2_50_frn.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/resnetv2_50_frn/src/resnetv2_50_frn.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/resnetv2_50_frn/src/resnetv2_50_frn.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... | 38.949309 | 103 | 0.62778 |
551b69587f15679b1ef17d93f97ea745f4a9f5d2 | 122 | py | Python | server/goap.py | cutec-chris/sce | da1f906ff4a049722b8968eeab8a07b411c92a8c | [
"MIT"
] | null | null | null | server/goap.py | cutec-chris/sce | da1f906ff4a049722b8968eeab8a07b411c92a8c | [
"MIT"
] | null | null | null | server/goap.py | cutec-chris/sce | da1f906ff4a049722b8968eeab8a07b411c92a8c | [
"MIT"
] | null | null | null | class Action:
def __init__(self,Name,Dependencies):
self.Dependencies = Dependencies
class Goal(Action): pass | 30.5 | 41 | 0.729508 |
c83f720c4759935ee6f31eec8dfe7e4195ea9a64 | 671 | py | Python | Packs/CommonScripts/Scripts/InRange/InRange_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/InRange/InRange_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/InRange/InRange_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 InRange import main
@pytest.mark.parametrize('left,right,expected', [
('4', '1,8', True),
('7', '-1,3', False),
])
def test_in_range(mocker, left, right, expected):
"""
Given:
- Case A: Range of 1-8 and value 4
- Case A: Range of -1-3 a... | 21.645161 | 55 | 0.590164 |
f1b0fe3f607656271df4ab27291e3beb24e0d6fe | 1,385 | py | Python | pegarat-master/pegarat.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | pegarat-master/pegarat.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | pegarat-master/pegarat.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/python
#
# Pegarat
#
import os
import time
import sys, base64, os, socket, subprocess
from _winreg import *
import librat
def autorun(tempdir, fileName, run):
os.system('copy %s %s'%(fileName,tmpdir))
key = OpenKey(HKEY_LOCAL_MACHINE,run)
runkey = []
try:
i = 0
while True:
subkey = EnumValue(key... | 22.704918 | 110 | 0.700361 |
7b07e34ba219b047f87ce645403505543b9cca2a | 829 | py | Python | marsyas-vamp/marsyas/src/marsyas_python/synth_util.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/marsyas_python/synth_util.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/marsyas_python/synth_util.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | from marsyas import *
def play_melody(network, notes = None):
if not notes:
print "Using Default Melody"
pitch = 440.0
notes = [pitch, pitch * 2, (pitch * 3)/2.0, (pitch * 5)/3.0, pitch]
bufferSize = network.getControl("mrs_natural/inSamples").to_natural()
srate = network.getContro... | 31.884615 | 85 | 0.586248 |
7b4f15d83f50aece39581e084a7ac64edbdd93d0 | 240 | py | Python | seedsource_core/interfaces/tiles/urls.py | consbio/seedsource-core | 7f8e2b5b4978dd5a56489c52df4107276f5a55e1 | [
"BSD-3-Clause"
] | 3 | 2019-08-04T21:12:28.000Z | 2020-02-05T19:46:15.000Z | seedsource_core/interfaces/tiles/urls.py | consbio/seedsource-core | 7f8e2b5b4978dd5a56489c52df4107276f5a55e1 | [
"BSD-3-Clause"
] | 24 | 2018-02-23T20:41:35.000Z | 2022-03-28T20:41:15.000Z | interfaces/tiles/urls.py | consbio/spht | 96ec6a0931851b33eace08720d4d18ab34775a52 | [
"BSD-2-Clause"
] | 1 | 2021-03-13T23:48:38.000Z | 2021-03-13T23:48:38.000Z | from django.conf.urls import url
from .views import GetImageView
urlpatterns = [
url(
r'^tiles/(?P<service_name>[\w\-/]+?)/(?P<z>\d+)/(?P<x>\d+)/(?P<y>\d+).png$', GetImageView.as_view(),
name='tiles_get_image'
)
]
| 21.818182 | 108 | 0.575 |
93a4f76f1c1e1ecccaf058f5ddda102dd3df0d6b | 373 | py | Python | RunFaster/concurrency/Code-03-Passing_Parameter_to_thread.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | RunFaster/concurrency/Code-03-Passing_Parameter_to_thread.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | RunFaster/concurrency/Code-03-Passing_Parameter_to_thread.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | '''
DEVELOPER NAME : BALAVIGNESH.M
IMPLEMENTED DATE: 16-11-2018
'''
import threading
class SingleThreadparameter:
def AddSum(self,num1,num2):
print("The Given numbers Are {x} and {y}".format(x=num1,y=num2))
print("The Result is:", num1 + num2)
single = SingleThreadparameter()
tim = threading.T... | 19.631579 | 72 | 0.689008 |
f5226b1c30cd227dc1bfe51c404d91c8b785d217 | 10,207 | py | Python | app/models/models.py | brunomileto/gamebet_website | b315569ff5c18538cbc374d19011591edb5f8b26 | [
"MIT"
] | null | null | null | app/models/models.py | brunomileto/gamebet_website | b315569ff5c18538cbc374d19011591edb5f8b26 | [
"MIT"
] | null | null | null | app/models/models.py | brunomileto/gamebet_website | b315569ff5c18538cbc374d19011591edb5f8b26 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
License: MIT
Copyright (c) 2019 - present AppSeed.us
"""
from gamebet_website.app import db
from flask_login import UserMixin
class User(UserMixin, db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
user = db.Column(db.String(64), unique=True)
... | 36.848375 | 117 | 0.686098 |
f59eeebd98b7f8a8cf9843ade228600b961393ee | 1,454 | py | Python | src/onegov/core/security/roles.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/security/roles.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/security/roles.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.framework import Framework
from onegov.core.security import Public, Personal, Private, Secret
@Framework.setting_section(section="roles")
def get_roles_setting():
""" Returns the default roles available to onegov.core applications.
Applications building on onegov.core may add more roles and ... | 26.436364 | 77 | 0.591472 |
191e9a4bfa30f99be637f79b4415d264cbf9ed05 | 2,704 | py | Python | Test/test.py | th-nuernberg/ml-cloud | 6d7527cbf6cceb7062e74dbc43d51998381aa6c8 | [
"MIT"
] | null | null | null | Test/test.py | th-nuernberg/ml-cloud | 6d7527cbf6cceb7062e74dbc43d51998381aa6c8 | [
"MIT"
] | 7 | 2020-07-19T03:29:21.000Z | 2022-03-02T06:46:12.000Z | Test/test.py | th-nuernberg/ml-cloud | 6d7527cbf6cceb7062e74dbc43d51998381aa6c8 | [
"MIT"
] | null | null | null | import requests
from RestAPI import RestAPI
import time
import sys
from testprediction import Testp
class Test:
def __init__(self):
self.__host = 'http://localhost:5000/'
self.__auth = requests.auth.HTTPBasicAuth(username='super', password='mario')
self.__api = RestAPI(domain='http://local... | 32.190476 | 119 | 0.579142 |
271388ed50d9da4ccee77d8d02bac6993006daea | 2,438 | py | Python | scripts/signal_marker_processing/data_sink.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 17 | 2021-01-18T07:27:01.000Z | 2022-03-10T12:26:21.000Z | scripts/signal_marker_processing/data_sink.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 4 | 2021-04-29T11:20:44.000Z | 2021-12-06T10:19:17.000Z | scripts/signal_marker_processing/data_sink.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 47 | 2021-01-21T08:25:22.000Z | 2022-03-21T14:28:42.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This file is part of CbM (https://github.com/ec-jrc/cbm).
# Author : Daniele Borio
# Credits : GTCAP Team
# Copyright : 2021 European Commission, Joint Research Centre
# License : 3-Clause BSD
# Created on Tue Sep 7 16:37:12 2021
class marker_sink :
"""
... | 28.022989 | 80 | 0.493437 |
2749c2d9b3dea049c6e0046472a132bc02ae3790 | 7,013 | py | Python | fa_02.py | Tocha4/-Displacement--Chromatography | 0baf4f9e2d23b39f610217b048d799c6403a259e | [
"MIT"
] | 2 | 2020-11-25T07:53:48.000Z | 2021-09-19T14:19:51.000Z | fa_02.py | Tocha4/-Displacement--Chromatography | 0baf4f9e2d23b39f610217b048d799c6403a259e | [
"MIT"
] | null | null | null | fa_02.py | Tocha4/-Displacement--Chromatography | 0baf4f9e2d23b39f610217b048d799c6403a259e | [
"MIT"
] | null | null | null | import sys
import os
from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog, QTableWidgetItem
from DC_01 import Ui_DC_MainWindow
from Calculation.sample_01 import Sample
from Calculation.column_01 import Column
from Calculation.pump_01 import Pump
from Calculation.interaction_01 import Interaction
from Ca... | 43.02454 | 129 | 0.565093 |
e31b99b760c61ae3cae3f3e85fbbf6721be7f79d | 4,170 | py | Python | packages/watchmen-model/src/watchmen_model/indicator/bucket.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-model/src/watchmen_model/indicator/bucket.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-model/src/watchmen_model/indicator/bucket.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from enum import Enum
from typing import Any, List, Literal, Optional, Union
from pydantic import BaseModel
from watchmen_model.common import BucketId, DataModel, EnumId, OptimisticLock, TenantBasedTuple
from watchmen_utilities import ArrayHelper
from .measure_method import MeasureMethod
class BucketType(str, Enum)... | 28.758621 | 101 | 0.789448 |
e31feff838e96d27ca6b67cf25b7a864ba6b3efc | 1,261 | py | Python | Packs/MailListener_-_POP3/Integrations/MailListener_POP3/MailListener_POP3_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/MailListener_-_POP3/Integrations/MailListener_POP3/MailListener_POP3_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/MailListener_-_POP3/Integrations/MailListener_POP3/MailListener_POP3_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | # -*- coding: iso-8859-1 -*-
import base64
from MailListener_POP3 import parse_mail_parts
def test_parse_mail_parts():
"""
Given
- Email data
When
- Email contains special characters
Then
- run parse_mail_parts method
- Validate The result body.
"""
class MockEmailPart:
... | 23.351852 | 71 | 0.659794 |
8ba5210aa54b17276f416d78ab51e921c074b11d | 1,304 | py | Python | v308_2/python/helmkombi4.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 2 | 2019-12-10T10:25:11.000Z | 2021-01-26T13:59:40.000Z | v308_2/python/helmkombi4.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | null | null | null | v308_2/python/helmkombi4.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 1 | 2020-12-06T21:24:58.000Z | 2020-12-06T21:24:58.000Z | import numpy as np
import matplotlib.pyplot as plt
xi, Bi = np.genfromtxt("python/helm4i.txt", unpack=True)
xa, Ba = np.genfromtxt("python/helm4a.txt", unpack=True)
i2 = 4
r = 0.0625
n = 100
xi *= 1e-2
Bi *= 1e-3
plt.plot(xa, Ba, 'k.', label='Messwerte Außen')
plt.plot(xi*1e2, Bi*1e3, 'r--', label='Messwerte Innen')... | 29.636364 | 123 | 0.592791 |
47d8bbb2c8318c1db9f91627bff7663025c0e4f3 | 13,301 | py | Python | contrib/0.挖宝行动/youzidata-机坪跑道航空器识别/src/train_yolov3.py | huaweicloud/ModelArts-Lab | 75d06fb70d81469cc23cd422200877ce443866be | [
"Apache-2.0"
] | 1,045 | 2019-05-09T02:50:43.000Z | 2022-03-31T06:22:11.000Z | contrib/0.挖宝行动/youzidata-机坪跑道航空器识别/src/train_yolov3.py | huaweicloud/ModelArts-Lab | 75d06fb70d81469cc23cd422200877ce443866be | [
"Apache-2.0"
] | 1,468 | 2019-05-16T00:48:18.000Z | 2022-03-08T04:12:44.000Z | contrib/0.挖宝行动/youzidata-机坪跑道航空器识别/src/train_yolov3.py | huaweicloud/ModelArts-Lab | 75d06fb70d81469cc23cd422200877ce443866be | [
"Apache-2.0"
] | 1,077 | 2019-05-09T02:50:53.000Z | 2022-03-27T11:05:32.000Z | # Copyright 2018 Deep Learning Service of Huawei Cloud. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | 46.670175 | 94 | 0.569807 |
7bd87f6c8e2871b8938de31fcfc9de63d7464c1f | 6,386 | py | Python | src/onegov/agency/models/ticket.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/agency/models/ticket.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/agency/models/ticket.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from cached_property import cached_property
from onegov.agency.collections import ExtendedAgencyCollection
from onegov.agency.collections import ExtendedPersonCollection
from onegov.agency.layout import AgencyLayout
from onegov.agency.layout import ExtendedPersonLayout
from onegov.agency.models import AgencyMutation
fr... | 27.765217 | 71 | 0.585343 |
d0df5652bb6b3e265635f4610887551434c8b380 | 56 | py | Python | Online-Judges/CodingBat/Python/String-01/01-hello_name.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | 3 | 2021-06-15T01:19:23.000Z | 2022-03-16T18:23:53.000Z | Online-Judges/CodingBat/Python/String-01/01-hello_name.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | Online-Judges/CodingBat/Python/String-01/01-hello_name.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | def hello_name(name):
return ("Hello"+" "+name+"!")
| 18.666667 | 33 | 0.571429 |
ef7567a18652dbd701ea9de938c252bc35ebb024 | 4,179 | py | Python | src/video_transcoding/tests/test_transcoding.py | serzh-unknown/django-video-transcoding | a9048a83ff71e214a215f271d8809f98c1db44b0 | [
"MIT"
] | null | null | null | src/video_transcoding/tests/test_transcoding.py | serzh-unknown/django-video-transcoding | a9048a83ff71e214a215f271d8809f98c1db44b0 | [
"MIT"
] | null | null | null | src/video_transcoding/tests/test_transcoding.py | serzh-unknown/django-video-transcoding | a9048a83ff71e214a215f271d8809f98c1db44b0 | [
"MIT"
] | null | null | null | from unittest import mock
import pymediainfo
from fffw.wrapper.helpers import ensure_text
from video_transcoding import transcoding
from video_transcoding.tests.base import BaseTestCase
class TranscodingTestCase(BaseTestCase):
""" Video file transcoding tests."""
# Minimal mediainfo output template to mock... | 30.727941 | 76 | 0.601579 |
ef2c436b481d5f43745b2e9973345923241bf2ae | 34,423 | py | Python | sig-contributor-experience/surveys/k8s_survey_analysis/plot_utils.py | shubham14bajpai/community | f4c7914af3132a765472090b3a03b024e7aa951e | [
"Apache-2.0"
] | 9,963 | 2016-05-03T08:34:46.000Z | 2022-03-31T16:28:24.000Z | sig-contributor-experience/surveys/k8s_survey_analysis/plot_utils.py | shubham14bajpai/community | f4c7914af3132a765472090b3a03b024e7aa951e | [
"Apache-2.0"
] | 6,434 | 2016-05-11T16:11:43.000Z | 2022-03-31T23:40:33.000Z | sig-contributor-experience/surveys/k8s_survey_analysis/plot_utils.py | shubham14bajpai/community | f4c7914af3132a765472090b3a03b024e7aa951e | [
"Apache-2.0"
] | 5,067 | 2016-05-04T21:46:00.000Z | 2022-03-31T15:00:56.000Z | from textwrap import wrap
import math
import plotnine as p9
import pandas as pd
import textwrap
from textwrap import shorten
from matplotlib import pyplot as plt
from copy import copy
from mizani.palettes import brewer_pal
from plotnine.scales.scale import scale_discrete
# Custom scales for plotnine that reverse the... | 33.452867 | 107 | 0.578334 |
328ee30847d59f18070f87a66679745068af8217 | 3,383 | py | Python | src/onegov/winterthur/directory_search_widgets.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/winterthur/directory_search_widgets.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/winterthur/directory_search_widgets.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from cached_property import cached_property
from elasticsearch_dsl.query import MultiMatch
from onegov.core.templates import render_macro
from onegov.directory import DirectoryEntry
from onegov.form import as_internal_id
from onegov.org.models.directory import ExtendedDirectoryEntryCollection
from onegov.winterthur.app... | 28.669492 | 77 | 0.592965 |
089444f89c7bb194c1c3892a8cb9959479d9fc85 | 1,046 | py | Python | backend/songwriter/migrations/0020_auto_20171208_1831.py | giliam/turbo-songwriter | 3d100b08dc19c60d7a1324120e06bd9f971eea5a | [
"MIT"
] | null | null | null | backend/songwriter/migrations/0020_auto_20171208_1831.py | giliam/turbo-songwriter | 3d100b08dc19c60d7a1324120e06bd9f971eea5a | [
"MIT"
] | 12 | 2017-09-25T20:13:29.000Z | 2020-02-12T00:12:41.000Z | backend/songwriter/migrations/0020_auto_20171208_1831.py | giliam/turbo-songwriter | 3d100b08dc19c60d7a1324120e06bd9f971eea5a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-12-08 17:31
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('songwriter', '0019_auto_20171207_2225'),
]
operati... | 32.6875 | 135 | 0.631931 |
f5c1bda13aa53639cc50f9628e3cfc2fa9684fa9 | 1,815 | py | Python | tests/test_sigmoidparameter.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_sigmoidparameter.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_sigmoidparameter.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | from decimal import Decimal
import pytest # type:ignore[import]
from bo4e.com.sigmoidparameter import Sigmoidparameter, SigmoidparameterSchema
from tests.serialization_helper import assert_serialization_roundtrip # type:ignore[import]
# this sigmoid parameter can be imported by other tests
example_sigmoidparameter... | 31.842105 | 111 | 0.61708 |
723a3421d9389ef554e51e76374b32a2e68c40d5 | 7,198 | py | Python | World-master/Cloning.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | World-master/Cloning.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | World-master/Cloning.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/python2
#coding=utf-8
#The Credit For This Code Goes To VivekChandel
#If You Wanna Take Credits For This Code, Please Look Yourself Again...
#Reserved2020
import os,sys,time,datetime,random,hashlib,re,threading,json,urllib,cookielib,requests,mechanize
from multiprocessing.pool import ThreadPool
fr... | 38.698925 | 203 | 0.505835 |
19f9594c58964c10e4c3ee22e2b697fc8416a7e6 | 2,348 | py | Python | python/FunCom.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2017-12-12T13:58:08.000Z | 2017-12-12T13:58:08.000Z | python/FunCom.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | null | null | null | python/FunCom.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2019-11-03T10:16:35.000Z | 2019-11-03T10:16:35.000Z | """Function common
A collection of more or less well documented function for common usage
This should always be subject to
python -m pydoc -w FunCom
wrote FunCom.html
"""
def find_between(s, first, last):
try:
start = s.index( first ) + len( first )
end = s.index( last, start )
return s[st... | 38.491803 | 221 | 0.681857 |
dfa5cfdf562aff3f45e7cd1309aee8201479b148 | 94 | py | Python | app/freelancer/apps.py | mshirzad/find-my-job | 7dca88d6233649952f0b948156a91af5b96352ff | [
"MIT"
] | null | null | null | app/freelancer/apps.py | mshirzad/find-my-job | 7dca88d6233649952f0b948156a91af5b96352ff | [
"MIT"
] | null | null | null | app/freelancer/apps.py | mshirzad/find-my-job | 7dca88d6233649952f0b948156a91af5b96352ff | [
"MIT"
] | 1 | 2022-03-06T17:44:49.000Z | 2022-03-06T17:44:49.000Z | from django.apps import AppConfig
class JobseekerConfig(AppConfig):
name = 'freelancer'
| 15.666667 | 33 | 0.765957 |
e4e6e17a91aef0822fd6977bdb821ea79071002a | 4,568 | py | Python | DNSlookup.py | alexanderKalb/dns_portscan_json_python | af2b9e0c877c6fb2547910106697adee435bc34b | [
"MIT"
] | 2 | 2020-01-10T14:02:12.000Z | 2020-09-09T13:48:34.000Z | DNSlookup.py | alexanderKalb/dns_portscan_json_python | af2b9e0c877c6fb2547910106697adee435bc34b | [
"MIT"
] | null | null | null | DNSlookup.py | alexanderKalb/dns_portscan_json_python | af2b9e0c877c6fb2547910106697adee435bc34b | [
"MIT"
] | 1 | 2020-10-14T13:13:22.000Z | 2020-10-14T13:13:22.000Z | # dnspython und nmap Bibliotheken einbinden
import sys
import json
import dns.resolver
import nmap
# Suchbegriffe für DNS-Suche ohne TXT
dnsKeys = {"A": "IPv4", "AAAA": "IPv6", "CNAME": "CNAME", "MX": "MX", "NS": "NS", "PTR": "PTR",
"SRV": "SRV", "SOA": "SOA"}
ipListe = []
Scanner = nmap.PortSca... | 50.197802 | 116 | 0.467163 |
4b6018fb21a30f2ba54263bdefd6b478b5e4f6b2 | 2,766 | py | Python | test/test_npu/test_network_ops/test_narrow_copy.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_narrow_copy.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_narrow_copy.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 37.890411 | 102 | 0.649313 |
4b7359d6aec95b20ca2af0029eaf57fad93da405 | 1,102 | py | Python | python_gui_tkinter/KALU/GARBAGE1/SAFE26JUL/GRBG/notebook.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/KALU/GARBAGE1/SAFE26JUL/GRBG/notebook.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/KALU/GARBAGE1/SAFE26JUL/GRBG/notebook.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | #!/usr/bin/python
from tkinter import *
from tkinter import ttk
import tkinter as tk
main = Tk()
main.title('Notebook Demo')
main.geometry('500x500')
# gives weight to the cells in the grid
rows = 0
while rows < 50:
main.rowconfigure(rows, weight=1)
main.columnconfigure(rows, weight=1)
rows += 1
#... | 26.878049 | 66 | 0.696007 |
8a7b2fb465b172798b521d2bc59b84fc5680148e | 4,750 | py | Python | 3rdparty/webkit/Tools/glib/common.py | mchiasson/PhaserNative | f867454602c395484bf730a7c43b9c586c102ac2 | [
"MIT"
] | null | null | null | 3rdparty/webkit/Tools/glib/common.py | mchiasson/PhaserNative | f867454602c395484bf730a7c43b9c586c102ac2 | [
"MIT"
] | null | null | null | 3rdparty/webkit/Tools/glib/common.py | mchiasson/PhaserNative | f867454602c395484bf730a7c43b9c586c102ac2 | [
"MIT"
] | 1 | 2019-01-25T13:55:25.000Z | 2019-01-25T13:55:25.000Z | #!/usr/bin/env python
# Copyright (C) 2011 Igalia S.L.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This... | 31.456954 | 105 | 0.656842 |
0a3fea5473a485183a8f7dd167b793700fc78aea | 3,360 | py | Python | fhirclient/r4models/flag.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | fhirclient/r4models/flag.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | fhirclient/r4models/flag.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/Flag) on 2019-05-07.
# 2019, SMART Health IT.
from . import domainresource
class Flag(domainresource.DomainResource):
""" Key information to flag to healthcare providers.
... | 36.129032 | 102 | 0.599107 |
0a4adb96db8481e8811eccde84d602764a9993d7 | 1,255 | py | Python | MD.py | Berni1557/MDDoc | 06dd3cae302e6f125ebfbb2fc513bb754d72f07d | [
"BSD-3-Clause"
] | null | null | null | MD.py | Berni1557/MDDoc | 06dd3cae302e6f125ebfbb2fc513bb754d72f07d | [
"BSD-3-Clause"
] | null | null | null | MD.py | Berni1557/MDDoc | 06dd3cae302e6f125ebfbb2fc513bb754d72f07d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from CommandExecuter import CommandExecuter
welcomestr=" \
MDDoc is a markdown based documentation tool. \n \
Example of usage: \n \
python main.py -c GRAPHML -i D:\Entwicklerrunde\MDDoc\Graph\A5-Docu\A5-Docu.md -o D:\Entwicklerrunde\MDDoc\Graph\A5-Docu\grapp123.graphml \n \
python main.py -c ... | 48.269231 | 142 | 0.740239 |
0a591f1676722b1345218f7b96b15c6a534a8a6d | 1,430 | py | Python | fraudulent-activity-notifications.py | kautuk-desai/HackerRank | 6c0b22800ea2e40d118d6a0a5c0ece067a0a69bf | [
"MIT"
] | null | null | null | fraudulent-activity-notifications.py | kautuk-desai/HackerRank | 6c0b22800ea2e40d118d6a0a5c0ece067a0a69bf | [
"MIT"
] | null | null | null | fraudulent-activity-notifications.py | kautuk-desai/HackerRank | 6c0b22800ea2e40d118d6a0a5c0ece067a0a69bf | [
"MIT"
] | null | null | null | #!/bin/python3
import sys
import bisect
def countSort(arr):
count_arr = [0]*201
for ele in arr:
count_arr[ele] += 1
return count_arr
def getMedian(w, d):
index, li, lo = 0, 0, 0
if d%2 != 0:
for j in range(201):
index += w[j]
if index... | 22.698413 | 60 | 0.456643 |
7c237c63b75defa733591d8fc7f7d19a8701bd85 | 12,037 | py | Python | oneflow/python/ops/get_variable.py | Ldpe2G/oneflow | 69febbe613c1dcc3aed1652a37e4ec7d18d2f1ba | [
"Apache-2.0"
] | 1 | 2020-12-24T09:26:36.000Z | 2020-12-24T09:26:36.000Z | oneflow/python/ops/get_variable.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | null | null | null | oneflow/python/ops/get_variable.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 33.34349 | 115 | 0.670848 |
7c55f145221057672ffc3f4c19a8c29cea7994a1 | 1,259 | py | Python | TreeModelLib/GrowthAndDeathDynamics/SimpleTest/SimpleTest.py | mcwimm/pyMANGA | 6c7b53087e53b116bb02f91c33974f3dfd9a46de | [
"MIT"
] | 1 | 2021-03-16T08:35:50.000Z | 2021-03-16T08:35:50.000Z | TreeModelLib/GrowthAndDeathDynamics/SimpleTest/SimpleTest.py | mcwimm/pyMANGA | 6c7b53087e53b116bb02f91c33974f3dfd9a46de | [
"MIT"
] | 67 | 2019-11-14T11:29:52.000Z | 2022-03-09T14:37:11.000Z | TreeModelLib/GrowthAndDeathDynamics/SimpleTest/SimpleTest.py | mcwimm/pyMANGA | 6c7b53087e53b116bb02f91c33974f3dfd9a46de | [
"MIT"
] | 6 | 2019-11-12T11:11:41.000Z | 2021-08-12T13:57:22.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@date: 2018-Today
@author: jasper.bathmann@ufz.de
"""
from TreeModelLib import TreeModel
class SimpleTest(TreeModel):
def __init__(self, args):
## SimpleTest case for death and growth dynamics. This case is
# defined to test the passing of inform... | 35.971429 | 79 | 0.647339 |
6b4af39ea25a4e68966189d079856dfbc6fe1f75 | 25 | py | Python | src/__init__.py | Somsubhra/Enrich | cf1e69b86ceb64c8b09c98b442e09c1196b50125 | [
"MIT"
] | 1 | 2015-11-30T09:27:51.000Z | 2015-11-30T09:27:51.000Z | src/__init__.py | Somsubhra/Enrich | cf1e69b86ceb64c8b09c98b442e09c1196b50125 | [
"MIT"
] | null | null | null | src/__init__.py | Somsubhra/Enrich | cf1e69b86ceb64c8b09c98b442e09c1196b50125 | [
"MIT"
] | null | null | null | __author__ = 'somsubhra'
| 12.5 | 24 | 0.76 |
8630c609557017fff68dc21603f7204b961197a9 | 12,609 | py | Python | Packs/AWS-Route53/Integrations/AWSRoute53/AWSRoute53.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/AWS-Route53/Integrations/AWSRoute53/AWSRoute53.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/AWS-Route53/Integrations/AWSRoute53/AWSRoute53.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import boto3
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
from datetime import date
AWS_DEFAULT_REGION = None
AWS_roleArn = demisto.params()['roleArn']
AWS_roleSessionName = demisto.params()['roleSessionName']
AWS_roleSessionDuration = demisto.params()['sessionDuration']
A... | 34.356948 | 127 | 0.570703 |
86690fc1f83af4c0530c28cb83f6ca405018faf0 | 723 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v9_0/update_employee_loan_details.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v9_0/update_employee_loan_details.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v9_0/update_employee_loan_details.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc('hr', 'doctype', 'salary_slip_loan')
frappe.reload_doc('hr', 'doctype', 'salary_slip')
for data in frappe.db.sql(""" select... | 28.92 | 72 | 0.744122 |
810a3cbf42811cec0a64905d13242e6ac3393f89 | 1,067 | py | Python | src/timeseries/timeseries.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | src/timeseries/timeseries.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | src/timeseries/timeseries.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | # time series
# Import Data
df = pd.read_csv("https://github.com/selva86/datasets/raw/master/economics.csv")
x = df['date']
y1 = df['psavert']
y2 = df['unemploy']
# Plot Line1 (Left Y Axis)
fig, ax1 = plt.subplots(1,1,figsize=(16,9), dpi= 80)
ax1.plot(x, y1, color='tab:red')
# Plot Line2 (Right Y Axis)
ax2 = ax1.tw... | 31.382353 | 95 | 0.707591 |
07e10e872ae673a862877bf3f756ad57f76fcd2b | 3,111 | py | Python | frappe-bench/env/lib/python2.7/site-packages/stdnum/issn.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/stdnum/issn.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/stdnum/issn.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # issn.py - functions for handling ISSNs
#
# Copyright (C) 2010-2015 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your opti... | 30.5 | 77 | 0.699454 |
1311004c4954a0ea1a5b7e3d4ca38baba9bf6bc0 | 549 | py | Python | books/PythonCleanCode/ch9_design_pattern/adapter_2.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch9_design_pattern/adapter_2.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch9_design_pattern/adapter_2.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """Clean Code in Python - Chapter 9: Common Design Patterns
> Adapter (Composition)
"""
from _adapter_base import UsernameLookup
class UserSource:
def __init__(self, username_lookup: UsernameLookup) -> None:
self.username_lookup = username_lookup
def fetch(self, user_id, username):
... | 28.894737 | 66 | 0.703097 |
13e76108bbde9f9a77e5d01d77f6e0f0b41447f6 | 1,399 | py | Python | PyStellar/stellar/Git/service/git_service.py | psgstellar/Stellar | 947d4b3d9d6b9c74d4c9ebd29683793a8d86fad2 | [
"Apache-2.0"
] | 3 | 2021-01-24T17:07:55.000Z | 2021-02-20T20:11:13.000Z | PyStellar/stellar/Git/service/git_service.py | psgstellar/Stellar | 947d4b3d9d6b9c74d4c9ebd29683793a8d86fad2 | [
"Apache-2.0"
] | 61 | 2021-01-10T12:59:01.000Z | 2021-06-24T09:19:20.000Z | PyStellar/stellar/Git/service/git_service.py | psgstellar/Stellar | 947d4b3d9d6b9c74d4c9ebd29683793a8d86fad2 | [
"Apache-2.0"
] | 1 | 2021-01-14T05:23:32.000Z | 2021-01-14T05:23:32.000Z | from Git.dao.git_dao import GitOwnerRepo
from Git.resources import git_sql
import datetime
from Git.service.git_commit_service import GitCommitCheckService
class GitRepoService:
""" Psg Git 유저 정보 서비스 """
@classmethod
def git_repo(cls):
sql_git = git_sql.git_user_owner_repo()
git = GitOwn... | 36.815789 | 106 | 0.637598 |
b92ebcec7e6ba9be386dae6fbc90f148781c9171 | 4,507 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/net/netduplicate.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/net/netduplicate.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/net/netduplicate.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2013-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.ec... | 37.558333 | 85 | 0.586199 |
b96df8899e4959add56098bc7a0e274349c7f24e | 563 | py | Python | Hackerrank_problems/Maximize_It!/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | Hackerrank_problems/Maximize_It!/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | Hackerrank_problems/Maximize_It!/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | # get inputs K and M
K, M = [int(x) for x in input().split()]
# create an empty list
arrayN = []
# get inputs, k lines where first element is ignored
for _i_ in range(K):
arrayN.append([int(x) for x in input().split()][1:])
# necessary import
from itertools import product
# find all possible combinations
possible... | 26.809524 | 75 | 0.721137 |
b9ec3dfd4b74063233022a3cbfcac4df3e544316 | 1,633 | py | Python | official/cv/resnet/src/CrossEntropySmooth.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-12-26T15:28:33.000Z | 2021-12-26T15:28:33.000Z | official/cv/resnet/src/CrossEntropySmooth.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/resnet/src/CrossEntropySmooth.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 41.871795 | 90 | 0.691978 |
9119fd6c25a254f8ef050cc6ae387ce1bfdb70af | 658 | py | Python | system/deposit.py | billalxcode/ATM-cli | 68e295b1e3c152ee5c35913af84d72468cab06e0 | [
"MIT"
] | null | null | null | system/deposit.py | billalxcode/ATM-cli | 68e295b1e3c152ee5c35913af84d72468cab06e0 | [
"MIT"
] | null | null | null | system/deposit.py | billalxcode/ATM-cli | 68e295b1e3c152ee5c35913af84d72468cab06e0 | [
"MIT"
] | null | null | null | from .database import Database
class Deposit:
def __init__(self) -> None:
self.connection = Database("database/database.db")
self.connection.connect()
def deposit(self, tujuan, nominal):
if int(nominal) > 1000000000:
print ("[INFO]: Batas deposit hanya sampai 1 Miliar")
... | 38.705882 | 92 | 0.598784 |
e6ca186e89a24adf22e4232f6c3c989faa3ab91b | 6,201 | py | Python | project/oauth2.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | null | null | null | project/oauth2.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | 35 | 2022-01-24T22:15:59.000Z | 2022-03-31T15:01:35.000Z | project/oauth2.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | null | null | null | from authlib.integrations.flask_oauth2 import AuthorizationServer, ResourceProtector
from authlib.integrations.sqla_oauth2 import (
create_bearer_token_validator,
create_query_client_func,
create_query_token_func,
create_save_token_func,
)
from authlib.oauth2.rfc6749 import grants
from authlib.oauth2.rf... | 32.809524 | 84 | 0.69392 |
0742a899927a1ea98fd0e6cad70c84175d397de0 | 1,639 | py | Python | research/cv/fairmot/src/fairmot_pose.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/fairmot/src/fairmot_pose.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/fairmot/src/fairmot_pose.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... | 30.924528 | 78 | 0.644905 |
ab1100a9f419264a7808d016c9420d0803a33617 | 2,147 | py | Python | data/combine_complete.py | codeformuenster/haushalt-muenster | 8c032c7f475b751e0372cc0b7ec5d8c26dca5ac2 | [
"Apache-2.0"
] | 1 | 2019-05-27T08:06:23.000Z | 2019-05-27T08:06:23.000Z | data/combine_complete.py | codeformuenster/haushalt-muenster | 8c032c7f475b751e0372cc0b7ec5d8c26dca5ac2 | [
"Apache-2.0"
] | 12 | 2015-03-09T20:09:56.000Z | 2020-11-03T20:20:25.000Z | data/combine_complete.py | codeformuenster/haushalt-muenster | 8c032c7f475b751e0372cc0b7ec5d8c26dca5ac2 | [
"Apache-2.0"
] | 1 | 2018-10-24T21:46:04.000Z | 2018-10-24T21:46:04.000Z | import csv
import re
product_codes1 = dict()
product_codes2 = dict()
with open('codes-2016-produktbereiche.csv', newline='', encoding='UTF-8') as csvfile:
codereader = csv.reader(csvfile, delimiter=',', quotechar='"')
# https://stackoverflow.com/questions/14257373/skip-the-headers-when-editing-a-csv-file-using-pyth... | 39.036364 | 157 | 0.715417 |
ab232ce202f8bf9dfde92d35c135d3c647e79ecb | 1,311 | py | Python | books/PythonCleanCode/ch5_decorator/decorator_parameterized_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch5_decorator/decorator_parameterized_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch5_decorator/decorator_parameterized_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """Clean Code in Python - Chapter 5: Decorators
Parameterized decorators using functions
"""
from functools import wraps
from decorator_function_1 import ControlledException
from log import logger
RETRIES_LIMIT = 3
def with_retry(retries_limit=RETRIES_LIMIT, allowed_exceptions=None):
allowed_exc... | 25.211538 | 87 | 0.660564 |
ab482256be6df92aff75d3238371d218fd7cc894 | 1,105 | py | Python | python_gui_tkinter/Tkinter/TkinterCourse/12_rad_bttn_adv.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/Tkinter/TkinterCourse/12_rad_bttn_adv.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/Tkinter/TkinterCourse/12_rad_bttn_adv.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | '''
In many cases, there are more than two radio buttons. It would be cumbersome, if we have to define and write down each button. The solution is shown in the following example. We have a list "languages", which contains the button texts and the corresponding values. We can use a for loop to create all the radio butto... | 23.510638 | 320 | 0.566516 |
91aed434f5ca48c2421c21adbb0504aec2cec5d3 | 540 | py | Python | begin-python/cp13/chapter13.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | 3 | 2021-08-04T07:59:48.000Z | 2022-03-26T23:58:17.000Z | begin-python/cp13/chapter13.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | null | null | null | begin-python/cp13/chapter13.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf8 -*-
import sqlite3, re
def convert(val):
if re.search(r'\d', val):
return float(val)
return val.strip('\n')
conn = sqlite3.connect('food4.db')
cur = conn.cursor()
cur.execute('''
CREATE TABLE food (
id TEXT PRIMARY KEY,
name TEXT,
age FLOAT,
job TEXT... | 16.875 | 43 | 0.611111 |
91b30dcfaea7f4499eb2a586759476baf81e904c | 272 | py | Python | lintcode/000-365-Count-1-in-Binary/Count1inBinary_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | lintcode/000-365-Count-1-in-Binary/Count1inBinary_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | lintcode/000-365-Count-1-in-Binary/Count1inBinary_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
# @param num: an integer
# @return: an integer, the number of ones in num
def countOnes(self, num):
# write your code here
cnt = 0
while num != 0:
cnt += num & 1
num = num >> 1
return cnt
| 24.727273 | 52 | 0.503676 |
91d5c2bdd8e4b68cd162dbf078bdcfa040745176 | 828 | py | Python | common-interface/abc.py | pysprings/beginner-talk-abc | 225c5c4872bc150370f784f6f2e374663a2f85e8 | [
"Unlicense"
] | null | null | null | common-interface/abc.py | pysprings/beginner-talk-abc | 225c5c4872bc150370f784f6f2e374663a2f85e8 | [
"Unlicense"
] | null | null | null | common-interface/abc.py | pysprings/beginner-talk-abc | 225c5c4872bc150370f784f6f2e374663a2f85e8 | [
"Unlicense"
] | null | null | null | '''
This script demonstrates the use of ABC to enforce an interface. Anyone who
uses a subclass is guaranteed that a method exists on that object.
'''
from abc import ABCMeta, abstractmethod
class MyABC(object):
__metaclass__ = ABCMeta
@abstractmethod # <-- means subclasses *MUST* override this
... | 22.378378 | 77 | 0.642512 |
534328636fa2ac522c53ae08479996f36982945b | 1,813 | py | Python | src/visitpy/examples/movingcontour.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/visitpy/examples/movingcontour.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/visitpy/examples/movingcontour.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# Test script that changes animates an isosurface by changing its iso-value.
#
# Modifications:
# Hank Childs, Tue May 7 09:27:44 PDT 2002
# Updated for 0.9.9. Made it use a file in the /data directory.
#
# Brad Whitlock, Tue Ap... | 28.777778 | 102 | 0.562052 |
534ef318626a7914196e9d98b20caacb34171a68 | 871 | py | Python | src/application/BallCounterFilter.py | florianletsch/kinect-juggling | f320cc0b55adf65d338d25986a03106a7e3f46ef | [
"Unlicense",
"MIT"
] | 7 | 2015-11-27T09:53:32.000Z | 2021-01-13T17:35:54.000Z | src/application/BallCounterFilter.py | florianletsch/kinect-juggling | f320cc0b55adf65d338d25986a03106a7e3f46ef | [
"Unlicense",
"MIT"
] | null | null | null | src/application/BallCounterFilter.py | florianletsch/kinect-juggling | f320cc0b55adf65d338d25986a03106a7e3f46ef | [
"Unlicense",
"MIT"
] | null | null | null | """
A first application example: Determine the actual number
of balls in the current juggling pattern.
"""
import math
class BallCounterFilter(object):
def __init__(self):
self.ballcounter = BallCounter()
def filter(self, rgb, depth, balls, args={}):
self.ballcounter.update(balls)
... | 29.033333 | 79 | 0.628014 |
7261183887bca0c3076211fd2121251b37e68991 | 1,013 | py | Python | s-mbf-master/src/Fadd.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 50 | 2019-03-07T16:33:01.000Z | 2022-01-05T11:13:47.000Z | s-mbf-master/src/Fadd.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 3 | 2019-03-11T08:26:38.000Z | 2019-08-08T17:39:42.000Z | s-mbf-master/src/Fadd.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 38 | 2019-03-28T16:03:38.000Z | 2021-04-01T10:40:26.000Z | #!usr/bin/python3.7
#Author: KANG-NEWBIE
#Github: https://github.com/kang-newbie
try:
import requests,json,sys,os,time
print("""
\t[ Auto add friends from friends id ]
\t [ by : KANG-NEWBIE ]
""")
toket=open('toket/token.txt','r').read()
fid=input('[!] your target id: ')
print()
if fid == '':
exit("[?] a... | 30.69697 | 191 | 0.619941 |
72de22f08fcedeac16d47dea9e2d9d81662e07e2 | 3,539 | py | Python | novel/analysis/hibiscusMain.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2017-10-23T14:58:47.000Z | 2017-10-23T14:58:47.000Z | novel/analysis/hibiscusMain.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | null | null | null | novel/analysis/hibiscusMain.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2018-04-06T07:49:18.000Z | 2018-04-06T07:49:18.000Z | #coding=utf-8
'''
Created on 2016-1-23
@author: kwsy
'''
import os
import hibiscusTools
import codecs
from xlwt import Workbook
from audioop import reverse
import sys
class Hibiscus():
def analyseNovel(self,filename):
if not os.path.exists(filename):
pass
with codecs.open(filename,en... | 36.112245 | 130 | 0.576999 |
f431043f6a0ca19e02ce76299b5adc087dc93dd4 | 28,038 | py | Python | src/onegov/form/parser/core.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/form/parser/core.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/form/parser/core.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | """ onegov.form includes it's own markdownish form syntax, inspired by
https://github.com/maleldil/wmd
The goal of this syntax is to enable the creation of forms through the web,
without having to use javascript, html or python code.
Also, just like Markdown, we want this syntax to be readable by humans.
How it work... | 26.228251 | 79 | 0.641166 |
be69416d1b304ca28b663602a4829a6d1ada6297 | 1,004 | py | Python | src/lcdoc/mkdocs/lp/plugs/python/pyplugs/lprunner/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 24 | 2021-10-04T22:11:59.000Z | 2022-02-02T21:51:43.000Z | src/lcdoc/mkdocs/lp/plugs/python/pyplugs/lprunner/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 2 | 2021-10-04T21:51:30.000Z | 2021-10-05T14:15:31.000Z | src/lcdoc/mkdocs/lp/plugs/python/pyplugs/lprunner/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | null | null | null | import os
from functools import partial
from lcdoc.const import lprunner_sep as sep
from lcdoc.mkdocs.lp.plugs import python
from lcdoc.mkdocs.tools import make_img
from lcdoc.tools import write_file
config, page, Session = (python.config, python.page, python.Session)
def register(fmts):
"""registering us as re... | 25.74359 | 79 | 0.651394 |
be7e49411994475cd506248d23225883aa424db5 | 80 | py | Python | python/data_sutram/pypath/PyPath/json_sqlite/4_get_last_update_time.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/data_sutram/pypath/PyPath/json_sqlite/4_get_last_update_time.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/data_sutram/pypath/PyPath/json_sqlite/4_get_last_update_time.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | """
GETS THE INFORMATION ABOUT THE APPLICATION
ALSO PIECE OF REDUNDANT CODE
""" | 16 | 42 | 0.7625 |
22f41227ca5522ff0c31af07e55182c3056347a6 | 9,051 | py | Python | examples/language_model/chinesebert/dataset_cmrc2018.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/language_model/chinesebert/dataset_cmrc2018.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/language_model/chinesebert/dataset_cmrc2018.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | #encoding=utf8
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless requi... | 42.492958 | 116 | 0.645122 |
fe0246f0d2fc5d98a70fdf4b460118edc9495886 | 1,025 | py | Python | Leetcode/(2) Add Two Numbers.py | MastaCoder/Projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | 5 | 2018-10-11T01:55:40.000Z | 2021-12-25T23:38:22.000Z | Leetcode/(2) Add Two Numbers.py | MastaCoder/mini_projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | null | null | null | Leetcode/(2) Add Two Numbers.py | MastaCoder/mini_projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | 1 | 2019-02-22T14:42:50.000Z | 2019-02-22T14:42:50.000Z | # https://leetcode.com/problems/add-two-numbers/
from ds import ListNode
class Solution:
def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode:
new = ListNode(None)
base = new
add = 0
while not (l1 is None and l2 is None) or add != 0:
if l1 is not None and l2 ... | 31.060606 | 68 | 0.456585 |
4a7d662707b40dd2b8368d0cb4094d1baf303da8 | 202 | py | Python | Exercicios/ex09-4c.py | BoltzBit/LP | f84d36d1bdee9a20c197cebec2810234c5311fb8 | [
"MIT"
] | null | null | null | Exercicios/ex09-4c.py | BoltzBit/LP | f84d36d1bdee9a20c197cebec2810234c5311fb8 | [
"MIT"
] | null | null | null | Exercicios/ex09-4c.py | BoltzBit/LP | f84d36d1bdee9a20c197cebec2810234c5311fb8 | [
"MIT"
] | null | null | null | #conversao de celsius para fahrenheit
celsius = float(input('Insira a temperatura em Celsius: '))
fahrenheit = (celsius*(9/5))+32
msg = 'Temperatura em Fahrenheit: {}'
print(msg.format(fahrenheit))
| 20.2 | 59 | 0.727723 |
71603529bbd866948fe33a5b5ee42b123753ac6c | 917 | py | Python | python/asyncio/example_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/asyncio/example_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/asyncio/example_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """
example_1.py
Just a short example showing synchronous running of 'tasks'
"""
import queue
def task(name, work_queue):
if work_queue.empty():
print(f'Task {name} nothing to do')
else:
while not work_queue.empty():
count = work_queue.get()
total = 0
for x... | 19.934783 | 59 | 0.535442 |
e0b91103092b8e1f1a9fdcc43c62300398e5ba98 | 294 | py | Python | Kapitel 1/Zinsen.py | mqng/HS-CO_WS2122_IF_FProg | b52470e0991bdbaeba22b154c4029e6cded51fd7 | [
"MIT"
] | null | null | null | Kapitel 1/Zinsen.py | mqng/HS-CO_WS2122_IF_FProg | b52470e0991bdbaeba22b154c4029e6cded51fd7 | [
"MIT"
] | null | null | null | Kapitel 1/Zinsen.py | mqng/HS-CO_WS2122_IF_FProg | b52470e0991bdbaeba22b154c4029e6cded51fd7 | [
"MIT"
] | null | null | null | import math
k0 = float(input("Geben Sie einen Anfangskapitalwert ein: "))
p = float(input("Geben Sie einen Zinssatz ein: "))
n = float(input("Geben Sie die Anzahl der Jahre an: "))
kn = k0 * math.pow((1+p/100.0), n)
print("Anfangskapital:", k0, "Laufzeit:", n, "Zinssatz:", p, "Stand:", kn)
| 29.4 | 74 | 0.656463 |
c70bc8c52e577ce8e021128e149d285c7642b281 | 2,353 | py | Python | WiSe-2122/Uebung-8/Bibel-Beispiel.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | 1 | 2022-03-23T09:40:39.000Z | 2022-03-23T09:40:39.000Z | WiSe-2122/Uebung-8/Bibel-Beispiel.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | WiSe-2122/Uebung-8/Bibel-Beispiel.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | # Text der Bibel lesen, Wörter zählen und als CSV ausgeben
import os
# Variablen initialisieren
woerterCounter = 0
woerterDict = {}
# Zuweisen des Verzeichnisses der geöffneten Datei
aktuelles_Verzeichnis = os.path.dirname(__file__)
print("Wir befinden uns in dem Verzeichnis: ", aktuelles_Verzeichnis)
# Dateinamen f... | 37.951613 | 131 | 0.686358 |
292aae9f892d63e5f8f45e0aadb8b987d6d13644 | 4,820 | py | Python | research/cv/LearningToSeeInTheDark/test_sony.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/LearningToSeeInTheDark/test_sony.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/LearningToSeeInTheDark/test_sony.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... | 35.182482 | 96 | 0.61639 |
3149ee416b879176059f314695fbd6d4a49e7dee | 780 | py | Python | top/clearlight/reptile/bilibili/file_read_write/File_read_write.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | 1 | 2020-01-16T09:23:43.000Z | 2020-01-16T09:23:43.000Z | top/clearlight/reptile/bilibili/file_read_write/File_read_write.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | top/clearlight/reptile/bilibili/file_read_write/File_read_write.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | import django
text = 'This is my first txt,\nThis is a new line.\nThis is last time'
print(text)
text = '''This is my first txt,
This is a new line,
This is last time.
'''
print(text)
append_text = '\nThis is appended file'
# 新建一个文件, 并写入text的内容
# open函数的参数:
# 第一个是文件
# 第二个: w - 写 a - 文本末尾追加
my_file = open('myfile.tx... | 17.727273 | 70 | 0.689744 |
31bf7cda88795de25581da2d9abaca01298a9a1c | 15,253 | py | Python | novel/swallows/engine/objects.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2017-10-23T14:58:47.000Z | 2017-10-23T14:58:47.000Z | novel/swallows/engine/objects.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | null | null | null | novel/swallows/engine/objects.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2018-04-06T07:49:18.000Z | 2018-04-06T07:49:18.000Z | # coding=utf-8
import random
from novel.swallows import Event
# ## TOPICS主题 ## #
# 主题是人物最近说的事情. 也可以是其他角色做的任何事。
class Topic(object):
def __init__(self, originator, subject=None):
self.originator = originator
self.subject = subject
# 打招呼
class GreetTopic(Topic):
pass
# 演讲
class SpeechTop... | 24.483146 | 87 | 0.581197 |
31c814785eae6bd4bba5aa47b48c9d53233f2a8f | 1,080 | py | Python | python_lessons/MtMk_Test_Files/stock_chart_plotting.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | python_lessons/MtMk_Test_Files/stock_chart_plotting.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | python_lessons/MtMk_Test_Files/stock_chart_plotting.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | import pandas_datareader as pdr
import datetime as dt
import matplotlib.pyplot as plt
from matplotlib import style
style.use('ggplot')
share = pdr.get_data_yahoo('TSLA', start = dt.datetime(2017,1,1), end = dt.datetime.today())
share['100ma'] = share['Adj Close'].rolling(window=100, min_periods=0).mean()
p... | 30.857143 | 93 | 0.548148 |
7dfaff389454ade8b88f05482fe543582b29a997 | 35,533 | py | Python | project/models.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | null | null | null | project/models.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | null | null | null | project/models.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | null | null | null | import datetime
import time
from enum import IntEnum
from authlib.integrations.sqla_oauth2 import (
OAuth2AuthorizationCodeMixin,
OAuth2ClientMixin,
OAuth2TokenMixin,
)
from dateutil.relativedelta import relativedelta
from flask import request
from flask_dance.consumer.storage.sqla import OAuthConsumerMixi... | 30.605512 | 102 | 0.654181 |
6f48984a0045de8d17ed6e79d535d02decf477c0 | 11,814 | py | Python | apps/multivers/views.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 1 | 2017-01-08T13:21:43.000Z | 2017-01-08T13:21:43.000Z | apps/multivers/views.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 17 | 2018-12-03T14:22:14.000Z | 2021-07-14T15:15:12.000Z | apps/multivers/views.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 2 | 2018-12-03T14:58:49.000Z | 2019-12-01T13:24:42.000Z | import json
from datetime import datetime
from urllib.parse import unquote
from django.contrib.auth.mixins import LoginRequiredMixin
from django.db.models import Q
from django.http import HttpResponse
from django.shortcuts import render, redirect, get_object_or_404
from django.urls import reverse
from django.urls impo... | 36.803738 | 120 | 0.676062 |
7dbf19b656d87bcc1b85a03a07975092787d87be | 1,626 | py | Python | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/cache/compiled_pipeline_cache.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/cache/compiled_pipeline_cache.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/cache/compiled_pipeline_cache.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import Optional
from cacheout import Cache
from watchmen_data_kernel.cache import CacheService, configure_cache, find_cache, InternalCache, PipelineCacheListener
from watchmen_model.admin import Pipeline
from watchmen_model.common import PipelineId
from watchmen_pipeline_kernel.pipeline_schema_interface i... | 31.269231 | 118 | 0.821648 |
7de01ed42b8879d7c9dfd230f51b89f155b40490 | 825 | py | Python | Python/Courses/Object-Oriented-Programming.Python-Engineer/04-Encapsulation.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Object-Oriented-Programming.Python-Engineer/04-Encapsulation.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Object-Oriented-Programming.Python-Engineer/04-Encapsulation.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | class SoftwareEngineer:
def __init__(self, name, age):
self.name = name
self.age = age
self.__salary = None
self.__num_bugs_solved = 0
def code(self):
self.__num_bugs_solved += 1
# getter
def get_salary(self):
return self.__salary
# setter
def s... | 21.153846 | 59 | 0.632727 |
816564de11f5e18f6db48fafeac03c3a2289c003 | 5,473 | py | Python | module/machineTranslation.py | lonelyion/TweetToBot-Docker | ea91a9d93bad2b757c2ba0923ae9f1cd0f5ac278 | [
"MIT"
] | null | null | null | module/machineTranslation.py | lonelyion/TweetToBot-Docker | ea91a9d93bad2b757c2ba0923ae9f1cd0f5ac278 | [
"MIT"
] | null | null | null | module/machineTranslation.py | lonelyion/TweetToBot-Docker | ea91a9d93bad2b757c2ba0923ae9f1cd0f5ac278 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
from helper import getlogger, TokenBucket, arglimitdeal
from load_config import config
import requests
import random
import json
import traceback
logger = getlogger(__name__)
"""
机翻类,用于支持多引擎机翻
"""
MachineTransApi = config['MachineTransApi']
def randUserAgent():
UAs = [
'Mozilla/5.... | 30.747191 | 131 | 0.595834 |
817c08aa5846c1450c32f81bff635b5a128b3bb0 | 792 | py | Python | solution/dynamic_programming_2/11909/main.py | gkgg123/baekjoon | 4ff8a1238a5809e4958258b5f2eeab7b22105ce9 | [
"MIT"
] | 2,236 | 2019-08-05T00:36:59.000Z | 2022-03-31T16:03:53.000Z | solution/dynamic_programming_2/11909/main.py | juy4556/baekjoon | bc0b0a0ebaa45a5bbd32751f84c458a9cfdd9f92 | [
"MIT"
] | 225 | 2020-12-17T10:20:45.000Z | 2022-01-05T17:44:16.000Z | solution/dynamic_programming_2/11909/main.py | juy4556/baekjoon | bc0b0a0ebaa45a5bbd32751f84c458a9cfdd9f92 | [
"MIT"
] | 602 | 2019-08-05T00:46:25.000Z | 2022-03-31T13:38:23.000Z | # Authored by : chj3748
# Co-authored by : -
# Link : http://boj.kr/a7949813f6e74a918f1f18b458ea5f8c
import sys
from collections import deque
def input():
return sys.stdin.readline().rstrip()
inf = float('inf')
n = int(input())
prison = [list(map(int, input().split())) for _ in range(n)]
dp = [[inf] * n for _ in ... | 24.75 | 60 | 0.503788 |
480fc613f46572156033cb2507f1912dbf872d65 | 13,091 | py | Python | src/Sephrasto/UI/DatenbankEditFertigkeit.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | src/Sephrasto/UI/DatenbankEditFertigkeit.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | src/Sephrasto/UI/DatenbankEditFertigkeit.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'DatenbankEditFertigkeit.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 imp... | 61.172897 | 375 | 0.72187 |
6fd3b739f0c29391a4ea4440d7bbf02d7590bf9b | 968 | py | Python | day07/hangman.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day07/hangman.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day07/hangman.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | import random
from hangman_art import logo, stages
from hangman_words import word_list
from hangman_fnc import clear_screen
clear_screen()
print(f"{logo}\n")
chosen_word = random.choice(word_list)
word_len = len(chosen_word)
lives = 6
display = ["_"] * word_len
end_of_game = False
while not end_of_game:
guess... | 21.043478 | 91 | 0.619835 |
9649296b8a521e1938e6b47cd5b987a25f077865 | 7,399 | py | Python | packages/watchmen-data-kernel/src/watchmen_data_kernel/storage_bridge/utils.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/storage_bridge/utils.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/storage_bridge/utils.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from __future__ import annotations
from datetime import date
from decimal import Decimal
from typing import Any, Callable, Dict, List, Optional, Tuple
from watchmen_auth import PrincipalService
from watchmen_data_kernel.common import ask_all_date_formats, DataKernelException
from watchmen_meta.common import ask_snowf... | 35.572115 | 117 | 0.762671 |
737b381273f0881d17ed628bb86363d91a4494e8 | 6,796 | py | Python | ryu/app/otherApp/plot-flowtablenum.py | yuesir137/SDN-CLB | 58b12a9412cffdf2945440528b1885c8899edd08 | [
"Apache-2.0"
] | null | null | null | ryu/app/otherApp/plot-flowtablenum.py | yuesir137/SDN-CLB | 58b12a9412cffdf2945440528b1885c8899edd08 | [
"Apache-2.0"
] | null | null | null | ryu/app/otherApp/plot-flowtablenum.py | yuesir137/SDN-CLB | 58b12a9412cffdf2945440528b1885c8899edd08 | [
"Apache-2.0"
] | null | null | null | """
author:Yuegb
date:2021,05,10
"""
import csv
import sys
import matplotlib.pyplot as plt
import numpy as np
con1 = open('respondTime1.csv')
con1CSV = csv.reader(con1, delimiter=',')
con2 = open('respondTime2.csv')
con2CSV = csv.reader(con2, delimiter=',')
con3 = open('respondTime3.csv')
con3CSV = csv.reader(con3, ... | 35.030928 | 129 | 0.604768 |
fb4a62852fd00844d01c20d86c25a28450be0114 | 3,576 | py | Python | sam_app/sam_app/view_layer/view_perf.py | csjy309450/SAM-Backend | a23569ea372f718ca4a167e21e8046336db00561 | [
"MIT"
] | null | null | null | sam_app/sam_app/view_layer/view_perf.py | csjy309450/SAM-Backend | a23569ea372f718ca4a167e21e8046336db00561 | [
"MIT"
] | null | null | null | sam_app/sam_app/view_layer/view_perf.py | csjy309450/SAM-Backend | a23569ea372f718ca4a167e21e8046336db00561 | [
"MIT"
] | null | null | null | import json
from pyramid.response import Response
from sam_core.view_base import ViewBase
from sam_core.res_obj import *
from sam_core.utils_perf import UtilPerfLinux
from sam_app.model_layer.model import PerfConfig, Session
from sam_core.utils_tasks import SchedulerTaskQueue, SchedulerTaskBase
class PerfSchedulerTas... | 41.103448 | 118 | 0.666667 |
f7c1f9065429fea0c72d0b5bbfa20165f03f47b9 | 388 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch08_binary_trees/ex05_level_order_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch08_binary_trees/ex05_level_order_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch08_binary_trees/ex05_level_order_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
from ch08_binary_trees.solutions.ex05_levelorder import levelorder, create_level_order_example_tree
def test_levelorder():
root = create_level_order_example_tree()
result = []
levelorder(root, lambda item: result.appe... | 25.866667 | 99 | 0.716495 |
585d6e87bb09c5edac4f9cf1513b7b7a0d171987 | 421 | py | Python | source/pkgsrc/archivers/py-lz4/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/archivers/py-lz4/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/archivers/py-lz4/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.3 2020/11/19 10:37:24 adam Exp $
Prefer external compiler optimizations.
--- setup.py.orig 2020-11-19 10:31:44.000000000 +0000
+++ setup.py
@@ -102,7 +102,6 @@ elif compiler in ('unix', 'mingw32'):
extension_kwargs = pkgconfig_parse('liblz4')
else:
extension_kwargs['... | 28.066667 | 60 | 0.574822 |
3f7b6acf35645cd88610658186b4bb45aa9575d0 | 14,470 | py | Python | models/statistics/Metrics.py | scott-mao/CroP | f1e0a25224e341683cf47e7ce451ce0fe996e950 | [
"MIT"
] | null | null | null | models/statistics/Metrics.py | scott-mao/CroP | f1e0a25224e341683cf47e7ce451ce0fe996e950 | [
"MIT"
] | null | null | null | models/statistics/Metrics.py | scott-mao/CroP | f1e0a25224e341683cf47e7ce451ce0fe996e950 | [
"MIT"
] | 1 | 2021-11-08T16:34:45.000Z | 2021-11-08T16:34:45.000Z | import inspect
import re
import time
from collections import defaultdict
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import torch
from markdown import markdown
from matplotlib.backends.backend_agg import FigureCanvasAgg
from sklearn.metrics import confusion_matrix
from torch.utils.tensorbo... | 35.905707 | 126 | 0.565791 |
b7ae92e2a46ed391628be6b9c93a825544e848d9 | 957 | pyde | Python | sketches/rpg01/rpg01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/rpg01/rpg01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/rpg01/rpg01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | from player import Player
from enemy import Enemy
WIDTH = 800
HEIGHT = 600
vel = 2
def setup():
global enemy, player
size(WIDTH, HEIGHT)
this.surface.setTitle("Flucht & Verfolgung")
player = Player()
enemy = Enemy()
def draw():
global enemy, player
background(107, 142, 35)
player.upda... | 21.75 | 49 | 0.560084 |
4dcdb4bb6d82dd3c473344ab9c412548ae1d941f | 772 | py | Python | tests/test_data.py | wtoalabi/rasa | 1106845b5628dc1f739a09f75270926b572af918 | [
"Apache-2.0"
] | 2 | 2020-02-27T16:41:52.000Z | 2020-02-27T16:41:57.000Z | tests/test_data.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 56 | 2020-06-09T00:16:14.000Z | 2020-11-16T00:25:20.000Z | tests/test_data.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 3 | 2019-02-27T10:13:16.000Z | 2019-07-26T08:33:45.000Z | import glob
import os
from pathlib import Path
from rasa.data import is_story_file
from rasa.utils.io import write_text_file
def test_story_file_can_not_be_yml(tmpdir: Path):
p = tmpdir / "test_non_md.yml"
Path(p).touch()
assert is_story_file(str()) is False
def test_empty_story_file_is_not_story_file... | 22.705882 | 67 | 0.71114 |
426c9a814a194eaa28d15ba87a7c752994118f44 | 1,457 | py | Python | 1_DeepLearning-Basics/02_NeuralNetwork_Basics_1/helper.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 1_DeepLearning-Basics/02_NeuralNetwork_Basics_1/helper.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 1_DeepLearning-Basics/02_NeuralNetwork_Basics_1/helper.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
import matplotlib.pyplot as plt
import numpy as np
# Rosenbrock Funktion
def f(x0, x1):
return 100 * (x0**2 - x1)**2 + (x0 - 1)**2
def f_prime_x0(x0, x1):
return 2 * (200 * x0 * (x... | 30.354167 | 99 | 0.612217 |
6729c603b4e259b7e2f7b2b25a3b1e60e42cb6ba | 158 | py | Python | packages/watchmen-meta/src/watchmen_meta/dqc/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-meta/src/watchmen_meta/dqc/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-meta/src/watchmen_meta/dqc/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from .catalog_service import CatalogService
from .monitor_rule_lock_service import MonitorJobLockService
from .monitor_rule_service import MonitorRuleService
| 39.5 | 60 | 0.905063 |
db29acc93f83ce9c70c9cce679d583bae44dfb08 | 565 | py | Python | Python1/aula8.py | Belaschich/SoulON | 9f908b025b34fc79187b4efd5ea93a78dca0ef7e | [
"MIT"
] | null | null | null | Python1/aula8.py | Belaschich/SoulON | 9f908b025b34fc79187b4efd5ea93a78dca0ef7e | [
"MIT"
] | null | null | null | Python1/aula8.py | Belaschich/SoulON | 9f908b025b34fc79187b4efd5ea93a78dca0ef7e | [
"MIT"
] | null | null | null | '''
1-Crie um dicionário contendo dias da semana sendo dia1,dia2,dia3...as chaves e o dia seu valor. Ex: “dia1”: “domingo”.
2-Remova dois dos últimos dias da semana.
3-Remova segunda-feira pela sua chave.4-Imprima chaves e valores do dicionário.
5-Imprima o dicionário final.
'''
dias_semana = {"dia1":"Domingo", "dia2"... | 26.904762 | 135 | 0.713274 |
222b0a864ccf033e16541689f4ac0572d06a7953 | 243 | py | Python | nlp2go/test/test_main.py | voidful/nlp2go | c83cd96a5618ef3f95f6c5174071cba711003761 | [
"Apache-2.0"
] | 25 | 2020-02-20T14:25:58.000Z | 2022-01-05T03:32:37.000Z | nlp2go/test/test_main.py | voidful/nlp2go | c83cd96a5618ef3f95f6c5174071cba711003761 | [
"Apache-2.0"
] | 3 | 2020-10-21T15:03:39.000Z | 2020-10-21T15:03:48.000Z | nlp2go/test/test_main.py | voidful/nlp2go | c83cd96a5618ef3f95f6c5174071cba711003761 | [
"Apache-2.0"
] | 1 | 2020-09-15T15:22:49.000Z | 2020-09-15T15:22:49.000Z | import unittest
import nlp2go
class TestMain(unittest.TestCase):
def test_parser(self):
input_arg, model_arg = nlp2go.parse_args(['--model', 'voidful/albert_chinese_tiny', '--task', 'clas'])
print(input_arg, model_arg)
| 22.090909 | 110 | 0.695473 |
8323caf5a5785ba11a1cc24b2aa5f4a54f5c3698 | 422 | py | Python | micropython/flash/Environ.py | webbhm/PiRock | 2c8f328bf212d8bcac88061fd1ba23866746626a | [
"Apache-2.0"
] | null | null | null | micropython/flash/Environ.py | webbhm/PiRock | 2c8f328bf212d8bcac88061fd1ba23866746626a | [
"Apache-2.0"
] | null | null | null | micropython/flash/Environ.py | webbhm/PiRock | 2c8f328bf212d8bcac88061fd1ba23866746626a | [
"Apache-2.0"
] | null | null | null | import machine
import conf
env_file = "/flash/env.py"
def saveDict(name, file_name, dict):
f = open(file_name, 'w+')
tmp = 'env=' + str(dict)
f.write(tmp)
f.close()
def create_env():
env = {}
location = {}
location["lat"] = conf.LATITUDE
location['long'] = conf.LONGITUDE
env['loca... | 20.095238 | 37 | 0.582938 |
364b251c093268b661eb282157bbe4992e7d04a5 | 7,259 | py | Python | gemtown/users/views.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | gemtown/users/views.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | 5 | 2020-09-04T20:13:39.000Z | 2022-02-17T22:03:33.000Z | gemtown/users/views.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from rest_framework.permissions import BasePermission, AllowAny, IsAdminUser, IsAuthenticated
from . import models, serializers
from gemtown.songs import models as songs_models
from gemtown.songs imp... | 32.40625 | 93 | 0.573219 |
b821d21d294313718ccdcb766c524ac68010710a | 4,129 | py | Python | agents/sac_dgn.py | yerfor/Soft-DRGN | 0c96d1ea295077b949229261c37d8dde25001a03 | [
"MIT"
] | 2 | 2022-02-24T08:21:49.000Z | 2022-03-10T08:57:35.000Z | agents/sac_dgn.py | yerfor/Soft-DRGN | 0c96d1ea295077b949229261c37d8dde25001a03 | [
"MIT"
] | 1 | 2022-02-24T08:40:21.000Z | 2022-02-24T12:01:58.000Z | agents/sac_dgn.py | yerfor/Soft-DRGN | 0c96d1ea295077b949229261c37d8dde25001a03 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from agents.ac_dgn import ActorCriticDGNAgent
from agents.sdgn import soft_value_based_model_entropy_activation_function
from utils.hparams import hparams
from utils.numba_utils import *
from utils.torch_utils import *
soft_actor_critic_model_entropy... | 47.45977 | 133 | 0.633083 |
1a2c7554eac4d67872f6df218890f6e1068623da | 1,182 | py | Python | books/PythonCleanCode/ch7_generator/generators_yieldfrom_3.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch7_generator/generators_yieldfrom_3.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch7_generator/generators_yieldfrom_3.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """Clean Code in Python - Chapter 7: Using Generators
> yield from: send values & throw exceptions
"""
from log import logger
class CustomException(Exception):
"""A type of exception that is under control."""
def sequence(name, start, end):
value = start
logger.info("%s started at %i", n... | 24.625 | 67 | 0.55753 |
c51a734213ae8b005257f0cca04a1a27b8450eb1 | 14,973 | py | Python | project/forms/event.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/forms/event.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/forms/event.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from dateutil.relativedelta import relativedelta
from flask import request
from flask_babelex import gettext, lazy_gettext
from flask_wtf import FlaskForm
from wtforms import (
BooleanField,
FormField,
IntegerField,
RadioField,
SelectField,
SelectMultipleField,
StringField,
SubmitField,
... | 33.571749 | 146 | 0.622654 |
c54fb4595c63cebf8988ee4c15193e970134c52f | 1,747 | py | Python | official/cv/unet3d/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | official/cv/unet3d/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/unet3d/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 40.627907 | 120 | 0.744705 |
c55d1642b54db8dad9be2a34ca949ff48aa733f2 | 386 | py | Python | tools/legacy/darkstar-vol-extractor/unvol.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 2 | 2020-03-18T18:23:27.000Z | 2020-08-02T15:59:16.000Z | tools/legacy/darkstar-vol-extractor/unvol.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 5 | 2019-07-07T16:47:47.000Z | 2020-08-10T16:20:00.000Z | tools/legacy/darkstar-vol-extractor/unvol.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 1 | 2020-03-18T18:23:30.000Z | 2020-03-18T18:23:30.000Z | import sys
import extract_file
import volinfo
import glob
importFilenames = []
for importFilename in sys.argv[1:]:
files = glob.glob(importFilename)
importFilenames.extend(files)
for importFilename in importFilenames:
print("processing " + importFilename)
try:
extract_file.extract_archive(imp... | 21.444444 | 61 | 0.733161 |
b1062d1039f99dd88c18a003e3fe65ae5c9b3463 | 7,729 | py | Python | ABLIRC/install/external_lib/HTSeq/scripts/qa.py | ablifedev/ABLIRC | 875278b748a8e22ada2c76c3c76dbf970be4a6a4 | [
"MIT"
] | 1 | 2020-02-25T13:08:20.000Z | 2020-02-25T13:08:20.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/HTSeq-0.6.1p1-py2.7-linux-x86_64.egg/HTSeq/scripts/qa.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | ABLIRC/install/external_lib/HTSeq/scripts/qa.py | ablifedev/ABLIRC | 875278b748a8e22ada2c76c3c76dbf970be4a6a4 | [
"MIT"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | #!/usr/bin/env python
# HTSeq_QA.py
#
# (c) Simon Anders, European Molecular Biology Laboratory, 2010
# released under GNU General Public License
import sys, time, os.path, optparse
from itertools import *
import numpy
import HTSeq
def main():
try:
import matplotlib
except ImportError:
sys.stderr.... | 33.029915 | 97 | 0.621555 |
49253d5049ff2dd92190b487a6942467a5f8a3a6 | 6,141 | py | Python | packages/watchmen-meta/src/watchmen_meta/console/connected_space_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-meta/src/watchmen_meta/console/connected_space_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-meta/src/watchmen_meta/console/connected_space_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from datetime import datetime
from typing import List, Optional
from watchmen_meta.common import AuditableShaper, LastVisitShaper, TupleNotFoundException, \
UserBasedTupleService, UserBasedTupleShaper
from watchmen_model.common import ConnectedSpaceId, SpaceId, TenantId, UserId
from watchmen_model.console import Conn... | 39.11465 | 114 | 0.785865 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.