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
f76b593031f03adacbcb8494abd60f6fdc5a401d
2,469
py
Python
scheduled_tasks/economy/get_upcoming_events_date.py
satyami3/stock
d3d3f65a25feb764e6f735f422251fd0ede520fc
[ "MIT" ]
1
2022-03-06T00:27:26.000Z
2022-03-06T00:27:26.000Z
scheduled_tasks/economy/get_upcoming_events_date.py
satyami3/stock
d3d3f65a25feb764e6f735f422251fd0ede520fc
[ "MIT" ]
null
null
null
scheduled_tasks/economy/get_upcoming_events_date.py
satyami3/stock
d3d3f65a25feb764e6f735f422251fd0ede520fc
[ "MIT" ]
null
null
null
import json import sqlite3 import tabula import pandas as pd from datetime import datetime, timedelta conn = sqlite3.connect(r"database/database.db", check_same_thread=False) db = conn.cursor() current_date = datetime.utcnow() def get_next_retail_sales_date(): """ Get next retail sales release date """ ...
32.064935
117
0.655326
import json import sqlite3 import tabula import pandas as pd from datetime import datetime, timedelta conn = sqlite3.connect(r"database/database.db", check_same_thread=False) db = conn.cursor() current_date = datetime.utcnow() def get_next_retail_sales_date(): df = tabula.read_pdf(r"https://www.census.gov/retai...
true
true
f76b5a9fd4bce5756e0a5142b0a75c205b3016d7
982
py
Python
google/cloud/compute_v1/services/licenses/transports/__init__.py
georgiyekkert/python-compute
d128efbb3bf10af9b41e55b20aaa8080b3221e77
[ "Apache-2.0" ]
19
2021-02-10T21:17:20.000Z
2022-02-20T03:16:36.000Z
google/cloud/compute_v1/services/licenses/transports/__init__.py
georgiyekkert/python-compute
d128efbb3bf10af9b41e55b20aaa8080b3221e77
[ "Apache-2.0" ]
121
2021-01-08T23:46:58.000Z
2022-03-26T04:34:36.000Z
google/cloud/compute_v1/services/licenses/transports/__init__.py
georgiyekkert/python-compute
d128efbb3bf10af9b41e55b20aaa8080b3221e77
[ "Apache-2.0" ]
20
2021-01-08T23:14:16.000Z
2022-02-25T01:27:20.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
31.677419
79
0.762729
from collections import OrderedDict from typing import Dict, Type from .base import LicensesTransport from .rest import LicensesRestTransport _transport_registry = OrderedDict() _transport_registry["rest"] = LicensesRestTransport __all__ = ( "LicensesTransport", "LicensesRestTransport", )
true
true
f76b5aa0ce5832c446216627b7a89c39c233fea0
152
py
Python
MotunrayoKoyejo/Phase 1/Python Basic 1/Day5/Q36.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
6
2020-05-23T19:53:25.000Z
2021-05-08T20:21:30.000Z
MotunrayoKoyejo/Phase 1/Python Basic 1/Day5/Q36.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
8
2020-05-14T18:53:12.000Z
2020-07-03T00:06:20.000Z
MotunrayoKoyejo/Phase 1/Python Basic 1/Day5/Q36.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
39
2020-05-10T20:55:02.000Z
2020-09-12T17:40:59.000Z
def type(a,b): if isinstance(a,int) and isinstance(b,int): return a+b return 'Not integer type' print(type(2,3)) print(type('a','boy'))
21.714286
47
0.618421
def type(a,b): if isinstance(a,int) and isinstance(b,int): return a+b return 'Not integer type' print(type(2,3)) print(type('a','boy'))
true
true
f76b5b844077be42bc15077dc393a0e8b82333ad
1,607
py
Python
costar_simulation/python/costar_simulation/parse.py
cpaxton/costar_plan
be5c12f9d0e9d7078e6a5c283d3be059e7f3d040
[ "Apache-2.0" ]
66
2018-10-31T04:58:53.000Z
2022-03-17T02:32:25.000Z
costar_simulation/python/costar_simulation/parse.py
cpaxton/costar_plan
be5c12f9d0e9d7078e6a5c283d3be059e7f3d040
[ "Apache-2.0" ]
8
2018-10-23T21:19:25.000Z
2018-12-03T02:08:41.000Z
costar_simulation/python/costar_simulation/parse.py
cpaxton/costar_plan
be5c12f9d0e9d7078e6a5c283d3be059e7f3d040
[ "Apache-2.0" ]
25
2018-10-19T00:54:17.000Z
2021-10-10T08:28:15.000Z
from __future__ import print_function import argparse import sys from costar_task_plan.simulation import GetSimulationParser def GetLaunchOptions(): ''' These are the files that actually set up the environment ''' return ["ur5","husky","fetch"] def GetExperimentOptions(): ''' Each of these n...
30.320755
74
0.571251
from __future__ import print_function import argparse import sys from costar_task_plan.simulation import GetSimulationParser def GetLaunchOptions(): return ["ur5","husky","fetch"] def GetExperimentOptions(): return ["magnetic_assembly", "stack", "tables", "navigation"] d...
true
true
f76b5cb4fe0729fee0554f8a9357ad3fdbd4a888
8,565
py
Python
tests/wallet/rl_wallet/test_rl_rpc.py
konarshankar07/bytecash-blockchain
1c1fab19664e7777b75be1a60facb8a454341443
[ "Apache-2.0" ]
null
null
null
tests/wallet/rl_wallet/test_rl_rpc.py
konarshankar07/bytecash-blockchain
1c1fab19664e7777b75be1a60facb8a454341443
[ "Apache-2.0" ]
null
null
null
tests/wallet/rl_wallet/test_rl_rpc.py
konarshankar07/bytecash-blockchain
1c1fab19664e7777b75be1a60facb8a454341443
[ "Apache-2.0" ]
null
null
null
import asyncio import pytest from bytecash.rpc.wallet_rpc_api import WalletRpcApi from bytecash.simulator.simulator_protocol import FarmNewBlockProtocol from bytecash.types.blockchain_format.coin import Coin from bytecash.types.blockchain_format.sized_bytes import bytes32 from bytecash.types.mempool_inclusion_status ...
46.048387
119
0.678692
import asyncio import pytest from bytecash.rpc.wallet_rpc_api import WalletRpcApi from bytecash.simulator.simulator_protocol import FarmNewBlockProtocol from bytecash.types.blockchain_format.coin import Coin from bytecash.types.blockchain_format.sized_bytes import bytes32 from bytecash.types.mempool_inclusion_status ...
true
true
f76b5cd9633d6400b939251eae4db825c5c731b5
805
py
Python
src/simod/log_repairing/conformance_checking.py
AdaptiveBProcess/SiMo-Discoverer
8306a7787da1bab70c88923e2f55b2b9b60290e0
[ "Apache-2.0" ]
12
2019-08-20T14:48:45.000Z
2021-07-07T09:52:35.000Z
src/simod/log_repairing/conformance_checking.py
AutomatedProcessImprovement/Simod
7be8db1249f8d738b9ffe73e30e7cbd109e60aec
[ "Apache-2.0" ]
25
2021-09-03T16:39:28.000Z
2022-03-04T15:27:50.000Z
src/simod/log_repairing/conformance_checking.py
AdaptiveBProcess/SiMo-Discoverer
8306a7787da1bab70c88923e2f55b2b9b60290e0
[ "Apache-2.0" ]
4
2020-01-09T19:10:37.000Z
2021-05-11T17:56:23.000Z
from operator import itemgetter from .. import support_utils as sup def print_stats(log, conformant, traces): print('complete traces:', str(len(traces)), ', events:', str(len(log.data)), sep=' ') print('conformance percentage:', str(sup.ffloat((len(conformant) / len(traces)) * 100, 2)) + ...
30.961538
83
0.619876
from operator import itemgetter from .. import support_utils as sup def print_stats(log, conformant, traces): print('complete traces:', str(len(traces)), ', events:', str(len(log.data)), sep=' ') print('conformance percentage:', str(sup.ffloat((len(conformant) / len(traces)) * 100, 2)) + ...
true
true
f76b5d38d10100a4362b8f9fe9a7186f7284e840
2,673
py
Python
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/applications/FootballAction/predict/action_detect/reader/reader_utils.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
5
2022-01-30T07:35:58.000Z
2022-02-08T05:45:20.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/applications/FootballAction/predict/action_detect/reader/reader_utils.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-01-14T02:33:28.000Z
2022-01-14T02:33:28.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/applications/FootballAction/predict/action_detect/reader/reader_utils.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-03-07T10:51:21.000Z
2022-03-07T10:51:21.000Z
""" reader_util """ # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve. # # 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 # # Unles...
24.3
76
0.614291
import random import numpy as np class ReaderNotFoundError(Exception): def __init__(self, reader_name, avail_readers): super(ReaderNotFoundError, self).__init__() self.reader_name = reader_name self.avail_readers = avail_readers def __str__(self): msg = "Reader {} Not Found....
true
true
f76b5da76b68f3f5835f3df7a324ebb6a1e142ea
280
py
Python
Client/board.py
hamyhamz/chess-game
408f0add2c8c513c49ca7389ce9511b8a57acf16
[ "MIT" ]
null
null
null
Client/board.py
hamyhamz/chess-game
408f0add2c8c513c49ca7389ce9511b8a57acf16
[ "MIT" ]
null
null
null
Client/board.py
hamyhamz/chess-game
408f0add2c8c513c49ca7389ce9511b8a57acf16
[ "MIT" ]
null
null
null
"""Implementation of chess board object on client side of application Authors: Peter Hamran xhamra00@stud.fit.vutbr.cz Date: 20.01.2020 """ class Board: def __init__(self): self.dimensions = (8, 8) def get_background(self): ... #TODO
15.555556
69
0.625
class Board: def __init__(self): self.dimensions = (8, 8) def get_background(self): ...
true
true
f76b5f33bfb187146a9fae04cf818fbc6a0e9008
6,369
py
Python
tests/conftest.py
Shumpei-Kikuta/BentoML
4fe508934ab431ea5c414ee9d8b84c2104688381
[ "Apache-2.0" ]
null
null
null
tests/conftest.py
Shumpei-Kikuta/BentoML
4fe508934ab431ea5c414ee9d8b84c2104688381
[ "Apache-2.0" ]
1
2022-03-15T09:46:11.000Z
2022-03-25T09:14:13.000Z
tests/conftest.py
Shumpei-Kikuta/BentoML
4fe508934ab431ea5c414ee9d8b84c2104688381
[ "Apache-2.0" ]
2
2021-05-19T15:37:37.000Z
2021-05-31T15:02:35.000Z
import functools import glob import inspect import os import imageio import numpy as np import pytest from bentoml.yatai.client import YataiClient from tests.bento_service_examples.example_bento_service import ExampleBentoService def pytest_configure(): ''' global constants for tests ''' # async req...
28.306667
88
0.623803
import functools import glob import inspect import os import imageio import numpy as np import pytest from bentoml.yatai.client import YataiClient from tests.bento_service_examples.example_bento_service import ExampleBentoService def pytest_configure(): async def assert_request( method, url,...
true
true
f76b6067b678d7f39d025f3af00f2d0eae800c96
1,521
py
Python
var/spack/repos/builtin/packages/py-netcdf4/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2019-09-15T23:55:48.000Z
2019-09-15T23:55:48.000Z
var/spack/repos/builtin/packages/py-netcdf4/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/py-netcdf4/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2017-01-21T17:19:32.000Z
2017-01-21T17:19:32.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyNetcdf4(PythonPackage): """Python interface to the netCDF Library.""" homepage = "h...
41.108108
97
0.69691
from spack import * class PyNetcdf4(PythonPackage): homepage = "https://github.com/Unidata/netcdf4-python" url = "https://pypi.io/packages/source/n/netCDF4/netCDF4-1.2.7.tar.gz" version('1.4.2', sha256='b934af350459cf9041bcdf5472e2aa56ed7321c018d918e9f325ec9a1f9d1a30') version('1.2.7', sha...
true
true
f76b61762ede991621bf974679644ed362901efa
123
py
Python
AtC_Beg_Con_161-170/ABC163/B.py
yosho-18/AtCoder
50f6d5c92a01792552c31ac912ce1cd557b06fb0
[ "MIT" ]
null
null
null
AtC_Beg_Con_161-170/ABC163/B.py
yosho-18/AtCoder
50f6d5c92a01792552c31ac912ce1cd557b06fb0
[ "MIT" ]
null
null
null
AtC_Beg_Con_161-170/ABC163/B.py
yosho-18/AtCoder
50f6d5c92a01792552c31ac912ce1cd557b06fb0
[ "MIT" ]
null
null
null
n, m = [int(m) for m in input().split()] a = [int(m) for m in input().split()] print(n - sum(a) if n - sum(a) >= 0 else -1)
41
44
0.536585
n, m = [int(m) for m in input().split()] a = [int(m) for m in input().split()] print(n - sum(a) if n - sum(a) >= 0 else -1)
true
true
f76b622bf032bd192df95489b39fc377bdc17411
1,761
py
Python
data/external/repositories_2to3/197978/Grasp-and-lift-EEG-challenge-master/lvl3/genYOLO.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories_2to3/197978/Grasp-and-lift-EEG-challenge-master/lvl3/genYOLO.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories_2to3/197978/Grasp-and-lift-EEG-challenge-master/lvl3/genYOLO.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
1
2019-12-04T08:23:33.000Z
2019-12-04T08:23:33.000Z
# -*- coding: utf-8 -*- """ Created on Mon Aug 31 16:01:25 2015. @author: rc,alex """ import os import sys if __name__ == '__main__' and __package__ is None: filePath = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(filePath) from glob import glob import numpy as np ...
28.403226
80
0.599091
import os import sys if __name__ == '__main__' and __package__ is None: filePath = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(filePath) from glob import glob import numpy as np import pandas as pd from sklearn.metrics import roc_auc_score from preprocessing.aux impo...
true
true
f76b6254ff096fa3699293ad9639a8205194acde
1,766
py
Python
refresh_token.py
kcinnick/fitnick
fc22829bddc8e862cd27456e027d1a8e31f1ebac
[ "MIT" ]
1
2020-10-10T01:56:37.000Z
2020-10-10T01:56:37.000Z
refresh_token.py
kcinnick/fitnick
fc22829bddc8e862cd27456e027d1a8e31f1ebac
[ "MIT" ]
2
2020-08-29T22:10:10.000Z
2020-09-06T07:15:50.000Z
refresh_token.py
kcinnick/fitnick
fc22829bddc8e862cd27456e027d1a8e31f1ebac
[ "MIT" ]
null
null
null
import os from fitnick.base.base import introspect_tokens def refresh_authorized_client(): import requests with requests.session() as session: with open('fitnick/base/fitbit_refresh_token.txt', 'r') as f: refresh_token = f.read().strip() with open('fitnick/base/fitbit_refresh_t...
32.703704
77
0.568516
import os from fitnick.base.base import introspect_tokens def refresh_authorized_client(): import requests with requests.session() as session: with open('fitnick/base/fitbit_refresh_token.txt', 'r') as f: refresh_token = f.read().strip() with open('fitnick/base/fitbit_refresh_t...
true
true
f76b6275784ffc4d81c852bd0f029331857049d4
8,037
py
Python
teamModule/models.py
GeniALE/SiteWebGeniALE
39488a89887d6855590ab39a59dbc2b6dca21892
[ "MIT" ]
4
2018-03-17T15:38:17.000Z
2020-10-03T12:06:19.000Z
teamModule/models.py
GeniALE/SiteWebGeniALE
39488a89887d6855590ab39a59dbc2b6dca21892
[ "MIT" ]
80
2018-02-01T02:55:01.000Z
2022-03-11T23:17:17.000Z
teamModule/models.py
GeniALE/SiteWebGeniALE
39488a89887d6855590ab39a59dbc2b6dca21892
[ "MIT" ]
2
2018-01-30T09:27:31.000Z
2019-07-25T23:50:49.000Z
from django.db import models from cms.models.pluginmodel import CMSPlugin from django.utils.encoding import python_2_unicode_compatible from hvad.models import TranslatableModel, TranslatedFields from teamModule import local_settings class Formation(TranslatableModel): translations = TranslatedFields( na...
34.493562
98
0.72975
from django.db import models from cms.models.pluginmodel import CMSPlugin from django.utils.encoding import python_2_unicode_compatible from hvad.models import TranslatableModel, TranslatedFields from teamModule import local_settings class Formation(TranslatableModel): translations = TranslatedFields( na...
true
true
f76b627bfd767d51760c65cdc9bb4bb746beb300
6,244
py
Python
google-datacatalog-rdbms-connector/src/google/datacatalog_connectors/rdbms/prepare/sql_objects/sql_objects_datacatalog_entry_factory.py
brucearctor/datacatalog-connectors-rdbms
7ff5dc858ea7aa21486343304fc281692480cdb8
[ "Apache-2.0" ]
null
null
null
google-datacatalog-rdbms-connector/src/google/datacatalog_connectors/rdbms/prepare/sql_objects/sql_objects_datacatalog_entry_factory.py
brucearctor/datacatalog-connectors-rdbms
7ff5dc858ea7aa21486343304fc281692480cdb8
[ "Apache-2.0" ]
null
null
null
google-datacatalog-rdbms-connector/src/google/datacatalog_connectors/rdbms/prepare/sql_objects/sql_objects_datacatalog_entry_factory.py
brucearctor/datacatalog-connectors-rdbms
7ff5dc858ea7aa21486343304fc281692480cdb8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
38.782609
79
0.67665
import pandas as pd from google.cloud import datacatalog from google.protobuf import timestamp_pb2 from google.datacatalog_connectors.commons.prepare.base_entry_factory import \ BaseEntryFactory from google.datacatalog_connectors.rdbms.scrape import constants class SQLObjectsDataCatalogEntryFactory(BaseEntryFac...
true
true
f76b62810a7ce5a798f948bc17788f25fbdf698c
1,029
py
Python
from_config.py
18737581408/1
a6bed14ac8f062f437cc1e34ac9b3f24b5a52a1e
[ "Apache-2.0" ]
834
2018-04-09T23:29:45.000Z
2022-02-24T21:57:26.000Z
from_config.py
18737581408/1
a6bed14ac8f062f437cc1e34ac9b3f24b5a52a1e
[ "Apache-2.0" ]
12
2018-04-11T16:46:35.000Z
2020-06-03T10:40:03.000Z
from_config.py
18737581408/1
a6bed14ac8f062f437cc1e34ac9b3f24b5a52a1e
[ "Apache-2.0" ]
227
2018-04-10T03:41:36.000Z
2022-02-16T22:20:56.000Z
from utils.config import process_config from utils.dirs import create_dirs from utils.args import get_args from utils import factory import sys def main(): # capture the config path from the run arguments # then process the json configuration fill try: args = get_args() config = process_con...
29.4
116
0.6793
from utils.config import process_config from utils.dirs import create_dirs from utils.args import get_args from utils import factory import sys def main(): try: args = get_args() config = process_config(args.config) create_dirs([config.callbacks.tensorboard_log_dir, config....
true
true
f76b628f6d227d5d3479af001ac8080a9b98f68d
34,216
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/operations/_virtual_networks_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
3
2020-06-23T02:25:27.000Z
2021-09-07T18:48:11.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/operations/_virtual_networks_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
510
2019-07-17T16:11:19.000Z
2021-08-02T08:38:32.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/operations/_virtual_networks_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
5
2019-09-04T12:51:37.000Z
2020-09-16T07:28:40.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 ...
49.16092
230
0.662059
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpR...
true
true
f76b63c473edc29ecd7ccc13495a902ad6bdb905
2,896
py
Python
test/graph_testing/grouping_split_merge.py
aspinuso/dispel4py
4843c1d396ddd860eec56631c4842041b3eaca1f
[ "Apache-2.0" ]
2
2017-09-07T04:33:18.000Z
2019-01-07T13:32:15.000Z
test/graph_testing/grouping_split_merge.py
aspinuso/dispel4py
4843c1d396ddd860eec56631c4842041b3eaca1f
[ "Apache-2.0" ]
2
2016-10-06T13:07:05.000Z
2017-12-20T09:47:08.000Z
test/graph_testing/grouping_split_merge.py
aspinuso/dispel4py
4843c1d396ddd860eec56631c4842041b3eaca1f
[ "Apache-2.0" ]
5
2016-09-01T08:38:20.000Z
2018-08-28T12:08:39.000Z
''' This is a dispy graph which produces a workflow that sends copies of the output data from the producer node (words) to two nodes (filter1 and filter2), and the outputs of those two filters are merged in the last node (count). .. image:: /api/images/grouping_split_merge.png It can be executed with MPI and STORM....
36.658228
214
0.683702
from test.graph_testing import testing_PEs as t from dispel4py.workflow_graph import WorkflowGraph def testGrouping(): words = t.RandomWordProducer() filter1 = t.RandomFilter() filter2 = t.RandomFilter() count = t.WordCounter() graph = WorkflowGraph() graph.connect(words, 'output', filter1, 'i...
true
true
f76b644fc839c511cf3afdd752db152e507a8e58
46,385
py
Python
salt/states/boto_cloudfront.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
null
null
null
salt/states/boto_cloudfront.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
null
null
null
salt/states/boto_cloudfront.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Manage CloudFront distributions .. versionadded:: 2018.3.0 Create, update and destroy CloudFront distributions. This module accepts explicit AWS credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtain...
40.264757
120
0.605605
from __future__ import absolute_import, print_function, unicode_literals import difflib import logging import uuid import copy import json from salt.ext import six from salt.ext.six.moves import range log = logging.getLogger(__name__) def __virtual__(): if "boto_cloudfront.get_distribution" not in __salt__: ...
true
true
f76b64f2fc70a1a7ce17d32466633326b4be32ee
5,065
py
Python
photologue/tests/test_zipupload.py
portalop/django-photologue
0c98d93851e2649bcafbc496d4d03e213f43f227
[ "BSD-3-Clause" ]
null
null
null
photologue/tests/test_zipupload.py
portalop/django-photologue
0c98d93851e2649bcafbc496d4d03e213f43f227
[ "BSD-3-Clause" ]
null
null
null
photologue/tests/test_zipupload.py
portalop/django-photologue
0c98d93851e2649bcafbc496d4d03e213f43f227
[ "BSD-3-Clause" ]
null
null
null
from django.test import TestCase from django.core.files import File from django.core.exceptions import ValidationError from ..models import GalleryUpload, Gallery, Photo from .factories import GalleryFactory, PhotoFactory, SAMPLE_ZIP_PATH, SAMPLE_NOT_IMAGE_ZIP_PATH, \ IGNORED_FILES_ZIP_PATH class GalleryUploadTe...
39.570313
98
0.553603
from django.test import TestCase from django.core.files import File from django.core.exceptions import ValidationError from ..models import GalleryUpload, Gallery, Photo from .factories import GalleryFactory, PhotoFactory, SAMPLE_ZIP_PATH, SAMPLE_NOT_IMAGE_ZIP_PATH, \ IGNORED_FILES_ZIP_PATH class GalleryUploadTe...
true
true
f76b65213be0be4408af0ff47e81e5de03e5a2ae
6,919
py
Python
src/pytest_alembic/runner.py
bluefish6/pytest-alembic
09ef403063218f965da70bb7b7ba9a269aa145b3
[ "MIT" ]
47
2020-04-16T20:03:04.000Z
2022-03-23T09:51:01.000Z
src/pytest_alembic/runner.py
bluefish6/pytest-alembic
09ef403063218f965da70bb7b7ba9a269aa145b3
[ "MIT" ]
30
2020-06-26T15:46:45.000Z
2022-03-12T17:29:38.000Z
src/pytest_alembic/runner.py
bluefish6/pytest-alembic
09ef403063218f965da70bb7b7ba9a269aa145b3
[ "MIT" ]
8
2021-03-04T16:44:22.000Z
2022-01-21T19:16:33.000Z
import contextlib import functools from dataclasses import dataclass from typing import List, Optional from pytest_alembic.config import Config from pytest_alembic.executor import CommandExecutor, ConnectionExecutor from pytest_alembic.history import AlembicHistory from pytest_alembic.revision_data import RevisionData...
36.036458
102
0.680879
import contextlib import functools from dataclasses import dataclass from typing import List, Optional from pytest_alembic.config import Config from pytest_alembic.executor import CommandExecutor, ConnectionExecutor from pytest_alembic.history import AlembicHistory from pytest_alembic.revision_data import RevisionData...
true
true
f76b65f379d3cee42d91364ca414ecc02cf1f649
16,950
py
Python
gdal/swig/python/samples/build_jp2_from_xml.py
jpapadakis/gdal
f07aa15fd65af36b04291303cc6834c87f662814
[ "MIT" ]
18
2021-01-27T00:07:35.000Z
2022-03-25T22:20:13.000Z
gdal/swig/python/samples/build_jp2_from_xml.py
jpapadakis/gdal
f07aa15fd65af36b04291303cc6834c87f662814
[ "MIT" ]
null
null
null
gdal/swig/python/samples/build_jp2_from_xml.py
jpapadakis/gdal
f07aa15fd65af36b04291303cc6834c87f662814
[ "MIT" ]
1
2021-11-21T02:33:51.000Z
2021-11-21T02:33:51.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ****************************************************************************** # $Id$ # # Project: GDAL # Purpose: Build a JPEG2000 file from the XML structure dumped by dump_jp2.py # Mostly useful to build non-conformant files # Author: Even Rouault, ...
36.140725
140
0.631091
import os import struct import sys from osgeo import gdal XML_TYPE_IDX = 0 XML_VALUE_IDX = 1 XML_FIRST_CHILD_IDX = 2 def Usage(): print('Usage: build_jp2_from_xml in.xml out.jp2') return 1 def find_xml_node(ar, element_name, immediate_child=False, only_attributes=False): value = ar[XML_VALUE_IDX]...
true
true
f76b66994aa320b5e4afd0639f05b141d463b94c
168
py
Python
Scripts/django-admin.py
melvinjosekurian/e_commerce_website
c4942389b2fadf11a331bc22f6908f037b5cfb07
[ "MIT" ]
null
null
null
Scripts/django-admin.py
melvinjosekurian/e_commerce_website
c4942389b2fadf11a331bc22f6908f037b5cfb07
[ "MIT" ]
null
null
null
Scripts/django-admin.py
melvinjosekurian/e_commerce_website
c4942389b2fadf11a331bc22f6908f037b5cfb07
[ "MIT" ]
null
null
null
#!c:\users\outof\documents\projects\tryten\scripts\python.exe from django.core import management if __name__ == "__main__": management.execute_from_command_line()
28
61
0.791667
from django.core import management if __name__ == "__main__": management.execute_from_command_line()
true
true
f76b67216ce8fbe9d0b13b02687de8799ce0c924
1,453
py
Python
tests/test_base/test_base.py
luckyadogun/tally
e8d74f4b17e555143ee9d30d50499d48688c36e5
[ "MIT" ]
null
null
null
tests/test_base/test_base.py
luckyadogun/tally
e8d74f4b17e555143ee9d30d50499d48688c36e5
[ "MIT" ]
null
null
null
tests/test_base/test_base.py
luckyadogun/tally
e8d74f4b17e555143ee9d30d50499d48688c36e5
[ "MIT" ]
null
null
null
import pytest from core.base import BaseProduct from core.products import TangibleProduct, NoInstanceAccessError class TestBaseProduct: def test_class_exists(self): assert globals().get('BaseProduct') == BaseProduct def test_base_fails_without_implementing_abstracts(self): wit...
34.595238
90
0.668273
import pytest from core.base import BaseProduct from core.products import TangibleProduct, NoInstanceAccessError class TestBaseProduct: def test_class_exists(self): assert globals().get('BaseProduct') == BaseProduct def test_base_fails_without_implementing_abstracts(self): wit...
true
true
f76b6731201a8f3111eea7a043efcf430e732849
1,054
py
Python
treenav/tests/urls.py
itsdkey/django-treenav
cea0bea7212333071f9a8a4731acdb2873a13010
[ "BSD-3-Clause" ]
null
null
null
treenav/tests/urls.py
itsdkey/django-treenav
cea0bea7212333071f9a8a4731acdb2873a13010
[ "BSD-3-Clause" ]
null
null
null
treenav/tests/urls.py
itsdkey/django-treenav
cea0bea7212333071f9a8a4731acdb2873a13010
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls import url, include, handler404 from django.http import HttpResponse, HttpResponseNotFound from django.template import Template, Context from django.contrib import admin import treenav.urls from ..admin import MenuItemAdmin from ..models import MenuItem admin.autodiscover() # create a second Ad...
25.095238
74
0.689753
from django.conf.urls import url, include, handler404 from django.http import HttpResponse, HttpResponseNotFound from django.template import Template, Context from django.contrib import admin import treenav.urls from ..admin import MenuItemAdmin from ..models import MenuItem admin.autodiscover() site2 = admin.AdminS...
true
true
f76b68d2a8d12eee2e12e9a70a9cb45afa5bda35
290
py
Python
djclick/test/testprj/testapp/models.py
disinformation-index/django-click
3584bff81cb7891a1aa2d7fe49c1db501f5b0e84
[ "MIT" ]
null
null
null
djclick/test/testprj/testapp/models.py
disinformation-index/django-click
3584bff81cb7891a1aa2d7fe49c1db501f5b0e84
[ "MIT" ]
null
null
null
djclick/test/testprj/testapp/models.py
disinformation-index/django-click
3584bff81cb7891a1aa2d7fe49c1db501f5b0e84
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class DummyModel(models.Model): slug = models.CharField(max_length=50) def __str__(self): return str(self.id)
22.307692
61
0.789655
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class DummyModel(models.Model): slug = models.CharField(max_length=50) def __str__(self): return str(self.id)
true
true
f76b69359b4f37bc8bafb5fb9b5b158f2cbc8f77
177
py
Python
scripts/field/ds_tuto_2_3.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
2
2020-04-15T03:16:07.000Z
2020-08-12T23:28:32.000Z
scripts/field/ds_tuto_2_3.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
null
null
null
scripts/field/ds_tuto_2_3.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
3
2020-08-25T06:55:25.000Z
2020-12-01T13:07:43.000Z
sm.showFieldEffect("demonSlayer/whiteOut", 0) sm.sendDelay(1950) sm.completeQuestNoRewards(23203) sm.deleteQuest(23203) sm.curNodeEventEnd(True) sm.warpInstanceIn(931050300, 0)
25.285714
45
0.824859
sm.showFieldEffect("demonSlayer/whiteOut", 0) sm.sendDelay(1950) sm.completeQuestNoRewards(23203) sm.deleteQuest(23203) sm.curNodeEventEnd(True) sm.warpInstanceIn(931050300, 0)
true
true
f76b6a888acaeeadd67ac9a70d1de652c3dff91d
1,560
py
Python
schedule.py
KT12/DailyProgrammer
127aaa4ab27a42706af01be80f7aae3b83f44fbc
[ "MIT" ]
null
null
null
schedule.py
KT12/DailyProgrammer
127aaa4ab27a42706af01be80f7aae3b83f44fbc
[ "MIT" ]
null
null
null
schedule.py
KT12/DailyProgrammer
127aaa4ab27a42706af01be80f7aae3b83f44fbc
[ "MIT" ]
null
null
null
# Challenge from: # https://www.reddit.com/r/dailyprogrammer/comments/pihtx/intermediate_challenge_1/ import sys def main(): pass def init_schedule(): events = {} question = input('''What would you like to do?\nInput a to add an event \nInput d to delete an event ...
24.761905
84
0.571154
import sys def main(): pass def init_schedule(): events = {} question = input('''What would you like to do?\nInput a to add an event \nInput d to delete an event \nInput l to list events \nInput q to quit\n''') if question == 'a': a...
false
true
f76b6c44692f3c5b9b4c698efa29600c2b1b870c
17,397
py
Python
corehq/form_processor/backends/sql/update_strategy.py
akyogi/commcare-hq
44c34634e1b54f566ca200f828ea2aa112f33aa4
[ "BSD-3-Clause" ]
null
null
null
corehq/form_processor/backends/sql/update_strategy.py
akyogi/commcare-hq
44c34634e1b54f566ca200f828ea2aa112f33aa4
[ "BSD-3-Clause" ]
null
null
null
corehq/form_processor/backends/sql/update_strategy.py
akyogi/commcare-hq
44c34634e1b54f566ca200f828ea2aa112f33aa4
[ "BSD-3-Clause" ]
null
null
null
import logging import sys from functools import cmp_to_key from django.utils.translation import ugettext as _ from ddtrace import tracer from iso8601 import iso8601 from casexml.apps.case import const from casexml.apps.case.const import CASE_ACTION_COMMTRACK from casexml.apps.case.exceptions import ( CaseValueEr...
42.328467
112
0.664425
import logging import sys from functools import cmp_to_key from django.utils.translation import ugettext as _ from ddtrace import tracer from iso8601 import iso8601 from casexml.apps.case import const from casexml.apps.case.const import CASE_ACTION_COMMTRACK from casexml.apps.case.exceptions import ( CaseValueEr...
true
true
f76b6c86ceed8ae75ce3966c5aae6f35ee4ae6b0
4,186
py
Python
src/model.py
carseven/color-blind-test-hack
debac7cc1c8176ff722e1e7fb5f5eae12a92d3a0
[ "MIT" ]
null
null
null
src/model.py
carseven/color-blind-test-hack
debac7cc1c8176ff722e1e7fb5f5eae12a92d3a0
[ "MIT" ]
null
null
null
src/model.py
carseven/color-blind-test-hack
debac7cc1c8176ff722e1e7fb5f5eae12a92d3a0
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf from tensorflow.python.keras import models, layers from tensorflow.python.keras.datasets import mnist from tensorflow.python.keras.preprocessing.image import ImageDataGenerator import random import json (train_images, train_labels), (test_images, test_labels) = mnis...
34.311475
79
0.650741
import numpy as np import tensorflow as tf from tensorflow.python.keras import models, layers from tensorflow.python.keras.datasets import mnist from tensorflow.python.keras.preprocessing.image import ImageDataGenerator import random import json (train_images, train_labels), (test_images, test_labels) = mnis...
true
true
f76b6d6618e7b83a3d0ab680962dfe0299573a65
1,113
py
Python
generator/group.py
ngalkina86/ironpython_training
e8ce77cd1864e57466115b0cbe3a68eea8ec8e37
[ "Apache-2.0" ]
null
null
null
generator/group.py
ngalkina86/ironpython_training
e8ce77cd1864e57466115b0cbe3a68eea8ec8e37
[ "Apache-2.0" ]
null
null
null
generator/group.py
ngalkina86/ironpython_training
e8ce77cd1864e57466115b0cbe3a68eea8ec8e37
[ "Apache-2.0" ]
null
null
null
from model.group import Group import random import string import os.path import getopt import sys import time import clr clr.AddReferenceByName('') from Microsoft.Office.Interop import Excel try: opts, args = getopt.getopt(sys.argv[1:], "n:f:", ["number of groups", "file"]) except getopt.GetoptError as err: g...
19.875
95
0.668464
from model.group import Group import random import string import os.path import getopt import sys import time import clr clr.AddReferenceByName('') from Microsoft.Office.Interop import Excel try: opts, args = getopt.getopt(sys.argv[1:], "n:f:", ["number of groups", "file"]) except getopt.GetoptError as err: g...
true
true
f76b6e057c2805fa93556d4bde1274db72971a8b
1,109
py
Python
megengine_release/configs/fcos_res18_coco_3x_800size.py
megvii-research/ICD
a97e0ecd9b69dbc0e3c2b8168c1d72ea79c6641b
[ "Apache-2.0" ]
32
2021-11-09T11:19:21.000Z
2022-03-21T17:37:32.000Z
configs/fcos_res18_coco_3x_800size.py
Senwang98/ICD
fdda393088fa31ac6dc9ddbd7ec3e7008ea32ff4
[ "Apache-2.0" ]
3
2022-02-28T08:51:13.000Z
2022-03-30T09:16:41.000Z
configs/fcos_res18_coco_3x_800size.py
Senwang98/ICD
fdda393088fa31ac6dc9ddbd7ec3e7008ea32ff4
[ "Apache-2.0" ]
4
2021-11-11T11:59:05.000Z
2022-03-30T03:26:41.000Z
# -*- coding: utf-8 -*- # This repo is licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTI...
27.725
88
0.697024
from megengine import hub import models class CustomFCOSConfig(models.FCOSConfig): def __init__(self): super().__init__() self.backbone = "resnet18" self.fpn_in_channels = [128, 256, 512] @hub.pretrained( "https://data.megengine.org.cn/models/weights/" "fcos_res18_coco_3x_800si...
true
true
f76b6eadab98963373077d941b7e3c0b8e223e4e
1,256
py
Python
cray/modules/crus/cli.py
ardangelo/craycli
a943ff2d069aadd319ad4ea3ed344c791797fd53
[ "MIT" ]
1
2022-03-01T20:40:15.000Z
2022-03-01T20:40:15.000Z
cray/modules/crus/cli.py
ardangelo/craycli
a943ff2d069aadd319ad4ea3ed344c791797fd53
[ "MIT" ]
2
2022-02-25T20:48:55.000Z
2022-03-16T11:07:33.000Z
cray/modules/crus/cli.py
ardangelo/craycli
a943ff2d069aadd319ad4ea3ed344c791797fd53
[ "MIT" ]
2
2022-03-08T17:49:40.000Z
2022-03-15T22:22:41.000Z
"""CRUS - Compute Rolling Upgrade Service MIT License (C) Copyright [2020] Hewlett Packard Enterprise Development LP 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, includin...
46.518519
74
0.800955
from cray.generator import generate cli = generate(__file__, condense=False)
true
true
f76b7151dff76ee7d4cc9d718914856ff6a3340f
2,639
py
Python
video-insights/gather_service_info.py
amol-m-deshpande/success_finally
fc9b5035d8c63a3b2b265e2811933fe747aaa818
[ "Apache-2.0" ]
null
null
null
video-insights/gather_service_info.py
amol-m-deshpande/success_finally
fc9b5035d8c63a3b2b265e2811933fe747aaa818
[ "Apache-2.0" ]
null
null
null
video-insights/gather_service_info.py
amol-m-deshpande/success_finally
fc9b5035d8c63a3b2b265e2811933fe747aaa818
[ "Apache-2.0" ]
null
null
null
import os import sys import json service = sys.argv[1] servicename=sys.argv[2] region=sys.argv[3] plan = sys.argv[4] filename = sys.argv[5] data = os.popen("ibmcloud resource service-instance-create "+servicename+" "+service+" "+plan+" "+region).read() print(data) if(len(data.split("\n"))<3): data = json.loads(o...
43.262295
152
0.586586
import os import sys import json service = sys.argv[1] servicename=sys.argv[2] region=sys.argv[3] plan = sys.argv[4] filename = sys.argv[5] data = os.popen("ibmcloud resource service-instance-create "+servicename+" "+service+" "+plan+" "+region).read() print(data) if(len(data.split("\n"))<3): data = json.loads(o...
true
true
f76b733ef0bb16a7edf21c4cc4baf0a42b1c5729
3,726
py
Python
homeassistant/components/weather/zamg.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
4
2019-01-10T14:47:54.000Z
2021-04-22T02:06:27.000Z
homeassistant/components/weather/zamg.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
6
2021-02-08T21:02:40.000Z
2022-03-12T00:52:16.000Z
homeassistant/components/weather/zamg.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
3
2018-09-14T07:34:09.000Z
2018-09-29T12:57:10.000Z
""" Sensor for data from Austrian "Zentralanstalt für Meteorologie und Geodynamik". For more details about this platform, please refer to the documentation at https://home-assistant.io/components/weather.zamg/ """ import logging import voluptuous as vol from homeassistant.components.weather import ( WeatherEntit...
32.684211
79
0.695115
import logging import voluptuous as vol from homeassistant.components.weather import ( WeatherEntity, ATTR_WEATHER_HUMIDITY, ATTR_WEATHER_PRESSURE, ATTR_WEATHER_TEMPERATURE, ATTR_WEATHER_WIND_BEARING, ATTR_WEATHER_WIND_SPEED, PLATFORM_SCHEMA) from homeassistant.const import ( CONF_NAME, TEMP_CELSIUS, ...
true
true
f76b73ffc6e337c12daeb6047aa170107bfe1bc8
279
py
Python
Python/2.py
manishaverma1012/programs
dd77546219eab2f2ee81dd0d599b78ebd8f95957
[ "MIT" ]
null
null
null
Python/2.py
manishaverma1012/programs
dd77546219eab2f2ee81dd0d599b78ebd8f95957
[ "MIT" ]
null
null
null
Python/2.py
manishaverma1012/programs
dd77546219eab2f2ee81dd0d599b78ebd8f95957
[ "MIT" ]
null
null
null
is_cold = True is_hot= False if is_cold: print("hello") print("you are fucker") elif is_hot: print("shame on you") print("you are dick") else: print("im your sis") pritn("you are my bro") temp = 30 if temp < 40: print("its not hot day") else: print("its cold")
12.130435
25
0.641577
is_cold = True is_hot= False if is_cold: print("hello") print("you are fucker") elif is_hot: print("shame on you") print("you are dick") else: print("im your sis") pritn("you are my bro") temp = 30 if temp < 40: print("its not hot day") else: print("its cold")
true
true
f76b74670feb8c19b902c053d17c2a421b142cdd
2,839
py
Python
leo/plugins/editpane/leotextedit.py
thhonigm/leo-editor
34cc572bd80b2833984bcd34878a572ab51816de
[ "MIT" ]
1
2020-11-07T23:22:12.000Z
2020-11-07T23:22:12.000Z
leo/plugins/editpane/leotextedit.py
thhonigm/leo-editor
34cc572bd80b2833984bcd34878a572ab51816de
[ "MIT" ]
1
2020-06-19T02:28:25.000Z
2020-06-19T02:28:25.000Z
leo/plugins/editpane/leotextedit.py
connorng/leo-editor
dd41fd3c854ceab286b1111fa4bbe30f65237dcb
[ "MIT" ]
null
null
null
#@+leo-ver=5-thin #@+node:tbrown.20171028115144.5: * @file ../plugins/editpane/leotextedit.py #@+<<leotextedit.py imports >> #@+node:tbrown.20171028115508.1: ** <<leotextedit.py imports >> # import re import leo.core.leoGlobals as g assert g from leo.core.leoQt import QtWidgets # QtConst, QtCore, QtGui from leo.core....
33.4
81
0.64248
import leo.core.leoGlobals as g assert g from leo.core.leoQt import QtWidgets from leo.core.leoColorizer import JEditColorizer import leo.plugins.qt_text as qt_text def DBG(text): print(f"LEP: {text}") class LEP_LeoTextEdit(QtWidgets.QTextEdit): lep_type = "EDITOR" lep_name = "Leo Text Edit" ...
true
true
f76b746ffe0ce525859156c3c3bb46596e88a48a
2,036
py
Python
transforms/__init__.py
nuxeo-cps/zope2--PortalTransforms
753f67202b016d0b07edd3bc65fd827cb39e50db
[ "BSD-3-Clause" ]
null
null
null
transforms/__init__.py
nuxeo-cps/zope2--PortalTransforms
753f67202b016d0b07edd3bc65fd827cb39e50db
[ "BSD-3-Clause" ]
null
null
null
transforms/__init__.py
nuxeo-cps/zope2--PortalTransforms
753f67202b016d0b07edd3bc65fd827cb39e50db
[ "BSD-3-Clause" ]
null
null
null
### Register Transforms ### This is interesting because we don't expect all transforms to be ### available on all platforms. To do this we allow things to fail at ### two levels ### 1) Imports ### If the import fails the module is removed from the list and ### will not be processed/registered ### 2) Registration ...
35.103448
83
0.657171
### available on all platforms. To do this we allow things to fail at ### two levels ### 1) Imports ### If the import fails the module is removed from the list and ### will not be processed/registered ### 2) Registration ### A second phase happens when the loaded modules register method ### is called and th...
false
true
f76b747428a3bc6007829def474e4148fe5df005
1,375
py
Python
retroprime/transformer_model/onmt/modules/position_ffn_h.py
wangxr0526/RetroPrime
a765b670b72fbfd512d0d437da8f27a95f9f0554
[ "MIT" ]
12
2020-09-30T11:16:42.000Z
2022-03-09T08:12:48.000Z
retroprime/transformer_model/onmt/modules/position_ffn_h.py
wangxr0526/RetroPrime
a765b670b72fbfd512d0d437da8f27a95f9f0554
[ "MIT" ]
2
2021-12-14T13:06:33.000Z
2022-03-29T03:04:44.000Z
retroprime/transformer_model/onmt/modules/position_ffn_h.py
wangxr0526/RetroPrime
a765b670b72fbfd512d0d437da8f27a95f9f0554
[ "MIT" ]
1
2021-02-01T07:30:07.000Z
2021-02-01T07:30:07.000Z
""" Position feed-forward network from "Attention is All You Need" """ import torch.nn as nn import onmt from onmt.modules.hyperbolic import cLinear class PositionwiseFeedForward_h(nn.Module): """ A two-layer Feed-Forward-Network with residual layer norm. Args: d_model (int): the size of i...
29.255319
76
0.604364
import torch.nn as nn import onmt from onmt.modules.hyperbolic import cLinear class PositionwiseFeedForward_h(nn.Module): def __init__(self, d_model, d_ff, c, dropout=0.1): super(PositionwiseFeedForward_h, self).__init__() self.w_1 = cLinear(d_model, d_ff, c) self.w_2 =...
true
true
f76b7595e24e4a3ee4ad06f630007ee738a8a809
6,392
py
Python
examples/reservoir/test_mnist_esn_with_memory.py
SocratesNFR/evodynamic
682b610096182bde2298cdca352e7b319a0e4c41
[ "Apache-2.0" ]
9
2019-06-07T22:57:07.000Z
2022-01-17T12:35:08.000Z
examples/reservoir/test_mnist_esn_with_memory.py
SocratesNFR/evodynamic
682b610096182bde2298cdca352e7b319a0e4c41
[ "Apache-2.0" ]
null
null
null
examples/reservoir/test_mnist_esn_with_memory.py
SocratesNFR/evodynamic
682b610096182bde2298cdca352e7b319a0e4c41
[ "Apache-2.0" ]
4
2020-09-02T16:17:58.000Z
2021-12-05T21:28:32.000Z
""" Testing features and method for Echo State Network - Reservoir for MNIST digit classification with memory """ import tensorflow.compat.v1 as tf tf.disable_v2_behavior() import numpy as np import evodynamic.experiment as experiment import evodynamic.connection.random as conn_random import evodynamic.connection as c...
39.45679
120
0.699625
import tensorflow.compat.v1 as tf tf.disable_v2_behavior() import numpy as np import evodynamic.experiment as experiment import evodynamic.connection.random as conn_random import evodynamic.connection as connection import evodynamic.connection.custom as conn_custom import evodynamic.cells.activation as act import evod...
true
true
f76b76777a3df9aca37b81642c6f5080ae2c1e22
1,858
py
Python
src/solutions/common/migrations/re_generate_loyalty_exports.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
src/solutions/common/migrations/re_generate_loyalty_exports.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
src/solutions/common/migrations/re_generate_loyalty_exports.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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 appl...
38.708333
104
0.746502
import time from datetime import date from dateutil.relativedelta import relativedelta from google.appengine.ext import deferred from rogerthat.rpc import users from solutions.common.bizz.loyalty import create_loyalty_statistics_for_service from solutions.common.models import SolutionSettings from solutions.common.m...
true
true
f76b772315c66ac54fde3df49cefa8f6c69dbcf8
2,890
py
Python
tests/ROOT/performance_Delphes.py
shane-breeze/AlphaTwirl
59dbd5348af31d02e133d43fd5bfaad6b99a155e
[ "BSD-3-Clause" ]
null
null
null
tests/ROOT/performance_Delphes.py
shane-breeze/AlphaTwirl
59dbd5348af31d02e133d43fd5bfaad6b99a155e
[ "BSD-3-Clause" ]
7
2018-02-26T10:32:26.000Z
2018-03-19T12:27:12.000Z
tests/ROOT/performance_Delphes.py
shane-breeze/AlphaTwirl
59dbd5348af31d02e133d43fd5bfaad6b99a155e
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Tai Sakuma <tai.sakuma@gmail.com> ##__________________________________________________________________|| import os, sys import timeit import array import ROOT from alphatwirl.roottree import Events, BEvents # https://cp3.irmp.ucl.ac.be/projects/delphes/ticket/1039 ROOT.gInterpreter.Declare('#...
34.404762
97
0.752941
import os, sys import timeit import array import ROOT from alphatwirl.roottree import Events, BEvents ROOT.gInterpreter.Declare('#include "classes/DelphesClasses.h"') ROOT.gInterpreter.Declare('#include "external/ExRootAnalysis/ExRootTreeReader.h"') ROOT.gSystem.Load("libDelphes.so") inputPath = '/hdfs/user/ds13962...
false
true
f76b78078a00d13c70deabbd9bdf229f3b135332
40,054
py
Python
tests/modeladmin/test_checks.py
shinshin86/django
5cc81cd9eb69f5f7a711412c02039b435c393135
[ "PSF-2.0", "BSD-3-Clause" ]
1
2019-11-17T04:10:38.000Z
2019-11-17T04:10:38.000Z
tests/modeladmin/test_checks.py
Blaahborgh/django
c591bc3ccece1514d6b419826c7fa36ada9d9213
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/modeladmin/test_checks.py
Blaahborgh/django
c591bc3ccece1514d6b419826c7fa36ada9d9213
[ "PSF-2.0", "BSD-3-Clause" ]
1
2020-11-04T08:47:02.000Z
2020-11-04T08:47:02.000Z
from django import forms from django.contrib.admin import BooleanFieldListFilter, SimpleListFilter from django.contrib.admin.options import VERTICAL, ModelAdmin, TabularInline from django.contrib.admin.sites import AdminSite from django.core.checks import Error from django.forms.models import BaseModelFormSet from djan...
31.43956
110
0.617317
from django import forms from django.contrib.admin import BooleanFieldListFilter, SimpleListFilter from django.contrib.admin.options import VERTICAL, ModelAdmin, TabularInline from django.contrib.admin.sites import AdminSite from django.core.checks import Error from django.forms.models import BaseModelFormSet from djan...
true
true
f76b7934b9d7b225e00916717950cee093600019
2,561
py
Python
setup.py
greenmo000/electrum-britcoin
ad0248eb552d29c41ecd06d8b0a1f7f8179d1ee8
[ "MIT" ]
null
null
null
setup.py
greenmo000/electrum-britcoin
ad0248eb552d29c41ecd06d8b0a1f7f8179d1ee8
[ "MIT" ]
null
null
null
setup.py
greenmo000/electrum-britcoin
ad0248eb552d29c41ecd06d8b0a1f7f8179d1ee8
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # python setup.py sdist --format=zip,gztar from setuptools import setup import os import sys import platform import imp import argparse version = imp.load_source('version', 'lib/version.py') if sys.version_info[:3] < (2, 7, 0): sys.exit("Error: Electrum requires Python version >= 2.7.0......
29.102273
80
0.61148
from setuptools import setup import os import sys import platform import imp import argparse version = imp.load_source('version', 'lib/version.py') if sys.version_info[:3] < (2, 7, 0): sys.exit("Error: Electrum requires Python version >= 2.7.0...") data_files = [] if platform.system() in ['Linux', 'FreeBSD', ...
true
true
f76b794e887711365270a3d291e02c990ea1a0e6
1,538
py
Python
data/external/repositories/282415/2016_Kaggle_DataScience_Bowl-master/No_segmentation_style_preprocessing_testing.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories/282415/2016_Kaggle_DataScience_Bowl-master/No_segmentation_style_preprocessing_testing.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories/282415/2016_Kaggle_DataScience_Bowl-master/No_segmentation_style_preprocessing_testing.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
1
2019-12-04T08:23:33.000Z
2019-12-04T08:23:33.000Z
'''Testing the crop_resize function''' testpath = "./Data/Competition_data/train/1/study/sax_10/IM-4562-0001.dcm" testf = dicom.read_file(testpath) img = crop_resize(testf.pixel_array.astype(float) / np.max(testf.pixel_array), 64) rawimg = testf.pixel_array.astype(float) # plt.imshow(rawimg,'gray') # plt.imshow(img, ...
33.434783
117
0.755527
'''Testing the crop_resize function''' testpath = "./Data/Competition_data/train/1/study/sax_10/IM-4562-0001.dcm" testf = dicom.read_file(testpath) img = crop_resize(testf.pixel_array.astype(float) / np.max(testf.pixel_array), 64) rawimg = testf.pixel_array.astype(float) '''Testing the get_data function''' testdata...
false
true
f76b797828fdf82988fd546e9aae170266a175ee
3,421
py
Python
setup.py
KingTaTo/CS321-Racer-1
9674c16c4cdf778dee7553674269ac40564b450f
[ "MIT" ]
null
null
null
setup.py
KingTaTo/CS321-Racer-1
9674c16c4cdf778dee7553674269ac40564b450f
[ "MIT" ]
null
null
null
setup.py
KingTaTo/CS321-Racer-1
9674c16c4cdf778dee7553674269ac40564b450f
[ "MIT" ]
null
null
null
import os from setuptools import find_packages, setup # include the non python files def package_files(directory, strip_leading): paths = [] for (path, directories, filenames) in os.walk(directory): for filename in filenames: package_file = os.path.join(path, filename) ...
31.1
83
0.508331
import os from setuptools import find_packages, setup def package_files(directory, strip_leading): paths = [] for (path, directories, filenames) in os.walk(directory): for filename in filenames: package_file = os.path.join(path, filename) paths.append(package_file[le...
true
true
f76b7a6aef7ed687cbd5ca0051d74238d79dae97
1,850
py
Python
classifier/code-analysis/nb_gridCV.py
banboooo044/natural-language-sentiment-anaysis
e18d7c0373d9f0a00d5a3cc14abf671081bc940b
[ "DOC" ]
null
null
null
classifier/code-analysis/nb_gridCV.py
banboooo044/natural-language-sentiment-anaysis
e18d7c0373d9f0a00d5a3cc14abf671081bc940b
[ "DOC" ]
null
null
null
classifier/code-analysis/nb_gridCV.py
banboooo044/natural-language-sentiment-anaysis
e18d7c0373d9f0a00d5a3cc14abf671081bc940b
[ "DOC" ]
null
null
null
# 詳しい説明は同様のプログラム logis_gradCV.py を参照 import sys sys.path.append('../') import numpy as np import pandas as pd from scipy import sparse from sklearn.metrics import f1_score from sklearn.model_selection import GridSearchCV from sklearn.metrics import make_scorer import matplotlib.pyplot as plt import seaborn as sns f...
27.61194
118
0.651351
import sys sys.path.append('../') import numpy as np import pandas as pd from scipy import sparse from sklearn.metrics import f1_score from sklearn.model_selection import GridSearchCV from sklearn.metrics import make_scorer import matplotlib.pyplot as plt import seaborn as sns from src.runner import Runner from src...
true
true
f76b7b5daa383da043f711b3884a12d87322c3cf
1,823
py
Python
scripts/make_density_json.py
perovai/deepkoopman
eb6de915f5ea1f20b47cb3a22a384f55c30f0558
[ "MIT" ]
null
null
null
scripts/make_density_json.py
perovai/deepkoopman
eb6de915f5ea1f20b47cb3a22a384f55c30f0558
[ "MIT" ]
10
2021-07-07T09:24:33.000Z
2021-09-27T14:32:59.000Z
scripts/make_density_json.py
perovai/deepkoopman
eb6de915f5ea1f20b47cb3a22a384f55c30f0558
[ "MIT" ]
null
null
null
import json import sys from pathlib import Path import numpy as np from minydra import Parser from subsample_density_dataset import label_file from tqdm import tqdm if __name__ == "__main__": parser = Parser() args = parser.args.resolve() base = Path("/network/tmp1/schmidtv/perovai") out = Path("/ne...
29.885246
85
0.619309
import json import sys from pathlib import Path import numpy as np from minydra import Parser from subsample_density_dataset import label_file from tqdm import tqdm if __name__ == "__main__": parser = Parser() args = parser.args.resolve() base = Path("/network/tmp1/schmidtv/perovai") out = Path("/ne...
true
true
f76b7bf78ddc517a93784594ab1f9504e08d16bc
2,052
py
Python
src/commands/remove_secrets.py
raphagibello/kv-tool
abdea528b96210967cf603acfa9db88dd258e139
[ "Apache-2.0" ]
1
2021-12-10T00:53:02.000Z
2021-12-10T00:53:02.000Z
src/commands/remove_secrets.py
raphagibello/kv-tool
abdea528b96210967cf603acfa9db88dd258e139
[ "Apache-2.0" ]
null
null
null
src/commands/remove_secrets.py
raphagibello/kv-tool
abdea528b96210967cf603acfa9db88dd258e139
[ "Apache-2.0" ]
1
2021-06-21T16:39:23.000Z
2021-06-21T16:39:23.000Z
from azure.keyvault.secrets import SecretClient from azure.identity import DefaultAzureCredential,AzureCliCredential from commands import add_secrets import csv import click def register_commands(group): group.add_command(remove_single) group.add_command(remove_list) group.add_command(clean_keyvault) @cli...
38.716981
89
0.721735
from azure.keyvault.secrets import SecretClient from azure.identity import DefaultAzureCredential,AzureCliCredential from commands import add_secrets import csv import click def register_commands(group): group.add_command(remove_single) group.add_command(remove_list) group.add_command(clean_keyvault) @cli...
true
true
f76b7c6921d5dd9a13991b47ae1ec3d628e4b13f
10,198
py
Python
tests/plugins/lti_consumer/test_models.py
leduong/richie
bf7ed379b7e2528cd790dadcec10ac2656efd189
[ "MIT" ]
174
2018-04-14T23:36:01.000Z
2022-03-10T09:27:01.000Z
tests/plugins/lti_consumer/test_models.py
leduong/richie
bf7ed379b7e2528cd790dadcec10ac2656efd189
[ "MIT" ]
631
2018-04-04T11:28:53.000Z
2022-03-31T11:18:31.000Z
tests/plugins/lti_consumer/test_models.py
leduong/richie
bf7ed379b7e2528cd790dadcec10ac2656efd189
[ "MIT" ]
64
2018-06-27T08:35:01.000Z
2022-03-10T09:27:43.000Z
""" Model tests """ from unittest import mock from django.core.exceptions import ValidationError from django.test import TestCase, override_settings from richie.plugins.lti_consumer.factories import LTIConsumerFactory from richie.plugins.lti_consumer.models import LTIConsumer def get_lti_settings(is_regex=True): ...
40.149606
95
0.652481
from unittest import mock from django.core.exceptions import ValidationError from django.test import TestCase, override_settings from richie.plugins.lti_consumer.factories import LTIConsumerFactory from richie.plugins.lti_consumer.models import LTIConsumer def get_lti_settings(is_regex=True): suffix = "[0-9a-f]...
true
true
f76b7d7cec2facc078654629308dd62ddc0707d3
1,741
pyw
Python
Chapter01/callRadioButton2.pyw
houdinii/Qt5-Python-GUI-Programming-Cookbook
70982e18fd15ae5ac545c7411e9b6ddcbd1a0e5a
[ "MIT" ]
131
2018-08-22T22:12:33.000Z
2022-03-10T18:48:12.000Z
Chapter01/callRadioButton2.pyw
Jhongesell/QT5-Python3-GUI-Programming-Cookbook
e0e69bb13d1d59c24a07bc54b7c63239aa1bf0ff
[ "MIT" ]
4
2018-08-09T08:42:07.000Z
2021-03-02T13:37:21.000Z
Chapter01/callRadioButton2.pyw
Jhongesell/QT5-Python3-GUI-Programming-Cookbook
e0e69bb13d1d59c24a07bc54b7c63239aa1bf0ff
[ "MIT" ]
79
2018-08-03T03:09:21.000Z
2022-03-15T21:25:43.000Z
import sys from PyQt5.QtWidgets import QDialog, QApplication from demoRadioButton2 import * class MyForm(QDialog): def __init__(self): super().__init__() self.ui = Ui_Dialog() self.ui.setupUi(self) self.ui.radioButtonMedium.toggled.connect(self.dispSelected) se...
38.688889
111
0.652499
import sys from PyQt5.QtWidgets import QDialog, QApplication from demoRadioButton2 import * class MyForm(QDialog): def __init__(self): super().__init__() self.ui = Ui_Dialog() self.ui.setupUi(self) self.ui.radioButtonMedium.toggled.connect(self.dispSelected) se...
true
true
f76b7e2faa62a8afb164fabb266f703657639aa8
6,446
py
Python
core/domain/html_cleaner_test.py
sophiewu6/oppia
56f26d2d20b26ef54929fbf3fabe01f20a48b0b0
[ "Apache-2.0" ]
null
null
null
core/domain/html_cleaner_test.py
sophiewu6/oppia
56f26d2d20b26ef54929fbf3fabe01f20a48b0b0
[ "Apache-2.0" ]
2
2022-02-13T21:08:35.000Z
2022-03-02T09:59:52.000Z
core/domain/html_cleaner_test.py
dmoneyballer/oppia
b7ecbe67c5a6effa4af4a872d4e6cbff14d8abbb
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
34.10582
78
0.515824
from core.domain import html_cleaner from core.tests import test_utils class HtmlCleanerUnitTests(test_utils.GenericTestBase): def setUp(self): super(HtmlCleanerUnitTests, self).setUp() self.longMessage = True def test_good_tags_allowed(self): test_data = [( '<a href="h...
true
true
f76b7ea404c80b2efbd4605d73fff2789e56b96d
6,440
py
Python
tests/release_test.py
shouldsee/cathpy
5f7fa1322434b2d254f0158c5840f029b12dbafe
[ "MIT" ]
7
2019-04-15T19:18:44.000Z
2022-02-07T20:43:45.000Z
tests/release_test.py
shouldsee/cathpy
5f7fa1322434b2d254f0158c5840f029b12dbafe
[ "MIT" ]
14
2019-04-24T11:47:38.000Z
2021-06-09T08:43:14.000Z
tests/release_test.py
shouldsee/cathpy
5f7fa1322434b2d254f0158c5840f029b12dbafe
[ "MIT" ]
4
2019-04-15T16:32:12.000Z
2021-03-05T02:54:51.000Z
import difflib import filecmp import logging from random import shuffle import os import tempfile from cathpy.core.release import ( CathDomainList, CathNamesList, CathDomall, CathDomainListEntry, CathDomallEntry, ) from . import testutils LOG = logging.getLogger(__name__) def cmp_file_contents(f1, f2, rstr...
35.777778
114
0.612112
import difflib import filecmp import logging from random import shuffle import os import tempfile from cathpy.core.release import ( CathDomainList, CathNamesList, CathDomall, CathDomainListEntry, CathDomallEntry, ) from . import testutils LOG = logging.getLogger(__name__) def cmp_file_contents(f1, f2, rstr...
true
true
f76b7ecaf119386e010e53d3ffdf4042648d380b
3,267
py
Python
plotly/graph_objs/layout/scene/camera/_up.py
omridanan/plotly.py
a8d26670cba49ce15ce9b7639ae0f55a6088a825
[ "MIT" ]
null
null
null
plotly/graph_objs/layout/scene/camera/_up.py
omridanan/plotly.py
a8d26670cba49ce15ce9b7639ae0f55a6088a825
[ "MIT" ]
null
null
null
plotly/graph_objs/layout/scene/camera/_up.py
omridanan/plotly.py
a8d26670cba49ce15ce9b7639ae0f55a6088a825
[ "MIT" ]
1
2019-02-18T04:12:56.000Z
2019-02-18T04:12:56.000Z
from plotly.basedatatypes import BaseLayoutHierarchyType import copy class Up(BaseLayoutHierarchyType): # x # - @property def x(self): """ The 'x' property is a number and may be specified as: - An int or float Returns ------- int|float """ ...
22.531034
70
0.4824
from plotly.basedatatypes import BaseLayoutHierarchyType import copy class Up(BaseLayoutHierarchyType): @property def x(self): return self['x'] @x.setter def x(self, val): self['x'] = val @property def y(self): return self['y'] @y.setter def ...
true
true
f76b7f1ea4509134d1bec7a216d7891f6d0a5df4
2,071
py
Python
docs/conf.py
reyesvicente/unofficial-covidtracker-ph
d1a0548f9f838ccbd0abb88fffb762784354c8a9
[ "MIT" ]
null
null
null
docs/conf.py
reyesvicente/unofficial-covidtracker-ph
d1a0548f9f838ccbd0abb88fffb762784354c8a9
[ "MIT" ]
null
null
null
docs/conf.py
reyesvicente/unofficial-covidtracker-ph
d1a0548f9f838ccbd0abb88fffb762784354c8a9
[ "MIT" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
34.516667
79
0.667793
import os import sys import django sys.path.insert(0, os.path.abspath("/app")) os.environ.setdefault("DATABASE_URL", "") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") django.setup() project = "Covid-19 PH" copyright = """2020, Vicente G. Reyes""" author = "Vicente G. Reyes" extensi...
true
true
f76b7f6096e44f6ffaadfeffe5621d93bade7f37
89
py
Python
alyBlog/apps/wxlogin/apps.py
Hx-someone/aly-blog
e0205777d2ff1642fde5741a5b5c1b06ad675001
[ "WTFPL" ]
1
2020-04-17T02:15:45.000Z
2020-04-17T02:15:45.000Z
alyBlog/apps/wxlogin/apps.py
Hx-someone/aly-blog
e0205777d2ff1642fde5741a5b5c1b06ad675001
[ "WTFPL" ]
null
null
null
alyBlog/apps/wxlogin/apps.py
Hx-someone/aly-blog
e0205777d2ff1642fde5741a5b5c1b06ad675001
[ "WTFPL" ]
null
null
null
from django.apps import AppConfig class WxloginConfig(AppConfig): name = 'wxlogin'
14.833333
33
0.752809
from django.apps import AppConfig class WxloginConfig(AppConfig): name = 'wxlogin'
true
true
f76b809f2a9d75fee24f25b2443eed6d8a7eba82
6,025
py
Python
homeassistant/components/rainforest_eagle/data.py
stefano055415/core
9fc96818dff7f48fca07993cffc22f8d602e1c11
[ "Apache-2.0" ]
1
2021-12-11T00:41:25.000Z
2021-12-11T00:41:25.000Z
homeassistant/components/rainforest_eagle/data.py
stefano055415/core
9fc96818dff7f48fca07993cffc22f8d602e1c11
[ "Apache-2.0" ]
69
2020-08-04T09:03:43.000Z
2022-03-31T06:13:01.000Z
homeassistant/components/rainforest_eagle/data.py
stefano055415/core
9fc96818dff7f48fca07993cffc22f8d602e1c11
[ "Apache-2.0" ]
null
null
null
"""Rainforest data.""" from __future__ import annotations from datetime import timedelta import logging import aioeagle import aiohttp import async_timeout from requests.exceptions import ConnectionError as ConnectError, HTTPError, Timeout from uEagle import Eagle as Eagle100Reader from homeassistant.config_entries ...
31.710526
92
0.66722
from __future__ import annotations from datetime import timedelta import logging import aioeagle import aiohttp import async_timeout from requests.exceptions import ConnectionError as ConnectError, HTTPError, Timeout from uEagle import Eagle as Eagle100Reader from homeassistant.config_entries import ConfigEntry from...
true
true
f76b80d02fa3f71f0d8ad7f3140fe69d16f0c180
1,558
py
Python
Template/GenerateDocs.py
BriTang1997/ACM
66cc774aae8e5fd92c02cd93fbdae1c56d53ceb3
[ "MIT" ]
null
null
null
Template/GenerateDocs.py
BriTang1997/ACM
66cc774aae8e5fd92c02cd93fbdae1c56d53ceb3
[ "MIT" ]
null
null
null
Template/GenerateDocs.py
BriTang1997/ACM
66cc774aae8e5fd92c02cd93fbdae1c56d53ceb3
[ "MIT" ]
1
2021-05-08T09:35:20.000Z
2021-05-08T09:35:20.000Z
# -*- coding: utf-8 -*- #请在python3下的环境编译 #安装依赖pip3 install python-docx from docx import Document from docx.shared import Pt from docx.enum.text import WD_ALIGN_PARAGRAPH import os document = Document() document.add_heading('HHU ACM Template', 0) p = document.add_paragraph('Writter ') p.add_run('Luo Longjun, ')...
33.148936
91
0.624519
from docx import Document from docx.shared import Pt from docx.enum.text import WD_ALIGN_PARAGRAPH import os document = Document() document.add_heading('HHU ACM Template', 0) p = document.add_paragraph('Writter ') p.add_run('Luo Longjun, ').bold = True p.add_run('Tang ShengYang ').bold = True document.add_page...
true
true
f76b80d980b94a724ed6b1b05981a62cbc518978
8,489
py
Python
examples/word_embedding/train.py
kinghuin/PaddleNLP
20ef5e6e9abf2c515d6c40e5a04f835126ca32aa
[ "Apache-2.0" ]
1
2021-03-25T07:14:26.000Z
2021-03-25T07:14:26.000Z
examples/word_embedding/train.py
kinghuin/PaddleNLP
20ef5e6e9abf2c515d6c40e5a04f835126ca32aa
[ "Apache-2.0" ]
null
null
null
examples/word_embedding/train.py
kinghuin/PaddleNLP
20ef5e6e9abf2c515d6c40e5a04f835126ca32aa
[ "Apache-2.0" ]
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 applica...
38.762557
148
0.670397
from functools import partial import argparse import os import os.path as osp import paddle import paddle.nn as nn import paddlenlp from paddlenlp.utils.downloader import get_path_from_url from paddlenlp.embeddings import TokenEmbedding from paddlenlp.data import JiebaTokenizer, Vocab from paddlenlp.datasets import lo...
true
true
f76b814a4bda11e1cfd880ae1cd9b9aacf650a0b
289
py
Python
xfdlfw/metric/roc_auc.py
vkola-lab/multi-GPU
d50cff0d587b640fb3af94329102d3eacdd70aa5
[ "MIT" ]
null
null
null
xfdlfw/metric/roc_auc.py
vkola-lab/multi-GPU
d50cff0d587b640fb3af94329102d3eacdd70aa5
[ "MIT" ]
null
null
null
xfdlfw/metric/roc_auc.py
vkola-lab/multi-GPU
d50cff0d587b640fb3af94329102d3eacdd70aa5
[ "MIT" ]
null
null
null
""" Created on Thu Oct 14 14:47:38 2021 @author: cxue2 """ from ._metric import Metric from ._misc import _numpy import sklearn.metrics as M class RocAuc(Metric): @_numpy def __call__(self, output, y_true): return M.roc_auc_score(y_true, output[:, 1], **self.kwargs)
16.055556
67
0.685121
from ._metric import Metric from ._misc import _numpy import sklearn.metrics as M class RocAuc(Metric): @_numpy def __call__(self, output, y_true): return M.roc_auc_score(y_true, output[:, 1], **self.kwargs)
true
true
f76b8208361694de6ace657c31b753843c18be17
6,706
gyp
Python
third_party/sfntly/sfntly.gyp
domenic/mojo
53dda76fed90a47c35ed6e06baf833a0d44495b8
[ "BSD-3-Clause" ]
231
2015-01-08T09:04:44.000Z
2021-12-30T03:03:10.000Z
third_party/sfntly/sfntly.gyp
j4ckfrost/android_external_chromium_org
a1a3dad8b08d1fcf6b6b36c267158ed63217c780
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2018-02-10T21:00:08.000Z
2018-03-20T05:09:50.000Z
third_party/sfntly/sfntly.gyp
j4ckfrost/android_external_chromium_org
a1a3dad8b08d1fcf6b6b36c267158ed63217c780
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
268
2015-01-21T05:53:28.000Z
2022-03-25T22:09:01.000Z
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'chromium_code': 1, }, 'targets': [ { 'target_name': 'sfntly', 'type': 'static_library', 'sources': [ ...
46.895105
72
0.660006
{ 'variables': { 'chromium_code': 1, }, 'targets': [ { 'target_name': 'sfntly', 'type': 'static_library', 'sources': [ 'cpp/src/sfntly/data/byte_array.cc', 'cpp/src/sfntly/data/byte_array.h', 'cpp/src/sfntly/data/font_data.cc', 'cpp/src/sfntly/data/font_d...
true
true
f76b83b22c2de82b7ff2a0753f4a2ca4865fd2dc
3,010
py
Python
Tests/EndToEndTests/CNTKv2Python/Examples/ConvNet_CIFAR10_DataAug_test.py
Wootai/CNTK
5eca042341c8152594e67652a44c3b733a2acaa0
[ "RSA-MD" ]
null
null
null
Tests/EndToEndTests/CNTKv2Python/Examples/ConvNet_CIFAR10_DataAug_test.py
Wootai/CNTK
5eca042341c8152594e67652a44c3b733a2acaa0
[ "RSA-MD" ]
null
null
null
Tests/EndToEndTests/CNTKv2Python/Examples/ConvNet_CIFAR10_DataAug_test.py
Wootai/CNTK
5eca042341c8152594e67652a44c3b733a2acaa0
[ "RSA-MD" ]
null
null
null
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.md file in the project root # for full license information. # ============================================================================== import numpy as np import os import sys from cntk.ops.tests.ops_test_utils import ...
43
126
0.724585
 import numpy as np import os import sys from cntk.ops.tests.ops_test_utils import cntk_device from cntk.cntk_py import DeviceKind_GPU from cntk.device import try_set_default_device import pytest abs_path = os.path.dirname(os.path.abspath(__file__)) sys.path.append(abs_path) sys.path.append(os.path.join(abs_path, "....
false
true
f76b8496036bbb55b0311c516f9dd897eb3fa6ab
3,225
py
Python
isi_sdk_8_0_1/isi_sdk_8_0_1/models/compatibilities_ssd_active.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_0_1/isi_sdk_8_0_1/models/compatibilities_ssd_active.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_0_1/isi_sdk_8_0_1/models/compatibilities_ssd_active.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 4 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from isi_sdk_8_0_1.models.compati...
28.043478
125
0.587597
import pprint import re import six from isi_sdk_8_0_1.models.compatibilities_ssd_active_active_item import CompatibilitiesSsdActiveActiveItem class CompatibilitiesSsdActive(object): swagger_types = { 'active': 'list[CompatibilitiesSsdActiveActiveItem]' } attribute_map = { 'active'...
true
true
f76b84f9e4b2aef19d12c4f074b8f3a300a5b780
4,735
py
Python
train.py
adroiters/Brain-Segmentation
eb57710141de978cfa0db725c9c31923b7d87599
[ "MIT" ]
39
2019-03-05T20:00:45.000Z
2022-02-17T21:22:25.000Z
train.py
adroiters/Brain-Segmentation
eb57710141de978cfa0db725c9c31923b7d87599
[ "MIT" ]
7
2019-10-08T12:03:30.000Z
2021-11-29T14:51:55.000Z
train.py
adroiters/Brain-Segmentation
eb57710141de978cfa0db725c9c31923b7d87599
[ "MIT" ]
15
2019-04-03T16:06:39.000Z
2021-12-17T10:05:42.000Z
from utils.utils import data_train, data_val from utils.model import model, model_thresholding from utils.losses import dice_coefficient, dice_loss from utils.preprocess import * import pickle import keras ## VARIABLES ROOT = "./" ##BASE PATH TO MRBrainS18 LABEL = "Basal ganglia" ##LABEL TO TRAIN FOR EPOCHS = 400 ##NU...
39.789916
162
0.607603
from utils.utils import data_train, data_val from utils.model import model, model_thresholding from utils.losses import dice_coefficient, dice_loss from utils.preprocess import * import pickle import keras ROOT = "./" LABEL = "Basal ganglia" EPOCHS = 400 T1path, FLAIRpath, IRpath, segpath = data_train(root = ROOT) T...
true
true
f76b8597bc225b4a9a1ab7f8fe1492f6bf0facf3
15,758
py
Python
ann_benchmarks/datasets.py
maljovec/ann-benchmarks
03f9b3db562794787c936f9ea661ad3b08d5f062
[ "MIT" ]
null
null
null
ann_benchmarks/datasets.py
maljovec/ann-benchmarks
03f9b3db562794787c936f9ea661ad3b08d5f062
[ "MIT" ]
null
null
null
ann_benchmarks/datasets.py
maljovec/ann-benchmarks
03f9b3db562794787c936f9ea661ad3b08d5f062
[ "MIT" ]
null
null
null
import h5py import numpy import os import random import sys import subprocess # import samplers # import pyDOE # import ghalton try: from urllib import urlretrieve except ImportError: from urllib.request import urlretrieve # Python 3 def download(src, dst): if not os.path.exists(dst): # TODO: s...
39.199005
113
0.656428
import h5py import numpy import os import random import sys import subprocess try: from urllib import urlretrieve except ImportError: from urllib.request import urlretrieve def download(src, dst): if not os.path.exists(dst): print('downloading %s -> %s...' % (src, dst)) urlretri...
true
true
f76b85b4ef17ef95a4b490368183e945f1199594
3,249
py
Python
Graph_Algorithms/indegree_CountMin.py
anikeshkamath/IITGn_SURF_2016
396ce97e4ed8980a8d650a9e486a97b427bfc731
[ "MIT" ]
1
2018-10-02T12:30:18.000Z
2018-10-02T12:30:18.000Z
Graph_Algorithms/indegree_CountMin.py
ask95/IITGn_SURF_2016
396ce97e4ed8980a8d650a9e486a97b427bfc731
[ "MIT" ]
null
null
null
Graph_Algorithms/indegree_CountMin.py
ask95/IITGn_SURF_2016
396ce97e4ed8980a8d650a9e486a97b427bfc731
[ "MIT" ]
null
null
null
''' This module is a streaming algorithm developed to compute the (in)degree centrality of vertices using CountMin sketch. CountMin provides approximate frequencies for each distinct element in the input stream. Accuracy of the approximation based on the dimensions of the 2D array used to store these frequencies. Exact...
40.6125
361
0.706679
from streampy_classes import Stream from streampy_classes import Agent from streampy_classes import Operators import networkx as nx import numpy as np import hashlib def my_hash_value(input_element, array_no, size_of_array): m = hashlib.md5() m.update(str(input_element) + str(array_no)) hash_hex = int(m....
true
true
f76b874b3d8d6f4615dcff0240b5324571cbdb34
2,421
py
Python
nova/api/openstack/compute/image_size.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
5
2016-04-28T16:20:38.000Z
2021-04-25T11:19:03.000Z
nova/api/openstack/compute/image_size.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/compute/image_size.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
5
2020-04-08T20:24:45.000Z
2020-10-05T19:02:13.000Z
# Copyright 2013 Rackspace Hosting # 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 require...
35.086957
78
0.664188
from nova.api.openstack import extensions from nova.api.openstack import wsgi ALIAS = "image-size" authorize = extensions.os_compute_soft_authorizer(ALIAS) class ImageSizeController(wsgi.Controller): def _extend_image(self, image, image_cache): key = "OS-EXT-IMG-SIZE:size" ...
true
true
f76b876bb98483bf9ebfa2dd86b540870ca32ae4
2,970
py
Python
ngsutils/fastq/tile.py
bgruening/ngsutils
417e90dc1918fb553dd84990f2c54bd8cea8f44d
[ "BSD-3-Clause" ]
57
2015-03-09T01:26:45.000Z
2022-02-22T07:26:01.000Z
ngsutils/fastq/tile.py
bgruening/ngsutils
417e90dc1918fb553dd84990f2c54bd8cea8f44d
[ "BSD-3-Clause" ]
33
2015-02-03T23:24:46.000Z
2022-03-16T20:08:10.000Z
ngsutils/fastq/tile.py
bgruening/ngsutils
417e90dc1918fb553dd84990f2c54bd8cea8f44d
[ "BSD-3-Clause" ]
33
2015-01-18T16:47:47.000Z
2022-02-22T07:28:09.000Z
#!/usr/bin/env python ## category General ## desc Splits long FASTQ reads into smaller (tiled) chunks ''' For each read in a FASTQ file, split it into smaller (overlapping) chunks. Fragments are defined by their length and offset. For example, if the length is 35 and the offset is 10, sub-reads will be 1->35, 11->45, 2...
25.826087
108
0.556229
''' For each read in a FASTQ file, split it into smaller (overlapping) chunks. Fragments are defined by their length and offset. For example, if the length is 35 and the offset is 10, sub-reads will be 1->35, 11->45, 21->55, etc... If the offset and the length are the same, then the fragments will not overlap. Output ...
false
true
f76b881ab7e8f5e89e4bb2c2d3ee9394f7ca3621
958
py
Python
src/check_names.py
Mytherin/sqlancer
b4fdc6573229fecace95c87a830b0889a2837a7c
[ "MIT" ]
921
2020-04-15T14:09:11.000Z
2022-03-29T06:32:14.000Z
src/check_names.py
Mytherin/sqlancer
b4fdc6573229fecace95c87a830b0889a2837a7c
[ "MIT" ]
242
2020-05-26T07:46:57.000Z
2022-03-25T23:59:44.000Z
src/check_names.py
Mytherin/sqlancer
b4fdc6573229fecace95c87a830b0889a2837a7c
[ "MIT" ]
137
2020-06-02T15:48:36.000Z
2022-03-25T03:50:57.000Z
import os def get_java_files(directory): java_files = [] for root, dirs, files in os.walk(directory): for f in files: if f.endswith('.java'): java_files.append(f) return java_files def verify_prefix(prefix, files): if len(files) == 0: print(prefix + ' directory does not contain any files!') exit(-1)...
33.034483
74
0.729645
import os def get_java_files(directory): java_files = [] for root, dirs, files in os.walk(directory): for f in files: if f.endswith('.java'): java_files.append(f) return java_files def verify_prefix(prefix, files): if len(files) == 0: print(prefix + ' directory does not contain any files!') exit(-1)...
true
true
f76b885b59943a8499d54f72be20b34b05ba976d
3,854
py
Python
guardian/core.py
peopledoc/django-guardian
459827c2329975113cbf0d11f4fd476b5689a055
[ "BSD-2-Clause" ]
null
null
null
guardian/core.py
peopledoc/django-guardian
459827c2329975113cbf0d11f4fd476b5689a055
[ "BSD-2-Clause" ]
null
null
null
guardian/core.py
peopledoc/django-guardian
459827c2329975113cbf0d11f4fd476b5689a055
[ "BSD-2-Clause" ]
null
null
null
from itertools import chain from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.db.models import Q from guardian.utils import get_identity class ObjectPermissionChecker(object): """ Generic object permissions checker class being the heart o...
40.145833
80
0.609237
from itertools import chain from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.db.models import Q from guardian.utils import get_identity class ObjectPermissionChecker(object): def __init__(self, user_or_group=None): self.user, self.gr...
true
true
f76b8872041317052b828349b8676f8291d948a9
717
py
Python
Examples/ultrassonic_thread_HC_SR04.py
BosonsHiggs/arduPython
77114f70f5338109be1a440f8b35f833dc6bba1a
[ "MIT" ]
null
null
null
Examples/ultrassonic_thread_HC_SR04.py
BosonsHiggs/arduPython
77114f70f5338109be1a440f8b35f833dc6bba1a
[ "MIT" ]
null
null
null
Examples/ultrassonic_thread_HC_SR04.py
BosonsHiggs/arduPython
77114f70f5338109be1a440f8b35f833dc6bba1a
[ "MIT" ]
1
2022-01-05T00:01:46.000Z
2022-01-05T00:01:46.000Z
from threading import Thread from pyfirmata import Arduino, pyfirmata, util from pyfirmata.util import ping_time_to_distance import time ### Start of pin configuration board = Arduino() # or Arduino(port) define board print("Communication successfully started!") it = util.Iterator(board) it.start() sonarEcho = board...
22.40625
70
0.736402
from threading import Thread from pyfirmata import Arduino, pyfirmata, util from pyfirmata.util import ping_time_to_distance import time board = Arduino() print("Communication successfully started!") it = util.Iterator(board) it.start() sonarEcho = board.get_pin('d:7:o') time.sleep(1) class Echo(Thread): def __...
true
true
f76b88cd6616b14400ffa3c024ed39f04fb0c274
284
py
Python
app/models.py
tomtiez/Cooperative-DataAnalytics
da21f60ddbc07b8b66f6b7f28b293805bfe32d90
[ "MIT" ]
null
null
null
app/models.py
tomtiez/Cooperative-DataAnalytics
da21f60ddbc07b8b66f6b7f28b293805bfe32d90
[ "MIT" ]
null
null
null
app/models.py
tomtiez/Cooperative-DataAnalytics
da21f60ddbc07b8b66f6b7f28b293805bfe32d90
[ "MIT" ]
null
null
null
""" Definition of models. """ from django.db import models # Create your models here. class testdata(models.Model): id = models.IntegerField(default=170) type = models.CharField(max_length=20) source = models.CharField(max_length=20) total = models.IntegerField(default=200)
20.285714
41
0.75
from django.db import models class testdata(models.Model): id = models.IntegerField(default=170) type = models.CharField(max_length=20) source = models.CharField(max_length=20) total = models.IntegerField(default=200)
true
true
f76b897081beeaf1954bf9f8867100ffc9dd8cad
7,914
py
Python
ecosys3D/core/advection.py
cbrockw/ecosys3D
5e3b125688f571d1a0a2dce4789d7de0831e91c9
[ "MIT" ]
null
null
null
ecosys3D/core/advection.py
cbrockw/ecosys3D
5e3b125688f571d1a0a2dce4789d7de0831e91c9
[ "MIT" ]
null
null
null
ecosys3D/core/advection.py
cbrockw/ecosys3D
5e3b125688f571d1a0a2dce4789d7de0831e91c9
[ "MIT" ]
null
null
null
from .. import eco_method from ..variables import allocate from .utilities import pad_z_edges, where @eco_method(inline=True) def _calc_cr(vs, rjp, rj, rjm, vel): """ Calculates cr value used in superbee advection scheme """ eps = 1e-20 # prevent division by 0 return where(vs, vel > 0., rjm, rjp)...
46.828402
167
0.483321
from .. import eco_method from ..variables import allocate from .utilities import pad_z_edges, where @eco_method(inline=True) def _calc_cr(vs, rjp, rj, rjm, vel): eps = 1e-20 return where(vs, vel > 0., rjm, rjp) / where(vs, np.abs(rj) < eps, eps, rj) @eco_method def _adv_superbee(vs, vel, var, mask, dx, ax...
true
true
f76b8a30dc24d5f671c9c357c129ad73d4d0ccc7
14,712
py
Python
archive/I_implementation/II_run_crossvalidation.py
brain-link/cmne
0d87e0bcd0041b250ee484f39341a0bf83f72949
[ "MIT" ]
null
null
null
archive/I_implementation/II_run_crossvalidation.py
brain-link/cmne
0d87e0bcd0041b250ee484f39341a0bf83f72949
[ "MIT" ]
null
null
null
archive/I_implementation/II_run_crossvalidation.py
brain-link/cmne
0d87e0bcd0041b250ee484f39341a0bf83f72949
[ "MIT" ]
1
2022-03-15T12:28:20.000Z
2022-03-15T12:28:20.000Z
#** # @file Option_4_bio_mne_comparison.py # @author Christoph Dinh <chdinh@nmr.mgh.harvard.edu>; # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # @version 1.0 # @date May, 2017 # # @section LICENSE # # Copyright (C) 2017, Christoph Dinh. All rights reserved. # # @brief Model inverse operator wit...
54.69145
151
0.770188
import os import sys import config as cfg sys.path.append(cfg.repo_path + 'I_implementation/I_cmne/II_training') sys.path.append(cfg.repo_path + 'I_implementation/helpers') sys.path.append(cfg.repo_path + 'I_implementation/I_cmne/I_hyperparameter_evaluation') import numpy as np import random import matplotlib matpl...
true
true
f76b8a8e0ab3e838407ecdc4a5137d9dd59e54ae
1,658
py
Python
models/hashes.py
MIchaelMainer/msgraph-v10-models-python
adad66363ebe151be2332f3ef74a664584385748
[ "MIT" ]
1
2021-03-07T07:02:22.000Z
2021-03-07T07:02:22.000Z
models/hashes.py
MIchaelMainer/msgraph-v10-models-python
adad66363ebe151be2332f3ef74a664584385748
[ "MIT" ]
null
null
null
models/hashes.py
MIchaelMainer/msgraph-v10-models-python
adad66363ebe151be2332f3ef74a664584385748
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ''' # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # # This file was generated and any changes will be overwritten. ''' from __future__ import unicode_literals from ..one_drive_object_bas...
24.382353
151
0.58263
from __future__ import unicode_literals from ..one_drive_object_base import OneDriveObjectBase class Hashes(OneDriveObjectBase): def __init__(self, prop_dict={}): self._prop_dict = prop_dict @property def crc32_hash(self): if "crc32Hash" in self._prop_dict: return self._prop...
true
true
f76b8aa4178998dde996ac37595115e1c771b938
3,066
py
Python
kaggler/online_model/classification_tree.py
ppstacy/Kaggler
4fedc30153a4a74343fdec91468b96372873ebac
[ "MIT" ]
743
2015-02-11T15:47:17.000Z
2022-03-29T06:58:57.000Z
kaggler/online_model/classification_tree.py
Drimdave/Kaggler
2a8027b534d881619fab8f095cff8876c6b39c55
[ "MIT" ]
40
2015-03-16T17:44:40.000Z
2022-03-06T05:40:11.000Z
kaggler/online_model/classification_tree.py
Drimdave/Kaggler
2a8027b534d881619fab8f095cff8876c6b39c55
[ "MIT" ]
178
2015-02-11T20:43:26.000Z
2021-11-27T12:46:35.000Z
from ._tree import Tree from ..util import gini, count_dict, argmax class ClassificationTree(Tree): def __init__(self, number_of_features, number_of_functions=10, min_sample_split=200, predict_initialize={'count_dict': {}}): # Constant ...
35.241379
76
0.550554
from ._tree import Tree from ..util import gini, count_dict, argmax class ClassificationTree(Tree): def __init__(self, number_of_features, number_of_functions=10, min_sample_split=200, predict_initialize={'count_dict': {}}): sel...
true
true
f76b8aecfa5606e3e6fabcae6154038f8bc08079
847
py
Python
agw/processors/xml_to_json.py
MyDataShare/access-gateway
55883485c2b5570c5dd34efd2d836c26ad3eca9b
[ "MIT" ]
1
2022-01-03T09:27:48.000Z
2022-01-03T09:27:48.000Z
agw/processors/xml_to_json.py
MyDataShare/access-gateway
55883485c2b5570c5dd34efd2d836c26ad3eca9b
[ "MIT" ]
null
null
null
agw/processors/xml_to_json.py
MyDataShare/access-gateway
55883485c2b5570c5dd34efd2d836c26ad3eca9b
[ "MIT" ]
null
null
null
from typing import Dict, Any from xmltodict import parse # type: ignore # hints missing... from xml.parsers.expat import ExpatError from mds_logging import getLogger, timed from gateway_request_environment_plugin import GatewayRequestEnvironment from agw_request import AGWRequestResponse from service_exception_handl...
31.37037
74
0.731995
from typing import Dict, Any from xmltodict import parse from xml.parsers.expat import ExpatError from mds_logging import getLogger, timed from gateway_request_environment_plugin import GatewayRequestEnvironment from agw_request import AGWRequestResponse from service_exception_handler_plugin import InternalError ll ...
true
true
f76b8c50b39e30eefc61702771b80676a0fc3a86
8,745
py
Python
pyro/infer/tracetmc_elbo.py
futurewarning/pyro
005032f10099188fea86f63b6baa46a27867983f
[ "Apache-2.0" ]
null
null
null
pyro/infer/tracetmc_elbo.py
futurewarning/pyro
005032f10099188fea86f63b6baa46a27867983f
[ "Apache-2.0" ]
null
null
null
pyro/infer/tracetmc_elbo.py
futurewarning/pyro
005032f10099188fea86f63b6baa46a27867983f
[ "Apache-2.0" ]
1
2021-04-11T21:37:25.000Z
2021-04-11T21:37:25.000Z
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import queue import warnings import torch import pyro.poutine as poutine from pyro.distributions.util import is_identically_zero from pyro.infer.elbo import ELBO from pyro.infer.enum import ( get_importance_trace, iter_di...
40.674419
102
0.641509
import queue import warnings import torch import pyro.poutine as poutine from pyro.distributions.util import is_identically_zero from pyro.infer.elbo import ELBO from pyro.infer.enum import ( get_importance_trace, iter_discrete_escape, iter_discrete_extend, ) from pyro.infer.util import compute_site_dice...
true
true
f76b8d094b29e500abad61f5cd6fd050a873dfb5
899
py
Python
src/spyd/game/client/client_player_collection.py
DanSeraf/spyd
af893b7f9c67785613b25754eb2cf150523a9fe4
[ "Zlib" ]
null
null
null
src/spyd/game/client/client_player_collection.py
DanSeraf/spyd
af893b7f9c67785613b25754eb2cf150523a9fe4
[ "Zlib" ]
null
null
null
src/spyd/game/client/client_player_collection.py
DanSeraf/spyd
af893b7f9c67785613b25754eb2cf150523a9fe4
[ "Zlib" ]
null
null
null
from twisted.internet import reactor from spyd.game.client.exceptions import InvalidPlayerNumberReference class ClientPlayerCollection(object): def __init__(self, cn): self.cn = cn self.players = {} def has_pn(self, pn=-1): if pn == -1: pn = self.cn return pn in ...
23.657895
68
0.609566
from twisted.internet import reactor from spyd.game.client.exceptions import InvalidPlayerNumberReference class ClientPlayerCollection(object): def __init__(self, cn): self.cn = cn self.players = {} def has_pn(self, pn=-1): if pn == -1: pn = self.cn return pn in ...
true
true
f76b8d6e039ff08c51b0e7bfecbbc3c626f6f044
4,308
py
Python
PythonTools/qmark-show-pass.py
QMRonline/Tools-I-Use
7cfca98116f37d4887903536e373bdc5930d2b7d
[ "MIT" ]
1
2021-04-01T08:59:44.000Z
2021-04-01T08:59:44.000Z
PythonTools/qmark-show-pass.py
QMRonline/Tools-I-Use
7cfca98116f37d4887903536e373bdc5930d2b7d
[ "MIT" ]
null
null
null
PythonTools/qmark-show-pass.py
QMRonline/Tools-I-Use
7cfca98116f37d4887903536e373bdc5930d2b7d
[ "MIT" ]
null
null
null
# Import subprocess so we can use system commands import subprocess # Import the re module so that we can make use of regular expressions. import re # Python allows us to run system commands by using a function provided by the subprocess module # (subprocess.run(<list of command line arguments goes here>, <specify ...
52.536585
142
0.601903
import subprocess import re print(r""" **************************************************************** /$$$$$$ /$$ /$$__ $$ | $$ | $$ \ $$ /$$$$$$/$$$$ /$$$$$$ /$$$$$$ | $$ /$$ | $$ | $$| $$_ $$_ $$ |____ $$ /$$__ $$| $$ /$$/ |...
true
true
f76b8f589718a6ca115f98f812b2b749ce22d045
20,394
py
Python
tests/models/dstability/test_dstability_model.py
Deltares/geolib
d38aab35a034e977bb7684322395458986bda059
[ "MIT" ]
4
2021-10-29T21:30:47.000Z
2022-03-18T13:15:17.000Z
tests/models/dstability/test_dstability_model.py
cemsbv/GEOLib
54de109460a836caed51f0f26974a51f39edcfa3
[ "MIT" ]
3
2021-11-05T07:56:16.000Z
2022-03-27T13:27:05.000Z
tests/models/dstability/test_dstability_model.py
cemsbv/GEOLib
54de109460a836caed51f0f26974a51f39edcfa3
[ "MIT" ]
4
2021-10-29T21:30:51.000Z
2022-01-17T13:20:40.000Z
import os import pathlib import shutil from pathlib import Path import pytest from teamcity import is_running_under_teamcity from geolib.geometry.one import Point from geolib.models import BaseModel, BaseModelStructure from geolib.models.dstability import DStabilityModel from geolib.models.dstability.analysis import ...
32.422893
90
0.569775
import os import pathlib import shutil from pathlib import Path import pytest from teamcity import is_running_under_teamcity from geolib.geometry.one import Point from geolib.models import BaseModel, BaseModelStructure from geolib.models.dstability import DStabilityModel from geolib.models.dstability.analysis import ...
true
true
f76b90ad9cc22efe696d5d65f8185f2dd69feee5
4,069
py
Python
utils/utils.py
mo-vic/HanZiGan
dd8dc4b1eeffb01f928d7a4e5931cf6af1d7c1a4
[ "MIT" ]
null
null
null
utils/utils.py
mo-vic/HanZiGan
dd8dc4b1eeffb01f928d7a4e5931cf6af1d7c1a4
[ "MIT" ]
null
null
null
utils/utils.py
mo-vic/HanZiGan
dd8dc4b1eeffb01f928d7a4e5931cf6af1d7c1a4
[ "MIT" ]
null
null
null
import math import torch from torch._six import inf from torchvision.utils import make_grid import numpy as np from tqdm import tqdm def _grad_norm(parameters, norm_type=2): r"""Compute gradient norm of an iterable of parameters. The norm is computed over all gradients together, as if they were concate...
39.125
119
0.64291
import math import torch from torch._six import inf from torchvision.utils import make_grid import numpy as np from tqdm import tqdm def _grad_norm(parameters, norm_type=2): if isinstance(parameters, torch.Tensor): parameters = [parameters] parameters = list(filter(lambda p: p.grad is not None, para...
true
true
f76b91aca53b790d1f5ec0884b403ba3a85c9e10
207
py
Python
tinkerer/ext/__init__.py
rgaiacs/tinkerer
4c1298c175c2908a8445970d8f00b8c5abd12317
[ "BSD-2-Clause" ]
null
null
null
tinkerer/ext/__init__.py
rgaiacs/tinkerer
4c1298c175c2908a8445970d8f00b8c5abd12317
[ "BSD-2-Clause" ]
null
null
null
tinkerer/ext/__init__.py
rgaiacs/tinkerer
4c1298c175c2908a8445970d8f00b8c5abd12317
[ "BSD-2-Clause" ]
null
null
null
''' tinkerer.ext ~~~~~~~~~~~~ Blogging extensions. :copyright: Copyright 2011-2016 by Vlad Riscutia and contributors (see CONTRIBUTORS file) :license: FreeBSD, see LICENSE file '''
18.818182
74
0.63285
true
true
f76b91ddd64cc57356bd0c099750110debb00b9a
9,489
py
Python
django/db/backends/postgresql_psycopg2/base.py
Miserlou/django
35ddeee45573de57ae3c791bf36496b4a7028ddf
[ "BSD-3-Clause" ]
1
2016-03-07T15:37:48.000Z
2016-03-07T15:37:48.000Z
django/db/backends/postgresql_psycopg2/base.py
erdem/django
76d5daa60f90d3692b3ff3b7f5054e4bc7c1f374
[ "BSD-3-Clause" ]
null
null
null
django/db/backends/postgresql_psycopg2/base.py
erdem/django
76d5daa60f90d3692b3ff3b7f5054e4bc7c1f374
[ "BSD-3-Clause" ]
null
null
null
""" PostgreSQL database backend for Django. Requires psycopg 2: http://initd.org/projects/psycopg2 """ import sys from django.db import utils from django.db.backends import * from django.db.backends.signals import connection_created from django.db.backends.postgresql_psycopg2.operations import DatabaseOperations from...
39.5375
105
0.648857
""" PostgreSQL database backend for Django. Requires psycopg 2: http://initd.org/projects/psycopg2 """ import sys from django.db import utils from django.db.backends import * from django.db.backends.signals import connection_created from django.db.backends.postgresql_psycopg2.operations import DatabaseOperations from...
false
true
f76b93022f9ff6e19400246b4cf94df78cbe0a83
164,096
py
Python
src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py
ankitkumarr/azure-cli
839cf3783847a136e678d8f4ae9bf3dd8fcecf36
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py
ankitkumarr/azure-cli
839cf3783847a136e678d8f4ae9bf3dd8fcecf36
[ "MIT" ]
1
2021-06-01T23:53:29.000Z
2021-06-01T23:53:29.000Z
src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py
ankitkumarr/azure-cli
839cf3783847a136e678d8f4ae9bf3dd8fcecf36
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
53.019709
316
0.571604
import time import os from azure_devtools.scenario_tests import AllowLargeResponse, live_only from azure.cli.core.util import CLIError from azure.cli.core.mock import DummyCli from azure.cli.testsdk.base import execute from azure.cli.testsdk.exceptions import CliTestError from azure.cli.testsdk import ( JMESPath...
true
true
f76b94d413ebd07a51d7e370d90a97bb8f5e361c
9,258
py
Python
ComputerVision/Bag-of-Visual-Words/BoVW.py
lacie-life/MasterStudy
16bb79a41555693c7e8cbb3c248c4670e0097073
[ "MIT" ]
null
null
null
ComputerVision/Bag-of-Visual-Words/BoVW.py
lacie-life/MasterStudy
16bb79a41555693c7e8cbb3c248c4670e0097073
[ "MIT" ]
null
null
null
ComputerVision/Bag-of-Visual-Words/BoVW.py
lacie-life/MasterStudy
16bb79a41555693c7e8cbb3c248c4670e0097073
[ "MIT" ]
null
null
null
import argparse import cv2 import numpy as np import os from sklearn.cluster import KMeans from sklearn.cluster import MiniBatchKMeans from sklearn.svm import SVC from sklearn.preprocessing import StandardScaler from matplotlib import pyplot as plt from sklearn import svm, datasets from sklearn.model_selection import t...
31.277027
122
0.662454
import argparse import cv2 import numpy as np import os from sklearn.cluster import KMeans from sklearn.cluster import MiniBatchKMeans from sklearn.svm import SVC from sklearn.preprocessing import StandardScaler from matplotlib import pyplot as plt from sklearn import svm, datasets from sklearn.model_selection import t...
true
true
f76b9a961f06a0159aee6ffd7c1a80a3f54eb5c3
281,777
py
Python
models_SHOT_convex/rsyn0830m03hfsg.py
grossmann-group/pyomo-MINLP-benchmarking
714f0a0dffd61675649a805683c0627af6b4929e
[ "MIT" ]
null
null
null
models_SHOT_convex/rsyn0830m03hfsg.py
grossmann-group/pyomo-MINLP-benchmarking
714f0a0dffd61675649a805683c0627af6b4929e
[ "MIT" ]
null
null
null
models_SHOT_convex/rsyn0830m03hfsg.py
grossmann-group/pyomo-MINLP-benchmarking
714f0a0dffd61675649a805683c0627af6b4929e
[ "MIT" ]
null
null
null
# MINLP written by GAMS Convert at 01/15/21 11:37:20 # # Equation counts # Total E G L N X C B # 2935 1123 129 1683 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
36.363015
120
0.646785
from pyomo.environ import * model = m = ConcreteModel() m.x2 = Var(within=Reals,bounds=(0,None),initialize=0) m.x3 = Var(within=Reals,bounds=(0,None),initialize=0) m.x4 = Var(within=Reals,bounds=(0,None),initialize=0) m.x5 = Var(within=Reals,bounds=(0,None),initialize=0) m.x6 = Var(within=Reals,bounds=(0,None),ini...
true
true
f76b9acb172ebeed7dea5fed2da25fd47fcdb5f3
4,513
py
Python
plugins/weather/plugin.py
Someguy123/Cardinal
10cd2f903670d5508a3824a4c8b0a36485ab9ef6
[ "MIT" ]
null
null
null
plugins/weather/plugin.py
Someguy123/Cardinal
10cd2f903670d5508a3824a4c8b0a36485ab9ef6
[ "MIT" ]
null
null
null
plugins/weather/plugin.py
Someguy123/Cardinal
10cd2f903670d5508a3824a4c8b0a36485ab9ef6
[ "MIT" ]
null
null
null
import urllib2 from xml.dom import minidom WHERE_API_APP_ID = "MoToWJjdQX4XzV34ELXxh3MLG5x1cgBMiMrEuJ.0D_bohsdQlv5p7qzQXLgXmWID_zPRxFULW454h3" WHERE_API_URL = "http://where.yahooapis.com/v1/places.q(%s);count=1?appid=" + WHERE_API_APP_ID WHERE_API_NS = "http://where.yahooapis.com/v1/schema.rng" WEATHER_URL = 'http://x...
49.054348
125
0.563262
import urllib2 from xml.dom import minidom WHERE_API_APP_ID = "MoToWJjdQX4XzV34ELXxh3MLG5x1cgBMiMrEuJ.0D_bohsdQlv5p7qzQXLgXmWID_zPRxFULW454h3" WHERE_API_URL = "http://where.yahooapis.com/v1/places.q(%s);count=1?appid=" + WHERE_API_APP_ID WHERE_API_NS = "http://where.yahooapis.com/v1/schema.rng" WEATHER_URL = 'http://x...
true
true
f76b9c385c890ec5bbfb05f8d00d6692fee233b3
503
py
Python
setup.py
ofhellsfire/cdjs
d181eb42ad8076ca592d4b40b5c8f92c46bc757c
[ "MIT" ]
1
2021-02-27T15:05:09.000Z
2021-02-27T15:05:09.000Z
setup.py
ofhellsfire/cdjs
d181eb42ad8076ca592d4b40b5c8f92c46bc757c
[ "MIT" ]
null
null
null
setup.py
ofhellsfire/cdjs
d181eb42ad8076ca592d4b40b5c8f92c46bc757c
[ "MIT" ]
null
null
null
from setuptools import setup from setuptools_rust import Binding, RustExtension setup( name="cdjs", version="0.1.5", rust_extensions=[RustExtension("cdjs.cdjs", binding=Binding.PyO3)], packages=["cdjs"], author="ofhellsfire", author_email="ofhellsfire@yandex.ru", description="Custom Datetim...
27.944444
71
0.703777
from setuptools import setup from setuptools_rust import Binding, RustExtension setup( name="cdjs", version="0.1.5", rust_extensions=[RustExtension("cdjs.cdjs", binding=Binding.PyO3)], packages=["cdjs"], author="ofhellsfire", author_email="ofhellsfire@yandex.ru", description="Custom Datetim...
true
true
f76b9c8e47101e73e690d3d935ddf1fd47e7892d
3,898
py
Python
jobs/basic_job.py
masling/stock
f7a0add2b7533ff43d1ed1a238ec14f55b39e488
[ "Apache-2.0" ]
null
null
null
jobs/basic_job.py
masling/stock
f7a0add2b7533ff43d1ed1a238ec14f55b39e488
[ "Apache-2.0" ]
null
null
null
jobs/basic_job.py
masling/stock
f7a0add2b7533ff43d1ed1a238ec14f55b39e488
[ "Apache-2.0" ]
null
null
null
#!/usr/local/bin/python3 # -*- coding: utf-8 -*- import libs.common as common import sys import time import pandas as pd import tushare as ts from sqlalchemy.types import NVARCHAR from sqlalchemy import inspect import datetime ####### 3.pdf 方法。宏观经济数据 # 接口全部有错误。只专注股票数据。 def stat_all(tmp_datetime): # 存款利率 # d...
29.755725
122
0.610056
import libs.common as common import sys import time import pandas as pd import tushare as ts from sqlalchemy.types import NVARCHAR from sqlalchemy import inspect import datetime def stat_all(tmp_datetime): ...
true
true
f76b9d0b4dcb567dfbaa8d17ffccf103586845ef
5,551
py
Python
jupyterlab_server/tests/test_settings_api.py
ajbozarth/jupyterlab_server
f2d75736c68f623f1983a6fb808552680576a7d6
[ "BSD-3-Clause" ]
null
null
null
jupyterlab_server/tests/test_settings_api.py
ajbozarth/jupyterlab_server
f2d75736c68f623f1983a6fb808552680576a7d6
[ "BSD-3-Clause" ]
null
null
null
jupyterlab_server/tests/test_settings_api.py
ajbozarth/jupyterlab_server
f2d75736c68f623f1983a6fb808552680576a7d6
[ "BSD-3-Clause" ]
null
null
null
"""Test the Settings service API. """ import pytest import json import json5 import tornado from strict_rfc3339 import rfc3339_to_timestamp from .utils import expected_http_error from .utils import maybe_patch_ioloop, big_unicode_string async def test_get(fetch, labserverapp): id = '@jupyterlab/apputils-extensi...
33.642424
77
0.64673
import pytest import json import json5 import tornado from strict_rfc3339 import rfc3339_to_timestamp from .utils import expected_http_error from .utils import maybe_patch_ioloop, big_unicode_string async def test_get(fetch, labserverapp): id = '@jupyterlab/apputils-extension:themes' r = await fetch('lab', ...
true
true
f76b9f271e0cb1fe16ea4e5fd1911c6ff6495221
3,762
py
Python
src/models/distributions.py
RomanShen/radial-bnn
7c8bc85397c1461a6fd5ea9adf0631f9ade27f6c
[ "Apache-2.0" ]
null
null
null
src/models/distributions.py
RomanShen/radial-bnn
7c8bc85397c1461a6fd5ea9adf0631f9ade27f6c
[ "Apache-2.0" ]
null
null
null
src/models/distributions.py
RomanShen/radial-bnn
7c8bc85397c1461a6fd5ea9adf0631f9ade27f6c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- """ @author: romanshen @file: distributions.py @time: 2021/05/07 @contact: xiangqing.shen@njust.edu.cn """ import torch # Priors def gaussian_prior(name, log2pi, mu, sigma, device): """ Args: *args: {"mu": , "sigma":, "log2pi"} Returns: log_gaussi...
31.35
101
0.599947
import torch def gaussian_prior(name, log2pi, mu, sigma, device): if mu == 0 and sigma == 1: def log_gaussian_pdf(x): x = x.view(x.shape[0], -1) return -log2pi * x.shape[1] / 2 - torch.sum(x ** 2) / 2.0 return log_gaussian_pdf else: mu_tensor = torch...
true
true
f76b9ff42bd25ace299cc5c211bbb561623f68a5
1,891
py
Python
sgcn.py
shuson/wox-plugin-sgcn
c4c795d21f761090219b8773475e6f3b9b95808b
[ "MIT" ]
null
null
null
sgcn.py
shuson/wox-plugin-sgcn
c4c795d21f761090219b8773475e6f3b9b95808b
[ "MIT" ]
null
null
null
sgcn.py
shuson/wox-plugin-sgcn
c4c795d21f761090219b8773475e6f3b9b95808b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import shutil import unicodedata import webbrowser import requests from wox import Wox,WoxAPI from bs4 import BeautifulSoup URL = 'http://bbs.sgcn.com/forum.php?mod=forumdisplay&fid=197&filter=author&orderby=dateline' URL2 = 'http://bbs.sgcn.com/forum.php?mod=forumdisplay&fid=160&fi...
28.651515
94
0.584347
import os import shutil import unicodedata import webbrowser import requests from wox import Wox,WoxAPI from bs4 import BeautifulSoup URL = 'http://bbs.sgcn.com/forum.php?mod=forumdisplay&fid=197&filter=author&orderby=dateline' URL2 = 'http://bbs.sgcn.com/forum.php?mod=forumdisplay&fid=160&filter=author&orderby=date...
false
true
f76ba21138eb6d3f9a22573c605abc238dfa4a1f
5,065
py
Python
Gena/contrib/utils-hillshadeRgb.py
c11/earthengine-py-notebooks
144b57e4d952da095ba73c3cc8ce2f36291162ff
[ "MIT" ]
1
2020-05-31T14:19:59.000Z
2020-05-31T14:19:59.000Z
Gena/contrib/utils-hillshadeRgb.py
c11/earthengine-py-notebooks
144b57e4d952da095ba73c3cc8ce2f36291162ff
[ "MIT" ]
null
null
null
Gena/contrib/utils-hillshadeRgb.py
c11/earthengine-py-notebooks
144b57e4d952da095ba73c3cc8ce2f36291162ff
[ "MIT" ]
null
null
null
# %% """ <table class="ee-notebook-buttons" align="left"> <td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Gena/contrib/utils-hillshadeRgb.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td> <td><a targ...
45.630631
1,021
0.734847
import subprocess try: import geemap except ImportError: print('geemap package not installed. Installing ...') subprocess.check_call(["python", '-m', 'pip', 'install', 'geemap']) try: import google.colab import geemap.eefolium as emap except: import geemap as emap import ee try: ee.Ini...
true
true
f76ba26518c9a33bb229052b70b0efd36dd55870
4,437
py
Python
acommonsenseguide/codebase/doublylinkedlist.py
kriuvi/python-playground
09d861e6f0e5aa57883e779fdf2693aabe82d450
[ "MIT" ]
null
null
null
acommonsenseguide/codebase/doublylinkedlist.py
kriuvi/python-playground
09d861e6f0e5aa57883e779fdf2693aabe82d450
[ "MIT" ]
null
null
null
acommonsenseguide/codebase/doublylinkedlist.py
kriuvi/python-playground
09d861e6f0e5aa57883e779fdf2693aabe82d450
[ "MIT" ]
null
null
null
class DoublyNode: def __init__(self, data): self.data = data self.leftlink = None self.rightlink = None def __str__(self): return '| {0} |'.format(self.data) def __repr__(self): return "Node('{0}')".format(self.data) def getdata(self): return self.data...
29.58
96
0.562542
class DoublyNode: def __init__(self, data): self.data = data self.leftlink = None self.rightlink = None def __str__(self): return '| {0} |'.format(self.data) def __repr__(self): return "Node('{0}')".format(self.data) def getdata(self): return self.data...
true
true
f76ba2a71a4ea7acdc5c2183bf0ffe4c3c5aab56
6,312
py
Python
spider/views.py
dapianzi/pics
ce9dacd6777e0e8a5554675a4dcb96adbc90dcc8
[ "MIT" ]
null
null
null
spider/views.py
dapianzi/pics
ce9dacd6777e0e8a5554675a4dcb96adbc90dcc8
[ "MIT" ]
null
null
null
spider/views.py
dapianzi/pics
ce9dacd6777e0e8a5554675a4dcb96adbc90dcc8
[ "MIT" ]
null
null
null
# coding=utf-8 import os import time import json from django.shortcuts import render, get_object_or_404 from django.views.generic import View from django.db.models import ObjectDoesNotExist from pics.utils import _ajax_error, _ajax_success, _is_doubtful from . import models as spider_models # Create your views here...
37.349112
122
0.581907
import os import time import json from django.shortcuts import render, get_object_or_404 from django.views.generic import View from django.db.models import ObjectDoesNotExist from pics.utils import _ajax_error, _ajax_success, _is_doubtful from . import models as spider_models class IndexView(View): template_na...
true
true
f76ba3a9f25c2324c55e3cfb6584bb02bd368efb
1,152
py
Python
test_ella/test_positions/test_admin.py
hamsavardhini09/AWSLearning
a7888ee252d054f5ff49d8dc81dd6ef2e01f047d
[ "BSD-3-Clause" ]
75
2015-01-17T08:30:08.000Z
2022-02-23T19:05:36.000Z
test_ella/test_positions/test_admin.py
manlan2/ella
4a1414991f649dc21c4b777dc6b41a922a13faa7
[ "BSD-3-Clause" ]
3
2016-04-21T22:16:37.000Z
2021-07-08T12:47:37.000Z
test_ella/test_positions/test_admin.py
manlan2/ella
4a1414991f649dc21c4b777dc6b41a922a13faa7
[ "BSD-3-Clause" ]
26
2015-02-12T04:13:41.000Z
2022-01-08T05:26:27.000Z
# -*- coding: utf-8 -*- from unittest import TestCase from nose import tools from django.contrib import admin from ella.core.models import Author from ella.articles.models import Article from ella.positions.admin import PositionOptions from ella.positions.models import Position class TestPositionAdmin(TestCase): ...
32
84
0.71441
from unittest import TestCase from nose import tools from django.contrib import admin from ella.core.models import Author from ella.articles.models import Article from ella.positions.admin import PositionOptions from ella.positions.models import Position class TestPositionAdmin(TestCase): def setUp(self): ...
true
true
f76ba44e2b3d1e7c33bb5dc9108ae6a0bc045d15
1,812
py
Python
tests/cmdline/commands/test_status.py
pranavmodx/aiida-core
0edbbf82dfb97ab130914d1674a6f2217eba5971
[ "BSD-2-Clause", "MIT" ]
null
null
null
tests/cmdline/commands/test_status.py
pranavmodx/aiida-core
0edbbf82dfb97ab130914d1674a6f2217eba5971
[ "BSD-2-Clause", "MIT" ]
null
null
null
tests/cmdline/commands/test_status.py
pranavmodx/aiida-core
0edbbf82dfb97ab130914d1674a6f2217eba5971
[ "BSD-2-Clause", "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
44.195122
102
0.589404
from click.testing import CliRunner from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.commands import cmd_status from tests.utils.configuration import with_temporary_config_instance class TestVerdiStatus(AiidaTestCase): def setUp(self): self.cli_runner = CliRunner() @with_tempor...
true
true
f76ba49fb67d321a8fa2ea2351ec9e41211d263b
4,120
py
Python
app/system/models.py
namikazebadri/nika-dashboard-be
7b7ebdb291757dbd362fa7605a95a207de05f46c
[ "MIT" ]
null
null
null
app/system/models.py
namikazebadri/nika-dashboard-be
7b7ebdb291757dbd362fa7605a95a207de05f46c
[ "MIT" ]
1
2022-03-11T13:24:15.000Z
2022-03-11T13:24:15.000Z
app/system/models.py
namikazebadri/nika-dashboard-be-python
7b7ebdb291757dbd362fa7605a95a207de05f46c
[ "MIT" ]
null
null
null
from django.contrib.auth.models import User from django.db import models from app.core.base import BaseModel class Structure(BaseModel): parent = models.ForeignKey('Structure', on_delete=models.CASCADE) users = models.ManyToManyField(User) roles = models.ManyToManyField('Role') name = models.CharF...
26.753247
86
0.686408
from django.contrib.auth.models import User from django.db import models from app.core.base import BaseModel class Structure(BaseModel): parent = models.ForeignKey('Structure', on_delete=models.CASCADE) users = models.ManyToManyField(User) roles = models.ManyToManyField('Role') name = models.CharF...
true
true
f76ba4f5d9202f58939921a22bc75b75585533e6
3,153
py
Python
fooltrader/spiders/stock_trading_date_spider.py
lcczz/fooltrader
fb43d9b2ab18fb758ca2c629ad5f7ba1ea873a0e
[ "MIT" ]
1
2018-04-03T06:25:24.000Z
2018-04-03T06:25:24.000Z
fooltrader/spiders/stock_trading_date_spider.py
lcczz/fooltrader
fb43d9b2ab18fb758ca2c629ad5f7ba1ea873a0e
[ "MIT" ]
1
2018-04-26T10:45:52.000Z
2018-04-26T10:45:52.000Z
fooltrader/spiders/stock_trading_date_spider.py
suzh/fooltrader
6c5bb507eb643d68b6cd5b3aa6a535ec6c3e84c8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import json from datetime import datetime import scrapy from scrapy import Request from scrapy import signals from fooltrader.api.quote import get_security_list from fooltrader.consts import SSE_KDATA_HEADER from fooltrader.contract.files_contract import get_trading_dates_path_sse from fooltr...
36.241379
166
0.644783
import json from datetime import datetime import scrapy from scrapy import Request from scrapy import signals from fooltrader.api.quote import get_security_list from fooltrader.consts import SSE_KDATA_HEADER from fooltrader.contract.files_contract import get_trading_dates_path_sse from fooltrader.settings import TIM...
true
true