hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
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
245
max_issues_repo_name
stringlengths
6
130
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
245
max_forks_repo_name
stringlengths
6
130
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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c44e5497fb4e61b1aa4587e81545dabe660d10a
150
py
Python
sdk/python/feast/pyspark/launchers/standalone/__init__.py
rafalzydowicz/feast
0d5cb8df2b2bd45b6631351c5ec8ba96bfd4d709
[ "Apache-2.0" ]
null
null
null
sdk/python/feast/pyspark/launchers/standalone/__init__.py
rafalzydowicz/feast
0d5cb8df2b2bd45b6631351c5ec8ba96bfd4d709
[ "Apache-2.0" ]
null
null
null
sdk/python/feast/pyspark/launchers/standalone/__init__.py
rafalzydowicz/feast
0d5cb8df2b2bd45b6631351c5ec8ba96bfd4d709
[ "Apache-2.0" ]
null
null
null
from .local import StandaloneClusterLauncher, StandaloneClusterRetrievalJob __all__ = ["StandaloneClusterRetrievalJob", "StandaloneClusterLauncher"]
37.5
75
0.866667
from .local import StandaloneClusterLauncher, StandaloneClusterRetrievalJob __all__ = ["StandaloneClusterRetrievalJob", "StandaloneClusterLauncher"]
true
true
1c44e57f91d648a32e072962c884f38cb5c387d3
1,742
py
Python
aliyun-python-sdk-retailcloud/aliyunsdkretailcloud/request/v20180313/BatchAddServersRequest.py
jia-jerry/aliyun-openapi-python-sdk
e90f3683a250cfec5b681b5f1d73a68f0dc9970d
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-retailcloud/aliyunsdkretailcloud/request/v20180313/BatchAddServersRequest.py
jia-jerry/aliyun-openapi-python-sdk
e90f3683a250cfec5b681b5f1d73a68f0dc9970d
[ "Apache-2.0" ]
1
2020-05-31T14:51:47.000Z
2020-05-31T14:51:47.000Z
aliyun-python-sdk-retailcloud/aliyunsdkretailcloud/request/v20180313/BatchAddServersRequest.py
jia-jerry/aliyun-openapi-python-sdk
e90f3683a250cfec5b681b5f1d73a68f0dc9970d
[ "Apache-2.0" ]
null
null
null
# 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...
34.84
90
0.760046
from aliyunsdkcore.request import RpcRequest from aliyunsdkretailcloud.endpoint import endpoint_data class BatchAddServersRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'retailcloud', '2018-03-13', 'BatchAddServers','retailcloud') self.set_method('POST') if hasattr(self, "endpoint_map"): ...
true
true
1c44e59d37dfc9d219bf668ad78d0ddb164f0805
5,556
py
Python
yfinance/ticker.py
x1011x/yfinance
87a6dc2e9be7b013a11f956eb4593a5595798e2e
[ "Apache-2.0" ]
null
null
null
yfinance/ticker.py
x1011x/yfinance
87a6dc2e9be7b013a11f956eb4593a5595798e2e
[ "Apache-2.0" ]
null
null
null
yfinance/ticker.py
x1011x/yfinance
87a6dc2e9be7b013a11f956eb4593a5595798e2e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Yahoo! Finance market data downloader (+fix for Pandas Datareader) # https://github.com/ranaroussi/yfinance # # Copyright 2017-2019 Ran Aroussi # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
27.641791
74
0.608531
from __future__ import print_function import datetime as _datetime import requests as _requests import pandas as _pd from collections import namedtuple as _namedtuple from .base import TickerBase class Ticker(TickerBase): def __repr__(self): return 'yfinance.Ticker object <%s>' % self.ticker def...
true
true
1c44e70e26e2aae7a184066da9cd3e62efc063db
102
py
Python
src/question_analysis/__init__.py
collab-uniba/qavmentor-service
f3c6f8a02bca3eeb0521ca3ac3b6e97542754c2a
[ "MIT" ]
1
2018-07-23T14:42:22.000Z
2018-07-23T14:42:22.000Z
src/question_analysis/__init__.py
collab-uniba/qavmentor-service
f3c6f8a02bca3eeb0521ca3ac3b6e97542754c2a
[ "MIT" ]
56
2018-05-24T09:40:03.000Z
2022-02-11T03:40:09.000Z
src/question_analysis/__init__.py
collab-uniba/qavmentor
669025a40dd04cd8c9cbd264587918025ef39d20
[ "MIT" ]
1
2018-05-20T09:30:48.000Z
2018-05-20T09:30:48.000Z
from question_analysis.feature_analysis import FeatureAnalysis from question_analysis.post import Post
51
62
0.911765
from question_analysis.feature_analysis import FeatureAnalysis from question_analysis.post import Post
true
true
1c44e7acfddcff965ad8a65694d273cf32dc1d48
513
py
Python
Graphs/Line Graph.py
TausifAnsari/PyHub
f6c949dc6a3974f57d7d146708443d0ceeb4418f
[ "MIT" ]
1
2020-09-30T19:31:20.000Z
2020-09-30T19:31:20.000Z
Graphs/Line Graph.py
TanviSutar/PyHub
6281e9f515674fb51f0d0862c26ec18020fa7d83
[ "MIT" ]
null
null
null
Graphs/Line Graph.py
TanviSutar/PyHub
6281e9f515674fb51f0d0862c26ec18020fa7d83
[ "MIT" ]
null
null
null
# pip install matplotlib import matplotlib.pyplot as graph months = ["Jan","Feb","Mar","Apr","May","Jun","Jul"] scores = [100,130,125,90,20,50,70] graph.plot(months,scores,color=(0/255,0/255,255/255),marker = "+",markersize = 10,markeredgewidth = 2, linewidth = 2,linestyle = "dotted", markeredgecolor = (255/255,0,0))...
39.461538
102
0.707602
import matplotlib.pyplot as graph months = ["Jan","Feb","Mar","Apr","May","Jun","Jul"] scores = [100,130,125,90,20,50,70] graph.plot(months,scores,color=(0/255,0/255,255/255),marker = "+",markersize = 10,markeredgewidth = 2, linewidth = 2,linestyle = "dotted", markeredgecolor = (255/255,0,0)) graph.title("Monthly An...
true
true
1c44e8a498108faa483b7bb06f12f9ac647c973f
6,436
py
Python
ietf/utils/text.py
unofficial-mirror/ietfdb
ce54adb30dc7299c6eb4d42b9aa9d2c2929c1a81
[ "BSD-3-Clause" ]
null
null
null
ietf/utils/text.py
unofficial-mirror/ietfdb
ce54adb30dc7299c6eb4d42b9aa9d2c2929c1a81
[ "BSD-3-Clause" ]
null
null
null
ietf/utils/text.py
unofficial-mirror/ietfdb
ce54adb30dc7299c6eb4d42b9aa9d2c2929c1a81
[ "BSD-3-Clause" ]
null
null
null
# Copyright The IETF Trust 2016-2019, All Rights Reserved # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import re import six import textwrap import unicodedata from django.utils.functional import keep_lazy from django.utils.safestring import mark_safe import debug...
32.670051
101
0.588254
from __future__ import absolute_import, print_function, unicode_literals import re import six import textwrap import unicodedata from django.utils.functional import keep_lazy from django.utils.safestring import mark_safe import debug from .texescape import init as texescape_init, tex_es...
true
true
1c44e8a6132356e9861a86f661b14f607195ba2c
54,029
py
Python
src/sage/calculus/desolvers.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
5
2015-01-04T07:15:06.000Z
2022-03-04T15:15:18.000Z
src/sage/calculus/desolvers.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
null
null
null
src/sage/calculus/desolvers.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
10
2016-09-28T13:12:40.000Z
2022-02-12T09:28:34.000Z
r""" Solving ordinary differential equations This file contains functions useful for solving differential equations which occur commonly in a 1st semester differential equations course. For another numerical solver see :meth:`ode_solver` function and optional package Octave. Commands: - ``desolve`` - Computes the "g...
34.65619
188
0.543986
from sage.interfaces.maxima import Maxima from sage.plot.all import line from sage.symbolic.expression import is_SymbolicEquation from sage.symbolic.ring import is_SymbolicVariable from sage.calculus.functional import diff from sage.misc.decorators import rename_keyword maxima = Maxima() def desolve(de, dvar, ics=N...
true
true
1c44e91630531b387cea6e23a3a75d9cc1102f8c
1,137
py
Python
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iotlink/models/GprsStatusResp.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
14
2018-04-19T09:53:56.000Z
2022-01-27T06:05:48.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iotlink/models/GprsStatusResp.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
15
2018-09-11T05:39:54.000Z
2021-07-02T12:38:02.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/iotlink/models/GprsStatusResp.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
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 ...
33.441176
80
0.702726
class GprsStatusResp(object): def __init__(self, iccid=None, msisdn=None, imsi=None, onlinestatus=None): self.iccid = iccid self.msisdn = msisdn self.imsi = imsi self.onlinestatus = onlinestatus
true
true
1c44e9532c723c2f96f75d1ac6d79c88a9c36f09
12,528
py
Python
datasets.py
hubertjb/dynamic-spatial-filtering
4580d60c06cd926b34470b8d05d4d72f8e2fd58c
[ "BSD-3-Clause" ]
16
2021-05-28T07:27:57.000Z
2022-03-07T09:00:50.000Z
datasets.py
hubertjb/dynamic-spatial-filtering
4580d60c06cd926b34470b8d05d4d72f8e2fd58c
[ "BSD-3-Clause" ]
null
null
null
datasets.py
hubertjb/dynamic-spatial-filtering
4580d60c06cd926b34470b8d05d4d72f8e2fd58c
[ "BSD-3-Clause" ]
4
2021-07-16T15:53:29.000Z
2022-03-05T14:30:14.000Z
"""Dataset-related functions and classes. Inspired by `mne.datasets.sleep_physionet`. """ import os import os.path as op import mne import wfdb import numpy as np import pandas as pd from mne.datasets.utils import _get_path from mne.datasets.sleep_physionet._utils import _fetch_one from braindecode.datasets import B...
40.282958
79
0.632024
import os import os.path as op import mne import wfdb import numpy as np import pandas as pd from mne.datasets.utils import _get_path from mne.datasets.sleep_physionet._utils import _fetch_one from braindecode.datasets import BaseDataset, BaseConcatDataset from braindecode.datautil.preprocess import _preprocess from ...
true
true
1c44e957950c99df2052672e9ed2657f2a10cc68
1,411
py
Python
SoundSourceLocalization/SSL_Settings.py
zhaocy14/SmartWalker
b025a7b4a2b305838a22fe4e6116ddb951c4d7bf
[ "MIT" ]
2
2021-11-13T14:16:06.000Z
2022-01-12T06:07:32.000Z
SoundSourceLocalization/SSL_Settings.py
zhaocy14/SmartWalker
b025a7b4a2b305838a22fe4e6116ddb951c4d7bf
[ "MIT" ]
null
null
null
SoundSourceLocalization/SSL_Settings.py
zhaocy14/SmartWalker
b025a7b4a2b305838a22fe4e6116ddb951c4d7bf
[ "MIT" ]
3
2021-08-30T04:40:39.000Z
2022-01-09T11:34:04.000Z
import os, sys import pyaudio # sample audio RECORD_DEVICE_NAME = "USB Camera-B4.09.24.1" SAMPLE_RATE = 16000 CHANNELS = 4 RECORD_WIDTH = 2 CHUNK = 1024 CHUNK_SIZE = 16 # 1ms的采样点数,此参数可以使得语音队列中每一个值对应1ms的音频 AUDIO_COMMUNICATION_TOPIC = 'audio' # KeyWord Spotting MAX_COMMAND_SECONDS = 3 CLIP_MS = 1000 KWS_WINDOW_STRIDE_...
26.622642
80
0.787385
import os, sys import pyaudio RECORD_DEVICE_NAME = "USB Camera-B4.09.24.1" SAMPLE_RATE = 16000 CHANNELS = 4 RECORD_WIDTH = 2 CHUNK = 1024 CHUNK_SIZE = 16 AUDIO_COMMUNICATION_TOPIC = 'audio' MAX_COMMAND_SECONDS = 3 CLIP_MS = 1000 KWS_WINDOW_STRIDE_MS = 200 KWS_COMMUNICATION_TOPIC = 'keyword' WORD_QUEUE_CLEAR_COMMUNIC...
true
true
1c44ea76e3eb171a9eabbd38585f4423f5c5f1e6
642
py
Python
tests/display/test_window.py
cmarshall108/panda3d-python3
8bea2c0c120b03ec1c9fd179701fdeb7510bb97b
[ "PHP-3.0", "PHP-3.01" ]
null
null
null
tests/display/test_window.py
cmarshall108/panda3d-python3
8bea2c0c120b03ec1c9fd179701fdeb7510bb97b
[ "PHP-3.0", "PHP-3.01" ]
null
null
null
tests/display/test_window.py
cmarshall108/panda3d-python3
8bea2c0c120b03ec1c9fd179701fdeb7510bb97b
[ "PHP-3.0", "PHP-3.01" ]
null
null
null
def test_window_basic(window): from panda3d.core import WindowProperties assert window is not None current_props = window.get_properties() default_props = WindowProperties.get_default() # Opening the window changes these from the defaults. Note that we have # no guarantee that it opens in the...
37.764706
78
0.766355
def test_window_basic(window): from panda3d.core import WindowProperties assert window is not None current_props = window.get_properties() default_props = WindowProperties.get_default() default_props.set_size(current_props.get_size()) default_props.set_origin(current_props.get_origin()...
true
true
1c44eae3c5cfc0326c5ec644aa8f726f42ae47f1
326
py
Python
contest/abc069/C.py
mola1129/atcoder
1d3b18cb92d0ba18c41172f49bfcd0dd8d29f9db
[ "MIT" ]
null
null
null
contest/abc069/C.py
mola1129/atcoder
1d3b18cb92d0ba18c41172f49bfcd0dd8d29f9db
[ "MIT" ]
null
null
null
contest/abc069/C.py
mola1129/atcoder
1d3b18cb92d0ba18c41172f49bfcd0dd8d29f9db
[ "MIT" ]
null
null
null
n = int(input()) a = list(map(int, input().split())) cnt_odd = 0 cnt_4 = 0 for i in range(n): if a[i] % 2 == 1: cnt_odd += 1 elif a[i] % 4 == 0: cnt_4 += 1 if len(a) % 2 == 1 and (cnt_odd - 1) <= cnt_4: print('Yes') elif len(a) % 2 == 0 and cnt_odd <= cnt_4: print('Yes') else: print(...
20.375
46
0.490798
n = int(input()) a = list(map(int, input().split())) cnt_odd = 0 cnt_4 = 0 for i in range(n): if a[i] % 2 == 1: cnt_odd += 1 elif a[i] % 4 == 0: cnt_4 += 1 if len(a) % 2 == 1 and (cnt_odd - 1) <= cnt_4: print('Yes') elif len(a) % 2 == 0 and cnt_odd <= cnt_4: print('Yes') else: print(...
true
true
1c44eaef4f320ce8ec78f27d1e567fc01a6906ee
1,279
py
Python
app/app.py
tahosa/discord-util-bot
2f261c5ae06da8a62e72502b53341720437860f5
[ "MIT" ]
null
null
null
app/app.py
tahosa/discord-util-bot
2f261c5ae06da8a62e72502b53341720437860f5
[ "MIT" ]
null
null
null
app/app.py
tahosa/discord-util-bot
2f261c5ae06da8a62e72502b53341720437860f5
[ "MIT" ]
1
2022-02-09T04:16:54.000Z
2022-02-09T04:16:54.000Z
import os import logging import config import discord from discord.ext.commands import Bot import nest_asyncio import tasks nest_asyncio.apply() _LOG = logging.getLogger('discord-util') _HANDLER = logging.StreamHandler() _HANDLER.addFilter(logging.Filter(name = 'discord-util')) _HANDLER.setFormatter(logging.Formatt...
23.254545
113
0.690383
import os import logging import config import discord from discord.ext.commands import Bot import nest_asyncio import tasks nest_asyncio.apply() _LOG = logging.getLogger('discord-util') _HANDLER = logging.StreamHandler() _HANDLER.addFilter(logging.Filter(name = 'discord-util')) _HANDLER.setFormatter(logging.Formatt...
true
true
1c44ecf70040a369583ea80ca86ad4befece86ed
5,167
py
Python
flexget/plugins/sites/cpasbien.py
tarzasai/Flexget
e5822874b2ee088b508390ff02c4eda9785596bc
[ "MIT" ]
1
2018-05-02T21:14:50.000Z
2018-05-02T21:14:50.000Z
flexget/plugins/sites/cpasbien.py
tarzasai/Flexget
e5822874b2ee088b508390ff02c4eda9785596bc
[ "MIT" ]
null
null
null
flexget/plugins/sites/cpasbien.py
tarzasai/Flexget
e5822874b2ee088b508390ff02c4eda9785596bc
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin from future.moves.urllib.parse import quote_plus import logging import re from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexge...
38.274074
118
0.494484
from __future__ import unicode_literals, division, absolute_import from builtins import * from future.moves.urllib.parse import quote_plus import logging import re from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.utils import requests from flexget.utils.soup imp...
true
true
1c44ed932e4df18c56a889f9357a0bf15de24d8a
13
py
Python
first.py
mohammad716e/python_training
0654623c603c775ed2cbdc3919dc815891c8fdeb
[ "MIT" ]
null
null
null
first.py
mohammad716e/python_training
0654623c603c775ed2cbdc3919dc815891c8fdeb
[ "MIT" ]
null
null
null
first.py
mohammad716e/python_training
0654623c603c775ed2cbdc3919dc815891c8fdeb
[ "MIT" ]
null
null
null
print ( 'hi')
13
13
0.538462
print ( 'hi')
true
true
1c44edc5b8d1e8fbfa19019187f9a6854e4f69e8
918
py
Python
examples/ether_transfer.py
meetmangukiya/ethereum_kms_signer
bc54aa5e4dfc2406417ed1cce15f52fcc5f97043
[ "MIT" ]
6
2021-09-29T15:07:44.000Z
2022-03-31T22:15:13.000Z
examples/ether_transfer.py
meetmangukiya/ethereum_kms_signer
bc54aa5e4dfc2406417ed1cce15f52fcc5f97043
[ "MIT" ]
2
2021-10-30T07:16:02.000Z
2021-10-30T08:04:51.000Z
examples/ether_transfer.py
meetmangukiya/ethereum_kms_signer
bc54aa5e4dfc2406417ed1cce15f52fcc5f97043
[ "MIT" ]
1
2022-01-25T18:30:17.000Z
2022-01-25T18:30:17.000Z
import fire from web3 import Web3 from ethereum_kms_signer.kms import get_eth_address, sign_transaction def ether_transfer( web3_provider: str, key_id: str, to_address: str, amount: float ) -> None: web3 = Web3(Web3.HTTPProvider(web3_provider)) self_address = web3.toChecksumAddress(get_eth_address(key_id...
26.228571
74
0.685185
import fire from web3 import Web3 from ethereum_kms_signer.kms import get_eth_address, sign_transaction def ether_transfer( web3_provider: str, key_id: str, to_address: str, amount: float ) -> None: web3 = Web3(Web3.HTTPProvider(web3_provider)) self_address = web3.toChecksumAddress(get_eth_address(key_id...
true
true
1c44ee058389f3af01626c5e07bcecdf56660a91
26,104
py
Python
uniter_model/train_vcr.py
intersun/LightningDOT
5f2880f69ba87b8701ab89348d70ebb11432578c
[ "MIT" ]
64
2021-03-17T02:01:34.000Z
2021-12-31T08:05:57.000Z
uniter_model/train_vcr.py
intersun/LightningDOT
5f2880f69ba87b8701ab89348d70ebb11432578c
[ "MIT" ]
9
2021-04-16T07:58:33.000Z
2021-11-09T11:09:58.000Z
uniter_model/train_vcr.py
intersun/LightningDOT
5f2880f69ba87b8701ab89348d70ebb11432578c
[ "MIT" ]
5
2021-03-18T01:21:44.000Z
2022-01-20T13:23:39.000Z
# coding=utf-8 # copied from hugginface github # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. # team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with t...
43.147107
79
0.572403
import argparse import json import os from os.path import exists, join import random from time import time import torch from torch.nn import functional as F from torch.nn.utils import clip_grad_norm_ from torch.optim import Adam, Adamax from torch.utils.data import DataLoader, ConcatDataset from apex import amp from ...
true
true
1c44ee480649d17d538021caa9f3ca7f0b5ab20e
13,669
py
Python
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/hr/models/hr.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
1
2019-12-19T01:53:13.000Z
2019-12-19T01:53:13.000Z
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/hr/models/hr.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
null
null
null
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/hr/models/hr.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from odoo import api, fields, models from odoo import tools, _ from odoo.exceptions import ValidationError from odoo.modules.module import get_module_resource _logger = logging.getLogger(__name__) cla...
44.093548
196
0.665301
import logging from odoo import api, fields, models from odoo import tools, _ from odoo.exceptions import ValidationError from odoo.modules.module import get_module_resource _logger = logging.getLogger(__name__) class EmployeeCategory(models.Model): _name = "hr.employee.category" _description = "Employee...
true
true
1c44ee6380ee5448632893ca93070185326ad09f
11,616
py
Python
ApplicationPerformance/automationinterface/autoInterface.py
hsy5332/Blog
3c17e097b31dcddfc41896149cc14b69fea1ae14
[ "Apache-2.0" ]
null
null
null
ApplicationPerformance/automationinterface/autoInterface.py
hsy5332/Blog
3c17e097b31dcddfc41896149cc14b69fea1ae14
[ "Apache-2.0" ]
null
null
null
ApplicationPerformance/automationinterface/autoInterface.py
hsy5332/Blog
3c17e097b31dcddfc41896149cc14b69fea1ae14
[ "Apache-2.0" ]
null
null
null
import xlrd import requests import json import openpyxl import time import ApplicationPerformance.applicationperformance.launchTime as launchTime from openpyxl.styles import Font, colors, Alignment, borders # 读取Excel测试用例,并请求接口 def readExcel(): # 创建Excel createdcase = openpyxl.Workbook() sheetform = creat...
61.136842
291
0.546229
import xlrd import requests import json import openpyxl import time import ApplicationPerformance.applicationperformance.launchTime as launchTime from openpyxl.styles import Font, colors, Alignment, borders def readExcel(): createdcase = openpyxl.Workbook() sheetform = createdcase.active sheetformOn...
true
true
1c44eec40a52889d5fb14ae7d17436eec46e63e9
2,983
py
Python
tests/unit/test_proxy.py
doytsujin/localstack
46ffd646af553f381cc567e4a7a06f604640c1c7
[ "Apache-2.0" ]
1
2022-03-17T07:22:23.000Z
2022-03-17T07:22:23.000Z
tests/unit/test_proxy.py
doytsujin/localstack
46ffd646af553f381cc567e4a7a06f604640c1c7
[ "Apache-2.0" ]
null
null
null
tests/unit/test_proxy.py
doytsujin/localstack
46ffd646af553f381cc567e4a7a06f604640c1c7
[ "Apache-2.0" ]
null
null
null
import gzip import json import logging import unittest import requests from localstack import config from localstack.constants import HEADER_ACCEPT_ENCODING, LOCALHOST_HOSTNAME from localstack.services.generic_proxy import ProxyListener, start_proxy_server from localstack.services.infra import start_proxy_for_service...
28.961165
83
0.671472
import gzip import json import logging import unittest import requests from localstack import config from localstack.constants import HEADER_ACCEPT_ENCODING, LOCALHOST_HOSTNAME from localstack.services.generic_proxy import ProxyListener, start_proxy_server from localstack.services.infra import start_proxy_for_service...
true
true
1c44eeca9e001981d13a1e1093d34646e8352fa6
6,446
py
Python
EvalScript/evalResult.py
stanleynguyen/m-hmm
5677d7d19f008a19bfa616f2095278e3eadcb85a
[ "MIT" ]
null
null
null
EvalScript/evalResult.py
stanleynguyen/m-hmm
5677d7d19f008a19bfa616f2095278e3eadcb85a
[ "MIT" ]
1
2017-12-06T13:53:10.000Z
2017-12-06T13:53:10.000Z
EvalScript/evalResult.py
stanleynguyen/m-hmm
5677d7d19f008a19bfa616f2095278e3eadcb85a
[ "MIT" ]
null
null
null
import sys import re from copy import copy from collections import defaultdict from optparse import OptionParser # Read entities from predcition def get_predicted(predicted, answers=defaultdict(lambda: defaultdict(defaultdict))): example = 0 word_index = 0 entity = [] last_ne = "O" last_sent = "...
26.746888
115
0.549643
import sys import re from copy import copy from collections import defaultdict from optparse import OptionParser def get_predicted(predicted, answers=defaultdict(lambda: defaultdict(defaultdict))): example = 0 word_index = 0 entity = [] last_ne = "O" last_sent = "" last_entity = [] answ...
true
true
1c44eed02120243fb429c3e2e94c22b73a0e766c
2,588
py
Python
tests/conftest.py
red-coracle/pyintacct
8064134d3e8cfa0e53ef4da1e9f50afb7b829ea7
[ "MIT" ]
7
2019-07-24T01:46:40.000Z
2022-03-08T17:51:39.000Z
tests/conftest.py
red-coracle/pyintacct
8064134d3e8cfa0e53ef4da1e9f50afb7b829ea7
[ "MIT" ]
1
2021-09-22T23:18:21.000Z
2021-09-22T23:18:21.000Z
tests/conftest.py
red-coracle/pyintacct
8064134d3e8cfa0e53ef4da1e9f50afb7b829ea7
[ "MIT" ]
2
2021-04-27T15:13:19.000Z
2022-03-08T18:02:37.000Z
import pytest from .config import config from decimal import Decimal from pyintacct import IntacctAPI from pyintacct.models.base import Date from pyintacct.models.company import Contact, MailAddress from pyintacct.models.purchasing import POTransaction, POTransactionItem, POTransactionItems @pytest.fixture(scope='ses...
35.452055
92
0.56762
import pytest from .config import config from decimal import Decimal from pyintacct import IntacctAPI from pyintacct.models.base import Date from pyintacct.models.company import Contact, MailAddress from pyintacct.models.purchasing import POTransaction, POTransactionItem, POTransactionItems @pytest.fixture(scope='ses...
true
true
1c44efd0b5d5abda9e33514c921d7eb78c13c4bc
859
py
Python
main.py
barrypp/ChangeImgTime
baa56095e7f00651e4ae507892b9594ed0fa5817
[ "MIT" ]
null
null
null
main.py
barrypp/ChangeImgTime
baa56095e7f00651e4ae507892b9594ed0fa5817
[ "MIT" ]
null
null
null
main.py
barrypp/ChangeImgTime
baa56095e7f00651e4ae507892b9594ed0fa5817
[ "MIT" ]
null
null
null
import os import re import time from datetime import datetime, timedelta from pathlib import Path import piexif info = re.compile(r'\(v([0-9]+)\) - p([0-9]+)') #info = re.compile(r' - c([0-9]+).+ - p([0-9]+)') p = Path('data3') count = 0 for x in p.rglob('*.*'): # i = info.search(x.name) ...
27.709677
94
0.561118
import os import re import time from datetime import datetime, timedelta from pathlib import Path import piexif info = re.compile(r'\(v([0-9]+)\) - p([0-9]+)') p = Path('data3') count = 0 for x in p.rglob('*.*'): i = info.search(x.name) hour = int(i.group(1)) num = int(i.group(2)) ...
true
true
1c44f0e1ee44d25710b20fb98f024b9b4d0e5068
15,168
py
Python
tools/accuracy_checker/openvino/tools/accuracy_checker/evaluators/custom_evaluators/custom_text_recognition_evaluator.py
Ohtani-y/open_model_zoo
280b59fc6c00455889a1949c795558252fdad96f
[ "Apache-2.0" ]
2
2019-08-20T15:30:19.000Z
2020-09-01T15:16:33.000Z
tools/accuracy_checker/openvino/tools/accuracy_checker/evaluators/custom_evaluators/custom_text_recognition_evaluator.py
Ohtani-y/open_model_zoo
280b59fc6c00455889a1949c795558252fdad96f
[ "Apache-2.0" ]
null
null
null
tools/accuracy_checker/openvino/tools/accuracy_checker/evaluators/custom_evaluators/custom_text_recognition_evaluator.py
Ohtani-y/open_model_zoo
280b59fc6c00455889a1949c795558252fdad96f
[ "Apache-2.0" ]
2
2021-06-25T06:18:58.000Z
2021-08-04T10:05:32.000Z
""" Copyright (c) 2018-2021 Intel Corporation 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 wri...
48
118
0.642471
from functools import partial import numpy as np from .base_custom_evaluator import BaseCustomEvaluator from .base_models import BaseDLSDKModel, BaseOpenVINOModel, BaseCascadeModel, create_model from ...config import ConfigError from ...utils import contains_all, extract_image_representations, generate_layer_name fro...
true
true
1c44f0fd84aad62f085f8065aec4b09e83ec9f76
20,360
py
Python
QGrain/algorithms.py
erslog/QGrain
9644415c73a929bbdd30d7eb4c3fa861401a5ea4
[ "MIT" ]
1
2020-12-20T13:24:44.000Z
2020-12-20T13:24:44.000Z
QGrain/algorithms.py
erslog/QGrain
9644415c73a929bbdd30d7eb4c3fa861401a5ea4
[ "MIT" ]
null
null
null
QGrain/algorithms.py
erslog/QGrain
9644415c73a929bbdd30d7eb4c3fa861401a5ea4
[ "MIT" ]
null
null
null
import weakref from enum import Enum, unique from threading import Lock from typing import Callable, Dict, Iterable, List, Tuple import numpy as np from scipy.special import gamma INFINITESIMAL = 1e-100 FRACTION_PARAM_NAME = "f" NAME_KEY = "Name" BOUNDS_KEY = "Bounds" DEFAULT_VALUE_KEY = "Default" LOCATION_KEY = "Loc...
39.078695
184
0.677701
import weakref from enum import Enum, unique from threading import Lock from typing import Callable, Dict, Iterable, List, Tuple import numpy as np from scipy.special import gamma INFINITESIMAL = 1e-100 FRACTION_PARAM_NAME = "f" NAME_KEY = "Name" BOUNDS_KEY = "Bounds" DEFAULT_VALUE_KEY = "Default" LOCATION_KEY = "Loc...
true
true
1c44f126bc35348c8eda7a554188d06765c226be
20,944
py
Python
electrum_ltc/gui/kivy/uix/screens.py
LedgerHQ/electrum-ltc
8307e3978b12ae27fc3f750f47cda7f18d5fafe5
[ "MIT" ]
null
null
null
electrum_ltc/gui/kivy/uix/screens.py
LedgerHQ/electrum-ltc
8307e3978b12ae27fc3f750f47cda7f18d5fafe5
[ "MIT" ]
1
2022-03-06T09:22:26.000Z
2022-03-06T09:22:26.000Z
electrum_ltc/gui/kivy/uix/screens.py
isabella232/electrum-ltc
8307e3978b12ae27fc3f750f47cda7f18d5fafe5
[ "MIT" ]
1
2022-03-06T09:16:48.000Z
2022-03-06T09:16:48.000Z
import asyncio from weakref import ref from decimal import Decimal import re import threading import traceback, sys from typing import TYPE_CHECKING, List, Optional, Dict, Any from kivy.app import App from kivy.cache import Cache from kivy.clock import Clock from kivy.compat import string_types from kivy.properties im...
35.259259
130
0.605758
import asyncio from weakref import ref from decimal import Decimal import re import threading import traceback, sys from typing import TYPE_CHECKING, List, Optional, Dict, Any from kivy.app import App from kivy.cache import Cache from kivy.clock import Clock from kivy.compat import string_types from kivy.properties im...
true
true
1c44f21e21408f835a37bf18651cf2816383efc0
27,534
py
Python
torchreid/models/osnet_ain.py
kirillProkofiev/deep-object-reid
2abc96ec49bc0005ed556e203925354fdf12165c
[ "MIT" ]
null
null
null
torchreid/models/osnet_ain.py
kirillProkofiev/deep-object-reid
2abc96ec49bc0005ed556e203925354fdf12165c
[ "MIT" ]
null
null
null
torchreid/models/osnet_ain.py
kirillProkofiev/deep-object-reid
2abc96ec49bc0005ed556e203925354fdf12165c
[ "MIT" ]
null
null
null
from __future__ import division, absolute_import import warnings from collections import OrderedDict import torch import torch.nn as nn import torch.nn.functional as F from torchreid.losses import AngleSimpleLinear from torchreid.ops import Dropout, HSwish, GumbelSigmoid, LocalContrastNormalization __all__ = ['osn...
32.392941
111
0.594138
from __future__ import division, absolute_import import warnings from collections import OrderedDict import torch import torch.nn as nn import torch.nn.functional as F from torchreid.losses import AngleSimpleLinear from torchreid.ops import Dropout, HSwish, GumbelSigmoid, LocalContrastNormalization __all__ = ['osn...
true
true
1c44f2346c4dcf0a488a33568bec5852405a2972
754
py
Python
athp_stock/__manifest__.py
QuanTranDoanAnh/odoo-athp-addons
8a6ce58378b37e96d022ded8d912bb8b88e55b4c
[ "MIT" ]
null
null
null
athp_stock/__manifest__.py
QuanTranDoanAnh/odoo-athp-addons
8a6ce58378b37e96d022ded8d912bb8b88e55b4c
[ "MIT" ]
null
null
null
athp_stock/__manifest__.py
QuanTranDoanAnh/odoo-athp-addons
8a6ce58378b37e96d022ded8d912bb8b88e55b4c
[ "MIT" ]
null
null
null
{ 'name': "An Toan Hoa Phat Stock Management App", 'summary': "Stock Management App customized for An Toan Hoa Phat", 'description': """ Stock Management App customized for An Toan Hoa Phat """, 'author': 'Business Link Development Technologies Co., Ltd.', 'website': 'http://www.bld.c...
31.416667
71
0.572944
{ 'name': "An Toan Hoa Phat Stock Management App", 'summary': "Stock Management App customized for An Toan Hoa Phat", 'description': """ Stock Management App customized for An Toan Hoa Phat """, 'author': 'Business Link Development Technologies Co., Ltd.', 'website': 'http://www.bld.c...
true
true
1c44f390c47285189ba516ba8ac76c57279695a4
12,651
py
Python
Google/benchmarks/gnmt/implementations/gnmt-research-TF-tpu-v4-512/utils/iterator_utils.py
goswamig/training_results_v0.7
4278ce8a0f3d4db6b5e6054277724ca36278d7a3
[ "Apache-2.0" ]
48
2020-07-29T18:09:23.000Z
2021-10-09T01:53:33.000Z
Google/benchmarks/gnmt/implementations/gnmt-research-TF-tpu-v4-512/utils/iterator_utils.py
goswamig/training_results_v0.7
4278ce8a0f3d4db6b5e6054277724ca36278d7a3
[ "Apache-2.0" ]
9
2021-04-02T02:28:07.000Z
2022-03-26T18:23:59.000Z
Google/benchmarks/gnmt/implementations/gnmt-research-TF-tpu-v4-512/utils/iterator_utils.py
lablup/training_results_v0.7
f5bb59aa0f8b18b602763abe47d1d24d0d54b197
[ "Apache-2.0" ]
42
2020-08-01T06:41:24.000Z
2022-01-20T10:33:08.000Z
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
40.548077
86
0.648012
from __future__ import print_function import tensorflow.compat.v1 as tf __all__ = ["get_iterator", "get_infer_iterator"] def get_iterator(src_dataset, tgt_dataset, src_vocab_table, tgt_vocab_table, batch_size, global_batch_size, ...
true
true
1c44f449a9db601964d2de365f272f867c90bb7d
2,790
py
Python
metsim/disaggregate.py
jhamman/MetSim
538ebb141414355a5db0eddde6c0d4bec2e56390
[ "MIT" ]
null
null
null
metsim/disaggregate.py
jhamman/MetSim
538ebb141414355a5db0eddde6c0d4bec2e56390
[ "MIT" ]
1
2019-01-17T23:12:30.000Z
2019-01-17T23:12:30.000Z
metsim/disaggregate.py
jhamman/MetSim
538ebb141414355a5db0eddde6c0d4bec2e56390
[ "MIT" ]
1
2019-03-08T15:49:18.000Z
2019-03-08T15:49:18.000Z
""" Disaggregates daily data down to hourly data using some heuristics """ import numpy as np import pandas as pd import metsim from metsim.defaults import PARAMS as params from metsim.defaults import CONSTS as consts tiny_rad_fract = np.zeros(366) #This is updated during the mtclim run def disaggregate(df_daily):...
26.320755
89
0.602151
import numpy as np import pandas as pd import metsim from metsim.defaults import PARAMS as params from metsim.defaults import CONSTS as consts tiny_rad_fract = np.zeros(366) def disaggregate(df_daily): dates_hourly = pd.date_range(metsim.start, metsim.stop, freq='H') df_hourly = pd.DataFrame(index=dates_h...
true
true
1c44f55e15605292078d004fd97a46496530c4c8
2,334
py
Python
Tools/MonoGenerator/install_name_tool.py
mortend/fuse-studio
ae299fc6bc04aa3db7b4e66034109ffe96b142b9
[ "MIT" ]
324
2018-05-14T08:17:17.000Z
2022-02-21T14:50:07.000Z
Tools/MonoGenerator/install_name_tool.py
mortend/fuse-studio
ae299fc6bc04aa3db7b4e66034109ffe96b142b9
[ "MIT" ]
27
2018-05-14T15:17:46.000Z
2021-04-20T12:01:38.000Z
Tools/MonoGenerator/install_name_tool.py
mortend/fuse-studio
ae299fc6bc04aa3db7b4e66034109ffe96b142b9
[ "MIT" ]
53
2018-05-14T07:56:17.000Z
2022-01-04T06:33:11.000Z
import subprocess import os import fnmatch from os import path import shutil def glob_recursive(path, f): for root, dirnames, filenames in os.walk(path): for filename in fnmatch.filter(filenames, f): yield root + "/" + filename def otool(s, basepath_filters): o = subprocess.Popen(['/usr/bi...
36.46875
103
0.658098
import subprocess import os import fnmatch from os import path import shutil def glob_recursive(path, f): for root, dirnames, filenames in os.walk(path): for filename in fnmatch.filter(filenames, f): yield root + "/" + filename def otool(s, basepath_filters): o = subprocess.Popen(['/usr/bi...
true
true
1c44f57d976221e4da59508cd5ba0dfcab34b1ad
1,169
py
Python
lintcode/Sort/830. String Sort.py
yanshengjia/algorithm
0608d286be9c93d51768d47f21e569c6b0be9cda
[ "MIT" ]
23
2019-08-02T12:02:47.000Z
2022-03-09T15:24:16.000Z
lintcode/Sort/830. String Sort.py
yanshengjia/algorithm
0608d286be9c93d51768d47f21e569c6b0be9cda
[ "MIT" ]
null
null
null
lintcode/Sort/830. String Sort.py
yanshengjia/algorithm
0608d286be9c93d51768d47f21e569c6b0be9cda
[ "MIT" ]
21
2019-12-22T04:47:32.000Z
2021-09-12T14:29:35.000Z
""" Given a string, sort the string with the first keyword which is the most commonly used characters and the second keyword which is the dictionary order. Example1 Input: str = "bloomberg" Output: "bbooeglmr" Explanation: 'b' and 'o' appear the most frequently, but the dictionary sequence of 'b' is the smaller than...
25.413043
151
0.538067
class Solution: def stringSort(self, str): d = dict() for c in str: d[c] = d.get(c, 0) + 1 def compare(a, b): if d[a] == d[b]: if a < b: return -1 elif a > b: return 1 ...
true
true
1c44f626da1edbfc30140cf9afcc3f8421b5b200
5,414
py
Python
tensorflow/python/data/benchmarks/from_tensor_slices_benchmark.py
anonymous-313/tensorflow
b82785818b6b020d62340eaaece32b9c75858185
[ "Apache-2.0" ]
9
2019-06-05T06:48:07.000Z
2020-09-29T07:08:02.000Z
tensorflow/python/data/benchmarks/from_tensor_slices_benchmark.py
anonymous-313/tensorflow
b82785818b6b020d62340eaaece32b9c75858185
[ "Apache-2.0" ]
2
2021-11-10T20:21:47.000Z
2022-02-10T04:12:28.000Z
tensorflow/python/data/benchmarks/from_tensor_slices_benchmark.py
anonymous-313/tensorflow
b82785818b6b020d62340eaaece32b9c75858185
[ "Apache-2.0" ]
3
2019-06-28T02:28:27.000Z
2021-07-06T08:16:19.000Z
# Copyright 2017 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...
35.618421
103
0.707056
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.python.data.benchmarks import benchmark_base from tensorflow.python.data.experimental.ops import get_single_element from tensorflow.python.data.ops import dataset_ops from te...
true
true
1c44f6f093c03a3c1325f256845fa710b31c5dd2
1,262
py
Python
2D_from_3D_nii.py
mksarker/data_preprocessing
dabdb7f3dbf1c4bf5ee49a39aef2cb258539b027
[ "MIT" ]
null
null
null
2D_from_3D_nii.py
mksarker/data_preprocessing
dabdb7f3dbf1c4bf5ee49a39aef2cb258539b027
[ "MIT" ]
null
null
null
2D_from_3D_nii.py
mksarker/data_preprocessing
dabdb7f3dbf1c4bf5ee49a39aef2cb258539b027
[ "MIT" ]
null
null
null
import cv2 import scipy.misc import SimpleITK as sitk #reading MR images import glob readfolderT = glob.glob('path/EADC_HHP/*_MNI.nii.gz') readfolderL = glob.glob('path/*_HHP_EADC.nii.gz') TrainingImagesList = [] TrainingLabelsList = [] for i in range(len(readfolderT)): y_folder = readfolderT[i] yread =...
26.291667
73
0.680666
import cv2 import scipy.misc import SimpleITK as sitk import glob readfolderT = glob.glob('path/EADC_HHP/*_MNI.nii.gz') readfolderL = glob.glob('path/*_HHP_EADC.nii.gz') TrainingImagesList = [] TrainingLabelsList = [] for i in range(len(readfolderT)): y_folder = readfolderT[i] yread = sitk.ReadImage(y_f...
true
true
1c44f89d86e4e31b4b6bb6ea684f07345c57a00b
4,184
py
Python
lexer.py
gmCrivelli/Lya-Compiler
f323b6affb39a496155169aa8ce678efb80c2f9b
[ "MIT" ]
null
null
null
lexer.py
gmCrivelli/Lya-Compiler
f323b6affb39a496155169aa8ce678efb80c2f9b
[ "MIT" ]
null
null
null
lexer.py
gmCrivelli/Lya-Compiler
f323b6affb39a496155169aa8ce678efb80c2f9b
[ "MIT" ]
null
null
null
import sys import ply.lex as lex import re class Lexer: def __init__(self): self.build() def build(self): self.lexer = lex.lex(self) def input(self, input): self.lexer.input(input) def token(self): return self.lexer.token() #guardar ultima token? # Reserved ...
21.791667
76
0.44718
import sys import ply.lex as lex import re class Lexer: def __init__(self): self.build() def build(self): self.lexer = lex.lex(self) def input(self, input): self.lexer.input(input) def token(self): return self.lexer.token() reserved = { 'arr...
true
true
1c44f91b81dc8bfac6086652fb149826007d78d1
3,229
py
Python
trac/upgrades/db18.py
rwbaumg/trac
a3b8eb6db4f4999fab421e31615bb8eb8da6fdba
[ "BSD-3-Clause" ]
null
null
null
trac/upgrades/db18.py
rwbaumg/trac
a3b8eb6db4f4999fab421e31615bb8eb8da6fdba
[ "BSD-3-Clause" ]
null
null
null
trac/upgrades/db18.py
rwbaumg/trac
a3b8eb6db4f4999fab421e31615bb8eb8da6fdba
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2019 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.com/license.html. # # This software consists ...
41.397436
93
0.612264
from trac.db import Table, Column, Index, DatabaseManager def do_upgrade(env, ver, cursor): cursor.execute("CREATE TEMPORARY TABLE session_old AS SELECT * FROM session") cursor.execute("DROP TABLE session") cursor.execute("CREATE TEMPORARY TABLE ticket_change_old AS SELECT * FROM ticket_change") curso...
true
true
1c44f9a6633a4f9e3a11d3413aa35fee4910ba64
6,115
py
Python
app/main.py
grow/buildbot
31e2bbb2cafb9b472b3c4b98b29b9595b90ba9ee
[ "MIT" ]
null
null
null
app/main.py
grow/buildbot
31e2bbb2cafb9b472b3c4b98b29b9595b90ba9ee
[ "MIT" ]
null
null
null
app/main.py
grow/buildbot
31e2bbb2cafb9b472b3c4b98b29b9595b90ba9ee
[ "MIT" ]
null
null
null
#!/usr/bin/env python from flask import request from functools import wraps from werkzeug.wsgi import DispatcherMiddleware from werkzeug.serving import run_simple import flask import os import mimetypes import urllib2 import restfulgit import repos_service import jobs_service from restfulgit import app_factory as rest...
28.70892
100
0.720196
from flask import request from functools import wraps from werkzeug.wsgi import DispatcherMiddleware from werkzeug.serving import run_simple import flask import os import mimetypes import urllib2 import restfulgit import repos_service import jobs_service from restfulgit import app_factory as restfulgit_app_factory c...
true
true
1c44fad39347b668a6b0cde118732cfb3c342041
428
py
Python
mozillians/funfacts/admin.py
LeoMcA/vouched-mozillians
e0bb3b1628eaae7474e73935f7a7604bfca14da1
[ "BSD-3-Clause" ]
null
null
null
mozillians/funfacts/admin.py
LeoMcA/vouched-mozillians
e0bb3b1628eaae7474e73935f7a7604bfca14da1
[ "BSD-3-Clause" ]
null
null
null
mozillians/funfacts/admin.py
LeoMcA/vouched-mozillians
e0bb3b1628eaae7474e73935f7a7604bfca14da1
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin from models import FunFact class FunFactAdmin(admin.ModelAdmin): readonly_fields = ['result', 'created', 'updated'] list_display = ['name', 'created', 'updated', 'result', 'is_published'] def is_published(self, obj): return obj.published is_published.boolean =...
23.777778
75
0.693925
from django.contrib import admin from models import FunFact class FunFactAdmin(admin.ModelAdmin): readonly_fields = ['result', 'created', 'updated'] list_display = ['name', 'created', 'updated', 'result', 'is_published'] def is_published(self, obj): return obj.published is_published.boolean =...
true
true
1c44faf0d31227ad4ca5dc4f15ca05e49951e313
2,311
py
Python
scripts/only_testing.py
hbery/ML_Image_Compression_Ratio_Analysis
16b21091bc4e3ced62f94f0e68ee302c1da5bf1e
[ "MIT" ]
null
null
null
scripts/only_testing.py
hbery/ML_Image_Compression_Ratio_Analysis
16b21091bc4e3ced62f94f0e68ee302c1da5bf1e
[ "MIT" ]
null
null
null
scripts/only_testing.py
hbery/ML_Image_Compression_Ratio_Analysis
16b21091bc4e3ced62f94f0e68ee302c1da5bf1e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """Script for testing model :Date: 06.2021 :Author: Adam Twardosz (a.twardosz98@gmail.com, https://github.com/hbery) """ import os, sys os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import numpy as np from keras.models import load_model, Sequentia...
25.966292
112
0.716573
import os, sys os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import numpy as np from keras.models import load_model, Sequential from keras.layers import Softmax from utils import banner def main(): if len(sys.argv) < 3: print(f"Usage: {os.path.basename(sys.argv[0])} <fold...
true
true
1c44fb63685476648bd3255a1f3890ca91c4616c
1,161
py
Python
xlsxwriter/test/comparison/test_chart_pie03.py
adgear/XlsxWriter
79bcaad28d57ac29038b1c74bccc6d611b7a385e
[ "BSD-2-Clause-FreeBSD" ]
2
2019-07-25T06:08:09.000Z
2019-11-01T02:33:56.000Z
xlsxwriter/test/comparison/test_chart_pie03.py
adgear/XlsxWriter
79bcaad28d57ac29038b1c74bccc6d611b7a385e
[ "BSD-2-Clause-FreeBSD" ]
13
2019-07-14T00:29:05.000Z
2019-11-26T06:16:46.000Z
xlsxwriter/test/comparison/test_chart_pie03.py
adgear/XlsxWriter
79bcaad28d57ac29038b1c74bccc6d611b7a385e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2019, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
23.22
79
0.552972
from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): def setUp(self): self.set_filename('chart_pie03.xlsx') def test_create_file(self): workbook = Workbook(self.got_filename) worksheet = workbook...
true
true
1c44fb8d47ce2162e5654444a77105860b099dee
140
py
Python
facts/html_helpers.py
ilivans/web-scrapers
677c8dc5cd1d1691e45d5b92a1988a23e2288d0b
[ "MIT" ]
null
null
null
facts/html_helpers.py
ilivans/web-scrapers
677c8dc5cd1d1691e45d5b92a1988a23e2288d0b
[ "MIT" ]
null
null
null
facts/html_helpers.py
ilivans/web-scrapers
677c8dc5cd1d1691e45d5b92a1988a23e2288d0b
[ "MIT" ]
null
null
null
import re _tag_re = re.compile("<.*?>") def remove_tags(raw_html): clean_text = re.sub(_tag_re, " ", raw_html) return clean_text
15.555556
47
0.657143
import re _tag_re = re.compile("<.*?>") def remove_tags(raw_html): clean_text = re.sub(_tag_re, " ", raw_html) return clean_text
true
true
1c44fc3b23f0e10433a56e60bc63fd9bd8d6414d
860
py
Python
docs/en/conf.py
alirezah52/esp-faq
070e1f96180df986a89d3313eea12822dda18d30
[ "Apache-2.0" ]
24
2020-06-23T09:05:59.000Z
2022-03-25T20:05:55.000Z
docs/en/conf.py
xuhongv/esp-faq
56e6cb20ed86a10b5ecb3d147f80177fcf016335
[ "Apache-2.0" ]
6
2020-12-07T11:52:12.000Z
2022-03-04T13:08:08.000Z
docs/en/conf.py
xuhongv/esp-faq
56e6cb20ed86a10b5ecb3d147f80177fcf016335
[ "Apache-2.0" ]
15
2020-09-21T11:34:13.000Z
2022-03-20T05:00:28.000Z
# -*- coding: utf-8 -*- # # English Language RTD & Sphinx config file # # Uses ../conf_common.py for most non-language-specific settings. # Importing conf_common adds all the non-language-specific # parts to this conf module import sys, os sys.path.insert(0, os.path.abspath('..')) from conf_common import * # General ...
29.655172
74
0.723256
import sys, os sys.path.insert(0, os.path.abspath('..')) from conf_common import * project = u'ESP-FAQ' copyright = u'2020, Espressif Systems (Shanghai) Co., Ltd.' language = 'en' latex_documents = [ ('index', 'ReadtheDocsTemplate.tex', u'ESP-FAQ', u'2020, Espressif Systems (Shanghai) Co., Ltd.', 'manual'), ]...
true
true
1c44fd2bcdb1fc734b3a5f7c936bba90459bf43a
61,989
py
Python
salt/states/pkg.py
MrMarvin/salt
34620811f935450baa5d84a5e776c8fac5ba88d4
[ "Apache-2.0" ]
null
null
null
salt/states/pkg.py
MrMarvin/salt
34620811f935450baa5d84a5e776c8fac5ba88d4
[ "Apache-2.0" ]
null
null
null
salt/states/pkg.py
MrMarvin/salt
34620811f935450baa5d84a5e776c8fac5ba88d4
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Installation of packages using OS package managers such as yum or apt-get ========================================================================= Salt can manage software packages via the pkg state module, packages can be set up to be installed, latest, removed and purged. Package managem...
36.81057
148
0.527384
from __future__ import absolute_import import logging import os import re import salt.utils from salt.output import nested from salt.utils import namespaced_function as _namespaced_function from salt.utils.odict import OrderedDict as _OrderedDict from salt.exceptions import ( CommandExecutionError, MinionError, ...
true
true
1c44fd6d83836c8a950ff68c726d4e52c4f08086
12,639
py
Python
eval/libMemo.py
PurdueDualityLab/memoized-regex-engine
e7edcb0033a1eba90589e7831733f6527d9c4909
[ "MIT" ]
5
2020-10-05T14:24:06.000Z
2021-02-27T23:01:00.000Z
eval/libMemo.py
PurdueDualityLab/memoized-regex-engine
e7edcb0033a1eba90589e7831733f6527d9c4909
[ "MIT" ]
2
2020-09-30T16:48:24.000Z
2020-09-30T16:48:52.000Z
eval/libMemo.py
PurdueDualityLab/memoized-regex-engine
e7edcb0033a1eba90589e7831733f6527d9c4909
[ "MIT" ]
1
2021-02-02T05:12:06.000Z
2021-02-02T05:12:06.000Z
"""Memoization: utils associated with memoization experiments """ # Import libLF import os import sys sys.path.append(os.path.join(os.environ['MEMOIZATION_PROJECT_ROOT'], 'eval', 'lib')) import libLF # Other imports import json import re import tempfile import pandas as pd ### # Constants ### class ProtoRegexEngine...
36.008547
203
0.664293
import os import sys sys.path.append(os.path.join(os.environ['MEMOIZATION_PROJECT_ROOT'], 'eval', 'lib')) import libLF import json import re import tempfile import pandas as pd class ProtoRegexEngine: CLI = os.path.join(os.environ['MEMOIZATION_PROJECT_ROOT'], "src-simple", "re") class SELECTION_SCHEME: ...
true
true
1c44ff9ade270ab368d3086fd8c6ded1212a389e
12,078
py
Python
Ray_ACNet.py
kiototeko/PRIMAL2
331ca7ba11d48483694594a9f2029d76238668bb
[ "MIT" ]
null
null
null
Ray_ACNet.py
kiototeko/PRIMAL2
331ca7ba11d48483694594a9f2029d76238668bb
[ "MIT" ]
null
null
null
Ray_ACNet.py
kiototeko/PRIMAL2
331ca7ba11d48483694594a9f2029d76238668bb
[ "MIT" ]
1
2020-12-10T00:01:44.000Z
2020-12-10T00:01:44.000Z
import tensorflow as tf import tensorflow.contrib.layers as layers import numpy as np # parameters for training GRAD_CLIP = 10.0 KEEP_PROB1 = 1 # was 0.5 KEEP_PROB2 = 1 # was 0.7 RNN_SIZE = 512 GOAL_REPR_SIZE = 12 # Used to initialize weights for policy and value output layers (Do we need to use that? Maybe not no...
50.962025
223
0.621792
import tensorflow as tf import tensorflow.contrib.layers as layers import numpy as np GRAD_CLIP = 10.0 KEEP_PROB1 = 1 KEEP_PROB2 = 1 RNN_SIZE = 512 GOAL_REPR_SIZE = 12 def normalized_columns_initializer(std=1.0): def _initializer(shape, dtype=None, partition_info=None): out = np.random.randn(*shape).as...
true
true
1c44fff0dab22be13688f184324423bc17c6ff1b
1,546
py
Python
sktimeline/models/user.py
aaronmauro/sktimeline
3a83b8973959c2d6bf49021cd8efb0ead81b9395
[ "MIT" ]
2
2016-06-14T17:02:42.000Z
2016-10-24T14:49:25.000Z
sktimeline/models/user.py
aaronmauro/sktimeline
3a83b8973959c2d6bf49021cd8efb0ead81b9395
[ "MIT" ]
3
2016-06-27T13:20:53.000Z
2017-03-18T14:21:27.000Z
sktimeline/models/user.py
aaronmauro/sktimeline
3a83b8973959c2d6bf49021cd8efb0ead81b9395
[ "MIT" ]
2
2016-06-14T17:03:05.000Z
2016-09-01T14:18:44.000Z
from sktimeline import db from passlib.hash import sha256_crypt class User(db.Model): __tablename__ = 'users' uid = db.Column(db.Integer, primary_key=True) #todo: maybe write migration to rename to id to be consistant username = db.Column(db.String(20), unique=True, default=None) # todo: write migrat...
37.707317
111
0.701811
from sktimeline import db from passlib.hash import sha256_crypt class User(db.Model): __tablename__ = 'users' uid = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(20), unique=True, default=None) passwords = db.Column(db.String(100), default=None) email = db.Column(db....
true
true
1c45000beb56342f4006bcd9799b6608ea26d13c
7,595
py
Python
hsi/gui/widgets/QParamRegionWidget.py
morrocoy/hsi
da6a2923dff831e927aaea04ba657ddcb1b7e4eb
[ "MIT" ]
1
2021-03-29T14:37:03.000Z
2021-03-29T14:37:03.000Z
hsi/gui/widgets/QParamRegionWidget.py
morrocoy/hsi
da6a2923dff831e927aaea04ba657ddcb1b7e4eb
[ "MIT" ]
null
null
null
hsi/gui/widgets/QParamRegionWidget.py
morrocoy/hsi
da6a2923dff831e927aaea04ba657ddcb1b7e4eb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Feb 12 10:35:08 2021 @author: kpapke """ import numpy as np from ...bindings.Qt import QtWidgets, QtGui, QtCore from ...log import logmanager logger = logmanager.getLogger(__name__) __all__ = ['QParamRegionWidget'] class QParamRegionWidget(QtWidgets.QWidget): """ Con...
31.255144
81
0.596972
import numpy as np from ...bindings.Qt import QtWidgets, QtGui, QtCore from ...log import logmanager logger = logmanager.getLogger(__name__) __all__ = ['QParamRegionWidget'] class QParamRegionWidget(QtWidgets.QWidget): sigValueChanged = QtCore.Signal(str, list) def __init__(self, *args, **kwargs): ...
true
true
1c45008460e21527f50631de2053f1a3242bd3bb
5,711
py
Python
src/main/python/ttconv/scc/codes/preambles_address_codes.py
xchange11/ttconv-1
6e67172af126fa0e90690044848f300c0173715c
[ "BSD-2-Clause" ]
66
2020-09-25T11:38:28.000Z
2022-03-23T15:15:34.000Z
src/main/python/ttconv/scc/codes/preambles_address_codes.py
xchange11/ttconv-1
6e67172af126fa0e90690044848f300c0173715c
[ "BSD-2-Clause" ]
217
2020-09-22T22:45:22.000Z
2022-03-31T23:02:15.000Z
src/main/python/ttconv/scc/codes/preambles_address_codes.py
xchange11/ttconv-1
6e67172af126fa0e90690044848f300c0173715c
[ "BSD-2-Clause" ]
5
2020-09-25T09:24:17.000Z
2021-08-08T20:52:26.000Z
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Copyright (c) 2020, Sandflow Consulting LLC # # 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, ...
34.612121
107
0.706181
from __future__ import annotations from typing import Optional from ttconv.scc.codes import SCC_COLOR_MAPPING from ttconv.style_properties import NamedColors, TextDecorationType, \ FontStyleType, ColorType _ROW_MAPPING = { (0x01, 0x40): 1, (0x01, 0x60): 2, (0x02, 0x40): 3, (0x02, 0x60): 4, (0x05, 0x40...
true
true
1c45021962b5771701ee306281be1ae1136b0046
612
py
Python
examples/download_video.py
kmpm/py-asyncio-goproapi
61e259052608657f56615e1dfd6c64e8627425dd
[ "MIT" ]
null
null
null
examples/download_video.py
kmpm/py-asyncio-goproapi
61e259052608657f56615e1dfd6c64e8627425dd
[ "MIT" ]
1
2018-11-07T09:29:31.000Z
2018-11-07T12:10:41.000Z
examples/download_video.py
kmpm/py-asyncio-goproapi
61e259052608657f56615e1dfd6c64e8627425dd
[ "MIT" ]
null
null
null
from goprocam import GoProCamera, constants import asyncio gpCam = GoProCamera.GoPro() videos_duration = [10, 30] async def run(): await gpCam.connect() await gpCam.video_settings("720p", "50") await gpCam.gpControlSet(constants.Video.PROTUNE_VIDEO, constants.Video.ProTune.ON) for i in videos_duratio...
29.142857
108
0.720588
from goprocam import GoProCamera, constants import asyncio gpCam = GoProCamera.GoPro() videos_duration = [10, 30] async def run(): await gpCam.connect() await gpCam.video_settings("720p", "50") await gpCam.gpControlSet(constants.Video.PROTUNE_VIDEO, constants.Video.ProTune.ON) for i in videos_duratio...
true
true
1c450455c52286a916d561148f32bebb4a8a514b
3,759
py
Python
revitron/transmissiondata.py
YKato521/revitron-for-RevitPythonShell
031a87997a00902bf16ca9ef6bb05f5cae26e044
[ "MIT" ]
null
null
null
revitron/transmissiondata.py
YKato521/revitron-for-RevitPythonShell
031a87997a00902bf16ca9ef6bb05f5cae26e044
[ "MIT" ]
null
null
null
revitron/transmissiondata.py
YKato521/revitron-for-RevitPythonShell
031a87997a00902bf16ca9ef6bb05f5cae26e044
[ "MIT" ]
null
null
null
""" This submodule contains the ``TransmissionData`` class which allows for editing the paths of linked files without opening a model. """ import re import shutil import os import sys class TransmissionData: """ A transmission data wrapper. """ refs = dict() def __init__(self, h...
31.066116
128
0.514499
import re import shutil import os import sys class TransmissionData: refs = dict() def __init__(self, hostPath): import revitron if revitron.Document.isOpen(hostPath): print('The host model must be closed to edit transmission data!') sys.exit() ...
true
true
1c45046affa5436f6f677300552086a4582337bc
2,492
py
Python
desktop/core/ext-py/jaeger-client-4.0.0/setup.py
e11it/hue-1
436704c40b5fa6ffd30bd972bf50ffeec738d091
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
desktop/core/ext-py/jaeger-client-4.0.0/setup.py
e11it/hue-1
436704c40b5fa6ffd30bd972bf50ffeec738d091
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
desktop/core/ext-py/jaeger-client-4.0.0/setup.py
e11it/hue-1
436704c40b5fa6ffd30bd972bf50ffeec738d091
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from setuptools import setup, find_packages version = None with open('jaeger_client/__init__.py', 'r') as f: for line in f: m = re.match(r'^__version__\s*=\s*(["\'])([^"\']+)\1', line) if m: version = m.group(2) break ...
33.226667
118
0.573435
import re from setuptools import setup, find_packages version = None with open('jaeger_client/__init__.py', 'r') as f: for line in f: m = re.match(r'^__version__\s*=\s*(["\'])([^"\']+)\1', line) if m: version = m.group(2) break assert version is not None, \ 'Could not ...
true
true
1c450494cef97a82cf17c2e517bb7a3972d095f8
1,065
py
Python
plugins/k8s/resoto_plugin_k8s/resources/pod.py
MrMarvin/cloudkeeper
cdca21c1a3b945da6e53a5dbb37a437e1d46f557
[ "Apache-2.0" ]
316
2021-07-08T12:54:19.000Z
2022-01-12T18:50:17.000Z
plugins/k8s/resoto_plugin_k8s/resources/pod.py
MrMarvin/cloudkeeper
cdca21c1a3b945da6e53a5dbb37a437e1d46f557
[ "Apache-2.0" ]
110
2022-01-13T22:27:55.000Z
2022-03-30T22:26:50.000Z
plugins/k8s/resoto_plugin_k8s/resources/pod.py
MrMarvin/cloudkeeper
cdca21c1a3b945da6e53a5dbb37a437e1d46f557
[ "Apache-2.0" ]
14
2021-08-23T08:29:29.000Z
2022-01-08T04:42:28.000Z
from kubernetes import client from .common import KubernetesResource from resotolib.baseresources import ( BaseInstance, InstanceStatus, ) from typing import ClassVar, Dict from dataclasses import dataclass @dataclass(eq=False) class KubernetesPod(KubernetesResource, BaseInstance): kind: ClassVar[str] = "...
30.428571
80
0.73615
from kubernetes import client from .common import KubernetesResource from resotolib.baseresources import ( BaseInstance, InstanceStatus, ) from typing import ClassVar, Dict from dataclasses import dataclass @dataclass(eq=False) class KubernetesPod(KubernetesResource, BaseInstance): kind: ClassVar[str] = "...
true
true
1c450601610f97294ac129d9fba539453ebcde59
3,852
py
Python
utool/util_win32.py
Erotemic/utool
9fbbceefed71ab4b38ab806b998fefc9b873f205
[ "Apache-2.0" ]
8
2017-10-31T03:57:37.000Z
2021-01-15T15:40:23.000Z
utool/util_win32.py
Erotemic/utool
9fbbceefed71ab4b38ab806b998fefc9b873f205
[ "Apache-2.0" ]
6
2016-07-22T21:49:52.000Z
2021-11-08T01:00:40.000Z
utool/util_win32.py
Erotemic/utool
9fbbceefed71ab4b38ab806b998fefc9b873f205
[ "Apache-2.0" ]
6
2016-06-15T23:11:44.000Z
2021-11-07T14:23:42.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import os from os.path import join, normpath, pathsep, dirname # NOQA def get_regstr(regtype, var, val): regtype_map = { 'REG_EXPAND_SZ': 'hex(2):', 'REG_DWORD': 'dword:', 'REG_BINAR...
36.685714
111
0.630322
from __future__ import absolute_import, division, print_function, unicode_literals import os from os.path import join, normpath, pathsep, dirname def get_regstr(regtype, var, val): regtype_map = { 'REG_EXPAND_SZ': 'hex(2):', 'REG_DWORD': 'dword:', 'REG_BINARY': None, 'REG_MULTI_SZ...
true
true
1c4506292da685c618215c514c153bc431358b30
914
py
Python
helpers.py
maxwelldemaio/books
adeeb85cc8bd19198dd0ba430d4fb26b5a96b60e
[ "MIT" ]
null
null
null
helpers.py
maxwelldemaio/books
adeeb85cc8bd19198dd0ba430d4fb26b5a96b60e
[ "MIT" ]
null
null
null
helpers.py
maxwelldemaio/books
adeeb85cc8bd19198dd0ba430d4fb26b5a96b60e
[ "MIT" ]
1
2021-03-01T05:59:33.000Z
2021-03-01T05:59:33.000Z
import json import os import requests from flask import redirect, render_template, session from functools import wraps def login_required(f): """ Decorate routes to require login. http://flask.pocoo.org/docs/1.0/patterns/viewdecorators/ """ @wraps(f) def decorated_function(*args, **kwargs): ...
24.702703
80
0.666302
import json import os import requests from flask import redirect, render_template, session from functools import wraps def login_required(f): @wraps(f) def decorated_function(*args, **kwargs): if session.get("user_id") is None: return render_template("apology.html") return f(*args...
true
true
1c4506701b04228b402dcf017737b7b97e102a97
5,977
py
Python
2017/iker/day15.py
bbglab/adventofcode
65b6d8331d10f229b59232882d60024b08d69294
[ "MIT" ]
null
null
null
2017/iker/day15.py
bbglab/adventofcode
65b6d8331d10f229b59232882d60024b08d69294
[ "MIT" ]
null
null
null
2017/iker/day15.py
bbglab/adventofcode
65b6d8331d10f229b59232882d60024b08d69294
[ "MIT" ]
3
2016-12-02T09:20:42.000Z
2021-12-01T13:31:07.000Z
""" --- Day 15: Dueling Generators --- Here, you encounter a pair of dueling generators. The generators, called generator A and generator B, are trying to agree on a sequence of numbers. However, one of them is malfunctioning, and so the sequences don't always match. As they do this, a judge waits for each of them to...
35.577381
331
0.752886
factor_A = 16807 factor_B = 48271 divider = 2147483647 test_start_value_A = 65 test_start_value_B = 8921 input_A = 116 input_B = 299 def generator(start_value, factor): val = start_value while True: val = val * factor % divider yield val def compare(start_A, start_B, rounds): matches ...
true
true
1c4507651df4cfeb751a19ff84991c40d5064f9e
1,553
py
Python
python/asdl/rust/__main__.py
DuckLogic/rust-asdlr
e900640f1973f334e30746d7f1caceff703662a7
[ "MIT" ]
null
null
null
python/asdl/rust/__main__.py
DuckLogic/rust-asdlr
e900640f1973f334e30746d7f1caceff703662a7
[ "MIT" ]
2
2022-01-10T02:18:07.000Z
2022-01-10T06:41:02.000Z
python/asdl/rust/__main__.py
DuckLogic/rust-astlib
e900640f1973f334e30746d7f1caceff703662a7
[ "MIT" ]
null
null
null
from pathlib import Path import click import asdl from . import GeneratorMode, write_source, AUTOGEN_MESSAGE @click.command() @click.argument('input-filename') @click.option('--rust-file', '-R', 'rust_filename', type=click.Path(), required=True) @click.option('--dump-module', '-D', is_flag=True) @click.option( '...
32.354167
85
0.660657
from pathlib import Path import click import asdl from . import GeneratorMode, write_source, AUTOGEN_MESSAGE @click.command() @click.argument('input-filename') @click.option('--rust-file', '-R', 'rust_filename', type=click.Path(), required=True) @click.option('--dump-module', '-D', is_flag=True) @click.option( '...
true
true
1c4507b1e693bc14907ab2b1dfd524207e7fbaf4
1,076
py
Python
scenarios/camerainseaport/src/list_all_camera.py
rdsea/HINC
2e94321f2f31b4deff08d08a4c128b958a469a3f
[ "Apache-2.0" ]
1
2021-05-18T13:03:47.000Z
2021-05-18T13:03:47.000Z
scenarios/camerainseaport/src/list_all_camera.py
rdsea/HINC
2e94321f2f31b4deff08d08a4c128b958a469a3f
[ "Apache-2.0" ]
11
2020-07-16T03:17:28.000Z
2022-02-12T03:05:48.000Z
scenarios/camerainseaport/src/list_all_camera.py
rdsea/HINC
2e94321f2f31b4deff08d08a4c128b958a469a3f
[ "Apache-2.0" ]
1
2018-04-13T07:45:28.000Z
2018-04-13T07:45:28.000Z
import requests import sys import os import json import pycurl from urllib.parse import urlparse ''' This shows a simple example of dealing with protocol interoperability with camera. 1)A customer searches for cameras in a location ''' import argparse parser = argparse.ArgumentParser() parser.add_argument('--provide...
25.619048
116
0.749071
import requests import sys import os import json import pycurl from urllib.parse import urlparse import argparse parser = argparse.ArgumentParser() parser.add_argument('--provider_url', default='http://localhost:3000/camera', help='URL of the IoT Camera Provider') parser.add_argument('--lon', default='108.1494449', he...
true
true
1c4507d2f3b8880e6d7d9479a647f9a24833791f
6,797
py
Python
h1/model/storage_object.py
hyperonecom/h1-client-python
4ce355852ba3120ec1b8f509ab5894a5c08da730
[ "MIT" ]
null
null
null
h1/model/storage_object.py
hyperonecom/h1-client-python
4ce355852ba3120ec1b8f509ab5894a5c08da730
[ "MIT" ]
null
null
null
h1/model/storage_object.py
hyperonecom/h1-client-python
4ce355852ba3120ec1b8f509ab5894a5c08da730
[ "MIT" ]
null
null
null
""" HyperOne HyperOne API # noqa: E501 The version of the OpenAPI document: 0.1.0 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from h1.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, ...
38.619318
110
0.571281
import re import sys from h1.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) class StorageObj...
true
true
1c450927f120af0dc58091790586492d57fafa7d
29,753
py
Python
lobot.py
mrschue/lobot
d4e55d6086b2546709190f2e377e83bced58d004
[ "MIT" ]
2
2019-03-16T15:32:51.000Z
2019-03-20T12:54:03.000Z
lobot.py
mrschue/lobot
d4e55d6086b2546709190f2e377e83bced58d004
[ "MIT" ]
2
2020-09-27T17:07:01.000Z
2020-09-27T18:12:48.000Z
lobot.py
mrschue/lobot
d4e55d6086b2546709190f2e377e83bced58d004
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import json from PyInquirer import style_from_dict, prompt from prettytable import PrettyTable import os import subprocess import boto3 from botocore.exceptions import ClientError import datetime import time import socket GLOBAL_CONFIG = {} # Global dictionary that maps AWS-usernames to a descript...
44.674174
240
0.618828
import json from PyInquirer import style_from_dict, prompt from prettytable import PrettyTable import os import subprocess import boto3 from botocore.exceptions import ClientError import datetime import time import socket GLOBAL_CONFIG = {} USERNAME_TO_AMI = {"ec2-user": "For Amazon Linux AMI, Fedora AMI, Suse AMI",...
true
true
1c45093a445be08922386a784e09521a402ff9a8
1,191
py
Python
IPython/terminal/tests/test_help.py
chebee7i/ipython
85b169fa3afc3d374973295c7f1409ededddbaca
[ "BSD-3-Clause-Clear" ]
26
2018-02-14T23:52:58.000Z
2021-08-16T13:50:03.000Z
IPython/terminal/tests/test_help.py
chebee7i/ipython
85b169fa3afc3d374973295c7f1409ededddbaca
[ "BSD-3-Clause-Clear" ]
null
null
null
IPython/terminal/tests/test_help.py
chebee7i/ipython
85b169fa3afc3d374973295c7f1409ededddbaca
[ "BSD-3-Clause-Clear" ]
10
2018-08-13T19:38:39.000Z
2020-04-19T03:02:00.000Z
"""Test help output of various IPython entry points""" #----------------------------------------------------------------------------- # Copyright (C) 2013 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software...
31.342105
78
0.455919
import IPython.testing.tools as tt def test_ipython_help(): tt.help_all_output_test() def test_profile_help(): tt.help_all_output_test("profile") def test_profile_list_help(): tt.help_all_output_test("profile list") def test_profile_create_help(): tt.help_all_output_test("profile create") def ...
true
true
1c4509e4ca560671d16f2a9bb8671aab3ebd9e45
696
py
Python
BOJ/03000~03999/3100~3199/3154.py
shinkeonkim/today-ps
f3e5e38c5215f19579bb0422f303a9c18c626afa
[ "Apache-2.0" ]
2
2020-01-29T06:54:41.000Z
2021-11-07T13:23:27.000Z
BOJ/03000~03999/3100~3199/3154.py
shinkeonkim/Today_PS
bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44
[ "Apache-2.0" ]
null
null
null
BOJ/03000~03999/3100~3199/3154.py
shinkeonkim/Today_PS
bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44
[ "Apache-2.0" ]
null
null
null
def f(a, b): L = [[3,1],[0,0],[0,1],[0,2],[1,0],[1,1],[1,2],[2,0],[2,1],[2,2]] return abs(L[a][0] - L[b][0]) + abs(L[a][1] - L[b][1]) M = list(map(int,input().split(":"))) C = 111111 ans = "" for i in range(-3,10): for j in range(-3,10): h = (M[0] + 24*i) m = (M[1] + 60*j) ...
25.777778
69
0.360632
def f(a, b): L = [[3,1],[0,0],[0,1],[0,2],[1,0],[1,1],[1,2],[2,0],[2,1],[2,2]] return abs(L[a][0] - L[b][0]) + abs(L[a][1] - L[b][1]) M = list(map(int,input().split(":"))) C = 111111 ans = "" for i in range(-3,10): for j in range(-3,10): h = (M[0] + 24*i) m = (M[1] + 60*j) ...
true
true
1c450b5dfde3363bf54ac0a21e4761a8d8692d5c
238
py
Python
5_kyu/product_of_consecutive_fib_numbers.py
nik4nd/codewars
efae95f1f9fbd5f31fc62b1b4f5a7d1ee511ced0
[ "MIT" ]
null
null
null
5_kyu/product_of_consecutive_fib_numbers.py
nik4nd/codewars
efae95f1f9fbd5f31fc62b1b4f5a7d1ee511ced0
[ "MIT" ]
null
null
null
5_kyu/product_of_consecutive_fib_numbers.py
nik4nd/codewars
efae95f1f9fbd5f31fc62b1b4f5a7d1ee511ced0
[ "MIT" ]
null
null
null
def productFib(prod): fib = [0, 1] while fib[-1] * fib[-2] < prod: fib.append(fib[-1] + fib[-2]) if fib[-1] * fib[-2] == prod: return [fib[-2], fib[-1], True] else: return [fib[-2], fib[-1], False]
26.444444
40
0.466387
def productFib(prod): fib = [0, 1] while fib[-1] * fib[-2] < prod: fib.append(fib[-1] + fib[-2]) if fib[-1] * fib[-2] == prod: return [fib[-2], fib[-1], True] else: return [fib[-2], fib[-1], False]
true
true
1c450b7bb090a0fc1273a64843f8c0d46cc1f084
1,080
py
Python
var/spack/repos/builtin/packages/hazelcast/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2,360
2017-11-06T08:47:01.000Z
2022-03-31T14:45:33.000Z
var/spack/repos/builtin/packages/hazelcast/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
13,838
2017-11-04T07:49:45.000Z
2022-03-31T23:38:39.000Z
var/spack/repos/builtin/packages/hazelcast/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1,793
2017-11-04T07:45:50.000Z
2022-03-30T14:31:53.000Z
# Copyright 2013-2021 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) class Hazelcast(MavenPackage): """Hazelcast is an open-source distributed in-memory data store and computation p...
49.090909
96
0.773148
class Hazelcast(MavenPackage): homepage = "http://www.hazelcast.com/" url = "https://github.com/hazelcast/hazelcast/archive/v3.12.8.tar.gz" version('4.0.2', sha256='4f01682583ae6603365ac7a24c568d7598cc3c1cbd736e5c6ed98bd75e39ffa3') version('4.0.1', sha256='c9c7d5cbcf70c5e1eb72890df2b4104639f754...
true
true
1c450c4040159fc28c9e4f9f9a5503948dc55c72
10,445
py
Python
ansible/venv/lib/python2.7/site-packages/ansible/modules/windows/win_scheduled_task_stat.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
17
2017-06-07T23:15:01.000Z
2021-08-30T14:32:36.000Z
ansible/venv/lib/python2.7/site-packages/ansible/modules/windows/win_scheduled_task_stat.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
9
2017-06-25T03:31:52.000Z
2021-05-17T23:43:12.000Z
ansible/venv/lib/python2.7/site-packages/ansible/modules/windows/win_scheduled_task_stat.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
3
2018-05-26T21:31:22.000Z
2019-09-28T17:00:45.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # this is a windows documentation stub. actual code lives in the .ps1 # file of the same name ANSIBLE_METADATA = {'metadata_version': '1.1', ...
27.486842
92
0.629009
ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: win_scheduled_task_stat version_added: "2.5" short_description: Get information about Windows Scheduled Tasks description: - Will return whether...
true
true
1c450c6fcbe3b62b2247c2fb25a8112f6abca6f6
60,369
py
Python
Lib/optparse.py
shawwn/cpython
0ff8a3b374286d2218fc18f47556a5ace202dad3
[ "0BSD" ]
52,316
2015-01-01T15:56:25.000Z
2022-03-31T23:19:01.000Z
Lib/optparse.py
shawwn/cpython
0ff8a3b374286d2218fc18f47556a5ace202dad3
[ "0BSD" ]
25,286
2015-03-03T23:18:02.000Z
2022-03-31T23:17:27.000Z
Lib/optparse.py
shawwn/cpython
0ff8a3b374286d2218fc18f47556a5ace202dad3
[ "0BSD" ]
31,623
2015-01-01T13:29:37.000Z
2022-03-31T19:55:06.000Z
"""A powerful, extensible, and easy-to-use option parser. By Greg Ward <gward@python.net> Originally distributed as Optik. For support, use the optik-users@lists.sourceforge.net mailing list (http://lists.sourceforge.net/lists/listinfo/optik-users). Simple usage example: from optparse import OptionParser pa...
35.891201
79
0.582633
__version__ = "1.5.3" __all__ = ['Option', 'make_option', 'SUPPRESS_HELP', 'SUPPRESS_USAGE', 'Values', 'OptionContainer', 'OptionGroup', 'OptionParser', 'HelpFormatter', 'IndentedHelpFormatter', 'TitledHelpFo...
true
true
1c450d522f192a94ed707858331d204858a968c7
10,430
py
Python
frappe/email/email_body.py
omirajkar/vmsfrappe
da65f47850944ea234fda0ca390bacb9dac39336
[ "MIT" ]
1
2020-01-14T17:06:07.000Z
2020-01-14T17:06:07.000Z
frappe/email/email_body.py
omirajkar/vmsfrappe
da65f47850944ea234fda0ca390bacb9dac39336
[ "MIT" ]
null
null
null
frappe/email/email_body.py
omirajkar/vmsfrappe
da65f47850944ea234fda0ca390bacb9dac39336
[ "MIT" ]
null
null
null
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, re from frappe.utils.pdf import get_pdf from frappe.email.smtp import get_outgoing_email_account from frappe.utils import (get_url, scrub_urls, strip, expand_relati...
33.754045
139
0.727229
from __future__ import unicode_literals import frappe, re from frappe.utils.pdf import get_pdf from frappe.email.smtp import get_outgoing_email_account from frappe.utils import (get_url, scrub_urls, strip, expand_relative_urls, cint, split_emails, to_markdown, markdown, encode, random_string, parse_addr) import email...
true
true
1c450d8cf947536398acc4c04ba15817d15671ab
2,418
py
Python
hummingbot/connector/exchange/huobi/huobi_utils.py
cardosofede/hummingbot
d1df085bb879a06a7dc77d4fdc8ff6f13d8726ca
[ "Apache-2.0" ]
542
2021-12-17T22:34:31.000Z
2022-03-31T14:36:23.000Z
hummingbot/connector/exchange/huobi/huobi_utils.py
cardosofede/hummingbot
d1df085bb879a06a7dc77d4fdc8ff6f13d8726ca
[ "Apache-2.0" ]
291
2021-12-17T20:07:53.000Z
2022-03-31T11:07:23.000Z
hummingbot/connector/exchange/huobi/huobi_utils.py
cardosofede/hummingbot
d1df085bb879a06a7dc77d4fdc8ff6f13d8726ca
[ "Apache-2.0" ]
220
2021-12-17T12:41:23.000Z
2022-03-31T23:03:22.000Z
import re from decimal import Decimal from typing import Optional, Tuple from hummingbot.client.config.config_methods import using_exchange from hummingbot.client.config.config_var import ConfigVar from hummingbot.connector.exchange.huobi.huobi_ws_post_processor import HuobiWSPostProcessor from hummingbot.core.data_ty...
33.123288
92
0.698511
import re from decimal import Decimal from typing import Optional, Tuple from hummingbot.client.config.config_methods import using_exchange from hummingbot.client.config.config_var import ConfigVar from hummingbot.connector.exchange.huobi.huobi_ws_post_processor import HuobiWSPostProcessor from hummingbot.core.data_ty...
true
true
1c450ed72a7fafccbd98ee6d00b861adbfb2e6c6
1,681
py
Python
src/django_pg_hll/bulk_update.py
M1ha-Shvn/django-pg-hll
2530f63c95e02410c710b31b8a34470fbc06fa88
[ "BSD-3-Clause" ]
2
2020-09-08T10:10:39.000Z
2021-06-08T19:16:51.000Z
src/django_pg_hll/bulk_update.py
M1ha-Shvn/django-pg-hll
2530f63c95e02410c710b31b8a34470fbc06fa88
[ "BSD-3-Clause" ]
4
2020-09-08T13:53:27.000Z
2021-11-05T14:17:40.000Z
src/django_pg_hll/bulk_update.py
M1hacka/django-pg-hll
2530f63c95e02410c710b31b8a34470fbc06fa88
[ "BSD-3-Clause" ]
1
2020-09-07T15:35:22.000Z
2020-09-07T15:35:22.000Z
""" django-pg-bulk-update support. """ from django.db.models.sql import Query from .compatibility import django_pg_bulk_update_available from .fields import HllField from .values import HllEmpty, HllValue, HllCombinedExpression # As django-pg-bulk-update library is not required, import only if it exists if django_pg...
36.543478
113
0.700178
from django.db.models.sql import Query from .compatibility import django_pg_bulk_update_available from .fields import HllField from .values import HllEmpty, HllValue, HllCombinedExpression if django_pg_bulk_update_available(): from django_pg_bulk_update.set_functions import ConcatSetFunction from django_pg_b...
true
true
1c450f4f0df5c3af0c2e624475ff2ba3c604f2e3
5,208
py
Python
qsimov/connectors/parser.py
daviddavo/QSimov
2df523e911374553c6fa9caf2b895fd62bc46eed
[ "MIT" ]
null
null
null
qsimov/connectors/parser.py
daviddavo/QSimov
2df523e911374553c6fa9caf2b895fd62bc46eed
[ "MIT" ]
null
null
null
qsimov/connectors/parser.py
daviddavo/QSimov
2df523e911374553c6fa9caf2b895fd62bc46eed
[ "MIT" ]
null
null
null
"""Module with gate name parsing stuff. This module has all name parsing stuff """ import numpy as np import re __rep__ = re.compile(r"^([a-zA-Z0-9]+)" + r"(\((?:(?:(?:[a-zA-Z]+)|" + r"(?:[\+\-]?[0-9]+(?:\.[0-9]+)?(?:e[\+\-][0-9]+)?))" + r"\,\s*)*(?:(?:(...
34.039216
78
0.460061
import numpy as np import re __rep__ = re.compile(r"^([a-zA-Z0-9]+)" + r"(\((?:(?:(?:[a-zA-Z]+)|" + r"(?:[\+\-]?[0-9]+(?:\.[0-9]+)?(?:e[\+\-][0-9]+)?))" + r"\,\s*)*(?:(?:(?:[a-zA-Z]+)|" + r"(?:[\+\-]?[0-9]+(?:\.[0-9]+)?" + ...
true
true
1c45101cb058c0ae07cfe74d84621ac3871e7f5e
1,502
py
Python
setup.py
ivanfmartinez/pysonofflan
60d3f2ab2952207552c1e1ea3ebd796d984e427c
[ "MIT" ]
null
null
null
setup.py
ivanfmartinez/pysonofflan
60d3f2ab2952207552c1e1ea3ebd796d984e427c
[ "MIT" ]
null
null
null
setup.py
ivanfmartinez/pysonofflan
60d3f2ab2952207552c1e1ea3ebd796d984e427c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = ['Click>=7.0', 'click_log', 'websocket...
29.45098
70
0.643142
from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = ['Click>=7.0', 'click_log', 'websockets'] setup_requirements = [] test_requirements = ['pytest', 'tox', 'pyt...
true
true
1c451056684517a5a35b4eeda9fafd24b1138137
6,010
py
Python
tob-api/api/indy/agent.py
mehmetaydar/TheOrgBook
951fcdbc45d2b8f7f3a7887aac19c7f04b70e23a
[ "Apache-2.0" ]
1
2021-02-23T14:15:42.000Z
2021-02-23T14:15:42.000Z
tob-api/api/indy/agent.py
mehmetaydar/TheOrgBook
951fcdbc45d2b8f7f3a7887aac19c7f04b70e23a
[ "Apache-2.0" ]
null
null
null
tob-api/api/indy/agent.py
mehmetaydar/TheOrgBook
951fcdbc45d2b8f7f3a7887aac19c7f04b70e23a
[ "Apache-2.0" ]
null
null
null
import os import threading from von_agent.nodepool import NodePool from von_agent.wallet import Wallet from tob_api import hyperledger_indy from von_agent.agents import Issuer as VonIssuer from von_agent.agents import Verifier as VonVerifier from von_agent.agents import HolderProver as VonHolderProver from typing impo...
34.94186
131
0.620632
import os import threading from von_agent.nodepool import NodePool from von_agent.wallet import Wallet from tob_api import hyperledger_indy from von_agent.agents import Issuer as VonIssuer from von_agent.agents import Verifier as VonVerifier from von_agent.agents import HolderProver as VonHolderProver from typing impo...
true
true
1c45137fe7f938199493e48688d1b72f051eeb5e
821
py
Python
toTheMoon/offer66_4_SearchInTwoDimensionalArray.py
jercas/offer66-leetcode-newcode
a2e5256f27dbfb23fc34119fc857cd9b00e28c03
[ "MIT" ]
null
null
null
toTheMoon/offer66_4_SearchInTwoDimensionalArray.py
jercas/offer66-leetcode-newcode
a2e5256f27dbfb23fc34119fc857cd9b00e28c03
[ "MIT" ]
null
null
null
toTheMoon/offer66_4_SearchInTwoDimensionalArray.py
jercas/offer66-leetcode-newcode
a2e5256f27dbfb23fc34119fc857cd9b00e28c03
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Apr 26 10:47:52 2019 @author: jercas """ """ offer66-4 '二维数组中的查找' 在一个二维数组中(每个一维数组的长度相同),每一行都按照从左到右递增的顺序排序, 每一列都按照从上到下递增的顺序排序。请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。 """ class Solution: # array 二维列表 def Find(self, target, array): if len(array[0]) == 0: return False ...
20.525
78
0.595615
class Solution: def Find(self, target, array): if len(array[0]) == 0: return False n = len(array) row, col = 0, n - 1 while row < n and col >= 0: if array[row][col] == target: return True elif array[row][col] > target: col -= 1 else: row += 1 return False if __name__ == "__m...
true
true
1c4513e8f055ddeb4859242b1de268020ecb30ae
563
py
Python
examples/mnist/utils.py
gfrogat/prunhild
55769c6f2eca2748288c24826dd3bb14deaf5707
[ "MIT" ]
28
2019-05-07T03:27:30.000Z
2022-02-02T19:49:12.000Z
examples/mnist/utils.py
gfrogat/prunhild
55769c6f2eca2748288c24826dd3bb14deaf5707
[ "MIT" ]
null
null
null
examples/mnist/utils.py
gfrogat/prunhild
55769c6f2eca2748288c24826dd3bb14deaf5707
[ "MIT" ]
5
2019-05-14T00:21:15.000Z
2021-11-25T13:26:44.000Z
def get_parameter_stats(model): n_zero = 0.0 n_total = 0.0 for param in model.parameters(): # assume values smaller than 1e-7 (for 32bit) to be zero n_zero += param.data.abs().le(1e-7).sum().item() n_total += param.data.numel() ratio_zero = n_zero / n_total return n_zero, n_...
28.15
64
0.614565
def get_parameter_stats(model): n_zero = 0.0 n_total = 0.0 for param in model.parameters(): n_zero += param.data.abs().le(1e-7).sum().item() n_total += param.data.numel() ratio_zero = n_zero / n_total return n_zero, n_total, ratio_zero def print_parameter_stats(parameter_s...
true
true
1c4517f681dbd5414de6d4df269356db3a4b654d
7,253
py
Python
tensorflow/python/debug/lib/source_remote_test.py
harunpehlivan/tensorflow
376e2cfdab31f4da251ea2e50992a9bf97fd171b
[ "Apache-2.0" ]
16
2018-01-30T22:16:13.000Z
2021-07-18T10:00:55.000Z
tensorflow/python/debug/lib/source_remote_test.py
harunpehlivan/tensorflow
376e2cfdab31f4da251ea2e50992a9bf97fd171b
[ "Apache-2.0" ]
3
2018-05-09T11:31:58.000Z
2021-01-27T12:26:21.000Z
tensorflow/python/debug/lib/source_remote_test.py
harunpehlivan/tensorflow
376e2cfdab31f4da251ea2e50992a9bf97fd171b
[ "Apache-2.0" ]
13
2018-02-22T21:04:13.000Z
2020-11-17T11:38:36.000Z
# Copyright 2017 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...
42.168605
88
0.724252
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import traceback from tensorflow.core.debug import debug_service_pb2 from tensorflow.python.client import session from tensorflow.python.debug.lib import grpc_debug_test_server from tensorflow.pytho...
true
true
1c4519051ae3887019459e07c09bc75536f88eb7
8,570
py
Python
fastreid/config/defaults.py
tenghehan/reid_without_id
d1d0ff273b1ef19fc6da8cbbf210527779b37455
[ "MIT" ]
1
2020-12-24T09:32:21.000Z
2020-12-24T09:32:21.000Z
fastreid/config/defaults.py
tenghehan/reid_without_id
d1d0ff273b1ef19fc6da8cbbf210527779b37455
[ "MIT" ]
null
null
null
fastreid/config/defaults.py
tenghehan/reid_without_id
d1d0ff273b1ef19fc6da8cbbf210527779b37455
[ "MIT" ]
null
null
null
from .config import CfgNode as CN # ----------------------------------------------------------------------------- # Convention about Training / Test specific parameters # ----------------------------------------------------------------------------- # Whenever an argument can be either used for training or for testing,...
31.277372
102
0.592065
from .config import CfgNode as CN _C = CN() _C.MODEL = CN() _C.MODEL.DEVICE = "cuda" _C.MODEL.META_ARCHITECTURE = 'Baseline' _C.MODEL.FREEZE_LAYERS = [''] _C.MODEL.BACKBONE = CN() _C.MODEL.BACKBONE.NAME = "build_resnet_backbone" _C.MODEL.BACKBONE.DEPTH = "50x" _C.MODEL.BACKBONE.LAST_STRIDE = 1 _C.MODEL.BACKBONE.F...
true
true
1c45191232e6f107bedf746641c84c6c18d003d0
13,305
py
Python
CGATPipelines/Pipeline/Cluster.py
cdrakesmith/CGATPipelines
3c94ae4f9d87d51108255dc405c4b95af7c8b694
[ "MIT" ]
null
null
null
CGATPipelines/Pipeline/Cluster.py
cdrakesmith/CGATPipelines
3c94ae4f9d87d51108255dc405c4b95af7c8b694
[ "MIT" ]
null
null
null
CGATPipelines/Pipeline/Cluster.py
cdrakesmith/CGATPipelines
3c94ae4f9d87d51108255dc405c4b95af7c8b694
[ "MIT" ]
null
null
null
'''Cluster.py - cluster utility functions for ruffus pipelines ============================================================== This module abstracts the DRMAA native specification and provides convenience functions for running Drmaa jobs. Reference --------- ''' import re import os import stat import time import CG...
34.115385
96
0.583991
import re import os import stat import time import CGAT.Experiment as E try: import drmaa HAS_DRMAA = True except (ImportError, RuntimeError): HAS_DRMAA = False def setupDrmaaJobTemplate(drmaa_session, options, job_name, job_memory): if not job_memory: raise ValueError("Job memory must be s...
true
true
1c451a8e590f9ec729b1bc20c53b683a1db7a13e
1,503
py
Python
src/OTLMOW/OTLModel/Datatypes/KlVerlichtingstoestelconnectorBesturingsconnector.py
davidvlaminck/OTLClassPython
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
2
2022-02-01T08:58:11.000Z
2022-02-08T13:35:17.000Z
src/OTLMOW/OTLModel/Datatypes/KlVerlichtingstoestelconnectorBesturingsconnector.py
davidvlaminck/OTLMOW
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
null
null
null
src/OTLMOW/OTLModel/Datatypes/KlVerlichtingstoestelconnectorBesturingsconnector.py
davidvlaminck/OTLMOW
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
null
null
null
# coding=utf-8 from OTLMOW.OTLModel.Datatypes.KeuzelijstField import KeuzelijstField from OTLMOW.OTLModel.Datatypes.KeuzelijstWaarde import KeuzelijstWaarde # Generated with OTLEnumerationCreator. To modify: extend, do not edit class KlVerlichtingstoestelconnectorBesturingsconnector(KeuzelijstField): """Type van ...
65.347826
168
0.743846
from OTLMOW.OTLModel.Datatypes.KeuzelijstField import KeuzelijstField from OTLMOW.OTLModel.Datatypes.KeuzelijstWaarde import KeuzelijstWaarde class KlVerlichtingstoestelconnectorBesturingsconnector(KeuzelijstField): naam = 'KlVerlichtingstoestelconnectorBesturingsconnector' label = 'WV-besturingsconnector' ...
true
true
1c451acb8ba967675446c6c9dcd9a6f243d7c450
1,913
py
Python
experiments/comparison/baseline_search.py
alcinos/auto_yolo
78727596f937b38d4de47dd9f0a7cc8c6104323f
[ "MIT" ]
54
2018-12-10T21:08:42.000Z
2022-02-18T02:44:19.000Z
experiments/comparison/baseline_search.py
alcinos/auto_yolo
78727596f937b38d4de47dd9f0a7cc8c6104323f
[ "MIT" ]
8
2019-04-02T10:31:13.000Z
2022-03-31T13:44:25.000Z
experiments/comparison/baseline_search.py
alcinos/auto_yolo
78727596f937b38d4de47dd9f0a7cc8c6104323f
[ "MIT" ]
16
2019-04-26T11:45:08.000Z
2022-02-09T07:59:25.000Z
from auto_yolo import envs import argparse import numpy as np readme = "Searching for baseline threshold." parser = argparse.ArgumentParser() parser.add_argument("--n-digits", type=int, default=1) parser.add_argument("--transfer", action="store_true") parser.add_argument("--sc", choices="AP count_error count_1norm"....
27.724638
95
0.68322
from auto_yolo import envs import argparse import numpy as np readme = "Searching for baseline threshold." parser = argparse.ArgumentParser() parser.add_argument("--n-digits", type=int, default=1) parser.add_argument("--transfer", action="store_true") parser.add_argument("--sc", choices="AP count_error count_1norm"....
true
true
1c451ace7c8c4a9840e36df73ca94d6221a26439
5,729
py
Python
test/client/dev_server.py
GeekLiB/unrealcv
9acfcb5b52c5b085e72e64a0bb46ea4d0adadcdb
[ "MIT" ]
1
2020-06-29T02:33:44.000Z
2020-06-29T02:33:44.000Z
test/client/dev_server.py
GeekLiB/unrealcv
9acfcb5b52c5b085e72e64a0bb46ea4d0adadcdb
[ "MIT" ]
null
null
null
test/client/dev_server.py
GeekLiB/unrealcv
9acfcb5b52c5b085e72e64a0bb46ea4d0adadcdb
[ "MIT" ]
4
2017-03-23T14:52:22.000Z
2020-06-29T02:33:54.000Z
''' A python server to mimic the behavior of unrealcv server Useful for development ''' import threading, logging, sys if (sys.version_info > (3, 0)): import socketserver as SocketServer else: import SocketServer # import MySocketServer as SocketServer SocketServer.ThreadingMixIn.daemon_threads = True SocketSer...
36.259494
109
0.653168
import threading, logging, sys if (sys.version_info > (3, 0)): import socketserver as SocketServer else: import SocketServer SocketServer.ThreadingMixIn.daemon_threads = True SocketServer.TCPServer.allow_reuse_address = True import unrealcv _L = logging.getLogger(__name__) _L.setLevel(logging.INFO) _L.addHandl...
true
true
1c451be187ab0f02d6d4a30d729c850021a93b2f
598
py
Python
bdaydict.py
rayjustinhuang/BitesofPy
03b694c5259ff607621419d9677c5caff90a6057
[ "MIT" ]
null
null
null
bdaydict.py
rayjustinhuang/BitesofPy
03b694c5259ff607621419d9677c5caff90a6057
[ "MIT" ]
null
null
null
bdaydict.py
rayjustinhuang/BitesofPy
03b694c5259ff607621419d9677c5caff90a6057
[ "MIT" ]
null
null
null
from datetime import date MSG = 'Hey {}, there are more people with your birthday!' class BirthdayDict(dict): """Override dict to print a message every time a new person is added that has the same birthday (day+month) as somebody already in the dict""" def __init__(self, *args, **kwargs): sel...
33.222222
81
0.64214
from datetime import date MSG = 'Hey {}, there are more people with your birthday!' class BirthdayDict(dict): def __init__(self, *args, **kwargs): self.update(*args, **kwargs) def __setitem__(self, name, birthday): for date in self.values(): if birthday.day == date.day and birth...
true
true
1c451c467f4bd7d3914dcec4205aa7681ffb50f0
11,533
py
Python
datasets/nclt.py
XiaoyongNI/hybrid-inference
c268e1ada019e08f62e3f02fc6d5059130ec5358
[ "MIT" ]
16
2019-11-22T15:40:32.000Z
2022-03-14T14:39:01.000Z
datasets/nclt.py
XiaoyongNI/hybrid-inference
c268e1ada019e08f62e3f02fc6d5059130ec5358
[ "MIT" ]
2
2020-02-11T13:36:56.000Z
2020-05-18T15:58:21.000Z
datasets/nclt.py
XiaoyongNI/hybrid-inference
c268e1ada019e08f62e3f02fc6d5059130ec5358
[ "MIT" ]
4
2020-02-04T16:36:31.000Z
2021-11-25T07:26:46.000Z
from __future__ import print_function import sys, os sys.path.append('../') import torch.utils.data as data import numpy as np import pandas as pd import matplotlib.pyplot as plt import torch import pickle import settings import time dates = []; dates.append('2012-01-08') dates.append('2012-01-15') dates.append('2012-0...
32.764205
123
0.562213
from __future__ import print_function import sys, os sys.path.append('../') import torch.utils.data as data import numpy as np import pandas as pd import matplotlib.pyplot as plt import torch import pickle import settings import time dates = []; dates.append('2012-01-08') dates.append('2012-01-15') dates.append('2012-0...
true
true
1c451cce6b7f3b495ac9f7b0e576b3407cde8ba6
719
py
Python
lemon/libs/route.py
InsaneMiner/Salt
b61c5f931fe4b6fa652e8fbfb59b30dbaaf9ed18
[ "MIT" ]
6
2020-11-22T11:42:55.000Z
2022-01-09T12:29:30.000Z
lemon/libs/route.py
InsaneMiner/Salt
b61c5f931fe4b6fa652e8fbfb59b30dbaaf9ed18
[ "MIT" ]
1
2020-11-21T00:05:40.000Z
2020-11-22T21:58:54.000Z
lemon/libs/route.py
InsaneMiner/Salt
b61c5f931fe4b6fa652e8fbfb59b30dbaaf9ed18
[ "MIT" ]
2
2021-06-05T04:19:04.000Z
2021-06-05T04:28:08.000Z
import app.web import config.config import lemon.libs.lemon import lemon.libs.colors import lemon.libs.url_validation import app.urls def page(object): correct_url = lemon.libs.url_validation.validate_url(object.url,app.urls.urls) if correct_url[0] != None: try: object.url_data = correct_u...
29.958333
82
0.632823
import app.web import config.config import lemon.libs.lemon import lemon.libs.colors import lemon.libs.url_validation import app.urls def page(object): correct_url = lemon.libs.url_validation.validate_url(object.url,app.urls.urls) if correct_url[0] != None: try: object.url_data = correct_u...
true
true
1c451da618026b8bebb5ad5310a8825f0a00e52b
3,724
py
Python
osdu/services/search.py
eternelpanic/osdupy
3b30ceaed7f7f333a6a41d542b9430d4042f77f2
[ "MIT" ]
null
null
null
osdu/services/search.py
eternelpanic/osdupy
3b30ceaed7f7f333a6a41d542b9430d4042f77f2
[ "MIT" ]
7
2020-09-24T03:54:34.000Z
2022-03-29T20:16:42.000Z
osdu/services/search.py
eternelpanic/osdupy
3b30ceaed7f7f333a6a41d542b9430d4042f77f2
[ "MIT" ]
3
2021-03-10T20:51:50.000Z
2021-09-30T08:31:45.000Z
""" Provides a simple Python interface to the OSDU Search API. """ import requests from .base import BaseService class SearchService(BaseService): def __init__(self, client): super().__init__(client, 'search', service_version=2) def query(self, query: dict) -> dict: """Executes a query again...
51.722222
114
0.59855
import requests from .base import BaseService class SearchService(BaseService): def __init__(self, client): super().__init__(client, 'search', service_version=2) def query(self, query: dict) -> dict: url = f'{self._service_url}/query' response = requests.post(url=url, headers=self._h...
true
true
1c451da9965b9c22319a97ee2b115df66aa1b1c4
8,190
py
Python
Gladiator/Player.py
sergenp/gladoidbot
6e450d8b379e2c8238e4cf32b3d71b2e13154034
[ "MIT" ]
1
2020-09-04T03:59:27.000Z
2020-09-04T03:59:27.000Z
Gladiator/Player.py
sergenp/gladoidbot
6e450d8b379e2c8238e4cf32b3d71b2e13154034
[ "MIT" ]
null
null
null
Gladiator/Player.py
sergenp/gladoidbot
6e450d8b379e2c8238e4cf32b3d71b2e13154034
[ "MIT" ]
1
2020-03-18T13:10:11.000Z
2020-03-18T13:10:11.000Z
import random import math import json from Gladiator.Stats.GladiatorStats import GladiatorStats from Gladiator.AttackInformation.GladiatorAttackInformation import GladiatorAttackInformation from Gladiator.Equipments.GladiatorEquipments import GladiatorEquipments import urllib.parse import pathlib path = pathlib.Path(__...
39.186603
159
0.617582
import random import math import json from Gladiator.Stats.GladiatorStats import GladiatorStats from Gladiator.AttackInformation.GladiatorAttackInformation import GladiatorAttackInformation from Gladiator.Equipments.GladiatorEquipments import GladiatorEquipments import urllib.parse import pathlib path = pathlib.Path(__...
true
true
1c451e591138c58b97abd21b494bd67e7590cc57
457
py
Python
1143-longest-common-subsequence/1143-longest-common-subsequence.py
tlylt/LeetCodeAnki
9f69504c3762f7895d95c2a592f18ad395199ff4
[ "MIT" ]
1
2022-02-14T08:03:32.000Z
2022-02-14T08:03:32.000Z
1143-longest-common-subsequence/1143-longest-common-subsequence.py
tlylt/LeetCodeAnki
9f69504c3762f7895d95c2a592f18ad395199ff4
[ "MIT" ]
null
null
null
1143-longest-common-subsequence/1143-longest-common-subsequence.py
tlylt/LeetCodeAnki
9f69504c3762f7895d95c2a592f18ad395199ff4
[ "MIT" ]
null
null
null
class Solution: def longestCommonSubsequence(self, text1: str, text2: str) -> int: m = len(text1) n = len(text2) dp = [[0 for i in range(n+1)] for j in range(m+1)] for i in range(1, m+1): for j in range(1, n+1): if text1[i-1] == text2[j-1]: ...
38.083333
70
0.428884
class Solution: def longestCommonSubsequence(self, text1: str, text2: str) -> int: m = len(text1) n = len(text2) dp = [[0 for i in range(n+1)] for j in range(m+1)] for i in range(1, m+1): for j in range(1, n+1): if text1[i-1] == text2[j-1]: ...
true
true
1c451ea06c8fd0d11137c3e4b9dda843e3fa5e7b
44,232
py
Python
python_modules/dagster/dagster/core/definitions/pipeline_definition.py
kstennettlull/dagster
dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/definitions/pipeline_definition.py
kstennettlull/dagster
dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/definitions/pipeline_definition.py
kstennettlull/dagster
dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6
[ "Apache-2.0" ]
null
null
null
from functools import update_wrapper from typing import TYPE_CHECKING, AbstractSet, Any, Dict, FrozenSet, List, Optional, Set, Union from dagster import check from dagster.core.definitions.policy import RetryPolicy from dagster.core.definitions.resource_definition import ResourceDefinition from dagster.core.definition...
41.03154
123
0.639107
from functools import update_wrapper from typing import TYPE_CHECKING, AbstractSet, Any, Dict, FrozenSet, List, Optional, Set, Union from dagster import check from dagster.core.definitions.policy import RetryPolicy from dagster.core.definitions.resource_definition import ResourceDefinition from dagster.core.definition...
true
true
1c451f5fc59e92b0a8345779653aacf61ab487e0
4,150
py
Python
tcconfig/_common.py
Mnkras/tcconfig
2173ffc4fa4e23fa0a2b89c1185e9e44350d5aad
[ "MIT" ]
1
2020-07-23T07:07:47.000Z
2020-07-23T07:07:47.000Z
tcconfig/_common.py
RinaisSuper/tcconfig
d45efa64a589c6f0fb75059414bf629683b920dc
[ "MIT" ]
null
null
null
tcconfig/_common.py
RinaisSuper/tcconfig
d45efa64a589c6f0fb75059414bf629683b920dc
[ "MIT" ]
null
null
null
""" .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ import contextlib import errno import os import re import sys import msgfy import subprocrunner as spr import typepy from humanreadable import ParameterError from path import Path from simplesqlite import SimpleSQLite from ._const import IPV6_OP...
26.948052
91
0.650602
import contextlib import errno import os import re import sys import msgfy import subprocrunner as spr import typepy from humanreadable import ParameterError from path import Path from simplesqlite import SimpleSQLite from ._const import IPV6_OPTION_ERROR_MSG_FORMAT, TcCommandOutput from ._logger import logger, set_...
true
true
1c451fd9da10cf900c3dbc0db1934d2f21680917
11,336
py
Python
sdk/lusid_drive/models/lusid_validation_problem_details.py
finbourne/drive-sdk-python-preview
24d218e09c45efa378ba2e5b9da00a3b84258fa1
[ "MIT" ]
null
null
null
sdk/lusid_drive/models/lusid_validation_problem_details.py
finbourne/drive-sdk-python-preview
24d218e09c45efa378ba2e5b9da00a3b84258fa1
[ "MIT" ]
null
null
null
sdk/lusid_drive/models/lusid_validation_problem_details.py
finbourne/drive-sdk-python-preview
24d218e09c45efa378ba2e5b9da00a3b84258fa1
[ "MIT" ]
1
2021-03-01T02:27:02.000Z
2021-03-01T02:27:02.000Z
# coding: utf-8 """ FINBOURNE Drive API FINBOURNE Technology # noqa: E501 The version of the OpenAPI document: 0.1.274 Contact: info@finbourne.com Generated by: https://openapi-generator.tech """ try: from inspect import getfullargspec except ImportError: from inspect import getargspec...
28.411028
204
0.593772
try: from inspect import getfullargspec except ImportError: from inspect import getargspec as getfullargspec import pprint import re import six from lusid_drive.configuration import Configuration class LusidValidationProblemDetails(object): openapi_types = { 'name': 'str', 'error_det...
true
true
1c45209729e1d21c4b3a6f31d130e2310e6cba86
392
py
Python
tests/test_entities/test_lead_source.py
stas12312/aioalfacrm
1501634fa5ef4591936be2e6147827565e4a0b36
[ "MIT" ]
null
null
null
tests/test_entities/test_lead_source.py
stas12312/aioalfacrm
1501634fa5ef4591936be2e6147827565e4a0b36
[ "MIT" ]
49
2021-11-11T16:00:40.000Z
2021-11-24T15:37:34.000Z
tests/test_entities/test_lead_source.py
stas12312/aioalfacrm
1501634fa5ef4591936be2e6147827565e4a0b36
[ "MIT" ]
null
null
null
from aioalfacrm.entities import LeadSource def test_init_lead_source(): lead_source = LeadSource( id=1, code='123', name='name', is_enabled=True, weight=1, ) assert lead_source.id == 1 assert lead_source.code == '123' assert lead_source.name == 'name' a...
21.777778
42
0.632653
from aioalfacrm.entities import LeadSource def test_init_lead_source(): lead_source = LeadSource( id=1, code='123', name='name', is_enabled=True, weight=1, ) assert lead_source.id == 1 assert lead_source.code == '123' assert lead_source.name == 'name' a...
true
true
1c4521fc9177fa6a313e6d050feee3d74b820b75
877
py
Python
Projetos-Python/Aula 4/Driver.py
gfjallais/Projetos-Python
17e67dd020246c244dcd0c4891eefbc7f3fc7ed2
[ "MIT" ]
null
null
null
Projetos-Python/Aula 4/Driver.py
gfjallais/Projetos-Python
17e67dd020246c244dcd0c4891eefbc7f3fc7ed2
[ "MIT" ]
null
null
null
Projetos-Python/Aula 4/Driver.py
gfjallais/Projetos-Python
17e67dd020246c244dcd0c4891eefbc7f3fc7ed2
[ "MIT" ]
null
null
null
import sys import VPL_mSort def test(case, args): if case == 0: print(VPL_mSort.ll2py(VPL_mSort.py2ll(args))) elif case == 1: print(VPL_mSort.size(VPL_mSort.py2ll(args))) elif case == 2: print(VPL_mSort.sorted(VPL_mSort.py2ll(args))) elif case == 3: print(VP...
30.241379
71
0.59065
import sys import VPL_mSort def test(case, args): if case == 0: print(VPL_mSort.ll2py(VPL_mSort.py2ll(args))) elif case == 1: print(VPL_mSort.size(VPL_mSort.py2ll(args))) elif case == 2: print(VPL_mSort.sorted(VPL_mSort.py2ll(args))) elif case == 3: print(VP...
true
true
1c4522290fc38b60b333c6de255cbf07d0f9cc5a
3,371
py
Python
code/auto_download/auto-download-usc.py
altymis/covid19-forecast-hub-europe
1a413439d0a4800356cfed8129ea943d14e37f8e
[ "MIT" ]
31
2020-05-20T15:38:57.000Z
2022-02-13T01:31:33.000Z
code/auto_download/auto-download-usc.py
altymis/covid19-forecast-hub-europe
1a413439d0a4800356cfed8129ea943d14e37f8e
[ "MIT" ]
777
2020-05-18T14:55:53.000Z
2022-03-29T20:43:17.000Z
code/auto_download/auto-download-usc.py
altymis/covid19-forecast-hub-europe
1a413439d0a4800356cfed8129ea943d14e37f8e
[ "MIT" ]
65
2020-05-20T07:42:36.000Z
2021-11-20T21:25:23.000Z
# Auto-download forecasts of Geneva-Team # Jakob Ketterer, November 2020 import re import os import urllib.request from dateutil.parser import parse from datetime import datetime, timedelta def get_filenames(date, root, format_str): '''get available csv files for dir specified by root link and date''' # open ...
37.455556
127
0.652625
import re import os import urllib.request from dateutil.parser import parse from datetime import datetime, timedelta def get_filenames(date, root, format_str): dirpath = root + date url = urllib.request.urlopen(dirpath) str = url.read().decode('utf-8') pattern = re.compile('/' + date + '/.*.c...
true
true
1c45243b3347721b169c75fea7b987a1e3a1f73d
79
py
Python
Chapter5_module_package_program/Section5.3_module_and_import/weatherman.py
skatsuta/introducing-python
945fc84ba58aaa2602e454890c8c6f26e403660e
[ "MIT" ]
null
null
null
Chapter5_module_package_program/Section5.3_module_and_import/weatherman.py
skatsuta/introducing-python
945fc84ba58aaa2602e454890c8c6f26e403660e
[ "MIT" ]
null
null
null
Chapter5_module_package_program/Section5.3_module_and_import/weatherman.py
skatsuta/introducing-python
945fc84ba58aaa2602e454890c8c6f26e403660e
[ "MIT" ]
null
null
null
import report desc = report.get_description() print("Today's weather:", desc)
15.8
31
0.746835
import report desc = report.get_description() print("Today's weather:", desc)
true
true
1c4525585f1c8640b6f463f98969dc51236fc7ed
2,259
py
Python
esp32/tools/lora/actility/actility.py
nevercast/pycom-micropython-sigfox
d1c5ea900b94fb62890742b54fa0b249b93c9f96
[ "MIT" ]
1
2019-03-28T10:37:35.000Z
2019-03-28T10:37:35.000Z
esp32/tools/lora/actility/actility.py
nevercast/pycom-micropython-sigfox
d1c5ea900b94fb62890742b54fa0b249b93c9f96
[ "MIT" ]
null
null
null
esp32/tools/lora/actility/actility.py
nevercast/pycom-micropython-sigfox
d1c5ea900b94fb62890742b54fa0b249b93c9f96
[ "MIT" ]
1
2019-09-22T01:28:52.000Z
2019-09-22T01:28:52.000Z
#!/usr/bin/env python # # Copyright (c) 2018, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information # see the Pycom Licence v1.0 document supplied with this file, or # available at https://www.pycom.io/opensource/licensing ...
33.220588
93
0.633023
from network import LoRa from machine import ADC import time import binascii import socket import struct DEV_EUI = '1A 2B 3C 4D 01 02 03' APP_EUI = 'AD A4 DA E3 AC 12 67 6B' APP_KEY = '11 B0 28 2A 18 9B 75 B0 B4 D2 D8 C7 FA 38 54 8B' DEV_ADDR = '00 00 00 0A' NWK_SWKEY = '2B 7E 15 16 28 AE D2 A6 AB F7 15 88 09 CF 4F...
true
true
1c4526eff1ed90273050f64a4dd975e16e39aea8
7,835
py
Python
airflow/providers/apache/kylin/operators/kylin_cube.py
DavisWang-LR/airflow
60b10ef9248ec59fecaa7628c07c76950005a35d
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
airflow/providers/apache/kylin/operators/kylin_cube.py
DavisWang-LR/airflow
60b10ef9248ec59fecaa7628c07c76950005a35d
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
airflow/providers/apache/kylin/operators/kylin_cube.py
DavisWang-LR/airflow
60b10ef9248ec59fecaa7628c07c76950005a35d
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
# # 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...
41.020942
105
0.657817
import time from datetime import datetime from typing import Optional from kylinpy import kylinpy from airflow.exceptions import AirflowException from airflow.models import BaseOperator from airflow.providers.apache.kylin.hooks.kylin import KylinHook from airflow.utils import timezone from airflow.utils.decorators i...
true
true
1c4527dedfe7c3af42d455407bac0356cec37b01
937
py
Python
tests/test_scraper.py
yasen-m/dosage
81fe088621ad335cac2a53fcbc7b9b37f49ddce2
[ "MIT" ]
null
null
null
tests/test_scraper.py
yasen-m/dosage
81fe088621ad335cac2a53fcbc7b9b37f49ddce2
[ "MIT" ]
null
null
null
tests/test_scraper.py
yasen-m/dosage
81fe088621ad335cac2a53fcbc7b9b37f49ddce2
[ "MIT" ]
null
null
null
# -*- coding: iso-8859-1 -*- # Copyright (C) 2013-2014 Bastian Kleineidam from unittest import TestCase from dosagelib import scraper class ScraperTester(TestCase): """Test scraper module functions.""" def test_get_scraperclasses(self): for scraperclass in scraper.get_scraperclasses(): sc...
34.703704
72
0.692636
from unittest import TestCase from dosagelib import scraper class ScraperTester(TestCase): def test_get_scraperclasses(self): for scraperclass in scraper.get_scraperclasses(): scraperobj = scraperclass() scraperobj = scraperclass(indexes=["bla"]) self.assertTrue(scrape...
true
true
1c4527ebc8a4e4ee7a6fe10a1481392fa1695e4a
438
py
Python
plotly/validators/contour/_ncontours.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
2
2020-03-24T11:41:14.000Z
2021-01-14T07:59:43.000Z
plotly/validators/contour/_ncontours.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
null
null
null
plotly/validators/contour/_ncontours.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
4
2019-06-03T14:49:12.000Z
2022-01-06T01:05:12.000Z
import _plotly_utils.basevalidators class NcontoursValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name='ncontours', parent_name='contour', **kwargs ): super(NcontoursValidator, self).__init__( plotly_name=plotly_name, parent_name=p...
25.764706
72
0.614155
import _plotly_utils.basevalidators class NcontoursValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name='ncontours', parent_name='contour', **kwargs ): super(NcontoursValidator, self).__init__( plotly_name=plotly_name, parent_name=p...
true
true
1c452813948fb86477b8078254ef466e67e018db
29,372
py
Python
notebook/home/.jupyter/jupyter_notebook_config.py
cj-lin/docker-hadoop-workbench
d2a74f28c4fd5cdcf38c080efae89edcfcf4d0b9
[ "MIT" ]
null
null
null
notebook/home/.jupyter/jupyter_notebook_config.py
cj-lin/docker-hadoop-workbench
d2a74f28c4fd5cdcf38c080efae89edcfcf4d0b9
[ "MIT" ]
null
null
null
notebook/home/.jupyter/jupyter_notebook_config.py
cj-lin/docker-hadoop-workbench
d2a74f28c4fd5cdcf38c080efae89edcfcf4d0b9
[ "MIT" ]
null
null
null
# Configuration file for jupyter-notebook. #------------------------------------------------------------------------------ # Application(SingletonConfigurable) configuration #------------------------------------------------------------------------------ ## This is an application. ## The date format used by logging f...
38.344648
103
0.703663
# # By default, requests get a 403 forbidden response if the 'Host' header shows # that the browser thinks it's on a non-local domain. Setting this option to # set_secure_cookie docs for details. #c.NotebookApp.cookie_options = {} ## The random bytes used to secure cookies. By default th...
true
true
1c452a490eeb077cc003533ae2228ef6439afa07
150
py
Python
cra_helper/context_processors.py
squidsoup/django-cra-helper
ba50c643c181a18b80ee9bbdbea74b58abd6daad
[ "MIT" ]
54
2017-04-03T20:20:16.000Z
2022-01-29T21:12:05.000Z
cra_helper/context_processors.py
squidsoup/django-cra-helper
ba50c643c181a18b80ee9bbdbea74b58abd6daad
[ "MIT" ]
23
2018-07-19T13:19:35.000Z
2021-09-22T19:25:39.000Z
cra_helper/context_processors.py
squidsoup/django-cra-helper
ba50c643c181a18b80ee9bbdbea74b58abd6daad
[ "MIT" ]
9
2019-03-21T20:24:14.000Z
2022-01-29T21:12:16.000Z
from cra_helper import STATIC_ASSET_MANIFEST def static(request): if STATIC_ASSET_MANIFEST: return STATIC_ASSET_MANIFEST return {}
16.666667
44
0.753333
from cra_helper import STATIC_ASSET_MANIFEST def static(request): if STATIC_ASSET_MANIFEST: return STATIC_ASSET_MANIFEST return {}
true
true
1c452b463aa824b02cb38ecbe8f981d73b33f2d7
169
py
Python
apps/account/urls.py
8area8/p8_pure_beurre
9e930f52a5f2c4c6c25a0a52b247f7b61fc7ffe8
[ "MIT" ]
null
null
null
apps/account/urls.py
8area8/p8_pure_beurre
9e930f52a5f2c4c6c25a0a52b247f7b61fc7ffe8
[ "MIT" ]
3
2020-06-05T19:09:18.000Z
2022-02-10T13:20:38.000Z
apps/account/urls.py
8area8/p8_pure_beurre
9e930f52a5f2c4c6c25a0a52b247f7b61fc7ffe8
[ "MIT" ]
null
null
null
"""account urls.""" from django.urls import path from django.conf.urls import url from . import views urlpatterns = [ path('', views.account, name='account'), ]
14.083333
44
0.680473
from django.urls import path from django.conf.urls import url from . import views urlpatterns = [ path('', views.account, name='account'), ]
true
true
1c452b77744be37b8ba91f4297cc5bee8a543b0b
6,704
py
Python
build/driver/depth_camera/image_transport_plugins/compressed_depth_image_transport/catkin_generated/pkg.installspace.context.pc.py
lty1994/atuolabor
42b8c52eac93a2e48fbd64275c7dd426a988000c
[ "Apache-2.0" ]
null
null
null
build/driver/depth_camera/image_transport_plugins/compressed_depth_image_transport/catkin_generated/pkg.installspace.context.pc.py
lty1994/atuolabor
42b8c52eac93a2e48fbd64275c7dd426a988000c
[ "Apache-2.0" ]
null
null
null
build/driver/depth_camera/image_transport_plugins/compressed_depth_image_transport/catkin_generated/pkg.installspace.context.pc.py
lty1994/atuolabor
42b8c52eac93a2e48fbd64275c7dd426a988000c
[ "Apache-2.0" ]
null
null
null
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/lty/catkin_ws/install/include;/opt/ros/kinetic/include/opencv-3.3.1-dev;/opt/ros/kinetic/include/opencv-3.3.1-dev/opencv".split(';') if "/home/lty/catkin_ws/install/include;/opt/ros/kinetic/inclu...
744.888889
6,082
0.800716
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/lty/catkin_ws/install/include;/opt/ros/kinetic/include/opencv-3.3.1-dev;/opt/ros/kinetic/include/opencv-3.3.1-dev/opencv".split(';') if "/home/lty/catkin_ws/install/include;/opt/ros/kinetic/include/opencv-3.3.1-dev;/opt/ros/kinetic/include/opencv-3.3.1...
true
true