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
26e09f1d4369f1a8c91b706f6fee1244d24b7420
5,360
py
Python
public/chart/integrations/django/samples/fusioncharts/samples/Annotating_single_data_point.py
AizaDapitan/PMC-IMS_V3
271ce3193edbf5182a9e232666ca417561ba2d16
[ "MIT" ]
14
2016-11-03T19:06:21.000Z
2021-11-24T09:05:09.000Z
public/chart/integrations/django/samples/fusioncharts/samples/Annotating_single_data_point.py
AizaDapitan/PMC-IMS_V3
271ce3193edbf5182a9e232666ca417561ba2d16
[ "MIT" ]
10
2022-02-16T07:17:49.000Z
2022-03-08T12:43:51.000Z
asset/integrations/django/samples/fusioncharts/samples/Annotating_single_data_point.py
Piusshungu/catherine-junior-school
5356f4ff5a5c8383849d32e22a60d638c35b1a48
[ "MIT" ]
17
2016-05-19T13:16:34.000Z
2021-04-30T14:38:42.000Z
from django.shortcuts import render from django.http import HttpResponse # Include the `fusioncharts.py` file which has required functions to embed the charts in html page from ..fusioncharts import FusionCharts from ..fusioncharts import FusionTable from ..fusioncharts import TimeSeries import requests # Loading Dat...
58.901099
218
0.412313
f8cff6f4cbdfc3d037444af2e0d99881a0c422ab
12,301
py
Python
src/server/BankAdministration.py
ralfstefanbender/Studifix2
281c0a89ce56796437fe054068058c0f01a7df02
[ "RSA-MD" ]
null
null
null
src/server/BankAdministration.py
ralfstefanbender/Studifix2
281c0a89ce56796437fe054068058c0f01a7df02
[ "RSA-MD" ]
null
null
null
src/server/BankAdministration.py
ralfstefanbender/Studifix2
281c0a89ce56796437fe054068058c0f01a7df02
[ "RSA-MD" ]
null
null
null
from .bo.User import User from .bo.Customer import Customer from .bo.Account import Account from .bo.Transaction import Transaction from .db.UserMapper import UserMapper from .db.CustomerMapper import CustomerMapper from .db.AccountMapper import AccountMapper from .db.TransactionMapper import TransactionMapper class...
37.051205
97
0.665474
5fcebceddab4ad50897756c783ed3dc5f70a8ee6
903
py
Python
migrations/versions/cce1284874fa_.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
1
2021-06-01T14:49:18.000Z
2021-06-01T14:49:18.000Z
migrations/versions/cce1284874fa_.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
286
2020-12-04T14:13:00.000Z
2022-03-09T19:05:16.000Z
migrations/versions/cce1284874fa_.py
DanielGrams/gsevpt
a92f71694388e227e65ed1b24446246ee688d00e
[ "MIT" ]
null
null
null
"""empty message Revision ID: cce1284874fa Revises: b128cc637447 Create Date: 2020-07-26 15:48:47.723256 """ import sqlalchemy as sa import sqlalchemy_utils from alembic import op from project import dbtypes # revision identifiers, used by Alembic. revision = "cce1284874fa" down_revision = "b128cc637447" branch_lab...
24.405405
86
0.693245
0857d5497ecd4e9d0e5ab3a3552f525a403c21b4
428
py
Python
Algorithms/Implementation/CutTheSticks.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
Algorithms/Implementation/CutTheSticks.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
Algorithms/Implementation/CutTheSticks.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
#coding:utf-8 N = int(raw_input()) a_list = map(int, raw_input().split()) a_list.sort() #聪明 print N for i in xrange(1, N): if a_list[i] == a_list[i-1]: continue print N - i ''' while a_list: print len(a_list) a_list = map(lambda x: x-a_list[0], a_list) count = 0 for a in a_list:...
14.758621
47
0.518692
4b76c0c82647bbe37fe315447f6c247655428573
5,345
py
Python
src/onegov/fsi/pdf.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/fsi/pdf.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/fsi/pdf.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from datetime import date from io import BytesIO from reportlab.lib import colors from reportlab.lib.colors import HexColor from reportlab.lib.units import cm from sedate import utcnow from onegov.fsi import _ from onegov.pdf import Pdf, page_fn_footer, page_fn_header_and_footer class FsiPdf(Pdf): @property ...
29.530387
77
0.527783
4ba683f16629c304562cdfcc6a5c415dce0f761c
1,693
py
Python
jumeaux/notification_handlers/slack2.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
11
2017-10-02T01:29:12.000Z
2022-03-31T08:37:22.000Z
jumeaux/notification_handlers/slack2.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
79
2017-07-16T14:47:17.000Z
2022-03-31T08:49:14.000Z
jumeaux/notification_handlers/slack2.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
2
2019-01-28T06:11:58.000Z
2021-01-25T07:21:21.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import os import requests from jumeaux.logger import Logger from jumeaux.models import * from jumeaux.notification_handlers import NotificationHandler logger: Logger = Logger(__name__) LOG_PREFIX = "[notification_handlers]" # See, https://app.slack.com/bloc...
28.694915
102
0.629652
8a681aca7e7c06b36d0014f2df27593943e27549
1,577
py
Python
plugins/bundler/bundler.py
ELCG/elcg.github.io
eccfda750928c4f4da1caaeaeeee400a790a7d2a
[ "MIT" ]
1
2021-02-05T01:56:35.000Z
2021-02-05T01:56:35.000Z
plugins/bundler/bundler.py
ELCG/elcg.github.io
eccfda750928c4f4da1caaeaeeee400a790a7d2a
[ "MIT" ]
null
null
null
plugins/bundler/bundler.py
ELCG/elcg.github.io
eccfda750928c4f4da1caaeaeeee400a790a7d2a
[ "MIT" ]
null
null
null
import os from pathlib import Path from pelican import signals # Function extracted from https://stackoverflow.com/a/19308592/7690767 def get_filepaths(directory, extensions=[], ignores=[]): file_paths = [] # List which will store all of the full filepaths. exts = extensions if isinstance(extension...
27.189655
89
0.653773
8a837abfc209dbc2ec350b5eebd51f30a5b2a26f
15,402
py
Python
applications/doc_vqa/Rerank/src/train_ce.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
applications/doc_vqa/Rerank/src/train_ce.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
applications/doc_vqa/Rerank/src/train_ce.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
39.19084
96
0.555253
76f9707ec7cbf682195111a589d4ad5169d4fb98
563
py
Python
python_project/python/strFormat.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
1
2018-12-30T14:07:42.000Z
2018-12-30T14:07:42.000Z
python_project/python/strFormat.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
null
null
null
python_project/python/strFormat.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python #coding=utf-8 #格式化字符串 import string width=input("please enter width:") price_width=10 item_width=width-price_width header_format='%-*s%*s' format='%-*s%*.2f' print string.capwords("there are all goods ") print '='*width print header_format%(item_width,'item',price_width,'price') print '-'*width ...
25.590909
67
0.730018
0a24e9c805b4315de621fce22b77cce9283f1448
1,452
py
Python
examples/myqueryset/simplerelate/migrations/0001_initial.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
5
2020-07-14T07:48:10.000Z
2021-12-20T21:20:10.000Z
examples/myqueryset/simplerelate/migrations/0001_initial.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
7
2021-03-26T03:13:38.000Z
2022-03-12T00:42:03.000Z
examples/myqueryset/simplerelate/migrations/0001_initial.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
1
2021-02-16T07:04:25.000Z
2021-02-16T07:04:25.000Z
# Generated by Django 3.1.7 on 2021-04-03 02:14 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Author', fields=[ ...
32.266667
117
0.542011
0af27b6e156128222093139a3dbaaaa33b6dda5a
6,444
py
Python
src/onegov/election_day/formats/vote/wabsti.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/election_day/formats/vote/wabsti.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/election_day/formats/vote/wabsti.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.ballot import BallotResult from onegov.election_day import _ from onegov.election_day.formats.common import EXPATS, validate_integer, \ validate_float from onegov.election_day.formats.common import FileImportError from onegov.election_day.formats.common import load_csv from onegov.election_day.import_ex...
32.71066
78
0.544072
813b8a39c05ce0aa9ce8c13b080a494f330c370b
14,967
py
Python
Packs/ThreatQ/Integrations/ThreatQ_v2/ThreatQ_v2_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/ThreatQ/Integrations/ThreatQ_v2/ThreatQ_v2_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/ThreatQ/Integrations/ThreatQ_v2/ThreatQ_v2_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from unittest.mock import Mock import demistomock as demisto MOCK_URL = "http://123-fake-api.com" MOCK_API_URL = MOCK_URL + "/api" MOCK_PARAMS = { "credentials": { "identifier": "mock_email", "password": "mock_pass" }, "insecure": True, "proxy": False, "serverUrl": MOCK_URL, "c...
37.138958
119
0.668604
0796222dbcdaa0516ead2b59cd1964b459e16018
12,998
py
Python
haas_lib_bundles/python/libraries/as608/as608.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/libraries/as608/as608.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/libraries/as608/as608.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
""" Copyright (C) 2015-2021 Alibaba Group Holding Limited `HaaS Python as608` ==================================================== A driver for the AS608 finger print module * Author(s): HaaS Group Implementation Notes -------------------- **Hardware:** * HaaS Python as608 https://haas.iot.aliyun.com/solution/de...
25.238835
99
0.536698
07fda588efc47833ece3aa878969672555457735
428
py
Python
tools/pythonpkg/tests/fast/types/test_numeric.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
2,816
2018-06-26T18:52:52.000Z
2021-04-06T10:39:15.000Z
tools/pythonpkg/tests/fast/types/test_numeric.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
1,310
2021-04-06T16:04:52.000Z
2022-03-31T13:52:53.000Z
tools/pythonpkg/tests/fast/types/test_numeric.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
270
2021-04-09T06:18:28.000Z
2022-03-31T11:55:37.000Z
import duckdb import numpy def check_result(duckdb_cursor,value, type): duckdb_cursor.execute("SELECT " + str(value)+"::"+ type) results = duckdb_cursor.fetchall() assert results[0][0] == value class TestNumeric(object): def test_numeric_results(self, duckdb_cursor): check_result(duckdb_cursor...
32.923077
60
0.714953
ed271d9ffad9f2a5235d707377831ce21e1467f1
403
py
Python
ISTp/2013/IVANOV_S_E/task_1_6.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
ISTp/2013/IVANOV_S_E/task_1_6.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
ISTp/2013/IVANOV_S_E/task_1_6.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 1. Вариант 6. # Напишите программу, которая будет сообщать род деятельности и псевдоним под # которым скрывается Йоханнес Бруфельдт. После вывода информации программа # должна дожидаться пока пользователь нажмет Enter для выхода. # Ivanov S. E. # 15.09.2016 print('Йоханнес Бруфельдт - финский писатель, ...
36.636364
95
0.776675
ed4a1caf30c8e61d0d787dd9e2e9cd6d1a9270bd
5,619
py
Python
research/cv/pnasnet/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
null
null
null
research/cv/pnasnet/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
null
null
null
research/cv/pnasnet/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
2
2019-09-01T06:17:04.000Z
2019-10-04T08:39:45.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
36.019231
94
0.605268
ed6555c6d718436d8487aa005378e594dfee3388
41,168
py
Python
research/cv/IPT/src/ipt_model.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
1
2021-07-03T06:52:20.000Z
2021-07-03T06:52:20.000Z
research/cv/IPT/src/ipt_model.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
null
null
null
research/cv/IPT/src/ipt_model.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...
42.441237
119
0.552176
71ef8505c374d970c2f2810808066fda73cec068
406
py
Python
python_lib/hucon/__init__.py
SaschaMzH/hucon
830b6c5e21c2c7316c61e8afdf708066374b9b62
[ "BSD-3-Clause" ]
2
2019-09-25T13:39:22.000Z
2019-09-26T10:06:13.000Z
python_lib/hucon/__init__.py
SaschaMzH/hucon
830b6c5e21c2c7316c61e8afdf708066374b9b62
[ "BSD-3-Clause" ]
44
2019-09-25T14:35:48.000Z
2021-08-20T17:26:12.000Z
python_lib/hucon/__init__.py
SaschaMzH/hucon
830b6c5e21c2c7316c61e8afdf708066374b9b62
[ "BSD-3-Clause" ]
8
2019-09-25T13:53:07.000Z
2022-02-24T19:23:44.000Z
#!/usr/bin/env python """ __init__.py - HuCon library for python2 Copyright (C) 2019 Basler AG All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from .Servo import Servo from .Motor import Motor from .Eye impo...
25.375
65
0.746305
9c26b8095677675626a9651926654d90adccf85a
1,380
py
Python
leetcode/133-Clone-Graph/bfs_001_iterative_jiuzhang.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2015-12-16T04:01:03.000Z
2015-12-16T04:01:03.000Z
leetcode/133-Clone-Graph/bfs_001_iterative_jiuzhang.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
leetcode/133-Clone-Graph/bfs_001_iterative_jiuzhang.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
""" Good Points: 1. getNodes 1.1 while q (instead of while len(q) > 0) 1.2 collections.deque (instead of q = []) Bad Points: 1. another loop to fill mapping instead of doing it in the bfs """ # Definition for a Node. class Node: def __init__(self, val=0, neighbors=[]): self.val = ...
26.538462
74
0.558696
13af16e473c5591bc64f8879dd569c8261fdbea6
28,316
py
Python
Contrib-Inspur/openbmc/poky/meta/lib/oe/sstatesig.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
5
2019-11-11T07:57:26.000Z
2022-03-28T08:26:53.000Z
Contrib-Inspur/openbmc/poky/meta/lib/oe/sstatesig.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
3
2019-09-05T21:47:07.000Z
2019-09-17T18:10:45.000Z
Contrib-Inspur/openbmc/poky/meta/lib/oe/sstatesig.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
11
2019-07-20T00:16:32.000Z
2022-01-11T14:17:48.000Z
# # SPDX-License-Identifier: GPL-2.0-only # import bb.siggen import oe def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache): # Return True if we should keep the dependency, False to drop it def isNative(x): return x.endswith("-native") def isCross(x): return "-cros...
39.273232
144
0.566464
b9297ccc5bc3c6aeddea0291b48ed26d48b4ddc4
490
py
Python
telegrambot/src/corona_assistent_bot/model.py
LittleKita/CoronaAssistent
1e0862d94bdc509aa468921ee7b056ec59e6f472
[ "MIT" ]
1
2020-03-20T22:05:14.000Z
2020-03-20T22:05:14.000Z
telegrambot/src/corona_assistent_bot/model.py
LittleKita/CoronaAssistent
1e0862d94bdc509aa468921ee7b056ec59e6f472
[ "MIT" ]
6
2020-03-21T12:22:36.000Z
2022-02-27T01:33:33.000Z
telegrambot/src/corona_assistent_bot/model.py
LittleKita/CoronaAssistent
1e0862d94bdc509aa468921ee7b056ec59e6f472
[ "MIT" ]
null
null
null
from sqlalchemy import BigInteger, Column, Integer, Text from sqlalchemy.ext.declarative import declarative_base TableBase = declarative_base() class ReceivedMessage(TableBase): __tablename__ = 'received_message' id = Column(Integer, primary_key=True) text = Column(Text, nullable=False) class Subscrib...
25.789474
71
0.767347
b98d8246cbd18cf419fc85eb57e3533c7f7babc6
411
py
Python
UFV---Python/run.codes/1 prova2.py
Vith-MCB/UFV
9d96fecdc9ffde2563f9f397bcdb39d95aaf7e69
[ "MIT" ]
1
2022-01-25T16:52:26.000Z
2022-01-25T16:52:26.000Z
UFV---Python/run.codes/1 prova2.py
Vith-MCB/UFV
9d96fecdc9ffde2563f9f397bcdb39d95aaf7e69
[ "MIT" ]
null
null
null
UFV---Python/run.codes/1 prova2.py
Vith-MCB/UFV
9d96fecdc9ffde2563f9f397bcdb39d95aaf7e69
[ "MIT" ]
null
null
null
n = [x for x in input().split()] l = [y for y in input().split()] for j in range(int(n)): nom = [x for x in input().split()] q = [y for y in input().split()] it = [] som = 0 for s in range(int(q)): item, preco = [x for x in input().split()] it.append(int(preco)) p = 0 it.sor...
20.55
50
0.479319
6a1d8ac92fdc09a64b01002c51569b959dbde23b
6,660
py
Python
Chapter9_AdvancedDL/Chapter9_2_AdvancedTechniques/cnn8GlobalPooling.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
Chapter9_AdvancedDL/Chapter9_2_AdvancedTechniques/cnn8GlobalPooling.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
Chapter9_AdvancedDL/Chapter9_2_AdvancedTechniques/cnn8GlobalPooling.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
import os from typing import Tuple import numpy as np import tensorflow as tf from tensorflow.keras.callbacks import EarlyStopping from tensorflow.keras.callbacks import LearningRateScheduler from tensorflow.keras.callbacks import ReduceLROnPlateau from tensorflow.keras.callbacks import TensorBoard from tenso...
27.75
89
0.646697
e05d94eda78f5027c7c2778a461102f35fff1129
2,698
py
Python
data-pipeline/caids/export_vcfs.py
broadinstitute/gnomadjs
00da72cdc2cb0753f822c51456ec15147c024a1d
[ "MIT" ]
38
2018-02-24T02:33:52.000Z
2020-03-03T23:17:04.000Z
data-pipeline/caids/export_vcfs.py
broadinstitute/gnomadjs
00da72cdc2cb0753f822c51456ec15147c024a1d
[ "MIT" ]
385
2018-02-21T16:53:13.000Z
2020-03-04T00:52:40.000Z
data-pipeline/caids/export_vcfs.py
broadinstitute/gnomadjs
00da72cdc2cb0753f822c51456ec15147c024a1d
[ "MIT" ]
13
2020-05-01T13:03:54.000Z
2022-02-28T13:12:57.000Z
"""Export locus and alleles for gnomAD variants to a sharded VCF.""" import argparse import hail as hl def get_gnomad_v3_variants() -> hl.Table: """Get locus/alleles for all gnomAD v3 variants.""" ds = hl.read_table("gs://gcp-public-data--gnomad/release/3.1.1/ht/genomes/gnomad.genomes.v3.1.1.sites.ht") ...
29.648352
115
0.657895
0ee2a77e689fa17aeb0044c5477a02e9f639eb6b
1,640
py
Python
pyramid-creator/app/utils/dicom.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2022-02-20T12:45:04.000Z
2022-02-20T12:45:04.000Z
pyramid-creator/app/utils/dicom.py
JamesNeumann/learning-by-annotations
c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad
[ "MIT" ]
21
2021-11-01T10:13:56.000Z
2021-12-02T10:02:13.000Z
pyramid-creator/app/utils/dicom.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2021-12-16T18:20:55.000Z
2021-12-16T18:20:55.000Z
import os import uuid from typing import Dict, List, Tuple import numpy as np from app.config import Config from app.utils.slide_utils import delete_keys_from_dict from PIL import Image from pydicom import dcmread from pydicom.pixel_data_handlers.util import apply_color_lut class Dicom: @staticmetho...
30.37037
92
0.618902
0ee52f9e2c49b50c2ee1608242eead398b117092
796
py
Python
Algorithms/2_Implementation/10.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
1
2021-11-25T13:39:30.000Z
2021-11-25T13:39:30.000Z
Algorithms/2_Implementation/10.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
null
null
null
Algorithms/2_Implementation/10.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/jumping-on-the-clouds/problem #!/bin/python3 import math import os import random import re import sys # # Complete the 'jumpingOnClouds' function below. # # The function is expected to return an INTEGER. # The function accepts INTEGER_ARRAY c as parameter. # def jumpingOnClou...
20.410256
69
0.624372
bc98f7b5113a44c5a0a1c58305ec4d30a9766fbf
1,934
py
Python
basic/18-web3py/scripts/2_play_around_on_existing_contract.py
yingjingyang/Dapp-Learning
5bf10a02932926e429c1a61704d9a9dfee3a13ea
[ "MIT" ]
987
2021-12-19T09:57:18.000Z
2022-03-31T15:39:45.000Z
basic/18-web3py/scripts/2_play_around_on_existing_contract.py
yingjingyang/Dapp-Learning
5bf10a02932926e429c1a61704d9a9dfee3a13ea
[ "MIT" ]
73
2021-07-04T03:53:57.000Z
2021-12-18T06:17:13.000Z
basic/18-web3py/scripts/2_play_around_on_existing_contract.py
yingjingyang/Dapp-Learning
5bf10a02932926e429c1a61704d9a9dfee3a13ea
[ "MIT" ]
263
2021-06-28T15:26:56.000Z
2021-12-19T08:14:37.000Z
from web3 import Web3 import json def main(): w3 = Web3(Web3.HTTPProvider('http://127.0.0.1:8545')) with open('./ABI/MyToken.json', 'r') as fr: erc20_json_dict = json.load(fr) # 1. 进行合约部署,然后获取交易回执中的 contractAddress my_contract = w3.eth.contract(abi=erc20_json_dict['abi'], bytecode=erc20_json_...
37.921569
120
0.719752
bcd87e36686c15533b2fcc4cb37a711a97992aa0
6,795
py
Python
src/ingestion/sources/bigquery.py
monosidev/monosi
a88b689fc74010b10dbabb32f4b2bdeae865f4d5
[ "Apache-2.0" ]
156
2021-11-19T18:50:14.000Z
2022-03-31T19:48:59.000Z
src/ingestion/sources/bigquery.py
monosidev/monosi
a88b689fc74010b10dbabb32f4b2bdeae865f4d5
[ "Apache-2.0" ]
30
2021-12-27T19:30:56.000Z
2022-03-30T17:49:00.000Z
src/ingestion/sources/bigquery.py
monosidev/monosi
a88b689fc74010b10dbabb32f4b2bdeae865f4d5
[ "Apache-2.0" ]
14
2022-01-17T23:24:34.000Z
2022-03-29T09:27:47.000Z
import json from ingestion.task import TaskUnit from .base import MetricsQueryBuilder, SourceConfiguration, SQLAlchemySourceDialect, SQLAlchemySource from sqlalchemy.engine.url import make_url class BigQueryMetricsQueryBuilder(MetricsQueryBuilder): def _base_query_sample(self, select_sql): return """ ...
37.335165
196
0.611038
d5fb7aca5c33a2c8d9d0ba1d725457565c6b0e8d
194
gyp
Python
audio-client/node_modules/player/node_modules/speaker/binding.gyp
fullrange-interactive/pmw
c9e23f6870b266eab8382f7825e5a159ff116c93
[ "MIT" ]
null
null
null
audio-client/node_modules/player/node_modules/speaker/binding.gyp
fullrange-interactive/pmw
c9e23f6870b266eab8382f7825e5a159ff116c93
[ "MIT" ]
null
null
null
audio-client/node_modules/player/node_modules/speaker/binding.gyp
fullrange-interactive/pmw
c9e23f6870b266eab8382f7825e5a159ff116c93
[ "MIT" ]
null
null
null
{ 'targets': [ { 'target_name': 'binding', 'sources': [ 'src/binding.cc', ], 'dependencies': [ 'deps/mpg123/mpg123.gyp:output' ], } ] }
13.857143
39
0.417526
e6777c9c5cd77ea93f0d34a4b355a5081128bf89
576
py
Python
gemtown/musicians/migrations/0008_auto_20190424_2011.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
gemtown/musicians/migrations/0008_auto_20190424_2011.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
5
2020-09-04T20:13:39.000Z
2022-02-17T22:03:33.000Z
gemtown/musicians/migrations/0008_auto_20190424_2011.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
# Generated by Django 2.0.13 on 2019-04-24 11:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('musicians', '0007_auto_20190424_0319'), ] operations = [ migrations.AlterField( model_name='musician', name='career...
30.315789
235
0.586806
fc35ab3ad891feebfd0fb5d300c3690c17ae4964
1,854
py
Python
hausse/plugins/elements/relations.py
andrenasturas/hausse
58e7cb71d5105cf1d6ec7d294e85668855bf8336
[ "MIT" ]
null
null
null
hausse/plugins/elements/relations.py
andrenasturas/hausse
58e7cb71d5105cf1d6ec7d294e85668855bf8336
[ "MIT" ]
1
2021-08-30T21:41:46.000Z
2021-08-30T21:41:46.000Z
hausse/plugins/elements/relations.py
andrenasturas/hausse
58e7cb71d5105cf1d6ec7d294e85668855bf8336
[ "MIT" ]
1
2021-08-31T19:27:32.000Z
2021-08-31T19:27:32.000Z
import logging from typing import List from hausse.lib import Element, Project, SelectorPlugin from hausse.lib.selector import Selector class Relations(SelectorPlugin): """ Relations ========= Create relations between elements based on a foreign key. For each Element in `selector`, this plugin ...
29.903226
162
0.54315
5d11b42fe3e02236769276b4e0fd961613a7182b
29,643
py
Python
JassRNN.py
simi48/Ef-If_Jassen
6076839492bff591cf9b457e949999e9167903e6
[ "Apache-2.0" ]
4
2019-03-17T19:55:43.000Z
2019-04-30T15:22:36.000Z
JassRNN.py
simi48/Ef-If_Jassen
6076839492bff591cf9b457e949999e9167903e6
[ "Apache-2.0" ]
null
null
null
JassRNN.py
simi48/Ef-If_Jassen
6076839492bff591cf9b457e949999e9167903e6
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Project: Deep Jass File: Jassen.py Purpose: Recurring Neural Network to learn how to play cards. Created on: 17.03.2019 16:02:49 Author: Simon Thür; Marc Matter Copyright © 2019 Marc Matter, Michael Siebenmann, Ramon Heeb, Simon Thür. All rights reserve...
34.751465
208
0.601862
5d71456d0fd1e0c9f3c23018b1a53e7a29103a58
1,201
py
Python
losses/losses.py
JugendForscht-CoLoS/SunDetection-NeuralNetwork
139bcc314cf6b5b84a82b08fda8b1e4455f7cf93
[ "MIT" ]
4
2021-02-26T15:47:28.000Z
2021-03-04T16:46:00.000Z
losses/losses.py
JugendForscht-CoLoS/SunDetection-NeuralNetwork
139bcc314cf6b5b84a82b08fda8b1e4455f7cf93
[ "MIT" ]
null
null
null
losses/losses.py
JugendForscht-CoLoS/SunDetection-NeuralNetwork
139bcc314cf6b5b84a82b08fda8b1e4455f7cf93
[ "MIT" ]
1
2021-02-24T13:01:21.000Z
2021-02-24T13:01:21.000Z
import numpy as np import tensorflow as tf from tensorflow.keras import backend as K import matplotlib.pyplot as plt #Klasse, die den Tversky-Loss berechnet #Erbt von tf.keras.losses.Loss class TverskyLoss(tf.keras.losses.Loss): def __init__(self, alpha, beta=None, smooth=1): super(TverskyLoss, se...
33.361111
105
0.574521
076990baa291a1387733266487eb3eb071e199ac
1,393
py
Python
Packs/FeedDShield/Integrations/FeedDShield/FeedDShield.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/FeedDShield/Integrations/FeedDShield/FeedDShield.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/FeedDShield/Integrations/FeedDShield/FeedDShield.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from CommonServerPython import * def main(): params = {k: v for k, v in demisto.params().items() if v is not None} params['indicator_type'] = FeedIndicatorType.CIDR params['url'] = 'https://www.dshield.org/block.txt' params['ignore_regex'] = "[#S].*" params['indicator'] = json.dumps({ "r...
27.86
78
0.472362
db5b8e40656f3411067f2162b625792e1126b603
1,886
py
Python
projects/g4h1-wsn/src/main.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
projects/g4h1-wsn/src/main.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
projects/g4h1-wsn/src/main.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
import logging import threading from utils import init_root_logger, Scheduler, EnumScheduleMode, TerminationCondition from bystander import Bystander from wsn import Wsn from wsn.utils import generate_rand_nodes # 初始化日志配置 init_root_logger() logger: logging.Logger = logging.getLogger('main') def main(...
29.46875
101
0.628844
918be1d41bae6213d364501528575f53ef3eb3e6
454
py
Python
tests/onegov/translator_directory/test_utils.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/translator_directory/test_utils.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/translator_directory/test_utils.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import pytest from onegov.translator_directory.utils import out_of_tolerance @pytest.mark.parametrize('old,new,factor,maxtol,outcome', [ (None, 5, 0.1, 5, False), (5.0, 5, 0.1, 0, False), (5.0, 5.5, 0.1, 0, True), (5.0, 5.5, 0.1, 1, False), (5.0, 5.51, 0.1, 1, False), (5.0, 5.51, 0.1, .5, Tru...
28.375
64
0.623348
919e2dc38153f7f5ee975288ad05aea96129ee96
696
py
Python
tests/submodule/build.py
prototypefund/universal-build
809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7
[ "MIT" ]
17
2020-11-20T15:58:02.000Z
2022-02-06T19:18:20.000Z
tests/submodule/build.py
prototypefund/universal-build
809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7
[ "MIT" ]
3
2021-02-17T13:47:44.000Z
2021-10-14T13:53:15.000Z
tests/submodule/build.py
prototypefund/universal-build
809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7
[ "MIT" ]
6
2020-11-23T09:51:26.000Z
2022-02-11T13:46:57.000Z
import argparse from universal_build import build_utils if __name__ == "__main__": # Custom CLI arguments parser = argparse.ArgumentParser() parser.add_argument( "--deployment-token", help="This is a custom token.", default="" ) parser.add_argument("--my_token", help="This is a custom tok...
27.84
88
0.683908
91c3c4d798be6ad85c2e4cbcc3c5169ef6715243
6,213
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/packaging/os/test_rhsm_release.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/packaging/os/test_rhsm_release.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/packaging/os/test_rhsm_release.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
# (c) 2018, Sean Myers <sean.myers@redhat.com> # 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 from ansible_collections.community.general.tests.unit.compat.mock import call, patch from ...
43.753521
121
0.659424
7284252e6c9d6de4b4cdb29b8eb50058b859751b
1,620
py
Python
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/losses/base.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
883
2020-11-12T11:46:46.000Z
2022-03-31T18:27:10.000Z
paddlevideo/modeling/losses/base.py
arkofgalaxy/PaddleVideo
64251233c83b7eb681061b454da198a9082309a6
[ "Apache-2.0" ]
233
2020-12-09T06:04:59.000Z
2022-03-28T08:16:51.000Z
paddlevideo/modeling/losses/base.py
arkofgalaxy/PaddleVideo
64251233c83b7eb681061b454da198a9082309a6
[ "Apache-2.0" ]
225
2020-11-13T06:21:55.000Z
2022-03-31T05:36:11.000Z
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License" # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
32.4
77
0.673457
72f9d696e67a5e94da801544ed57158cbcbbe9dd
207
py
Python
exercises/fr/exc_01_02_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/fr/exc_01_02_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/fr/exc_01_02_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
# Importe spaCy import ____ # Crée l'objet nlp espagnol nlp = ____ # Traite un texte (il signifie "Comment vas-tu ?" en espagnol) doc = nlp("¿Cómo estás?") # Affiche le texte du document print(____.text)
17.25
62
0.710145
f4224a093b49606326756d97a54f0270ba8a3950
1,117
py
Python
Packs/NetCalc/Scripts/IPCalcReturnSubnetAddresses/IPCalcReturnSubnetAddresses.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/NetCalc/Scripts/IPCalcReturnSubnetAddresses/IPCalcReturnSubnetAddresses.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/NetCalc/Scripts/IPCalcReturnSubnetAddresses/IPCalcReturnSubnetAddresses.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * import ipaddress import traceback ''' COMMAND FUNCTION ''' def return_subnet_addresses_command(args: Dict[str, Any]) -> CommandResults: subnet = args.get('subnet', None) address_objects = ipaddress.IPv4Net...
22.795918
98
0.70188
be9393e5b48a8f8a3f1d47682ab0ba525b888915
842
py
Python
Mathematics/Number_Theory/Dancing_in_Pairs.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
Mathematics/Number_Theory/Dancing_in_Pairs.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
Mathematics/Number_Theory/Dancing_in_Pairs.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
# Dancing in pairs # https://www.hackerrank.com/challenges/dance-class/problem def pairs(n,e=10): x = lambda: s.append('x') o = lambda: s.append('o') attend = (x,o) arr = range(e+n) # indexing s = [] # student a = 0 # attending for i in arr: if i in arr[n-1:e+1+n:n]: ...
19.581395
62
0.505938
228a8b675cfc3a4489b9106a79f3fe5cd52c9dcc
2,749
py
Python
research/cv/ESRGAN/src/trainonestep/train_psnr.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/ESRGAN/src/trainonestep/train_psnr.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/ESRGAN/src/trainonestep/train_psnr.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...
41.651515
93
0.685704
22daf98609744129a88aa7f4e410a27e26d54b31
675
py
Python
CS305/assignment4/echo.py
Wycers/Codelib
86d83787aa577b8f2d66b5410e73102411c45e46
[ "MIT" ]
22
2018-08-07T06:55:10.000Z
2021-06-12T02:12:19.000Z
CS305/assignment4/echo.py
Wycers/Codelib
86d83787aa577b8f2d66b5410e73102411c45e46
[ "MIT" ]
28
2020-03-04T23:47:22.000Z
2022-02-26T18:50:00.000Z
CS305/assignment4/echo.py
Wycers/Codelib
86d83787aa577b8f2d66b5410e73102411c45e46
[ "MIT" ]
4
2019-11-09T15:41:26.000Z
2021-10-10T08:56:57.000Z
import asyncio async def echo(reader, writer): writer.write(b'Connected\r\n') await writer.drain() while True: data = await reader.readline() if not data: break print(data) writer.write(data) await writer.drain() if __name__ == '__main__': loop = as...
25
66
0.626667
a3d4617a8a2637deafa78ed990fd703729c9e63d
2,464
py
Python
ready_model/ready_model.py
CcTtry/PipeSwitch
c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e
[ "Apache-2.0" ]
null
null
null
ready_model/ready_model.py
CcTtry/PipeSwitch
c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e
[ "Apache-2.0" ]
null
null
null
ready_model/ready_model.py
CcTtry/PipeSwitch
c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e
[ "Apache-2.0" ]
null
null
null
import sys import queue import struct import threading import importlib import torch import torch.multiprocessing as mp #from experiments.helper import get_model from task.helper import get_model from util.utils import TcpServer, TcpAgent, timestamp def func_get_request(active_model_name, qout): ...
26.494624
88
0.610795
4a3ed13c04c91ffc4a35245696d31cd9810ee93a
219
py
Python
doc/for_dev/scikit-image/bench_one.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
doc/for_dev/scikit-image/bench_one.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
doc/for_dev/scikit-image/bench_one.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
1
2019-11-05T03:03:14.000Z
2019-11-05T03:03:14.000Z
import argparse from bench_util import bench_one parser = argparse.ArgumentParser(description="Run one benchmark") parser.add_argument("module", help="Module name") args = parser.parse_args() bench_one(args.module)
19.909091
65
0.794521
4abe2a4a85ea72b5a15f7fc3db9e20cab2b1406b
664
py
Python
sam_app/sam_app/view_layer/view_login.py
csjy309450/SAM-Backend
a23569ea372f718ca4a167e21e8046336db00561
[ "MIT" ]
null
null
null
sam_app/sam_app/view_layer/view_login.py
csjy309450/SAM-Backend
a23569ea372f718ca4a167e21e8046336db00561
[ "MIT" ]
null
null
null
sam_app/sam_app/view_layer/view_login.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 ResBase class ResLogin(ResBase): def __init__(self, errorCode, status, type, currentAuthority): super(ResLogin, self).__init__(errorCode) self.status = status self.type = ...
26.56
66
0.701807
437210adcad976626f3a2b7636fd393037e05a2f
971
py
Python
exercises/python/data-types/strings/string-validators.py
rogeriosantosf/hacker-rank-profile
d4b9c131524d138c415e5c5de4e38c6b8c35dd77
[ "MIT" ]
null
null
null
exercises/python/data-types/strings/string-validators.py
rogeriosantosf/hacker-rank-profile
d4b9c131524d138c415e5c5de4e38c6b8c35dd77
[ "MIT" ]
null
null
null
exercises/python/data-types/strings/string-validators.py
rogeriosantosf/hacker-rank-profile
d4b9c131524d138c415e5c5de4e38c6b8c35dd77
[ "MIT" ]
null
null
null
# Input Format # A single line containing a string . # Constraints # Output Format # In the first line, print True if has any alphanumeric characters. Otherwise, print False. # In the second line, print True if has any alphabetical characters. Otherwise, print False. # In the third line, print True if has any digi...
28.558824
92
0.697219
438f0a486321d2efb26b0147a36ee34e74295e5e
7,159
py
Python
test/test_npu/test_network_ops/test_xor.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_xor.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_xor.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...
40.908571
74
0.682218
43d437eba683383927a87019c34f5fdbdb9a57e1
543
py
Python
source/pkgsrc/math/py-numpy/patches/patch-numpy_distutils_fcompiler_____init____.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/math/py-numpy/patches/patch-numpy_distutils_fcompiler_____init____.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/math/py-numpy/patches/patch-numpy_distutils_fcompiler_____init____.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-numpy_distutils_fcompiler_____init____.py,v 1.1 2019/02/01 09:24:25 adam Exp $ Recognize g95. --- numpy/distutils/fcompiler/__init__.py.orig 2013-04-07 05:04:05.000000000 +0000 +++ numpy/distutils/fcompiler/__init__.py @@ -756,7 +756,7 @@ _default_compilers = ( ('irix.*', ('mips', 'gnu', 'gnu95',)...
33.9375
93
0.563536
60ba97cdbbe7cb08c486288f9cd3dc79c9eb54de
322
py
Python
showcase7/com/aaron/main.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
null
null
null
showcase7/com/aaron/main.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
2
2021-03-25T22:00:07.000Z
2022-01-20T15:51:48.000Z
showcase7/com/aaron/main.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
null
null
null
# -*- codiing:utf-8 -*- """ request example pip install requests requests 模块号称 HTTP for Human """ __author__="aaron.qiu" import requests def show_url_ip(): response = requests.get('https://httpbin.org/ip') print('Your IP is {0}'.format(response.json()['origin'])) if __name__=="__main__": show_url_ip() ...
15.333333
61
0.670807
60e1dc74d4b26e6a354f7770aafb303bc3a77562
225
py
Python
python/requests/python_requests_library_guide/timeout_exception.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/requests/python_requests_library_guide/timeout_exception.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/requests/python_requests_library_guide/timeout_exception.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
import requests from requests.exceptions import Timeout try: response = requests.get('https://api.github.com', timeout=1) except Timeout: print('The request time out') else: print('The request did not time out')
22.5
64
0.724444
71cc7dab42de40a563218b16722b86164432083a
64,357
py
Python
myems-api/core/shopfloor.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
82
2021-02-19T10:24:31.000Z
2022-03-28T06:30:18.000Z
myems-api/core/shopfloor.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
188
2021-02-22T07:08:30.000Z
2022-03-02T04:11:03.000Z
myems-api/core/shopfloor.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
54
2021-02-19T08:48:46.000Z
2022-03-30T06:21:34.000Z
import falcon import simplejson as json import mysql.connector import config import uuid from core.useractivity import user_logger, access_control class ShopfloorCollection: @staticmethod def __init__(): """Initializes ShopfloorCollection""" pass @staticmethod def on_options(req, resp...
40.122818
117
0.53037
e0af03416b2de4bd02b41d4a9bce9293a9f8f1dd
1,335
py
Python
tests/onegov/org/test_views_external_links.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/org/test_views_external_links.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/org/test_views_external_links.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
def test_external_links_in_forms(client): """ Test adding a fake form that is a dummy to an external url. So this is the first collection mixing models together. """ client.login_admin() page = client.get('/forms').click('Externes Formular', index=0) assert page.pyquery('.main-title').text().st...
33.375
78
0.655431
460675363598f2c7959060cfc460b898e8012411
303
py
Python
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-008/pg-8.8-replace-mathod.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-008/pg-8.8-replace-mathod.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-008/pg-8.8-replace-mathod.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
country = "North Korea" new_country = country.replace("North", "South") print("new_country = ", new_country) print("country = ", country) text = "this is a test. this is another test. this is final test." new_text = text.replace("this", "This") print("new_text = ", new_text) print("text = ", text)
23.307692
66
0.679868
1c7661335382922f56337df01a35c3fc20ca4fee
1,965
py
Python
doc/for_dev/scikit-image/future/_convex_hull.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
doc/for_dev/scikit-image/future/_convex_hull.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
doc/for_dev/scikit-image/future/_convex_hull.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
1
2019-11-05T03:03:14.000Z
2019-11-05T03:03:14.000Z
import numpy as np from transonic import boost, Array @boost(wraparound=False, boundscheck=False, cdivision=True, nonecheck=False) def possible_hull(img: "uint8[:,:]"): """Return positions of pixels that possibly belong to the convex hull. Parameters ---------- img : ndarray of bool Binary i...
27.676056
78
0.518066
c76b7366555149684eddf81866740e845beedb45
3,030
py
Python
python/en/_numpy/test-list_of_lists2numpy_array_of_lists.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_numpy/test-list_of_lists2numpy_array_of_lists.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_numpy/test-list_of_lists2numpy_array_of_lists.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ test-list_of_lists2numpy_array_of_lists.py The blog in Korea about this topic is at https://blog.naver.com/aimldl/221637320394 Google search: python list of lists to numpy array of lists Referenced documents (1) List of lists into numpy array, https://stackoverflow.com/questions/10346336/lis...
28.317757
275
0.580198
c7e90771d5e2086622f44bf44b8455ff7ae5d661
2,869
py
Python
TreeModelLib/BelowgroundCompetition/OGSWithoutFeedback/python_source.py
jvollhueter/pyMANGA-1
414204a394d44405225b4b8224b19464c1006f1d
[ "MIT" ]
1
2021-03-16T08:35:50.000Z
2021-03-16T08:35:50.000Z
TreeModelLib/BelowgroundCompetition/OGSWithoutFeedback/python_source.py
jvollhueter/pyMANGA-1
414204a394d44405225b4b8224b19464c1006f1d
[ "MIT" ]
67
2019-11-14T11:29:52.000Z
2022-03-09T14:37:11.000Z
TreeModelLib/BelowgroundCompetition/OGSWithoutFeedback/python_source.py
jvollhueter/pyMANGA-1
414204a394d44405225b4b8224b19464c1006f1d
[ "MIT" ]
6
2019-11-12T11:11:41.000Z
2021-08-12T13:57:22.000Z
import OpenGeoSys import vtk as vtk import numpy as np from math import pi, sin import os seaward_salinity = 0.035 tide_daily_amplitude = .7 tide_monthly_amplitude = .37 tide_daily_period = 60 * 60 * 12. tide_monthly_period = 60. * 60 * 24 * 31 / 2. def tidal_cycle(t): return (sin(2 * pi * t / tide_daily_period...
28.979798
77
0.631579
40568184519bfcf4ebe0010a486c466b240d1c5d
10,319
py
Python
spark_sql/spark_sql.py
xiaolifeipiao/xiaolifeipiao-spark-integrated-curriculum
f9b502ac4a7bd8663005f1bfd2c8ebec5bce9e74
[ "Apache-2.0" ]
6
2021-11-11T01:06:08.000Z
2021-11-18T02:45:25.000Z
spark_sql/spark_sql.py
xiaolifeipiao/xiaolifeipiao-spark-integrated-curriculum
f9b502ac4a7bd8663005f1bfd2c8ebec5bce9e74
[ "Apache-2.0" ]
null
null
null
spark_sql/spark_sql.py
xiaolifeipiao/xiaolifeipiao-spark-integrated-curriculum
f9b502ac4a7bd8663005f1bfd2c8ebec5bce9e74
[ "Apache-2.0" ]
null
null
null
from pyspark import SparkContext import time import matplotlib.pyplot as plt from pyspark.sql.types import * from pyspark.sql import Row from pyspark.sql import SQLContext from pyspark.ml.linalg import Vector from pyspark.ml import Pipeline, PipelineModel from pyspark.ml.classification import LogisticRegression from ...
44.478448
157
0.562361
40702be4199acc0b544efacc83f37b136cdbeb31
201
py
Python
Licence 1/I11/test.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
8
2020-11-26T20:45:12.000Z
2021-11-29T15:46:22.000Z
Licence 1/I11/test.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
null
null
null
Licence 1/I11/test.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
6
2020-10-23T15:29:24.000Z
2021-05-05T19:10:45.000Z
class Test: pass t = Test() setattr(t, "variable0", "Caca") setattr(t, "variable1", "Prout") setattr(t, "variable2", "C'est pas drole") for i in range(3): print(getattr(t, "variable" + str(i)))
18.272727
42
0.631841
409f29aa78bfb9d795203a76496f02bd3b1d6d1d
12,614
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/voss/test_voss_config.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/voss/test_voss_config.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/voss/test_voss_config.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
46.205128
153
0.687807
9ed0d9beaaaa3f757906d2727c2f11faaa55f97d
8,974
py
Python
Contrib-Inspur/openbmc/poky/bitbake/lib/bb/fetch2/clearcase.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/bb/fetch2/clearcase.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/bb/fetch2/clearcase.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
11
2019-07-20T00:16:32.000Z
2022-01-11T14:17:48.000Z
""" BitBake 'Fetch' clearcase implementation The clearcase fetcher is used to retrieve files from a ClearCase repository. Usage in the recipe: SRC_URI = "ccrc://cc.example.org/ccrc;vob=/example_vob;module=/example_module" SRCREV = "EXAMPLE_CLEARCASE_TAG" PV = "${@d.getVar("SRCREV", False).replace("/", "+...
36.331984
161
0.58012
732ddba2b0a4c971b8749904e1602d831a098402
702
py
Python
BITs/2014/VOROSHIN_S_I/task_7_7.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
BITs/2014/VOROSHIN_S_I/task_7_7.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
BITs/2014/VOROSHIN_S_I/task_7_7.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
#Задача №7, Вариант 7 #Компьютер загадывает имя одного из двух сооснавателей Google, а игрок угадывает. #Если он угадывает, то получает баллы. Если не угадывает, то его баллы уменьшаются. #Ворошин С.И. #21.03.2016 import random osnavateli=('Ларри Пейдж','Сергей Брин') osnavatel=random.randint(0,1) rand=osn...
27
84
0.69943
b46390310675adee82512c5c6ebe5b536d8bbf19
721
py
Python
SBTK_League_Helper/src/tools/markers.py
juanchodepisa/sbtk
7cba7748e75a02b491e551d6c1be9bd7987c5051
[ "MIT" ]
null
null
null
SBTK_League_Helper/src/tools/markers.py
juanchodepisa/sbtk
7cba7748e75a02b491e551d6c1be9bd7987c5051
[ "MIT" ]
null
null
null
SBTK_League_Helper/src/tools/markers.py
juanchodepisa/sbtk
7cba7748e75a02b491e551d6c1be9bd7987c5051
[ "MIT" ]
null
null
null
from collections import Counter class AdHocMarker(object): __counters = Counter() def __init__(self, mark, scope=None): self.__id = (AdHocMarker.__counters[scope], scope) AdHocMarker.__counters[scope] += 1 self.__mark = mark @property def mark(self): return self.__m...
25.75
85
0.588072
b47fdf5d3d1f9efa6098c66a5846525c2ff6fb41
868
py
Python
DataToLemo.py
finngaida/lemo
0355c68b118c4a02b0b475050c46f8e49a1e649d
[ "MIT" ]
null
null
null
DataToLemo.py
finngaida/lemo
0355c68b118c4a02b0b475050c46f8e49a1e649d
[ "MIT" ]
null
null
null
DataToLemo.py
finngaida/lemo
0355c68b118c4a02b0b475050c46f8e49a1e649d
[ "MIT" ]
null
null
null
from Adafruit_BME280 import * import time import datetime import urllib2 station_id = "010" server_ip="http://172.16.110.45:2101" def read_all(sensor): c_time = str(int(time.mktime(datetime.datetime.now().timetuple()))) degrees = str(sensor.read_temperature()) pascals = sensor.read_pressure(...
32.148148
124
0.675115
82712b6e5063ee897f14fd45ef51f9519a0e3224
1,922
py
Python
syntax_tree.py
Peetee06/compilerbau_ws2122_hsbochum
9b71e33f7385ba946ce7f4d375b7ca68b21dd97f
[ "MIT" ]
null
null
null
syntax_tree.py
Peetee06/compilerbau_ws2122_hsbochum
9b71e33f7385ba946ce7f4d375b7ca68b21dd97f
[ "MIT" ]
null
null
null
syntax_tree.py
Peetee06/compilerbau_ws2122_hsbochum
9b71e33f7385ba946ce7f4d375b7ca68b21dd97f
[ "MIT" ]
2
2022-03-13T18:48:24.000Z
2022-03-20T16:45:19.000Z
from token_ import Token class SyntaxTree: def __init__(self, token): """ Parameters ---------- token : Token children : List of SyntaxTree """ self._token = token # Token("ADD") # children of the SyntaxTree # list of SyntaxTree # ...
20.666667
54
0.582726
7d7f6af908974e866d7491df7017e951fe49c05d
2,486
py
Python
src/bo4e/com/vertragsteil.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/com/vertragsteil.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/com/vertragsteil.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
""" Contains Vertragsteil class and corresponding marshmallow schema for de-/serialization """ from datetime import datetime from typing import Optional import attr from marshmallow import fields from bo4e.com.com import COM, COMSchema from bo4e.com.menge import Menge, MengeSchema # pylint: disable=too-few-public-m...
34.527778
179
0.744972
c4a31e3c5a023e8e3e244ffc669be469b3118a96
196
py
Python
WD/Cwiczenia/TestowanieBledow.py
galursa/UWM
b7ab4a275662764a91af6c5bc79da0d98177d0ac
[ "MIT" ]
1
2020-02-29T14:38:33.000Z
2020-02-29T14:38:33.000Z
WD/Cwiczenia/TestowanieBledow.py
galursa/UWM
b7ab4a275662764a91af6c5bc79da0d98177d0ac
[ "MIT" ]
null
null
null
WD/Cwiczenia/TestowanieBledow.py
galursa/UWM
b7ab4a275662764a91af6c5bc79da0d98177d0ac
[ "MIT" ]
null
null
null
try: zmienna=input("Proszę podać liczbę") print(zmienna) zmienna=int(zmienna) zmienna*=2 print(zmienna+":") except TypeError: print("Powstał błąd rzutowania typu")
21.777778
42
0.642857
c4c8ede7975704a1a19ea02e2ed7cc4d6606e5e1
108
py
Python
RDS/circle1_adapters_and_ports/port_zenodo/tests/conftest.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
10
2020-06-24T08:22:24.000Z
2022-01-13T16:17:36.000Z
RDS/circle1_adapters_and_ports/port_zenodo/tests/conftest.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
78
2020-01-23T14:32:06.000Z
2022-03-07T14:11:16.000Z
RDS/circle1_adapters_and_ports/port_zenodo/tests/conftest.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
1
2020-06-24T08:33:48.000Z
2020-06-24T08:33:48.000Z
import os,sys sys.path.append(f"{os.getcwd()}/src") # for connexion sys.path.append(f"{os.getcwd()}/tests")
27
53
0.694444
1ef09c976a43489614bd8b5f87874e9bde09afdd
4,160
py
Python
Assets/Scripts/Horizons/HORIZONSDataCreator.py
camden-bock/verlet_simulation
74fc4962d143a0b4740129a0b6efaf4b33dadc76
[ "MIT" ]
null
null
null
Assets/Scripts/Horizons/HORIZONSDataCreator.py
camden-bock/verlet_simulation
74fc4962d143a0b4740129a0b6efaf4b33dadc76
[ "MIT" ]
null
null
null
Assets/Scripts/Horizons/HORIZONSDataCreator.py
camden-bock/verlet_simulation
74fc4962d143a0b4740129a0b6efaf4b33dadc76
[ "MIT" ]
null
null
null
#!/usr/bin/env python from telnetlib import Telnet import io import datetime import re import xml.etree.cElementTree as ET def test2(): root = ET.Element("root") orbitRoot = ET.Element("root") bodyList = [b'10',b'301'] now = datetime.datetime.now() print("Accessing JPL Horizons via Telnet") tn ...
32.248062
91
0.488702
6f8aafe4cffc97fbf4127d7dfcefdb591f4f5f43
6,035
py
Python
taren/episode.py
ThirtySomething/TaRen
ef09e8616c45bcb97afcea3ad4844ae6fade7525
[ "MIT" ]
null
null
null
taren/episode.py
ThirtySomething/TaRen
ef09e8616c45bcb97afcea3ad4844ae6fade7525
[ "MIT" ]
null
null
null
taren/episode.py
ThirtySomething/TaRen
ef09e8616c45bcb97afcea3ad4844ae6fade7525
[ "MIT" ]
null
null
null
''' ****************************************************************************** Copyright 2020 ThirtySomething ****************************************************************************** This file is part of TaRen. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and ...
48.669355
170
0.626843
d21b10b72c873f3a7f2ab10f5ce227fea0fe384c
1,818
py
Python
torch/distributed/_sharded_optim/__init__.py
vuanvin/pytorch
9267fd8d7395074001ad7cf2a8f28082dbff6b0b
[ "Intel" ]
5
2018-04-24T13:41:12.000Z
2019-07-09T07:32:09.000Z
torch/distributed/_sharded_optim/__init__.py
vuanvin/pytorch
9267fd8d7395074001ad7cf2a8f28082dbff6b0b
[ "Intel" ]
14
2021-10-14T06:58:50.000Z
2021-12-17T11:51:07.000Z
torch/distributed/_sharded_optim/__init__.py
vuanvin/pytorch
9267fd8d7395074001ad7cf2a8f28082dbff6b0b
[ "Intel" ]
7
2020-08-31T22:49:59.000Z
2020-09-15T14:29:07.000Z
from typing import Iterator, Tuple, Union from .api import ShardedOptimizer import torch.nn as nn from torch.distributed._sharded_tensor import ( ShardedTensor ) def named_params_with_sharded_tensor( module: nn.Module, prefix: str = '', recurse: bool = True, ) -> Iterator[Tuple[str, Union[nn.Paramete...
33.666667
84
0.650715
d229998851a8211d9dceecf7986f3d4363d18b9d
233
py
Python
tarefas-poo/lista-03/navio/programa.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
tarefas-poo/lista-03/navio/programa.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
tarefas-poo/lista-03/navio/programa.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
# -------------------------- # UFSC - CTC - INE - INE5603 # Exercício do Navio # -------------------------- # programa principal # from view.interface_com_usuario import InterfaceComUsuario iu = InterfaceComUsuario() iu.interaja()
19.416667
58
0.579399
d24695e58da25818cf3af49f47438d312361570c
441
py
Python
PYTHON/Collections/most_common.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
PYTHON/Collections/most_common.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
PYTHON/Collections/most_common.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys from collections import Counter, OrderedDict from itertools import islice if __name__ == '__main__': S = input().strip() S = sorted(S) cnt = Counter() for s in S: cnt[s] += 1 res = OrderedDict(sorted(cnt.items(), key=lambda t: t[0])) res = OrderedDict(...
25.941176
76
0.612245
83b2998535c4140de2457f601c77c78c7aaab33f
2,994
py
Python
frappe-bench/apps/erpnext/erpnext/setup/doctype/company/test_company.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/setup/doctype/company/test_company.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/setup/doctype/company/test_company.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 import unittest from frappe.utils import random_string from erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts import ge...
34.022727
103
0.699733
f7d79c7d9ee2293a7ffb1d260d3e444f2d2708b4
4,017
py
Python
test/test_npu/test_onnx/torch.onnx/export/export_onnx.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-12-02T03:07:35.000Z
2021-12-02T03:07:35.000Z
test/test_npu/test_onnx/torch.onnx/export/export_onnx.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-11-12T07:23:03.000Z
2021-11-12T08:28:13.000Z
test/test_npu/test_onnx/torch.onnx/export/export_onnx.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020 Huawei Technologies Co., Ltd # Copyright (c) 2019, Facebook CORPORATION. # 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/lice...
44.142857
160
0.692806
f71071d4bb2196aec59b0c0f18d4ae62abec55f4
1,313
py
Python
api/clean/sequence_nick.py
Latent-Lxx/dazhou-dw
902b4b625cda4c9e4eb205017b8955b81f37a0b5
[ "MIT" ]
null
null
null
api/clean/sequence_nick.py
Latent-Lxx/dazhou-dw
902b4b625cda4c9e4eb205017b8955b81f37a0b5
[ "MIT" ]
null
null
null
api/clean/sequence_nick.py
Latent-Lxx/dazhou-dw
902b4b625cda4c9e4eb205017b8955b81f37a0b5
[ "MIT" ]
1
2022-02-11T04:44:37.000Z
2022-02-11T04:44:37.000Z
# !/usr/bin/python3 # -*- coding: utf-8 -*- # @Time : 2021/7/5 下午5:29 # @Author : Latent # @Email : latentsky@gmail.com # @File : sequence_nick.py # @Software: PyCharm # @class : 清晰店铺的相关信息 """ 字段说明: 1.nick_id ---->数据库自增 2.nick_name 3.nick 4.brand 5.company_name 6.platform """ from tools_class import Tools_Class cla...
20.84127
57
0.529322
f71caf4a0f239065a54f05daee5fc3a53ea19433
696
py
Python
tarefas-poo/lista-03/tribo/view/paineis/painel_cria_tribo.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
tarefas-poo/lista-03/tribo/view/paineis/painel_cria_tribo.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
tarefas-poo/lista-03/tribo/view/paineis/painel_cria_tribo.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
# -------------------------- # UFSC - CTC - INE - INE5663 # Exercício da Tribo # -------------------------- # Classe responsável por criar uma tribo # from model.tribo import Tribo from view.paineis.painel_abstrato import PainelAbstrato class PainelCriaTribo(PainelAbstrato): def __init__(self, iu): super...
30.26087
80
0.627874
5880ead29baff0545c66af82a676aa60a49b0969
373
py
Python
Python/Topics/AsyncIO/01-synchronous.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
Python/Topics/AsyncIO/01-synchronous.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
Python/Topics/AsyncIO/01-synchronous.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
import time def print_my_name(name, seconds): print(f"Printing name {name} after {seconds}") time.sleep(seconds) print(f"My name is {name}") if __name__ == "__main__": s = time.perf_counter() print_my_name("Sadman", 4) print_my_name("Amin", 2) elapsed = time.perf_counter() - s prin...
20.722222
60
0.651475
58a69c3d13211569314f489e8ca2adde38340179
7,929
py
Python
code/decisionrecorder/TrainingDataGui.py
BogyMitutoyoCTL/AI-Preparation
ef535741816b02e5e63d426a3232a688c9abd726
[ "MIT" ]
1
2020-03-30T09:25:53.000Z
2020-03-30T09:25:53.000Z
code/decisionrecorder/TrainingDataGui.py
BogyMitutoyoCTL/AI-Preparation
ef535741816b02e5e63d426a3232a688c9abd726
[ "MIT" ]
2
2020-02-05T14:00:23.000Z
2020-03-30T19:57:19.000Z
code/decisionrecorder/TrainingDataGui.py
BogyMitutoyoCTL/AI-Preparation
ef535741816b02e5e63d426a3232a688c9abd726
[ "MIT" ]
null
null
null
import math from tkinter import * from typing import List from Combination import Combination from Configuration import Configuration from Constants import * class SnakeView(Frame): colors = {EMPTY: "white", HEAD: "blue", BLOCKED: "green", UNKNOWN: "gray"} def __init__(self, parent, n, direction_n): ...
39.447761
126
0.594148
49a4eaa115554709fed1bc7649bd99be6f95be9e
421
py
Python
_Dist/NeuralNetworks/_Tests/AutoNN/Test.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
1,107
2016-09-21T02:18:36.000Z
2022-03-29T02:52:12.000Z
_Dist/NeuralNetworks/_Tests/AutoNN/Test.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
18
2016-12-22T10:24:47.000Z
2022-03-11T23:18:43.000Z
_Dist/NeuralNetworks/_Tests/AutoNN/Test.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
776
2016-12-21T12:08:08.000Z
2022-03-21T06:12:08.000Z
import os import sys root_path = os.path.abspath("../../../../") if root_path not in sys.path: sys.path.append(root_path) from _Dist.NeuralNetworks.f_AutoNN.NN import AutoAdvanced AutoAdvanced( "Adult", model_param_settings={"n_epoch": 3}, data_info={"file_type": "csv", "data_folder": "../_Data"} ).f...
26.3125
61
0.703088
4d859cc31e7efc519ea729f8ec79ad6111d0f906
1,855
py
Python
gemtown/advertisings/views.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
gemtown/advertisings/views.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
5
2020-09-04T20:13:39.000Z
2022-02-17T22:03:33.000Z
gemtown/advertisings/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.users import models as user_models from django.conf import ...
31.982759
93
0.648518
c4163b4ac5f5b671f539133847cd5fa9385603a5
830
py
Python
7-assets/past-student-repos/Whiteboard-Pairing-master/MergingTwoPackages/model_solution.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/Whiteboard-Pairing-master/MergingTwoPackages/model_solution.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/Whiteboard-Pairing-master/MergingTwoPackages/model_solution.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
def getIndicesOfItemWeights(arr, limit): # use a dictionary to store item weights # along with their 'complement' o = {} for i in range(len(arr)): weight = arr[i] # check the object to see if we have the # complement of the current weight complement = limit - weight if compleme...
20.75
54
0.593976
67514211a55b008c6c18535af27005bac562e0b0
933
py
Python
LoPy/LoAirRohr01/lib/HYT221.py
OffenesJena/JenLoRa
332114edc8927b577f9c4775d7c721ba63daa77b
[ "Apache-2.0" ]
1
2017-08-23T20:45:35.000Z
2017-08-23T20:45:35.000Z
LoPy/LoAirRohr01/lib/HYT221.py
OffenesJena/JenLoRa
332114edc8927b577f9c4775d7c721ba63daa77b
[ "Apache-2.0" ]
null
null
null
LoPy/LoAirRohr01/lib/HYT221.py
OffenesJena/JenLoRa
332114edc8927b577f9c4775d7c721ba63daa77b
[ "Apache-2.0" ]
null
null
null
from machine import I2C # ________ # | = = | # | __ | # | / \ | # | \__/ | # | | # |_|_|_|_|| # | | | | # | | | | # | | | | # SDA|VDD| # | | # GND SCL class HYT221: SCALE_MAX = const(16384) TEMP_OFFSET = const(40) TEMP_SCALE = const(165) HUM_SCALE = const(...
23.923077
105
0.498392
67eaf909385a520a59c73fb9b81d8efccb0830e4
270
py
Python
2.Runde/Lisa_rennt.py
christopher-besch/bwinf_37_round1
425abcce388ead2f075cfc89ff735427791d8084
[ "MIT" ]
2
2020-12-27T19:57:53.000Z
2021-01-04T15:16:42.000Z
2.Runde/Lisa_rennt.py
christopher-besch/bwinf_37_round1
425abcce388ead2f075cfc89ff735427791d8084
[ "MIT" ]
null
null
null
2.Runde/Lisa_rennt.py
christopher-besch/bwinf_37_round1
425abcce388ead2f075cfc89ff735427791d8084
[ "MIT" ]
null
null
null
from numpy import * from scipy.optimize import * def my_function(z): x = z[0] y = z[1] F = empty(2) F[0] = pow(x, 2)+pow(y, 2)-20 F[1] = y - pow(x, 2) return F zGuess = array([1, 1]) z = fsolve(my_function, zGuess) print(z)
15
34
0.511111
db34c167834c9816d2b0f41b446c10a2d6b3cfa8
830
py
Python
Python/M01_ProgrammingBasics/L02_ConditionalStatements/Exercises/Solutions/P08_Scholarship.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
null
null
null
Python/M01_ProgrammingBasics/L02_ConditionalStatements/Exercises/Solutions/P08_Scholarship.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
null
null
null
Python/M01_ProgrammingBasics/L02_ConditionalStatements/Exercises/Solutions/P08_Scholarship.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
1
2022-02-23T13:03:14.000Z
2022-02-23T13:03:14.000Z
import math income = float(input()) average_rates = float(input()) minimum_wage = float(input()) social_money = minimum_wage * 0.35 success_money = average_rates * 25 if success_money >= social_money: bigger = success_money text = "a scholarship for excellent results" else: bigger = social_money text ...
33.2
89
0.685542
e1d5434efcb8c8fc4f6ea3fd8cabe336862ce2a1
6,049
py
Python
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/screed-0.7.1-py2.7.egg/screed/screedRecord.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/screed-0.7.1-py2.7.egg/screed/screedRecord.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/screed-0.7.1-py2.7.egg/screed/screedRecord.py
poojavade/Genomics_Docker
829b5094bba18bbe03ae97daf925fee40a8476e8
[ "Apache-2.0" ]
2
2016-12-19T02:27:46.000Z
2019-07-29T02:53:54.000Z
import UserDict import types import DBConstants import gzip import bz2 class _screed_record_dict(UserDict.DictMixin): """ Simple dict-like record interface with bag behavior. """ def __init__(self, *args, **kwargs): self.d = dict(*args, **kwargs) def __getitem__(self, name): ...
30.862245
77
0.56158
c03772eec5aee60ac7d17bbb13a3d7b8d4309138
1,053
py
Python
src/onegov/file/sign/swisscom_ais.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/file/sign/swisscom_ais.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/file/sign/swisscom_ais.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import os from AIS import AIS from AIS import PDF from onegov.file.sign.generic import SigningService class SwisscomAIS(SigningService, service_name='swisscom_ais'): """ Sign PDFs using Swisscom's All-In Signing Service. """ def __init__(self, customer, key_static, cert_file, cert_key): if not os.pa...
30.970588
76
0.65812
2230917a976e34b25b389411822e1afcec96c013
840
py
Python
linkedlist.py
mayur200/hacktoberfest2021
5f141fe6dc90916d65bef17a66f0db05649c41ef
[ "MIT" ]
null
null
null
linkedlist.py
mayur200/hacktoberfest2021
5f141fe6dc90916d65bef17a66f0db05649c41ef
[ "MIT" ]
null
null
null
linkedlist.py
mayur200/hacktoberfest2021
5f141fe6dc90916d65bef17a66f0db05649c41ef
[ "MIT" ]
null
null
null
# A simple Python program for traversal of a linked list # Node class class Node: # Function to initialise the node object def __init__(self, data): self.data = data # Assign data self.next = None # Initialize next as null # Linked List class contains a Node object class LinkedList: # Function to initialize...
20
60
0.711905
18d3d6e82f441a9cf12d9590f41569ef5076d8d3
348
py
Python
exercises/es/test_02_10_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/es/test_02_10_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/es/test_02_10_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
def test(): assert ( "token1.similarity(token2)" or "token2.similarity(token1)" in __solution__ ), "¿Estás comparando la similitud entre los dos tokens?" assert ( 0 <= float(similarity) <= 1 ), "El valor de la similitud debe ser de punto flotante. ¿Lo calculaste correctamente?" __msg...
38.666667
91
0.658046
e1611feca05dac95ef86ef0f175de6ae6cb08190
1,738
py
Python
tag_1/p_2_5_temperatur_und_wetter.py
techrabbit58/uebung_informatik_vorkurs
e99312ae66ccccd6bfe45bfd3c3f43c01690659c
[ "Unlicense" ]
null
null
null
tag_1/p_2_5_temperatur_und_wetter.py
techrabbit58/uebung_informatik_vorkurs
e99312ae66ccccd6bfe45bfd3c3f43c01690659c
[ "Unlicense" ]
null
null
null
tag_1/p_2_5_temperatur_und_wetter.py
techrabbit58/uebung_informatik_vorkurs
e99312ae66ccccd6bfe45bfd3c3f43c01690659c
[ "Unlicense" ]
null
null
null
""" 2 If-Anweisungen (Tag 1) 2.5 Lass den Benutzer Temperatur (warm, kalt) und Wetter eingeben (regnerisch, verschneit, sonnig) und gib ihm einen Vorschlag zurück, wie er sich dem Wetter entsprechend kleiden soll. Beispiel: - Eingabe: Warm und sonnig - Ausgabe: Ein T-Shirt reicht für heute völlig. """ ...
43.45
106
0.666858
3650fcd9c5c3f8a3d3134e0bc72e9773e38160bb
570
py
Python
user/forms.py
hhdMrLion/Product-System
e870225ab10c32688a87426d5943d922c47c4404
[ "MIT" ]
1
2021-06-18T03:03:42.000Z
2021-06-18T03:03:42.000Z
user/forms.py
hhdMrLion/Product-System
e870225ab10c32688a87426d5943d922c47c4404
[ "MIT" ]
null
null
null
user/forms.py
hhdMrLion/Product-System
e870225ab10c32688a87426d5943d922c47c4404
[ "MIT" ]
null
null
null
from captcha.fields import CaptchaField from django import forms class UserForm(forms.Form): username = forms.CharField(label='用户名', max_length=128, widget=forms.TextInput( attrs={ 'class': 'form-control', 'placeholder': 'Username', 'autofocus': '' } ...
28.5
87
0.566667
b1a606bca48d4eb01db1d81ea58db70a379b45b1
8,695
py
Python
research/cv/CGAN/modelarts/start_train.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/CGAN/modelarts/start_train.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/CGAN/modelarts/start_train.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...
40.069124
146
0.626797
b8da8959b18aafd5d3c756583ce2bec07035270d
436
py
Python
Python/026-The-Minion-Game.py
sadikkuzu/HackerRank
2b1ed2cf41f6a5404c5b9293186f301b646b5d33
[ "Apache-2.0" ]
5
2019-03-09T22:44:01.000Z
2021-09-14T00:11:38.000Z
Python/026-The-Minion-Game.py
jguerra7/HackerRank-4
7e1663d0050ffbb0fd885b8affdada9ea13b0e80
[ "Apache-2.0" ]
4
2018-08-16T09:39:47.000Z
2018-09-14T17:37:07.000Z
Python/026-The-Minion-Game.py
jguerra7/HackerRank-4
7e1663d0050ffbb0fd885b8affdada9ea13b0e80
[ "Apache-2.0" ]
1
2020-06-01T23:38:35.000Z
2020-06-01T23:38:35.000Z
# https://www.hackerrank.com/challenges/the-minion-game def minion_game(string): # your code goes here n = len(string) S = string vows = ['A', 'E', 'I', 'O', 'U'] stus = kevs = 0 for i in xrange(n): if S[i] in vows: kevs += n-i else: stus += n-i if st...
22.947368
55
0.5
77608044dbf9e07baec7ec9c2ffb372a77d98f1f
1,468
py
Python
bigbench/bbseqio/bigbench_lite.py
dimmollo/BIG-bench
f0dffeb4f16ef5489686a81e2d63362d251cda3e
[ "Apache-2.0" ]
null
null
null
bigbench/bbseqio/bigbench_lite.py
dimmollo/BIG-bench
f0dffeb4f16ef5489686a81e2d63362d251cda3e
[ "Apache-2.0" ]
null
null
null
bigbench/bbseqio/bigbench_lite.py
dimmollo/BIG-bench
f0dffeb4f16ef5489686a81e2d63362d251cda3e
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
32.622222
74
0.675749
02cc5e32cf5472b00207b59385b90ee3e5267686
13,154
py
Python
data/broadlink-thermostat.py
seppe912/broadlink_thermostat2lox
0b8672b86c6898722fb5370ba5ad011099df4fa0
[ "Apache-2.0" ]
null
null
null
data/broadlink-thermostat.py
seppe912/broadlink_thermostat2lox
0b8672b86c6898722fb5370ba5ad011099df4fa0
[ "Apache-2.0" ]
null
null
null
data/broadlink-thermostat.py
seppe912/broadlink_thermostat2lox
0b8672b86c6898722fb5370ba5ad011099df4fa0
[ "Apache-2.0" ]
null
null
null
#!REPLACELBPBINDIR/venv/bin/python3 # -*- coding: utf-8 -* from multiprocessing import Process, Lock, Pipe import multiprocessing, argparse, time, datetime, sys, os, signal, traceback, socket, sched, atexit import paho.mqtt.client as mqtt # pip install paho-mqtt import broadlink # pip install broadlink import json #...
44.589831
229
0.506538
02fdcbb55d038797699a4c855dc81587bac09f36
125
py
Python
tests/__init__.py
Katamave/sonnen_api_v2
a2ed19631162cd730c1c56a30c1597bbe28c4c04
[ "MIT" ]
null
null
null
tests/__init__.py
Katamave/sonnen_api_v2
a2ed19631162cd730c1c56a30c1597bbe28c4c04
[ "MIT" ]
null
null
null
tests/__init__.py
Katamave/sonnen_api_v2
a2ed19631162cd730c1c56a30c1597bbe28c4c04
[ "MIT" ]
null
null
null
import unittest from .test_sonnen import TestSonnen def main(): unittest.main() if __name__ == '__main__': main()
12.5
35
0.688
b832b88048bc6f2a8accfacae6c8f9e1203a4e10
384
py
Python
frappe-bench/apps/erpnext/erpnext/templates/pages/task_info.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/templates/pages/task_info.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/templates/pages/task_info.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 import _ def get_context(context): context.no_cache = 1 task = frappe.get_doc('Task', frappe.form_dict.task) context.comments = frappe.get_all('Communication', filters={'reference_name': task.name, 'comment_type': 'comment'}, fields=['subject', ...
27.428571
117
0.760417
b85d8efe04c6a836bd00f82442c25a977ba2203e
1,792
py
Python
tests/test_api_product.py
ralfkret/hvz
842c25d58fb3c30060080efcfa8b3d183b78e2ab
[ "MIT" ]
1
2019-07-30T14:39:43.000Z
2019-07-30T14:39:43.000Z
tests/test_api_product.py
ralfkret/hvz
842c25d58fb3c30060080efcfa8b3d183b78e2ab
[ "MIT" ]
11
2019-07-31T13:40:30.000Z
2019-08-07T21:54:52.000Z
tests/test_api_product.py
ralfkret/hvz
842c25d58fb3c30060080efcfa8b3d183b78e2ab
[ "MIT" ]
null
null
null
from web.models import Product def product_url(id): return f'/api/v1/product/{id}' def test_get_one_product(client): result = client.get(product_url(1)).get_json() assert result['name'] == 'water' def test_non_existant_product_returns_404_and_json_error_msg(client): result = client.get(product_url...
32
85
0.699777
a230801d5f3f2f679b0db3346697de87c01ffa09
554
py
Python
977A-wrong-substraction.py
spreusler/codeforces-loesungen
cc8ddcc8a3c5a25906dc92ad001f7e9570a62de3
[ "MIT" ]
null
null
null
977A-wrong-substraction.py
spreusler/codeforces-loesungen
cc8ddcc8a3c5a25906dc92ad001f7e9570a62de3
[ "MIT" ]
null
null
null
977A-wrong-substraction.py
spreusler/codeforces-loesungen
cc8ddcc8a3c5a25906dc92ad001f7e9570a62de3
[ "MIT" ]
null
null
null
# Name: 977 A. Wrong Subtraction # URL: https://codeforces.com/problemset/problem/977/A # Language: Python 3.x def main(): # Einlesen der zwei Zahlen n und k # Umwandlung von input().split(" ") in Integer Zahlen via map()-Funktion n,k = map(int,input().split(" ")) #Iteriere über n in k Anzahl for i in range(k): ...
22.16
73
0.655235