hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f775af7b63e18dad8207f9f7dd1e02c4684bcc5e
49
py
Python
deploy/secrets.example.py
PurdueIEEE/IEEE-Deploy
7e7bf8674f6a49c5f61c27c00705a089330301d9
[ "Apache-2.0" ]
1
2021-08-30T20:51:30.000Z
2021-08-30T20:51:30.000Z
deploy/secrets.example.py
PurdueIEEE/IEEE-Deploy
7e7bf8674f6a49c5f61c27c00705a089330301d9
[ "Apache-2.0" ]
2
2021-09-12T04:18:34.000Z
2021-10-17T03:21:04.000Z
deploy/secrets.example.py
PurdueIEEE/IEEE-Deploy
7e7bf8674f6a49c5f61c27c00705a089330301d9
[ "Apache-2.0" ]
null
null
null
# Example of secrets file token = b'tokenstring'
16.333333
25
0.755102
token = b'tokenstring'
true
true
f775b02f9e7b2239d67f2e27173b3a947ec4c14d
5,765
py
Python
pball_gen.py
npaler01/npc_bot
c457d43be2359bf835ee6196b95bb3e93d2484e8
[ "MIT" ]
null
null
null
pball_gen.py
npaler01/npc_bot
c457d43be2359bf835ee6196b95bb3e93d2484e8
[ "MIT" ]
null
null
null
pball_gen.py
npaler01/npc_bot
c457d43be2359bf835ee6196b95bb3e93d2484e8
[ "MIT" ]
null
null
null
# coding: utf-8 #import sys # to get OS import pdb # for debugging from random import choice # TODO def input_number(prompt, min_value, max_value): value = None while value is None: try: value = int(raw_input(prompt)) except ValueError: print 'Please enter a numb...
27.065728
110
0.50026
import pdb from random import choice def input_number(prompt, min_value, max_value): value = None while value is None: try: value = int(raw_input(prompt)) except ValueError: print 'Please enter a number!' if value < min_value or value > max_value: ...
false
true
f775b3288e8731fdcf1476c2582a0e96a50fc1db
488
py
Python
01_hello/hello.py
flyingdutch20/tiny_python_projects
49c355041c5b700b9ece5085fda66dda6b59a6a3
[ "MIT" ]
null
null
null
01_hello/hello.py
flyingdutch20/tiny_python_projects
49c355041c5b700b9ece5085fda66dda6b59a6a3
[ "MIT" ]
null
null
null
01_hello/hello.py
flyingdutch20/tiny_python_projects
49c355041c5b700b9ece5085fda66dda6b59a6a3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Author: Ted Bracht <ted@bracht.uk> Purpose: Shout hello to the world """ import argparse def get_args(): parser = argparse.ArgumentParser(description="Say hello") parser.add_argument("-n", "--name", metavar="name", default="World", help="Name to greet") r...
21.217391
62
0.606557
import argparse def get_args(): parser = argparse.ArgumentParser(description="Say hello") parser.add_argument("-n", "--name", metavar="name", default="World", help="Name to greet") return parser.parse_args() def main(): args = get_args() print("Hello, " + args.name + "!")...
true
true
f775b3cda7bb91d8884f15c4a04be048632d4156
6,532
py
Python
scripts/get_niskin_data.py
SIOS-Svalbard/darwinsheet
7ac85861156ca195c8a3563df0f08a141d805384
[ "Apache-2.0" ]
1
2018-06-22T06:41:38.000Z
2018-06-22T06:41:38.000Z
scripts/get_niskin_data.py
SIOS-Svalbard/darwinsheet
7ac85861156ca195c8a3563df0f08a141d805384
[ "Apache-2.0" ]
7
2018-11-22T14:10:32.000Z
2021-01-29T09:49:53.000Z
scripts/get_niskin_data.py
SIOS-Svalbard/darwinsheet
7ac85861156ca195c8a3563df0f08a141d805384
[ "Apache-2.0" ]
2
2019-04-24T09:38:05.000Z
2020-09-18T11:03:21.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jul 21 08:24:22 2021 @author: lukem """ import pandas as pd import os import sys import re import uuid import requests import os.path aen_config_dir = (os.path.abspath( os.path.join(os.path.dirname(__file__), '..'))) sys.path.append(aen_config_di...
29.690909
115
0.609461
import pandas as pd import os import sys import re import uuid import requests import os.path aen_config_dir = (os.path.abspath( os.path.join(os.path.dirname(__file__), '..'))) sys.path.append(aen_config_dir+'/scripts') import toktlogger_json_to_df as tl btl_files_folder = '/home/pal/kph-ctd/' columns = [ ...
true
true
f775b42e070d968268335a5ac955ba193395114a
20,471
py
Python
src/datasets/utils/py_utils.py
NihalHarish/datasets
67574a8d74796bc065a8b9b49ec02f7b1200c172
[ "Apache-2.0" ]
9
2021-04-26T14:43:52.000Z
2021-11-08T09:47:24.000Z
src/datasets/utils/py_utils.py
NihalHarish/datasets
67574a8d74796bc065a8b9b49ec02f7b1200c172
[ "Apache-2.0" ]
null
null
null
src/datasets/utils/py_utils.py
NihalHarish/datasets
67574a8d74796bc065a8b9b49ec02f7b1200c172
[ "Apache-2.0" ]
1
2020-09-04T02:33:51.000Z
2020-09-04T02:33:51.000Z
# coding=utf-8 # Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets 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/LI...
35.851138
116
0.624542
import contextlib import functools import itertools import os import pickle import sys import types from io import BytesIO as StringIO from multiprocessing import Pool, RLock from shutil import disk_usage from types import CodeType, FunctionType from typing import Callable, ClassVar, Generic, Optional, Tuple, Union ...
true
true
f775b493cd5ef366dccdba3f4a87c4acf083f24a
908
py
Python
tests/unit/trace_test.py
amedveshchek/minio-py
a3d7ca17e32457a8479a540b970baa101dcb1720
[ "Apache-2.0" ]
null
null
null
tests/unit/trace_test.py
amedveshchek/minio-py
a3d7ca17e32457a8479a540b970baa101dcb1720
[ "Apache-2.0" ]
null
null
null
tests/unit/trace_test.py
amedveshchek/minio-py
a3d7ca17e32457a8479a540b970baa101dcb1720
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # MinIO Python Library for Amazon S3 Compatible Cloud Storage, # (C) 2015, 2016 MinIO, 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.o...
33.62963
74
0.741189
from nose.tools import raises from unittest import TestCase from minio import Minio class TraceTest(TestCase): @raises(ValueError) def test_bucket_is_string(self): client = Minio('localhost:9000') client.trace_on(None)
true
true
f775b4db0100fb898a17c98c8c05ee5ad09ff8a6
4,498
py
Python
DOTA_devkit/DOTA.py
zhaogev5/BBAVectors-Oriented-Object-Detection
b9e86404082761dd49a652670898f6d3a98c30aa
[ "MIT" ]
null
null
null
DOTA_devkit/DOTA.py
zhaogev5/BBAVectors-Oriented-Object-Detection
b9e86404082761dd49a652670898f6d3a98c30aa
[ "MIT" ]
null
null
null
DOTA_devkit/DOTA.py
zhaogev5/BBAVectors-Oriented-Object-Detection
b9e86404082761dd49a652670898f6d3a98c30aa
[ "MIT" ]
null
null
null
#The code is used for visulization, inspired from cocoapi # Licensed under the Simplified BSD License [see bsd.txt] import os import matplotlib.pyplot as plt from matplotlib.collections import PatchCollection from matplotlib.patches import Polygon, Circle import numpy as np import dota_utils as util from collections ...
34.868217
88
0.585371
import os import matplotlib.pyplot as plt from matplotlib.collections import PatchCollection from matplotlib.patches import Polygon, Circle import numpy as np import dota_utils as util from collections import defaultdict import cv2 def _isArrayLike(obj): if type(obj) == str: return False return hasatt...
true
true
f775b602a5a3c552181f935b0cdc940d84e85813
208
py
Python
services/catalog/src/simcore_service_catalog/main.py
colinRawlings/osparc-simcore
bf2f18d5bc1e574d5f4c238d08ad15156184c310
[ "MIT" ]
25
2018-04-13T12:44:12.000Z
2022-03-12T15:01:17.000Z
services/catalog/src/simcore_service_catalog/main.py
colinRawlings/osparc-simcore
bf2f18d5bc1e574d5f4c238d08ad15156184c310
[ "MIT" ]
2,553
2018-01-18T17:11:55.000Z
2022-03-31T16:26:40.000Z
services/catalog/src/simcore_service_catalog/main.py
mrnicegyu11/osparc-simcore
b6fa6c245dbfbc18cc74a387111a52de9b05d1f4
[ "MIT" ]
20
2018-01-18T19:45:33.000Z
2022-03-29T07:08:47.000Z
"""Main application to be deployed in for example uvicorn. """ from fastapi import FastAPI from simcore_service_catalog.core.application import init_app # SINGLETON FastAPI app the_app: FastAPI = init_app()
26
61
0.802885
from fastapi import FastAPI from simcore_service_catalog.core.application import init_app the_app: FastAPI = init_app()
true
true
f775b6d733d9c7799718db9685e10d0dee030ac1
884
py
Python
pandas/core/array_algos/transforms.py
mojones/pandas
3d4f9dc19d784526f71a197bfb6e36b0409e0760
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
6
2021-01-06T04:28:46.000Z
2021-11-24T01:40:20.000Z
pandas/core/array_algos/transforms.py
mojones/pandas
3d4f9dc19d784526f71a197bfb6e36b0409e0760
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
3
2020-03-09T13:15:03.000Z
2020-03-20T10:07:10.000Z
pandas/core/array_algos/transforms.py
mojones/pandas
3d4f9dc19d784526f71a197bfb6e36b0409e0760
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2020-06-19T11:52:05.000Z
2020-06-19T11:52:05.000Z
""" transforms.py is for shape-preserving functions. """ import numpy as np from pandas.core.dtypes.common import ensure_platform_int def shift(values: np.ndarray, periods: int, axis: int, fill_value) -> np.ndarray: new_values = values # make sure array sent to np.roll is c_contiguous f_ordered = value...
26
81
0.684389
import numpy as np from pandas.core.dtypes.common import ensure_platform_int def shift(values: np.ndarray, periods: int, axis: int, fill_value) -> np.ndarray: new_values = values f_ordered = values.flags.f_contiguous if f_ordered: new_values = new_values.T axis = new_values.ndim - a...
true
true
f775b7a6cab8dbfae6b7eeb4c7551b25be4fbbeb
624
py
Python
codeforces/747A.py
italo-batista/problems-solving
f83ad34f0abebd52925c4020635556f20743ba06
[ "MIT" ]
null
null
null
codeforces/747A.py
italo-batista/problems-solving
f83ad34f0abebd52925c4020635556f20743ba06
[ "MIT" ]
null
null
null
codeforces/747A.py
italo-batista/problems-solving
f83ad34f0abebd52925c4020635556f20743ba06
[ "MIT" ]
null
null
null
import math # CRIVO m = 10 ** 6 + 10 eh_primo = [True] * m eh_primo[0] = False eh_primo[1] = False for i in xrange(int(math.sqrt(m))): if eh_primo[i]: for j in xrange(i * i, m, i): eh_primo[j] = False # ------------ n = int(raw_input()) a = int(math.sqrt(n)) b = int(math.sqrt(n)) if eh_pr...
14.511628
37
0.427885
import math m = 10 ** 6 + 10 eh_primo = [True] * m eh_primo[0] = False eh_primo[1] = False for i in xrange(int(math.sqrt(m))): if eh_primo[i]: for j in xrange(i * i, m, i): eh_primo[j] = False n = int(raw_input()) a = int(math.sqrt(n)) b = int(math.sqrt(n)) if eh_primo[n]: print 1,n ...
false
true
f775b906e3d1e2ce13aef133b6b5c6c8ca254652
1,220
py
Python
tests/tabulation/adiabatic_slfm/rebless.py
sandialabs/Spitfire
65670e3ba5d1ccb4ac72524b77957706345c5bf6
[ "Apache-2.0" ]
11
2020-03-20T02:10:17.000Z
2021-12-14T10:08:09.000Z
tests/tabulation/adiabatic_slfm/rebless.py
sandialabs/Spitfire
65670e3ba5d1ccb4ac72524b77957706345c5bf6
[ "Apache-2.0" ]
18
2020-03-18T18:58:56.000Z
2021-12-21T02:35:35.000Z
tests/tabulation/adiabatic_slfm/rebless.py
sandialabs/Spitfire
65670e3ba5d1ccb4ac72524b77957706345c5bf6
[ "Apache-2.0" ]
2
2021-05-31T17:24:56.000Z
2021-06-20T05:27:41.000Z
from os.path import abspath, join def run(): from spitfire.chemistry.mechanism import ChemicalMechanismSpec from spitfire.chemistry.tabulation import build_adiabatic_slfm_library import spitfire.chemistry.analysis as sca import numpy as np test_xml = abspath(join('tests', 'test_mechanisms', 'h2-b...
35.882353
133
0.710656
from os.path import abspath, join def run(): from spitfire.chemistry.mechanism import ChemicalMechanismSpec from spitfire.chemistry.tabulation import build_adiabatic_slfm_library import spitfire.chemistry.analysis as sca import numpy as np test_xml = abspath(join('tests', 'test_mechanisms', 'h2-b...
true
true
f775b997b3475935390c99168c02ac6d888ce4b2
5,397
py
Python
Packs/Arduino/Integrations/Arduino/Arduino.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Arduino/Integrations/Arduino/Arduino.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Arduino/Integrations/Arduino/Arduino.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import socket import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 ''' CONSTANTS ''' ''' CLIENT CLASS ''' class Server(): def __init__(self, host, port): self.host = host self.port = port self.validate() def validate(self): is_ip = Fals...
30.491525
106
0.607189
import socket import demistomock as demisto from CommonServerPython import * class Server(): def __init__(self, host, port): self.host = host self.port = port self.validate() def validate(self): is_ip = False try: socket.inet_aton(self.host) ...
true
true
f775ba14aea25fd4d1b6363ebad258dcf0e4906f
8,709
py
Python
wbb/__main__.py
dashezup/WilliamButcherBot
57b5dde08cdf12d19164d750446c5c1ea00a7d9b
[ "MIT" ]
null
null
null
wbb/__main__.py
dashezup/WilliamButcherBot
57b5dde08cdf12d19164d750446c5c1ea00a7d9b
[ "MIT" ]
null
null
null
wbb/__main__.py
dashezup/WilliamButcherBot
57b5dde08cdf12d19164d750446c5c1ea00a7d9b
[ "MIT" ]
2
2021-07-03T03:05:03.000Z
2021-12-04T08:26:10.000Z
""" MIT License Copyright (c) 2021 TheHamkerCat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
34.019531
134
0.587898
import asyncio import importlib import re import uvloop from pyrogram import filters, idle from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup from wbb import BOT_NAME, BOT_USERNAME, USERBOT_NAME, aiohttpsession, app, app2 from wbb.modules import ALL_MODULES from wbb.modules.sudoers import bot_sys_s...
true
true
f775ba214f2cd28aebab80df1550e120b0801ac7
943
py
Python
test/test_login_response.py
peacemakr-io/peacemakr-python-sdk
180bbc2e480ea855dddf0e28c2f27e83a17bfb84
[ "Apache-2.0" ]
3
2020-01-27T10:07:29.000Z
2021-05-17T16:45:59.000Z
test/test_login_response.py
peacemakr-io/peacemakr-python-sdk
180bbc2e480ea855dddf0e28c2f27e83a17bfb84
[ "Apache-2.0" ]
7
2020-06-24T03:55:36.000Z
2021-03-30T00:43:51.000Z
test/test_login_response.py
peacemakr-io/peacemakr-python-sdk
180bbc2e480ea855dddf0e28c2f27e83a17bfb84
[ "Apache-2.0" ]
1
2021-04-27T04:12:30.000Z
2021-04-27T04:12:30.000Z
# coding: utf-8 """ Peacemakr This API describes the Peacemakr services, which enable seamless application layer encryption and verification. # noqa: E501 OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import i...
23
129
0.711559
from __future__ import absolute_import import unittest import peacemakr from peacemakr.generated.models.login_response import LoginResponse from peacemakr.generated.rest import ApiException class TestLoginResponse(unittest.TestCase): def setUp(self): pass def tearDown(self): pass ...
true
true
f775ba9fffc8fdf718e4e5b682460718c3ff5c1a
11,713
py
Python
code/python/Vault/v3/fds/sdk/Vault/model/vault_date_parameters.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
6
2022-02-07T16:34:18.000Z
2022-03-30T08:04:57.000Z
code/python/Vault/v3/fds/sdk/Vault/model/vault_date_parameters.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
2
2022-02-07T05:25:57.000Z
2022-03-07T14:18:04.000Z
code/python/Vault/v3/fds/sdk/Vault/model/vault_date_parameters.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
null
null
null
""" Vault API Allow clients to fetch Analytics through APIs. # noqa: E501 The version of the OpenAPI document: v3 Contact: analytics.api.support@factset.com Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from fds.sdk.Vault.model_utils import (...
42.904762
121
0.569965
import re import sys from fds.sdk.Vault.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, OpenA...
true
true
f775bb47c03e1c40b045a709723eb7c18ad0df33
4,131
py
Python
examples/app/api.py
XAVILLA/nbdt
8016a8a57259cfa9f2cb7f872b44bcfde3eed614
[ "MIT" ]
536
2020-04-02T04:48:54.000Z
2022-03-31T06:50:01.000Z
examples/app/api.py
XAVILLA/nbdt
8016a8a57259cfa9f2cb7f872b44bcfde3eed614
[ "MIT" ]
26
2020-04-24T14:29:19.000Z
2022-03-09T13:00:00.000Z
examples/app/api.py
XAVILLA/nbdt
8016a8a57259cfa9f2cb7f872b44bcfde3eed614
[ "MIT" ]
113
2020-04-21T06:28:05.000Z
2022-03-30T14:29:52.000Z
"""Single-file example for serving an NBDT model. This functions as a simple single-endpoint API, using flask. """ from flask import Flask, flash, request, redirect, url_for, jsonify from flask_cors import CORS from nbdt.model import HardNBDT from nbdt.models import wrn28_10_cifar10 from torchvision import transform...
33.048
179
0.61099
from flask import Flask, flash, request, redirect, url_for, jsonify from flask_cors import CORS from nbdt.model import HardNBDT from nbdt.models import wrn28_10_cifar10 from torchvision import transforms from nbdt.utils import DATASET_TO_CLASSES, load_image_from_path from nbdt.thirdparty.wn import maybe_install_wordn...
true
true
f775bba75090f26c83271c864aeed9adde0a2a41
5,393
py
Python
app/models/chia.py
sparklyballs/machinaris
466394f28b97c3535c753c307cbecf5f77c0a156
[ "Apache-2.0" ]
null
null
null
app/models/chia.py
sparklyballs/machinaris
466394f28b97c3535c753c307cbecf5f77c0a156
[ "Apache-2.0" ]
null
null
null
app/models/chia.py
sparklyballs/machinaris
466394f28b97c3535c753c307cbecf5f77c0a156
[ "Apache-2.0" ]
null
null
null
import os from datetime import datetime from app import app from app import utils # Treat *.plot files smaller than this as in-transit (copying) so don't count them MINIMUM_K32_PLOT_SIZE_BYTES = 100 * 1024 * 1024 class FarmSummary: def __init__(self, cli_stdout=None, farm_plots=None): if cli_stdout: ...
38.798561
104
0.511589
import os from datetime import datetime from app import app from app import utils MINIMUM_K32_PLOT_SIZE_BYTES = 100 * 1024 * 1024 class FarmSummary: def __init__(self, cli_stdout=None, farm_plots=None): if cli_stdout: for line in cli_stdout: if "status" in line: ...
true
true
f775bc30b4d09d921339cf7b8243cc4ceb8d6cfa
3,610
py
Python
paz/processors/__init__.py
mohanrobotics/paz
eb691527a94aa9a9f1599726efa2628f4dfa4daa
[ "MIT" ]
1
2021-01-09T13:03:04.000Z
2021-01-09T13:03:04.000Z
paz/processors/__init__.py
mohanrobotics/paz
eb691527a94aa9a9f1599726efa2628f4dfa4daa
[ "MIT" ]
null
null
null
paz/processors/__init__.py
mohanrobotics/paz
eb691527a94aa9a9f1599726efa2628f4dfa4daa
[ "MIT" ]
null
null
null
# imports are done directly to keep user's auto-complete clean from .detection import SquareBoxes2D from .detection import DenormalizeBoxes2D from .detection import RoundBoxes2D from .detection import ClipBoxes2D from .detection import FilterClassBoxes2D from .detection import CropBoxes2D from .detection import ToBoxe...
31.946903
62
0.851801
from .detection import SquareBoxes2D from .detection import DenormalizeBoxes2D from .detection import RoundBoxes2D from .detection import ClipBoxes2D from .detection import FilterClassBoxes2D from .detection import CropBoxes2D from .detection import ToBoxes2D from .detection import MatchBoxes from .detection import En...
true
true
f775bcb0dfef5c21145af99988a8b5106a954557
215
py
Python
build.py
ecashptyltd/conan-zlib
ba9875be3e1a6f31bc8f86c99e9fc80be5a1fab8
[ "MIT" ]
7
2018-04-09T08:38:28.000Z
2020-06-23T07:41:11.000Z
build.py
ecashptyltd/conan-zlib
ba9875be3e1a6f31bc8f86c99e9fc80be5a1fab8
[ "MIT" ]
37
2018-02-09T10:19:07.000Z
2019-06-19T10:02:49.000Z
build.py
ecashptyltd/conan-zlib
ba9875be3e1a6f31bc8f86c99e9fc80be5a1fab8
[ "MIT" ]
48
2018-02-08T14:50:37.000Z
2021-01-25T12:12:25.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from cpt.packager import ConanMultiPackager if __name__ == "__main__": builder = ConanMultiPackager() builder.add_common_builds(pure_c=True) builder.run()
21.5
43
0.702326
from cpt.packager import ConanMultiPackager if __name__ == "__main__": builder = ConanMultiPackager() builder.add_common_builds(pure_c=True) builder.run()
true
true
f775bd1b2feedc64f4a72db1da14daf1f1fea459
5,772
py
Python
Django_mask_attendance/main_base/face_verification.py
me-grimjoww/Covid-Sutra
ef07bf61ae3b1adc19affe5e040a9ba2f06fb5a8
[ "MIT" ]
3
2021-08-02T08:44:18.000Z
2021-10-15T01:43:35.000Z
Django_mask_attendance/main_base/face_verification.py
me-grimjoww/Covid-Sutra
ef07bf61ae3b1adc19affe5e040a9ba2f06fb5a8
[ "MIT" ]
null
null
null
Django_mask_attendance/main_base/face_verification.py
me-grimjoww/Covid-Sutra
ef07bf61ae3b1adc19affe5e040a9ba2f06fb5a8
[ "MIT" ]
null
null
null
import os from django.urls import path, include import face_recognition import cv2 from imutils.video import VideoStream import imutils import numpy as np from tensorflow.keras.models import load_model from tensorflow.keras.applications.mobilenet_v2 import preprocess_input from tensorflow.keras.preprocessin...
37
110
0.609148
import os from django.urls import path, include import face_recognition import cv2 from imutils.video import VideoStream import imutils import numpy as np from tensorflow.keras.models import load_model from tensorflow.keras.applications.mobilenet_v2 import preprocess_input from tensorflow.keras.preprocessin...
true
true
f775bd875cd85a9532efcef7f794fe7dfab8885e
1,387
py
Python
src/stations/station_map.py
ganemone/sublime-bart
1fcd72062914891cffac840d814eb129ebd43edf
[ "MIT" ]
6
2015-02-22T17:40:33.000Z
2016-07-11T19:18:37.000Z
src/stations/station_map.py
ganemone/sublime-bart
1fcd72062914891cffac840d814eb129ebd43edf
[ "MIT" ]
null
null
null
src/stations/station_map.py
ganemone/sublime-bart
1fcd72062914891cffac840d814eb129ebd43edf
[ "MIT" ]
1
2017-07-06T15:27:20.000Z
2017-07-06T15:27:20.000Z
station_map = { '12th': '12th St. Oakland City Center', '16th': '16th St. Mission (SF)', '19th': '19th St. Oakland', '24th': '24th St. Mission (SF)', 'ashb': 'Ashby (Berkeley)', 'balb': 'Balboa Park (SF)', 'bayf': 'Bay Fair (San Leandro)', 'cast': 'Castro Valley', 'civc': 'Civic Cent...
29.510638
43
0.545061
station_map = { '12th': '12th St. Oakland City Center', '16th': '16th St. Mission (SF)', '19th': '19th St. Oakland', '24th': '24th St. Mission (SF)', 'ashb': 'Ashby (Berkeley)', 'balb': 'Balboa Park (SF)', 'bayf': 'Bay Fair (San Leandro)', 'cast': 'Castro Valley', 'civc': 'Civic Cent...
true
true
f775bd8f2068d94e96f82b18f8f8b500e5927161
4,324
py
Python
accounts/migrations/0001_initial.py
kumaraditya303/Django-Rest-Accounts
13a738787d944920979ea3f6cbf5ea8e513a0762
[ "MIT" ]
2
2020-10-09T14:19:00.000Z
2021-02-26T03:04:34.000Z
accounts/migrations/0001_initial.py
kumaraditya303/Django-Rest-Accounts
13a738787d944920979ea3f6cbf5ea8e513a0762
[ "MIT" ]
23
2020-10-09T14:43:42.000Z
2021-06-25T15:44:50.000Z
accounts/migrations/0001_initial.py
kumaraditya303/Django-Rest-Accounts
13a738787d944920979ea3f6cbf5ea8e513a0762
[ "MIT" ]
null
null
null
# Generated by Django 3.1 on 2020-08-25 06:00 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ("auth", "0012_alter_user_first_name_max_length"), ] operations = [ migrations.CreateModel( ...
35.154472
138
0.383904
from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ("auth", "0012_alter_user_first_name_max_length"), ] operations = [ migrations.CreateModel( name="User", fields=[ ...
true
true
f775bdab8aacee5a514c9622fdc676f510a95763
5,664
py
Python
tests/functional/modules/ims_command/create_query_delete/test_create_delete_tran.py
thedoubl3j/ibm_zos_ims
89ca4e80e4b6592807b96f8b329a10d149e0c4a3
[ "Apache-2.0" ]
7
2020-05-13T15:57:44.000Z
2022-01-15T00:30:10.000Z
tests/functional/modules/ims_command/create_query_delete/test_create_delete_tran.py
thedoubl3j/ibm_zos_ims
89ca4e80e4b6592807b96f8b329a10d149e0c4a3
[ "Apache-2.0" ]
64
2020-04-24T09:40:10.000Z
2022-03-21T08:51:58.000Z
tests/functional/modules/ims_command/create_query_delete/test_create_delete_tran.py
thedoubl3j/ibm_zos_ims
89ca4e80e4b6592807b96f8b329a10d149e0c4a3
[ "Apache-2.0" ]
7
2020-05-19T02:32:40.000Z
2021-04-07T07:37:30.000Z
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) from ansible_collections.ibm.ibm_zos_ims.plugins.module_utils.ims_module_error_messages import ErrorMessages as em # pylint: disable=import-error from pprint import pprint import pytest __metaclass__ = type SUCCESSFUL_RC = '0...
48.410256
152
0.706744
from __future__ import (absolute_import, division, print_function) from ansible_collections.ibm.ibm_zos_ims.plugins.module_utils.ims_module_error_messages import ErrorMessages as em from pprint import pprint import pytest __metaclass__ = type SUCCESSFUL_RC = '00000000' SUCCESSFUL_CC = '0' PLEX = "PLEX1" ROUTE = "IM...
true
true
f775bdf1f51cc4f9db715c84675d96ecb2b1be2a
5,461
py
Python
scripts/type_x509.py
kinkerl/lua-resty-openssl
187116dcbfff908e8dc69249d494896eec0bf1e5
[ "BSD-2-Clause" ]
null
null
null
scripts/type_x509.py
kinkerl/lua-resty-openssl
187116dcbfff908e8dc69249d494896eec0bf1e5
[ "BSD-2-Clause" ]
null
null
null
scripts/type_x509.py
kinkerl/lua-resty-openssl
187116dcbfff908e8dc69249d494896eec0bf1e5
[ "BSD-2-Clause" ]
null
null
null
import extension_struct as es defines = { "output": "../lib/resty/openssl/x509/init.lua", "output_test": "../t/openssl/x509.t", "type": "X509", "has_extension_accessor_by_nid": True, "extensions_in_struct":"cert_info.extensions", "has_sign_verify": True, "sample": "Github.pem", "sample_...
29.360215
190
0.67625
import extension_struct as es defines = { "output": "../lib/resty/openssl/x509/init.lua", "output_test": "../t/openssl/x509.t", "type": "X509", "has_extension_accessor_by_nid": True, "extensions_in_struct":"cert_info.extensions", "has_sign_verify": True, "sample": "Github.pem", "sample_...
true
true
f775bdf4f8c0a1120137a1ed19008d5badeb091d
2,191
py
Python
tooling/lambda/aws_slack_controller_bot.py
cappetta/Toolbox
43b5d2371dde91ecebcbb9d13d9197e1bbbb9780
[ "MIT" ]
21
2018-08-06T12:17:12.000Z
2021-11-16T16:33:52.000Z
tooling/lambda/aws_slack_controller_bot.py
cappetta/Toolbox
43b5d2371dde91ecebcbb9d13d9197e1bbbb9780
[ "MIT" ]
1
2017-11-27T05:35:45.000Z
2018-09-03T02:45:36.000Z
tooling/lambda/aws_slack_controller_bot.py
cappetta/Toolbox
43b5d2371dde91ecebcbb9d13d9197e1bbbb9780
[ "MIT" ]
10
2018-04-27T14:02:06.000Z
2021-11-16T09:33:56.000Z
# coding=utf-8 import os import boto3 import urlparse """ Required Lambda Environment Variables: - slacktoken: Your private Slack App Verification Token - allowed_users: List of Slack user_ids id1,id2,... """ # original reference source: https://dev.solita.fi/2018/08/16/easy-test-deployments-round-two.html def dep...
40.574074
129
0.620265
import os import boto3 import urlparse """ Required Lambda Environment Variables: - slacktoken: Your private Slack App Verification Token - allowed_users: List of Slack user_ids id1,id2,... """ def deploy(branch, response_url): lam = boto3.client('lambda', region_name='eu-central-1') lam.invoke(FunctionName...
false
true
f775bee7d5d5eac1a3fa092e140dab2f15ca07ba
2,726
py
Python
mdevices/ocr/evaluation/testes/tasks/fes/generator.py
rcarvs/android-ocr
f8760afd378607ced0beca0b2c1beda14ea4ab49
[ "MIT" ]
null
null
null
mdevices/ocr/evaluation/testes/tasks/fes/generator.py
rcarvs/android-ocr
f8760afd378607ced0beca0b2c1beda14ea4ab49
[ "MIT" ]
null
null
null
mdevices/ocr/evaluation/testes/tasks/fes/generator.py
rcarvs/android-ocr
f8760afd378607ced0beca0b2c1beda14ea4ab49
[ "MIT" ]
null
null
null
from sys import argv script, filename = argv file = open(filename,'w') file.write("__kernel void identification( __global uint *trainData, __global uint *dataSize, __global uint *changes, __global uint *changesSize, __global uint *rotule, __global uint *result){ /*first pass is normalize the trainData passing the no...
170.375
909
0.665444
from sys import argv script, filename = argv file = open(filename,'w') file.write("__kernel void identification( __global uint *trainData, __global uint *dataSize, __global uint *changes, __global uint *changesSize, __global uint *rotule, __global uint *result){ /*first pass is normalize the trainData passing the no...
true
true
f775bf8efe1707890ce1a239e6d5dfd57f06df6b
890
py
Python
source/clcd.py
fgulan/masters-seminar
cd14b305170fa619dc6e6cc9661fa213822e4faa
[ "MIT" ]
null
null
null
source/clcd.py
fgulan/masters-seminar
cd14b305170fa619dc6e6cc9661fa213822e4faa
[ "MIT" ]
null
null
null
source/clcd.py
fgulan/masters-seminar
cd14b305170fa619dc6e6cc9661fa213822e4faa
[ "MIT" ]
null
null
null
import sys import cro_mapper import os import unicodedata import numpy as np from scipy import misc def _get_all_file_paths(path): file_paths = [] for root, dirs, files in os.walk(path): for file_ in files: full_path = os.path.join(root, file_) if os.path.isfile(full_path) and f...
29.666667
74
0.644944
import sys import cro_mapper import os import unicodedata import numpy as np from scipy import misc def _get_all_file_paths(path): file_paths = [] for root, dirs, files in os.walk(path): for file_ in files: full_path = os.path.join(root, file_) if os.path.isfile(full_path) and f...
true
true
f775bfaaa78c7b23a7b9c35f0426d7e9eae11174
3,887
py
Python
app/gan_app.py
Praveenstein/bigGanMicro
d669874c0226907fa41b2140cdc8c46bdef2a283
[ "MIT" ]
2
2021-02-16T13:38:37.000Z
2021-05-03T11:27:21.000Z
app/gan_app.py
Praveenstein/bigGanMicro
d669874c0226907fa41b2140cdc8c46bdef2a283
[ "MIT" ]
1
2021-05-08T18:22:15.000Z
2021-05-08T18:22:15.000Z
app/gan_app.py
Praveenstein/bigGanMicro
d669874c0226907fa41b2140cdc8c46bdef2a283
[ "MIT" ]
2
2021-05-23T05:48:24.000Z
2021-06-05T05:29:13.000Z
import numpy as np import os import json from PIL import Image import pickle import streamlit as st from streamlit.hashing import _CodeHasher from streamlit.report_thread import get_report_ctx from streamlit.server.server import Server import sys import urllib import torch import random import biggan from torchvision.u...
42.25
144
0.678158
import numpy as np import os import json from PIL import Image import pickle import streamlit as st from streamlit.hashing import _CodeHasher from streamlit.report_thread import get_report_ctx from streamlit.server.server import Server import sys import urllib import torch import random import biggan from torchvision.u...
true
true
f775c07a4c2eb7cf870f020d6c7582bd879acda7
37,903
py
Python
venv/Lib/site-packages/sqlalchemy/orm/util.py
sunausti/mywebdemo
884bcf3b68e0063dcb08c602f0dc784753ec8a87
[ "Apache-2.0" ]
1
2021-11-11T08:52:09.000Z
2021-11-11T08:52:09.000Z
venv/Lib/site-packages/sqlalchemy/orm/util.py
sunausti/mywebdemo
884bcf3b68e0063dcb08c602f0dc784753ec8a87
[ "Apache-2.0" ]
null
null
null
venv/Lib/site-packages/sqlalchemy/orm/util.py
sunausti/mywebdemo
884bcf3b68e0063dcb08c602f0dc784753ec8a87
[ "Apache-2.0" ]
null
null
null
# orm/util.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from .. import sql, util, event, exc as sa_exc, inspection from ..sql import expression...
36.692159
79
0.633274
from .. import sql, util, event, exc as sa_exc, inspection from ..sql import expression, util as sql_util, operators from .interfaces import PropComparator, MapperProperty from . import attributes import re from .base import instance_str, state_str, state_class_str, attribute_str, \ state_attribute_str, object_m...
true
true
f775c13a4ce9e285d99b225e28144cc058d6efb0
858
py
Python
snowddl/converter/database.py
littleK0i/SnowDDL
b24cb3676e41fec8876d61a101ba242e7272a18f
[ "Apache-2.0" ]
21
2022-02-10T16:52:03.000Z
2022-03-18T15:27:18.000Z
snowddl/converter/database.py
littleK0i/SnowDDL
b24cb3676e41fec8876d61a101ba242e7272a18f
[ "Apache-2.0" ]
null
null
null
snowddl/converter/database.py
littleK0i/SnowDDL
b24cb3676e41fec8876d61a101ba242e7272a18f
[ "Apache-2.0" ]
1
2022-03-05T11:02:42.000Z
2022-03-05T11:02:42.000Z
from snowddl.blueprint import ObjectType from snowddl.converter.abc_converter import AbstractConverter, ConvertResult from snowddl.parser.database import database_json_schema class DatabaseConverter(AbstractConverter): def get_object_type(self) -> ObjectType: return ObjectType.DATABASE def get_existi...
31.777778
88
0.706294
from snowddl.blueprint import ObjectType from snowddl.converter.abc_converter import AbstractConverter, ConvertResult from snowddl.parser.database import database_json_schema class DatabaseConverter(AbstractConverter): def get_object_type(self) -> ObjectType: return ObjectType.DATABASE def get_existi...
true
true
f775c1966f7d64d2f08e00e309405d96493cf059
859
py
Python
tests/imperial_calendar/internal/test_ImperialMonth.py
ne-sachirou/martian_imperial_year_table
8bc7c43b5219eb0c3334f1f55aa6528a035bad97
[ "Unlicense" ]
null
null
null
tests/imperial_calendar/internal/test_ImperialMonth.py
ne-sachirou/martian_imperial_year_table
8bc7c43b5219eb0c3334f1f55aa6528a035bad97
[ "Unlicense" ]
334
2019-05-06T07:34:02.000Z
2021-09-20T01:26:27.000Z
tests/imperial_calendar/internal/test_ImperialMonth.py
c4se-jp/martian_imperial_year_table
bb44def3273e65e226354119c837a66e5fa81051
[ "Unlicense" ]
null
null
null
"""Test ImperialMonth.""" from imperial_calendar.internal.ImperialMonth import ImperialMonth import unittest class TestImperialMonth(unittest.TestCase): """Test ImperialMonth.""" def test_days(self): """この月の日數.""" for (month, days) in [ (1, 28), (2, 28), (...
22.025641
66
0.362049
from imperial_calendar.internal.ImperialMonth import ImperialMonth import unittest class TestImperialMonth(unittest.TestCase): def test_days(self): for (month, days) in [ (1, 28), (2, 28), (3, 28), (4, 28), (5, 28), (6, 27), ...
true
true
f775c2c80860934315a23e6793a8b05a79c53c3a
15,661
py
Python
gen/argo/events/client/models/v1alpha1_github_event_source.py
argoproj-labs/argo-events-client-python
3d6e3dffca4a12a490c2963f4ac90c8894948bb5
[ "Apache-2.0" ]
null
null
null
gen/argo/events/client/models/v1alpha1_github_event_source.py
argoproj-labs/argo-events-client-python
3d6e3dffca4a12a490c2963f4ac90c8894948bb5
[ "Apache-2.0" ]
null
null
null
gen/argo/events/client/models/v1alpha1_github_event_source.py
argoproj-labs/argo-events-client-python
3d6e3dffca4a12a490c2963f4ac90c8894948bb5
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Argo Events No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.0.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six fr...
32.424431
306
0.63457
import pprint import re import six from argo.events.client.configuration import Configuration class V1alpha1GithubEventSource(object): openapi_types = { 'active': 'bool', 'api_token': 'V1SecretKeySelector', 'content_type': 'str', 'delete_hook_on_finish': 'bool', 'eve...
true
true
f775c43c44966075773d68c90fe278771fef3c64
693
py
Python
interview 02.01. Remove Duplicate Node LCCI/Solution.py
furutuki/LeetCodeSolution
db5e6573d0c907dfa3e6ad5e5b3b5ff9944a4f53
[ "MIT" ]
null
null
null
interview 02.01. Remove Duplicate Node LCCI/Solution.py
furutuki/LeetCodeSolution
db5e6573d0c907dfa3e6ad5e5b3b5ff9944a4f53
[ "MIT" ]
null
null
null
interview 02.01. Remove Duplicate Node LCCI/Solution.py
furutuki/LeetCodeSolution
db5e6573d0c907dfa3e6ad5e5b3b5ff9944a4f53
[ "MIT" ]
null
null
null
# Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: def removeDuplicateNodes(self, head: ListNode) -> ListNode: if not head or not head.next: return head f = [False for i in range(20001)] ...
22.354839
63
0.531025
class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: def removeDuplicateNodes(self, head: ListNode) -> ListNode: if not head or not head.next: return head f = [False for i in range(20001)] f[head.val] = True prev_no...
true
true
f775c44637015bd78b0a945ce8f5155652cde2fa
6,703
py
Python
vendor/github.com/google/certificate-transparency/python/ct/client/db/sqlite_log_db.py
weltonrodrigo/origin
075680352a29112ec40a1a9ab3e63665aa5dd143
[ "Apache-2.0" ]
807
2015-01-03T09:12:09.000Z
2022-03-31T14:59:13.000Z
vendor/github.com/google/certificate-transparency/python/ct/client/db/sqlite_log_db.py
weltonrodrigo/origin
075680352a29112ec40a1a9ab3e63665aa5dd143
[ "Apache-2.0" ]
845
2015-01-02T02:03:18.000Z
2022-03-16T09:12:55.000Z
vendor/github.com/google/certificate-transparency/python/ct/client/db/sqlite_log_db.py
weltonrodrigo/origin
075680352a29112ec40a1a9ab3e63665aa5dd143
[ "Apache-2.0" ]
313
2015-01-08T07:50:30.000Z
2022-03-03T14:25:46.000Z
import logging import sqlite3 import time from ct.client.db import log_db from ct.client.db import database from ct.proto import client_pb2 class SQLiteLogDB(log_db.LogDB): def __init__(self, connection_manager): """Initialize the database and tables. Args: connection_manager: an SQLit...
44.098684
85
0.602417
import logging import sqlite3 import time from ct.client.db import log_db from ct.client.db import database from ct.proto import client_pb2 class SQLiteLogDB(log_db.LogDB): def __init__(self, connection_manager): self.__mgr = connection_manager with self.__mgr.get_connection() as conn: ...
true
true
f775c456ae3320dbcd6878222da0ac01f90b9a55
2,087
py
Python
homework_2/tests/test_4.py
mag-id/epam_python_autumn_2020
2488817ba039f5722030a23edc97abe9f70a9a30
[ "MIT" ]
null
null
null
homework_2/tests/test_4.py
mag-id/epam_python_autumn_2020
2488817ba039f5722030a23edc97abe9f70a9a30
[ "MIT" ]
null
null
null
homework_2/tests/test_4.py
mag-id/epam_python_autumn_2020
2488817ba039f5722030a23edc97abe9f70a9a30
[ "MIT" ]
null
null
null
""" Unit tests for module `homework_2.tasks.task_4`. """ from typing import Any, Callable, Tuple import pytest from homework_2.tasks.task_4 import cache @pytest.mark.parametrize( ["function", "args"], [ pytest.param( lambda a, b: (a ** b) ** 2, (100, 200), id="Com...
26.75641
88
0.621466
from typing import Any, Callable, Tuple import pytest from homework_2.tasks.task_4 import cache @pytest.mark.parametrize( ["function", "args"], [ pytest.param( lambda a, b: (a ** b) ** 2, (100, 200), id="Common case: cache(lambda ... ) returns same result.", ...
true
true
f775c49c0af9cb408df69d4f06e741af3089371a
821
py
Python
launcher/kowalski.py
guynir42/fritz
6f155e4a115155d06884a3eb6426bc732f6d3461
[ "BSD-3-Clause" ]
12
2020-03-04T21:30:42.000Z
2021-07-14T21:39:09.000Z
launcher/kowalski.py
guynir42/fritz
6f155e4a115155d06884a3eb6426bc732f6d3461
[ "BSD-3-Clause" ]
232
2020-03-18T10:18:04.000Z
2022-03-31T03:53:58.000Z
launcher/kowalski.py
guynir42/fritz
6f155e4a115155d06884a3eb6426bc732f6d3461
[ "BSD-3-Clause" ]
23
2020-02-13T20:30:33.000Z
2022-03-16T16:18:25.000Z
import datetime from typing import Optional def generate_token( user_id: str, jwt_secret: str, jwt_algorithm: str = "HS256", jwt_exp_delta_seconds: Optional[int] = None, ): """ Generate a token for SkyPortal to access Kowalski """ import jwt jwt_config = { "user_id": user_...
24.878788
73
0.64799
import datetime from typing import Optional def generate_token( user_id: str, jwt_secret: str, jwt_algorithm: str = "HS256", jwt_exp_delta_seconds: Optional[int] = None, ): import jwt jwt_config = { "user_id": user_id, "JWT_SECRET": jwt_secret, "JWT_ALGORITHM": jwt_alg...
true
true
f775c4fb3feb391273907f579d4f44c759e7d858
103
py
Python
krypton/src/classes/Line.py
beratcmn/krypton
1aa68d0190595c72fbb9fd3c476ea4fe9484cd6d
[ "MIT" ]
1
2021-11-10T22:28:49.000Z
2021-11-10T22:28:49.000Z
krypton/src/classes/Line.py
beratcmn/krypton
1aa68d0190595c72fbb9fd3c476ea4fe9484cd6d
[ "MIT" ]
3
2021-11-14T23:48:56.000Z
2022-03-30T21:10:08.000Z
krypton/src/classes/Line.py
beratcmn/krypton
1aa68d0190595c72fbb9fd3c476ea4fe9484cd6d
[ "MIT" ]
null
null
null
from dataclasses import dataclass @dataclass class Line: line: int level: int value: str
11.444444
33
0.68932
from dataclasses import dataclass @dataclass class Line: line: int level: int value: str
true
true
f775c52e3078e3c03940d11e85e5b5968d687e32
33,615
py
Python
app/views/questionnaire.py
nealedj/eq-survey-runner
b8e6cddae6068f6c8fd60e21d31d58aaa79bbb34
[ "MIT" ]
null
null
null
app/views/questionnaire.py
nealedj/eq-survey-runner
b8e6cddae6068f6c8fd60e21d31d58aaa79bbb34
[ "MIT" ]
1
2018-11-05T12:00:51.000Z
2018-11-05T12:00:51.000Z
app/views/questionnaire.py
nealedj/eq-survey-runner
b8e6cddae6068f6c8fd60e21d31d58aaa79bbb34
[ "MIT" ]
null
null
null
import re from collections import defaultdict from datetime import datetime, timedelta from functools import wraps import humanize import simplejson as json from dateutil.tz import tzutc from flask import Blueprint, g, redirect, request, url_for, current_app, jsonify from flask import session as cookie_session from fl...
43.096154
159
0.727443
import re from collections import defaultdict from datetime import datetime, timedelta from functools import wraps import humanize import simplejson as json from dateutil.tz import tzutc from flask import Blueprint, g, redirect, request, url_for, current_app, jsonify from flask import session as cookie_session from fl...
true
true
f775c63e63d430ad40d6e1e4f3fc52432b49fbbd
1,247
py
Python
fry_oil.py
KysonnDelaCerna/GIMP-Scripts
b7d879369d678e615df1c1fdbf73a02d73415b0d
[ "MIT" ]
1
2022-01-02T14:37:20.000Z
2022-01-02T14:37:20.000Z
fry_oil.py
KysonnDelaCerna/GIMP-Scripts
b7d879369d678e615df1c1fdbf73a02d73415b0d
[ "MIT" ]
null
null
null
fry_oil.py
KysonnDelaCerna/GIMP-Scripts
b7d879369d678e615df1c1fdbf73a02d73415b0d
[ "MIT" ]
null
null
null
#!/usr/bin/env python from gimpfu import * import math def fry_oil(img, layer) : gimp.progress_init("Frying oiling " + layer.name + "...") pdb.gimp_image_undo_group_start(img) pos = pdb.gimp_image_get_layer_position(img, layer) magenta = pdb.gimp_layer_copy(layer, True) pdb.gimp_layer_set_name(mag...
32.815789
102
0.677626
from gimpfu import * import math def fry_oil(img, layer) : gimp.progress_init("Frying oiling " + layer.name + "...") pdb.gimp_image_undo_group_start(img) pos = pdb.gimp_image_get_layer_position(img, layer) magenta = pdb.gimp_layer_copy(layer, True) pdb.gimp_layer_set_name(magenta, layer.name + " M...
true
true
f775c6f8c907ddb7e89bc977c7e63be3ce76d5e9
19
py
Python
service/__init__.py
abuonomo/concept-tagging-api
217bb8b84de8479bff1227a008ee91da45de558a
[ "MIT" ]
10
2020-06-16T16:02:14.000Z
2021-11-07T12:56:48.000Z
service/__init__.py
abuonomo/concept-tagging-api
217bb8b84de8479bff1227a008ee91da45de558a
[ "MIT" ]
4
2020-06-19T13:17:10.000Z
2020-09-21T02:15:18.000Z
service/__init__.py
abuonomo/concept-tagging-api
217bb8b84de8479bff1227a008ee91da45de558a
[ "MIT" ]
8
2020-06-16T16:38:03.000Z
2021-09-13T02:09:27.000Z
import service.app
9.5
18
0.842105
import service.app
true
true
f775c8066ca8f52d20722541d030deafa4f6ae13
1,180
py
Python
WEB/Python CGI/linux-cmd-python-cgi-master/web.py
Shokr/Python_Playbook
e29ba874890349742f198982cc40763b30a58842
[ "MIT" ]
12
2020-04-05T10:01:11.000Z
2022-02-05T08:11:54.000Z
WEB/Python CGI/linux-cmd-python-cgi-master/web.py
Shokr/Python_Playbook
e29ba874890349742f198982cc40763b30a58842
[ "MIT" ]
null
null
null
WEB/Python CGI/linux-cmd-python-cgi-master/web.py
Shokr/Python_Playbook
e29ba874890349742f198982cc40763b30a58842
[ "MIT" ]
6
2020-04-03T22:24:34.000Z
2022-01-28T12:22:34.000Z
#!/usr/bin/python3 import subprocess import cgi print("content-type: text/html") print() mydata = cgi.FieldStorage() myx = mydata.getvalue("c") myy = mydata.getvalue("d") if myx == str(1): output = subprocess.getoutput("sudo date") print(output) elif myx == str(2): output = subprocess.getoutput("sudo cal...
25.106383
68
0.664407
import subprocess import cgi print("content-type: text/html") print() mydata = cgi.FieldStorage() myx = mydata.getvalue("c") myy = mydata.getvalue("d") if myx == str(1): output = subprocess.getoutput("sudo date") print(output) elif myx == str(2): output = subprocess.getoutput("sudo cal") print(output...
true
true
f775c8aab2c03aa0859c56da897f9638ebb1d2ca
1,619
py
Python
Multithreading/Status.py
mangomangomango0820/multi-processing-threading
f54c5131d648c9cb6d828700e9641b5b5b982a2f
[ "MIT" ]
null
null
null
Multithreading/Status.py
mangomangomango0820/multi-processing-threading
f54c5131d648c9cb6d828700e9641b5b5b982a2f
[ "MIT" ]
null
null
null
Multithreading/Status.py
mangomangomango0820/multi-processing-threading
f54c5131d648c9cb6d828700e9641b5b5b982a2f
[ "MIT" ]
null
null
null
# _*_coding : UTF_8 _*_ # Author : Xueshan Zhang # Date : 2022/1/22 2:59 PM # File : Status.py # Tool : PyCharm # Reference : __repr__ << Thread << threading.py import threading import time, os def Subthread(n): for i in range(n): print('is going to sleep', i, 's.') time.sleep(i)...
27.913793
90
0.519456
import threading import time, os def Subthread(n): for i in range(n): print('is going to sleep', i, 's.') time.sleep(i) def _get_status(thread=None): if not thread.is_alive(): if thread._is_stopped: return 'stopped' else: return 'initial' else: ...
true
true
f775c9b84c077a9f49d54105f033a2f0d65dc18a
464
py
Python
data/scripts/templates/object/building/general/shared_bunker_rebel_deep_chasm.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/building/general/shared_bunker_rebel_deep_chasm.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/building/general/shared_bunker_rebel_deep_chasm.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Building() result.template = "object/building/general/shared_bunker_rebel_deep_chasm.iff" result.attribute_templa...
27.294118
79
0.737069
from swgpy.object import * def create(kernel): result = Building() result.template = "object/building/general/shared_bunker_rebel_deep_chasm.iff" result.attribute_template_id = -1 result.stfName("building_name","bunker_imperial") return result
true
true
f775c9f689bfc087dae8bdb25d1cd48072e78520
1,138
py
Python
root/settings/__init__.py
daniel-waruo/e-commerse-api
6b080039398fb4099a34335317d649dd67783f63
[ "Apache-2.0" ]
6
2019-11-21T10:09:49.000Z
2021-06-19T09:52:59.000Z
root/settings/__init__.py
daniel-waruo/e-commerse-api
6b080039398fb4099a34335317d649dd67783f63
[ "Apache-2.0" ]
null
null
null
root/settings/__init__.py
daniel-waruo/e-commerse-api
6b080039398fb4099a34335317d649dd67783f63
[ "Apache-2.0" ]
null
null
null
""" This is a django-split-settings main file. For more information read this: https://github.com/sobolevn/django-split-settings Default environment is `development`. To change settings file: `DJANGO_ENV=production python manage.py runserver` """ import django_heroku from split_settings.tools import include base_set...
30.756757
62
0.745167
import django_heroku from split_settings.tools import include base_settings = [ 'components/middleware.py', 'components/apps.py', 'components/database.py', 'components/pyuploadcare.py', 'components/rest_framework.py', 'components/allauth.py', 'components/currency.py', 'components...
true
true
f775ca07f21275417cd0515cfc6d1162872a5404
3,047
py
Python
jina/types/sets/document_set.py
mahdinezhadasad/jina
ec68c65ac34b86ac88e49207017827ad610b25d9
[ "Apache-2.0" ]
null
null
null
jina/types/sets/document_set.py
mahdinezhadasad/jina
ec68c65ac34b86ac88e49207017827ad610b25d9
[ "Apache-2.0" ]
null
null
null
jina/types/sets/document_set.py
mahdinezhadasad/jina
ec68c65ac34b86ac88e49207017827ad610b25d9
[ "Apache-2.0" ]
null
null
null
from collections.abc import MutableSequence from typing import Iterable, Union, Sequence from google.protobuf.pyext._message import RepeatedCompositeContainer from ...proto.jina_pb2 import DocumentProto if False: from ..document import Document __all__ = ['DocumentSet'] class DocumentSet(MutableSequence): ...
33.483516
94
0.634066
from collections.abc import MutableSequence from typing import Iterable, Union, Sequence from google.protobuf.pyext._message import RepeatedCompositeContainer from ...proto.jina_pb2 import DocumentProto if False: from ..document import Document __all__ = ['DocumentSet'] class DocumentSet(MutableSequence): ...
true
true
f775cc88e0e6d23c572a58125d3eaee7c458cf6d
1,948
py
Python
Code/Final/GridSearch/SVM.py
shivachawala/PumpItUp
41c8f3be0808009dbd13fda7a6f6f1ebfd916646
[ "MIT" ]
null
null
null
Code/Final/GridSearch/SVM.py
shivachawala/PumpItUp
41c8f3be0808009dbd13fda7a6f6f1ebfd916646
[ "MIT" ]
null
null
null
Code/Final/GridSearch/SVM.py
shivachawala/PumpItUp
41c8f3be0808009dbd13fda7a6f6f1ebfd916646
[ "MIT" ]
2
2018-05-06T04:26:49.000Z
2019-01-03T00:09:34.000Z
# coding: utf-8 # In[ ]: #[GridSearch] SVM Learning Classification import pandas as pd import numpy as np import sys # Read dataset data_values = pd.read_csv("../../../Datasets/train_values_processed.csv") data_labels = data_values["status_group"] data_values.drop(['status_group'], axis=1, inplace=True) # In[ ]: ...
27.055556
110
0.643737
import pandas as pd import numpy as np import sys data_values = pd.read_csv("../../../Datasets/train_values_processed.csv") data_labels = data_values["status_group"] data_values.drop(['status_group'], axis=1, inplace=True) from sklearn import metrics from sklearn.metrics import classification_report from sklear...
true
true
f775cd45775171524de51a5d5f651c4bc433c18a
503
py
Python
trydjango/restaurants/migrations/0008_auto_20180628_0854.py
matija94/show-me-the-code
7e98b15da03712e28417f2c808c4324989ce9bd7
[ "MIT" ]
1
2017-07-10T21:05:46.000Z
2017-07-10T21:05:46.000Z
trydjango/restaurants/migrations/0008_auto_20180628_0854.py
matija94/show-me-the-code
7e98b15da03712e28417f2c808c4324989ce9bd7
[ "MIT" ]
null
null
null
trydjango/restaurants/migrations/0008_auto_20180628_0854.py
matija94/show-me-the-code
7e98b15da03712e28417f2c808c4324989ce9bd7
[ "MIT" ]
null
null
null
# Generated by Django 2.0.5 on 2018-06-28 08:54 from django.db import migrations, models import restaurants.validators class Migration(migrations.Migration): dependencies = [ ('restaurants', '0007_restaurant_owner'), ] operations = [ migrations.AlterField( model_name='restau...
25.15
129
0.66004
from django.db import migrations, models import restaurants.validators class Migration(migrations.Migration): dependencies = [ ('restaurants', '0007_restaurant_owner'), ] operations = [ migrations.AlterField( model_name='restaurant', name='category', ...
true
true
f775cf4fc3eb33ca2be5b2b54589e22a8c787967
22,288
py
Python
mmdet3d/datasets/lyft_dataset.py
maskjp/mmdetection3d
98f332372b1a4c82bc2d57588a5d764f4176c869
[ "Apache-2.0" ]
1
2022-03-04T19:29:42.000Z
2022-03-04T19:29:42.000Z
mmdet3d/datasets/lyft_dataset.py
maskjp/mmdetection3d
98f332372b1a4c82bc2d57588a5d764f4176c869
[ "Apache-2.0" ]
null
null
null
mmdet3d/datasets/lyft_dataset.py
maskjp/mmdetection3d
98f332372b1a4c82bc2d57588a5d764f4176c869
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import os import tempfile from os import path as osp import mmcv import numpy as np import pandas as pd from lyft_dataset_sdk.lyftdataset import LyftDataset as Lyft from lyft_dataset_sdk.utils.data_classes import Box as LyftBox from pyquaternion import Quaternion from m...
39.447788
82
0.569813
import os import tempfile from os import path as osp import mmcv import numpy as np import pandas as pd from lyft_dataset_sdk.lyftdataset import LyftDataset as Lyft from lyft_dataset_sdk.utils.data_classes import Box as LyftBox from pyquaternion import Quaternion from mmdet3d.core.evaluation.lyft_eval import lyft_eva...
true
true
f775d065b83915d830486569c7c726d27a8c636c
9,578
py
Python
run_scripts/screen_genes.py
CarmenSheppard/PneumoCaT2
c41fcb412e239042daaa95132b1469ba897894f6
[ "Unlicense" ]
null
null
null
run_scripts/screen_genes.py
CarmenSheppard/PneumoCaT2
c41fcb412e239042daaa95132b1469ba897894f6
[ "Unlicense" ]
null
null
null
run_scripts/screen_genes.py
CarmenSheppard/PneumoCaT2
c41fcb412e239042daaa95132b1469ba897894f6
[ "Unlicense" ]
null
null
null
"""python 3.7+ Run allele stage2_var_obj methods. Carmen Sheppard 2019-2022 """ import sys import os import exceptions from run_scripts.tools import run_mash_screen, create_dataframe, \ apply_filters, create_csv, get_variant_ids def sort_genes(gene, stage2_var_obj, allele_or_gene, session): """ ...
45.179245
125
0.600752
import sys import os import exceptions from run_scripts.tools import run_mash_screen, create_dataframe, \ apply_filters, create_csv, get_variant_ids def sort_genes(gene, stage2_var_obj, allele_or_gene, session): genename = gene.genes.gene_name if allele_or_gene == "allele": hit_gen...
true
true
f775d0d9b6e8bcc48c4b6b352f85720a11995446
5,999
py
Python
frappe/email/test_email_body.py
ektai/erp2Dodock
5ad64b01cba9b07437f9a27751101258679379e8
[ "MIT" ]
null
null
null
frappe/email/test_email_body.py
ektai/erp2Dodock
5ad64b01cba9b07437f9a27751101258679379e8
[ "MIT" ]
null
null
null
frappe/email/test_email_body.py
ektai/erp2Dodock
5ad64b01cba9b07437f9a27751101258679379e8
[ "MIT" ]
null
null
null
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest, os, base64 import frappe from frappe import safe_decode from frappe.email.receive import Email from frappe.email.email_body import (rep...
30.607143
98
0.712619
from __future__ import unicode_literals import unittest, os, base64 import frappe from frappe import safe_decode from frappe.email.receive import Email from frappe.email.email_body import (replace_filename_with_cid, get_email, inline_style_in_html, get_header) from frappe.email.queue import prepare_message, get_e...
true
true
f775d10fcaa4753f472d94dda425bca24aa5a388
1,195
py
Python
guimodulecanvas.py
anmol1455/python
8e3858bdebb21ec3c9e8147ceef17a82b4a36926
[ "bzip2-1.0.6" ]
null
null
null
guimodulecanvas.py
anmol1455/python
8e3858bdebb21ec3c9e8147ceef17a82b4a36926
[ "bzip2-1.0.6" ]
null
null
null
guimodulecanvas.py
anmol1455/python
8e3858bdebb21ec3c9e8147ceef17a82b4a36926
[ "bzip2-1.0.6" ]
null
null
null
import tkinter as tk from tkinter.ttk import * def f(): frame=tk.Tk() frame.geometry('1500x1500') c=tk.Canvas(frame,bg="white",height=1300,width=1200) return c,frame def circle(): c,e=f() c.create_oval(20,20,200,200,outline="red") c.pack() e.mainloop() def rect(): c,e=f() c.creat...
14.9375
92
0.570711
import tkinter as tk from tkinter.ttk import * def f(): frame=tk.Tk() frame.geometry('1500x1500') c=tk.Canvas(frame,bg="white",height=1300,width=1200) return c,frame def circle(): c,e=f() c.create_oval(20,20,200,200,outline="red") c.pack() e.mainloop() def rect(): c,e=f() c.creat...
true
true
f775d14650122d952d50dc593e39a735668b4db3
109,975
py
Python
kivy/uix/textinput.py
ChristopherGS/kivy
2e1db8d373eac585e23f54bfbd929e9c26fb68bd
[ "MIT" ]
null
null
null
kivy/uix/textinput.py
ChristopherGS/kivy
2e1db8d373eac585e23f54bfbd929e9c26fb68bd
[ "MIT" ]
null
null
null
kivy/uix/textinput.py
ChristopherGS/kivy
2e1db8d373eac585e23f54bfbd929e9c26fb68bd
[ "MIT" ]
1
2019-04-12T05:43:48.000Z
2019-04-12T05:43:48.000Z
# -*- encoding: utf-8 -*- ''' Text Input ========== .. versionadded:: 1.0.4 .. image:: images/textinput-mono.jpg .. image:: images/textinput-multi.jpg The :class:`TextInput` widget provides a box for editable plain text. Unicode, multiline, cursor navigation, selection and clipboard features are supported. The :cl...
35.225817
80
0.572721
__all__ = ('TextInput', ) import re import sys from os import environ from weakref import ref from kivy.animation import Animation from kivy.base import EventLoop from kivy.cache import Cache from kivy.clock import Clock from kivy.config import Config from kivy.metrics import inch from kivy.utils import boundary, ...
true
true
f775d31a17434d00a3777379ed05c1d51a67bd32
3,571
py
Python
src/entailment/entailment_with_t5.py
Martin36/FEVER2021_SharedTask
4dd49e0ddf2909a93d44dab22eae988a067fc355
[ "MIT" ]
4
2021-09-25T16:12:27.000Z
2022-01-14T16:53:12.000Z
src/entailment/entailment_with_t5.py
Martin36/FEVER2021_SharedTask
4dd49e0ddf2909a93d44dab22eae988a067fc355
[ "MIT" ]
1
2021-09-22T07:31:26.000Z
2021-09-27T14:58:26.000Z
src/entailment/entailment_with_t5.py
Martin36/FEVER2021_SharedTask
4dd49e0ddf2909a93d44dab22eae988a067fc355
[ "MIT" ]
null
null
null
import argparse from collections import defaultdict import torch from transformers import T5ForConditionalGeneration, T5Tokenizer from tqdm import tqdm from util.util_funcs import load_jsonl model = T5ForConditionalGeneration.from_pretrained("t5-small") tokenizer = T5Tokenizer.from_pretrained("t5-small") MNLI_TO_FEV...
30.262712
83
0.609073
import argparse from collections import defaultdict import torch from transformers import T5ForConditionalGeneration, T5Tokenizer from tqdm import tqdm from util.util_funcs import load_jsonl model = T5ForConditionalGeneration.from_pretrained("t5-small") tokenizer = T5Tokenizer.from_pretrained("t5-small") MNLI_TO_FEV...
true
true
f775d3f072205dcad824d2cadd80bdd0adc2cb37
673
py
Python
main.py
astrocatalogs/tidaldisruptions
87558308b09c4d08a20dec141e438ccbcddb491b
[ "MIT" ]
2
2018-11-18T21:17:29.000Z
2022-01-25T18:29:10.000Z
main.py
astrocatalogs/tidaldisruptions
87558308b09c4d08a20dec141e438ccbcddb491b
[ "MIT" ]
5
2016-11-01T13:31:06.000Z
2022-03-28T18:35:21.000Z
main.py
astrocatalogs/tidaldisruptions
87558308b09c4d08a20dec141e438ccbcddb491b
[ "MIT" ]
1
2022-03-17T23:26:36.000Z
2022-03-17T23:26:36.000Z
"""Entry point for the Tidal Disruption Catalog """ def main(args, clargs, log): from .tidaldisruptioncatalog import TidalDisruptionCatalog from astrocats.catalog.argshandler import ArgsHandler # Create an `ArgsHandler` instance with the appropriate argparse machinery args_handler = ArgsHandler(log) ...
29.26087
78
0.735513
def main(args, clargs, log): from .tidaldisruptioncatalog import TidalDisruptionCatalog from astrocats.catalog.argshandler import ArgsHandler args_handler = ArgsHandler(log) args = args_handler.load_args(args=args, clargs=clargs) if args is None: return catalog = TidalDis...
true
true
f775d4bd1aa2b91b81764bd23cfdf76300824d62
3,280
gyp
Python
third_party/libxslt/libxslt.gyp
zachlatta/chromium
c4625eefca763df86471d798ee5a4a054b4716ae
[ "BSD-3-Clause" ]
1
2021-09-24T22:49:10.000Z
2021-09-24T22:49:10.000Z
third_party/libxslt/libxslt.gyp
changbai1980/chromium
c4625eefca763df86471d798ee5a4a054b4716ae
[ "BSD-3-Clause" ]
null
null
null
third_party/libxslt/libxslt.gyp
changbai1980/chromium
c4625eefca763df86471d798ee5a4a054b4716ae
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'conditions': [ ['OS=="linux"', {'os_include': 'linux'}], ['OS=="mac"', {'os_include': 'mac'}], ['OS=="win"', {'...
29.818182
85
0.453659
{ 'variables': { 'conditions': [ ['OS=="linux"', {'os_include': 'linux'}], ['OS=="mac"', {'os_include': 'mac'}], ['OS=="win"', {'os_include': 'win32'}], ], 'use_system_libxslt%': 0, }, 'includes': [ '../../build/common.gypi', ], 'targets': [ { 'target_name': 'libxs...
true
true
f775d5ed1224edd2a71c197e2553a05c5c5060fa
608
py
Python
tests/utility/__init__.py
gagan3012/gradsflow
230b13cebdaac86aadce10e640fd91679b9d042d
[ "Apache-2.0" ]
253
2021-08-17T17:42:25.000Z
2022-03-25T07:59:41.000Z
tests/utility/__init__.py
gagan3012/gradsflow
230b13cebdaac86aadce10e640fd91679b9d042d
[ "Apache-2.0" ]
161
2021-08-17T16:28:08.000Z
2022-03-27T02:36:45.000Z
tests/utility/__init__.py
gagan3012/gradsflow
230b13cebdaac86aadce10e640fd91679b9d042d
[ "Apache-2.0" ]
35
2021-08-23T16:26:15.000Z
2022-03-26T17:08:15.000Z
# Copyright (c) 2021 GradsFlow. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
43.428571
75
0.75
true
true
f775d79822c073bacc312571b0c3b0dc4309498a
20,091
py
Python
indy_common/types.py
burdettmary/indy-node
08a0b07a54dac1c77573c9edb2d74765d486fb3d
[ "Apache-2.0" ]
null
null
null
indy_common/types.py
burdettmary/indy-node
08a0b07a54dac1c77573c9edb2d74765d486fb3d
[ "Apache-2.0" ]
null
null
null
indy_common/types.py
burdettmary/indy-node
08a0b07a54dac1c77573c9edb2d74765d486fb3d
[ "Apache-2.0" ]
null
null
null
import json import sys from copy import deepcopy from hashlib import sha256 from common.exceptions import PlenumTypeError, PlenumValueError from plenum.common.constants import TARGET_NYM, NONCE, RAW, ENC, HASH, NAME, \ VERSION, FORCE, ORIGIN, OPERATION_SCHEMA_IS_STRICT, SCHEMA_IS_STRICT from plenum.common.message...
37.136784
120
0.684038
import json import sys from copy import deepcopy from hashlib import sha256 from common.exceptions import PlenumTypeError, PlenumValueError from plenum.common.constants import TARGET_NYM, NONCE, RAW, ENC, HASH, NAME, \ VERSION, FORCE, ORIGIN, OPERATION_SCHEMA_IS_STRICT, SCHEMA_IS_STRICT from plenum.common.message...
true
true
f775da1980b9bdff89966a457a428fcde123b6aa
1,191
py
Python
src/core/commands/run.py
cdev-framework/cdev-sdk
06cd7b40936ab063d1d8fd1a7d9f6882750e8a96
[ "BSD-3-Clause-Clear" ]
2
2022-02-28T02:51:59.000Z
2022-03-24T15:23:18.000Z
src/core/commands/run.py
cdev-framework/cdev-sdk
06cd7b40936ab063d1d8fd1a7d9f6882750e8a96
[ "BSD-3-Clause-Clear" ]
null
null
null
src/core/commands/run.py
cdev-framework/cdev-sdk
06cd7b40936ab063d1d8fd1a7d9f6882750e8a96
[ "BSD-3-Clause-Clear" ]
null
null
null
"""Utilities for running custom scripts """ from argparse import Namespace from core.constructs.workspace import Workspace from core.constructs.output_manager import OutputManager def execute_run_cli(args) -> None: ws = Workspace.instance() output_manager = OutputManager() run_command(ws, output_mana...
27.068182
121
0.699412
from argparse import Namespace from core.constructs.workspace import Workspace from core.constructs.output_manager import OutputManager def execute_run_cli(args) -> None: ws = Workspace.instance() output_manager = OutputManager() run_command(ws, output_manager, args) def run_command( workspace: ...
true
true
f775da1f2585944a84192b8f0f9d3e7c9e3bc136
1,496
py
Python
PyProject/ImageHemorrhage.py
dtysky/ImageHemorrhage
343678f427b5a1c5f4dc3b39270c35fe1f89d0a3
[ "MIT" ]
1
2022-03-18T00:25:56.000Z
2022-03-18T00:25:56.000Z
PyProject/ImageHemorrhage.py
dtysky/ImageHemorrhage
343678f427b5a1c5f4dc3b39270c35fe1f89d0a3
[ "MIT" ]
null
null
null
PyProject/ImageHemorrhage.py
dtysky/ImageHemorrhage
343678f427b5a1c5f4dc3b39270c35fe1f89d0a3
[ "MIT" ]
null
null
null
__author__ = 'Dai Tianyu (dtysky)' from PIL import Image import os,re def hemorrhage(im,border={'top':10,'bottom':10,'left':10,'right':10},opcity=0.5): opcity = int(opcity * 255) xsize,ysize = im.size im = im.convert('RGBA') res_xsize = xsize + border['left'] + border['right'] res_ysize = ysize + border['top'] +...
37.4
81
0.653075
__author__ = 'Dai Tianyu (dtysky)' from PIL import Image import os,re def hemorrhage(im,border={'top':10,'bottom':10,'left':10,'right':10},opcity=0.5): opcity = int(opcity * 255) xsize,ysize = im.size im = im.convert('RGBA') res_xsize = xsize + border['left'] + border['right'] res_ysize = ysize + border['top'] +...
true
true
f775dac90488385693eee777b67a221367d09ab5
18,065
py
Python
pkgs/statsmodels-0.6.1-np110py27_0/lib/python2.7/site-packages/statsmodels/emplike/aft_el.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
1
2016-09-02T20:31:32.000Z
2016-09-02T20:31:32.000Z
pkgs/statsmodels-0.6.1-np110py27_0/lib/python2.7/site-packages/statsmodels/emplike/aft_el.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
pkgs/statsmodels-0.6.1-np110py27_0/lib/python2.7/site-packages/statsmodels/emplike/aft_el.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
1
2021-05-02T10:50:15.000Z
2021-05-02T10:50:15.000Z
""" Accelerated Failure Time (AFT) Model with empirical likelihood inference. AFT regression analysis is applicable when the researcher has access to a randomly right censored dependent variable, a matrix of exogenous variables and an indicatior variable (delta) that takes a value of 0 if the observation is censored ...
32.201426
81
0.582397
import numpy as np from statsmodels.regression.linear_model import OLS, WLS from statsmodels.tools import add_constant from scipy import optimize from scipy.stats import chi2 from .descriptive import _OptFuncts import warnings from statsmodels.tools.sm_exceptions import IterationLimitWarning class OptAFT(_OptFuncts):...
true
true
f775dc556fc4fda6d8671bf77c7badc5385b5823
619
py
Python
fix_audios.py
faboyds/deepspeech.pytorch
d20f3510a3c556a07f5d662a91a63acffc26633b
[ "MIT" ]
null
null
null
fix_audios.py
faboyds/deepspeech.pytorch
d20f3510a3c556a07f5d662a91a63acffc26633b
[ "MIT" ]
null
null
null
fix_audios.py
faboyds/deepspeech.pytorch
d20f3510a3c556a07f5d662a91a63acffc26633b
[ "MIT" ]
null
null
null
from os import listdir, system from os.path import isfile, join def iterate_dir(path): for f in listdir(path): if isfile(join(path, f)): if f.endswith('.wav'): system('sox ' + path + '/' + f + ' out.wav remix 1') system('rm ' + path + '/' + f) sy...
25.791667
88
0.534733
from os import listdir, system from os.path import isfile, join def iterate_dir(path): for f in listdir(path): if isfile(join(path, f)): if f.endswith('.wav'): system('sox ' + path + '/' + f + ' out.wav remix 1') system('rm ' + path + '/' + f) sy...
true
true
f775de1c3f8a865a9b6f45b585a17ebbca5d4eba
2,727
py
Python
zerver/views/invite.py
Supermanu/zulip
26f6d708c2e30cfe50d9d61031edb759e8117596
[ "Apache-2.0" ]
null
null
null
zerver/views/invite.py
Supermanu/zulip
26f6d708c2e30cfe50d9d61031edb759e8117596
[ "Apache-2.0" ]
15
2020-06-05T18:44:15.000Z
2022-03-11T23:26:03.000Z
zerver/views/invite.py
Supermanu/zulip
26f6d708c2e30cfe50d9d61031edb759e8117596
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from django.conf import settings from django.core.exceptions import ValidationError from django.http import HttpRequest, HttpResponse from django.utils.translation import ugettext as _ from typing import List, Optional, Set, Text from zerver.decorator import authenticated_json_p...
41.953846
101
0.73634
from __future__ import absolute_import from django.conf import settings from django.core.exceptions import ValidationError from django.http import HttpRequest, HttpResponse from django.utils.translation import ugettext as _ from typing import List, Optional, Set, Text from zerver.decorator import authenticated_json_p...
true
true
f775e13fd1558ae3fae06d224e5a281541b24072
1,811
py
Python
setup.py
AntoineSIMTEK/NuMPI
1723ec17696d413867f4fcfc7ad6079adbef4e2b
[ "MIT" ]
null
null
null
setup.py
AntoineSIMTEK/NuMPI
1723ec17696d413867f4fcfc7ad6079adbef4e2b
[ "MIT" ]
null
null
null
setup.py
AntoineSIMTEK/NuMPI
1723ec17696d413867f4fcfc7ad6079adbef4e2b
[ "MIT" ]
null
null
null
# # Copyright 2019 Lars Pastewka # 2018-2019 Antoine Sanner # # ### MIT license # # 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...
37.729167
80
0.721149
from setuptools import setup, find_packages import versioneer setup( name="NuMPI", version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), package_data={'': ['ChangeLog.md']}, include_package_data=True, packages=find_packages(), python_requires='>=3.5.0', install_require...
true
true
f775e1538a0bf28bd5c543050c68484b4c24cb26
4,300
py
Python
Vision/classification/image/poseNet/train_oneflow.py
LiuHaolan/models
1639b3039237c3997c51ff87f0b6113bb2e8d236
[ "Apache-2.0" ]
43
2021-06-03T09:07:08.000Z
2022-03-31T15:21:48.000Z
Vision/classification/image/poseNet/train_oneflow.py
LiuHaolan/models
1639b3039237c3997c51ff87f0b6113bb2e8d236
[ "Apache-2.0" ]
64
2021-05-31T10:34:06.000Z
2022-01-17T03:44:58.000Z
Vision/classification/image/poseNet/train_oneflow.py
LiuHaolan/models
1639b3039237c3997c51ff87f0b6113bb2e8d236
[ "Apache-2.0" ]
37
2021-07-04T03:13:18.000Z
2022-03-25T07:30:47.000Z
import oneflow as flow import argparse import numpy as np import os import time from models.posenet import PoseNet from utils.ofrecord_data_utils import OFRecordDataLoader def _parse_args(): parser = argparse.ArgumentParser("flags for train posenet") parser.add_argument( "--save_checkpoint_path", ...
29.655172
88
0.589767
import oneflow as flow import argparse import numpy as np import os import time from models.posenet import PoseNet from utils.ofrecord_data_utils import OFRecordDataLoader def _parse_args(): parser = argparse.ArgumentParser("flags for train posenet") parser.add_argument( "--save_checkpoint_path", ...
true
true
f775e15b1b5de796d61bf655e2923f6caf9faaa7
3,666
py
Python
objectModel/Python/tests/persistence/cdmfolder/data_partition/test_data_partition.py
aaron-emde/CDM
9472e9c7694821ac4a9bbe608557d2e65aabc73e
[ "CC-BY-4.0", "MIT" ]
null
null
null
objectModel/Python/tests/persistence/cdmfolder/data_partition/test_data_partition.py
aaron-emde/CDM
9472e9c7694821ac4a9bbe608557d2e65aabc73e
[ "CC-BY-4.0", "MIT" ]
3
2021-05-11T23:57:12.000Z
2021-08-04T05:03:05.000Z
objectModel/Python/tests/persistence/cdmfolder/data_partition/test_data_partition.py
aaron-emde/CDM
9472e9c7694821ac4a9bbe608557d2e65aabc73e
[ "CC-BY-4.0", "MIT" ]
null
null
null
import os import unittest from cdm.enums import CdmObjectType, CdmStatusLevel from cdm.objectmodel import CdmCorpusContext, CdmCorpusDefinition from cdm.persistence.cdmfolder import ManifestPersistence from cdm.persistence.cdmfolder.types import ManifestContent from cdm.storage import LocalAdapter from tests.common i...
48.88
153
0.752319
import os import unittest from cdm.enums import CdmObjectType, CdmStatusLevel from cdm.objectmodel import CdmCorpusContext, CdmCorpusDefinition from cdm.persistence.cdmfolder import ManifestPersistence from cdm.persistence.cdmfolder.types import ManifestContent from cdm.storage import LocalAdapter from tests.common i...
true
true
f775e33d858f63c60608abc2c21cab4622e09d4b
1,504
py
Python
PythonAndOop/__init__.py
jiauy/before_work
644789ca36fbca6693df6e80d7580f3cb4bcac4b
[ "MIT" ]
null
null
null
PythonAndOop/__init__.py
jiauy/before_work
644789ca36fbca6693df6e80d7580f3cb4bcac4b
[ "MIT" ]
null
null
null
PythonAndOop/__init__.py
jiauy/before_work
644789ca36fbca6693df6e80d7580f3cb4bcac4b
[ "MIT" ]
1
2020-09-15T02:00:47.000Z
2020-09-15T02:00:47.000Z
import os files=os.listdir('.') packages = ['N10_inheritance_2', 'N11_polymorphism_1', 'N12_polymorphism_2', 'N13_inheriting_init_constructor_1', 'N14_multiple_inheritance_1', 'N15_multiple_inheritance_2', 'N16_multiple_inheritance_3', ...
32
48
0.559176
import os files=os.listdir('.') packages = ['N10_inheritance_2', 'N11_polymorphism_1', 'N12_polymorphism_2', 'N13_inheriting_init_constructor_1', 'N14_multiple_inheritance_1', 'N15_multiple_inheritance_2', 'N16_multiple_inheritance_3', ...
true
true
f775e4562eacd0123ca9d6bf456e82722b10d98f
5,223
py
Python
onlinecourse/migrations/0001_initial.py
abhishekRamesh8/developing-applications-with-sql-databases-and-django
deff02b9749eb080cca6bcb3ddd7b6093e41b061
[ "Apache-2.0" ]
null
null
null
onlinecourse/migrations/0001_initial.py
abhishekRamesh8/developing-applications-with-sql-databases-and-django
deff02b9749eb080cca6bcb3ddd7b6093e41b061
[ "Apache-2.0" ]
null
null
null
onlinecourse/migrations/0001_initial.py
abhishekRamesh8/developing-applications-with-sql-databases-and-django
deff02b9749eb080cca6bcb3ddd7b6093e41b061
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1.3 on 2021-05-22 14:08 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUT...
47.481818
210
0.585296
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ ...
true
true
f775e4ce0c731c9ec8d1c9ce4329795dc0d19498
1,127
py
Python
onadata/apps/fieldsight/migrations/0017_userinvites.py
awemulya/fieldsight-kobocat
f302d084e30fb637d43ec638c701e01a3dddc721
[ "BSD-2-Clause" ]
38
2017-02-28T05:39:40.000Z
2019-01-16T04:39:04.000Z
onadata/apps/fieldsight/migrations/0017_userinvites.py
awemulya/fieldsightt
f302d084e30fb637d43ec638c701e01a3dddc721
[ "BSD-2-Clause" ]
20
2017-04-27T09:14:27.000Z
2019-01-17T06:35:52.000Z
onadata/apps/fieldsight/migrations/0017_userinvites.py
awemulya/fieldsightt
f302d084e30fb637d43ec638c701e01a3dddc721
[ "BSD-2-Clause" ]
5
2017-02-22T12:25:19.000Z
2019-01-15T11:16:40.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auth', '0006_require_contenttypes_0002'), ('fieldsight', '0016_auto_20170706_1543'), ] operations = [ migrations.Cre...
40.25
147
0.624667
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auth', '0006_require_contenttypes_0002'), ('fieldsight', '0016_auto_20170706_1543'), ] operations = [ migrations.CreateModel( na...
true
true
f775e5512af807e543c3fbbfd00f983cb6d90a32
2,328
py
Python
tests/basics/TryYieldFinally.py
jayvdb/Nuitka
0ff702e065b1b53231ba0cae451385a3da0fe766
[ "Apache-2.0" ]
1
2019-03-31T09:56:11.000Z
2019-03-31T09:56:11.000Z
tests/basics/TryYieldFinally.py
jayvdb/Nuitka
0ff702e065b1b53231ba0cae451385a3da0fe766
[ "Apache-2.0" ]
null
null
null
tests/basics/TryYieldFinally.py
jayvdb/Nuitka
0ff702e065b1b53231ba0cae451385a3da0fe766
[ "Apache-2.0" ]
null
null
null
# Copyright 2019, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
24.505263
79
0.648625
def tryContinueFinallyTest(): for x in range(10): try: if x % 2 == 1: continue finally: yield x yield "-" def tryBreakFinallyTest(): for x in range(10): try: if x == 5: break finally: yield...
true
true
f775e5695b55da456d94f561e2259de347bddde1
2,044
py
Python
dj_starter/users/registration/views.py
zeenfaizpy/dj_starter
7548ff941d840a5748bf9dd22119389908461b43
[ "MIT" ]
null
null
null
dj_starter/users/registration/views.py
zeenfaizpy/dj_starter
7548ff941d840a5748bf9dd22119389908461b43
[ "MIT" ]
null
null
null
dj_starter/users/registration/views.py
zeenfaizpy/dj_starter
7548ff941d840a5748bf9dd22119389908461b43
[ "MIT" ]
null
null
null
from rest_framework import status from rest_framework.response import Response from rest_auth.registration.views import RegisterView as RestAuthRegisterView from rest_framework.views import APIView from rest_framework.permissions import AllowAny from allauth.account.models import EmailConfirmation, EmailConfirmationHMA...
38.566038
77
0.671233
from rest_framework import status from rest_framework.response import Response from rest_auth.registration.views import RegisterView as RestAuthRegisterView from rest_framework.views import APIView from rest_framework.permissions import AllowAny from allauth.account.models import EmailConfirmation, EmailConfirmationHMA...
true
true
f775e5dfb66675e0d47d90280cfc50d8ceaa7979
392
py
Python
configs/resnet34_custom.py
Obs01ete/pytorch-detection
4af02e232b38fd202bb348e9bbe7373c7eba165b
[ "MIT" ]
11
2018-07-24T09:31:19.000Z
2021-04-07T06:20:38.000Z
configs/resnet34_custom.py
Obs01ete/pytorch-detection
4af02e232b38fd202bb348e9bbe7373c7eba165b
[ "MIT" ]
null
null
null
configs/resnet34_custom.py
Obs01ete/pytorch-detection
4af02e232b38fd202bb348e9bbe7373c7eba165b
[ "MIT" ]
1
2019-07-10T05:48:15.000Z
2019-07-10T05:48:15.000Z
suffix = '' run_name = __name__.split('.')[-1] + suffix backbone_specs = { 'backbone_module': 'imagenet_models', 'backbone_function': 'resnet34_backbone', 'kwargs': { 'pretrained': False, 'channel_config': (1, 2, 2, 2), 'channel_multiplier': 64, }, 'head_channel_multiplier'...
20.631579
45
0.632653
suffix = '' run_name = __name__.split('.')[-1] + suffix backbone_specs = { 'backbone_module': 'imagenet_models', 'backbone_function': 'resnet34_backbone', 'kwargs': { 'pretrained': False, 'channel_config': (1, 2, 2, 2), 'channel_multiplier': 64, }, 'head_channel_multiplier'...
true
true
f775e61ac3c5b6ac80c6bf5114b5ee8604c8ee30
1,742
py
Python
src/catkin_pkg/__init__.py
tgpfeiffer/catkin_pkg
d936df0d5ffe731b1722989796deb2d71737a44e
[ "BSD-3-Clause" ]
null
null
null
src/catkin_pkg/__init__.py
tgpfeiffer/catkin_pkg
d936df0d5ffe731b1722989796deb2d71737a44e
[ "BSD-3-Clause" ]
null
null
null
src/catkin_pkg/__init__.py
tgpfeiffer/catkin_pkg
d936df0d5ffe731b1722989796deb2d71737a44e
[ "BSD-3-Clause" ]
null
null
null
# Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above...
44.666667
70
0.768083
__version__ = '0.4.14'
true
true
f775e6987bd9a0bc9c4b6f841156ee39f701459f
11,570
py
Python
oa/models.py
lastcc/OAHelper
2d58ac56b8e223aeefd5371d3eaf9ea8ac485735
[ "MIT" ]
null
null
null
oa/models.py
lastcc/OAHelper
2d58ac56b8e223aeefd5371d3eaf9ea8ac485735
[ "MIT" ]
null
null
null
oa/models.py
lastcc/OAHelper
2d58ac56b8e223aeefd5371d3eaf9ea8ac485735
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from bs4 import BeautifulSoup from log_config import logger class Struct(object): """ An object that has attributes built from the dictionary given in constructor. So ss=Struct(a=1, b='b') will satisfy assert ss.a == 1 and assert ss.b == 'b'. """ def...
28.781095
151
0.531979
from bs4 import BeautifulSoup from log_config import logger class Struct(object): """ An object that has attributes built from the dictionary given in constructor. So ss=Struct(a=1, b='b') will satisfy assert ss.a == 1 and assert ss.b == 'b'. """ def __init__(self, **kwargs)...
false
true
f775e6c835d7961c148e18069b5498eff2df1fd2
445
py
Python
src/coordinates.py
felixarpa/LP-Python
faf6ca8209a146a034f31ee4ed4ce45938bc2b25
[ "Apache-2.0" ]
null
null
null
src/coordinates.py
felixarpa/LP-Python
faf6ca8209a146a034f31ee4ed4ce45938bc2b25
[ "Apache-2.0" ]
null
null
null
src/coordinates.py
felixarpa/LP-Python
faf6ca8209a146a034f31ee4ed4ce45938bc2b25
[ "Apache-2.0" ]
null
null
null
# python3 class Coordinates: class Builder: def __init__(self): self.obj = Coordinates() def lat(self, lat): self.obj.lat = lat return self def lon(self, lon): self.obj.lon = lon return self def build(self): ...
21.190476
53
0.474157
class Coordinates: class Builder: def __init__(self): self.obj = Coordinates() def lat(self, lat): self.obj.lat = lat return self def lon(self, lon): self.obj.lon = lon return self def build(self): if self....
true
true
f775e7c6571af5c3e67b6a8d616e5316e51232d9
2,265
py
Python
api/src/opentrons/hardware_control/modules/mod_abc.py
wheresaddie/opentrons
b90a87e2b45ea3db7677d130d683249460e4b91a
[ "Apache-2.0" ]
null
null
null
api/src/opentrons/hardware_control/modules/mod_abc.py
wheresaddie/opentrons
b90a87e2b45ea3db7677d130d683249460e4b91a
[ "Apache-2.0" ]
null
null
null
api/src/opentrons/hardware_control/modules/mod_abc.py
wheresaddie/opentrons
b90a87e2b45ea3db7677d130d683249460e4b91a
[ "Apache-2.0" ]
null
null
null
import abc from typing import Dict, Callable InterruptCallback = Callable[[str], None] class AbstractModule(abc.ABC): """ Defines the common methods of a module. """ @classmethod @abc.abstractmethod async def build(cls, port: str, interrupt_callback, ...
26.034483
79
0.601325
import abc from typing import Dict, Callable InterruptCallback = Callable[[str], None] class AbstractModule(abc.ABC): @classmethod @abc.abstractmethod async def build(cls, port: str, interrupt_callback, simulating: bool = False) -> 'AbstractMod...
true
true
f775e7e2d35da467bc0c0394a5c07f3a238ca4c6
460
py
Python
web/transiq/transaction/migrations/0016_auto_20180528_1043.py
manibhushan05/transiq
763fafb271ce07d13ac8ce575f2fee653cf39343
[ "Apache-2.0" ]
null
null
null
web/transiq/transaction/migrations/0016_auto_20180528_1043.py
manibhushan05/transiq
763fafb271ce07d13ac8ce575f2fee653cf39343
[ "Apache-2.0" ]
14
2020-06-05T23:06:45.000Z
2022-03-12T00:00:18.000Z
web/transiq/transaction/migrations/0016_auto_20180528_1043.py
manibhushan05/transiq
763fafb271ce07d13ac8ce575f2fee653cf39343
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.0.5 on 2018-05-28 10:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('transaction', '0015_merge_20180524_1853'), ] operations = [ migrations.AlterField( model_name='insurance', name='is_...
24.210526
112
0.6
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('transaction', '0015_merge_20180524_1853'), ] operations = [ migrations.AlterField( model_name='insurance', name='is_insured', field=models.CharField(bla...
true
true
f775ea0d8a54b71c2ccbf6728a02bcf7e8019543
2,482
py
Python
local_judge/error_handler.py
aben20807/local-judge
9095fd4c531b35d50ea63c46c1e8b0e33f493690
[ "MIT" ]
8
2020-03-02T12:26:03.000Z
2022-03-28T06:17:54.000Z
local_judge/error_handler.py
aben20807/local-judge
9095fd4c531b35d50ea63c46c1e8b0e33f493690
[ "MIT" ]
10
2020-04-12T04:12:32.000Z
2021-12-29T06:42:08.000Z
local_judge/error_handler.py
aben20807/local-judge
9095fd4c531b35d50ea63c46c1e8b0e33f493690
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ MIT License Copyright (c) 2020 Huang Po-Hsuan 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...
38.78125
83
0.676068
import sys import logging class ErrorHandler: def __init__(self, exit_or_log, **logging_config): self.exit_or_log = exit_or_log self.database = {} if logging_config == {}: logging_config["format"] = "%(asctime)-15s [%(levelname)s] %(message)s" logging.basicConfig(**logg...
true
true
f775ea4457a26a2f69009c5dade7cdcbc80a5f0a
2,615
py
Python
pwass/regression/simplicial.py
mberaha/ProjectedWasserstein
20d19fc49f20124762eb497031cba0918b5eaadb
[ "BSD-3-Clause" ]
1
2021-11-30T09:11:56.000Z
2021-11-30T09:11:56.000Z
pwass/regression/simplicial.py
mberaha/ProjectedWasserstein
20d19fc49f20124762eb497031cba0918b5eaadb
[ "BSD-3-Clause" ]
1
2021-05-25T08:49:25.000Z
2021-05-25T08:49:25.000Z
pwass/regression/simplicial.py
mberaha/ProjectedWasserstein
20d19fc49f20124762eb497031cba0918b5eaadb
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from sklearn.base import BaseEstimator from pwass.spline import SplineBasis from pwass.distributions import Distribution class SimpliciadDistribOnDistrib(BaseEstimator): def __init__(self, fit_intercept=True, nbasis=-1, spline_basis=None, compute_spline=True): self.fit...
30.764706
75
0.575908
import numpy as np from sklearn.base import BaseEstimator from pwass.spline import SplineBasis from pwass.distributions import Distribution class SimpliciadDistribOnDistrib(BaseEstimator): def __init__(self, fit_intercept=True, nbasis=-1, spline_basis=None, compute_spline=True): self.fit...
true
true
f775eb2acd15a8098f71813921534548dbd62db3
446
py
Python
python/Data Structures/ArrayList/test_arraylist.py
aarodrigues/algorithms
a1f3ed800dfed251be2bd8a4123368b406a5a71b
[ "Apache-2.0" ]
null
null
null
python/Data Structures/ArrayList/test_arraylist.py
aarodrigues/algorithms
a1f3ed800dfed251be2bd8a4123368b406a5a71b
[ "Apache-2.0" ]
null
null
null
python/Data Structures/ArrayList/test_arraylist.py
aarodrigues/algorithms
a1f3ed800dfed251be2bd8a4123368b406a5a71b
[ "Apache-2.0" ]
null
null
null
import unittest from ..src import arraylist # import arraylist class TestArrayList(unittest.TestCase): def setUp(self): self.array = arraylist.ArrayList() pass def test_append(self): array_test = [] for i in range(0,10): self.array.append(2*i) array_tes...
20.272727
52
0.600897
import unittest from ..src import arraylist class TestArrayList(unittest.TestCase): def setUp(self): self.array = arraylist.ArrayList() pass def test_append(self): array_test = [] for i in range(0,10): self.array.append(2*i) array_test[i] = 2*i ...
true
true
f775eb8923dfb1272c8f93c3df3ffffb4e3bb36b
2,994
py
Python
ClassMDS.py
Ursinus-IDS301-S2020/Week9Class
c8173f9f793fedb1cee6e71d272282766861a8eb
[ "Apache-2.0" ]
null
null
null
ClassMDS.py
Ursinus-IDS301-S2020/Week9Class
c8173f9f793fedb1cee6e71d272282766861a8eb
[ "Apache-2.0" ]
null
null
null
ClassMDS.py
Ursinus-IDS301-S2020/Week9Class
c8173f9f793fedb1cee6e71d272282766861a8eb
[ "Apache-2.0" ]
null
null
null
""" Purpose: To show how to use "Multidimensional Scaling" (MDS) to find a set of coordinates in 2D that best respect a matrix. In this particular example, students gave a distance matrix where they expressed how similar they thought different majors were to each other. This code loops through all student submission...
34.022727
86
0.670341
from sklearn.manifold import MDS import numpy as np import matplotlib.pyplot as plt from sklearn.metrics import pairwise_distances import glob def draw_distance_matrix(D, labels, vmax = None): if not vmax: vmax = np.max(D) N = D.shape[0] plt.imshow(D, interpolation='none', cmap='magma_r', vmin=0, v...
true
true
f775ebc9ad4b92afdea50f46db30b368454239bb
9,566
py
Python
3rdParty/waf/utils/genbench.py
JoeyJiao/peach
661cb39034583a8cf1b02b56e6b409f2c7498e07
[ "MIT" ]
10
2017-06-18T19:40:23.000Z
2022-03-09T08:09:44.000Z
3rdParty/waf/utils/genbench.py
JoeyJiao/peach
661cb39034583a8cf1b02b56e6b409f2c7498e07
[ "MIT" ]
2
2019-07-01T12:39:41.000Z
2020-11-09T11:40:54.000Z
3rdParty/waf/utils/genbench.py
JoeyJiao/peach
661cb39034583a8cf1b02b56e6b409f2c7498e07
[ "MIT" ]
11
2016-07-01T02:21:06.000Z
2020-11-23T08:29:22.000Z
#!/usr/bin/python # encoding: utf-8 import sys import os.path from random import Random random = Random(0) # initialise with seed to have reproductible benches # for example: ./genbench.py /tmp/build 50 100 15 5 HELP_USAGE = """Usage: generate_libs.py root libs classes internal external. root - Root director...
27.727536
132
0.621158
import sys import os.path from random import Random random = Random(0) HELP_USAGE = """Usage: generate_libs.py root libs classes internal external. root - Root directory where to create libs. libs - Number of libraries (libraries only depend on those with smaller numbers) classes - Number of cla...
true
true
f775ec0469c79c2150a98635bcd04170c0ac5f56
56
py
Python
modules/2.79/bpy/types/ShaderNodeWireframe.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/ShaderNodeWireframe.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/ShaderNodeWireframe.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
class ShaderNodeWireframe: use_pixel_size = None
9.333333
26
0.75
class ShaderNodeWireframe: use_pixel_size = None
true
true
f775ed8f73cc10f1b9cb3881b557c2135bd33844
259
py
Python
scraper/utils.py
sixfwa/so-on-this-day-app
57dc10f294f910431647cde9a3522bf28499a825
[ "MIT" ]
null
null
null
scraper/utils.py
sixfwa/so-on-this-day-app
57dc10f294f910431647cde9a3522bf28499a825
[ "MIT" ]
null
null
null
scraper/utils.py
sixfwa/so-on-this-day-app
57dc10f294f910431647cde9a3522bf28499a825
[ "MIT" ]
null
null
null
from datetime import datetime def get_this_month(): month = datetime.now() return month.strftime("%B") def get_this_day(): day = datetime.today() return day.day def get_month_and_day(): return f"{get_this_month()}_{get_this_day()}"
15.235294
49
0.679537
from datetime import datetime def get_this_month(): month = datetime.now() return month.strftime("%B") def get_this_day(): day = datetime.today() return day.day def get_month_and_day(): return f"{get_this_month()}_{get_this_day()}"
true
true
f775ef3a4039735e01c9c695e724dff4bfacb5f8
10,961
py
Python
documentation/sphinx/conf.py
D-TACQ/pvaPy
5048ae703c1ae1b5bd5e2ec2bea34983b2828c6a
[ "CNRI-Python" ]
null
null
null
documentation/sphinx/conf.py
D-TACQ/pvaPy
5048ae703c1ae1b5bd5e2ec2bea34983b2828c6a
[ "CNRI-Python" ]
null
null
null
documentation/sphinx/conf.py
D-TACQ/pvaPy
5048ae703c1ae1b5bd5e2ec2bea34983b2828c6a
[ "CNRI-Python" ]
null
null
null
import sys, os, re ## Functions to prettify boost.Python autodoc output ## ## Based on code from minieigen (https://launchpad.net/minieigen/) // LGPLv3 ## and modified for Computational Crystallography Toolbox ## See: ## http://bazaar.launchpad.net/~eudoxos/minieigen/trunk/view/head:/doc/source/conf.py ## ht...
35.937705
148
0.693002
import sys, os, re def isBoostFunc(what,obj): return what=='function' and obj.__repr__().startswith('<Boost.Python.function object at 0x') def isBoostMethod(what,obj): return what=='method' and obj.__repr__().startswith('<unbound method ') def isBoostStaticMethod(what,obj): return what=='method' and obj._...
true
true
f775ef870fc5856678fecea9adc63e86f61d2e7e
3,376
py
Python
etc/sim_quercus/mpi_newexp_random.py
HiramHerrera/desisim
3ae76e4c921f72b71ff7522462740e904136f428
[ "BSD-3-Clause" ]
15
2015-12-16T22:01:53.000Z
2022-01-14T07:31:55.000Z
etc/sim_quercus/mpi_newexp_random.py
HiramHerrera/desisim
3ae76e4c921f72b71ff7522462740e904136f428
[ "BSD-3-Clause" ]
455
2015-04-06T03:11:27.000Z
2022-02-28T18:11:16.000Z
etc/sim_quercus/mpi_newexp_random.py
HiramHerrera/desisim
3ae76e4c921f72b71ff7522462740e904136f428
[ "BSD-3-Clause" ]
21
2015-01-26T17:45:04.000Z
2022-02-22T19:46:20.000Z
from mpi4py import MPI import sys import os import argparse import traceback import numpy as np from desispec.util import option_list from desispec.parallel import stdouterr_redirected from desisim import obs import desisim.scripts.newexp_random as newexp flavors = ['arc', 'arc', 'arc', 'flat', 'fl...
27.447154
99
0.571682
from mpi4py import MPI import sys import os import argparse import traceback import numpy as np from desispec.util import option_list from desispec.parallel import stdouterr_redirected from desisim import obs import desisim.scripts.newexp_random as newexp flavors = ['arc', 'arc', 'arc', 'flat', 'fl...
true
true
f775efef8b22aafbb47037f7f98ebf1f2d959381
2,523
py
Python
laas/actions/fog_startImaging.py
opnfv/laas-reflab
ab24a8de07dac62569ec79425241a6b974ed32a9
[ "Apache-2.0" ]
1
2021-03-29T12:33:52.000Z
2021-03-29T12:33:52.000Z
laas/actions/fog_startImaging.py
opnfv/laas-reflab
ab24a8de07dac62569ec79425241a6b974ed32a9
[ "Apache-2.0" ]
null
null
null
laas/actions/fog_startImaging.py
opnfv/laas-reflab
ab24a8de07dac62569ec79425241a6b974ed32a9
[ "Apache-2.0" ]
null
null
null
############################################################################## # Copyright 2017 Parker Berberian and Others # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # yo...
45.053571
79
0.451843
from fogAction import FogAction import requests import sys class StartImagingAction(FogAction): def __init__(self, config=None): super(StartImagingAction, self).__init__(config=config) def run(self, host=None): host = self.getFogHost(host) num = str(self.getHostNumber(host)) ...
true
true
f775f0342741cb20e88ee96f818317f2566c92ef
38,015
py
Python
hangups/conversation.py
dmwyatt/hangups
1343798151cdb4c73ccc6c6e815c128a99c0267b
[ "MIT" ]
null
null
null
hangups/conversation.py
dmwyatt/hangups
1343798151cdb4c73ccc6c6e815c128a99c0267b
[ "MIT" ]
null
null
null
hangups/conversation.py
dmwyatt/hangups
1343798151cdb4c73ccc6c6e815c128a99c0267b
[ "MIT" ]
null
null
null
"""Conversation objects.""" import asyncio import datetime import logging from hangups import (parsers, event, user, conversation_event, exceptions, hangouts_pb2) logger = logging.getLogger(__name__) CONVERSATIONS_PER_REQUEST = 100 MAX_CONVERSATION_PAGES = 100 async def build_user_conversatio...
39.069887
79
0.601947
import asyncio import datetime import logging from hangups import (parsers, event, user, conversation_event, exceptions, hangouts_pb2) logger = logging.getLogger(__name__) CONVERSATIONS_PER_REQUEST = 100 MAX_CONVERSATION_PAGES = 100 async def build_user_conversation_list(client): conv_sta...
true
true
f775f0b3052efcc3ee647174bc6482d7a62c2271
7,824
py
Python
official/projects/yolact/modeling/yolact_model.py
gunho1123/models
a5d63cd3c28e30476ea53f1a5c3d13370926054d
[ "Apache-2.0" ]
null
null
null
official/projects/yolact/modeling/yolact_model.py
gunho1123/models
a5d63cd3c28e30476ea53f1a5c3d13370926054d
[ "Apache-2.0" ]
null
null
null
official/projects/yolact/modeling/yolact_model.py
gunho1123/models
a5d63cd3c28e30476ea53f1a5c3d13370926054d
[ "Apache-2.0" ]
1
2021-12-20T08:10:20.000Z
2021-12-20T08:10:20.000Z
# Copyright 2021 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...
40.963351
102
0.660404
from typing import List, Optional, Mapping from absl import logging import tensorflow as tf from official.vision.beta.ops import anchor layers = tf.keras.layers @tf.keras.utils.register_keras_serializable(package='yolact') class YolactModel(tf.keras.Model): def __init__(self, backbone: tf.keras....
true
true
f775f0d40e9c0d8a6e264beae0c5241182384a8e
26,853
py
Python
sdk/python/pulumi_azure_native/containerservice/v20180331/managed_cluster.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/containerservice/v20180331/managed_cluster.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/containerservice/v20180331/managed_cluster.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
52.860236
3,266
0.693144
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * from ._inputs import * __all__ = ['ManagedClusterArgs', 'ManagedCluster'] @pulumi.input_type class ManagedClusterArgs: de...
true
true
f775f10755d921a274ac5cffeafd6c5742d2aa26
2,712
py
Python
daisy/utils/tunner.py
paulagd/GCE
c6680ef248430aed69a2ef5183f0d1df59d50608
[ "Apache-2.0" ]
1
2021-07-05T08:12:23.000Z
2021-07-05T08:12:23.000Z
daisy/utils/tunner.py
paulagd/GCE
c6680ef248430aed69a2ef5183f0d1df59d50608
[ "Apache-2.0" ]
null
null
null
daisy/utils/tunner.py
paulagd/GCE
c6680ef248430aed69a2ef5183f0d1df59d50608
[ "Apache-2.0" ]
1
2022-01-13T08:35:45.000Z
2022-01-13T08:35:45.000Z
import re from prettytable import PrettyTable from IPython import embed def param_extract(args): param_set = [ 'batch_size', 'dropout', 'factors', 'lr', # 'num_layers', 'num_ng', 'reg_1', 'reg_2', ] print('Decide which parameter you want to tune') bar = 0 for param in param_set: ...
36.648649
114
0.564528
import re from prettytable import PrettyTable from IPython import embed def param_extract(args): param_set = [ 'batch_size', 'dropout', 'factors', 'lr', ] print('Decide which parameter you want to tune') bar = 0 for param in param_set: bar += 1 print(f'{bar}:\t', p...
true
true
f775f16b75f73f5ea102fa6bba75b557e02eb124
3,394
py
Python
thaniya_client/src/thaniya_client/BackupConnector_SFTPMount.py
jkpubsrc/Thaniya
4ebdf2854e3d7888af7396adffa22628b4ab2267
[ "Apache-1.1" ]
1
2021-01-20T18:27:22.000Z
2021-01-20T18:27:22.000Z
thaniya_client/src/thaniya_client/BackupConnector_SFTPMount.py
jkpubsrc/Thaniya
4ebdf2854e3d7888af7396adffa22628b4ab2267
[ "Apache-1.1" ]
null
null
null
thaniya_client/src/thaniya_client/BackupConnector_SFTPMount.py
jkpubsrc/Thaniya
4ebdf2854e3d7888af7396adffa22628b4ab2267
[ "Apache-1.1" ]
null
null
null
import time import os import subprocess import jk_utils import jk_mounting import jk_typing from .AbstractBackupConnector import AbstractBackupConnector from .ThaniyaIO import ThaniyaIO from .ThaniyaBackupContext import ThaniyaBackupContext from .BackupConnectorMixin_mountSFTP import BackupConnectorMixin_mountSFTP...
25.908397
142
0.575427
import time import os import subprocess import jk_utils import jk_mounting import jk_typing from .AbstractBackupConnector import AbstractBackupConnector from .ThaniyaIO import ThaniyaIO from .ThaniyaBackupContext import ThaniyaBackupContext from .BackupConnectorMixin_mountSFTP import BackupConnectorMixin_mountSFTP...
true
true
f775f1beda22838da2c2e9e68fa444867ad35848
4,329
py
Python
contrib/seeds/generate-seeds.py
pioncoin/pion
f6fd5638b09b6e0affba8fd0ce5354d8451253e4
[ "MIT" ]
2
2018-09-04T19:02:54.000Z
2019-06-15T00:32:03.000Z
contrib/seeds/generate-seeds.py
pioncoin/pion
f6fd5638b09b6e0affba8fd0ce5354d8451253e4
[ "MIT" ]
null
null
null
contrib/seeds/generate-seeds.py
pioncoin/pion
f6fd5638b09b6e0affba8fd0ce5354d8451253e4
[ "MIT" ]
4
2018-08-25T04:04:45.000Z
2018-08-25T15:07:30.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2017 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the dir...
31.143885
98
0.578425
from base64 import b32decode from binascii import a2b_hex import sys, os import re pchIPv4 = bytearray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff]) pchOnionCat = bytearray([0xFD,0x87,0xD8,0x7E,0xEB,0x43]) def name_to_ipv6(addr): if len(addr)>6 and addr.endswith('.onion'): vchAddr = b32decode(addr[0:-6], T...
true
true
f775f20130274d4915cfe9d33e85af03b68857d6
4,404
py
Python
Bayesian_NN_regression/nn_grid_search.py
derekeverett/stat_model_surrogates
48b140fe89ac1ffa5a7d5733337a5fa519f95d6f
[ "MIT" ]
null
null
null
Bayesian_NN_regression/nn_grid_search.py
derekeverett/stat_model_surrogates
48b140fe89ac1ffa5a7d5733337a5fa519f95d6f
[ "MIT" ]
null
null
null
Bayesian_NN_regression/nn_grid_search.py
derekeverett/stat_model_surrogates
48b140fe89ac1ffa5a7d5733337a5fa519f95d6f
[ "MIT" ]
1
2020-10-06T22:35:03.000Z
2020-10-06T22:35:03.000Z
import pickle import sklearn import numpy as np import matplotlib.pyplot as plt from warnings import filterwarnings filterwarnings('ignore') import seaborn as sns sns.set() from pandas.plotting import scatter_matrix from sklearn import datasets from sklearn.preprocessing import StandardScaler from sklearn.preprocessin...
31.014085
110
0.741144
import pickle import sklearn import numpy as np import matplotlib.pyplot as plt from warnings import filterwarnings filterwarnings('ignore') import seaborn as sns sns.set() from pandas.plotting import scatter_matrix from sklearn import datasets from sklearn.preprocessing import StandardScaler from sklearn.preprocessin...
true
true
f775f20a644126aa21fcf490b103addef17757c0
1,292
py
Python
pages/tests/test_blocks.py
nhsuk/nhsuk-content-store
a96e3e57db34247c9d1dea64437c6bbcd7926fce
[ "MIT" ]
24
2016-10-20T15:24:49.000Z
2022-03-15T18:53:44.000Z
pages/tests/test_blocks.py
nhsuk/nhsuk-content-store
a96e3e57db34247c9d1dea64437c6bbcd7926fce
[ "MIT" ]
47
2016-10-12T15:45:27.000Z
2017-04-05T11:15:28.000Z
pages/tests/test_blocks.py
nhsuk/nhsuk-content-store
a96e3e57db34247c9d1dea64437c6bbcd7926fce
[ "MIT" ]
6
2017-03-03T14:33:27.000Z
2021-10-07T20:32:34.000Z
from unittest import TestCase from wagtail.wagtailcore.blocks.field_block import CharBlock from wagtail.wagtailcore.blocks.stream_block import StreamValue from pages.blocks import StreamBlock class TestCharBlock(CharBlock): def __init__(self, *args, **kwargs): self.expected = kwargs.pop('expected', None...
28.711111
88
0.633901
from unittest import TestCase from wagtail.wagtailcore.blocks.field_block import CharBlock from wagtail.wagtailcore.blocks.stream_block import StreamValue from pages.blocks import StreamBlock class TestCharBlock(CharBlock): def __init__(self, *args, **kwargs): self.expected = kwargs.pop('expected', None...
true
true
f775f2837633a5122e4771ae10b34a5a1acd8041
5,677
py
Python
tests/test_patch_wsi_dataset.py
themantalope/MONAI
9378e52b9c2283fa71cf8572b08f274071753053
[ "Apache-2.0" ]
3
2020-07-02T18:39:36.000Z
2021-06-16T09:35:53.000Z
tests/test_patch_wsi_dataset.py
ahatamiz/MONAI
e2e2d08acf180145a3e51f569e74292a59d81597
[ "Apache-2.0" ]
28
2020-06-26T12:47:52.000Z
2020-09-08T00:33:42.000Z
tests/test_patch_wsi_dataset.py
Nic-Ma/MONAI
f398298b5aadc076102261a687a158f6ac17ad1c
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 - 2021 MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in wri...
34.615854
112
0.564383
import os import unittest from unittest import skipUnless import numpy as np from numpy.testing import assert_array_equal from parameterized import parameterized from monai.apps.pathology.data import PatchWSIDataset from monai.apps.utils import download_url from monai.utils import optional_import _, has_cim = optio...
true
true
f775f2d979b95115ad54656a111723226e10c85d
904
py
Python
Ex81.py
Kevinwmiguel/PythonExercises
e976b274d8f17f427b2bcf0c2a614c0043478ea5
[ "MIT" ]
null
null
null
Ex81.py
Kevinwmiguel/PythonExercises
e976b274d8f17f427b2bcf0c2a614c0043478ea5
[ "MIT" ]
null
null
null
Ex81.py
Kevinwmiguel/PythonExercises
e976b274d8f17f427b2bcf0c2a614c0043478ea5
[ "MIT" ]
null
null
null
""" Ex 81 - Make a program that helps a MEGA SENA player to create guesses. the program will ask how many games will be generated and will draw 6 numbers between 1 and 60 for each game, registering everything in a composed list """ # ----- Import ----- from random import sample # ----- Var ----- draw = list() game =...
25.828571
79
0.619469
from random import sample draw = list() game = list() def header(): print('=' * 30) print(f'{"PLAY IN MEGA SENA"}'.center(30)) print('=' * 30) print('-=' * 3, 'Sorting numbers', '-=' * 3) header() draw = int(input('How many game do you want to play?: ')) for c in range(1, draw+1): draw = sampl...
true
true
f775f4c50c1474542c1628d1dfd1940d76d9681d
227
py
Python
app/admin.py
mvargas33/Tablero_digital
5219f8c861e89eae3dddadac86bf55edb87da2a7
[ "MIT" ]
1
2020-08-19T16:12:20.000Z
2020-08-19T16:12:20.000Z
app/admin.py
mvargas33/Tablero_digital
5219f8c861e89eae3dddadac86bf55edb87da2a7
[ "MIT" ]
null
null
null
app/admin.py
mvargas33/Tablero_digital
5219f8c861e89eae3dddadac86bf55edb87da2a7
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from app.models import Board, WorkIn, PostIt, VoteIn admin.site.register(Board) admin.site.register(WorkIn) admin.site.register(PostIt) admin.site.register(VoteIn)
25.222222
52
0.806167
from django.contrib import admin from app.models import Board, WorkIn, PostIt, VoteIn admin.site.register(Board) admin.site.register(WorkIn) admin.site.register(PostIt) admin.site.register(VoteIn)
true
true
f775f5ab3bc6ecfcbcb752ab16093839f9357c84
211
py
Python
classes.py
Digit4/randoms
f1f8d9f9b03286f157fa69042c9ac7f5f00e4dec
[ "MIT" ]
1
2018-12-15T17:47:07.000Z
2018-12-15T17:47:07.000Z
classes.py
Digit4/randoms
f1f8d9f9b03286f157fa69042c9ac7f5f00e4dec
[ "MIT" ]
null
null
null
classes.py
Digit4/randoms
f1f8d9f9b03286f157fa69042c9ac7f5f00e4dec
[ "MIT" ]
null
null
null
import sys print (sys.version) class Car(): def __init__(self,clr,category): self.color = clr self.type = category print("Object Created Successfully!") honda = Car("red","sedan") print (honda.__dict__)
19.181818
39
0.7109
import sys print (sys.version) class Car(): def __init__(self,clr,category): self.color = clr self.type = category print("Object Created Successfully!") honda = Car("red","sedan") print (honda.__dict__)
true
true
f775f5b68e2e26d83461879850d52c9aac828397
925
py
Python
data/admin.py
bernardobgam/edtech_experiment
88a64b925b6692261649418260a0bdf7b4a5a9d1
[ "MIT" ]
null
null
null
data/admin.py
bernardobgam/edtech_experiment
88a64b925b6692261649418260a0bdf7b4a5a9d1
[ "MIT" ]
8
2020-06-05T23:56:56.000Z
2022-03-12T00:02:52.000Z
data/admin.py
bernardobgam/edtech_experiment
88a64b925b6692261649418260a0bdf7b4a5a9d1
[ "MIT" ]
null
null
null
from django.contrib import admin from data.models import * from import_export.admin import ExportMixin from import_export.widgets import ForeignKeyWidget from import_export import fields, resources # Register your models here. class QuizDataResource(resources.ModelResource): code = fields.Field(attribute='code'...
28.90625
103
0.744865
from django.contrib import admin from data.models import * from import_export.admin import ExportMixin from import_export.widgets import ForeignKeyWidget from import_export import fields, resources class QuizDataResource(resources.ModelResource): code = fields.Field(attribute='code', column_name='code', widget=...
true
true
f775f5e10d78af2e0d316ee502560e319d3d2ba5
18,110
py
Python
openml/tasks/functions.py
Mirkazemi/openml-python
4ff66ed284790e4ae29245a15e23a3fa1f1c3a6b
[ "BSD-3-Clause" ]
null
null
null
openml/tasks/functions.py
Mirkazemi/openml-python
4ff66ed284790e4ae29245a15e23a3fa1f1c3a6b
[ "BSD-3-Clause" ]
null
null
null
openml/tasks/functions.py
Mirkazemi/openml-python
4ff66ed284790e4ae29245a15e23a3fa1f1c3a6b
[ "BSD-3-Clause" ]
null
null
null
# License: BSD 3-Clause from collections import OrderedDict import io import re import os from typing import Union, Dict, Optional import pandas as pd import xmltodict from ..exceptions import OpenMLCacheException from ..datasets import get_dataset from .task import ( OpenMLClassificationTask, OpenMLClusteri...
34.693487
100
0.635726
from collections import OrderedDict import io import re import os from typing import Union, Dict, Optional import pandas as pd import xmltodict from ..exceptions import OpenMLCacheException from ..datasets import get_dataset from .task import ( OpenMLClassificationTask, OpenMLClusteringTask, OpenMLLearni...
true
true