hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
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
3
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
3
972
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
ce89144b73358eced1c79754fb5f490421cab763
878
py
Python
python/lib/Lib/compiler/__init__.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
69
2015-01-16T13:12:55.000Z
2022-02-14T12:55:27.000Z
python/lib/Lib/compiler/__init__.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
3
2019-07-19T18:02:02.000Z
2021-04-25T06:35:42.000Z
python/lib/Lib/compiler/__init__.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
32
2015-02-06T12:10:32.000Z
2019-06-18T03:21:36.000Z
"""Package for parsing and compiling Python source code There are several functions defined at the top level that are imported from modules contained in the package. parse(buf, mode="exec") -> AST Converts a string containing Python source code to an abstract syntax tree (AST). The AST is defined in compiler...
32.518519
77
0.763098
4ab54dc1535e7e8a9eb016ac3cd1194eee7dca71
12,016
py
Python
sdks/python/client/argo_workflows/model/io_argoproj_workflow_v1alpha1_backoff.py
BearerPipelineTest/argo-workflows
ecd91b1c4215a2ab8742f7c43eaade98a1d47eba
[ "Apache-2.0" ]
1
2022-02-24T01:45:03.000Z
2022-02-24T01:45:03.000Z
sdks/python/client/argo_workflows/model/io_argoproj_workflow_v1alpha1_backoff.py
BearerPipelineTest/argo-workflows
ecd91b1c4215a2ab8742f7c43eaade98a1d47eba
[ "Apache-2.0" ]
18
2022-02-01T23:09:58.000Z
2022-03-31T23:28:41.000Z
sdks/python/client/argo_workflows/model/io_argoproj_workflow_v1alpha1_backoff.py
BearerPipelineTest/argo-workflows
ecd91b1c4215a2ab8742f7c43eaade98a1d47eba
[ "Apache-2.0" ]
null
null
null
""" Argo Workflows API Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/ # noqa: E501 The version of the OpenAPI document: VERSION Generated by: https://openapi-g...
45.515152
206
0.578063
da5ead6eba8086ff0b074b158eca6688c1632f4e
8,170
py
Python
tensor_rl/planning/ValueIterationClass.py
umd-huang-lab/reinforcement-learning-via-spectral-methods
c7bd04d7eea6869807ed70af76960dcc542b0a82
[ "MIT" ]
null
null
null
tensor_rl/planning/ValueIterationClass.py
umd-huang-lab/reinforcement-learning-via-spectral-methods
c7bd04d7eea6869807ed70af76960dcc542b0a82
[ "MIT" ]
null
null
null
tensor_rl/planning/ValueIterationClass.py
umd-huang-lab/reinforcement-learning-via-spectral-methods
c7bd04d7eea6869807ed70af76960dcc542b0a82
[ "MIT" ]
null
null
null
# Python imports. from __future__ import print_function from collections import defaultdict import random # Check python version for queue module. import sys if sys.version_info[0] < 3: import Queue as queue else: import queue # Other imports. from tensor_rl.planning.PlannerClass import Planner class ValueIteratio...
30.599251
172
0.566463
f6270cf4070be0bd94f3ea0a479f5616677a7877
9,100
py
Python
CRAFT/craft_utils.py
PaddleEdu/OCR-models-PaddlePaddle
1a62dcf4b647310b505fa5e4a18bbd8d27c39dfd
[ "Apache-2.0" ]
12
2021-05-10T13:47:32.000Z
2021-07-30T08:59:53.000Z
CRAFT/craft_utils.py
maxpark/OCR-models-PaddlePaddle
1a62dcf4b647310b505fa5e4a18bbd8d27c39dfd
[ "Apache-2.0" ]
4
2021-05-16T11:28:32.000Z
2021-07-23T07:41:44.000Z
CRAFT/craft_utils.py
maxpark/OCR-models-PaddlePaddle
1a62dcf4b647310b505fa5e4a18bbd8d27c39dfd
[ "Apache-2.0" ]
4
2021-05-12T16:32:03.000Z
2021-11-17T23:18:39.000Z
""" Copyright (c) 2019-present NAVER Corp. MIT License """ # -*- coding: utf-8 -*- import numpy as np import cv2 import math """ auxilary functions """ # unwarp corodinates def warpCoord(Minv, pt): out = np.matmul(Minv, (pt[0], pt[1], 1)) return np.array([out[0]/out[2], out[1]/out[2]]) """ end of auxilary ...
37.142857
122
0.538022
91929608b0845bc870f3aec7748f38f1578cef35
843
py
Python
frontend/features/steps/home_step.py
mauriciochaves/minicursopythonnordeste
246059f1404fc3737554ec4b389170b4cf473ac4
[ "MIT" ]
1
2019-07-21T14:56:06.000Z
2019-07-21T14:56:06.000Z
frontend/features/steps/home_step.py
mauriciochaves/minicursopythonnordeste
246059f1404fc3737554ec4b389170b4cf473ac4
[ "MIT" ]
null
null
null
frontend/features/steps/home_step.py
mauriciochaves/minicursopythonnordeste
246059f1404fc3737554ec4b389170b4cf473ac4
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from behave import * from features.pages.home_page import HomePage use_step_matcher("re") @given("I open: https://en.wiktionary.org/prepare by the first time") def step_impl(context): context.home_page = HomePage(context.driver) context.home_page.navigate_page(c...
30.107143
69
0.740214
a1b3ac3d72b806c96786de2ba8aa11032d80c350
1,916
py
Python
gimel-dataapi/gimel-core/src/main/scripts/tools/bin/hbase/hbase_ddl_tool.py
talshimoni/gimel
c8d190e463bafa2e43bfbaafd14b5acc8c5ad50e
[ "Apache-2.0" ]
222
2018-04-08T16:41:49.000Z
2022-02-20T16:29:02.000Z
gimel-dataapi/gimel-core/src/main/scripts/tools/bin/hbase/hbase_ddl_tool.py
talshimoni/gimel
c8d190e463bafa2e43bfbaafd14b5acc8c5ad50e
[ "Apache-2.0" ]
173
2018-04-08T16:50:59.000Z
2022-01-21T19:34:22.000Z
gimel-dataapi/gimel-core/src/main/scripts/tools/bin/hbase/hbase_ddl_tool.py
talshimoni/gimel
c8d190e463bafa2e43bfbaafd14b5acc8c5ad50e
[ "Apache-2.0" ]
102
2018-04-08T16:45:06.000Z
2022-02-01T11:24:57.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
33.034483
107
0.702505
dd47d0a3acb4969eafb747bd9b2a9ffdb8fe9f84
835
py
Python
audio/utils.py
JonnoFTW/markov-img-gen
71676df8a066010231684f49eb31d79c15962bd3
[ "CC0-1.0" ]
6
2019-01-06T06:03:30.000Z
2022-02-05T17:27:32.000Z
audio/utils.py
JonnoFTW/markov-img-gen
71676df8a066010231684f49eb31d79c15962bd3
[ "CC0-1.0" ]
1
2021-09-08T12:50:38.000Z
2021-09-10T01:38:47.000Z
audio/utils.py
JonnoFTW/markov-img-gen
71676df8a066010231684f49eb31d79c15962bd3
[ "CC0-1.0" ]
1
2018-03-19T18:31:19.000Z
2018-03-19T18:31:19.000Z
from scipy.io import wavfile import os import subprocess as sp import numpy as np def readwav(fname): """ Reads in 2 channel file and converts it to mono PCM :param fname: :return: the file as an array of pcm data """ wavname = fname.split('.')[0] + '.wav' outname = 'generated.' + wavname...
25.30303
70
0.631138
7fc8547e1f93e03c437f4c12c50893ef62e93c92
1,295
py
Python
Hello_8bitPixels.py
TechnoTanuki/Python_BMP
d6f7e7a4b74f7d6e8761d618c156d37c97726038
[ "MIT" ]
3
2022-02-24T15:46:43.000Z
2022-03-30T13:17:03.000Z
Hello_8bitPixels.py
TechnoTanuki/Python_BMP
d6f7e7a4b74f7d6e8761d618c156d37c97726038
[ "MIT" ]
null
null
null
Hello_8bitPixels.py
TechnoTanuki/Python_BMP
d6f7e7a4b74f7d6e8761d618c156d37c97726038
[ "MIT" ]
null
null
null
notice = """ Plot 256 color pixels Demo ----------------------------------- | Copyright 2022 by Joel C. Alcarez | | [joelalcarez1975@gmail.com] | |-----------------------------------| | We make absolutely no warranty | | of any kind, expressed or implied | |-----------------------------------| |...
32.375
67
0.488031
b7841098220244b5cda4cc7b11be9166f8769791
1,133
py
Python
custom_packages/CustomNeuralNetworks/test_CustomNeuralNetworks/test_unet.py
davidelomeo/mangroves_deep_learning
27ce24fe183b65f054c1d6b41417a64355cd0c9c
[ "MIT" ]
null
null
null
custom_packages/CustomNeuralNetworks/test_CustomNeuralNetworks/test_unet.py
davidelomeo/mangroves_deep_learning
27ce24fe183b65f054c1d6b41417a64355cd0c9c
[ "MIT" ]
null
null
null
custom_packages/CustomNeuralNetworks/test_CustomNeuralNetworks/test_unet.py
davidelomeo/mangroves_deep_learning
27ce24fe183b65f054c1d6b41417a64355cd0c9c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # This script tests the function that builds the Un-Net model. The test # itself does not look for numerical values but checks if the model # returns am object or not. This is because there are several tests # within the UNet class that checks if the input parameters are v...
32.371429
79
0.736981
2bfe22267b5d461cc28ef2ab4bc69469a27f1447
24,734
py
Python
test/functional/feature_csv_activation.py
Kingourd/bitcoin
bd5670eafcfbdf2b0bcb2c74655f860bac8eef45
[ "MIT" ]
1
2021-09-12T18:52:22.000Z
2021-09-12T18:52:22.000Z
test/functional/feature_csv_activation.py
Kingourd/bitcoin
bd5670eafcfbdf2b0bcb2c74655f860bac8eef45
[ "MIT" ]
null
null
null
test/functional/feature_csv_activation.py
Kingourd/bitcoin
bd5670eafcfbdf2b0bcb2c74655f860bac8eef45
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test CSV soft fork activation. This soft fork will activate the following BIPS: BIP 68 - nSequence re...
50.374745
155
0.688688
f0be92933f5c1898a35c67e43696ae5e848d7eae
4,799
py
Python
stog/data/token_indexers/token_characters_indexer.py
emorynlp/levi-graph-amr-parser
f71f1056c13181b8db31d6136451fb8d57114819
[ "Apache-2.0" ]
9
2021-07-12T22:05:47.000Z
2022-02-22T03:10:14.000Z
stog/data/token_indexers/token_characters_indexer.py
emorynlp/levi-graph-amr-parser
f71f1056c13181b8db31d6136451fb8d57114819
[ "Apache-2.0" ]
4
2021-08-31T08:28:37.000Z
2022-03-28T05:52:14.000Z
stog/data/token_indexers/token_characters_indexer.py
emorynlp/levi-graph-amr-parser
f71f1056c13181b8db31d6136451fb8d57114819
[ "Apache-2.0" ]
null
null
null
from typing import Dict, List import itertools from overrides import overrides from stog.utils.checks import ConfigurationError from stog.utils.string import pad_sequence_to_length from stog.data.tokenizers.token import Token from stog.data.token_indexers.token_indexer import TokenIndexer from stog.data.vocabulary im...
45.704762
105
0.646593
e69e67d259938c8ebc95410acce6dc9dd732c4d2
840
py
Python
ihome/web_html.py
tianxinyueming/iHome-python
7cc6089d12ccebe148d46218c69889d83bd1511f
[ "MIT" ]
1
2020-12-15T07:44:48.000Z
2020-12-15T07:44:48.000Z
ihome/web_html.py
tianxinyueming/iHome-python
7cc6089d12ccebe148d46218c69889d83bd1511f
[ "MIT" ]
null
null
null
ihome/web_html.py
tianxinyueming/iHome-python
7cc6089d12ccebe148d46218c69889d83bd1511f
[ "MIT" ]
null
null
null
# coding: utf-8 from flask import Blueprint, current_app, make_response from flask_wtf import csrf # 提供静态文件的蓝图 html = Blueprint("web_html", __name__) # 127.0.0.1:5000/ # 127.0.0.1:5000/index.html # 127.0.0.1:5000/register.html # 127.0.0.1:5000/favicon.ico # 浏览器认为的网站标识,浏览器会自己请求这个资源 @html.route("/<re(r'.*'):html_fil...
24.705882
70
0.7
10ff688161d965820c56a570d8782ce1f5cedee2
2,221
py
Python
irrigator_pro/uga/models.py
warnes/irrigatorpro
4838f8832bdbf87f394a0298adc5dabfc26e82e8
[ "MIT" ]
null
null
null
irrigator_pro/uga/models.py
warnes/irrigatorpro
4838f8832bdbf87f394a0298adc5dabfc26e82e8
[ "MIT" ]
null
null
null
irrigator_pro/uga/models.py
warnes/irrigatorpro
4838f8832bdbf87f394a0298adc5dabfc26e82e8
[ "MIT" ]
null
null
null
from django.db import models from farms.models import * class UGAProbeData(models.Model): id = models.AutoField (db_column="data_id", primary_key=True) datetime = models.DateTimeField(db_column="dt" ) field_code = models.IntegerField (db_column...
52.880952
89
0.517335
eb177681b211bd25acfe721848ba2e8e4bf4cad6
538
py
Python
Ocular/items.py
Ocular/Ocular
a0919e0a2676774fd4ed8d617a76a2574aedee3c
[ "MIT" ]
1
2015-04-05T10:42:57.000Z
2015-04-05T10:42:57.000Z
Ocular/items.py
Ocular/Ocular
a0919e0a2676774fd4ed8d617a76a2574aedee3c
[ "MIT" ]
null
null
null
Ocular/items.py
Ocular/Ocular
a0919e0a2676774fd4ed8d617a76a2574aedee3c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class OcularItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() guid = scrapy.Field() id = scrapy.Fi...
22.416667
51
0.641264
b080f2cee3f65b6228b1b3527fe0d040cdc035c2
4,361
py
Python
app/modules/users/routes.py
ezequiaspedro/SBF-Api
547322505ed4f50bdf7dc86a341eee0a667f0a4c
[ "MIT" ]
null
null
null
app/modules/users/routes.py
ezequiaspedro/SBF-Api
547322505ed4f50bdf7dc86a341eee0a667f0a4c
[ "MIT" ]
null
null
null
app/modules/users/routes.py
ezequiaspedro/SBF-Api
547322505ed4f50bdf7dc86a341eee0a667f0a4c
[ "MIT" ]
1
2021-06-12T01:36:17.000Z
2021-06-12T01:36:17.000Z
# Standard Imports from fastapi import APIRouter from fastapi import HTTPException from fastapi import Depends from sqlalchemy.orm import Session # Database Import from app.db.engine import get_db # Typing Imports from typing import List # Exception imports from sqlalchemy.exc import IntegrityError #...
29.666667
109
0.639991
143fcb665f71f9cfbbfdab294a8a88f75f6f3496
408
py
Python
snippets/urls.py
pplmx/LearningDjango
c1d9c6e70aff91fe2dd4c9a5f175032c868d25ca
[ "MIT" ]
null
null
null
snippets/urls.py
pplmx/LearningDjango
c1d9c6e70aff91fe2dd4c9a5f175032c868d25ca
[ "MIT" ]
null
null
null
snippets/urls.py
pplmx/LearningDjango
c1d9c6e70aff91fe2dd4c9a5f175032c868d25ca
[ "MIT" ]
null
null
null
from django.urls import path, include from rest_framework.routers import DefaultRouter from snippets import views # Create a router and register our viewsets with it. router = DefaultRouter() router.register(r"snippets", views.SnippetViewSet) router.register(r"users", views.UserViewSet) # The API URLs are now determ...
27.2
62
0.779412
08f7cc93b1161cb35eaf17a7a572b6b015b170d7
123
py
Python
python/testData/intentions/typeInDocstring7.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/intentions/typeInDocstring7.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/intentions/typeInDocstring7.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
def foo(b<caret>ar, baz): """Do foo. :param bar: something :return: something else """ return bar + baz
20.5
27
0.569106
b90d0bafe1a35626f244ee3f43a00830b3135f7a
1,240
py
Python
Python/email_file/send_photo.py
yishantao/DailyPractice
ee26859af3faf48e63d6c2850db1d895a8a88fb1
[ "MIT" ]
null
null
null
Python/email_file/send_photo.py
yishantao/DailyPractice
ee26859af3faf48e63d6c2850db1d895a8a88fb1
[ "MIT" ]
null
null
null
Python/email_file/send_photo.py
yishantao/DailyPractice
ee26859af3faf48e63d6c2850db1d895a8a88fb1
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- import smtplib from email.mime.image import MIMEImage from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.header import Header sender = 'isyishantao@163.com' password = 'yishantao0825' # 开启邮箱服务后,设置的客户端授权密码 receivers = ['769338809@qq.com'] message = M...
24.8
64
0.715323
f232d7533f4effe5161611bc3e0862ab87c5f305
2,587
py
Python
official/vision/beta/projects/simclr/configs/simclr_test.py
akshit-protonn/models
38c8c6fe4144c93d6aadd19981c2b90570c29eba
[ "Apache-2.0" ]
8
2021-12-30T06:07:14.000Z
2022-02-10T14:49:13.000Z
official/vision/beta/projects/simclr/configs/simclr_test.py
akshit-protonn/models
38c8c6fe4144c93d6aadd19981c2b90570c29eba
[ "Apache-2.0" ]
62
2021-06-09T00:47:27.000Z
2021-09-24T09:06:58.000Z
official/vision/beta/projects/simclr/configs/simclr_test.py
akshit-protonn/models
38c8c6fe4144c93d6aadd19981c2b90570c29eba
[ "Apache-2.0" ]
2
2021-06-13T10:26:17.000Z
2021-08-28T08:40:01.000Z
# Copyright 2021 The TensorFlow 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 applica...
41.063492
105
0.745265
f0f27d5da2b16d6aac0b8818127dec40bbadf176
1,368
py
Python
jdcloud_sdk/services/vm/models/InstanceTemplateCustomData.py
jdcloud-apigateway/jdcloud-sdk-python
0886769bcf1fb92128a065ff0f4695be099571cc
[ "Apache-2.0" ]
14
2018-04-19T09:53:56.000Z
2022-01-27T06:05:48.000Z
jdcloud_sdk/services/vm/models/InstanceTemplateCustomData.py
jdcloud-apigateway/jdcloud-sdk-python
0886769bcf1fb92128a065ff0f4695be099571cc
[ "Apache-2.0" ]
15
2018-09-11T05:39:54.000Z
2021-07-02T12:38:02.000Z
jdcloud_sdk/services/vm/models/InstanceTemplateCustomData.py
jdcloud-apigateway/jdcloud-sdk-python
0886769bcf1fb92128a065ff0f4695be099571cc
[ "Apache-2.0" ]
33
2018-04-20T05:29:16.000Z
2022-02-17T09:10:05.000Z
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
36
95
0.714912
e153bec67455aa1eb690dacdf0eebd09826efa8a
6,317
py
Python
TrainingExtensions/tensorflow/src/python/aimet_tensorflow/common/operation.py
quic-akhobare/aimet
1811a0ef58a75d103e173731b436876ee5dc4c49
[ "BSD-3-Clause" ]
null
null
null
TrainingExtensions/tensorflow/src/python/aimet_tensorflow/common/operation.py
quic-akhobare/aimet
1811a0ef58a75d103e173731b436876ee5dc4c49
[ "BSD-3-Clause" ]
null
null
null
TrainingExtensions/tensorflow/src/python/aimet_tensorflow/common/operation.py
quic-akhobare/aimet
1811a0ef58a75d103e173731b436876ee5dc4c49
[ "BSD-3-Clause" ]
1
2021-03-06T18:40:33.000Z
2021-03-06T18:40:33.000Z
# /usr/bin/env python3.5 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2019, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification,...
42.682432
120
0.680545
c40f3390116a677374fa93654d3101220562472b
315
py
Python
1.-FlujoDeControl/fechas.py
vgdobon/python
d4826692856a4328d02c377a69ce73387baaf6e3
[ "MIT" ]
null
null
null
1.-FlujoDeControl/fechas.py
vgdobon/python
d4826692856a4328d02c377a69ce73387baaf6e3
[ "MIT" ]
null
null
null
1.-FlujoDeControl/fechas.py
vgdobon/python
d4826692856a4328d02c377a69ce73387baaf6e3
[ "MIT" ]
null
null
null
year = int(input("Año: ")) month = int(input("Mes: ")) day = int(input("Dia: ")) while not (1900 < year < 2021 and 0<month<13 and 0 < day < 32) : print("Escribe un año correcto") year = int(input("Año: ")) month = int(input("Mes: ")) day = int(input("Dia: ")) print(year,"-",month,"-",day,sep="")
26.25
64
0.555556
e23d76752cc11881faaf6aa0bef1ae72f920c7ca
3,934
py
Python
dev/Report/NEW_plot_velprofile.py
aakash30jan/Couette-Poiseuille_FlowCode
3110d5d818cb8fdfb4959e58d9dcbc48db325122
[ "CC-BY-4.0" ]
9
2019-01-05T09:05:05.000Z
2021-11-22T19:04:14.000Z
dev/Report/NEW_plot_velprofile.py
aakash30jan/Couette-Poiseuille_FlowCode
3110d5d818cb8fdfb4959e58d9dcbc48db325122
[ "CC-BY-4.0" ]
null
null
null
dev/Report/NEW_plot_velprofile.py
aakash30jan/Couette-Poiseuille_FlowCode
3110d5d818cb8fdfb4959e58d9dcbc48db325122
[ "CC-BY-4.0" ]
3
2020-02-28T03:44:34.000Z
2020-09-10T05:32:54.000Z
################### ################## #H*UTAU1/KIN_VIS,VW/UTAU1 #first line for plotting y+ against u+ #(YPAD(I)*UTAU1)/KIN_VIS,U(I)/UTAU2 #all lines for plotting y+ against u+ import numpy as np import matplotlib.pyplot as plt plt.rcParams.update({'font.size': 11}) #Font 11 def bc_selector(CASE): if (...
31.472
101
0.448907
1447640d36912c97e36302182ca9c6fb383891c7
6,117
py
Python
chainerui/views/result.py
chainer/chainerui
91c5c26d9154a008079dbb0bcbf69b5590d105f7
[ "MIT" ]
185
2017-12-15T09:24:07.000Z
2022-01-20T11:20:13.000Z
chainerui/views/result.py
chainer/chainerui
91c5c26d9154a008079dbb0bcbf69b5590d105f7
[ "MIT" ]
191
2017-12-15T09:14:52.000Z
2022-02-17T14:09:19.000Z
chainerui/views/result.py
chainer/chainerui
91c5c26d9154a008079dbb0bcbf69b5590d105f7
[ "MIT" ]
29
2017-12-15T09:40:45.000Z
2022-03-13T11:21:11.000Z
import datetime from flask import jsonify from flask import request from flask.views import MethodView from chainerui.database import db from chainerui.models.project import Project from chainerui.models.result import Result from chainerui.tasks import collect_results from chainerui.tasks import crawl_result class ...
33.79558
78
0.558117
74785e8cf27a7755beb611bb81d9b32164aceb63
1,912
py
Python
promise12.py
zyody/vnet.pytorch
20113f022aff784fbb4f267a8a21dab7abaf3015
[ "BSD-3-Clause" ]
3
2018-08-11T12:51:56.000Z
2019-06-26T08:13:44.000Z
promise12.py
zyody/vnet.pytorch
20113f022aff784fbb4f267a8a21dab7abaf3015
[ "BSD-3-Clause" ]
null
null
null
promise12.py
zyody/vnet.pytorch
20113f022aff784fbb4f267a8a21dab7abaf3015
[ "BSD-3-Clause" ]
2
2019-03-27T11:16:04.000Z
2022-03-22T03:03:29.000Z
import torch import torch.utils.data as data import numpy as np class PROMISE12(data.Dataset): def __init__(self, mode, images, GT=None, transform=None, GT_transform=None): if images is None: raise(RuntimeError("images must be set")) self.mode = mode self.images = images ...
34.763636
90
0.527197
0a1ba0c4807a5ef3cec03d276d9ca24adb1aef05
14,844
py
Python
tests/pools/test_pool_puzzles_lifecycle.py
Fibo-Network/fibo-blockchain
34471efc081a52443e874749bb8ea3dc50b59891
[ "Apache-2.0" ]
null
null
null
tests/pools/test_pool_puzzles_lifecycle.py
Fibo-Network/fibo-blockchain
34471efc081a52443e874749bb8ea3dc50b59891
[ "Apache-2.0" ]
null
null
null
tests/pools/test_pool_puzzles_lifecycle.py
Fibo-Network/fibo-blockchain
34471efc081a52443e874749bb8ea3dc50b59891
[ "Apache-2.0" ]
null
null
null
import copy from typing import List from unittest import TestCase from blspy import AugSchemeMPL, G1Element, G2Element, PrivateKey from fibo.types.blockchain_format.program import Program from fibo.types.blockchain_format.sized_bytes import bytes32 from fibo.types.blockchain_format.coin import Coin from fibo.types.c...
35.511962
115
0.628335
207fd47a891b33d42002da7cbc4ca5274738c8f7
4,765
py
Python
misc/rbm_pytorch.py
tsurubee/bmpy
52cc3c41ee18c54c975edca3b7cda416177e5edc
[ "MIT" ]
null
null
null
misc/rbm_pytorch.py
tsurubee/bmpy
52cc3c41ee18c54c975edca3b7cda416177e5edc
[ "MIT" ]
null
null
null
misc/rbm_pytorch.py
tsurubee/bmpy
52cc3c41ee18c54c975edca3b7cda416177e5edc
[ "MIT" ]
null
null
null
import time import numpy as np import torch import sqapy class RBM: def __init__(self, n_visible=784, n_hidden=2, alpha=0.01, device='cpu'): self.n_visible = n_visible self.n_hidden = n_hidden self.alpha = alpha self.device = device self.data = None self.wei...
39.380165
102
0.562644
a5a4c85ce4fa5d768f17e54130c1d7f5b95d492f
2,499
py
Python
chess/main.py
underscoredam/friday-classes
4e2988edd3802a7d5dac554fd12c94eb85c7d116
[ "MIT" ]
null
null
null
chess/main.py
underscoredam/friday-classes
4e2988edd3802a7d5dac554fd12c94eb85c7d116
[ "MIT" ]
null
null
null
chess/main.py
underscoredam/friday-classes
4e2988edd3802a7d5dac554fd12c94eb85c7d116
[ "MIT" ]
null
null
null
import numpy as np # Declare constants PAWN = 1 KNIGHT = 6 ROOK = 5 KING = 2 QUEEN = 3 BISHOP = 4 letter_mapper = { 'P': 1, 'K': 2, 'Q': 3, 'B': 4, 'R': 5, 'N': 6, } def print_board(board): """Flip and print the board in correct orientation.""" b1 = np.flip(board, axis=0) print(...
18.931818
102
0.593838
d99c8fc3619daae2e3cbb18671c5cd6b7c9a0466
1,527
py
Python
cabinet/exceptions.py
crgwilson/cabinet
b09e4a45656495ccd168d2644edee3106005909f
[ "MIT" ]
null
null
null
cabinet/exceptions.py
crgwilson/cabinet
b09e4a45656495ccd168d2644edee3106005909f
[ "MIT" ]
null
null
null
cabinet/exceptions.py
crgwilson/cabinet
b09e4a45656495ccd168d2644edee3106005909f
[ "MIT" ]
null
null
null
from logging import getLogger as get_logger from typing import Any logger = get_logger(__name__) class CabinetException(Exception): def __init__(self, *args: Any, **kwargs: Any): logger.exception(str(self)) class MalformedAuthHeader(CabinetException): def __init__(self, header: str) -> None: ...
27.763636
96
0.675835
670f5163f4236a1558a8459afe15db4ab3d01fb1
4,155
py
Python
Nets/TTNetParallel.py
AndresOtero/TensorDecompositionMachineLearning
455f16b405ec9d031999b0ebf9c5a68d3c20b233
[ "MIT" ]
3
2021-06-11T02:46:06.000Z
2021-08-17T02:59:30.000Z
Nets/TTNetParallel.py
AndresOtero/TensorDecompositionMachineLearning
455f16b405ec9d031999b0ebf9c5a68d3c20b233
[ "MIT" ]
null
null
null
Nets/TTNetParallel.py
AndresOtero/TensorDecompositionMachineLearning
455f16b405ec9d031999b0ebf9c5a68d3c20b233
[ "MIT" ]
null
null
null
from __future__ import print_function import torch import torch.nn as nn import torch.nn.functional as F from Utils import Constant from Utils.RanksFactory import RanksFactory from Utils.TensorTools import group_divisions class FirstKernelTensorTrain(nn.Module): def __init__(self, m, r_j): super(FirstK...
38.831776
100
0.656799
8b2015e1ca6ce09d1e0a020af172ef622b1fa9fb
7,590
py
Python
tensorpack/dataflow/remote.py
dan-anghel/tensorpack
86fcffbc167e2b703b9abd17d41388311c90fe7c
[ "Apache-2.0" ]
1
2021-09-25T15:36:07.000Z
2021-09-25T15:36:07.000Z
tensorpack/dataflow/remote.py
dan-anghel/tensorpack
86fcffbc167e2b703b9abd17d41388311c90fe7c
[ "Apache-2.0" ]
7
2019-12-16T21:58:30.000Z
2022-02-10T00:17:01.000Z
tensorpack/dataflow/remote.py
dan-anghel/tensorpack
86fcffbc167e2b703b9abd17d41388311c90fe7c
[ "Apache-2.0" ]
2
2019-09-04T00:02:29.000Z
2020-07-06T20:27:04.000Z
# -*- coding: utf-8 -*- # File: remote.py import multiprocessing as mp import time from collections import deque import tqdm from six.moves import range from ..utils import logger from ..utils.concurrency import DIE from ..utils.serialize import dumps, loads from ..utils.utils import get_tqdm_kwargs from .base impor...
33.436123
114
0.559025
b53a27c2d3cac9269092b153139120d7a6c8f757
358
py
Python
python/examples/classification_demo.py
zeyiwen/gbdt
35ddc80c6fc2d072478f8505312fd6fc34dcdd9c
[ "Apache-2.0" ]
639
2019-01-26T14:59:28.000Z
2022-03-30T09:36:29.000Z
python/examples/classification_demo.py
zeyiwen/gbdt
35ddc80c6fc2d072478f8505312fd6fc34dcdd9c
[ "Apache-2.0" ]
73
2019-02-15T14:19:04.000Z
2022-03-10T07:05:25.000Z
python/examples/classification_demo.py
zeyiwen/gbdt
35ddc80c6fc2d072478f8505312fd6fc34dcdd9c
[ "Apache-2.0" ]
92
2019-02-04T17:13:49.000Z
2021-12-30T17:30:41.000Z
import sys sys.path.append("../") from thundergbm import TGBMClassifier from sklearn.datasets import load_digits from sklearn.metrics import accuracy_score if __name__ == '__main__': x, y = load_digits(return_X_y=True) clf = TGBMClassifier() clf.fit(x, y) y_pred = clf.predict(x) accuracy = accurac...
25.571429
42
0.723464
3d62ddfe514c938c48b68f015fe7a0933a2b0914
999
py
Python
e2e/tests/utils.py
fantastic001/parkingmap
6bd780a0c50628a9bac182005c130f30af5372c7
[ "MIT" ]
null
null
null
e2e/tests/utils.py
fantastic001/parkingmap
6bd780a0c50628a9bac182005c130f30af5372c7
[ "MIT" ]
1
2022-01-21T23:35:26.000Z
2022-01-21T23:35:26.000Z
e2e/tests/utils.py
PSW-ISA-G4-MNS/PSW-ISA
f96858c64b91f7b61e8995e59154d6df36f3a970
[ "MIT" ]
null
null
null
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0 from selenium.webdriver.support import expected_conditions as EC # available since 2.26.0 import os import time def get_driver(): driver = webdriver.Chrome("ch...
30.272727
89
0.718719
bb8ba07d0c9a3b62734ccb5bf8ae258b736d112c
1,078
py
Python
desafio/desafio058.py
henriquekirchheck/Curso-em-video-Python
1a29f68515313af85c8683f626ba35f8fcdd10e7
[ "MIT" ]
null
null
null
desafio/desafio058.py
henriquekirchheck/Curso-em-video-Python
1a29f68515313af85c8683f626ba35f8fcdd10e7
[ "MIT" ]
null
null
null
desafio/desafio058.py
henriquekirchheck/Curso-em-video-Python
1a29f68515313af85c8683f626ba35f8fcdd10e7
[ "MIT" ]
null
null
null
# Melhore o jogo do DESAFIO 28 onde o computador vai “pensar” em um número entre 0 e 10. Só que agora o jogador vai tentar adivinhar até acertar, mostrando no final quantos palpites foram necessários para vencer from random import randint as random cpu = random(1, 10) player = None win = False cheat = False counter = ...
32.666667
211
0.576067
ad5e2e5bfc34147531af124c0450fa2253034816
7,091
py
Python
seleniumbase/fixtures/page_utils.py
aoruilin/SeleniumBase
304fd7a23661ebf561da47d4cd8f7365dba519ca
[ "MIT" ]
null
null
null
seleniumbase/fixtures/page_utils.py
aoruilin/SeleniumBase
304fd7a23661ebf561da47d4cd8f7365dba519ca
[ "MIT" ]
null
null
null
seleniumbase/fixtures/page_utils.py
aoruilin/SeleniumBase
304fd7a23661ebf561da47d4cd8f7365dba519ca
[ "MIT" ]
null
null
null
""" This module contains useful utility methods. 这个模块包含有用的实用方法。 """ import codecs import re import requests def get_domain_url(url): """ Use this to convert a url like this: 像这样使用这个转换一个url: https://blog.xkcd.com/2014/07/22/what-if-book-tour/ Into this: https://blog.xkcd.com """ if not...
29.794118
78
0.611338
96c61bc2e96ecd4ed8436911d2acf6fb1834682f
5,241
py
Python
tests/ClientServer/validation_tests/pys2opc/examples/3-multi-connection-multi-request.py
monate/s2opc
2fd493febf1c8351a74615acea11783feecf9f4f
[ "Apache-2.0" ]
null
null
null
tests/ClientServer/validation_tests/pys2opc/examples/3-multi-connection-multi-request.py
monate/s2opc
2fd493febf1c8351a74615acea11783feecf9f4f
[ "Apache-2.0" ]
null
null
null
tests/ClientServer/validation_tests/pys2opc/examples/3-multi-connection-multi-request.py
monate/s2opc
2fd493febf1c8351a74615acea11783feecf9f4f
[ "Apache-2.0" ]
1
2020-04-28T08:32:27.000Z
2020-04-28T08:32:27.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Licensed to Systerel under one or more contributor license # agreements. See the NOTICE file distributed with this work # for additional information regarding copyright ownership. # Systerel licenses this file to you under the Apache # License, Version 2.0 (the "License...
51.382353
166
0.70063
d68b21505db71aa3d3c2856f212ebafecd030304
196
py
Python
tests/test_pandas.py
kgizdov/awkward-0.x
11953017a5495527169d3a031a5e866904d824a2
[ "BSD-3-Clause" ]
224
2018-07-01T00:28:27.000Z
2020-11-16T11:00:25.000Z
tests/test_pandas.py
kgizdov/awkward-0.x
11953017a5495527169d3a031a5e866904d824a2
[ "BSD-3-Clause" ]
196
2018-07-12T06:48:42.000Z
2020-11-01T17:18:51.000Z
tests/test_pandas.py
kgizdov/awkward-0.x
11953017a5495527169d3a031a5e866904d824a2
[ "BSD-3-Clause" ]
42
2018-06-28T11:36:55.000Z
2020-10-23T03:24:31.000Z
import pytest pandas = pytest.importorskip("pandas") @pytest.fixture def awkward0_pandas(): from awkward0 import pandas return pandas def test_import_pandas(awkward0_pandas): pass
15.076923
40
0.760204
75d4b20a78a8c1109db237c182fb8eb3eff825be
6,278
py
Python
src/oci/apm_traces/models/query_result_row.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/apm_traces/models/query_result_row.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/apm_traces/models/query_result_row.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
51.459016
245
0.728257
90358251fb835f9aeccc8f08a923266802cc2ce3
125
py
Python
SeedApp/reports/urls.py
lutherchikumba/SeedApp
87b8e22bb256f6574cdf28f03e73a7200df54378
[ "MIT" ]
null
null
null
SeedApp/reports/urls.py
lutherchikumba/SeedApp
87b8e22bb256f6574cdf28f03e73a7200df54378
[ "MIT" ]
null
null
null
SeedApp/reports/urls.py
lutherchikumba/SeedApp
87b8e22bb256f6574cdf28f03e73a7200df54378
[ "MIT" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('reports/', views.reports_view, name='reports'), ]
20.833333
57
0.712
9fec373acdac97b149d6883c06f8ee70b778ddfa
986
py
Python
tradingviewalerts/__init__.py
tistaharahap/tradingview-alerts
c332b211d913b3abaac3f6c7fd9ae680e85a6ada
[ "MIT" ]
null
null
null
tradingviewalerts/__init__.py
tistaharahap/tradingview-alerts
c332b211d913b3abaac3f6c7fd9ae680e85a6ada
[ "MIT" ]
null
null
null
tradingviewalerts/__init__.py
tistaharahap/tradingview-alerts
c332b211d913b3abaac3f6c7fd9ae680e85a6ada
[ "MIT" ]
3
2020-08-15T12:19:49.000Z
2022-01-28T06:22:21.000Z
from sanic import Sanic from sanic.request import Request from sanic.response import text, HTTPResponse from os import environ from tradingviewalerts.forwarders.base import BaseForwarder from tradingviewalerts.forwarders.telegram import TelegramForwarder from tradingviewalerts.forwarders.rabbitmq import RabbitMQForward...
25.282051
67
0.749493
2d0a0b45419fdf04a95386056d3d4db14ee7edf9
16,776
py
Python
tests/unit/fake_api.py
peter-slovak/docker-py
3076a9ac40b91458f7e95e3c6167e1bbb92682b1
[ "Apache-2.0" ]
1
2021-07-14T15:01:30.000Z
2021-07-14T15:01:30.000Z
tests/unit/fake_api.py
peter-slovak/docker-py
3076a9ac40b91458f7e95e3c6167e1bbb92682b1
[ "Apache-2.0" ]
null
null
null
tests/unit/fake_api.py
peter-slovak/docker-py
3076a9ac40b91458f7e95e3c6167e1bbb92682b1
[ "Apache-2.0" ]
1
2020-01-23T17:13:45.000Z
2020-01-23T17:13:45.000Z
from . import fake_stat from docker import constants CURRENT_VERSION = 'v{0}'.format(constants.DEFAULT_DOCKER_API_VERSION) FAKE_CONTAINER_ID = '3cc2351ab11b' FAKE_IMAGE_ID = 'e9aa60c60128' FAKE_EXEC_ID = 'd5d177f121dc' FAKE_NETWORK_ID = '33fb6a3462b8' FAKE_IMAGE_NAME = 'test_image' FAKE_TARBALL_PATH = '/path/to/tarba...
27.233766
78
0.614986
c6f13ef052168cfa7c584aa4b90c78a07962c5f4
11,053
py
Python
recipes/folly/all/conanfile.py
Aypahyo/conan-center-index
c41d64960c66d3d81274d4189534f6fcb7bc4a36
[ "MIT" ]
null
null
null
recipes/folly/all/conanfile.py
Aypahyo/conan-center-index
c41d64960c66d3d81274d4189534f6fcb7bc4a36
[ "MIT" ]
null
null
null
recipes/folly/all/conanfile.py
Aypahyo/conan-center-index
c41d64960c66d3d81274d4189534f6fcb7bc4a36
[ "MIT" ]
null
null
null
import os from conans import ConanFile, CMake, tools from conans.tools import Version from conans.errors import ConanInvalidConfiguration from conan.tools.microsoft import is_msvc required_conan_version = ">=1.45.0" class FollyConan(ConanFile): name = "folly" description = "An open-source C++ components lib...
47.235043
159
0.624084
330ce6bd51c33c7f01e7f6d11a2a6788f4dd6539
14,407
py
Python
shared_code/pact/opg_pact/tests/test_ci_workflow.py
ministryofjustice/opg-data
6b08f5a9928823909e22506a06a8a532496a5d75
[ "RSA-MD" ]
null
null
null
shared_code/pact/opg_pact/tests/test_ci_workflow.py
ministryofjustice/opg-data
6b08f5a9928823909e22506a06a8a532496a5d75
[ "RSA-MD" ]
3
2020-04-16T14:56:52.000Z
2021-01-11T09:26:21.000Z
shared_code/pact/opg_pact/tests/test_ci_workflow.py
ministryofjustice/opg-data
6b08f5a9928823909e22506a06a8a532496a5d75
[ "RSA-MD" ]
2
2020-12-18T10:59:42.000Z
2021-04-11T06:26:07.000Z
import requests import pytest from pact_provider.check_pact_deployable import PactDeploymentCheck provider_base_url = "http://local.mock:5000" provider_custom_header = "Authorization: asdf1234567890" pact_broker_url = "http://local.broker:9292" broker_user_name = "admin" broker_secret_name = "local" # pactbroker_adm...
35.927681
163
0.758104
3c76ae542a7cf79d14381a43a1af70207fab4ddf
11,553
py
Python
test/main.py
ghl1024/RedisShake
0d72f6e6687d28f4b2218609d12f3a5bbf2ad0f0
[ "MIT" ]
2,224
2019-03-19T09:49:45.000Z
2022-03-31T10:10:20.000Z
test/main.py
ghl1024/RedisShake
0d72f6e6687d28f4b2218609d12f3a5bbf2ad0f0
[ "MIT" ]
313
2019-03-20T12:43:44.000Z
2022-03-31T01:48:13.000Z
test/main.py
ghl1024/RedisShake
0d72f6e6687d28f4b2218609d12f3a5bbf2ad0f0
[ "MIT" ]
460
2019-03-20T07:31:42.000Z
2022-03-31T10:31:44.000Z
import os import shutil import time import redis import redistrib.command import requests from colorama import Fore, Style import launcher def green_print(string): print(Fore.GREEN + str(string) + Style.RESET_ALL) def wait(): while True: time.sleep(1024) DIR = "." # RedisShake/test BASE_CONF_PA...
32.635593
118
0.620964
f85d9d0e4bc201ff422b6ac4a676eb4ef37460a3
5,183
py
Python
saleor/graphql/checkout/types.py
jdmueller/ArmoniaSaleor
1d7c1e9bb697325cee3d007b3ea811f25c4086d9
[ "BSD-3-Clause" ]
2
2019-06-08T04:07:41.000Z
2019-07-21T15:25:16.000Z
saleor/graphql/checkout/types.py
jdmueller/ArmoniaSaleor
1d7c1e9bb697325cee3d007b3ea811f25c4086d9
[ "BSD-3-Clause" ]
2
2019-07-02T13:39:49.000Z
2019-07-07T09:38:27.000Z
saleor/graphql/checkout/types.py
jdmueller/ArmoniaSaleor
1d7c1e9bb697325cee3d007b3ea811f25c4086d9
[ "BSD-3-Clause" ]
1
2019-05-02T17:30:49.000Z
2019-05-02T17:30:49.000Z
import graphene import graphene_django_optimizer as gql_optimizer from django.conf import settings from ...checkout import models from ...core.taxes import zero_taxed_money from ...core.taxes.interface import ( calculate_checkout_line_total, calculate_checkout_shipping, calculate_checkout_subtotal, cal...
32.39375
86
0.660042
83ae36d704f0960f65e1dc8c14dba07be1fd2c7f
2,236
py
Python
apache/airflow/providers/clickhouse/hooks/ClickhouseHook.py
klimenkoIv/apache-airflow-providers-clickhouse
11852d8b9ca6c2f8798dee931d393ea2a19f5032
[ "Apache-2.0" ]
1
2021-11-09T10:59:44.000Z
2021-11-09T10:59:44.000Z
apache/airflow/providers/clickhouse/hooks/ClickhouseHook.py
klimenkoIv/apache-airflow-providers-clickhouse
11852d8b9ca6c2f8798dee931d393ea2a19f5032
[ "Apache-2.0" ]
3
2021-11-06T23:59:37.000Z
2022-02-25T06:14:16.000Z
apache/airflow/providers/clickhouse/hooks/ClickhouseHook.py
klimenkoIv/apache-airflow-providers-clickhouse
11852d8b9ca6c2f8798dee931d393ea2a19f5032
[ "Apache-2.0" ]
null
null
null
from typing import Dict, Any, Iterable, Union from airflow.hooks.dbapi import DbApiHook from airflow.models.connection import Connection from clickhouse_driver import Client class ClickhouseHook(DbApiHook): """ @author = klimenko.iv@gmail.com """ def bulk_dump(self, table, tmp_file): pass ...
29.813333
82
0.59839
b2bb4617ea51d4db66a449a2ee222ddc815233f8
3,735
py
Python
prediction.py
khzhan11/medical_tool_detection_2021
bbf4814d7b83879a753d0593780395e6be8251fd
[ "MIT" ]
null
null
null
prediction.py
khzhan11/medical_tool_detection_2021
bbf4814d7b83879a753d0593780395e6be8251fd
[ "MIT" ]
null
null
null
prediction.py
khzhan11/medical_tool_detection_2021
bbf4814d7b83879a753d0593780395e6be8251fd
[ "MIT" ]
null
null
null
import argparse import tensorflow as tf import numpy as np import pathlib import cv2 import datetime from object_detection.utils import ops as utils_ops from object_detection.utils import label_map_util from object_detection.utils import visualization_utils as vis_util # Patches # patch tf1 into `utils.ops` utils_ops...
36.262136
106
0.699866
bdbdade4c868a2ba72d3cf38ec34c20a02ed5b2d
9,905
py
Python
orthogonal-planes/ROS_node/catkin_ws/src/openni2/openni2_launch/doc/conf.py
tamaslevente/trai
4bf68463b941f305d9b25a9374b6c2a2d51a8046
[ "MIT" ]
null
null
null
orthogonal-planes/ROS_node/catkin_ws/src/openni2/openni2_launch/doc/conf.py
tamaslevente/trai
4bf68463b941f305d9b25a9374b6c2a2d51a8046
[ "MIT" ]
null
null
null
orthogonal-planes/ROS_node/catkin_ws/src/openni2/openni2_launch/doc/conf.py
tamaslevente/trai
4bf68463b941f305d9b25a9374b6c2a2d51a8046
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # openni2_launch documentation build configuration file, created by # sphinx-quickstart on Fri Nov 3 15:35:05 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
32.906977
121
0.721656
47a0b818d2ab2e20d4ddd57dfaa22d5d0cf419ad
6,096
py
Python
setup.py
onceclick/sentry
2d554649d59275338b102610a68191624f6f77db
[ "BSD-3-Clause" ]
1
2021-08-10T06:07:13.000Z
2021-08-10T06:07:13.000Z
setup.py
qlg/sentry
2d554649d59275338b102610a68191624f6f77db
[ "BSD-3-Clause" ]
null
null
null
setup.py
qlg/sentry
2d554649d59275338b102610a68191624f6f77db
[ "BSD-3-Clause" ]
1
2017-04-08T04:09:18.000Z
2017-04-08T04:09:18.000Z
#!/usr/bin/env python """ Sentry ====== Sentry is a realtime event logging and aggregation platform. It specializes in monitoring errors and extracting all the information needed to do a proper post-mortem without any of the hassle of the standard user feedback loop. Sentry is a Server ------------------ The Sentry ...
27.835616
77
0.62664
89965c155e93e71ac2949ba10726486a9ef424b3
5,212
py
Python
data/shelling/shelling_extended.py
CarrKnight/nofreelunch
0400f750063215d06659a203f777b21da2e99231
[ "MIT" ]
2
2019-08-05T15:21:42.000Z
2021-04-06T15:41:40.000Z
data/shelling/shelling_extended.py
CarrKnight/nofreelunch
0400f750063215d06659a203f777b21da2e99231
[ "MIT" ]
null
null
null
data/shelling/shelling_extended.py
CarrKnight/nofreelunch
0400f750063215d06659a203f777b21da2e99231
[ "MIT" ]
null
null
null
import os import pandas as pd import pyNetLogo from multiprocessing import Pool from numpy import random import numpy NUMBER_OF_PROCESSORS = 2 NUMBER_OF_RUNS = 5000 VARIABLES_TO_TRACK = [ "percent-similar", "percent-similar-Red", "percent-similar-Blue", "percent-unhappy", 'percent-unhappy-Red', ...
27.145833
97
0.595932
b5418a5d8b8cc3bce49b20a1bd0215c299bb9323
20,512
py
Python
flatcat/io.py
MilesQLi/flatcat
123a3cbe60bb9c9ea31e6bf5f3d55dbdd88f24fd
[ "BSD-2-Clause" ]
null
null
null
flatcat/io.py
MilesQLi/flatcat
123a3cbe60bb9c9ea31e6bf5f3d55dbdd88f24fd
[ "BSD-2-Clause" ]
null
null
null
flatcat/io.py
MilesQLi/flatcat
123a3cbe60bb9c9ea31e6bf5f3d55dbdd88f24fd
[ "BSD-2-Clause" ]
2
2018-04-04T17:46:44.000Z
2018-04-17T21:40:19.000Z
from __future__ import unicode_literals import collections import datetime import logging import re import sys import bz2 import codecs import gzip import locale import os import tarfile from contextlib import contextmanager import morfessor from . import get_version from .categorizationscheme import get_categories...
37.705882
79
0.536174
96fe32afef5f63f8535b96d4ebffbe21c1175821
674
py
Python
src/items/legendary.py
bonetou/GildedRose-Refactoring-Kata
564e9d41f9233e60412d550bcef4ba18b4a2ace8
[ "MIT" ]
null
null
null
src/items/legendary.py
bonetou/GildedRose-Refactoring-Kata
564e9d41f9233e60412d550bcef4ba18b4a2ace8
[ "MIT" ]
null
null
null
src/items/legendary.py
bonetou/GildedRose-Refactoring-Kata
564e9d41f9233e60412d550bcef4ba18b4a2ace8
[ "MIT" ]
1
2021-08-15T17:00:48.000Z
2021-08-15T17:00:48.000Z
from src.items.helpers.constants import MIN_QUALITY_DEFAULT_VALUE from src.items.exceptions.invalid_quality_value import InvalidQualityValue from src.items.base import Item class LegendaryItem(Item): def __init__(self, name: str, sell_in: int, quality: int): super().__init__(name, sell_in, quality) ...
33.7
74
0.734421
bd4688ce600077304977fcb01b68e8f92ff27901
66
py
Python
book1/ch01/exercise_1_4.py
dragancvetic/py_training
f27fa021e630fa16882a0438e009a73e11d9515b
[ "MIT" ]
null
null
null
book1/ch01/exercise_1_4.py
dragancvetic/py_training
f27fa021e630fa16882a0438e009a73e11d9515b
[ "MIT" ]
null
null
null
book1/ch01/exercise_1_4.py
dragancvetic/py_training
f27fa021e630fa16882a0438e009a73e11d9515b
[ "MIT" ]
null
null
null
# has to be run as "python exercise_1_4.py" print "Hello world"
13.2
43
0.712121
0f5d182b2db9b6e4c2466fd51f76ce90234594fe
8,267
py
Python
tests/components/geocaching/test_config_flow.py
eyager1/core
c0ae31d86c841107930cf471fd60d65b5c163f16
[ "Apache-2.0" ]
null
null
null
tests/components/geocaching/test_config_flow.py
eyager1/core
c0ae31d86c841107930cf471fd60d65b5c163f16
[ "Apache-2.0" ]
17
2021-11-24T06:24:25.000Z
2022-03-31T06:23:29.000Z
tests/components/geocaching/test_config_flow.py
eyager1/core
c0ae31d86c841107930cf471fd60d65b5c163f16
[ "Apache-2.0" ]
null
null
null
"""Test the Geocaching config flow.""" from collections.abc import Awaitable, Callable from http import HTTPStatus from unittest.mock import MagicMock from aiohttp.test_utils import TestClient from homeassistant.components.geocaching.const import ( DOMAIN, ENVIRONMENT, ENVIRONMENT_URLS, ) from homeassista...
32.167315
95
0.683319
8ca9915341e3360d3ed7a2f74eb8a033bedc45fb
2,938
py
Python
plato_based/HandcraftedPolicy.py
dertilo/dialogue-systems
3530bdfae2a75360e3b09841cfff773647027d6e
[ "MIT" ]
null
null
null
plato_based/HandcraftedPolicy.py
dertilo/dialogue-systems
3530bdfae2a75360e3b09841cfff773647027d6e
[ "MIT" ]
null
null
null
plato_based/HandcraftedPolicy.py
dertilo/dialogue-systems
3530bdfae2a75360e3b09841cfff773647027d6e
[ "MIT" ]
null
null
null
import Ontology from State import SlotFillingDialogueState from DialoguePolicy import DialoguePolicy from dialog_action_classes import DialogueAct, DialogueActItem, Operator from copy import deepcopy import random """ HandcraftedPolicy is a rule-based system policy, developed as a baseline and as a quick way to perf...
32.285714
87
0.686862
3fd4c1349722ebd6973ab7aee0139befd73c5ec1
1,883
py
Python
otenki-bot.py
koba0819/Discord-OtenkiBOT
50b04de21e898f9cb18765af6273ee35a2cee2e7
[ "MIT" ]
null
null
null
otenki-bot.py
koba0819/Discord-OtenkiBOT
50b04de21e898f9cb18765af6273ee35a2cee2e7
[ "MIT" ]
null
null
null
otenki-bot.py
koba0819/Discord-OtenkiBOT
50b04de21e898f9cb18765af6273ee35a2cee2e7
[ "MIT" ]
null
null
null
import discord import requests import json import settings json_file = open('citycode.json', encoding='utf-8' ) citycode = json.load(json_file) token = settings.key client = discord.Client() @client.event async def on_ready(): print('-------------') print('logged in') print('BOT Name:', client.user.name)...
36.921569
149
0.576739
18f6062e69f2adfe9a6fc67f5dffb7f360cfdccf
17,123
py
Python
sncosmo/utils.py
jasminelujia/sncosmo
6ca3be6a52f7a096b874e181c21b93f711610f12
[ "BSD-3-Clause" ]
1
2019-03-27T09:46:46.000Z
2019-03-27T09:46:46.000Z
sncosmo/utils.py
jasminelujia/sncosmo
6ca3be6a52f7a096b874e181c21b93f711610f12
[ "BSD-3-Clause" ]
null
null
null
sncosmo/utils.py
jasminelujia/sncosmo
6ca3be6a52f7a096b874e181c21b93f711610f12
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, division from collections import OrderedDict import os import sys import math import warnings import socket import codecs import numpy as np from scipy import integrate, optimize from astropy.extern import six def dict_to_array(d): """Convert a dictionary of lists (or sin...
31.076225
79
0.585937
c2547657a381a6a77fcb061bd427540862400fb6
25,042
py
Python
allennlp/state_machines/transition_functions/basic_transition_function.py
tony-tong-punchh/allennlp
9a13ab570025a0c1659986009d2abddb2e652020
[ "Apache-2.0" ]
24
2019-09-16T00:10:54.000Z
2021-09-08T19:31:51.000Z
allennlp/state_machines/transition_functions/basic_transition_function.py
TalSchuster/allennlp-MultiLang
dbb28b939652491d2f633326edccca2cd0e528c8
[ "Apache-2.0" ]
3
2020-03-24T16:45:36.000Z
2021-02-02T21:57:00.000Z
allennlp/state_machines/transition_functions/basic_transition_function.py
TalSchuster/allennlp-MultiLang
dbb28b939652491d2f633326edccca2cd0e528c8
[ "Apache-2.0" ]
10
2019-12-06T11:32:37.000Z
2022-01-06T15:39:09.000Z
from collections import defaultdict from typing import Any, Dict, List, Set, Tuple from overrides import overrides import torch from torch.nn.modules.rnn import LSTM, LSTMCell from torch.nn.modules.linear import Linear from allennlp.modules import Attention from allennlp.nn import util, Activation from allennlp.stat...
60.634383
115
0.604704
576fc900258ca39a664eba1aac186f35dec84d65
1,483
py
Python
Thomas/Notebooks/track1.py
VigneshBaskar/gent-commuters
d631828cdae7e5af8ae106c08348b013b93617cd
[ "Apache-2.0" ]
2
2018-03-19T16:10:44.000Z
2018-04-27T13:51:37.000Z
Thomas/Notebooks/track1.py
VigneshBaskar/gent-commuters
d631828cdae7e5af8ae106c08348b013b93617cd
[ "Apache-2.0" ]
null
null
null
Thomas/Notebooks/track1.py
VigneshBaskar/gent-commuters
d631828cdae7e5af8ae106c08348b013b93617cd
[ "Apache-2.0" ]
null
null
null
bpm = 130.0 # beat per minute beat_per_bar = 8 steps_per_beat=4 bar_per_emphasis = 2 n_bars_buildup = 8 progression = [ {"part":"intro", "buildup": 1.0, "duration": 4 , "tracks":[("base", "no") , ("chords", "no") , ("drums1", "no") , ("drums2", "no") , ("melody1", "yes"), ("melody2", "no") ]}, {"part":"vers...
54.925926
178
0.493594
3f2632a1163aec9d4f499432ec6d8ad63e107829
20,846
py
Python
ai/game/hw1cs561s16.py
thammegowda/algos
a23f6129c2f031c86314a489c4a8a26f9c7130bf
[ "Apache-2.0" ]
3
2015-10-25T06:25:01.000Z
2017-02-03T01:51:49.000Z
ai/game/hw1cs561s16.py
thammegowda/algos
a23f6129c2f031c86314a489c4a8a26f9c7130bf
[ "Apache-2.0" ]
null
null
null
ai/game/hw1cs561s16.py
thammegowda/algos
a23f6129c2f031c86314a489c4a8a26f9c7130bf
[ "Apache-2.0" ]
1
2016-08-17T16:37:48.000Z
2016-08-17T16:37:48.000Z
# -*- coding: utf-8 -*- # Author : ThammeGowda Narayanaswamy # USC ID : 2074-6694-39 # Session: Spring 2016 # Course : USC CSCI 561 Foundations of Artificial Intelligence # Topic : Home work 1 : Squirrel Fight Game Strategy # # NOTE: Refer to CS561Spring2016HW1.pdf for the game rules from __future__ import print_func...
39.858509
126
0.550753
1c60eee6e9af40c2f54578e2239261783f2a8d46
11,427
py
Python
analysis/analysis_utils.py
eduardofv/lang_model_eval
d89dbe9fe291f0befb9701e8dc4cea4154cf9d45
[ "MIT" ]
1
2020-03-19T20:20:40.000Z
2020-03-19T20:20:40.000Z
analysis/analysis_utils.py
eduardofv/lang_model_eval
d89dbe9fe291f0befb9701e8dc4cea4154cf9d45
[ "MIT" ]
null
null
null
analysis/analysis_utils.py
eduardofv/lang_model_eval
d89dbe9fe291f0befb9701e8dc4cea4154cf9d45
[ "MIT" ]
null
null
null
"""Utility functions to be used by analysis tasks.""" import os import re import collections import json import numpy as np import pandas as pd import matplotlib as mpl from matplotlib import pyplot as plt import seaborn as sns #File Utils def load_metadata(directory): """Load the metadata file 'experiment_metada...
35.933962
96
0.651615
729edd111bc9e4b6b6fd230c210dbe6c51060d2b
466
py
Python
packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_activecolor.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_activecolor.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/layout/xaxis/rangeselector/_activecolor.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class ActivecolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="activecolor", parent_name="layout.xaxis.rangeselector", **kwargs, ): super(ActivecolorValidator, self).__init__( plo...
27.411765
72
0.633047
f5f7956e9c5ff667021ad10ccdbb0eb47192b31f
19,401
py
Python
tests/components/input_select/test_init.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
11
2018-02-16T15:35:47.000Z
2020-01-14T15:20:00.000Z
tests/components/input_select/test_init.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
87
2020-07-06T22:22:54.000Z
2022-03-31T06:01:46.000Z
tests/components/input_select/test_init.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11
2020-12-16T13:48:14.000Z
2022-02-01T00:28:05.000Z
"""The tests for the Input select component.""" # pylint: disable=protected-access from unittest.mock import patch import pytest from homeassistant.components.input_select import ( ATTR_OPTION, ATTR_OPTIONS, CONF_INITIAL, DOMAIN, SERVICE_SELECT_FIRST, SERVICE_SELECT_LAST, SERVICE_SELECT_NE...
28.657312
87
0.606979
04c52ca28be1fe20d8d392a987289186b26ab507
1,397
py
Python
mapping/hdl_graph_slam/scripts/map2odom_publisher.py
xiaoshitou4/GNSS-INS
6ea16568d85eb1ed6b5cc49fb192dcba0e0f7491
[ "Unlicense" ]
3
2019-07-27T05:31:15.000Z
2021-06-10T02:16:46.000Z
mapping/hdl_graph_slam/scripts/map2odom_publisher.py
yxw027/GNSS-INS
e5c5b7901b270a9c4d3a0ffd5555843d969f4018
[ "Unlicense" ]
null
null
null
mapping/hdl_graph_slam/scripts/map2odom_publisher.py
yxw027/GNSS-INS
e5c5b7901b270a9c4d3a0ffd5555843d969f4018
[ "Unlicense" ]
3
2019-12-25T07:47:22.000Z
2021-02-03T03:24:46.000Z
#!/usr/bin/python import tf import rospy from geometry_msgs.msg import * class Map2OdomPublisher: def __init__(self): self.broadcaster = tf.TransformBroadcaster() self.subscriber = rospy.Subscriber('/hdl_graph_slam/odom2pub', TransformStamped, self.callback) # self.subscriber = rospy.Subscriber('/hdl_graph_sla...
28.510204
106
0.702219
0dba08f62db28c5709c2b056113d3e4f20dff3d7
2,342
py
Python
shortcode/migrations/0021_auto_20200211_1607.py
marcolw/shortcode_backend
888ffb4832ec8d0ee682780e6121e7d771a1d98b
[ "MIT" ]
null
null
null
shortcode/migrations/0021_auto_20200211_1607.py
marcolw/shortcode_backend
888ffb4832ec8d0ee682780e6121e7d771a1d98b
[ "MIT" ]
null
null
null
shortcode/migrations/0021_auto_20200211_1607.py
marcolw/shortcode_backend
888ffb4832ec8d0ee682780e6121e7d771a1d98b
[ "MIT" ]
null
null
null
# Generated by Django 3.0.2 on 2020-02-11 16:07 from django.conf import settings import django.contrib.postgres.fields import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations....
41.087719
143
0.626388
b7502c6781bfce75b06e665ffd661a8f536452cc
7,677
py
Python
models/model.py
mkmysk123456789/Informer2020
ad4b895169a17db580aab6d2c09fd07e06c9b6fa
[ "Apache-2.0" ]
1
2021-07-05T11:20:07.000Z
2021-07-05T11:20:07.000Z
models/model.py
mkmysk123456789/Informer2020
ad4b895169a17db580aab6d2c09fd07e06c9b6fa
[ "Apache-2.0" ]
null
null
null
models/model.py
mkmysk123456789/Informer2020
ad4b895169a17db580aab6d2c09fd07e06c9b6fa
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from utils.masking import TriangularCausalMask, ProbMask from models.encoder import Encoder, EncoderLayer, ConvLayer, EncoderStack from models.decoder import Decoder, DecoderLayer from models.attn import FullAttention, ProbAttention, AttentionLa...
43.868571
122
0.553602
dceadc0a0af83decb0cdd64166c58e1bae5ca48e
5,827
py
Python
exercises/classifiers_evaluation.py
nirpet/IML.HUJI
6f8c7719760df3e381115f01cd5c3cfc9951b59c
[ "MIT" ]
null
null
null
exercises/classifiers_evaluation.py
nirpet/IML.HUJI
6f8c7719760df3e381115f01cd5c3cfc9951b59c
[ "MIT" ]
null
null
null
exercises/classifiers_evaluation.py
nirpet/IML.HUJI
6f8c7719760df3e381115f01cd5c3cfc9951b59c
[ "MIT" ]
null
null
null
from typing import Tuple import numpy import plotly.graph_objects as go from plotly.subplots import make_subplots from IMLearn.learners.classifiers import LDA, GaussianNaiveBayes, Perceptron from utils import * pio.templates.default = "simple_white" from math import atan2, pi def load_dataset(filename: str) -> Tup...
36.879747
119
0.597391
c3cf537b3a65b2e1fa26932608545ff6d0816568
3,363
py
Python
django_blog/settings.py
DLance96/django-blog
d9d92a877804915a553899833e576f27186d2bc0
[ "MIT" ]
null
null
null
django_blog/settings.py
DLance96/django-blog
d9d92a877804915a553899833e576f27186d2bc0
[ "MIT" ]
3
2016-02-13T21:14:41.000Z
2016-03-02T20:28:59.000Z
django_blog/settings.py
DLance96/django-blog
d9d92a877804915a553899833e576f27186d2bc0
[ "MIT" ]
null
null
null
""" Django settings for django_blog project. Generated by 'django-admin startproject' using Django 1.9.2. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import o...
26.273438
91
0.700862
46b4731517588a716b1fa72e172955e1d627a728
9,480
py
Python
bootstrap.py
linupi/silx
51bc5cbc696880e7cf13feb3ff2476a5c32422d4
[ "CC0-1.0", "MIT" ]
2
2020-03-09T15:50:17.000Z
2020-03-09T15:50:23.000Z
bootstrap.py
linupi/silx
51bc5cbc696880e7cf13feb3ff2476a5c32422d4
[ "CC0-1.0", "MIT" ]
1
2020-03-12T13:11:59.000Z
2020-03-12T13:53:55.000Z
bootstrap.py
JuliusHarald/silx
3f9bcda88c074438fdb30cde29fec314d26f471c
[ "CC0-1.0", "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bootstrap helps you to test scripts without installing them by patching your PYTHONPATH on the fly example: ./bootstrap.py ipython """ __authors__ = ["Frédéric-Emmanuel Picca", "Jérôme Kieffer"] __contact__ = "jerome.kieffer@esrf.eu" __license__ = "MIT" __date__ = "26...
32.689655
122
0.617722
d3ecc4d81194db16f95d80164759b3fd8ad6321c
617
py
Python
aoikconsulwatcher/src/aoikconsulwatcher/config.py
AoiKuiyuyou/AoikConsulWatcherHosts
3b87bfa17738383828f7828c3ff11ffb882b9a00
[ "MIT" ]
null
null
null
aoikconsulwatcher/src/aoikconsulwatcher/config.py
AoiKuiyuyou/AoikConsulWatcherHosts
3b87bfa17738383828f7828c3ff11ffb882b9a00
[ "MIT" ]
null
null
null
aoikconsulwatcher/src/aoikconsulwatcher/config.py
AoiKuiyuyou/AoikConsulWatcherHosts
3b87bfa17738383828f7828c3ff11ffb882b9a00
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import import os CONSUL_HOST = os.environ.get('CONSUL_HOST', '127.0.0.1') CONSUL_PORT = int(os.environ.get('CONSUL_PORT', '8500')) def handle_service_infos(service_infos): for service_name, service_info in service_infos.items(): print('\nService name: {0...
24.68
61
0.619125
bed3ea087218a7308e9abedad86d646685777ed3
859
py
Python
django_testing_tutorial_2018/django_testing_tutorial_2018/urls.py
bluebamus/django_pytest
2a2e6b070e3f23616119f1661eee25722c770eb2
[ "MIT" ]
null
null
null
django_testing_tutorial_2018/django_testing_tutorial_2018/urls.py
bluebamus/django_pytest
2a2e6b070e3f23616119f1661eee25722c770eb2
[ "MIT" ]
null
null
null
django_testing_tutorial_2018/django_testing_tutorial_2018/urls.py
bluebamus/django_pytest
2a2e6b070e3f23616119f1661eee25722c770eb2
[ "MIT" ]
null
null
null
"""django_testing_tutorial_2018 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, nam...
35.791667
77
0.71362
b425ab7b3a297c1eb812e7052a43c9f8657a8367
2,161
py
Python
openstack/network/v2/qos_policy.py
nicolasochem/openstacksdk
34ea72ce5b0b7f16a038ca57b2a9f1ec2f90ce00
[ "Apache-2.0" ]
null
null
null
openstack/network/v2/qos_policy.py
nicolasochem/openstacksdk
34ea72ce5b0b7f16a038ca57b2a9f1ec2f90ce00
[ "Apache-2.0" ]
null
null
null
openstack/network/v2/qos_policy.py
nicolasochem/openstacksdk
34ea72ce5b0b7f16a038ca57b2a9f1ec2f90ce00
[ "Apache-2.0" ]
null
null
null
# 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 in writing, software # distributed under t...
34.854839
75
0.6969
73536aeacee18857cb18322e56e76a4c7ecdce59
4,844
py
Python
Archive/train_no_yaml_efficientnetb0.py
lkm2835/ELimNet
c6eb9c26727967531a570ebabdd9dbf65404ebd6
[ "MIT" ]
6
2021-12-03T04:09:24.000Z
2021-12-11T12:18:18.000Z
Archive/train_no_yaml_efficientnetb0.py
lkm2835/ELimNet
c6eb9c26727967531a570ebabdd9dbf65404ebd6
[ "MIT" ]
12
2021-12-04T06:42:13.000Z
2021-12-07T04:59:56.000Z
Archive/train_no_yaml_efficientnetb0.py
lkm2835/ELimNet
c6eb9c26727967531a570ebabdd9dbf65404ebd6
[ "MIT" ]
2
2021-12-03T11:09:42.000Z
2021-12-08T17:54:50.000Z
""" Eliminating pretrained ResNet18's top layers - Author: snoop2head, JoonHong-Kim, lkm2835 - Reference: Junghoon Kim, Jongsun Shin's baseline code provided at https://stages.ai/competitions/81/overview/requirements """ import argparse import os from datetime import datetime from typing import Any, Dict, Tuple, Union...
31.051282
123
0.672378
4f632e8d15228d7e4a3e09f5f2c44f323615056e
4,533
py
Python
venv/Lib/site-packages/astropy/utils/tests/test_misc.py
temelkirci/Motion_Editor
a8b8d4c4d2dcc9be28385600f56066cef92a38ad
[ "MIT" ]
1
2022-03-02T17:07:20.000Z
2022-03-02T17:07:20.000Z
venv/Lib/site-packages/astropy/utils/tests/test_misc.py
temelkirci/RealTime_6DOF_Motion_Editor
a8b8d4c4d2dcc9be28385600f56066cef92a38ad
[ "MIT" ]
null
null
null
venv/Lib/site-packages/astropy/utils/tests/test_misc.py
temelkirci/RealTime_6DOF_Motion_Editor
a8b8d4c4d2dcc9be28385600f56066cef92a38ad
[ "MIT" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst import json import os from datetime import datetime import locale import pytest import numpy as np from .. import data, misc def test_isiterable(): assert misc.isiterable(2) is False assert misc.isiterable([2]) is True assert misc.isiterab...
33.577778
92
0.638209
fa7679eefe81928ab9637f7bd58d288796fceec3
382
py
Python
nicos_sinq/boa/setups/table2.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
nicos_sinq/boa/setups/table2.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
nicos_sinq/boa/setups/table2.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
description = 'BOA Table 2' pvprefix = 'SQ:BOA:mcu2:' devices = dict( t2tx = device('nicos.devices.epics.EpicsReadable', description = 'Table 2 x translation', readpv = pvprefix + 'T2TX', ), Table2 = device('nicos_sinq.boa.devices.boatable.BoaTable', description = 'Table 2', ...
22.470588
63
0.575916
3333d8aa3b3e07a0dc9b7addc0b087fe0a2feb90
7,947
py
Python
selvbetjening/core/members/migrations/0007_remove_user_communication.py
animekita/selvbetjening
fee63d178fbd5ce2976c04d3a4b2dde6d8691892
[ "MIT" ]
null
null
null
selvbetjening/core/members/migrations/0007_remove_user_communication.py
animekita/selvbetjening
fee63d178fbd5ce2976c04d3a4b2dde6d8691892
[ "MIT" ]
3
2020-02-11T21:54:59.000Z
2021-06-10T17:35:21.000Z
selvbetjening/core/members/migrations/0007_remove_user_communication.py
animekita/selvbetjening
fee63d178fbd5ce2976c04d3a4b2dde6d8691892
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing unique constraint on 'UserCommunication', fields ['method', 'user'] try: db.delete_un...
69.710526
187
0.568013
459ee3677aec429180413079964ab1100187bc34
2,189
py
Python
python/tests/unit/io/test_dart_loader.py
lakshmipathyarjun6/dart
0cb60d4c9ff99129b8a0dffb1747f68944b677f4
[ "BSD-2-Clause" ]
1
2020-04-06T05:24:54.000Z
2020-04-06T05:24:54.000Z
python/tests/unit/io/test_dart_loader.py
lakshmipathyarjun6/dart
0cb60d4c9ff99129b8a0dffb1747f68944b677f4
[ "BSD-2-Clause" ]
null
null
null
python/tests/unit/io/test_dart_loader.py
lakshmipathyarjun6/dart
0cb60d4c9ff99129b8a0dffb1747f68944b677f4
[ "BSD-2-Clause" ]
null
null
null
import platform import pytest import dartpy from dartpy.io import DartLoader import os from tests.util import get_asset_path def test_parse_skeleton_non_existing_path_returns_null(): assert os.path.isfile(get_asset_path('skel/cubes.skel')) is True loader = DartLoader() assert loader.parseSkeleton(get_as...
31.271429
107
0.751028
633516036af3a4c3e8ae99b1bb4a34061f655d7d
959
py
Python
Reacher-PyBullet/00_Random_Gym.py
hyunjun529/Learn-OpenAI-GYM
51e1f3dc4cdfa7582690fc8338918aeb9671f4e3
[ "MIT" ]
null
null
null
Reacher-PyBullet/00_Random_Gym.py
hyunjun529/Learn-OpenAI-GYM
51e1f3dc4cdfa7582690fc8338918aeb9671f4e3
[ "MIT" ]
null
null
null
Reacher-PyBullet/00_Random_Gym.py
hyunjun529/Learn-OpenAI-GYM
51e1f3dc4cdfa7582690fc8338918aeb9671f4e3
[ "MIT" ]
null
null
null
import gym from gym import wrappers env = gym.make('Reacher-v1') env.reset() env.render() outdir = './log/' f_act = open(outdir + 'log_act.txt', 'w') f_obs = open(outdir + 'log_obs.txt', 'w') f_rwd = open(outdir + 'log_rwd.txt', 'w') f_info = open(outdir + 'log_info.txt', 'w') env = wrappers.Monitor(env, directory=...
25.236842
68
0.606882
97ff54cbd69145ec09dce5c4357346c1945bedb7
176
py
Python
backend/apps/question/views/__init__.py
xingxingzaixian/python-django-online-exam
c504e121814061cbf7647d4d916f363230239f17
[ "MIT" ]
47
2021-09-23T00:52:49.000Z
2022-03-27T12:57:28.000Z
backend/apps/question/views/__init__.py
xingxingzaixian/django-drf-online-exam
c504e121814061cbf7647d4d916f363230239f17
[ "MIT" ]
null
null
null
backend/apps/question/views/__init__.py
xingxingzaixian/django-drf-online-exam
c504e121814061cbf7647d4d916f363230239f17
[ "MIT" ]
17
2021-09-02T12:12:21.000Z
2022-03-27T10:28:27.000Z
from .category import CategoryViewset from .level import LevelViewset from .option import OptionViewset from .question import QuestionViewset from .type_ import TypeViewset
35.2
38
0.840909
53b4ec7ae6b7c5b6c8556a265e0195d981f2259e
550
py
Python
ectypes/block_id.py
wenbobuaa/pykit
43e38fe40297a1e7a9329bcf3db3554c7ca48ead
[ "MIT" ]
null
null
null
ectypes/block_id.py
wenbobuaa/pykit
43e38fe40297a1e7a9329bcf3db3554c7ca48ead
[ "MIT" ]
null
null
null
ectypes/block_id.py
wenbobuaa/pykit
43e38fe40297a1e7a9329bcf3db3554c7ca48ead
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # coding: utf-8 from .block_group_id import BlockGroupID from .block_index import BlockIndex from .idbase import IDBase from .drive_id import DriveID class BlockID(IDBase): _attrs = ( ('type', 0, 2, str), ('block_group_id', 2, 18, BlockGroupID), ('bloc...
23.913043
83
0.612727
1bba933f6aa70f96c691d488e0a97e79ac27ec74
1,311
py
Python
notification_django_app/users/tests/test_admin.py
rajat-np/notification-django-app
37929b654cc8bceadb73b50897297ef49f1af7c4
[ "MIT" ]
null
null
null
notification_django_app/users/tests/test_admin.py
rajat-np/notification-django-app
37929b654cc8bceadb73b50897297ef49f1af7c4
[ "MIT" ]
1
2022-02-28T23:10:02.000Z
2022-02-28T23:10:02.000Z
notification_django_app/users/tests/test_admin.py
rajat-np/notification-django-app
37929b654cc8bceadb73b50897297ef49f1af7c4
[ "MIT" ]
null
null
null
import pytest from django.urls import reverse from notification_django_app.users.models import User pytestmark = pytest.mark.django_db class TestUserAdmin: def test_changelist(self, admin_client): url = reverse("admin:users_user_changelist") response = admin_client.get(url) assert respon...
31.97561
79
0.631579
d37d8eefe11b41697c0e628bbf79015e77390bb0
2,299
py
Python
Config.py
meuns/Sandbox
8d5cde8a079d156b6dc5c3531d036b4ce278bbae
[ "BSD-3-Clause" ]
null
null
null
Config.py
meuns/Sandbox
8d5cde8a079d156b6dc5c3531d036b4ce278bbae
[ "BSD-3-Clause" ]
null
null
null
Config.py
meuns/Sandbox
8d5cde8a079d156b6dc5c3531d036b4ce278bbae
[ "BSD-3-Clause" ]
null
null
null
# coding: utf8 from random import random, seed # Hell yeah ! seed(42) # Compute shader settings RAY_COUNT = 128 * 16 RAY_GROUP_SIZE = 128 RAY_DIR_COUNT = 128 RAY_DIR_GROUP_SIZE = 64 # Ray batch 0 RAY_INIT_DX = -1.0 RAY_INIT_DY = -1.0 RAY_INIT_JITTER_OX = 0.0 RAY0_DATA_OX = [-0.9 + (i / RAY_COUNT) * 1.8 + random(...
30.653333
116
0.735102
bbd28cae758fedf6d656a8a23dc8d34a55cb3461
470
py
Python
python/15873_WithoutSpaceA+B.py
anothel/BOJ
cfc693322e609d319aaa8705d4375d098c034b76
[ "MIT" ]
null
null
null
python/15873_WithoutSpaceA+B.py
anothel/BOJ
cfc693322e609d319aaa8705d4375d098c034b76
[ "MIT" ]
null
null
null
python/15873_WithoutSpaceA+B.py
anothel/BOJ
cfc693322e609d319aaa8705d4375d098c034b76
[ "MIT" ]
null
null
null
from sys import stdin, stdout def main(): s = list(stdin.readline().strip()) if s[-2] == str(1) and s[-1] == str(0): s.pop() s.pop() sum: int = 0 i: int = 0 while len(s) > 0: sum += int(s.pop()) * (10**i) i += 1 print(sum + 10) else: tmp: int = int(s.pop()) sum: int =...
17.407407
41
0.453191
883e2785c331ce6d84d767a0344e427c1aca3900
8,745
py
Python
djangomom/base/mixin.py
emiamar/d
abfd0ca81224a1259fdfac92ed21ad771d901e18
[ "BSD-3-Clause" ]
null
null
null
djangomom/base/mixin.py
emiamar/d
abfd0ca81224a1259fdfac92ed21ad771d901e18
[ "BSD-3-Clause" ]
2
2018-02-27T07:56:18.000Z
2018-03-09T12:45:48.000Z
djangomom/base/mixin.py
emiamar/d
abfd0ca81224a1259fdfac92ed21ad771d901e18
[ "BSD-3-Clause" ]
2
2018-02-21T07:43:04.000Z
2018-11-10T18:09:26.000Z
import datetime from django.utils import timezone from django.contrib import messages from django.shortcuts import HttpResponseRedirect from django.http import Http404 from django.core.exceptions import ImproperlyConfigured from project.models import Project from project.forms import ProjectForm import logging l...
36.743697
124
0.58239
1361b0965c84614f6e10bd225991a0d089ef1cea
70
py
Python
plugins/palo_alto_cortex_xdr/icon_palo_alto_cortex_xdr/actions/block_file/__init__.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
46
2019-06-05T20:47:58.000Z
2022-03-29T10:18:01.000Z
plugins/palo_alto_cortex_xdr/icon_palo_alto_cortex_xdr/actions/block_file/__init__.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
386
2019-06-07T20:20:39.000Z
2022-03-30T17:35:01.000Z
plugins/palo_alto_cortex_xdr/icon_palo_alto_cortex_xdr/actions/block_file/__init__.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
43
2019-07-09T14:13:58.000Z
2022-03-28T12:04:46.000Z
# GENERATED BY KOMAND SDK - DO NOT EDIT from .action import BlockFile
23.333333
39
0.771429
5fbf5e5710e923aa090b74f22046b882402ad815
639
py
Python
dask_ml/preprocessing/__init__.py
souravsingh/dask-ml
37eca7d335509c2a4aa9332aa454f57092318487
[ "BSD-3-Clause" ]
null
null
null
dask_ml/preprocessing/__init__.py
souravsingh/dask-ml
37eca7d335509c2a4aa9332aa454f57092318487
[ "BSD-3-Clause" ]
null
null
null
dask_ml/preprocessing/__init__.py
souravsingh/dask-ml
37eca7d335509c2a4aa9332aa454f57092318487
[ "BSD-3-Clause" ]
null
null
null
"""Utilties for Preprocessing data. """ from .._compat import SK_VERSION from packaging.version import parse from .data import ( StandardScaler, MinMaxScaler, RobustScaler, QuantileTransformer, Categorizer, DummyEncoder, OrdinalEncoder, ) from .label import LabelEncoder __all__ = [ "...
17.27027
48
0.691706
49981cc604fc5ea32d1e30349cd852873df7e36b
297
py
Python
src/ransacflow/util.py
liuyenting/RANSAC-Flow
2f348a4e31b6087ad2d9c0e5e35d5ad382f2a7b3
[ "Apache-2.0" ]
4
2021-11-14T09:47:40.000Z
2021-12-21T21:10:31.000Z
src/ransacflow/util.py
liuyenting/RANSAC-Flow
2f348a4e31b6087ad2d9c0e5e35d5ad382f2a7b3
[ "Apache-2.0" ]
6
2021-12-08T20:26:32.000Z
2021-12-16T02:26:30.000Z
src/ransacflow/util.py
liuyenting/RANSAC-Flow
2f348a4e31b6087ad2d9c0e5e35d5ad382f2a7b3
[ "Apache-2.0" ]
null
null
null
from pathlib import Path def get_project_root() -> Path: # ransacflow src / return Path(__file__).parent.parent.parent def get_model_root() -> Path: return get_project_root() / "models" def get_data_root() -> Path: return get_project_root() / "data"
18.5625
46
0.632997
0668e263c6a78f763f6e8c47e1102c09184c85e7
597
py
Python
tests/test_lineset.py
bluetyson/omf
ec40877da5761b1102163346f7c507050e36c1b4
[ "MIT" ]
null
null
null
tests/test_lineset.py
bluetyson/omf
ec40877da5761b1102163346f7c507050e36c1b4
[ "MIT" ]
null
null
null
tests/test_lineset.py
bluetyson/omf
ec40877da5761b1102163346f7c507050e36c1b4
[ "MIT" ]
1
2021-07-08T01:44:08.000Z
2021-07-08T01:44:08.000Z
"""Tests for LineSet validation""" import numpy as np import pytest import omf def test_lineset(): """Test lineset geometry validation""" elem = omf.lineset.LineSetElement() elem.vertices = np.random.rand(10, 3) elem.segments = np.random.randint(9, size=[5, 2]) assert elem.validate() assert e...
27.136364
53
0.666667
4f592acac203cdc72af25fc4d0c9ba545d8d6212
210
py
Python
tests/test_packaging.py
moi90/torch_testing
90bfba23f72bb2a8586c19ae255daf245ea47384
[ "MIT" ]
5
2018-11-26T08:57:26.000Z
2018-12-05T09:07:45.000Z
tests/test_packaging.py
moi90/torch_testing
90bfba23f72bb2a8586c19ae255daf245ea47384
[ "MIT" ]
null
null
null
tests/test_packaging.py
moi90/torch_testing
90bfba23f72bb2a8586c19ae255daf245ea47384
[ "MIT" ]
1
2020-12-16T14:29:54.000Z
2020-12-16T14:29:54.000Z
import unittest import torch_testing as tt class TestPackaging(unittest.TestCase): def test_name(self): self.assertEqual(tt.name, 'torch_testing') if __name__ == '__main__': unittest.main()
17.5
50
0.719048
ba3774498bed14511ee0965b653be9722ff6ce03
3,333
py
Python
lnbits/tasks.py
claytantor/lnbits-legend
129409296a235c9b0cdf9d591ab165d6709fb46f
[ "MIT" ]
null
null
null
lnbits/tasks.py
claytantor/lnbits-legend
129409296a235c9b0cdf9d591ab165d6709fb46f
[ "MIT" ]
null
null
null
lnbits/tasks.py
claytantor/lnbits-legend
129409296a235c9b0cdf9d591ab165d6709fb46f
[ "MIT" ]
null
null
null
import time import trio import traceback from http import HTTPStatus from quart import current_app from typing import List, Callable from lnbits.settings import WALLET from lnbits.core.crud import ( get_payments, get_standalone_payment, delete_expired_invoices, get_balance_checks, ) from lnbits.core.se...
27.545455
85
0.70297
0194571469512822fdac11b5f807242d0bda8e5a
3,333
py
Python
kafka/settings.py
raybesiga/kafka-on-the-shore
3d1d152630b53855a4fc1daf92c9036de36ab2a9
[ "MIT" ]
null
null
null
kafka/settings.py
raybesiga/kafka-on-the-shore
3d1d152630b53855a4fc1daf92c9036de36ab2a9
[ "MIT" ]
null
null
null
kafka/settings.py
raybesiga/kafka-on-the-shore
3d1d152630b53855a4fc1daf92c9036de36ab2a9
[ "MIT" ]
null
null
null
""" Django settings for kafka project. Generated by 'django-admin startproject' using Django 2.1.1. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os # B...
25.442748
91
0.686469
8c208b929ae53c605a749563f0cef9369e19376e
2,630
py
Python
examples/multi_clients/notif/src/notif/__init__.py
mardiros/pyramid-blacksmith
ff338776fc8802c9f46475fba619aa1f9413aba0
[ "BSD-3-Clause" ]
null
null
null
examples/multi_clients/notif/src/notif/__init__.py
mardiros/pyramid-blacksmith
ff338776fc8802c9f46475fba619aa1f9413aba0
[ "BSD-3-Clause" ]
5
2022-01-09T18:54:14.000Z
2022-01-23T22:22:23.000Z
examples/multi_clients/notif/src/notif/__init__.py
mardiros/pyramid-blacksmith
ff338776fc8802c9f46475fba619aa1f9413aba0
[ "BSD-3-Clause" ]
null
null
null
import email as emaillib import smtplib from textwrap import dedent from blacksmith.sd._sync.adapters.consul import SyncConsulDiscovery from notif.resources.user import User from pyramid.config import Configurator smtp_sd = SyncConsulDiscovery() def send_email(user: User, message: str): email_content = dedent( ...
30.581395
78
0.66616
c33a944c108ac9f7a233a9e57f71284983415696
1,397
py
Python
hipchat/komand_hipchat/actions/post/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
hipchat/komand_hipchat/actions/post/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
hipchat/komand_hipchat/actions/post/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
# GENERATED BY KOMAND SDK - DO NOT EDIT import komand import json class Input: MESSAGE = "message" ROOM_ID_OR_NAME = "room_id_or_name" class Output: ID = "id" TIMESTAMP = "timestamp" class PostInput(komand.Input): schema = json.loads(""" { "type": "object", "title": "Variables",...
19.957143
85
0.561918
a125f6d19642517c322a092bbd6eda31c3542f50
221
py
Python
napari_nucleaizer/misc.py
etasnadi/napari_nucleaizer
6bfe4b9a6cfc82963f4a2a45fa9be1a70482b04b
[ "BSD-3-Clause" ]
null
null
null
napari_nucleaizer/misc.py
etasnadi/napari_nucleaizer
6bfe4b9a6cfc82963f4a2a45fa9be1a70482b04b
[ "BSD-3-Clause" ]
2
2022-02-14T22:37:12.000Z
2022-03-17T12:33:26.000Z
napari_nucleaizer/misc.py
etasnadi/napari_nucleaizer
6bfe4b9a6cfc82963f4a2a45fa9be1a70482b04b
[ "BSD-3-Clause" ]
null
null
null
import json def json_load(file): data = None with open(file) as fp: data = json.load(fp) return data def json_save(file, data): with open(file, 'w') as fp: json.dump(data, fp, indent=4)
17
37
0.597285
dd067c35bbcf76e6479e1608f824cec50fbfb08a
8,048
py
Python
python/tvm/contrib/xcode.py
jiangzoi/incubator-tvm
144c6f45f7217b9df2f5605e06f0903e470ac11c
[ "Apache-2.0" ]
9
2019-12-17T08:03:54.000Z
2022-01-19T02:34:23.000Z
python/tvm/contrib/xcode.py
jiangzoi/incubator-tvm
144c6f45f7217b9df2f5605e06f0903e470ac11c
[ "Apache-2.0" ]
2
2020-09-14T09:18:25.000Z
2020-09-24T03:28:18.000Z
python/tvm/contrib/xcode.py
jiangzoi/incubator-tvm
144c6f45f7217b9df2f5605e06f0903e470ac11c
[ "Apache-2.0" ]
3
2020-10-04T20:30:18.000Z
2022-01-24T18:03:52.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
28.845878
171
0.610462
5fa458c6cca79fca9656ad539d5fe42d02dd5e34
5,656
py
Python
detection/models/vae.py
kai-wen-yang/CD-VAE
a33b5070d5d936396d51c8c2e7dedd62351ee5b2
[ "MIT" ]
23
2021-12-10T02:09:49.000Z
2022-03-24T11:46:58.000Z
detection/models/vae.py
kai-wen-yang/CD-VAE
a33b5070d5d936396d51c8c2e7dedd62351ee5b2
[ "MIT" ]
6
2021-12-20T07:27:31.000Z
2022-03-30T07:22:26.000Z
detection/models/vae.py
kai-wen-yang/CD-VAE
a33b5070d5d936396d51c8c2e7dedd62351ee5b2
[ "MIT" ]
3
2021-12-20T13:38:50.000Z
2022-02-20T20:58:45.000Z
from __future__ import print_function import abc import os import math import numpy as np import logging import torch import torch.utils.data from torch import nn from torch.nn import init from torch.nn import functional as F from torch.autograd import Variable class AbstractAutoEncoder(nn.Module): ...
30.408602
91
0.545262
f45f03b9d8ee6289f616627926fac53e452adbb0
2,067
py
Python
tests/test_tasks_project.py
brilliantorg/elm-doc
69ddbcd57aee3da6283c2497d735951d95b85426
[ "BSD-3-Clause" ]
29
2017-02-01T11:58:44.000Z
2021-05-21T15:18:33.000Z
tests/test_tasks_project.py
brilliantorg/elm-doc
69ddbcd57aee3da6283c2497d735951d95b85426
[ "BSD-3-Clause" ]
143
2017-07-26T17:34:44.000Z
2022-03-01T18:01:43.000Z
tests/test_tasks_project.py
brilliantorg/elm-doc
69ddbcd57aee3da6283c2497d735951d95b85426
[ "BSD-3-Clause" ]
7
2018-03-09T10:04:45.000Z
2021-10-19T19:17:40.000Z
from pathlib import Path from elm_doc import elm_project from elm_doc.tasks import project as project_tasks def test_sync_source_files_create_new_file( tmpdir, elm_version, make_elm_project): project_dir = make_elm_project( elm_version, tmpdir, sources={ 'src': [ ...
28.708333
73
0.636188
6153c35a33dee65649d185d49f11dc4463731047
1,054
py
Python
anomalyframework/tests/test_shuffle.py
alliedel/anomalyframework_python
63c56d9fb2e1dc37dfca494805e7fa179e078623
[ "MIT" ]
15
2018-12-28T07:32:56.000Z
2022-02-20T00:17:34.000Z
anomalyframework/tests/test_shuffle.py
alliedel/anomalyframework_python
63c56d9fb2e1dc37dfca494805e7fa179e078623
[ "MIT" ]
1
2018-04-06T18:14:12.000Z
2018-07-11T11:18:34.000Z
anomalyframework/tests/test_shuffle.py
alliedel/anomalyframework_python
63c56d9fb2e1dc37dfca494805e7fa179e078623
[ "MIT" ]
5
2018-02-07T19:08:09.000Z
2019-07-01T23:17:23.000Z
import numpy as np import unittest from anomalyframework import shuffle class TestBlockShuffle(unittest.TestCase): def block_shuffle_test(self): y = np.array([1, 1, 1, 2, 2, 2, 3, 3, 4, 5, 6, 1, 1]) block_size = 2 np.random.seed(0) shuffled_indices, indices_to_blocks = shuffle.bl...
34
100
0.57685
d827c94fed0e8c78f647d12d779c502b16e06a27
701
py
Python
LeetCode/python/tree/recover-binary-search-tree.py
Leoyuseu/Code
34edfbbfb7875b3ed06de393c192c1f13a5074f4
[ "BSD-Source-Code" ]
null
null
null
LeetCode/python/tree/recover-binary-search-tree.py
Leoyuseu/Code
34edfbbfb7875b3ed06de393c192c1f13a5074f4
[ "BSD-Source-Code" ]
null
null
null
LeetCode/python/tree/recover-binary-search-tree.py
Leoyuseu/Code
34edfbbfb7875b3ed06de393c192c1f13a5074f4
[ "BSD-Source-Code" ]
null
null
null
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def inOrder(self,root): if root is None: return self.inOrder(root.left) if self.pre...
21.90625
58
0.536377
b4149d3ef007e807c3dbc3a00a513d0a0d4cceda
51,828
py
Python
ServidorPython/python32_web/Lib/test/test_smtplib.py
mak213k/Servidor_automatizado_python
4403ef8027a2f814220baacc95856cf5fbf01d21
[ "MIT" ]
1,738
2017-09-21T10:59:12.000Z
2022-03-31T21:05:46.000Z
ServidorPython/python32_web/Lib/test/test_smtplib.py
mak213k/Servidor_automatizado_python
4403ef8027a2f814220baacc95856cf5fbf01d21
[ "MIT" ]
427
2017-09-29T22:54:36.000Z
2022-02-15T19:26:50.000Z
ServidorPython/python32_web/Lib/test/test_smtplib.py
mak213k/Servidor_automatizado_python
4403ef8027a2f814220baacc95856cf5fbf01d21
[ "MIT" ]
671
2017-09-21T08:04:01.000Z
2022-03-29T14:30:07.000Z
import asyncore import base64 import email.mime.text from email.message import EmailMessage from email.base64mime import body_encode as encode_base64 import email.utils import hmac import socket import smtpd import smtplib import io import re import sys import time import select import errno import textwrap import thre...
38.939144
90
0.608397