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
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c1f17a2292e7517854a0a016451026e2b03690c
3,385
py
Python
tql/algo_ml/opt_params/XGBOptimizer.py
Jie-Yuan/1_DataMining
f5338388b4f883233f350d4fb9c5903180883430
[ "Apache-2.0" ]
14
2019-06-25T13:46:32.000Z
2020-10-27T02:04:59.000Z
tql/algo_ml/opt_params/XGBOptimizer.py
Jie-Yuan/2_DataMining
f5338388b4f883233f350d4fb9c5903180883430
[ "Apache-2.0" ]
null
null
null
tql/algo_ml/opt_params/XGBOptimizer.py
Jie-Yuan/2_DataMining
f5338388b4f883233f350d4fb9c5903180883430
[ "Apache-2.0" ]
7
2019-06-25T13:26:16.000Z
2020-10-27T02:05:03.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Project : tql-Python. # @File : XGBOptimizer # @Time : 2019-09-16 11:58 # @Author : yuanjie # @Email : yuanjie@xiaomi.com # @Software : PyCharm # @Description : import json import yaml import numpy as np import xgboost as xgb from...
30.772727
96
0.524668
import json import yaml import numpy as np import xgboost as xgb from tql.algo_ml.cv import LGBMClassifierCV, XGBClassifierCV from .Optimizer import Optimizer class XGBOptimizer(Optimizer): def __init__(self, X, y, cv=5, cv_seed=0, params_bounds=None, use_gpu=1): super().__init__(X, y, cv, cv_...
true
true
1c1f18253a1558857a1077f719cb35754bf766f6
7,151
py
Python
clnews/test/tests.py
antavelos/clnews
1437b8535c80b041a869af2068d99445b320f19d
[ "MIT" ]
null
null
null
clnews/test/tests.py
antavelos/clnews
1437b8535c80b041a869af2068d99445b320f19d
[ "MIT" ]
null
null
null
clnews/test/tests.py
antavelos/clnews
1437b8535c80b041a869af2068d99445b320f19d
[ "MIT" ]
null
null
null
#!/usr/bin/env python import unittest import datetime import os import sys sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/' + '../')) from clnews.exceptions import * from clnews.news import Event, Channel from clnews.shell import Shell from clnews.utils import remove_html, validate_url from clnews.com...
32.953917
76
0.57866
import unittest import datetime import os import sys sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/' + '../')) from clnews.exceptions import * from clnews.news import Event, Channel from clnews.shell import Shell from clnews.utils import remove_html, validate_url from clnews.commands import Command,...
true
true
1c1f1a74575c6d0b544a1db4ba48fb4e26d12e46
156
py
Python
index fix.py
aash-gates/aash-python-babysteps
cb88b02b0d33ac74acb183d4f11f6baad0ad3db9
[ "Unlicense" ]
7
2020-11-16T18:23:21.000Z
2021-12-18T14:08:54.000Z
index fix.py
aash-gates/aash-python-babysteps
cb88b02b0d33ac74acb183d4f11f6baad0ad3db9
[ "Unlicense" ]
null
null
null
index fix.py
aash-gates/aash-python-babysteps
cb88b02b0d33ac74acb183d4f11f6baad0ad3db9
[ "Unlicense" ]
1
2020-12-21T15:59:44.000Z
2020-12-21T15:59:44.000Z
#a Test program to over come the Index Error IBM Digital Nation string = "Alphabet" last_char = string[0] print(last_char.isalpha()) #end of test program
19.5
63
0.75641
string = "Alphabet" last_char = string[0] print(last_char.isalpha())
true
true
1c1f1abbfb945abac0af9e09102ae2117da0b35c
776
py
Python
easy/14-longest-common-prefix.py
wanglongjiang/leetcode
c61d2e719e81575cfb5bde9d64e15cee7cf01ef3
[ "MIT" ]
2
2021-03-14T11:38:26.000Z
2021-03-14T11:38:30.000Z
easy/14-longest-common-prefix.py
wanglongjiang/leetcode
c61d2e719e81575cfb5bde9d64e15cee7cf01ef3
[ "MIT" ]
null
null
null
easy/14-longest-common-prefix.py
wanglongjiang/leetcode
c61d2e719e81575cfb5bde9d64e15cee7cf01ef3
[ "MIT" ]
1
2022-01-17T19:33:23.000Z
2022-01-17T19:33:23.000Z
''' 编写一个函数来查找字符串数组中的最长公共前缀。 如果不存在公共前缀,返回空字符串 ""。 ''' from typing import List class Solution: def longestCommonPrefix(self, strs: List[str]) -> str: index = 0 while True: ch = '' for str in strs: if len(str) < index + 1 or (ch != '' and str[index] != ch): ...
26.758621
75
0.505155
from typing import List class Solution: def longestCommonPrefix(self, strs: List[str]) -> str: index = 0 while True: ch = '' for str in strs: if len(str) < index + 1 or (ch != '' and str[index] != ch): return str[:index] e...
true
true
1c1f1acd0ebd9e3139a89fb54fd42b77c2a60eb4
2,775
py
Python
quantumclient/common/clientmanager.py
danwent/python-quantumclient
d16e00a056bbe7ba576c4b7195180bfc383bbfad
[ "Apache-2.0" ]
1
2017-06-02T22:33:11.000Z
2017-06-02T22:33:11.000Z
quantumclient/common/clientmanager.py
danwent/python-quantumclient
d16e00a056bbe7ba576c4b7195180bfc383bbfad
[ "Apache-2.0" ]
null
null
null
quantumclient/common/clientmanager.py
danwent/python-quantumclient
d16e00a056bbe7ba576c4b7195180bfc383bbfad
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 OpenStack LLC. # 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...
33.841463
78
0.638198
import logging from quantumclient.common import exceptions as exc from quantumclient.quantum import client as quantum_client from quantumclient.client import HTTPClient LOG = logging.getLogger(__name__) class ClientCache(object): def __init__(self, factory): self.factory = factory ...
true
true
1c1f1acd6d1839fadb31653a14550645273190da
2,985
py
Python
fmi/pipeline.py
asvcode/fmi
38794a0cf150195c5cb6f750c4121d8276b20367
[ "Apache-2.0" ]
15
2020-11-30T05:23:12.000Z
2021-11-28T09:29:13.000Z
fmi/pipeline.py
asvcode/fmi
38794a0cf150195c5cb6f750c4121d8276b20367
[ "Apache-2.0" ]
3
2021-05-28T04:09:39.000Z
2021-08-11T18:12:53.000Z
fmi/pipeline.py
asvcode/fmi
38794a0cf150195c5cb6f750c4121d8276b20367
[ "Apache-2.0" ]
1
2021-08-12T15:14:29.000Z
2021-08-12T15:14:29.000Z
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/04_pipeline.ipynb (unless otherwise specified). __all__ = ['dicom_windows', 'scaled_px', 'DicomView', 'HistView', 'CustomPILDicom'] # Cell from fastai.torch_basics import * from fastai.data.all import * from fastai.data.external import * from fastai.medical.imaging imp...
35.963855
106
0.670017
__all__ = ['dicom_windows', 'scaled_px', 'DicomView', 'HistView', 'CustomPILDicom'] from fastai.torch_basics import * from fastai.data.all import * from fastai.data.external import * from fastai.medical.imaging import PILBase from fastai.medical.imaging import * from fastai.vision.all import * import pydicom from...
true
true
1c1f1b240a929b7cfe679cd333171d2b707ae7a8
2,455
py
Python
vpv.py
Dorky-Lever/vpv
0f156b2ad79cbb7060140434e34b5841ab5b1a26
[ "Apache-2.0" ]
null
null
null
vpv.py
Dorky-Lever/vpv
0f156b2ad79cbb7060140434e34b5841ab5b1a26
[ "Apache-2.0" ]
null
null
null
vpv.py
Dorky-Lever/vpv
0f156b2ad79cbb7060140434e34b5841ab5b1a26
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python3 import sys if sys.version_info[0] < 3: sys.exit("VPV must me run with Python3. Exiting") from PyQt5 import QtGui from vpv.vpv import Vpv from vpv.utils import data_loader from vpv.common import Orientation, Layers, log_path, error_dialog from vpv._version import __version__ as vpv_versi...
33.175676
126
0.645621
import sys if sys.version_info[0] < 3: sys.exit("VPV must me run with Python3. Exiting") from PyQt5 import QtGui from vpv.vpv import Vpv from vpv.utils import data_loader from vpv.common import Orientation, Layers, log_path, error_dialog from vpv._version import __version__ as vpv_version import logging impor...
true
true
1c1f1d0ec0c87aac3a479e806465a1a413fedc93
141,980
py
Python
electrum/wallet.py
TDCoin-Dev-Team/tdc-electrum
75a7ac26f0c1465bda7d17c002537e1bcc14ce32
[ "MIT" ]
1
2021-07-08T10:15:02.000Z
2021-07-08T10:15:02.000Z
electrum/wallet.py
TDCoin-Dev-Team/tdc-electrum
75a7ac26f0c1465bda7d17c002537e1bcc14ce32
[ "MIT" ]
null
null
null
electrum/wallet.py
TDCoin-Dev-Team/tdc-electrum
75a7ac26f0c1465bda7d17c002537e1bcc14ce32
[ "MIT" ]
null
null
null
# Electrum - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights t...
41.795702
150
0.614136
import os import sys import random import time import json import copy import errno import traceback import operator import math from functools import partial from collections import defaultdict from numbers import Number from decimal import Decimal from typing import TYPE_CHECKING, List, Op...
true
true
1c1f1e2f2c208b94d8e13e023a34be6ead1c09c8
1,997
py
Python
words.py
Heckin-Doggo/tts-app
b3d1cef4a76d98578e967b89b60139ee38e85742
[ "MIT" ]
null
null
null
words.py
Heckin-Doggo/tts-app
b3d1cef4a76d98578e967b89b60139ee38e85742
[ "MIT" ]
null
null
null
words.py
Heckin-Doggo/tts-app
b3d1cef4a76d98578e967b89b60139ee38e85742
[ "MIT" ]
null
null
null
import pickle import os words = [] class WordHolderClass: # defined in order to be saved in pickle def __init__(self): pass word_list = {} def list_words(self): print(self.word_list) def get_top_words(self, all=False): top_words_dict = sorted(self.word_list.i...
25.602564
106
0.603405
import pickle import os words = [] class WordHolderClass: def __init__(self): pass word_list = {} def list_words(self): print(self.word_list) def get_top_words(self, all=False): top_words_dict = sorted(self.word_list.items(), key=lambda kv: kv[1]) to...
true
true
1c1f1fa9fa481c664b5038ee45e1906f67886c0d
449
py
Python
pocsuite/lib/utils/versioncheck.py
qq758689805/Pocsuite-dev
9d1d15c100a9637b8cd782bfca3daa5d3b235add
[ "OLDAP-2.6", "Python-2.0" ]
1,991
2015-08-06T12:26:16.000Z
2022-03-31T13:58:15.000Z
pocsuite/lib/utils/versioncheck.py
qq758689805/Pocsuite-dev
9d1d15c100a9637b8cd782bfca3daa5d3b235add
[ "OLDAP-2.6", "Python-2.0" ]
85
2015-08-26T03:43:59.000Z
2021-11-02T02:34:05.000Z
pocsuite/lib/utils/versioncheck.py
qq758689805/Pocsuite-dev
9d1d15c100a9637b8cd782bfca3daa5d3b235add
[ "OLDAP-2.6", "Python-2.0" ]
742
2015-08-22T23:17:54.000Z
2022-01-18T08:55:33.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) See the file 'docs/COPYING' for copying permission """ import sys PYVERSION = sys.version.split()[0] if PYVERSION >= "3" or PYVERSION < "2.6": exit("[-] incompatible Python version detected ('%s')....
29.933333
186
0.685969
import sys PYVERSION = sys.version.split()[0] if PYVERSION >= "3" or PYVERSION < "2.6": exit("[-] incompatible Python version detected ('%s'). For successfully running pocsuite you'll have to use version 2.6 or 2.7 (visit 'http://www.python.org/download/')" % PYVERSION)
true
true
1c1f1fcbe27208bd17212320781386476fd611be
764
py
Python
config.py
Mohammed-Faidey/ud-catalog
a4c7db9284efe7bf5d528a9372b6d16b55b0b294
[ "MIT" ]
null
null
null
config.py
Mohammed-Faidey/ud-catalog
a4c7db9284efe7bf5d528a9372b6d16b55b0b294
[ "MIT" ]
null
null
null
config.py
Mohammed-Faidey/ud-catalog
a4c7db9284efe7bf5d528a9372b6d16b55b0b294
[ "MIT" ]
null
null
null
class Auth: """ Auth class contains details for flow used in OAuth authentication using Google """ # OAuth credentials CLIENT_ID = '<494683665446-r08617vleja50ht306krubjlclu3mi1h.apps.googleusercontent.com>' CLIENT_SECRET = '<cnprTYSQrLkSvy-V0Dc5wULz>' # URI that google server will redir...
40.210526
92
0.704188
class Auth: CLIENT_ID = '<494683665446-r08617vleja50ht306krubjlclu3mi1h.apps.googleusercontent.com>' CLIENT_SECRET = '<cnprTYSQrLkSvy-V0Dc5wULz>' REDIRECT_URI = '"http://localhost:8000"' AUTH_URI = 'https://accounts.google.com/o/oauth2/auth' TOKEN_URI = 'https://oauth2.googleapis...
true
true
1c1f20851a5cd602fb6e59c5b7b52bdd07211f1e
4,442
py
Python
main.py
mori97/VaDE
b3c3bdcdd758415d61ffe9f21733d32b89304643
[ "MIT" ]
17
2019-11-12T06:13:30.000Z
2021-11-26T12:23:16.000Z
main.py
mori97/VaDE
b3c3bdcdd758415d61ffe9f21733d32b89304643
[ "MIT" ]
3
2019-11-19T12:06:41.000Z
2022-01-11T12:29:08.000Z
main.py
mori97/VaDE
b3c3bdcdd758415d61ffe9f21733d32b89304643
[ "MIT" ]
3
2020-05-13T08:02:44.000Z
2021-08-17T02:37:06.000Z
import argparse import matplotlib.pyplot as plt from munkres import Munkres from sklearn.manifold import TSNE import torch import torch.utils.data from torch.utils.tensorboard import SummaryWriter from torchvision import datasets, transforms from vade import VaDE, lossfun N_CLASSES = 10 PLOT_NUM_PER_CLASS = 128 de...
33.651515
79
0.599955
import argparse import matplotlib.pyplot as plt from munkres import Munkres from sklearn.manifold import TSNE import torch import torch.utils.data from torch.utils.tensorboard import SummaryWriter from torchvision import datasets, transforms from vade import VaDE, lossfun N_CLASSES = 10 PLOT_NUM_PER_CLASS = 128 de...
true
true
1c1f214a8290aca045e4dcc29301269f19066240
427
py
Python
blueprints/users/manage/views/revoke_session.py
GetmeUK/h51
17d4003336857514765a42a0853995fbe3da6525
[ "MIT" ]
null
null
null
blueprints/users/manage/views/revoke_session.py
GetmeUK/h51
17d4003336857514765a42a0853995fbe3da6525
[ "MIT" ]
4
2021-06-08T22:58:13.000Z
2022-03-12T00:53:18.000Z
blueprints/users/manage/views/revoke_session.py
GetmeUK/h51
17d4003336857514765a42a0853995fbe3da6525
[ "MIT" ]
null
null
null
""" Revoke a user's session. """ from manhattan.users import views from blueprints.users.manage.config import UserConfig # Chains revoke_session_chains = views.revoke_session_chains.copy() # Set the URLs UserConfig.add_view_rule( '/users/revoke-session', 'revoke_session', revoke_session_chains ) User...
16.423077
58
0.747073
from manhattan.users import views from blueprints.users.manage.config import UserConfig revoke_session_chains = views.revoke_session_chains.copy() UserConfig.add_view_rule( '/users/revoke-session', 'revoke_session', revoke_session_chains ) UserConfig.add_view_rule( '/users/revoke-my-session', ...
true
true
1c1f2160a4828a9e636858652df87c5598ee65ea
174
py
Python
tests/tests/__init__.py
mzedel/integration
97775b3fc9918acf7202d51b3fa8556c18010f62
[ "Apache-2.0" ]
null
null
null
tests/tests/__init__.py
mzedel/integration
97775b3fc9918acf7202d51b3fa8556c18010f62
[ "Apache-2.0" ]
5
2022-02-23T10:05:07.000Z
2022-02-23T10:06:04.000Z
tests/tests/__init__.py
mzedel/integration
97775b3fc9918acf7202d51b3fa8556c18010f62
[ "Apache-2.0" ]
1
2020-08-18T15:39:46.000Z
2020-08-18T15:39:46.000Z
import filelock import logging from mendertesting import MenderTesting artifact_lock = filelock.FileLock(".artifact_modification_lock") logger = logging.getLogger("mender")
24.857143
64
0.83908
import filelock import logging from mendertesting import MenderTesting artifact_lock = filelock.FileLock(".artifact_modification_lock") logger = logging.getLogger("mender")
true
true
1c1f21a670643f76918e6d3ced30953144ea85ad
3,190
py
Python
LDAR_Sim/src/methods/deployment/template_company.py
SensorUp/LDAR_Sim
e341998257eb3c74497c950935c02bb81c01eb32
[ "MIT" ]
2
2021-11-08T13:55:45.000Z
2021-11-16T16:46:07.000Z
LDAR_Sim/src/methods/deployment/template_company.py
SensorUp/LDAR_Sim
e341998257eb3c74497c950935c02bb81c01eb32
[ "MIT" ]
123
2021-05-17T15:41:32.000Z
2022-03-09T16:34:07.000Z
LDAR_Sim/src/methods/deployment/template_company.py
SensorUp/LDAR_Sim
e341998257eb3c74497c950935c02bb81c01eb32
[ "MIT" ]
2
2021-11-18T17:10:10.000Z
2022-01-14T21:39:06.000Z
# ------------------------------------------------------------------------------ # Program: The LDAR Simulator (LDAR-Sim) # File: methods.deployment.template_company # Purpose: Template company specific deployment classes and methods (ie. Scheduling) # # Copyright (C) 2018-2021 Intelligent Methane Monit...
35.444444
92
0.608777
from methods.crew import BaseCrew def make_crews(crews, config, state, parameters, timeseries, deployment_days): for i in range(config['n_crews']): crews.append(BaseCrew(state, parameters, config, timeseries, deployment_days, id=i + 1)) class Schedule(...
true
true
1c1f21d534dfa0c80368907b8ae6359849101977
429
py
Python
char/char.py
dannl/hunter-sim-classic
e32cccc8431cc3e78b08067dd58e10fec52aac6a
[ "MIT" ]
null
null
null
char/char.py
dannl/hunter-sim-classic
e32cccc8431cc3e78b08067dd58e10fec52aac6a
[ "MIT" ]
null
null
null
char/char.py
dannl/hunter-sim-classic
e32cccc8431cc3e78b08067dd58e10fec52aac6a
[ "MIT" ]
null
null
null
from char.char_state import CharState from engine import Engine from rotation.rotation import Rotation class Char: def __init__(self, engine, rotation,char_state): """ :param Engine engine: :param Rotation rotation: :param CharState char_state: """ self.engine = e...
22.578947
52
0.65035
from char.char_state import CharState from engine import Engine from rotation.rotation import Rotation class Char: def __init__(self, engine, rotation,char_state): self.engine = engine self.char_state = char_state self.rotation = rotation self.target_armor = 3750
true
true
1c1f221e9a65d5c9aa6e206df228e33ab82aca3a
14,929
py
Python
diskover/diskover_elasticsearch.py
BearerPipelineTest/diskover-community
9fa8ca441fc842ea4852920960eba7c0e80bf9ed
[ "Apache-2.0" ]
96
2021-09-22T11:04:55.000Z
2022-03-28T00:34:53.000Z
diskover/diskover_elasticsearch.py
BearerPipelineTest/diskover-community
9fa8ca441fc842ea4852920960eba7c0e80bf9ed
[ "Apache-2.0" ]
25
2021-09-19T18:45:27.000Z
2022-03-28T15:59:45.000Z
diskover/diskover_elasticsearch.py
BearerPipelineTest/diskover-community
9fa8ca441fc842ea4852920960eba7c0e80bf9ed
[ "Apache-2.0" ]
6
2021-10-16T20:27:02.000Z
2022-03-18T03:08:56.000Z
#!/usr/bin/env python3 """ diskover community edition (ce) https://github.com/diskoverdata/diskover-community/ https://diskoverdata.com Copyright 2017-2021 Diskover Data, Inc. "Community" portion of Diskover made available under the Apache 2.0 License found here: https://www.diskoverdata.com/apache-license/ All othe...
34.006834
116
0.51611
import os import sys import confuse import requests import logging import elasticsearch import warnings from elasticsearch import helpers from elasticsearch.helpers.errors import BulkIndexError from diskover_helpers import load_plugins logger = logging.getLogger(__name__) config = confuse.Configuration('diskover'...
true
true
1c1f22926dc7cc2d03849d7f77c6d4980adb3cdc
28,806
py
Python
venv/lib/python3.8/site-packages/click/termui.py
avrumnoor/NewsSummarizer
a963497ef9bc62d2148aa28e624ea32955992f57
[ "MIT" ]
1
2021-05-08T10:47:35.000Z
2021-05-08T10:47:35.000Z
venv/lib/python3.8/site-packages/click/termui.py
avrumnoor/NewsSummarizer
a963497ef9bc62d2148aa28e624ea32955992f57
[ "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/click/termui.py
avrumnoor/NewsSummarizer
a963497ef9bc62d2148aa28e624ea32955992f57
[ "MIT" ]
2
2021-05-03T04:02:50.000Z
2021-05-18T01:34:45.000Z
import inspect import io import itertools import os import sys import typing import typing as t from gettext import gettext as _ from ._compat import isatty from ._compat import strip_ansi from ._compat import WIN from .exceptions import Abort from .exceptions import UsageError from .globals import resolve_color_defau...
35.65099
87
0.635493
import inspect import io import itertools import os import sys import typing import typing as t from gettext import gettext as _ from ._compat import isatty from ._compat import strip_ansi from ._compat import WIN from .exceptions import Abort from .exceptions import UsageError from .globals import resolve_color_defau...
true
true
1c1f23de6ae25fafa3a19c3ddc16224632618e64
321
py
Python
dauphin/image/transforms/invert.py
PushparajaMurugan/dauphin
4d9832c72288282e6b3d03be1b0ad8708282b005
[ "Apache-2.0" ]
18
2020-07-08T21:53:09.000Z
2021-02-18T03:46:54.000Z
dauphin/image/transforms/invert.py
PushparajaMurugan/dauphin
4d9832c72288282e6b3d03be1b0ad8708282b005
[ "Apache-2.0" ]
4
2020-08-30T17:47:35.000Z
2020-12-04T12:09:41.000Z
dauphin/image/transforms/invert.py
PushparajaMurugan/dauphin
4d9832c72288282e6b3d03be1b0ad8708282b005
[ "Apache-2.0" ]
8
2020-07-12T08:03:30.000Z
2021-04-13T15:09:37.000Z
from PIL import ImageOps from dauphin.image.transforms.transform import DauphinTransform class Invert(DauphinTransform): def __init__(self, name=None, prob=1.0, level=0): super().__init__(name, prob, level) def transform(self, pil_img, label, **kwargs): return ImageOps.invert(pil_img), label...
26.75
63
0.722741
from PIL import ImageOps from dauphin.image.transforms.transform import DauphinTransform class Invert(DauphinTransform): def __init__(self, name=None, prob=1.0, level=0): super().__init__(name, prob, level) def transform(self, pil_img, label, **kwargs): return ImageOps.invert(pil_img), label...
true
true
1c1f2433a17e8324b8bdbac205a31793d32f680b
3,995
py
Python
Pendulum_Test_Env.py
GrayKS3248/RL_Agents
dc84321b18131b811f39bc5491f4714e3554d610
[ "MIT" ]
null
null
null
Pendulum_Test_Env.py
GrayKS3248/RL_Agents
dc84321b18131b811f39bc5491f4714e3554d610
[ "MIT" ]
null
null
null
Pendulum_Test_Env.py
GrayKS3248/RL_Agents
dc84321b18131b811f39bc5491f4714e3554d610
[ "MIT" ]
null
null
null
import random import numpy as np import scipy.integrate class Pendulum(): def __init__(self, n_theta=31, n_thetadot=31, n_tau=31): # Parameters that describe the physical system self.params = { 'm': 1.0, # mass 'g': 9.8, # acceleration of gravity 'l': 1.0, ...
33.291667
166
0.573217
import random import numpy as np import scipy.integrate class Pendulum(): def __init__(self, n_theta=31, n_thetadot=31, n_tau=31): self.params = { 'm': 1.0, 'g': 9.8, 'l': 1.0, 'b': 0.1, } self.max_thetadot = 15...
true
true
1c1f252b994e5d359067216cb5fc8622ba74d7ac
1,157
py
Python
setup.py
faberto/gps2nextcloud
4e59589ecdc8d5379205676b99c4cd76449f88e9
[ "MIT" ]
2
2019-07-12T19:29:05.000Z
2020-08-05T12:43:31.000Z
setup.py
faberto/gps2nextcloud
4e59589ecdc8d5379205676b99c4cd76449f88e9
[ "MIT" ]
1
2019-07-15T21:52:03.000Z
2019-09-05T13:08:08.000Z
setup.py
faberto/gps2nextcloud
4e59589ecdc8d5379205676b99c4cd76449f88e9
[ "MIT" ]
3
2019-07-15T21:03:42.000Z
2021-05-18T10:09:02.000Z
from io import open from os.path import join, dirname from setuptools import setup, find_packages import gps2nextcloud setup( name='gps2nextcloud', version=gps2nextcloud.__version__, packages=find_packages(), url='https://github.com/AlexanderBekrenev/gps2nextcloud', license='MIT', author='Alex...
33.057143
85
0.647364
from io import open from os.path import join, dirname from setuptools import setup, find_packages import gps2nextcloud setup( name='gps2nextcloud', version=gps2nextcloud.__version__, packages=find_packages(), url='https://github.com/AlexanderBekrenev/gps2nextcloud', license='MIT', author='Alex...
true
true
1c1f25e37a7af6c0e019ff3961cc47ba50b3df8a
4,836
py
Python
smartobjects/smartobjects_client.py
mnubo/smartobjects-python-client
663456781c9e791fad99adce2db18d465a4df46d
[ "MIT" ]
3
2016-12-21T20:26:59.000Z
2020-09-29T15:44:54.000Z
smartobjects/smartobjects_client.py
mnubo/smartobjects-python-client
663456781c9e791fad99adce2db18d465a4df46d
[ "MIT" ]
22
2017-01-11T21:10:44.000Z
2021-02-19T20:18:06.000Z
smartobjects/smartobjects_client.py
mnubo/smartobjects-python-client
663456781c9e791fad99adce2db18d465a4df46d
[ "MIT" ]
8
2016-11-01T17:42:41.000Z
2021-01-27T19:47:30.000Z
from typing import Optional, Dict, Any from smartobjects.api_manager import APIManager from smartobjects.datalake.datasets import DatalakeService from smartobjects.ingestion.events import EventsService from smartobjects.ingestion.objects import ObjectsService from smartobjects.ingestion.owners import OwnersService fro...
53.142857
130
0.723945
from typing import Optional, Dict, Any from smartobjects.api_manager import APIManager from smartobjects.datalake.datasets import DatalakeService from smartobjects.ingestion.events import EventsService from smartobjects.ingestion.objects import ObjectsService from smartobjects.ingestion.owners import OwnersService fro...
true
true
1c1f26015b4b07a717335661b08b507f992be210
11,441
py
Python
examples/2xov_complete/mm_run_with_pulling_start.py
XingchengLin/openawsem
a9f155d72e359b76d350e6d4c2ee476410ebe4c6
[ "MIT" ]
15
2019-11-01T21:43:43.000Z
2022-01-05T15:53:15.000Z
examples/2xov_complete/mm_run_with_pulling_start.py
XingchengLin/openawsem
a9f155d72e359b76d350e6d4c2ee476410ebe4c6
[ "MIT" ]
10
2019-02-06T17:07:45.000Z
2021-10-19T02:20:41.000Z
examples/2xov_complete/mm_run_with_pulling_start.py
XingchengLin/openawsem
a9f155d72e359b76d350e6d4c2ee476410ebe4c6
[ "MIT" ]
8
2018-12-30T18:01:47.000Z
2021-05-27T21:07:17.000Z
#!/usr/bin/env python3 import os import sys import random import time from random import seed, randint import argparse import platform from datetime import datetime from time import sleep import fileinput import importlib.util try: OPENAWSEM_LOCATION = os.environ["OPENAWSEM_LOCATION"] sys.path.append(OPENAWSEM...
45.764
207
0.744253
import os import sys import random import time from random import seed, randint import argparse import platform from datetime import datetime from time import sleep import fileinput import importlib.util try: OPENAWSEM_LOCATION = os.environ["OPENAWSEM_LOCATION"] sys.path.append(OPENAWSEM_LOCATION) except...
true
true
1c1f26acb8d79fab5daba027b3b5fcc1993d74ea
2,866
py
Python
tests/functional/gtcs/test_crash_of_group_by_varchar_4000.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/functional/gtcs/test_crash_of_group_by_varchar_4000.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/functional/gtcs/test_crash_of_group_by_varchar_4000.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
#coding:utf-8 # # id: functional.gtcs.crash_of_group_by_varchar_4000 # title: GTCS/tests/CF_ISQL_33. Crash on attempt to GROUP BY on table with varchar(4000) field # decription: # ::: NB ::: # ### Name of original test has no any relation with actual task of this test:...
28.098039
104
0.602233
" CREATE TABLE SNIPPETS ( f01 VARCHAR(4000) COLLATE DE_DE ); SET TERM ^; insert into snippets values(' function JsShowZeroFilled(inValue) { if(inValue > 9) { return inValue; } else { return ''0'' + inValue; } } function JsGetWochentagname(wochentag,wochent...
true
true
1c1f271a76d2ab0fe507e0a1f680ed546d27f182
2,095
py
Python
imgreco/ocr/baidu.py
dantmnf/ArknightsAutoHelper
d5bbe58ec69edfd15ef3881efc943701c1543c6f
[ "MIT" ]
2
2019-09-20T11:48:26.000Z
2019-12-08T09:33:48.000Z
imgreco/ocr/baidu.py
dantmnf/ArknightsAutoHelper
d5bbe58ec69edfd15ef3881efc943701c1543c6f
[ "MIT" ]
null
null
null
imgreco/ocr/baidu.py
dantmnf/ArknightsAutoHelper
d5bbe58ec69edfd15ef3881efc943701c1543c6f
[ "MIT" ]
null
null
null
import base64 import time from functools import lru_cache from io import BytesIO #from aip import AipOcr import requests from config import enable_baidu_api, APP_ID, API_KEY, SECRET_KEY from .common import * is_online = True info = "baidu" def check_supported(): if enable_baidu_api: return True else...
27.565789
132
0.638663
import base64 import time from functools import lru_cache from io import BytesIO import requests from config import enable_baidu_api, APP_ID, API_KEY, SECRET_KEY from .common import * is_online = True info = "baidu" def check_supported(): if enable_baidu_api: return True else: return False ...
true
true
1c1f273097f5fab48bef7adaecd1dac276cda7b8
2,225
py
Python
openiva/commons/facial/database.py
QuantumLiu/OpenIVA
4c97a28f999965bab1f4e9e9fd0289df96669526
[ "Apache-2.0" ]
8
2021-12-08T06:46:27.000Z
2022-01-15T15:36:31.000Z
openiva/commons/facial/database.py
QuantumLiu/OpenIVA
4c97a28f999965bab1f4e9e9fd0289df96669526
[ "Apache-2.0" ]
null
null
null
openiva/commons/facial/database.py
QuantumLiu/OpenIVA
4c97a28f999965bab1f4e9e9fd0289df96669526
[ "Apache-2.0" ]
1
2022-03-03T02:15:08.000Z
2022-03-03T02:15:08.000Z
import os import json import numpy as np import h5py class FacialDB(object): ''' 人脸信息数据库 Facial info database 存储人脸对应的姓名、性别、特征向量等,可执行查询方法 ''' _DB_DICT={} def __init__(self,path_json=None,db_dict=None) -> None: if not path_json is None: self.load_json(path_json) ...
26.807229
95
0.654831
import os import json import numpy as np import h5py class FacialDB(object): _DB_DICT={} def __init__(self,path_json=None,db_dict=None) -> None: if not path_json is None: self.load_json(path_json) if not db_dict is None: self.update(db_dict) def query_N2N(se...
true
true
1c1f287463327c1c25d08ff3e3dbc77434d78e4f
2,015
py
Python
ColordetectionFINAL.py
abhinav-chinta/Class-12-comp_project
47f7b5d3ce59517031864f554f19cc816f4e2400
[ "MIT" ]
null
null
null
ColordetectionFINAL.py
abhinav-chinta/Class-12-comp_project
47f7b5d3ce59517031864f554f19cc816f4e2400
[ "MIT" ]
null
null
null
ColordetectionFINAL.py
abhinav-chinta/Class-12-comp_project
47f7b5d3ce59517031864f554f19cc816f4e2400
[ "MIT" ]
null
null
null
import numpy as np import cv2 import pyautogui webcam = cv2.VideoCapture(0) while(1): # Reading the video from the # webcam in image frames _, imageFrame = webcam.read() # Convert the imageFrame in # BGR(RGB color space) to # HSV(hue-saturation-value...
31
69
0.496278
import numpy as np import cv2 import pyautogui webcam = cv2.VideoCapture(0) while(1): _, imageFrame = webcam.read() hsvFrame = cv2.cvtColor(imageFrame, cv2.COLOR_BGR2HSV) red_lower = np.array([140, 90, 111], np.uint...
true
true
1c1f2a08f276050a93a107a1dd39548b106f1052
5,739
py
Python
data/datasets/market1501.py
huangzongheng/NAMA
e9bc5b9ca0c1dd5fff2f0613fdaac9fc5b038152
[ "MIT" ]
null
null
null
data/datasets/market1501.py
huangzongheng/NAMA
e9bc5b9ca0c1dd5fff2f0613fdaac9fc5b038152
[ "MIT" ]
null
null
null
data/datasets/market1501.py
huangzongheng/NAMA
e9bc5b9ca0c1dd5fff2f0613fdaac9fc5b038152
[ "MIT" ]
null
null
null
# encoding: utf-8 """ @author: sherlock @contact: sherlockliao01@gmail.com """ import glob import re import os import mat4py import numpy as np import os.path as osp from .bases import BaseImageDataset MARKET_ATTR_PARTS = { 'head':['hair', 'hat',], 'up':['upblack', 'upblue', ...
35.208589
121
0.579718
import glob import re import os import mat4py import numpy as np import os.path as osp from .bases import BaseImageDataset MARKET_ATTR_PARTS = { 'head':['hair', 'hat',], 'up':['upblack', 'upblue', 'upgreen', 'upgray', 'uppurple', 'upred', ...
true
true
1c1f2b3b3d3820c98008b34c1be6cc866b211fa7
7,713
py
Python
psg_utils/io/hypnogram/dhedreader.py
perslev/sleep-utils
9f9edf67f4cac6d8361243b4153bfe6351314844
[ "MIT" ]
1
2022-03-17T10:37:17.000Z
2022-03-17T10:37:17.000Z
psg_utils/io/hypnogram/dhedreader.py
perslev/sleep-utils
9f9edf67f4cac6d8361243b4153bfe6351314844
[ "MIT" ]
null
null
null
psg_utils/io/hypnogram/dhedreader.py
perslev/sleep-utils
9f9edf67f4cac6d8361243b4153bfe6351314844
[ "MIT" ]
null
null
null
""" MODIFIED FROM DeepSleepNet IMPLEMENTATION https://github.com/akaraspt/deepsleepnet https://github.com/akaraspt/deepsleepnet/blob/master/dhedfreader.py Reader for EDF+ files. """ import logging import re import datetime import numpy as np from collections import namedtuple logger = logging.getLogger(__name__) EVE...
33.38961
89
0.580578
import logging import re import datetime import numpy as np from collections import namedtuple logger = logging.getLogger(__name__) EVENT_CHANNEL = 'EDF Annotations' class EDFEndOfData(Exception): pass def tal(tal_str): exp = b'(?P<onset>[+\-]\d+(?:\.\d*)?)' + \ b'(?:\x15(?P<duration>\d+(?:\.\d*)?))...
true
true
1c1f2b60708e74ad97f3289857ff6350885e8548
2,363
py
Python
tests/plot_distortions.py
tjiagoM/quantised-bayesian-nets
c6ff1db376c366633afa2845b7527cc144ffd3b2
[ "BSD-3-Clause" ]
13
2021-02-23T09:48:10.000Z
2021-12-30T18:04:30.000Z
tests/plot_distortions.py
tjiagoM/quantised-bayesian-nets
c6ff1db376c366633afa2845b7527cc144ffd3b2
[ "BSD-3-Clause" ]
1
2021-06-15T16:24:36.000Z
2021-06-15T16:24:36.000Z
tests/plot_distortions.py
tjiagoM/quantised-bayesian-nets
c6ff1db376c366633afa2845b7527cc144ffd3b2
[ "BSD-3-Clause" ]
1
2021-06-15T14:53:20.000Z
2021-06-15T14:53:20.000Z
import sys import argparse import numpy as np import logging sys.path.append("../") sys.path.append("../../") sys.path.append("../../../") sys.path.append("../../../../") sys.path.append("../../../../../") from experiments.utils import DISTORTIONS, LEVELS import src.utils as utils from src.data import get_test_load...
35.268657
105
0.66314
import sys import argparse import numpy as np import logging sys.path.append("../") sys.path.append("../../") sys.path.append("../../../") sys.path.append("../../../../") sys.path.append("../../../../../") from experiments.utils import DISTORTIONS, LEVELS import src.utils as utils from src.data import get_test_load...
true
true
1c1f2b7d65886073b53547205bc5e0d6aab5667e
8,995
py
Python
docs/conf.py
xrotwang/pyimeji
f55e89276ac27db09028aa2ebae560052b890a2b
[ "Apache-2.0" ]
null
null
null
docs/conf.py
xrotwang/pyimeji
f55e89276ac27db09028aa2ebae560052b890a2b
[ "Apache-2.0" ]
null
null
null
docs/conf.py
xrotwang/pyimeji
f55e89276ac27db09028aa2ebae560052b890a2b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # pyimeji documentation build configuration file, created by # sphinx-quickstart on Mon Nov 10 17:02:41 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
32.010676
79
0.715953
import sys import os extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'pyimeji' copyright = u'2014, Robert Forkel' # |version| and |release|, also used in various other pl...
true
true
1c1f2bc7912a4e05811eb0abe262310c6c5392ea
423
py
Python
numba/type_inference/modules/numbamodule.py
shiquanwang/numba
a41c85fdd7d6abf8ea1ebe9116939ddc2217193b
[ "BSD-2-Clause" ]
1
2015-11-05T19:33:18.000Z
2015-11-05T19:33:18.000Z
numba/type_inference/modules/numbamodule.py
shiquanwang/numba
a41c85fdd7d6abf8ea1ebe9116939ddc2217193b
[ "BSD-2-Clause" ]
null
null
null
numba/type_inference/modules/numbamodule.py
shiquanwang/numba
a41c85fdd7d6abf8ea1ebe9116939ddc2217193b
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import numpy as np import numba from numba.minivect import minitypes from numba import typesystem from numba.type_inference.module_type_inference import register, register_inferer @register(numba) def typeof(expr_type): from...
24.882353
81
0.791962
from __future__ import print_function, division, absolute_import import numpy as np import numba from numba.minivect import minitypes from numba import typesystem from numba.type_inference.module_type_inference import register, register_inferer @register(numba) def typeof(expr_type): from numba import nodes ...
true
true
1c1f2bf5638ec9dc523b72bf706ea5ca4dd56c51
6,684
py
Python
bindings/python/ensmallen_graph/datasets/string/cyanidioschyzonmerolae.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/cyanidioschyzonmerolae.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/cyanidioschyzonmerolae.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Cyanidioschyzon merolae. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 202...
35.365079
223
0.703621
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen_graph import EnsmallenGraph def CyanidioschyzonMerolae( directed: bool = False, verbose: int = 2, cache_path: str = "graphs/string", **additional_graph_kwargs: Dict ) -> EnsmallenGraph: ...
true
true
1c1f2c0e03052e4502301a598860edf5b8be1249
1,700
py
Python
celiagg/tests/test_no_text.py
celiagg/celia
2eff50ab901c297e6f6e8491ddba997e325ffcb9
[ "MIT" ]
18
2016-12-11T16:44:23.000Z
2021-10-11T11:17:40.000Z
celiagg/tests/test_no_text.py
celiagg/celia
2eff50ab901c297e6f6e8491ddba997e325ffcb9
[ "MIT" ]
36
2016-11-26T01:59:38.000Z
2021-04-15T07:31:34.000Z
celiagg/tests/test_no_text.py
pyagg/pyagg
2eff50ab901c297e6f6e8491ddba997e325ffcb9
[ "MIT" ]
4
2016-12-22T12:53:10.000Z
2018-10-07T17:57:50.000Z
# The MIT License (MIT) # # Copyright (c) 2016-2021 Celiagg Contributors # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to us...
40.47619
79
0.744706
import unittest import numpy as np import celiagg as agg @unittest.skipIf(agg.HAS_TEXT, 'Text support is available') class TestNoTextSupport(unittest.TestCase): def test_no_text_draw_text_failure(self): buffer = np.zeros((1, 1), dtype=np.uint8) canvas = agg.CanvasG8(buffer...
true
true
1c1f2c2eeefbec349fe26d3d45d82a1c2010626e
93,135
py
Python
sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2018_04_01/aio/operations/_iot_hub_resource_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2018_04_01/aio/operations/_iot_hub_resource_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
4
2019-04-17T17:57:49.000Z
2020-04-24T21:11:22.000Z
sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2018_04_01/aio/operations/_iot_hub_resource_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
1
2019-04-05T18:17:43.000Z
2019-04-05T18:17:43.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.425014
254
0.668342
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure....
true
true
1c1f2df3a8c8dafa446f93195700778807db3c4b
1,119
py
Python
hackerrank/bfs_shortest_reach_in_graph/test_bfs_shortest_reach_in_graph.py
kwasnydam/coding_challanges
eb2230987dd2da86f880f6decfce1cad17562f9f
[ "MIT" ]
null
null
null
hackerrank/bfs_shortest_reach_in_graph/test_bfs_shortest_reach_in_graph.py
kwasnydam/coding_challanges
eb2230987dd2da86f880f6decfce1cad17562f9f
[ "MIT" ]
null
null
null
hackerrank/bfs_shortest_reach_in_graph/test_bfs_shortest_reach_in_graph.py
kwasnydam/coding_challanges
eb2230987dd2da86f880f6decfce1cad17562f9f
[ "MIT" ]
null
null
null
import unittest import os from bfs_shortest_reach_in_graph import Graph class TestBFSShortestReachInGraph(unittest.TestCase): def test_simple(self): test_data_path = os.path.join(os.path.abspath('.'), 'test_input_basic.txt') with open(test_data_path) as f: self._run_test_on_fi...
38.586207
93
0.613941
import unittest import os from bfs_shortest_reach_in_graph import Graph class TestBFSShortestReachInGraph(unittest.TestCase): def test_simple(self): test_data_path = os.path.join(os.path.abspath('.'), 'test_input_basic.txt') with open(test_data_path) as f: self._run_test_on_fi...
true
true
1c1f2e2e49c462449a18f2bf82c154e18c70b614
137,270
py
Python
python/ccxt/async_support/okex.py
braziliex/ccxt
252c0e393631f1923350cb9d49d2880c8ade7817
[ "MIT" ]
1
2020-08-03T19:01:48.000Z
2020-08-03T19:01:48.000Z
python/ccxt/async_support/okex.py
braziliex/ccxt
252c0e393631f1923350cb9d49d2880c8ade7817
[ "MIT" ]
null
null
null
python/ccxt/async_support/okex.py
braziliex/ccxt
252c0e393631f1923350cb9d49d2880c8ade7817
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange # ----------------------------------------------------------------------------- try...
47.318166
493
0.473548
rt.base.exchange import Exchange try: basestring except NameError: basestring = str import hashlib import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import AccountSuspended from cc...
true
true
1c1f2e78c4f0fc2c0c0247e966d148b1db1ac921
1,676
py
Python
instagramHome/migrations/0001_initial.py
Irene-nandy/Instagram
0032cc40cef86f37b602907b319f6b6e49695e44
[ "MIT" ]
null
null
null
instagramHome/migrations/0001_initial.py
Irene-nandy/Instagram
0032cc40cef86f37b602907b319f6b6e49695e44
[ "MIT" ]
null
null
null
instagramHome/migrations/0001_initial.py
Irene-nandy/Instagram
0032cc40cef86f37b602907b319f6b6e49695e44
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2020-10-19 05:39 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
40.878049
120
0.612768
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
1c1f2eb0df5e593b723f059c6aa9f221dc7c4e93
53,764
py
Python
seleniumbase/plugins/pytest_plugin.py
AndriiMykytiuk/SeleniumBase
d675f19ca8c8550607a0da1305704772eec34fa8
[ "MIT" ]
null
null
null
seleniumbase/plugins/pytest_plugin.py
AndriiMykytiuk/SeleniumBase
d675f19ca8c8550607a0da1305704772eec34fa8
[ "MIT" ]
null
null
null
seleniumbase/plugins/pytest_plugin.py
AndriiMykytiuk/SeleniumBase
d675f19ca8c8550607a0da1305704772eec34fa8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ This is the pytest configuration file for setting test options. """ import colorama import os import pytest import re import sys import time from seleniumbase import config as sb_config from seleniumbase.config import settings from seleniumbase.core import download_helper from seleniumbase....
50.199813
79
0.561193
import colorama import os import pytest import re import sys import time from seleniumbase import config as sb_config from seleniumbase.config import settings from seleniumbase.core import download_helper from seleniumbase.core import log_helper from seleniumbase.core import proxy_helper from seleniumbase.fixtures im...
true
true
1c1f2f110bb930563a69393b733c751775eb07d2
503
py
Python
tests/api/test_cost_centers.py
namelivia/travelperk-http-python
c6cbd88c999a49f7d61ae040029ca3e91ce72cae
[ "MIT" ]
2
2021-08-30T12:34:26.000Z
2021-08-31T07:56:12.000Z
tests/api/test_cost_centers.py
namelivia/travelperk-http-python
c6cbd88c999a49f7d61ae040029ca3e91ce72cae
[ "MIT" ]
6
2021-07-15T16:13:06.000Z
2022-03-03T09:45:07.000Z
tests/api/test_cost_centers.py
namelivia/travelperk-http-python
c6cbd88c999a49f7d61ae040029ca3e91ce72cae
[ "MIT" ]
null
null
null
from mock import Mock from travelperk_http_python.api.cost_centers_api import CostCentersAPI from travelperk_http_python.api.travelperk import TravelPerk from travelperk_http_python.cost_centers.cost_centers import CostCenters class TestCostCenters: def setup(self): self.travelperk = Mock(spec=TravelPerk)...
35.928571
72
0.809145
from mock import Mock from travelperk_http_python.api.cost_centers_api import CostCentersAPI from travelperk_http_python.api.travelperk import TravelPerk from travelperk_http_python.cost_centers.cost_centers import CostCenters class TestCostCenters: def setup(self): self.travelperk = Mock(spec=TravelPerk)...
true
true
1c1f2f86fda3dc9ddacc856630ecb88833e9cad5
189
py
Python
py/sender_prop.py
coalpha/coalpha.github.io
8a620314a5c0bcbe2225d29f733379d181534430
[ "Apache-2.0" ]
null
null
null
py/sender_prop.py
coalpha/coalpha.github.io
8a620314a5c0bcbe2225d29f733379d181534430
[ "Apache-2.0" ]
1
2020-04-12T07:48:18.000Z
2020-04-12T07:49:29.000Z
py/sender_prop.py
coalpha/coalpha.github.io
8a620314a5c0bcbe2225d29f733379d181534430
[ "Apache-2.0" ]
1
2020-09-30T05:27:07.000Z
2020-09-30T05:27:07.000Z
def Sender(): def Send(val): Send.state.append(val) return Send Send.state = [] return Send send = Sender() send("hello") send(", ") send("world") print(send.state)
12.6
28
0.592593
def Sender(): def Send(val): Send.state.append(val) return Send Send.state = [] return Send send = Sender() send("hello") send(", ") send("world") print(send.state)
true
true
1c1f314aea8a3c77360237d2ced281567d60d8d0
3,432
py
Python
Tests/Test2048BoardDetection/MatchTileToValue.py
robdobsn/RobotPlay2048
0715fd67313ccf6015871c2a73f38de3ca014f10
[ "MIT" ]
null
null
null
Tests/Test2048BoardDetection/MatchTileToValue.py
robdobsn/RobotPlay2048
0715fd67313ccf6015871c2a73f38de3ca014f10
[ "MIT" ]
null
null
null
Tests/Test2048BoardDetection/MatchTileToValue.py
robdobsn/RobotPlay2048
0715fd67313ccf6015871c2a73f38de3ca014f10
[ "MIT" ]
null
null
null
import cv2 import os import json import numpy as np import Game2048ImageProc # def correlateImage(imgIn, tileDefs): # tilePath = "../TestOutputs/Tiles/" # imgInGray = cv2.cvtColor(imgIn, cv2.COLOR_BGR2GRAY) # for key in tileDefs["fnameToValue"]: # # tile = cv2.imread(tilePath+key, cv2.CV_LOAD_IMAGE...
34.32
89
0.572552
import cv2 import os import json import numpy as np import Game2048ImageProc # return False # # w, h = tile.shape[::-1] # # # Apply template Matching # method = cv2.TM_CCOEFF_NORMED # res = cv2.matchTemplate(imgInGray, tile, method) # threshold = 0.7 # ...
true
true
1c1f322c53f88142e9c7e7810c3ab4afbc618252
13,643
py
Python
src/problem3.py
GuanJms/08-Exam1-201920
f58110df79c7e1578a508b1c49cfbb53acddd872
[ "MIT" ]
null
null
null
src/problem3.py
GuanJms/08-Exam1-201920
f58110df79c7e1578a508b1c49cfbb53acddd872
[ "MIT" ]
null
null
null
src/problem3.py
GuanJms/08-Exam1-201920
f58110df79c7e1578a508b1c49cfbb53acddd872
[ "MIT" ]
null
null
null
""" Exam 1, problem 3. Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher, Mark Hays, Amanda Stouder, Aaron Wilkin, their colleagues, and Shengjun Guan. """ # Done: 1. PUT YOUR NAME IN THE ABOVE LINE. import testing_helper import time def main(): """ Calls the TEST function...
39.77551
79
0.548267
import testing_helper import time def main(): run_test_problem3a() run_test_problem3b()
true
true
1c1f33314447c78b3c4a68e87ec6605a9c0c247d
2,647
py
Python
fairgraph/openminds/core/data/file_repository.py
HumanBrainProject/fairgraph
6cc43ad7a6e0f8f5c533c9c8def9274ce7dc0810
[ "Apache-2.0" ]
8
2019-10-16T13:27:10.000Z
2022-03-12T12:03:02.000Z
fairgraph/openminds/core/data/file_repository.py
HumanBrainProject/fairgraph
6cc43ad7a6e0f8f5c533c9c8def9274ce7dc0810
[ "Apache-2.0" ]
26
2019-06-12T13:56:26.000Z
2021-11-24T08:48:47.000Z
fairgraph/openminds/core/data/file_repository.py
HumanBrainProject/fairgraph
6cc43ad7a6e0f8f5c533c9c8def9274ce7dc0810
[ "Apache-2.0" ]
8
2019-06-26T07:10:44.000Z
2021-02-04T15:13:16.000Z
""" Structured information on a file repository. """ # this file was auto-generated from datetime import date, datetime from fairgraph.base_v3 import KGObjectV3, IRI from fairgraph.fields import Field class FileRepository(KGObjectV3): """ Structured information on a file repository. """ default_sp...
52.94
214
0.689838
from datetime import date, datetime from fairgraph.base_v3 import KGObjectV3, IRI from fairgraph.fields import Field class FileRepository(KGObjectV3): default_space = "dataset" type = ["https://openminds.ebrains.eu/core/FileRepository"] context = { "schema": "http://schema.org/", "kg"...
true
true
1c1f3394534c265e420fb13fb2d89553546f2664
5,366
py
Python
tests/test_templatetags.py
benlei/django-template-mixins
a45e8420e196c81f80d119841144c00f25e55b2c
[ "BSD-3-Clause" ]
3
2020-09-14T02:57:12.000Z
2020-10-20T00:27:30.000Z
tests/test_templatetags.py
benlei/django-template-mixins
a45e8420e196c81f80d119841144c00f25e55b2c
[ "BSD-3-Clause" ]
1
2020-09-14T04:26:00.000Z
2020-09-14T04:30:21.000Z
tests/test_templatetags.py
benlei/django-template-mixins
a45e8420e196c81f80d119841144c00f25e55b2c
[ "BSD-3-Clause" ]
2
2020-09-14T02:57:15.000Z
2021-09-30T11:44:32.000Z
import os import django from django.conf import settings from django.template import Context, Template, TemplateSyntaxError, Engine from django.test import SimpleTestCase BASE_DIR = os.path.dirname(__file__) class MixinTest(SimpleTestCase): @classmethod def setUpClass(cls): settings.configure( ...
30.662857
92
0.44167
import os import django from django.conf import settings from django.template import Context, Template, TemplateSyntaxError, Engine from django.test import SimpleTestCase BASE_DIR = os.path.dirname(__file__) class MixinTest(SimpleTestCase): @classmethod def setUpClass(cls): settings.configure( ...
true
true
1c1f351e1156d57c7ae0650d40b7a6acd31f10af
9,730
py
Python
sdk/python/pulumi_azure_native/documentdb/mongo_db_resource_mongo_db_collection.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/documentdb/mongo_db_resource_mongo_db_collection.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/documentdb/mongo_db_resource_mongo_db_collection.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from ...
60.434783
1,785
0.702158
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from . import outputs from ._inputs import * __all__ = ['MongoDBResourceMongoDBCollection'] class MongoDBResourceMongoDBCollection(pulumi.CustomResource): def __in...
true
true
1c1f35667ceb3654bb7c2821b7798e4c1d037521
54,513
py
Python
warrior/Actions/SnmpActions/common_snmp_actions.py
FJ-archi-autotest/warriorframework_forked
57076b7e097b59ababa3717b2d331796249538bf
[ "Apache-2.0" ]
null
null
null
warrior/Actions/SnmpActions/common_snmp_actions.py
FJ-archi-autotest/warriorframework_forked
57076b7e097b59ababa3717b2d331796249538bf
[ "Apache-2.0" ]
null
null
null
warrior/Actions/SnmpActions/common_snmp_actions.py
FJ-archi-autotest/warriorframework_forked
57076b7e097b59ababa3717b2d331796249538bf
[ "Apache-2.0" ]
null
null
null
''' Copyright 2017, Fujitsu Network Communications, Inc. 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 w...
54.842052
159
0.56315
import os, re, ast import Framework.Utils as Utils from Framework.Utils.print_Utils import print_exception from Framework.ClassUtils.snmp_utlity_class import WSnmp as ws from Framework.Utils import testcase_Utils, config_Utils, data_Utils, snmp_utils from threading import Thread from time import sleep import Queue try...
true
true
1c1f3613bde02e0caa9d612ba525af35e3649f84
1,021
py
Python
manage.py
morwen1/hack_your_body
d4156d4fbe2dd4123d5b5bceef451803a50a39f8
[ "MIT" ]
null
null
null
manage.py
morwen1/hack_your_body
d4156d4fbe2dd4123d5b5bceef451803a50a39f8
[ "MIT" ]
null
null
null
manage.py
morwen1/hack_your_body
d4156d4fbe2dd4123d5b5bceef451803a50a39f8
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure tha...
32.935484
77
0.653281
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") try: from django.core.management import execute_from_command_line except ImportError: try: import django except ImportE...
true
true
1c1f37957eb2b6d0bafa73dbc93b9669f38cb117
2,681
py
Python
data/process_data.py
ronger4242/DisasterPipeline
49bf9851a3207cbb005c55ed7cfaa05c4f002756
[ "MIT" ]
null
null
null
data/process_data.py
ronger4242/DisasterPipeline
49bf9851a3207cbb005c55ed7cfaa05c4f002756
[ "MIT" ]
null
null
null
data/process_data.py
ronger4242/DisasterPipeline
49bf9851a3207cbb005c55ed7cfaa05c4f002756
[ "MIT" ]
null
null
null
import sys import pandas as pd import numpy as np import sqlite3 import re from sqlalchemy import create_engine def load_data(messages_filepath, categories_filepath): ''' Load two CSV files Args: message_filepath = path to the message file categories_filepath = path to the categories file ...
33.098765
80
0.650504
import sys import pandas as pd import numpy as np import sqlite3 import re from sqlalchemy import create_engine def load_data(messages_filepath, categories_filepath): messages = pd.read_csv(messages_filepath) categories = pd.read_csv(categories_filepath) df = messages.merge(categories, on = 'id') retur...
true
true
1c1f382256cf539fdb1c1c2f1243db83e7679dfd
1,813
py
Python
examples/lifetime_prediction/tests.py
ianlini/feagen
21188b3f57305f21621c994de7bc05c001470559
[ "BSD-2-Clause" ]
36
2016-10-19T12:51:43.000Z
2019-11-26T07:10:31.000Z
examples/lifetime_prediction/tests.py
candy02058912/feagen
b9713cc2929417d226b67f7087bf006039d4b2f5
[ "BSD-2-Clause" ]
30
2016-11-08T04:15:41.000Z
2020-03-26T03:13:34.000Z
examples/lifetime_prediction/tests.py
candy02058912/feagen
b9713cc2929417d226b67f7087bf006039d4b2f5
[ "BSD-2-Clause" ]
5
2016-12-09T03:20:48.000Z
2019-09-30T10:25:46.000Z
from os.path import abspath, dirname, join from shutil import rmtree from tempfile import mkdtemp from feagen.bundling import get_data_keys_from_structure from feagen.tools.feagen_runner import feagen_run_with_configs import h5py import yaml def test_generate_lifetime_features(): config_dir = join(dirname(abspat...
41.204545
76
0.704357
from os.path import abspath, dirname, join from shutil import rmtree from tempfile import mkdtemp from feagen.bundling import get_data_keys_from_structure from feagen.tools.feagen_runner import feagen_run_with_configs import h5py import yaml def test_generate_lifetime_features(): config_dir = join(dirname(abspat...
true
true
1c1f3912c68b17c8b7cfa1a7f497625b5c489053
2,010
py
Python
homeassistant/components/rituals_perfume_genie/entity.py
mikan-megane/core
837220cce40890e296920d33a623adbc11bd15a6
[ "Apache-2.0" ]
5
2018-10-23T14:15:05.000Z
2021-11-26T06:38:44.000Z
homeassistant/components/rituals_perfume_genie/entity.py
mikan-megane/core
837220cce40890e296920d33a623adbc11bd15a6
[ "Apache-2.0" ]
79
2020-07-23T07:13:37.000Z
2022-03-22T06:02:37.000Z
homeassistant/components/rituals_perfume_genie/entity.py
mikan-megane/core
837220cce40890e296920d33a623adbc11bd15a6
[ "Apache-2.0" ]
3
2022-01-17T20:10:54.000Z
2022-01-17T20:17:22.000Z
"""Base class for Rituals Perfume Genie diffuser entity.""" from __future__ import annotations from pyrituals import Diffuser from homeassistant.helpers.entity import DeviceInfo from homeassistant.helpers.update_coordinator import CoordinatorEntity from . import RitualsDataUpdateCoordinator from .const import ATTRIB...
30.454545
87
0.675124
from __future__ import annotations from pyrituals import Diffuser from homeassistant.helpers.entity import DeviceInfo from homeassistant.helpers.update_coordinator import CoordinatorEntity from . import RitualsDataUpdateCoordinator from .const import ATTRIBUTES, DOMAIN, HUBLOT, SENSORS MANUFACTURER = "Rituals Cosme...
true
true
1c1f3940f0636eb48e9cceb6c3e75fc6366dcdad
1,806
py
Python
agent_env_params.py
YangRui2015/Sparse-Reward-Algorithms
8d0ecbf70e5ffc48ef8496e74cc4a94f65bc161a
[ "MIT" ]
44
2020-03-21T13:11:44.000Z
2022-02-17T09:41:47.000Z
agent_env_params.py
wanghuimu/Sparse-Reward-Algorithms
946656bade883565fc4e9248b9579df3d11b7358
[ "MIT" ]
1
2020-09-19T14:04:10.000Z
2020-09-23T11:23:31.000Z
agent_env_params.py
wanghuimu/Sparse-Reward-Algorithms
946656bade883565fc4e9248b9579df3d11b7358
[ "MIT" ]
17
2020-06-11T10:35:27.000Z
2022-02-17T09:41:54.000Z
import numpy as np def design_agent_and_env(FLAGS): # environment params env_params = {} if FLAGS.env == "reach": env_params["env_name"] = "FetchReach-v1" env_params["has_object"] = False FLAGS.total_steps = 20 else: raise TypeError("No such environment till...
33.444444
105
0.632337
import numpy as np def design_agent_and_env(FLAGS): env_params = {} if FLAGS.env == "reach": env_params["env_name"] = "FetchReach-v1" env_params["has_object"] = False FLAGS.total_steps = 20 else: raise TypeError("No such environment till now") x ...
true
true
1c1f39aba68eb572fce20ca361eb4ce952a1b8a8
15,561
py
Python
optevolver/hyperparameter/TF2OptimizerTestBase.py
pgfeldman/optevolver
cdb15a8cf40749e20a3bcb72b87a46f269d3eaf5
[ "MIT" ]
2
2020-01-15T19:27:27.000Z
2020-10-30T22:59:28.000Z
optevolver/hyperparameter/TF2OptimizerTestBase.py
pgfeldman/optevolver
cdb15a8cf40749e20a3bcb72b87a46f269d3eaf5
[ "MIT" ]
null
null
null
optevolver/hyperparameter/TF2OptimizerTestBase.py
pgfeldman/optevolver
cdb15a8cf40749e20a3bcb72b87a46f269d3eaf5
[ "MIT" ]
1
2020-01-22T04:15:35.000Z
2020-01-22T04:15:35.000Z
import os from typing import Dict import matplotlib.pyplot as plt import numpy as np import tensorflow as tf import time from tensorflow.keras import layers import optevolver.generators.FloatFunctions as FF class TF2OptimizationTestBase: """ A base class that provides the framework for evolutionary optimiza...
42.632877
130
0.630358
import os from typing import Dict import matplotlib.pyplot as plt import numpy as np import tensorflow as tf import time from tensorflow.keras import layers import optevolver.generators.FloatFunctions as FF class TF2OptimizationTestBase: sequence_length: int model: tf.keras.Sequential full_mat: np.ndarr...
true
true
1c1f39f6f31a2b07f478641a61597fffbfde66cb
4,192
py
Python
LDA.py
gwthmsb/MLAndAI
cb255d9bd480f6f25bf868e831a68257faecbfcc
[ "Apache-2.0" ]
null
null
null
LDA.py
gwthmsb/MLAndAI
cb255d9bd480f6f25bf868e831a68257faecbfcc
[ "Apache-2.0" ]
null
null
null
LDA.py
gwthmsb/MLAndAI
cb255d9bd480f6f25bf868e831a68257faecbfcc
[ "Apache-2.0" ]
null
null
null
from numpy import mean from numpy import std from sklearn.datasets import make_classification, load_iris from sklearn.model_selection import cross_val_score, GridSearchCV from sklearn.model_selection import RepeatedStratifiedKFold from sklearn.discriminant_analysis import LinearDiscriminantAnalysis from sklearn.naive_b...
34.081301
124
0.6875
from numpy import mean from numpy import std from sklearn.datasets import make_classification, load_iris from sklearn.model_selection import cross_val_score, GridSearchCV from sklearn.model_selection import RepeatedStratifiedKFold from sklearn.discriminant_analysis import LinearDiscriminantAnalysis from sklearn.naive_b...
true
true
1c1f3b2be4f75415538014f7a8eaaf5a98ba400c
178
py
Python
AtCoder_Beginner_Contest/124/a.py
xianGuiye/AtCoder
da51229c22175833f2a32ed16b51d217435d25c0
[ "MIT" ]
1
2020-02-07T09:25:17.000Z
2020-02-07T09:25:17.000Z
AtCoder_Beginner_Contest/124/a.py
xianGuiye/AtCoder
da51229c22175833f2a32ed16b51d217435d25c0
[ "MIT" ]
null
null
null
AtCoder_Beginner_Contest/124/a.py
xianGuiye/AtCoder
da51229c22175833f2a32ed16b51d217435d25c0
[ "MIT" ]
null
null
null
A,B = [int(x) for x in input().split()] #AとBの差が2以上であれば大きい方を2回押す if A >= B + 2: print(2*a - 1) elif b >= a + 2: print(2*b - 1) #AとBの差が2未満であればそれぞれ一回ずつ押す else: print(a + b)
14.833333
39
0.595506
A,B = [int(x) for x in input().split()] if A >= B + 2: print(2*a - 1) elif b >= a + 2: print(2*b - 1) else: print(a + b)
true
true
1c1f3b9822e32847c05fc1dfcbcb1fa93c8724f1
9,655
py
Python
deeptrack/math.py
HarshithBachimanchi/DeepTrack-2.0
5983f5224b75aef4ce3932662bd15723f13841a0
[ "MIT" ]
1
2022-03-18T17:25:18.000Z
2022-03-18T17:25:18.000Z
deeptrack/math.py
HarshithBachimanchi/DeepTrack-2.0
5983f5224b75aef4ce3932662bd15723f13841a0
[ "MIT" ]
null
null
null
deeptrack/math.py
HarshithBachimanchi/DeepTrack-2.0
5983f5224b75aef4ce3932662bd15723f13841a0
[ "MIT" ]
null
null
null
""" Mathematical oprations and structures Classses -------- Clip Clip the input within a minimum and a maximum value. NormalizeMinMax Min-max image normalization. """ from typing import Callable, List import numpy as np import scipy.ndimage as ndimage import skimage import skimage.measure from . import util...
26.597796
146
0.621129
from typing import Callable, List import numpy as np import scipy.ndimage as ndimage import skimage import skimage.measure from . import utils from .features import Feature from .image import Image from .types import PropertyLike class Average(Feature): __distributed__ = False def __init__( self,...
true
true
1c1f3be8a636aaa38e16810a64e45dd300fe36fe
13,437
py
Python
docs/source/conf.py
alanhdu/pytorch-lightning
0e45220263f4e2045dfe7f68e3e0eaac0b2033d5
[ "Apache-2.0" ]
null
null
null
docs/source/conf.py
alanhdu/pytorch-lightning
0e45220263f4e2045dfe7f68e3e0eaac0b2033d5
[ "Apache-2.0" ]
null
null
null
docs/source/conf.py
alanhdu/pytorch-lightning
0e45220263f4e2045dfe7f68e3e0eaac0b2033d5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
34.017722
104
0.673365
import glob import os import shutil import sys import pt_lightning_sphinx_theme PATH_HERE = os.path.abspath(os.path.dirname(__file__)) PATH_ROOT = os.path.join(PATH_HERE, '..', '..') sys.path.insert(0, os.path.abspath(PATH_ROOT)) FOLDER_GENERATED = 'generated' SPHINX_MOCK_REQUIREMENTS = int(os.environ...
true
true
1c1f3c935914a2f4413571c0fafbb32da6c521c7
1,092
py
Python
tests/__init__.py
bwoodsend/hoatzin
22355d2f6ba69484e73766fc5e4f62d29ea53e3a
[ "MIT" ]
1
2021-11-19T16:05:29.000Z
2021-11-19T16:05:29.000Z
tests/__init__.py
bwoodsend/hoatzin
22355d2f6ba69484e73766fc5e4f62d29ea53e3a
[ "MIT" ]
1
2021-09-06T15:48:41.000Z
2021-09-06T15:48:41.000Z
tests/__init__.py
bwoodsend/hoatzin
22355d2f6ba69484e73766fc5e4f62d29ea53e3a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ """ import functools import warnings from contextlib import contextmanager import numpy as np from hirola import exceptions def random_ids(max, count, at_least_once=True, sort=False): if at_least_once: assert count >= max out = np.append(np.arange(max, dtype=np.intp),...
24.266667
77
0.64652
import functools import warnings from contextlib import contextmanager import numpy as np from hirola import exceptions def random_ids(max, count, at_least_once=True, sort=False): if at_least_once: assert count >= max out = np.append(np.arange(max, dtype=np.intp), np.ran...
true
true
1c1f3d07290b3b606e61c914fd8863e81bae288c
5,724
py
Python
tests/cogctl/cli/test_config.py
operable/cogctl
bec66471189376e0c33be88edb68f3af8797fc8c
[ "Apache-2.0" ]
3
2016-05-09T23:14:47.000Z
2017-01-15T20:41:25.000Z
tests/cogctl/cli/test_config.py
operable/cogctl
bec66471189376e0c33be88edb68f3af8797fc8c
[ "Apache-2.0" ]
59
2016-03-10T20:53:04.000Z
2021-09-03T17:26:02.000Z
tests/cogctl/cli/test_config.py
operable/cogctl
bec66471189376e0c33be88edb68f3af8797fc8c
[ "Apache-2.0" ]
7
2016-03-09T21:43:33.000Z
2019-01-24T15:44:06.000Z
import os import pytest from cogctl.cli.config import CogctlConfig @pytest.fixture def classic_config(tmpdir): config_path = tmpdir.join("config") config_path.write("""\ [defaults] profile=localhost [localhost] host=localhost password=sooperseekrit port=4000 secure=false user=admin [testing] host=cog.testi...
23.652893
78
0.676275
import os import pytest from cogctl.cli.config import CogctlConfig @pytest.fixture def classic_config(tmpdir): config_path = tmpdir.join("config") config_path.write("""\ [defaults] profile=localhost [localhost] host=localhost password=sooperseekrit port=4000 secure=false user=admin [testing] host=cog.testi...
true
true
1c1f3da3cafe358b56fc6864100618c786867a13
3,412
py
Python
modules/PaddleOCR/ppocr/data/__init__.py
Khanhnn00/paddle-ocr
e30447055e16a2e8a9a4df9b7be7adef142bcad7
[ "MIT" ]
null
null
null
modules/PaddleOCR/ppocr/data/__init__.py
Khanhnn00/paddle-ocr
e30447055e16a2e8a9a4df9b7be7adef142bcad7
[ "MIT" ]
null
null
null
modules/PaddleOCR/ppocr/data/__init__.py
Khanhnn00/paddle-ocr
e30447055e16a2e8a9a4df9b7be7adef142bcad7
[ "MIT" ]
null
null
null
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
33.45098
91
0.708968
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import sys import numpy as np import paddle import signal import random __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.p...
true
true
1c1f3df2a5f37e5b59d7c44f92b37c1ab6b8465e
1,971
py
Python
release/scripts/addons/pie_menus_official/pie_view_of.py
noorbeast/BlenderSource
65ebecc5108388965678b04b43463b85f6c69c1d
[ "Naumen", "Condor-1.1", "MS-PL" ]
2
2019-03-20T13:10:46.000Z
2019-05-15T20:00:31.000Z
engine/2.80/scripts/addons/pie_menus_official/pie_view_of.py
byteinc/Phasor
f7d23a489c2b4bcc3c1961ac955926484ff8b8d9
[ "Unlicense" ]
null
null
null
engine/2.80/scripts/addons/pie_menus_official/pie_view_of.py
byteinc/Phasor
f7d23a489c2b4bcc3c1961ac955926484ff8b8d9
[ "Unlicense" ]
null
null
null
bl_info = { "name": "View Menu: Key: 'Q key'", "description": "View Modes", "author": "Antony Riakiotakis, Sebastian Koenig", "version": (0, 1, 1), "blender": (2, 77, 0), "location": "Q key", "warning": "", "wiki_url": "", "category": "3d View" } import bpy from bpy.types import...
24.333333
99
0.633688
bl_info = { "name": "View Menu: Key: 'Q key'", "description": "View Modes", "author": "Antony Riakiotakis, Sebastian Koenig", "version": (0, 1, 1), "blender": (2, 77, 0), "location": "Q key", "warning": "", "wiki_url": "", "category": "3d View" } import bpy from bpy.types import...
true
true
1c1f3e97b8ee5017b46f92f8f80c92de62d288bb
7,175
py
Python
src/utils_dataframe.py
philip-papasavvas/PythonSkills
7744779314245f23065a36ba0318e21f83b1019b
[ "MIT" ]
2
2019-09-19T15:36:17.000Z
2019-12-23T11:38:01.000Z
src/utils_dataframe.py
philip-papasavvas/projects
7744779314245f23065a36ba0318e21f83b1019b
[ "MIT" ]
null
null
null
src/utils_dataframe.py
philip-papasavvas/projects
7744779314245f23065a36ba0318e21f83b1019b
[ "MIT" ]
2
2020-11-26T00:00:19.000Z
2022-03-25T01:54:38.000Z
""" Created on: 26 Feb 2021 Utils module for comparing pd DataFrames """ import re from typing import Union, List import numpy as np import pandas as pd def get_selected_column_names(df: pd.DataFrame, cols_to_exclude: Union[List[str], str]) -> List[str]: """Return a list with all th...
39.20765
98
0.64446
import re from typing import Union, List import numpy as np import pandas as pd def get_selected_column_names(df: pd.DataFrame, cols_to_exclude: Union[List[str], str]) -> List[str]: return [x for x in list(df.columns) if x not in cols_to_exclude] def compare_dataframe_col(df_one: ...
true
true
1c1f3fcce352cd88f18ede6531262b0ce56bbc38
6,158
py
Python
lib/httpparser/httprequest.py
secdec/ADAPT
f9bd149b321830588df47e06b8b8e1db07ea9d7a
[ "Apache-2.0" ]
183
2018-09-18T20:44:31.000Z
2021-11-09T11:20:14.000Z
lib/httpparser/httprequest.py
secdec/ADAPT
f9bd149b321830588df47e06b8b8e1db07ea9d7a
[ "Apache-2.0" ]
11
2019-01-30T17:21:38.000Z
2021-01-17T23:33:47.000Z
lib/httpparser/httprequest.py
secdec/ADAPT
f9bd149b321830588df47e06b8b8e1db07ea9d7a
[ "Apache-2.0" ]
49
2018-09-21T21:18:43.000Z
2022-03-10T12:47:04.000Z
# # Automated Dynamic Application Penetration Testing (ADAPT) # # Copyright (C) 2018 Applied Visions - http://securedecisions.com # # Written by Siege Technologies - http://www.siegetechnologies.com/ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
32.240838
120
0.712894
import itertools from copy import deepcopy import urllib.parse class HTTPRequest: def __init__( self, verb="GET", path="/", path_params={}, http_version="HTTP/1.1", headers={}, body="", ): self.verb = verb self.path = path self.path_params = path_params self.http_version ...
true
true
1c1f400f162d197f417b9766521502318d6a38b7
3,761
py
Python
dipy/denoise/tests/test_noise_estimate.py
JohnGriffiths/dipy
5fb38e9b77547cdaf5eb140730444535733ae01d
[ "BSD-3-Clause" ]
null
null
null
dipy/denoise/tests/test_noise_estimate.py
JohnGriffiths/dipy
5fb38e9b77547cdaf5eb140730444535733ae01d
[ "BSD-3-Clause" ]
null
null
null
dipy/denoise/tests/test_noise_estimate.py
JohnGriffiths/dipy
5fb38e9b77547cdaf5eb140730444535733ae01d
[ "BSD-3-Clause" ]
null
null
null
from __future__ import division, print_function import numpy as np import nibabel as nib from numpy.testing import (assert_almost_equal, assert_equal, assert_, assert_array_almost_equal) from dipy.denoise.noise_estimate import _inv_nchi_cdf, piesno, estimate_sigma, _piesno_3D import dipy.da...
40.44086
100
0.646371
from __future__ import division, print_function import numpy as np import nibabel as nib from numpy.testing import (assert_almost_equal, assert_equal, assert_, assert_array_almost_equal) from dipy.denoise.noise_estimate import _inv_nchi_cdf, piesno, estimate_sigma, _piesno_3D import dipy.da...
true
true
1c1f4211bbbdb7bf5ac3695e1474e7ca3f7bc247
18,582
py
Python
ahgl/tournaments/migrations/0033_auto__add_field_match_home_submission_date__add_field_match_away_submi.py
ourobouros/ahgl-site
65eb14f23d65fb996442793c5d4795f1ec0e2f1e
[ "BSD-2-Clause-FreeBSD" ]
1
2015-11-06T09:43:00.000Z
2015-11-06T09:43:00.000Z
ahgl/tournaments/migrations/0033_auto__add_field_match_home_submission_date__add_field_match_away_submi.py
ourobouros/ahgl-site
65eb14f23d65fb996442793c5d4795f1ec0e2f1e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
ahgl/tournaments/migrations/0033_auto__add_field_match_home_submission_date__add_field_match_away_submi.py
ourobouros/ahgl-site
65eb14f23d65fb996442793c5d4795f1ec0e2f1e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Match.home_submission_date' db.add_column('tournaments_match', 'home_submission_date', sel...
86.027778
243
0.570068
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.add_column('tournaments_match', 'home_submission_date', self.gf('django.db.models.fields.DateTimeField')(null=True, bla...
true
true
1c1f425583400d2eea683c6ec80279d06084e536
2,587
py
Python
fasta-gc/solution.py
kyclark/python_bioinformatics
49f991b6199f8a208af8c02b15cfc84aa3e29cf7
[ "MIT" ]
14
2019-07-14T08:29:04.000Z
2022-03-07T06:33:26.000Z
fasta-gc/solution.py
kyclark/python_bioinformatics
49f991b6199f8a208af8c02b15cfc84aa3e29cf7
[ "MIT" ]
null
null
null
fasta-gc/solution.py
kyclark/python_bioinformatics
49f991b6199f8a208af8c02b15cfc84aa3e29cf7
[ "MIT" ]
13
2019-06-20T16:32:38.000Z
2021-06-01T20:19:25.000Z
#!/usr/bin/env python3 """ Author : kyclark Date : 2019-02-19 Purpose: Rock the Casbah """ import argparse import os import sys from Bio import SeqIO from collections import Counter # -------------------------------------------------- def get_args(): """get command-line arguments""" parser = argparse.Argum...
26.131313
74
0.516428
import argparse import os import sys from Bio import SeqIO from collections import Counter def get_args(): parser = argparse.ArgumentParser( description='Segregate FASTA sequences by GC content', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument( 'fasta', ...
true
true
1c1f43054e8da2187208de30fc23b58798961014
500
py
Python
forseti/parsers/prefix_parser.py
Bram-Hub/Forseti
6431f710f9b4b9d9c79bf14f3e7d66e2ed57bd34
[ "MIT" ]
4
2018-08-14T23:08:14.000Z
2020-09-08T19:04:03.000Z
forseti/parsers/prefix_parser.py
Bram-Hub/Forseti
6431f710f9b4b9d9c79bf14f3e7d66e2ed57bd34
[ "MIT" ]
7
2015-04-23T21:28:20.000Z
2016-02-26T16:10:48.000Z
forseti/parsers/prefix_parser.py
Bram-Hub/Forseti
6431f710f9b4b9d9c79bf14f3e7d66e2ed57bd34
[ "MIT" ]
3
2019-01-16T21:04:36.000Z
2021-02-16T09:43:48.000Z
""" Module that contains a prefix parser for formulas Acceptable statements are of the form: A (not A) (and A B) (or A B) (if A B) (iff A B) """ from __future__ import unicode_literals from forseti.formula import Symbol, Not, And, Or, If, Iff, Predicate, \ Existential, Universal from forseti.parsers.abstract_pars...
22.727273
71
0.748
from __future__ import unicode_literals from forseti.formula import Symbol, Not, And, Or, If, Iff, Predicate, \ Existential, Universal from forseti.parsers.abstract_parser import AbstractParser class PrefixParser(AbstractParser): @staticmethod def parse(statement, formula_types): raise NotImpleme...
true
true
1c1f45060a77c3cb1da41be768c19179a3b6250f
12,786
py
Python
kubernetes_asyncio/client/models/v1beta2_stateful_set_status.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1beta2_stateful_set_status.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1beta2_stateful_set_status.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.14.7 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class V1beta2Sta...
37.605882
235
0.669717
import pprint import re import six class V1beta2StatefulSetStatus(object): openapi_types = { 'collision_count': 'int', 'conditions': 'list[V1beta2StatefulSetCondition]', 'current_replicas': 'int', 'current_revision': 'str', 'observed_generation': 'int', 'rea...
true
true
1c1f453babc48e6870e5c6118ea40afa5c7b8597
4,803
py
Python
sdk/python/pulumi_azure_native/machinelearningservices/v20210701/list_workspace_keys.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/machinelearningservices/v20210701/list_workspace_keys.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/machinelearningservices/v20210701/list_workspace_keys.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
48.03
184
0.752238
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs __all__ = [ 'ListWorkspaceKeysResult', 'AwaitableListWorkspaceKeysResult', 'list_workspace_keys', ] @pulumi.output_type class ListWo...
true
true
1c1f4587e9a7db117770e0afc857663f1bf3a2ff
11,069
py
Python
detectron2/modeling/mmdet_wrapper.py
sailist/detectron2
2805d9eb0b2a97899ef187715cf8beb9fd7385fc
[ "Apache-2.0" ]
1
2021-04-11T06:05:08.000Z
2021-04-11T06:05:08.000Z
detectron2/modeling/mmdet_wrapper.py
sailist/detectron2
2805d9eb0b2a97899ef187715cf8beb9fd7385fc
[ "Apache-2.0" ]
null
null
null
detectron2/modeling/mmdet_wrapper.py
sailist/detectron2
2805d9eb0b2a97899ef187715cf8beb9fd7385fc
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import itertools import logging import numpy as np from collections import OrderedDict from collections.abc import Mapping from typing import Dict, List, Optional, Tuple, Union import torch from omegaconf import DictConfig, OmegaConf from torch import Tensor, nn from detectron2.layers import S...
40.105072
100
0.615864
import itertools import logging import numpy as np from collections import OrderedDict from collections.abc import Mapping from typing import Dict, List, Optional, Tuple, Union import torch from omegaconf import DictConfig, OmegaConf from torch import Tensor, nn from detectron2.layers import ShapeSpec from detectron...
true
true
1c1f45e81be67ca1e9ceebc06ff370cb96949577
2,915
py
Python
AOMUSE/db/Database.py
AxlKings/AOMUSE
b5c49adc660482df77c10351a8646414a204735d
[ "MIT" ]
1
2020-02-01T04:53:09.000Z
2020-02-01T04:53:09.000Z
AOMUSE/db/Database.py
AxlKings/AOMUSE
b5c49adc660482df77c10351a8646414a204735d
[ "MIT" ]
2
2020-02-01T04:53:02.000Z
2020-08-17T07:13:43.000Z
AOMUSE/db/Database.py
AxlKings/AOMUSE
b5c49adc660482df77c10351a8646414a204735d
[ "MIT" ]
1
2020-07-08T20:02:20.000Z
2020-07-08T20:02:20.000Z
from pony.orm import Database, Required, Optional, Json, LongStr, Set from datetime import datetime database = Database() class Target(database.Entity): # ----- Attributes ----- target_name = Required(str, unique=True) # Required: Cannot be None # ----- Relations ----- exposures = Set('Exp...
36.4375
84
0.683705
from pony.orm import Database, Required, Optional, Json, LongStr, Set from datetime import datetime database = Database() class Target(database.Entity): target_name = Required(str, unique=True) exposures = Set('Exposure') processed_exposure = Set('Processed_Exposure') class Exposure...
true
true
1c1f468292f41c694a4d5dbd0f472832293ee305
14,271
py
Python
get_bike_data.py
erichensleyibm/capstone_CitiBike
74c8d968179c0f53d69bdbb92420b2948bd6adaa
[ "Apache-2.0" ]
null
null
null
get_bike_data.py
erichensleyibm/capstone_CitiBike
74c8d968179c0f53d69bdbb92420b2948bd6adaa
[ "Apache-2.0" ]
2
2021-03-31T18:50:36.000Z
2021-06-01T22:13:33.000Z
get_bike_data.py
erichensleyibm/capstone_CitiBike
74c8d968179c0f53d69bdbb92420b2948bd6adaa
[ "Apache-2.0" ]
null
null
null
import os, sys try: # if running in CLI cur_path = os.path.abspath(__file__) while cur_path.split('/')[-1] != 'capstone': cur_path = os.path.abspath(os.path.join(cur_path, os.pardir)) except NameError: # if running in IDE cur_p...
43.910769
166
0.554341
import os, sys try: cur_path = os.path.abspath(__file__) while cur_path.split('/')[-1] != 'capstone': cur_path = os.path.abspath(os.path.join(cur_path, os.pardir)) except NameError: cur_path = os.getcwd() while cur_path.s...
true
true
1c1f46ac0b705c9c9d78dbb7e204a393efd1e841
9,296
py
Python
web/addons/point_of_sale/report/pos_details.py
diogocs1/comps
63df07f6cf21c41e4527c06e2d0499f23f4322e7
[ "Apache-2.0" ]
null
null
null
web/addons/point_of_sale/report/pos_details.py
diogocs1/comps
63df07f6cf21c41e4527c06e2d0499f23f4322e7
[ "Apache-2.0" ]
null
null
null
web/addons/point_of_sale/report/pos_details.py
diogocs1/comps
63df07f6cf21c41e4527c06e2d0499f23f4322e7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
45.568627
256
0.582293
= form['user_ids'] or self._get_all_users() pos_order_obj = self.pool.get('pos.order') pos_ids = pos_order_obj.search(self.cr, self.uid, [('date_order','>=',form['date_start'] + ' 00:00:00'),('date_order','<=',form['date_end'] + ' 23:59:59'),('state','in',['paid','invoiced','done']),('user_id','in',us...
true
true
1c1f46cc184813acae8c04feef51003518c09c0e
1,523
py
Python
devilry/apps/core/models/custom_db_fields.py
devilry/devilry-django
9ae28e462dfa4cfee966ebacbca04ade9627e715
[ "BSD-3-Clause" ]
29
2015-01-18T22:56:23.000Z
2020-11-10T21:28:27.000Z
devilry/apps/core/models/custom_db_fields.py
devilry/devilry-django
9ae28e462dfa4cfee966ebacbca04ade9627e715
[ "BSD-3-Clause" ]
786
2015-01-06T16:10:18.000Z
2022-03-16T11:10:50.000Z
devilry/apps/core/models/custom_db_fields.py
devilry/devilry-django
9ae28e462dfa4cfee966ebacbca04ade9627e715
[ "BSD-3-Clause" ]
15
2015-04-06T06:18:43.000Z
2021-02-24T12:28:30.000Z
import re from django.utils.translation import gettext_lazy from django.core.exceptions import ValidationError from django.db import models class ShortNameField(models.SlugField): """ Short name field used by several of the core models. We have a hierarchy of objects with a short name, but they are not ...
34.613636
90
0.615233
import re from django.utils.translation import gettext_lazy from django.core.exceptions import ValidationError from django.db import models class ShortNameField(models.SlugField): patt = re.compile(r'^[a-z0-9_-]+$') def __init__(self, *args, **kwargs): kw = dict( max_length=20, ...
true
true
1c1f4778eecf871cf512745c3d9ef5b57d2d0304
2,603
py
Python
agent/PPO/PPOTradingAgent/model.py
limaries30/Binanace-trading-simulation
9646dccceea5c1735b987057b008d6e8eb0e6cca
[ "MIT" ]
21
2019-09-20T13:00:00.000Z
2021-09-25T09:10:36.000Z
agent/PPO/PPOTradingAgent/model.py
limaries30/Binanace-trading-simulation
9646dccceea5c1735b987057b008d6e8eb0e6cca
[ "MIT" ]
3
2019-08-07T07:26:28.000Z
2019-09-10T06:30:37.000Z
agent/PPO/PPOTradingAgent/model.py
limaries30/Binanace-trading-simulation
9646dccceea5c1735b987057b008d6e8eb0e6cca
[ "MIT" ]
8
2019-09-21T16:17:36.000Z
2021-04-29T03:04:54.000Z
import torch import torch.nn as nn import torch.nn.functional as F class CNNTradingAgent(nn.Module): def __init__(self, num_features=15, n_actions=11): super().__init__() self.num_features = num_features self.n_actions = n_actions # Bottleneck idea from Google's MobileNetV2 ...
40.046154
137
0.572032
import torch import torch.nn as nn import torch.nn.functional as F class CNNTradingAgent(nn.Module): def __init__(self, num_features=15, n_actions=11): super().__init__() self.num_features = num_features self.n_actions = n_actions self.conv0 = nn.Sequential( nn...
true
true
1c1f477f0632bc1a56f460231ea056742472e5b8
1,049
py
Python
pless/passwordless/views.py
omab/psa-passwordless
acd116f253c0b2d4be74bd545cf3e500612b56f3
[ "MIT" ]
19
2015-02-02T23:44:33.000Z
2021-02-23T02:30:21.000Z
pless/passwordless/views.py
omab/psa-passwordless
acd116f253c0b2d4be74bd545cf3e500612b56f3
[ "MIT" ]
null
null
null
pless/passwordless/views.py
omab/psa-passwordless
acd116f253c0b2d4be74bd545cf3e500612b56f3
[ "MIT" ]
2
2016-03-09T22:56:38.000Z
2017-01-25T18:37:43.000Z
from django.shortcuts import render, redirect from django.core.urlresolvers import reverse from django.contrib.auth import logout as auth_logout # Example views, most of them are just template rendering def home(request): return render(request, 'home.html') def done(request): return render(request, 'done....
26.225
78
0.730219
from django.shortcuts import render, redirect from django.core.urlresolvers import reverse from django.contrib.auth import logout as auth_logout def home(request): return render(request, 'home.html') def done(request): return render(request, 'done.html') def login_form(request): return render(reque...
true
true
1c1f482d5f464305b6d58a8ba480d19d8054dde7
3,816
py
Python
usaspending_api/transactions/agnostic_transaction_deletes.py
g4brielvs/usaspending-api
bae7da2c204937ec1cdf75c052405b13145728d5
[ "CC0-1.0" ]
1
2020-08-14T04:14:32.000Z
2020-08-14T04:14:32.000Z
usaspending_api/transactions/agnostic_transaction_deletes.py
g4brielvs/usaspending-api
bae7da2c204937ec1cdf75c052405b13145728d5
[ "CC0-1.0" ]
null
null
null
usaspending_api/transactions/agnostic_transaction_deletes.py
g4brielvs/usaspending-api
bae7da2c204937ec1cdf75c052405b13145728d5
[ "CC0-1.0" ]
null
null
null
import logging from django.conf import settings from typing import Optional from usaspending_api.common.helpers.sql_helpers import get_connection from usaspending_api.common.helpers.date_helper import datetime_command_line_argument_type logger = logging.getLogger("script") class AgnosticDeletes: def add_argume...
38.545455
120
0.631027
import logging from django.conf import settings from typing import Optional from usaspending_api.common.helpers.sql_helpers import get_connection from usaspending_api.common.helpers.date_helper import datetime_command_line_argument_type logger = logging.getLogger("script") class AgnosticDeletes: def add_argume...
true
true
1c1f493cba040c418e08701066ed87460e70d4cf
3,435
py
Python
diffpruningtransformers/diff_prune_transformer.py
Helw150/DiffPruningTransformers
4af8fc6493e8fc71d523f4d4a58f3b9115a97db1
[ "Apache-2.0" ]
null
null
null
diffpruningtransformers/diff_prune_transformer.py
Helw150/DiffPruningTransformers
4af8fc6493e8fc71d523f4d4a58f3b9115a97db1
[ "Apache-2.0" ]
null
null
null
diffpruningtransformers/diff_prune_transformer.py
Helw150/DiffPruningTransformers
4af8fc6493e8fc71d523f4d4a58f3b9115a97db1
[ "Apache-2.0" ]
null
null
null
import math import torch from torchreparam import ReparamModule from torch import nn from torch.nn import functional as F def hard_sigmoid(x): return x.clamp(0, 1000).clamp(-1000, 1) class L0Norm(nn.Module): def __init__(self, origin_shape, alpha_init, l, r): """ Base class of layers using L...
36.542553
114
0.634352
import math import torch from torchreparam import ReparamModule from torch import nn from torch.nn import functional as F def hard_sigmoid(x): return x.clamp(0, 1000).clamp(-1000, 1) class L0Norm(nn.Module): def __init__(self, origin_shape, alpha_init, l, r): super(L0Norm, self).__init__() s...
true
true
1c1f4aaf9119eb2249f9350c8b95df7ee02ae676
35,546
py
Python
nni/common/graph_utils.py
dutxubo/nni
c16f4e1c89b54b8b80661ef0072433d255ad2d24
[ "MIT" ]
9,680
2019-05-07T01:42:30.000Z
2022-03-31T16:48:33.000Z
nni/common/graph_utils.py
dutxubo/nni
c16f4e1c89b54b8b80661ef0072433d255ad2d24
[ "MIT" ]
1,957
2019-05-06T21:44:21.000Z
2022-03-31T09:21:53.000Z
nni/common/graph_utils.py
dutxubo/nni
c16f4e1c89b54b8b80661ef0072433d255ad2d24
[ "MIT" ]
1,571
2019-05-07T06:42:55.000Z
2022-03-31T03:19:24.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import logging import queue import re from collections import defaultdict import torch from torch.utils.tensorboard._pytorch_graph import NodePy, NodePyIO, NodePyOP, GraphPy CLASSTYPE_KIND = 'ClassType' GETATTR_KIND = 'prim::GetAttr' CAT_KIND = ...
42.417661
133
0.57939
import logging import queue import re from collections import defaultdict import torch from torch.utils.tensorboard._pytorch_graph import NodePy, NodePyIO, NodePyOP, GraphPy CLASSTYPE_KIND = 'ClassType' GETATTR_KIND = 'prim::GetAttr' CAT_KIND = 'aten::cat' LIST_CONSTRUCT_KIND = 'prim::ListConstruct' LIST_UNPACK_KIN...
true
true
1c1f4ad4eb3b02131e35f5373a2669218f56e619
2,655
py
Python
bitsets/transform.py
mikulatomas/bitsets
baaeeb93a43613fa17d22f3e9350c280bf2c9381
[ "MIT" ]
23
2015-09-25T19:10:25.000Z
2021-12-08T14:06:40.000Z
bitsets/transform.py
mikulatomas/bitsets
baaeeb93a43613fa17d22f3e9350c280bf2c9381
[ "MIT" ]
2
2020-09-25T09:39:12.000Z
2021-02-15T09:13:17.000Z
bitsets/transform.py
mikulatomas/bitsets
baaeeb93a43613fa17d22f3e9350c280bf2c9381
[ "MIT" ]
4
2019-02-19T12:30:57.000Z
2021-06-20T21:06:46.000Z
# transform.py - integer packing and unpacking """Convert between larger integers and chunks of smaller integers and booleans. Note: chunks have little-endian bit-order like gmpy2.(un)pack, but reverse of numpy.(un)packbits """ from itertools import compress, zip_longest __all__ = ['chunkreverse', 'pack', 'un...
23.086957
79
0.577024
from itertools import compress, zip_longest __all__ = ['chunkreverse', 'pack', 'unpack', 'packbools', 'unpackbools'] NBITS = {'B': 8, 'H': 16, 'L': 32, 'Q': 64} ATOMS = {r: [1 << i for i in range(r)] for r in NBITS.values()} ATOMS.update((t, ATOMS[r]) for t, r in NBITS.items()) NBITS.update({r: r for r in NBITS...
true
true
1c1f4bdd33813f2d03aed903be0eb684f230b684
276
py
Python
django_perf_rec/__init__.py
joehybird/django-perf-rec
76a1874820b55bcbc2f95a85bbda3cb056584e2c
[ "MIT" ]
null
null
null
django_perf_rec/__init__.py
joehybird/django-perf-rec
76a1874820b55bcbc2f95a85bbda3cb056584e2c
[ "MIT" ]
null
null
null
django_perf_rec/__init__.py
joehybird/django-perf-rec
76a1874820b55bcbc2f95a85bbda3cb056584e2c
[ "MIT" ]
null
null
null
""" isort:skip_file """ try: import pytest except ImportError: pytest = None if pytest is not None: pytest.register_assert_rewrite('django_perf_rec.api') from .api import TestCaseMixin, get_record_name, get_perf_path, record # noqa: F401 __version__ = '4.3.0'
18.4
84
0.731884
try: import pytest except ImportError: pytest = None if pytest is not None: pytest.register_assert_rewrite('django_perf_rec.api') from .api import TestCaseMixin, get_record_name, get_perf_path, record __version__ = '4.3.0'
true
true
1c1f4d1ec8a94fbfe058931962980ba53170614a
2,303
py
Python
ej_CalorExplCBPeriodicas.py
mascondosa/MateUBA_PDE-
e9313e2ead43004f4a2efe3001fdc810294288dd
[ "MIT" ]
null
null
null
ej_CalorExplCBPeriodicas.py
mascondosa/MateUBA_PDE-
e9313e2ead43004f4a2efe3001fdc810294288dd
[ "MIT" ]
2
2020-11-12T02:12:48.000Z
2020-11-12T02:14:40.000Z
ej_CalorExplCBPeriodicas.py
mdmaas/MateUBA_PDE
e9313e2ead43004f4a2efe3001fdc810294288dd
[ "MIT" ]
4
2020-10-30T12:12:59.000Z
2020-12-19T13:23:55.000Z
import MateUBA_PDE as pde import matplotlib.pyplot as plt import numpy as np import imageio from matplotlib import cm from matplotlib import animation # # Código para resolver la ecuación del calor con un método explícito # y condiciones de borde periodicas # # Autores: Sol Acuña y Maria Galante, 10 de Nov 2020....
25.307692
85
0.639166
import MateUBA_PDE as pde import matplotlib.pyplot as plt import numpy as np import imageio from matplotlib import cm from matplotlib import animation im = imageio.imread('MateUBA_PDE.png') F = im[:,:,0] F = -(F - 255)/255.0 Nx = np.shape(F)[0] Ny = np.shape(F)[1] Lx = Nx / 100 Ly = Ny / 100 sizeF = np.size(...
true
true
1c1f4ff7992d033c6fbf8dca75c75f21576beaba
4,091
py
Python
mollie/api/error.py
bryanwills/mollie-api-python
8122569ae83f07ad07893f3dd56e9a60bcccae05
[ "BSD-2-Clause" ]
95
2015-02-22T23:32:13.000Z
2022-02-17T21:28:19.000Z
mollie/api/error.py
bryanwills/mollie-api-python
8122569ae83f07ad07893f3dd56e9a60bcccae05
[ "BSD-2-Clause" ]
108
2015-02-26T08:51:35.000Z
2021-10-10T12:57:55.000Z
mollie/api/error.py
bryanwills/mollie-api-python
8122569ae83f07ad07893f3dd56e9a60bcccae05
[ "BSD-2-Clause" ]
70
2015-01-17T17:47:56.000Z
2022-01-18T17:31:12.000Z
class Error(Exception): """Base exception.""" pass class RequestError(Error): """Errors while preparing or performing an API request.""" pass class RequestSetupError(RequestError): """Errors while preparing an API request.""" pass class IdentifierError(RequestSetupError): """Errors ...
28.409722
116
0.703495
class Error(Exception): pass class RequestError(Error): pass class RequestSetupError(RequestError): pass class IdentifierError(RequestSetupError): pass class ResponseHandlingError(Error): pass class ResponseError(Error): status = None field = None def __init__(self, resp...
true
true
1c1f513d2d9b96ba326764cb5d0f08f57435bc7d
631
py
Python
blog/models.py
ddanddan18/swpp-hw4-ddanddan18
910c8e9f28fe61f03ce480b532e338b8602f45b5
[ "MIT" ]
null
null
null
blog/models.py
ddanddan18/swpp-hw4-ddanddan18
910c8e9f28fe61f03ce480b532e338b8602f45b5
[ "MIT" ]
null
null
null
blog/models.py
ddanddan18/swpp-hw4-ddanddan18
910c8e9f28fe61f03ce480b532e338b8602f45b5
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import User # Create your models here. class Article(models.Model): title = models.CharField(max_length=64) content = models.TextField() author = models.ForeignKey( User, on_delete=models.CASCADE, related_name='articles' ...
21.758621
43
0.651347
from django.db import models from django.contrib.auth.models import User class Article(models.Model): title = models.CharField(max_length=64) content = models.TextField() author = models.ForeignKey( User, on_delete=models.CASCADE, related_name='articles' ) class Comment(mode...
true
true
1c1f5269bfa4c6d1ec50de6ddabf7bb5e5a8019f
2,666
py
Python
examples/adwords/v201406/remarketing/add_conversion_tracker.py
dietrichc/streamline-ppc-reports
256f79246aba3c2cf8f792d87a066391a2f471e0
[ "Apache-2.0" ]
null
null
null
examples/adwords/v201406/remarketing/add_conversion_tracker.py
dietrichc/streamline-ppc-reports
256f79246aba3c2cf8f792d87a066391a2f471e0
[ "Apache-2.0" ]
null
null
null
examples/adwords/v201406/remarketing/add_conversion_tracker.py
dietrichc/streamline-ppc-reports
256f79246aba3c2cf8f792d87a066391a2f471e0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2014 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 b...
34.179487
77
0.662791
__author__ = ('api.kwinter@gmail.com (Kevin Winter)' 'Joseph DiLallo') import uuid from googleads import adwords def main(client): conversion_tracker_service = client.GetService( 'ConversionTrackerService', version='v201406') operations = [ { 'operator...
true
true
1c1f526a2be16d78ff0a00ed417cb737e6dfbb17
4,196
py
Python
interface.py
nekomaruh/Rendimiento_Escolar_en_Chile_2010-2019
de4a12b2d35ffd76902e6f1bdd552a7ae500548a
[ "Unlicense" ]
null
null
null
interface.py
nekomaruh/Rendimiento_Escolar_en_Chile_2010-2019
de4a12b2d35ffd76902e6f1bdd552a7ae500548a
[ "Unlicense" ]
null
null
null
interface.py
nekomaruh/Rendimiento_Escolar_en_Chile_2010-2019
de4a12b2d35ffd76902e6f1bdd552a7ae500548a
[ "Unlicense" ]
null
null
null
import queries as q from queries import cursor, connection, ps import static_tables as st import os, psutil import pandas as pd import fnmatch import time from io import StringIO from tqdm import tqdm def get_ram(info='unknown'): # Obtiene la información de la ram utilizada durante la ejecución del programa pr...
33.03937
98
0.695663
import queries as q from queries import cursor, connection, ps import static_tables as st import os, psutil import pandas as pd import fnmatch import time from io import StringIO from tqdm import tqdm def get_ram(info='unknown'): process = psutil.Process(os.getpid()) print('RAM:', process.memory_info()[0]...
true
true
1c1f5326c35bf81f6ffdb8eed03a8a3743388c57
5,346
py
Python
test/integration/ggrc/access_control/rbac_factories/document.py
sfarbotka/ggrc-core
ef7aae6bc09ad2f53a2414f643572e07d689784a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
test/integration/ggrc/access_control/rbac_factories/document.py
sfarbotka/ggrc-core
ef7aae6bc09ad2f53a2414f643572e07d689784a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
test/integration/ggrc/access_control/rbac_factories/document.py
sfarbotka/ggrc-core
ef7aae6bc09ad2f53a2414f643572e07d689784a
[ "ECL-2.0", "Apache-2.0" ]
1
2020-02-13T12:32:45.000Z
2020-02-13T12:32:45.000Z
# Copyright (C) 2019 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Document RBAC Factory.""" from ggrc.models import all_models from integration.ggrc import Api, generator from integration.ggrc.access_control.rbac_factories import base from integration.ggrc.models impor...
31.821429
78
0.64927
from ggrc.models import all_models from integration.ggrc import Api, generator from integration.ggrc.access_control.rbac_factories import base from integration.ggrc.models import factories FACTORIES_MAPPING = { "Control": factories.ControlFactory, "Standard": factories.StandardFactory, "Program": facto...
true
true
1c1f54a90267c811787e0b087aa7327b9b5a6fe4
2,684
py
Python
web/ml/migrations/0001_initial.py
MTES-MCT/biocarburants
ff084916e18cdbdc41400f36fa6cc76a5e05900e
[ "MIT" ]
null
null
null
web/ml/migrations/0001_initial.py
MTES-MCT/biocarburants
ff084916e18cdbdc41400f36fa6cc76a5e05900e
[ "MIT" ]
1
2020-02-17T11:01:03.000Z
2020-02-17T11:01:03.000Z
web/ml/migrations/0001_initial.py
MTES-MCT/biocarburants
ff084916e18cdbdc41400f36fa6cc76a5e05900e
[ "MIT" ]
null
null
null
# Generated by Django 4.0.2 on 2022-03-29 12:55 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('core', '0197_carburelot_created_at'), ] operations = [ migrations.CreateModel( ...
41.292308
121
0.551416
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('core', '0197_carburelot_created_at'), ] operations = [ migrations.CreateModel( name='EECStats', fields=[ ...
true
true
1c1f54fd4b041ad01610ad086b7776c0c14e3277
2,356
py
Python
setup.py
Mandeep0001/numpy-financial
222f57abc25094447713549c880891a570f99e0a
[ "BSD-3-Clause" ]
175
2019-10-06T08:31:31.000Z
2022-03-25T22:16:30.000Z
setup.py
Mandeep0001/numpy-financial
222f57abc25094447713549c880891a570f99e0a
[ "BSD-3-Clause" ]
35
2019-09-30T02:38:17.000Z
2022-03-14T11:50:09.000Z
setup.py
Mandeep0001/numpy-financial
222f57abc25094447713549c880891a570f99e0a
[ "BSD-3-Clause" ]
42
2019-09-27T15:59:29.000Z
2022-03-01T12:23:45.000Z
#!/usr/bin/env python from os import path def get_version(): """ Find the value assigned to __version__ in numpy_financial/__init__.py. This function assumes that there is a line of the form __version__ = "version-string" in that file. It returns the string version-string, or None if such...
34.647059
79
0.645161
from os import path def get_version(): with open("numpy_financial/__init__.py", "r") as f: for line in f: s = [w.strip() for w in line.split("=", 1)] if len(s) == 2 and s[0] == "__version__": return s[1][1:-1] CLASSIFIERS = """\ Development Status :: 5 - Product...
true
true
1c1f5570a683822e4f9249e13137cd81902475b1
666
py
Python
tests/compat.py
HiteshMah-Jan/aws-shell
74d95a74fde8ec56629f160847c241df87090203
[ "Apache-2.0" ]
6,883
2015-12-15T22:54:57.000Z
2022-03-31T06:14:51.000Z
tests/compat.py
HiteshMah-Jan/aws-shell
74d95a74fde8ec56629f160847c241df87090203
[ "Apache-2.0" ]
202
2015-12-15T22:40:41.000Z
2022-02-04T21:58:04.000Z
tests/compat.py
HiteshMah-Jan/aws-shell
74d95a74fde8ec56629f160847c241df87090203
[ "Apache-2.0" ]
776
2015-12-16T04:26:57.000Z
2022-03-30T12:41:35.000Z
# Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
35.052632
73
0.744745
import sys if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest
true
true
1c1f56f088be3f00633a51df971fd78bd568c880
10,698
py
Python
dltk/io/augmentation.py
jiapei100/DLTK
50b31c9fd75679acc154d2ce384af2842303cc3c
[ "Apache-2.0" ]
1
2018-07-04T22:00:20.000Z
2018-07-04T22:00:20.000Z
dltk/io/augmentation.py
jiapei100/DLTK
50b31c9fd75679acc154d2ce384af2842303cc3c
[ "Apache-2.0" ]
null
null
null
dltk/io/augmentation.py
jiapei100/DLTK
50b31c9fd75679acc154d2ce384af2842303cc3c
[ "Apache-2.0" ]
1
2018-08-21T07:26:51.000Z
2018-08-21T07:26:51.000Z
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import import numpy as np from scipy.ndimage.interpolation import map_coordinates from scipy.ndimage.filters import gaussian_filter def flip(imagelist, axis=1): """Randoml...
36.636986
97
0.608899
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import import numpy as np from scipy.ndimage.interpolation import map_coordinates from scipy.ndimage.filters import gaussian_filter def flip(imagelist, axis=1): was_...
true
true
1c1f577a656e81d660123336e3aaa05d7fbd612a
572
py
Python
backend/src/v2/test/scripts/upload_gcs_blob.py
votti/pipelines
1c3e2768e6177d5d6e3f4b8eff8fafb9a3b76c1f
[ "Apache-2.0" ]
2,860
2018-05-24T04:55:01.000Z
2022-03-31T13:49:56.000Z
backend/src/v2/test/scripts/upload_gcs_blob.py
votti/pipelines
1c3e2768e6177d5d6e3f4b8eff8fafb9a3b76c1f
[ "Apache-2.0" ]
7,331
2018-05-16T09:03:26.000Z
2022-03-31T23:22:04.000Z
backend/src/v2/test/scripts/upload_gcs_blob.py
votti/pipelines
1c3e2768e6177d5d6e3f4b8eff8fafb9a3b76c1f
[ "Apache-2.0" ]
1,359
2018-05-15T11:05:41.000Z
2022-03-31T09:42:09.000Z
from google.cloud import storage # This function is mainly written for environments without gsutil. def upload_blob(source: str, destination: str): """Uploads a file to the bucket.""" # source = "local/path/to/file" # destination = "gs://your-bucket-name/storage-object-name" storage_client = storage....
27.238095
66
0.718531
from google.cloud import storage def upload_blob(source: str, destination: str): storage_client = storage.Client() blob = storage.Blob.from_string(destination, storage_client) blob.upload_from_filename(source) print(f"File {source} uploaded to destination {destination}") if __name__ ==...
true
true
1c1f57eae8353ad76271a3637379c885f0de562f
6,443
py
Python
test/handlers/end_to_end/test_end_to_end.py
git-sentry/git-sentry
4212ed19e91525656a40b73cb3fa12c30d7097bf
[ "MIT" ]
null
null
null
test/handlers/end_to_end/test_end_to_end.py
git-sentry/git-sentry
4212ed19e91525656a40b73cb3fa12c30d7097bf
[ "MIT" ]
1
2020-06-15T17:07:43.000Z
2020-06-15T18:18:33.000Z
test/handlers/end_to_end/test_end_to_end.py
git-sentry/git-sentry
4212ed19e91525656a40b73cb3fa12c30d7097bf
[ "MIT" ]
null
null
null
import os from unittest import mock import pytest from github3 import GitHub from constants import ROOT_DIR from git_sentry.handlers.git_config import apply_configuration from git_sentry.main.connectivity.git import GitClient from git_sentry.parsing import toml_parser from test.handlers.mock_helpers.mock_helpers impo...
45.373239
137
0.702002
import os from unittest import mock import pytest from github3 import GitHub from constants import ROOT_DIR from git_sentry.handlers.git_config import apply_configuration from git_sentry.main.connectivity.git import GitClient from git_sentry.parsing import toml_parser from test.handlers.mock_helpers.mock_helpers impo...
true
true
1c1f583635db67d407fe10c0b55c7ccbebc015ed
50
py
Python
nlplot/__init__.py
chottokun/nlplot
ebcc96752c004e2fce0e0ce977cc18c6572a3194
[ "MIT" ]
null
null
null
nlplot/__init__.py
chottokun/nlplot
ebcc96752c004e2fce0e0ce977cc18c6572a3194
[ "MIT" ]
null
null
null
nlplot/__init__.py
chottokun/nlplot
ebcc96752c004e2fce0e0ce977cc18c6572a3194
[ "MIT" ]
null
null
null
from nlplot.nlplot import * def main(): pass
10
27
0.66
from nlplot.nlplot import * def main(): pass
true
true
1c1f583da36420579930e94ff842eda566f27c55
1,444
py
Python
setup.py
LucasTsui0725/TextBox
5918dfd29e0c57f983b81f0da5080b2613387bce
[ "MIT" ]
null
null
null
setup.py
LucasTsui0725/TextBox
5918dfd29e0c57f983b81f0da5080b2613387bce
[ "MIT" ]
null
null
null
setup.py
LucasTsui0725/TextBox
5918dfd29e0c57f983b81f0da5080b2613387bce
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import print_function from __future__ import division import os from setuptools import setup, find_packages install_requires = [ 'matplotlib>=3.1.3', 'torch>=1.6.0', 'numpy>=1.17.2', 'nltk>=3.4.5', 'pyyaml>=5.3.1', 'fast_bleu>=0.0.89', 'py-rouge>=1.1', '...
30.083333
110
0.696676
from __future__ import absolute_import from __future__ import print_function from __future__ import division import os from setuptools import setup, find_packages install_requires = [ 'matplotlib>=3.1.3', 'torch>=1.6.0', 'numpy>=1.17.2', 'nltk>=3.4.5', 'pyyaml>=5.3.1', 'fast_bleu>=0.0.89', 'py-rouge>=1.1', '...
true
true
1c1f5881fb697c3b99cb8114eac3cc4e9a025e37
4,841
py
Python
simscale_sdk/models/one_of_bonded_contact_position_tolerance.py
slainesimscale/simscale-python-sdk
db483eeabe558e55d020f5f829a3bf13c9c287a7
[ "MIT" ]
8
2021-01-22T13:41:03.000Z
2022-01-03T09:00:10.000Z
simscale_sdk/models/one_of_bonded_contact_position_tolerance.py
slainesimscale/simscale-python-sdk
db483eeabe558e55d020f5f829a3bf13c9c287a7
[ "MIT" ]
null
null
null
simscale_sdk/models/one_of_bonded_contact_position_tolerance.py
slainesimscale/simscale-python-sdk
db483eeabe558e55d020f5f829a3bf13c9c287a7
[ "MIT" ]
3
2021-03-18T15:52:52.000Z
2022-01-03T08:59:30.000Z
# coding: utf-8 """ SimScale API The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from simscale_sdk.configuration import Configuration class OneOfBondedContactPositionTolerance(object): """NOTE: This clas...
30.446541
98
0.613716
import pprint import re import six from simscale_sdk.configuration import Configuration class OneOfBondedContactPositionTolerance(object): openapi_types = { 'type': 'str', 'tolerance': 'DimensionalLength' } attribute_map = { 'type': 'type', 'tolerance': 'tolerance...
true
true
1c1f58a78164187cae71392a6c3b48ef2902b068
509
py
Python
scripts/build.py
JBonifay/jetbrains
a113a0814de05023f97e094a1de40b29d6f4576b
[ "MIT" ]
null
null
null
scripts/build.py
JBonifay/jetbrains
a113a0814de05023f97e094a1de40b29d6f4576b
[ "MIT" ]
null
null
null
scripts/build.py
JBonifay/jetbrains
a113a0814de05023f97e094a1de40b29d6f4576b
[ "MIT" ]
null
null
null
import os from changelog import build_changelog from readme import build_readme if __name__ == '__main__': readme_src = os.path.join(os.path.dirname(__file__), '..', 'README.md') readme_dest = os.path.join(os.path.dirname(__file__), '..', 'build') build_readme(readme_src, readme_dest) changelog_src = ...
39.153846
81
0.715128
import os from changelog import build_changelog from readme import build_readme if __name__ == '__main__': readme_src = os.path.join(os.path.dirname(__file__), '..', 'README.md') readme_dest = os.path.join(os.path.dirname(__file__), '..', 'build') build_readme(readme_src, readme_dest) changelog_src = ...
true
true
1c1f58e5aac1642dc6462488da3c01922ead2406
2,800
py
Python
Thesis@3.9.1/Lib/site-packages/django/contrib/gis/serializers/geojson.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
Thesis@3.9.1/Lib/site-packages/django/contrib/gis/serializers/geojson.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
Thesis@3.9.1/Lib/site-packages/django/contrib/gis/serializers/geojson.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
from django.contrib.gis.gdal import CoordTransform, SpatialReference from django.core.serializers.base import SerializerDoesNotExist from django.core.serializers.json import Serializer as JSONSerializer class Serializer(JSONSerializer): """ Convert a queryset to GeoJSON, http://geojson.org/ """ def _...
36.842105
103
0.595
from django.contrib.gis.gdal import CoordTransform, SpatialReference from django.core.serializers.base import SerializerDoesNotExist from django.core.serializers.json import Serializer as JSONSerializer class Serializer(JSONSerializer): def _init_options(self): super()._init_options() self.geomet...
true
true
1c1f5a1ab809f2cc7fa9806bdc83e8250a95349e
639
py
Python
backend/manage.py
crowdbotics-apps/plain-firefly-29827
64b6bfddb1963d048bbe05540bddc7f5a4e247b8
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/manage.py
crowdbotics-apps/plain-firefly-29827
64b6bfddb1963d048bbe05540bddc7f5a4e247b8
[ "FTL", "AML", "RSA-MD" ]
37
2021-08-15T17:21:30.000Z
2022-02-27T17:22:15.000Z
backend/manage.py
crowdbotics-apps/plain-firefly-29827
64b6bfddb1963d048bbe05540bddc7f5a4e247b8
[ "FTL", "AML", "RSA-MD" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'plain_firefly_29827.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: ...
29.045455
83
0.688576
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'plain_firefly_29827.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed...
true
true
1c1f5b71f1dcfe6d363840e544f54de587865147
387
py
Python
py3/26.py
Triple-Z/LeetCode
e470de54086cdedd4738fe62fe735d89089227dd
[ "MIT" ]
1
2021-05-28T16:46:14.000Z
2021-05-28T16:46:14.000Z
py3/26.py
Triple-Z/LeetCode
e470de54086cdedd4738fe62fe735d89089227dd
[ "MIT" ]
12
2020-09-17T16:25:24.000Z
2021-11-16T15:08:44.000Z
py3/26.py
Triple-Z/LeetCode
e470de54086cdedd4738fe62fe735d89089227dd
[ "MIT" ]
1
2021-12-19T07:33:22.000Z
2021-12-19T07:33:22.000Z
class Solution: def removeDuplicates(self, nums: List[int]) -> int: if len(nums) == 0: return 0 elif len(nums) == 1: return 1 i = 0 # slow pointer for j in range(1, len(nums)): # fast pointer if nums[i] != nums[j]: i = i ...
27.642857
55
0.418605
class Solution: def removeDuplicates(self, nums: List[int]) -> int: if len(nums) == 0: return 0 elif len(nums) == 1: return 1 i = 0 for j in range(1, len(nums)): if nums[i] != nums[j]: i = i + 1 nums[i] ...
true
true