hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ff4712b2d986b8d81a7a4c1546af1637849b66e4 | 37,930 | py | Python | lib/mpmath/functions/bessel.py | np0212/Capstone-Project | 424c4fd59b4d2d1b4ddbea3b78e93d7fa8575ca7 | [
"Apache-2.0"
] | 26 | 2018-02-14T23:52:58.000Z | 2021-08-16T13:50:03.000Z | sympy/mpmath/functions/bessel.py | shashank-agg/sympy | ecf69893c0b9927ea7192113b2421d639aee6ffb | [
"BSD-3-Clause"
] | 7 | 2017-05-01T14:15:32.000Z | 2017-09-06T20:44:24.000Z | sympy/mpmath/functions/bessel.py | shashank-agg/sympy | ecf69893c0b9927ea7192113b2421d639aee6ffb | [
"BSD-3-Clause"
] | 10 | 2018-08-13T19:38:39.000Z | 2020-04-19T03:02:00.000Z | from .functions import defun, defun_wrapped
@defun
def j0(ctx, x):
"""Computes the Bessel function `J_0(x)`. See :func:`~mpmath.besselj`."""
return ctx.besselj(0, x)
@defun
def j1(ctx, x):
"""Computes the Bessel function `J_1(x)`. See :func:`~mpmath.besselj`."""
return ctx.besselj(1, x)
@defun
def b... | 34.201984 | 100 | 0.494305 |
ff471b109caf4b2ea0dbac5db3b888cf71fd7214 | 454 | py | Python | rockiot/app/migrations/0008_alter_device_metadata.py | isocserbia/rockiot | fc0c52cca4ca862ba570d6b2c64b8d30f8989f05 | [
"Apache-2.0"
] | 2 | 2022-01-23T11:03:37.000Z | 2022-02-26T10:54:10.000Z | rockiot/app/migrations/0008_alter_device_metadata.py | isocserbia/rockiot | fc0c52cca4ca862ba570d6b2c64b8d30f8989f05 | [
"Apache-2.0"
] | null | null | null | rockiot/app/migrations/0008_alter_device_metadata.py | isocserbia/rockiot | fc0c52cca4ca862ba570d6b2c64b8d30f8989f05 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.6 on 2021-08-06 17:25
from collections import defaultdict
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0007_auto_20210806_1442'),
]
operations = [
migrations.AlterField(
model_name='device... | 23.894737 | 85 | 0.634361 |
ff4722c834db1ae12e9f67a3672d1918b4cdb6a2 | 16,138 | py | Python | break4w/question.py | jwdebelius/break_4w | 78d199306b2b2f98e90b366e474e21d062958a15 | [
"BSD-2-Clause"
] | null | null | null | break4w/question.py | jwdebelius/break_4w | 78d199306b2b2f98e90b366e474e21d062958a15 | [
"BSD-2-Clause"
] | null | null | null | break4w/question.py | jwdebelius/break_4w | 78d199306b2b2f98e90b366e474e21d062958a15 | [
"BSD-2-Clause"
] | 1 | 2017-04-19T01:23:36.000Z | 2017-04-19T01:23:36.000Z | import datetime
from functools import partial
import inspect
import pydoc
import numpy as np
import pandas as pd
import break4w._defaults as b4wdefaults
class Question:
u"""A base object class for handling Data dictionary entries
"""
true_values = b4wdefaults.true_values
false_values = b4wdefaults.f... | 36.428894 | 91 | 0.561098 |
ff47426e53cfde1471631fba1d99eaa3bfd7104c | 310 | py | Python | terrascript/resource/paultyng/sql.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/resource/paultyng/sql.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/resource/paultyng/sql.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/resource/paultyng/sql.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:27:39 UTC)
import terrascript
class sql_migrate(terrascript.Resource):
pass
class sql_migrate_directory(terrascript.Resource):
pass
__all__ = [
"sql_migrate",
"sql_migrate_directory",
]
| 17.222222 | 73 | 0.751613 |
ff47583d9fa47a86f773d0024e2c769b01810ef2 | 1,340 | py | Python | model.py | copono/python-rq-sklearn-minimal | 5a88816f092e6f004d900cc144837395b481759e | [
"MIT"
] | null | null | null | model.py | copono/python-rq-sklearn-minimal | 5a88816f092e6f004d900cc144837395b481759e | [
"MIT"
] | 1 | 2021-06-02T00:57:33.000Z | 2021-06-02T00:57:33.000Z | model.py | gcapu/python-rq-sklearn-minimal | 5a88816f092e6f004d900cc144837395b481759e | [
"MIT"
] | null | null | null | # NOTE: I really hate using a global variable here, but I'm not the only one that reached this conclusion. See this issue in the official rq repo https://github.com/rq/rq/issues/1088
# Preload libraries
from sklearn.datasets import load_iris
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_select... | 36.216216 | 182 | 0.702985 |
ff47639dbef28fe76dd13684ea535cb35b92e0c6 | 372 | py | Python | src/scatter_nccl.py | scy6500/large-scale-lm-tutorials | c2ab01a2f272770bbeefe446feed0eb775fc9bd9 | [
"Apache-2.0"
] | null | null | null | src/scatter_nccl.py | scy6500/large-scale-lm-tutorials | c2ab01a2f272770bbeefe446feed0eb775fc9bd9 | [
"Apache-2.0"
] | null | null | null | src/scatter_nccl.py | scy6500/large-scale-lm-tutorials | c2ab01a2f272770bbeefe446feed0eb775fc9bd9 | [
"Apache-2.0"
] | null | null | null | """
src/scatter_nccl.py
"""
import torch
import torch.distributed as dist
dist.init_process_group("nccl")
rank = dist.get_rank()
torch.cuda.set_device(rank)
inputs = torch.tensor([10.0, 20.0])
inputs = torch.split(tensor=inputs, dim=-1, split_size_or_sections=1)
output = inputs[rank].contiguous().to(torch.cuda.curre... | 24.8 | 69 | 0.741935 |
ff47682f318b3f5c924d010d862bdc6ef4dcfcc8 | 10,991 | py | Python | google/appengine/tools/dev_appserver_main.py | vin/gerbilcount | fdffe648c3e9ad2667a6edfe0e19d4446c522395 | [
"Apache-2.0"
] | 2 | 2016-05-08T08:57:01.000Z | 2020-02-08T07:39:48.000Z | google/appengine/tools/dev_appserver_main.py | vin/gerbilcount | fdffe648c3e9ad2667a6edfe0e19d4446c522395 | [
"Apache-2.0"
] | null | null | null | google/appengine/tools/dev_appserver_main.py | vin/gerbilcount | fdffe648c3e9ad2667a6edfe0e19d4446c522395 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 32.421829 | 79 | 0.653808 |
ff477b9d4d39872a67087d9f2ebf89324ac5aac0 | 5,086 | py | Python | python_modules/libraries/dagster-dbt/dagster_dbt_tests/rpc/test_solids_i.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-dbt/dagster_dbt_tests/rpc/test_solids_i.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-dbt/dagster_dbt_tests/rpc/test_solids_i.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import uuid
from typing import Any, Dict, Tuple
import pytest
from dagster_dbt import (
DbtRpcOutput,
DbtRpcResource,
dbt_rpc_run,
dbt_rpc_run_and_wait,
dbt_rpc_test,
local_dbt_rpc_resource,
)
from mock import MagicMock
from dagster import (
AssetKey,
DagsterInstance,
ModeDefinitio... | 33.460526 | 99 | 0.677546 |
ff477e020b8150c5a4d50f7dddc4eb097f7f789f | 257 | py | Python | ngramsNVI/constants.py | warwickpsych/ngramsNVI | 4f07fc22eef973625180c6f9b4827b1324947614 | [
"MIT"
] | null | null | null | ngramsNVI/constants.py | warwickpsych/ngramsNVI | 4f07fc22eef973625180c6f9b4827b1324947614 | [
"MIT"
] | null | null | null | ngramsNVI/constants.py | warwickpsych/ngramsNVI | 4f07fc22eef973625180c6f9b4827b1324947614 | [
"MIT"
] | 1 | 2020-01-02T17:13:18.000Z | 2020-01-02T17:13:18.000Z | import os
# Various folder locations
PACKAGE_LOCATION = os.path.dirname(os.path.dirname(__file__))
DATA_FOLDER = os.path.join(PACKAGE_LOCATION, 'data')
TEMP_FOLDER = PACKAGE_LOCATION
STORAGE_FOLDER = os.path.join(PACKAGE_LOCATION, 'processed_files')
| 18.357143 | 66 | 0.789883 |
ff4780765e0e195ef8d5b7234e419c61077833f5 | 4,153 | py | Python | langid/tools/featWeights.py | bpopeters/langid.py | 9c6187f21bfd7f150bdd6d36a121353bd77ea990 | [
"BSD-2-Clause-FreeBSD"
] | 1,774 | 2015-01-03T00:15:46.000Z | 2022-03-31T14:52:13.000Z | langid/tools/featWeights.py | bpopeters/langid.py | 9c6187f21bfd7f150bdd6d36a121353bd77ea990 | [
"BSD-2-Clause-FreeBSD"
] | 57 | 2015-01-13T09:14:40.000Z | 2021-09-14T13:14:31.000Z | langid/tools/featWeights.py | bpopeters/langid.py | 9c6187f21bfd7f150bdd6d36a121353bd77ea990 | [
"BSD-2-Clause-FreeBSD"
] | 292 | 2015-01-20T00:52:29.000Z | 2022-03-31T14:52:16.000Z | """
Tabulate feature weight data into a single CSV for
further analysis using other tools. This produces
a CSV with header. The features themselves are not
included.
Marco Lui, February 2013
"""
import argparse, os, csv, sys
import numpy as np
import bz2, base64
from cPickle import loads
from langid.train.common imp... | 33.491935 | 112 | 0.66771 |
ff47b430b8676559586f55e3c08484a517abbdec | 304 | py | Python | deeptech/data/datasets/__init__.py | penguinmenac3/deeptech | 0c7fb170d62f193dbbb2018f7b8d42f713178bb8 | [
"MIT"
] | 1 | 2020-10-10T10:11:54.000Z | 2020-10-10T10:11:54.000Z | deeptech/data/datasets/__init__.py | penguinmenac3/deeptech | 0c7fb170d62f193dbbb2018f7b8d42f713178bb8 | [
"MIT"
] | null | null | null | deeptech/data/datasets/__init__.py | penguinmenac3/deeptech | 0c7fb170d62f193dbbb2018f7b8d42f713178bb8 | [
"MIT"
] | null | null | null | from deeptech.data.datasets.fashion_mnist_dataset import FashionMNISTDataset
from deeptech.data.datasets.casia_faces_dataset import CasiaFacesDataset
from deeptech.data.datasets.coco_dataset import COCODataset
from deeptech.data.datasets.images_in_classfolders_dataset import ImagesInClassfoldersDataset
| 60.8 | 93 | 0.907895 |
ff47d8a19195511c1e38c0e7c07f33689b898c1c | 604 | py | Python | bamboos/docker/cleanup.py | xorver/oneprovider-ccm | ec30625a3ecb62e22b7ba5e0dd18d53668009bf9 | [
"MIT"
] | null | null | null | bamboos/docker/cleanup.py | xorver/oneprovider-ccm | ec30625a3ecb62e22b7ba5e0dd18d53668009bf9 | [
"MIT"
] | null | null | null | bamboos/docker/cleanup.py | xorver/oneprovider-ccm | ec30625a3ecb62e22b7ba5e0dd18d53668009bf9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Cleans up Docker containers given by their name or id. Running containers are
killed first. Volumes are not removed automatically.
Run the script with -h flag to learn about script's running options.
"""
import argparse
from environment import docker
parser = argparse.ArgumentParser(
... | 22.37037 | 80 | 0.746689 |
ff47e20b3eb9ef1322bd935158025fdc3abb6e5b | 13,758 | py | Python | mi/dataset/parser/test/test_vel3d_k_wfp_stc.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/parser/test/test_vel3d_k_wfp_stc.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/parser/test/test_vel3d_k_wfp_stc.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
"""
@package mi.dataset.parser.test
@file marine-integrations/mi/dataset/parser/test/test_vel3d_k_wfp_stc.py
@author Steve Myerson (Raytheon)
@brief Test code for a vel3d_k_wfp_stc data parser
"""
import ntplib
import os
from nose.plugins.attrib import attr
from StringIO import StringIO
from m... | 38.537815 | 88 | 0.665068 |
ff4845c97a60404943b4b01f7c66e6c041eb1202 | 3,167 | py | Python | venv/Lib/site-packages/pyrogram/raw/functions/messages/get_chat_invite_importers.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/functions/messages/get_chat_invite_importers.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/functions/messages/get_chat_invite_importers.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 32.989583 | 138 | 0.615409 |
ff487a40a9659da3dd08c6c66e1842950dc65774 | 1,937 | py | Python | src/structurizr/view/element_view.py | mrchrisadams/structurizr-python | a8c6958210892a13b94d5f64eb03273e7f2e398b | [
"Apache-2.0"
] | null | null | null | src/structurizr/view/element_view.py | mrchrisadams/structurizr-python | a8c6958210892a13b94d5f64eb03273e7f2e398b | [
"Apache-2.0"
] | null | null | null | src/structurizr/view/element_view.py | mrchrisadams/structurizr-python | a8c6958210892a13b94d5f64eb03273e7f2e398b | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020, Moritz E. Beber.
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 25.155844 | 83 | 0.649458 |
ff48997ecd3adf359fda80b6420af7dc0e19fc61 | 1,657 | py | Python | src/generateAndSaveMnistTransformedLimitedRotation.py | dhruvtapasvi/implementation | 964980f431517f4548a87172a05107cdf700fb84 | [
"MIT"
] | 1 | 2020-05-25T10:24:58.000Z | 2020-05-25T10:24:58.000Z | src/generateAndSaveMnistTransformedLimitedRotation.py | dhruvtapasvi/implementation | 964980f431517f4548a87172a05107cdf700fb84 | [
"MIT"
] | 1 | 2017-12-18T02:16:44.000Z | 2017-12-18T02:16:44.000Z | src/generateAndSaveMnistTransformedLimitedRotation.py | dhruvtapasvi/implementation | 964980f431517f4548a87172a05107cdf700fb84 | [
"MIT"
] | null | null | null | import os
import numpy as np
import dataset.info.MnistTransformedInfoLimitedRotation as mnistTransformedInfoLimitedRotation
from dataset.loader.basic.MnistLoader import MnistLoader
from dataset.loader.preprocess.RandomTransforms import RandomTransforms
import config.routes as routes
resourceRoot = routes.RESOURCE_R... | 36.021739 | 133 | 0.756789 |
ff48ae028163ea07de95122a36ac5046f0b4eb41 | 8,086 | py | Python | src/graph_transpiler/webdnn/frontend/chainer/functions/connection.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | 1 | 2018-07-26T13:52:21.000Z | 2018-07-26T13:52:21.000Z | src/graph_transpiler/webdnn/frontend/chainer/functions/connection.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | src/graph_transpiler/webdnn/frontend/chainer/functions/connection.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | import chainer
from webdnn.frontend.chainer.converter import ChainerConverter
from webdnn.frontend.constraints import unify_order
from webdnn.frontend.util import check_broadcast_constraints
from webdnn.graph.axis import Axis
from webdnn.graph.operators.convolution2d import Convolution2D
from webdnn.graph.operators.de... | 39.443902 | 138 | 0.738808 |
ff48d4e6c2cc968beebc892cdacb8b560e317a4e | 1,992 | py | Python | tests/test_trainer/configs/test_trainer_resnet.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | 1 | 2022-03-12T04:49:19.000Z | 2022-03-12T04:49:19.000Z | tests/test_trainer/configs/test_trainer_resnet.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | null | null | null | tests/test_trainer/configs/test_trainer_resnet.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | null | null | null | import os
from pathlib import Path
BATCH_SIZE = 128
IMG_SIZE = 32
num_epochs = 200
# resnet 50
model = dict(
type='VanillaResNet',
block_type='ResNetBottleneck',
layers=[3, 4, 6, 3],
num_cls=10
)
train_data = dict(
dataset=dict(
type='CIFAR10Dataset',
root=Path(os.environ['DATA'])... | 21.652174 | 73 | 0.549699 |
ff48f6338c721ccc3eb01a639a46471e95bc8347 | 3,251 | py | Python | oarepo_doi_generator/new_datasets_mapping.py | oarepo/oarepo-doi-generator | 6494243cd7df381e24be74390ac82c591c33a7cd | [
"MIT"
] | null | null | null | oarepo_doi_generator/new_datasets_mapping.py | oarepo/oarepo-doi-generator | 6494243cd7df381e24be74390ac82c591c33a7cd | [
"MIT"
] | null | null | null | oarepo_doi_generator/new_datasets_mapping.py | oarepo/oarepo-doi-generator | 6494243cd7df381e24be74390ac82c591c33a7cd | [
"MIT"
] | 1 | 2021-05-31T07:59:07.000Z | 2021-05-31T07:59:07.000Z | from deepmerge import always_merger
from flask import current_app
from datetime import datetime
def try_name(nlist, record, default=None):
for name in nlist:
try:
return record[name]
except:
continue
else:
return default
def generate_doi(prefix, pid_type, pid_... | 31.259615 | 105 | 0.613657 |
ff4903e0d016b0cb98a37d20d70938331cdc13c4 | 17,458 | py | Python | assignment2/cs231n/classifiers/.ipynb_checkpoints/fc_net-checkpoint.py | lalithnag/cs231n | ed540c4ed06a6ee01966314e4106b8c44f58546b | [
"MIT"
] | null | null | null | assignment2/cs231n/classifiers/.ipynb_checkpoints/fc_net-checkpoint.py | lalithnag/cs231n | ed540c4ed06a6ee01966314e4106b8c44f58546b | [
"MIT"
] | null | null | null | assignment2/cs231n/classifiers/.ipynb_checkpoints/fc_net-checkpoint.py | lalithnag/cs231n | ed540c4ed06a6ee01966314e4106b8c44f58546b | [
"MIT"
] | null | null | null | from builtins import range
from builtins import object
import numpy as np
from cs231n.layers import *
from cs231n.layer_utils import *
class TwoLayerNet(object):
"""
A two-layer fully-connected neural network with ReLU nonlinearity and
softmax loss that uses a modular layer design. We assume an input dim... | 49.88 | 205 | 0.506587 |
ff49275ff14d9f70c717131e0ddd0106d0895afe | 4,360 | py | Python | qualys_cs_api/models/container_vuln_list.py | jlk/qualys-cs-python-client | e2e39fd64d41fd6671d45343843ef36fa3ab59a4 | [
"Apache-2.0"
] | null | null | null | qualys_cs_api/models/container_vuln_list.py | jlk/qualys-cs-python-client | e2e39fd64d41fd6671d45343843ef36fa3ab59a4 | [
"Apache-2.0"
] | null | null | null | qualys_cs_api/models/container_vuln_list.py | jlk/qualys-cs-python-client | e2e39fd64d41fd6671d45343843ef36fa3ab59a4 | [
"Apache-2.0"
] | 1 | 2020-05-15T04:20:48.000Z | 2020-05-15T04:20:48.000Z | # coding: utf-8
"""
Container Security APIs
All features of the Container Security are available through REST APIs.<br/>Access support information at www.qualys.com/support/<br/><br/><b>Permissions:</b><br/>User must have the Container module enabled<br/>User must have API ACCESS permission # noqa: E501
... | 29.659864 | 265 | 0.601147 |
ff492ad83e3534de0a00c59e4ba5f55e2778055f | 2,341 | py | Python | options/train_options.py | liulisixin/unsupervised-learning-intrinsic-images | 0d4ad151d203885c87122bcc305c787210b28a5c | [
"MIT"
] | null | null | null | options/train_options.py | liulisixin/unsupervised-learning-intrinsic-images | 0d4ad151d203885c87122bcc305c787210b28a5c | [
"MIT"
] | null | null | null | options/train_options.py | liulisixin/unsupervised-learning-intrinsic-images | 0d4ad151d203885c87122bcc305c787210b28a5c | [
"MIT"
] | 1 | 2021-06-19T16:51:23.000Z | 2021-06-19T16:51:23.000Z | from .base_options import BaseOptions
class TrainOptions(BaseOptions):
def initialize(self):
BaseOptions.initialize(self)
self.parser.add_argument('--display_freq', type=int, default=100, help='frequency of showing training results on screen')
self.parser.add_argument('--print_freq', type=i... | 93.64 | 157 | 0.7044 |
ff493329f95dff066c58890c6057b6ee89ad263b | 13,803 | py | Python | onnx/helper.py | DEVESHTARASIA/onnx | fe5e9d22da95f0ce94b8feb9698aa38b3e589113 | [
"MIT"
] | null | null | null | onnx/helper.py | DEVESHTARASIA/onnx | fe5e9d22da95f0ce94b8feb9698aa38b3e589113 | [
"MIT"
] | null | null | null | onnx/helper.py | DEVESHTARASIA/onnx | fe5e9d22da95f0ce94b8feb9698aa38b3e589113 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import collections
import numbers
import numpy as np
from six import text_type, integer_types, binary_type
import google.protobuf.message
from onnx import TensorProto, ... | 32.708531 | 93 | 0.633341 |
ff495d0df191589a749919b7b99f891d5cee8738 | 9,935 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_motorkit.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_motorkit.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_motorkit.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2017 Scott Shawcroft for Adafruit Industries
# SPDX-FileCopyrightText: 2018 Kattni Rembor for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
`adafruit_motorkit`
====================================================
CircuitPython helper library for DC & Stepper Motor FeatherWing, Shi... | 34.023973 | 99 | 0.611877 |
ff49655ac3a84677f57d569ff613b513de03b679 | 2,874 | py | Python | tdrs-backend/tdpservice/users/test/test_api/test_users.py | riatzukiza/TANF-app | e34efc87e9703bab37db76b84cc47a041e3612a1 | [
"CC0-1.0"
] | 18 | 2020-03-25T19:57:12.000Z | 2021-07-26T15:37:50.000Z | tdrs-backend/tdpservice/users/test/test_api/test_users.py | raft-tech/TANF-app | a4ff39ca392591c4c218ad86df3bff5056d73152 | [
"CC0-1.0"
] | 1,465 | 2020-07-22T21:16:53.000Z | 2022-03-31T16:04:22.000Z | tdrs-backend/tdpservice/users/test/test_api/test_users.py | riatzukiza/TANF-app | e34efc87e9703bab37db76b84cc47a041e3612a1 | [
"CC0-1.0"
] | 15 | 2020-07-22T14:58:37.000Z | 2021-06-22T17:29:55.000Z | """Basic API User Tests."""
from django.contrib.auth import get_user_model
import pytest
from rest_framework import status
User = get_user_model()
@pytest.mark.django_db
def test_retrieve_user(api_client, user):
"""Test user retrieval."""
api_client.login(username=user.username, password="test_password")
... | 39.369863 | 88 | 0.742519 |
ff4978d6cd6bc94a82349670a32161299c982f25 | 4,549 | py | Python | nytxw_puz/decompress.py | GodTamIt/nytxw_puz_cli | af3a37427299f24bcbc6ca48e1d8d18be314a80b | [
"BSD-2-Clause"
] | null | null | null | nytxw_puz/decompress.py | GodTamIt/nytxw_puz_cli | af3a37427299f24bcbc6ca48e1d8d18be314a80b | [
"BSD-2-Clause"
] | null | null | null | nytxw_puz/decompress.py | GodTamIt/nytxw_puz_cli | af3a37427299f24bcbc6ca48e1d8d18be314a80b | [
"BSD-2-Clause"
] | 1 | 2022-03-24T23:52:12.000Z | 2022-03-24T23:52:12.000Z | #!/usr/bin/env python3
# Fairly straight port of
# https://github.com/pieroxy/lz-string/
# to Python. Only decompress was ported
import re
def decompress(compressed):
if (compressed is None) or (compressed == ""):
return ""
dictionary = {}
enlargeIn = 4
dictSize = 4
numBits = 3
(en... | 24.068783 | 83 | 0.464498 |
ff499d5e627157a08ecda6d30ade18af093e0f07 | 4,671 | py | Python | userbot/plugins/fake.py | ansiltech/Wolf-UserBot | 4ae67752d00febe2671d0eaeb713dc3569c5d6df | [
"MIT"
] | 2 | 2021-09-15T06:07:55.000Z | 2021-09-15T08:42:02.000Z | userbot/plugins/fake.py | ansiltech/Wolf-UserBot | 4ae67752d00febe2671d0eaeb713dc3569c5d6df | [
"MIT"
] | null | null | null | userbot/plugins/fake.py | ansiltech/Wolf-UserBot | 4ae67752d00febe2671d0eaeb713dc3569c5d6df | [
"MIT"
] | null | null | null | import asyncio
from random import choice, randint
from telethon.errors import BadRequestError
from telethon.tl.functions.channels import EditAdminRequest
from telethon.tl.types import ChatAdminRights
from userbot import wolfub
from ..core.managers import edit_delete, edit_or_reply
from ..helpers.utils import get_use... | 30.529412 | 131 | 0.560694 |
ff49a2d532f225d9e7c7bbb729de520727076f19 | 8,739 | py | Python | megabeast/helpers.py | karllark/megabeast | 4e8223376c7e3b2160665078d730cb917a1481c1 | [
"BSD-3-Clause"
] | 2 | 2019-03-07T17:18:45.000Z | 2019-05-13T03:05:55.000Z | megabeast/helpers.py | karllark/megabeast | 4e8223376c7e3b2160665078d730cb917a1481c1 | [
"BSD-3-Clause"
] | 50 | 2017-11-30T15:56:16.000Z | 2021-11-05T20:54:22.000Z | megabeast/helpers.py | karllark/megabeast | 4e8223376c7e3b2160665078d730cb917a1481c1 | [
"BSD-3-Clause"
] | 10 | 2017-11-17T18:23:24.000Z | 2020-10-02T20:33:19.000Z | import numpy as np
from numpy.random import default_rng
from beast.tools.read_beast_data import read_lnp_data
from beast.physicsmodel.grid_weights_stars import compute_bin_boundaries
__all__ = [
"get_likelihoods",
"precompute_mass_multipliers",
"get_predicted_num_stars",
"get_predicted_num_stars_simul... | 35.669388 | 98 | 0.649159 |
ff49ad45901afadb292bcc2c36eadddcf8e2f4ec | 3,673 | py | Python | soaplib/core/model/binary.py | divaliu1408/overfit | 083dcfaa758391092933e19544462cd831e73ef0 | [
"Apache-2.0"
] | null | null | null | soaplib/core/model/binary.py | divaliu1408/overfit | 083dcfaa758391092933e19544462cd831e73ef0 | [
"Apache-2.0"
] | null | null | null | soaplib/core/model/binary.py | divaliu1408/overfit | 083dcfaa758391092933e19544462cd831e73ef0 | [
"Apache-2.0"
] | null | null | null |
#
# soaplib - Copyright (C) Soaplib contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This l... | 33.09009 | 78 | 0.645249 |
ff49b6954776264ccb2eceeceab7da5a881081f0 | 31,820 | py | Python | tensorflow/python/debug/lib/session_debug_grpc_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/debug/lib/session_debug_grpc_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/debug/lib/session_debug_grpc_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2016 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... | 41.649215 | 80 | 0.687115 |
ff49cabe5967392cdee2f7fa512dc155af5684ce | 3,277 | py | Python | CiscoPWDhasher/__init__.py | superadm1n/ciscoPWDhasher | df4e6b90ae83fd1ba175234f613dec392e3f3773 | [
"MIT"
] | 2 | 2020-04-04T15:40:23.000Z | 2020-04-17T04:59:28.000Z | CiscoPWDhasher/__init__.py | wifiwizardofoz/ciscoMD5hash | 4f913f933565a7e0cd38aa505bf70389e2675f32 | [
"MIT"
] | 1 | 2020-05-22T07:22:12.000Z | 2020-05-22T07:22:12.000Z | CiscoPWDhasher/__init__.py | wifiwizardofoz/ciscoMD5hash | 4f913f933565a7e0cd38aa505bf70389e2675f32 | [
"MIT"
] | null | null | null | import random
import base64
import scrypt
from backports.pbkdf2 import pbkdf2_hmac
from passlib.hash import md5_crypt
from passlib.hash import cisco_type7
# Translate Standard Base64 table to Cisco Base64 Table used in Type8 and TYpe 9
std_b64chars = "ABCDEFGHIJKLMNOP... | 33.438776 | 128 | 0.694843 |
ff49ce15d7f9bb6eef62434da2bb39e31c005cf9 | 87 | py | Python | src/func/customize.py | megemini/DataCastle2017 | 261134f760d8c1bbfc3e65e1362b7710e601947d | [
"MIT"
] | null | null | null | src/func/customize.py | megemini/DataCastle2017 | 261134f760d8c1bbfc3e65e1362b7710e601947d | [
"MIT"
] | null | null | null | src/func/customize.py | megemini/DataCastle2017 | 261134f760d8c1bbfc3e65e1362b7710e601947d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
**customize** module
-------------------
"""
__all__ = [] | 10.875 | 23 | 0.367816 |
ff4a02b629f2c723256dd8071c64219fd7b8f6e4 | 70,896 | py | Python | cinder/volume/drivers/ibm/gpfs.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/ibm/gpfs.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/ibm/gpfs.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | # Copyright IBM Corp. 2013 All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 43.071689 | 79 | 0.593165 |
ff4a4690755ffc659a620cf08a60726570766de9 | 819 | py | Python | tests/core/test_valid.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | 1 | 2022-03-10T03:56:49.000Z | 2022-03-10T03:56:49.000Z | tests/core/test_valid.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | null | null | null | tests/core/test_valid.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Silicon Compiler Authors. All Rights Reserved.
import siliconcompiler
import re
def test_valid():
chip = siliconcompiler.Chip()
chip.load_target("freepdk45_demo")
#basic
valid = chip.valid('design')
assert valid
#nest
valid = chip.valid('asic','minlayer')
assert valid... | 25.59375 | 81 | 0.626374 |
ff4a700e746034e2d5bbccf97ea6f2b432d62a4c | 1,058 | py | Python | experiments/increasing_dim/Exp_4/run_experiment.py | st--/VFF | 828e6c0437eea143274b65c0171ee7605c9d460a | [
"Apache-2.0"
] | 1 | 2021-04-13T16:13:34.000Z | 2021-04-13T16:13:34.000Z | experiments/increasing_dim/Exp_4/run_experiment.py | st--/VFF | 828e6c0437eea143274b65c0171ee7605c9d460a | [
"Apache-2.0"
] | null | null | null | experiments/increasing_dim/Exp_4/run_experiment.py | st--/VFF | 828e6c0437eea143274b65c0171ee7605c9d460a | [
"Apache-2.0"
] | null | null | null | import numpy as np
import subprocess
from config import *
import gpflow
import VFF
## initialise empty file
file = open("results/full.csv", "w")
file.write("dim,rep,marg_lik,mean_log_pred\n")
file.close()
file = open("results/vff.csv", "w")
file.write("dim,rep,num_inducing,marg_lik,mean_log_pred,time\n")
file.clos... | 24.604651 | 88 | 0.675803 |
ff4a743868c2f0400bebd31aa1df0ed316c020f3 | 262 | py | Python | Python3/Coursera/others/use_fork.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null | Python3/Coursera/others/use_fork.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null | Python3/Coursera/others/use_fork.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null | # Создание процесса на Python
import time
import os
pid = os.fork()
if pid == 0:
# дочерний процесс
while True:
print("child:", os.getpid())
time.sleep(5)
else:
# родительский процесс
print("parent:", os.getpid())
os.wait()
| 16.375 | 36 | 0.599237 |
ff4a884f0db500351d82e3deb74b2ff42cf40d8b | 1,158 | py | Python | alipay/aop/api/response/AlipayMsaasMediarecogMmtcaftscvGoodsinfoBatchqueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayMsaasMediarecogMmtcaftscvGoodsinfoBatchqueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayMsaasMediarecogMmtcaftscvGoodsinfoBatchqueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.AlgorithmGoodsInfo import AlgorithmGoodsInfo
class AlipayMsaasMediarecogMmtcaftscvGoodsinfoBatchqueryResponse(AlipayResponse):
def __init__(self):
super(... | 35.090909 | 131 | 0.702936 |
ff4a89c35219dc2f2732b8374cd3ee1ff05ce0d0 | 572 | py | Python | src/tratamientos/migrations/0006_auto_20170201_1554.py | mava-ar/sgk | cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4 | [
"Apache-2.0"
] | null | null | null | src/tratamientos/migrations/0006_auto_20170201_1554.py | mava-ar/sgk | cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4 | [
"Apache-2.0"
] | 32 | 2016-05-09T19:37:08.000Z | 2022-01-13T01:00:52.000Z | src/tratamientos/migrations/0006_auto_20170201_1554.py | mava-ar/sgk | cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2017-02-01 18:54
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('tratamientos', '0005_sesion_profesional'),
]
operat... | 26 | 129 | 0.662587 |
ff4a8bab0376917988b9267ec70f4f5f2ede8d63 | 3,489 | py | Python | tda_mvc/model/config.py | jjjkkkjjj/cldvis-txtmodifier | 647c57cdba325d54229b3300f7d0b18baa7b0b74 | [
"MIT"
] | 3 | 2021-07-08T04:58:00.000Z | 2022-03-06T11:19:08.000Z | tda_mvc/model/config.py | jjjkkkjjj/cldvis-txtmodifier | 647c57cdba325d54229b3300f7d0b18baa7b0b74 | [
"MIT"
] | 22 | 2020-11-09T15:36:23.000Z | 2021-05-02T07:38:43.000Z | tda_mvc/model/config.py | jjjkkkjjj/cldvis-txtmodifier | 647c57cdba325d54229b3300f7d0b18baa7b0b74 | [
"MIT"
] | null | null | null | import configparser, os, shutil
from ..utils.funcs import path_desktop
class ConfigParser(configparser.ConfigParser):
def get(self, section, option, default=None, *args, **kwargs):
try:
return super().get(section, option, *args, **kwargs)
except configparser.NoOptionError:
... | 28.598361 | 69 | 0.603038 |
ff4aaff5a3df6e5b6a527d999cf2700a271f426b | 7,757 | py | Python | venv/lib/python3.6/site-packages/kubernetes/client/models/v2beta2_horizontal_pod_autoscaler_spec.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v2beta2_horizontal_pod_autoscaler_spec.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v2beta2_horizontal_pod_autoscaler_spec.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.15
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V2bet... | 38.979899 | 576 | 0.662756 |
ff4aee3566a1c9b1a7a4f10a4b7d505e404ff5e0 | 11,208 | py | Python | keystoneclient/tests/test_ec2utils.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | 1 | 2020-12-18T01:07:30.000Z | 2020-12-18T01:07:30.000Z | keystoneclient/tests/test_ec2utils.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | null | null | null | keystoneclient/tests/test_ec2utils.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | null | null | null | # Copyright 2012 OpenStack Foundation
#
# 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... | 44.300395 | 75 | 0.554872 |
ff4afffb35f7a8e281d8a425d528ef281a3d3610 | 222 | py | Python | Problems/lcof-014/solve.py | luanshiyinyang/LCNotes | 093b109aefd65c2263f59472f7118059d7eeb256 | [
"MIT"
] | 3 | 2021-09-04T05:24:20.000Z | 2022-02-19T08:31:28.000Z | Problems/lcof-014/solve.py | luanshiyinyang/LCNotes | 093b109aefd65c2263f59472f7118059d7eeb256 | [
"MIT"
] | null | null | null | Problems/lcof-014/solve.py | luanshiyinyang/LCNotes | 093b109aefd65c2263f59472f7118059d7eeb256 | [
"MIT"
] | null | null | null | class Solution:
def integerBreak(self, n: int) -> int:
dp = [0] * (n+1)
for i in range(2, n+1):
for j in range(i):
dp[i] = max(j*(i-j), j*dp[i-j], dp[i])
return dp[n] | 31.714286 | 54 | 0.432432 |
ff4b6b65b862c6295df0920f905cd2272d31dbc1 | 11,143 | py | Python | pw_hdlc/py/decode_test.py | antmicro/pigweed | a308c3354a6131425e3f484f07f05a1813948860 | [
"Apache-2.0"
] | null | null | null | pw_hdlc/py/decode_test.py | antmicro/pigweed | a308c3354a6131425e3f484f07f05a1813948860 | [
"Apache-2.0"
] | null | null | null | pw_hdlc/py/decode_test.py | antmicro/pigweed | a308c3354a6131425e3f484f07f05a1813948860 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2020 The Pigweed 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 37.019934 | 88 | 0.607736 |
ff4b85bc117ff33b618af32dcf86577cd8144577 | 420 | py | Python | decorator_customize/synchronized.py | WallaceLiu/python_learn | ea8c4c20856a25491c756f74b3b572463ea7d7ea | [
"Apache-2.0"
] | null | null | null | decorator_customize/synchronized.py | WallaceLiu/python_learn | ea8c4c20856a25491c756f74b3b572463ea7d7ea | [
"Apache-2.0"
] | null | null | null | decorator_customize/synchronized.py | WallaceLiu/python_learn | ea8c4c20856a25491c756f74b3b572463ea7d7ea | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@time : 2021/9/21 下午11:48
@author : liuning
@file : synchronized.py
@description : ...
"""
import threading
def synchronized(func):
"""
simple lock
:param func:
:return:
"""
func.__lock__ = threading.Lock()
def lock_func(*args, **... | 17.5 | 40 | 0.538095 |
ff4ba7ff80ca7c603a1b5ec0e2ac41afe2e6c3cb | 1,074 | py | Python | retrack.py | JaneliaSciComp/twocof | 8c3d99df29b796705ba9c3316c8ea99704a2d3d5 | [
"BSD-3-Clause"
] | null | null | null | retrack.py | JaneliaSciComp/twocof | 8c3d99df29b796705ba9c3316c8ea99704a2d3d5 | [
"BSD-3-Clause"
] | null | null | null | retrack.py | JaneliaSciComp/twocof | 8c3d99df29b796705ba9c3316c8ea99704a2d3d5 | [
"BSD-3-Clause"
] | null | null | null | """
this script changes filenames of data so that I can run it in my
"test" trackers
now adjusted for pipeline branching of early 2011
djo, 2/10
"""
# ------------------------- imports -------------------------
import os
import shutil
import sys
from lib import constants as const
from lib import util
# ----... | 24.409091 | 94 | 0.587523 |
ff4bc5a6ebc3849e931476e6b880c5ba24e8e8de | 2,312 | py | Python | setup.py | bbc/rd-apmm-python-lib-rtp | 8db97ab48fafec97fd5c0c7aeb870384cd40021b | [
"Apache-2.0"
] | 2 | 2020-10-30T03:51:28.000Z | 2022-02-03T19:27:51.000Z | setup.py | bbc/rd-apmm-python-lib-rtp | 8db97ab48fafec97fd5c0c7aeb870384cd40021b | [
"Apache-2.0"
] | 1 | 2021-04-15T10:19:21.000Z | 2021-07-09T13:07:47.000Z | setup.py | bbc/rd-apmm-python-lib-rtp | 8db97ab48fafec97fd5c0c7aeb870384cd40021b | [
"Apache-2.0"
] | 2 | 2020-09-14T13:14:02.000Z | 2021-01-20T08:30:06.000Z | #!/usr/bin/python
#
# James Sandford, copyright BBC 2020
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 27.52381 | 74 | 0.676903 |
ff4bd1bae3714f0389a3c99d22c1e6f3cb8b37ac | 28,887 | py | Python | cheblienet/graphs/graphs.py | haguettaz/ChebLieNet | 8545122c85513a4b4e8cc34c9f01bacca9140110 | [
"MIT"
] | 7 | 2021-11-25T11:51:01.000Z | 2022-03-06T18:35:32.000Z | cheblienet/graphs/graphs.py | haguettaz/ChebLieNet | 8545122c85513a4b4e8cc34c9f01bacca9140110 | [
"MIT"
] | null | null | null | cheblienet/graphs/graphs.py | haguettaz/ChebLieNet | 8545122c85513a4b4e8cc34c9f01bacca9140110 | [
"MIT"
] | 1 | 2022-03-06T18:35:42.000Z | 2022-03-06T18:35:42.000Z | # coding=utf-8
import hashlib
import math
import os
import sys
import numpy as np
import torch
from tqdm import tqdm
from ..geometry.se import r2_matrix, r2_riemannian_sqdist, r2_uniform_sampling, se2_matrix, se2_riemannian_sqdist, se2_uniform_sampling
from ..geometry.so import s2_matrix, s2_riemannian_sqdist, s2_un... | 33.628638 | 135 | 0.607574 |
ff4c00283341f1594edaeb3a9987b0b8bf437ca5 | 24,965 | py | Python | vyperlogix/trees/rbtree.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | 1 | 2020-09-29T01:36:33.000Z | 2020-09-29T01:36:33.000Z | vyperlogix/trees/rbtree.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | vyperlogix/trees/rbtree.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
#
# This code adapted from C source from
# Thomas Niemann's Sorting and Searching Algorithms: A Cookbook
#
# From the title page:
# Permission to reproduce this document, in whole or in part, is
# given provided the original web site listed below is referenced,
# and no additional restrictio... | 29.16472 | 85 | 0.501382 |
ff4c277ccd9c836fd4df71041a4f0e78456e3bcb | 3,169 | py | Python | spikesorters/unittests/test_sorters.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | spikesorters/unittests/test_sorters.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | spikesorters/unittests/test_sorters.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | import os
import sys
# def append_to_path(dir0): # A convenience function
# if dir0 not in sys.path:
# sys.path.append(dir0)
# append_to_path(os.getcwd()+'/..')
from spikesorters import MountainSort4, SpykingCircus, YASS, KiloSort
import spikeextractors as se
import tempfile
import shutil
from cairio impor... | 26.630252 | 69 | 0.698012 |
ff4c41660af5a822107e1a9c4cd3b2f5daf334d8 | 5,774 | py | Python | tool/main.py | WilsonWangTHU/neural_graph_evolution | 9142b7f1c32c476aa44c83da38d3f0bacc276d73 | [
"MIT"
] | 33 | 2019-06-06T13:59:51.000Z | 2022-03-07T10:36:42.000Z | tool/main.py | WilsonWangTHU/neural_graph_evolution | 9142b7f1c32c476aa44c83da38d3f0bacc276d73 | [
"MIT"
] | 8 | 2019-07-09T16:58:28.000Z | 2022-02-10T00:27:39.000Z | tool/main.py | WilsonWangTHU/neural_graph_evolution | 9142b7f1c32c476aa44c83da38d3f0bacc276d73 | [
"MIT"
] | 12 | 2019-06-07T10:43:12.000Z | 2022-03-09T13:47:01.000Z | # -----------------------------------------------------------------------------
# @brief: main fucntion
# -----------------------------------------------------------------------------
import os
import gym
# import pdb
import init_path
from agent import optimization_agent
from agent import rollout_master_agent
from c... | 33.964706 | 82 | 0.629719 |
ff4c48d95bf88d04517a8b46ddb5456fc123d8c8 | 14,672 | py | Python | demisto_sdk/commands/common/git_util.py | cyrengmbh/demisto-sdk | 4d05532efd627a32b1af659e010540cf7ed3ebf3 | [
"MIT"
] | null | null | null | demisto_sdk/commands/common/git_util.py | cyrengmbh/demisto-sdk | 4d05532efd627a32b1af659e010540cf7ed3ebf3 | [
"MIT"
] | null | null | null | demisto_sdk/commands/common/git_util.py | cyrengmbh/demisto-sdk | 4d05532efd627a32b1af659e010540cf7ed3ebf3 | [
"MIT"
] | null | null | null | import os
from pathlib import Path
from typing import Set, Tuple
import gitdb
from git import InvalidGitRepositoryError, Repo
class GitUtil:
def __init__(self, repo: Repo = None):
if not repo:
try:
self.repo = Repo(Path.cwd(), search_parent_directories=True)
except... | 45.424149 | 120 | 0.63461 |
ff4c5b81294159506b2555c0638557734a85c889 | 6,304 | py | Python | ai4water/imv_networks.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 12 | 2020-10-13T08:23:17.000Z | 2021-01-22T04:36:21.000Z | ai4water/imv_networks.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 1 | 2020-10-15T02:42:52.000Z | 2020-10-15T02:51:07.000Z | ai4water/imv_networks.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 2 | 2020-11-23T04:45:38.000Z | 2020-11-26T10:12:34.000Z | from ai4water.backend import torch
nn = torch.nn
class IMVTensorLSTM(torch.jit.ScriptModule):
__constants__ = ["n_units", "input_dim"]
def __init__(self, input_dim, output_dim, n_units, device, init_std=0.02):
super().__init__()
self.U_j = nn.Parameter(torch.randn(input_dim, 1, n_units) * ini... | 52.533333 | 113 | 0.599302 |
ff4c7ace197067e8dfb6c204667736fc00651d62 | 3,148 | py | Python | voteapp/forms.py | dmm34/voteapp | cfa4ba31ff491bffbdf119746a7aa6a7e6a575f0 | [
"MIT"
] | null | null | null | voteapp/forms.py | dmm34/voteapp | cfa4ba31ff491bffbdf119746a7aa6a7e6a575f0 | [
"MIT"
] | null | null | null | voteapp/forms.py | dmm34/voteapp | cfa4ba31ff491bffbdf119746a7aa6a7e6a575f0 | [
"MIT"
] | null | null | null | from django import forms
from django.utils.translation import ugettext as _
class WriteInForm(forms.Form):
write_in_form = forms.CharField(widget=forms.TextInput, required=False, max_length=200,label="Add a write in option")
class MultiVoteForm(forms.Form):
def __init__(self, *args, **kwargs):
... | 37.47619 | 170 | 0.561944 |
ff4c909fa06f90aff02e38a609573a49afbaf2e0 | 4,679 | py | Python | genomic_data_service/region_indexer_elastic_search.py | ENCODE-DCC/genomic-data-service | 954017a5bcc5f448fbe2867768186df5e066c67c | [
"MIT"
] | 3 | 2020-10-26T02:15:55.000Z | 2022-01-26T18:39:09.000Z | genomic_data_service/region_indexer_elastic_search.py | ENCODE-DCC/genomic-data-service | 954017a5bcc5f448fbe2867768186df5e066c67c | [
"MIT"
] | 3 | 2021-08-17T02:01:54.000Z | 2022-03-30T17:14:02.000Z | genomic_data_service/region_indexer_elastic_search.py | ENCODE-DCC/genomic-data-service | 954017a5bcc5f448fbe2867768186df5e066c67c | [
"MIT"
] | 1 | 2022-03-24T21:15:34.000Z | 2022-03-24T21:15:34.000Z | from elasticsearch import Elasticsearch
from elasticsearch.exceptions import NotFoundError
from elasticsearch.helpers import bulk
RESIDENTS_INDEX = 'resident_regionsets'
REGION_INDEXER_SHARDS = 2
SEARCH_MAX = 99999
FOR_REGULOME_DB = 'regulomedb'
INDEX_SETTINGS = {
'index': {
'number_of_shards': REGION_IND... | 32.047945 | 126 | 0.516777 |
ff4cc931047ed6584510fee58827dc7a85303ff6 | 15,932 | py | Python | cinderclient/api_versions.py | deepanshhu/python-cinderclient | 2c0f74c708fd09c5ae813255aaa671073f2fe250 | [
"Apache-1.1"
] | null | null | null | cinderclient/api_versions.py | deepanshhu/python-cinderclient | 2c0f74c708fd09c5ae813255aaa671073f2fe250 | [
"Apache-1.1"
] | null | null | null | cinderclient/api_versions.py | deepanshhu/python-cinderclient | 2c0f74c708fd09c5ae813255aaa671073f2fe250 | [
"Apache-1.1"
] | null | null | null | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 36.965197 | 79 | 0.635262 |
ff4cc994fe1fb714b82ed7eb327988905b1fa476 | 1,598 | py | Python | untitled-1.py | xiaobinglu/Ryu-Qos | 0da078745a9c07a53905b542b4adad058fd1fd2d | [
"Apache-2.0"
] | 3 | 2017-05-16T11:24:05.000Z | 2021-05-15T13:59:44.000Z | untitled-1.py | xiaobinglu/Ryu-Qos | 0da078745a9c07a53905b542b4adad058fd1fd2d | [
"Apache-2.0"
] | null | null | null | untitled-1.py | xiaobinglu/Ryu-Qos | 0da078745a9c07a53905b542b4adad058fd1fd2d | [
"Apache-2.0"
] | 2 | 2016-08-20T18:07:16.000Z | 2017-05-16T11:24:07.000Z | #!/usr/bin/python
from fractions import Fraction
graph = {
1: { 2: (1,10), 4: (3,10) },
2: { 1: (1,10), 3: (5,10), 4: (1,10) },
3: { 2: (5,10), 5: (3,10), 6: (3,10) },
4: { 1: (3,10), 2: (1,10), 5: (1,10) },
5: { 3: (3,10), 4: (1,10), 6: (7,10) },
6: { 3: (3,10), 5: (7,10) }
}
graph_d... | 31.333333 | 80 | 0.525031 |
ff4cd05211503c84500bccf196533058721b1908 | 11,256 | py | Python | kats/models/lstm.py | vishalbelsare/Kats | b555e97c84662b8b92b23fd3687c72583e0e9a47 | [
"MIT"
] | null | null | null | kats/models/lstm.py | vishalbelsare/Kats | b555e97c84662b8b92b23fd3687c72583e0e9a47 | [
"MIT"
] | null | null | null | kats/models/lstm.py | vishalbelsare/Kats | b555e97c84662b8b92b23fd3687c72583e0e9a47 | [
"MIT"
] | null | null | null | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Apply LSTM for time series forecasting.
The LSTM (long short-term memory) model is a recurrent neural network model that
can be used fo... | 34.422018 | 97 | 0.617715 |
ff4ce734401c7f6c3acf8b89ccf368a385bf94c1 | 9,993 | py | Python | emLam/utils/__init__.py | DavidNemeskey/emLam | 89359e7eee5b7b9c596dec8ab6654591d4039e3e | [
"MIT"
] | 2 | 2018-03-31T10:00:11.000Z | 2018-09-15T19:38:19.000Z | emLam/utils/__init__.py | DavidNemeskey/emLam | 89359e7eee5b7b9c596dec8ab6654591d4039e3e | [
"MIT"
] | 16 | 2017-02-28T13:58:28.000Z | 2018-03-14T11:42:01.000Z | emLam/utils/__init__.py | dlt-rilmta/emLam | 2b7274dcda4080445698e10b34a3db2e2eed5112 | [
"MIT"
] | 1 | 2017-01-30T15:06:37.000Z | 2017-01-30T15:06:37.000Z | #!/usr/bin/env python3
"""Generic utility functions."""
from __future__ import absolute_import, division, print_function
from builtins import map
from past.builtins import basestring
from contextlib import contextmanager
import bz2
from functools import partial
import gzip
from io import open, TextIOWrapper
import log... | 32.339806 | 83 | 0.622135 |
ff4d2bbcd44dfff454fe61017fe098571e43e2ba | 28,316 | py | Python | opta/layer.py | run-x/opta | 64606498334f2b1aa79f5a431465eafdf5ca5ed7 | [
"Apache-2.0"
] | 595 | 2021-05-21T22:30:48.000Z | 2022-03-31T15:40:25.000Z | opta/layer.py | run-x/opta | 64606498334f2b1aa79f5a431465eafdf5ca5ed7 | [
"Apache-2.0"
] | 463 | 2021-05-24T21:32:59.000Z | 2022-03-31T17:12:33.000Z | opta/layer.py | run-x/opta | 64606498334f2b1aa79f5a431465eafdf5ca5ed7 | [
"Apache-2.0"
] | 29 | 2021-05-21T22:27:52.000Z | 2022-03-28T16:43:45.000Z | from __future__ import annotations
import hashlib
import importlib
import os
import re
import shutil
import tempfile
from datetime import datetime
from pathlib import Path
from types import SimpleNamespace
from typing import Any, Dict, FrozenSet, Iterable, List, Optional, Set, Tuple, TypedDict
import boto3
import cli... | 40.278805 | 121 | 0.581544 |
ff4d3adc644252e69af4fdc55a907c042d4bc993 | 1,233 | py | Python | monitoring/tracer/tracerlog.py | rpai1/dss | 79d8110c336851b155a6e5417692ec68b70c0c07 | [
"Apache-2.0"
] | null | null | null | monitoring/tracer/tracerlog.py | rpai1/dss | 79d8110c336851b155a6e5417692ec68b70c0c07 | [
"Apache-2.0"
] | null | null | null | monitoring/tracer/tracerlog.py | rpai1/dss | 79d8110c336851b155a6e5417692ec68b70c0c07 | [
"Apache-2.0"
] | null | null | null | import datetime
import logging
import os
from typing import Dict
import yaml
logging.basicConfig()
_logger = logging.getLogger('tracer.logging')
_logger.setLevel(logging.DEBUG)
class Logger(object):
def __init__(self, log_path: str):
session = datetime.datetime.now().strftime('%Y%m%d_%H%M%S')
self.log_pa... | 29.357143 | 86 | 0.660989 |
ff4d9720affa96def64503d40b35ea3e0cf85d64 | 2,828 | py | Python | setup.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | null | null | null | setup.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 2 | 2021-03-31T20:15:51.000Z | 2021-12-13T20:50:52.000Z | setup.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from __future__ import unicode_literals
import codecs
import os
import re
import setuptools
from setuptools import setup, find_packages
import sys
# Borrowed from pip at https://github.com/pypa/pip/blob/62c27dee45625e1b63d1e023b0656310f276e050/setup.py#L11-L15
here = os.path.abspath(os.path.dirn... | 28.857143 | 113 | 0.622702 |
ff4d9a85d0f9715d39cd9fbca946f168088db061 | 453 | py | Python | ERation/customer/migrations/0011_auto_20200531_1537.py | mishelshaji/ERation | 0e755ae63ae2c9cc009e18b72425ac508670a1cf | [
"MIT"
] | null | null | null | ERation/customer/migrations/0011_auto_20200531_1537.py | mishelshaji/ERation | 0e755ae63ae2c9cc009e18b72425ac508670a1cf | [
"MIT"
] | null | null | null | ERation/customer/migrations/0011_auto_20200531_1537.py | mishelshaji/ERation | 0e755ae63ae2c9cc009e18b72425ac508670a1cf | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-05-31 10:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('customer', '0010_auto_20200531_1536'),
]
operations = [
migrations.AlterField(
model_name='customer',
name='email',
... | 23.842105 | 115 | 0.624724 |
ff4dc104eceb8410c30faac04a307e635e8afec8 | 37,790 | py | Python | build/lib/distributedspace_mesa/space_distribute.py | tpike3/distributedspace_mesa | 7e46046a6747bca8d447180b09da87c936b90f1b | [
"MIT"
] | 1 | 2020-07-29T19:25:41.000Z | 2020-07-29T19:25:41.000Z | build/lib/distributedspace_mesa/space_distribute.py | tpike3/distributedspace_mesa | 7e46046a6747bca8d447180b09da87c936b90f1b | [
"MIT"
] | null | null | null | build/lib/distributedspace_mesa/space_distribute.py | tpike3/distributedspace_mesa | 7e46046a6747bca8d447180b09da87c936b90f1b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 18 11:34:33 2019
@author: ymamo
"""
from pathos.pools import ProcessPool
from pathos.helpers import cpu_count, mp
import collections
import copy
import math
import warnings
import distributedspace_mesa.distributed_space as ds
import itertools
#from pympler... | 38.838643 | 116 | 0.45049 |
ff4dc54a3b13325c0558742af637f71306a41d16 | 6,718 | py | Python | salt/renderers/jinja.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 1 | 2020-06-16T05:47:58.000Z | 2020-06-16T05:47:58.000Z | salt/renderers/jinja.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/renderers/jinja.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Jinja loading utils to enable a more powerful backend for jinja templates
Jinja in States
===============
.. _Jinja: http://jinja.pocoo.org/docs/templates/
The most basic usage of Jinja in state files is using control structures to
wrap conditional or redundant state elements:
.. code-bl... | 29.594714 | 87 | 0.615362 |
ff4ddef878f4cda087e025f50c956d545429c6e5 | 625 | py | Python | tests/test_generator.py | iscc/iscc-api | c53af3ea5617e20454964c9fda78dce08de41b7b | [
"Apache-2.0"
] | 3 | 2022-01-04T09:37:10.000Z | 2022-03-25T21:29:23.000Z | tests/test_generator.py | iscc/iscc-api | c53af3ea5617e20454964c9fda78dce08de41b7b | [
"Apache-2.0"
] | 27 | 2022-01-04T20:16:34.000Z | 2022-03-11T11:10:26.000Z | tests/test_generator.py | iscc/iscc-schema | c53af3ea5617e20454964c9fda78dce08de41b7b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from iscc_schema import generator
def test_iscc_request():
r = generator.IsccCodePostRequest(source_url="https://example.com")
assert r.json(exclude_unset=True) == '{"source_url": "https://example.com"}'
def test_data_uri():
durl = "data:application/json;charset=utf-8;base64,eyJl... | 31.25 | 93 | 0.7408 |
ff4de08a7d14aa8d4d1938a222c41bdd6a353d44 | 80 | py | Python | lang/python/dtime.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 8 | 2015-06-07T13:25:48.000Z | 2022-03-22T23:14:50.000Z | lang/python/dtime.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 30 | 2016-01-29T01:36:41.000Z | 2018-09-19T07:01:22.000Z | lang/python/dtime.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | null | null | null | import time
import sys
t=float(sys.argv[1])
print time.asctime(time.gmtime(t))
| 13.333333 | 34 | 0.75 |
ff4de092a9c8d067c31a33781eabeeda1fb60c81 | 46 | py | Python | src/backend/app/api/v1/endpoints/__init__.py | douglasdaly/web-app-skeleton | af7580822b18e714d7c0b54f6fdcd11bf57f16e0 | [
"MIT"
] | 1 | 2021-07-20T14:20:10.000Z | 2021-07-20T14:20:10.000Z | src/backend/app/api/v1/endpoints/__init__.py | douglasdaly/web-app-skeleton | af7580822b18e714d7c0b54f6fdcd11bf57f16e0 | [
"MIT"
] | 4 | 2021-03-31T20:03:55.000Z | 2022-02-27T09:19:29.000Z | src/backend/app/api/v1/endpoints/__init__.py | douglasdaly/web-app-skeleton | af7580822b18e714d7c0b54f6fdcd11bf57f16e0 | [
"MIT"
] | 1 | 2021-05-02T09:27:16.000Z | 2021-05-02T09:27:16.000Z | # -*- coding: utf-8 -*-
"""
API endpoints
"""
| 9.2 | 23 | 0.478261 |
ff4de15b26628469d9584aee114947b251c55d98 | 3,926 | py | Python | Sklearn_scipy_numpy/source/sklearn/datasets/california_housing.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 1 | 2019-06-27T12:09:44.000Z | 2019-06-27T12:09:44.000Z | Sklearn_scipy_numpy/source/sklearn/datasets/california_housing.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | Sklearn_scipy_numpy/source/sklearn/datasets/california_housing.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | """California housing dataset.
The original database is available from StatLib
http://lib.stat.cmu.edu/
The data contains 20,640 observations on 9 variables.
This dataset contains the average house value as target variable
and the following input variables (features): average income,
housing average age, averag... | 30.2 | 79 | 0.678044 |
ff4df24b724beb6d77474096bbfabe0e13ff5c4c | 3,764 | py | Python | master/searx-master/searx/engines/swisscows.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/searx-master/searx/engines/swisscows.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/searx-master/searx/engines/swisscows.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | """
Swisscows (Web, Images)
@website https://swisscows.ch
@provide-api no
@using-api no
@results HTML (using search portal)
@stable no (HTML can change)
@parse url, title, content
"""
from json import loads
import re
from lxml.html import fromstring
from searx.url_utils import unquote, ur... | 30.852459 | 113 | 0.600956 |
ff4dfa157f1a96791631d09751ca987740f16849 | 1,230 | py | Python | Chapter 3/03/recipe18.py | robert0714/Python-Testing-Cookbook-Second-Edition | c7c5d59e42e9ca2874faf12a6dd201736a45ca83 | [
"MIT"
] | null | null | null | Chapter 3/03/recipe18.py | robert0714/Python-Testing-Cookbook-Second-Edition | c7c5d59e42e9ca2874faf12a6dd201736a45ca83 | [
"MIT"
] | null | null | null | Chapter 3/03/recipe18.py | robert0714/Python-Testing-Cookbook-Second-Edition | c7c5d59e42e9ca2874faf12a6dd201736a45ca83 | [
"MIT"
] | null | null | null | def convert_to_basen(value, base):
"""Convert a base10 number to basen.
>>> convert_to_basen(10, 2)
'1010/2'
>>> convert_to_basen(15, 16)
'f/16'
>>> convert_to_basen(0, 2)
Traceback (most recent call last):
...
ValueError: math domain error
>>> convert_to_basen(-1, 2)
... | 26.73913 | 61 | 0.500813 |
ff4e05e45c933c17cc61167dd5ce3b4fdb20fb53 | 3,726 | py | Python | attitude/display/parametric.py | davenquinn/Attitude | f7cd15212ca7a2f9a0e367cf9769e382eeaea91e | [
"MIT"
] | 8 | 2015-03-24T09:08:32.000Z | 2021-05-17T03:32:01.000Z | attitude/display/parametric.py | davenquinn/Attitude | f7cd15212ca7a2f9a0e367cf9769e382eeaea91e | [
"MIT"
] | 3 | 2018-03-16T07:38:26.000Z | 2022-02-15T06:07:54.000Z | attitude/display/parametric.py | davenquinn/Attitude | f7cd15212ca7a2f9a0e367cf9769e382eeaea91e | [
"MIT"
] | null | null | null | from __future__ import division
"""
Functions to produce parametric representations of
conic sections in two dimensions. This can be applied
to plotting 2D slices of quadrics as well.
We could generalize this to n dimensions, but that is probably
not super useful at the moment.
"""
import numpy as N
from matplotlib im... | 28.015038 | 96 | 0.601986 |
ff4e217f83601f147efc943d5b3bc81b77b043ac | 1,523 | py | Python | flask_swagger_generator/specifiers/swagger_models.py | coding-kitties/flask-swagger-generator | e3fa56f97e57f4d95231e5a0ef8c0bdeb54e7ae3 | [
"MIT"
] | 2 | 2021-09-02T09:54:58.000Z | 2022-02-10T01:23:20.000Z | flask_swagger_generator/specifiers/swagger_models.py | coding-kitties/flask-swagger-generator | e3fa56f97e57f4d95231e5a0ef8c0bdeb54e7ae3 | [
"MIT"
] | 3 | 2020-12-28T18:57:37.000Z | 2021-07-25T11:14:32.000Z | flask_swagger_generator/specifiers/swagger_models.py | coding-kitties/flask-swagger-generator | e3fa56f97e57f4d95231e5a0ef8c0bdeb54e7ae3 | [
"MIT"
] | 2 | 2021-09-02T09:55:04.000Z | 2021-09-29T12:19:17.000Z | from abc import ABC, abstractmethod
from random import randint
class SwaggerModel(ABC):
TAB = " "
def __init__(self):
self.swagger_models = []
def add_swagger_model(self, child_swagger_model):
self.swagger_models.append(child_swagger_model)
def add_swagger_models(self, child_swagge... | 25.813559 | 73 | 0.656599 |
ff4e3934cdb7083b72f42b1839c29e7ff2e157be | 1,458 | py | Python | integration/common/setup.py | skcc00000app08542/OpenLineage | e0dd3715e61b3d89f60ece0d7385e82ccd141ba4 | [
"Apache-2.0"
] | 1 | 2022-01-06T03:45:24.000Z | 2022-01-06T03:45:24.000Z | integration/common/setup.py | skcc00000app08542/OpenLineage | e0dd3715e61b3d89f60ece0d7385e82ccd141ba4 | [
"Apache-2.0"
] | null | null | null | integration/common/setup.py | skcc00000app08542/OpenLineage | e0dd3715e61b3d89f60ece0d7385e82ccd141ba4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# SPDX-License-Identifier: Apache-2.0.
#
# -*- coding: utf-8 -*-
from setuptools import find_namespace_packages, setup
with open("README.md") as readme_file:
readme = readme_file.read()
__version__ = "0.7.0"
requirements = [
"attrs>=19.3.0",
f"openlineage-python=={__version__}",
... | 23.142857 | 69 | 0.604938 |
ff4e40b848e3ca5a76ee657141ea27f8dc31a65f | 2,996 | py | Python | gym-duckietown/learning/reinforcement/pytorch/a2c_ppo_acktr/distributions.py | lyf44/CS4278-5478-Project-Materials | 685419c65847e72450e99586e9e0f3794369b4a3 | [
"MIT"
] | null | null | null | gym-duckietown/learning/reinforcement/pytorch/a2c_ppo_acktr/distributions.py | lyf44/CS4278-5478-Project-Materials | 685419c65847e72450e99586e9e0f3794369b4a3 | [
"MIT"
] | null | null | null | gym-duckietown/learning/reinforcement/pytorch/a2c_ppo_acktr/distributions.py | lyf44/CS4278-5478-Project-Materials | 685419c65847e72450e99586e9e0f3794369b4a3 | [
"MIT"
] | null | null | null | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from a2c_ppo_acktr.utils import AddBias, init
"""
Modify standard PyTorch distributions so they are compatible with this code.
"""
#
# Standardize distribution interfaces
#
# Categorical
class FixedCategorical(torch.distributions.Catego... | 26.052174 | 86 | 0.612483 |
ff4e65143254f3e7cf65c7f5dc5a8057d5f05703 | 5,948 | py | Python | savu/plugins/simulation/tomo_phantom_artifacts_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | null | null | null | savu/plugins/simulation/tomo_phantom_artifacts_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | null | null | null | savu/plugins/simulation/tomo_phantom_artifacts_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | null | null | null | from savu.plugins.plugin_tools import PluginTools
class TomoPhantomArtifactsTools(PluginTools):
"""A plugin to add artifacts to real or generated synthetic data using TomoPhantom
"""
def define_parameters(self):
"""
pattern:
visibility: advanced
dtype: st... | 38.875817 | 145 | 0.559348 |
ff4e8a6a8dcf1c33015ee92035cfdf56e163fd01 | 1,121 | py | Python | mmf/modules/schedulers.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | 2 | 2021-02-22T12:15:42.000Z | 2021-05-02T15:22:24.000Z | mmf/modules/schedulers.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | 7 | 2021-03-01T21:16:26.000Z | 2022-02-27T07:07:11.000Z | mmf/modules/schedulers.py | krantirk/MMF | 2e4acaad7ca8eee4319e1205a560eed81733a0be | [
"BSD-3-Clause"
] | 1 | 2022-03-04T14:19:43.000Z | 2022-03-04T14:19:43.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
from torch.optim.lr_scheduler import LambdaLR
from transformers.optimization import (
get_cosine_schedule_with_warmup,
get_linear_schedule_with_warmup,
)
from mmf.common.registry import registry
@registry.register_scheduler("pythia")
class PythiaScheduler(La... | 32.028571 | 74 | 0.750223 |
ff4eac63bb9f422584cf74402bd7900ceff096b0 | 94 | py | Python | abc/092/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/092/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/092/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | A = int(input())
B = int(input())
C = int(input())
D = int(input())
print(min(A,B) + min(C,D)) | 18.8 | 26 | 0.542553 |
ff4fb5f70aa4e74ebe2b2f3707a61f4c4b2552dd | 1,071 | py | Python | json_schema_for_humans/const.py | sthagen/json-schema-for-humans | de54b27855528344e7f076e8757f68814b0eff75 | [
"Apache-2.0"
] | 1 | 2020-07-03T17:48:43.000Z | 2020-07-03T17:48:43.000Z | json_schema_for_humans/const.py | sthagen/json-schema-for-humans | de54b27855528344e7f076e8757f68814b0eff75 | [
"Apache-2.0"
] | null | null | null | json_schema_for_humans/const.py | sthagen/json-schema-for-humans | de54b27855528344e7f076e8757f68814b0eff75 | [
"Apache-2.0"
] | null | null | null | from enum import Enum
from io import TextIOWrapper, FileIO
from typing import Union, TextIO
TYPE_ARRAY = "array"
TYPE_BOOLEAN = "boolean"
TYPE_CONST = "const"
TYPE_ENUM = "enum"
TYPE_INTEGER = "integer"
TYPE_NULL = "null"
TYPE_NUMBER = "number"
TYPE_OBJECT = "object"
TYPE_STRING = "string"
DESCRIPTION = "description"... | 20.207547 | 51 | 0.696545 |
ff4fc3e46f9fc936b0a14200293945aefcabd21d | 16,177 | py | Python | src/db.py | ajroach42/bbj | e0f83592dc5f22a07f79f97ccc63ac66e917e2c7 | [
"MIT"
] | 1 | 2019-03-16T03:15:52.000Z | 2019-03-16T03:15:52.000Z | src/db.py | tildetown/bbj | e0f83592dc5f22a07f79f97ccc63ac66e917e2c7 | [
"MIT"
] | null | null | null | src/db.py | tildetown/bbj | e0f83592dc5f22a07f79f97ccc63ac66e917e2c7 | [
"MIT"
] | 1 | 2018-06-11T02:29:58.000Z | 2018-06-11T02:29:58.000Z | """
This module contains all of the interaction with the SQLite database. It
doesnt hold a connection itself, rather, a connection is passed in as
an argument to all the functions and is maintained by CherryPy's threading
system. This is clunky but fuck it, it works (for now at least).
All post and thread data are sto... | 31.350775 | 93 | 0.621747 |
ff4fd5dd97817156ae3a7e75aca6b3f628778065 | 9,708 | py | Python | netgpibdata/HPmeasure.py | daccordeon/summerSHG | 4e9254b408bb04ddd7b4b5ae1c8db0d23c72f88f | [
"BSD-3-Clause"
] | 1 | 2020-12-06T23:40:21.000Z | 2020-12-06T23:40:21.000Z | netgpibdata/HPmeasure.py | daccordeon/summerSHG | 4e9254b408bb04ddd7b4b5ae1c8db0d23c72f88f | [
"BSD-3-Clause"
] | null | null | null | netgpibdata/HPmeasure.py | daccordeon/summerSHG | 4e9254b408bb04ddd7b4b5ae1c8db0d23c72f88f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Master AG4395 measurement script
# Eric Quintero - 2015
# Standard library imports
import os
import sys
import time
import argparse
# Neccesary external libraries
import yaml
import numpy as np
#import matplotlib.pyplot as plt
# Custom libaries
import HP8591E as inst
def readParams(paramFil... | 35.822878 | 80 | 0.579625 |
ff4fd8aa5e1cc13b83edd0e5464cfd5e1b6bc803 | 4,140 | py | Python | run_predictions.py | akshayyeluri/caltech-ee148-spring2020-hw01 | 8b7ec6a9e74218f3313bb04cdf62db1ab5dba36a | [
"MIT"
] | null | null | null | run_predictions.py | akshayyeluri/caltech-ee148-spring2020-hw01 | 8b7ec6a9e74218f3313bb04cdf62db1ab5dba36a | [
"MIT"
] | null | null | null | run_predictions.py | akshayyeluri/caltech-ee148-spring2020-hw01 | 8b7ec6a9e74218f3313bb04cdf62db1ab5dba36a | [
"MIT"
] | null | null | null | import os
import cv2
import numpy as np
import json
from PIL import Image
import pickle
import matplotlib.pyplot as plt
import matplotlib.patches as patches
# set the path to the downloaded data:
data_path = '../RedLights2011_Medium'
# set a path for saving predictions:
preds_path = './hw01_preds'
os.makedirs(pred... | 31.12782 | 80 | 0.612802 |
ff4fda55f0ddb7bc712adf1d39c4220b790d5d0a | 20,402 | py | Python | sdk/python/pulumi_azure/apimanagement/api_schema.py | pulumi/pulumi-azure | c62b6c1828de1facfd0d92425b72e22e229b0afc | [
"ECL-2.0",
"Apache-2.0"
] | 109 | 2018-06-18T00:19:44.000Z | 2022-02-20T05:32:57.000Z | sdk/python/pulumi_azure/apimanagement/api_schema.py | pulumi/pulumi-azure | c62b6c1828de1facfd0d92425b72e22e229b0afc | [
"ECL-2.0",
"Apache-2.0"
] | 663 | 2018-06-18T21:08:46.000Z | 2022-03-31T20:10:11.000Z | sdk/python/pulumi_azure/apimanagement/api_schema.py | pulumi/pulumi-azure | c62b6c1828de1facfd0d92425b72e22e229b0afc | [
"ECL-2.0",
"Apache-2.0"
] | 41 | 2018-07-19T22:37:38.000Z | 2022-03-14T10:56:26.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** 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... | 46.054176 | 216 | 0.661259 |
ff5033c7627e9559439e1ce6889885a7f6417773 | 3,853 | py | Python | onadata/libs/utils/image_tools.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/libs/utils/image_tools.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/libs/utils/image_tools.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, print_function, division, absolute_import
from cStringIO import StringIO
from tempfile import NamedTemporaryFile
from PIL import Image
import requests
from django.conf import settings
from django.core.files.storage import get_storage_class
from django.core.fil... | 32.378151 | 91 | 0.648326 |
ff5038f464bea68a6a3d50ac7b7ba5f2615d034f | 95 | py | Python | src/speaking_eye/icon_state.py | alena-bartosh/speaking-eye | 86e692cf5d3182f77b28e5264da74657d1972303 | [
"MIT"
] | 6 | 2020-04-30T17:35:09.000Z | 2021-11-18T09:41:50.000Z | src/speaking_eye/icon_state.py | alena-bartosh/speaking-eye | 86e692cf5d3182f77b28e5264da74657d1972303 | [
"MIT"
] | 6 | 2020-05-16T17:52:45.000Z | 2021-08-16T11:47:11.000Z | src/speaking_eye/icon_state.py | alena-bartosh/speaking-eye | 86e692cf5d3182f77b28e5264da74657d1972303 | [
"MIT"
] | null | null | null | from enum import Enum
class IconState(Enum):
ACTIVE = 'active'
DISABLED = 'disabled'
| 13.571429 | 25 | 0.673684 |
ff504cb87f66c8173a5b550f34c24f30c49c3ddf | 680 | py | Python | src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/__init__.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/__init__.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | 3 | 2021-03-26T00:48:20.000Z | 2022-03-29T22:05:39.000Z | src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/__init__.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | 1 | 2017-12-28T04:51:44.000Z | 2017-12-28T04:51:44.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 45.333333 | 106 | 0.566176 |
ff504f941f33fc274a7ef0a25e7999c688f6b15f | 2,714 | py | Python | examples/io_plugin/dcio_example/pickles.py | Kirill888/datacube-core | 996b395e15f975decb77c0ca9fa0555177674b2f | [
"Apache-2.0"
] | 2 | 2019-10-24T15:29:54.000Z | 2019-10-24T15:29:58.000Z | examples/io_plugin/dcio_example/pickles.py | Kirill888/datacube-core | 996b395e15f975decb77c0ca9fa0555177674b2f | [
"Apache-2.0"
] | 2 | 2021-03-26T00:37:36.000Z | 2021-03-31T20:05:01.000Z | examples/io_plugin/dcio_example/pickles.py | Kirill888/datacube-core | 996b395e15f975decb77c0ca9fa0555177674b2f | [
"Apache-2.0"
] | null | null | null | """ Example reader plugin
"""
from contextlib import contextmanager
import pickle
PROTOCOL = 'file'
FORMAT = 'pickle'
def uri_split(uri):
loc = uri.find('://')
if loc < 0:
return uri, PROTOCOL
return uri[loc+3:], uri[:loc]
class PickleDataSource(object):
class BandDataSource(object):
... | 23.807018 | 90 | 0.564849 |
ff506e17e93d66568acd17b07be8d53af38bbdeb | 11,905 | py | Python | docs/conf.py | sthagen/thombashi-pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 81 | 2017-03-18T02:57:29.000Z | 2022-03-26T16:54:59.000Z | docs/conf.py | sthagen/pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 4 | 2017-08-09T14:58:48.000Z | 2020-04-17T12:59:29.000Z | docs/conf.py | sthagen/pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 11 | 2017-05-02T16:23:59.000Z | 2021-12-10T15:05:39.000Z | import os
import sys
import sphinx_rtd_theme
from pytablereader import __author__, __copyright__, __name__, __version__
sys.path.insert(0, os.path.abspath('..'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# n... | 27.946009 | 80 | 0.698026 |
ff50ba5586ae91344d9d589699c04088971f978c | 1,994 | py | Python | docs/conf.py | johannah-23/motulator | 902eceaf62f0a3607a6eb38c2914fa01e9b6ebf0 | [
"MIT"
] | null | null | null | docs/conf.py | johannah-23/motulator | 902eceaf62f0a3607a6eb38c2914fa01e9b6ebf0 | [
"MIT"
] | null | null | null | docs/conf.py | johannah-23/motulator | 902eceaf62f0a3607a6eb38c2914fa01e9b6ebf0 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 36.925926 | 79 | 0.669509 |
ff50caf20171f979ae7bae54131e7380e9b4a6fd | 10,317 | py | Python | datasets/gsv_dataset.py | PrendiProgramming/CTRL-C | 33649170f94f1bdc568163762ab2c1787f2fc948 | [
"Apache-2.0"
] | 43 | 2021-09-06T08:00:41.000Z | 2022-03-24T08:14:31.000Z | datasets/gsv_dataset.py | PrendiProgramming/CTRL-C | 33649170f94f1bdc568163762ab2c1787f2fc948 | [
"Apache-2.0"
] | 4 | 2021-09-10T17:11:42.000Z | 2022-03-31T02:04:12.000Z | datasets/gsv_dataset.py | PrendiProgramming/CTRL-C | 33649170f94f1bdc568163762ab2c1787f2fc948 | [
"Apache-2.0"
] | 6 | 2021-09-07T04:04:27.000Z | 2021-11-30T10:48:22.000Z | import os
import os.path as osp
import torch
from torch.utils.data import Dataset
from torch.utils.data.dataloader import default_collate
from torchvision.transforms import functional as F
import numpy as np
import numpy.linalg as LA
import cv2
import json
import csv
import matplotlib.pyplot as plt
import datasets.t... | 39.079545 | 109 | 0.599884 |
ff50e9a8ba6c3147afd4beb475ff140609c2dc58 | 9,324 | py | Python | src/onevision/cv/imgproc/color/raw.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/cv/imgproc/color/raw.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/cv/imgproc/color/raw.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Raw image.
"""
from __future__ import annotations
from enum import Enum
import torch
from torch import nn
from torch import Tensor
from torch.nn import functional as F
from onevision.factory import TRANSFORMS
__all__ = [
"CFA",
"raw_to_rgb",
"rgb_to_raw... | 33.181495 | 120 | 0.55148 |
ff51103430436bd3a8f59622a4653ae8ab37eb5d | 507 | py | Python | comps/migrations/0041_auto_20210220_0115.py | dlanghorne0428/dancesport-tracker-projec | e55d91a4f03c26d6ee8c28846a809064adfdb158 | [
"MIT"
] | null | null | null | comps/migrations/0041_auto_20210220_0115.py | dlanghorne0428/dancesport-tracker-projec | e55d91a4f03c26d6ee8c28846a809064adfdb158 | [
"MIT"
] | 87 | 2020-04-15T22:29:03.000Z | 2022-01-02T02:21:28.000Z | comps/migrations/0041_auto_20210220_0115.py | dlanghorne0428/dancesport-tracker-projec | e55d91a4f03c26d6ee8c28846a809064adfdb158 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2021-02-20 01:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('comps', '0040_heat_entry_rating'),
]
operations = [
migrations.AlterField(
model_name='comp',
name='url_data_format'... | 26.684211 | 167 | 0.591716 |
ff5136cacd35556492d4f9b59fb76d5c059fe493 | 841 | py | Python | models/rgbnet.py | tranduytrung/rgbd-classification | 156d829200c4592867af5ade85e8642afbe8580e | [
"Apache-2.0"
] | null | null | null | models/rgbnet.py | tranduytrung/rgbd-classification | 156d829200c4592867af5ade85e8642afbe8580e | [
"Apache-2.0"
] | null | null | null | models/rgbnet.py | tranduytrung/rgbd-classification | 156d829200c4592867af5ade85e8642afbe8580e | [
"Apache-2.0"
] | 1 | 2021-09-28T02:36:17.000Z | 2021-09-28T02:36:17.000Z | from collections import OrderedDict
import torch
import torchvision
class RGBNet(torch.nn.Module):
def __init__(self, cfg):
super(RGBNet, self).__init__()
num_classes = cfg['num_classes']
pretrained = 'pretrained' in cfg and cfg['pretrained']
refine = 'refine' in cfg and cfg['refin... | 31.148148 | 74 | 0.62069 |
ff5146558b60204138295e1085545c1a20e9a1c8 | 2,921 | py | Python | translator/apps/vcompression_engine.py | 5g-media/mape-translation | 2cca5b9b0880fa4580597eb02ad6006b9fe835e5 | [
"Apache-2.0"
] | null | null | null | translator/apps/vcompression_engine.py | 5g-media/mape-translation | 2cca5b9b0880fa4580597eb02ad6006b9fe835e5 | [
"Apache-2.0"
] | 2 | 2020-04-16T06:08:33.000Z | 2020-04-16T06:08:33.000Z | translator/apps/vcompression_engine.py | 5g-media/mape-translation | 2cca5b9b0880fa4580597eb02ad6006b9fe835e5 | [
"Apache-2.0"
] | null | null | null | from translator.basemetric import BaseMetric
from translator.utils import get_vdu_details, vce_metrics, convert_unix_timestamp_to_datetime_str
from translator.exceptions import OsmInfoNotFound
from numbers import Number
class Metric(BaseMetric):
"""Constructor"""
def __init__(self, record, source="vce"):
... | 30.113402 | 97 | 0.600822 |
ff5172b940f13eea66f56537a3011fb342ebf4d0 | 1,532 | py | Python | examples/docs_snippets/docs_snippets_tests/integrations_tests/test_dbt.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets_tests/integrations_tests/test_dbt.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets_tests/integrations_tests/test_dbt.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import pytest
from docs_snippets.integrations.dbt import (
scope_dbt_asset_mats,
scope_dbt_cli_config_exclude_models,
scope_dbt_cli_config_executable,
scope_dbt_cli_config_profile_and_target,
scope_dbt_cli_config_select_models,
scope_dbt_cli_config_vars,
scope_dbt_cli_profile_modes,
sco... | 30.039216 | 50 | 0.768277 |
ff518a178b6b558692574e0db686d4cd769b71e1 | 1,621 | py | Python | mGui/qt/_properties.py | theodox/mGui | d2cd8c48ae1d51c9587b0aaab5b1d296a0561625 | [
"MIT"
] | 105 | 2015-01-13T10:52:55.000Z | 2022-03-23T12:49:01.000Z | mGui/qt/_properties.py | techartorg/mGui | d2cd8c48ae1d51c9587b0aaab5b1d296a0561625 | [
"MIT"
] | 84 | 2015-01-15T14:56:08.000Z | 2019-04-15T17:03:51.000Z | mGui/qt/_properties.py | techartorg/mGui | d2cd8c48ae1d51c9587b0aaab5b1d296a0561625 | [
"MIT"
] | 22 | 2015-01-11T11:25:37.000Z | 2021-12-24T06:34:46.000Z | """
Defines a descriptor object for binding Qt Signals to mGui objects.
"""
from mGui.events import Event, MayaEvent
from mGui.qt._compat import as_qt_object
import weakref
class QtSignalProperty(object):
"""
Property descriptor for Qt Signals. When accessed, returns the appropriate
Event object from a ... | 33.770833 | 103 | 0.658236 |
ff51936102dd3c15a2be69f81514355da790786b | 446 | py | Python | voteapp/migrations/0021_auto_20170311_1442.py | dmm34/voteapp | cfa4ba31ff491bffbdf119746a7aa6a7e6a575f0 | [
"MIT"
] | null | null | null | voteapp/migrations/0021_auto_20170311_1442.py | dmm34/voteapp | cfa4ba31ff491bffbdf119746a7aa6a7e6a575f0 | [
"MIT"
] | null | null | null | voteapp/migrations/0021_auto_20170311_1442.py | dmm34/voteapp | cfa4ba31ff491bffbdf119746a7aa6a7e6a575f0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-11 21:42
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('voteapp', '0020_votes_custom_option'),
]
operations = [
migrations.RenameField(
... | 21.238095 | 48 | 0.621076 |
ff5197a7fd295e49466c0e6aaffbddf03616be0d | 2,338 | py | Python | model/testing.py | rafikg/Colorize_grayscale_image | 36368038efd241ed38865f30941dfda3b58cee94 | [
"MIT"
] | 3 | 2020-02-21T07:29:32.000Z | 2022-03-01T03:21:55.000Z | model/testing.py | rafikg/Colorize_grayscale_image | 36368038efd241ed38865f30941dfda3b58cee94 | [
"MIT"
] | null | null | null | model/testing.py | rafikg/Colorize_grayscale_image | 36368038efd241ed38865f30941dfda3b58cee94 | [
"MIT"
] | 1 | 2020-03-11T07:38:29.000Z | 2020-03-11T07:38:29.000Z | import tensorflow as tf
import matplotlib.pyplot as plt
import glob
from utils import rgb_to_lab, lab_to_rgb
from model import ColorizeGrayScale
from config import reg
from data import normalize_rgb
from keras import backend as K
K.clear_session()
# load all images
image_files = glob.glob('../images/*.jpg')
batch_in... | 29.225 | 71 | 0.686912 |
ff51a1a3847765584cd93eb5b27b2644c0f38b35 | 8,829 | py | Python | summarizer.py | Yifan-G/StanzaGraphs | 58c0e2d135ee2ff2ee033c4c7916cde76102125d | [
"Apache-2.0"
] | null | null | null | summarizer.py | Yifan-G/StanzaGraphs | 58c0e2d135ee2ff2ee033c4c7916cde76102125d | [
"Apache-2.0"
] | null | null | null | summarizer.py | Yifan-G/StanzaGraphs | 58c0e2d135ee2ff2ee033c4c7916cde76102125d | [
"Apache-2.0"
] | null | null | null | import stanza
import csv
import os
import math
import networkx as nx
from visualizer import gshow
import langid
from myfile import *
from collections import defaultdict
from googletrans import Translator, LANGCODES, LANGUAGES
# alternative rankers
def rank_with(f,g) :
return f(g)
def pagerank(g) :
return nx.pa... | 26.917683 | 81 | 0.618303 |
ff51bf2749a70abe7cb547064c4b5a1e987fb1a7 | 630 | py | Python | py_trees/version.py | hiradg/py_trees | b0025e7060ec4ec5f3f79b0e8405230e1a3635cd | [
"BSD-3-Clause"
] | null | null | null | py_trees/version.py | hiradg/py_trees | b0025e7060ec4ec5f3f79b0e8405230e1a3635cd | [
"BSD-3-Clause"
] | null | null | null | py_trees/version.py | hiradg/py_trees | b0025e7060ec4ec5f3f79b0e8405230e1a3635cd | [
"BSD-3-Clause"
] | null | null | null | #
# License: BSD
# https://raw.githubusercontent.com/splintered-reality/py_trees/devel/LICENSE
#
##############################################################################
# Documentation
##############################################################################
"""
Version number provided separately here so... | 31.5 | 79 | 0.371429 |
ff51fb82cccd4a803a30a9c2c57b8a4cf282ca93 | 2,994 | py | Python | fabfile.py | pcoder/public-health-ch | cebc4849653560c54238b67814074353ff7c01f3 | [
"MIT"
] | 2 | 2020-10-29T16:27:21.000Z | 2021-06-07T12:47:46.000Z | fabfile.py | pcoder/public-health-ch | cebc4849653560c54238b67814074353ff7c01f3 | [
"MIT"
] | 11 | 2017-05-09T10:50:28.000Z | 2021-12-15T17:01:23.000Z | fabfile.py | pcoder/public-health-ch | cebc4849653560c54238b67814074353ff7c01f3 | [
"MIT"
] | 4 | 2017-04-24T13:06:55.000Z | 2021-06-04T02:18:32.000Z | from datetime import datetime
from fabric.api import *
env.roledefs = {
'production': [],
'staging': [],
}
@roles('production')
def deploy_production():
# Remove this line when you're happy that this task is correct
raise RuntimeError("Please check the fabfile before using it")
run('git pull')... | 31.1875 | 91 | 0.682365 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.