hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f73404abc05550c04ed086551a71f3b47aa447fb
4,716
py
Python
src/gt4sd/algorithms/conditional_generation/template/core.py
christofid/gt4sd-core
ea4257e8ff24ee7f766d7010ea5955d823eb9ad7
[ "MIT" ]
57
2022-02-11T22:32:58.000Z
2022-03-31T23:17:06.000Z
src/gt4sd/algorithms/conditional_generation/template/core.py
christofid/gt4sd-core
ea4257e8ff24ee7f766d7010ea5955d823eb9ad7
[ "MIT" ]
31
2022-02-11T22:43:22.000Z
2022-03-31T12:04:00.000Z
src/gt4sd/algorithms/conditional_generation/template/core.py
christofid/gt4sd-core
ea4257e8ff24ee7f766d7010ea5955d823eb9ad7
[ "MIT" ]
8
2022-02-15T11:13:54.000Z
2022-03-22T13:56:13.000Z
# # MIT License # # Copyright (c) 2022 GT4SD team # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge,...
36.55814
111
0.689355
import logging from dataclasses import field from typing import Any, Callable, ClassVar, Dict, Iterable, Optional, TypeVar from ...core import AlgorithmConfiguration, GeneratorAlgorithm from ...registry import ApplicationsRegistry from .implementation import Generator logger = logging.getLogger(__name__) logger.a...
true
true
f7340584474f529132f526642d02bd35b7d1ef3c
7,394
py
Python
tests/server/unit/services/test_mapping_service.py
DerekBev/tasking-manager
6473ba28d0834ee82c9463c254a8b759c9566622
[ "BSD-2-Clause" ]
2
2019-07-15T19:18:58.000Z
2020-09-02T18:11:30.000Z
tests/server/unit/services/test_mapping_service.py
DerekBev/tasking-manager
6473ba28d0834ee82c9463c254a8b759c9566622
[ "BSD-2-Clause" ]
28
2019-01-04T17:39:00.000Z
2021-05-06T23:06:24.000Z
tests/server/unit/services/test_mapping_service.py
DerekBev/tasking-manager
6473ba28d0834ee82c9463c254a8b759c9566622
[ "BSD-2-Clause" ]
3
2020-02-29T20:46:09.000Z
2020-11-20T19:44:04.000Z
import unittest from server.services.mapping_service import MappingService, Task, MappingServiceError, TaskStatus, \ ProjectService, NotFound, StatsService, MappingNotAllowed, UserLicenseError from server.models.dtos.mapping_dto import MappedTaskDTO, LockTaskDTO from server.models.postgis.task import TaskHistory, ...
39.540107
112
0.712199
import unittest from server.services.mapping_service import MappingService, Task, MappingServiceError, TaskStatus, \ ProjectService, NotFound, StatsService, MappingNotAllowed, UserLicenseError from server.models.dtos.mapping_dto import MappedTaskDTO, LockTaskDTO from server.models.postgis.task import TaskHistory, ...
true
true
f73405aa62173fd68710fce3fe875060a712c5b2
458
py
Python
arbitrage/observers/logger.py
acontry/altcoin-arbitrage
ddd1abc46d98e53ec0bd57f7cd82497dd1385683
[ "MIT" ]
7
2017-04-14T03:35:27.000Z
2021-12-17T21:39:47.000Z
arbitrage/observers/logger.py
acontry/altcoin-arbitrage
ddd1abc46d98e53ec0bd57f7cd82497dd1385683
[ "MIT" ]
null
null
null
arbitrage/observers/logger.py
acontry/altcoin-arbitrage
ddd1abc46d98e53ec0bd57f7cd82497dd1385683
[ "MIT" ]
null
null
null
import logging from .observer import Observer import config class Logger(Observer): def opportunity(self, profit, volume, buyprice, kask, sellprice, kbid, perc, weighted_buyprice, weighted_sellprice): logging.info("profit: %f %s with volume: %f %s - buy at %i (%s) sell at %i (%s) ~%.2f...
41.636364
131
0.644105
import logging from .observer import Observer import config class Logger(Observer): def opportunity(self, profit, volume, buyprice, kask, sellprice, kbid, perc, weighted_buyprice, weighted_sellprice): logging.info("profit: %f %s with volume: %f %s - buy at %i (%s) sell at %i (%s) ~%.2f...
true
true
f73405dde0b9040c2f5c50a1016e39cf915b9d5d
16,453
py
Python
src/trunk/apps/python/scvoice.py
Fran89/seiscomp3
a25d29966949769d2bce9c0d28db0a2128e00649
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2021-08-04T00:20:17.000Z
2021-08-04T00:20:17.000Z
src/trunk/apps/python/scvoice.py
Fran89/seiscomp3
a25d29966949769d2bce9c0d28db0a2128e00649
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
src/trunk/apps/python/scvoice.py
Fran89/seiscomp3
a25d29966949769d2bce9c0d28db0a2128e00649
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2022-01-13T02:49:31.000Z
2022-01-13T02:49:31.000Z
#!/usr/bin/env python ############################################################################ # Copyright (C) by GFZ Potsdam # # # # You can redistribute and/or modify this program under the ...
42.29563
308
0.575093
import os, sys, subprocess, traceback import seiscomp3.Client, seiscomp3.Seismology, seiscomp3.System class VoiceAlert(seiscomp3.Client.Application): def __init__(self, argc, argv): seiscomp3.Client.Application.__init__(self, argc, argv) self.setMessagingEnabled(True) self.setDatabaseEn...
true
true
f734061f0d85620d2525a90bb81efc3ddacea8d3
1,541
py
Python
keystonemiddleware/tests/unit/audit/test_logging_notifier.py
mahak/keystonemiddleware
90df936708aee36d77cead548d04cb7db2327f47
[ "Apache-1.1" ]
55
2015-01-29T20:10:42.000Z
2022-03-11T04:02:22.000Z
keystonemiddleware/tests/unit/audit/test_logging_notifier.py
mahak/keystonemiddleware
90df936708aee36d77cead548d04cb7db2327f47
[ "Apache-1.1" ]
1
2016-08-25T01:01:57.000Z
2016-08-25T01:01:57.000Z
keystonemiddleware/tests/unit/audit/test_logging_notifier.py
mahak/keystonemiddleware
90df936708aee36d77cead548d04cb7db2327f47
[ "Apache-1.1" ]
49
2015-02-02T23:57:09.000Z
2021-12-17T19:01:53.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
36.690476
79
0.709929
from unittest import mock import fixtures from keystonemiddleware.tests.unit.audit import base class TestLoggingNotifier(base.BaseAuditMiddlewareTest): def setUp(self): p = 'keystonemiddleware.audit._notifier.oslo_messaging' f = fixtures.MockPatch(p, None) self.messaging_fixture = self...
true
true
f73406859b04a2189c0bef19acf3f961e5fb1bd8
10,164
py
Python
examples/benchmark/utils/recommendation/movielens.py
Ezra-H/autodist
b5ab28d0d867c22742daa3c1d324fe20c1852bd7
[ "Apache-2.0" ]
127
2020-07-16T16:33:10.000Z
2022-03-25T09:58:50.000Z
examples/benchmark/utils/recommendation/movielens.py
Ezra-H/autodist
b5ab28d0d867c22742daa3c1d324fe20c1852bd7
[ "Apache-2.0" ]
17
2020-07-16T20:03:44.000Z
2021-02-24T19:53:12.000Z
examples/benchmark/utils/recommendation/movielens.py
Ezra-H/autodist
b5ab28d0d867c22742daa3c1d324fe20c1852bd7
[ "Apache-2.0" ]
26
2020-07-21T01:23:55.000Z
2022-02-24T03:43:08.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
31.273846
82
0.657222
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys import tempfile import zipfile import numpy as np import pandas as pd import six from six.moves import urllib from absl import app as absl_app from absl import flags from absl import log...
true
true
f73406bb107336874310c23479d76d9679ca7a7d
3,159
py
Python
qa/rpc-tests/auxpow.py
fastcoin-project/fastcoin
3fbf26b4ff0d216d11aa59ae204e8be9a5337883
[ "MIT" ]
6
2021-01-04T22:22:57.000Z
2021-07-19T10:45:51.000Z
qa/rpc-tests/auxpow.py
fastcoin-project/fastcoin
3fbf26b4ff0d216d11aa59ae204e8be9a5337883
[ "MIT" ]
null
null
null
qa/rpc-tests/auxpow.py
fastcoin-project/fastcoin
3fbf26b4ff0d216d11aa59ae204e8be9a5337883
[ "MIT" ]
9
2021-01-04T00:01:28.000Z
2021-11-03T05:30:10.000Z
#!/usr/bin/env python3 # Copyright (c) 2013-2021 The Fastcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test AuxPOW RPC interface and constraints # from test_framework.test_framework import BitcoinTestFr...
35.494382
87
0.646407
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework import scrypt_auxpow class AuxPOWTest (BitcoinTestFramework): REWARD = 500000 CHAIN_ID = "62" DIGISHIELD_START = 10 AUXPOW_START = 20 MATURITY_HEIGHT = 60 def setup_chain(self...
true
true
f73406c35707349614a6342df1ff196a5574c21f
2,572
py
Python
tools/ipc_fuzzer/scripts/remove_close_messages.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
tools/ipc_fuzzer/scripts/remove_close_messages.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
113
2015-05-04T09:58:14.000Z
2022-01-31T19:35:03.000Z
tools/ipc_fuzzer/scripts/remove_close_messages.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
# Copyright 2014 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. """Removes WidgetHostMsg_Close and alike from testcases. These messages are an annoyance for corpus distillation. They cause the browser to exit, so no furthe...
30.987952
80
0.739114
from __future__ import print_function import argparse import os import platform import shutil import subprocess import sys import tempfile def create_temp_file(): temp_file = tempfile.NamedTemporaryFile(delete=False) temp_file.close() return temp_file.name def main(): desc = 'Remove WidgetHostMsg_Close an...
true
true
f734072f1032589ab024016a3f18c4100381457c
2,995
py
Python
earlier-2020/graphs-paper1/print_line_chart.py
transcendentsky/py_tutorials
fed8e6c8d79f854a1cebcfd5c37297a163846208
[ "Apache-2.0" ]
1
2018-06-18T12:09:33.000Z
2018-06-18T12:09:33.000Z
earlier-2020/graphs-paper1/print_line_chart.py
transcendentsky/py_tutorials
fed8e6c8d79f854a1cebcfd5c37297a163846208
[ "Apache-2.0" ]
null
null
null
earlier-2020/graphs-paper1/print_line_chart.py
transcendentsky/py_tutorials
fed8e6c8d79f854a1cebcfd5c37297a163846208
[ "Apache-2.0" ]
1
2018-06-18T12:13:21.000Z
2018-06-18T12:13:21.000Z
import csv # import matplotlib.pyplot as plt import pylab as plt import numpy as np def show_plot(times, epochs, data): # line chart Or Scatter chart plt.figure(figsize=(8, 5)) """ args: marker='o' ,'x', color= """ plt.plot(epochs, data, color='red', label='0') # plt.plot(epochs, d...
29.362745
93
0.656427
import csv import pylab as plt import numpy as np def show_plot(times, epochs, data): plt.figure(figsize=(8, 5)) plt.plot(epochs, data, color='red', label='0') plt.title('Test') plt.show() y = plt.linspace(0, 399, 400) y2 = plt.linspace(0, 350, 351) vconf1 =...
true
true
f734073bb39c45a6569fc573a4b5a957b4ceda16
10,054
py
Python
Samples/MISP/RequestManager.py
collinhunter/security-api-solutions
c42a7a70d07a871aff187ca8580f2bf0b4886713
[ "MIT" ]
null
null
null
Samples/MISP/RequestManager.py
collinhunter/security-api-solutions
c42a7a70d07a871aff187ca8580f2bf0b4886713
[ "MIT" ]
null
null
null
Samples/MISP/RequestManager.py
collinhunter/security-api-solutions
c42a7a70d07a871aff187ca8580f2bf0b4886713
[ "MIT" ]
null
null
null
import requests import config import datetime import os import json import copy from constants import * class RequestManager: """A class that handles submitting TiIndicators to MS Graph API to use the class: with RequestManager() as request_manager: request_manager.handle_indicator(tiindi...
45.288288
154
0.65924
import requests import config import datetime import os import json import copy from constants import * class RequestManager: RJUST = 5 def __init__(self, total_indicators): self.total_indicators = total_indicators def __enter__(self): try: self.existing_indicators_hash_fd =...
true
true
f7340747d29a1826d093f46d1c243b8b457589b9
396
py
Python
rosters/migrations/0020_largerrulenames.py
gregcowell/roster-wizard
8a594ba0a6b38fda34bcc924c70a37b1c1692ddf
[ "MIT" ]
18
2019-10-27T02:53:57.000Z
2021-12-30T06:02:12.000Z
rosters/migrations/0020_largerrulenames.py
gregcowell/roster-wizard
8a594ba0a6b38fda34bcc924c70a37b1c1692ddf
[ "MIT" ]
9
2020-06-06T02:24:55.000Z
2021-09-11T03:54:05.000Z
rosters/migrations/0020_largerrulenames.py
gregcowell/roster-wizard
8a594ba0a6b38fda34bcc924c70a37b1c1692ddf
[ "MIT" ]
7
2020-04-20T03:25:56.000Z
2021-09-09T06:50:24.000Z
# Generated by Django 2.2.3 on 2019-07-26 07:00 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rosters', '0019_leavedescription'), ] operations = [ migrations.AlterField( model_name='staffrule', name='staff_rule...
20.842105
50
0.608586
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rosters', '0019_leavedescription'), ] operations = [ migrations.AlterField( model_name='staffrule', name='staff_rule_name', field=models.CharField(max_l...
true
true
f7340855246935b040a51ded058fc0215f55b050
2,860
py
Python
oneflow/compatible_single_client_python/test/xrt/test_softmax_grad.py
xcnick/oneflow
7b786b27069dec35d2493256011e773988c91f56
[ "Apache-2.0" ]
null
null
null
oneflow/compatible_single_client_python/test/xrt/test_softmax_grad.py
xcnick/oneflow
7b786b27069dec35d2493256011e773988c91f56
[ "Apache-2.0" ]
null
null
null
oneflow/compatible_single_client_python/test/xrt/test_softmax_grad.py
xcnick/oneflow
7b786b27069dec35d2493256011e773988c91f56
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow 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 applicable law or agr...
32.134831
82
0.676224
import unittest import numpy as np from oneflow.compatible import single_client as flow config = flow.function_config() def make_job(shape, axis, dtype=flow.float32): config.use_xla_jit(False) config.use_tensorrt(False) @flow.global_function(config) def softmax_grad_job( y=flow.FixedTensorD...
true
true
f73408b2ad399bcc363a99b2f737dcef526cb8b2
5,233
py
Python
common/base.py
wrcyyy/appTest
e59c531e7856b3fa495213be6efbf576b7a4caea
[ "MIT" ]
null
null
null
common/base.py
wrcyyy/appTest
e59c531e7856b3fa495213be6efbf576b7a4caea
[ "MIT" ]
null
null
null
common/base.py
wrcyyy/appTest
e59c531e7856b3fa495213be6efbf576b7a4caea
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ ------------------------------------ @Project : uiTest @Time : 2021/3/9 14:17 @Auth : wrc @Email : wrcyyy@126.com @File : base.py @IDE : PyCharm ------------------------------------ """ import logging import os from selenium.webdriver.support.wait import WebDriverWait from se...
29.398876
101
0.540417
import logging import os from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.common.keys import Keys from utils.fileoperate import FileOperate class BaseOperation: def __init__(self, driver): self.__config_info = FileOperate.read_yaml( os.path.join(os.path.dirna...
true
true
f734093a5c93fef3c46192f28befb2535bc7bd6b
23,429
py
Python
applications/zcomx/tests/test_job_queue.py
zcomx/zco.mx
70a7372af5787c2e4dea14b25bab0bbb2b959881
[ "BSD-3-Clause" ]
null
null
null
applications/zcomx/tests/test_job_queue.py
zcomx/zco.mx
70a7372af5787c2e4dea14b25bab0bbb2b959881
[ "BSD-3-Clause" ]
null
null
null
applications/zcomx/tests/test_job_queue.py
zcomx/zco.mx
70a7372af5787c2e4dea14b25bab0bbb2b959881
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_job_queue.py Test suite for zcomx/modules/job_queue.py """ import datetime import os import subprocess import time import unittest from gluon import * from applications.zcomx.modules.job_queue import \ CLIOption, \ Daemon, \ DaemonSignalError, \ ...
29.544767
79
0.541679
import datetime import os import subprocess import time import unittest from gluon import * from applications.zcomx.modules.job_queue import \ CLIOption, \ Daemon, \ DaemonSignalError, \ IgnorableJob, \ InvalidCLIOptionError, \ InvalidJobOptionError, \ InvalidStatusError, \ Job, \ J...
true
true
f73409964d099723c4d6f502b21eefcdeb932ced
1,488
py
Python
wolk_gateway_module/interface/actuator_status_provider.py
Wolkabout/WolkGatewayModule-SDK-Python
73cb537822d07cb68b0609022f53171ecf663fa4
[ "Apache-2.0" ]
null
null
null
wolk_gateway_module/interface/actuator_status_provider.py
Wolkabout/WolkGatewayModule-SDK-Python
73cb537822d07cb68b0609022f53171ecf663fa4
[ "Apache-2.0" ]
2
2020-11-16T15:10:36.000Z
2020-11-20T13:10:13.000Z
wolk_gateway_module/interface/actuator_status_provider.py
Wolkabout/WolkGatewayModule-SDK-Python
73cb537822d07cb68b0609022f53171ecf663fa4
[ "Apache-2.0" ]
null
null
null
"""Stub method for providing current device actuator status.""" # Copyright 2019 WolkAbout Technology s.r.o. # # 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.apach...
36.292683
78
0.737231
from typing import Tuple from typing import Union from wolk_gateway_module.model.actuator_state import ActuatorState def get_actuator_status( device_key: str, reference: str ) -> Tuple[ActuatorState, Union[bool, int, float, str]]: raise NotImplementedError
true
true
f7340a41d11266271a052dc71a2406320a530885
7,923
py
Python
acd/scores/cd.py
SilanHe/hierarchical-dnn-interpretations
d6f96d0ab6fec48ee53ab930b2660e80525993b9
[ "MIT" ]
null
null
null
acd/scores/cd.py
SilanHe/hierarchical-dnn-interpretations
d6f96d0ab6fec48ee53ab930b2660e80525993b9
[ "MIT" ]
null
null
null
acd/scores/cd.py
SilanHe/hierarchical-dnn-interpretations
d6f96d0ab6fec48ee53ab930b2660e80525993b9
[ "MIT" ]
null
null
null
import torch import torch.nn.functional as F from copy import deepcopy import numpy as np from scipy.special import expit as sigmoid from .cd_propagate import * from .cd_architecture_specific import * def cd(im_torch: torch.Tensor, model, mask=None, model_type=None, device='cuda', transform=None): '''Get contextua...
42.827027
145
0.638773
import torch import torch.nn.functional as F from copy import deepcopy import numpy as np from scipy.special import expit as sigmoid from .cd_propagate import * from .cd_architecture_specific import * def cd(im_torch: torch.Tensor, model, mask=None, model_type=None, device='cuda', transform=None): model.eval()...
true
true
f7340bd5568d9d2e74fc3957907b003ad617d70e
895
py
Python
setup.py
dennislwy/internet-connection-python
36360598773aca0a077c237d034caf4f19b784b1
[ "MIT" ]
null
null
null
setup.py
dennislwy/internet-connection-python
36360598773aca0a077c237d034caf4f19b784b1
[ "MIT" ]
null
null
null
setup.py
dennislwy/internet-connection-python
36360598773aca0a077c237d034caf4f19b784b1
[ "MIT" ]
null
null
null
from setuptools import setup from setuptools import find_packages classifiers = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', ] setup( name="interne...
37.291667
143
0.688268
from setuptools import setup from setuptools import find_packages classifiers = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', ] setup( name="interne...
true
true
f7340ca89f7353dcd0c8f391724088255d2a8188
2,171
py
Python
pddm/regressors/feedforward_network.py
krishpop/pddm
b1452554a4e318966b8ca3da53978458ac635c5d
[ "Apache-2.0" ]
null
null
null
pddm/regressors/feedforward_network.py
krishpop/pddm
b1452554a4e318966b8ca3da53978458ac635c5d
[ "Apache-2.0" ]
null
null
null
pddm/regressors/feedforward_network.py
krishpop/pddm
b1452554a4e318966b8ca3da53978458ac635c5d
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
31.926471
74
0.579917
import tensorflow.compat.v1 as tf tf.disable_v2_behavior() def feedforward_network(inputStates, inputSize, outputSize, num_fc_layers, depth_fc_layers, tf_datatype, scope): with tf.variable_scope(str(scope)): inputState = tf.layers.flatten(inputStates) i...
true
true
f7340cc711f3390937a5990e5bd4c691cd341575
3,123
py
Python
hyperLAI/features/hyperLAIdataset.py
AI-sandbox/hyperLAI
49f1a9d3c645ee0e5b0c2ed16d54ee8df0626689
[ "MIT" ]
null
null
null
hyperLAI/features/hyperLAIdataset.py
AI-sandbox/hyperLAI
49f1a9d3c645ee0e5b0c2ed16d54ee8df0626689
[ "MIT" ]
null
null
null
hyperLAI/features/hyperLAIdataset.py
AI-sandbox/hyperLAI
49f1a9d3c645ee0e5b0c2ed16d54ee8df0626689
[ "MIT" ]
null
null
null
import numpy as np import torch from torch.utils import data import sys from utils.generate_dataset import * from HypHC.datasets.triples import samples_triples class HyperLoader(data.Dataset): def __init__(self, data_dir, split_indices, restrict_labels=[0,1,2,3,4,5,6], chromosome="all"): ''' Takes ...
55.767857
150
0.658982
import numpy as np import torch from torch.utils import data import sys from utils.generate_dataset import * from HypHC.datasets.triples import samples_triples class HyperLoader(data.Dataset): def __init__(self, data_dir, split_indices, restrict_labels=[0,1,2,3,4,5,6], chromosome="all"): self.data_dir = d...
true
true
f7340d4c7d794f72db0316bab63819772700e43e
207
py
Python
flatlib/predictives/__init__.py
UtkuGlsvn/flatlib
79ecb961ed77393405bc21a11a5874a62103ceef
[ "MIT" ]
null
null
null
flatlib/predictives/__init__.py
UtkuGlsvn/flatlib
79ecb961ed77393405bc21a11a5874a62103ceef
[ "MIT" ]
null
null
null
flatlib/predictives/__init__.py
UtkuGlsvn/flatlib
79ecb961ed77393405bc21a11a5874a62103ceef
[ "MIT" ]
null
null
null
""" This file is part of flatlib - (C) FlatAngle Author: João Ventura (flatangleweb@gmail.com) This subpackage implements a few traditional astrology predictive techniques. """
23
49
0.666667
true
true
f7340d9075ad1031c3712b9f37da8e6741530c98
45,409
py
Python
sequicity/tsd_net.py
qbetterk/user-simulator
77caca30ff67b9112b1fe5e65e191c6b5e25532c
[ "Apache-2.0" ]
20
2019-11-08T02:28:28.000Z
2022-02-07T09:20:21.000Z
sequicity/tsd_net.py
qbetterk/user-simulator
77caca30ff67b9112b1fe5e65e191c6b5e25532c
[ "Apache-2.0" ]
21
2019-11-08T02:27:40.000Z
2022-03-12T00:02:54.000Z
sequicity/tsd_net.py
qbetterk/user-simulator
77caca30ff67b9112b1fe5e65e191c6b5e25532c
[ "Apache-2.0" ]
8
2020-02-10T07:28:37.000Z
2021-09-23T09:42:14.000Z
import torch from torch import nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np import math from sequicity.config import global_config as cfg import copy, random, time, logging from torch.distributions import Categorical from sequicity.reader import pad_sequences ...
48.774436
144
0.54672
import torch from torch import nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np import math from sequicity.config import global_config as cfg import copy, random, time, logging from torch.distributions import Categorical from sequicity.reader import pad_sequences ...
true
true
f7340de05effdac17c1c33990b943f2aaef6a299
1,785
py
Python
test/GenerativeGrammarTest.py
zigakleine/AmbientMusicForUniversities
9008942aa846cd9e8e97615f0270c123f7e499e1
[ "MIT" ]
2
2021-08-15T12:07:13.000Z
2021-08-16T06:46:37.000Z
test/GenerativeGrammarTest.py
zigakleine/AmbientMusicForUniversities
9008942aa846cd9e8e97615f0270c123f7e499e1
[ "MIT" ]
null
null
null
test/GenerativeGrammarTest.py
zigakleine/AmbientMusicForUniversities
9008942aa846cd9e8e97615f0270c123f7e499e1
[ "MIT" ]
null
null
null
''' import re import random class ContextFreeGrammar: def __init__(self, start_symbol, production_rules): self.start_symbol = start_symbol self.production_rules = production_rules def expand(self): return self.expand_rec(self.start_symbol) def expand_rec(self, symbol_to_expand):...
26.25
111
0.672829
true
true
f7340dff6be1d38ab9659dc6728048e7bf4164b4
2,045
py
Python
jp.atcoder/abc116/abc116_c/8404003.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc116/abc116_c/8404003.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc116/abc116_c/8404003.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
# 2019-11-12 01:01:32(JST) import sys # import collections # import math # from string import ascii_lowercase, ascii_uppercase, digits # from bisect import bisect_left as bi_l, bisect_right as bi_r # import itertools # from functools import reduce # import operator as op # from scipy.misc import comb # float...
24.939024
63
0.378973
import sys def main(): n, *h = [int(x) for x in sys.stdin.read().split()] if n == 1: print(h[0]) sys.exit() mountain = [0] valley = [0] flat = 0 i = 0 while True: if h[i] == h[i+1]: if i < n-2: i += 1 con...
true
true
f7340e4cab27af3a24dc37ceb74bd27979d5d231
2,743
py
Python
migrations/versions/2f182d32410d_.py
vasyanch/stepik_flask-delivery
975f3b42ad7a19df420f5c03fe4e3d39bfe27988
[ "MIT" ]
null
null
null
migrations/versions/2f182d32410d_.py
vasyanch/stepik_flask-delivery
975f3b42ad7a19df420f5c03fe4e3d39bfe27988
[ "MIT" ]
null
null
null
migrations/versions/2f182d32410d_.py
vasyanch/stepik_flask-delivery
975f3b42ad7a19df420f5c03fe4e3d39bfe27988
[ "MIT" ]
null
null
null
"""empty message Revision ID: 2f182d32410d Revises: Create Date: 2020-04-29 01:27:52.576633 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '2f182d32410d' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto gene...
34.721519
65
0.658768
from alembic import op import sqlalchemy as sa revision = '2f182d32410d' down_revision = None branch_labels = None depends_on = None def upgrade(): op.create_table('categories', sa.Column('id', sa.Integer(), nullable=False), sa.Column('title', sa.String(), nullable=False), sa.PrimaryKeyConstrain...
true
true
f7340ec44f8cb1d35e72adb5e22372f0c8339663
928
py
Python
neigh1/signals.py
SteveMitto/neighborhood
1f79c0cb807ffd91b80e2d663ab142572f7f1931
[ "MIT" ]
null
null
null
neigh1/signals.py
SteveMitto/neighborhood
1f79c0cb807ffd91b80e2d663ab142572f7f1931
[ "MIT" ]
8
2020-06-06T00:20:09.000Z
2022-02-10T10:40:46.000Z
neigh1/signals.py
SteveMitto/neighborhood
1f79c0cb807ffd91b80e2d663ab142572f7f1931
[ "MIT" ]
null
null
null
from django.dispatch import receiver from django.db.models.signals import pre_save,post_save from django.contrib.auth.models import User from django.contrib.auth.signals import user_logged_out,user_logged_in from .models import Profile @receiver(post_save, sender=User) def create_user_profile(sender, instance, created...
32
70
0.77694
from django.dispatch import receiver from django.db.models.signals import pre_save,post_save from django.contrib.auth.models import User from django.contrib.auth.signals import user_logged_out,user_logged_in from .models import Profile @receiver(post_save, sender=User) def create_user_profile(sender, instance, created...
true
true
f7340ecfbf45c6ede4d081d244d7681a1fc8a7ac
2,209
py
Python
sudoku/reduce.py
hawkfish/sudoku
eaae1aa3080032266db0fcfc8a6520a9cb5690fe
[ "MIT" ]
null
null
null
sudoku/reduce.py
hawkfish/sudoku
eaae1aa3080032266db0fcfc8a6520a9cb5690fe
[ "MIT" ]
null
null
null
sudoku/reduce.py
hawkfish/sudoku
eaae1aa3080032266db0fcfc8a6520a9cb5690fe
[ "MIT" ]
null
null
null
# !/usr/bin/python3 from sudoku.cells import * from sudoku.regions import * class ReduceError(BaseException): pass # Remove all used values from a cell def reduceCellByValues(cell, used): reduced = [] for value in cell: if not used[value]: reduced.append(value) if not len(reduced): raise R...
27.6125
77
0.645088
from sudoku.cells import * from sudoku.regions import * class ReduceError(BaseException): pass def reduceCellByValues(cell, used): reduced = [] for value in cell: if not used[value]: reduced.append(value) if not len(reduced): raise ReduceError return reduced def reduceCellByRegion(cell...
true
true
f7340f0f2accd24dc284f64500dd1dfd6566f91a
474
py
Python
examples/object_detection_tflite.py
Lynchez/deepvision
d1d6242dc6f85c4e7a9190b2994fd80535a2c218
[ "MIT" ]
6
2021-05-04T12:30:26.000Z
2021-09-11T15:46:56.000Z
examples/object_detection_tflite.py
Lynchez/fastcv
d1d6242dc6f85c4e7a9190b2994fd80535a2c218
[ "MIT" ]
null
null
null
examples/object_detection_tflite.py
Lynchez/fastcv
d1d6242dc6f85c4e7a9190b2994fd80535a2c218
[ "MIT" ]
null
null
null
import cv2 from deepvision import TFlite # open webcam webcam = cv2.VideoCapture(0) tflite = TFlite() # loop through frames while webcam.isOpened(): # read frame from webcam status, frame = webcam.read() frame = tflite.detect_objects(frame) # display output cv2.imshow("Real-time object detection"...
22.571429
51
0.679325
import cv2 from deepvision import TFlite webcam = cv2.VideoCapture(0) tflite = TFlite() while webcam.isOpened(): status, frame = webcam.read() frame = tflite.detect_objects(frame) cv2.imshow("Real-time object detection", frame) if cv2.waitKey(1) & 0xFF == ord('q'): break webca...
true
true
f73410e401dbaa34b6ceee1385cd1bcc00af7447
966
py
Python
beer/types/mempool_item.py
petrus-hanks/flax-blockchain
6e180dc84ca24c757555c9947f44bd724b1af3eb
[ "Apache-2.0" ]
8
2021-07-08T00:11:49.000Z
2022-02-09T04:28:40.000Z
beer/types/mempool_item.py
petrus-hanks/flax-blockchain
6e180dc84ca24c757555c9947f44bd724b1af3eb
[ "Apache-2.0" ]
15
2021-07-29T06:37:42.000Z
2021-08-29T17:26:08.000Z
beer/types/mempool_item.py
petrus-hanks/flax-blockchain
6e180dc84ca24c757555c9947f44bd724b1af3eb
[ "Apache-2.0" ]
3
2021-10-04T17:51:04.000Z
2022-03-01T04:23:01.000Z
from dataclasses import dataclass from typing import List from beer.consensus.cost_calculator import NPCResult from beer.types.blockchain_format.coin import Coin from beer.types.blockchain_format.program import SerializedProgram from beer.types.blockchain_format.sized_bytes import bytes32 from beer.types.spend_bundle ...
27.6
66
0.76501
from dataclasses import dataclass from typing import List from beer.consensus.cost_calculator import NPCResult from beer.types.blockchain_format.coin import Coin from beer.types.blockchain_format.program import SerializedProgram from beer.types.blockchain_format.sized_bytes import bytes32 from beer.types.spend_bundle ...
true
true
f734112f18de9c64644d82da3c43167201edc406
6,823
py
Python
kafka-utils/tests/bai_kafka_utils/test_fetcher_event.py
gavinmbell/benchmark-ai-1
a697e67d68b843fe9350e55871dad867bab5d51d
[ "Apache-2.0" ]
6
2020-09-29T09:03:04.000Z
2022-03-14T06:52:25.000Z
kafka-utils/tests/bai_kafka_utils/test_fetcher_event.py
gavinmbell/benchmark-ai-1
a697e67d68b843fe9350e55871dad867bab5d51d
[ "Apache-2.0" ]
null
null
null
kafka-utils/tests/bai_kafka_utils/test_fetcher_event.py
gavinmbell/benchmark-ai-1
a697e67d68b843fe9350e55871dad867bab5d51d
[ "Apache-2.0" ]
4
2020-10-01T07:49:22.000Z
2021-06-16T19:44:12.000Z
from bai_kafka_utils.events import ( BenchmarkDoc, VisitedService, FetcherBenchmarkEvent, DownloadableContent, FetcherPayload, FileSystemObject, ) BIG_FETCHER_JSON = """{ "date": "Thu May 02 16:15:42 UTC 2019", "authenticated": false, "payload": { ...
39.668605
116
0.44863
from bai_kafka_utils.events import ( BenchmarkDoc, VisitedService, FetcherBenchmarkEvent, DownloadableContent, FetcherPayload, FileSystemObject, ) BIG_FETCHER_JSON = """{ "date": "Thu May 02 16:15:42 UTC 2019", "authenticated": false, "payload": { ...
true
true
f73412f4b6192da0844dc366a2b07c76cba2888e
671
py
Python
_from_pydot/lambdas/utils/dot_to_png.py
owasp-sbot/pbx-gs-python-utils
f448aa36c4448fc04d30c3a5b25640ea4d44a267
[ "Apache-2.0" ]
3
2018-12-14T15:43:46.000Z
2019-04-25T07:44:58.000Z
_from_pydot/lambdas/utils/dot_to_png.py
owasp-sbot/pbx-gs-python-utils
f448aa36c4448fc04d30c3a5b25640ea4d44a267
[ "Apache-2.0" ]
1
2019-05-11T14:19:37.000Z
2019-05-11T14:51:04.000Z
_from_pydot/lambdas/utils/dot_to_png.py
owasp-sbot/pbx-gs-python-utils
f448aa36c4448fc04d30c3a5b25640ea4d44a267
[ "Apache-2.0" ]
4
2018-12-27T04:54:14.000Z
2019-05-11T14:07:47.000Z
from osbot_aws.apis.Lambda import Lambda from osbot_aws.helpers.Lambda_Helpers import slack_message def run(event, context): channel = event.get('channel') try: dot_to_svg = Lambda('gw_bot.lambdas.dot_to_svg').invoke svg_to_png = Lambda('gw_bot.lambdas.svg_to_png').invoke svg = ...
39.470588
89
0.634873
from osbot_aws.apis.Lambda import Lambda from osbot_aws.helpers.Lambda_Helpers import slack_message def run(event, context): channel = event.get('channel') try: dot_to_svg = Lambda('gw_bot.lambdas.dot_to_svg').invoke svg_to_png = Lambda('gw_bot.lambdas.svg_to_png').invoke svg = ...
true
true
f7341316b65044218ec1dd53113d96b181f0c7e8
1,108
py
Python
vb2py/test/testimports.py
ceprio/xl_vb2py
899fec0301140fd8bd313e8c80b3fa839b3f5ee4
[ "BSD-3-Clause" ]
null
null
null
vb2py/test/testimports.py
ceprio/xl_vb2py
899fec0301140fd8bd313e8c80b3fa839b3f5ee4
[ "BSD-3-Clause" ]
null
null
null
vb2py/test/testimports.py
ceprio/xl_vb2py
899fec0301140fd8bd313e8c80b3fa839b3f5ee4
[ "BSD-3-Clause" ]
null
null
null
import vb2py.vbparser import unittest class TestImports(unittest.TestCase): # << Imports tests >> def testImportClassToModule(self): """Import from class to module""" self.proj = vb2py.vbparser.VBProject() self.utils = vb2py.vbparser.VBCodeModule(modulename="utils") self.cls = v...
30.777778
82
0.617329
import vb2py.vbparser import unittest class TestImports(unittest.TestCase): def testImportClassToModule(self): self.proj = vb2py.vbparser.VBProject() self.utils = vb2py.vbparser.VBCodeModule(modulename="utils") self.cls = vb2py.vbparser.VBClassModule(modulename="Cls", classname="Cls") ...
true
true
f734148db4674d3e295a32e4c427f45aac085654
52,109
py
Python
dataverse_repository_curation_assistant/dataverse_repository_curation_assistant_functions.py
jggautier/dataverse-automating-downloads
40cf127e7771049165b21b732635cd35848eda5e
[ "CC0-1.0" ]
null
null
null
dataverse_repository_curation_assistant/dataverse_repository_curation_assistant_functions.py
jggautier/dataverse-automating-downloads
40cf127e7771049165b21b732635cd35848eda5e
[ "CC0-1.0" ]
1
2019-08-30T04:02:08.000Z
2019-08-30T05:16:46.000Z
dataverse_repository_curation_assistant/dataverse_repository_curation_assistant_functions.py
jggautier/dataverse-automating-downloads
40cf127e7771049165b21b732635cd35848eda5e
[ "CC0-1.0" ]
null
null
null
# Functions for the curation app import csv from dateutil.parser import parse from functools import reduce import json import glob import os from os import listdir import pandas as pd from pathlib import Path import re import requests import time from tkinter import Tk, ttk, Frame, Label, IntVar, Checkbutton, filedialo...
42.537959
138
0.606824
import csv from dateutil.parser import parse from functools import reduce import json import glob import os from os import listdir import pandas as pd from pathlib import Path import re import requests import time from tkinter import Tk, ttk, Frame, Label, IntVar, Checkbutton, filedialog, NORMAL, DISABLED from tkinter ...
true
true
f73414f87ce5fccc45b190ae55d9f6dc7c6eabfb
10,224
py
Python
vspk/v4_0/nubootstrap.py
mohaimenhasan/vspk-python
4c7b297427048340b250cc3c74d9214dc0d4bde1
[ "BSD-3-Clause" ]
null
null
null
vspk/v4_0/nubootstrap.py
mohaimenhasan/vspk-python
4c7b297427048340b250cc3c74d9214dc0d4bde1
[ "BSD-3-Clause" ]
null
null
null
vspk/v4_0/nubootstrap.py
mohaimenhasan/vspk-python
4c7b297427048340b250cc3c74d9214dc0d4bde1
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyrigh...
29.894737
250
0.611502
from .fetchers import NUMetadatasFetcher from .fetchers import NUGlobalMetadatasFetcher from bambou import NURESTObject class NUBootstrap(NURESTObject): __rest_name__ = "bootstrap" __resource_name__ = "bootstraps" CONST_ZFB_MATCH_ATTRIBUTE_NONE = "NONE" CONST_ZFB_MATCH_ATTR...
true
true
f73415df562837992d6bfe6789244be417512e7e
230
py
Python
automatewithpython/regex/findall/xmasregex.py
Coalemus/Python-Projects
4b0e0c12a2fdcfbaf491df5715885c61f44bdb1c
[ "MIT" ]
null
null
null
automatewithpython/regex/findall/xmasregex.py
Coalemus/Python-Projects
4b0e0c12a2fdcfbaf491df5715885c61f44bdb1c
[ "MIT" ]
null
null
null
automatewithpython/regex/findall/xmasregex.py
Coalemus/Python-Projects
4b0e0c12a2fdcfbaf491df5715885c61f44bdb1c
[ "MIT" ]
null
null
null
#!/bin/zsh import re xmasregex = re.compile(r'\d\s\w+') mtob1 = xmasregex.findall( "12 drummers, 11 pipers, 10 lords, 9 ladies, 8 maids, 7 swans, 6 geese, 5 rings, 4 birds, 3 hens, 2 doves, 1 partidge" ) print(mtob1)
17.692308
122
0.647826
import re xmasregex = re.compile(r'\d\s\w+') mtob1 = xmasregex.findall( "12 drummers, 11 pipers, 10 lords, 9 ladies, 8 maids, 7 swans, 6 geese, 5 rings, 4 birds, 3 hens, 2 doves, 1 partidge" ) print(mtob1)
true
true
f73416d556fd29e31b2b5e98fd85ef253b840382
7,151
py
Python
contentcuration/contentcuration/viewsets/sync/endpoint.py
DXCanas/content-curation
06ac2cf2a49d2420cb8a418f5df2bfee53ef644b
[ "MIT" ]
null
null
null
contentcuration/contentcuration/viewsets/sync/endpoint.py
DXCanas/content-curation
06ac2cf2a49d2420cb8a418f5df2bfee53ef644b
[ "MIT" ]
null
null
null
contentcuration/contentcuration/viewsets/sync/endpoint.py
DXCanas/content-curation
06ac2cf2a49d2420cb8a418f5df2bfee53ef644b
[ "MIT" ]
null
null
null
""" A view that handles synchronization of changes from the frontend and deals with processing all the changes to make appropriate bulk creates, updates, and deletes. """ from collections import OrderedDict from itertools import groupby from django.conf import settings from rest_framework.authentication import Session...
38.037234
103
0.735561
from collections import OrderedDict from itertools import groupby from django.conf import settings from rest_framework.authentication import SessionAuthentication from rest_framework.authentication import TokenAuthentication from rest_framework.decorators import api_view from rest_framework.decorators import authentic...
true
true
f73417474be34d4bc69561d5e19d269147c3150d
134
py
Python
tests/data/chefs_in_a_file.py
mjoblin/netdumplings
1ec3c4d80f302fe749e51171084ac05bbe57a701
[ "MIT" ]
2
2016-06-02T18:13:38.000Z
2020-03-05T08:41:10.000Z
tests/data/chefs_in_a_file.py
mjoblin/netdumplings
1ec3c4d80f302fe749e51171084ac05bbe57a701
[ "MIT" ]
5
2016-11-25T02:35:51.000Z
2018-01-13T05:53:06.000Z
tests/data/chefs_in_a_file.py
mjoblin/netdumplings
1ec3c4d80f302fe749e51171084ac05bbe57a701
[ "MIT" ]
null
null
null
from netdumplings import DumplingChef class ChefOneFromFile(DumplingChef): pass class ChefTwoFromFile(DumplingChef): pass
13.4
37
0.791045
from netdumplings import DumplingChef class ChefOneFromFile(DumplingChef): pass class ChefTwoFromFile(DumplingChef): pass
true
true
f73417fd194f35c59a19fcb4a2152aa67643647a
43,678
py
Python
mir_eval/segment.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
mir_eval/segment.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
mir_eval/segment.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
# CREATED:2013-08-13 12:02:42 by Brian McFee <brm2132@columbia.edu> ''' Evaluation criteria for structural segmentation fall into two categories: boundary annotation and structural annotation. Boundary annotation is the task of predicting the times at which structural changes occur, such as when a verse transitions to...
38.790409
82
0.628486
import collections import warnings import numpy as np import scipy.stats import scipy.sparse import scipy.misc import scipy.special from . import util def validate_boundary(reference_intervals, estimated_intervals, trim): if trim: min_size = 2 else: # If we're not trimming, then we...
true
true
f7341a25ef54e344f2d21e600a9f6534cbf6773f
3,201
py
Python
tests/instrumentation/mysql_tests.py
mvas/apm-agent-python
f4582e90eb5308b915ca51e2e98620fc22af09ec
[ "BSD-3-Clause" ]
null
null
null
tests/instrumentation/mysql_tests.py
mvas/apm-agent-python
f4582e90eb5308b915ca51e2e98620fc22af09ec
[ "BSD-3-Clause" ]
null
null
null
tests/instrumentation/mysql_tests.py
mvas/apm-agent-python
f4582e90eb5308b915ca51e2e98620fc22af09ec
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from elasticapm.instrumentation.packages.mysql import extract_signature def test_insert(): sql = """INSERT INTO `mytable` (id, name) VALUE ('2323', 'Ron')""" actual = extract_signature(sql) assert "INSERT INTO mytable" == actual def test_update(): sql = """UPDATE `mytable` s...
23.88806
90
0.65667
from elasticapm.instrumentation.packages.mysql import extract_signature def test_insert(): sql = """INSERT INTO `mytable` (id, name) VALUE ('2323', 'Ron')""" actual = extract_signature(sql) assert "INSERT INTO mytable" == actual def test_update(): sql = """UPDATE `mytable` set name='Ron' WHERE id =...
true
true
f7341a9c8be3fa88dd45fd556c704ded0c5a9d36
4,597
py
Python
slicing.py
jw03070/Advanced-DeepSleepNet
b58d71971be28c8517f61731b8ee933a5bbf3f0a
[ "Apache-2.0" ]
1
2020-08-21T06:11:53.000Z
2020-08-21T06:11:53.000Z
slicing.py
leesk212/Advanced-DeepSleepNet
b58d71971be28c8517f61731b8ee933a5bbf3f0a
[ "Apache-2.0" ]
null
null
null
slicing.py
leesk212/Advanced-DeepSleepNet
b58d71971be28c8517f61731b8ee933a5bbf3f0a
[ "Apache-2.0" ]
1
2020-08-21T06:06:49.000Z
2020-08-21T06:06:49.000Z
# -*- coding: utf-8 -*- """ @author: BSW """ import numpy as np import os def slicing(filename,data): wc=1 n1c=1 n2c=1 n3c=1 n4c=1 t=0 npz = np.load(data) x = npz['x'] y = npz['y'] os.makedirs("./data/"+filename[:-3], exist_ok=True) os.makedirs("./data/"+filename[...
39.62931
94
0.451381
import numpy as np import os def slicing(filename,data): wc=1 n1c=1 n2c=1 n3c=1 n4c=1 t=0 npz = np.load(data) x = npz['x'] y = npz['y'] os.makedirs("./data/"+filename[:-3], exist_ok=True) os.makedirs("./data/"+filename[:-3]+"/1D_Wake", exist_ok=True) os.makedi...
true
true
f7341ad925a2f9bab834873ceba073a569039b88
811
py
Python
otcextensions/tests/functional/sdk/mrs/v1/test_service.py
zsoltn/python-otcextensions
4c0fa22f095ebd5f9636ae72acbae5048096822c
[ "Apache-2.0" ]
10
2018-03-03T17:59:59.000Z
2020-01-08T10:03:00.000Z
otcextensions/tests/functional/sdk/mrs/v1/test_service.py
zsoltn/python-otcextensions
4c0fa22f095ebd5f9636ae72acbae5048096822c
[ "Apache-2.0" ]
208
2020-02-10T08:27:46.000Z
2022-03-29T15:24:21.000Z
otcextensions/tests/functional/sdk/mrs/v1/test_service.py
zsoltn/python-otcextensions
4c0fa22f095ebd5f9636ae72acbae5048096822c
[ "Apache-2.0" ]
15
2020-04-01T20:45:54.000Z
2022-03-23T12:45:43.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
32.44
75
0.759556
from openstack import _log from otcextensions.tests.functional import base _logger = _log.setup_logging('openstack') class TestService(base.BaseFunctionalTest): def test_initialize(self): client = self.conn.mrs self.assertIsNotNone(client)
true
true
f7341b46721d8f8e196cfa24f2fb38ec8139fec9
1,250
py
Python
falcon_kit/util/alarm.py
PacificBiosciences/falcon3
fde93d4ed79746cd280006bca6808e6975585738
[ "BSD-3-Clause-Clear" ]
null
null
null
falcon_kit/util/alarm.py
PacificBiosciences/falcon3
fde93d4ed79746cd280006bca6808e6975585738
[ "BSD-3-Clause-Clear" ]
null
null
null
falcon_kit/util/alarm.py
PacificBiosciences/falcon3
fde93d4ed79746cd280006bca6808e6975585738
[ "BSD-3-Clause-Clear" ]
5
2020-07-22T14:10:16.000Z
2021-04-26T17:07:05.000Z
"""Special handling for exceptions, for the UI. """ def alarm(e): """ Write traceback into PBFALCON_ERRFILE (until we stop using pbfalcon). Write a special JSON object expected by pbcommand.models.common. """ import datetime import os import traceback import uuid from ..io import se...
32.051282
101
0.6032
def alarm(e): import datetime import os import traceback import uuid from ..io import serialize tb = traceback.format_exc() errfile = os.environ.get('PBFALCON_ERRFILE') if errfile: with open(errfile, 'w') as ofs: ofs.write(tb) special = [ {...
true
true
f7341d85b42e46f9636103b6ce706ad11869ce0f
721
py
Python
dp/HanoiTowers.py
ykumards/Algorithms
53767683644c3c766dfc5d7347b1fc71f43256b2
[ "WTFPL" ]
null
null
null
dp/HanoiTowers.py
ykumards/Algorithms
53767683644c3c766dfc5d7347b1fc71f43256b2
[ "WTFPL" ]
null
null
null
dp/HanoiTowers.py
ykumards/Algorithms
53767683644c3c766dfc5d7347b1fc71f43256b2
[ "WTFPL" ]
null
null
null
""" Given three towers and n sorted disks placed on it, we have to move all the disks from one tower to the other while using the third one as buffer. There are three rules that each move should follow. """ def move(start, buffr, end, n): """ By using the recursion from base case to move upwards we can cha...
31.347826
60
0.668516
def move(start, buffr, end, n): if n < 2: x = start.pop() return end.append(x) top = start.pop() buffr = move(start, end, buffr, n-1)
true
true
f7341dfa9ee065b402c636e541f05fc4d8673ba8
1,251
py
Python
ietf/secr/areas/tests.py
hassanakbar4/ietfdb
cabee059092ae776015410640226064331c293b7
[ "BSD-3-Clause" ]
25
2022-03-05T08:26:52.000Z
2022-03-30T15:45:42.000Z
ietf/secr/areas/tests.py
hassanakbar4/ietfdb
cabee059092ae776015410640226064331c293b7
[ "BSD-3-Clause" ]
219
2022-03-04T17:29:12.000Z
2022-03-31T21:16:14.000Z
ietf/secr/areas/tests.py
hassanakbar4/ietfdb
cabee059092ae776015410640226064331c293b7
[ "BSD-3-Clause" ]
22
2022-03-04T15:34:34.000Z
2022-03-28T13:30:59.000Z
from django.urls import reverse from ietf.group.factories import GroupFactory, GroupEventFactory from ietf.group.models import Group, GroupEvent from ietf.person.models import Person from ietf.utils.test_utils import TestCase SECR_USER='secretary' def augment_data(): system = Person.objects.get(name="(System)")...
35.742857
81
0.658673
from django.urls import reverse from ietf.group.factories import GroupFactory, GroupEventFactory from ietf.group.models import Group, GroupEvent from ietf.person.models import Person from ietf.utils.test_utils import TestCase SECR_USER='secretary' def augment_data(): system = Person.objects.get(name="(System)")...
true
true
f7341e2feffa1989bf80d861c14a2909fd98ccb0
549
py
Python
example/middleware.py
chartbeat/django-social-auth
cf72986ab3c01c1dae2c3baebd00c540fb4250d8
[ "BSD-2-Clause", "BSD-3-Clause" ]
1
2019-08-24T00:33:13.000Z
2019-08-24T00:33:13.000Z
example/middleware.py
tonylampada/django-social-auth
a77c0dd1b160c391098b6c157838d54516f4d334
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
example/middleware.py
tonylampada/django-social-auth
a77c0dd1b160c391098b6c157838d54516f4d334
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
from django.core.urlresolvers import reverse from social_auth.backends.exceptions import AuthAlreadyAssociated from social_auth.middleware import SocialAuthExceptionMiddleware class ExampleSocialAuthExceptionMiddleware(SocialAuthExceptionMiddleware): def get_message(self, request, exception): if isinstan...
36.6
74
0.777778
from django.core.urlresolvers import reverse from social_auth.backends.exceptions import AuthAlreadyAssociated from social_auth.middleware import SocialAuthExceptionMiddleware class ExampleSocialAuthExceptionMiddleware(SocialAuthExceptionMiddleware): def get_message(self, request, exception): if isinstan...
true
true
f7341e6c9c32a76959a3fd6e6bbc2c1258099c06
69
py
Python
project/db/serializers/__init__.py
sunday-ucheawaji/API-
07fb4b596cfe8e85b8575a8e70a8c886d3ab627a
[ "MIT" ]
null
null
null
project/db/serializers/__init__.py
sunday-ucheawaji/API-
07fb4b596cfe8e85b8575a8e70a8c886d3ab627a
[ "MIT" ]
null
null
null
project/db/serializers/__init__.py
sunday-ucheawaji/API-
07fb4b596cfe8e85b8575a8e70a8c886d3ab627a
[ "MIT" ]
1
2022-02-09T14:13:20.000Z
2022-02-09T14:13:20.000Z
from db.serializers.reset_serializer import SetNewPasswordSerializer
34.5
68
0.913043
from db.serializers.reset_serializer import SetNewPasswordSerializer
true
true
f7341eb4083ce663caf7f5d6ce40e424cc5a4bb1
1,739
py
Python
example_BYTES.py
djtech-dev/PyVM
1edda436ce7073d0cecbf16f5cab2509895d953c
[ "MIT" ]
75
2017-09-22T22:36:13.000Z
2022-03-20T16:18:27.000Z
example_BYTES.py
djtech-dev/PyVM
1edda436ce7073d0cecbf16f5cab2509895d953c
[ "MIT" ]
7
2019-05-10T19:15:08.000Z
2021-08-24T16:03:34.000Z
example_BYTES.py
djtech-dev/PyVM
1edda436ce7073d0cecbf16f5cab2509895d953c
[ "MIT" ]
14
2018-07-02T02:49:46.000Z
2022-02-22T15:24:47.000Z
import cProfile, pstats, io import re import VM def Stats(pr): s = io.StringIO() sortby = 'tottime' ps = pstats.Stats(pr, stream=s).sort_stats(sortby) ps.print_stats() print(s.getvalue()) def parse_code(code: str) -> bytes: binary = '' regex = re.compile(r"[0-9a-f]+:\s+([^;]+)\s*;.*", re...
30.508772
98
0.53134
import cProfile, pstats, io import re import VM def Stats(pr): s = io.StringIO() sortby = 'tottime' ps = pstats.Stats(pr, stream=s).sort_stats(sortby) ps.print_stats() print(s.getvalue()) def parse_code(code: str) -> bytes: binary = '' regex = re.compile(r"[0-9a-f]+:\s+([^;]+)\s*;.*", re...
true
true
f7341f359fe9b0fe0253f12df1832305e8d83775
7,912
py
Python
configs/ruby/MESI_Two_Level.py
dai-pch/gem5-tnuca
621df40b549f8ed56bcf4f5fd7498f1816f19732
[ "BSD-3-Clause" ]
null
null
null
configs/ruby/MESI_Two_Level.py
dai-pch/gem5-tnuca
621df40b549f8ed56bcf4f5fd7498f1816f19732
[ "BSD-3-Clause" ]
null
null
null
configs/ruby/MESI_Two_Level.py
dai-pch/gem5-tnuca
621df40b549f8ed56bcf4f5fd7498f1816f19732
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2006-2007 The Regents of The University of Michigan # Copyright (c) 2009 Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source co...
39.959596
82
0.586704
import math import m5 from m5.objects import * from m5.defines import buildEnv from Ruby import create_topology class L1Cache(RubyCache): latency = 3 class L2Cache(RubyCache): latency = 15 def define_options(parser): return def create_system(options, system, piobus, dma_ports, ruby_system): if bui...
true
true
f7341f4aa30c9f213243b95b20348a2b5e5e243b
5,910
py
Python
torchvision/datasets/hmdb51.py
jdsgomes/vision
c890a7e75ebeaaa75ae9ace4c203b7fc145df068
[ "BSD-3-Clause" ]
1
2022-02-14T09:16:02.000Z
2022-02-14T09:16:02.000Z
torchvision/datasets/hmdb51.py
jdsgomes/vision
c890a7e75ebeaaa75ae9ace4c203b7fc145df068
[ "BSD-3-Clause" ]
null
null
null
torchvision/datasets/hmdb51.py
jdsgomes/vision
c890a7e75ebeaaa75ae9ace4c203b7fc145df068
[ "BSD-3-Clause" ]
null
null
null
import glob import os from typing import Optional, Callable, Tuple, Dict, Any, List from torch import Tensor from .folder import find_classes, make_dataset from .video_utils import VideoClips from .vision import VisionDataset class HMDB51(VisionDataset): """ `HMDB51 <https://serre-lab.clps.brown.edu/resourc...
38.881579
109
0.636717
import glob import os from typing import Optional, Callable, Tuple, Dict, Any, List from torch import Tensor from .folder import find_classes, make_dataset from .video_utils import VideoClips from .vision import VisionDataset class HMDB51(VisionDataset): data_url = "https://serre-lab.clps.brown.edu/wp-content/...
true
true
f7341f69b66c89836096882d08cd417fb7779aaf
22
py
Python
privatebeta/__init__.py
fitoria/django-privatebeta
ef65130d3856d9444f0acc85c5bb590d09908d15
[ "BSD-3-Clause" ]
1
2015-11-05T13:42:05.000Z
2015-11-05T13:42:05.000Z
privatebeta/__init__.py
fitoria/django-privatebeta
ef65130d3856d9444f0acc85c5bb590d09908d15
[ "BSD-3-Clause" ]
null
null
null
privatebeta/__init__.py
fitoria/django-privatebeta
ef65130d3856d9444f0acc85c5bb590d09908d15
[ "BSD-3-Clause" ]
null
null
null
# Let the wookie pass.
22
22
0.727273
true
true
f73420d6dbef227e5c9ccc1aa0c988e245d2f75a
3,508
py
Python
tools/metag_tools/blat_wrapper.py
ramezrawas/galaxy-1
c03748dd49c060a68d07bce56eae33e0ba154414
[ "CC-BY-3.0" ]
6
2018-11-03T22:43:35.000Z
2022-02-15T17:51:33.000Z
tools/metag_tools/blat_wrapper.py
ramezrawas/galaxy-1
c03748dd49c060a68d07bce56eae33e0ba154414
[ "CC-BY-3.0" ]
7
2016-12-07T22:19:37.000Z
2019-01-30T15:04:26.000Z
tools/metag_tools/blat_wrapper.py
ramezrawas/galaxy-1
c03748dd49c060a68d07bce56eae33e0ba154414
[ "CC-BY-3.0" ]
10
2017-04-10T21:40:22.000Z
2022-02-21T16:50:10.000Z
#!/usr/bin/env python import os import sys import tempfile assert sys.version_info[:2] >= (2.4) def stop_err( msg ): sys.stderr.write( "%s\n" % msg ) sys.exit() def check_nib_file( dbkey, GALAXY_DATA_INDEX_DIR ): nib_file = "%s/alignseq.loc" % GALAXY_DATA_INDEX_DIR nib_path = '' nibs = {} ...
31.321429
190
0.593216
import os import sys import tempfile assert sys.version_info[:2] >= (2.4) def stop_err( msg ): sys.stderr.write( "%s\n" % msg ) sys.exit() def check_nib_file( dbkey, GALAXY_DATA_INDEX_DIR ): nib_file = "%s/alignseq.loc" % GALAXY_DATA_INDEX_DIR nib_path = '' nibs = {} for i, line in enumera...
true
true
f7342117dd64c1f7fdf5e9c46d12b689ca81aa84
1,459
py
Python
Create_Dataset.py
mariammendha/Researcher--Reality
76adf1da1d872133d913b27a3c45d9f0d29ffd98
[ "CC-BY-3.0" ]
null
null
null
Create_Dataset.py
mariammendha/Researcher--Reality
76adf1da1d872133d913b27a3c45d9f0d29ffd98
[ "CC-BY-3.0" ]
null
null
null
Create_Dataset.py
mariammendha/Researcher--Reality
76adf1da1d872133d913b27a3c45d9f0d29ffd98
[ "CC-BY-3.0" ]
null
null
null
''' Take the existing Kc_house_data.csv from MongoDb Atlas, parsing for latitude and longitude It then pipes this data through the WalkScore Api, generating 3 accessibility scores These 3 scores are then inserted into their associated rows within MongoDb WalkScore Api: https://www.walkscore.com/professional/walk-sc...
33.930233
125
0.69157
def rating(address, latitude, longitude): from walkscore import WalkScoreAPI api_key = '<Api Key>' walkscore_api = WalkScoreAPI(api_key=api_key) result = walkscore_api.get_score(latitude, longitude, address) return (result.walk_score, result.transit_score, result.bike_score) import pymon...
true
true
f7342179f51675003c8d0d6b869111edae0eafb7
5,501
py
Python
examples/tutorial_h4l/3b_score.py
aghoshpub/LikelihoodFreeInterference
fd6267104c29e935fa41dc92004dae98ded30626
[ "MIT" ]
1
2019-09-18T15:24:25.000Z
2019-09-18T15:24:25.000Z
examples/tutorial_h4l/3b_score.py
aghoshpub/LikelihoodFreeInterference
fd6267104c29e935fa41dc92004dae98ded30626
[ "MIT" ]
null
null
null
examples/tutorial_h4l/3b_score.py
aghoshpub/LikelihoodFreeInterference
fd6267104c29e935fa41dc92004dae98ded30626
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # MadMiner particle physics tutorial # # # Part 3b: Training a score estimator # # Johann Brehmer, Felix Kling, Irina Espejo, and Kyle Cranmer 2018-2019 # In part 3a of this tutorial we will finally train a neural network to estimate likelihood ratios. We assume that you have...
33.138554
992
0.718597
# In[1]: from __future__ import absolute_import, division, print_function, unicode_literals import logging import numpy as np import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt # get_ipython().magic(u'matplotlib inline') from madminer.sampling import SampleAugmenter from madminer impo...
true
true
f73421f38d8e149fb253d1d1beb05fe95e33d4fd
1,350
py
Python
cogs/help.py
Tutuviz/yunna-bot
2e76fa41a5029bd96b8e1c2f01462d73d7deeacd
[ "MIT" ]
null
null
null
cogs/help.py
Tutuviz/yunna-bot
2e76fa41a5029bd96b8e1c2f01462d73d7deeacd
[ "MIT" ]
null
null
null
cogs/help.py
Tutuviz/yunna-bot
2e76fa41a5029bd96b8e1c2f01462d73d7deeacd
[ "MIT" ]
null
null
null
import discord from discord.ext import commands class Help(commands.Cog): def __init__(self, bot): self.bot = bot # Comands @commands.command(pass_context=True, aliases=("commands", "cmd")) async def help(self, ctx): embed = discord.Embed(title="There are all commands I know", descrip...
58.695652
331
0.704444
import discord from discord.ext import commands class Help(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command(pass_context=True, aliases=("commands", "cmd")) async def help(self, ctx): embed = discord.Embed(title="There are all commands I know", description="Yunn...
true
true
f734223bdceb57e4160f18ca5c8236187d3e0af2
1,421
py
Python
gtfs_converter/scheduler.py
etalab/gtfs_converter
c98866a6fcc5454f8bcb4c329b2f710d28e70356
[ "MIT" ]
3
2020-07-28T14:20:58.000Z
2021-01-08T20:55:43.000Z
gtfs_converter/scheduler.py
etalab/gtfs_converter
c98866a6fcc5454f8bcb4c329b2f710d28e70356
[ "MIT" ]
4
2020-05-04T11:01:08.000Z
2021-08-06T16:50:16.000Z
gtfs_converter/scheduler.py
etalab/gtfs_converter
c98866a6fcc5454f8bcb4c329b2f710d28e70356
[ "MIT" ]
1
2020-04-29T16:46:46.000Z
2020-04-29T16:46:46.000Z
from rq_scheduler.scheduler import Scheduler import rq from redis import Redis import os import sys import init_log import logging def _run_scheduler(): with rq.Connection(Redis.from_url(os.environ.get("REDIS_URL") or "redis://")): q = rq.Queue() scheduler = Scheduler(queue=q) scheduler....
25.375
82
0.613652
from rq_scheduler.scheduler import Scheduler import rq from redis import Redis import os import sys import init_log import logging def _run_scheduler(): with rq.Connection(Redis.from_url(os.environ.get("REDIS_URL") or "redis://")): q = rq.Queue() scheduler = Scheduler(queue=q) scheduler....
true
true
f734224e5ccc1a5cc4968643172e56daa96e2640
16,537
py
Python
Graphcore/benchmarks/bert/implementations/popart/pack_pretraining_data.py
jqueguiner/training_results_v1.0
8200377f425ae24b6ed6c2816b9273aab0996d43
[ "Apache-2.0" ]
27
2021-07-01T00:34:52.000Z
2022-03-29T08:49:53.000Z
Graphcore/benchmarks/bert/implementations/popart/pack_pretraining_data.py
jqueguiner/training_results_v1.0
8200377f425ae24b6ed6c2816b9273aab0996d43
[ "Apache-2.0" ]
21
2021-08-31T08:34:50.000Z
2022-03-17T11:42:10.000Z
Graphcore/benchmarks/bert/implementations/popart/pack_pretraining_data.py
jqueguiner/training_results_v1.0
8200377f425ae24b6ed6c2816b9273aab0996d43
[ "Apache-2.0" ]
39
2021-07-02T00:46:14.000Z
2022-03-13T16:59:55.000Z
# Copyright (c) 2020 Graphcore Ltd. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
46.847025
148
0.687549
import os import time import glob import struct import random import argparse import numpy as np import pandas as pd from scipy import optimize from itertools import repeat, chain from functools import lru_cache, reduce from collections import defaultdict from matplotlib import pyplot as plt from concurrent.futures i...
true
true
f7342279882a08dd430286cdc06a85f6471afcd1
1,098
py
Python
muller_method/urls.py
mhwahdan/muller-method-Django
ad0f578c0d49add64191b7e4bca74e0bbecfb2b2
[ "MIT" ]
null
null
null
muller_method/urls.py
mhwahdan/muller-method-Django
ad0f578c0d49add64191b7e4bca74e0bbecfb2b2
[ "MIT" ]
null
null
null
muller_method/urls.py
mhwahdan/muller-method-Django
ad0f578c0d49add64191b7e4bca74e0bbecfb2b2
[ "MIT" ]
null
null
null
"""muller_method URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class...
34.3125
80
0.73224
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path, include from API import urls as api_urls from calculator import urls as calculator_urls urlpatterns = [ path('admin/', admin.site.urls), path('', include(calculator_urls))...
true
true
f73424a731778f16d203aec5298efed11c687051
10,935
py
Python
LL_AV/GenerateAVFileReputationPenalties/GenerateAVFileReputationPenalties.py
nkrios/LOCKLEVEL
0ece6c7ea8b84eced38ef3a89ce2e96a7737234f
[ "CC0-1.0" ]
46
2018-07-12T04:38:43.000Z
2022-03-20T19:25:11.000Z
LL_AV/GenerateAVFileReputationPenalties/GenerateAVFileReputationPenalties.py
nkrios/LOCKLEVEL
0ece6c7ea8b84eced38ef3a89ce2e96a7737234f
[ "CC0-1.0" ]
null
null
null
LL_AV/GenerateAVFileReputationPenalties/GenerateAVFileReputationPenalties.py
nkrios/LOCKLEVEL
0ece6c7ea8b84eced38ef3a89ce2e96a7737234f
[ "CC0-1.0" ]
17
2018-07-04T05:07:08.000Z
2021-09-15T21:42:18.000Z
""" Generate the penalty XML file used by the antivirus file reputation analyzer. """ import argparse import xml.etree.ElementTree as ET import xml.dom.minidom import os import sys PENALTIES_ELEMENT = 'penalties' PENALTY_ELEMENT = 'penalty' REASON_ELEMENT = 'reason' REMEDIATION_ELEMENT = 'remediation' ...
45
245
0.705167
import argparse import xml.etree.ElementTree as ET import xml.dom.minidom import os import sys PENALTIES_ELEMENT = 'penalties' PENALTY_ELEMENT = 'penalty' REASON_ELEMENT = 'reason' REMEDIATION_ELEMENT = 'remediation' ID_ATTRIBUTE = 'id' NAME_ATTRIBUTE = 'name' VALUE_ATTRIBUTE = 'value' class Remed...
true
true
f73424c6a01e6b3045d0f8b6a981195fd7ef3b08
562
py
Python
accounts/migrations/0017_auto_20150815_1613.py
bharathramh92/easy-ecom
164f1b6e11559386efef474c5f50d33b4ddea792
[ "Apache-2.0" ]
null
null
null
accounts/migrations/0017_auto_20150815_1613.py
bharathramh92/easy-ecom
164f1b6e11559386efef474c5f50d33b4ddea792
[ "Apache-2.0" ]
null
null
null
accounts/migrations/0017_auto_20150815_1613.py
bharathramh92/easy-ecom
164f1b6e11559386efef474c5f50d33b4ddea792
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('accounts', '0016_auto_20150814_1727'), ] operations = [ migrations.RemoveField( model_name='userextended', ...
23.416667
74
0.606762
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('accounts', '0016_auto_20150814_1727'), ] operations = [ migrations.RemoveField( model_name='userextended', name='profile_pic...
true
true
f734260e0d34c5734639347af6aabfa594fe3c70
4,860
py
Python
docs/conf.py
harvard-nrg/mano
cbb54337f6fcae8905f1a4ab91f7beeac9ce041c
[ "BSD-3-Clause" ]
1
2019-03-22T18:29:12.000Z
2019-03-22T18:29:12.000Z
docs/conf.py
harvard-nrg/mano
cbb54337f6fcae8905f1a4ab91f7beeac9ce041c
[ "BSD-3-Clause" ]
5
2019-04-08T20:32:29.000Z
2022-02-21T21:46:11.000Z
docs/conf.py
harvard-nrg/mano
cbb54337f6fcae8905f1a4ab91f7beeac9ce041c
[ "BSD-3-Clause" ]
1
2018-07-24T06:51:09.000Z
2018-07-24T06:51:09.000Z
from recommonmark.parser import CommonMarkParser source_parsers = { '.md': CommonMarkParser, } # -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-d...
30
79
0.657819
from recommonmark.parser import CommonMarkParser source_parsers = { '.md': CommonMarkParser, } project = u'mano' copyright = u'2018, Neuroinformatics Research Group' author = u'Neuroinformatics Research Group' version = u'' release = u'' extensions = [ ] templates_path = ['_templates'] source_suffix =...
true
true
f73426a6d09771817c4ae4bd334dd2b536e8b40a
1,680
py
Python
tapioca_nessus/tapioca_nessus.py
siteblindado/tapioca-nessus
b1e7896c5c2ee6d4bce5d3caf97004f2be445c7e
[ "MIT" ]
null
null
null
tapioca_nessus/tapioca_nessus.py
siteblindado/tapioca-nessus
b1e7896c5c2ee6d4bce5d3caf97004f2be445c7e
[ "MIT" ]
null
null
null
tapioca_nessus/tapioca_nessus.py
siteblindado/tapioca-nessus
b1e7896c5c2ee6d4bce5d3caf97004f2be445c7e
[ "MIT" ]
null
null
null
# coding: utf-8 import json from requests.auth import HTTPBasicAuth from tapioca import ( TapiocaAdapter, generate_wrapper_from_adapter, JSONAdapterMixin) from .resource_mapping import RESOURCE_MAPPING class NessusClientAdapter(JSONAdapterMixin, TapiocaAdapter): api_root = None resource_mapping = RESOUR...
31.111111
102
0.663095
import json from requests.auth import HTTPBasicAuth from tapioca import ( TapiocaAdapter, generate_wrapper_from_adapter, JSONAdapterMixin) from .resource_mapping import RESOURCE_MAPPING class NessusClientAdapter(JSONAdapterMixin, TapiocaAdapter): api_root = None resource_mapping = RESOURCE_MAPPING ...
true
true
f734280e790810cccc43a5498c22c93115eb39ae
1,436
py
Python
tests/xl_methods.py
leobelen/pydatajson
bcc6bbbb9d6554c82a658542522330d8e6337731
[ "MIT" ]
null
null
null
tests/xl_methods.py
leobelen/pydatajson
bcc6bbbb9d6554c82a658542522330d8e6337731
[ "MIT" ]
null
null
null
tests/xl_methods.py
leobelen/pydatajson
bcc6bbbb9d6554c82a658542522330d8e6337731
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ xl_methods Métodos ligeramente modificados a partir de abenassi/xlseries para manipular archivos en formato XLSX (https://github.com/abenassi/xlseries). """ from six import string_types, text_type def compare_cells(wb1, wb2): """Compare two excels based on row it...
25.192982
77
0.623955
from six import string_types, text_type def compare_cells(wb1, wb2): for ws1, ws2 in zip(wb1.worksheets, wb2.worksheets): compare_cells_ws(ws1, ws2) return True def compare_cells_ws(ws1, ws2): for row1, row2 in zip(ws1.rows, ws2.rows): for cell1, cell2 in zip(row1, row2): ...
true
true
f73429aa6bd682cc0f815f80c943f752943a6a16
1,904
py
Python
CNNModel.py
night2wolf/CS490-ML-Lab2
c25e6a58829939eccc84b54a50f14c7d3b0c8c2f
[ "MIT" ]
null
null
null
CNNModel.py
night2wolf/CS490-ML-Lab2
c25e6a58829939eccc84b54a50f14c7d3b0c8c2f
[ "MIT" ]
null
null
null
CNNModel.py
night2wolf/CS490-ML-Lab2
c25e6a58829939eccc84b54a50f14c7d3b0c8c2f
[ "MIT" ]
null
null
null
from keras import models, layers class CNNModel: @staticmethod def generateModel(input): model = models.Sequential() model.add(layers.Conv2D(filters=32, kernel_size=(5,5), activation='relu', input_shape=input.shape[1:])) model.add(layers.MaxPool2D(pool_size=(2, 2))) model.add(la...
48.820513
111
0.661765
from keras import models, layers class CNNModel: @staticmethod def generateModel(input): model = models.Sequential() model.add(layers.Conv2D(filters=32, kernel_size=(5,5), activation='relu', input_shape=input.shape[1:])) model.add(layers.MaxPool2D(pool_size=(2, 2))) model.add(la...
true
true
f73429bdedfeb716fa240ffa82ccccfd74287e74
375
py
Python
python/numpy/weldnumpy/__init__.py
hvanhovell/weld
0d9e55c71f2a4e0040cb0687d3eb53f54ec4ba94
[ "BSD-3-Clause" ]
null
null
null
python/numpy/weldnumpy/__init__.py
hvanhovell/weld
0d9e55c71f2a4e0040cb0687d3eb53f54ec4ba94
[ "BSD-3-Clause" ]
null
null
null
python/numpy/weldnumpy/__init__.py
hvanhovell/weld
0d9e55c71f2a4e0040cb0687d3eb53f54ec4ba94
[ "BSD-3-Clause" ]
null
null
null
from weldarray import * from weldnumpy import * # FIXME: Should this be in weldnump? pytest gives errors when trying to import # weldarray in weldnumpy...so keeping it here for now. def array(arr, *args, **kwargs): ''' Wrapper around weldarray - first create np.array and then convert to weldarray. '''...
26.785714
78
0.698667
from weldarray import * from weldnumpy import * def array(arr, *args, **kwargs): return weldarray(np.array(arr, *args, **kwargs))
true
true
f73429e8b78185619483984f8453f70ac968279b
752
py
Python
galaxy/main/migrations/0015_auto_20150917_1504.py
maxamillion/galaxy
0460baf9d2c8da0a0e88c7975eca2e3abcc82f23
[ "Apache-2.0" ]
1
2017-06-18T21:46:01.000Z
2017-06-18T21:46:01.000Z
galaxy/main/migrations/0015_auto_20150917_1504.py
maxamillion/galaxy
0460baf9d2c8da0a0e88c7975eca2e3abcc82f23
[ "Apache-2.0" ]
1
2021-06-10T23:59:59.000Z
2021-06-10T23:59:59.000Z
galaxy/main/migrations/0015_auto_20150917_1504.py
connectthefuture/galaxy
841821957680643e07c1a94fb609f8e4117c19d1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('main', '0014_auto_20150917_1211'), ] operations = [ migrations.AlterField( model_name='role', name='...
30.08
159
0.625
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('main', '0014_auto_20150917_1211'), ] operations = [ migrations.AlterField( model_name='role', name='categories', ...
true
true
f7342a7e37fa9c6d1e46a7d7b16847841d76e379
1,002
py
Python
setup.py
virink/flask_waf
9a0cfafb988c2bf043570e0877b1c3e43881affb
[ "BSD-3-Clause" ]
10
2018-09-29T01:42:01.000Z
2020-09-06T17:39:39.000Z
setup.py
virink/flask_waf
9a0cfafb988c2bf043570e0877b1c3e43881affb
[ "BSD-3-Clause" ]
1
2018-09-29T02:41:01.000Z
2018-09-29T14:35:31.000Z
setup.py
virink/flask_waf
9a0cfafb988c2bf043570e0877b1c3e43881affb
[ "BSD-3-Clause" ]
1
2019-08-27T17:04:39.000Z
2019-08-27T17:04:39.000Z
# -*- coding: utf-8 -*- """ Flask-Waf --------- Adds server Waf support to your application. :copyright: (c) 2018 by Virink :license: BSD, see LICENSE for more details. """ from setuptools import setup setup( name='Flask-Waf', version='1.0', url='https://github.com/virink/flask_waf',...
25.05
70
0.605788
from setuptools import setup setup( name='Flask-Waf', version='1.0', url='https://github.com/virink/flask_waf', license='BSD', author='Virink', author_email='virink@outlook.com', description='Just a webwaf for log', long_description=__doc__, packages=['flask_waf'], zip_safe=Fal...
true
true
f7342b52669ad7a60e120c7f62bc0adfaa142f7f
360
py
Python
configs/pspnet/pspnet_r50-d8_769x769_40k_cityscapes.py
vietawake/mmSegmentation
1f643d6d81708ebf5726c48f66d02c70fe99fe00
[ "Apache-2.0" ]
null
null
null
configs/pspnet/pspnet_r50-d8_769x769_40k_cityscapes.py
vietawake/mmSegmentation
1f643d6d81708ebf5726c48f66d02c70fe99fe00
[ "Apache-2.0" ]
null
null
null
configs/pspnet/pspnet_r50-d8_769x769_40k_cityscapes.py
vietawake/mmSegmentation
1f643d6d81708ebf5726c48f66d02c70fe99fe00
[ "Apache-2.0" ]
null
null
null
_base_ = [ '../_base_/models/pspnet_r50-d8.py', '../_base_/datasets/cityscapes_769x769.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_40k.py' ] model = dict( decode_head=dict(align_corners=True), auxiliary_head=dict(align_corners=True), test_cfg=dict(mode='slide', cro...
36
80
0.672222
_base_ = [ '../_base_/models/pspnet_r50-d8.py', '../_base_/datasets/cityscapes_769x769.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_40k.py' ] model = dict( decode_head=dict(align_corners=True), auxiliary_head=dict(align_corners=True), test_cfg=dict(mode='slide', cro...
true
true
f7342bb4b595c8de89773e3d4fa123515307cda0
3,384
py
Python
examples/interface/LPAffineDense.py
pjt1988/Elemental
71d3e2b98829594e9f52980a8b1ef7c1e99c724b
[ "Apache-2.0" ]
473
2015-01-11T03:22:11.000Z
2022-03-31T05:28:39.000Z
examples/interface/LPAffineDense.py
pjt1988/Elemental
71d3e2b98829594e9f52980a8b1ef7c1e99c724b
[ "Apache-2.0" ]
205
2015-01-10T20:33:45.000Z
2021-07-25T14:53:25.000Z
examples/interface/LPAffineDense.py
pjt1988/Elemental
71d3e2b98829594e9f52980a8b1ef7c1e99c724b
[ "Apache-2.0" ]
109
2015-02-16T14:06:42.000Z
2022-03-23T21:34:26.000Z
# # Copyright (c) 2009-2016, Jack Poulson # All rights reserved. # # This file is part of Elemental and is under the BSD 2-Clause License, # which can be found in the LICENSE file in the root directory, or at # http://opensource.org/licenses/BSD-2-Clause # import El m = 500 n = 1000 k = 750 testMehrotra = True ...
25.066667
73
0.610225
import El m = 500 n = 1000 k = 750 testMehrotra = True testIPF = False manualInit = False display = False progress = True worldRank = El.mpi.WorldRank() worldSize = El.mpi.WorldSize() def RectangDense(height,width): A = El.DistMatrix() El.Gaussian( A, height, width ) return A A = RectangDense(m,n) G = RectangD...
true
true
f7342c6447aca358d841aafe7988c715fb43c139
291,590
py
Python
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/plotly/tools.py
MobileAnalytics/iPython-Framework
da0e598308c067cd5c5290a6364b3ffaf2d2418f
[ "MIT" ]
4
2018-07-04T17:20:12.000Z
2019-07-14T18:07:25.000Z
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/plotly/tools.py
MobileAnalytics/iPython-Framework
da0e598308c067cd5c5290a6364b3ffaf2d2418f
[ "MIT" ]
null
null
null
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/plotly/tools.py
MobileAnalytics/iPython-Framework
da0e598308c067cd5c5290a6364b3ffaf2d2418f
[ "MIT" ]
1
2018-09-03T03:02:06.000Z
2018-09-03T03:02:06.000Z
# -*- coding: utf-8 -*- """ tools ===== Functions that USERS will possibly want access to. """ from __future__ import absolute_import from collections import OrderedDict import warnings import six import math import decimal from plotly import utils from plotly import exceptions from plotly import graph_reference ...
39.181672
134
0.510714
from __future__ import absolute_import from collections import OrderedDict import warnings import six import math import decimal from plotly import utils from plotly import exceptions from plotly import graph_reference from plotly import session from plotly.files import (CONFIG_FILE, CREDENTIALS_FILE, FILE_CONTENT,...
true
true
f7342d5a9f5798569cd6e83dadbc84ca8f4c2ab8
520
py
Python
pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxr/lldp/configure.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
94
2018-04-30T20:29:15.000Z
2022-03-29T13:40:31.000Z
pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxr/lldp/configure.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
67
2018-12-06T21:08:09.000Z
2022-03-29T18:00:46.000Z
pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxr/lldp/configure.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
49
2018-06-29T18:59:03.000Z
2022-03-10T02:07:59.000Z
"""Common configure functions for lldp""" # Python import logging log = logging.getLogger(__name__) def configure_lldp(device): """ Enables lldp on target device Args: device ('obj'): Device object Returns: None """ device.configure(['lldp']) def u...
21.666667
42
0.553846
import logging log = logging.getLogger(__name__) def configure_lldp(device): device.configure(['lldp']) def unconfigure_lldp(device): device.configure('no lldp')
true
true
f7342dc10025238831db10191fe54509c36df5ef
1,757
py
Python
github_poster/loader/duolingo_loader.py
phh95/GitHubPoster
6bb0eb4cce8f60b9b25a0ae813601dcc13b32f66
[ "MIT" ]
null
null
null
github_poster/loader/duolingo_loader.py
phh95/GitHubPoster
6bb0eb4cce8f60b9b25a0ae813601dcc13b32f66
[ "MIT" ]
null
null
null
github_poster/loader/duolingo_loader.py
phh95/GitHubPoster
6bb0eb4cce8f60b9b25a0ae813601dcc13b32f66
[ "MIT" ]
null
null
null
import pendulum import requests from github_poster.loader.base_loader import BaseLoader from github_poster.loader.config import DUOLINGO_CALENDAR_API class DuolingoLoader(BaseLoader): unit = "XP" def __init__(self, from_year, to_year, **kwargs): super().__init__(from_year, to_year) self.user...
30.293103
74
0.569152
import pendulum import requests from github_poster.loader.base_loader import BaseLoader from github_poster.loader.config import DUOLINGO_CALENDAR_API class DuolingoLoader(BaseLoader): unit = "XP" def __init__(self, from_year, to_year, **kwargs): super().__init__(from_year, to_year) self.user...
true
true
f7342f4e225e7f068f707b4f2ec284cf601056e1
26,885
py
Python
lib/services/vserver/ncloud_vserver/model/server_instance.py
NaverCloudPlatform/ncloud-sdk-python
5976dfabd205c615fcf57ac2f0ab67313ee6953c
[ "MIT" ]
12
2018-11-20T04:30:49.000Z
2021-11-09T12:34:26.000Z
lib/services/vserver/ncloud_vserver/model/server_instance.py
NaverCloudPlatform/ncloud-sdk-python
5976dfabd205c615fcf57ac2f0ab67313ee6953c
[ "MIT" ]
1
2019-01-24T15:56:15.000Z
2019-05-31T07:56:55.000Z
lib/services/vserver/ncloud_vserver/model/server_instance.py
NaverCloudPlatform/ncloud-sdk-python
5976dfabd205c615fcf57ac2f0ab67313ee6953c
[ "MIT" ]
6
2018-06-29T03:45:50.000Z
2022-03-18T01:51:45.000Z
# coding: utf-8 """ vserver Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from ncloud_vserver.model.common_code import CommonCode # noqa: F401,E501 class ServerInstance(object): """NOTE: This class is auto generated by the...
31.929929
689
0.650921
import pprint import re import six from ncloud_vserver.model.common_code import CommonCode class ServerInstance(object): swagger_types = { 'server_instance_no': 'str', 'server_name': 'str', 'server_description': 'str', 'cpu_count': 'int', 'memory_size': 'int', ...
true
true
f73430eb46e3d4244ec8ada9522ec81546a1cbb7
18,521
py
Python
tensorflow_text/python/ops/sentencepiece_tokenizer_test.py
vbod/text
07c044b8b851ace1e9a033c9597cdb1bee2d69e0
[ "Apache-2.0" ]
null
null
null
tensorflow_text/python/ops/sentencepiece_tokenizer_test.py
vbod/text
07c044b8b851ace1e9a033c9597cdb1bee2d69e0
[ "Apache-2.0" ]
null
null
null
tensorflow_text/python/ops/sentencepiece_tokenizer_test.py
vbod/text
07c044b8b851ace1e9a033c9597cdb1bee2d69e0
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2020 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
41.157778
85
0.606933
import sys import tempfile from absl.testing import parameterized from tensorflow.python.data.ops import dataset_ops from tensorflow.python.eager import context from tensorflow.python.eager import def_function from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tens...
true
true
f7343149bcb9f8ac184634f891b354142315a99b
1,318
py
Python
projectile.py
jmkinder1/code-samples
9c6cd3c6f16579a6c1f5210779b8ec6ad53fbdba
[ "BSD-3-Clause" ]
5
2021-07-17T05:19:00.000Z
2022-01-05T05:39:50.000Z
projectile.py
jmkinder1/code-samples
9c6cd3c6f16579a6c1f5210779b8ec6ad53fbdba
[ "BSD-3-Clause" ]
null
null
null
projectile.py
jmkinder1/code-samples
9c6cd3c6f16579a6c1f5210779b8ec6ad53fbdba
[ "BSD-3-Clause" ]
8
2020-12-26T23:41:27.000Z
2022-02-24T22:18:41.000Z
# projectile.py # ----------------------------------------------------------------------------- # Calculate how long an object is in the air when thrown from a specified height # with a range of initial speeds assuming constant acceleration due to gravity: # 0.5 * g * t**2 - v0 * t - y0 = 0 # -------------------------...
48.814815
87
0.636571
import numpy as np initial_speed = 0.0 impact_time = 0.0 g = 9.8066 initial_height = 2.0 speed_increment = 5.0 cutoff_time = 10.0 while impact_time < cutoff_time: impact_time = (np.sqrt(initial_speed**2 + 2 * g * initial_height) + initial_speed) / g print("speed= {} m/s; time= {:.1f} s".format(initial...
true
true
f73431baeb0c90da847b750fe45e3a856b6a9533
3,748
py
Python
model/functional.py
yil8/GPN
e0ccba70db6f1d3264f8d3dd38fc4c62bcebd7ad
[ "Apache-2.0" ]
16
2019-03-01T17:52:52.000Z
2021-12-31T09:39:01.000Z
model/functional.py
xiamenwcy/GPN
e0ccba70db6f1d3264f8d3dd38fc4c62bcebd7ad
[ "Apache-2.0" ]
1
2021-05-12T11:24:05.000Z
2021-05-12T17:44:46.000Z
model/functional.py
xiamenwcy/GPN
e0ccba70db6f1d3264f8d3dd38fc4c62bcebd7ad
[ "Apache-2.0" ]
5
2019-04-02T03:42:02.000Z
2020-08-01T20:40:15.000Z
import torch import torch.nn.functional as F import numpy as np # Original author: Francisco Massa: # https://github.com/fmassa/object-detection.torch # Ported to PyTorch by Max deGroot (02/01/2017) def nms(boxes, scores, overlap=0.7): """Apply non-maximum suppression at test time to avoid detecting too many ...
33.168142
79
0.602721
import torch import torch.nn.functional as F import numpy as np def nms(boxes, scores, overlap=0.7): keep = scores.new(scores.size(0)).zero_().long() if boxes.numel() == 0: return keep x1 = boxes[:, 0] y1 = boxes[:, 1] x2 = boxes[:, 2] y2 = boxes[:, 3] area = torch.mul(x2 - x1, y2...
true
true
f734325c72b04acb108ec2de3b0506cfa207023f
62,690
py
Python
tests/nat/nat_helpers.py
stephengao-ragilenetworks/sonic-mgmt
b7ce8f6592f12ee8a7a0daca9a4337d5eaf9313f
[ "Apache-2.0" ]
1
2020-10-15T05:52:17.000Z
2020-10-15T05:52:17.000Z
tests/nat/nat_helpers.py
stephengao-ragilenetworks/sonic-mgmt
b7ce8f6592f12ee8a7a0daca9a4337d5eaf9313f
[ "Apache-2.0" ]
4
2019-07-26T08:42:01.000Z
2020-12-16T08:34:52.000Z
tests/nat/nat_helpers.py
stephengao-ragilenetworks/sonic-mgmt
b7ce8f6592f12ee8a7a0daca9a4337d5eaf9313f
[ "Apache-2.0" ]
null
null
null
import re import os import time import logging import json from collections import namedtuple import ptf.mask as mask import ptf.packet as packet import ptf.testutils as testutils from tests.common.errors import RunAnsibleModuleFail from tests.common.helpers.assertions import pytest_assert from jinja2 import Environme...
47.348943
161
0.627628
import re import os import time import logging import json from collections import namedtuple import ptf.mask as mask import ptf.packet as packet import ptf.testutils as testutils from tests.common.errors import RunAnsibleModuleFail from tests.common.helpers.assertions import pytest_assert from jinja2 import Environme...
true
true
f73432ee58b79c9c931bae7337e94822d4ebdfa3
876
py
Python
company/migrations/0024_auto_20161220_1751.py
uktrade/directory-api
45a9024a7ecc2842895201cbb51420ba9e57a168
[ "MIT" ]
2
2017-06-02T09:09:08.000Z
2021-01-18T10:26:53.000Z
company/migrations/0024_auto_20161220_1751.py
konradko/directory-api
e9cd05b1deaf575e94352c46ddbd1857d8119fda
[ "MIT" ]
629
2016-10-10T09:35:52.000Z
2022-03-25T15:04:04.000Z
company/migrations/0024_auto_20161220_1751.py
konradko/directory-api
e9cd05b1deaf575e94352c46ddbd1857d8119fda
[ "MIT" ]
5
2017-06-22T10:02:22.000Z
2022-03-14T17:55:21.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.10 on 2016-12-20 17:51 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('company', '0023_auto_20161219_1730'), ] operations = [ migrations.AddField(...
28.258065
85
0.593607
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('company', '0023_auto_20161219_1730'), ] operations = [ migrations.AddField( model_name='company', name='facebook_url', ...
true
true
f734331cbfdb47aab2dbbef75b0eeb01f8ce15b8
413
py
Python
seedstars_contacts/wsgi.py
ruidacosta/seedstars-contacts
6b39cf0c688adc3fbc5d032ee30e3271588c6ec3
[ "MIT" ]
null
null
null
seedstars_contacts/wsgi.py
ruidacosta/seedstars-contacts
6b39cf0c688adc3fbc5d032ee30e3271588c6ec3
[ "MIT" ]
null
null
null
seedstars_contacts/wsgi.py
ruidacosta/seedstars-contacts
6b39cf0c688adc3fbc5d032ee30e3271588c6ec3
[ "MIT" ]
null
null
null
""" WSGI config for seedstars_contacts project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("D...
24.294118
78
0.79661
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "seedstars_contacts.settings") application = get_wsgi_application()
true
true
f73435251244e0ae957d0fc4c9b83da5333bdf6a
16,707
py
Python
hphp/hack/test/hh_codesynthesis/codesynthesis_test.py
jjergus/hhvm
7f94d3da259c9443792327e0a61af1a6778d53b9
[ "PHP-3.01", "Zend-2.0" ]
null
null
null
hphp/hack/test/hh_codesynthesis/codesynthesis_test.py
jjergus/hhvm
7f94d3da259c9443792327e0a61af1a6778d53b9
[ "PHP-3.01", "Zend-2.0" ]
null
null
null
hphp/hack/test/hh_codesynthesis/codesynthesis_test.py
jjergus/hhvm
7f94d3da259c9443792327e0a61af1a6778d53b9
[ "PHP-3.01", "Zend-2.0" ]
null
null
null
#!/usr/bin/env python3 # pyre-strict # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the "hack" directory of this source tree. import tempfile import unittest from hphp.hack.src.hh_codesynthesis import hh_codesynthesis, hackGenera...
32.440777
133
0.553481
import tempfile import unittest from hphp.hack.src.hh_codesynthesis import hh_codesynthesis, hackGenerator from hphp.hack.src.hh_codesynthesis.hh_codesynthesis import ClingoContext class GenerateLogicRulesTest(unittest.TestCase): def test_depth_less_than_nodes(self) -> None: ClingoContext.number_of_nodes...
true
true
f734353463d9f084656926c5976d0185d41c41a7
7,041
py
Python
container_service_extension/lib/pksclient/api/usage_api.py
arunmk/container-service-extension
5e67df64fd5ed7fbb664d449356cb983cecbca12
[ "BSD-3-Clause" ]
81
2017-07-05T19:42:41.000Z
2022-03-09T22:04:05.000Z
container_service_extension/lib/pksclient/api/usage_api.py
arunmk/container-service-extension
5e67df64fd5ed7fbb664d449356cb983cecbca12
[ "BSD-3-Clause" ]
670
2017-07-05T16:48:02.000Z
2022-03-31T13:40:53.000Z
container_service_extension/lib/pksclient/api/usage_api.py
arunmk/container-service-extension
5e67df64fd5ed7fbb664d449356cb983cecbca12
[ "BSD-3-Clause" ]
64
2017-07-05T16:32:55.000Z
2022-03-23T09:36:03.000Z
# coding: utf-8 """ PKS PKS API # noqa: E501 OpenAPI spec version: 1.1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import # python 2 and python 3 compatibility library import six from container_service_extension.lib.pksclient.api_cl...
33.369668
109
0.592814
from __future__ import absolute_import import six from container_service_extension.lib.pksclient.api_client import ApiClient class UsageApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def get_usag...
true
true
f73437decdc2b3be3f553e9d269d83a639111390
3,340
py
Python
pogom/pgoapi/protos/POGOProtos/Inventory/InventoryDelta_pb2.py
tier4fusion/pogom-updated
31c4db3dfc85b19abb39c2e43f5efa530c65159e
[ "MIT" ]
2,557
2016-07-19T22:20:45.000Z
2022-01-25T10:53:35.000Z
pogom/pgoapi/protos/POGOProtos/Inventory/InventoryDelta_pb2.py
tier4fusion/pogom-updated
31c4db3dfc85b19abb39c2e43f5efa530c65159e
[ "MIT" ]
1,360
2016-07-20T02:06:42.000Z
2021-07-27T12:46:40.000Z
pogom/pgoapi/protos/POGOProtos/Inventory/InventoryDelta_pb2.py
tier4fusion/pogom-updated
31c4db3dfc85b19abb39c2e43f5efa530c65159e
[ "MIT" ]
607
2016-07-20T03:34:04.000Z
2022-01-05T14:57:09.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Inventory/InventoryDelta.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf...
38.390805
365
0.78503
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google.p...
true
true
f73439a039a68664196ccfefac524b885ff036d1
1,663
py
Python
accelerator/examples/printer.py
eBay/accelerator
218d9a5e4451ac72b9e65df6c5b32e37d25136c8
[ "Apache-2.0" ]
143
2018-04-20T18:50:41.000Z
2022-02-06T07:07:35.000Z
accelerator/examples/printer.py
exaxorg/accelerator
d6132f215585b98d2ad14c5d74d2c937fbd940e2
[ "Apache-2.0" ]
null
null
null
accelerator/examples/printer.py
exaxorg/accelerator
d6132f215585b98d2ad14c5d74d2c937fbd940e2
[ "Apache-2.0" ]
29
2018-04-20T18:50:43.000Z
2021-04-27T18:42:23.000Z
# This isn't intended as an example, it's just here to simplify all the # output formating the examples do. from accelerator import colour class Printer: def __init__(self, indent=0): self._indent = indent self._last_indent = 0 self._unindent = [] def _prefix(self, txt): for c in txt: if not c.isspace()...
24.455882
90
0.659651
from accelerator import colour class Printer: def __init__(self, indent=0): self._indent = indent self._last_indent = 0 self._unindent = [] def _prefix(self, txt): for c in txt: if not c.isspace(): break yield c yield None def _print(self, a, indent, *attrs): txt = ' '.join(str(v) for v in ...
true
true
f7343a622d7f533789cc7b05b9b75120bde054ca
76,341
py
Python
fluids/compressible.py
celikten/fluids
acfd9a06acef18817693f6296aadf8d1c7cabee4
[ "MIT" ]
218
2016-01-04T07:44:46.000Z
2022-03-30T08:06:36.000Z
fluids/compressible.py
celikten/fluids
acfd9a06acef18817693f6296aadf8d1c7cabee4
[ "MIT" ]
47
2016-04-20T06:06:10.000Z
2022-03-04T14:45:39.000Z
fluids/compressible.py
celikten/fluids
acfd9a06acef18817693f6296aadf8d1c7cabee4
[ "MIT" ]
65
2016-01-29T03:28:01.000Z
2022-01-26T16:17:05.000Z
# -*- coding: utf-8 -*- """Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2016, 2017, 2018, 2019, 2020 Caleb Bell <Caleb.Andrew.Bell@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (t...
39.270062
198
0.62564
from __future__ import division from math import sqrt, log, pi, exp, isinf from fluids.constants import R from fluids.numerics import secant, newton, ridder, lambertw __all__ = ['Panhandle_A', 'Panhandle_B', 'Weymouth', 'Spitzglass_high', 'Spitzglass_low', 'Oliphant', 'Fritzsche', 'Muller', 'IGT', 'isother...
true
true
f7343c31f576b59257d7b79941143a08aa3e5c0d
7,758
py
Python
code/supporting_functions.py
AhmedElshaarany/RoboND-Rover-Project
9dad356d4585bb567ee436062afdd82d9d7eb4de
[ "MIT" ]
null
null
null
code/supporting_functions.py
AhmedElshaarany/RoboND-Rover-Project
9dad356d4585bb567ee436062afdd82d9d7eb4de
[ "MIT" ]
null
null
null
code/supporting_functions.py
AhmedElshaarany/RoboND-Rover-Project
9dad356d4585bb567ee436062afdd82d9d7eb4de
[ "MIT" ]
null
null
null
import numpy as np import cv2 from PIL import Image from io import BytesIO, StringIO import base64 import time # Define a function to convert telemetry strings to float independent of decimal convention def convert_to_float(string_to_convert): if ',' in string_to_convert: float_value = np.float(strin...
48.792453
107
0.62645
import numpy as np import cv2 from PIL import Image from io import BytesIO, StringIO import base64 import time def convert_to_float(string_to_convert): if ',' in string_to_convert: float_value = np.float(string_to_convert.replace(',','.')) else: float_value = np.float(string_to_con...
true
true
f7343d001b8ca38d7c2dca8af4bbbaa19f18099d
12,159
py
Python
Training/pytorch/train.py
QinchengZhang/PathologySegmentation
7a2c21346739a79c33e7a7ccc081018821868eb7
[ "MIT" ]
3
2020-10-25T06:18:21.000Z
2021-12-23T01:42:56.000Z
Training/pytorch/train.py
QinchengZhang/PathologySegmentation
7a2c21346739a79c33e7a7ccc081018821868eb7
[ "MIT" ]
null
null
null
Training/pytorch/train.py
QinchengZhang/PathologySegmentation
7a2c21346739a79c33e7a7ccc081018821868eb7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ''' Author: TJUZQC Date: 2020-10-26 10:26:51 LastEditors: TJUZQC LastEditTime: 2020-11-20 19:23:55 Description: None ''' import argparse import logging import os import sys import numpy as np import torch import torch.nn as nn import yaml from torch import optim from torch.utils.data import Dat...
41.640411
109
0.555062
import argparse import logging import os import sys import numpy as np import torch import torch.nn as nn import yaml from torch import optim from torch.utils.data import DataLoader, random_split from torch.utils.tensorboard import SummaryWriter from tqdm import tqdm from evaluation import eval_net from models import...
true
true
f7343d1941a5745d36121531142f0fb145e90236
1,464
py
Python
mr_database/databaseconnection.py
SorenSeeberg/MrDatabase
07d39c1f227d9ceaffe7e409f0915776901dd3e9
[ "MIT" ]
null
null
null
mr_database/databaseconnection.py
SorenSeeberg/MrDatabase
07d39c1f227d9ceaffe7e409f0915776901dd3e9
[ "MIT" ]
1
2018-05-28T11:55:49.000Z
2018-06-11T16:51:45.000Z
mr_database/databaseconnection.py
SorenSeeberg/MrDatabase
07d39c1f227d9ceaffe7e409f0915776901dd3e9
[ "MIT" ]
null
null
null
import sqlite3 as sqlite class ConType: query = 0 mutation = 1 batch = 2 class DatabaseConnection: is_batching = False def __init__(self, database_object: 'MrDatabase', con_type: int=ConType.mutation): self.database_object = database_object self.con_type: int = con_type ...
24.4
86
0.605874
import sqlite3 as sqlite class ConType: query = 0 mutation = 1 batch = 2 class DatabaseConnection: is_batching = False def __init__(self, database_object: 'MrDatabase', con_type: int=ConType.mutation): self.database_object = database_object self.con_type: int = con_type ...
true
true
f7344259f9ea929ba22c289ed7728299838a7401
1,394
py
Python
05-07-a2/sample_05_button.py
hiro345g/raspi_magazine_201610_toku1
f5dde65409eaeef15e15e6e2d5c86cbf0ac88ef5
[ "MIT" ]
null
null
null
05-07-a2/sample_05_button.py
hiro345g/raspi_magazine_201610_toku1
f5dde65409eaeef15e15e6e2d5c86cbf0ac88ef5
[ "MIT" ]
null
null
null
05-07-a2/sample_05_button.py
hiro345g/raspi_magazine_201610_toku1
f5dde65409eaeef15e15e6e2d5c86cbf0ac88ef5
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import time import wiringpi # 定数宣言 LED_PIN = 4 # LEDのGPIO番号 BUTTON_PIN = 13 # スイッチのGPIO番号 BUTTON_DELAY = 0.5 # チャタリング防止用の遅延時間 INTERVAL = 0.1 # スイッチチェック間隔 def get_button_value(pin): """指定したpinのスイッチ入力状態を取得""" v = wiringpi.digitalRead(pin) if v == wiringpi.H...
27.88
65
0.610473
import time import wiringpi LED_PIN = 4 BUTTON_PIN = 13 BUTTON_DELAY = 0.5 INTERVAL = 0.1 def get_button_value(pin): v = wiringpi.digitalRead(pin) if v == wiringpi.HIGH: time.sleep(BUTTON_DELAY) return v def main(): wiringpi.wiringPiSetupGpio() wiringpi.pinMode(LED_PIN, wir...
true
true
f73443186c3bcf41147c14278c5082c02e5001aa
565
py
Python
qu.py
oldshensheep/crawl-yande.re
ffb512d9ca98f666383f856f833b851bb0982a00
[ "MIT" ]
1
2021-04-12T06:29:43.000Z
2021-04-12T06:29:43.000Z
qu.py
oldshensheep/crawl-yande.re
ffb512d9ca98f666383f856f833b851bb0982a00
[ "MIT" ]
null
null
null
qu.py
oldshensheep/crawl-yande.re
ffb512d9ca98f666383f856f833b851bb0982a00
[ "MIT" ]
null
null
null
import queue import threading import time import concurrent.futures q = queue.Queue(maxsize=10) def Producer(name): count = 1 while True: q.put("包子 %s" % count) print("做了包子", count) count += 1 time.sleep(0.5) def Consumer(name): while True: print("[%s] 取到[%s] 并且吃...
18.225806
55
0.60531
import queue import threading import time import concurrent.futures q = queue.Queue(maxsize=10) def Producer(name): count = 1 while True: q.put("包子 %s" % count) print("做了包子", count) count += 1 time.sleep(0.5) def Consumer(name): while True: print("[%s] 取到[%s] 并且吃...
true
true
f73443a2f76a5004632b0b69d392edbe51fe587b
73
py
Python
wsgi.py
BruninLima/HotOrCold
d8d0ab92d949bfa2e3b62c14659e12a7ce821b1f
[ "MIT" ]
null
null
null
wsgi.py
BruninLima/HotOrCold
d8d0ab92d949bfa2e3b62c14659e12a7ce821b1f
[ "MIT" ]
null
null
null
wsgi.py
BruninLima/HotOrCold
d8d0ab92d949bfa2e3b62c14659e12a7ce821b1f
[ "MIT" ]
null
null
null
from hotorcold.main import app if __name__ == "__main__": app.run()
14.6
30
0.684932
from hotorcold.main import app if __name__ == "__main__": app.run()
true
true
f73443b348d868b2813099929e72cbd8722638ba
9,711
py
Python
nipype/utils/misc.py
kastman/nipype
15a8d6f57067494196fe639095253217a9235c3c
[ "Apache-2.0" ]
3
2015-11-03T08:24:57.000Z
2018-05-02T15:26:28.000Z
nipype/utils/misc.py
kastman/nipype
15a8d6f57067494196fe639095253217a9235c3c
[ "Apache-2.0" ]
null
null
null
nipype/utils/misc.py
kastman/nipype
15a8d6f57067494196fe639095253217a9235c3c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Miscellaneous utility functions """ from __future__ import (print_function, unicode_literals, division, absolute_import) from builtins import next, str im...
29.697248
81
0.604675
from __future__ import (print_function, unicode_literals, division, absolute_import) from builtins import next, str import os import sys import re from collections import Iterator from warnings import warn from distutils.version import LooseVersion import numpy as np from future.utils import ...
true
true
f7344479dd36c883ecee3ae2e8ca891b5e378565
4,706
py
Python
unlock/util/runtime.py
NeuralProsthesisLab/unlock
0c4d95abdab288d3e657ca2db867b06f755f26ff
[ "BSD-3-Clause" ]
6
2017-05-05T01:08:55.000Z
2021-08-03T21:50:07.000Z
unlock/util/runtime.py
NeuralProsthesisLab/unlock
0c4d95abdab288d3e657ca2db867b06f755f26ff
[ "BSD-3-Clause" ]
1
2015-05-21T01:02:50.000Z
2015-05-21T16:03:43.000Z
unlock/util/runtime.py
NeuralProsthesisLab/unlock
0c4d95abdab288d3e657ca2db867b06f755f26ff
[ "BSD-3-Clause" ]
4
2015-05-21T12:38:42.000Z
2022-03-28T15:47:58.000Z
# Copyright (c) James Percent, Byron Galbraith and Unlock contributors. # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notic...
39.216667
132
0.68742
from unlock.util.observable import * from unlock.util.saferef import * from unlock.util.injector import * from optparse import OptionParser import json import logging import logging.config import sys __author__ = 'jpercent' class RuntimeAssistant(object): def __init__(self): super(RuntimeAssistant, self)...
true
true
f734452a3d6c1f77a17ae0567fdcecc839f622e6
21,334
py
Python
node/tests/k8st/tests/test_bgp_advert_v6.py
mikestephen/calico
6c512191c05097dbfacbd18fb23d1ebff18961fd
[ "Apache-2.0" ]
3,973
2015-07-29T21:13:46.000Z
2022-03-31T09:27:38.000Z
node/tests/k8st/tests/test_bgp_advert_v6.py
mikestephen/calico
6c512191c05097dbfacbd18fb23d1ebff18961fd
[ "Apache-2.0" ]
4,584
2015-07-29T08:47:22.000Z
2022-03-31T22:54:26.000Z
node/tests/k8st/tests/test_bgp_advert_v6.py
mikestephen/calico
6c512191c05097dbfacbd18fb23d1ebff18961fd
[ "Apache-2.0" ]
1,066
2015-07-30T06:29:18.000Z
2022-03-31T20:01:47.000Z
# Copyright (c) 2020 Tigera, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
36.220713
142
0.640386
import logging import subprocess import json import sys from tests.k8st.test_base import TestBaseV6 from tests.k8st.utils.utils import start_external_node_with_bgp, \ retry_until_success, run, curl, DiagsCollector, calicoctl, kubectl, node_info _log = logging.getLogger(__name__) attempts = 10 bird_conf = ""...
true
true
f73449826d629af809e16cb66903c50f62680e0c
3,617
py
Python
configs/representation/archive/walker/walker_r18_video_8x8x1_temp1e-2_right_50e_kinetics400_rgb.py
happywu/mmaction2-CycleContrast
019734e471dffd1161b7a9c617ba862d2349a96c
[ "Apache-2.0" ]
null
null
null
configs/representation/archive/walker/walker_r18_video_8x8x1_temp1e-2_right_50e_kinetics400_rgb.py
happywu/mmaction2-CycleContrast
019734e471dffd1161b7a9c617ba862d2349a96c
[ "Apache-2.0" ]
null
null
null
configs/representation/archive/walker/walker_r18_video_8x8x1_temp1e-2_right_50e_kinetics400_rgb.py
happywu/mmaction2-CycleContrast
019734e471dffd1161b7a9c617ba862d2349a96c
[ "Apache-2.0" ]
null
null
null
# model settings model = dict( type='SpaceTimeWalker', backbone=dict( type='ResNet', pretrained=None, depth=18, out_indices=(3, ), norm_eval=False, zero_init_residual=True), cls_head=dict( type='WalkerHead', num_classes=400, in_channels...
31.72807
78
0.66381
model = dict( type='SpaceTimeWalker', backbone=dict( type='ResNet', pretrained=None, depth=18, out_indices=(3, ), norm_eval=False, zero_init_residual=True), cls_head=dict( type='WalkerHead', num_classes=400, in_channels=512, cha...
true
true
f7344a7f8c86b007aba6e7b603e7c9312336814c
10,179
py
Python
src/lib/models/networks/msra_resnet.py
jscsmk/CenterNet
d7c643bba2b373c15abfa3d25ffd5304a313fa49
[ "MIT" ]
null
null
null
src/lib/models/networks/msra_resnet.py
jscsmk/CenterNet
d7c643bba2b373c15abfa3d25ffd5304a313fa49
[ "MIT" ]
null
null
null
src/lib/models/networks/msra_resnet.py
jscsmk/CenterNet
d7c643bba2b373c15abfa3d25ffd5304a313fa49
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by Bin Xiao (Bin.Xiao@microsoft.com) # Modified by Xingyi Zhou # ------------------------------------------------------------------------------ from __future__ import a...
36.224199
94
0.558405
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import torch import torch.nn as nn import torch.utils.model_zoo as model_zoo BN_MOMENTUM = 0.1 model_urls = { 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', 'resn...
true
true
f7344d91646bee887a33588a68e2c919c555a5d1
106
py
Python
stack_overseer/question_monitor/apps.py
Superskyyy/StackOverseer
195f73d372c581d947e9f6ed0883b40a4a74062d
[ "MIT" ]
1
2020-08-14T16:33:10.000Z
2020-08-14T16:33:10.000Z
stack_overseer/question_monitor/apps.py
Superskyyy/StackOverseer
195f73d372c581d947e9f6ed0883b40a4a74062d
[ "MIT" ]
null
null
null
stack_overseer/question_monitor/apps.py
Superskyyy/StackOverseer
195f73d372c581d947e9f6ed0883b40a4a74062d
[ "MIT" ]
null
null
null
from django.apps import AppConfig class QuestionMonitorConfig(AppConfig): name = 'question_monitor'
17.666667
39
0.792453
from django.apps import AppConfig class QuestionMonitorConfig(AppConfig): name = 'question_monitor'
true
true
f7344e269516c6d5c79cfade85243463ddf17a6b
212
py
Python
pyamg/util/tests/test_warn.py
thomasjpfan/pyamg
b0904d31c8da0c29affcd7d0fcd2bb8cb910b42a
[ "MIT" ]
null
null
null
pyamg/util/tests/test_warn.py
thomasjpfan/pyamg
b0904d31c8da0c29affcd7d0fcd2bb8cb910b42a
[ "MIT" ]
null
null
null
pyamg/util/tests/test_warn.py
thomasjpfan/pyamg
b0904d31c8da0c29affcd7d0fcd2bb8cb910b42a
[ "MIT" ]
2
2022-01-03T00:20:22.000Z
2022-03-01T12:02:54.000Z
import warnings from numpy.testing import TestCase class TestWarn(TestCase): def test_f(self): warnings.filterwarnings("ignore", message="another warning") warnings.warn("another warning!")
23.555556
68
0.721698
import warnings from numpy.testing import TestCase class TestWarn(TestCase): def test_f(self): warnings.filterwarnings("ignore", message="another warning") warnings.warn("another warning!")
true
true
f7344e7b0bf68cc20035ce3b513932116c5a03cd
5,882
py
Python
pycommons/mqtt.py
jodabyte/bifrost
dfbfa85ceba30a8f540c1e110d44412771cc844f
[ "MIT" ]
null
null
null
pycommons/mqtt.py
jodabyte/bifrost
dfbfa85ceba30a8f540c1e110d44412771cc844f
[ "MIT" ]
null
null
null
pycommons/mqtt.py
jodabyte/bifrost
dfbfa85ceba30a8f540c1e110d44412771cc844f
[ "MIT" ]
null
null
null
import json import logging from typing import Any, Callable, List import paho.mqtt.client as mqtt from paho.mqtt.client import MQTTMessage, SubscribeOptions from paho.mqtt.properties import Properties from paho.mqtt.reasoncodes import PacketTypes, ReasonCodes class MqttClient: def __init__( self, ...
37.227848
269
0.617647
import json import logging from typing import Any, Callable, List import paho.mqtt.client as mqtt from paho.mqtt.client import MQTTMessage, SubscribeOptions from paho.mqtt.properties import Properties from paho.mqtt.reasoncodes import PacketTypes, ReasonCodes class MqttClient: def __init__( self, ...
true
true
f7344e9bd9127ea21b63d85bb7d004b5c061cfab
49,202
py
Python
python/src/chirpstack_api/as_pb/external/api/multicastGroup_pb2.py
wisang1999/chirpstack-api
905b310a883b2a27a5c6460d547c6eb7d92524e7
[ "MIT" ]
null
null
null
python/src/chirpstack_api/as_pb/external/api/multicastGroup_pb2.py
wisang1999/chirpstack-api
905b310a883b2a27a5c6460d547c6eb7d92524e7
[ "MIT" ]
null
null
null
python/src/chirpstack_api/as_pb/external/api/multicastGroup_pb2.py
wisang1999/chirpstack-api
905b310a883b2a27a5c6460d547c6eb7d92524e7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: chirpstack-api/as_pb/external/api/multicastGroup.proto from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.pr...
45.015554
5,094
0.78068
from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() from...
true
true
f7344ebc17b2922dc48ea522bcfbff576ca33829
319
py
Python
todo/urls.py
gleecoders/django-crash-course
2f565b6c9e599b5e5f3411058727b5fccbdbfa6d
[ "MIT" ]
null
null
null
todo/urls.py
gleecoders/django-crash-course
2f565b6c9e599b5e5f3411058727b5fccbdbfa6d
[ "MIT" ]
null
null
null
todo/urls.py
gleecoders/django-crash-course
2f565b6c9e599b5e5f3411058727b5fccbdbfa6d
[ "MIT" ]
null
null
null
from django.urls import path from .views import todo_list, todo_detail, todo_create, todo_update, todo_delete app_name = 'todos' urlpatterns = [ path('', todo_list), path('create/', todo_create), path('<id>/', todo_detail), path('<id>/update/', todo_update), path('<id>/delete/', todo_delete), ]
22.785714
80
0.667712
from django.urls import path from .views import todo_list, todo_detail, todo_create, todo_update, todo_delete app_name = 'todos' urlpatterns = [ path('', todo_list), path('create/', todo_create), path('<id>/', todo_detail), path('<id>/update/', todo_update), path('<id>/delete/', todo_delete), ]
true
true
f7344f57262cf26e28149aafdf8a6e25dc9a22d9
10,113
py
Python
src/blade/util.py
noanswer/blade-build
647921d283c101ee27edbc0fc27495e4fc5db35d
[ "BSD-3-Clause" ]
817
2015-01-06T02:43:58.000Z
2019-03-20T02:19:30.000Z
src/blade/util.py
salyty/blade-build
9d8c396ff2d27616369722410ec801e217bbcfd0
[ "BSD-3-Clause" ]
160
2015-01-08T06:16:54.000Z
2019-03-20T06:51:56.000Z
src/blade/util.py
salyty/blade-build
9d8c396ff2d27616369722410ec801e217bbcfd0
[ "BSD-3-Clause" ]
253
2015-01-04T17:02:30.000Z
2019-03-19T18:25:40.000Z
# Copyright (c) 2011 Tencent Inc. # All rights reserved. # # Author: Huan Yu <huanyu@tencent.com> # Feng chen <phongchen@tencent.com> # Yi Wang <yiwang@tencent.com> # Chong peng <michaelpeng@tencent.com> # Date: October 20, 2011 """ This is the util module which provides some helper function...
28.407303
126
0.641748
from __future__ import absolute_import from __future__ import print_function import ast import errno import fcntl import hashlib import inspect import json import os import signal import string import subprocess import sys import zipfile _IN_PY3 = sys.version_info[0] == 3 if _IN_PY3: import pickle else: ...
true
true
f734515e90618acecca23b18403af764db215dc5
1,684
py
Python
objifier/data_loader.py
1chimaruGin/Oject_classifier
d27ca8f47d2d0af107582c25a0756dda15361c2e
[ "Apache-2.0" ]
4
2020-08-19T14:50:29.000Z
2021-06-03T05:22:12.000Z
objifier/data_loader.py
1chimaruGin/Oject_classifier
d27ca8f47d2d0af107582c25a0756dda15361c2e
[ "Apache-2.0" ]
null
null
null
objifier/data_loader.py
1chimaruGin/Oject_classifier
d27ca8f47d2d0af107582c25a0756dda15361c2e
[ "Apache-2.0" ]
null
null
null
import torch from torchvision import datasets, transforms import os transform = { "train": transforms.Compose( [ transforms.RandomResizedCrop(224), transforms.RandomHorizontalFlip(), transforms.ToTensor(), transforms.Normalize( [0.4914, 0.4821...
25.134328
78
0.538599
import torch from torchvision import datasets, transforms import os transform = { "train": transforms.Compose( [ transforms.RandomResizedCrop(224), transforms.RandomHorizontalFlip(), transforms.ToTensor(), transforms.Normalize( [0.4914, 0.4821...
true
true