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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
03997a79f8f91cd8e02177fccf5e723591613e1f | 3,458 | py | Python | mapclientplugins/heartsurfacesemiautosegmenterstep/configuredialog.py | tsalemink/heartsurfacesemiautosegmenter | b9b2b20f1a92c193c57fabd1780c2939f0969c8a | [
"Apache-2.0"
] | null | null | null | mapclientplugins/heartsurfacesemiautosegmenterstep/configuredialog.py | tsalemink/heartsurfacesemiautosegmenter | b9b2b20f1a92c193c57fabd1780c2939f0969c8a | [
"Apache-2.0"
] | null | null | null | mapclientplugins/heartsurfacesemiautosegmenterstep/configuredialog.py | tsalemink/heartsurfacesemiautosegmenter | b9b2b20f1a92c193c57fabd1780c2939f0969c8a | [
"Apache-2.0"
] | 1 | 2021-06-08T02:33:13.000Z | 2021-06-08T02:33:13.000Z | from PySide2 import QtWidgets
from mapclientplugins.heartsurfacesemiautosegmenterstep.ui_configuredialog import Ui_ConfigureDialog
INVALID_STYLE_SHEET = 'background-color: rgba(239, 0, 0, 50)'
DEFAULT_STYLE_SHEET = ''
class ConfigureDialog(QtWidgets.QDialog):
'''
Configure dialog to present the user with the... | 40.209302 | 194 | 0.643725 |
03999d8c9a89ffe0cf91e11fd1ae62712e91bd26 | 4,609 | py | Python | implementations/gpumem_test.py | LunaDilangalen/gpu-pathfinding | ba34c44595a6ede0c3c47bc60bb2a34355fc4891 | [
"MIT"
] | null | null | null | implementations/gpumem_test.py | LunaDilangalen/gpu-pathfinding | ba34c44595a6ede0c3c47bc60bb2a34355fc4891 | [
"MIT"
] | 4 | 2021-06-08T22:56:00.000Z | 2022-03-12T00:53:10.000Z | implementations/gpumem_test.py | LunaDilangalen/gpu-pathfinding | ba34c44595a6ede0c3c47bc60bb2a34355fc4891 | [
"MIT"
] | null | null | null | TPB = 4
from numba import cuda, int32
import numpy as np
import cupy as cp
import math
from skimage.util.shape import view_as_windows
dim = (8,8)
@cuda.jit
def gpu_memory_test(arr, block, thread, shared_sum_arr, local_sum_arr, padded_arr):
x, y = cuda.grid(2)
width, height = dim
tx = cuda.threadIdx.x
... | 30.932886 | 114 | 0.635713 |
0399a71f6551a0b3eb99c9a8c72098f74e5cb62d | 2,672 | py | Python | benchmarks/django-workload/uwsgi/files/django-workload/django_workload/middleware.py | jonasbn/cloudsuite | 8a10c1062a08fd130fa2dfa5d5887e4a52f9caa5 | [
"PHP-3.01",
"Apache-2.0"
] | 103 | 2017-03-03T20:28:02.000Z | 2022-03-31T09:29:05.000Z | benchmarks/django-workload/uwsgi/files/django-workload/django_workload/middleware.py | jonasbn/cloudsuite | 8a10c1062a08fd130fa2dfa5d5887e4a52f9caa5 | [
"PHP-3.01",
"Apache-2.0"
] | 182 | 2017-03-01T18:11:02.000Z | 2022-03-13T19:31:02.000Z | benchmarks/django-workload/uwsgi/files/django-workload/django_workload/middleware.py | jonasbn/cloudsuite | 8a10c1062a08fd130fa2dfa5d5887e4a52f9caa5 | [
"PHP-3.01",
"Apache-2.0"
] | 93 | 2017-02-23T19:53:08.000Z | 2022-03-20T03:05:15.000Z | # Copyright 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from django.utils.deprecation import MiddlewareMixin
from django_statsd.middleware import (
GraphiteMiddleware,
GraphiteReque... | 30.712644 | 77 | 0.659431 |
0399ba53931ac77c06e50d1f07da5a0ca78ed992 | 2,132 | py | Python | svm/main.py | quant-violinista/MITx-6.86x | d6cc5824f6e6161c6e7b270c1948b53749ca85c9 | [
"MIT"
] | 1 | 2020-12-16T09:37:09.000Z | 2020-12-16T09:37:09.000Z | svm/main.py | quant-violinista/MITx-6.86x | d6cc5824f6e6161c6e7b270c1948b53749ca85c9 | [
"MIT"
] | null | null | null | svm/main.py | quant-violinista/MITx-6.86x | d6cc5824f6e6161c6e7b270c1948b53749ca85c9 | [
"MIT"
] | null | null | null | import numpy as np
def randomization(n):
"""
Arg:
n - an integer
Returns:
A - a randomly-generated nx1 Numpy array.
"""
A = np.random.random([n, 1])
print(len(A))
return A
def operations(h, w):
"""
Takes two inputs, h and w, and makes two Numpy arrays A and B of size
... | 23.173913 | 79 | 0.59803 |
0399e838087a441b04f7559de899475b65578ede | 9,157 | py | Python | ibis/expr/groupby.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 5 | 2018-04-26T17:42:14.000Z | 2020-10-14T19:02:59.000Z | ibis/expr/groupby.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 12 | 2018-04-07T03:13:34.000Z | 2020-07-13T15:45:34.000Z | ibis/expr/groupby.py | ian-r-rose/ibis | c2323b8dfd7b56db821426513c379de38203b332 | [
"Apache-2.0"
] | 2 | 2020-11-27T22:21:50.000Z | 2021-04-03T09:36:25.000Z | # Copyright 2014 Cloudera Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | 28.003058 | 79 | 0.56678 |
0399f8d11a55a533cbe1bcfb45223a3acc4ce972 | 4,132 | py | Python | omh_nbi/handlers/uni_set.py | BroadbandForum/obbaa-vomci | 949ad64e1b0521a892f223b7cf97e4e792b2ea1f | [
"Apache-2.0"
] | null | null | null | omh_nbi/handlers/uni_set.py | BroadbandForum/obbaa-vomci | 949ad64e1b0521a892f223b7cf97e4e792b2ea1f | [
"Apache-2.0"
] | null | null | null | omh_nbi/handlers/uni_set.py | BroadbandForum/obbaa-vomci | 949ad64e1b0521a892f223b7cf97e4e792b2ea1f | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Broadband Forum
#
# 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 writi... | 37.225225 | 121 | 0.669409 |
039a5e15eddadf1d11c30a75fd9db85fab48ce61 | 3,499 | py | Python | igibson/activity/get_obj_shelf_heights.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 360 | 2020-04-02T11:12:09.000Z | 2022-03-24T21:46:58.000Z | igibson/activity/get_obj_shelf_heights.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 169 | 2020-04-07T21:01:05.000Z | 2022-03-31T10:07:39.000Z | igibson/activity/get_obj_shelf_heights.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 94 | 2020-04-09T23:22:17.000Z | 2022-03-17T21:49:03.000Z | """
Credit: Andrey Kurenkov
"""
import argparse
import os
import pybullet as pb
import trimesh
import yaml
from igibson.objects.articulated_object import ArticulatedObject
from igibson.scenes.empty_scene import EmptyScene
from igibson.simulator import Simulator
"""
Analyzes a model for heights of surfaces within i... | 35.343434 | 110 | 0.655616 |
039a6c35e1a7e249ebde8ce7c0431253af01a73b | 958 | py | Python | sdks/python/test/test_ExternalStoreRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_ExternalStoreRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_ExternalStoreRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcente... | 23.95 | 99 | 0.728601 |
039a6f25f4684919f2813113722a3e322477ab04 | 588 | py | Python | prefect/kubernetes_loggers.py | kvnkho/demos | c8c33993e00baf6a25d0ffdc44db924b327cbffa | [
"MIT"
] | 13 | 2021-05-13T23:07:17.000Z | 2022-03-19T00:00:41.000Z | prefect/kubernetes_loggers.py | kvnkho/demos | c8c33993e00baf6a25d0ffdc44db924b327cbffa | [
"MIT"
] | null | null | null | prefect/kubernetes_loggers.py | kvnkho/demos | c8c33993e00baf6a25d0ffdc44db924b327cbffa | [
"MIT"
] | 7 | 2021-06-16T18:16:55.000Z | 2022-03-21T03:34:43.000Z | from prefect import Flow, task
import prefect
from prefect.run_configs.kubernetes import KubernetesRun
from prefect.storage.github import GitHub
@task
def abc():
logger = prefect.context.get("logger")
logger.info(prefect.context.config.logging)
return "a"
with Flow("logger-test") as flow:
abc()
RUN_C... | 29.4 | 80 | 0.755102 |
039aa16bb17fcc3b8333565dd1b3923e5d61f86a | 36,976 | py | Python | sympy/utilities/codegen.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | 1 | 2016-03-31T12:39:44.000Z | 2016-03-31T12:39:44.000Z | sympy/utilities/codegen.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | null | null | null | sympy/utilities/codegen.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | 3 | 2015-04-18T22:33:32.000Z | 2015-09-23T06:45:07.000Z | """
module for generating C, C++, Fortran77, Fortran90 and python routines that
evaluate sympy expressions. This module is work in progress. Only the
milestones with a '+' character in the list below have been completed.
--- How is sympy.utilities.codegen different from sympy.printing.ccode? ---
We considered the ide... | 36.003895 | 108 | 0.610423 |
039ba4b5590e3d8bff7846ab2af36745dcae2a56 | 13,439 | py | Python | doc/srcs_generated_examples/python_srcs/multicell_simulation050.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | 1 | 2021-01-21T11:31:59.000Z | 2021-01-21T11:31:59.000Z | doc/srcs_generated_examples/python_srcs/multicell_simulation050.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | null | null | null | doc/srcs_generated_examples/python_srcs/multicell_simulation050.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | null | null | null |
PostSynapticTemplateLibrary.register_template_specialisation( modelsrc='HULL10', synapsetype='MHR-dIN-Inhib',
template_type = PostSynapticMech_Exp2Syn_Base,
tau_open=1.5*ms, tau_close=30*ms, e_rev=-70*mV, popening=1.0, peak_conductance=0.5*nS,)
# tIN -> dIN
# ==============
def create_synapse_tIN_to... | 46.50173 | 177 | 0.629213 |
039bb009ac6682e9bd49245c7d5e640128d0875d | 2,826 | py | Python | Allura/allura/tests/unit/test_helpers/test_ago.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | 1 | 2019-03-17T04:16:15.000Z | 2019-03-17T04:16:15.000Z | Allura/allura/tests/unit/test_helpers/test_ago.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | Allura/allura/tests/unit/test_helpers/test_ago.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | 41.558824 | 83 | 0.670559 |
039bdd6dcc34405a6e0a012d114243e72c830174 | 2,580 | py | Python | agent/indy_catalyst_agent/messaging/credentials/messages/tests/test_credential_request.py | TelegramSam/indy-catalyst | 476f5a773d90d8b50960b49e63b823bd13325d4a | [
"Apache-2.0"
] | null | null | null | agent/indy_catalyst_agent/messaging/credentials/messages/tests/test_credential_request.py | TelegramSam/indy-catalyst | 476f5a773d90d8b50960b49e63b823bd13325d4a | [
"Apache-2.0"
] | null | null | null | agent/indy_catalyst_agent/messaging/credentials/messages/tests/test_credential_request.py | TelegramSam/indy-catalyst | 476f5a773d90d8b50960b49e63b823bd13325d4a | [
"Apache-2.0"
] | null | null | null | from ..credential_request import CredentialRequest, CredentialRequestSchema
from ....message_types import MessageTypes
from unittest import mock, TestCase
class TestCredentialRequest(TestCase):
offer_json = "offer_json"
credential_request_json = "credential_request_json"
credential_values_json = "credent... | 36.338028 | 108 | 0.742248 |
039beba866fbaa46442d40736504a244ac9456af | 409 | py | Python | Week 1/day 1 - Variables/index.py | eddie246/python-playground | 10c4a43c0a4974c1beab52c8b6533ffd93b01520 | [
"MIT"
] | 1 | 2021-07-26T05:31:57.000Z | 2021-07-26T05:31:57.000Z | Week 1/day 1 - Variables/index.py | eddie246/python-playground | 10c4a43c0a4974c1beab52c8b6533ffd93b01520 | [
"MIT"
] | null | null | null | Week 1/day 1 - Variables/index.py | eddie246/python-playground | 10c4a43c0a4974c1beab52c8b6533ffd93b01520 | [
"MIT"
] | null | null | null | print('Hello World\nHello World Again')
city = input('What is the name of the city you grew up in?\n')
pet = input('What is the name of your first pet?\n')
band_name = city + ' ' + pet
print('Your band name is: ' + band_name)
# print('Hello ' + input('What is your name? ') + '!')
# name = input('What is your name? ... | 27.266667 | 62 | 0.638142 |
039c1d90678392f028215a971d5d043945b258d2 | 1,711 | py | Python | sparql/views.py | gfranzini/dig_ed_cat | 5f1a64109010e5366d28d0639f088a2e895c3488 | [
"MIT"
] | null | null | null | sparql/views.py | gfranzini/dig_ed_cat | 5f1a64109010e5366d28d0639f088a2e895c3488 | [
"MIT"
] | 10 | 2021-02-02T23:12:07.000Z | 2021-12-13T20:50:47.000Z | sparql/views.py | gfranzini/dig_ed_cat | 5f1a64109010e5366d28d0639f088a2e895c3488 | [
"MIT"
] | null | null | null | import os
from django.conf import settings
from SPARQLWrapper import SPARQLWrapper, JSON, BASIC
from django.http import JsonResponse
from django.http import Http404
from django.conf import settings
from django.shortcuts import render
from django.views.generic.edit import FormView
from .forms import QueryForm
from .mode... | 31.109091 | 68 | 0.679719 |
039c4b0b61fc530a07f7ff170118de22b9db440d | 495 | py | Python | onmt/encoders/__init__.py | lbda1/OpenNMT-py-AMR-to-text | b59347246fb330feff4139b677014554e8b9aad0 | [
"MIT"
] | 26 | 2019-03-29T07:52:43.000Z | 2021-12-29T02:41:31.000Z | onmt/encoders/__init__.py | lbda1/OpenNMT-py-AMR-to-text | b59347246fb330feff4139b677014554e8b9aad0 | [
"MIT"
] | 1 | 2020-02-15T10:31:58.000Z | 2020-02-17T14:19:26.000Z | onmt/encoders/__init__.py | lbda1/OpenNMT-py-AMR-to-text | b59347246fb330feff4139b677014554e8b9aad0 | [
"MIT"
] | 5 | 2019-06-30T19:57:46.000Z | 2021-04-01T07:56:53.000Z | """Module defining encoders."""
from onmt.encoders.encoder import EncoderBase
from onmt.encoders.transformer import TransformerEncoder
from onmt.encoders.rnn_encoder import RNNEncoder
from onmt.encoders.gcn_encoder import GCNEncoder
from onmt.encoders.treelstm_encoder import TreeLSTMEncoder
from onmt.encoders.cnn_encod... | 41.25 | 75 | 0.822222 |
039c58689f29c242f2ce641d41957f7afe28b1d9 | 1,237 | py | Python | experiments/ashvin/vae/new_sawyer3d.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/vae/new_sawyer3d.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/vae/new_sawyer3d.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | # import tensorflow as tf
# import numpy as np
# import mnist_data
# import os
from rlkit.torch.vae.conv_vae import ConvVAE
from rlkit.torch.vae.vae_trainer import ConvVAETrainer
from rlkit.torch.vae.sawyer3d_data import get_data
# import plot_utils
# import glob
# import ss.path
# import argparse
from rlkit.launchers... | 28.113636 | 59 | 0.679062 |
039c619ffd008e95161aaca6d317f5650a5ae2a7 | 4,636 | py | Python | validation-scripts/ice_validator/tests/test_fixed_ips_format.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | validation-scripts/ice_validator/tests/test_fixed_ips_format.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | validation-scripts/ice_validator/tests/test_fixed_ips_format.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | # -*- coding: utf8 -*-
# ============LICENSE_START=======================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
# ========================================... | 38.957983 | 82 | 0.536454 |
039c78d0e4966c51acc7abe2647ed1fd9d11c087 | 3,937 | py | Python | alipay/aop/api/request/AlipayInsAutoBenefitUseRequest.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/request/AlipayInsAutoBenefitUseRequest.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/request/AlipayInsAutoBenefitUseRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayInsAutoBenefitUseModel import AlipayInsAutoBenefitUseModel
class AlipayInsAutoBenefitUseRequest(object):
def __init__(sel... | 27.151724 | 148 | 0.641605 |
039c93c0c7d8dd8332d2c579bf50e77b5b1f5b5e | 1,876 | py | Python | preprocess/image_tiling.py | m4ln/image_processing_scripts | 3274e01869be9c7a845a4bb76aa02b3cf0023b50 | [
"BSD-3-Clause"
] | null | null | null | preprocess/image_tiling.py | m4ln/image_processing_scripts | 3274e01869be9c7a845a4bb76aa02b3cf0023b50 | [
"BSD-3-Clause"
] | null | null | null | preprocess/image_tiling.py | m4ln/image_processing_scripts | 3274e01869be9c7a845a4bb76aa02b3cf0023b50 | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
from PIL import Image
from util.ensure_path_exists import ensure_path_exists
tile_width = int(sys.argv[2])
tile_height = tile_width
set_name = "A03"
magnification = "X40"
input_dir = "/home/mr38/sds_hd/sd18a006/Marlen/datasets/MITOS-ATYPIA-14" \
"/extract/train/" + set_name + "/fram... | 37.52 | 141 | 0.603412 |
039c9c3bf2d9d5e673e7097d4e7f34e7d4c184a3 | 4,581 | py | Python | satella/coding/decorators/flow_control.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 12 | 2019-12-13T10:17:38.000Z | 2022-01-05T09:01:36.000Z | satella/coding/decorators/flow_control.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 26 | 2016-04-01T11:55:26.000Z | 2021-12-30T17:03:59.000Z | satella/coding/decorators/flow_control.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 1 | 2021-05-31T08:45:22.000Z | 2021-05-31T08:45:22.000Z | import queue
import typing as tp
from .decorators import wraps
from ..typing import ExceptionClassType, NoArgCallable, Predicate
Queue = tp.TypeVar('Queue')
def queue_get(queue_getter: tp.Union[str, tp.Callable[[object], Queue]],
timeout: tp.Optional[float] = None,
exception_empty: tp.Un... | 36.070866 | 99 | 0.610347 |
039cb769c229b6e70b3881729aecf7ba0b76f007 | 257 | py | Python | relation/__init__.py | hackerekcah/ESRelation | 6aa1e4bcb04c90fca79a125cc128481155da54a1 | [
"MIT"
] | null | null | null | relation/__init__.py | hackerekcah/ESRelation | 6aa1e4bcb04c90fca79a125cc128481155da54a1 | [
"MIT"
] | null | null | null | relation/__init__.py | hackerekcah/ESRelation | 6aa1e4bcb04c90fca79a125cc128481155da54a1 | [
"MIT"
] | null | null | null | RBLOCK_REGISTRY = dict()
def register_rblock(name):
def decorated(cls):
RBLOCK_REGISTRY[name] = cls
return cls
return decorated
from . import rblock, rblock_pe, rblock_efficient, rblock_pe_efficient
__all__ = ["register_rblock"] | 19.769231 | 70 | 0.715953 |
039cb86bfa55d414c36d8558af3316608660fd1a | 426 | py | Python | pybemt/fluid.py | Team-Peryton/pyBEMT2 | cfe83f709f616489c0df817641d54f2877e680bc | [
"MIT"
] | 1 | 2021-07-26T17:57:23.000Z | 2021-07-26T17:57:23.000Z | pybemt/fluid.py | Team-Peryton/pyBEMT2 | cfe83f709f616489c0df817641d54f2877e680bc | [
"MIT"
] | null | null | null | pybemt/fluid.py | Team-Peryton/pyBEMT2 | cfe83f709f616489c0df817641d54f2877e680bc | [
"MIT"
] | 1 | 2021-09-05T18:41:12.000Z | 2021-09-05T18:41:12.000Z | # -*- coding: utf-8 -*-
"""
Module for holding and calculating fluid properties. Currently, only viscosity and density are included.
"""
class Fluid:
"""
Class for loading fluid properties from configuration file and providing them to the solver.
:param configparser.SafeConfigParser cfg: Configuration ob... | 22.421053 | 104 | 0.685446 |
039cc17e780e695188447fbaf9f3a1d3ca87ae58 | 30,480 | py | Python | augly/text/functional.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | augly/text/functional.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | augly/text/functional.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
from copy import deepcopy
from typing import Any, Callable, Dict, List, Optional, Union
import augly.text.augmenters as a
import augly.text.utils as txtutils
from augly.utils import (
CONTRACTIONS_MAPPING,
FUN_FONTS_PATH,
GENDERED_W... | 32.951351 | 89 | 0.684777 |
039ced7ef8d8765757d07757c24d62e489398284 | 2,006 | py | Python | py_src/Function.py | raphaelreyna/Subseries | 3ecd6b33b8edd6495d5202f04824c7347b506f34 | [
"MIT"
] | null | null | null | py_src/Function.py | raphaelreyna/Subseries | 3ecd6b33b8edd6495d5202f04824c7347b506f34 | [
"MIT"
] | null | null | null | py_src/Function.py | raphaelreyna/Subseries | 3ecd6b33b8edd6495d5202f04824c7347b506f34 | [
"MIT"
] | null | null | null | """
This class handles all of the symbolic math, including computing terms for series expansions.
Mainly, it spits out terms of expansion evaluation.
Expansion evaluation involves taking the Tayler series expansion of the function about a point.
We then evaluate the series at a certain point and spit out the results te... | 33.433333 | 98 | 0.617647 |
039cf0780a47d6f1f0d67f9500476edbb619a186 | 1,379 | py | Python | app/dashboards/Dash_fun.py | sebastienlanglois/flask-hydro | 2bd399ca91fdaeea297ec5e6ee076ce1a53d0f37 | [
"MIT"
] | null | null | null | app/dashboards/Dash_fun.py | sebastienlanglois/flask-hydro | 2bd399ca91fdaeea297ec5e6ee076ce1a53d0f37 | [
"MIT"
] | 8 | 2020-03-24T17:16:40.000Z | 2022-03-11T23:52:59.000Z | app/dashboards/Dash_fun.py | sebastienlanglois/flask-hydro | 2bd399ca91fdaeea297ec5e6ee076ce1a53d0f37 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Jan 25 22:34:51 2019
@author: jimmybow
"""
from datetime import datetime, timedelta
from flask_login import current_user
import dash_html_components as html
import pandas as pd
import uuid
import os
import pickle
def save_object(obj, session_id, name):
os.makedirs('Dir_... | 29.978261 | 95 | 0.655547 |
039d21c58596a5fe94eb9fa921002c51ceb329bb | 14,342 | py | Python | sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_patch.py | nittaya1990/azure-sdk-for-python | 13f2d0f0864d15d774c1bca4acc9694f048c496c | [
"MIT"
] | 2 | 2021-09-07T18:30:33.000Z | 2021-11-23T02:50:57.000Z | sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_patch.py | nittaya1990/azure-sdk-for-python | 13f2d0f0864d15d774c1bca4acc9694f048c496c | [
"MIT"
] | 4 | 2021-10-06T16:39:52.000Z | 2021-11-18T18:33:37.000Z | sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_patch.py | nittaya1990/azure-sdk-for-python | 13f2d0f0864d15d774c1bca4acc9694f048c496c | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ... | 39.728532 | 149 | 0.669642 |
039d430106fede8c9a8a69d49ea24f2a1080c2c2 | 3,896 | py | Python | generate_dash.py | jrhunter3/Basic_Dockerized_PoW | af0f80f7373ed0a3878aadcb79ff54c37dbf3fa6 | [
"MIT"
] | null | null | null | generate_dash.py | jrhunter3/Basic_Dockerized_PoW | af0f80f7373ed0a3878aadcb79ff54c37dbf3fa6 | [
"MIT"
] | null | null | null | generate_dash.py | jrhunter3/Basic_Dockerized_PoW | af0f80f7373ed0a3878aadcb79ff54c37dbf3fa6 | [
"MIT"
] | null | null | null | #
# generate model observer
#
import argparse
import tornado.template as template
import os
from conf.config import templates
from lib.powlib import pluralize
from pydoc import locate
import shutil
def camel_case(name):
"""
converts this_is_new to ThisIsNew
and this in This
"""
return "".j... | 30.920635 | 132 | 0.545431 |
039d6c4b591a0e66b085d45cd1c11b7eab1fba01 | 6,292 | py | Python | data_process/word_entity.py | wxy1224/cs224n_project | 6dbd7869622565d0eaa3ac7b1dacc569f33d5a18 | [
"MIT"
] | 1 | 2018-05-30T16:16:12.000Z | 2018-05-30T16:16:12.000Z | data_process/word_entity.py | wxy1224/cs224n_project | 6dbd7869622565d0eaa3ac7b1dacc569f33d5a18 | [
"MIT"
] | 7 | 2020-01-28T22:19:16.000Z | 2021-05-21T14:43:03.000Z | data_process/word_entity.py | wxy1224/cs224n_project | 6dbd7869622565d0eaa3ac7b1dacc569f33d5a18 | [
"MIT"
] | null | null | null | # !/usr/bin/env python -W ignore::DeprecationWarning
import pandas as pd, numpy as np
import nltk
from itertools import chain
import re
import nltk
import nltk.tag.stanford as st
import os
tagger = st.StanfordNERTagger(
'../../stanford-ner/classifiers/english.all.3class.distsim.crf.ser.gz',
'../../stanford-ner/sta... | 28.730594 | 81 | 0.620788 |
039d8555d41c2312fb45095e36c787f6a1bb7a72 | 1,576 | py | Python | demo/dom/generate_html1.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | 2 | 2018-05-28T23:01:20.000Z | 2018-05-29T03:59:38.000Z | demo/dom/generate_html1.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | demo/dom/generate_html1.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | """
A basic example of using the DOM to create an HTML document from scratch.
Also demonstrates creation of HTML forms
"""
from xml.dom import ext
from xml.dom import implementation
if __name__ == '__main__':
#create a concrete HTMLDocument instance.
doc = implementation.createHTMLDocument('A Basic HTML Docu... | 28.654545 | 73 | 0.699239 |
039da055269a066ea8d7947a066ae606eb72efdf | 7,775 | py | Python | PyFunceble/logs.py | mitchellkrogza/PyFunceble | b2b0d3fc18097cd630eed849ee99d961263d607b | [
"MIT"
] | null | null | null | PyFunceble/logs.py | mitchellkrogza/PyFunceble | b2b0d3fc18097cd630eed849ee99d961263d607b | [
"MIT"
] | null | null | null | PyFunceble/logs.py | mitchellkrogza/PyFunceble | b2b0d3fc18097cd630eed849ee99d961263d607b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# pylint:disable=line-too-long
"""
The tool to check the availability or syntax of domains, IPv4 or URL.
::
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
███... | 32.531381 | 88 | 0.55537 |
039db5059d5e8fc864ff4fb33ed7e3824606557c | 2,777 | py | Python | sdk/agrifood/azure-agrifood-farming/samples/async/sample_cascade_delete_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/agrifood/azure-agrifood-farming/samples/async/sample_cascade_delete_async.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/agrifood/azure-agrifood-farming/samples/async/sample_cascade_delete_async.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""
FILE: sample_cascade_delete_async.py
DESCRIPTION:
This sample demonstrates
- Getting a filterd list of farmers based on last modified timestamp
- Queuing a cascade delete job on a farmer, and polling for it to complete
USAGE:
... | 33.865854 | 111 | 0.733165 |
039dc9a4a0f6e01cd9aad3566851f31d1a61a18d | 2,027 | py | Python | assets/tuned/daemon/tuned/utils/global_config.py | s-urbaniak/cluster-node-tuning-operator | b51256d8616970cb3ab0a06446202604473f1258 | [
"Apache-2.0"
] | 53 | 2018-11-13T07:02:03.000Z | 2022-03-25T00:00:04.000Z | assets/tuned/daemon/tuned/utils/global_config.py | s-urbaniak/cluster-node-tuning-operator | b51256d8616970cb3ab0a06446202604473f1258 | [
"Apache-2.0"
] | 324 | 2018-10-02T14:18:54.000Z | 2022-03-31T23:47:33.000Z | assets/tuned/daemon/tuned/utils/global_config.py | s-urbaniak/cluster-node-tuning-operator | b51256d8616970cb3ab0a06446202604473f1258 | [
"Apache-2.0"
] | 54 | 2018-10-01T16:55:09.000Z | 2022-03-28T13:56:53.000Z | import tuned.logs
from configobj import ConfigObj, ConfigObjError
from validate import Validator
from tuned.exceptions import TunedException
import tuned.consts as consts
from tuned.utils.commands import commands
__all__ = ["GlobalConfig"]
log = tuned.logs.get()
class GlobalConfig():
global_config_spec = ["dynamic... | 33.229508 | 96 | 0.73113 |
039dcb0ca9403ca55d33a4b366b31702aad9966f | 2,983 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/ssd1305_stats.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/examples/ssd1305_stats.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/examples/ssd1305_stats.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: <text> 2020 Tony DiCola, James DeVito,
# and 2020 Melissa LeBlanc-Williams, for Adafruit Industries </text>
# SPDX-License-Identifier: MIT
# This example is for use on (Linux) computers that are using CPython with
# Adafruit Blinka to support CircuitPython libraries. CircuitPython does
# no... | 33.144444 | 109 | 0.695273 |
039dd6c09a97d6d5fd235294625a61afea227d28 | 1,868 | py | Python | openai/tests/test_api_requestor.py | borisdayma/openai-python | a7e259c66f734d0400527320bbb2a0e9e9f7cf5f | [
"MIT"
] | 1 | 2022-02-25T18:33:46.000Z | 2022-02-25T18:33:46.000Z | openai/tests/test_api_requestor.py | yancong222/openai-python | 54852345065612bebfe26ad3d02cff1794abcafc | [
"MIT"
] | null | null | null | openai/tests/test_api_requestor.py | yancong222/openai-python | 54852345065612bebfe26ad3d02cff1794abcafc | [
"MIT"
] | null | null | null | import json
import pytest
import requests
from pytest_mock import MockerFixture
from openai import Model
from openai.api_requestor import APIRequestor
@pytest.mark.requestor
def test_requestor_sets_request_id(mocker: MockerFixture) -> None:
# Fake out 'requests' and confirm that the X-Request-Id header is set.
... | 36.627451 | 94 | 0.720557 |
039dea66c3f6263ff665dde3f77a863645ac35c3 | 2,708 | py | Python | gaphor/diagram/components/node.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | gaphor/diagram/components/node.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | gaphor/diagram/components/node.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | """
Node item may represent a node or a device UML metamodel classes.
Grouping
========
Node item can group following items
- other nodes, which are represented with Node.nestedNode on UML metamodel
level
- deployed artifacts using deployment
- components, which are parts of a node acting as structured classifier
... | 31.488372 | 85 | 0.635894 |
039e1570e3307a9c1804186f06749ffa27df6a32 | 4,663 | py | Python | libpython/ben/normalize.py | longnow/panlex-tools | 1b10fa140af96078c7c909cd10f3f3c05f641671 | [
"MIT"
] | 8 | 2015-11-02T22:55:24.000Z | 2018-05-27T22:11:40.000Z | libpython/ben/normalize.py | longnow/panlex-tools | 1b10fa140af96078c7c909cd10f3f3c05f641671 | [
"MIT"
] | 3 | 2021-03-31T19:12:43.000Z | 2021-12-13T20:03:51.000Z | libpython/ben/normalize.py | longnow/panlex-tools | 1b10fa140af96078c7c909cd10f3f3c05f641671 | [
"MIT"
] | 2 | 2016-07-11T18:00:18.000Z | 2019-04-23T14:41:52.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import panlex
import sqlite3
import regex as re
from collections import defaultdict, Counter
import os
import zipfile
import requests
from tqdm import tqdm
data_directory = os.path.dirname(__file__) + '/data/'
# def update_panlex_lite():
# r = requests.get('http://d... | 34.798507 | 122 | 0.616127 |
039e2c532beb46a4fbef0840a4bbb84f35681212 | 24,122 | py | Python | scripts/support/run_bundler.py | noisychannel/joshua | cabf0a30b717ade61a3b8e2d2d65b0cb61f7cf36 | [
"BSD-2-Clause"
] | null | null | null | scripts/support/run_bundler.py | noisychannel/joshua | cabf0a30b717ade61a3b8e2d2d65b0cb61f7cf36 | [
"BSD-2-Clause"
] | null | null | null | scripts/support/run_bundler.py | noisychannel/joshua | cabf0a30b717ade61a3b8e2d2d65b0cb61f7cf36 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Combine a set of Joshua configuration and resources into a portable
directory tree.
"""
from __future__ import print_function
import argparse
from collections import namedtuple
import logging
import os
import shutil
import signal
import stat
from subprocess import Calle... | 33.134615 | 145 | 0.638919 |
039e7603d10e473ccd55680f4540d0c2e8d6719b | 2,627 | py | Python | data-processing/entities/symbols/__init__.py | jusheen/scholar-reader | d1d87c0e2ab1cb411b9a9b80e3e2e7e256b9c9c0 | [
"Apache-2.0"
] | null | null | null | data-processing/entities/symbols/__init__.py | jusheen/scholar-reader | d1d87c0e2ab1cb411b9a9b80e3e2e7e256b9c9c0 | [
"Apache-2.0"
] | null | null | null | data-processing/entities/symbols/__init__.py | jusheen/scholar-reader | d1d87c0e2ab1cb411b9a9b80e3e2e7e256b9c9c0 | [
"Apache-2.0"
] | null | null | null | from common import directories
from common.commands.base import CommandList
from common.commands.compile_tex import make_compile_tex_command
from common.commands.diff_images import make_diff_images_command
from common.commands.locate_hues import make_locate_hues_command
from common.commands.raster_pages import make_ras... | 39.80303 | 89 | 0.820708 |
039e9866ef3d93b6082f62f6f2303d421d811b27 | 846 | py | Python | savu/plugins/unregistered/dezinger_old/dezinger_deprecated_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | savu/plugins/unregistered/dezinger_old/dezinger_deprecated_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | savu/plugins/unregistered/dezinger_old/dezinger_deprecated_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | from savu.plugins.plugin_tools import PluginTools
class DezingerDeprecatedTools(PluginTools):
"""A plugin for cleaning x-ray strikes based on statistical evaluation of
the near neighbourhood
"""
def define_parameters(self):
"""
outlier_mu:
visibility: basic
dtype... | 30.214286 | 77 | 0.560284 |
039eb9c556bc86390ca2b129371ec02216c5955b | 639 | py | Python | src/cltl/combot/backend/api/discrete.py | leolani/cltl-knowledgerepresentation | df936348e57453ffbb2e82343cf12322c26f3ced | [
"MIT"
] | 2 | 2021-08-19T06:14:07.000Z | 2022-02-15T18:55:47.000Z | src/cltl/combot/backend/api/discrete.py | leolani/cltl-knowledgerepresentation | df936348e57453ffbb2e82343cf12322c26f3ced | [
"MIT"
] | 13 | 2021-07-21T07:16:50.000Z | 2022-02-24T22:06:05.000Z | src/cltl/combot/backend/api/discrete.py | leolani/cltl-knowledgerepresentation | df936348e57453ffbb2e82343cf12322c26f3ced | [
"MIT"
] | 1 | 2021-06-28T18:57:39.000Z | 2021-06-28T18:57:39.000Z | import enum
class Certainty(enum.Enum):
UNDERSPECIFIED = 0
POSSIBLE = 1
PROBABLE = 2
CERTAIN = 3
class Polarity(enum.Enum):
UNDERSPECIFIED = 0
NEGATIVE = 1
POSITIVE = 2
class Sentiment(enum.Enum):
UNDERSPECIFIED = 0
NEGATIVE = 1
NEUTRAL = 2
POSITIVE = 3
class Emotion(... | 13.891304 | 31 | 0.596244 |
039ec653006ba579a343193af229d49708218622 | 4,855 | py | Python | tests/test_hub.py | huggingface/hf_benchmarks | 2a4367b003d4e363a7e3c6485c4a6bdbfd8f95f0 | [
"Apache-2.0"
] | null | null | null | tests/test_hub.py | huggingface/hf_benchmarks | 2a4367b003d4e363a7e3c6485c4a6bdbfd8f95f0 | [
"Apache-2.0"
] | 1 | 2022-03-30T20:36:55.000Z | 2022-03-30T20:36:55.000Z | tests/test_hub.py | huggingface/hf_benchmarks | 2a4367b003d4e363a7e3c6485c4a6bdbfd8f95f0 | [
"Apache-2.0"
] | null | null | null | import os
from unittest import TestCase
import pandas as pd
from huggingface_hub import HfFolder
from hf_benchmarks import extract_tags, get_benchmark_repos
from .testing_utils import (
BOGUS_BENCHMARK_NAME,
DUMMY_BENCHMARK_NAME,
DUMMY_EVALUATION_ID,
DUMMY_MODEL_ID,
DUMMY_PREDICTION_ID,
)
class... | 38.531746 | 111 | 0.65829 |
039ec8e8988338d07217eca1c779590b2b201b76 | 271 | py | Python | terrascript/openshift/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/openshift/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/openshift/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/openshift/__init__.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class openshift(terrascript.Provider):
pass
| 18.066667 | 79 | 0.774908 |
039ed418c3051e51f4ac60f6e432f941d9332056 | 1,313 | py | Python | orangehackathon/widgets/markduplicates.py | e-mental-health/orange-hackathon | ff4ece2495fb47599e61e634f94b55c4f5692b0f | [
"Apache-2.0"
] | 1 | 2022-01-06T16:48:07.000Z | 2022-01-06T16:48:07.000Z | orangehackathon/widgets/markduplicates.py | e-mental-health/orange-hackathon | ff4ece2495fb47599e61e634f94b55c4f5692b0f | [
"Apache-2.0"
] | 4 | 2019-08-30T17:28:11.000Z | 2022-02-01T08:06:08.000Z | orangehackathon/widgets/markduplicates.py | e-mental-health/orange-hackathon | ff4ece2495fb47599e61e634f94b55c4f5692b0f | [
"Apache-2.0"
] | 1 | 2019-08-30T11:06:20.000Z | 2019-08-30T11:06:20.000Z | from Orange.widgets import gui
from Orange.data import StringVariable
from orangecontrib.text.corpus import Corpus
from Orange.widgets.widget import OWWidget, Input, Output
import orangehackathon.libs.markduplicatesLIB as markduplicatesLIB
class MarkDuplicates(OWWidget):
name = "Mark Duplicates"
description = ... | 29.840909 | 79 | 0.669459 |
039eedf32721d2bd19aa7084b69311538b606b8c | 5,365 | py | Python | d4rl/d4rl/hand_manipulation_suite/door_v0.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | 4 | 2021-11-17T20:19:34.000Z | 2022-03-31T04:21:26.000Z | d4rl/d4rl/hand_manipulation_suite/door_v0.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | null | null | null | d4rl/d4rl/hand_manipulation_suite/door_v0.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | null | null | null | import numpy as np
from gym import utils
from gym import spaces
from mjrl.envs import mujoco_env
from mujoco_py import MjViewer
from d4rl import offline_env
import os
ADD_BONUS_REWARDS = True
class DoorEnvV0(mujoco_env.MujocoEnv, utils.EzPickle, offline_env.OfflineEnv):
def __init__(self, **kwargs):
offli... | 40.037313 | 153 | 0.625163 |
039f08280125f3fe0f9e0a7a3001286f70c33e83 | 5,162 | py | Python | src/run_data_aug_experiment.py | miszkur/data-efficient-NLP | 7ad9d988cd17e769ab97802adbdeb6893429af10 | [
"Apache-2.0"
] | null | null | null | src/run_data_aug_experiment.py | miszkur/data-efficient-NLP | 7ad9d988cd17e769ab97802adbdeb6893429af10 | [
"Apache-2.0"
] | null | null | null | src/run_data_aug_experiment.py | miszkur/data-efficient-NLP | 7ad9d988cd17e769ab97802adbdeb6893429af10 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import pandas as pd
import ml_collections
import time
import pickle
import os
import torch
from codecarbon import EmissionsTracker
from torch.utils.data import ConcatDataset, Subset, DataLoader
from data_processing.ev_parser import create_dataloader, create_dataset
from models.bert import BertClass... | 33.089744 | 95 | 0.712708 |
039f20a7b52a1b0d1f2265fd829b904de572744f | 11,112 | py | Python | ibis/backends/pandas/tests/test_udf.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 1 | 2020-08-19T03:36:26.000Z | 2020-08-19T03:36:26.000Z | ibis/backends/pandas/tests/test_udf.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | null | null | null | ibis/backends/pandas/tests/test_udf.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 2 | 2020-11-27T22:21:50.000Z | 2021-04-03T09:36:25.000Z | import collections
import numpy as np
import pandas as pd
import pandas.testing as tm
import pytest
import ibis
import ibis.expr.datatypes as dt
import ibis.expr.types as ir
from .. import connect
from ..udf import nullable, udf
@pytest.fixture
def df():
return pd.DataFrame(
{
'a': list('ab... | 24.85906 | 79 | 0.577574 |
039fd7b77e1f86979b91127e5a90f99146e10f21 | 26,215 | py | Python | scene_graph/test_visualize.py | SAMMiCA/robot_home_service | fa1a49346b38e6f82e7cf0c7f9c09349d956c972 | [
"MIT"
] | null | null | null | scene_graph/test_visualize.py | SAMMiCA/robot_home_service | fa1a49346b38e6f82e7cf0c7f9c09349d956c972 | [
"MIT"
] | null | null | null | scene_graph/test_visualize.py | SAMMiCA/robot_home_service | fa1a49346b38e6f82e7cf0c7f9c09349d956c972 | [
"MIT"
] | null | null | null | import vispy
from vispy.scene import visuals, SceneCanvas
import numpy as np
from matplotlib import pyplot as plt
import cv2
import os
import time
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from torch.multiprocessing import Process, Queue
import torch.multiprocessing as mp
cl... | 40.330769 | 163 | 0.582071 |
039fe24f83b1685519842e68a08ebf1cc8c5ffdd | 7,653 | py | Python | Test05_DQN_Game/Test05_DQN_train.py | hooloong/My_TensorFlow | ef115989035b9ae14938dca47c0814b0d16dd6ba | [
"MIT"
] | 3 | 2018-07-29T17:31:58.000Z | 2019-06-27T10:36:34.000Z | Test05_DQN_Game/Test05_DQN_train.py | hooloong/My_TensorFlow | ef115989035b9ae14938dca47c0814b0d16dd6ba | [
"MIT"
] | null | null | null | Test05_DQN_Game/Test05_DQN_train.py | hooloong/My_TensorFlow | ef115989035b9ae14938dca47c0814b0d16dd6ba | [
"MIT"
] | 1 | 2019-02-18T02:27:39.000Z | 2019-02-18T02:27:39.000Z | import pygame
import random
from pygame.locals import *
import numpy as np
from collections import deque
import tensorflow as tf # http://blog.topspeedsnail.com/archives/10116
import cv2 # http://blog.topspeedsnail.com/archives/4755
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
SCREEN_SIZE = [320, 400]
BAR_SIZE = [50, ... | 36.617225 | 114 | 0.606037 |
039fe7a4aaf15631d69f17bd2e184a1bbb9268a0 | 357 | py | Python | talks-articles/languages-n-runtimes/python/learnpythonthehardway/ex15.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 37 | 2015-02-01T23:16:39.000Z | 2021-12-22T16:50:48.000Z | talks-articles/languages-n-runtimes/python/learnpythonthehardway/ex15.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 1 | 2017-03-02T04:55:48.000Z | 2018-01-14T10:51:11.000Z | talks-articles/languages-n-runtimes/python/learnpythonthehardway/ex15.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 15 | 2015-03-02T08:09:01.000Z | 2021-06-10T03:25:41.000Z | # -*- coding: utf-8 -*-
# reading files
from sys import argv
script, filename = argv
txt = open(filename)
print "Content of %r" % filename
print "+" * 25
print txt.read()
print "#" * 25
print txt.read()
txt_again = open(filename)
print "=" * 25
print txt_again.read()
## if you wanna be sure exactly when/where it ... | 15.521739 | 52 | 0.67507 |
039feb95300f528d900ca106cbe8efa9381b82b3 | 36,515 | py | Python | lib/vrd/cvpr/run_test_vp.py | yjy941124/PPR-FCN | 1eba5515b37e7b32413efdf14bb0c22a2e46fee9 | [
"MIT"
] | 20 | 2017-10-16T18:12:51.000Z | 2021-12-23T02:34:20.000Z | lib/vrd/cvpr/run_test_vp.py | yjy941124/PPR-FCN | 1eba5515b37e7b32413efdf14bb0c22a2e46fee9 | [
"MIT"
] | 1 | 2018-11-10T04:59:48.000Z | 2021-01-21T04:51:31.000Z | lib/vrd/cvpr/run_test_vp.py | yjy941124/PPR-FCN | 1eba5515b37e7b32413efdf14bb0c22a2e46fee9 | [
"MIT"
] | 5 | 2017-10-17T00:54:42.000Z | 2018-04-08T15:09:40.000Z | import _init_paths
from vrd.test import test_net
from fast_rcnn.config import cfg, cfg_from_file, cfg_from_list
from datasets.factory import get_imdb
import caffe
import argparse
import pprint
import time, os, sys
import numpy as np
import h5py
import cv2
from fast_rcnn.config import cfg, get_output_dir
from fast_rcnn... | 40.348066 | 150 | 0.575791 |
03a02a432846fb4cae7eefed4b9a71fd73327b18 | 1,181 | py | Python | office365/sharepoint/files/file_creation_information.py | domdinicola/Office365-REST-Python-Client | c64adb6c3fdc2786e0c9529e8b0f4c3ee207d2a0 | [
"MIT"
] | null | null | null | office365/sharepoint/files/file_creation_information.py | domdinicola/Office365-REST-Python-Client | c64adb6c3fdc2786e0c9529e8b0f4c3ee207d2a0 | [
"MIT"
] | null | null | null | office365/sharepoint/files/file_creation_information.py | domdinicola/Office365-REST-Python-Client | c64adb6c3fdc2786e0c9529e8b0f4c3ee207d2a0 | [
"MIT"
] | null | null | null | from office365.runtime.client_value import ClientValue
class FileCreationInformation(ClientValue):
"""Represents properties that can be set when creating a file by using the FileCollection.Add method."""
def __init__(self, url=None, overwrite=False, content=None):
"""
:type url: str
... | 26.244444 | 108 | 0.629975 |
03a0549f19ed3861795dd6410b63588507d691ae | 1,245 | py | Python | GPSVI/test/testquad.py | AlchemicalChest/gaussian-process-svi | 56111e9a125cdd322473685b1b7ef875d584653e | [
"MIT"
] | null | null | null | GPSVI/test/testquad.py | AlchemicalChest/gaussian-process-svi | 56111e9a125cdd322473685b1b7ef875d584653e | [
"MIT"
] | null | null | null | GPSVI/test/testquad.py | AlchemicalChest/gaussian-process-svi | 56111e9a125cdd322473685b1b7ef875d584653e | [
"MIT"
] | 1 | 2017-02-08T03:45:25.000Z | 2017-02-08T03:45:25.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 21 11:09:51 2015
@author: Ziang
"""
#from numpy.polynomial.hermite import hermval
#from numpy.polynomial.hermite import hermgauss
from numpy import inf
#from math import factorial
from math import sqrt
from math import pi
from sympy import mpmath
from scipy.integrate imp... | 24.9 | 83 | 0.670683 |
03a05772ac233d1523799d3300284a5eeba0f0fe | 931 | py | Python | cursoemvideoPy/Mundo3/ex113.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | cursoemvideoPy/Mundo3/ex113.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | cursoemvideoPy/Mundo3/ex113.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | def leia_int(msg):
while True:
try:
n = int(input(msg))
except (ValueError, TypeError):
print('\033[31mERRO: por favor, digite um número inteiro válido.\033[m')
continue
except KeyboardInterrupt:
print('\n\033[31mUsuário preferiu não digitar es... | 28.212121 | 84 | 0.566058 |
03a05c578d4d52ffa9e23a30f6b3538830e7d37f | 17,862 | py | Python | curator/curator.py | mbbx6spp/curator | 10611dd073bf8864e02f9c8236132b7f5b4631a6 | [
"Apache-2.0"
] | 1 | 2015-03-02T18:19:35.000Z | 2015-03-02T18:19:35.000Z | curator/curator.py | mbbx6spp/curator | 10611dd073bf8864e02f9c8236132b7f5b4631a6 | [
"Apache-2.0"
] | null | null | null | curator/curator.py | mbbx6spp/curator | 10611dd073bf8864e02f9c8236132b7f5b4631a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Time-based and Size-based operations are mutually exclusive!
#
# Time-based operations
# Put an integer (n) after any of the following options to:
# --delete, --close, (disable) --bloom (filters), --optimize
# Do one or more of these on indices older than (n) --time-unit(s)
# where --time-unit... | 48.275676 | 240 | 0.681391 |
03a077a89c9a507a12db72f674a0c36c6631d595 | 230 | py | Python | reprexlite/__init__.py | jayqi/reprexlite | efe0fa3190bd77ba8d47be6995cd9a0d040d36d4 | [
"MIT"
] | 6 | 2021-02-15T11:33:05.000Z | 2021-05-31T04:14:18.000Z | reprexlite/__init__.py | jayqi/reprexlite | efe0fa3190bd77ba8d47be6995cd9a0d040d36d4 | [
"MIT"
] | 51 | 2021-02-15T21:06:51.000Z | 2022-03-31T15:11:21.000Z | reprexlite/__init__.py | jayqi/reprexlite | efe0fa3190bd77ba8d47be6995cd9a0d040d36d4 | [
"MIT"
] | null | null | null | from reprexlite.reprex import reprex
from reprexlite.version import __version__ # noqa: F401
try:
from reprexlite.ipython import load_ipython_extension # noqa: F401
except ImportError:
pass
__all__ = [
"reprex",
]
| 19.166667 | 71 | 0.747826 |
03a08765d4059dc21199a674fad04f50430158ee | 3,185 | py | Python | tests/test_gui.py | jdekarske/axopy | a60abb44a12c5e833b9033170825773bb0691394 | [
"MIT"
] | 13 | 2019-01-23T13:00:00.000Z | 2022-01-17T14:45:32.000Z | tests/test_gui.py | jdekarske/axopy | a60abb44a12c5e833b9033170825773bb0691394 | [
"MIT"
] | 45 | 2017-01-16T22:44:59.000Z | 2018-12-18T18:43:08.000Z | tests/test_gui.py | jdekarske/axopy | a60abb44a12c5e833b9033170825773bb0691394 | [
"MIT"
] | 5 | 2017-01-13T00:14:08.000Z | 2018-11-08T13:16:24.000Z | import pytest
import os
from PyQt5 import QtCore, QtWidgets
import numpy as np
from axopy import util
from axopy.gui.main import _MainWindow, Container, _SessionConfig
from axopy.gui.graph import SignalWidget
from axopy.gui.canvas import Canvas, Circle, Cross, Line, Text, Rectangle
def exercise_item(item):
"""Put... | 22.75 | 73 | 0.64113 |
03a092f32b7f0979b2d46e6907257510310baded | 18 | py | Python | prereise/gather/winddata/__init__.py | terrywqf/PreREISE | f8052dd37091eaa15024725d5c92a3ef0ee311ee | [
"MIT"
] | null | null | null | prereise/gather/winddata/__init__.py | terrywqf/PreREISE | f8052dd37091eaa15024725d5c92a3ef0ee311ee | [
"MIT"
] | null | null | null | prereise/gather/winddata/__init__.py | terrywqf/PreREISE | f8052dd37091eaa15024725d5c92a3ef0ee311ee | [
"MIT"
] | null | null | null | __all__ = ["rap"]
| 9 | 17 | 0.555556 |
03a0991b56bab6e7b40b7f94cbc297c10112318a | 15,546 | py | Python | datasketch/experimental/aio/lsh.py | yrik/datasketch | 82d9639bc0011932a952bbae1d4b5bd5ac03c7c8 | [
"MIT"
] | 1,771 | 2015-04-07T18:06:02.000Z | 2022-03-31T17:45:24.000Z | datasketch/experimental/aio/lsh.py | yrik/datasketch | 82d9639bc0011932a952bbae1d4b5bd5ac03c7c8 | [
"MIT"
] | 159 | 2015-08-15T09:47:58.000Z | 2022-03-22T12:55:21.000Z | datasketch/experimental/aio/lsh.py | yrik/datasketch | 82d9639bc0011932a952bbae1d4b5bd5ac03c7c8 | [
"MIT"
] | 278 | 2015-04-08T13:50:27.000Z | 2022-03-02T13:00:33.000Z | import sys
if sys.version_info < (3, 6):
raise ImportError("Can't use AsyncMinHashLSH module. Python version should be >=3.6")
import asyncio
from typing import Tuple, Dict
from itertools import chain
from datasketch.experimental.aio.storage import (async_ordered_storage, async_unordered_storage, )
from dataske... | 37.550725 | 151 | 0.580857 |
03a0b50ea52d8e5f282c75255700a7edd1c8085a | 12,187 | py | Python | Capsules.py | idhamari/CapsPix2Pix | 985341666a13e76e47723217df9fcde593bd028a | [
"MIT"
] | 24 | 2019-02-18T07:18:58.000Z | 2020-12-18T06:19:02.000Z | Capsules.py | idhamari/CapsPix2Pix | 985341666a13e76e47723217df9fcde593bd028a | [
"MIT"
] | 2 | 2019-07-06T20:58:00.000Z | 2022-01-30T18:35:44.000Z | Capsules.py | idhamari/CapsPix2Pix | 985341666a13e76e47723217df9fcde593bd028a | [
"MIT"
] | 13 | 2019-04-07T22:30:58.000Z | 2022-03-28T04:47:44.000Z |
from __future__ import print_function
import torch.nn.parallel
import torch.utils.data
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import cv2
USE_CUDA = torch.cuda.is_available()
class PrimaryCaps(nn.Module):
def __init__(self, num_capsules=8, in_channel... | 42.463415 | 130 | 0.622385 |
03a0d2df2f5f71a71f37ee7e84ead12711bbf312 | 17,252 | py | Python | python/gdescent/hpoints_gradient8.py | Oilgrim/ivs_sim | 95dc017ef2aec32173e73dc397ba00177d4f92ce | [
"MIT"
] | null | null | null | python/gdescent/hpoints_gradient8.py | Oilgrim/ivs_sim | 95dc017ef2aec32173e73dc397ba00177d4f92ce | [
"MIT"
] | null | null | null | python/gdescent/hpoints_gradient8.py | Oilgrim/ivs_sim | 95dc017ef2aec32173e73dc397ba00177d4f92ce | [
"MIT"
] | 1 | 2019-08-07T03:16:47.000Z | 2019-08-07T03:16:47.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Fri Aug 4 11:52:11 2017
@author: lracuna
"""
from vision.camera import *
from vision.plane import Plane
import autograd.numpy as np
from autograd import grad
from error_functions import geometric_distance_points, get_matrix_conditioning_number, volker_metr... | 32.674242 | 119 | 0.645027 |
03a0e2d16bc8859b676fd5a917f5855307568c71 | 6,365 | py | Python | python/hostconfig/machines/iceberg.py | AvciRecep/chaste_2019 | 1d46cdac647820d5c5030f8a9ea3a1019f6651c1 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2020-04-05T12:11:54.000Z | 2020-04-05T12:11:54.000Z | python/hostconfig/machines/iceberg.py | AvciRecep/chaste_2019 | 1d46cdac647820d5c5030f8a9ea3a1019f6651c1 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | python/hostconfig/machines/iceberg.py | AvciRecep/chaste_2019 | 1d46cdac647820d5c5030f8a9ea3a1019f6651c1 | [
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2020-04-05T14:26:13.000Z | 2021-03-09T08:18:17.000Z | # Configuration
"""Copyright (c) 2005-2019, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source ... | 46.459854 | 153 | 0.710605 |
03a115bee721fc772f339d95090a59bc31271318 | 14,219 | py | Python | api/v2/serializers/core.py | theirc/IRC-Services-Legacy | 818ffd13fecb8a7f1c29c341d427d0a339809f8b | [
"BSD-3-Clause"
] | 2 | 2020-10-05T14:43:24.000Z | 2020-10-14T12:46:56.000Z | api/v2/serializers/core.py | pg-irc/IRC-Services-Legacy | 818ffd13fecb8a7f1c29c341d427d0a339809f8b | [
"BSD-3-Clause"
] | 3 | 2019-02-26T18:21:01.000Z | 2020-06-18T14:56:16.000Z | api/v2/serializers/core.py | pg-irc/IRC-Services-Legacy | 818ffd13fecb8a7f1c29c341d427d0a339809f8b | [
"BSD-3-Clause"
] | null | null | null | import json
from django.http import Http404
from django.utils.encoding import force_text
from django.utils.http import urlsafe_base64_decode
from rest_framework.generics import get_object_or_404
from django.contrib.auth.models import Group
from django.contrib.auth import authenticate, get_user_model
import regions.mo... | 36.741602 | 157 | 0.620789 |
03a12ba63b2425d051212efc55aeb5d6f6ccc3a4 | 386 | py | Python | appflow/views/base.py | dyvenia/timesheets | 5120acd66cbeb3ce43bff5acfee4cd6b14882962 | [
"MIT"
] | 13 | 2021-09-27T14:53:15.000Z | 2022-02-15T05:48:01.000Z | appflow/views/base.py | dyvenia/timeflow | 7852872f591fbdb88be19f7b41ebb226e805fbd9 | [
"MIT"
] | 62 | 2022-02-15T09:52:52.000Z | 2022-03-31T12:50:13.000Z | appflow/views/base.py | dyvenia/timesheets | 5120acd66cbeb3ce43bff5acfee4cd6b14882962 | [
"MIT"
] | 4 | 2022-03-02T15:24:03.000Z | 2022-03-30T10:59:38.000Z | import dominate as dm
from dominate import tags as tg
def base_html():
"""
Create home page of TimeFlow.
"""
doc = dm.document(title="TimeFlow", doctype="<!DOCTYPE html>")
doc.head += tg.meta(charset="UTF-8")
doc.head += tg.link(
rel="css/styles.css", type="text/css", href="static/css/... | 24.125 | 75 | 0.608808 |
03a13ab56b8ea1791e808b0518cf16f43a49b578 | 1,684 | py | Python | setup.py | NbAiLab/ScandEval | 59eb1902a1880d7483d48a4ee213bbec0e2eb71a | [
"MIT"
] | 10 | 2021-07-21T10:47:42.000Z | 2022-03-03T13:45:25.000Z | setup.py | NbAiLab/ScandEval | 59eb1902a1880d7483d48a4ee213bbec0e2eb71a | [
"MIT"
] | 28 | 2021-07-29T12:21:15.000Z | 2022-03-09T12:46:49.000Z | setup.py | NbAiLab/ScandEval | 59eb1902a1880d7483d48a4ee213bbec0e2eb71a | [
"MIT"
] | 4 | 2022-01-17T12:11:58.000Z | 2022-03-14T18:42:01.000Z | from setuptools import setup, find_packages
from pathlib import Path
from bump_version import get_current_version
PYTORCH_REQUIRES = ['torch>=1.6.0']
JAX_REQUIRES = PYTORCH_REQUIRES + ['jaxlib>=0.1.75', 'jax>=0.2.26', 'flax>=0.3.6']
SPACY_REQUIRES = ['spacy>=3.2.0', 'spacy-transformers>=1.1.0']
ALL_REQUIRES = (PYTORCH... | 42.1 | 82 | 0.559382 |
03a15dc9ee87f242521db97816c2bf5030536f25 | 271 | py | Python | design/search_engine.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | design/search_engine.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | design/search_engine.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null |
# search engine
index = {}
index["brown"] = [1]
index["fox"] = [1, 2]
index["lion"] = [2, 4, 6]
words = ["brown", "fox"]
results = set()
# Union of the two sets
for word in words:
for doc_id in index[word]:
results.add(doc_id)
# can do
print(results)
| 12.318182 | 30 | 0.579336 |
03a18998be226ca9faf217b2a883dcf62d539101 | 6,215 | py | Python | controller/project_controller/projects/phising_classifier/training_model_phising_classifier.py | rohandhanraj/Auto-AI-Pipeline | d5f39715c802db45afae0d5978d228bf0bcd2f0a | [
"MIT"
] | null | null | null | controller/project_controller/projects/phising_classifier/training_model_phising_classifier.py | rohandhanraj/Auto-AI-Pipeline | d5f39715c802db45afae0d5978d228bf0bcd2f0a | [
"MIT"
] | null | null | null | controller/project_controller/projects/phising_classifier/training_model_phising_classifier.py | rohandhanraj/Auto-AI-Pipeline | d5f39715c802db45afae0d5978d228bf0bcd2f0a | [
"MIT"
] | null | null | null | """
This is the Entry point for Training the Machine Learning Model.
Written By: iNeuron Intelligence
Version: 1.0
Revisions: None
"""
# Doing the necessary imports
import numpy as np
from sklearn.model_selection import train_test_split
from controller.project_controller.projects.WaferFaultDetection_new.data_ingesti... | 50.528455 | 118 | 0.660821 |
03a18daaa37d4c4745b46c69c9232fbbc6d30d8a | 37,537 | py | Python | falkon/benchmarks/common/datasets.py | mohamad-amin/falkon | 581c761b4a4cb7bf6a299613700db8414c419a52 | [
"MIT"
] | 130 | 2020-06-18T08:30:30.000Z | 2022-03-21T15:43:17.000Z | falkon/benchmarks/common/datasets.py | mohamad-amin/falkon | 581c761b4a4cb7bf6a299613700db8414c419a52 | [
"MIT"
] | 32 | 2020-06-26T09:24:45.000Z | 2022-03-20T10:37:36.000Z | falkon/benchmarks/common/datasets.py | mohamad-amin/falkon | 581c761b4a4cb7bf6a299613700db8414c419a52 | [
"MIT"
] | 17 | 2020-07-13T17:28:02.000Z | 2022-02-15T19:55:40.000Z | import os
from abc import abstractmethod, ABC
from typing import Union, Tuple
import h5py
import numpy as np
import scipy.io as scio
import scipy.sparse
from scipy.sparse import load_npz
from sklearn.datasets import load_svmlight_file
from .benchmark_utils import Dataset
__all__ = (
"get_load_fn", "get_cv_fn",
... | 36.479106 | 136 | 0.642566 |
03a1c41524b7d401567623489a4be3002f7906b3 | 7,027 | py | Python | pyxtal_ml/descriptors/stats.py | qzhu2017/ML-DOS | c58ebdfc77746175771af0862ed5737c4eaa3eec | [
"MIT"
] | 11 | 2018-11-18T21:57:16.000Z | 2021-07-20T12:23:28.000Z | pyxtal_ml/descriptors/stats.py | qzhu2017/ML-DOS | c58ebdfc77746175771af0862ed5737c4eaa3eec | [
"MIT"
] | 34 | 2018-10-23T14:54:48.000Z | 2019-03-26T18:07:09.000Z | pyxtal_ml/descriptors/stats.py | qzhu2017/ML-Materials | c58ebdfc77746175771af0862ed5737c4eaa3eec | [
"MIT"
] | 3 | 2018-11-15T06:34:37.000Z | 2019-01-04T02:04:25.000Z | import numpy as np
from scipy.stats import kurtosis, skew
class descriptor_stats(object):
'''
A class containing standardized statistics to compute over each
representation
These statistics include:
mean, standard deviation, kurtosis, and skewness
Population covariance is also considered ... | 31.940909 | 137 | 0.600968 |
03a1d5ad703723fc9c0a8ebbc53eb0868742b618 | 2,098 | py | Python | .eggs/docutils-0.14-py2.7.egg/docutils/languages/sv.py | MQQ/git-bigstore | 95f1e37fcda7fdce80502593cec31a44c604cf8a | [
"Apache-2.0"
] | null | null | null | .eggs/docutils-0.14-py2.7.egg/docutils/languages/sv.py | MQQ/git-bigstore | 95f1e37fcda7fdce80502593cec31a44c604cf8a | [
"Apache-2.0"
] | null | null | null | .eggs/docutils-0.14-py2.7.egg/docutils/languages/sv.py | MQQ/git-bigstore | 95f1e37fcda7fdce80502593cec31a44c604cf8a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# $Id: sv.py 8006 2016-12-22 23:02:44Z milde $
# Author: Adam Chodorowski <chodorowski@users.sourceforge.net>
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
# read <http://docutils.sf.net/docs/howto/i18... | 34.393443 | 76 | 0.590086 |
03a29f64215b6dabd3669a7df2ec50cb9f0b36e1 | 352 | py | Python | caterblu/urls.py | jeremyrea/caterblu | 77bf902997a46b36eca13ba1e8ca09d7e86958d0 | [
"MIT"
] | null | null | null | caterblu/urls.py | jeremyrea/caterblu | 77bf902997a46b36eca13ba1e8ca09d7e86958d0 | [
"MIT"
] | 11 | 2016-03-18T17:53:18.000Z | 2021-06-10T18:29:42.000Z | caterblu/urls.py | jeremyrea/caterblu | 77bf902997a46b36eca13ba1e8ca09d7e86958d0 | [
"MIT"
] | null | null | null | import source.views.views
from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
admin.autodiscover()
urlpatterns = [
url(r'^$', source.views.views.index, name='index'),
url(r'^api/price', source.views.views.price, name='price'),
... | 25.142857 | 67 | 0.752841 |
03a30c3da9fbebafcac8ab38147644708d316c4f | 6,441 | py | Python | model/pars.py | nt409/vector-interface | f0abb8d96622c04a008a9531f6952da211eba1fc | [
"MIT"
] | null | null | null | model/pars.py | nt409/vector-interface | f0abb8d96622c04a008a9531f6952da211eba1fc | [
"MIT"
] | null | null | null | model/pars.py | nt409/vector-interface | f0abb8d96622c04a008a9531f6952da211eba1fc | [
"MIT"
] | null | null | null | from components.slr_list import SLIDER_LIST, SLIDER_IND_MAP
class DefaultParams:
def __init__(self, trans_type) -> None:
self.N = 1000
self.rho = 0.01
self.mu = 0.01
self.alpha = 0.12
self.sigma = 0.18
self.Gamma = 2
self.delta = 0
self.beta = 1
... | 25.971774 | 171 | 0.514827 |
03a31568d25b8d97dda4ffd287de2e33b091481a | 1,572 | py | Python | office365/sharepoint/fields/field_user.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | 544 | 2016-08-04T17:10:16.000Z | 2022-03-31T07:17:20.000Z | office365/sharepoint/fields/field_user.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | 438 | 2016-10-11T12:24:22.000Z | 2022-03-31T19:30:35.000Z | office365/sharepoint/fields/field_user.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | 202 | 2016-08-22T19:29:40.000Z | 2022-03-30T20:26:15.000Z | from office365.sharepoint.fields.field_lookup import FieldLookup
class FieldUser(FieldLookup):
"""Specifies a field that contains a user."""
@property
def presence(self):
"""Gets a value that specifies whether presence is enabled on the field.
:rtype: bool or None
"""
ret... | 31.44 | 110 | 0.646947 |
03a31cca463b4de3be3a555a98e9a5dc3abd7eeb | 3,048 | py | Python | experiments/steven-images/ddpg_classic_envs.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/steven-images/ddpg_classic_envs.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/steven-images/ddpg_classic_envs.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
import rlkit.torch.pytorch_util as ptu
from rlkit.launchers.launcher_util import run_experiment
from torch import nn as nn
from rlkit.torch.networks.experimental import HuberLoss
from rlkit.torch.ddpg.ddpg import DDPG
from rlkit.torch.networks import ConcatMlp, TanhMlpPolicy
from... | 28.222222 | 75 | 0.601378 |
03a33051ee42e2d5a1e3482163fad740651c4f2f | 8,501 | py | Python | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_failures.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2020-07-15T09:50:14.000Z | 2020-07-15T09:50:14.000Z | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_failures.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_failures.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright (C) 2010 Google 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 copyright
# notice, this list of conditions and the ... | 32.696154 | 122 | 0.709211 |
03a35033c40c291fd45a784eb8bab0f9516b6496 | 5,022 | py | Python | modules/manager.py | horsy-ml/horsy | 1161df2e83c201784ea674bd1d53e76831b15a0f | [
"MIT"
] | null | null | null | modules/manager.py | horsy-ml/horsy | 1161df2e83c201784ea674bd1d53e76831b15a0f | [
"MIT"
] | null | null | null | modules/manager.py | horsy-ml/horsy | 1161df2e83c201784ea674bd1d53e76831b15a0f | [
"MIT"
] | null | null | null | import json
import threading
from rich import print
from modules.request import request
import modules.vars as horsy_vars
import os
import zipfile
from modules.virustotal import scan_to_cli
from modules.http_status import handle
from ezzdl import dl
def install(package):
"""
Install an app
:param package:... | 35.617021 | 110 | 0.545599 |
03a3606a84c48436479fee2c47646cfd730751f7 | 673 | py | Python | peewee_migrate/__init__.py | RedNu11/peewee_migrate2 | f35ec40bc57088461a43aa5910dc9d85df83b662 | [
"BSD-3-Clause"
] | null | null | null | peewee_migrate/__init__.py | RedNu11/peewee_migrate2 | f35ec40bc57088461a43aa5910dc9d85df83b662 | [
"BSD-3-Clause"
] | null | null | null | peewee_migrate/__init__.py | RedNu11/peewee_migrate2 | f35ec40bc57088461a43aa5910dc9d85df83b662 | [
"BSD-3-Clause"
] | null | null | null | """
The package description.
"""
import datetime as dt
import logging
import peewee as pw
# Package information
# ===================
__version__ = "1.5.0"
__project__ = "peewee_migrate2"
__author__ = "spumer, Kirill Klenov"
__license__ = "BSD"
LOGGER = logging.getLogger(__name__)
LOGGER.addHandler(logging.S... | 18.189189 | 62 | 0.692422 |
03a3639d31ce2c751de2e4a273d34646a75f2ef9 | 20,009 | py | Python | src/utils/tools.py | ferrocactus/cellar | d1733d4643b3a4c960529806d4904ab3b3c54666 | [
"MIT"
] | 7 | 2020-11-16T16:50:37.000Z | 2021-09-08T16:56:32.000Z | src/utils/tools.py | ferrocactus/cellar | d1733d4643b3a4c960529806d4904ab3b3c54666 | [
"MIT"
] | null | null | null | src/utils/tools.py | ferrocactus/cellar | d1733d4643b3a4c960529806d4904ab3b3c54666 | [
"MIT"
] | 3 | 2020-07-03T04:14:55.000Z | 2021-03-14T21:51:22.000Z | import itertools
import json
import re
import os
from typing import Optional, Union
from anndata import AnnData
from sklearn.neighbors import NearestNeighbors
from sklearn.neighbors import kneighbors_graph
from ast import literal_eval
from functools import reduce
import anndata
import numpy as np
from bidict import... | 34.203419 | 108 | 0.613674 |
03a36b8ce66882af0b06676a4f3ee78b0ea2f8ab | 4,857 | py | Python | test_projects/ClickInterface/main.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 16 | 2021-04-16T02:01:29.000Z | 2022-01-01T08:53:49.000Z | test_projects/ClickInterface/main.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 613 | 2021-03-24T03:37:38.000Z | 2022-03-26T10:58:37.000Z | test_projects/ClickInterface/main.py | simon-ritchie/apyscript | c319f8ab2f1f5f7fad8d2a8b4fc06e7195476279 | [
"MIT"
] | 2 | 2021-06-20T07:32:58.000Z | 2021-12-26T08:22:11.000Z | """Test project for ClickInterface class.
Command examples:
$ python test_projects/ClickInterface/main.py
"""
import sys
sys.path.append('./')
import os
from types import ModuleType
from typing_extensions import TypedDict
import apysc as ap
from apysc._file import file_util
this_module: ModuleT... | 25.296875 | 74 | 0.631666 |
03a371f59f35e731c2071202dabae192b7c032ee | 2,947 | py | Python | appengine/chromium_rietveld/tests/test_views.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/chromium_rietveld/tests/test_views.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/chromium_rietveld/tests/test_views.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright 2011 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 or ... | 31.688172 | 74 | 0.695962 |
03a376681362b7f95c92a7b421502527ec304edf | 1,168 | py | Python | app/__init__.py | nimowairimu/flask-week-3- | 00876bbbc5816e0fbb3f3d3556bc0c5ee76be28f | [
"MIT"
] | null | null | null | app/__init__.py | nimowairimu/flask-week-3- | 00876bbbc5816e0fbb3f3d3556bc0c5ee76be28f | [
"MIT"
] | null | null | null | app/__init__.py | nimowairimu/flask-week-3- | 00876bbbc5816e0fbb3f3d3556bc0c5ee76be28f | [
"MIT"
] | null | null | null | from flask import Flask
from config import DevConfig, config_options
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from config import config_options
from flask_login import LoginManager
from flask_uploads import UploadSet,configure_uploads,IMAGES
from flask_mail import Mail
photos = U... | 24.333333 | 71 | 0.771404 |
03a38694ae8274f0bad15c9651aaa4b53399cd5f | 15,240 | py | Python | ResultsAnalysis.py | asmerdov/CS_GO_Sensors_Data_Analysis | 82669ae925258e2d6f29e8c55dfe682c0c1558e2 | [
"MIT"
] | 1 | 2020-11-22T17:20:47.000Z | 2020-11-22T17:20:47.000Z | ResultsAnalysis.py | asmerdov/CS_GO_Sensors_Data_Analysis | 82669ae925258e2d6f29e8c55dfe682c0c1558e2 | [
"MIT"
] | null | null | null | ResultsAnalysis.py | asmerdov/CS_GO_Sensors_Data_Analysis | 82669ae925258e2d6f29e8c55dfe682c0c1558e2 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os
import joblib
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.optim import Adam, SGD
import tqdm
import itertools
from sklearn.linear_model import LogisticRegression
from sklearn.neighbors import KNeighborsCla... | 37.816377 | 147 | 0.704528 |
03a3879fb8218fc2640c2d258b4cb16d6fa83d81 | 14,290 | py | Python | src/Blackbird.py | ZackWolf614/BlackBird | 1575127c611be0f9aa606a25f898b58b5f1afd9d | [
"MIT"
] | 5 | 2018-06-05T00:42:44.000Z | 2019-08-10T05:36:06.000Z | src/Blackbird.py | jordan-singer/BlackBird | 1575127c611be0f9aa606a25f898b58b5f1afd9d | [
"MIT"
] | 39 | 2018-05-17T02:31:45.000Z | 2021-02-02T21:46:08.000Z | src/Blackbird.py | ZackWolf614/BlackBird | 1575127c611be0f9aa606a25f898b58b5f1afd9d | [
"MIT"
] | 2 | 2018-06-05T00:53:35.000Z | 2018-08-17T23:06:04.000Z | from DynamicMCTS import DynamicMCTS as MCTS
from RandomMCTS import RandomMCTS
from FixedMCTS import FixedMCTS
from Network import Network
from NetworkFactory import NetworkFactory
from DataManager import Connection
from proto.state_pb2 import State
from collections import defaultdict
import functools
import random
imp... | 37.213542 | 116 | 0.616095 |
03a3cb3d52ca5bda2192cd6d5ce3bc04c8d38491 | 7,707 | py | Python | debug_toolbar/views.py | alex/django-debug-toolbar | 1e0873505b1b07eddeaff7b6df380b539b13a8e2 | [
"BSD-3-Clause"
] | 1 | 2015-11-08T12:47:08.000Z | 2015-11-08T12:47:08.000Z | debug_toolbar/views.py | alex/django-debug-toolbar | 1e0873505b1b07eddeaff7b6df380b539b13a8e2 | [
"BSD-3-Clause"
] | null | null | null | debug_toolbar/views.py | alex/django-debug-toolbar | 1e0873505b1b07eddeaff7b6df380b539b13a8e2 | [
"BSD-3-Clause"
] | null | null | null | """
Helper views for the debug toolbar. These are dynamically installed when the
debug toolbar is displayed, and typically can do Bad Things, so hooking up these
views in any other way is generally not advised.
"""
import os
from django.conf import settings
from django.db import connection
from django.http import Htt... | 39.932642 | 166 | 0.67004 |
03a3cfdfe3adc5a2093d4320ba7141357b768b2a | 10,997 | py | Python | client/verta/tests/test_query.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | null | null | null | client/verta/tests/test_query.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | null | null | null | client/verta/tests/test_query.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | null | null | null | import six
import pytest
import verta
OPERATORS = six.viewkeys(verta._tracking.ExperimentRuns._OP_MAP)
class TestFind:
def test_reject_unsupported_keys(self, client, floats):
# known unsupported keys
all_keys = {
attr
for attr
in verta.client._ExperimentRunS... | 38.585965 | 119 | 0.602528 |
03a3d172314e60af15f123ebc4ff156d4623190c | 2,682 | py | Python | examples/benchmarking/benchmark_bm25.py | tstadel/beir | 3abb52f9465d91a92d61b35b95b371cfbcd3a248 | [
"Apache-2.0"
] | null | null | null | examples/benchmarking/benchmark_bm25.py | tstadel/beir | 3abb52f9465d91a92d61b35b95b371cfbcd3a248 | [
"Apache-2.0"
] | null | null | null | examples/benchmarking/benchmark_bm25.py | tstadel/beir | 3abb52f9465d91a92d61b35b95b371cfbcd3a248 | [
"Apache-2.0"
] | null | null | null | from beir import util, LoggingHandler
from beir.datasets.data_loader import GenericDataLoader
from beir.retrieval.evaluation import EvaluateRetrieval
from beir.retrieval.search.lexical import BM25Search as BM25
import pathlib, os
import datetime
import logging
import random
random.seed(42)
#### Just some code to pri... | 37.25 | 97 | 0.734899 |
03a3ed03f5f29b7b02f8b1ed7060ccf2f28d8d4f | 160 | py | Python | src/schnarc/__init__.py | smausenberger/SchNarc | 727dedf300aa79c01217822c3a9a4f4ae96ede60 | [
"MIT"
] | 7 | 2020-05-07T19:45:17.000Z | 2021-05-13T22:22:18.000Z | src/schnarc/__init__.py | smausenberger/SchNarc | 727dedf300aa79c01217822c3a9a4f4ae96ede60 | [
"MIT"
] | 1 | 2022-03-25T10:39:16.000Z | 2022-03-25T10:39:16.000Z | src/schnarc/__init__.py | smausenberger/SchNarc | 727dedf300aa79c01217822c3a9a4f4ae96ede60 | [
"MIT"
] | 4 | 2020-08-13T19:57:06.000Z | 2022-03-25T10:37:04.000Z | from schnarc import model
from schnarc import utils
from schnarc import data
from schnarc import nn
from schnarc import calculators
from schnarc import metrics
| 22.857143 | 31 | 0.85 |
03a41b1b47306b0df4dd6216aa58d88d1023e81a | 245 | py | Python | examples/heartbeat/heartbeat_server.py | dggfi/Servman | 5415b2f952fd082a5b50d583c53eb6a21b83a296 | [
"MIT"
] | null | null | null | examples/heartbeat/heartbeat_server.py | dggfi/Servman | 5415b2f952fd082a5b50d583c53eb6a21b83a296 | [
"MIT"
] | null | null | null | examples/heartbeat/heartbeat_server.py | dggfi/Servman | 5415b2f952fd082a5b50d583c53eb6a21b83a296 | [
"MIT"
] | null | null | null | from servman import ServiceManager
from service import pong_service
if __name__ == "__main__":
config_path = "conf/server_configuration.json"
sm = ServiceManager(config_path)
sm.register_task('heartbeat', pong_service)
sm.run() | 27.222222 | 50 | 0.755102 |
03a41c03035a8636e2571bd887306bad334cd078 | 484 | py | Python | template.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | template.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | template.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z | """
Problem link:
Solution By Keshav Mishra
"""
from math import ceil,floor, factorial as fact, inf
from copy import deepcopy
from collections import Counter,deque
def get_list():
return list(map(int,input().split()))
def get_int():
return int(input())
for t in range(get_int()):
n = get_int()
a = ge... | 20.166667 | 52 | 0.584711 |
03a43906b08bddd838a5c6598e3eeef86209d48d | 10,542 | py | Python | cogs/starboard.py | etcadinfinitum/CSSBot_Py | 553d2110240e7d643fcaa9f202532ce2bfd77187 | [
"MIT"
] | null | null | null | cogs/starboard.py | etcadinfinitum/CSSBot_Py | 553d2110240e7d643fcaa9f202532ce2bfd77187 | [
"MIT"
] | null | null | null | cogs/starboard.py | etcadinfinitum/CSSBot_Py | 553d2110240e7d643fcaa9f202532ce2bfd77187 | [
"MIT"
] | null | null | null | """
Starboard
Posts quotes of starred messages to the #starboard channel if it exists.
"""
import discord
from discord.ext import commands
import re
import datetime
import logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
# star emoji used to update the starboard
STAR = u"\u2B50"
# require ... | 40.390805 | 134 | 0.644944 |
03a44e2c00eaab8c85115835d5ae987a9195e12c | 721 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/ble_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 87 | 2019-01-03T02:14:14.000Z | 2022-03-22T12:24:47.000Z | examples/ble_simpletest.py | dhalbert/Adafruit_CircuitPython_BLE | 2f7915018a3fa94597177eb51fb5ab9d5b66ddde | [
"Unlicense",
"MIT-0",
"MIT"
] | 107 | 2019-01-08T22:15:16.000Z | 2022-03-09T14:08:40.000Z | examples/ble_simpletest.py | dhalbert/Adafruit_CircuitPython_BLE | 2f7915018a3fa94597177eb51fb5ab9d5b66ddde | [
"Unlicense",
"MIT-0",
"MIT"
] | 48 | 2018-12-31T19:06:12.000Z | 2022-03-28T19:14:07.000Z | # SPDX-FileCopyrightText: 2020 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
"""
This example scans for any BLE advertisements and prints one advertisement and one scan response
from every device found.
"""
from adafruit_ble import BLERadio
ble = BLERadio()
print("scanning")
found = set()
scan_respo... | 25.75 | 96 | 0.728155 |
03a45ba79178275ed0e510d7732b733b7f7a6486 | 3,596 | py | Python | src/dass/classifier_depression.py | CJCascalheira/ml-gender-dysphoria | 2b20c19020342bd5b3c09aa0c107f26770aa541c | [
"MIT"
] | null | null | null | src/dass/classifier_depression.py | CJCascalheira/ml-gender-dysphoria | 2b20c19020342bd5b3c09aa0c107f26770aa541c | [
"MIT"
] | null | null | null | src/dass/classifier_depression.py | CJCascalheira/ml-gender-dysphoria | 2b20c19020342bd5b3c09aa0c107f26770aa541c | [
"MIT"
] | null | null | null | """
SVM classifier for the DASS labels.
Trains a depression classifier.
"""
# region PREPARE WORKSPACE
# Load dependencies
import os
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.svm import SVC
from sklearn.model_selection import KFold
from sklearn.model_sel... | 32.990826 | 115 | 0.67158 |
03a46bfe9b25937bbcb62cdb9c9331437eecf8af | 32,445 | py | Python | code/YOLO101P_1Resolusi_160x120_TrainCPS_OK2.py | mlcv-lab/mr3dcapsnet | d0b37ca085073257b0c485210ec92a5c6e7d9bb6 | [
"Apache-2.0"
] | null | null | null | code/YOLO101P_1Resolusi_160x120_TrainCPS_OK2.py | mlcv-lab/mr3dcapsnet | d0b37ca085073257b0c485210ec92a5c6e7d9bb6 | [
"Apache-2.0"
] | null | null | null | code/YOLO101P_1Resolusi_160x120_TrainCPS_OK2.py | mlcv-lab/mr3dcapsnet | d0b37ca085073257b0c485210ec92a5c6e7d9bb6 | [
"Apache-2.0"
] | 1 | 2021-02-21T16:07:39.000Z | 2021-02-21T16:07:39.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Apr 27 11:28:09 2018
@author: aldi242
"""
import os
import argparse
from keras.preprocessing.image import ImageDataGenerator
from keras import callbacks
import numpy as np
from keras import layers, models, optimizers
from keras import backend as K
from keras.ut... | 41.173858 | 193 | 0.571244 |
03a47a0803027737ebba228cc8af2049d5165938 | 937 | py | Python | components/aws/sagemaker/tests/unit_tests/tests/ground_truth/test_ground_truth_spec.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 2,860 | 2018-05-24T04:55:01.000Z | 2022-03-31T13:49:56.000Z | components/aws/sagemaker/tests/unit_tests/tests/ground_truth/test_ground_truth_spec.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 7,331 | 2018-05-16T09:03:26.000Z | 2022-03-31T23:22:04.000Z | components/aws/sagemaker/tests/unit_tests/tests/ground_truth/test_ground_truth_spec.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 1,359 | 2018-05-15T11:05:41.000Z | 2022-03-31T09:42:09.000Z | from ground_truth.src.sagemaker_ground_truth_spec import SageMakerGroundTruthSpec
import unittest
class GroundTruthSpecTestCase(unittest.TestCase):
REQUIRED_ARGS = [
"--region",
"us-west-2",
"--role",
"arn:aws:iam::123456789012:user/Development/product_1234/*",
"--manifest... | 26.771429 | 81 | 0.582711 |
03a488aa8002694236a5be3e4dd3f266511009e0 | 39,011 | py | Python | datalad/core/distributed/tests/test_push.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | datalad/core/distributed/tests/test_push.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | datalad/core/distributed/tests/test_push.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# ex: set sts=4 ts=4 sw=4 et:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ... | 39.128385 | 107 | 0.652918 |
03a48fab0a2c9524d0917faddf2f6619f8d9ef49 | 13,834 | py | Python | cifar/ttt++.py | Meng-Lingjun-xjtu/ttt-plus-plus | 0f26c689fcaa666fa3524e7c5b6de0c1cb510e89 | [
"MIT"
] | 23 | 2021-11-21T10:50:49.000Z | 2022-03-14T09:34:10.000Z | cifar/ttt++.py | Meng-Lingjun-xjtu/ttt-plus-plus | 0f26c689fcaa666fa3524e7c5b6de0c1cb510e89 | [
"MIT"
] | 2 | 2022-01-06T01:19:24.000Z | 2022-03-03T15:39:23.000Z | cifar/ttt++.py | Meng-Lingjun-xjtu/ttt-plus-plus | 0f26c689fcaa666fa3524e7c5b6de0c1cb510e89 | [
"MIT"
] | 2 | 2021-12-14T22:34:55.000Z | 2022-01-23T10:49:14.000Z | from __future__ import print_function
import argparse
import torch
import torch.nn as nn
import torch.optim as optim
from utils.misc import *
from utils.test_helpers import *
from utils.prepare_dataset import *
# ----------------------------------
import copy
import time
import pandas as pd
import random
import nu... | 36.69496 | 133 | 0.584647 |
03a4b4e3772680e2212344511d21c38c818249a1 | 102 | py | Python | backend/www/views.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | backend/www/views.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | backend/www/views.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | from django.shortcuts import render
def home(request):
return render(request, 'www/index.html')
| 17 | 44 | 0.745098 |
03a4faaa9fc5f92213de1b4f1e3bab2f93c2dff1 | 669 | py | Python | util/print_numpy.py | m4ln/image_processing_scripts | 3274e01869be9c7a845a4bb76aa02b3cf0023b50 | [
"BSD-3-Clause"
] | null | null | null | util/print_numpy.py | m4ln/image_processing_scripts | 3274e01869be9c7a845a4bb76aa02b3cf0023b50 | [
"BSD-3-Clause"
] | null | null | null | util/print_numpy.py | m4ln/image_processing_scripts | 3274e01869be9c7a845a4bb76aa02b3cf0023b50 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
def print_numpy(array, shape=True, val=True):
"""
Prints the mean, min, max, median, std, and size of a numpy array
Args:
array: numpy array
shape: if True prints the shape of the numpy array
val: if True prints the values of the numpy array
Returns:
"... | 24.777778 | 83 | 0.553064 |
03a5075ccd7ae444c679500c66246e81ebb4bd77 | 6,950 | py | Python | src/saliency/mlnet.py | Cogito2012/DRIVE | dba7e72ae3d1a5c2841d39d8fc51af48dd161f9e | [
"MIT"
] | 10 | 2021-11-15T07:35:45.000Z | 2022-03-30T07:09:48.000Z | src/saliency/mlnet.py | Cogito2012/DRIVE | dba7e72ae3d1a5c2841d39d8fc51af48dd161f9e | [
"MIT"
] | null | null | null | src/saliency/mlnet.py | Cogito2012/DRIVE | dba7e72ae3d1a5c2841d39d8fc51af48dd161f9e | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from torchvision import models, transforms
import math
class ResNet_FPN(torch.nn.Module):
def __init__(self, n_layers=50, preTrained=False):
super(ResNet_FPN, self).__init__()
if n_layers == 50:
self.net = models.resnet5... | 40.406977 | 157 | 0.603309 |
03a544add13e4cb2b4d9053fffadfb64c537ddcf | 2,005 | py | Python | polly/plugins/publish/collect_imagesequences.py | mindbender-studio/config | d12a99391afcdc1a52bc3c5d159506f2f9b348f7 | [
"MIT"
] | 5 | 2017-06-18T15:53:56.000Z | 2021-06-18T10:29:10.000Z | polly/plugins/publish/collect_imagesequences.py | BigRoy/config | d12a99391afcdc1a52bc3c5d159506f2f9b348f7 | [
"MIT"
] | 12 | 2017-06-21T14:25:13.000Z | 2021-10-14T05:57:23.000Z | polly/plugins/publish/collect_imagesequences.py | mindbender-studio/config | d12a99391afcdc1a52bc3c5d159506f2f9b348f7 | [
"MIT"
] | 5 | 2017-06-14T14:07:17.000Z | 2020-01-06T08:00:39.000Z | import pyblish.api
class CollectMindbenderImageSequences(pyblish.api.ContextPlugin):
"""Gather image sequnences from working directory"""
order = pyblish.api.CollectorOrder
hosts = ["shell"]
label = "Image Sequences"
def process(self, context):
import os
import json
from ... | 34.568966 | 76 | 0.526683 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.