hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f720a75e584185882c002770a51c3e80de659a39
1,945
py
Python
src/slamcore_ros2_examples/python/slamcore_ros2_examples/xacro_file_contents.py
slamcore/slamcore-ros2-examples
f101a277d7bbf07e081b89ca8efb77110abc2110
[ "BSD-3-Clause" ]
1
2022-01-31T16:00:39.000Z
2022-01-31T16:00:39.000Z
src/slamcore_ros2_examples/python/slamcore_ros2_examples/xacro_file_contents.py
slamcore/slamcore-ros2-examples
f101a277d7bbf07e081b89ca8efb77110abc2110
[ "BSD-3-Clause" ]
null
null
null
src/slamcore_ros2_examples/python/slamcore_ros2_examples/xacro_file_contents.py
slamcore/slamcore-ros2-examples
f101a277d7bbf07e081b89ca8efb77110abc2110
[ "BSD-3-Clause" ]
null
null
null
"""Module for the XacroFile substitution class.""" from pathlib import Path from typing import Text, cast import xacro from launch.launch_context import LaunchContext from launch.some_substitutions_type import SomeSubstitutionsType from launch.substitution import Substitution from launch.substitutions import Substit...
36.018519
100
0.69563
from pathlib import Path from typing import Text, cast import xacro from launch.launch_context import LaunchContext from launch.some_substitutions_type import SomeSubstitutionsType from launch.substitution import Substitution from launch.substitutions import SubstitutionFailure from launch.utilities import normalize...
true
true
f720a8cc460fe602c10d1ad4a160e2c5c625a3d0
9,766
py
Python
cloud_provider/aws/aws_bid_advisor_test.py
mridhul/minion-manager
7301ac6360a82dfdd27e682d070c34e90f080149
[ "Apache-2.0" ]
54
2018-07-06T18:06:54.000Z
2019-06-03T15:21:01.000Z
cloud_provider/aws/aws_bid_advisor_test.py
mridhul/minion-manager
7301ac6360a82dfdd27e682d070c34e90f080149
[ "Apache-2.0" ]
28
2018-07-05T23:32:22.000Z
2019-07-19T17:19:26.000Z
cloud_provider/aws/aws_bid_advisor_test.py
mridhul/minion-manager
7301ac6360a82dfdd27e682d070c34e90f080149
[ "Apache-2.0" ]
15
2018-07-28T04:51:01.000Z
2019-07-30T14:50:25.000Z
"""The file has unit tests for the AWSBidAdvisor.""" import unittest from mock import patch, MagicMock import datetime from dateutil.tz import tzutc from cloud_provider.aws.aws_bid_advisor import AWSBidAdvisor REFRESH_INTERVAL = 10 REGION = 'us-west-2' MOCK_SPOT_PRICE={'NextToken': '', 'SpotPriceHistory': [{'Availabi...
57.111111
2,928
0.668646
import unittest from mock import patch, MagicMock import datetime from dateutil.tz import tzutc from cloud_provider.aws.aws_bid_advisor import AWSBidAdvisor REFRESH_INTERVAL = 10 REGION = 'us-west-2' MOCK_SPOT_PRICE={'NextToken': '', 'SpotPriceHistory': [{'AvailabilityZone': 'us-west-2b', 'InstanceType': 'm5.4xlarge'...
true
true
f720aa2b27c1b9f527f04697350eace8a44cc17c
214
py
Python
diypy3/tests/arr_stk.py
anqurvanillapy/diypy
56ced55011e95a19b7238992c2fc612b196ff17d
[ "CC0-1.0" ]
1
2015-12-08T10:35:21.000Z
2015-12-08T10:35:21.000Z
diypy3/tests/arr_stk.py
anqurvanillapy/diypy3
56ced55011e95a19b7238992c2fc612b196ff17d
[ "CC0-1.0" ]
null
null
null
diypy3/tests/arr_stk.py
anqurvanillapy/diypy3
56ced55011e95a19b7238992c2fc612b196ff17d
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """\ This script creates a stack array """ import diypy3 d = diypy3.Diypy3() arr_stk = (1, 2, 3, 4, 5) max_size = 100 inc = 10 d.array_stack(max_size, inc, arr_stk)
14.266667
37
0.635514
import diypy3 d = diypy3.Diypy3() arr_stk = (1, 2, 3, 4, 5) max_size = 100 inc = 10 d.array_stack(max_size, inc, arr_stk)
true
true
f720aae2cd32fb0ceac540aa226171b36ea197e1
9,383
py
Python
yandex/cloud/mdb/mysql/v1alpha/backup_service_pb2.py
kbespalov/python-sdk
e86563ee850e46a35b4c84053ecd4affdf66a963
[ "MIT" ]
null
null
null
yandex/cloud/mdb/mysql/v1alpha/backup_service_pb2.py
kbespalov/python-sdk
e86563ee850e46a35b4c84053ecd4affdf66a963
[ "MIT" ]
null
null
null
yandex/cloud/mdb/mysql/v1alpha/backup_service_pb2.py
kbespalov/python-sdk
e86563ee850e46a35b4c84053ecd4affdf66a963
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: yandex/cloud/mdb/mysql/v1alpha/backup_service.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 messag...
43.845794
1,281
0.775338
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 _sym_db ...
true
true
f720ac0decc8999fbcd4cf2a426c611b2bce56d7
2,029
py
Python
src/tm/tm2/tm2_meta/tmmelder.py
YouhuaLi/parsimony
d59fc49497c4c956c4a46f088adbbc65c40a3236
[ "MIT" ]
null
null
null
src/tm/tm2/tm2_meta/tmmelder.py
YouhuaLi/parsimony
d59fc49497c4c956c4a46f088adbbc65c40a3236
[ "MIT" ]
null
null
null
src/tm/tm2/tm2_meta/tmmelder.py
YouhuaLi/parsimony
d59fc49497c4c956c4a46f088adbbc65c40a3236
[ "MIT" ]
null
null
null
# This program melds together two Turing machines; # that is, if the first machine ends up in an "OUT" state, # this program outputs a TM where the out state of the first machine # is the start state of the second import sys import tmsim def alphabetMSToTS(): return ["a", "b"] def convertStatesToString(listOfSt...
30.742424
91
0.643174
import sys import tmsim def alphabetMSToTS(): return ["a", "b"] def convertStatesToString(listOfStates, output): numberOfStates = len(listOfStates) output.write("States: " + str(numberOfStates) + "\n") output.write("\n") statesIveAlreadyPrinted = {} for state in listOfStates: ...
false
true
f720ac11c40ba6b8dd0d3806ca655474e9e8841f
344
py
Python
convert/_3D/to/_1D.py
flew-software/Dem
20b7eb9bc7c11f1baf23acfe7bfbab359ddd97fb
[ "MIT" ]
1
2021-02-17T08:30:05.000Z
2021-02-17T08:30:05.000Z
convert/_3D/to/_1D.py
flew-software/Dem
20b7eb9bc7c11f1baf23acfe7bfbab359ddd97fb
[ "MIT" ]
null
null
null
convert/_3D/to/_1D.py
flew-software/Dem
20b7eb9bc7c11f1baf23acfe7bfbab359ddd97fb
[ "MIT" ]
null
null
null
def row_major(l: list) -> tuple[list, int]: """ converts a 2d list to a 1d list using row major algorithm and returns a 1d list and row count """ out = [] i = 0 while i < len(l): ii = 0 a = l[i] while ii < len(a): out.append(a[ii]) ii += 1 i += 1 ...
22.933333
105
0.479651
def row_major(l: list) -> tuple[list, int]: out = [] i = 0 while i < len(l): ii = 0 a = l[i] while ii < len(a): out.append(a[ii]) ii += 1 i += 1 return out, len(l)
true
true
f720ae0b4dc5919f8c14b48866a4d15a378b186e
2,887
py
Python
EDSR/common.py
NateLol/BAM_A_lightweight_but_efficient_Balanced_attention_mechanism_for_super_resolution
f23c043c6cd5c064e58b6b11bd7100fc55224702
[ "MIT" ]
33
2021-04-30T02:40:05.000Z
2022-03-09T09:35:49.000Z
EDSR/common.py
chisyliu/BAM_A_lightweight_but_efficient_Balanced_attention_mechanism_for_super_resolution
4c977ea1586e7836248acb5cbd648e124b43aca3
[ "MIT" ]
6
2021-05-10T23:19:35.000Z
2021-12-13T02:13:16.000Z
EDSR/common.py
chisyliu/BAM_A_lightweight_but_efficient_Balanced_attention_mechanism_for_super_resolution
4c977ea1586e7836248acb5cbd648e124b43aca3
[ "MIT" ]
13
2021-05-18T12:21:48.000Z
2022-01-21T07:17:19.000Z
import math import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable def default_conv(in_channels, out_channels, kernel_size, bias=True): return nn.Conv2d( in_channels, out_channels, kernel_size, padding=(kernel_size//2), bias=bias) clas...
33.569767
104
0.55594
import math import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable def default_conv(in_channels, out_channels, kernel_size, bias=True): return nn.Conv2d( in_channels, out_channels, kernel_size, padding=(kernel_size//2), bias=bias) clas...
true
true
f720ae8b8a42176cee5c72888875e04ea9be0096
749
py
Python
tests/hooks.py
j-mechacorta/atoolbox
900ad665f463d16911982dfadab7015cb95aa5ca
[ "MIT" ]
null
null
null
tests/hooks.py
j-mechacorta/atoolbox
900ad665f463d16911982dfadab7015cb95aa5ca
[ "MIT" ]
null
null
null
tests/hooks.py
j-mechacorta/atoolbox
900ad665f463d16911982dfadab7015cb95aa5ca
[ "MIT" ]
null
null
null
import os from os.path import dirname as _dir import logging def get_logger(name): return logging.getLogger('conftest.%s' % name) def pytest_sessionstart(session): BASE_FORMAT = "[%(name)s][%(levelname)-6s] %(message)s" FILE_FORMAT = "[%(asctime)s]" + BASE_FORMAT root_logger = logging.getLogger('con...
26.75
72
0.698264
import os from os.path import dirname as _dir import logging def get_logger(name): return logging.getLogger('conftest.%s' % name) def pytest_sessionstart(session): BASE_FORMAT = "[%(name)s][%(levelname)-6s] %(message)s" FILE_FORMAT = "[%(asctime)s]" + BASE_FORMAT root_logger = logging.getLogger('con...
true
true
f720ae996883f8afdc19851c7b8222b960cb4d67
389
py
Python
python-ds-practice/10_frequency/frequency.py
MostFunGuy/SpringboardProjectsPublic
bbda3ba26ecf8a09e62df81583122cae83acc1e6
[ "MIT" ]
null
null
null
python-ds-practice/10_frequency/frequency.py
MostFunGuy/SpringboardProjectsPublic
bbda3ba26ecf8a09e62df81583122cae83acc1e6
[ "MIT" ]
null
null
null
python-ds-practice/10_frequency/frequency.py
MostFunGuy/SpringboardProjectsPublic
bbda3ba26ecf8a09e62df81583122cae83acc1e6
[ "MIT" ]
null
null
null
def frequency(lst, search_term): """Return frequency of term in lst. >>> frequency([1, 4, 3, 4, 4], 4) 3 >>> frequency([1, 4, 3], 7) 0 """ return lst.count(search_term) print(F"frequency.py: frequency([1, 4, 3, 4, 4], 4) = `3` = {frequency([1, 4, 3, 4, 4], 4)}") print(F"freq...
35.363636
93
0.511568
def frequency(lst, search_term): return lst.count(search_term) print(F"frequency.py: frequency([1, 4, 3, 4, 4], 4) = `3` = {frequency([1, 4, 3, 4, 4], 4)}") print(F"frequency.py: frequency([1, 4, 3], 7) = `0` = {frequency([1, 4, 3], 7)}")
true
true
f720aeded9d52c0f3f6082dcb150a7020df5a4fb
107
py
Python
models/__init__.py
Abdulah-Fawaz/Benchmarking-Surface-DL
9693379f26d57f9aabf28b973f40a9f6f627d26f
[ "MIT" ]
2
2021-12-04T07:04:56.000Z
2021-12-13T16:28:50.000Z
models/__init__.py
Abdulah-Fawaz/Benchmarking-Surface-DL
9693379f26d57f9aabf28b973f40a9f6f627d26f
[ "MIT" ]
1
2021-12-21T09:36:11.000Z
2022-01-25T10:26:43.000Z
models/__init__.py
Abdulah-Fawaz/Benchmarking-Surface-DL
9693379f26d57f9aabf28b973f40a9f6f627d26f
[ "MIT" ]
1
2022-02-27T17:38:19.000Z
2022-02-27T17:38:19.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Nov 29 10:29:06 2020 @author: fa19 """
11.888889
35
0.588785
true
true
f720af0f5626dfcd589a2242cb387ffca059e40a
7,100
py
Python
querybook/server/models/admin.py
czgu/querybook
fb3120245cd9693b7aa67bf0f08d427fd2dde74b
[ "Apache-2.0" ]
1,144
2021-03-30T05:06:16.000Z
2022-03-31T10:40:31.000Z
querybook/server/models/admin.py
czgu/querybook
fb3120245cd9693b7aa67bf0f08d427fd2dde74b
[ "Apache-2.0" ]
100
2021-03-30T19:43:45.000Z
2022-03-25T17:29:32.000Z
querybook/server/models/admin.py
czgu/querybook
fb3120245cd9693b7aa67bf0f08d427fd2dde74b
[ "Apache-2.0" ]
113
2021-03-30T00:07:20.000Z
2022-03-31T07:18:43.000Z
import sqlalchemy as sql from sqlalchemy.orm import relationship, backref from app import db from const.admin import AdminOperation from const.db import ( name_length, now, description_length, # mediumtext_length, # text_length ) from lib.sqlalchemy import CRUDMixin Base = db.Base class Announc...
33.809524
88
0.647183
import sqlalchemy as sql from sqlalchemy.orm import relationship, backref from app import db from const.admin import AdminOperation from const.db import ( name_length, now, description_length, ) from lib.sqlalchemy import CRUDMixin Base = db.Base class Announcement(CRUDMixin, Base): __tab...
true
true
f720af70da7be7958d444ad2af3d0b7e0b2ef072
601
py
Python
basicsortings/SelectionSort.py
ankushdecoded123/basicalgorithms
f8d42a57d7619ddb29fd6eae9e5f2db27ee5712c
[ "Apache-2.0" ]
null
null
null
basicsortings/SelectionSort.py
ankushdecoded123/basicalgorithms
f8d42a57d7619ddb29fd6eae9e5f2db27ee5712c
[ "Apache-2.0" ]
null
null
null
basicsortings/SelectionSort.py
ankushdecoded123/basicalgorithms
f8d42a57d7619ddb29fd6eae9e5f2db27ee5712c
[ "Apache-2.0" ]
null
null
null
# selectionsort() method def selectionSort(arr): arraySize = len(arr) for i in range(arraySize): min = i for j in range(i+1, arraySize): if arr[j] < arr[min]: min = j #swap values arr[i], arr[min] = arr[min], arr[i] # method to print an array def printList(arr): for i in rang...
20.033333
39
0.55574
def selectionSort(arr): arraySize = len(arr) for i in range(arraySize): min = i for j in range(i+1, arraySize): if arr[j] < arr[min]: min = j arr[i], arr[min] = arr[min], arr[i] def printList(arr): for i in range(len(arr)): print(arr[i],end=" ") print("\n") ...
true
true
f720b19536007d90852dfc1229d07fda01236456
2,189
py
Python
functions/sample/python/main.py
aneeshmraj/agfzb-CloudAppDevelopment_Capstone
ed9b1a675a0c4325e56bf77ed4497a36d1755484
[ "Apache-2.0" ]
null
null
null
functions/sample/python/main.py
aneeshmraj/agfzb-CloudAppDevelopment_Capstone
ed9b1a675a0c4325e56bf77ed4497a36d1755484
[ "Apache-2.0" ]
null
null
null
functions/sample/python/main.py
aneeshmraj/agfzb-CloudAppDevelopment_Capstone
ed9b1a675a0c4325e56bf77ed4497a36d1755484
[ "Apache-2.0" ]
null
null
null
# # # main() will be run when you invoke this action # # @param Cloud Functions actions accept a single parameter, which must be a JSON object. # # @return The output of this action, which must be a JSON object. # # from cloudant.client import Cloudant from cloudant.error import CloudantException from cloudant.query im...
31.724638
90
0.643216
from cloudant.client import Cloudant from cloudant.error import CloudantException from cloudant.query import Query from requests import ConnectionError, ReadTimeout, RequestException import requests import sys def main(dict): print(dict) service = Cloudant.iam(None, dict["IAM_API_KEY"], url=dict["COUC...
true
true
f720b26349b04b5e0459f3b75168c72fe5c3ff77
5,299
py
Python
src/OFS/tests/test_Uninstalled.py
rbanffy/Zope
ecf6770219052e7c7f8c9634ddf187a1e6280742
[ "ZPL-2.1" ]
null
null
null
src/OFS/tests/test_Uninstalled.py
rbanffy/Zope
ecf6770219052e7c7f8c9634ddf187a1e6280742
[ "ZPL-2.1" ]
1
2020-11-11T07:11:31.000Z
2020-11-11T07:11:31.000Z
src/OFS/tests/test_Uninstalled.py
rbanffy/Zope
ecf6770219052e7c7f8c9634ddf187a1e6280742
[ "ZPL-2.1" ]
null
null
null
############################################################################## # # Copyright (c) 2006 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
35.804054
79
0.627854
true
true
f720b26c972d7bdb64501599e3be9253fa24774d
18,722
py
Python
python/ray/ml/tests/test_preprocessors.py
siddgoel/ray
7f3031f451de410b71a5fcb18e04452bfa7351d6
[ "Apache-2.0" ]
22
2018-05-08T05:52:34.000Z
2020-04-01T10:09:55.000Z
python/ray/ml/tests/test_preprocessors.py
siddgoel/ray
7f3031f451de410b71a5fcb18e04452bfa7351d6
[ "Apache-2.0" ]
51
2018-05-17T05:55:28.000Z
2020-03-18T06:49:49.000Z
python/ray/ml/tests/test_preprocessors.py
siddgoel/ray
7f3031f451de410b71a5fcb18e04452bfa7351d6
[ "Apache-2.0" ]
10
2018-04-27T10:50:59.000Z
2020-02-24T02:41:43.000Z
import warnings from unittest.mock import patch import numpy as np import pandas as pd import pytest import ray from ray.ml.preprocessor import PreprocessorNotFittedException from ray.ml.preprocessors import ( BatchMapper, StandardScaler, MinMaxScaler, OrdinalEncoder, OneHotEncoder, LabelEncod...
29.670365
84
0.626429
import warnings from unittest.mock import patch import numpy as np import pandas as pd import pytest import ray from ray.ml.preprocessor import PreprocessorNotFittedException from ray.ml.preprocessors import ( BatchMapper, StandardScaler, MinMaxScaler, OrdinalEncoder, OneHotEncoder, LabelEncod...
true
true
f720b26f06cbae99f40eb0f83633ea9c408ef321
5,737
py
Python
astro/plugins/_core.py
Lightyagami788/Astro-UB
cb2d8c76064c474ffd507e38421509f51918520f
[ "Apache-2.0" ]
null
null
null
astro/plugins/_core.py
Lightyagami788/Astro-UB
cb2d8c76064c474ffd507e38421509f51918520f
[ "Apache-2.0" ]
null
null
null
astro/plugins/_core.py
Lightyagami788/Astro-UB
cb2d8c76064c474ffd507e38421509f51918520f
[ "Apache-2.0" ]
1
2021-11-16T06:20:41.000Z
2021-11-16T06:20:41.000Z
import asyncio import os from datetime import datetime from pathlib import Path from telethon.tl.types import InputMessagesFilterDocument from astro.config import Config from astro import CMD_HELP from astro.utils import admin_cmd, load_module, remove_plugin NAME = Config.NAME DELETE_TIMEOUT = 5 thumb_image_path = "...
34.981707
124
0.599791
import asyncio import os from datetime import datetime from pathlib import Path from telethon.tl.types import InputMessagesFilterDocument from astro.config import Config from astro import CMD_HELP from astro.utils import admin_cmd, load_module, remove_plugin NAME = Config.NAME DELETE_TIMEOUT = 5 thumb_image_path = "...
true
true
f720b37866bd3fbd5203ac0faed5ee3a58cc01bc
317
py
Python
raspi/deskTimer.py
Itera/ariot2018
e83adc8ac4e788df09fe412dd57ce3aca966b99a
[ "MIT" ]
null
null
null
raspi/deskTimer.py
Itera/ariot2018
e83adc8ac4e788df09fe412dd57ce3aca966b99a
[ "MIT" ]
1
2018-03-15T15:04:10.000Z
2018-03-15T16:02:28.000Z
raspi/deskTimer.py
Itera/ariot2018
e83adc8ac4e788df09fe412dd57ce3aca966b99a
[ "MIT" ]
null
null
null
from threading import Timer class DeskTimer(object): current_timer = None def start(self, time, callback, *args): self.current_timer = Timer(time, callback, args) self.current_timer.start() def stop(self): if self.current_timer != None: self.current_timer.cancel()
24.384615
56
0.649842
from threading import Timer class DeskTimer(object): current_timer = None def start(self, time, callback, *args): self.current_timer = Timer(time, callback, args) self.current_timer.start() def stop(self): if self.current_timer != None: self.current_timer.cancel()
true
true
f720b3c07515379b83fea8c011c643547f776843
19,885
py
Python
perfkitbenchmarker/providers/rackspace/rackspace_virtual_machine.py
msidana/PerfKitBenchmarker
2784642d3e6b20b3f474c4e27edb1ef163804f66
[ "Apache-2.0" ]
1
2018-08-28T19:33:21.000Z
2018-08-28T19:33:21.000Z
perfkitbenchmarker/providers/rackspace/rackspace_virtual_machine.py
msidana/PerfKitBenchmarker
2784642d3e6b20b3f474c4e27edb1ef163804f66
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/providers/rackspace/rackspace_virtual_machine.py
msidana/PerfKitBenchmarker
2784642d3e6b20b3f474c4e27edb1ef163804f66
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
37.029795
80
0.692582
from __future__ import absolute_import from __future__ import division from __future__ import print_function from collections import OrderedDict import json import logging import re import tempfile from perfkitbenchmarker import errors from perfkitbenchmarker import flags from perfkitbenchmarker import l...
true
true
f720b4c65b03ffc9b7a16a20c28258f9373c712e
1,316
py
Python
app/modules/ssh.py
danielpodwysocki/zoltan
52536c41e95ca7b641d4e2b740f68c9e00170aee
[ "MIT" ]
null
null
null
app/modules/ssh.py
danielpodwysocki/zoltan
52536c41e95ca7b641d4e2b740f68c9e00170aee
[ "MIT" ]
null
null
null
app/modules/ssh.py
danielpodwysocki/zoltan
52536c41e95ca7b641d4e2b740f68c9e00170aee
[ "MIT" ]
null
null
null
import re import paramiko class Handler: ''' A slash command for checking ssh connectivity and rebooting machines. ''' id = 2 def __init__(self, regexp): ''' Takes a regexp as an argument, the regexp will then be used to check if the format of the hostname is correct ''' ...
32.097561
117
0.569149
import re import paramiko class Handler: id = 2 def __init__(self, regexp): self.prog = re.compile(regexp) def command(self, message): response = "Something went wrong :(" if not message: response = "Run `/ssh [machine's name]` to see if the machine is reachable" ...
true
true
f720b5b8dd20b02542407ce32d85af6fe11ca20b
29,285
py
Python
pyqstrat/account.py
alexanu/pyqstrat
ec62a1a7b048df05e8d1058a37bfe2cf113d2815
[ "BSD-3-Clause" ]
null
null
null
pyqstrat/account.py
alexanu/pyqstrat
ec62a1a7b048df05e8d1058a37bfe2cf113d2815
[ "BSD-3-Clause" ]
null
null
null
pyqstrat/account.py
alexanu/pyqstrat
ec62a1a7b048df05e8d1058a37bfe2cf113d2815
[ "BSD-3-Clause" ]
null
null
null
from collections import defaultdict from sortedcontainers import SortedDict import math import pandas as pd import numpy as np from pyqstrat.pq_types import ContractGroup, Trade, Contract from types import SimpleNamespace from typing import Sequence, Any, Tuple, Callable, Union, MutableSet, MutableSequence, MutableMapp...
50.753899
155
0.625337
from collections import defaultdict from sortedcontainers import SortedDict import math import pandas as pd import numpy as np from pyqstrat.pq_types import ContractGroup, Trade, Contract from types import SimpleNamespace from typing import Sequence, Any, Tuple, Callable, Union, MutableSet, MutableSequence, MutableMapp...
true
true
f720b5f3be28e969cd5ce5fed492f2e66b5c370c
881
py
Python
setup.py
bayjan/openrisknet_magkoufopoulou
b1ed6dea48d67243c9ac81eec59e5d7830ca68de
[ "MIT" ]
null
null
null
setup.py
bayjan/openrisknet_magkoufopoulou
b1ed6dea48d67243c9ac81eec59e5d7830ca68de
[ "MIT" ]
null
null
null
setup.py
bayjan/openrisknet_magkoufopoulou
b1ed6dea48d67243c9ac81eec59e5d7830ca68de
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Setup file for openrisknet_magkoufopoulou. This file was generated with PyScaffold 3.0.3. PyScaffold helps you to put up the scaffold of your new Python project. Learn more under: http://pyscaffold.org/ """ import sys from setuptools import setup # Ad...
26.69697
75
0.713961
import sys from setuptools import setup entry_points = """ [console_scripts] # script_name = openrisknet_magkoufopoulou.module:function # For example: # fibonacci = openrisknet_magkoufopoulou.skeleton:run """ def setup_package(): needs_sphinx = {'build_sphinx', 'upload_docs'}.intersection(sys.argv) sphin...
true
true
f720b71a384cd705368c6959d78e6566a4530fc2
349
py
Python
materials/sp20/hw/hw01/tests/q9.py
ds-modules/Deepnote-demo
548c12ced6cae774ecd0036aa1e8bb833af6472c
[ "BSD-3-Clause" ]
null
null
null
materials/sp20/hw/hw01/tests/q9.py
ds-modules/Deepnote-demo
548c12ced6cae774ecd0036aa1e8bb833af6472c
[ "BSD-3-Clause" ]
null
null
null
materials/sp20/hw/hw01/tests/q9.py
ds-modules/Deepnote-demo
548c12ced6cae774ecd0036aa1e8bb833af6472c
[ "BSD-3-Clause" ]
null
null
null
test = { 'name': 'q9', 'points': 1, 'suites': [ { 'cases': [ { 'code': r""" >>> survey == "2020 vision" True """, 'hidden': False, 'locked': False } ], 'scored': True, 'setup': '', 'teardown': '', '...
15.173913
37
0.312321
test = { 'name': 'q9', 'points': 1, 'suites': [ { 'cases': [ { 'code': r""" >>> survey == "2020 vision" True """, 'hidden': False, 'locked': False } ], 'scored': True, 'setup': '', 'teardown': '', '...
true
true
f720b75f54a9c131c4dcb67dc0dfaf8842c62e8e
31,745
py
Python
pwnlib/gdb.py
Ngugisenior/pwntools
c15afc592a94a5fd4c1255d2ce0137be38164a66
[ "MIT" ]
null
null
null
pwnlib/gdb.py
Ngugisenior/pwntools
c15afc592a94a5fd4c1255d2ce0137be38164a66
[ "MIT" ]
null
null
null
pwnlib/gdb.py
Ngugisenior/pwntools
c15afc592a94a5fd4c1255d2ce0137be38164a66
[ "MIT" ]
1
2019-12-07T10:45:52.000Z
2019-12-07T10:45:52.000Z
# -*- coding: utf-8 -*- """ During exploit development, it is frequently useful to debug the target binary under GDB. Pwntools makes this easy-to-do with a handful of helper routines, designed to make your exploit-debug-update cycles much faster. Useful Functions ---------------- - :func:`attach` - Attach to an exis...
31.587065
120
0.598834
""" During exploit development, it is frequently useful to debug the target binary under GDB. Pwntools makes this easy-to-do with a handful of helper routines, designed to make your exploit-debug-update cycles much faster. Useful Functions ---------------- - :func:`attach` - Attach to an existing process - :func:`d...
false
true
f720b7d1ae3ebf2758b3f637eac569a944ecce67
291
py
Python
utils/test_clear_data.py
M1d0r1/py_mantis
8d2b05601b9240e76e2e07b50770e39df5bcade9
[ "Apache-2.0" ]
null
null
null
utils/test_clear_data.py
M1d0r1/py_mantis
8d2b05601b9240e76e2e07b50770e39df5bcade9
[ "Apache-2.0" ]
null
null
null
utils/test_clear_data.py
M1d0r1/py_mantis
8d2b05601b9240e76e2e07b50770e39df5bcade9
[ "Apache-2.0" ]
null
null
null
import random def test_clear_projects_helper(app): while app.project.count()>0: app.project.navigate_to_manage_projects_page() old_projects = app.project.get_project_list() project = random.choice(old_projects) app.project.delete_by_name(project.name)
26.454545
54
0.725086
import random def test_clear_projects_helper(app): while app.project.count()>0: app.project.navigate_to_manage_projects_page() old_projects = app.project.get_project_list() project = random.choice(old_projects) app.project.delete_by_name(project.name)
true
true
f720b849c7ccaf49918d5f8db7e3b19f11f3203f
5,729
py
Python
tempest/api/compute/admin/test_servers_negative.py
rishabh20111990/tempest
df15531cd4231000b0da016f5cd8641523ce984e
[ "Apache-2.0" ]
2
2015-08-13T00:07:49.000Z
2020-08-07T06:38:44.000Z
tempest/api/compute/admin/test_servers_negative.py
rishabh20111990/tempest
df15531cd4231000b0da016f5cd8641523ce984e
[ "Apache-2.0" ]
1
2019-08-08T10:36:44.000Z
2019-08-09T05:58:23.000Z
tempest/api/compute/admin/test_servers_negative.py
rishabh20111990/tempest
df15531cd4231000b0da016f5cd8641523ce984e
[ "Apache-2.0" ]
5
2016-06-24T20:03:52.000Z
2020-02-05T10:14:54.000Z
# Copyright 2013 Huawei Technologies Co.,LTD. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
42.437037
78
0.64479
import testtools from tempest.api.compute import base from tempest.common import tempest_fixtures as fixtures from tempest.common import waiters from tempest import config from tempest.lib.common.utils import data_utils from tempest.lib import decorators from tempest.lib import exceptions as lib_exc CON...
true
true
f720b868a2e8693f457acc29e9d2ffcfcf7e2f08
2,174
py
Python
debug/ssd/test_ssd300.py
jjjkkkjjj/pytorch.dl
d82aa1191c14f328c62de85e391ac6fa1b4c7ee3
[ "MIT" ]
2
2021-02-06T22:40:13.000Z
2021-03-26T09:15:34.000Z
debug/ssd/test_ssd300.py
jjjkkkjjj/pytorch.dl
d82aa1191c14f328c62de85e391ac6fa1b4c7ee3
[ "MIT" ]
8
2020-07-11T07:10:51.000Z
2022-03-12T00:39:03.000Z
debug/ssd/test_ssd300.py
jjjkkkjjj/pytorch.dl
d82aa1191c14f328c62de85e391ac6fa1b4c7ee3
[ "MIT" ]
2
2021-03-26T09:19:42.000Z
2021-07-27T02:38:09.000Z
from dl.data.objdetn import datasets, utils, target_transforms from dl.data import transforms from dl.models.ssd.ssd300 import SSD300 from dl.data.utils.converter import toVisualizeRectLabelRGBimg from torch.utils.data import DataLoader import cv2 if __name__ == '__main__': augmentation = None transform = tr...
43.48
130
0.677553
from dl.data.objdetn import datasets, utils, target_transforms from dl.data import transforms from dl.models.ssd.ssd300 import SSD300 from dl.data.utils.converter import toVisualizeRectLabelRGBimg from torch.utils.data import DataLoader import cv2 if __name__ == '__main__': augmentation = None transform = tr...
true
true
f720b8bdd62f9180ca3b2885a9c8833bcd68eaf4
2,706
py
Python
obs.py
JTF4/cronicle-plugin-obs-studio
c3ccd0f0ffedd20b00052d1bcd3ddb8c53b8144f
[ "MIT" ]
null
null
null
obs.py
JTF4/cronicle-plugin-obs-studio
c3ccd0f0ffedd20b00052d1bcd3ddb8c53b8144f
[ "MIT" ]
null
null
null
obs.py
JTF4/cronicle-plugin-obs-studio
c3ccd0f0ffedd20b00052d1bcd3ddb8c53b8144f
[ "MIT" ]
1
2021-06-29T13:09:16.000Z
2021-06-29T13:09:16.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: David Stevens import sys import time import json import logging logging.basicConfig(level=logging.INFO) sys.path.append('../') from obswebsocket import obsws, requests # noqa: E402 stdinput = sys.stdin.readline() data = json.loads(stdinput) try: host =...
31.465116
82
0.603843
import sys import time import json import logging logging.basicConfig(level=logging.INFO) sys.path.append('../') from obswebsocket import obsws, requests stdinput = sys.stdin.readline() data = json.loads(stdinput) try: host = data['params']['host'] port = data['params']['port'] password = data['p...
false
true
f720b9d8103adc5ec7d583ef9b481eed71f4b5ce
4,118
py
Python
cinder/api/v3/backups.py
hashsos/hashcloudos-cinder
6d8b648399e2160b419e3f9535eb520c7de9120e
[ "Apache-2.0" ]
null
null
null
cinder/api/v3/backups.py
hashsos/hashcloudos-cinder
6d8b648399e2160b419e3f9535eb520c7de9120e
[ "Apache-2.0" ]
null
null
null
cinder/api/v3/backups.py
hashsos/hashcloudos-cinder
6d8b648399e2160b419e3f9535eb520c7de9120e
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2016 Intel, 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 ...
37.099099
78
0.674114
from oslo_log import log as logging from webob import exc from cinder.api.contrib import backups as backups_v2 from cinder.api import microversions as mv from cinder.api.openstack import wsgi from cinder.api.v3.views import backups as backup_views from cinder import exception from cinder.i18n import _ ...
true
true
f720ba2b3e7006741b82f2fe08ab0e27de7bf237
8,422
py
Python
discordware/_vendors/hype/parser.py
znqi/discordware
e456bf7b0314ef8f29fabb9fa69f8c979f34d655
[ "MIT" ]
13
2021-07-31T12:07:06.000Z
2022-03-24T15:00:50.000Z
discordware/_vendors/hype/parser.py
znqi/discordware
e456bf7b0314ef8f29fabb9fa69f8c979f34d655
[ "MIT" ]
2
2021-08-02T14:04:58.000Z
2021-09-06T09:35:20.000Z
discordware/_vendors/hype/parser.py
znqi/discordware
e456bf7b0314ef8f29fabb9fa69f8c979f34d655
[ "MIT" ]
3
2021-08-07T13:23:54.000Z
2022-01-24T13:23:08.000Z
# Copyright (c) 2021, Serum Studio # 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, mer...
31.425373
92
0.572786
from typing import List from hype.command import HypeCommand import optparse from optparse import HelpFormatter import sys import textwrap class HypeParser(optparse.OptionParser): _HelpCommand = HypeCommand('help', help="All details about the commands", aliases=('?')) def __init__( ...
true
true
f720ba72a3c86311008ec04f4371a49d7784b17c
433
py
Python
xlwt/__init__.py
drmelectronic/MIT
e28a82cd02dcc52ac233b89b43f29ede00993d11
[ "MIT" ]
292
2015-09-12T14:19:32.000Z
2022-02-19T08:46:12.000Z
xlwt/__init__.py
drmelectronic/MIT
e28a82cd02dcc52ac233b89b43f29ede00993d11
[ "MIT" ]
4
2015-11-18T08:10:14.000Z
2017-03-25T13:32:20.000Z
xlwt/__init__.py
drmelectronic/MIT
e28a82cd02dcc52ac233b89b43f29ede00993d11
[ "MIT" ]
131
2015-09-14T06:32:03.000Z
2021-06-11T02:31:38.000Z
# -*- coding: windows-1252 -*- __VERSION__ = '0.7.4' import sys if sys.version_info[:2] < (2, 3): print >> sys.stderr, "Sorry, xlwt requires Python 2.3 or later" sys.exit(1) from Workbook import Workbook from Worksheet import Worksheet from Row import Row from Column import Column from Formatting import Font...
25.470588
68
0.741339
__VERSION__ = '0.7.4' import sys if sys.version_info[:2] < (2, 3): print >> sys.stderr, "Sorry, xlwt requires Python 2.3 or later" sys.exit(1) from Workbook import Workbook from Worksheet import Worksheet from Row import Row from Column import Column from Formatting import Font, Alignment, Borders, Pattern,...
true
true
f720bb34265c748c8a67a6a2025eb32ff567dad4
773
py
Python
src/tools/reshape.py
Lin-Lei/CenterNet
0778dfcf4fb8e5b013dda7ab8c680f232ca851b1
[ "MIT" ]
null
null
null
src/tools/reshape.py
Lin-Lei/CenterNet
0778dfcf4fb8e5b013dda7ab8c680f232ca851b1
[ "MIT" ]
null
null
null
src/tools/reshape.py
Lin-Lei/CenterNet
0778dfcf4fb8e5b013dda7ab8c680f232ca851b1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Aug 23 16:06:35 2018 @author: libo """ from PIL import Image import os def image_resize(image_path, new_path): # 统一图片尺寸 print('============>>修改图片尺寸') for img_name in os.listdir(image_path): img_path = image_path + "/" + img_name # 获取该图片全称 image = Im...
30.92
74
0.635188
from PIL import Image import os def image_resize(image_path, new_path): print('============>>修改图片尺寸') for img_name in os.listdir(image_path): img_path = image_path + "/" + img_name image = Image.open(img_path) image = image.resize((512, 512)) image.save(new_pa...
true
true
f720bb35e7c423bcec868b5f5d320bcd94913cfe
4,506
py
Python
mturk/make_quiz.py
genp/flask_mturk
83e22c7dfada6d35e52458582291997964182628
[ "MIT" ]
null
null
null
mturk/make_quiz.py
genp/flask_mturk
83e22c7dfada6d35e52458582291997964182628
[ "MIT" ]
null
null
null
mturk/make_quiz.py
genp/flask_mturk
83e22c7dfada6d35e52458582291997964182628
[ "MIT" ]
null
null
null
import json from app import db from app.models import * from utils import utils # turn annotation labels by hit X into a quiz Job def annotation_to_quiz(hit_id, alt_hit_id, quiz_label): ''' hit_id and alt_hit_id should be for the same task. hit_id has the strictly correct answers and alt_hit_id has possibly co...
34.136364
131
0.622947
import json from app import db from app.models import * from utils import utils def annotation_to_quiz(hit_id, alt_hit_id, quiz_label): ''' hit_id and alt_hit_id should be for the same task. hit_id has the strictly correct answers and alt_hit_id has possibly correct. ''' anns = utils.get_all_db_res('s...
false
true
f720bb687d0f99c146065e48003e17cc75396b8a
2,926
py
Python
applications/classification/evaluate_multiclass_labels.py
ShankarNara/shogun
8ab196de16b8d8917e5c84770924c8d0f5a3d17c
[ "BSD-3-Clause" ]
2,753
2015-01-02T11:34:13.000Z
2022-03-25T07:04:27.000Z
applications/classification/evaluate_multiclass_labels.py
ShankarNara/shogun
8ab196de16b8d8917e5c84770924c8d0f5a3d17c
[ "BSD-3-Clause" ]
2,404
2015-01-02T19:31:41.000Z
2022-03-09T10:58:22.000Z
applications/classification/evaluate_multiclass_labels.py
ShankarNara/shogun
8ab196de16b8d8917e5c84770924c8d0f5a3d17c
[ "BSD-3-Clause" ]
1,156
2015-01-03T01:57:21.000Z
2022-03-26T01:06:28.000Z
#!/usr/bin/env python # Copyright (c) The Shogun Machine Learning Toolbox # Written (w) 2014 Daniel Pyrathon # 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...
40.082192
82
0.774778
import argparse import logging import numpy as np from shogun import (LibSVMFile, MulticlassLabels, MulticlassAccuracy) from utils import get_features_and_labels LOGGER = logging.getLogger(__file__) def parse_arguments(): parser = argparse.ArgumentParser(description="Evaluate predicted...
false
true
f720bbb8b5465f2391f8ff3bd20b2b9312393ba6
5,112
py
Python
BlindTest/display.py
smart-fun/Raspberry
e2ac8caff2732786bc51a7c5ab64507e7a9a8fac
[ "Apache-2.0" ]
null
null
null
BlindTest/display.py
smart-fun/Raspberry
e2ac8caff2732786bc51a7c5ab64507e7a9a8fac
[ "Apache-2.0" ]
null
null
null
BlindTest/display.py
smart-fun/Raspberry
e2ac8caff2732786bc51a7c5ab64507e7a9a8fac
[ "Apache-2.0" ]
null
null
null
import pygame as pg import pygame_widgets as pw from math import sin, cos SCREEN_WIDTH = 640 SCREEN_HEIGHT = 480 WHITE = (255,255,255) YELLOW = (220,220,0) RED = (220,0,0) GREY = (180,180,180) BLACK = (0,0,0) GREEN = (0,200,0) BUTTON_COLOR = (0,0,220) BUTTON_HOVER_COLOR = GREEN BUTTON_PRESS_COLOR = (0,100,0) def cr...
28.719101
101
0.635759
import pygame as pg import pygame_widgets as pw from math import sin, cos SCREEN_WIDTH = 640 SCREEN_HEIGHT = 480 WHITE = (255,255,255) YELLOW = (220,220,0) RED = (220,0,0) GREY = (180,180,180) BLACK = (0,0,0) GREEN = (0,200,0) BUTTON_COLOR = (0,0,220) BUTTON_HOVER_COLOR = GREEN BUTTON_PRESS_COLOR = (0,100,0) def cr...
true
true
f720bbc6a4f8599443bb6753b941ccb39af1e390
647
py
Python
merchant/migrations/0001_initial.py
Pesenin-Team/pesenin
6b3dcc84e6e48768ce231ffedc43c56981fc6606
[ "MIT" ]
4
2019-10-15T12:35:15.000Z
2019-10-16T12:38:51.000Z
merchant/migrations/0001_initial.py
Pesenin-Team/pesenin
6b3dcc84e6e48768ce231ffedc43c56981fc6606
[ "MIT" ]
null
null
null
merchant/migrations/0001_initial.py
Pesenin-Team/pesenin
6b3dcc84e6e48768ce231ffedc43c56981fc6606
[ "MIT" ]
null
null
null
# Generated by Django 2.2.6 on 2019-10-17 10:38 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Merchant', fields=[ ('id', ...
26.958333
115
0.55796
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Merchant', fields=[ ('id', models.AutoField(auto_created=True, primary_key=...
true
true
f720bbea22a5dbf7c0ffdeeda3c286344fc9500b
12,806
py
Python
protonvpn-applet.py
seadanda/protonvpn-applet
f32978192f523ed8ee661d200c508b221e0ffccd
[ "MIT" ]
15
2019-09-13T07:11:52.000Z
2021-05-23T10:13:57.000Z
protonvpn-applet.py
seadanda/pvpn-applet
f32978192f523ed8ee661d200c508b221e0ffccd
[ "MIT" ]
11
2019-11-26T12:08:20.000Z
2020-10-24T13:08:24.000Z
protonvpn-applet.py
seadanda/pvpn-applet
f32978192f523ed8ee661d200c508b221e0ffccd
[ "MIT" ]
2
2019-11-24T00:44:55.000Z
2020-06-28T20:31:42.000Z
#!/usr/bin/env python3 import sys import subprocess import functools from enum import Enum import gi gi.require_version('Notify', '0.7') from gi.repository import Notify from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, QSystemTrayIcon, QMenu, QAction, qApp, QMessageBox from PyQt5.QtCore import QSize, QT...
33.878307
119
0.679291
import sys import subprocess import functools from enum import Enum import gi gi.require_version('Notify', '0.7') from gi.repository import Notify from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, QSystemTrayIcon, QMenu, QAction, qApp, QMessageBox from PyQt5.QtCore import QSize, QThread, pyqtSignal from...
true
true
f720bbec31bcc03b0a76267cc6d1919b2116ffc8
3,982
py
Python
pygraphblas/demo/dnn.py
szarnyasg/pygraphblas
7465ef6fcc77c9901869b70ddf1d77a86570c336
[ "Apache-2.0" ]
null
null
null
pygraphblas/demo/dnn.py
szarnyasg/pygraphblas
7465ef6fcc77c9901869b70ddf1d77a86570c336
[ "Apache-2.0" ]
null
null
null
pygraphblas/demo/dnn.py
szarnyasg/pygraphblas
7465ef6fcc77c9901869b70ddf1d77a86570c336
[ "Apache-2.0" ]
null
null
null
import os from functools import wraps, partial from time import time from statistics import mean from pathlib import Path from pygraphblas import * from multiprocessing.pool import ThreadPool from multiprocessing import cpu_count NFEATURES = 60000 BIAS = {1024: -0.3, 4096: -0.35, 16384: -0.4, 65536: -0.45} def timing...
30.396947
76
0.594927
import os from functools import wraps, partial from time import time from statistics import mean from pathlib import Path from pygraphblas import * from multiprocessing.pool import ThreadPool from multiprocessing import cpu_count NFEATURES = 60000 BIAS = {1024: -0.3, 4096: -0.35, 16384: -0.4, 65536: -0.45} def timing...
true
true
f720bca64500834838fa25d7053779b0ff0a3d49
1,252
py
Python
backend/server.py
ryzbaka/Niyuddha
ca54a5c79b8e733aca494f996f05c10ef5cf4950
[ "MIT" ]
null
null
null
backend/server.py
ryzbaka/Niyuddha
ca54a5c79b8e733aca494f996f05c10ef5cf4950
[ "MIT" ]
null
null
null
backend/server.py
ryzbaka/Niyuddha
ca54a5c79b8e733aca494f996f05c10ef5cf4950
[ "MIT" ]
null
null
null
from flask import Flask,jsonify,request import os from subprocess import PIPE,Popen app = Flask(__name__) @app.route("/",methods=["GET"]) def home(): return "Working" @app.route("/sendcode",methods=["POST"]) def sendCode(): print(request.json) owd = os.getcwd() # chdir into this once done executing. u...
36.823529
105
0.682907
from flask import Flask,jsonify,request import os from subprocess import PIPE,Popen app = Flask(__name__) @app.route("/",methods=["GET"]) def home(): return "Working" @app.route("/sendcode",methods=["POST"]) def sendCode(): print(request.json) owd = os.getcwd() username = request.json['username'] ...
true
true
f720bcd371ce68d744f5e4f9a76e113f3947b3e5
3,220
py
Python
pyrasterframes/src/main/python/pyrasterframes/rf_context.py
mjohns-databricks/rasterframes
44f40726b79e4b3600d6990b73c815b6f891be07
[ "Apache-2.0" ]
180
2018-03-21T13:34:08.000Z
2022-03-19T03:31:24.000Z
pyrasterframes/src/main/python/pyrasterframes/rf_context.py
mjohns-databricks/rasterframes
44f40726b79e4b3600d6990b73c815b6f891be07
[ "Apache-2.0" ]
442
2018-05-02T13:14:35.000Z
2022-03-28T21:49:58.000Z
pyrasterframes/src/main/python/pyrasterframes/rf_context.py
mjohns-databricks/rasterframes
44f40726b79e4b3600d6990b73c815b6f891be07
[ "Apache-2.0" ]
45
2018-05-03T13:46:04.000Z
2022-01-30T23:16:00.000Z
# # This software is licensed under the Apache 2 license, quoted below. # # Copyright 2019 Astraea, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # [http://www.apache.org/licenses/LI...
32.525253
117
0.684472
from pyspark import SparkContext from pyspark.sql import SparkSession from typing import Any, List from py4j.java_gateway import JavaMember from py4j.java_collections import JavaList, JavaMap from typing import Tuple __all__ = ['RFContext'] class RFContext(object): def __init__(self, spark_...
true
true
f720bd0c2b5ca565bfafb6e86a7b848c423f5997
686
py
Python
tests/scrubber/test_scrubber.py
scottkleinman/lexos
d362ddd05ef23b5173ce303eb7b08ff3583ac709
[ "MIT" ]
null
null
null
tests/scrubber/test_scrubber.py
scottkleinman/lexos
d362ddd05ef23b5173ce303eb7b08ff3583ac709
[ "MIT" ]
null
null
null
tests/scrubber/test_scrubber.py
scottkleinman/lexos
d362ddd05ef23b5173ce303eb7b08ff3583ac709
[ "MIT" ]
null
null
null
"""test_scrubber.py.""" # Import a minimal text loader class, the functions for scrubber pipelines, # and the scrubber function registry from lexos.io.basic import Loader from lexos.scrubber.pipeline import make_pipeline from lexos.scrubber.registry import scrubber_components from lexos.scrubber.scrubber import Scrubb...
26.384615
75
0.781341
from lexos.io.basic import Loader from lexos.scrubber.pipeline import make_pipeline from lexos.scrubber.registry import scrubber_components from lexos.scrubber.scrubber import Scrubber data = "tests/test_data/Austen_Pride.txt" loader = Loader() loader.load(data) text = loader.texts[0] lower_case = scrubber_compon...
true
true
f720be44decd15c1c50cc613e248b09f157857d5
335
py
Python
resources/ai/swagger/__init__.py
GMKrieger/ai_api
9ed661d29afb3232b7930727d056abdedfb91b43
[ "MIT" ]
null
null
null
resources/ai/swagger/__init__.py
GMKrieger/ai_api
9ed661d29afb3232b7930727d056abdedfb91b43
[ "MIT" ]
10
2020-01-28T22:15:24.000Z
2021-04-30T20:36:27.000Z
resources/ai/swagger/__init__.py
GMKrieger/ai_api
9ed661d29afb3232b7930727d056abdedfb91b43
[ "MIT" ]
null
null
null
""" swagger module - A package defining the swagger features. This module creates the swagger structure and defines the data to show when the swagger is activated. It does not contain the html and css files used to create the page, only the underlying structure. The html and css can be found at the sta...
41.875
86
0.746269
true
true
f720bf58d889e6191c183282ec836d74afba0701
704
py
Python
tools/mo/openvino/tools/mo/front/caffe/grn_ext.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
1
2019-09-22T01:05:07.000Z
2019-09-22T01:05:07.000Z
tools/mo/openvino/tools/mo/front/caffe/grn_ext.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
58
2020-11-06T12:13:45.000Z
2022-03-28T13:20:11.000Z
tools/mo/openvino/tools/mo/front/caffe/grn_ext.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
2
2021-07-14T07:40:50.000Z
2021-07-27T01:40:03.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 from openvino.tools.mo.ops.grn import GRNOp from openvino.tools.mo.front.caffe.collect_attributes import merge_attrs from openvino.tools.mo.front.extractor import FrontExtractorOp class GRNFrontExtractor(FrontExtractorOp): op = 'GR...
26.074074
72
0.693182
from openvino.tools.mo.ops.grn import GRNOp from openvino.tools.mo.front.caffe.collect_attributes import merge_attrs from openvino.tools.mo.front.extractor import FrontExtractorOp class GRNFrontExtractor(FrontExtractorOp): op = 'GRN' enabled = True @classmethod def extract(cls, node): prot...
true
true
f720bf66d4521a60fee34b616ef7d1b5989d5e01
256
py
Python
code/learn-AI/matplotlib/graph/sigmoid_function.py
lsieun/learn-AI
0a164bc2e6317de3aa03c747c0e6f15d93e7f49a
[ "Apache-2.0" ]
1
2019-03-27T23:22:44.000Z
2019-03-27T23:22:44.000Z
code/learn-AI/matplotlib/graph/sigmoid_function.py
lsieun/learn-AI
0a164bc2e6317de3aa03c747c0e6f15d93e7f49a
[ "Apache-2.0" ]
null
null
null
code/learn-AI/matplotlib/graph/sigmoid_function.py
lsieun/learn-AI
0a164bc2e6317de3aa03c747c0e6f15d93e7f49a
[ "Apache-2.0" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt def func(x): return 1 / (1 + np.exp(-x)) # Return evenly spaced numbers over a specified interval. xdata = np.linspace(-8, 8, 960,endpoint=True) ydata = func(xdata) plt.plot(xdata,ydata) plt.show()
19.692308
57
0.707031
import numpy as np import matplotlib.pyplot as plt def func(x): return 1 / (1 + np.exp(-x)) xdata = np.linspace(-8, 8, 960,endpoint=True) ydata = func(xdata) plt.plot(xdata,ydata) plt.show()
true
true
f720bf6a9fb2642c27030209f924c321a1edff82
3,343
py
Python
DownData/Link_down.py
Max-astro/A2Project
5d40263742133f214936b06b622d08092e694aed
[ "MIT" ]
null
null
null
DownData/Link_down.py
Max-astro/A2Project
5d40263742133f214936b06b622d08092e694aed
[ "MIT" ]
null
null
null
DownData/Link_down.py
Max-astro/A2Project
5d40263742133f214936b06b622d08092e694aed
[ "MIT" ]
null
null
null
import requests import sys import h5py import numpy as np import os def get(path, params=None, savedir=None): # make HTTP GET request to path headers = {"api-key":"27d44ba55cd115b10f2dd9153589aff0"} r = requests.get(path, params=params, headers=headers) # raise exception if response code is...
29.324561
180
0.597368
import requests import sys import h5py import numpy as np import os def get(path, params=None, savedir=None): headers = {"api-key":"27d44ba55cd115b10f2dd9153589aff0"} r = requests.get(path, params=params, headers=headers) r.raise_for_status() if r.headers['content-type'] == 'app...
true
true
f720bf86d570b0fdfb0907c0f3e9814300ec73f6
15,954
py
Python
aphla/gui/qrangeslider.py
NSLS-II/aphla
ceb5410dc836a8fb16321b6dc5e10d442be765c5
[ "BSD-3-Clause" ]
null
null
null
aphla/gui/qrangeslider.py
NSLS-II/aphla
ceb5410dc836a8fb16321b6dc5e10d442be765c5
[ "BSD-3-Clause" ]
1
2020-02-17T18:56:18.000Z
2020-02-20T17:06:20.000Z
aphla/gui/qrangeslider.py
NSLS-II/aphla
ceb5410dc836a8fb16321b6dc5e10d442be765c5
[ "BSD-3-Clause" ]
1
2021-03-08T16:07:11.000Z
2021-03-08T16:07:11.000Z
#!/usr/bin/env python # ------------------------------------------------------------------------------ # Copyright (c) 2011-2012, Ryan Galloway (ryan@rsgalloway.com) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # ...
31.529644
109
0.573587
__author__ = "Ryan Galloway <ryan@rsgalloway.com>" __version__ = "0.1" import os import sys from PyQt4 import QtCore from PyQt4 import QtGui from PyQt4 import uic try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: _fromUtf8 = lambda s: s __all__ = ...
true
true
f720c1aa5ab9a0a14470949b5e358729876b9eb7
11,985
py
Python
solar_monitor.py
weidnerm/solar_data_monitor
48bcf9b45ab911bdb7af3dff17d28c8f16d2c925
[ "MIT" ]
null
null
null
solar_monitor.py
weidnerm/solar_data_monitor
48bcf9b45ab911bdb7af3dff17d28c8f16d2c925
[ "MIT" ]
null
null
null
solar_monitor.py
weidnerm/solar_data_monitor
48bcf9b45ab911bdb7af3dff17d28c8f16d2c925
[ "MIT" ]
null
null
null
#!/usr/bin/python from Subfact_ina219 import INA219 import time import os import glob import Tkinter as tk import math import copy from OneFifo import OneFifo import json import socket import select from SolarMonitor import SolarMonitor from SolarSensors import SolarSensors from SolarServer import SolarServer from S...
36.876923
413
0.596996
from Subfact_ina219 import INA219 import time import os import glob import Tkinter as tk import math import copy from OneFifo import OneFifo import json import socket import select from SolarMonitor import SolarMonitor from SolarSensors import SolarSensors from SolarServer import SolarServer from SolarDb import Sol...
false
true
f720c25b3abb18927b7fd60019577787312ad4c2
3,406
py
Python
backend/remap/predictors.py
hugocalcad/remap_rev
fa435784f897b7f4186b8ff703b3e08f48160b9f
[ "Apache-2.0" ]
17
2018-08-30T22:46:47.000Z
2021-12-23T08:19:50.000Z
backend/remap/predictors.py
red-list-ecosystem/REMAP
e1e60c56dad76dc1927af5f24a30cb28144a91c8
[ "Apache-2.0" ]
3
2019-11-01T13:58:19.000Z
2021-03-11T10:21:51.000Z
backend/remap/predictors.py
hugocalcad/remap_rev
fa435784f897b7f4186b8ff703b3e08f48160b9f
[ "Apache-2.0" ]
2
2017-11-29T02:40:03.000Z
2017-12-20T22:00:37.000Z
predictors = [ { "description": "todo", "long_name": "Normalised Difference Vegetation index", "short_name": "NDVI", "type": "Index", "ee_import": 'LANDSAT/LC8_SR', "checked": True, "vis": True, "ramp": '000000, 00FF00' }, { "descriptio...
26
62
0.491486
predictors = [ { "description": "todo", "long_name": "Normalised Difference Vegetation index", "short_name": "NDVI", "type": "Index", "ee_import": 'LANDSAT/LC8_SR', "checked": True, "vis": True, "ramp": '000000, 00FF00' }, { "descriptio...
true
true
f720c41c798b6b469d19eb94e5aad777e60b831a
2,865
py
Python
getListOfEvents.py
chiara-rizzi/Optimization
6dd5bfcfc74d3cf7e90e313f107a4b1c414a6219
[ "MIT" ]
3
2017-03-25T00:38:14.000Z
2018-03-13T15:05:38.000Z
getListOfEvents.py
chiara-rizzi/Optimization
6dd5bfcfc74d3cf7e90e313f107a4b1c414a6219
[ "MIT" ]
21
2017-01-13T03:29:52.000Z
2019-09-10T01:27:17.000Z
getListOfEvents.py
chiara-rizzi/Optimization
6dd5bfcfc74d3cf7e90e313f107a4b1c414a6219
[ "MIT" ]
7
2017-03-25T00:38:00.000Z
2021-04-07T04:31:25.000Z
from optimize import logger, get_ttree, selection_to_branches, tree_get_branches, cuts_to_selection import json import root_numpy as rnp import glob import itertools import numexpr as ne import numpy as np import os from collections import defaultdict skipRegions = ["old", "SR", "VR0"] regions = sorted([region for re...
42.761194
187
0.722164
from optimize import logger, get_ttree, selection_to_branches, tree_get_branches, cuts_to_selection import json import root_numpy as rnp import glob import itertools import numexpr as ne import numpy as np import os from collections import defaultdict skipRegions = ["old", "SR", "VR0"] regions = sorted([region for re...
false
true
f720c4b0ba8a3112b5e4c2e356fdfa9e370b254c
11,793
py
Python
test/unit/mongo_class/server_connect.py
mjpernot/mongo-lib
be8aa4f0cbf7fdf475bf67c07df813ffc560c3ef
[ "MIT" ]
null
null
null
test/unit/mongo_class/server_connect.py
mjpernot/mongo-lib
be8aa4f0cbf7fdf475bf67c07df813ffc560c3ef
[ "MIT" ]
null
null
null
test/unit/mongo_class/server_connect.py
mjpernot/mongo-lib
be8aa4f0cbf7fdf475bf67c07df813ffc560c3ef
[ "MIT" ]
null
null
null
#!/usr/bin/python # Classification (U) """Program: server_connect.py Description: Unit testing of Server.connect in mongo_class.py. Usage: test/unit/mongo_class/server_connect.py Arguments: """ # Libraries and Global Variables # Standard import sys import os if sys.version_info < (2, 7): ...
27.425581
78
0.620114
import sys import os if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest import mock sys.path.append(os.getcwd()) import mongo_class import version __version__ = version.__version__ class UnitTest(unittest.TestCase): def setUp(self): self.name = "Mongo...
true
true
f720c55c567a173b520fcbc4127c246b39b6746f
8,696
py
Python
tests/python/contrib/test_ethosn/test_networks.py
BaldLee/tvm
b53472c7b6afa34260afeffc5f088591352c58c3
[ "Apache-2.0" ]
10
2019-03-09T07:51:56.000Z
2021-09-14T03:06:20.000Z
tests/python/contrib/test_ethosn/test_networks.py
BaldLee/tvm
b53472c7b6afa34260afeffc5f088591352c58c3
[ "Apache-2.0" ]
9
2021-10-20T13:48:52.000Z
2021-12-09T07:14:24.000Z
tests/python/contrib/test_ethosn/test_networks.py
BaldLee/tvm
b53472c7b6afa34260afeffc5f088591352c58c3
[ "Apache-2.0" ]
5
2020-11-13T19:26:25.000Z
2022-01-25T07:55:16.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
39.171171
100
0.700092
import pytest pytest.importorskip("tflite") pytest.importorskip("tensorflow") from tvm import relay from tvm.testing import requires_ethosn from tvm.contrib import download from tvm.testing import requires_ethosn import tvm.relay.testing.tf as tf_testing import tflite.Model from . import infrastruc...
true
true
f720c5e752d2911c7077e24ef935f054b6818fb0
6,799
py
Python
source/Mlos.Python/mlos/Optimizers/RegressionModels/SklearnRidgeRegressionModelConfig.py
kkanellis/MLOS
791d670a4c44467b2b4c9633f8aa1bebab50771f
[ "MIT" ]
81
2020-08-25T17:08:05.000Z
2022-03-19T08:58:56.000Z
source/Mlos.Python/mlos/Optimizers/RegressionModels/SklearnRidgeRegressionModelConfig.py
grlap/MLOS
f828cf2b46ed63d7c9b3bd6cef73b2027a7ad12a
[ "MIT" ]
173
2020-08-25T17:38:04.000Z
2021-11-02T19:34:00.000Z
source/Mlos.Python/mlos/Optimizers/RegressionModels/SklearnRidgeRegressionModelConfig.py
grlap/MLOS
f828cf2b46ed63d7c9b3bd6cef73b2027a7ad12a
[ "MIT" ]
38
2020-08-25T20:49:14.000Z
2022-03-16T16:30:27.000Z
# # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # from enum import Enum from mlos.Spaces import SimpleHypergrid, ContinuousDimension, DiscreteDimension, CategoricalDimension, Point from mlos.Spaces.Configs.DefaultConfigMeta import DefaultConfigMeta class SklearnRidgeRegressionMod...
49.268116
116
0.631563
from enum import Enum from mlos.Spaces import SimpleHypergrid, ContinuousDimension, DiscreteDimension, CategoricalDimension, Point from mlos.Spaces.Configs.DefaultConfigMeta import DefaultConfigMeta class SklearnRidgeRegressionModelConfig(metaclass=DefaultConfigMeta): class Solver(Enum): AUTO...
true
true
f720c7aa06d180672d2e8ae9ac3670dabcc51952
10,404
py
Python
tensorflow_probability/substrates/meta/rewrite.py
varomodt/probability
d68de79e67c06ab46509744574a044ccb966c4d5
[ "Apache-2.0" ]
1
2020-01-16T02:19:34.000Z
2020-01-16T02:19:34.000Z
tensorflow_probability/substrates/meta/rewrite.py
varomodt/probability
d68de79e67c06ab46509744574a044ccb966c4d5
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/substrates/meta/rewrite.py
varomodt/probability
d68de79e67c06ab46509744574a044ccb966c4d5
[ "Apache-2.0" ]
1
2020-10-19T11:24:40.000Z
2020-10-19T11:24:40.000Z
# Copyright 2019 The TensorFlow Probability 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 o...
40.48249
78
0.663975
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections from absl import app from absl import flags flags.DEFINE_boolean('numpy_to_jax', False, 'Whether or not to rewrite numpy imports to jax.numpy') flags.DE...
true
true
f720c8e34817cce8439e26b7ffd83fa810781ad6
35,031
py
Python
Pilot1/Combo/combo_dose.py
j-woz/Benchmarks
d518162fdafb7cfa26071b6a30a3b456dad024f6
[ "MIT" ]
2
2021-02-06T06:47:19.000Z
2021-02-24T13:45:02.000Z
Pilot1/Combo/combo_dose.py
j-woz/Benchmarks
d518162fdafb7cfa26071b6a30a3b456dad024f6
[ "MIT" ]
null
null
null
Pilot1/Combo/combo_dose.py
j-woz/Benchmarks
d518162fdafb7cfa26071b6a30a3b456dad024f6
[ "MIT" ]
1
2019-08-14T14:29:42.000Z
2019-08-14T14:29:42.000Z
#! /usr/bin/env python from __future__ import division, print_function import argparse import collections import logging import os import random import threading import numpy as np import pandas as pd from itertools import cycle, islice import keras from keras import backend as K from keras import optimizers from ...
40.876313
187
0.61163
from __future__ import division, print_function import argparse import collections import logging import os import random import threading import numpy as np import pandas as pd from itertools import cycle, islice import keras from keras import backend as K from keras import optimizers from keras.models import Mo...
true
true
f720c9210c69a182402e3ddf9bc6f6f6a8920ba9
659
py
Python
utils/check_callback.py
jrl-umi3218/mc_naoqi_dcm
605d2c448bd1254466d7a1f7f7a7c595ef5d8398
[ "BSD-2-Clause" ]
null
null
null
utils/check_callback.py
jrl-umi3218/mc_naoqi_dcm
605d2c448bd1254466d7a1f7f7a7c595ef5d8398
[ "BSD-2-Clause" ]
null
null
null
utils/check_callback.py
jrl-umi3218/mc_naoqi_dcm
605d2c448bd1254466d7a1f7f7a7c595ef5d8398
[ "BSD-2-Clause" ]
null
null
null
# Disactivate safety reflexes # First, go to http://pepper.local/advanced/#/settings to enable the disactivation import qi import sys # Connect to Naoqi session session = qi.Session() try: session.connect("tcp://127.0.0.1:9559") except RuntimeError: print ("Can't connect to Naoqi at ip \"" + args.ip + "\" on ...
31.380952
94
0.710167
Session() try: session.connect("tcp://127.0.0.1:9559") except RuntimeError: print ("Can't connect to Naoqi at ip \"" + args.ip + "\" on port " + str(args.port) +".\n" "Please check your script arguments. Run with -h option for help.") sys.exit(1) # Access the module mcnaoqidcm_service = sessio...
false
true
f720c93c4cd30b631b5aa4846951a414fc4befea
8,078
py
Python
nets/mobilenet/mobilenet_v2.py
Popcorn-sugar/Deep_v2
23c25f74e36016658558e690890499bc7fd2aeb2
[ "MIT" ]
null
null
null
nets/mobilenet/mobilenet_v2.py
Popcorn-sugar/Deep_v2
23c25f74e36016658558e690890499bc7fd2aeb2
[ "MIT" ]
null
null
null
nets/mobilenet/mobilenet_v2.py
Popcorn-sugar/Deep_v2
23c25f74e36016658558e690890499bc7fd2aeb2
[ "MIT" ]
null
null
null
# 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...
37.225806
80
0.694974
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import functools import tensorflow as tf from nets.mobilenet import conv_blocks as ops from nets.mobilenet import mobilenet as lib import tf_slim as slim op = lib.op expand_input ...
true
true
f720cb08684941936d653c433957364d390d8967
3,246
py
Python
mt/preprocess/1_process_raw.py
salvacarrion/nmt-continual-learning
302147ac9c270f3341a68a72c803c457f05ff37b
[ "MIT" ]
1
2021-05-26T11:35:09.000Z
2021-05-26T11:35:09.000Z
mt/preprocess/1_process_raw.py
salvacarrion/nmt-continual-learning
302147ac9c270f3341a68a72c803c457f05ff37b
[ "MIT" ]
1
2021-05-26T11:36:24.000Z
2021-05-26T11:36:24.000Z
mt/preprocess/1_process_raw.py
salvacarrion/nmt-continual-learning
302147ac9c270f3341a68a72c803c457f05ff37b
[ "MIT" ]
null
null
null
import os import pandas as pd from pathlib import Path import numpy as np from mt import RAW_PATH from mt import utils SUFFLE = True CONSTRAINED = True TR_DATA_PATH = "/home/salva/Documents/Programming/Datasets/scielo/originals/scielo-gma/scielo-gma" TR_RAW_FILES = ["es-en-gma-biological.csv", "es-en-gma-health.csv"...
35.282609
117
0.594886
import os import pandas as pd from pathlib import Path import numpy as np from mt import RAW_PATH from mt import utils SUFFLE = True CONSTRAINED = True TR_DATA_PATH = "/home/salva/Documents/Programming/Datasets/scielo/originals/scielo-gma/scielo-gma" TR_RAW_FILES = ["es-en-gma-biological.csv", "es-en-gma-health.csv"...
true
true
f720cbcab58f05b66ace66127442ad6b2998f33d
2,069
py
Python
botnet/modules/lib/cache.py
admdev8/botnet-2
2fd43237e628869eb34d8e7a6747da6d71c1192c
[ "MIT" ]
69
2015-02-24T19:24:23.000Z
2022-02-23T08:04:53.000Z
botnet/modules/lib/cache.py
admdev8/botnet-2
2fd43237e628869eb34d8e7a6747da6d71c1192c
[ "MIT" ]
10
2017-06-28T21:08:29.000Z
2022-01-26T07:46:02.000Z
botnet/modules/lib/cache.py
admdev8/botnet-2
2fd43237e628869eb34d8e7a6747da6d71c1192c
[ "MIT" ]
39
2015-11-19T10:07:21.000Z
2022-03-30T10:56:24.000Z
""" Contains cache implementations which can be used by the modules, for example to cache results acquired from various online APIs. """ import datetime import hashlib def get_md5(string): """Returns a hash of a string.""" m = hashlib.md5() m.update(string.encode('utf-8')) return m.hexdigest(...
26.87013
80
0.581924
import datetime import hashlib def get_md5(string): m = hashlib.md5() m.update(string.encode('utf-8')) return m.hexdigest() class BaseCache(object): def __init__(self, default_timeout=300): self.default_timeout = default_timeout def set(self, key, value, timeout=None): return ...
true
true
f720cc9a775ee8a5289c1096d9e20c36d79908d3
15,229
py
Python
src/main.py
Steffuu/tgMensaBotDD
04bca6ce839d5fb040e0e6232163f4343bcb85fb
[ "MIT" ]
null
null
null
src/main.py
Steffuu/tgMensaBotDD
04bca6ce839d5fb040e0e6232163f4343bcb85fb
[ "MIT" ]
null
null
null
src/main.py
Steffuu/tgMensaBotDD
04bca6ce839d5fb040e0e6232163f4343bcb85fb
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, InlineQueryHandler import telegram as tg import requests import json import os import io import time import logging from datetime import timedelta import translate import random import praw RED...
40.395225
1,074
0.690919
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, InlineQueryHandler import telegram as tg import requests import json import os import io import time import logging from datetime import timedelta import translate import random import praw REDDIT_BOT_ID = os.environ['REDDIT_BOT_ID'] REDDIT...
true
true
f720ccd4ee2f6948386979975d4872da8241f475
232
py
Python
handroll/i18n.py
mblayman/handroll
42703cf5c969dccd0eb0715402ab84056ab65e22
[ "BSD-2-Clause" ]
null
null
null
handroll/i18n.py
mblayman/handroll
42703cf5c969dccd0eb0715402ab84056ab65e22
[ "BSD-2-Clause" ]
null
null
null
handroll/i18n.py
mblayman/handroll
42703cf5c969dccd0eb0715402ab84056ab65e22
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2014, Matt Layman import gettext import os localedir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'locale') translate = gettext.translation('handroll', localedir, fallback=True) _ = translate.gettext
25.777778
78
0.762931
import gettext import os localedir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'locale') translate = gettext.translation('handroll', localedir, fallback=True) _ = translate.gettext
true
true
f720cf1b4711518700b108a7d64fb57a175679e5
18,297
py
Python
neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py
huiweics/neutron
8c7ca776d8cbe967a8bbe773ab38c361414a7068
[ "Apache-2.0" ]
null
null
null
neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py
huiweics/neutron
8c7ca776d8cbe967a8bbe773ab38c361414a7068
[ "Apache-2.0" ]
null
null
null
neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py
huiweics/neutron
8c7ca776d8cbe967a8bbe773ab38c361414a7068
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
42.158986
79
0.6283
import functools import mock from oslo_config import cfg from oslo_utils import uuidutils from neutron.common.ovn import constants as ovn_const from neutron.common.ovn import utils from neutron.common import utils as n_utils from neutron.db import ovn_revision_numbers_db as db_rev from neutron.tests.fun...
true
true
f720cfcd78b89cb225ad9d77d9115e223033a0da
8,174
py
Python
tensorflow_federated/python/core/impl/value_utils.py
hieunq95/federated
15402997ce7fb35d782d715758acf82767206916
[ "Apache-2.0" ]
5
2019-07-23T14:49:46.000Z
2022-03-30T13:54:22.000Z
tensorflow_federated/python/core/impl/value_utils.py
hieunq95/federated
15402997ce7fb35d782d715758acf82767206916
[ "Apache-2.0" ]
null
null
null
tensorflow_federated/python/core/impl/value_utils.py
hieunq95/federated
15402997ce7fb35d782d715758acf82767206916
[ "Apache-2.0" ]
null
null
null
# Lint as: python3 # Copyright 2018, The TensorFlow Federated 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 ...
42.572917
80
0.722535
from __future__ import absolute_import from __future__ import division from __future__ import print_function from six.moves import range from tensorflow_federated.python.common_libs import anonymous_tuple from tensorflow_federated.python.common_libs import py_typecheck from tensorflow_federated.python....
true
true
f720d050c37ee3d16536fe8dff1a9deb55d14284
5,304
py
Python
backend/tests/baserow/contrib/database/field/test_number_field_type.py
jacklicn/baserow
978d9462ededbaa96674a6653028ba19876ea273
[ "MIT" ]
1
2021-04-13T16:27:58.000Z
2021-04-13T16:27:58.000Z
backend/tests/baserow/contrib/database/field/test_number_field_type.py
jacklicn/baserow
978d9462ededbaa96674a6653028ba19876ea273
[ "MIT" ]
null
null
null
backend/tests/baserow/contrib/database/field/test_number_field_type.py
jacklicn/baserow
978d9462ededbaa96674a6653028ba19876ea273
[ "MIT" ]
null
null
null
import pytest from decimal import Decimal from baserow.contrib.database.fields.handler import FieldHandler from baserow.contrib.database.fields.registries import field_type_registry @pytest.mark.django_db @pytest.mark.parametrize( "expected,field_kwargs", [ ( [ 9223372036...
40.181818
88
0.601244
import pytest from decimal import Decimal from baserow.contrib.database.fields.handler import FieldHandler from baserow.contrib.database.fields.registries import field_type_registry @pytest.mark.django_db @pytest.mark.parametrize( "expected,field_kwargs", [ ( [ 9223372036...
true
true
f720d05559826b7b3e8260bdfa239a1cb56c9a6c
4,465
py
Python
generated-libraries/python/netapp/iscsi/iscsi_received_stats_info.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
2
2017-03-28T15:31:26.000Z
2018-08-16T22:15:18.000Z
generated-libraries/python/netapp/iscsi/iscsi_received_stats_info.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
null
null
null
generated-libraries/python/netapp/iscsi/iscsi_received_stats_info.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
null
null
null
from netapp.netapp_object import NetAppObject class IscsiReceivedStatsInfo(NetAppObject): """ Counts for PDUs received. """ _data_out = None @property def data_out(self): """ Count of data out requests. """ return self._data_out @data_out.setter def ...
26.264706
92
0.520717
from netapp.netapp_object import NetAppObject class IscsiReceivedStatsInfo(NetAppObject): _data_out = None @property def data_out(self): return self._data_out @data_out.setter def data_out(self, val): if val != None: self.validate('data_out', val) self._data...
true
true
f720d09b09639cf12c6d88a9b93e2140d324a4fc
6,209
py
Python
data-analysis/analyze_E017+020.py
JakobHavtorn/es-rl
30d81ad908a30e78d03c83d37454dbe8e05d1452
[ "MIT" ]
1
2021-09-03T17:54:14.000Z
2021-09-03T17:54:14.000Z
data-analysis/analyze_E017+020.py
JakobHavtorn/es-rl
30d81ad908a30e78d03c83d37454dbe8e05d1452
[ "MIT" ]
null
null
null
data-analysis/analyze_E017+020.py
JakobHavtorn/es-rl
30d81ad908a30e78d03c83d37454dbe8e05d1452
[ "MIT" ]
null
null
null
import os from distutils.dir_util import copy_tree import warnings import IPython import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as pd import scipy as sp import torch from context import utils import utils.filesystem as fs import utils.plotting as plot from utils.data_analysis impo...
42.82069
133
0.639394
import os from distutils.dir_util import copy_tree import warnings import IPython import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as pd import scipy as sp import torch from context import utils import utils.filesystem as fs import utils.plotting as plot from utils.data_analysis impo...
true
true
f720d1f5708dbc5ccf4ce7f998568b7bcfcee378
686
py
Python
test/test_relay.py
steinwurf/kodo-simulations-python
f9d9bcce70adf1666cf8bac9f352fbbf640ca783
[ "BSD-3-Clause" ]
2
2017-12-09T20:41:02.000Z
2022-01-10T23:23:01.000Z
test/test_relay.py
steinwurf/kodo-simulations-python
f9d9bcce70adf1666cf8bac9f352fbbf640ca783
[ "BSD-3-Clause" ]
null
null
null
test/test_relay.py
steinwurf/kodo-simulations-python
f9d9bcce70adf1666cf8bac9f352fbbf640ca783
[ "BSD-3-Clause" ]
5
2016-10-12T12:18:59.000Z
2022-01-10T23:23:55.000Z
#! /usr/bin/env python # encoding: utf-8 import sys sys.path.append('..') sys.path.append('mock') import unittest from mock import Mock import simulator.relay class TestPacket(unittest.TestCase): """Class for testing Relay.""" def test_instantiation(self): """Test instantiation.""" id = "te...
23.655172
53
0.650146
import sys sys.path.append('..') sys.path.append('mock') import unittest from mock import Mock import simulator.relay class TestPacket(unittest.TestCase): def test_instantiation(self): id = "test_id" stats = {} decoder = Mock(name="decoder_object") decoder.block_size = Mock(re...
true
true
f720d23a79090927f1bcc5cdbf04f6da46a364cb
10,513
py
Python
ui_automation_tests/step_defs/test_open_application.py
uktrade/lite-exporter-frontend
cf42ac37a21236486aa303c8935c44a7eba91ef5
[ "MIT" ]
3
2019-05-31T06:36:17.000Z
2020-02-12T16:02:24.000Z
ui_automation_tests/step_defs/test_open_application.py
uktrade/lite-exporter-frontend
cf42ac37a21236486aa303c8935c44a7eba91ef5
[ "MIT" ]
33
2019-03-28T10:20:14.000Z
2020-07-16T15:12:43.000Z
ui_automation_tests/step_defs/test_open_application.py
uktrade/lite-exporter-frontend
cf42ac37a21236486aa303c8935c44a7eba91ef5
[ "MIT" ]
1
2019-05-01T15:52:02.000Z
2019-05-01T15:52:02.000Z
from pytest_bdd import scenarios, when, then, parsers import ui_automation_tests.shared.tools.helpers as utils from ui_automation_tests.pages.generic_application.task_list import TaskListPage from ui_automation_tests.pages.open_application.country_contract_types import OpenApplicationCountryContractTypes from ui_autom...
44.54661
129
0.799106
from pytest_bdd import scenarios, when, then, parsers import ui_automation_tests.shared.tools.helpers as utils from ui_automation_tests.pages.generic_application.task_list import TaskListPage from ui_automation_tests.pages.open_application.country_contract_types import OpenApplicationCountryContractTypes from ui_autom...
true
true
f720d28d694930288ecc3e99c146b144020f7a87
13,442
py
Python
lib/redis_cache/rediscache.py
eapearson/kb_Metrics
f1c3c8457577060c9c695d6f4cbb7ec8f7fae17f
[ "MIT" ]
null
null
null
lib/redis_cache/rediscache.py
eapearson/kb_Metrics
f1c3c8457577060c9c695d6f4cbb7ec8f7fae17f
[ "MIT" ]
null
null
null
lib/redis_cache/rediscache.py
eapearson/kb_Metrics
f1c3c8457577060c9c695d6f4cbb7ec8f7fae17f
[ "MIT" ]
null
null
null
""" A simple redis-cache interface for storing python objects. """ from functools import wraps import pickle import json import hashlib import redis import logging from redis._compat import basestring, unicode DEFAULT_EXPIRY = 60 * 60 * 24 class RedisConnect(object): """ A simple object to store and pass da...
34.64433
107
0.588157
from functools import wraps import pickle import json import hashlib import redis import logging from redis._compat import basestring, unicode DEFAULT_EXPIRY = 60 * 60 * 24 class RedisConnect(object): def __init__(self, host=None, port=None, db=None, password=None): self.host = host if host else 'localh...
true
true
f720d329eaad65945f4c82bf41d8502618bb8cd8
892
py
Python
setup.py
msaroufim/spektral
6881e6650602b2f98b09516f490c185678075bc8
[ "MIT" ]
1
2020-07-28T09:11:57.000Z
2020-07-28T09:11:57.000Z
setup.py
msaroufim/spektral
6881e6650602b2f98b09516f490c185678075bc8
[ "MIT" ]
null
null
null
setup.py
msaroufim/spektral
6881e6650602b2f98b09516f490c185678075bc8
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages with open("README.md", "r") as fh: long_description = fh.read() setup( name='spektral', version='0.6.0', packages=find_packages(), install_requires=['tensorflow>=2.1.0', 'networkx', 'pandas', ...
29.733333
69
0.545964
from setuptools import setup, find_packages with open("README.md", "r") as fh: long_description = fh.read() setup( name='spektral', version='0.6.0', packages=find_packages(), install_requires=['tensorflow>=2.1.0', 'networkx', 'pandas', ...
true
true
f720d46cfcd6d92dcd55f520e7ee8bb54e90becb
1,211
py
Python
Simple_Cipher/simple_cipher.py
triump0870/Interactive_Programming_Python
97e0f1f5639aecac683053ed742632db14dc6954
[ "Apache-2.0" ]
1
2015-06-09T22:40:15.000Z
2015-06-09T22:40:15.000Z
Simple_Cipher/simple_cipher.py
triump0870/Interactive_Programming_Python
97e0f1f5639aecac683053ed742632db14dc6954
[ "Apache-2.0" ]
null
null
null
Simple_Cipher/simple_cipher.py
triump0870/Interactive_Programming_Python
97e0f1f5639aecac683053ed742632db14dc6954
[ "Apache-2.0" ]
null
null
null
# Simple Cipher Text Generator # Rohan Roy - 2nd Nov 2013 import simplegui import random # Global Variables CIPHER = {} LETTER = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMOPQRSTUVWXYZ1234567890!@#$%&" "' message = "" # Helper Function def init(): letter_list = list(LETTER) random.shuffle(letter_list) for c...
22.849057
81
0.654005
import simplegui import random CIPHER = {} LETTER = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMOPQRSTUVWXYZ1234567890!@#$%&" "' message = "" def init(): letter_list = list(LETTER) random.shuffle(letter_list) for ch in LETTER: CIPHER[ch] = letter_list.pop() def encode(): emsg = "" ...
false
true
f720d5217ca55aacc0922b9a609c312d27b6d596
3,175
py
Python
tests/unit/test_subscribers.py
cclauss/s3transfer
258c3c69416338f8df307621ec5cefa85c453150
[ "Apache-2.0" ]
1
2021-05-08T10:43:40.000Z
2021-05-08T10:43:40.000Z
tests/unit/test_subscribers.py
Saiprasad16/s3transfer
59e968d05288092948284001710c416677102266
[ "Apache-2.0" ]
1
2021-04-08T21:25:06.000Z
2021-04-13T16:36:43.000Z
tests/unit/test_subscribers.py
Saiprasad16/s3transfer
59e968d05288092948284001710c416677102266
[ "Apache-2.0" ]
1
2020-12-28T19:16:31.000Z
2020-12-28T19:16:31.000Z
# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file accompa...
35.674157
75
0.716535
from tests import unittest from s3transfer.exceptions import InvalidSubscriberMethodError from s3transfer.subscribers import BaseSubscriber class ExtraMethodsSubscriber(BaseSubscriber): def extra_method(self): return 'called extra method' class NotCallableSubscriber(BaseSubscriber): on_d...
true
true
f720d5fe861a06e326fd1453b262a21ad8d73c63
233
py
Python
encapsulation_exercise/restaurant/project/beverage/cold_beverage.py
Veselin-Stoilov/software-university-OOP
452a77cabf2e7d93f30f629c67c6b22682eb255d
[ "MIT" ]
null
null
null
encapsulation_exercise/restaurant/project/beverage/cold_beverage.py
Veselin-Stoilov/software-university-OOP
452a77cabf2e7d93f30f629c67c6b22682eb255d
[ "MIT" ]
null
null
null
encapsulation_exercise/restaurant/project/beverage/cold_beverage.py
Veselin-Stoilov/software-university-OOP
452a77cabf2e7d93f30f629c67c6b22682eb255d
[ "MIT" ]
null
null
null
from encapsulation_exercise.restaurant.project.beverage.beverage import Beverage class ColdBeverage(Beverage): def __init__(self, name: str, price: float, milliliters: float): super().__init__(name, price, milliliters)
33.285714
80
0.76824
from encapsulation_exercise.restaurant.project.beverage.beverage import Beverage class ColdBeverage(Beverage): def __init__(self, name: str, price: float, milliliters: float): super().__init__(name, price, milliliters)
true
true
f720d64ceba2868cd71f12c692ec517b850f2ae3
5,655
py
Python
qiskit/providers/basicaer/statevector_simulator.py
biplab37/qiskit-aakash
e10b204887606f1f75bdfde182bb0c6d0a322c68
[ "Apache-2.0" ]
22
2019-08-15T04:39:15.000Z
2022-03-06T05:17:04.000Z
qiskit/providers/basicaer/statevector_simulator.py
biplab37/qiskit-aakash
e10b204887606f1f75bdfde182bb0c6d0a322c68
[ "Apache-2.0" ]
2
2020-10-26T07:12:12.000Z
2021-12-09T16:22:51.000Z
qiskit/providers/basicaer/statevector_simulator.py
biplab37/qiskit-aakash
e10b204887606f1f75bdfde182bb0c6d0a322c68
[ "Apache-2.0" ]
9
2019-09-05T05:33:00.000Z
2021-10-09T16:04:53.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
36.019108
93
0.567286
import logging from math import log2 from qiskit.util import local_hardware_info from qiskit.providers.basicaer.exceptions import BasicAerError from qiskit.providers.models import QasmBackendConfiguration from .qasm_simulator import QasmSimulatorPy logger = logging.getLogger(__name__) class Statevect...
true
true
f720d6c78dc5035a3c9b881b6fc3670b51d08456
3,919
py
Python
myprojectenv/lib/python3.5/site-packages/ansible/modules/windows/win_unzip.py
lancerenteria/doFlask
2d4e242469b108c6c8316ee18a540307497bfb53
[ "MIT" ]
null
null
null
myprojectenv/lib/python3.5/site-packages/ansible/modules/windows/win_unzip.py
lancerenteria/doFlask
2d4e242469b108c6c8316ee18a540307497bfb53
[ "MIT" ]
null
null
null
myprojectenv/lib/python3.5/site-packages/ansible/modules/windows/win_unzip.py
lancerenteria/doFlask
2d4e242469b108c6c8316ee18a540307497bfb53
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Phil Schwartz <schwartzmx@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the ...
32.932773
156
0.713958
ANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: win_unzip version_added: "2.0" short_description: Unzips compressed files and archives on the Windows node description: - U...
true
true
f720d7542161f6d3c83a81ed0d3c647a9030afd4
259
py
Python
mmaction/apis/__init__.py
HypnosXC/mmaction2
a26d5f981449445a5e22a0a60d8b285e06c3dd6e
[ "Apache-2.0" ]
648
2021-06-24T19:33:09.000Z
2022-03-31T06:27:24.000Z
mmaction/apis/__init__.py
xumingze0308/mmaction2
777546f27f8f5a3c83e10d966e2149be2fc9fa31
[ "Apache-2.0" ]
98
2020-01-21T09:41:30.000Z
2022-03-12T00:53:06.000Z
mmaction/apis/__init__.py
xumingze0308/mmaction2
777546f27f8f5a3c83e10d966e2149be2fc9fa31
[ "Apache-2.0" ]
233
2020-01-18T03:46:27.000Z
2022-03-19T03:17:47.000Z
from .inference import inference_recognizer, init_recognizer from .test import multi_gpu_test, single_gpu_test from .train import train_model __all__ = [ 'train_model', 'init_recognizer', 'inference_recognizer', 'multi_gpu_test', 'single_gpu_test' ]
28.777778
79
0.791506
from .inference import inference_recognizer, init_recognizer from .test import multi_gpu_test, single_gpu_test from .train import train_model __all__ = [ 'train_model', 'init_recognizer', 'inference_recognizer', 'multi_gpu_test', 'single_gpu_test' ]
true
true
f720d77ecc540423a6a6545f9e50c117ad1c08db
2,579
py
Python
se3_transformer/model/layers/linear.py
RosettaCommons/RFDesign
b404b8b2c57f89c047529c30259aeeb8f6012b61
[ "MIT" ]
45
2022-01-12T04:39:36.000Z
2022-03-25T12:33:36.000Z
se3_transformer/model/layers/linear.py
RosettaCommons/RFDesign
b404b8b2c57f89c047529c30259aeeb8f6012b61
[ "MIT" ]
6
2022-01-15T16:48:39.000Z
2022-03-15T16:20:34.000Z
se3_transformer/model/layers/linear.py
RosettaCommons/RFDesign
b404b8b2c57f89c047529c30259aeeb8f6012b61
[ "MIT" ]
10
2022-01-12T11:28:03.000Z
2022-03-30T11:36:41.000Z
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # 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...
42.983333
97
0.703761
from typing import Dict import numpy as np import torch import torch.nn as nn from torch import Tensor from se3_transformer.model.fiber import Fiber class LinearSE3(nn.Module): def __init__(self, fiber_in: Fiber, fiber_out: Fiber): super().__init__() self.weights = nn.Pa...
true
true
f720d79b4d6d96c43d1bfceebd505df12ce179cf
1,524
py
Python
plotly/validators/streamtube/colorbar/_titlefont.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
12
2020-04-18T18:10:22.000Z
2021-12-06T10:11:15.000Z
plotly/validators/streamtube/colorbar/_titlefont.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
1
2020-12-15T16:56:11.000Z
2020-12-15T16:56:11.000Z
plotly/validators/streamtube/colorbar/_titlefont.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
6
2020-04-18T23:07:08.000Z
2021-11-18T07:53:06.000Z
import _plotly_utils.basevalidators class TitlefontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name='titlefont', parent_name='streamtube.colorbar', **kwargs ): super(TitlefontValidator, self).__init__( plotly_name=p...
36.285714
73
0.557743
import _plotly_utils.basevalidators class TitlefontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name='titlefont', parent_name='streamtube.colorbar', **kwargs ): super(TitlefontValidator, self).__init__( plotly_name=p...
true
true
f720d9caab26b0c898d32c3bc5d19d61e2797724
7,527
py
Python
divvydata/historical_data.py
chrisluedtke/divvy-data-analysis
441fa9028ed4bb77ad47e8109a8be749ea1d30b1
[ "MIT" ]
2
2019-02-09T12:54:02.000Z
2019-02-11T23:02:35.000Z
divvydata/historical_data.py
chrisluedtke/divvy-data-analysis
441fa9028ed4bb77ad47e8109a8be749ea1d30b1
[ "MIT" ]
null
null
null
divvydata/historical_data.py
chrisluedtke/divvy-data-analysis
441fa9028ed4bb77ad47e8109a8be749ea1d30b1
[ "MIT" ]
null
null
null
""" Pulls data from: https://www.divvybikes.com/system-data https://s3.amazonaws.com/divvy-data/tripdata """ from io import BytesIO import os import re import requests from zipfile import ZipFile from typing import List from lxml import html import pandas as pd from .stations_feed import StationsFeed STN_DT_FORM = ...
29.287938
77
0.563571
from io import BytesIO import os import re import requests from zipfile import ZipFile from typing import List from lxml import html import pandas as pd from .stations_feed import StationsFeed STN_DT_FORM = { '2013': "%m/%d/%Y", '2014_Q1Q2': None, '2014_Q3Q4': "%m/%d/%Y %H:%M", '2015': None, ...
true
true
f720d9f5df4419371640fe5d3822b74acdb36bf0
35,757
py
Python
incidentes/views.py
Alvaruz/ATMS
962a1967e1654efe4d448891deb7881fa3addf85
[ "MIT" ]
null
null
null
incidentes/views.py
Alvaruz/ATMS
962a1967e1654efe4d448891deb7881fa3addf85
[ "MIT" ]
null
null
null
incidentes/views.py
Alvaruz/ATMS
962a1967e1654efe4d448891deb7881fa3addf85
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from django.template import loader from django.urls import reverse_lazy from .models import * from django.http import HttpResponse from .forms import TicketForm from django.views.generic import ListView, CreateView, UpdateView, DeleteView from django.core.paginator import E...
44.090012
228
0.711833
from django.shortcuts import render, redirect from django.template import loader from django.urls import reverse_lazy from .models import * from django.http import HttpResponse from .forms import TicketForm from django.views.generic import ListView, CreateView, UpdateView, DeleteView from django.core.paginator import E...
true
true
f720da7486a07c56f32fcbde3e8956ad3ccbd326
1,830
py
Python
doc/listings/interstore/webcal.py
jonathanj/mantissa
53e5502aba23ce99be78b27f923a276593033fe8
[ "MIT" ]
6
2016-02-17T15:04:53.000Z
2021-08-20T09:44:10.000Z
doc/listings/interstore/webcal.py
jonathanj/mantissa
53e5502aba23ce99be78b27f923a276593033fe8
[ "MIT" ]
62
2015-02-04T23:40:55.000Z
2021-02-18T19:56:02.000Z
doc/listings/interstore/webcal.py
jonathanj/mantissa
53e5502aba23ce99be78b27f923a276593033fe8
[ "MIT" ]
8
2015-11-15T17:26:42.000Z
2020-12-02T06:36:52.000Z
from datetime import timedelta from epsilon.extime import Time from nevow.page import renderer from nevow.loaders import stan from nevow.tags import div from nevow.athena import LiveElement from xmantissa.liveform import TEXT_INPUT, LiveForm, Parameter class CalendarElement(LiveElement): docFactory = stan(di...
29.516129
80
0.604918
from datetime import timedelta from epsilon.extime import Time from nevow.page import renderer from nevow.loaders import stan from nevow.tags import div from nevow.athena import LiveElement from xmantissa.liveform import TEXT_INPUT, LiveForm, Parameter class CalendarElement(LiveElement): docFactory = stan(di...
true
true
f720da77bf370fc9b4db8eeeefff5308d08c418c
197
py
Python
robots/test/strategies/run_tests/tests/test_sharing/test_share/t1.py
memristor/mep2
bc5cddacba3d740f791f3454b8cb51bda83ce202
[ "MIT" ]
5
2018-11-27T15:15:00.000Z
2022-02-10T21:44:13.000Z
robots/test/strategies/run_tests/tests/test_sharing/test_share/t1.py
memristor/mep2
bc5cddacba3d740f791f3454b8cb51bda83ce202
[ "MIT" ]
2
2018-10-20T15:48:40.000Z
2018-11-20T05:11:33.000Z
robots/test/strategies/run_tests/tests/test_sharing/test_share/t1.py
memristor/mep2
bc5cddacba3d740f791f3454b8cb51bda83ce202
[ "MIT" ]
1
2020-02-07T12:44:47.000Z
2020-02-07T12:44:47.000Z
weight=1 a=_State('a', name='var1', shared=True) def run(): @_do def _(): print(a.val) sleep(10) a.val = 5 @_do def _(): print(a.val) sleep(10) a.val = 8 @_do def _(): print(a.val)
11.588235
39
0.563452
weight=1 a=_State('a', name='var1', shared=True) def run(): @_do def _(): print(a.val) sleep(10) a.val = 5 @_do def _(): print(a.val) sleep(10) a.val = 8 @_do def _(): print(a.val)
true
true
f720da93b083e8b08000df92605af508a5009d38
2,479
py
Python
csympy/tests/test_arit.py
shipci/csympy
6b5a1d7d8a3f9bbe0b983b78a44be90a70db0743
[ "MIT" ]
null
null
null
csympy/tests/test_arit.py
shipci/csympy
6b5a1d7d8a3f9bbe0b983b78a44be90a70db0743
[ "MIT" ]
null
null
null
csympy/tests/test_arit.py
shipci/csympy
6b5a1d7d8a3f9bbe0b983b78a44be90a70db0743
[ "MIT" ]
null
null
null
from nose.tools import raises from csympy import Symbol, Integer, Add, Pow def test_arit1(): x = Symbol("x") y = Symbol("y") e = x + y e = x * y e = Integer(2)*x e = 2*x e = x + 1 e = 1 + x def test_arit2(): x = Symbol("x") y = Symbol("y") assert x+x == Integer(2) * x ...
21.938053
79
0.449375
from nose.tools import raises from csympy import Symbol, Integer, Add, Pow def test_arit1(): x = Symbol("x") y = Symbol("y") e = x + y e = x * y e = Integer(2)*x e = 2*x e = x + 1 e = 1 + x def test_arit2(): x = Symbol("x") y = Symbol("y") assert x+x == Integer(2) * x ...
true
true
f720db2bca4a842dab5f8a8604fb53fae21bea7f
2,309
py
Python
epytope/Data/pssms/smmpmbec/mat/B_07_02_9.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
7
2021-02-01T18:11:28.000Z
2022-01-31T19:14:07.000Z
epytope/Data/pssms/smmpmbec/mat/B_07_02_9.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
22
2021-01-02T15:25:23.000Z
2022-03-14T11:32:53.000Z
epytope/Data/pssms/smmpmbec/mat/B_07_02_9.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
4
2021-05-28T08:50:38.000Z
2022-03-14T11:45:32.000Z
B_07_02_9 = {0: {'A': -0.332, 'C': 0.186, 'E': 0.544, 'D': 0.788, 'G': 0.214, 'F': -0.118, 'I': -0.161, 'H': -0.257, 'K': -0.244, 'M': -0.332, 'L': -0.105, 'N': 0.105, 'Q': 0.294, 'P': 0.58, 'S': -0.286, 'R': -0.62, 'T': 0.187, 'W': -0.114, 'V': -0.03, 'Y': -0.3}, 1: {'A': -0.604, 'C': 0.467, 'E': 0.468, 'D': 0.371, 'G...
2,309
2,309
0.395409
B_07_02_9 = {0: {'A': -0.332, 'C': 0.186, 'E': 0.544, 'D': 0.788, 'G': 0.214, 'F': -0.118, 'I': -0.161, 'H': -0.257, 'K': -0.244, 'M': -0.332, 'L': -0.105, 'N': 0.105, 'Q': 0.294, 'P': 0.58, 'S': -0.286, 'R': -0.62, 'T': 0.187, 'W': -0.114, 'V': -0.03, 'Y': -0.3}, 1: {'A': -0.604, 'C': 0.467, 'E': 0.468, 'D': 0.371, 'G...
true
true
f720dbb912a33f6df1fac7c953a783e5d94e86e3
13,329
py
Python
SourceControlMgmt/SourceControlMgmt.py
tigelane/ACI-Simplified-GUI-Management
f2c3d27375421a75de0f5b9bbdc645c380549f05
[ "MIT" ]
null
null
null
SourceControlMgmt/SourceControlMgmt.py
tigelane/ACI-Simplified-GUI-Management
f2c3d27375421a75de0f5b9bbdc645c380549f05
[ "MIT" ]
14
2020-02-14T23:47:50.000Z
2020-03-04T20:16:29.000Z
SourceControlMgmt/SourceControlMgmt.py
IGNW/devnet-create-2020
1eea17891a6cd1fedc265605a7b06378542762bb
[ "MIT" ]
1
2021-07-06T14:42:55.000Z
2021-07-06T14:42:55.000Z
from pathlib import Path from datetime import datetime import shutil import subprocess import yaml import requests class SCMCredentialValidationError(Exception): pass class SCMCloneRepoError(Exception): pass class SCMCreateBranchError(Exception): pass class SCMWriteFileError(Exception): pass c...
38.082857
162
0.579038
from pathlib import Path from datetime import datetime import shutil import subprocess import yaml import requests class SCMCredentialValidationError(Exception): pass class SCMCloneRepoError(Exception): pass class SCMCreateBranchError(Exception): pass class SCMWriteFileError(Exception): pass c...
true
true
f720dc83e899603cde1322429190880fb730dec1
682
py
Python
recommendation/recommendation/apps/films/migrations/0003_auto_20200314_0357.py
WillionLei/recommendation
49fd28a47574877a91458201b21ec2a80409bb5f
[ "MIT" ]
null
null
null
recommendation/recommendation/apps/films/migrations/0003_auto_20200314_0357.py
WillionLei/recommendation
49fd28a47574877a91458201b21ec2a80409bb5f
[ "MIT" ]
null
null
null
recommendation/recommendation/apps/films/migrations/0003_auto_20200314_0357.py
WillionLei/recommendation
49fd28a47574877a91458201b21ec2a80409bb5f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2020-03-14 03:57 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('films', '0002_film'), ] operations = [ migrations.AddField( mo...
26.230769
116
0.577713
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('films', '0002_film'), ] operations = [ migrations.AddField( model_name='film', name='charge', field=models.Sma...
true
true
f720dca24b37afd8444ce644acfa3b1e0c6ddc1c
197
py
Python
pola/tests/commands/test_send_ai_pics_stats.py
rodkiewicz/pola-backend
e26df1cea07b43c8b4272739234b7e78e2ce08c9
[ "BSD-3-Clause" ]
30
2015-08-13T01:05:36.000Z
2022-01-22T03:02:50.000Z
pola/tests/commands/test_send_ai_pics_stats.py
rodkiewicz/pola-backend
e26df1cea07b43c8b4272739234b7e78e2ce08c9
[ "BSD-3-Clause" ]
1,428
2015-10-08T07:38:26.000Z
2022-03-31T08:36:08.000Z
pola/tests/commands/test_send_ai_pics_stats.py
rodkiewicz/pola-backend
e26df1cea07b43c8b4272739234b7e78e2ce08c9
[ "BSD-3-Clause" ]
13
2015-12-27T22:35:25.000Z
2022-02-01T15:55:58.000Z
from unittest import TestCase from django.core.management import call_command class SendAiPicsStatsTestCase(TestCase): def test_run_command(self): call_command('send_ai_pics_stats')
21.888889
47
0.796954
from unittest import TestCase from django.core.management import call_command class SendAiPicsStatsTestCase(TestCase): def test_run_command(self): call_command('send_ai_pics_stats')
true
true
f720dd6581d8165827d17d912cf9df585404c27b
148
py
Python
src/mkdv/runners/runner_python.py
fvutils/sim-mk
271b4374a21785ab1b22fac333e423b5febb6a81
[ "Apache-2.0" ]
null
null
null
src/mkdv/runners/runner_python.py
fvutils/sim-mk
271b4374a21785ab1b22fac333e423b5febb6a81
[ "Apache-2.0" ]
null
null
null
src/mkdv/runners/runner_python.py
fvutils/sim-mk
271b4374a21785ab1b22fac333e423b5febb6a81
[ "Apache-2.0" ]
null
null
null
''' Created on Nov 16, 2021 @author: mballance ''' from mkdv.runners.runner import Runner class RunnerPython(Runner): def __init__(self):
14.8
38
0.702703
''' Created on Nov 16, 2021 @author: mballance ''' from mkdv.runners.runner import Runner class RunnerPython(Runner): def __init__(self):
false
true
f720de11464a36f7cc26d40b9c9c173b3751a6c4
6,695
py
Python
tests/kafkatest/tests/core/fetch_from_follower_test.py
heyingquan13/kafka
620ada9888f82756d6ed0eabe96bb9b54518b378
[ "Apache-2.0" ]
35
2016-09-22T22:53:14.000Z
2020-02-13T15:12:21.000Z
tests/kafkatest/tests/core/fetch_from_follower_test.py
heyingquan13/kafka
620ada9888f82756d6ed0eabe96bb9b54518b378
[ "Apache-2.0" ]
27
2022-02-07T21:53:02.000Z
2022-03-15T20:38:46.000Z
tests/kafkatest/tests/core/fetch_from_follower_test.py
heyingquan13/kafka
620ada9888f82756d6ed0eabe96bb9b54518b378
[ "Apache-2.0" ]
88
2016-11-27T02:16:11.000Z
2020-02-28T05:10:26.000Z
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
49.592593
142
0.64003
import time from collections import defaultdict from ducktape.mark import matrix from ducktape.mark.resource import cluster from kafkatest.services.console_consumer import ConsoleConsumer from kafkatest.services.kafka import KafkaService, quorum from kafkatest.services.monitor.jmx import JmxTool from k...
true
true
f720def8adc18a066172259ff0e5e88e433e15c0
39,628
py
Python
python/dgl/distributed/graph_partition_book.py
hoangdzung/dgl
f7ce267164118a0526dd2f42f3baf799bb59d6b7
[ "Apache-2.0" ]
1
2021-08-18T11:54:42.000Z
2021-08-18T11:54:42.000Z
python/dgl/distributed/graph_partition_book.py
amorehead/dgl
738b75f41e5d3229e5ccda52d76e1297d7b0520d
[ "Apache-2.0" ]
null
null
null
python/dgl/distributed/graph_partition_book.py
amorehead/dgl
738b75f41e5d3229e5ccda52d76e1297d7b0520d
[ "Apache-2.0" ]
1
2021-11-28T09:16:55.000Z
2021-11-28T09:16:55.000Z
"""Define graph partition book.""" import pickle from abc import ABC import numpy as np from .. import backend as F from ..base import NID, EID from .. import utils from .shared_mem_utils import _to_shared_mem, _get_ndata_path, _get_edata_path, DTYPE_DICT from .._ffi.ndarray import empty_shared_mem from ..ndarray imp...
35.540807
100
0.609266
import pickle from abc import ABC import numpy as np from .. import backend as F from ..base import NID, EID from .. import utils from .shared_mem_utils import _to_shared_mem, _get_ndata_path, _get_edata_path, DTYPE_DICT from .._ffi.ndarray import empty_shared_mem from ..ndarray import exist_shared_mem_array from .id...
true
true
f720df0b58abbc375a8a7a17d5d8da4f91638bcc
53,237
py
Python
ecl/tests/unit/test_resource.py
keiichi-hikita/eclsdk
c43afb982fd54eb1875cdc22d46044644d804c4a
[ "Apache-2.0" ]
5
2017-04-07T06:23:04.000Z
2019-11-19T00:52:34.000Z
ecl/tests/unit/test_resource.py
keiichi-hikita/eclsdk
c43afb982fd54eb1875cdc22d46044644d804c4a
[ "Apache-2.0" ]
16
2018-09-12T11:14:40.000Z
2021-04-19T09:02:44.000Z
ecl/tests/unit/test_resource.py
keiichi-hikita/eclsdk
c43afb982fd54eb1875cdc22d46044644d804c4a
[ "Apache-2.0" ]
14
2017-05-11T14:26:26.000Z
2021-07-14T14:00:06.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...
34.704694
79
0.608148
import copy import json import os from keystoneauth1 import session import mock import requests from testtools import matchers from ecl import exceptions from ecl import format from ecl import resource from ecl.tests.unit import base from ecl import utils fake_parent = 'robert' fake_name = 'rey' fake_id...
true
true
f720df1f8976d6666a660d614734f5c3010f2b3d
5,980
py
Python
deep-learning-for-image-processing-master/pytorch_object_detection/train_coco_dataset/network_files/boxes.py
zpwithme/zzzzpppp
0f5df647f1e9d6cb8c01b3fc7df25ee543714af3
[ "MIT" ]
null
null
null
deep-learning-for-image-processing-master/pytorch_object_detection/train_coco_dataset/network_files/boxes.py
zpwithme/zzzzpppp
0f5df647f1e9d6cb8c01b3fc7df25ee543714af3
[ "MIT" ]
null
null
null
deep-learning-for-image-processing-master/pytorch_object_detection/train_coco_dataset/network_files/boxes.py
zpwithme/zzzzpppp
0f5df647f1e9d6cb8c01b3fc7df25ee543714af3
[ "MIT" ]
2
2021-06-26T16:53:38.000Z
2021-08-29T22:16:20.000Z
import torch from typing import Tuple from torch import Tensor import torchvision def nms(boxes, scores, iou_threshold): # type: (Tensor, Tensor, float) -> Tensor """ Performs non-maximum suppression (NMS) on the boxes according to their intersection-over-union (IoU). NMS iteratively removes lowe...
32.857143
98
0.634783
import torch from typing import Tuple from torch import Tensor import torchvision def nms(boxes, scores, iou_threshold): return torch.ops.torchvision.nms(boxes, scores, iou_threshold) def batched_nms(boxes, scores, idxs, iou_threshold): if boxes.numel() == 0: return torch.empty((0,), dtype...
true
true
f720dfa2212e24646fbef26faa5e5bdf2d802ce4
14,811
py
Python
PyObjCTest/test_nsgraphics.py
linuxfood/pyobjc-framework-Cocoa-test
3475890f165ab26a740f13d5afe4c62b4423a140
[ "MIT" ]
null
null
null
PyObjCTest/test_nsgraphics.py
linuxfood/pyobjc-framework-Cocoa-test
3475890f165ab26a740f13d5afe4c62b4423a140
[ "MIT" ]
null
null
null
PyObjCTest/test_nsgraphics.py
linuxfood/pyobjc-framework-Cocoa-test
3475890f165ab26a740f13d5afe4c62b4423a140
[ "MIT" ]
null
null
null
import AppKit import objc from PyObjCTools.TestSupport import TestCase, min_os_level class TestNSGraphics(TestCase): def testConstants(self): self.assertEqual(AppKit.NSCompositeClear, 0) self.assertEqual(AppKit.NSCompositeCopy, 1) self.assertEqual(AppKit.NSCompositeSourceOver, 2) s...
47.932039
209
0.667207
import AppKit import objc from PyObjCTools.TestSupport import TestCase, min_os_level class TestNSGraphics(TestCase): def testConstants(self): self.assertEqual(AppKit.NSCompositeClear, 0) self.assertEqual(AppKit.NSCompositeCopy, 1) self.assertEqual(AppKit.NSCompositeSourceOver, 2) s...
true
true
f720dfbd8a87908f745dd0e7e519b11314b25551
2,649
py
Python
zExtraLearning/MLPrep/tf2.0/NbExtracts/23tf2_0_mirrored_strategy.py
talk2sunil83/UpgradLearning
70c4f993c68ce5030e9df0edd15004bbb9fc71e7
[ "Apache-2.0" ]
null
null
null
zExtraLearning/MLPrep/tf2.0/NbExtracts/23tf2_0_mirrored_strategy.py
talk2sunil83/UpgradLearning
70c4f993c68ce5030e9df0edd15004bbb9fc71e7
[ "Apache-2.0" ]
null
null
null
zExtraLearning/MLPrep/tf2.0/NbExtracts/23tf2_0_mirrored_strategy.py
talk2sunil83/UpgradLearning
70c4f993c68ce5030e9df0edd15004bbb9fc71e7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """TF2.0 Mirrored Strategy.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1e7_N_vVQGyfa3Wz9ND0smWnnsHsQUs_k """ # Commented out IPython magic to ensure Python compatibility. from tensorflow.keras.models import Model from ...
29.10989
128
0.678369
from tensorflow.keras.models import Model from tensorflow.keras.layers import Input, Conv2D, Dense, Flatten, Dropout, GlobalMaxPooling2D, MaxPooling2D, BatchNormalization import matplotlib.pyplot as plt import numpy as np import tensorflow as tf print(tf.__version__) cifar10 = tf.keras.datasets.cifar10 (x_trai...
true
true
f720e314a25973213209e088a8ac815f6b5568fc
20,043
py
Python
src/pregame.py
the5thEmperor/lykos
62cc7694ec24eb0c177dfd25db79725a092a57fa
[ "BSD-2-Clause" ]
null
null
null
src/pregame.py
the5thEmperor/lykos
62cc7694ec24eb0c177dfd25db79725a092a57fa
[ "BSD-2-Clause" ]
null
null
null
src/pregame.py
the5thEmperor/lykos
62cc7694ec24eb0c177dfd25db79725a092a57fa
[ "BSD-2-Clause" ]
null
null
null
from collections import defaultdict, Counter from datetime import datetime, timedelta import threading import itertools import random import time import math import re from src.containers import UserDict, UserSet from src.decorators import COMMANDS, command, event_listener, handle_error from src.functions import get_...
39.3
159
0.612533
from collections import defaultdict, Counter from datetime import datetime, timedelta import threading import itertools import random import time import math import re from src.containers import UserDict, UserSet from src.decorators import COMMANDS, command, event_listener, handle_error from src.functions import get_...
true
true
f720e349ea77eb354bef27e43be8e0b0f558fa43
3,840
py
Python
wes_service/util.py
SamarthVP/workflow-service
a4a557ca17a38c1e8642983c2d3af6b6325da0f8
[ "Apache-2.0" ]
2
2020-02-14T18:41:08.000Z
2020-02-17T06:56:10.000Z
wes_service/util.py
Sage-Bionetworks/workflow-service
8b5dc0afe9ea0972014cdf48a693ee6f893cfe5e
[ "Apache-2.0" ]
9
2021-03-31T19:32:52.000Z
2022-02-26T23:21:38.000Z
wes_service/util.py
Sage-Bionetworks/workflow-service
8b5dc0afe9ea0972014cdf48a693ee6f893cfe5e
[ "Apache-2.0" ]
2
2020-02-12T23:21:35.000Z
2020-06-02T14:50:31.000Z
import tempfile import json import os import logging from six import itervalues, iterlists import connexion from werkzeug.utils import secure_filename def visit(d, op): """Recursively call op(d) for all list subelements and dictionary 'values' that d may have.""" op(d) if isinstance(d, list): for...
38.019802
113
0.507552
import tempfile import json import os import logging from six import itervalues, iterlists import connexion from werkzeug.utils import secure_filename def visit(d, op): op(d) if isinstance(d, list): for i in d: visit(i, op) elif isinstance(d, dict): for i in itervalues(d): ...
true
true
f720e41f86ef851d3645b1502f4b7c42729748ba
27,550
py
Python
autosklearn/smbo.py
a1rb4Ck/auto-sklearn
cdf48b82632927ec56c8c14258c0bfc4c6b2e7d1
[ "BSD-3-Clause" ]
null
null
null
autosklearn/smbo.py
a1rb4Ck/auto-sklearn
cdf48b82632927ec56c8c14258c0bfc4c6b2e7d1
[ "BSD-3-Clause" ]
null
null
null
autosklearn/smbo.py
a1rb4Ck/auto-sklearn
cdf48b82632927ec56c8c14258c0bfc4c6b2e7d1
[ "BSD-3-Clause" ]
null
null
null
import json import os import time import traceback import warnings import numpy as np import pynisher from smac.facade.smac_facade import SMAC from smac.optimizer.objective import average_cost from smac.runhistory.runhistory import RunHistory from smac.runhistory.runhistory2epm import RunHistory2EPM4Cost from smac.sc...
41.742424
92
0.59147
import json import os import time import traceback import warnings import numpy as np import pynisher from smac.facade.smac_facade import SMAC from smac.optimizer.objective import average_cost from smac.runhistory.runhistory import RunHistory from smac.runhistory.runhistory2epm import RunHistory2EPM4Cost from smac.sc...
true
true
f720e4b13eef675ed79b1d8f5021f8b090a3e097
3,223
py
Python
harbor/datadog_checks/harbor/config_models/defaults.py
codylerum/integrations-core
aee18148cebf5026099abde7bc218d3ba8d2e75c
[ "BSD-3-Clause" ]
null
null
null
harbor/datadog_checks/harbor/config_models/defaults.py
codylerum/integrations-core
aee18148cebf5026099abde7bc218d3ba8d2e75c
[ "BSD-3-Clause" ]
null
null
null
harbor/datadog_checks/harbor/config_models/defaults.py
codylerum/integrations-core
aee18148cebf5026099abde7bc218d3ba8d2e75c
[ "BSD-3-Clause" ]
null
null
null
# (C) Datadog, Inc. 2021-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from datadog_checks.base.utils.models.fields import get_default_field_value def shared_proxy(field, value): return get_default_field_value(field, value) def shared_service(field, value): return...
20.018634
75
0.779398
from datadog_checks.base.utils.models.fields import get_default_field_value def shared_proxy(field, value): return get_default_field_value(field, value) def shared_service(field, value): return get_default_field_value(field, value) def shared_skip_proxy(field, value): return False def shared_time...
true
true
f720e4c382207e660d60cd12f08779e19473e3fd
6,078
py
Python
extras/mako/lookup.py
konker/pysmsd
ecf7583ca27e0f5e762154ae4e0a5b5601d53fba
[ "MIT" ]
1
2017-09-02T06:48:02.000Z
2017-09-02T06:48:02.000Z
extras/mako/lookup.py
sizzlelab/pysmsd
b670018fb421229591784faacdc19ec95d49f907
[ "MIT" ]
null
null
null
extras/mako/lookup.py
sizzlelab/pysmsd
b670018fb421229591784faacdc19ec95d49f907
[ "MIT" ]
null
null
null
# lookup.py # Copyright (C) 2006, 2007, 2008 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import os, stat, posixpath, re from mako import exceptions, util from mako.template import Template try: i...
44.364964
482
0.636723
import os, stat, posixpath, re from mako import exceptions, util from mako.template import Template try: import threading except: import dummy_threading as threading class TemplateCollection(object): def has_template(self, uri): try: self.get_template(uri) return ...
false
true
f720e54b8a4add55c8bb4945dbfdd8f7cd946e00
790
py
Python
st2common/st2common/exceptions/ssh.py
kkkanil/st2
07cd195d7a6e177a37dd019e5c9ab8329259d0fa
[ "Apache-2.0" ]
null
null
null
st2common/st2common/exceptions/ssh.py
kkkanil/st2
07cd195d7a6e177a37dd019e5c9ab8329259d0fa
[ "Apache-2.0" ]
15
2021-02-11T22:58:54.000Z
2021-08-06T18:03:47.000Z
st2common/st2common/exceptions/ssh.py
kkkanil/st2
07cd195d7a6e177a37dd019e5c9ab8329259d0fa
[ "Apache-2.0" ]
1
2021-07-10T15:02:29.000Z
2021-07-10T15:02:29.000Z
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
29.259259
74
0.764557
__all__ = [ 'InvalidCredentialsException' ] class InvalidCredentialsException(Exception): pass class NoHostsConnectedToException(Exception): pass
true
true
f720e5c38c523665abca1c94ba91d51a3d76168c
18,992
py
Python
flytekit/common/launch_plan.py
tnsetting/flytekit
4782264ffbc4bfdbaabe7a789a9ad76cb7e5499e
[ "Apache-2.0" ]
null
null
null
flytekit/common/launch_plan.py
tnsetting/flytekit
4782264ffbc4bfdbaabe7a789a9ad76cb7e5499e
[ "Apache-2.0" ]
null
null
null
flytekit/common/launch_plan.py
tnsetting/flytekit
4782264ffbc4bfdbaabe7a789a9ad76cb7e5499e
[ "Apache-2.0" ]
null
null
null
import datetime as _datetime import logging as _logging import uuid as _uuid import six as _six from deprecated import deprecated as _deprecated from flytekit.common import interface as _interface from flytekit.common import nodes as _nodes from flytekit.common import promise as _promises from flytekit.common import ...
40.15222
120
0.662647
import datetime as _datetime import logging as _logging import uuid as _uuid import six as _six from deprecated import deprecated as _deprecated from flytekit.common import interface as _interface from flytekit.common import nodes as _nodes from flytekit.common import promise as _promises from flytekit.common import ...
true
true
f720e5c62f21e8d5ff58e6fa829b2e05a1daba2e
3,614
py
Python
model_v2/synthetic_data.py
suchir/passenger_screening_algorithm_challenge
65e3e3ce1889e9a100f6b9b6a53fe5c785a84612
[ "MIT" ]
7
2018-02-05T01:57:30.000Z
2019-06-25T08:00:40.000Z
model_v2/synthetic_data.py
suchir/passenger_screening_algorithm_challenge
65e3e3ce1889e9a100f6b9b6a53fe5c785a84612
[ "MIT" ]
1
2018-05-07T15:28:29.000Z
2018-05-07T15:28:29.000Z
model_v2/synthetic_data.py
suchir/passenger_screening_algorithm_challenge
65e3e3ce1889e9a100f6b9b6a53fe5c785a84612
[ "MIT" ]
3
2018-05-16T03:50:44.000Z
2018-08-20T12:40:58.000Z
from common.caching import read_input_dir, cached, read_log_dir from common.dataio import get_aps_data_hdf5, get_passenger_clusters, get_data from . import dataio from collections import defaultdict import numpy as np import skimage.transform import skimage.io import skimage.color import glob import os import tqdm im...
31.426087
92
0.571942
from common.caching import read_input_dir, cached, read_log_dir from common.dataio import get_aps_data_hdf5, get_passenger_clusters, get_data from . import dataio from collections import defaultdict import numpy as np import skimage.transform import skimage.io import skimage.color import glob import os import tqdm im...
true
true