hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
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
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
ad0d8d743d1895721a6afa0216518f50afe6a8c1
2,578
py
Python
reki_data_tool/postprocess/grid/gfs/ne/task_dask_v2.py
perillaroc/reki-data-tool
047424a2f8a1f0e16684bffaeded4044366f63c0
[ "MIT" ]
null
null
null
reki_data_tool/postprocess/grid/gfs/ne/task_dask_v2.py
perillaroc/reki-data-tool
047424a2f8a1f0e16684bffaeded4044366f63c0
[ "MIT" ]
null
null
null
reki_data_tool/postprocess/grid/gfs/ne/task_dask_v2.py
perillaroc/reki-data-tool
047424a2f8a1f0e16684bffaeded4044366f63c0
[ "MIT" ]
null
null
null
""" 并行方式生成 grib2-ne 数据 分批解码、编码、写文件,每次分发 32 个任务 是否对多计算节点有帮助? """ from pathlib import Path from typing import Union import numpy as np import pandas as pd import dask from loguru import logger from reki.data_finder import find_local_file from reki_data_tool.postprocess.grid.gfs.ne.common import get_message_bytes fr...
29.295455
104
0.681148
c0f71b7ad8e0b5461e8ebb71fdc7ad25ae98a773
9,289
py
Python
slowfast/datasets/clevrer_video.py
gabrielsluz/SlowFast
bd06eac47fa236b070fd9a3b39518eea08d02947
[ "Apache-2.0" ]
null
null
null
slowfast/datasets/clevrer_video.py
gabrielsluz/SlowFast
bd06eac47fa236b070fd9a3b39518eea08d02947
[ "Apache-2.0" ]
null
null
null
slowfast/datasets/clevrer_video.py
gabrielsluz/SlowFast
bd06eac47fa236b070fd9a3b39518eea08d02947
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import os import random import torch import torch.utils.data from iopath.common.file_io import g_pathmgr import json import torchvision.transforms as transforms import slowfast.utils.logging as logging from . import decoder as decoder from . import utils as utils from . import video_container...
37.305221
124
0.554312
59354fd5351a24926d465e3c0c5d33a60f6394ce
682
py
Python
scripts/test.py
GeoJamesJones/gdelt-pilot
85e128b82858d9497f8aa52cfc240945d9922e01
[ "Apache-2.0" ]
null
null
null
scripts/test.py
GeoJamesJones/gdelt-pilot
85e128b82858d9497f8aa52cfc240945d9922e01
[ "Apache-2.0" ]
1
2021-06-02T00:26:15.000Z
2021-06-02T00:26:15.000Z
scripts/test.py
GeoJamesJones/gdelt-pilot
85e128b82858d9497f8aa52cfc240945d9922e01
[ "Apache-2.0" ]
1
2020-06-30T18:43:58.000Z
2020-06-30T18:43:58.000Z
import csv csv_file = "data/GDELT_2.0_Events_Column_Labels_Header_Row_Sep2016.csv" with open(csv_file, 'rb') as f: with open("mappings.txt", 'w') as w: csvreader = csv.reader(f, delimiter=',') count = 0 for row in csvreader: if row[1] == 'STRING': item_type = 'st...
37.888889
140
0.527859
bc302c14ed83dc7bb311f98b85daa2f401416eb9
6,336
py
Python
egiauthenticator/egicheckin.py
EGI-Federation/egiauthenticator
3182dc0e558e2f45453b499ec2895c0973f9780b
[ "MIT" ]
null
null
null
egiauthenticator/egicheckin.py
EGI-Federation/egiauthenticator
3182dc0e558e2f45453b499ec2895c0973f9780b
[ "MIT" ]
4
2020-07-13T14:36:44.000Z
2020-07-20T15:29:29.000Z
egiauthenticator/egicheckin.py
EGI-Federation/egiauthenticator
3182dc0e558e2f45453b499ec2895c0973f9780b
[ "MIT" ]
1
2020-07-13T14:33:58.000Z
2020-07-13T14:33:58.000Z
""" EGI Check-in authenticator for JupyterHub Uses OpenID Connect with aai.egi.eu """ import base64 import json import os import urllib import time from tornado.auth import OAuth2Mixin from tornado import web from tornado.httputil import url_concat from tornado.httpclient import HTTPRequest, AsyncHTTPClient from ...
31.211823
99
0.648359
8a6fbdf5bb3be4a66d55ea1953c42e197476e9c5
13,860
py
Python
FairMOT/src/lib/opts.py
alit8/Social-Distancing
a5b03dad5a9cd3a1980fe800fe70f04d9103ac36
[ "MIT" ]
1
2022-03-21T09:08:18.000Z
2022-03-21T09:08:18.000Z
FairMOT/src/lib/opts.py
alit8/Social-Distancing
a5b03dad5a9cd3a1980fe800fe70f04d9103ac36
[ "MIT" ]
null
null
null
FairMOT/src/lib/opts.py
alit8/Social-Distancing
a5b03dad5a9cd3a1980fe800fe70f04d9103ac36
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import os import sys class opts(object): def __init__(self): self.parser = argparse.ArgumentParser() # non FairMOT settings self.parser.add_argument('-v', '--video_path', action=...
50.583942
116
0.590188
ef403cf41aad5f1dc1e3ed2a6bf0518e0a40bfcc
1,195
py
Python
recommend/extract_color.py
hoshinari/FK_1809
403d581d3062133e0fc0fac93dd0a3cb0a7ad065
[ "MIT" ]
null
null
null
recommend/extract_color.py
hoshinari/FK_1809
403d581d3062133e0fc0fac93dd0a3cb0a7ad065
[ "MIT" ]
null
null
null
recommend/extract_color.py
hoshinari/FK_1809
403d581d3062133e0fc0fac93dd0a3cb0a7ad065
[ "MIT" ]
null
null
null
from PIL import Image import cv2 import sklearn import numpy as np from sklearn.cluster import KMeans import matplotlib.pyplot as plt def extract_main_color(img_path, k_num): cv2_img = cv2.imread(img_path) cv2_img = cv2.cvtColor(cv2_img, cv2.COLOR_BGR2RGB) cv2_img = cv2_img.reshape((cv2_img.shape[0] * cv2_img.sh...
36.212121
134
0.72887
83bfd7abdd0620597d8c8e7eed5fd8e2db30638e
535
py
Python
build/scripts-3.6/wsgi.py
092113219/pp_blog
e97581f20930100dc986a667bcc46f6beaceac70
[ "Apache-2.0" ]
null
null
null
build/scripts-3.6/wsgi.py
092113219/pp_blog
e97581f20930100dc986a667bcc46f6beaceac70
[ "Apache-2.0" ]
null
null
null
build/scripts-3.6/wsgi.py
092113219/pp_blog
e97581f20930100dc986a667bcc46f6beaceac70
[ "Apache-2.0" ]
null
null
null
""" WSGI config for django_blog project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application # os.environ.setdefault("DJANG...
28.157895
80
0.781308
1cb3430f2e488b1cb2e939901dadee214b9bcc17
2,682
py
Python
pytorch_lightning/trainer/optimizers.py
neptune-ml/pytorch-lightning
3bcaed52454f3e6c3bce5513032e34302e5b1bb6
[ "Apache-2.0" ]
3,469
2019-03-31T03:09:16.000Z
2020-01-13T15:06:31.000Z
pytorch_lightning/trainer/optimizers.py
neptune-ml/pytorch-lightning
3bcaed52454f3e6c3bce5513032e34302e5b1bb6
[ "Apache-2.0" ]
524
2019-04-02T12:33:39.000Z
2020-01-14T02:53:33.000Z
pytorch_lightning/trainer/optimizers.py
neptune-ml/pytorch-lightning
3bcaed52454f3e6c3bce5513032e34302e5b1bb6
[ "Apache-2.0" ]
365
2019-04-02T22:14:04.000Z
2020-01-13T17:21:54.000Z
# Copyright The PyTorch Lightning team. # # 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 i...
41.261538
120
0.693885
e54b15eb53a495fd7b2b91270860916a9b960245
19,897
py
Python
ranges/_helper.py
wikti/ranges
133376861d5595e040f0f18fd17de73a4ac2c3c2
[ "MIT" ]
null
null
null
ranges/_helper.py
wikti/ranges
133376861d5595e040f0f18fd17de73a4ac2c3c2
[ "MIT" ]
null
null
null
ranges/_helper.py
wikti/ranges
133376861d5595e040f0f18fd17de73a4ac2c3c2
[ "MIT" ]
1
2022-03-29T16:16:15.000Z
2022-03-29T16:16:15.000Z
from numbers import Number from operator import eq # , is_ from typing import Any, Iterable, Union, TypeVar r""" Type hint for the specific type of string that can be parsed as a range. Essentially, must conform to regex `r'[\(\[]\d+(?:\.\.|,)\d+[\)\]]'`, ignoring all whitespace. In human-readable form, that's `[sta...
31.988746
117
0.558627
5c48309ddbf9058b201ce42efceed328579334ce
7,339
py
Python
jsb/plugs/db/infoitem.py
NURDspace/jsonbot
400dce602700a93db80e10707c3785a0fbdfaaeb
[ "MIT" ]
1
2019-04-12T12:20:12.000Z
2019-04-12T12:20:12.000Z
jsb/plugs/db/infoitem.py
Petraea/jsonbot
04a3a0c586a8a1a3b0e5316d10cda16df9be415b
[ "MIT" ]
null
null
null
jsb/plugs/db/infoitem.py
Petraea/jsonbot
04a3a0c586a8a1a3b0e5316d10cda16df9be415b
[ "MIT" ]
1
2020-05-06T18:46:53.000Z
2020-05-06T18:46:53.000Z
# plugs/infoitem.py # # """ information items .. keyword/description pairs learn the bot something with: !<item> = <description> question goes with: !<item>? """ ## jsb imports from jsb.lib.commands import cmnds from jsb.lib.examples import examples from jsb.lib.datadir import datadir from jsb.utils.lo...
33.511416
154
0.630876
508541f91ba5a864d91f48391c9e26f8cad9d061
36,757
py
Python
moto/elbv2/models.py
ogckw/moto
e4a4e6183560489e98b95e815b439c7a1cf3566c
[ "Apache-2.0" ]
2
2018-01-29T14:50:38.000Z
2018-05-12T10:45:31.000Z
moto/elbv2/models.py
ogckw/moto
e4a4e6183560489e98b95e815b439c7a1cf3566c
[ "Apache-2.0" ]
1
2021-03-19T11:56:45.000Z
2021-03-19T11:56:45.000Z
moto/elbv2/models.py
ogckw/moto
e4a4e6183560489e98b95e815b439c7a1cf3566c
[ "Apache-2.0" ]
12
2017-09-06T22:11:15.000Z
2021-05-28T17:22:31.000Z
from __future__ import unicode_literals import datetime import re from moto.compat import OrderedDict from moto.core.exceptions import RESTError from moto.core import BaseBackend, BaseModel from moto.ec2.models import ec2_backends from moto.acm.models import acm_backends from .utils import make_arn_for_target_group fr...
39.608836
228
0.624425
7235fe0f9e0c209619a63f97ed4f6c81e99a7cd1
785
wsgi
Python
deploy/stores.wsgi
diassor/CollectorCity-Market-Place
892ad220b8cf1c0fc7433f625213fe61729522b2
[ "Apache-2.0" ]
135
2015-03-19T13:28:18.000Z
2022-03-27T06:41:42.000Z
deploy/stores.wsgi
dfcoding/CollectorCity-Market-Place
e59acec3d600c049323397b17cae14fdcaaaec07
[ "Apache-2.0" ]
null
null
null
deploy/stores.wsgi
dfcoding/CollectorCity-Market-Place
e59acec3d600c049323397b17cae14fdcaaaec07
[ "Apache-2.0" ]
83
2015-01-30T01:00:15.000Z
2022-03-08T17:25:10.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """This is the default wsgi file for the POC project. It's used by Apache's mod_wsgi to start the application.""" import os import sys wsgi_path = os.path.abspath(os.path.dirname(__file__)) # guessing that this .wsgi file is under project/deploy/ directory sys.path.append...
35.681818
79
0.736306
6e352ca297c9fa4267d454f5546ad6a322c41943
1,785
py
Python
tools/pnnx/tests/test_torch_real.py
undisputed-seraphim/ncnn
20a14bf5ae0301cb07a1f81181df29a461bba7e8
[ "BSD-3-Clause" ]
null
null
null
tools/pnnx/tests/test_torch_real.py
undisputed-seraphim/ncnn
20a14bf5ae0301cb07a1f81181df29a461bba7e8
[ "BSD-3-Clause" ]
null
null
null
tools/pnnx/tests/test_torch_real.py
undisputed-seraphim/ncnn
20a14bf5ae0301cb07a1f81181df29a461bba7e8
[ "BSD-3-Clause" ]
null
null
null
# Tencent is pleased to support the open source community by making ncnn available. # # Copyright (C) 2022 THL A29 Limited, a Tencent company. 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...
27.890625
100
0.645378
ed69393bdf741c9ce1b12bf9e71295761329dec7
803
py
Python
ansible-devel/test/units/utils/display/test_logger.py
satishcarya/ansible
ed091e174c26316f621ac16344a95c99f56bdc43
[ "MIT" ]
null
null
null
ansible-devel/test/units/utils/display/test_logger.py
satishcarya/ansible
ed091e174c26316f621ac16344a95c99f56bdc43
[ "MIT" ]
null
null
null
ansible-devel/test/units/utils/display/test_logger.py
satishcarya/ansible
ed091e174c26316f621ac16344a95c99f56bdc43
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2020 Ansible Project # 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 import logging import sys def test_logger(): ''' Avoid CVE-2019-148...
25.09375
92
0.693649
7ce14c17ee6d857ce36f4c9b83d99feac3fa0a9f
997
py
Python
MDRSREID/Trainer/print_log/__init__.py
nickhuang1996/HJL-re-id
107b25f31c961f360f69560cfddd78dfc0da3291
[ "MIT" ]
43
2020-09-20T09:40:04.000Z
2022-03-29T11:25:22.000Z
MDRSREID/Trainer/print_log/__init__.py
nickhuang1996/HJL-re-id
107b25f31c961f360f69560cfddd78dfc0da3291
[ "MIT" ]
19
2020-10-05T05:35:38.000Z
2021-12-10T03:17:31.000Z
MDRSREID/Trainer/print_log/__init__.py
nickhuang1996/HJL-re-id
107b25f31c961f360f69560cfddd78dfc0da3291
[ "MIT" ]
18
2020-10-01T14:41:53.000Z
2021-09-02T06:57:57.000Z
import time from MDRSREID.utils.log_utils.log import join_str from .get_optimizer_lr_str import get_optimizer_lr_str def print_log(cfg, current_ep, current_step, optimizer, loss_functions, analyze_functions, epoch_start_time): time_log = 'Ep {}, Step {}, {:.2f}s'.format(current_ep + 1, current_step + 1, ...
49.85
124
0.677031
befb039bd7d38338a3d68039900930deae65bf0c
671
py
Python
tools/gn-utils/codesign.py
omega-graphics/autom
1434152fe1fea89c3d77a347bbab28c301436183
[ "BSD-3-Clause" ]
null
null
null
tools/gn-utils/codesign.py
omega-graphics/autom
1434152fe1fea89c3d77a347bbab28c301436183
[ "BSD-3-Clause" ]
null
null
null
tools/gn-utils/codesign.py
omega-graphics/autom
1434152fe1fea89c3d77a347bbab28c301436183
[ "BSD-3-Clause" ]
null
null
null
import argparse import os import shutil import sys import AppleFramework parser = argparse.ArgumentParser() parser.add_argument("--sig",type=str) parser.add_argument("--code",type=str) parser.add_argument("--output_dir",type=str) parser.add_argument("--framework",dest="framework",action="store_const",const=True,defau...
27.958333
97
0.742176
6f6621fab68647066da29a64130e78fa4cc37cda
369
bzl
Python
third_party/dotnet/nuget/packages/system.threading.tasks.extensions.bzl
GQAssurance/selenium
fc93242e17385966cd2ad9088e1044ed6e8bf148
[ "Apache-2.0" ]
2
2021-06-28T15:02:22.000Z
2021-07-06T11:57:51.000Z
third_party/dotnet/nuget/packages/system.threading.tasks.extensions.bzl
GQAssurance/selenium
fc93242e17385966cd2ad9088e1044ed6e8bf148
[ "Apache-2.0" ]
4
2020-07-17T08:44:45.000Z
2021-05-09T06:12:03.000Z
third_party/dotnet/nuget/packages/system.threading.tasks.extensions.bzl
lucianodgs/selenium
e2b2b97de0d9a6cc86563c866a9361237519159f
[ "Apache-2.0" ]
2
2019-06-27T19:40:39.000Z
2019-11-25T23:36:37.000Z
package(default_visibility = [ "//visibility:public" ]) load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "net_import_library", "core_import_library") net_import_library( name = "net45", src = "lib/netstandard1.0/System.Threading.Tasks.Extensions.dll", ) core_import_library( name = "netcore", src = "lib/netstan...
28.384615
92
0.750678
3674754e7e07a3f58f26886ac80761812b54b1e6
395
py
Python
basta_app/asgi.py
lorenzosp93/basta_app
0eba51f648f74d21e84d30d1047a4bedf79dbbaa
[ "MIT" ]
1
2021-03-23T19:14:27.000Z
2021-03-23T19:14:27.000Z
basta_app/asgi.py
lorenzosp93/basta_app
0eba51f648f74d21e84d30d1047a4bedf79dbbaa
[ "MIT" ]
4
2021-03-30T14:20:11.000Z
2021-06-10T20:12:34.000Z
basta_app/asgi.py
lorenzosp93/basta_app
0eba51f648f74d21e84d30d1047a4bedf79dbbaa
[ "MIT" ]
null
null
null
""" ASGI config for basta_app project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SET...
23.235294
78
0.787342
473c5394873fc9a20d13ea4ff3a55985ca2c9509
8,807
py
Python
intersight/model/hcl_operating_system_vendor_list_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/hcl_operating_system_vendor_list_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/hcl_operating_system_vendor_list_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
50.039773
1,678
0.642784
4ccd00687286998d690ccc5efd9d0f32c2605de9
1,058
py
Python
tt_demo/queries/services.py
cle-b/tt_demo
6c04a8d1cc052f24db8d90e929fec992b6c3ba41
[ "Apache-2.0" ]
null
null
null
tt_demo/queries/services.py
cle-b/tt_demo
6c04a8d1cc052f24db8d90e929fec992b6c3ba41
[ "Apache-2.0" ]
3
2019-02-11T21:00:24.000Z
2019-02-19T21:09:12.000Z
tt_demo/queries/services.py
cle-b/tt_demo
6c04a8d1cc052f24db8d90e929fec992b6c3ba41
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -* from flask import Response, abort from .controllers import create_queries, get_all_query_ids, get_query_description def create_queries_from_cson(body): """Receive a CSON file that contains a list of queries. Record the queries in the database. Returns a safe CSON file where query...
27.842105
91
0.677694
8664acf53a42d37dacddf00441b1b4bd9ee2edee
2,619
py
Python
obfsproxy/managed/client.py
SPIN-UMass/BLANKET
0d222f54dab8342c0b3473f8923fc3cd9e524722
[ "BSD-3-Clause" ]
10
2021-04-07T08:36:42.000Z
2022-03-29T12:47:33.000Z
obfsproxy/managed/client.py
SPIN-UMass/BLANKET
0d222f54dab8342c0b3473f8923fc3cd9e524722
[ "BSD-3-Clause" ]
1
2021-04-07T15:09:54.000Z
2021-12-01T03:23:58.000Z
obfsproxy/managed/client.py
SPIN-UMass/BLANKET
0d222f54dab8342c0b3473f8923fc3cd9e524722
[ "BSD-3-Clause" ]
5
2021-08-30T11:41:12.000Z
2022-03-01T06:21:56.000Z
#!/home/milad/anaconda2/bin/python2 # -*- coding: utf-8 -*- from twisted.internet import reactor, error import obfsproxy.network.launch_transport as launch_transport import obfsproxy.transports.transports as transports import obfsproxy.common.log as logging import obfsproxy.common.transport_config as transport_config...
37.414286
108
0.690722
f2c7c08dd4be03e557d2910649ae9d17e506e95c
687
py
Python
app/api/v1/test.py
mohansd/cyx-xElec-server
bef67274ba85d6172ac1ef4dd3df8c8ce86c6c61
[ "Apache-2.0" ]
null
null
null
app/api/v1/test.py
mohansd/cyx-xElec-server
bef67274ba85d6172ac1ef4dd3df8c8ce86c6c61
[ "Apache-2.0" ]
null
null
null
app/api/v1/test.py
mohansd/cyx-xElec-server
bef67274ba85d6172ac1ef4dd3df8c8ce86c6c61
[ "Apache-2.0" ]
null
null
null
from app.libs.redprint import RedPrint from app.libs.error_code import Success from app.api_docs.v1 import user as api_doc from app.service.socketservice import * from flask import current_app import socket api = RedPrint(name='test', description='测试', api_doc=api_doc) @api.route('/socket') def socket_test(): soc...
36.157895
81
0.69869
5dd77e071c49e8df244321ed8f9a4f1435707818
5,014
py
Python
lib/galaxy/tools/toolbox/panel.py
BalthazarPavot/galaxy_project_reports
aa397de11a9a3425f85c701087af4c5d165b571f
[ "CC-BY-3.0" ]
1
2019-07-03T08:13:57.000Z
2019-07-03T08:13:57.000Z
lib/galaxy/tools/toolbox/panel.py
LainOldAccound/galaxy_project_reports
aa397de11a9a3425f85c701087af4c5d165b571f
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/tools/toolbox/panel.py
LainOldAccound/galaxy_project_reports
aa397de11a9a3425f85c701087af4c5d165b571f
[ "CC-BY-3.0" ]
null
null
null
from abc import abstractmethod from galaxy.util.odict import odict from galaxy.util import bunch from galaxy.util.dictifiable import Dictifiable from .parser import ensure_tool_conf_item from six import iteritems panel_item_types = bunch.Bunch( TOOL="TOOL", WORKFLOW="WORKFLOW", SECTION="SECTION", LAB...
29.845238
76
0.602314
1c2439d4dcfca709ea617fdf134aa6e65d532a7d
399
py
Python
musicbrainz/wsgi.py
wt3c/musicbrainz
05a074bcb8cd04192419e54ed5a3ce9dd8492bdf
[ "MIT" ]
null
null
null
musicbrainz/wsgi.py
wt3c/musicbrainz
05a074bcb8cd04192419e54ed5a3ce9dd8492bdf
[ "MIT" ]
17
2019-07-03T21:19:59.000Z
2022-02-10T10:32:47.000Z
musicbrainz/wsgi.py
wt3c/musicbrainz
05a074bcb8cd04192419e54ed5a3ce9dd8492bdf
[ "MIT" ]
null
null
null
""" WSGI config for musicbrainz project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_S...
23.470588
78
0.789474
fd1f92ed9c065eb6fb41510fef0ed7ecaa43bf20
3,895
py
Python
jtyoui/imagepdf/image.py
gjh123/Jtyoui
3fc819a4cebd9f6dc99660214efa92bc7f43eef1
[ "MIT" ]
2
2019-10-12T06:29:40.000Z
2019-10-12T06:29:47.000Z
jtyoui/imagepdf/image.py
wjn0918/Jtyoui
3fc819a4cebd9f6dc99660214efa92bc7f43eef1
[ "MIT" ]
null
null
null
jtyoui/imagepdf/image.py
wjn0918/Jtyoui
3fc819a4cebd9f6dc99660214efa92bc7f43eef1
[ "MIT" ]
null
null
null
#!/usr/bin/python3.7 # -*- coding: utf-8 -*- # @Time : 2019/7/20 13:42 # @Email : jtyoui@qq.com # @Software: PyCharm from jtyoui.error import LibraryNotInstallError from jtyoui.tools import pips import os import glob import zipfile import shutil try: import fitz # 安装 pip install PyMuPDF except ModuleNotFoundE...
31.41129
117
0.634146
6712b08fad58cb007d7d6147a4ac8d79f1adae8f
10,503
py
Python
sdk/python/kfp/cli/cli_test.py
omarzouk/pipelines
f77ebc879741d4f5f5a6b7eede6d996788df3a45
[ "Apache-2.0" ]
1
2022-03-14T20:54:33.000Z
2022-03-14T20:54:33.000Z
sdk/python/kfp/cli/cli_test.py
omarzouk/pipelines
f77ebc879741d4f5f5a6b7eede6d996788df3a45
[ "Apache-2.0" ]
1
2020-02-06T12:53:44.000Z
2020-02-06T12:53:44.000Z
sdk/python/kfp/cli/cli_test.py
omarzouk/pipelines
f77ebc879741d4f5f5a6b7eede6d996788df3a45
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 The Kubeflow Authors # # 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...
35.244966
78
0.625155
f93622944b4fffdfa762c533304fba2a8af12acf
553
py
Python
Week 03/p3_analytic_nalundasan.py
andrewn488/OMSBA-5061
8e57fff45d8965b0423a6fe338bd74cedfe94ea0
[ "MIT" ]
null
null
null
Week 03/p3_analytic_nalundasan.py
andrewn488/OMSBA-5061
8e57fff45d8965b0423a6fe338bd74cedfe94ea0
[ "MIT" ]
null
null
null
Week 03/p3_analytic_nalundasan.py
andrewn488/OMSBA-5061
8e57fff45d8965b0423a6fe338bd74cedfe94ea0
[ "MIT" ]
1
2022-02-07T02:42:43.000Z
2022-02-07T02:42:43.000Z
""" Andrew Nalundasan P3: Quadratic - Analytic Question 1 on P3 Assignment 10/3/2020 """ import math # import math so can use math.sqrt for square root function # variables print('solving ax^2 + bx + c = 0: ') a = float(input('a = ')) b = float(input('b = ')) c = float(input('c = ')) # calcula...
23.041667
81
0.528029
f114cd5ef4ca482a8082bb34768cb76ba9b76813
805
py
Python
creepers/migrations/0001_initial.py
Mmarcos01/fear-space
7414f8b325d9a07d689ada99136ecde30a7e2253
[ "MIT" ]
null
null
null
creepers/migrations/0001_initial.py
Mmarcos01/fear-space
7414f8b325d9a07d689ada99136ecde30a7e2253
[ "MIT" ]
null
null
null
creepers/migrations/0001_initial.py
Mmarcos01/fear-space
7414f8b325d9a07d689ada99136ecde30a7e2253
[ "MIT" ]
null
null
null
# Generated by Django 3.2.7 on 2021-09-01 23:22 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
29.814815
119
0.631056
1f2ea73026727eb45825cee8839048a78ecca36a
2,301
py
Python
mock_word.py
davidlmontgomery/hacks
d2f4d3271dcc13edc2502492fff97fccc3e826e4
[ "MIT" ]
null
null
null
mock_word.py
davidlmontgomery/hacks
d2f4d3271dcc13edc2502492fff97fccc3e826e4
[ "MIT" ]
null
null
null
mock_word.py
davidlmontgomery/hacks
d2f4d3271dcc13edc2502492fff97fccc3e826e4
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Generate a random string that is plausibly pronounceable in English. """ import random VOWELS = ('a', 'e', 'i', 'o', 'u',) CONSONANT_START = { 'b': ('l', 'r',), 'c': ('h', 'l', 'r',), 'd': ('r', 'w',), 'f': ('l', 'r',), 'g': ('l', 'r', 'w',), 'h': (), 'j': (), ...
23.96875
99
0.318123
4a17740fedd63df644d1055ddc218fe74606d434
7,511
py
Python
lib/klepto/tests/test_cache.py
JustinDeOcampo/Alfred-JapaneseTranslator
b8614c718384b2303813fdabb580d4ffd8e3f5c6
[ "MIT" ]
2
2020-07-13T00:04:23.000Z
2021-02-05T17:07:39.000Z
lib/klepto/tests/test_cache.py
JustinDeOcampo/Alfred-JapaneseTranslator
b8614c718384b2303813fdabb580d4ffd8e3f5c6
[ "MIT" ]
null
null
null
lib/klepto/tests/test_cache.py
JustinDeOcampo/Alfred-JapaneseTranslator
b8614c718384b2303813fdabb580d4ffd8e3f5c6
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2013-2016 California Institute of Technology. # Copyright (c) 2016-2020 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/kl...
27.715867
94
0.565704
8e14553673f7d4029c2a3267f7e289f2d7d7883e
2,642
py
Python
lib/googlecloudsdk/compute/subcommands/backend_services/remove_backend.py
IsaacHuang/google-cloud-sdk
52afa5d1a75dff08f4f5380c5cccc015bf796ca5
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/compute/subcommands/backend_services/remove_backend.py
IsaacHuang/google-cloud-sdk
52afa5d1a75dff08f4f5380c5cccc015bf796ca5
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/compute/subcommands/backend_services/remove_backend.py
IsaacHuang/google-cloud-sdk
52afa5d1a75dff08f4f5380c5cccc015bf796ca5
[ "Apache-2.0" ]
2
2020-07-25T05:03:06.000Z
2020-11-04T04:55:57.000Z
# Copyright 2014 Google Inc. All Rights Reserved. """Command for removing a backend from a backend service.""" import copy from googlecloudsdk.calliope import exceptions from googlecloudsdk.compute.lib import base_classes from googlecloudsdk.compute.lib import utils class RemoveBackend(base_classes.ReadWriteCommand)...
29.355556
77
0.659727
fb4ef6e881b2c23e23b21051fa8f26030bd166d1
195
py
Python
lvsr/dependency/debug.py
mzapotoczny/dependency-parser
e37f94e23cb61d6658774f5f9843219df331eb74
[ "MIT" ]
3
2017-06-07T06:41:18.000Z
2019-10-26T13:08:23.000Z
lvsr/dependency/debug.py
mzapotoczny/dependency-parser
e37f94e23cb61d6658774f5f9843219df331eb74
[ "MIT" ]
null
null
null
lvsr/dependency/debug.py
mzapotoczny/dependency-parser
e37f94e23cb61d6658774f5f9843219df331eb74
[ "MIT" ]
1
2020-11-26T17:40:18.000Z
2020-11-26T17:40:18.000Z
import theano def debugTheanoVar(name, var, print_str=False): attrs = ["shape"] if print_str: attrs += ["__str__"] return theano.printing.Print(name, attrs=tuple(attrs))(var)
27.857143
63
0.666667
1c1d515d96859addb2999d0270bd8eefc2be5092
917
py
Python
examples/data_augmentation/vector.py
kintatta/d3rl
0674c4898927a53f36c5c875d8f217337f22d364
[ "MIT" ]
null
null
null
examples/data_augmentation/vector.py
kintatta/d3rl
0674c4898927a53f36c5c875d8f217337f22d364
[ "MIT" ]
null
null
null
examples/data_augmentation/vector.py
kintatta/d3rl
0674c4898927a53f36c5c875d8f217337f22d364
[ "MIT" ]
null
null
null
from d3rlpy.datasets import get_pybullet from d3rlpy.algos import CQL from d3rlpy.metrics.scorer import evaluate_on_environment from d3rlpy.metrics.scorer import td_error_scorer from d3rlpy.metrics.scorer import discounted_sum_of_advantage_scorer from d3rlpy.metrics.scorer import average_value_estimation_scorer from sk...
36.68
72
0.76554
b39f82b14e9762606c0682bd507d1ccad1cd96f9
1,849
py
Python
tests/contrib/operators/test_winrm_operator.py
fxdmhtt/airflow
cf88f7bc7bbd3e9bf110e98f025759a96c130235
[ "Apache-2.0" ]
3
2019-10-03T21:08:15.000Z
2019-10-04T00:24:40.000Z
tests/contrib/operators/test_winrm_operator.py
fxdmhtt/airflow
cf88f7bc7bbd3e9bf110e98f025759a96c130235
[ "Apache-2.0" ]
7
2019-03-27T07:58:14.000Z
2020-02-12T17:42:33.000Z
tests/contrib/operators/test_winrm_operator.py
upjohnc/airflow-upjohn-k8s
caadbc1618d73e054de99138b0892cea3a9327c4
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
5
2017-06-19T19:55:47.000Z
2020-10-10T00:49:20.000Z
# -*- coding: utf-8 -*- # # 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 #...
36.98
75
0.713899
1bbe3154bfd9f9386371c9909fe57766ee5d52ca
23,277
py
Python
general/tasks_importer/sdk/swagger_client/api/submissions_api.py
CitizenScienceCenter/c3s_tools
36479905ffbeb2bdabbc2be145dfe4fe7258ef5d
[ "Apache-2.0" ]
null
null
null
general/tasks_importer/sdk/swagger_client/api/submissions_api.py
CitizenScienceCenter/c3s_tools
36479905ffbeb2bdabbc2be145dfe4fe7258ef5d
[ "Apache-2.0" ]
1
2022-03-22T22:11:21.000Z
2022-03-22T22:11:21.000Z
general/tasks_importer/sdk/swagger_client/api/submissions_api.py
CitizenScienceCenter/c3s_tools
36479905ffbeb2bdabbc2be145dfe4fe7258ef5d
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ CCCS No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa:...
37.483092
160
0.595481
c2c7e6a7c341e97c1fb47158b19498b7c9bc4753
1,557
py
Python
tests/test_interface.py
kfirc/wordle-bot
7cbf0deb94d1ed3eee8ee7dcc8aace3ab48ce707
[ "MIT" ]
1
2022-01-12T18:58:31.000Z
2022-01-12T18:58:31.000Z
tests/test_interface.py
kfirc/wordle-bot
7cbf0deb94d1ed3eee8ee7dcc8aace3ab48ce707
[ "MIT" ]
null
null
null
tests/test_interface.py
kfirc/wordle-bot
7cbf0deb94d1ed3eee8ee7dcc8aace3ab48ce707
[ "MIT" ]
null
null
null
import pytest from assertpy import assert_that class TestInterface: def test_interface_with_simple_input(self, interface): interface.post_guess('abcde') interface.post_guess('xyzab') interface.post_guess('asdfg') interface.post_guess('qwert') interface.post_guess(interface....
34.6
84
0.661529
4580a7fd251593ecdf270fa7cf31d8a17bd64d2a
7,358
py
Python
main.py
zzhmark/ccf-db-backend
c404c4dccec4c650ef61b01865634a9dd8e542b5
[ "MIT" ]
null
null
null
main.py
zzhmark/ccf-db-backend
c404c4dccec4c650ef61b01865634a9dd8e542b5
[ "MIT" ]
null
null
null
main.py
zzhmark/ccf-db-backend
c404c4dccec4c650ef61b01865634a9dd8e542b5
[ "MIT" ]
null
null
null
import json from elasticsearch import Elasticsearch from flask import Flask, url_for, render_template, request # import psql from flask_cors import CORS # import pandas as pd from datetime import date from flask_pymongo import PyMongo from bson.json_util import dumps from bson.objectid import ObjectId from ...
30.155738
92
0.609405
40384077eae9675faed4fa991a1fda644a01e4f1
86,677
py
Python
lib/spack/spack/package.py
mclarsen/spack
eef75ddd45f7d5a268cbf9eafd3af5143c271391
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
lib/spack/spack/package.py
mclarsen/spack
eef75ddd45f7d5a268cbf9eafd3af5143c271391
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2021-01-11T09:16:43.000Z
2021-01-12T20:07:23.000Z
lib/spack/spack/package.py
mclarsen/spack
eef75ddd45f7d5a268cbf9eafd3af5143c271391
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2021-01-06T18:58:26.000Z
2021-01-06T18:58:26.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) """This is where most of the action happens in Spack. The spack package class structure is based strongly on Homebrew (ht...
38.488899
118
0.618584
f363b09c50b4ff503920f43746b800b3c3ced2a0
2,559
py
Python
10/main.py
nybbles/advent-of-code-2021
67423aff537f9178f1f0a280e769c37e9201b461
[ "MIT" ]
null
null
null
10/main.py
nybbles/advent-of-code-2021
67423aff537f9178f1f0a280e769c37e9201b461
[ "MIT" ]
null
null
null
10/main.py
nybbles/advent-of-code-2021
67423aff537f9178f1f0a280e769c37e9201b461
[ "MIT" ]
null
null
null
#! python from functools import reduce input = """[({(<(())[]>[[{[]{<()<>> [(()[<>])]({[<{<<[]>>( {([(<{}[<>[]}>{[]{[(<()> (((({<>}<{<{<>}{[]{[]{} [[<[([]))<([[{}[[()]]] [{[{({}]{}}([{[{{{}}([] {<[[]]>}<{[{[{[]{()[[[] [<(<(<(<{}))><([]([]() <{([([[(<>()){}]>(<<{{ <{([{{}}[<[[[<>{}]]]>[]]""" input = [[c for c in line...
25.59
76
0.639703
988c47d33d60f90b92d65d919ea9031cc94c6858
29,160
py
Python
vimfiles/bundle/vim-python/submodules/pylint/tests/test_self.py
OrangeGzY/vimrc
ddcaedce2effbbd1014eddbceebeb8c621cd9f95
[ "MIT" ]
1
2021-05-08T07:32:20.000Z
2021-05-08T07:32:20.000Z
vimfiles/bundle/vim-python/submodules/pylint/tests/test_self.py
OrangeGzY/vimrc
ddcaedce2effbbd1014eddbceebeb8c621cd9f95
[ "MIT" ]
null
null
null
vimfiles/bundle/vim-python/submodules/pylint/tests/test_self.py
OrangeGzY/vimrc
ddcaedce2effbbd1014eddbceebeb8c621cd9f95
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2006-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2014-2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014 Vlad Temian <vladtemian@gmail.com> # Copyright (c) 2014 Google, Inc. # Copyright (c) 2014 Arun Persaud <arun@nubati.net> # Copyright (c)...
35.517661
108
0.56797
d4268d86565086de0a3cd590b56b87deff76e16e
6,879
py
Python
aiida/orm/data/remote.py
iriberri/aiida_core
c4a1ec5dac92ee62c59d39ca580bde449f3abf73
[ "BSD-2-Clause" ]
null
null
null
aiida/orm/data/remote.py
iriberri/aiida_core
c4a1ec5dac92ee62c59d39ca580bde449f3abf73
[ "BSD-2-Clause" ]
null
null
null
aiida/orm/data/remote.py
iriberri/aiida_core
c4a1ec5dac92ee62c59d39ca580bde449f3abf73
[ "BSD-2-Clause" ]
1
2018-12-21T11:10:09.000Z
2018-12-21T11:10:09.000Z
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
36.396825
125
0.525222
e697502d9eb8f574be573e6ef70420541672566a
11,128
py
Python
eslearn/utils/lc_screening_subject_folder_V3.py
dongmengshi/easylearn
df528aaa69c3cf61f5459a04671642eb49421dfb
[ "MIT" ]
19
2020-02-29T06:00:18.000Z
2022-01-24T01:30:14.000Z
eslearn/utils/lc_screening_subject_folder_V3.py
dongmengshi/easylearn
df528aaa69c3cf61f5459a04671642eb49421dfb
[ "MIT" ]
7
2020-04-02T03:05:21.000Z
2020-11-11T11:45:05.000Z
eslearn/utils/lc_screening_subject_folder_V3.py
dongmengshi/easylearn
df528aaa69c3cf61f5459a04671642eb49421dfb
[ "MIT" ]
11
2020-03-03T03:02:15.000Z
2020-11-11T14:09:55.000Z
# -*- coding: utf-8 -*- """ Created on Sun Nov 25 21:53:10 2018 改自selectSubjID_inScale_V2 根据给定的条件筛选大表的item和subjects' folder inputs: file_all:大表 column_basic1=[0,11,19,20,21,22,23,27,28,29,30]:基本信息列 column_basic2=['学历(年)','中国人利手量表']:基本信息名 column_hamd17=np.arange(104,126,1), col...
37.093333
145
0.558681
2ee0146ecae75b64b4c534062f9e18e066667bdc
12,158
py
Python
npc.py
importhuman/cmd_pokemon
184da8b3bad67f07032baaac3f79bcb34aaa0eda
[ "MIT" ]
16
2020-09-04T19:32:31.000Z
2022-03-29T07:55:57.000Z
npc.py
importhuman/cmd_pokemon
184da8b3bad67f07032baaac3f79bcb34aaa0eda
[ "MIT" ]
11
2020-10-01T13:10:33.000Z
2020-12-29T11:48:02.000Z
npc.py
importhuman/cmd_pokemon
184da8b3bad67f07032baaac3f79bcb34aaa0eda
[ "MIT" ]
4
2020-10-01T13:16:19.000Z
2021-12-13T14:04:01.000Z
from random import choice from player import PokemonTrainer from pokeworld import pokemonWorld, small_pokemons, legendary_pokemons from pokemon import Pokemon from copy import deepcopy # Legendary Pokemons zapdosData = deepcopy(pokemonWorld['zapdos']) moltresData = deepcopy(pokemonWorld['moltres']) articuno...
33.493113
168
0.741652
7d6a04d9f48eb77bf896c623b87edca2d23eeeec
3,480
py
Python
cartography/intel/aws/ec2/subnets.py
babywyrm/cartography
ecec80a1db1fc926c4786b04830ca974a9af94de
[ "Apache-2.0" ]
null
null
null
cartography/intel/aws/ec2/subnets.py
babywyrm/cartography
ecec80a1db1fc926c4786b04830ca974a9af94de
[ "Apache-2.0" ]
null
null
null
cartography/intel/aws/ec2/subnets.py
babywyrm/cartography
ecec80a1db1fc926c4786b04830ca974a9af94de
[ "Apache-2.0" ]
null
null
null
import logging from typing import Dict from typing import List import boto3 import neo4j from .util import get_botocore_config from cartography.util import aws_handle_regions from cartography.util import run_cleanup_job from cartography.util import timeit logger = logging.getLogger(__name__) @timeit @aws_handle_re...
38.241758
112
0.748276
47a3fd0c43a581a51c9035ae2a2e00abc52c63a6
674
py
Python
CONTENT/Resources/guides/__UNSORTED/86.py
impastasyndrome/DS-ALGO-OFFICIAL
c85ec9cf0af0009f038b7a571a7ac1fb466b7f3a
[ "Apache-2.0" ]
13
2021-03-11T00:25:22.000Z
2022-03-19T00:19:23.000Z
CONTENT/Resources/guides/__UNSORTED/86.py
impastasyndrome/DS-ALGO-OFFICIAL
c85ec9cf0af0009f038b7a571a7ac1fb466b7f3a
[ "Apache-2.0" ]
162
2021-03-09T01:52:11.000Z
2022-03-12T01:09:07.000Z
CONTENT/Resources/guides/__UNSORTED/86.py
impastasyndrome/DS-ALGO-OFFICIAL
c85ec9cf0af0009f038b7a571a7ac1fb466b7f3a
[ "Apache-2.0" ]
12
2021-04-26T19:43:01.000Z
2022-01-31T08:36:29.000Z
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def partition(self, head, x): """ :type head: ListNode :type x: int :rtype: ListNode """ dummy1 = prev = ListNode(0)...
24.071429
36
0.476261
5f7d1477df65a51f536b24e426dfafd353a662ea
7,363
py
Python
选拔赛/code/q3.py
775269512/WHUT_CUMCM20
a966c09e46c1789a86d4532f46d503a2226e0a47
[ "MIT" ]
73
2020-09-20T15:39:26.000Z
2022-03-10T23:37:17.000Z
选拔赛/code/q3.py
HHHTTY/WHUT_CUMCM20
a966c09e46c1789a86d4532f46d503a2226e0a47
[ "MIT" ]
3
2021-09-18T04:43:08.000Z
2021-12-02T08:10:53.000Z
选拔赛/code/q3.py
HHHTTY/WHUT_CUMCM20
a966c09e46c1789a86d4532f46d503a2226e0a47
[ "MIT" ]
27
2020-09-20T15:39:29.000Z
2022-02-28T12:15:06.000Z
import numpy as np from math import * import random import matplotlib.pyplot as plt import numpy.random as rnd from scipy import optimize a1 = 30 b1 = 20 c1 = ("LJ1",a1,b1) a2 = 25 b2 = 20 c2 = ("LJ2",a2,b2) a3 = 39 b3 = 39 c3 = ("LJ3",a3,b3) a4 = 29 b4 = 29 c4 = ("LJ4",a4,b4) a5 = 27.5 b5 = 27.5 c5 = ("LJ5",a5,b5) a6...
30.300412
120
0.515415
ffd3e768b116ea89dc6d0a6059fb97e362c29fc6
10,393
py
Python
homeassistant/components/demo/vacuum.py
alemuro/home-assistant
9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90
[ "Apache-2.0" ]
2
2019-10-19T15:07:32.000Z
2022-01-29T10:33:20.000Z
homeassistant/components/demo/vacuum.py
alemuro/home-assistant
9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90
[ "Apache-2.0" ]
null
null
null
homeassistant/components/demo/vacuum.py
alemuro/home-assistant
9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90
[ "Apache-2.0" ]
2
2019-01-21T05:49:23.000Z
2019-02-19T16:30:48.000Z
"""Demo platform for the vacuum component.""" import logging from homeassistant.components.vacuum import ( ATTR_CLEANED_AREA, STATE_CLEANING, STATE_DOCKED, STATE_IDLE, STATE_PAUSED, STATE_RETURNING, SUPPORT_BATTERY, SUPPORT_CLEAN_SPOT, SUPPORT_FAN_SPEED, SUPPORT_LOCATE, SUPP...
27.938172
73
0.629462
3861e1830ef88cd42ca27707cde47560976c6500
4,523
py
Python
models/deterministic/resnet.py
tooba-jd/Test
c8ef37bfe9303542a57fad37e54b49938728089a
[ "BSD-3-Clause" ]
33
2020-11-11T21:06:50.000Z
2022-03-11T10:45:36.000Z
models/deterministic/resnet.py
tooba-jd/Test
c8ef37bfe9303542a57fad37e54b49938728089a
[ "BSD-3-Clause" ]
2
2021-01-09T00:40:39.000Z
2021-01-11T21:23:39.000Z
models/deterministic/resnet.py
tooba-jd/Test
c8ef37bfe9303542a57fad37e54b49938728089a
[ "BSD-3-Clause" ]
8
2021-01-09T15:38:47.000Z
2022-03-03T10:15:59.000Z
''' ResNet for CIFAR10. Ref for ResNet architecture: https://arxiv.org/abs/1512.03385 ''' import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.init as init __all__ = [ 'ResNet', 'resnet20', 'resnet32', 'resnet44', 'resnet56', 'resnet110', 'resnet1202' ] def _weights_init(m): ...
28.99359
76
0.516029
d97f2cb91311dbb00ca8eaf8095e02e70f9eff47
6,439
py
Python
src/airobot/__init__.py
weiqiao/airobot
5f9c6f239a16f31f8923131e144b360f71a89a93
[ "MIT" ]
null
null
null
src/airobot/__init__.py
weiqiao/airobot
5f9c6f239a16f31f8923131e144b360f71a89a93
[ "MIT" ]
null
null
null
src/airobot/__init__.py
weiqiao/airobot
5f9c6f239a16f31f8923131e144b360f71a89a93
[ "MIT" ]
null
null
null
import importlib import os import time from .utils.ai_logger import Logger from .utils.common import load_class_from_path from .version import __version__ class Robot: """ Create a robot instance, which contains: arm, base, camera End effector tool is inside the arm class Args: robot_nam...
31.10628
79
0.554589
e57883418afe7f298ebe6d6abd63abd695237b41
1,529
py
Python
xdl-algorithm-solution/TDM/src/python/algo/test.py
Ru-Xiang/x-deeplearning
04cc0497150920c64b06bb8c314ef89977a3427a
[ "Apache-2.0" ]
4,071
2018-12-13T04:17:38.000Z
2022-03-30T03:29:35.000Z
xdl-algorithm-solution/TDM/src/python/algo/test.py
laozhuang727/x-deeplearning
781545783a4e2bbbda48fc64318fb2c6d8bbb3cc
[ "Apache-2.0" ]
359
2018-12-21T01:14:57.000Z
2022-02-15T07:18:02.000Z
xdl-algorithm-solution/TDM/src/python/algo/test.py
laozhuang727/x-deeplearning
781545783a4e2bbbda48fc64318fb2c6d8bbb3cc
[ "Apache-2.0" ]
1,054
2018-12-20T09:57:42.000Z
2022-03-29T07:16:53.000Z
# Copyright (C) 2016-2018 Alibaba Group Holding Limited # # 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...
28.849057
107
0.7155
31836b5773b973e0fd3695229782bb561716bfa7
4,915
py
Python
underscore/variable_finder.py
doboy/Underscore
d98273db3144cda79191d2c90f45d81b6d700b1f
[ "MIT" ]
7
2016-09-23T00:44:05.000Z
2021-10-04T21:19:12.000Z
underscore/variable_finder.py
jameswu1991/Underscore
d98273db3144cda79191d2c90f45d81b6d700b1f
[ "MIT" ]
1
2016-09-23T00:45:05.000Z
2019-02-16T19:05:37.000Z
underscore/variable_finder.py
jameswu1991/Underscore
d98273db3144cda79191d2c90f45d81b6d700b1f
[ "MIT" ]
3
2016-09-23T01:13:15.000Z
2018-07-20T21:22:17.000Z
# Copyright (c) 2013 Huan Do, http://huan.do import ast from collections import deque class VariableFinder(ast.NodeVisitor): def __init__(self, env): self.env = env self.visit_queue = deque() self._conditional_stack = [] self._global = False def visit(self, node): """...
30.91195
76
0.607935
107ec220c939cb9ff20821b01b1760fb4b33a207
1,178
py
Python
tricks/trick.py
laomagic/pytorch_tricks
729baef0f5a0241ae7a943ef5aa5867268c13b54
[ "MIT" ]
null
null
null
tricks/trick.py
laomagic/pytorch_tricks
729baef0f5a0241ae7a943ef5aa5867268c13b54
[ "MIT" ]
null
null
null
tricks/trick.py
laomagic/pytorch_tricks
729baef0f5a0241ae7a943ef5aa5867268c13b54
[ "MIT" ]
null
null
null
# 参数微调 model = None bert_learning_rate = 2e-5 learning_rate = 1e-3 bert_parameters = model.bert.named_parameters() start_parameters = model.start_fc.named_parameters() end_parameters = model.end_fc.named_parameters() param_optimizer = list(model.named_parameters()) no_decay = ['bias', 'LayerNorm.bias', 'LayerNorm.wei...
42.071429
87
0.682513
d54556ff599fcb89f3c41ea49d4327d6ba91b09f
1,716
py
Python
bonsai/format.py
stgn/bonsai
08a27b5e13376d762e68c5aab52bf6380e32169c
[ "MIT" ]
null
null
null
bonsai/format.py
stgn/bonsai
08a27b5e13376d762e68c5aab52bf6380e32169c
[ "MIT" ]
null
null
null
bonsai/format.py
stgn/bonsai
08a27b5e13376d762e68c5aab52bf6380e32169c
[ "MIT" ]
null
null
null
import logging import brotli from io import BytesIO from bonsai.codec import decoder, encoder logger = logging.getLogger(__name__) MAGIC = '盆栽'.encode('utf-16-be') def write_compressed_section(data, fp): compressed = brotli.compress(data) compressed_len = len(compressed) fp.write(len(data).to_bytes(4, 'b...
28.131148
77
0.684149
a14a09d630b676442d278c9714059a34b7875904
2,694
py
Python
tests/models/commondb/model/conftest.py
weibullguy/ramstk
3ec41d7e2933045a7a8028aed6c6b04365495095
[ "BSD-3-Clause" ]
4
2018-08-26T09:11:36.000Z
2019-05-24T12:01:02.000Z
tests/models/commondb/model/conftest.py
weibullguy/ramstk
3ec41d7e2933045a7a8028aed6c6b04365495095
[ "BSD-3-Clause" ]
52
2018-08-24T12:51:22.000Z
2020-12-28T04:59:42.000Z
tests/models/commondb/model/conftest.py
weibullguy/ramstk
3ec41d7e2933045a7a8028aed6c6b04365495095
[ "BSD-3-Clause" ]
1
2018-10-11T07:57:55.000Z
2018-10-11T07:57:55.000Z
# -*- coding: utf-8 -*- # # tests.models.commondb.model.conftest.py is part of The RAMSTK Project # # All rights reserved. # Copyright since 2007 Doyle "weibullguy" Rowland doyle.rowland <AT> reliaqual <DOT> com """The RAMSTK Model module test fixtures.""" # Standard Library Imports from datetime import date, ti...
28.967742
88
0.721975
d5d50a180a1df6d7c56635b6b18509fbabc06d4d
17,323
py
Python
tensorflow/python/kernel_tests/distributions/special_math_test.py
ashuven63/tf_audio
bc561b81069001da01a1c7df4c16f6b9ba9a400b
[ "Apache-2.0" ]
1
2018-05-30T00:34:05.000Z
2018-05-30T00:34:05.000Z
tensorflow/python/kernel_tests/distributions/special_math_test.py
timctho/tensorflow
015c72eac3f4e448dd8ab852843e902771496532
[ "Apache-2.0" ]
null
null
null
tensorflow/python/kernel_tests/distributions/special_math_test.py
timctho/tensorflow
015c72eac3f4e448dd8ab852843e902771496532
[ "Apache-2.0" ]
1
2021-11-16T19:59:48.000Z
2021-11-16T19:59:48.000Z
# Copyright 2016 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...
36.014553
81
0.678462
010d110ad70e97e15cfbc9ecd62a61955927c596
2,407
py
Python
src/action/scripts/record/autonomous_control.py
sbrodeur/ros-icreate-bbb
a9816acb73f3506a3b4e3a19c432341524c9a7e9
[ "BSD-3-Clause" ]
4
2016-09-22T18:28:21.000Z
2019-05-21T11:07:06.000Z
src/action/scripts/record/autonomous_control.py
sbrodeur/ros-icreate-bbb
a9816acb73f3506a3b4e3a19c432341524c9a7e9
[ "BSD-3-Clause" ]
40
2016-09-08T20:08:19.000Z
2016-12-22T17:38:55.000Z
src/action/scripts/record/autonomous_control.py
sbrodeur/ros-icreate-bbb
a9816acb73f3506a3b4e3a19c432341524c9a7e9
[ "BSD-3-Clause" ]
2
2016-12-28T08:22:00.000Z
2021-03-04T17:06:45.000Z
#!/usr/bin/env python # Copyright (c) 2016, Simon Brodeur # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, th...
47.196078
103
0.75322
f42607c2c0b582450e9ea7bf044eff3542c6d73f
11,981
py
Python
lib/Pathing.py
zorchenhimer/NoudaEngine
f0eb26c7929d67a6946e3cf8b38055de450d06ec
[ "MIT" ]
1
2015-09-04T11:50:16.000Z
2015-09-04T11:50:16.000Z
lib/Pathing.py
zorchenhimer/NoudaEngine
f0eb26c7929d67a6946e3cf8b38055de450d06ec
[ "MIT" ]
null
null
null
lib/Pathing.py
zorchenhimer/NoudaEngine
f0eb26c7929d67a6946e3cf8b38055de450d06ec
[ "MIT" ]
null
null
null
#!/usr/bin/python import math import random from lib.Globals import UnitType, FixPath, Vars from lib.Logger import * class MovementPath(): """ This class holds all the movement paths for a given object. There are three modes: Enter, Dance, and Exit. Enter is when the vehicle is entering b...
34.428161
113
0.49278
0594966bf76c564161aa131029108459164a6199
113
py
Python
Keywords/for.py
GowthamPrasad/py_thon
302a21fcfd553bb59c0084860100efee5e2dca0e
[ "MIT" ]
null
null
null
Keywords/for.py
GowthamPrasad/py_thon
302a21fcfd553bb59c0084860100efee5e2dca0e
[ "MIT" ]
null
null
null
Keywords/for.py
GowthamPrasad/py_thon
302a21fcfd553bb59c0084860100efee5e2dca0e
[ "MIT" ]
null
null
null
#for is looping statement, used to iterate a number of times a=[1,2,3,4,5] for i in a: i=i*2 print(i)
22.6
61
0.619469
b6150edb4f6ea376152f1ffcce366831bd0a3533
22,093
py
Python
src/translate.py
justmcgowen/human-motion-prediction-pytorch-uncertainty
4cdf68553b69a943a1e68fedc6114fa30bcad5ef
[ "MIT" ]
49
2019-02-26T02:02:18.000Z
2022-02-06T03:24:38.000Z
src/translate.py
enriccorona/human-motion-prediction
84eb9f7bcb6aa35f30eabc025d3d944fba01a095
[ "MIT" ]
2
2020-12-23T17:38:20.000Z
2021-01-27T21:31:18.000Z
src/translate.py
enriccorona/human-motion-prediction
84eb9f7bcb6aa35f30eabc025d3d944fba01a095
[ "MIT" ]
19
2019-04-26T11:17:03.000Z
2022-03-13T12:12:42.000Z
"""Simple code for training an RNN for motion prediction.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import os import random import sys import time import h5py import numpy as np from six.moves import xrange # pylint: disable=redefined...
38.624126
145
0.648531
a1b6690d500543da4676f94316732ce72f197e38
400
py
Python
TWT/apps/challenges/migrations/0009_challenge_voting_status.py
KrishnaKanth1729/twtcodejam.net
89c2cb695a7c34cfb85524b422612d32f1f275bb
[ "MIT" ]
55
2020-11-16T09:04:50.000Z
2022-03-05T23:15:06.000Z
TWT/apps/challenges/migrations/0009_challenge_voting_status.py
KrishnaKanth1729/twtcodejam.net
89c2cb695a7c34cfb85524b422612d32f1f275bb
[ "MIT" ]
23
2020-11-21T13:01:34.000Z
2021-12-29T04:36:53.000Z
TWT/apps/challenges/migrations/0009_challenge_voting_status.py
KrishnaKanth1729/twtcodejam.net
89c2cb695a7c34cfb85524b422612d32f1f275bb
[ "MIT" ]
33
2020-11-16T07:26:51.000Z
2021-12-14T11:29:09.000Z
# Generated by Django 3.1.1 on 2020-10-02 22:13 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("challenges", "0008_auto_20200929_0004"), ] operations = [ migrations.AddField( model_name="challenge", name="voting_...
21.052632
53
0.6125
045550638352ce603da8740d6740b56f9c67edbd
2,771
py
Python
symphony/cli/pyinventory/graphql/location_surveys_query.py
aharonnovo/magma
d96a272ee58fea436cc94990c7ad05c4edc76341
[ "BSD-3-Clause" ]
null
null
null
symphony/cli/pyinventory/graphql/location_surveys_query.py
aharonnovo/magma
d96a272ee58fea436cc94990c7ad05c4edc76341
[ "BSD-3-Clause" ]
null
null
null
symphony/cli/pyinventory/graphql/location_surveys_query.py
aharonnovo/magma
d96a272ee58fea436cc94990c7ad05c4edc76341
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # @generated AUTOGENERATED file. Do not Change! from dataclasses import dataclass from datetime import datetime from gql.gql.datetime_utils import DATETIME_FIELD from gql.gql.graphql_client import GraphqlClient from functools import partial from numbers import Number from typing import Any, Call...
27.71
97
0.577048
0ec188e80162c695570b9c3adb165516e90e4d39
1,266
py
Python
lsspipe/lsspipeStage1.py
zdu863/lss-pipeline-stages
f55440b02a316fbde24a2af03e017eae006ece6c
[ "BSD-3-Clause" ]
null
null
null
lsspipe/lsspipeStage1.py
zdu863/lss-pipeline-stages
f55440b02a316fbde24a2af03e017eae006ece6c
[ "BSD-3-Clause" ]
null
null
null
lsspipe/lsspipeStage1.py
zdu863/lss-pipeline-stages
f55440b02a316fbde24a2af03e017eae006ece6c
[ "BSD-3-Clause" ]
null
null
null
from ceci import PipelineStage from descformats import TextFile, FitsFile, HDFFile, YamlFile # This class represents one step in the pipeline class LSSPipeStage1(PipelineStage): name = "LSSPipeStage1" # inputs = [ ('some_input_tag', TextFile), ] outputs = [ ('some_output_tag', TextF...
27.521739
97
0.6406
efb9d3354e490a8f248a82b012a5b562970dda5a
4,255
py
Python
starlette/endpoints.py
gfeun/starlette
66cce0f1c309d1df872652cbb3d23eb543254cdc
[ "BSD-3-Clause" ]
null
null
null
starlette/endpoints.py
gfeun/starlette
66cce0f1c309d1df872652cbb3d23eb543254cdc
[ "BSD-3-Clause" ]
null
null
null
starlette/endpoints.py
gfeun/starlette
66cce0f1c309d1df872652cbb3d23eb543254cdc
[ "BSD-3-Clause" ]
null
null
null
import asyncio import typing import json from starlette.exceptions import HTTPException from starlette.requests import Request from starlette.websockets import WebSocket from starlette.responses import Response, PlainTextResponse from starlette.types import Message, Receive, Send, Scope class HTTPEndpoint: def __...
39.398148
95
0.623972
5c20b7a36675e7b94e0321c6258b551780bffd8f
5,226
py
Python
gammapy/image/lists.py
gabemery/gammapy
99e5c5d38e4920dddd7bca41fb1539ccda8bea2d
[ "BSD-3-Clause" ]
null
null
null
gammapy/image/lists.py
gabemery/gammapy
99e5c5d38e4920dddd7bca41fb1539ccda8bea2d
[ "BSD-3-Clause" ]
null
null
null
gammapy/image/lists.py
gabemery/gammapy
99e5c5d38e4920dddd7bca41fb1539ccda8bea2d
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function, unicode_literals from collections import OrderedDict import logging from ..extern import six from ..extern.six.moves import UserList from astropy.io import fits from astropy.io.fits import H...
29.862857
87
0.594527
dd69d077418be4b2799b711e2f55566b65c1374c
2,470
py
Python
apps/iiif/kollections/views.py
ecds/readux
4eac8b48efef8126f4f2be28b5eb943c85a89c2e
[ "Apache-2.0" ]
18
2017-06-12T09:58:02.000Z
2021-10-01T11:14:34.000Z
apps/iiif/kollections/views.py
ecds/readux
4eac8b48efef8126f4f2be28b5eb943c85a89c2e
[ "Apache-2.0" ]
276
2019-04-26T20:13:01.000Z
2022-03-31T10:26:28.000Z
apps/iiif/kollections/views.py
ecds/readux
4eac8b48efef8126f4f2be28b5eb943c85a89c2e
[ "Apache-2.0" ]
7
2018-03-13T23:44:26.000Z
2021-09-15T17:54:55.000Z
"""Django views for Kollections""" import json from django.http import JsonResponse from django.views import View from django.core.serializers import serialize from django.contrib.sitemaps import Sitemap from django.urls import reverse from .models import Collection from ..manifests.models import Manifest class Manife...
30.493827
99
0.606073
fb4fa0f77b699deff3411547ee2bb3e00ed9e202
1,072
py
Python
Tests/Itau/testIatuMultiPayment.py
BancoDeFormaturas/python-pg-cnab240
1d70d5e4203957673def001b7c48c42f194909b9
[ "MIT" ]
null
null
null
Tests/Itau/testIatuMultiPayment.py
BancoDeFormaturas/python-pg-cnab240
1d70d5e4203957673def001b7c48c42f194909b9
[ "MIT" ]
null
null
null
Tests/Itau/testIatuMultiPayment.py
BancoDeFormaturas/python-pg-cnab240
1d70d5e4203957673def001b7c48c42f194909b9
[ "MIT" ]
1
2019-12-05T19:40:55.000Z
2019-12-05T19:40:55.000Z
from keeper_cnab240.banks.Itau.payment_methods import PaymentMethods from Tests.Utils.Companies import company from Tests.Utils.Payments import payments from Tests.Utils.Utils import hash_file, payment_file_generator import os import unittest class TestItauMultiPayment(unittest.TestCase): def setUp(self): ...
29.777778
98
0.727612
96f360422d12adea54d1c251c940fc194458d64d
1,349
py
Python
azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_paged.py
HydAu/AzureSDKForPython
5cbe34e9e0b8ea1faacc9f205633ccc0b885c0f3
[ "Apache-2.0" ]
null
null
null
azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_paged.py
HydAu/AzureSDKForPython
5cbe34e9e0b8ea1faacc9f205633ccc0b885c0f3
[ "Apache-2.0" ]
null
null
null
azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_paged.py
HydAu/AzureSDKForPython
5cbe34e9e0b8ea1faacc9f205633ccc0b885c0f3
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft and contributors. 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 ...
35.5
76
0.633803
4469cd4fd0717123cbb093bda338a100ab9ec6e2
97,462
py
Python
hydrus/client/gui/ClientGUIImport.py
swiftcitrus/hydrus
a0ac6acba56f469541d5a273021f1b605fc2e43f
[ "WTFPL" ]
1
2021-05-16T16:06:48.000Z
2021-05-16T16:06:48.000Z
hydrus/client/gui/ClientGUIImport.py
swiftcitrus/hydrus
a0ac6acba56f469541d5a273021f1b605fc2e43f
[ "WTFPL" ]
5
2021-03-31T05:48:17.000Z
2021-04-30T05:51:34.000Z
hydrus/client/gui/ClientGUIImport.py
swiftcitrus/hydrus
a0ac6acba56f469541d5a273021f1b605fc2e43f
[ "WTFPL" ]
2
2021-03-28T23:17:50.000Z
2021-05-16T15:46:52.000Z
import collections import os import re from qtpy import QtCore as QC from qtpy import QtWidgets as QW from qtpy import QtGui as QG from hydrus.core import HydrusConstants as HC from hydrus.core import HydrusData from hydrus.core import HydrusExceptions from hydrus.core import HydrusGlobals as HG from hydrus.core impo...
37.24188
293
0.575209
1460d0ec8c51c5b83337658b00f41455d3ead74e
405
py
Python
getkey.py
chinmaya-dehury/webex_api_examples
dd4004f36bd4cae5886a80f8ffb656566ad80116
[ "Apache-2.0" ]
null
null
null
getkey.py
chinmaya-dehury/webex_api_examples
dd4004f36bd4cae5886a80f8ffb656566ad80116
[ "Apache-2.0" ]
null
null
null
getkey.py
chinmaya-dehury/webex_api_examples
dd4004f36bd4cae5886a80f8ffb656566ad80116
[ "Apache-2.0" ]
null
null
null
# Make sure that you have a key file with only the key in the first line # Filename: key # first and only line # 123456xyz import json def getkey(): try: key=open("key").readline().rstrip() return key except: print("It seems the key file is not present. \n Create a filename ...
25.3125
142
0.632099
0c8dd28bc9338ee6c657d87017519c9f847961d2
900
py
Python
cride/users/models/profiles.py
mpita/cride
5e8afb710d3ac704c9c3819e0f7ff762e60948ff
[ "MIT" ]
1
2019-04-09T07:15:46.000Z
2019-04-09T07:15:46.000Z
cride/users/models/profiles.py
mpita/cride
5e8afb710d3ac704c9c3819e0f7ff762e60948ff
[ "MIT" ]
7
2020-06-05T19:54:39.000Z
2022-03-11T23:41:06.000Z
cride/users/models/profiles.py
mpita/cride
5e8afb710d3ac704c9c3819e0f7ff762e60948ff
[ "MIT" ]
null
null
null
"""Profile model.""" # Django from django.db import models # Utilities from cride.utils.models import CRideModel class Profile(CRideModel): """Profile A profile holds a user's public data like biography, picture, and statistics. """ user = models.OneToOneField('users.User', on_delete=models.CAS...
23.684211
75
0.665556
1f66455f299f9d2c7faf501ea6ea2fac250976c6
11,306
py
Python
jax/linear_util.py
RuffaloLavoisier/Ruffalo-jax
ef8f7eb242feb65e95aef8ad57a5889e3fd44853
[ "Apache-2.0" ]
null
null
null
jax/linear_util.py
RuffaloLavoisier/Ruffalo-jax
ef8f7eb242feb65e95aef8ad57a5889e3fd44853
[ "Apache-2.0" ]
null
null
null
jax/linear_util.py
RuffaloLavoisier/Ruffalo-jax
ef8f7eb242feb65e95aef8ad57a5889e3fd44853
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 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, ...
33.548961
105
0.709004
d6b447fbfaba4f4bf1d9212b68385082d5a5da5c
37,015
py
Python
keras_wrapper/utils.py
ruizhang-ai/GCP
7a0f30c6c3d732627fa269ce943c62a9005cc40f
[ "MIT" ]
2
2021-09-28T02:26:46.000Z
2021-09-28T04:47:55.000Z
keras_wrapper/utils.py
ruizhang-ai/GCP
7a0f30c6c3d732627fa269ce943c62a9005cc40f
[ "MIT" ]
null
null
null
keras_wrapper/utils.py
ruizhang-ai/GCP
7a0f30c6c3d732627fa269ce943c62a9005cc40f
[ "MIT" ]
null
null
null
import copy import itertools import logging import time import numpy as np from keras.layers.convolutional import ZeroPadding2D def bbox(img, mode='max'): """ Returns a bounding box covering all the non-zero area in the image. :param img: Image on which print the bounding box :param mode: "width_h...
42.351259
120
0.604836
22a39b68408c9fd68c000df0a4a4d2d81d1a8644
3,057
py
Python
func/article/lambda_function.py
ShinValor/Url-Search
8daa652a75d6d228e8010ea68574926643d3c0a7
[ "MIT" ]
null
null
null
func/article/lambda_function.py
ShinValor/Url-Search
8daa652a75d6d228e8010ea68574926643d3c0a7
[ "MIT" ]
null
null
null
func/article/lambda_function.py
ShinValor/Url-Search
8daa652a75d6d228e8010ea68574926643d3c0a7
[ "MIT" ]
null
null
null
import json import pymysql import boto3 import base64 import logging from botocore.exceptions import ClientError logger = logging.getLogger() logger.setLevel(logging.INFO) def lambda_handler(event, context): logger.info("Inside lambda_handler...") article_id = event['id'] # SecretsManager database_c...
39.192308
103
0.663395
631797e806912a9c8be2d0d71cad4b66d3a127b9
3,955
py
Python
flexget/plugins/cli/seen.py
monokoo/Flexget
73a0008ef6b657ba3253afcb537c7fddaeaf475d
[ "MIT" ]
null
null
null
flexget/plugins/cli/seen.py
monokoo/Flexget
73a0008ef6b657ba3253afcb537c7fddaeaf475d
[ "MIT" ]
null
null
null
flexget/plugins/cli/seen.py
monokoo/Flexget
73a0008ef6b657ba3253afcb537c7fddaeaf475d
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from flexget import options from flexget import plugin from flexget.event import event from flexget.terminal import TerminalTable, TerminalTableError, table_parser, consol...
38.028846
118
0.676106
37ab5a05bc8ff4cf747e606f76a0ce1feba8ba54
3,870
py
Python
test/autumn18_mc_NANO.py
SUEPPhysics/SUEPNano
525e72e337d609058bc8ce72a886e4491227ca6e
[ "MIT" ]
null
null
null
test/autumn18_mc_NANO.py
SUEPPhysics/SUEPNano
525e72e337d609058bc8ce72a886e4491227ca6e
[ "MIT" ]
null
null
null
test/autumn18_mc_NANO.py
SUEPPhysics/SUEPNano
525e72e337d609058bc8ce72a886e4491227ca6e
[ "MIT" ]
null
null
null
# Auto generated configuration file # using: # Revision: 1.19 # Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v # with command line options: step1 --filein file:XXX.root --fileout file:YYY.root --mc --eventcontent NANOAODSIM --datatier NANOAODSIM --conditions 102X_upgrade2018_rea...
40.3125
360
0.814212
ab13c3664d0d80cd222924d406017dd85e0eb745
549
py
Python
tests/test_apps/multirun_structured_conflict/my_app.py
sara-nl/hydra
8fd0d23d71cf528528ca5eda26e0c1f0c1e973d7
[ "MIT" ]
null
null
null
tests/test_apps/multirun_structured_conflict/my_app.py
sara-nl/hydra
8fd0d23d71cf528528ca5eda26e0c1f0c1e973d7
[ "MIT" ]
null
null
null
tests/test_apps/multirun_structured_conflict/my_app.py
sara-nl/hydra
8fd0d23d71cf528528ca5eda26e0c1f0c1e973d7
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from dataclasses import dataclass from omegaconf import MISSING, DictConfig import hydra from hydra.core.config_store import ConfigStore @dataclass class TestConfig: param: int = MISSING config_store = ConfigStore.instance() config_store.s...
21.115385
70
0.754098
4784ba90f31ca0f15541227acd434cf1c393882b
12,931
py
Python
rqd/rqd/rqnimby.py
imageworks/OpenCue
81a272a18c298ac1a3bbcd53b2cf9d7daad03248
[ "Apache-2.0" ]
334
2019-01-23T13:48:08.000Z
2019-06-10T06:58:49.000Z
rqd/rqd/rqnimby.py
imageworks/OpenCue
81a272a18c298ac1a3bbcd53b2cf9d7daad03248
[ "Apache-2.0" ]
126
2019-01-22T23:18:18.000Z
2019-06-11T10:27:07.000Z
rqd/rqd/rqnimby.py
imageworks/OpenCue
81a272a18c298ac1a3bbcd53b2cf9d7daad03248
[ "Apache-2.0" ]
40
2019-01-23T03:07:17.000Z
2019-06-03T13:48:52.000Z
# Copyright Contributors to the OpenCue Project # # 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...
33.5
103
0.588122
172e9328427da653b8b9eea745b7c54bbe2fe371
4,116
py
Python
datasets/wiki_split/wiki_split.py
dkajtoch/datasets
12ef7f0d541a5aca5b29ebc2dddf5e1214f0e3e9
[ "Apache-2.0" ]
9
2021-04-26T14:43:52.000Z
2021-11-08T09:47:24.000Z
datasets/wiki_split/wiki_split.py
jramapuram/huggingface_datasets
62c7ac0783a00bdc1192b6a75439a65d522b6cbc
[ "Apache-2.0" ]
null
null
null
datasets/wiki_split/wiki_split.py
jramapuram/huggingface_datasets
62c7ac0783a00bdc1192b6a75439a65d522b6cbc
[ "Apache-2.0" ]
3
2021-01-03T22:08:20.000Z
2021-08-12T20:09:39.000Z
"""TODO(wiki_split): Add a description here.""" from __future__ import absolute_import, division, print_function import csv import os import datasets # TODO(wiki_split): BibTeX citation _CITATION = """\ @InProceedings{BothaEtAl2018, title = {{Learning To Split and Rephrase From Wikipedia Edit History}}, author...
39.2
130
0.618076
10b76ec70cfefdbdafebe9fc72eb26a9657d041d
4,607
py
Python
tests/test_protobuf.py
rasimuvaikas/stanza
21793519a531b0e9d7151e42d180d97785c9a5b8
[ "Apache-2.0" ]
3,633
2016-01-21T17:29:13.000Z
2022-03-31T13:36:47.000Z
tests/test_protobuf.py
rasimuvaikas/stanza
21793519a531b0e9d7151e42d180d97785c9a5b8
[ "Apache-2.0" ]
593
2016-01-19T07:16:05.000Z
2022-03-31T20:23:58.000Z
tests/test_protobuf.py
rasimuvaikas/stanza
21793519a531b0e9d7151e42d180d97785c9a5b8
[ "Apache-2.0" ]
525
2016-01-20T03:22:19.000Z
2022-03-24T05:51:56.000Z
""" Tests to read a stored protobuf. Also serves as an example of how to parse sentences, tokens, pos, lemma, ner, dependencies and mentions. The test corresponds to annotations for the following sentence: Chris wrote a simple sentence that he parsed with Stanford CoreNLP. """ import os import pytest from pytest ...
30.309211
90
0.680269
57f312056470af6c23677c26615940c7f9c4333f
1,067
py
Python
catcoin/client.py
val-labs/catcoinledger
e46f5f188a0d326ebf4d01f95c091d5ae26d01fa
[ "Apache-2.0" ]
1
2018-07-29T21:12:52.000Z
2018-07-29T21:12:52.000Z
catcoin/client.py
val-labs/catcoinledger
e46f5f188a0d326ebf4d01f95c091d5ae26d01fa
[ "Apache-2.0" ]
null
null
null
catcoin/client.py
val-labs/catcoinledger
e46f5f188a0d326ebf4d01f95c091d5ae26d01fa
[ "Apache-2.0" ]
null
null
null
import os, sys, time, peer2peer from multiprocessing import Process from catcoin.api import * def listen(): print "LISTENING" pass line = "\n" def prompt(): sys.stderr.write(">>") sys.stderr.flush() global line line = sys.stdin.readline() return line def command_loop(): while lin...
22.229167
39
0.514527
1ac5a035164cf886edad2256e5d17b3850051e70
33,977
py
Python
sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_subscriptions_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2019-08-23T21:14:00.000Z
2021-09-07T18:32:34.000Z
sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_subscriptions_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
4
2019-04-17T17:57:49.000Z
2020-04-24T21:11:22.000Z
sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_subscriptions_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
1
2019-04-05T18:17:43.000Z
2019-04-05T18:17:43.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
51.480303
226
0.67631
804bae8e8a8f7edb69ef4a8e82c11922aeb3a59a
499
py
Python
src/grokcore/json/tests/base/json/missing_permission3.py
zopefoundation/grokcore.json
01e05bb73d6f05aa656edb33f417fa7c46950358
[ "ZPL-2.1" ]
null
null
null
src/grokcore/json/tests/base/json/missing_permission3.py
zopefoundation/grokcore.json
01e05bb73d6f05aa656edb33f417fa7c46950358
[ "ZPL-2.1" ]
null
null
null
src/grokcore/json/tests/base/json/missing_permission3.py
zopefoundation/grokcore.json
01e05bb73d6f05aa656edb33f417fa7c46950358
[ "ZPL-2.1" ]
3
2015-04-03T04:52:20.000Z
2018-01-12T07:50:21.000Z
""" An undefined permission that's never used (because it's being shadowed by a method-level directive) doesn't raise an error: >>> from grokcore.json import testing >>> testing.grok(__name__) """ import grokcore.json as grok import zope.interface class Permission(grok.Permission): grok.name('json.exists')...
19.192308
70
0.715431
b43947538905c9c333e19f30501b449efdf3e5fe
316
py
Python
wonsplash/users/apps.py
chiwon99881/wonsplash
17d5191296e1a05968ad3fa2bc551269745e8a5a
[ "MIT" ]
null
null
null
wonsplash/users/apps.py
chiwon99881/wonsplash
17d5191296e1a05968ad3fa2bc551269745e8a5a
[ "MIT" ]
null
null
null
wonsplash/users/apps.py
chiwon99881/wonsplash
17d5191296e1a05968ad3fa2bc551269745e8a5a
[ "MIT" ]
null
null
null
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class UsersConfig(AppConfig): name = "wonsplash.users" verbose_name = _("Users") def ready(self): try: import wonsplash.users.signals # noqa F401 except ImportError: pass
22.571429
55
0.658228
cff83b2e2607e9d27c820fba60dd3f4d5b3917e6
1,109
py
Python
products/migrations/0001_initial.py
cmwaura/aura
2877127e76d8b3a4bb82c6dcdab74a1d3c835add
[ "MIT" ]
null
null
null
products/migrations/0001_initial.py
cmwaura/aura
2877127e76d8b3a4bb82c6dcdab74a1d3c835add
[ "MIT" ]
null
null
null
products/migrations/0001_initial.py
cmwaura/aura
2877127e76d8b3a4bb82c6dcdab74a1d3c835add
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-01-26 20:04 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Product...
35.774194
114
0.600541
462fef9127e6609d996c9910d60bf912d7d7db2c
1,424
py
Python
examples/gnn_models/gdc_gcn.py
xssstory/cogdl
ae8de495c365993f19f04774f083960fd282c2a3
[ "MIT" ]
1
2021-03-24T10:37:20.000Z
2021-03-24T10:37:20.000Z
examples/gnn_models/gdc_gcn.py
xssstory/cogdl
ae8de495c365993f19f04774f083960fd282c2a3
[ "MIT" ]
null
null
null
examples/gnn_models/gdc_gcn.py
xssstory/cogdl
ae8de495c365993f19f04774f083960fd282c2a3
[ "MIT" ]
null
null
null
import torch from cogdl.tasks import build_task from cogdl.datasets import build_dataset from cogdl.models import build_model from cogdl.utils import build_args_from_dict def get_default_args(): cuda_available = torch.cuda.is_available() default_dict = {'hidden_size': 16, 'dropout': 0.5, ...
31.644444
57
0.573034
0fd2bf8a0bc82625ac8d6f56e59f6cfac51ee868
1,708
py
Python
239 Sliding Window Maximum.py
ChiFire/legend_LeetCode
93fe97fef7e929fdbdc25fbb53955d44e14ecff8
[ "MIT" ]
872
2015-06-15T12:02:41.000Z
2022-03-30T08:44:35.000Z
239 Sliding Window Maximum.py
ChiFire/legend_LeetCode
93fe97fef7e929fdbdc25fbb53955d44e14ecff8
[ "MIT" ]
8
2015-06-21T15:11:59.000Z
2022-02-01T11:22:34.000Z
239 Sliding Window Maximum.py
ChiFire/legend_LeetCode
93fe97fef7e929fdbdc25fbb53955d44e14ecff8
[ "MIT" ]
328
2015-06-28T03:10:35.000Z
2022-03-29T11:05:28.000Z
# -*- coding: utf-8 -*- """ Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position. For example, Given nums = [1,3,-1,-3,5,3,6,7], and k = 3. Wind...
28.949153
116
0.52459
d6a05c426fff5b7a174e65cc4c90033e6ed14dae
963
py
Python
pyleecan/Methods/Slot/HoleUD/comp_surface_magnet_id.py
tobsen2code/pyleecan
5b1ded9e389e0c79ed7b7c878b6e939f2d9962e9
[ "Apache-2.0" ]
95
2019-01-23T04:19:45.000Z
2022-03-17T18:22:10.000Z
pyleecan/Methods/Slot/HoleUD/comp_surface_magnet_id.py
Eomys/Pyleecan
4d7f0cbabf0311006963e7a2f435db2ecd901118
[ "Apache-2.0" ]
366
2019-02-20T07:15:08.000Z
2022-03-31T13:37:23.000Z
pyleecan/Methods/Slot/HoleUD/comp_surface_magnet_id.py
Eomys/Pyleecan
4d7f0cbabf0311006963e7a2f435db2ecd901118
[ "Apache-2.0" ]
74
2019-01-24T01:47:31.000Z
2022-02-25T05:44:42.000Z
# -*- coding: utf-8 -*- from ....Functions.labels import HOLEM_LAB def comp_surface_magnet_id(self, index): """Compute the surface of the hole magnet of the corresponding index Parameters ---------- self : HoleUD A HoleUD object index : int Index of the magnet to compute the surfa...
26.027027
72
0.556594
ef70ec4de831e91d0d8616018a9482e5b6a5a9de
1,615
py
Python
crawler/pipelines.py
gowerc/cadet
23890dcdbae1bef2166c37f5c9a51f38679cbe17
[ "MIT" ]
null
null
null
crawler/pipelines.py
gowerc/cadet
23890dcdbae1bef2166c37f5c9a51f38679cbe17
[ "MIT" ]
null
null
null
crawler/pipelines.py
gowerc/cadet
23890dcdbae1bef2166c37f5c9a51f38679cbe17
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html # import re # import json # # class WebcrawlPipeline(object): # # # def open_spider(self, spider): # self.file ...
24.846154
65
0.547988
3a8f933af8d8a94d00d0f050bfff0f890a59104f
3,573
py
Python
sdk/python/pulumi_azure_native/appplatform/v20190501preview/get_certificate.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/appplatform/v20190501preview/get_certificate.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/appplatform/v20190501preview/get_certificate.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
32.779817
171
0.647635
b8966d121d0ca1fa3ffb5c01f67a55bb01ec792b
10,597
py
Python
metaworld/metaworld/envs/mujoco/sawyer_xyz/sawyer_drawer_close.py
jesbu1/spinningup
fd54d9e06febc7ff5696a63d1e84e2c16d38e486
[ "MIT" ]
null
null
null
metaworld/metaworld/envs/mujoco/sawyer_xyz/sawyer_drawer_close.py
jesbu1/spinningup
fd54d9e06febc7ff5696a63d1e84e2c16d38e486
[ "MIT" ]
12
2021-02-02T22:53:59.000Z
2022-03-12T00:41:30.000Z
metaworld/envs/mujoco/sawyer_xyz/sawyer_drawer_close.py
LiCHOTHU/ocean-kp
2102bda2e51233baad0da12a6b1f168a7882564b
[ "MIT" ]
null
null
null
from collections import OrderedDict import numpy as np from gym.spaces import Dict , Box from metaworld.envs.env_util import get_stat_in_paths, \ create_stats_ordered_dict, get_asset_full_path from metaworld.core.multitask_env import MultitaskEnv from metaworld.envs.mujoco.sawyer_xyz.base import SawyerXYZEnv fr...
35.680135
131
0.568274
5fc28d374ecc5f9ce6958ac2970f178a8622d8bf
597
py
Python
bnn_mcmc_examples/examples/mlp/noisy_xor/setting2/model.py
papamarkou/bnn_mcmc_examples
7bb4ecfb33db4c30a8e61e31f528bda0efb24e3d
[ "MIT" ]
1
2021-09-09T15:55:37.000Z
2021-09-09T15:55:37.000Z
bnn_mcmc_examples/examples/mlp/noisy_xor/setting2/model.py
kushagragpt99/bnn_mcmc_examples
297cdb1e74335860989bebdb4ff6f6322b6adc06
[ "MIT" ]
null
null
null
bnn_mcmc_examples/examples/mlp/noisy_xor/setting2/model.py
kushagragpt99/bnn_mcmc_examples
297cdb1e74335860989bebdb4ff6f6322b6adc06
[ "MIT" ]
1
2021-10-05T06:38:57.000Z
2021-10-05T06:38:57.000Z
# %% Import packages import numpy as np import torch from torch.distributions import Normal from eeyore.constants import loss_functions from eeyore.models import mlp from bnn_mcmc_examples.examples.mlp.noisy_xor.setting2.constants import dtype, mlp_dims # %% Setup MLP model hparams = mlp.Hyperparameters(dims=mlp_...
23.88
91
0.777219
71b78cdc5b9bd54e07d4816fdd1341b587d80abd
997
py
Python
9/solve.py
marcolivierarsenault/AdventOfCode2015
0094a47e6cf8af5ffe5c00a28f49ddcd919e5652
[ "MIT" ]
null
null
null
9/solve.py
marcolivierarsenault/AdventOfCode2015
0094a47e6cf8af5ffe5c00a28f49ddcd919e5652
[ "MIT" ]
null
null
null
9/solve.py
marcolivierarsenault/AdventOfCode2015
0094a47e6cf8af5ffe5c00a28f49ddcd919e5652
[ "MIT" ]
null
null
null
import copy table = [] endTable = [] with open("input.txt") as textFile: for line in textFile: words = line.strip().split(" ") table.append([]) table[len(table)-1].append(words[4]) table[len(table)-1].append(words[0]) table[len(table)-1].append(words[2]) table.append([]) table[len(table)-1].append(word...
25.564103
81
0.652959
39df8bffd5607ffeb5fdd2ee17760933d329637b
1,913
py
Python
tests/unicode_literals_test.py
laurentbristiel/pyupgrade
4557ed9206a5061f1799ee2b4ced66f4683297d1
[ "MIT" ]
null
null
null
tests/unicode_literals_test.py
laurentbristiel/pyupgrade
4557ed9206a5061f1799ee2b4ced66f4683297d1
[ "MIT" ]
null
null
null
tests/unicode_literals_test.py
laurentbristiel/pyupgrade
4557ed9206a5061f1799ee2b4ced66f4683297d1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals import pytest from pyupgrade import _fix_tokens from pyupgrade import _imports_unicode_literals @pytest.mark.parametrize( ('s', 'expected'), ( ('', False), ('import x', False), ('fr...
26.205479
64
0.556717
a5940a5a67013983388875b9b230623580ffc35d
6,768
py
Python
sqlight/platforms/sqlite.py
laomafeima/sqlight
57835552c86e7a286955447af04ea0d1d14e7367
[ "Apache-2.0" ]
1
2020-03-30T19:43:36.000Z
2020-03-30T19:43:36.000Z
sqlight/platforms/sqlite.py
laomafeima/sqlight
57835552c86e7a286955447af04ea0d1d14e7367
[ "Apache-2.0" ]
1
2020-04-27T11:53:31.000Z
2020-04-27T11:53:31.000Z
sqlight/platforms/sqlite.py
laomafeima/sqlight
57835552c86e7a286955447af04ea0d1d14e7367
[ "Apache-2.0" ]
null
null
null
import sqlite3 from functools import wraps from typing import NoReturn, Iterator, List, Dict import sqlight.err as err from sqlight.platforms.db import DB from sqlight.row import Row def exce_converter(func): @wraps(func) def wrapper(*args, **kwargs): try: r = func(*args, **kwargs) ...
33.014634
79
0.573729
4729ba8b4eac432e5235815510f5d8cac550335f
1,508
py
Python
fedjax/models/toy_regression.py
dedsec-9/fedjax
1f577ab4d9aa494d2a73ed541efbb92eab350551
[ "Apache-2.0" ]
143
2020-12-24T03:30:02.000Z
2022-03-29T04:07:18.000Z
fedjax/models/toy_regression.py
dedsec-9/fedjax
1f577ab4d9aa494d2a73ed541efbb92eab350551
[ "Apache-2.0" ]
14
2021-01-08T21:29:17.000Z
2022-03-07T23:17:23.000Z
fedjax/models/toy_regression.py
dedsec-9/fedjax
1f577ab4d9aa494d2a73ed541efbb92eab350551
[ "Apache-2.0" ]
24
2021-01-09T04:39:26.000Z
2022-03-29T04:07:11.000Z
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
30.77551
79
0.736074
d469a47348842baef972ab218673e48597b94635
470
py
Python
ch8_2_pets.py
codeplinth/python_crash_course
865f326936dcfab12e77747be73bfcc632d4bde3
[ "MIT" ]
null
null
null
ch8_2_pets.py
codeplinth/python_crash_course
865f326936dcfab12e77747be73bfcc632d4bde3
[ "MIT" ]
null
null
null
ch8_2_pets.py
codeplinth/python_crash_course
865f326936dcfab12e77747be73bfcc632d4bde3
[ "MIT" ]
null
null
null
#function with default parameter def describe_pet(pet_name,animal_type='dog'): """Displays information about a pet.""" print(f"I have a {animal_type}") print(f"My {animal_type}'s name is {pet_name.title()}") #a dog named willie describe_pet('willie') #a hamster named harry describe_pet('harry','hamster')...
31.333333
72
0.746809
da4f1c8edc5a5f20041dcc6035bc9bc80a5e2fad
18,672
py
Python
env/lib/python3.4/site-packages/psycopg2/tests/test_types_basic.py
marto-k/pettify-1
6d6ab498b2b53559419fc8b523150ce60d40b081
[ "MIT" ]
12
2020-05-24T02:09:17.000Z
2022-03-18T08:53:17.000Z
env/lib/python3.4/site-packages/psycopg2/tests/test_types_basic.py
marto-k/pettify-1
6d6ab498b2b53559419fc8b523150ce60d40b081
[ "MIT" ]
3
2020-07-18T16:32:58.000Z
2021-07-13T19:15:25.000Z
env/lib/python3.4/site-packages/psycopg2/tests/test_types_basic.py
marto-k/pettify-1
6d6ab498b2b53559419fc8b523150ce60d40b081
[ "MIT" ]
9
2020-03-17T09:53:22.000Z
2022-03-18T08:53:26.000Z
#!/usr/bin/env python # # types_basic.py - tests for basic types conversions # # Copyright (C) 2004-2010 Federico Di Gregorio <fog@debian.org> # # psycopg2 is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published # by the Free Software Foundatio...
37.121272
95
0.574175
0badfdbc0395ff4ff27ac12457ae28ca7d8ba0dd
32,545
py
Python
telle/views.py
DerTarchin/TellE-desktop
c9ba9cab6e7f0904cb173f937112e0c5a8405c17
[ "MIT" ]
null
null
null
telle/views.py
DerTarchin/TellE-desktop
c9ba9cab6e7f0904cb173f937112e0c5a8405c17
[ "MIT" ]
null
null
null
telle/views.py
DerTarchin/TellE-desktop
c9ba9cab6e7f0904cb173f937112e0c5a8405c17
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect, get_object_or_404 from django.core.urlresolvers import reverse from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.contrib.auth.models import User from django.contrib.auth import login as aut...
37.451093
174
0.597757
cc7cb63783abf2b8f3c234734e579cc961203533
5,623
py
Python
BWINFSchwimmbad.py
michelhenning/Schwimmbad
2fb1125e44e3afc25d65725a1f965f1a4b4b93f7
[ "MIT" ]
null
null
null
BWINFSchwimmbad.py
michelhenning/Schwimmbad
2fb1125e44e3afc25d65725a1f965f1a4b4b93f7
[ "MIT" ]
1
2017-11-28T08:19:38.000Z
2017-11-28T08:19:38.000Z
BWINFSchwimmbad.py
michelhenning/Schwimmbad
2fb1125e44e3afc25d65725a1f965f1a4b4b93f7
[ "MIT" ]
null
null
null
def familienkarte1(daten): anzahlJugendliche=int(daten[0])-2 anzahlErwachsene=int(daten[1])-2 preis=int(daten[2])+8 anzahlFamilienkarten=int(daten[3])+1 return [anzahlJugendliche,anzahlErwachsene,preis,anzahlFamilienkarten,daten[4]] def familienkarte2(daten): anzahlJugendliche=int(daten...
35.36478
185
0.571225
03f6190ebd08c767619ef30bb5af9392be7aecce
245
py
Python
employees/views.py
sear-azazel/bot
c536f5bcc22196938634cb9bb8827394b61222b1
[ "MIT" ]
null
null
null
employees/views.py
sear-azazel/bot
c536f5bcc22196938634cb9bb8827394b61222b1
[ "MIT" ]
null
null
null
employees/views.py
sear-azazel/bot
c536f5bcc22196938634cb9bb8827394b61222b1
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.views.generic import ListView from .models import Employee class EmployeeListView(ListView): model = Employee # context_object_name = 'employees' template_name = 'employee_list.html'
24.5
41
0.779592